diff --git a/.htaccess.sample b/.htaccess.sample index 92b1f11404..546f18e6f3 100644 --- a/.htaccess.sample +++ b/.htaccess.sample @@ -31,7 +31,8 @@ ############################################ ## adjust memory limit - php_value memory_limit 64M +# php_value memory_limit 64M + php_value memory_limit 128M php_value max_execution_time 18000 ############################################ diff --git a/app/Mage.php b/app/Mage.php index be02585ba9..b990001b70 100644 --- a/app/Mage.php +++ b/app/Mage.php @@ -154,8 +154,8 @@ public static function getVersionInfo() 'minor' => '4', 'revision' => '0', 'patch' => '0', - 'stability' => 'alpha', - 'number' => '3', + 'stability' => 'beta', + 'number' => '1', ); } @@ -551,7 +551,7 @@ public static function throwException($message, $messageStorage = null) } /** - * Initialize and retrieve application + * Get initialized application object. * * @param string $code * @param string $type @@ -561,22 +561,14 @@ public static function throwException($message, $messageStorage = null) public static function app($code = '', $type = 'store', $options = array()) { if (null === self::$_app) { - Varien_Profiler::start('self::app::construct'); self::$_app = new Mage_Core_Model_App(); - Varien_Profiler::stop('self::app::construct'); - self::setRoot(); self::$_events = new Varien_Event_Collection(); - - - Varien_Profiler::start('self::app::register_config'); self::$_config = new Mage_Core_Model_Config(); - Varien_Profiler::stop('self::app::register_config'); Varien_Profiler::start('self::app::init'); self::$_app->init($code, $type, $options); Varien_Profiler::stop('self::app::init'); - self::$_app->loadAreaPart(Mage_Core_Model_App_Area::AREA_GLOBAL, Mage_Core_Model_App_Area::PART_EVENTS); } return self::$_app; @@ -593,33 +585,30 @@ public static function run($code = '', $type = 'store', $options=array()) { try { Varien_Profiler::start('mage'); - - Varien_Profiler::start('self::app'); - self::app($code, $type, $options); - Varien_Profiler::stop('self::app'); - - Varien_Profiler::start('self::dispatch'); - self::app()->getFrontController()->dispatch(); - Varien_Profiler::stop('self::dispatch'); - + self::setRoot(); + self::$_app = new Mage_Core_Model_App(); + self::$_events = new Varien_Event_Collection(); + self::$_config = new Mage_Core_Model_Config(); + self::$_app->run(array( + 'scope_code' => $code, + 'scope_type' => $type, + 'options' => $options, + )); Varien_Profiler::stop('mage'); - } - catch (Mage_Core_Model_Session_Exception $e) { + } catch (Mage_Core_Model_Session_Exception $e) { header('Location: ' . self::getBaseUrl()); die(); - } - catch (Mage_Core_Model_Store_Exception $e) { - $baseUrl = self::getScriptSystemUrl('404'); + } catch (Mage_Core_Model_Store_Exception $e) { + $baseUrl = rtrim(self::getScriptSystemUrl('404'), '/') . '/404/'; if (!headers_sent()) { - header('Location: ' . rtrim($baseUrl, '/').'/404/'); + header('Location: ' . $baseUrl); } else { print ''; } die(); - } - catch (Exception $e) { + } catch (Exception $e) { if (self::isInstalled() || self::$_isDownloader) { self::printException($e); exit(); @@ -631,8 +620,7 @@ public static function run($code = '', $type = 'store', $options=array()) } else { self::printException($e); } - } - catch (Exception $ne) { + } catch (Exception $ne) { self::printException($ne, $e->getMessage()); } } @@ -650,9 +638,7 @@ public static function isInstalled($options = array()) self::setRoot(); if (is_string($options)) { - $options = array( - 'etc_dir' => $options - ); + $options = array('etc_dir' => $options); } $etcDir = 'etc'; if (!empty($options['etc_dir'])) { diff --git a/app/code/core/Mage/Admin/Model/Config.php b/app/code/core/Mage/Admin/Model/Config.php index 012b2aa06d..e3bf2990cb 100644 --- a/app/code/core/Mage/Admin/Model/Config.php +++ b/app/code/core/Mage/Admin/Model/Config.php @@ -167,4 +167,20 @@ public function getAdminhtmlConfig() { return $this->_adminhtmlConfig; } + + /** + * Get menu item label by item path + * + * @param string $path + * @return string + */ + public function getMenuItemLabel($path) + { + $moduleName = 'adminhtml'; + $menuNode = $this->getAdminhtmlConfig()->getNode('menu/' . str_replace('/', '/children/', trim($path, '/'))); + if ($menuNode->getAttribute('module')) { + $moduleName = (string)$menuNode->getAttribute('module'); + } + return Mage::helper($moduleName)->__((string)$menuNode->title); + } } diff --git a/app/code/core/Mage/Admin/Model/Mysql4/Rules/Collection.php b/app/code/core/Mage/Admin/Model/Mysql4/Rules/Collection.php index 06f50a87b2..c6b4685a96 100644 --- a/app/code/core/Mage/Admin/Model/Mysql4/Rules/Collection.php +++ b/app/code/core/Mage/Admin/Model/Mysql4/Rules/Collection.php @@ -39,7 +39,7 @@ public function getByRoles($id) public function addSortByLength() { - $this->getSelect()->from('', array('length' => 'LENGTH(resource_id)')) + $this->getSelect()->columns(array('length' => 'LENGTH(resource_id)')) ->order('length desc'); return $this; } diff --git a/app/code/core/Mage/Admin/Model/Observer.php b/app/code/core/Mage/Admin/Model/Observer.php index 76a44b6386..fb8f2c6f91 100644 --- a/app/code/core/Mage/Admin/Model/Observer.php +++ b/app/code/core/Mage/Admin/Model/Observer.php @@ -50,8 +50,8 @@ public function actionPreDispatchAdmin($event) if (!$user || !$user->getId()) { if ($request->getPost('login')) { $postLogin = $request->getPost('login'); - $username = $postLogin['username']; - $password = $postLogin['password']; + $username = isset($postLogin['username']) ? $postLogin['username'] : ''; + $password = isset($postLogin['password']) ? $postLogin['password'] : ''; $user = $session->login($username, $password, $request); $request->setPost('login', null); } diff --git a/app/code/core/Mage/Admin/Model/User.php b/app/code/core/Mage/Admin/Model/User.php index 06d66601b9..29199ccb3c 100644 --- a/app/code/core/Mage/Admin/Model/User.php +++ b/app/code/core/Mage/Admin/Model/User.php @@ -228,10 +228,14 @@ public function getAclRole() */ public function authenticate($username, $password) { + $config = Mage::getStoreConfigFlag('admin/security/use_case_sensitive_login'); $result = false; + try { $this->loadByUsername($username); - if ($this->getId() && Mage::helper('core')->validateHash($password, $this->getPassword())) { + $sensitive = ($config) ? $username==$this->getUsername() : true; + + if ($sensitive && $this->getId() && Mage::helper('core')->validateHash($password, $this->getPassword())) { if ($this->getIsActive() != '1') { Mage::throwException(Mage::helper('adminhtml')->__('This account is inactive.')); } diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Category/Abstract.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Category/Abstract.php index 63a327209f..8805020f60 100644 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Category/Abstract.php +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Category/Abstract.php @@ -145,10 +145,11 @@ public function getRootByIds($ids) $root = $tree->getNodeById($rootId); if ($root && $rootId != Mage_Catalog_Model_Category::TREE_ROOT_ID) { $root->setIsVisible(true); - } - elseif($root && $root->getId() == Mage_Catalog_Model_Category::TREE_ROOT_ID) { + } else if($root && $root->getId() == Mage_Catalog_Model_Category::TREE_ROOT_ID) { $root->setName(Mage::helper('catalog')->__('Root')); } + + $tree->addCollectionData($this->getCategoryCollection()); Mage::register('root', $root); } return $root; diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Category/Helper/Sortby/Available.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Category/Helper/Sortby/Available.php index 00c7f22bf7..b779d06859 100644 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Category/Helper/Sortby/Available.php +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Category/Helper/Sortby/Available.php @@ -59,7 +59,7 @@ public function getElementHtml() $html .= 'onclick="toggleValueElements(this, this.parentNode);" class="checkbox" type="checkbox">'; $html .= ' '; + . Mage::helper('adminhtml')->__('Use All Available Attributes').''; $html .= ''; return $html; diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Category/Tab/Attributes.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Category/Tab/Attributes.php index 077ab8888b..22f3b7f3a9 100644 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Category/Tab/Attributes.php +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Category/Tab/Attributes.php @@ -53,6 +53,17 @@ public function __construct() { $this->setShowGlobalIcon(true); } + /** + * Load Wysiwyg on demand and Prepare layout + */ + protected function _prepareLayout() + { + parent::_prepareLayout(); + if (Mage::getSingleton('cms/wysiwyg_config')->isEnabled()) { + $this->getLayout()->getBlock('head')->setCanLoadTinyMce(true); + } + } + /** * Prepare form before rendering HTML * @@ -137,7 +148,8 @@ protected function _prepareForm() { protected function _getAdditionalElementTypes() { return array( - 'image' => Mage::getConfig()->getBlockClassName('adminhtml/catalog_category_helper_image') + 'image' => Mage::getConfig()->getBlockClassName('adminhtml/catalog_category_helper_image'), + 'textarea' => Mage::getConfig()->getBlockClassName('adminhtml/catalog_helper_form_wysiwyg') ); } } diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Category/Tab/Feature.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Category/Tab/Feature.php deleted file mode 100644 index 8e14c9f822..0000000000 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Category/Tab/Feature.php +++ /dev/null @@ -1,25 +0,0 @@ -uniqHash($element->getId()); $sourceUrl = $this->getUrl('*/catalog_category_widget/chooser', array('uniq_id' => $uniqId, 'use_massaction' => false)); - $chooser = $this->getLayout()->createBlock('adminhtml/cms_widget_chooser') + $chooser = $this->getLayout()->createBlock('widget/adminhtml_widget_chooser') ->setElement($element) ->setTranslationHelper($this->getTranslationHelper()) ->setConfig($this->getConfig()) diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Helper/Form/Wysiwyg.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Helper/Form/Wysiwyg.php new file mode 100644 index 0000000000..3c629547b4 --- /dev/null +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Helper/Form/Wysiwyg.php @@ -0,0 +1,65 @@ + + */ +class Mage_Adminhtml_Block_Catalog_Helper_Form_Wysiwyg extends Varien_Data_Form_Element_Textarea +{ + /** + * Retrieve additional html and put it at the end of element html + * + * @return string + */ + public function getAfterElementHtml() + { + $html = parent::getAfterElementHtml(); + if ($this->getIsWysiwygEnabled()) { + $html .= Mage::getSingleton('core/layout') + ->createBlock('adminhtml/widget_button', '', array( + 'label' => Mage::helper('catalog')->__('WYSIWYG Editor'), + 'type' => 'button', + 'onclick' => 'catalogWysiwygEditor.open(\''.Mage::helper('adminhtml')->getUrl('*/*/wysiwyg').'\', \''.$this->getHtmlId().'\')' + ))->toHtml(); + } + return $html; + } + + /** + * Check whether wysiwyg enabled or not + * + * @return boolean + */ + public function getIsWysiwygEnabled() + { + return (bool)(Mage::getSingleton('cms/wysiwyg_config')->isEnabled() && $this->getEntityAttribute()->getIsWysiwygEnabled()); + } +} + diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Helper/Form/Wysiwyg/Content.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Helper/Form/Wysiwyg/Content.php new file mode 100644 index 0000000000..756093ee87 --- /dev/null +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Helper/Form/Wysiwyg/Content.php @@ -0,0 +1,56 @@ + + */ +class Mage_Adminhtml_Block_Catalog_Helper_Form_Wysiwyg_Content + extends Mage_Adminhtml_Block_Widget_Form +{ + /** + * Prepare form. + * Adding editor field to render + * + * @return Mage_Adminhtml_Block_Catalog_Helper_Form_Wysiwyg_Content + */ + protected function _prepareForm() + { + $form = new Varien_Data_Form(array('id' => 'wysiwyg_edit_form', 'action' => $this->getData('action'), 'method' => 'post')); + $form->addField($this->getData('editor_element_id'), 'editor', array( + 'name' => 'content', + 'style' => 'width:725px;height:460px', + 'required' => true, + 'force_load' => true, + 'config' => Mage::getSingleton('cms/wysiwyg_config')->getConfig() + )); + $this->setForm($form); + return parent::_prepareForm(); + } +} 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 07068844ab..89f1afa23d 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 @@ -182,14 +182,21 @@ protected function _prepareForm() 'class' => 'validate-digits', )); + $fieldset->addField('is_wysiwyg_enabled', 'select', array( + 'name' => 'is_wysiwyg_enabled', + 'label' => Mage::helper('catalog')->__('Enable WYSIWYG'), + 'title' => Mage::helper('catalog')->__('Enable WYSIWYG'), + 'values' => $yesnoSource, + )); + $htmlAllowed = $fieldset->addField('is_html_allowed_on_front', 'select', array( 'name' => 'is_html_allowed_on_front', 'label' => Mage::helper('catalog')->__('Allow HTML-tags on Front-end'), 'title' => Mage::helper('catalog')->__('Allow HTML-tags on Front-end'), 'values' => $yesnoSource, )); - if (!$attributeObject->getId()) { - $htmlAllowed->setValue(1); + if (!$attributeObject->getId() || $attributeObject->getIsWysiwygEnabled()) { + $attributeObject->setIsHtmlAllowedOnFront(1); } $fieldset->addField('is_visible_on_front', 'select', array( diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Js.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Js.php new file mode 100644 index 0000000000..fbc78cecc3 --- /dev/null +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Js.php @@ -0,0 +1,52 @@ +getProduct(); + if ($product) { + return Mage::app()->getStore($product->getStoreId()); + } + return Mage::app()->getStore(); + } +} diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Alerts/Stock.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Alerts/Stock.php index 2460b4d191..7f671e8c2a 100644 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Alerts/Stock.php +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Alerts/Stock.php @@ -85,7 +85,7 @@ protected function _prepareColumns() $this->addColumn('send_date', array( 'header' => Mage::helper('catalog')->__('Last Notification'), - 'index' => 'last_send_date', + 'index' => 'send_date', 'type' => 'date' )); diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Attributes.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Attributes.php index 4ce59db1d6..b478940dd6 100644 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Attributes.php +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Attributes.php @@ -33,6 +33,17 @@ */ class Mage_Adminhtml_Block_Catalog_Product_Edit_Tab_Attributes extends Mage_Adminhtml_Block_Catalog_Form { + /** + * Load Wysiwyg on demand and Prepare layout + */ + protected function _prepareLayout() + { + parent::_prepareLayout(); + if (Mage::getSingleton('cms/wysiwyg_config')->isEnabled()) { + $this->getLayout()->getBlock('head')->setCanLoadTinyMce(true); + } + } + protected function _prepareForm() { if ($group = $this->getGroup()) { @@ -114,10 +125,11 @@ protected function _prepareForm() protected function _getAdditionalElementTypes() { $result = array( - 'price' => Mage::getConfig()->getBlockClassName('adminhtml/catalog_product_helper_form_price'), - 'gallery' => Mage::getConfig()->getBlockClassName('adminhtml/catalog_product_helper_form_gallery'), - 'image' => Mage::getConfig()->getBlockClassName('adminhtml/catalog_product_helper_form_image'), - 'boolean' => Mage::getConfig()->getBlockClassName('adminhtml/catalog_product_helper_form_boolean') + 'price' => Mage::getConfig()->getBlockClassName('adminhtml/catalog_product_helper_form_price'), + 'gallery' => Mage::getConfig()->getBlockClassName('adminhtml/catalog_product_helper_form_gallery'), + 'image' => Mage::getConfig()->getBlockClassName('adminhtml/catalog_product_helper_form_image'), + 'boolean' => Mage::getConfig()->getBlockClassName('adminhtml/catalog_product_helper_form_boolean'), + 'textarea' => Mage::getConfig()->getBlockClassName('adminhtml/catalog_helper_form_wysiwyg') ); $response = new Varien_Object(); 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 e7f2bbe494..529f35cae9 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 @@ -52,6 +52,11 @@ public function getStockOption() return Mage::getSingleton('cataloginventory/source_stock')->toOptionArray(); } + /** + * Return current product instance + * + * @return Mage_Catalog_Model_Product + */ public function getProduct() { return Mage::registry('product'); @@ -119,4 +124,14 @@ public function getFieldSuffix() { return 'product'; } + + /** + * Check Whether product type can have fractional quantity or not + * + * @return bool + */ + public function canUseQtyDecimals() + { + return $this->getProduct()->getTypeInstance()->canUseQtyDecimals(); + } } diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Price/Tier.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Price/Tier.php index 780486cb16..a277c31fa5 100644 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Price/Tier.php +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Price/Tier.php @@ -313,6 +313,22 @@ public function getPriceColumnHeader($default) } } + /** + * Returns customized price column header + * that was seted through set... + * + * @param string $default + * @return string + */ + public function getPriceValidation($default) + { + if ($this->hasData('price_validation')) { + return $this->getData('price_validation'); + } else { + return $default; + } + } + /** * Retrieve Tier Price entity attribute * diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Websites.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Websites.php index fd93dc5f33..59a8982808 100644 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Websites.php +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Websites.php @@ -89,7 +89,7 @@ public function getStoreName($storeId) public function getChooseFromStoreHtml($storeTo) { if (!$this->_storeFromHtml) { - $this->_storeFromHtml = ''; $this->_storeFromHtml.= ''; foreach ($this->getWebsiteCollection() as $_website) { if (!$this->hasWebsite($_website->getId())) { 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 d13654b386..25b3e5ee46 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 @@ -135,23 +135,27 @@ protected function _prepareLayout() } if( $this->getRequest()->getParam('id', false) ) { - $this->addTab('reviews', array( - 'label' => Mage::helper('catalog')->__('Product Reviews'), - 'url' => $this->getUrl('*/*/reviews', array('_current' => true)), - 'class' => 'ajax', - )); - - $this->addTab('tags', array( - 'label' => Mage::helper('catalog')->__('Product Tags'), - 'url' => $this->getUrl('*/*/tagGrid', array('_current' => true)), - 'class' => 'ajax', - )); + if (Mage::getSingleton('admin/session')->isAllowed('admin/catalog/reviews_ratings')){ + $this->addTab('reviews', array( + 'label' => Mage::helper('catalog')->__('Product Reviews'), + 'url' => $this->getUrl('*/*/reviews', array('_current' => true)), + 'class' => 'ajax', + )); + } + if (Mage::getSingleton('admin/session')->isAllowed('admin/catalog/tag')){ + $this->addTab('tags', array( + 'label' => Mage::helper('catalog')->__('Product Tags'), + 'url' => $this->getUrl('*/*/tagGrid', array('_current' => true)), + 'class' => 'ajax', + )); + + $this->addTab('customers_tags', array( + 'label' => Mage::helper('catalog')->__('Customers Tagged Product'), + 'url' => $this->getUrl('*/*/tagCustomerGrid', array('_current' => true)), + 'class' => 'ajax', + )); + } - $this->addTab('customers_tags', array( - 'label' => Mage::helper('catalog')->__('Customers Tagged Product'), - 'url' => $this->getUrl('*/*/tagCustomerGrid', array('_current' => true)), - 'class' => 'ajax', - )); } /** diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Helper/Form/Apply.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Helper/Form/Apply.php index 88c7375d0f..97c3b1d56f 100644 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Helper/Form/Apply.php +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Helper/Form/Apply.php @@ -35,7 +35,17 @@ class Mage_Adminhtml_Block_Catalog_Product_Helper_Form_Apply extends Varien_Data { public function getElementHtml() { - $html = '' . '' . '' . '

'; @@ -43,4 +53,19 @@ public function getElementHtml() $html .= parent::getElementHtml(); return $html; } + + /** + * Dublicate interface of Varien_Data_Form_Element_Abstract::setReadonly + * + * @param bool $readonly + * @param bool $useDisabled + * @return Mage_Adminhtml_Block_Catalog_Product_Helper_Form_Apply + */ + public function setReadonly($readonly, $useDisabled = false) + { + $this->setData('readonly', $readonly); + $this->setData('disabled', $useDisabled); + return $this; + } + } diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Helper/Form/Price.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Helper/Form/Price.php index ae0de31db1..884f8da343 100644 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Helper/Form/Price.php +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Helper/Form/Price.php @@ -53,7 +53,7 @@ public function getAfterElementHtml() } $store = Mage::app()->getStore($storeId); $html.= '['.(string)$store->getBaseCurrencyCode().']'; - if (Mage::helper('tax')->priceIncludesTax()) { + if (Mage::helper('tax')->priceIncludesTax($store)) { if ($attribute->getAttributeCode()!=='cost') { $addJsObserver = true; $html.= ' ['.Mage::helper('tax')->__('Inc. Tax').']'; diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Set/Main.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Set/Main.php deleted file mode 100644 index 8e14c9f822..0000000000 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Set/Main.php +++ /dev/null @@ -1,25 +0,0 @@ - false, )); - $chooser = $this->getLayout()->createBlock('adminhtml/cms_widget_chooser') + $chooser = $this->getLayout()->createBlock('widget/adminhtml_widget_chooser') ->setElement($element) ->setTranslationHelper($this->getTranslationHelper()) ->setConfig($this->getConfig()) @@ -76,10 +76,12 @@ public function prepareElementHtml(Varien_Data_Form_Element_Abstract $element) $categoryId = isset($value[2]) ? $value[2] : false; $label = ''; if ($categoryId) { - $label = Mage::getSingleton('catalog/category')->load($categoryId)->getName() . ' / ' . $label; + $label = Mage::getResourceSingleton('catalog/category') + ->getAttributeRawValue($categoryId, 'name', Mage::app()->getStore()) . '/'; } if ($productId) { - $label .= Mage::getSingleton('catalog/product')->load($productId)->getName(); + $label .= Mage::getResourceSingleton('catalog/product') + ->getAttributeRawValue($productId, 'name', Mage::app()->getStore()); } $chooser->setLabel($label); } @@ -143,8 +145,8 @@ public function getCategoryClickListenerJs() function (node, e) { {jsObject}.addVarToUrl("category_id", node.attributes.id); {jsObject}.reload({jsObject}.url); - {jsObject}.categoryId = node.attributes.id; - {jsObject}.categoryName = node.text; + {jsObject}.categoryId = node.attributes.id != "none" ? node.attributes.id : false; + {jsObject}.categoryName = node.attributes.id != "none" ? node.text : false; } '; $js = str_replace('{jsObject}', $this->getJsObjectName(), $js); @@ -186,13 +188,15 @@ protected function _prepareCollection() if ($categoryId = $this->getCategoryId()) { $category = Mage::getModel('catalog/category')->load($categoryId); - // $collection->addCategoryFilter($category); - $productIds = $category->getProductsPosition(); - $productIds = array_keys($productIds); - if (empty($productIds)) { - $productIds = 0; + if ($category->getId()) { + // $collection->addCategoryFilter($category); + $productIds = $category->getProductsPosition(); + $productIds = array_keys($productIds); + if (empty($productIds)) { + $productIds = 0; + } + $collection->addFieldToFilter('entity_id', array('in' => $productIds)); } - $collection->addFieldToFilter('entity_id', array('in' => $productIds)); } if ($productTypeId = $this->getProductTypeId()) { diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Widget/Chooser/Container.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Widget/Chooser/Container.php new file mode 100644 index 0000000000..4630235720 --- /dev/null +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Widget/Chooser/Container.php @@ -0,0 +1,46 @@ + + */ +class Mage_Adminhtml_Block_Catalog_Product_Widget_Chooser_Container extends Mage_Adminhtml_Block_Template +{ + /** + * Block construction + * + * @param array $arguments Object data + */ + public function __construct($arguments=array()) + { + parent::__construct($arguments); + $this->setTemplate('catalog/product/widget/chooser/container.phtml'); + } +} diff --git a/app/code/core/Mage/Adminhtml/Block/Cms/Block/Edit.php b/app/code/core/Mage/Adminhtml/Block/Cms/Block/Edit.php index d2cb7e3d05..72b4006ca8 100644 --- a/app/code/core/Mage/Adminhtml/Block/Cms/Block/Edit.php +++ b/app/code/core/Mage/Adminhtml/Block/Cms/Block/Edit.php @@ -34,7 +34,6 @@ */ class Mage_Adminhtml_Block_Cms_Block_Edit extends Mage_Adminhtml_Block_Widget_Form_Container { - public function __construct() { $this->_objectId = 'block_id'; diff --git a/app/code/core/Mage/Adminhtml/Block/Cms/Block/Edit/Form.php b/app/code/core/Mage/Adminhtml/Block/Cms/Block/Edit/Form.php index e3daed878c..2ad1a81670 100644 --- a/app/code/core/Mage/Adminhtml/Block/Cms/Block/Edit/Form.php +++ b/app/code/core/Mage/Adminhtml/Block/Cms/Block/Edit/Form.php @@ -117,6 +117,9 @@ protected function _prepareForm() '0' => Mage::helper('cms')->__('Disabled'), ), )); + if (!$model->getId()) { + $model->setData('is_active', '1'); + } $fieldset->addField('content', 'editor', array( 'name' => 'content', diff --git a/app/code/core/Mage/Adminhtml/Block/Cms/Block/Widget/Chooser.php b/app/code/core/Mage/Adminhtml/Block/Cms/Block/Widget/Chooser.php index 688a1e89d9..f8da5b9f49 100644 --- a/app/code/core/Mage/Adminhtml/Block/Cms/Block/Widget/Chooser.php +++ b/app/code/core/Mage/Adminhtml/Block/Cms/Block/Widget/Chooser.php @@ -58,7 +58,7 @@ public function prepareElementHtml(Varien_Data_Form_Element_Abstract $element) $uniqId = Mage::helper('core')->uniqHash($element->getId()); $sourceUrl = $this->getUrl('*/cms_block_widget/chooser', array('uniq_id' => $uniqId)); - $chooser = $this->getLayout()->createBlock('adminhtml/cms_widget_chooser') + $chooser = $this->getLayout()->createBlock('widget/adminhtml_widget_chooser') ->setElement($element) ->setTranslationHelper($this->getTranslationHelper()) ->setConfig($this->getConfig()) diff --git a/app/code/core/Mage/Adminhtml/Block/Cms/Page/Edit/Tab/Content.php b/app/code/core/Mage/Adminhtml/Block/Cms/Page/Edit/Tab/Content.php index 066c67805b..0cbf92aec3 100644 --- a/app/code/core/Mage/Adminhtml/Block/Cms/Page/Edit/Tab/Content.php +++ b/app/code/core/Mage/Adminhtml/Block/Cms/Page/Edit/Tab/Content.php @@ -72,9 +72,16 @@ protected function _prepareForm() array('tab_id' => $this->getTabId()) ); + $fieldset->addField('content_heading', 'text', array( + 'name' => 'content_heading', + 'label' => Mage::helper('cms')->__('Content Heading'), + 'title' => Mage::helper('cms')->__('Content Heading'), + 'disabled' => $isElementDisabled + )); + $contentField = $fieldset->addField('content', 'editor', array( 'name' => 'content', - 'style' => 'width:99.15% !important; height:36em;', + 'style' => 'height:36em;', 'required' => true, 'disabled' => $isElementDisabled, 'config' => $wysiwygConfig diff --git a/app/code/core/Mage/Adminhtml/Block/Cms/Page/Widget/Chooser.php b/app/code/core/Mage/Adminhtml/Block/Cms/Page/Widget/Chooser.php index f7a2b02b55..1ffe6c6b3d 100644 --- a/app/code/core/Mage/Adminhtml/Block/Cms/Page/Widget/Chooser.php +++ b/app/code/core/Mage/Adminhtml/Block/Cms/Page/Widget/Chooser.php @@ -57,7 +57,7 @@ public function prepareElementHtml(Varien_Data_Form_Element_Abstract $element) $uniqId = Mage::helper('core')->uniqHash($element->getId()); $sourceUrl = $this->getUrl('*/cms_page_widget/chooser', array('uniq_id' => $uniqId)); - $chooser = $this->getLayout()->createBlock('adminhtml/cms_widget_chooser') + $chooser = $this->getLayout()->createBlock('widget/adminhtml_widget_chooser') ->setElement($element) ->setTranslationHelper($this->getTranslationHelper()) ->setConfig($this->getConfig()) @@ -88,8 +88,8 @@ public function getRowClickCallback() $js = ' function (grid, event) { var trElement = Event.findElement(event, "tr"); - var pageTitle = trElement.down("td").innerHTML; - var pageId = trElement.down("td").next().innerHTML; + var pageTitle = trElement.down("td").next().innerHTML; + var pageId = trElement.down("td").innerHTML; '.$chooserJsObject.'.setElementValue(pageId); '.$chooserJsObject.'.setElementLabel(pageTitle); '.$chooserJsObject.'.close(); @@ -120,6 +120,13 @@ protected function _prepareCollection() */ protected function _prepareColumns() { + $this->addColumn('chooser_id', array( + 'header' => Mage::helper('cms')->__('ID'), + 'align' => 'right', + 'index' => 'page_id', + 'width' => 50 + )); + $this->addColumn('chooser_title', array( 'header' => Mage::helper('cms')->__('Title'), 'align' => 'left', diff --git a/app/code/core/Mage/Adminhtml/Block/Cms/Widget.php b/app/code/core/Mage/Adminhtml/Block/Cms/Widget.php deleted file mode 100644 index 78695cbb12..0000000000 --- a/app/code/core/Mage/Adminhtml/Block/Cms/Widget.php +++ /dev/null @@ -1,57 +0,0 @@ - - */ -class Mage_Adminhtml_Block_Cms_Widget extends Mage_Adminhtml_Block_Widget_Form_Container -{ - public function __construct() - { - parent::__construct(); - - $this->_controller = 'cms'; - $this->_mode = 'widget'; - $this->_headerText = 'CMS Widget Insertion'; - - $this->removeButton('reset'); - $this->removeButton('back'); - $this->_updateButton('save', 'label', $this->helper('cms')->__('Insert Widget')); - $this->_updateButton('save', 'class', 'add-widget'); - $this->_updateButton('save', 'id', 'insert_button'); - $this->_updateButton('save', 'onclick', 'wWidget.insertWidget()'); - - $this->_formInitScripts[] = ' - Event.observe(window, "load", function(){ - wWidget = new WysiwygWidget.Widget("edit_form", "select_widget_type", "widget_options", "'.$this->getUrl('*/*/loadOptions').'"); - }); - '; - } -} diff --git a/app/code/core/Mage/Adminhtml/Block/Cms/Widget/Form.php b/app/code/core/Mage/Adminhtml/Block/Cms/Widget/Form.php deleted file mode 100644 index d2260b7c11..0000000000 --- a/app/code/core/Mage/Adminhtml/Block/Cms/Widget/Form.php +++ /dev/null @@ -1,132 +0,0 @@ - - */ - -class Mage_Adminhtml_Block_Cms_Widget_Form extends Mage_Adminhtml_Block_Widget_Form -{ - /** - * Form with widget to select - */ - protected function _prepareForm() - { - $form = new Varien_Data_Form(); - - $fieldset = $form->addFieldset('base_fieldset', array( - 'legend' => $this->helper('cms')->__('Widget') - )); - - $select = $fieldset->addField('select_widget_type', 'select', array( - 'label' => $this->helper('cms')->__('Widget Type'), - 'title' => $this->helper('cms')->__('Widget Type'), - 'name' => 'widget_type', - 'required' => true, - 'options' => $this->_getWidgetSelectOptions(), - 'after_element_html' => $this->_getWidgetSelectAfterHtml(), - )); - - $form->setUseContainer(true); - $form->setId('edit_form'); - $form->setMethod('post'); - $form->setAction($this->getUrl('*/*/buildWidget')); - $this->setForm($form); - } - - /** - * Prepare options for widgets HTML select - * - * @return array - */ - protected function _getWidgetSelectOptions() - { - foreach ($this->_getAvailableWidgets(true) as $data) { - $options[$data['type']] = $data['name']; - } - return $options; - } - - /** - * Prepare widgets select after element HTML - * - * @return string - */ - protected function _getWidgetSelectAfterHtml() - { - $html = '

'; - $i = 0; - foreach ($this->_getAvailableWidgets(true) as $data) { - $html .= sprintf('
%s
', $i, $data['description']); - $i++; - } - return $html; - } - - /** - * Return array of available widgets based on configuration - * - * @return array - */ - protected function _getAvailableWidgets($withEmptyElement = false) - { - if (!$this->hasData('available_widgets')) { - $result = array(); - $allWidgets = Mage::getModel('cms/widget')->getWidgetsArray(); - $skipped = $this->_getSkippedWidgets(); - foreach ($allWidgets as $widget) { - if (is_array($skipped) && in_array($widget['type'], $skipped)) { - continue; - } - $result[] = $widget; - } - if ($withEmptyElement) { - array_unshift($result, array( - 'type' => '', - 'name' => $this->helper('adminhtml')->__('-- Please Select --'), - 'description' => '', - )); - } - $this->setData('available_widgets', $result); - } - - return $this->_getData('available_widgets'); - } - - /** - * Return array of widgets disabled for selection - * - * @return array - */ - protected function _getSkippedWidgets() - { - return Mage::registry('skip_widgets'); - } -} diff --git a/app/code/core/Mage/Adminhtml/Block/Cms/Widget/Options/Renderer/Element.php b/app/code/core/Mage/Adminhtml/Block/Cms/Widget/Options/Renderer/Element.php deleted file mode 100644 index 426ead3391..0000000000 --- a/app/code/core/Mage/Adminhtml/Block/Cms/Widget/Options/Renderer/Element.php +++ /dev/null @@ -1,53 +0,0 @@ - - */ -class Mage_Adminhtml_Block_Cms_Widget_Options_Renderer_Element extends Mage_Adminhtml_Block_Template implements Varien_Data_Form_Element_Renderer_Interface -{ - protected $_element; - - protected function _construct() - { - $this->setTemplate('cms/widget/options/renderer/element.phtml'); - } - - public function getElement() - { - return $this->_element; - } - - public function render(Varien_Data_Form_Element_Abstract $element) - { - $this->_element = $element; - return $this->toHtml(); - } -} diff --git a/app/code/core/Mage/Adminhtml/Block/Cms/Wysiwyg/Images/Content.php b/app/code/core/Mage/Adminhtml/Block/Cms/Wysiwyg/Images/Content.php index c27a401827..e81adb0458 100644 --- a/app/code/core/Mage/Adminhtml/Block/Cms/Wysiwyg/Images/Content.php +++ b/app/code/core/Mage/Adminhtml/Block/Cms/Wysiwyg/Images/Content.php @@ -39,26 +39,20 @@ class Mage_Adminhtml_Block_Cms_Wysiwyg_Images_Content extends Mage_Adminhtml_Blo public function __construct() { parent::__construct(); - $this->_headerText = $this->helper('cms')->__('Image Gallery'); + $this->_headerText = $this->helper('cms')->__('Media Storage'); $this->_removeButton('back')->_removeButton('edit'); $this->_addButton('newfolder', array( 'class' => 'save', 'label' => $this->helper('cms')->__('Create Folder...'), 'type' => 'button', - 'onclick' => 'Images.newFolder();' - )); - $this->_addButton('upload', array( - 'class' => 'add', - 'label' => $this->helper('cms')->__('Upload Files...'), - 'type' => 'button', - 'onclick' => 'Images.upload();' + 'onclick' => 'MediabrowserInstance.newFolder();' )); $this->_addButton('delete_folder', array( 'class' => 'delete no-display', 'label' => $this->helper('cms')->__('Delete Folder'), 'type' => 'button', - 'onclick' => 'Images.deleteFolder();', + 'onclick' => 'MediabrowserInstance.deleteFolder();', 'id' => 'button_delete_folder' )); @@ -66,7 +60,7 @@ public function __construct() 'class' => 'delete no-display', 'label' => $this->helper('cms')->__('Delete File'), 'type' => 'button', - 'onclick' => 'Images.deleteFiles();', + 'onclick' => 'MediabrowserInstance.deleteFiles();', 'id' => 'button_delete_files' )); @@ -74,7 +68,7 @@ public function __construct() 'class' => 'save no-display', 'label' => $this->helper('cms')->__('Insert File'), 'type' => 'button', - 'onclick' => 'Images.insert();', + 'onclick' => 'MediabrowserInstance.insert();', 'id' => 'button_insert_files' )); } @@ -89,6 +83,31 @@ public function getContentsUrl() return $this->getUrl('*/*/contents', array('type' => $this->getRequest()->getParam('type'))); } + /** + * Javascript setup object for filebrowser instance + * + * @return string + */ + public function getFilebrowserSetupObject() + { + $setupObject = new Varien_Object(); + + $setupObject->setData(array( + 'newFolderPrompt' => $this->helper('cms')->__('New Folder Name:'), + 'deleteFolderConfirmationMessage' => $this->helper('cms')->__('Are you sure you want to delete current folder?'), + 'deleteFileConfirmationMessage' => $this->helper('cms')->__('Are you sure you want to delete the selected file?'), + 'targetElementId' => $this->getTargetElementId(), + 'contentsUrl' => $this->getContentsUrl(), + 'onInsertUrl' => $this->getOnInsertUrl(), + 'newFolderUrl' => $this->getNewfolderUrl(), + 'deleteFolderUrl' => $this->getDeletefolderUrl(), + 'deleteFilesUrl' => $this->getDeleteFilesUrl(), + 'headerText' => $this->getHeaderText() + )); + + return Mage::helper('core')->jsonEncode($setupObject); + } + /** * New directory action target URL * @@ -129,4 +148,14 @@ public function getOnInsertUrl() { return $this->getUrl('*/*/onInsert'); } + + /** + * Target element ID getter + * + * @return string + */ + public function getTargetElementId() + { + return $this->getRequest()->getParam('target_element_id'); + } } diff --git a/app/code/core/Mage/Adminhtml/Block/Cms/Wysiwyg/Images/Content/Files.php b/app/code/core/Mage/Adminhtml/Block/Cms/Wysiwyg/Images/Content/Files.php index 546744a238..3a6cf8b770 100644 --- a/app/code/core/Mage/Adminhtml/Block/Cms/Wysiwyg/Images/Content/Files.php +++ b/app/code/core/Mage/Adminhtml/Block/Cms/Wysiwyg/Images/Content/Files.php @@ -34,56 +34,122 @@ class Mage_Adminhtml_Block_Cms_Wysiwyg_Images_Content_Files extends Mage_Adminhtml_Block_Template { /** - * Prepare Files collection + * Files collection object + * + * @var Varien_Data_Collection_Filesystem + */ + protected $_filesCollection; + + /** + * Prepared Files collection for current directory * * @return Varien_Data_Collection_Filesystem */ - public function getContentsCollection() + public function getFiles() { - $helper = Mage::helper('cms/wysiwyg_images'); - $type = $this->getRequest()->getParam('type'); - $collection = $helper->getStorage()->getFilesCollection($helper->getCurrentPath(), $type); - foreach ($collection as $item) { - $item->setId(Mage::helper('core')->urlEncode($item->getBasename())); - $item->setName($this->getShortFilename($item->getBasename())); - $item->setUrl($helper->getCurrentUrl() . $item->getBasename()); - $item->setEncodedPath(Mage::helper('core')->urlEncode($item->getFilename())); + if (! $this->_filesCollection) { + $this->_filesCollection = Mage::getSingleton('cms/wysiwyg_images_storage')->getFilesCollection(Mage::helper('cms/wysiwyg_images')->getCurrentPath(), $this->_getMediaType()); - if(is_file($helper->getCurrentPath() . DS . '.thumbs' . DS . $item->getBasename())) { - $item->setThumbUrl($helper->getCurrentUrl() . '.thumbs/' . $item->getBasename()); - } - - $size = @getimagesize($item->getFilename()); - if (is_array($size)) { - $item->setWidth($size[0]); - $item->setHeight($size[1]); - } } - return $collection; + + return $this->_filesCollection; + } + + /** + * Files collection count getter + * + * @return int + */ + public function getFilesCount() + { + return $this->getFiles()->count(); + } + + /** + * File idetifier getter + * + * @param Varien_Object $file + * @return string + */ + public function getFileId(Varien_Object $file) + { + return $file->getId(); + } + + /** + * File thumb URL getter + * + * @param Varien_Object $file + * @return string + */ + public function getFileThumbUrl(Varien_Object $file) + { + return $file->getThumbUrl(); + } + + /** + * File name URL getter + * + * @param Varien_Object $file + * @return string + */ + public function getFileName(Varien_Object $file) + { + return $file->getName(); + } + + /** + * Image file width getter + * + * @param Varien_Object $file + * @return string + */ + public function getFileWidth(Varien_Object $file) + { + return $file->getWidth(); + } + + /** + * Image file height getter + * + * @param Varien_Object $file + * @return string + */ + public function getFileHeight(Varien_Object $file) + { + return $file->getHeight(); + } + + /** + * File short name getter + * + * @param Varien_Object $file + * @return string + */ + public function getFileShortName(Varien_Object $file) + { + return $file->getShortName(); } public function getImagesWidth() { - return Mage::getSingleton('cms/wysiwyg_images_storage')->getConfigData('browser_resize_width'); + return Mage::getSingleton('cms/wysiwyg_images_storage')->getConfigData('resize_width'); } public function getImagesHeight() { - return Mage::getSingleton('cms/wysiwyg_images_storage')->getConfigData('browser_resize_height'); + return Mage::getSingleton('cms/wysiwyg_images_storage')->getConfigData('resize_height'); } /** - * Reduce filename by replacing some characters with dots - * - * @param string $filename - * @param int $maxLength Maximum filename - * @return string Truncated filename + * Return current media type based on request or data + * @return string */ - public function getShortFilename($filename, $maxLength = 15) + protected function _getMediaType() { - if (strlen($filename) <= $maxLength) { - return $filename; + if ($this->hasData('media_type')) { + return $this->_getData('media_type'); } - return preg_replace('/^(.{1,'.($maxLength - 3).'})(.*)(\.[a-z0-9]+)$/i', '$1..$3', $filename); + return $this->getRequest()->getParam('type'); } } diff --git a/app/code/core/Mage/Adminhtml/Block/Cms/Wysiwyg/Images/Content/Uploader.php b/app/code/core/Mage/Adminhtml/Block/Cms/Wysiwyg/Images/Content/Uploader.php index 054ed5aa64..d09c57e0a1 100644 --- a/app/code/core/Mage/Adminhtml/Block/Cms/Wysiwyg/Images/Content/Uploader.php +++ b/app/code/core/Mage/Adminhtml/Block/Cms/Wysiwyg/Images/Content/Uploader.php @@ -37,7 +37,7 @@ public function __construct() { parent::__construct(); $params = $this->getConfig()->getParams(); - $type = $this->getRequest()->getParam('type'); + $type = $this->_getMediaType(); $allowed = Mage::getSingleton('cms/wysiwyg_images_storage')->getAllowedExtensions($type); $labels = array(); $files = array(); @@ -56,4 +56,16 @@ public function __construct() ) )); } + + /** + * Return current media type based on request or data + * @return string + */ + protected function _getMediaType() + { + if ($this->hasData('media_type')) { + return $this->_getData('media_type'); + } + return $this->getRequest()->getParam('type'); + } } diff --git a/app/code/core/Mage/Adminhtml/Block/Cms/Wysiwyg/Images/Tree.php b/app/code/core/Mage/Adminhtml/Block/Cms/Wysiwyg/Images/Tree.php index 7fa3da1274..c4c7b051ab 100644 --- a/app/code/core/Mage/Adminhtml/Block/Cms/Wysiwyg/Images/Tree.php +++ b/app/code/core/Mage/Adminhtml/Block/Cms/Wysiwyg/Images/Tree.php @@ -47,7 +47,7 @@ public function getTreeJson() $jsonArray = array(); foreach ($collection as $item) { $jsonArray[] = array( - 'text' => $item->getBasename(), + 'text' => $helper->getShortFilename($item->getBasename(), 20), 'id' => $helper->convertPathToId($item->getFilename()), 'cls' => 'folder' ); @@ -84,12 +84,13 @@ public function getTreeCurrentPath() { $treePath = '/root'; if ($path = Mage::registry('storage')->getSession()->getCurrentPath()) { - $path = str_replace(Mage::helper('cms/wysiwyg_images')->getStorageRoot(), '', $path); + $helper = Mage::helper('cms/wysiwyg_images'); + $path = str_replace($helper->getStorageRoot(), '', $path); $relative = ''; foreach (explode(DS, $path) as $dirName) { if ($dirName) { $relative .= DS . $dirName; - $treePath .= '/' . Mage::helper('core')->urlEncode($relative); + $treePath .= '/' . $helper->idEncode($relative); } } } 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 45f95bdd00..a2d4c7e2cf 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 @@ -156,7 +156,7 @@ public function getBillingAddressHtml() $html = $address->format('html'); } else { - $html = Mage::helper('customer')->__("Customer doesn't have primary billing address"); + $html = Mage::helper('customer')->__('Customer doesn\'t have default billing address'); } return $html; } diff --git a/app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tabs.php b/app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tabs.php index 9e75565168..1dd7aaaff5 100644 --- a/app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tabs.php +++ b/app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tabs.php @@ -68,11 +68,14 @@ protected function _beforeToHtml() // load: Orders, Shopping Cart, Wishlist, Product Reviews, Product Tags - with ajax if (Mage::registry('current_customer')->getId()) { - $this->addTab('orders', array( - 'label' => Mage::helper('customer')->__('Orders'), - 'class' => 'ajax', - 'url' => $this->getUrl('*/*/orders', array('_current' => true)), - )); + + if (Mage::getSingleton('admin/session')->isAllowed('sales/order/actions/view')) { + $this->addTab('orders', array( + 'label' => Mage::helper('customer')->__('Orders'), + 'class' => 'ajax', + 'url' => $this->getUrl('*/*/orders', array('_current' => true)), + )); + } $this->addTab('cart', array( 'label' => Mage::helper('customer')->__('Shopping Cart'), @@ -86,22 +89,28 @@ protected function _beforeToHtml() 'url' => $this->getUrl('*/*/wishlist', array('_current' => true)), )); - $this->addTab('newsletter', array( - 'label' => Mage::helper('customer')->__('Newsletter'), - 'content' => $this->getLayout()->createBlock('adminhtml/customer_edit_tab_newsletter')->initForm()->toHtml() - )); + if (Mage::getSingleton('admin/session')->isAllowed('newsletter/subscriber')) { + $this->addTab('newsletter', array( + 'label' => Mage::helper('customer')->__('Newsletter'), + 'content' => $this->getLayout()->createBlock('adminhtml/customer_edit_tab_newsletter')->initForm()->toHtml() + )); + } - $this->addTab('reviews', array( - 'label' => Mage::helper('customer')->__('Product Reviews'), - 'class' => 'ajax', - 'url' => $this->getUrl('*/*/productReviews', array('_current' => true)), - )); + if (Mage::getSingleton('admin/session')->isAllowed('catalog/reviews_ratings')) { + $this->addTab('reviews', array( + 'label' => Mage::helper('customer')->__('Product Reviews'), + 'class' => 'ajax', + 'url' => $this->getUrl('*/*/productReviews', array('_current' => true)), + )); + } - $this->addTab('tags', array( - 'label' => Mage::helper('customer')->__('Product Tags'), - 'class' => 'ajax', - 'url' => $this->getUrl('*/*/productTags', array('_current' => true)), - )); + if (Mage::getSingleton('admin/session')->isAllowed('catalog/tag')) { + $this->addTab('tags', array( + 'label' => Mage::helper('customer')->__('Product Tags'), + 'class' => 'ajax', + 'url' => $this->getUrl('*/*/productTags', array('_current' => true)), + )); + } } $this->_updateActiveTab(); diff --git a/app/code/core/Mage/Adminhtml/Block/Customer/Grid.php b/app/code/core/Mage/Adminhtml/Block/Customer/Grid.php index 2b92dceba0..64bc8e5193 100644 --- a/app/code/core/Mage/Adminhtml/Block/Customer/Grid.php +++ b/app/code/core/Mage/Adminhtml/Block/Customer/Grid.php @@ -40,6 +40,7 @@ public function __construct() $this->setId('customerGrid'); $this->setUseAjax(true); $this->setDefaultSort('entity_id'); + $this->setSaveParametersInSession(true); } protected function _prepareCollection() diff --git a/app/code/core/Mage/Adminhtml/Block/Customer/Group.php b/app/code/core/Mage/Adminhtml/Block/Customer/Group.php index 6944340f23..d026d71b35 100644 --- a/app/code/core/Mage/Adminhtml/Block/Customer/Group.php +++ b/app/code/core/Mage/Adminhtml/Block/Customer/Group.php @@ -31,20 +31,27 @@ * @package Mage_Adminhtml * @author Magento Core Team */ -class Mage_Adminhtml_Block_Customer_Group extends Mage_Adminhtml_Block_Template +class Mage_Adminhtml_Block_Customer_Group extends Mage_Adminhtml_Block_Widget_Grid_Container//Mage_Adminhtml_Block_Template { + /** + * Modify header & button labels + * + */ public function __construct() { + $this->_controller = 'customer_group'; + $this->_headerText = Mage::helper('customer')->__('Customer Groups'); + $this->_addButtonLabel = Mage::helper('customer')->__('Add New Customer Group'); parent::__construct(); - $this->setTemplate('customer/group/list.phtml'); } - public function _beforeToHtml() - { - $this->assign('createUrl', $this->getUrl('*/customer_group/new')); - $this->setChild('grid', $this->getLayout()->createBlock('adminhtml/customer_group_grid', 'customer.group.grid')); - return parent::_beforeToHtml(); + /** + * Redefine header css class + * + * @return string + */ + public function getHeaderCssClass() { + return 'icon-head head-customer-groups'; } - } diff --git a/app/code/core/Mage/Adminhtml/Block/Customer/Group/Grid.php b/app/code/core/Mage/Adminhtml/Block/Customer/Group/Grid.php index ee9cbf89ea..9d06d6fd6e 100644 --- a/app/code/core/Mage/Adminhtml/Block/Customer/Group/Grid.php +++ b/app/code/core/Mage/Adminhtml/Block/Customer/Group/Grid.php @@ -40,6 +40,7 @@ public function __construct() $this->setId('customerGroupGrid'); $this->setDefaultSort('type'); $this->setDefaultDir('asc'); + $this->setSaveParametersInSession(true); } /** 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 247b165540..a47fb8b4ba 100644 --- a/app/code/core/Mage/Adminhtml/Block/Customer/Online/Grid.php +++ b/app/code/core/Mage/Adminhtml/Block/Customer/Online/Grid.php @@ -160,6 +160,7 @@ protected function _prepareColumns() */ public function getRowUrl($row) { - return $row->getCustomerId() ? $this->getUrl('*/customer/edit', array('id' => $row->getCustomerId())) : ''; + return (Mage::getSingleton('admin/session')->isAllowed('customer/manage') && $row->getCustomerId()) + ? $this->getUrl('*/customer/edit', array('id' => $row->getCustomerId())) : ''; } } diff --git a/app/code/core/Mage/Adminhtml/Block/Dashboard/Graph.php b/app/code/core/Mage/Adminhtml/Block/Dashboard/Graph.php index 25b9e4bd39..368be3f28e 100644 --- a/app/code/core/Mage/Adminhtml/Block/Dashboard/Graph.php +++ b/app/code/core/Mage/Adminhtml/Block/Dashboard/Graph.php @@ -197,6 +197,13 @@ public function getChartUrl($directUrl = true) $minvalue = min($localminvalue); } + // default values + $yrange = 0; + $yLabels = array(); + $miny = 0; + $maxy = 0; + $yorigin = 0; + $maxlength = max($localmaxlength); if ($minvalue >= 0 && $maxvalue >= 0) { $miny = 0; @@ -332,8 +339,10 @@ public function getChartUrl($directUrl = true) } return self::API_URL . '?' . implode('&', $p); } else { - $params = array('ga' => urlencode(base64_encode(serialize($params)))); - return $this->getUrl('*/*/tunnel', $params); + $gaData = urlencode(base64_encode(serialize($params))); + $gaHash = Mage::helper('adminhtml/dashboard_data')->getChartDataHash($gaData); + $params = array('ga' => $gaData, 'h' => $gaHash); + return $this->getUrl('*/*/tunnel', array('_query' => $params)); } } diff --git a/app/code/core/Mage/Adminhtml/Block/Newsletter/Queue/Edit.php b/app/code/core/Mage/Adminhtml/Block/Newsletter/Queue/Edit.php index 7ce2a47ccf..eb4722c58b 100644 --- a/app/code/core/Mage/Adminhtml/Block/Newsletter/Queue/Edit.php +++ b/app/code/core/Mage/Adminhtml/Block/Newsletter/Queue/Edit.php @@ -80,6 +80,11 @@ public function getSaveUrl() protected function _prepareLayout() { + // Load Wysiwyg on demand and Prepare layout + if (Mage::getSingleton('cms/wysiwyg_config')->isEnabled()) { + $this->getLayout()->getBlock('head')->setCanLoadTinyMce(true); + } + $this->setChild('save_button', $this->getLayout()->createBlock('adminhtml/widget_button') ->setData(array( @@ -118,23 +123,9 @@ protected function _prepareLayout() ) ); - $this->setChild('toggle_button', - $this->getLayout()->createBlock('adminhtml/widget_button') - ->setData( - array( - 'label' => Mage::helper('newsletter')->__('Toggle Editor'), - 'onclick' => 'queueControl.toggleEditor();' - ) - ) - ); return parent::_prepareLayout(); } - public function getToggleButtonHtml() - { - return $this->getChildHtml('toggle_button'); - } - public function getSaveButtonHtml() { return $this->getChildHtml('save_button'); 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 8d96e956b4..da872be27c 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 @@ -132,15 +132,19 @@ protected function _prepareForm() Mage_Newsletter_Model_Queue::STATUS_NEVER, Mage_Newsletter_Model_Queue::STATUS_PAUSE))) { + $widgetFilters = array('is_email_compatible' => 1); + $wysiwygConfig = Mage::getSingleton('cms/wysiwyg_config')->getConfig(array('widget_filters' => $widgetFilters)); + if ($queue->getTemplate()->isPlain()) { + $wysiwygConfig->setEnabled(false); + } $fieldset->addField('text','editor', array( 'name' => 'text', - 'wysiwyg' => false, 'label' => Mage::helper('newsletter')->__('Message'), 'state' => 'html', - 'theme' => 'advanced', 'required' => true, 'value' => $queue->getTemplate()->getTemplateTextPreprocessed(), 'style' => 'width:98%; height: 600px;', + 'config' => $wysiwygConfig )); } else { $fieldset->addField('text','text', array( 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 b15506b8b3..5c390b9ced 100644 --- a/app/code/core/Mage/Adminhtml/Block/Newsletter/Subscriber/Grid.php +++ b/app/code/core/Mage/Adminhtml/Block/Newsletter/Subscriber/Grid.php @@ -197,6 +197,11 @@ protected function _prepareMassaction() 'url' => $this->getUrl('*/*/massUnsubscribe') )); + $this->getMassactionBlock()->addItem('delete', array( + 'label' => Mage::helper('newsletter')->__('Delete'), + 'url' => $this->getUrl('*/*/massDelete') + )); + return $this; } } diff --git a/app/code/core/Mage/Adminhtml/Block/Newsletter/Template/Edit.php b/app/code/core/Mage/Adminhtml/Block/Newsletter/Template/Edit.php index a51b731671..3926e5c73e 100644 --- a/app/code/core/Mage/Adminhtml/Block/Newsletter/Template/Edit.php +++ b/app/code/core/Mage/Adminhtml/Block/Newsletter/Template/Edit.php @@ -41,16 +41,6 @@ class Mage_Adminhtml_Block_Newsletter_Template_Edit extends Mage_Adminhtml_Block */ protected $_editMode = false; - /** - * Define Edit template - * - */ - public function __construct() - { - parent::__construct(); - $this->setTemplate('newsletter/template/edit.phtml'); - } - /** * Retrieve template object * @@ -68,6 +58,11 @@ public function getModel() */ protected function _prepareLayout() { + // Load Wysiwyg on demand and Prepare layout + if (Mage::getSingleton('cms/wysiwyg_config')->isEnabled() && ($block = $this->getLayout()->getBlock('head'))) { + $block->setCanLoadTinyMce(true); + } + $this->setChild('back_button', $this->getLayout()->createBlock('adminhtml/widget_button') ->setData(array( @@ -106,16 +101,6 @@ protected function _prepareLayout() )) ); - $this->setChild('toggle_button', - $this->getLayout()->createBlock('adminhtml/widget_button') - ->setData(array( - 'label' => Mage::helper('newsletter')->__('Toggle Editor'), - 'onclick' => 'templateControl.toggleEditor();', - 'id' => 'toggle_button', - 'class' => 'task' - )) - ); - $this->setChild('save_button', $this->getLayout()->createBlock('adminhtml/widget_button') ->setData(array( @@ -165,16 +150,6 @@ public function getBackButtonHtml() return $this->getChildHtml('back_button'); } - /** - * Retrieve Toggle Button HTML - * - * @return string - */ - public function getToggleButtonHtml() - { - return $this->getChildHtml('toggle_button'); - } - /** * Retrieve Reset Button HTML * diff --git a/app/code/core/Mage/Adminhtml/Block/Newsletter/Template/Edit/Form.php b/app/code/core/Mage/Adminhtml/Block/Newsletter/Template/Edit/Form.php index e8dfd77e30..47141f8462 100644 --- a/app/code/core/Mage/Adminhtml/Block/Newsletter/Template/Edit/Form.php +++ b/app/code/core/Mage/Adminhtml/Block/Newsletter/Template/Edit/Form.php @@ -112,18 +112,32 @@ protected function _prepareForm() 'value' => $model->getTemplateSenderEmail(), )); + + $widgetFilters = array('is_email_compatible' => 1); + $wysiwygConfig = Mage::getSingleton('cms/wysiwyg_config')->getConfig(array('widget_filters' => $widgetFilters)); + if ($model->isPlain()) { + $wysiwygConfig->setEnabled(false); + } $fieldset->addField('text', 'editor', array( 'name' => 'text', - 'wysiwyg' => false, //(!$model->isPlain()), 'label' => Mage::helper('newsletter')->__('Template Content'), 'title' => Mage::helper('newsletter')->__('Template Content'), - 'theme' => 'advanced', 'required' => true, 'state' => 'html', 'style' => 'height:36em;', 'value' => $model->getTemplateText(), + 'config' => $wysiwygConfig )); + if (!$model->isPlain()) { + $fieldset->addField('template_styles', 'textarea', array( + 'name' =>'styles', + 'label' => Mage::helper('newsletter')->__('Template Styles'), + 'container_id' => 'field_template_styles', + 'value' => $model->getTemplateStyles() + )); + } + $form->setAction($this->getUrl('*/*/save')); $form->setUseContainer(true); $this->setForm($form); diff --git a/app/code/core/Mage/Adminhtml/Block/Newsletter/Template/Preview.php b/app/code/core/Mage/Adminhtml/Block/Newsletter/Template/Preview.php index fc6c7c21cd..120d337ad9 100644 --- a/app/code/core/Mage/Adminhtml/Block/Newsletter/Template/Preview.php +++ b/app/code/core/Mage/Adminhtml/Block/Newsletter/Template/Preview.php @@ -42,6 +42,7 @@ protected function _toHtml() } else { $template->setTemplateType($this->getRequest()->getParam('type')); $template->setTemplateText($this->getRequest()->getParam('text')); + $template->setTemplateStyles($this->getRequest()->getParam('styles')); } Varien_Profiler::start("email_template_proccessing"); 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 4177debfc0..c86ba38d0a 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 @@ -121,6 +121,9 @@ protected function _prepareForm() '0' => Mage::helper('salesrule')->__('Inactive'), ), )); + if (!$model->getId()) { + $model->setData('is_active', '1'); + } if (!Mage::app()->isSingleStoreMode()) { diff --git a/app/code/core/Mage/Adminhtml/Block/Report/Grid.php b/app/code/core/Mage/Adminhtml/Block/Report/Grid.php index 11c780d732..c81456636e 100644 --- a/app/code/core/Mage/Adminhtml/Block/Report/Grid.php +++ b/app/code/core/Mage/Adminhtml/Block/Report/Grid.php @@ -165,7 +165,9 @@ protected function _prepareCollection() } $collection->setStoreIds($storeIds); - $collection->setPageSize($this->getSubReportSize()); + if ($this->getSubReportSize() !== null) { + $collection->setPageSize($this->getSubReportSize()); + } $this->setCollection($collection); diff --git a/app/code/core/Mage/Adminhtml/Block/Report/Sales/Invoiced/Grid.php b/app/code/core/Mage/Adminhtml/Block/Report/Sales/Invoiced/Grid.php index e0bac931fb..7120708262 100644 --- a/app/code/core/Mage/Adminhtml/Block/Report/Sales/Invoiced/Grid.php +++ b/app/code/core/Mage/Adminhtml/Block/Report/Sales/Invoiced/Grid.php @@ -56,7 +56,7 @@ protected function _prepareColumns() )); $this->addColumn('orders_invoiced', array( - 'header' =>Mage::helper('reports')->__('Number of Ivoiced Orders'), + 'header' =>Mage::helper('reports')->__('Number of Invoiced Orders'), 'index' =>'orders_invoiced', 'total' =>'sum', 'type' =>'number' diff --git a/app/code/core/Mage/Adminhtml/Block/Report/Sales/Shipping/Grid.php b/app/code/core/Mage/Adminhtml/Block/Report/Sales/Shipping/Grid.php index 3ae6d7d572..48382f9d36 100644 --- a/app/code/core/Mage/Adminhtml/Block/Report/Sales/Shipping/Grid.php +++ b/app/code/core/Mage/Adminhtml/Block/Report/Sales/Shipping/Grid.php @@ -42,6 +42,7 @@ public function __construct() protected function _prepareCollection() { + $this->setSubReportSize(null); parent::_prepareCollection(); $this->getCollection()->initReport('reports/shipping_collection'); } diff --git a/app/code/core/Mage/Adminhtml/Block/Report/Sales/Tax/Grid.php b/app/code/core/Mage/Adminhtml/Block/Report/Sales/Tax/Grid.php index 2f18df2bed..a11140ae1c 100644 --- a/app/code/core/Mage/Adminhtml/Block/Report/Sales/Tax/Grid.php +++ b/app/code/core/Mage/Adminhtml/Block/Report/Sales/Tax/Grid.php @@ -42,6 +42,7 @@ public function __construct() protected function _prepareCollection() { + $this->setSubReportSize(null); parent::_prepareCollection(); $this->getCollection()->initReport('reports/tax_collection'); } diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Creditmemo/Grid.php b/app/code/core/Mage/Adminhtml/Block/Sales/Creditmemo/Grid.php index 84ea910195..213c4b8f1a 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Creditmemo/Grid.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Creditmemo/Grid.php @@ -43,7 +43,7 @@ public function __construct() protected function _prepareCollection() { //TODO: add full name logic - $collection = Mage::getResourceModel('sales/order_Creditmemo_collection') + $collection = Mage::getResourceModel('sales/order_creditmemo_collection') ->addAttributeToSelect('increment_id') ->addAttributeToSelect('created_at') ->addAttributeToSelect('order_currency_code') diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Invoice/Grid.php b/app/code/core/Mage/Adminhtml/Block/Sales/Invoice/Grid.php index 73b7208ff7..044e14a16d 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Invoice/Grid.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Invoice/Grid.php @@ -39,6 +39,7 @@ public function __construct() $this->setUseAjax(true); $this->setDefaultSort('created_at'); $this->setDefaultDir('DESC'); + $this->setSaveParametersInSession(true); } protected function _prepareCollection() @@ -65,7 +66,7 @@ protected function _prepareColumns() $this->addColumn('increment_id', array( 'header' => Mage::helper('sales')->__('Invoice #'), 'index' => 'increment_id', - 'type' => 'number', + 'type' => 'text', )); $this->addColumn('created_at', array( diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Form/Account.php b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Form/Account.php index 006bfc16db..7532e828ec 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Form/Account.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Form/Account.php @@ -132,7 +132,7 @@ public function getDisplayFields() 'email' => array( 'order' => 2, 'class' => 'validate-email', - 'required' => false + 'required' => true ), ); 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 efb239906a..b00c608e44 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 @@ -115,12 +115,8 @@ public function isAllowedForGiftMessage($item) */ public function displayTotalsIncludeTax() { - if (Mage::helper('tax')->priceIncludesTax($this->getStore())) { - $res = Mage::helper('tax')->displayCartPriceInclTax($this->getStore()) || - Mage::helper('tax')->displayCartBothPrices($this->getStore()); - } else { - $res = Mage::helper('tax')->displayCartPriceInclTax($this->getStore()); - } + $res = Mage::getSingleton('tax/config')->displayCartSubtotalInclTax($this->getStore()) + || Mage::getSingleton('tax/config')->displayCartSubtotalBoth($this->getStore()); return $res; } @@ -128,6 +124,9 @@ public function getSubtotal() { $address = $this->getQuote()->getShippingAddress(); if ($this->displayTotalsIncludeTax()) { + if ($address->getSubtotalInclTax()) { + return $address->getSubtotalInclTax(); + } return $address->getSubtotal()+$address->getTaxAmount(); } else { return $address->getSubtotal(); diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Creditmemo/View.php b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Creditmemo/View.php index fbec57d7db..8835212f27 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Creditmemo/View.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Creditmemo/View.php @@ -34,6 +34,10 @@ class Mage_Adminhtml_Block_Sales_Order_Creditmemo_View extends Mage_Adminhtml_Block_Widget_Form_Container { + /** + * Add & remove control buttons + * + */ public function __construct() { $this->_objectId = 'creditmemo_id'; @@ -55,12 +59,14 @@ public function __construct() ); } - $this->addButton('send_notification', array( - 'label' => Mage::helper('sales')->__('Send Email'), - 'onclick' => 'confirmSetLocation(\'' . Mage::helper('sales')->__( - 'Are you sure you want to send Creditmemo email to customer?' - ) . '\', \'' . $this->getEmailUrl() . '\')' - )); + if ($this->_isAllowedAction('emails')) { + $this->addButton('send_notification', array( + 'label' => Mage::helper('sales')->__('Send Email'), + 'onclick' => 'confirmSetLocation(\'' + . Mage::helper('sales')->__('Are you sure you want to send Creditmemo email to customer?') + . '\', \'' . $this->getEmailUrl() . '\')' + )); + } if ($this->getCreditmemo()->canRefund()) { $this->_addButton('refund', array( @@ -100,6 +106,11 @@ public function getCreditmemo() return Mage::registry('current_creditmemo'); } + /** + * Retrieve text for header + * + * @return string + */ public function getHeaderText() { if ($this->getCreditmemo()->getEmailSent()) { @@ -118,6 +129,11 @@ public function getHeaderText() return $header; } + /** + * Retrieve back url + * + * @return string + */ public function getBackUrl() { return $this->getUrl( @@ -128,21 +144,41 @@ public function getBackUrl() )); } + /** + * Retrieve capture url + * + * @return string + */ public function getCaptureUrl() { return $this->getUrl('*/*/capture', array('creditmemo_id'=>$this->getCreditmemo()->getId())); } + /** + * Retrieve void url + * + * @return string + */ public function getVoidUrl() { return $this->getUrl('*/*/void', array('creditmemo_id'=>$this->getCreditmemo()->getId())); } + /** + * Retrieve cancel url + * + * @return string + */ public function getCancelUrl() { return $this->getUrl('*/*/cancel', array('creditmemo_id'=>$this->getCreditmemo()->getId())); } + /** + * Retrieve email url + * + * @return string + */ public function getEmailUrl() { return $this->getUrl('*/*/email', array( @@ -151,6 +187,11 @@ public function getEmailUrl() )); } + /** + * Retrieve print url + * + * @return string + */ public function getPrintUrl() { return $this->getUrl('*/*/print', array( @@ -158,6 +199,11 @@ public function getPrintUrl() )); } + /** + * Update 'back' button url + * + * @return Mage_Adminhtml_Block_Widget_Container | Mage_Adminhtml_Block_Sales_Order_Creditmemo_View + */ public function updateBackButtonUrl($flag) { if ($flag) { @@ -165,4 +211,15 @@ public function updateBackButtonUrl($flag) } return $this; } + + /** + * Check whether action is allowed + * + * @param string $action + * @return bool + */ + public function _isAllowedAction($action) + { + return Mage::getSingleton('admin/session')->isAllowed('sales/order/actions/' . $action); + } } diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Invoice/Create.php b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Invoice/Create.php index 1ee2ed94c2..ffa1920c51 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Invoice/Create.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Invoice/Create.php @@ -44,13 +44,6 @@ public function __construct() $this->_removeButton('save'); $this->_removeButton('delete'); - - /*$this->_addButton('submit_invoice', array( - 'label' => Mage::helper('sales')->__('Submit Invoice'), - 'class' => 'save submit-button', - 'onclick' => '$(\'edit_form\').submit()', - ) - );*/ } /** @@ -63,25 +56,23 @@ public function getInvoice() return Mage::registry('current_invoice'); } + /** + * Retrieve text for header + * + * @return string + */ public function getHeaderText() { - if ($this->getInvoice()->getOrder()->getForcedDoShipmentWithInvoice()) { - $_label = ' and Shipment'; - } else { - $_label = ''; - } - $header = Mage::helper('sales')->__('New Invoice%s for Order #%s', - $_label, - $this->getInvoice()->getOrder()->getRealOrderId() - ); - /*$header = Mage::helper('sales')->__('New Invoice for Order #%s | Order Date: %s | Customer Name: %s', - $this->getInvoice()->getOrder()->getRealOrderId(), - $this->formatDate($this->getInvoice()->getOrder()->getCreatedAt(), 'medium', true), - $this->getInvoice()->getOrder()->getCustomerName() - );*/ - return $header; + return ($this->getInvoice()->getOrder()->getForcedDoShipmentWithInvoice()) + ? Mage::helper('sales')->__('New Invoice and Shipment for Order #%s', $this->getInvoice()->getOrder()->getRealOrderId()) + : Mage::helper('sales')->__('New Invoice for Order #%s', $this->getInvoice()->getOrder()->getRealOrderId()); } + /** + * Retrieve back url + * + * @return string + */ public function getBackUrl() { return $this->getUrl('*/sales_order/view', array('order_id'=>$this->getInvoice()->getOrderId())); 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 8c5353fb4c..fbe59d7d97 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 @@ -136,7 +136,7 @@ public function getOrderTotalData() public function getOrderTotalbarData() { $totalbarData = array(); - $this->setPriceDataObject($this->getInvoice()); + $this->setPriceDataObject($this->getInvoice()->getOrder()); $totalbarData[] = array(Mage::helper('sales')->__('Paid Amount'), $this->displayPriceAttribute('amount_paid'), false); $totalbarData[] = array(Mage::helper('sales')->__('Refund Amount'), $this->displayPriceAttribute('amount_refunded'), false); $totalbarData[] = array(Mage::helper('sales')->__('Shipping Amount'), $this->displayPriceAttribute('shipping_captured'), false); diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Invoice/View.php b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Invoice/View.php index 1e288832fb..6ebedcb0ae 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Invoice/View.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Invoice/View.php @@ -33,11 +33,19 @@ */ class Mage_Adminhtml_Block_Sales_Order_Invoice_View extends Mage_Adminhtml_Block_Widget_Form_Container { + /** + * Admin session + * + * @var Mage_Admin_Model_Session + */ + protected $_session; + public function __construct() { $this->_objectId = 'invoice_id'; $this->_controller = 'sales_order_invoice'; $this->_mode = 'view'; + $this->_session = Mage::getSingleton('admin/session'); parent::__construct(); @@ -45,7 +53,7 @@ public function __construct() $this->_removeButton('reset'); $this->_removeButton('delete'); - if ($this->getInvoice()->canCancel()) { + if ($this->_isAllowedAction('cancel') && $this->getInvoice()->canCancel()) { $this->_addButton('cancel', array( 'label' => Mage::helper('sales')->__('Cancel'), 'class' => 'delete', @@ -54,14 +62,16 @@ public function __construct() ); } - $this->addButton('send_notification', array( - 'label' => Mage::helper('sales')->__('Send Email'), - 'onclick' => 'confirmSetLocation(\'' . Mage::helper('sales')->__( - 'Are you sure you want to send Invoice email to customer?' - ) . '\', \'' . $this->getEmailUrl() . '\')' - )); + if ($this->_isAllowedAction('emails')) { + $this->addButton('send_notification', array( + 'label' => Mage::helper('sales')->__('Send Email'), + 'onclick' => 'confirmSetLocation(\'' + . Mage::helper('sales')->__('Are you sure you want to send Invoice email to customer?') + . '\', \'' . $this->getEmailUrl() . '\')' + )); + } - if ($this->getInvoice()->getOrder()->canCreditmemo()) { + if ($this->_isAllowedAction('creditmemo') && $this->getInvoice()->getOrder()->canCreditmemo()) { if ($this->getInvoice()->getOrder()->getPayment()->canRefundPartialPerInvoice() || !$this->getInvoice()->getIsUsedForRefund()) { @@ -74,8 +84,7 @@ public function __construct() } } - if (Mage::getSingleton('admin/session')->isAllowed('sales/order/actions/capture') - && $this->getInvoice()->canCapture()) { + if ($this->_isAllowedAction('capture') && $this->getInvoice()->canCapture()) { $this->_addButton('capture', array( 'label' => Mage::helper('sales')->__('Capture'), 'class' => 'save', @@ -190,4 +199,15 @@ public function updateBackButtonUrl($flag) } return $this; } + + /** + * Check whether is allowed action + * + * @param string $action + * @return bool + */ + protected function _isAllowedAction($action) + { + return $this->_session->isAllowed('sales/order/actions/' . $action); + } } diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Invoice/Void.php b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Invoice/Void.php deleted file mode 100644 index 8b13789179..0000000000 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Invoice/Void.php +++ /dev/null @@ -1 +0,0 @@ - diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Invoice/Void/Form.php b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Invoice/Void/Form.php deleted file mode 100644 index 8b13789179..0000000000 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Invoice/Void/Form.php +++ /dev/null @@ -1 +0,0 @@ - diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Shipment/View.php b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Shipment/View.php index 75ae83cee6..a5bc1465be 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Shipment/View.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Shipment/View.php @@ -44,9 +44,14 @@ public function __construct() $this->_removeButton('reset'); $this->_removeButton('delete'); - $this->_updateButton('save', 'label', Mage::helper('sales')->__('Send Tracking Information')); - $this->_updateButton('save', - 'onclick', "deleteConfirm('" . Mage::helper('sales')->__('Are you sure you want to send Shipment email to customer?') . "', '" . $this->getEmailUrl() . "')"); + if (Mage::getSingleton('admin/session')->isAllowed('sales/order/actions/emails')) { + $this->_updateButton('save', 'label', Mage::helper('sales')->__('Send Tracking Information')); + $this->_updateButton('save', + 'onclick', "deleteConfirm('" + . Mage::helper('sales')->__('Are you sure you want to send Shipment email to customer?') + . "', '" . $this->getEmailUrl() . "')" + ); + } if ($this->getShipment()->getId()) { $this->_addButton('print', array( diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Totals/Item.php b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Totals/Item.php index e2326862e5..09cd0413d5 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Totals/Item.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Totals/Item.php @@ -57,7 +57,11 @@ public function initTotals() 'block_name'=> $this->getNameInLayout(), 'area' => $this->getDisplayArea() )); - $this->getParentBlock()->addTotal($total); + if ($this->getBeforeCondition()) { + $this->getParentBlock()->addTotalBefore($total, $this->getBeforeCondition()); + } else { + $this->getParentBlock()->addTotal($total, $this->getAfterCondition()); + } return $this; } 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 d483660541..063b7c588d 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Order/View.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Order/View.php @@ -61,11 +61,8 @@ public function __construct() )); if ($nonEditableTypes) { $this->_updateButton('order_edit', 'onclick', - 'if (!confirm(\'' . Mage::helper('sales')->__( - 'This order contains (%s) items and therefore cannot be edited through the admin interface at this time, if you wish to continue editing the (%s) items will be removed, the order will be cancelled and a new order will be placed', - implode(', ', $nonEditableTypes), - implode(', ', $nonEditableTypes) - ) . '\')) return false;' . $onclickJs + 'if (!confirm(\'' . + Mage::helper('sales')->__('This order contains (%s) items and therefore cannot be edited through the admin interface at this time, if you wish to continue editing the (%s) items will be removed, the order will be cancelled and a new order will be placed', implode(', ', $nonEditableTypes), implode(', ', $nonEditableTypes)) . '\')) return false;' . $onclickJs ); } } @@ -78,12 +75,14 @@ public function __construct() )); } - $this->addButton('send_notification', array( - 'label' => Mage::helper('sales')->__('Send Order Email'), - 'onclick' => 'confirmSetLocation(\'' . Mage::helper('sales')->__( - 'Are you sure you want to send Order email to customer?' - ) . '\', \'' . $this->getEmailUrl() . '\')' - )); + if ($this->_isAllowedAction('emails') && !$this->getOrder()->isCanceled()) { + $_confirmText = 'Are you sure you want to send Order email to customer?'; + $this->addButton('send_notification', array( + 'label' => Mage::helper('sales')->__('Send Order Email'), + 'onclick' => 'confirmSetLocation(\'' . Mage::helper('sales')->__($_confirmText) + . '\', \'' . $this->getEmailUrl() . '\')' + )); + } if ($this->_isAllowedAction('creditmemo') && $this->getOrder()->canCreditmemo()) { $this->_addButton('order_creditmemo', array( @@ -107,9 +106,11 @@ public function __construct() } if ($this->_isAllowedAction('invoice') && $this->getOrder()->canInvoice()) { - $_label = $this->getOrder()->getForcedDoShipmentWithInvoice()?'Invoice and Ship':'Invoice'; + $_label = $this->getOrder()->getForcedDoShipmentWithInvoice() ? + Mage::helper('sales')->__('Invoice and Ship') : + Mage::helper('sales')->__('Invoice'); $this->_addButton('order_invoice', array( - 'label' => Mage::helper('sales')->__('%s', $_label), + 'label' => $_label, 'onclick' => 'setLocation(\'' . $this->getInvoiceUrl() . '\')', )); } diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Order/View/Tab/Creditmemos.php b/app/code/core/Mage/Adminhtml/Block/Sales/Order/View/Tab/Creditmemos.php index ac582f6cac..5d63db45fd 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Order/View/Tab/Creditmemos.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Order/View/Tab/Creditmemos.php @@ -38,14 +38,14 @@ class Mage_Adminhtml_Block_Sales_Order_View_Tab_Creditmemos public function __construct() { parent::__construct(); - $this->setId('order_creditmemos_grid'); + $this->setId('order_creditmemos'); $this->setUseAjax(true); } protected function _prepareCollection() { //TODO: add full name logic - $collection = Mage::getResourceModel('sales/order_Creditmemo_collection') + $collection = Mage::getResourceModel('sales/order_creditmemo_collection') ->addAttributeToSelect('increment_id') ->addAttributeToSelect('created_at') ->addAttributeToSelect('order_currency_code') diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Order/View/Tab/History.php b/app/code/core/Mage/Adminhtml/Block/Sales/Order/View/Tab/History.php index 2359c32954..668fc41155 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Order/View/Tab/History.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Order/View/Tab/History.php @@ -52,75 +52,134 @@ public function getOrder() } /** - * Retrive full order history - * + * Compose and get order full history. + * Consists of the status history comments as well as of invoices, shipments and creditmemos creations + * @return array */ - public function getFullHistory(){ + public function getFullHistory() + { $order = $this->getOrder(); - $_fullHistory = array(); - foreach ($order->getAllStatusHistory() as $_history){ - $_fullHistory[$_history->getEntityId()] = - $this->_prepareHistoryItem( - $_history->getStatusLabel(), - $_history->getIsCustomerNotified(), - $_history->getCreatedAtDate()); + $history = array(); + foreach ($order->getAllStatusHistory() as $orderComment){ + $history[$orderComment->getEntityId()] = $this->_prepareHistoryItem( + $orderComment->getStatusLabel(), + $orderComment->getIsCustomerNotified(), + $orderComment->getCreatedAtDate(), + $orderComment->getComment() + ); } foreach ($order->getCreditmemosCollection() as $_memo){ - $_fullHistory[$_memo->getEntityId()] = + $history[$_memo->getEntityId()] = $this->_prepareHistoryItem($this->__('Credit Memo #%s created', $_memo->getIncrementId()), $_memo->getEmailSent(), $_memo->getCreatedAtDate()); foreach ($_memo->getCommentsCollection() as $_comment){ - $_fullHistory[$_comment->getEntityId()] = + $history[$_comment->getEntityId()] = $this->_prepareHistoryItem($this->__('Credit Memo #%s comment added', $_memo->getIncrementId()), $_comment->getIsCustomerNotified(), $_comment->getCreatedAtDate(), $_comment->getComment()); } } foreach ($order->getShipmentsCollection() as $_shipment){ - $_fullHistory[$_shipment->getEntityId()] = + $history[$_shipment->getEntityId()] = $this->_prepareHistoryItem($this->__('Shipment #%s created', $_shipment->getIncrementId()), $_shipment->getEmailSent(), $_shipment->getCreatedAtDate()); foreach ($_shipment->getCommentsCollection() as $_comment){ - $_fullHistory[$_comment->getEntityId()] = + $history[$_comment->getEntityId()] = $this->_prepareHistoryItem($this->__('Shipment #%s comment added', $_shipment->getIncrementId()), $_comment->getIsCustomerNotified(), $_comment->getCreatedAtDate(), $_comment->getComment()); } } foreach ($order->getInvoiceCollection() as $_invoice){ - $_fullHistory[$_invoice->getEntityId()] = + $history[$_invoice->getEntityId()] = $this->_prepareHistoryItem($this->__('Invoice #%s created', $_invoice->getIncrementId()), $_invoice->getEmailSent(), $_invoice->getCreatedAtDate()); foreach ($_invoice->getCommentsCollection() as $_comment){ - $_fullHistory[$_comment->getEntityId()] = + $history[$_comment->getEntityId()] = $this->_prepareHistoryItem($this->__('Invoice #%s comment added', $_invoice->getIncrementId()), $_comment->getIsCustomerNotified(), $_comment->getCreatedAtDate(), $_comment->getComment()); } } foreach ($order->getTracksCollection() as $_track){ - $_fullHistory[$_track->getEntityId()] = + $history[$_track->getEntityId()] = $this->_prepareHistoryItem($this->__('Tracking number %s for %s assigned', $_track->getNumber(), $_track->getTitle()), false, $_track->getCreatedAtDate()); } - krsort($_fullHistory); - return $_fullHistory; + krsort($history); + return $history; + } + + /** + * Status history date/datetime getter + * @param array $item + * @return string + */ + public function getItemCreatedAt(array $item, $dateType = 'date', $format = 'medium') + { + if (!isset($item['created_at'])) { + return ''; + } + if ('date' === $dateType) { + return $this->helper('core')->formatDate($item['created_at'], $format); + } + return $this->helper('core')->formatTime($item['created_at'], $format); + } + + /** + * Status history item title getter + * @param array $item + * @return string + */ + public function getItemTitle(array $item) + { + return (isset($item['title']) ? $this->htmlEscape($item['title']) : ''); } + /** + * Check whether status history comment is with customer notification + * @param array $item + * @return bool + */ + public function isItemNotified(array $item, $isSimpleCheck = true) + { + if ($isSimpleCheck) { + return !empty($item['notified']); + } + return isset($item['notified']) && false !== $item['notified']; + } + + /** + * Status history item comment getter + * @param array $item + * @return string + */ + public function getItemComment(array $item) + { + return (isset($item['comment']) ? $this->htmlEscape($item['comment']) : ''); + } + + /** + * Map history items as array + * @param string $label + * @param bool $notified + * @param Zend_Date $created + * @param string $comment + */ protected function _prepareHistoryItem($label, $notified, $created, $comment = '') { return array( - 'title' => $label, - 'notified' => $notified, - 'comment' => $comment, - 'created_at' => $created - ); + 'title' => $label, + 'notified' => $notified, + 'comment' => $comment, + 'created_at' => $created + ); } /** diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Order/View/Tab/Invoices.php b/app/code/core/Mage/Adminhtml/Block/Sales/Order/View/Tab/Invoices.php index 10c852b4b9..712eb53b38 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Order/View/Tab/Invoices.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Order/View/Tab/Invoices.php @@ -38,7 +38,7 @@ class Mage_Adminhtml_Block_Sales_Order_View_Tab_Invoices public function __construct() { parent::__construct(); - $this->setId('order_invoices_grid'); + $this->setId('order_invoices'); $this->setUseAjax(true); } diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Order/View/Tab/Shipments.php b/app/code/core/Mage/Adminhtml/Block/Sales/Order/View/Tab/Shipments.php index 6d2f538fb6..284a29e404 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Order/View/Tab/Shipments.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Order/View/Tab/Shipments.php @@ -38,7 +38,7 @@ class Mage_Adminhtml_Block_Sales_Order_View_Tab_Shipments public function __construct() { parent::__construct(); - $this->setId('order_shipments_grid'); + $this->setId('order_shipments'); $this->setUseAjax(true); } 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 43eccb62f7..62cd4f8e56 100644 --- a/app/code/core/Mage/Adminhtml/Block/System/Config/Form.php +++ b/app/code/core/Mage/Adminhtml/Block/System/Config/Form.php @@ -203,6 +203,20 @@ public function initForm() return $this; } + /** + * Return dependency block object + * + * @return Mage_Adminhtml_Block_Widget_Form_Element_Dependence + */ + protected function _getDependence() + { + if (!$this->getChild('element_dependense')){ + $this->setChild('element_dependense', + $this->getLayout()->createBlock('adminhtml/widget_form_element_dependence')); + } + return $this->getChild('element_dependense'); + } + /** * Init fieldset fields * @@ -265,6 +279,18 @@ public function initFields($fieldset, $group, $section, $fieldPrefix='', $labelP $model->setPath($path)->setValue($data)->afterLoad(); $data = $model->getValue(); } + + if ($e->depends) { + foreach ($e->depends->children() as $dependent) { + $dependentId = $section->getName() . '_' . $group->getName() . '_' . $fieldPrefix . $dependent->getName(); + $dependentValue = (string) $dependent; + $this->_getDependence() + ->addFieldMap($id, $id) + ->addFieldMap($dependentId, $dependentId) + ->addFieldDependence($id, $dependentId, $dependentValue); + } + } + $field = $fieldset->addField($id, $fieldType, array( 'name' => $name, 'label' => $label, @@ -303,6 +329,19 @@ public function initFields($fieldset, $group, $section, $fieldPrefix='', $labelP return $this; } + /** + * Append dependence block at then end of form block + * + * + */ + protected function _afterToHtml($html) + { + if ($this->_getDependence()) { + $html .= $this->_getDependence()->toHtml(); + } + $html = parent::_afterToHtml($html); + return $html; + } /** * Enter description here... diff --git a/app/code/core/Mage/Adminhtml/Block/System/Config/Form/Field.php b/app/code/core/Mage/Adminhtml/Block/System/Config/Form/Field.php index d433c90e2e..59b580fc55 100644 --- a/app/code/core/Mage/Adminhtml/Block/System/Config/Form/Field.php +++ b/app/code/core/Mage/Adminhtml/Block/System/Config/Form/Field.php @@ -88,7 +88,7 @@ public function render(Varien_Data_Form_Element_Abstract $element) $html.= ''; $html.= $this->_getElementHtml($element); if ($element->getComment()) { - $html.= '

'.$element->getComment().'

'; + $html.= '

'.$element->getComment().'

'; } $html.= ''; diff --git a/app/code/core/Mage/Adminhtml/Block/System/Config/Xml.php b/app/code/core/Mage/Adminhtml/Block/System/Config/Xml.php deleted file mode 100644 index 8b13789179..0000000000 --- a/app/code/core/Mage/Adminhtml/Block/System/Config/Xml.php +++ /dev/null @@ -1 +0,0 @@ - diff --git a/app/code/core/Mage/Adminhtml/Block/System/Convert/Profile/Run.php b/app/code/core/Mage/Adminhtml/Block/System/Convert/Profile/Run.php index df7a785532..e03e4beacd 100644 --- a/app/code/core/Mage/Adminhtml/Block/System/Convert/Profile/Run.php +++ b/app/code/core/Mage/Adminhtml/Block/System/Convert/Profile/Run.php @@ -111,6 +111,11 @@ protected function _toHtml() echo ''; @@ -288,6 +293,5 @@ function addProfileRow(data) { echo ""; */ echo ''; - exit; } } diff --git a/app/code/core/Mage/Adminhtml/Block/System/Currency/Rate/Services.php b/app/code/core/Mage/Adminhtml/Block/System/Currency/Rate/Services.php index 693420824c..547d61dbf3 100644 --- a/app/code/core/Mage/Adminhtml/Block/System/Currency/Rate/Services.php +++ b/app/code/core/Mage/Adminhtml/Block/System/Currency/Rate/Services.php @@ -64,4 +64,4 @@ protected function _prepareLayout() return parent::_prepareLayout(); } -} \ No newline at end of file +} diff --git a/app/code/core/Mage/Adminhtml/Block/System/Email/Template/Edit.php b/app/code/core/Mage/Adminhtml/Block/System/Email/Template/Edit.php index 922662390b..837509021f 100644 --- a/app/code/core/Mage/Adminhtml/Block/System/Email/Template/Edit.php +++ b/app/code/core/Mage/Adminhtml/Block/System/Email/Template/Edit.php @@ -40,10 +40,6 @@ public function __construct() { parent::__construct(); $this->setTemplate('system/email/template/edit.phtml'); - Mage::register('email_template', Mage::getModel('core/email_template')); - if ($templateId = (int) $this->getRequest()->getParam('id')) { - $this->getEmailTemplate()->load($templateId); - } } protected function _prepareLayout() @@ -281,7 +277,7 @@ public function getDeleteUrl() */ public function getEmailTemplate() { - return Mage::registry('email_template'); + return Mage::registry('current_email_template'); } public function getLocaleOptions() @@ -308,4 +304,109 @@ public function getLoadUrl() { return $this->getUrl('*/*/defaultTemplate'); } + + /** + * Get paths of where current template is used as default + * + * @param bool $asJSON + * @return string + */ + public function getUsedDefaultForPaths($asJSON = true) + { + $paths = $this->getEmailTemplate()->getSystemConfigPathsWhereUsedAsDefault(); + $pathsParts = $this->_getSystemConfigPathsParts($paths); + if($asJSON){ + return Mage::helper('core')->jsonEncode($pathsParts); + } + return $pathsParts; + } + + /** + * Get paths of where current template is currently used + * + * @param bool $asJSON + * @return string + */ + public function getUsedCurrentlyForPaths($asJSON = true) + { + $paths = $this->getEmailTemplate()->getSystemConfigPathsWhereUsedCurrently(); + $pathsParts = $this->_getSystemConfigPathsParts($paths); + if($asJSON){ + return Mage::helper('core')->jsonEncode($pathsParts); + } + return $pathsParts; + } + + /** + * Convert xml config pathes to decorated names + * + * @param array $paths + * @return array + */ + protected function _getSystemConfigPathsParts($paths) + { + $result = $urlParams = $prefixParts = array(); + $scopeLabel = Mage::helper('adminhtml')->__('GLOBAL'); + if ($paths) { + // create prefix path parts + $prefixParts[] = array( + 'title' => Mage::getSingleton('admin/config')->getMenuItemLabel('system'), + ); + $prefixParts[] = array( + 'title' => Mage::getSingleton('admin/config')->getMenuItemLabel('system/config'), + 'url' => $this->getUrl('adminhtml/system_config/'), + ); + + $pathParts = $prefixParts; + foreach ($paths as $id => $pathData) { + list($sectionName, $groupName, $fieldName) = explode('/', $pathData['path']); + $urlParams = array('section' => $sectionName); + if (isset($pathData['scope']) && isset($pathData['scope_id'])) { + switch ($pathData['scope']) { + case 'stores': + $store = Mage::app()->getStore($pathData['scope_id']); + if ($store) { + $urlParams['website'] = $store->getWebsite()->getCode(); + $urlParams['store'] = $store->getCode(); + $scopeLabel = $store->getWebsite()->getName() . '/' . $store->getName(); + } + break; + case 'websites': + $website = Mage::app()->getWebsite($pathData['scope_id']); + if ($website) { + $urlParams['website'] = $website->getCode(); + $scopeLabel = $website->getName(); + } + break; + default: + break; + } + } + $pathParts[] = array( + 'title' => Mage::getSingleton('adminhtml/config')->getSystemConfigNodeLabel($sectionName), + 'url' => $this->getUrl('adminhtml/system_config/edit', $urlParams), + ); + $pathParts[] = array( + 'title' => Mage::getSingleton('adminhtml/config')->getSystemConfigNodeLabel($sectionName, $groupName) + ); + $pathParts[] = array( + 'title' => Mage::getSingleton('adminhtml/config')->getSystemConfigNodeLabel($sectionName, $groupName, $fieldName), + 'scope' => $scopeLabel + ); + $result[] = $pathParts; + $pathParts = $prefixParts; + } + } + return $result; + } + + /** + * Return original template code of current template + * + * @return string + */ + public function getOrigTemplateCode() + { + return $this->getEmailTemplate()->getOrigTemplateCode(); + } } 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 43bfeaa2c1..f57f9ef033 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 @@ -34,14 +34,59 @@ class Mage_Adminhtml_Block_System_Email_Template_Edit_Form extends Mage_Adminhtml_Block_Widget_Form { + /** + * Prepare layout. + * Add files to use dialog windows + * + * @return Mage_Adminhtml_Block_System_Email_Template_Edit_Form + */ + protected function _prepareLayout() + { + if ($head = $this->getLayout()->getBlock('head')) { + $head->addItem('js', 'prototype/window.js') + ->addItem('js_css', 'prototype/windows/themes/default.css') + ->addItem('js_css', 'prototype/windows/themes/magento.css') + ->addItem('js', 'mage/adminhtml/variables.js'); + } + return parent::_prepareLayout(); + } + /** + * Add fields to form and create template info form + * + * @return Mage_Adminhtml_Block_Widget_Form + */ protected function _prepareForm() { $form = new Varien_Data_Form(); - $fieldset = $form->addFieldset('base_fieldset', - array('legend'=>Mage::helper('adminhtml')->__('Template Information'),'class'=>'fieldset-wide') - ); + $fieldset = $form->addFieldset('base_fieldset', array( + 'legend' => Mage::helper('adminhtml')->__('Template Information'), + 'class' => 'fieldset-wide' + )); + + $templateId = $this->getEmailTemplate()->getId(); + if ($templateId) { + $fieldset->addField('used_currently_for', 'label', array( + 'label' => Mage::helper('adminhtml')->__('Used Currently For'), + 'container_id' => 'used_currently_for', + 'after_element_html' => + '', + )); + } + + if (!$templateId) { + $fieldset->addField('used_default_for', 'label', array( + 'label' => Mage::helper('adminhtml')->__('Used as Default For'), + 'container_id' => 'used_default_for', + 'after_element_html' => + '', + )); + } $fieldset->addField('template_code', 'text', array( 'name'=>'template_code', @@ -56,18 +101,48 @@ protected function _prepareForm() 'required' => true )); - $fieldset->addField('template_text', 'editor', array( + $fieldset->addField('orig_template_variables', 'hidden', array( + 'name' => 'orig_template_variables', + )); + + $fieldset->addField('variables', 'hidden', array( + 'name' => 'variables', + 'value' => Zend_Json::encode($this->getVariables()) + )); + + $fieldset->addField('template_variables', 'hidden', array( + 'name' => 'template_variables', + )); + + $insertVariableButton = $this->getLayout() + ->createBlock('adminhtml/widget_button', '', array( + 'type' => 'button', + 'label' => Mage::helper('adminhtml')->__('Insert Variable...'), + 'onclick' => 'templateControl.openVariableChooser();return false;' + )); + + $fieldset->addField('insert_variable', 'note', array( + 'text' => $insertVariableButton->toHtml() + )); + + $fieldset->addField('template_text', 'textarea', array( 'name'=>'template_text', - 'wysiwyg' => false, //!Mage::registry('email_template')->isPlain(), 'label' => Mage::helper('adminhtml')->__('Template Content'), + 'title' => Mage::helper('adminhtml')->__('Template Content'), 'required' => true, - 'theme' => 'advanced', - 'state' => 'html', - 'style' => 'height:24em;', + 'style' => 'height:24em;', )); - if (Mage::registry('email_template')->getId()) { - $form->addValues(Mage::registry('email_template')->getData()); + if (!$this->getEmailTemplate()->isPlain()) { + $fieldset->addField('template_styles', 'textarea', array( + 'name'=>'template_styles', + 'label' => Mage::helper('adminhtml')->__('Template Styles'), + 'container_id' => 'field_template_styles' + )); + } + + if ($templateId) { + $form->addValues($this->getEmailTemplate()->getData()); } if ($values = Mage::getSingleton('adminhtml/session')->getData('email_template_form_data', true)) { @@ -78,4 +153,42 @@ protected function _prepareForm() return parent::_prepareForm(); } + + /** + * Return current email template model + * + * @return Mage_Core_Model_Email_Template + */ + public function getEmailTemplate() + { + return Mage::registry('current_email_template'); + } + + /** + * Retrieve variables to insert into email + * + * @return array + */ + public function getVariables() + { + $variables = array(); + $variables[] = Mage::getModel('core/source_email_variables') + ->toOptionArray(true); + $customVariables = Mage::getModel('core/variable') + ->getVariablesOptionArray(true); + if ($customVariables) { + $variables[] = $customVariables; + } + /* @var $template Mage_Core_Model_Email_Template */ + $template = Mage::registry('current_email_template'); + if ($template->getId() && $templateVariables = $template->getVariablesOptionArray(true)) { + $variables[] = $templateVariables; + } +// array_unshift($variables, array( +// 'value' => '', +// 'label' => Mage::helper('adminhtml')->__('-- Please Select --') +// )); + return $variables; + } } + diff --git a/app/code/core/Mage/Adminhtml/Block/System/Email/Template/Preview.php b/app/code/core/Mage/Adminhtml/Block/System/Email/Template/Preview.php index 9c1ba01468..8ed8f2e6c6 100644 --- a/app/code/core/Mage/Adminhtml/Block/System/Email/Template/Preview.php +++ b/app/code/core/Mage/Adminhtml/Block/System/Email/Template/Preview.php @@ -42,6 +42,7 @@ protected function _toHtml() } else { $template->setTemplateType($this->getRequest()->getParam('type')); $template->setTemplateText($this->getRequest()->getParam('text')); + $template->setTemplateStyles($this->getRequest()->getParam('styles')); } Varien_Profiler::start("email_template_proccessing"); diff --git a/app/code/core/Mage/Adminhtml/Block/System/Variable.php b/app/code/core/Mage/Adminhtml/Block/System/Variable.php new file mode 100644 index 0000000000..fd53c34dd9 --- /dev/null +++ b/app/code/core/Mage/Adminhtml/Block/System/Variable.php @@ -0,0 +1,47 @@ + + */ + +class Mage_Adminhtml_Block_System_Variable extends Mage_Adminhtml_Block_Widget_Grid_Container +{ + /** + * Block constructor + */ + public function __construct() + { + $this->_controller = 'system_variable'; + $this->_headerText = Mage::helper('adminhtml')->__('Custom Variables'); + parent::__construct(); + $this->_updateButton('add', 'label', Mage::helper('adminhtml')->__('Add New Variable')); + } +} diff --git a/app/code/core/Mage/Adminhtml/Block/System/Variable/Edit.php b/app/code/core/Mage/Adminhtml/Block/System/Variable/Edit.php new file mode 100644 index 0000000000..d2b85d3037 --- /dev/null +++ b/app/code/core/Mage/Adminhtml/Block/System/Variable/Edit.php @@ -0,0 +1,137 @@ + + */ + +class Mage_Adminhtml_Block_System_Variable_Edit extends Mage_Adminhtml_Block_Widget_Form_Container +{ + /** + * Internal constructor + * + */ + protected function _construct() + { + parent::_construct(); + $this->_objectId = 'variable_id'; + $this->_controller = 'system_variable'; + } + + /** + * Getter + * + * @return Mage_Core_Model_Variable + */ + public function getVariable() + { + return Mage::registry('current_variable'); + } + + /** + * Prepare layout. + * Adding save_and_continue button + * + * @return Mage_Adminhtml_Block_System_Variable_Edit + */ + protected function _preparelayout() + { + $this->_addButton('save_and_edit', array( + 'label' => Mage::helper('adminhtml')->__('Save and Continue Edit'), + 'class' => 'save', + 'onclick' => 'editForm.submit(\'' . $this->getSaveAndContinueUrl() . '\');' + ), 100); + if (!$this->getVariable()->getId()) { + $this->removeButton('delete'); + } + return parent::_prepareLayout(); + } + + /** + * Return form HTML + * + * @return string + */ + public function getFormHtml() + { + $formHtml = parent::getFormHtml(); + if (!Mage::app()->isSingleStoreMode() && $this->getVariable()->getId()) { + $storeSwitcher = $this->getLayout() + ->createBlock('adminhtml/store_switcher')->toHtml(); + $formHtml = $storeSwitcher.$formHtml; + } + return $formHtml; + } + + /** + * Return translated header text depending on creating/editing action + * + * @return string + */ + public function getHeaderText() + { + if ($this->getVariable()->getId()) { + return Mage::helper('adminhtml')->__('Custom Variable "%s"', $this->htmlEscape($this->getVariable()->getName())); + } + else { + return Mage::helper('adminhtml')->__('New Custom Variable'); + } + } + + /** + * Return validation url for edit form + * + * @return string + */ + public function getValidationUrl() + { + return $this->getUrl('*/*/validate', array('_current'=>true)); + } + + /** + * Return save url for edit form + * + * @return string + */ + public function getSaveUrl() + { + return $this->getUrl('*/*/save', array('_current' => true, 'back' => null)); + } + + /** + * Return save and continue url for edit form + * + * @return string + */ + public function getSaveAndContinueUrl() + { + return $this->getUrl('*/*/save', array('_current' => true, 'back' => 'edit')); + } +} diff --git a/app/code/core/Mage/Adminhtml/Block/System/Variable/Edit/Form.php b/app/code/core/Mage/Adminhtml/Block/System/Variable/Edit/Form.php new file mode 100644 index 0000000000..fa4f26f4b2 --- /dev/null +++ b/app/code/core/Mage/Adminhtml/Block/System/Variable/Edit/Form.php @@ -0,0 +1,113 @@ + + */ +class Mage_Adminhtml_Block_System_Variable_Edit_Form extends Mage_Adminhtml_Block_Widget_Form +{ + /** + * Getter + * + * @return Mage_Core_Model_Variable + */ + public function getVariable() + { + return Mage::registry('current_variable'); + } + + /** + * Prepare form before rendering HTML + * + * @return Mage_Adminhtml_Block_System_Variable_Edit_Form + */ + protected function _prepareForm() + { + $form = new Varien_Data_Form(array( + 'id' => 'edit_form', + 'action' => $this->getData('action'), + 'method' => 'post' + )); + + $fieldset = $form->addFieldset('base', array()); + + $fieldset->addField('code', 'text', array( + 'name' => 'code', + 'label' => Mage::helper('adminhtml')->__('Variable Code'), + 'title' => Mage::helper('adminhtml')->__('Variable Code'), + 'required' => true + )); + + $fieldset->addField('name', 'text', array( + 'name' => 'name', + 'label' => Mage::helper('adminhtml')->__('Variable Name'), + 'title' => Mage::helper('adminhtml')->__('Variable Name'), + 'required' => true + )); + + $useDefault = false; + if ($this->getVariable()->getId() && $this->getVariable()->getStoreId()) { + $useDefault = !((bool)$this->getVariable()->getStoreHtmlValue()); + $this->getVariable()->setUseDefaultValue((int)$useDefault); + $fieldset->addField('use_default_value', 'select', array( + 'name' => 'use_default_value', + 'label' => Mage::helper('adminhtml')->__('Use Default Variable Values'), + 'title' => Mage::helper('adminhtml')->__('Use Default Variable Values'), + 'onchange' => 'toggleValueElement(this);', + 'values' => array( + 0 => Mage::helper('adminhtml')->__('No'), + 1 => Mage::helper('adminhtml')->__('Yes') + ) + )); + } + + $fieldset->addField('html_value', 'textarea', array( + 'name' => 'html_value', + 'label' => Mage::helper('adminhtml')->__('Variable HTML Value'), + 'title' => Mage::helper('adminhtml')->__('Variable HTML Value'), + 'disabled' => $useDefault + )); + + $fieldset->addField('plain_value', 'textarea', array( + 'name' => 'plain_value', + 'label' => Mage::helper('adminhtml')->__('Variable Plain Value'), + 'title' => Mage::helper('adminhtml')->__('Variable Plain Value'), + 'disabled' => $useDefault + )); + + $form->setValues($this->getVariable()->getData()) + ->addFieldNameSuffix('variable') + ->setUseContainer(true); + + $this->setForm($form); + return parent::_prepareForm(); + } + +} diff --git a/app/code/core/Mage/Adminhtml/Block/System/Variable/Form/Renderer/Fieldset/Element.php b/app/code/core/Mage/Adminhtml/Block/System/Variable/Form/Renderer/Fieldset/Element.php new file mode 100644 index 0000000000..9171ca11b0 --- /dev/null +++ b/app/code/core/Mage/Adminhtml/Block/System/Variable/Form/Renderer/Fieldset/Element.php @@ -0,0 +1,114 @@ + + */ +class Mage_Adminhtml_Block_System_Variable_Form_Renderer_Fieldset_Element extends Mage_Adminhtml_Block_Widget_Form_Renderer_Fieldset_Element +{ + /** + * Initialize block template + */ + protected function _construct() + { + $this->setTemplate('system/variable/form/renderer/fieldset/element.phtml'); + } + + /** + * Check "Use default" checkbox display availability + * + * @return bool + */ + public function canDisplayUseDefault() + { + if ($this->getVariable()->getId() + && $this->getVariable()->getStoreId()) + { + return true; + } + return false; + } + + /** + * Check default value usage fact + * + * @return bool + */ + public function usedDefault() + { + if ($this->getVariable()->getStoreValue() === null) { + return true; + } + return false; + } + + /** + * Disable field in default value using case + * + * @return Mage_Adminhtml_Block_Catalog_Form_Renderer_Fieldset_Element + */ + public function checkFieldDisable() + { + if ($this->canDisplayUseDefault() && $this->usedDefault()) { + $this->getElement()->setDisabled(true); + } + return $this; + } + + /** + * Retrieve label scope + * + * @return string + */ + public function getScopeLabel() + { + return '[STORE VIEW]'; + } + + /** + * Retrieve element label html + * + * @return string + */ + public function getElementLabelHtml() + { + return $this->getElement()->getLabelHtml(); + } + + /** + * Retrieve element html + * + * @return string + */ + public function getElementHtml() + { + return $this->getElement()->getElementHtml(); + } +} diff --git a/app/code/core/Mage/Adminhtml/Block/System/Variable/Grid.php b/app/code/core/Mage/Adminhtml/Block/System/Variable/Grid.php new file mode 100644 index 0000000000..b1d6fd4a4d --- /dev/null +++ b/app/code/core/Mage/Adminhtml/Block/System/Variable/Grid.php @@ -0,0 +1,99 @@ + + */ + +class Mage_Adminhtml_Block_System_Variable_Grid extends Mage_Adminhtml_Block_Widget_Grid +{ + /** + * Internal constructor + * + */ + protected function _construct() + { + parent::_construct(); + $this->setId('customVariablesGrid'); + $this->setDefaultSort('variable_id'); + $this->setDefaultDir('ASC'); + } + + /** + * Prepare grid collection object + * + * @return Mage_Adminhtml_Block_System_Variable_Grid + */ + protected function _prepareCollection() + { + /* @var $collection Mage_Core_Model_Mysql4_Variable_Collection */ + $collection = Mage::getModel('core/variable')->getCollection(); + $this->setCollection($collection); + return parent::_prepareCollection(); + } + + /** + * Prepare grid columns + * + * @return Mage_Adminhtml_Block_System_Variable_Grid + */ + protected function _prepareColumns() + { + $this->addColumn('variable_id', array( + 'header' => Mage::helper('adminhtml')->__('Variable ID'), + 'align' => 'left', + 'index' => 'variable_id', + )); + + $this->addColumn('code', array( + 'header' => Mage::helper('adminhtml')->__('Variable Code'), + 'align' => 'center', + 'index' => 'code', + )); + + $this->addColumn('name', array( + 'header' => Mage::helper('adminhtml')->__('Name'), + 'align' => 'left', + 'index' => 'name', + )); + + return parent::_prepareColumns(); + } + + /** + * Row click url + * + * @return string + */ + public function getRowUrl($row) + { + return $this->getUrl('*/*/edit', array('variable_id' => $row->getId())); + } +} diff --git a/app/code/core/Mage/Adminhtml/Block/Tag/Edit.php b/app/code/core/Mage/Adminhtml/Block/Tag/Edit.php index 2a30ac6937..153788c5be 100644 --- a/app/code/core/Mage/Adminhtml/Block/Tag/Edit.php +++ b/app/code/core/Mage/Adminhtml/Block/Tag/Edit.php @@ -34,14 +34,14 @@ class Mage_Adminhtml_Block_Tag_Edit extends Mage_Adminhtml_Block_Widget_Form_Container { - /** * Add and update buttons * + * @return void */ public function __construct() { - $this->_objectId = 'tag_id'; + $this->_objectId = 'tag_id'; $this->_controller = 'tag'; parent::__construct(); @@ -50,9 +50,9 @@ public function __construct() $this->_updateButton('delete', 'label', Mage::helper('tag')->__('Delete Tag')); $this->addButton('save_and_edit_button', array( - 'label' => Mage::helper('tag')->__('Save And Continue Edit'), - 'onclick' => 'saveAndContinueEdit(\''.$this->getSaveAndContinueUrl().'\')', - 'class' => 'save' + 'label' => Mage::helper('tag')->__('Save And Continue Edit'), + 'onclick' => "saveAndContinueEdit('" . $this->getSaveAndContinueUrl() . "')", + 'class' => 'save' ), 1); } @@ -65,11 +65,9 @@ protected function _prepareLayout() { parent::_prepareLayout(); - $this->setChild('store_switcher', $this->getLayout()->createBlock('adminhtml/tag_store_switcher')); - - $this->setChild('tag_assign_accordion', $this->getLayout()->createBlock('adminhtml/tag_edit_assigned')); - - $this->setChild('accordion', $this->getLayout()->createBlock('adminhtml/tag_edit_accordion')); + $this->setChild('store_switcher', $this->getLayout()->createBlock('adminhtml/tag_store_switcher')) + ->setChild('tag_assign_accordion', $this->getLayout()->createBlock('adminhtml/tag_edit_assigned')) + ->setChild('accordion', $this->getLayout()->createBlock('adminhtml/tag_edit_accordion')); return $this; } @@ -97,6 +95,16 @@ public function getAcordionsHtml() return $this->getChildHtml('accordion'); } + /** + * Retrieve Tag Delete URL + * + * @return string + */ + public function getDeleteUrl() + { + return $this->getUrl('*/*/delete', array('tag_id' => $this->getRequest()->getParam($this->_objectId), 'ret' => $this->getRequest()->getParam('ret', 'index'))); + } + /** * Retrieve Assigned Tags Accordion HTML * @@ -144,6 +152,16 @@ public function getSaveUrl() */ public function getSaveAndContinueUrl() { - return $this->getUrl('*/*/save', array('_current' => true, 'ret' => 'edit', 'store' => Mage::registry('current_tag')->getStoreId())); + return $this->getUrl('*/*/save', array('_current' => true, 'ret' => 'edit', 'continue' => $this->getRequest()->getParam('ret', 'index'), 'store' => Mage::registry('current_tag')->getStoreId())); + } + + /** + * Get URL for back (reset) button + * + * @return string + */ + public function getBackUrl() + { + return $this->getUrl('*/*/' . $this->getRequest()->getParam('ret', 'index')); } } diff --git a/app/code/core/Mage/Adminhtml/Block/Tag/Grid/Pending.php b/app/code/core/Mage/Adminhtml/Block/Tag/Grid/Pending.php index f569b86257..0f7284dfe1 100644 --- a/app/code/core/Mage/Adminhtml/Block/Tag/Grid/Pending.php +++ b/app/code/core/Mage/Adminhtml/Block/Tag/Grid/Pending.php @@ -29,17 +29,23 @@ * * @category Mage * @package Mage_Adminhtml - * @author Magento Core Team + * @author Magento Core Team */ class Mage_Adminhtml_Block_Tag_Grid_Pending extends Mage_Adminhtml_Block_Widget_Grid { - + /** + * Constructor + * + * @return void + */ public function __construct() { parent::__construct(); - $this->setId('pending_grid'); - $this->setDefaultSort('name'); - $this->setDefaultDir('ASC'); + $this->setId('pending_grid') + ->setDefaultSort('name') + ->setDefaultDir('ASC') + ->setUseAjax(true) + ->setSaveParametersInSession(true); } protected function _prepareCollection() @@ -92,24 +98,7 @@ protected function _prepareColumns() 'index' => 'popularity', 'type' => 'number', )); - - /* - $this->addColumn('status', array( - 'header' => Mage::helper('tag')->__('Status'), - 'width' => '90px', - 'index' => 'status', - 'type' => 'options', - 'filter' => false, - 'sortable' => false, - 'options' => array( - Mage_Tag_Model_Tag::STATUS_DISABLED => Mage::helper('tag')->__('Disabled'), - Mage_Tag_Model_Tag::STATUS_PENDING => Mage::helper('tag')->__('Pending'), - Mage_Tag_Model_Tag::STATUS_APPROVED => Mage::helper('tag')->__('Approved'), - ), - )); - */ - - // Collection for stores filters + // Collection for stores filters if (!$collection = Mage::registry('stores_select_collection')) { $collection = Mage::app()->getStore()->getResourceCollection() ->load(); @@ -126,49 +115,29 @@ protected function _prepareColumns() )); } - $this->addColumn('actions', array( - 'header' => Mage::helper('tag')->__('Actions'), - 'width' => '100px', - 'type' => 'action', - 'sortable' => false, - 'filter' => false, - 'actions' => array( - array( - 'caption' => Mage::helper('tag')->__('Edit Tag'), - 'url' => $this->getUrl('*/*/edit', array('ret' => 'pending', 'tag_id'=>'$tag_id')), - ), - array( - 'caption' => Mage::helper('tag')->__('View Products'), - 'url' => $this->getUrl('*/*/product', array('ret' => 'pending', 'tag_id'=>'$tag_id')), - ), - - array( - 'caption' => Mage::helper('tag')->__('View Customers'), - 'url' => $this->getUrl('*/*/customer', array('ret' => 'pending', 'tag_id'=>'$tag_id')), - ) - ), - )); - return parent::_prepareColumns(); } + /** + * Retrives row click URL + * + * @param mixed $row + * @return string + */ public function getRowUrl($row) { - return $this->getUrl('*/*/edit', array( - 'tag_id' => $row->getId(), - 'ret' => 'pending', - )); + return $this->getUrl('*/*/edit', array('tag_id' => $row->getId(), 'ret' => 'pending')); } protected function _addColumnFilterToCollection($column) { - if($column->getIndex()=='stores') { - $this->getCollection()->addStoreFilter($column->getFilter()->getCondition(), false); - } else { - parent::_addColumnFilterToCollection($column); - } + if($column->getIndex() == 'stores') { + $this->getCollection()->addStoreFilter($column->getFilter()->getCondition(), false); + } else { + parent::_addColumnFilterToCollection($column); + } - return $this; + return $this; } protected function _prepareMassaction() @@ -203,4 +172,13 @@ protected function _prepareMassaction() return $this; } + /* + * Retrieves Grid Url + * + * @return string + */ + public function getGridUrl() + { + return $this->getUrl('*/tag/ajaxPendingGrid', array('_current' => true)); + } } diff --git a/app/code/core/Mage/Adminhtml/Block/Tag/Pending.php b/app/code/core/Mage/Adminhtml/Block/Tag/Pending.php index 254a67be66..95c75d13e5 100644 --- a/app/code/core/Mage/Adminhtml/Block/Tag/Pending.php +++ b/app/code/core/Mage/Adminhtml/Block/Tag/Pending.php @@ -29,11 +29,15 @@ * * @category Mage * @package Mage_Adminhtml - * @author Magento Core Team + * @author Magento Core Team */ class Mage_Adminhtml_Block_Tag_Pending extends Mage_Adminhtml_Block_Template { - + /** + * Constructor + * + * @return void + */ public function __construct() { parent::__construct(); @@ -42,23 +46,13 @@ public function __construct() protected function _prepareLayout() { - /* - $this->setChild('createButton', - $this->getLayout()->createBlock('adminhtml/widget_button') - ->setData(array('label' => Mage::helper('tag')->__('Add New Tag'), - 'class' => 'add' - )) - ); - */ - $this->setChild('tagsGrid', - $this->getLayout()->createBlock('adminhtml/tag_grid_pending') - ); + $this->setChild('tagsGrid', $this->getLayout()->createBlock('adminhtml/tag_grid_pending')); return parent::_prepareLayout(); } public function getCreateButtonHtml() { - return '';#$this->getChildHtml('createButton'); + return ''; } public function getGridHtml() @@ -70,5 +64,4 @@ public function getHeaderHtml() { return Mage::helper('tag')->__('Pending Tags'); } - } diff --git a/app/code/core/Mage/Adminhtml/Block/Tag/Tag/Grid.php b/app/code/core/Mage/Adminhtml/Block/Tag/Tag/Grid.php index 565bf9d1a0..b881b1f2fc 100644 --- a/app/code/core/Mage/Adminhtml/Block/Tag/Tag/Grid.php +++ b/app/code/core/Mage/Adminhtml/Block/Tag/Tag/Grid.php @@ -29,34 +29,39 @@ * * @category Mage * @package Mage_Adminhtml - * @author Magento Core Team + * @author Magento Core Team */ class Mage_Adminhtml_Block_Tag_Tag_Grid extends Mage_Adminhtml_Block_Widget_Grid { - + /** + * Constructor + * + * @return void + */ public function __construct() { parent::__construct(); - $this->setId('tag_tag_grid'); - $this->setDefaultSort('name'); - $this->setDefaultDir('ASC'); - $this->setUseAjax(true); + $this->setId('tag_tag_grid') + ->setDefaultSort('name') + ->setDefaultDir('ASC') + ->setUseAjax(true) + ->setSaveParametersInSession(true); } - /* - * Retrieves Grid Url - * - * @return string - */ - public function getGridUrl() + protected function _addColumnFilterToCollection($column) { - return $this->getUrl('*/tag/ajaxGrid'); + if($column->getIndex()=='stores') { + $this->getCollection()->addStoreFilter($column->getFilter()->getCondition(), false); + } else { + parent::_addColumnFilterToCollection($column); + } + return $this; } protected function _prepareCollection() { $collection = Mage::getResourceModel('tag/tag_collection') - ->addSummary(0) + ->addSummary(Mage::app()->getStore()->getId()) ->addStoresVisibility(); $this->setCollection($collection); return parent::_prepareCollection(); @@ -64,8 +69,6 @@ protected function _prepareCollection() protected function _prepareColumns() { - $baseUrl = $this->getUrl(); - $this->addColumn('name', array( 'header' => Mage::helper('tag')->__('Tag'), 'index' => 'name', @@ -73,7 +76,7 @@ protected function _prepareColumns() $this->addColumn('total_used', array( 'header' => Mage::helper('tag')->__('Uses'), - 'width' => '140px', + 'width' => 140, 'align' => 'right', 'index' => 'uses', 'type' => 'number', @@ -81,7 +84,7 @@ protected function _prepareColumns() $this->addColumn('products', array( 'header' => Mage::helper('tag')->__('Products'), - 'width' => '140px', + 'width' => 140, 'align' => 'right', 'index' => 'products', 'type' => 'number', @@ -89,7 +92,7 @@ protected function _prepareColumns() $this->addColumn('customers', array( 'header' => Mage::helper('tag')->__('Customers'), - 'width' => '140px', + 'width' => 140, 'align' => 'right', 'index' => 'customers', 'type' => 'number', @@ -97,7 +100,7 @@ protected function _prepareColumns() $this->addColumn('popularity', array( 'header' => Mage::helper('tag')->__('Popularity'), - 'width' => '140px', + 'width' => 140, 'align' => 'right', 'index' => 'popularity', 'type' => 'number', @@ -105,7 +108,7 @@ protected function _prepareColumns() $this->addColumn('status', array( 'header' => Mage::helper('tag')->__('Status'), - 'width' => '90px', + 'width' => 90, 'index' => 'status', 'type' => 'options', 'options' => $this->helper('tag/data')->getStatusesArray(), @@ -113,46 +116,27 @@ protected function _prepareColumns() if (!Mage::app()->isSingleStoreMode()) { $this->addColumn('visible_in', array( - 'header' => Mage::helper('tag')->__('Visible In'), - 'type' => 'store', - 'skipAllStoresLabel' => true, - 'index' => 'stores', - 'sortable' => false, - 'store_view'=> true + 'header' => Mage::helper('tag')->__('Visible In'), + 'type' => 'store', + 'skipAllStoresLabel' => true, + 'index' => 'stores', + 'sortable' => false, + 'store_view' => true )); } return parent::_prepareColumns(); } - public function getRowUrl($row) - { - return $this->getUrl('*/*/edit', array( - 'tag_id' => $row->getId(), - 'ret' => 'all', - )); - } - - protected function _addColumnFilterToCollection($column) - { - if($column->getIndex()=='stores') { - $this->getCollection()->addStoreFilter($column->getFilter()->getCondition(), false); - } else { - parent::_addColumnFilterToCollection($column); - } - - return $this; - } - protected function _prepareMassaction() { $this->setMassactionIdField('tag_id'); $this->getMassactionBlock()->setFormFieldName('tag'); $this->getMassactionBlock()->addItem('delete', array( - 'label'=> Mage::helper('tag')->__('Delete'), - 'url' => $this->getUrl('*/*/massDelete'), - 'confirm' => Mage::helper('tag')->__('Are you sure?') + 'label' => Mage::helper('tag')->__('Delete'), + 'url' => $this->getUrl('*/*/massDelete'), + 'confirm' => Mage::helper('tag')->__('Are you sure?') )); $statuses = $this->helper('tag/data')->getStatusesOptionsArray(); @@ -164,11 +148,11 @@ protected function _prepareMassaction() 'url' => $this->getUrl('*/*/massStatus', array('_current'=>true)), 'additional' => array( 'visibility' => array( - 'name' => 'status', - 'type' => 'select', - 'class' => 'required-entry', - 'label' => Mage::helper('tag')->__('Status'), - 'values' => $statuses + 'name' => 'status', + 'type' => 'select', + 'class' => 'required-entry', + 'label' => Mage::helper('tag')->__('Status'), + 'values' => $statuses ) ) )); @@ -176,5 +160,24 @@ protected function _prepareMassaction() return $this; } -} + /* + * Retrieves Grid Url + * + * @return string + */ + public function getGridUrl() + { + return $this->getUrl('*/tag/ajaxGrid', array('_current' => true)); + } + /** + * Retrives row click URL + * + * @param mixed $row + * @return string + */ + public function getRowUrl($row) + { + return $this->getUrl('*/*/edit', array('tag_id' => $row->getId())); + } +} diff --git a/app/code/core/Mage/Adminhtml/Block/Tax/Rate/Form.php b/app/code/core/Mage/Adminhtml/Block/Tax/Rate/Form.php index 74a1915160..c89845db75 100644 --- a/app/code/core/Mage/Adminhtml/Block/Tax/Rate/Form.php +++ b/app/code/core/Mage/Adminhtml/Block/Tax/Rate/Form.php @@ -49,6 +49,7 @@ protected function _prepareForm() $rateObject = new Varien_Object(); $rateModel = Mage::getSingleton('tax/calculation_rate'); $rateObject->setData($rateModel->getData()); + $form = new Varien_Data_Form(); $countries = Mage::getModel('adminhtml/system_config_source_country') @@ -99,7 +100,6 @@ protected function _prepareForm() 'name' => 'tax_country_id', 'label' => Mage::helper('tax')->__('Country'), 'title' => Mage::helper('tax')->__('Please select Country'), - 'class' => 'required-entry', 'required' => true, 'values' => $countries, 'value' => $countryId, @@ -111,8 +111,6 @@ protected function _prepareForm() 'name' => 'tax_region_id', 'label' => Mage::helper('tax')->__('State'), 'title' => Mage::helper('tax')->__('Please select State'), - 'class' => 'required-entry', - 'required' => true, 'values' => $regions, 'value' => $rateObject->getTaxRegionId() ) @@ -135,7 +133,17 @@ protected function _prepareForm() ); } */ + $fieldset->addField('zip_is_range', 'select', array( + 'name' => 'zip_is_range', + 'label' => Mage::helper('tax')->__('Zip/Post Is Range'), + 'options' => array( + '0' => Mage::helper('tax')->__('No'), + '1' => Mage::helper('tax')->__('Yes'), + ) + )); + $postcode = $rateObject->getTaxPostcode(); + if (!$postcode) { $postcode = '*'; } @@ -144,16 +152,33 @@ protected function _prepareForm() array( 'name' => 'tax_postcode', 'label' => Mage::helper('tax')->__('Zip/Post Code'), - 'note' => Mage::helper('tax')->__("'*' - matches any; 'xyz*' - matches any that begins on 'xyz' and not longer than %d; '9001-9099' - matches range.", Mage::helper('tax')->getPostCodeSubStringLength()), + 'note' => Mage::helper('tax')->__("'*' - matches any; 'xyz*' - matches any that begins on 'xyz' and not longer than %d.", Mage::helper('tax')->getPostCodeSubStringLength()), 'value' => $postcode ) ); + $fieldset->addField('zip_from', 'text', + array( + 'name' => 'zip_from', + 'label' => Mage::helper('tax')->__('Range from'), + 'value' => $rateObject->getZipFrom() + ) + ); + + $fieldset->addField('zip_to', 'text', + array( + 'name' => 'zip_to', + 'label' => Mage::helper('tax')->__('Range to'), + 'value' => $rateObject->getZipTo() + ) + ); + if ($rateObject->getRate()) { $value = 1*$rateObject->getRate(); } else { $value = 0; } + $fieldset->addField('rate', 'text', array( 'name' => "rate", @@ -170,13 +195,24 @@ protected function _prepareForm() $form->setId('rate_form'); $form->setMethod('post'); - if (!Mage::app()->isSingleStoreMode()) { $form->addElement(Mage::getBlockSingleton('adminhtml/tax_rate_title_fieldset')->setLegend(Mage::helper('tax')->__('Tax Titles'))); } + $form->setValues($rateObject->getData()); $this->setForm($form); + $this->setChild('form_after', + $this->getLayout()->createBlock('adminhtml/widget_form_element_dependence') + ->addFieldMap("zip_is_range", 'zip_is_range') + ->addFieldMap("tax_postcode", 'tax_postcode') + ->addFieldMap("zip_from", 'zip_from') + ->addFieldMap("zip_to", 'zip_to') + ->addFieldDependence('zip_from', 'zip_is_range', '1') + ->addFieldDependence('zip_to', 'zip_is_range', '1') + ->addFieldDependence('tax_postcode', 'zip_is_range', '0') + ); + return parent::_prepareForm(); } } 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 6c9ba05960..1748e88724 100644 --- a/app/code/core/Mage/Adminhtml/Block/Tax/Rate/Grid.php +++ b/app/code/core/Mage/Adminhtml/Block/Tax/Rate/Grid.php @@ -29,9 +29,10 @@ class Mage_Adminhtml_Block_Tax_Rate_Grid extends Mage_Adminhtml_Block_Widget_Gri public function __construct() { parent::__construct(); - $this->setSaveParametersInSession(true); $this->setDefaultSort('region_name'); $this->setDefaultDir('asc'); + $this->setId('tax_rate_grid'); + $this->setSaveParametersInSession(true); } protected function _prepareCollection() diff --git a/app/code/core/Mage/Adminhtml/Block/Tax/Rate/Toolbar/Add.php b/app/code/core/Mage/Adminhtml/Block/Tax/Rate/Toolbar/Add.php index 9ff2b95b0e..9de4054888 100644 --- a/app/code/core/Mage/Adminhtml/Block/Tax/Rate/Toolbar/Add.php +++ b/app/code/core/Mage/Adminhtml/Block/Tax/Rate/Toolbar/Add.php @@ -39,4 +39,17 @@ public function __construct() parent::__construct(); $this->setTemplate('tax/toolbar/rate/add.phtml'); } + + protected function _prepareLayout() + { + $this->setChild('addButton', + $this->getLayout()->createBlock('adminhtml/widget_button') + ->setData(array( + 'label' => Mage::helper('tax')->__('Add New Tax Rate'), + 'onclick' => 'window.location.href=\''.$this->getUrl('*/tax_rate/add').'\'', + 'class' => 'add' + )) + ); + return parent::_prepareLayout(); + } } diff --git a/app/code/core/Mage/Adminhtml/Block/Widget/Form.php b/app/code/core/Mage/Adminhtml/Block/Widget/Form.php index 4b1e0ed3ce..fd086925bd 100644 --- a/app/code/core/Mage/Adminhtml/Block/Widget/Form.php +++ b/app/code/core/Mage/Adminhtml/Block/Widget/Form.php @@ -52,10 +52,13 @@ protected function _construct() $this->setDestElementId('edit_form'); $this->setShowGlobalIcon(false); } - + /** - * Prepare block children and data + * Preparing global layout + * + * You can redefine this method in child classes for changin layout * + * @return Mage_Core_Block_Abstract */ protected function _prepareLayout() { @@ -68,6 +71,8 @@ protected function _prepareLayout() Varien_Data_Form::setFieldsetElementRenderer( $this->getLayout()->createBlock('adminhtml/widget_form_renderer_fieldset_element') ); + + return parent::_prepareLayout(); } /** diff --git a/app/code/core/Mage/Adminhtml/Block/Widget/Form/Element/Dependence.php b/app/code/core/Mage/Adminhtml/Block/Widget/Form/Element/Dependence.php new file mode 100644 index 0000000000..ad204beaae --- /dev/null +++ b/app/code/core/Mage/Adminhtml/Block/Widget/Form/Element/Dependence.php @@ -0,0 +1,112 @@ + id mapper + * @var array + */ + protected $_fields = array(); + + /** + * Dependencies mapper (by names) + * array( + * 'dependent_name' => array( + * 'depends_from_1_name' => 'mixed value', + * 'depends_from_2_name' => 'some another value', + * ... + * ) + * ) + * @var array + */ + protected $_depends = array(); + + /** + * Add name => id mapping + * + * @param string $fieldId - element ID in DOM + * @param string $fieldName - element name in their fieldset/form namespace + * @return Mage_Adminhtml_Block_Widget_Form_Element_Dependence + */ + public function addFieldMap($fieldId, $fieldName) + { + $this->_fields[$fieldName] = $fieldId; + return $this; + } + + /** + * Register field name dependence one from each other by specified values + * + * @TODO: multiple values per dependency is not implemented. The values OR comparison is anticipated + * + * @param string $fieldName + * @param string $fieldNameFrom + * @param string|array $refValues + * @return Mage_Adminhtml_Block_Widget_Form_Element_Dependence + */ + public function addFieldDependence($fieldName, $fieldNameFrom, $refValues) + { + if (is_array($refValues)) { + Mage::throwException('Dependency from multiple values is not implemented yet. Please fix to your widget.xml'); + } + $this->_depends[$fieldName][$fieldNameFrom] = $refValues; + return $this; + } + + /** + * HTML output getter + * @return string + */ + protected function _toHtml() + { + if (!$this->_depends) { + return ''; + } + return ''; + } + + /** + * Field dependences JSON map generator + * @return string + */ + protected function _getDependsJson() + { + $result = array(); + foreach ($this->_depends as $to => $row) { + foreach ($row as $from => $value) { + $result[$this->_fields[$to]][$this->_fields[$from]] = $value; + } + } + return Mage::helper('core')->jsonEncode($result); + } +} diff --git a/app/code/core/Mage/Adminhtml/Block/Widget/Grid.php b/app/code/core/Mage/Adminhtml/Block/Widget/Grid.php index e0fd5ca03f..308dad5078 100644 --- a/app/code/core/Mage/Adminhtml/Block/Widget/Grid.php +++ b/app/code/core/Mage/Adminhtml/Block/Widget/Grid.php @@ -434,13 +434,13 @@ protected function _prepareCollection() } if (is_string($filter)) { - $data = array(); - $filter = base64_decode($filter); - parse_str(urldecode($filter), $data); + $data = $this->helper('adminhtml')->prepareFilterString($filter); $this->_setFilterValues($data); - } else if ($filter && is_array($filter)) { + } + else if ($filter && is_array($filter)) { $this->_setFilterValues($filter); - } else if(0 !== sizeof($this->_defaultFilter)) { + } + else if(0 !== sizeof($this->_defaultFilter)) { $this->_setFilterValues($this->_defaultFilter); } @@ -452,7 +452,7 @@ protected function _prepareCollection() $this->getCollection()->setOrder($column , $dir); } - if ( !$this->_isExport ) { + if (!$this->_isExport) { $this->getCollection()->load(); $this->_afterLoadCollection(); } @@ -461,6 +461,16 @@ protected function _prepareCollection() return $this; } + /** + * Decode URL encoded filter value recursive callback method + * + * @var string $value + */ + protected function _decodeFilter(&$value) + { + $value = $this->helper('adminhtml')->decodeFilter($value); + } + protected function _preparePage() { $this->getCollection()->setPageSize($this->getParam($this->getVarNameLimit(), $this->_defaultLimit)); @@ -777,50 +787,156 @@ public function getHtml() } /** - * Retrieve grid as CSV + * Retrieve file content from file container array * - * @return unknown + * @param array $fileData + * @return string */ - public function getCsv() + protected function _getFileContainerContent(array $fileData) { - $csv = ''; - $this->_isExport = true; - $this->_prepareGrid(); - $this->getCollection()->getSelect()->limit(); - $this->getCollection()->setPageSize(0); - $this->getCollection()->load(); - $this->_afterLoadCollection(); + $io = new Varien_Io_File(); + $path = $io->dirname($fileData['value']); + $io->open(array('path' => $path)); + return $io->read($fileData['value']); + } - $data = array(); + /** + * Retrieve Headers row array for Export + * + * @return array + */ + protected function _getExportHeaders() + { + $row = array(); foreach ($this->_columns as $column) { + Mage::log($column->getExportHeader()); if (!$column->getIsSystem()) { - $data[] = '"'.$column->getExportHeader().'"'; + $row[] = $column->getExportHeader(); } } - $csv.= implode(',', $data)."\n"; + Mage::log($row); + return $row; + } - foreach ($this->getCollection() as $item) { - $data = array(); - foreach ($this->_columns as $column) { - if (!$column->getIsSystem()) { - $data[] = '"'.str_replace(array('"', '\\'), array('""', '\\\\'), $column->getRowFieldExport($item)).'"'; - } + /** + * Retrieve Totals row array for Export + * + * @return array + */ + protected function _getExportTotals() + { + $totals = $this->getTotals(); + $row = array(); + foreach ($this->_columns as $column) { + if (!$column->getIsSystem()) { + $row[] = $column->getRowFieldExport($totals); } - $csv.= implode(',', $data)."\n"; } + return $row; + } - if ($this->getCountTotals()) - { - $data = array(); - foreach ($this->_columns as $column) { - if (!$column->getIsSystem()) { - $data[] = '"'.str_replace(array('"', '\\'), array('""', '\\\\'), $column->getRowFieldExport($this->getTotals())).'"'; - } + /** + * Iterate collection and call callback method per item + * For callback method first argument always is item object + * + * @param string $callback + * @param array $args additional arguments for callback method + * @return Mage_Adminhtml_Block_Widget_Grid + */ + public function _exportIterateCollection($callback, array $args) + { + $originalCollection = $this->getCollection(); + $count = null; + $page = 1; + $lPage = null; + $break = false; + + while ($break !== true) { + $collection = clone $originalCollection; + $collection->setPageSize(1000); + $collection->setCurPage($page); + $collection->load(); + if (is_null($count)) { + $count = $collection->getSize(); + $lPage = $collection->getLastPageNumber(); + } + if ($lPage == $page) { + $break = true; + } + $page ++; + + foreach ($collection as $item) { + call_user_func_array(array($this, $callback), array_merge(array($item), $args)); + } + } + } + + /** + * Write item data to csv export file + * + * @param Varien_Object $item + * @param Varien_Io_File $adapter + */ + protected function _exportCsvItem(Varien_Object $item, Varien_Io_File $adapter) + { + $row = array(); + foreach ($this->_columns as $column) { + if (!$column->getIsSystem()) { + $row[] = $column->getRowFieldExport($item); } - $csv.= implode(',', $data)."\n"; } + $adapter->streamWriteCsv($row); + } + + /** + * Retrieve a file container array by grid data as CSV + * + * Return array with keys type and value + * + * @return array + */ + public function getCsvFile() + { + $this->_isExport = true; + $this->_prepareGrid(); + + $io = new Varien_Io_File(); + + $path = Mage::getBaseDir('var') . DS . 'export' . DS; + $name = md5(microtime()); + $file = $path . DS . $name . '.csv'; + + $io->setAllowCreateFolders(true); + $io->open(array('path' => $path)); + $io->streamOpen($file, 'w+'); + $io->streamLock(true); + $io->streamWriteCsv($this->_getExportHeaders()); + + $this->_exportIterateCollection('_exportCsvItem', array($io)); + + if ($this->getCountTotals()) { + $io->streamWriteCsv($this->_getExportTotals()); + } + + $io->streamUnlock(); + $io->streamClose(); - return $csv; + return array( + 'type' => 'filename', + 'value' => $file, + 'rm' => true // can delete file after use + ); + } + + /** + * Retrieve Grid data as CSV + * + * @return string + */ + public function getCsv() + { + $fileData = $this->getCsvFile(); + return $this->_getFileContainerContent($fileData); } public function getXml() @@ -850,50 +966,82 @@ public function getXml() return $xml; } - public function getExcel($filename = '') + /** + * Write item data to Excel 2003 XML export file + * + * @param Varien_Object $item + * @param Varien_Io_File $adapter + * @param Varien_Convert_Parser_Xml_Excel $parser + */ + protected function _exportExcelItem(Varien_Object $item, Varien_Io_File $adapter, $parser = null) { - $this->_isExport = true; - $this->_prepareGrid(); - $this->getCollection()->getSelect()->limit(); - $this->getCollection()->setPageSize(0); - $this->getCollection()->load(); - $this->_afterLoadCollection(); - $headers = array(); - $data = array(); + if (is_null($parser)) { + $parser = new Varien_Convert_Parser_Xml_Excel(); + } + + $row = array(); foreach ($this->_columns as $column) { if (!$column->getIsSystem()) { - $headers[] = $column->getHeader(); + $row[] = $column->getRowFieldExport($item); } } - $data[] = $headers; + $data = $parser->getRowXml($row); + $adapter->streamWrite($data); + } - foreach ($this->getCollection() as $item) { - $row = array(); - foreach ($this->_columns as $column) { - if (!$column->getIsSystem()) { - $row[] = $column->getRowField($item); - } - } - $data[] = $row; - } + /** + * Retrieve a file container array by grid data as MS Excel 2003 XML Document + * + * Return array with keys type and value + * + * @return string + */ + public function getExcelFile($sheetName = '') + { + $this->_isExport = true; + $this->_prepareGrid(); - if ($this->getCountTotals()) - { - $row = array(); - foreach ($this->_columns as $column) { - if (!$column->getIsSystem()) { - $row[] = $column->getRowField($this->getTotals()); - } - } - $data[] = $row; + $parser = new Varien_Convert_Parser_Xml_Excel(); + $io = new Varien_Io_File(); + + $path = Mage::getBaseDir('var') . DS . 'export' . DS; + $name = md5(microtime()); + $file = $path . DS . $name . '.xml'; + + $io->setAllowCreateFolders(true); + $io->open(array('path' => $path)); + $io->streamOpen($file, 'w+'); + $io->streamLock(true); + $io->streamWrite($parser->getHeaderXml($sheetName)); + $io->streamWrite($parser->getRowXml($this->_getExportHeaders())); + + $this->_exportIterateCollection('_exportExcelItem', array($io, $parser)); + + if ($this->getCountTotals()) { + $io->streamWrite($parser->getRowXml($this->_getExportTotals())); } - $xmlObj = new Varien_Convert_Parser_Xml_Excel(); - $xmlObj->setVar('single_sheet', $filename); - $xmlObj->setData($data); - $xmlObj->unparse(); + $io->streamWrite($parser->getFooterXml()); + $io->streamUnlock(); + $io->streamClose(); - return $xmlObj->getData(); + return array( + 'type' => 'filename', + 'value' => $file, + 'rm' => true // can delete file after use + ); + } + + /** + * Retrieve grid data as MS Excel 2003 XML Document + * + * @param string $filename the Workbook sheet name + * @return string + */ + public function getExcel($filename = '') + { + $fileData = $this->getExcelFile($filename); + return $this->_getFileContainerContent($fileData); } public function canDisplayContainer() 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 cfde8c377f..7345984f8e 100644 --- a/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column.php +++ b/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column.php @@ -96,7 +96,7 @@ public function getHeaderCssClass() { $class = $this->getData('header_css_class'); if (($this->getSortable()===false) || ($this->getGrid()->getSortable()===false)) { - $class .= 'no-link'; + $class .= ' no-link'; } if ($this->isLast()) { $class .= ' last'; 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 dd716a5724..da8be1b477 100644 --- a/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Abstract.php +++ b/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Abstract.php @@ -58,7 +58,7 @@ public function render(Varien_Object $row) { if ($this->getColumn()->getEditable()) { $value = $this->_getValue($row); - return $value . ($this->getColumn()->getEditOnly() ? '' : ($value != '' ? $value : ' ') . '') + return $value . ($this->getColumn()->getEditOnly() ? '' : ($value != '' ? '' : ' ') . '') . $this->_getInputValueElement($row); } return $this->_getValue($row); diff --git a/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Store.php b/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Store.php index 85ed87a356..9159efe01f 100644 --- a/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Store.php +++ b/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Store.php @@ -46,9 +46,16 @@ protected function _getStoreModel() return Mage::getSingleton('adminhtml/system_store'); } + /** + * Retrieve 'show all stores label' flag + * + * @return bool + */ protected function _getShowAllStoresLabelFlag() { - return $this->getColumn()->getData('skipAllStoresLabel')?$this->getColumn()->getData('skipAllStoresLabel'):$this->_skipAllStoresLabel; + return $this->getColumn()->getData('skipAllStoresLabel') + ? $this->getColumn()->getData('skipAllStoresLabel') + : $this->_skipAllStoresLabel; } /** @@ -59,44 +66,83 @@ protected function _getShowAllStoresLabelFlag() */ public function render(Varien_Object $row) { + $out = ''; $skipAllStoresLabel = $this->_getShowAllStoresLabelFlag(); $origStores = $row->getData($this->getColumn()->getIndex()); - $showNumericStores = (bool)$this->getColumn()->getShowNumericStores(); - $stores = array(); + + if (is_null($origStores) && $row->getStoreName()) { + $scopes = array(); + foreach (explode("\n", $row->getStoreName()) as $k => $label) { + $scopes[] = str_repeat(' ', $k * 3) . $label; + } + $out .= implode('
', $scopes) . $this->__(' [deleted]'); + return $out; + } + if (!is_array($origStores)) { $origStores = array($origStores); } - foreach ($origStores as $origStore) { - if (is_numeric($origStore)) { - if (0 == $origStore) { - if (!$skipAllStoresLabel) { - $stores[] = Mage::helper('adminhtml')->__('All Store Views'); - } - } - elseif ($storeName = $this->_getStoreModel()->getStoreName($origStore)) { - if ($this->getColumn()->getStoreView()) { - $store = $this->_getStoreModel()->getStoreNameWithWebsite($origStore); - } else { - $store = $this->_getStoreModel()->getStoreNamePath($origStore); - } - $layers = array(); - foreach (explode('/', $store) as $key => $value) { - $layers[] = str_repeat(" ", $key * 3) . $value; - } - $stores[] = implode('
', $layers); - } - elseif ($showNumericStores) { - $stores[] = $origStore; + + if (in_array(0, $origStores) && !$skipAllStoresLabel) { + return Mage::helper('adminhtml')->__('All Store Views'); + } + + $data = $this->_getStoreModel()->getStoresStructure(false, $origStores); + + foreach ($data as $website) { + $out .= $website['label'] . '
'; + foreach ($website['children'] as $group) { + $out .= str_repeat(' ', 3) . $group['label'] . '
'; + foreach ($group['children'] as $store) { + $out .= str_repeat(' ', 6) . $store['label'] . '
'; } } - elseif (is_null($origStore) && $row->getStoreName()) { - $stores[] = $row->getStoreName() . ' ' . $this->__('[deleted]'); + } + + return $out; + } + + /** + * Render row store views for export + * + * @param Varien_Object $row + * @return string + */ + public function renderExport(Varien_Object $row) + { + $out = ''; + $skipAllStoresLabel = $this->_getShowAllStoresLabelFlag(); + $origStores = $row->getData($this->getColumn()->getIndex()); + + if (is_null($origStores) && $row->getStoreName()) { + $scopes = array(); + foreach (explode("\n", $row->getStoreName()) as $k => $label) { + $scopes[] = str_repeat(' ', $k * 3) . $label; } - else { - $stores[] = $origStore; + $out .= implode("\r\n", $scopes) . $this->__(' [deleted]'); + return $out; + } + + if (!is_array($origStores)) { + $origStores = array($origStores); + } + + if (in_array(0, $origStores) && !$skipAllStoresLabel) { + return Mage::helper('adminhtml')->__('All Store Views'); + } + + $data = $this->_getStoreModel()->getStoresStructure(false, $origStores); + + foreach ($data as $website) { + $out .= $website['label'] . "\r\n"; + foreach ($website['children'] as $group) { + $out .= str_repeat(' ', 3) . $group['label'] . "\r\n"; + foreach ($group['children'] as $store) { + $out .= str_repeat(' ', 6) . $store['label'] . "\r\n"; + } } } - return $stores ? join('
', $stores) : ' '; - } + return $out; + } } diff --git a/app/code/core/Mage/Adminhtml/Controller/Action.php b/app/code/core/Mage/Adminhtml/Controller/Action.php index 420c8e0664..c64dacad77 100644 --- a/app/code/core/Mage/Adminhtml/Controller/Action.php +++ b/app/code/core/Mage/Adminhtml/Controller/Action.php @@ -134,9 +134,17 @@ protected function _addJs(Mage_Core_Block_Abstract $block) */ public function preDispatch() { - Mage::getDesign()->setArea($this->_currentArea) + // override admin store design settings via stores section + Mage::getDesign() + ->setArea($this->_currentArea) ->setPackageName((string)Mage::getConfig()->getNode('stores/admin/design/package/name')) - ->setTheme((string)Mage::getConfig()->getNode('stores/admin/design/theme/default')); + ->setTheme((string)Mage::getConfig()->getNode('stores/admin/design/theme/default')) + ; + foreach (array('layout', 'template', 'skin', 'locale') as $type) { + if ($value = (string)Mage::getConfig()->getNode("stores/admin/design/theme/{$type}")) { + Mage::getDesign()->setTheme($type, $value); + } + } $this->getLayout()->setArea($this->_currentArea); @@ -320,9 +328,10 @@ protected function _redirectReferer($defaultUrl=null) * Declare headers and content file in responce for file download * * @param string $fileName - * @param string $content set to null to avoid starting output, $contentLength should be set explicitly in that case + * @param string|array $content set to null to avoid starting output, $contentLength should be set explicitly in + * that case * @param string $contentType - * @param int $contentLength explicit content length, if strlen($content) isn't applicable + * @param int $contentLength explicit content length, if strlen($content) isn't applicable * @return Mage_Adminhtml_Controller_Action */ protected function _prepareDownloadResponse($fileName, $content, $contentType = 'application/octet-stream', $contentLength = null) @@ -332,16 +341,47 @@ protected function _prepareDownloadResponse($fileName, $content, $contentType = $this->_redirect($session->getUser()->getStartupPageUrl()); return $this; } + + $isFile = false; + $file = null; + if (is_array($content)) { + if (!isset($content['type']) || !isset($content['value'])) { + return $this; + } + if ($content['type'] == 'filename') { + $isFile = true; + $file = $content['value']; + $contentLength = filesize($file); + } + } + $this->getResponse() ->setHttpResponseCode(200) ->setHeader('Pragma', 'public', true) ->setHeader('Cache-Control', 'must-revalidate, post-check=0, pre-check=0', true) ->setHeader('Content-type', $contentType, true) ->setHeader('Content-Length', is_null($contentLength) ? strlen($content) : $contentLength) - ->setHeader('Content-Disposition', 'attachment; filename=' . $fileName) + ->setHeader('Content-Disposition', 'attachment; filename="'.$fileName.'"') ->setHeader('Last-Modified', date('r')); + if (!is_null($content)) { - $this->getResponse()->setBody($content); + if ($isFile) { + $this->getResponse()->clearBody(); + $this->getResponse()->sendHeaders(); + + $ioAdapter = new Varien_Io_File(); + $ioAdapter->open(array('path' => $ioAdapter->dirname($file))); + $ioAdapter->streamOpen($file, 'r'); + while ($buffer = $ioAdapter->streamRead()) { + print $buffer; + } + $ioAdapter->streamClose(); + if (!empty($content['rm'])) { + $ioAdapter->rm($file); + } + } else { + $this->getResponse()->setBody($content); + } } return $this; } diff --git a/app/code/core/Mage/Adminhtml/Helper/Dashboard/Data.php b/app/code/core/Mage/Adminhtml/Helper/Dashboard/Data.php index a8869c6683..6720937087 100644 --- a/app/code/core/Mage/Adminhtml/Helper/Dashboard/Data.php +++ b/app/code/core/Mage/Adminhtml/Helper/Dashboard/Data.php @@ -37,6 +37,11 @@ class Mage_Adminhtml_Helper_Dashboard_Data extends Mage_Core_Helper_Data protected $_locale = null; protected $_stores = null; + /** + * Retrieve stores configured in system. + * + * @return array + */ public function getStores() { if(!$this->_stores) { @@ -46,11 +51,21 @@ public function getStores() return $this->_stores; } + /** + * Retrieve number of loaded stores + * + * @return int + */ public function countStores() { return sizeof($this->_stores->getItems()); } + /** + * Prepare array with periods for dashboard graphs + * + * @return array + */ public function getDatePeriods() { return array( @@ -61,4 +76,17 @@ public function getDatePeriods() '2y'=>$this->__('2YTD') ); } + + /** + * Create data hash to ensure that we got valid + * data and it is not changed by some one else. + * + * @param string $data + * @return string + */ + public function getChartDataHash($data) + { + $secret = (string)Mage::getConfig()->getNode(Mage_Core_Model_App::XML_PATH_INSTALL_DATE); + return md5($data . $secret); + } } diff --git a/app/code/core/Mage/Adminhtml/Helper/Data.php b/app/code/core/Mage/Adminhtml/Helper/Data.php index 9dec87048f..771d52c2a4 100644 --- a/app/code/core/Mage/Adminhtml/Helper/Data.php +++ b/app/code/core/Mage/Adminhtml/Helper/Data.php @@ -93,4 +93,29 @@ public function getCurrentUserId() } return false; } + + /** + * Decode filter string + * + * @param string $filterString + * @return data + */ + public function prepareFilterString($filterString) + { + $data = array(); + $filterString = base64_decode($filterString); + parse_str($filterString, $data); + array_walk_recursive($data, array($this, 'decodeFilter')); + return $data; + } + + /** + * Decode URL encoded filter value recursive callback method + * + * @param string $value + */ + public function decodeFilter(&$value) + { + $value = rawurldecode($value); + } } diff --git a/app/code/core/Mage/Adminhtml/Helper/Media/Js.php b/app/code/core/Mage/Adminhtml/Helper/Media/Js.php index e79cbb01c7..728eeb02cd 100644 --- a/app/code/core/Mage/Adminhtml/Helper/Media/Js.php +++ b/app/code/core/Mage/Adminhtml/Helper/Media/Js.php @@ -59,7 +59,7 @@ public function __construct() */ public function getTranslatorScript() { - $script = 'if (!window.Translator) {' + $script = 'if (typeof(Translator) == \'undefined\') {' . ' var Translator = new Translate('.$this->getTranslateJson().');' . '} else {' . ' Translator.add('.$this->getTranslateJson().');' diff --git a/app/code/core/Mage/Adminhtml/Model/Config.php b/app/code/core/Mage/Adminhtml/Model/Config.php index 55622e32e4..2e174854ff 100644 --- a/app/code/core/Mage/Adminhtml/Model/Config.php +++ b/app/code/core/Mage/Adminhtml/Model/Config.php @@ -166,7 +166,7 @@ public function hasChildren ($node, $websiteCode=null, $storeCode=null, $isField } /** - * Enter description here... + * Get translate module name * * @param Varien_Simplexml_Element $sectionNode * @param Varien_Simplexml_Element $groupNode @@ -192,4 +192,65 @@ function getAttributeModule($sectionNode = null, $groupNode = null, $fieldNode = return $moduleName; } + /** + * System configuration section, fieldset or field label getter + * + * @param string $sectionName + * @param string $groupName + * @param string $fieldName + * @return string + */ + public function getSystemConfigNodeLabel($sectionName, $groupName = null, $fieldName = null) + { + $sectionName = trim($sectionName, '/'); + $path = '//sections/' . $sectionName; + $groupNode = $fieldNode = null; + $sectionNode = $this->_sections->xpath($path); + if (!empty($groupName)) { + $path .= '/groups/' . trim($groupName, '/'); + $groupNode = $this->_sections->xpath($path); + } + if (!empty($fieldName)) { + if (!empty($groupName)) { + $path .= '/fields/' . trim($fieldName, '/'); + $fieldNode = $this->_sections->xpath($path); + } + else { + Mage::throwException(Mage::helper('adminhtml')->__('Group node name should be specified with field node name.')); + } + } + $moduleName = $this->getAttributeModule($sectionNode, $groupNode, $fieldNode); + $systemNode = $this->_sections->xpath($path); + foreach ($systemNode as $node) { + return Mage::helper($moduleName)->__((string)$node->label); + } + return ''; + } + + /** + * Look for encrypted node entries in all system.xml files and return them + * + * @return array $paths + */ + public function getEncryptedNodeEntriesPaths($explodePathToEntities = false) + { + $paths = array(); + $configSections = $this->getSections(); + if ($configSections) { + foreach ($configSections->xpath('//sections/*/groups/*/fields/*/backend_model') as $node) { + if ('adminhtml/system_config_backend_encrypted' === (string)$node) { + $section = $node->getParent()->getParent()->getParent()->getParent()->getParent()->getName(); + $group = $node->getParent()->getParent()->getParent()->getName(); + $field = $node->getParent()->getName(); + if ($explodePathToEntities) { + $paths[] = array('section' => $section, 'group' => $group, 'field' => $field); + } + else { + $paths[] = $section . '/' . $group . '/' . $field; + } + } + } + } + return $paths; + } } diff --git a/app/code/core/Mage/Adminhtml/Model/Email/Template.php b/app/code/core/Mage/Adminhtml/Model/Email/Template.php new file mode 100644 index 0000000000..c5f346bfc6 --- /dev/null +++ b/app/code/core/Mage/Adminhtml/Model/Email/Template.php @@ -0,0 +1,116 @@ + + */ + +class Mage_Adminhtml_Model_Email_Template extends Mage_Core_Model_Email_Template +{ + /** + * Xml path to email template nodes + * + */ + const XML_PATH_TEMPLATE_EMAIL = '//sections/*/groups/*/fields/*[source_model="adminhtml/system_config_source_email_template"]'; + + /** + * Collect all system config pathes where current template is used as default + * + * @return array + */ + public function getSystemConfigPathsWhereUsedAsDefault() + { + $templateCode = $this->getOrigTemplateCode(); + if (!$templateCode) { + return array(); + } + $paths = array(); + + $configSections = Mage::getSingleton('adminhtml/config')->getSections(); + + // find nodes which are using $templateCode value + $defaultCfgNodes = Mage::getConfig()->getXpath('default/*/*[*="' . $templateCode . '"]'); + if (!is_array($defaultCfgNodes)) { + return array(); + } + + foreach ($defaultCfgNodes as $node) { + // create email template path in system.xml + $sectionName = $node->getParent()->getName(); + $groupName = $node->getName(); + $fieldName = substr($templateCode, strlen($sectionName . '_' . $groupName . '_')); + $paths[] = array('path' => implode('/', array($sectionName, $groupName, $fieldName))); + } + return $paths; + } + + /** + * Collect all system config pathes where current template is currently used + * + * @return array + */ + public function getSystemConfigPathsWhereUsedCurrently() + { + $templateId = $this->getId(); + if (!$templateId) { + return array(); + } + $paths = array(); + + $configSections = Mage::getSingleton('adminhtml/config')->getSections(); + + // look for node entries in all system.xml that use source_model=adminhtml/system_config_source_email_template + // they are will be templates, what we try find + $sysCfgNodes = $configSections->xpath(self::XML_PATH_TEMPLATE_EMAIL); + if (!is_array($sysCfgNodes)) { + return array(); + } + + foreach ($sysCfgNodes as $fieldNode) { + + $groupNode = $fieldNode->getParent()->getParent(); + $sectionNode = $groupNode->getParent()->getParent(); + + // create email template path in system.xml + $sectionName = $sectionNode->getName(); + $groupName = $groupNode->getName(); + $fieldName = $fieldNode->getName(); + + $paths[] = implode('/', array($sectionName, $groupName, $fieldName)); + } + + $configData = $this->_getResource()->getSystemConfigByPathsAndTemplateId($paths, $templateId); + if (!$configData) { + return array(); + } + + return $configData; + } +} 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 4f77ab4b51..da24e5a265 100644 --- a/app/code/core/Mage/Adminhtml/Model/Sales/Order/Create.php +++ b/app/code/core/Mage/Adminhtml/Model/Sales/Order/Create.php @@ -672,6 +672,7 @@ public function updateQuoteItems($data) if ($item) { $item->setQty($itemQty); $item->setCustomPrice($itemPrice); + $item->setOriginalCustomPrice($itemPrice); $item->setNoDiscount($noDiscount); $item->getProduct()->setIsSuperMode(true); @@ -1030,11 +1031,9 @@ public function createOrder() if (!$this->getQuote()->getCustomerIsGuest()) { $this->_putCustomerIntoQuote(); } - + /*^ @var Mage_Sales_Model_Convert_Quote */ $quoteConvert = Mage::getModel('sales/convert_quote'); - /* @var $quoteConvert Mage_Sales_Model_Convert_Quote */ - $quote = $this->getQuote(); if (!$this->getSession()->getOrder()->getId()) { $quote->reserveOrderId(); @@ -1197,40 +1196,25 @@ protected function _validate() protected function _putCustomerIntoQuote() { if (!$this->getSession()->getCustomer()->getId()) { + /** @var Mage_Customer_Model_Customer*/ $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()); - } - elseif (($customer = $this->getSession()->getCustomer()) && $customer->getId() - && !$this->getSession()->getCustomer(true,true)->getId()) - { + $customer->addData($this->getBillingAddress()->exportCustomerAddress()->getData()) + ->addData($this->getData('account')) + ->setPassword($customer->generatePassword()) + ->setWebsiteId($this->getSession()->getStore()->getWebsiteId()) + ->setStoreId($this->getSession()->getStore()->getId()) + ->setEmail($this->_getNewCustomerEmail($customer)); + } elseif (($customer = $this->getSession()->getCustomer()) + && $customer->getId() + && !$this->getSession()->getCustomer(true,true)->getId()) { $customer = clone $customer; $customer->setStore($this->getSession()->getStore()) ->save(); $this->getSession()->setCustomer($customer); $customer->addData($this->getData('account')); - } - else { $customer = $this->getSession()->getCustomer(); + } else { + $customer = $this->getSession()->getCustomer(); $customer->addData($this->getData('account')); } $this->getQuote()->setCustomer($customer); @@ -1245,14 +1229,29 @@ protected function _putCustomerIntoQuote() protected function _saveCustomerAfterOrder($order) { if ($this->_customer) { - if (!$this->_customer->getId()) { + if (! $this->_customer->getId()) { + $billing = $this->getBillingAddress(); + $customerBilling = $billing->exportCustomerAddress(); + $shipping = $this->getShippingAddress(); + $customerShipping = $shipping->exportCustomerAddress(); + + $this->_customer->addAddress($customerBilling); + + if (! $shipping->getSameAsBilling()) { + $this->_customer->addAddress($customerShipping); + } + // preliminary save to find addresses id $this->_customer->save(); + // setting default addresses id + $this->_customer->setDefaultBilling($customerBilling->getId()) + ->setDefaultShipping($shipping->getSameAsBilling() ? $customerBilling->getId() : $customerShipping->getId()) + ->save(); + $order->setCustomerId($this->_customer->getId()); - $this->getBillingAddress()->setCustomerId($this->_customer->getId()); - $this->getShippingAddress()->setCustomerId($this->_customer->getId()); + $billing->setCustomerId($this->_customer->getId()); + $shipping->setCustomerId($this->_customer->getId()); $this->_customer->sendNewAccountEmail(); - } - else { + } else { $saveCusstomerAddress = false; if ($this->getBillingAddress()->getSaveInAddressBook()) { diff --git a/app/code/core/Mage/Adminhtml/Model/Search/Catalog.php b/app/code/core/Mage/Adminhtml/Model/Search/Catalog.php index 53f2de8e25..9cdeed8ce4 100644 --- a/app/code/core/Mage/Adminhtml/Model/Search/Catalog.php +++ b/app/code/core/Mage/Adminhtml/Model/Search/Catalog.php @@ -36,7 +36,7 @@ public function load() return $this; } - $collection = Mage::helper('catalogsearch')->getQuery()->getResultCollection() + $collection = Mage::helper('catalogsearch')->getQuery()->getSearchCollection() ->addAttributeToSelect('name') ->addAttributeToSelect('description') ->addSearchFilter($this->getQuery()) diff --git a/app/code/core/Mage/Adminhtml/Model/Sitemap/Sitemap.php b/app/code/core/Mage/Adminhtml/Model/Sitemap/Sitemap.php deleted file mode 100644 index 8b13789179..0000000000 --- a/app/code/core/Mage/Adminhtml/Model/Sitemap/Sitemap.php +++ /dev/null @@ -1 +0,0 @@ - diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Cms/Wysiwyg/Enabled.php b/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Cms/Wysiwyg/Enabled.php index b38535afab..43e8463f7c 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Cms/Wysiwyg/Enabled.php +++ b/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Cms/Wysiwyg/Enabled.php @@ -38,7 +38,7 @@ public function toOptionArray() return array( array( 'value' => Mage_Cms_Model_Wysiwyg_Config::WYSIWYG_ENABLED, - 'label' => Mage::helper('cms')->__('Enable by Default') + 'label' => Mage::helper('cms')->__('Enabled by Default') ), array( 'value' => Mage_Cms_Model_Wysiwyg_Config::WYSIWYG_HIDDEN, @@ -46,7 +46,7 @@ public function toOptionArray() ), array( 'value' => Mage_Cms_Model_Wysiwyg_Config::WYSIWYG_DISABLED, - 'label' => Mage::helper('cms')->__('Disable Completely') + 'label' => Mage::helper('cms')->__('Disabled Completely') ) ); } diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Email/Template.php b/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Email/Template.php index 3761329bec..b896eded9d 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Email/Template.php +++ b/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Email/Template.php @@ -34,7 +34,17 @@ */ class Mage_Adminhtml_Model_System_Config_Source_Email_Template extends Varien_Object { + /** + * Config xpath to email template node + * + */ + const XML_PATH_TEMPLATE_EMAIL = 'global/template/email/'; + /** + * Generate list of email templates + * + * @return array + */ public function toOptionArray() { if(!$collection = Mage::registry('config_system_email_template')) { @@ -44,11 +54,18 @@ public function toOptionArray() Mage::register('config_system_email_template', $collection); } $options = $collection->toOptionArray(); + $templateName = Mage::helper('adminhtml')->__('Default Template from Locale'); + $nodeName = str_replace('/', '_', $this->getPath()); + $templateLabelNode = Mage::app()->getConfig()->getNode(self::XML_PATH_TEMPLATE_EMAIL . $nodeName . '/label'); + if ($templateLabelNode) { + $templateName = Mage::helper('adminhtml')->__((string)$templateLabelNode); + $templateName = Mage::helper('adminhtml')->__('%s (Default Template from Locale)', $templateName); + } array_unshift( $options, array( - 'value'=> str_replace('/', '_', $this->getPath()), - 'label' => Mage::helper('adminhtml')->__('Default Template from Locale') + 'value'=> $nodeName, + 'label' => $templateName ) ); return $options; diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Yesno.php b/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Yesno.php index e3028f3bc6..5852ab7c26 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Yesno.php +++ b/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Yesno.php @@ -23,14 +23,24 @@ * @copyright Copyright (c) 2009 Irubin Consulting Inc. DBA Varien (http://www.varien.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ + +/** + * Used in creating options for Yes|No config value selection + * + */ class Mage_Adminhtml_Model_System_Config_Source_Yesno { + /** + * Options getter + * + * @return array + */ public function toOptionArray() { return array( - array('value'=>1, 'label'=>Mage::helper('adminhtml')->__('Yes')), - array('value'=>0, 'label'=>Mage::helper('adminhtml')->__('No')), + array('value' => 1, 'label'=>Mage::helper('adminhtml')->__('Yes')), + array('value' => 0, 'label'=>Mage::helper('adminhtml')->__('No')), ); } diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Yesnocustom.php b/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Yesnocustom.php new file mode 100644 index 0000000000..80fbd8e8ea --- /dev/null +++ b/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Yesnocustom.php @@ -0,0 +1,48 @@ + 1, 'label'=>Mage::helper('adminhtml')->__('Yes')), + array('value' => 0, 'label'=>Mage::helper('adminhtml')->__('No')), + array('value' => 2, 'label'=>Mage::helper('adminhtml')->__('Specified')) + ); + } + +} diff --git a/app/code/core/Mage/Adminhtml/Model/System/Store.php b/app/code/core/Mage/Adminhtml/Model/System/Store.php index 01fca3ad3a..63110167bc 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Store.php +++ b/app/code/core/Mage/Adminhtml/Model/System/Store.php @@ -113,6 +113,13 @@ protected function _loadStoreCollection() return $this; } + /** + * Retrieve store values for form + * + * @param bool $empty + * @param bool $all + * @return array + */ public function getStoreValuesForForm($empty = false, $all = false) { $options = array(); @@ -167,6 +174,71 @@ public function getStoreValuesForForm($empty = false, $all = false) return $options; } + /** + * Retrieve stores structure + * + * @param bool $isAll + * @param array $storeIds + * @param array $groupIds + * @param array $websiteIds + * @return array + */ + public function getStoresStructure($isAll = false, $storeIds = array(), $groupIds = array(), $websiteIds = array()) + { + $out = array(); + $websites = $this->getWebsiteCollection(); + + if ($isAll) { + $out[] = array( + 'value' => 0, + 'label' => Mage::helper('adminhtml')->__('All Store Views') + ); + } + + foreach ($websites as $website) { + + $websiteId = $website->getId(); + if ($websiteIds && !in_array($websiteId, $websiteIds)) { + continue; + } + $out[$websiteId] = array( + 'value' => $websiteId, + 'label' => $website->getName() + ); + + foreach ($website->getGroups() as $group) { + + $groupId = $group->getId(); + if ($groupIds && !in_array($groupId, $groupIds)) { + continue; + } + $out[$websiteId]['children'][$groupId] = array( + 'value' => $groupId, + 'label' => $group->getName() + ); + + foreach ($group->getStores() as $store) { + + $storeId = $store->getId(); + if ($storeIds && !in_array($storeId, $storeIds)) { + continue; + } + $out[$websiteId]['children'][$groupId]['children'][$storeId] = array( + 'value' => $storeId, + 'label' => $store->getName() + ); + } + if (empty($out[$websiteId]['children'][$groupId]['children'])) { + unset($out[$websiteId]['children'][$groupId]); + } + } + if (empty($out[$websiteId]['children'])) { + unset($out[$websiteId]); + } + } + return $out; + } + /** * Website label/value array getter, compatible with form dropdown options * diff --git a/app/code/core/Mage/Adminhtml/controllers/Api/RoleController.php b/app/code/core/Mage/Adminhtml/controllers/Api/RoleController.php index 2016358fd4..39b0869efb 100644 --- a/app/code/core/Mage/Adminhtml/controllers/Api/RoleController.php +++ b/app/code/core/Mage/Adminhtml/controllers/Api/RoleController.php @@ -97,7 +97,7 @@ public function deleteAction() $rid = $this->getRequest()->getParam('rid', false); try { - Mage::getModel("api/roles")->setId($rid)->delete(); + Mage::getModel("api/roles")->load($rid)->delete(); Mage::getSingleton('adminhtml/session')->addSuccess($this->__('Role successfully deleted.')); } catch (Exception $e) { Mage::getSingleton('adminhtml/session')->addError($this->__('Error while deleting this role. Please try again later.')); @@ -108,7 +108,15 @@ public function deleteAction() public function saveRoleAction() { + $rid = $this->getRequest()->getParam('role_id', false); + $role = Mage::getModel('api/roles')->load($rid); + if (!$role->getId() && $rid) { + Mage::getSingleton('adminhtml/session')->addError($this->__('This Role no longer exists')); + $this->_redirect('*/*/'); + return; + } + $resource = explode(',', $this->getRequest()->getParam('resource', false)); $roleUsers = $this->getRequest()->getParam('in_role_user', null); parse_str($roleUsers, $roleUsers); @@ -120,8 +128,7 @@ public function saveRoleAction() } try { - $role = Mage::getModel("api/roles") - ->setId($rid) + $role = $role ->setName($this->getRequest()->getParam('rolename', false)) ->setPid($this->getRequest()->getParam('parent_id', false)) ->setRoleType('G') diff --git a/app/code/core/Mage/Adminhtml/controllers/Api/UserController.php b/app/code/core/Mage/Adminhtml/controllers/Api/UserController.php index d8f35af352..ebfa6a9485 100644 --- a/app/code/core/Mage/Adminhtml/controllers/Api/UserController.php +++ b/app/code/core/Mage/Adminhtml/controllers/Api/UserController.php @@ -82,7 +82,13 @@ public function editAction() public function saveAction() { if ($data = $this->getRequest()->getPost()) { - $model = Mage::getModel('api/user'); + $id = $this->getRequest()->getPost('user_id', false); + $model = Mage::getModel('api/user')->load($id); + if (!$model->getId() && $id) { + Mage::getSingleton('adminhtml/session')->addError($this->__('This User no longer exists')); + $this->_redirect('*/*/'); + return; + } $model->setData($data); try { $model->save(); @@ -120,8 +126,7 @@ public function deleteAction() if ($id = $this->getRequest()->getParam('user_id')) { try { - $model = Mage::getModel('api/user'); - $model->setId($id); + $model = Mage::getModel('api/user')->load($id); $model->delete(); Mage::getSingleton('adminhtml/session')->addSuccess($this->__('User was successfully deleted')); $this->_redirect('*/*/'); diff --git a/app/code/core/Mage/Adminhtml/controllers/Catalog/CategoryController.php b/app/code/core/Mage/Adminhtml/controllers/Catalog/CategoryController.php index 890f7ee3f2..0c88375a21 100644 --- a/app/code/core/Mage/Adminhtml/controllers/Catalog/CategoryController.php +++ b/app/code/core/Mage/Adminhtml/controllers/Catalog/CategoryController.php @@ -189,6 +189,19 @@ public function editAction() $this->renderLayout(); } + /** + * WYSIWYG editor action for ajax request + * + */ + public function wysiwygAction() + { + $elementId = $this->getRequest()->getParam('element_id', md5(microtime())); + $content = $this->getLayout()->createBlock('adminhtml/catalog_helper_form_wysiwyg_content', '', array( + 'editor_element_id' => $elementId + )); + $this->getResponse()->setBody($content->toHtml()); + } + /** * Get tree node (Ajax version) */ @@ -222,6 +235,7 @@ public function saveAction() } $storeId = $this->getRequest()->getParam('store'); + $refreshTree = 'false'; if ($data = $this->getRequest()->getPost()) { $category->addData($data['general']); if (!$category->getId()) { 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 3e40c8ce9c..b11c690ef7 100644 --- a/app/code/core/Mage/Adminhtml/controllers/Catalog/Product/AttributeController.php +++ b/app/code/core/Mage/Adminhtml/controllers/Catalog/Product/AttributeController.php @@ -95,7 +95,7 @@ public function editAction() // set entered data if was error when we do save $data = Mage::getSingleton('adminhtml/session')->getAttributeData(true); if (! empty($data)) { - $model->setData($data); + $model->addData($data); } Mage::register('entity_attribute', $model); diff --git a/app/code/core/Mage/Adminhtml/controllers/Catalog/Product/ReviewController.php b/app/code/core/Mage/Adminhtml/controllers/Catalog/Product/ReviewController.php index c6f64fc15e..cd064ffca9 100644 --- a/app/code/core/Mage/Adminhtml/controllers/Catalog/Product/ReviewController.php +++ b/app/code/core/Mage/Adminhtml/controllers/Catalog/Product/ReviewController.php @@ -34,6 +34,13 @@ class Mage_Adminhtml_Catalog_Product_ReviewController extends Mage_Adminhtml_Controller_Action { + /** + * Array of actions which can be processed without secret key validation + * + * @var array + */ + protected $_publicActions = array('edit'); + public function indexAction() { if ($this->getRequest()->getParam('ajax')) { @@ -89,46 +96,45 @@ public function newAction() public function saveAction() { - $reviewId = $this->getRequest()->getParam('id', false); - if ($data = $this->getRequest()->getPost()) { - $review = Mage::getModel('review/review')->load($reviewId)->addData($data); - try { - $review->setId($reviewId) - ->save(); + if (($data = $this->getRequest()->getPost()) && ($reviewId = $this->getRequest()->getParam('id'))) { + $review = Mage::getModel('review/review')->load($reviewId); - $arrRatingId = $this->getRequest()->getParam('ratings', array()); - $votes = Mage::getModel('rating/rating_option_vote') - ->getResourceCollection() - ->setReviewFilter($reviewId) - ->addOptionInfo() - ->load() - ->addRatingOptions(); - foreach ($arrRatingId as $ratingId=>$optionId) { - if($vote = $votes->getItemByColumnValue('rating_id', $ratingId)) { - Mage::getModel('rating/rating') - ->setVoteId($vote->getId()) - ->setReviewId($review->getId()) - ->updateOptionVote($optionId); - } else { - Mage::getModel('rating/rating') - ->setRatingId($ratingId) - ->setReviewId($review->getId()) - ->addOptionVote($optionId, $review->getEntityPkValue()); + if (! $review->getId()) { + Mage::getSingleton('adminhtml/session')->addError(Mage::helper('catalog')->__('Review was removed by another user or does not exists')); + } else { + try { + $review->addData($data)->save(); + + $arrRatingId = $this->getRequest()->getParam('ratings', array()); + $votes = Mage::getModel('rating/rating_option_vote') + ->getResourceCollection() + ->setReviewFilter($reviewId) + ->addOptionInfo() + ->load() + ->addRatingOptions(); + foreach ($arrRatingId as $ratingId=>$optionId) { + if($vote = $votes->getItemByColumnValue('rating_id', $ratingId)) { + Mage::getModel('rating/rating') + ->setVoteId($vote->getId()) + ->setReviewId($review->getId()) + ->updateOptionVote($optionId); + } else { + Mage::getModel('rating/rating') + ->setRatingId($ratingId) + ->setReviewId($review->getId()) + ->addOptionVote($optionId, $review->getEntityPkValue()); + } } - } - $review->aggregate(); + $review->aggregate(); - Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('catalog')->__('Review was saved successfully')); - if( $this->getRequest()->getParam('ret') == 'pending' ) { - $this->getResponse()->setRedirect($this->getUrl('*/*/pending')); - } else { - $this->getResponse()->setRedirect($this->getUrl('*/*/')); + Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('catalog')->__('Review was deleted successfully')); + } catch (Exception $e){ + Mage::getSingleton('adminhtml/session')->addError($e->getMessage()); } - return; - } catch (Exception $e){ - Mage::getSingleton('adminhtml/session')->addError($e->getMessage()); } + + return $this->getResponse()->setRedirect($this->getUrl($this->getRequest()->getParam('ret') == 'pending' ? '*/*/pending' : '*/*/')); } $this->_redirectReferer(); } @@ -285,7 +291,7 @@ public function postAction() ->setEntityPkValue($productId) ->setStoreId($product->getStoreId()) ->setStatusId($data['status_id']) - ->setCustomerId(0)//0 is for administrator only + ->setCustomerId(null)//null is for administrator only ->save(); $arrRatingId = $this->getRequest()->getParam('ratings', array()); diff --git a/app/code/core/Mage/Adminhtml/controllers/Catalog/Product/SetController.php b/app/code/core/Mage/Adminhtml/controllers/Catalog/Product/SetController.php index ff1fc16ed8..7e77d427d8 100644 --- a/app/code/core/Mage/Adminhtml/controllers/Catalog/Product/SetController.php +++ b/app/code/core/Mage/Adminhtml/controllers/Catalog/Product/SetController.php @@ -81,54 +81,70 @@ public function setGridAction() $this->getResponse()->setBody($this->getLayout()->createBlock('adminhtml/catalog_product_attribute_set_grid')->toHtml()); } + /** + * Save attribute set action + * + * [POST] Create attribute set from another set and redirect to edit page + * [AJAX] Save attribute set data + * + */ public function saveAction() { - $this->_setTypeId(); - $response = new Varien_Object(); - $response->setError(0); + $entityTypeId = $this->_getEntityTypeId(); + $hasError = false; + $attributeSetId = $this->getRequest()->getParam('id', false); + $isNewSet = $this->getRequest()->getParam('gotoEdit', false) == '1'; - $modelSet = Mage::getModel('eav/entity_attribute_set') - ->setId($this->getRequest()->getParam('id')) - ->setEntityTypeId(Mage::registry('entityType')); - - if( $this->getRequest()->getParam('gotoEdit') ) { - $modelSet = Mage::getModel('eav/entity_attribute_set'); - $modelSet->setAttributeSetName($this->getRequest()->getParam('attribute_set_name')) - ->setEntityTypeId(Mage::registry('entityType')); - } else { - $data = Zend_Json_Decoder::decode($this->getRequest()->getPost('data')); - $modelSet->organizeData($data); - } + /* @var $model Mage_Eav_Model_Entity_Attribute_Set */ + $model = Mage::getModel('eav/entity_attribute_set') + ->setEntityTypeId($entityTypeId); try { - $modelSet->validate($modelSet->getAttributeSetName()); - $modelSet->save(); - if( $this->getRequest()->getParam('gotoEdit') == 1 ) { - $modelSet->initFromSkeleton($this->getRequest()->getParam('skeleton_set')) - ->save(); - - $this->_redirect('*/*/edit', array('id' => $modelSet->getId())); - $this->_getSession()->addSuccess($this->__('Attribute set successfully saved.')); + if ($isNewSet) { + $model->setAttributeSetName($this->getRequest()->getParam('attribute_set_name')); } else { - $this->_getSession()->addSuccess($this->__('Attribute set successfully saved.')); -// $this->_initLayoutMessages('adminhtml/session'); -// $response->setMessage($this->getLayout()->getMessagesBlock()->getGroupedHtml()); - $response->setUrl($this->getUrl('*/*/edit', array('id' => $modelSet->getId()))); - //$this->_redirect('*/*/'); Why? there is Ajax. + if ($attributeSetId) { + $model->load($attributeSetId); + } + if (!$model->getId()) { + Mage::throwException(Mage::helper('catalog')->__('Attribute Set no longer exists.')); + } + $data = Mage::helper('core')->jsonDecode($this->getRequest()->getPost('data')); + $model->organizeData($data); } - } - catch (Exception $e) { + + $model->validate(); + if ($isNewSet) { + $model->save(); + $model->initFromSkeleton($this->getRequest()->getParam('skeleton_set')); + } + $model->save(); + $this->_getSession()->addSuccess(Mage::helper('catalog')->__('Attribute Set successfully saved.')); + } catch (Mage_Core_Exception $e) { $this->_getSession()->addError($e->getMessage()); - if( $this->getRequest()->getParam('gotoEdit') == 1 ) { - $this->_redirectReferer(); + $hasError = true; + } catch (Exception $e) { + $this->_getSession()->addException($e, Mage::helper('catalog')->__('Error while saving Attribute Set.')); + $hasError = true; + } + + if ($isNewSet) { + if ($hasError) { + $this->_redirect('*/*/new'); } else { + $this->_redirect('*/*/edit', array('id' => $model->getId())); + } + } else { + $response = array(); + if ($hasError) { $this->_initLayoutMessages('adminhtml/session'); - $response->setMessage($this->getLayout()->getMessagesBlock()->getGroupedHtml()); - $response->setError(1); + $response['error'] = 1; + $response['message'] = $this->getLayout()->getMessagesBlock()->getGroupedHtml(); + } else { + $response['error'] = 0; + $response['url'] = $this->getUrl('*/*/'); } - } - if( $this->getRequest()->getParam('gotoEdit') != 1 ) { - $this->getResponse()->setBody($response->toJson()); + $this->getResponse()->setBody(Mage::helper('core')->jsonEncode($response)); } } @@ -160,6 +176,10 @@ public function deleteAction() } } + /** + * Define in register catalog_product entity type code as entityType + * + */ protected function _setTypeId() { Mage::register('entityType', @@ -170,4 +190,17 @@ protected function _isAllowed() { return Mage::getSingleton('admin/session')->isAllowed('catalog/attributes/sets'); } + + /** + * Retrieve catalog product entity type id + * + * @return int + */ + protected function _getEntityTypeId() + { + if (is_null(Mage::registry('entityType'))) { + $this->_setTypeId(); + } + return Mage::registry('entityType'); + } } diff --git a/app/code/core/Mage/Adminhtml/controllers/Catalog/Product/WidgetController.php b/app/code/core/Mage/Adminhtml/controllers/Catalog/Product/WidgetController.php index dd853840ff..629d58c0f1 100644 --- a/app/code/core/Mage/Adminhtml/controllers/Catalog/Product/WidgetController.php +++ b/app/code/core/Mage/Adminhtml/controllers/Catalog/Product/WidgetController.php @@ -55,10 +55,14 @@ public function chooserAction() if (!$this->getRequest()->getParam('products_grid')) { $categoriesTree = $this->getLayout()->createBlock('adminhtml/catalog_category_widget_chooser', '', array( 'id' => $uniqId.'Tree', - 'node_click_listener' => $productsGrid->getCategoryClickListenerJs() + 'node_click_listener' => $productsGrid->getCategoryClickListenerJs(), + 'with_empty_node' => true )); - $html = $categoriesTree->toHtml() . $html; + $html = $this->getLayout()->createBlock('adminhtml/catalog_product_widget_chooser_container') + ->setTreeHtml($categoriesTree->toHtml()) + ->setGridHtml($html) + ->toHtml(); } $this->getResponse()->setBody($html); diff --git a/app/code/core/Mage/Adminhtml/controllers/Catalog/ProductController.php b/app/code/core/Mage/Adminhtml/controllers/Catalog/ProductController.php index 96ae179e7b..645c3080d6 100644 --- a/app/code/core/Mage/Adminhtml/controllers/Catalog/ProductController.php +++ b/app/code/core/Mage/Adminhtml/controllers/Catalog/ProductController.php @@ -33,6 +33,13 @@ */ class Mage_Adminhtml_Catalog_ProductController extends Mage_Adminhtml_Controller_Action { + /** + * Array of actions which can be processed without secret key validation + * + * @var array + */ + protected $_publicActions = array('edit'); + protected function _construct() { // Define module dependent translate @@ -221,6 +228,19 @@ public function editAction() $this->renderLayout(); } + /** + * WYSIWYG editor action for ajax request + * + */ + public function wysiwygAction() + { + $elementId = $this->getRequest()->getParam('element_id', md5(microtime())); + $content = $this->getLayout()->createBlock('adminhtml/catalog_helper_form_wysiwyg_content', '', array( + 'editor_element_id' => $elementId + )); + $this->getResponse()->setBody($content->toHtml()); + } + /** * Product grid for AJAX request */ diff --git a/app/code/core/Mage/Adminhtml/controllers/Catalog/SearchController.php b/app/code/core/Mage/Adminhtml/controllers/Catalog/SearchController.php index 2381095f84..f6260bec24 100644 --- a/app/code/core/Mage/Adminhtml/controllers/Catalog/SearchController.php +++ b/app/code/core/Mage/Adminhtml/controllers/Catalog/SearchController.php @@ -85,37 +85,57 @@ public function editAction() } + /** + * Save search query + * + */ public function saveAction() { - if ($data = $this->getRequest()->getPost()) { + $hasError = false; + $data = $this->getRequest()->getPost(); + $queryId = $this->getRequest()->getPost('query_id', null); + if ($this->getRequest()->isPost() && $data) { + /* @var $model Mage_CatalogSearch_Model_Query */ $model = Mage::getModel('catalogsearch/query'); + // validate query + $queryText = $this->getRequest()->getPost('query_text', false); + $storeId = $this->getRequest()->getPost('store_id', false); - if ($queryText = $this->getRequest()->getParam('query_text')) { - $model->load($queryText); - if ($model->getId() && $this->getRequest()->getParam('query_id') != $model->getId()) { - Mage::getSingleton('adminhtml/session')->addError(Mage::helper('catalog')->__('Search Term with such search query already exist.')); - Mage::getSingleton('adminhtml/session')->setPageData($data); - $this->_redirect('*/*/edit', array('id' => $this->getRequest()->getParam('query_id'))); - return; + try { + if ($queryText) { + $model->setStoreId($storeId); + $model->loadByQueryText($queryText); + if ($model->getId() && $model->getId() != $queryId) { + Mage::throwException( + Mage::helper('catalog')->__('Search Term with such search query already exist.') + ); + } else if (!$model->getId() && $queryId) { + $model->load($queryId); + } + } else if ($queryId) { + $model->load($queryId); } - } - $model->addData($data); - Mage::getSingleton('adminhtml/session')->setPageData($model->getData()); - try { + $model->addData($data); + $model->setIsProcessed(0); $model->save(); - Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('catalog')->__('Search Term was successfully saved')); - Mage::getSingleton('adminhtml/session')->setPageData(false); - $this->_redirect('*/*/'); - return; + } catch (Mage_Core_Exception $e) { + $this->_getSession()->addError($e->getMessage()); + $hasError = true; } catch (Exception $e) { - Mage::getSingleton('adminhtml/session')->addError($e->getMessage()); - Mage::getSingleton('adminhtml/session')->setPageData($data); - $this->_redirect('*/*/edit', array('id' => $this->getRequest()->getParam('id'))); - return; + $this->_getSession()->addException($e, + Mage::helper('catalog')->__('Error while saving search query. Please try again later.') + ); + $hasError = true; } } - $this->_redirect('*/*/'); + + if ($hasError) { + $this->_getSession()->setPageData($data); + $this->_redirect('*/*/edit', array('id' => $queryId)); + } else { + $this->_redirect('*/*'); + } } public function deleteAction() diff --git a/app/code/core/Mage/Adminhtml/controllers/Cms/BlockController.php b/app/code/core/Mage/Adminhtml/controllers/Cms/BlockController.php index a672951918..7d1db23eab 100644 --- a/app/code/core/Mage/Adminhtml/controllers/Cms/BlockController.php +++ b/app/code/core/Mage/Adminhtml/controllers/Cms/BlockController.php @@ -109,8 +109,17 @@ public function saveAction() { // check if data sent if ($data = $this->getRequest()->getPost()) { + + $id = $this->getRequest()->getParam('block_id'); + $model = Mage::getModel('cms/block')->load($id); + if (!$model->getId() && $id) { + Mage::getSingleton('adminhtml/session')->addError(Mage::helper('enterprise_banner')->__('This Block no longer exists')); + $this->_redirect('*/*/'); + return; + } + // init model and set data - $model = Mage::getModel('cms/block'); + $model->setData($data); // try to save it diff --git a/app/code/core/Mage/Adminhtml/controllers/Cms/PageController.php b/app/code/core/Mage/Adminhtml/controllers/Cms/PageController.php index fcfc251ecb..93806b88dc 100644 --- a/app/code/core/Mage/Adminhtml/controllers/Cms/PageController.php +++ b/app/code/core/Mage/Adminhtml/controllers/Cms/PageController.php @@ -115,15 +115,15 @@ public function saveAction() //init model and set data $model = Mage::getModel('cms/page'); -// if ($id = $this->getRequest()->getParam('page_id')) { -// $model->load($id); + if ($id = $this->getRequest()->getParam('page_id')) { + $model->load($id); // if ($id != $model->getId()) { // Mage::getSingleton('adminhtml/session')->addError(Mage::helper('cms')->__('The page you are trying to save no longer exists')); // Mage::getSingleton('adminhtml/session')->setFormData($data); // $this->_redirect('*/*/edit', array('page_id' => $this->getRequest()->getParam('page_id'))); // return; // } -// } + } $model->setData($data); diff --git a/app/code/core/Mage/Adminhtml/controllers/Cms/WidgetController.php b/app/code/core/Mage/Adminhtml/controllers/Cms/WidgetController.php deleted file mode 100644 index e66ca4748f..0000000000 --- a/app/code/core/Mage/Adminhtml/controllers/Cms/WidgetController.php +++ /dev/null @@ -1,103 +0,0 @@ - - */ -class Mage_Adminhtml_Cms_WidgetController extends Mage_Adminhtml_Controller_Action -{ - /** - * Wisywyg widget plugin main page - */ - public function indexAction() - { - $this->loadLayout('popup'); - $this->getLayout()->getBlock('root')->addBodyClass('page-popup'); - - $header = $this->getLayout()->getBlock('head'); - $header->setCanLoadExtJs(true); - - // save extra params for widgets insertion form - $skipped = $this->getRequest()->getParam('skip_widgets'); - $skipped = Mage::getSingleton('cms/widget_config')->decodeWidgetsFromQuery($skipped); - Mage::register('skip_widgets', $skipped); - - // Include WYSIWYG popup helper if WYSIWYG instance exists - if (!$this->getRequest()->getParam('no_wysiwyg')) { - $header->addJs('tiny_mce/tiny_mce_popup.js'); - } - - // Add extra JS files required for widgets - foreach (Mage::getModel('cms/widget')->getWidgetsRequiredJsFiles() as $file) { - $header->addJs($file); - } - - $this->renderLayout(); - } - - /** - * Ajax responder for loading plugin options form - */ - public function loadOptionsAction() - { - try { - $this->loadLayout('empty'); - if ($paramsJson = $this->getRequest()->getParam('widget')) { - $request = Mage::helper('core')->jsonDecode($paramsJson); - if (is_array($request)) { - $optionsBlock = $this->getLayout()->getBlock('wysiwyg_widget.options'); - if (isset($request['widget_type'])) { - $optionsBlock->setWidgetType($request['widget_type']); - } - if (isset($request['values'])) { - $optionsBlock->setWidgetValues($request['values']); - } - } - $this->renderLayout(); - } - } catch (Mage_Core_Exception $e) { - $result = array('error' => true, 'message' => $e->getMessage()); - $this->getResponse()->setBody(Mage::helper('core')->jsonEncode($result)); - } - } - - /** - * Format widget pseudo-code for inserting into wysiwyg editor - */ - public function buildWidgetAction() - { - $type = $this->getRequest()->getPost('widget_type'); - $params = $this->getRequest()->getPost('parameters', array()); - $asIs = $this->getRequest()->getPost('as_is'); - $html = Mage::getSingleton('cms/widget')->getWidgetDeclaration($type, $params, $asIs); - $this->getResponse()->setBody($html); - } -} diff --git a/app/code/core/Mage/Adminhtml/controllers/Cms/Wysiwyg/ImagesController.php b/app/code/core/Mage/Adminhtml/controllers/Cms/Wysiwyg/ImagesController.php index c232552250..7e7e33cc0f 100644 --- a/app/code/core/Mage/Adminhtml/controllers/Cms/Wysiwyg/ImagesController.php +++ b/app/code/core/Mage/Adminhtml/controllers/Cms/Wysiwyg/ImagesController.php @@ -52,17 +52,15 @@ public function indexAction() } catch (Exception $e) { $this->_getSession()->addError($e->getMessage()); } - $this->_initAction(); - $this->loadLayout('popup'); - $this->getLayout()->getBlock('root')->addBodyClass('page-popup'); - $this->getLayout()->getBlock('head')->setCanLoadExtJs(true); - $this->renderLayout(); + $this->_initAction() + ->loadLayout('overlay_popup') + ->renderLayout(); } public function treeJsonAction() { try { - $this->_initAction()->_saveSessionCurrentPath(); + $this->_initAction(); $this->getResponse()->setBody( $this->getLayout()->createBlock('adminhtml/cms_wysiwyg_images_tree') ->getTreeJson() @@ -112,10 +110,11 @@ public function deleteFilesAction() { $files = Mage::helper('core')->jsonDecode($this->getRequest()->getParam('files')); try { - $io = new Varien_Io_File(); + $helper = Mage::helper('cms/wysiwyg_images'); + $path = $this->getStorage()->getSession()->getCurrentPath(); foreach ($files as $file) { - $file = Mage::helper('core')->urlDecode($file); - $io->rm($this->getStorage()->getSession()->getCurrentPath(). DS . $file); + $file = $helper->idDecode($file); + $this->getStorage()->deleteFile($path . DS . $file); } } catch (Exception $e) { $result = array('error' => true, 'message' => $e->getMessage()); @@ -145,13 +144,31 @@ public function uploadAction() */ public function onInsertAction() { + $helper = Mage::helper('cms/wysiwyg_images'); $filename = $this->getRequest()->getParam('filename'); - $filename = Mage::helper('core')->urlDecode($filename); + $filename = $helper->idDecode($filename); $asIs = $this->getRequest()->getParam('as_is'); - $image = Mage::helper('cms/wysiwyg_images')->getImageHtmlDeclaration($filename, $asIs); + $image = $helper->getImageHtmlDeclaration($filename, $asIs); $this->getResponse()->setBody($image); } + /** + * Generate image thumbnail on the fly + */ + public function thumbnailAction() + { + $file = $this->getRequest()->getParam('file'); + $file = Mage::helper('cms/wysiwyg_images')->idDecode($file); + $thumb = $this->getStorage()->resizeOnTheFly($file); + if ($thumb !== false) { + $image = Varien_Image_Adapter::factory('GD2'); + $image->open($thumb); + $image->display(); + } else { + // todo: genearte some placeholder + } + } + /** * Register storage model and return it * diff --git a/app/code/core/Mage/Adminhtml/controllers/Cms/WysiwygController.php b/app/code/core/Mage/Adminhtml/controllers/Cms/WysiwygController.php index 155dcc57e7..7c108f9ab7 100644 --- a/app/code/core/Mage/Adminhtml/controllers/Cms/WysiwygController.php +++ b/app/code/core/Mage/Adminhtml/controllers/Cms/WysiwygController.php @@ -41,7 +41,7 @@ class Mage_Adminhtml_Cms_WysiwygController extends Mage_Adminhtml_Controller_Act */ public function directiveAction() { - $directive = $this->getRequest()->getParam('directive'); + $directive = $this->getRequest()->getParam('___directive'); $directive = Mage::helper('core')->urlDecode($directive); $url = Mage::getModel('core/email_template_filter')->filter($directive); try { diff --git a/app/code/core/Mage/Adminhtml/controllers/Customer/GroupController.php b/app/code/core/Mage/Adminhtml/controllers/Customer/GroupController.php index 383342ce8f..1c03e6f83c 100644 --- a/app/code/core/Mage/Adminhtml/controllers/Customer/GroupController.php +++ b/app/code/core/Mage/Adminhtml/controllers/Customer/GroupController.php @@ -51,9 +51,6 @@ public function indexAction() $this->_setActiveMenu('customer/group'); $this->_addBreadcrumb(Mage::helper('customer')->__('Customers'), Mage::helper('customer')->__('Customers')); $this->_addBreadcrumb(Mage::helper('customer')->__('Customer Groups'), Mage::helper('customer')->__('Customer Groups')); - - $this->_addContent($this->getLayout()->createBlock('adminhtml/customer_group', 'group')); - $this->renderLayout(); } diff --git a/app/code/core/Mage/Adminhtml/controllers/CustomerController.php b/app/code/core/Mage/Adminhtml/controllers/CustomerController.php index a4f723cb57..d2b4178a3d 100644 --- a/app/code/core/Mage/Adminhtml/controllers/CustomerController.php +++ b/app/code/core/Mage/Adminhtml/controllers/CustomerController.php @@ -257,7 +257,7 @@ public function exportCsvAction() { $fileName = 'customers.csv'; $content = $this->getLayout()->createBlock('adminhtml/customer_grid') - ->getCsv(); + ->getCsvFile(); $this->_prepareDownloadResponse($fileName, $content); } @@ -269,7 +269,7 @@ public function exportXmlAction() { $fileName = 'customers.xml'; $content = $this->getLayout()->createBlock('adminhtml/customer_grid') - ->getXml(); + ->getExcelFile(); $this->_prepareDownloadResponse($fileName, $content); } diff --git a/app/code/core/Mage/Adminhtml/controllers/DashboardController.php b/app/code/core/Mage/Adminhtml/controllers/DashboardController.php index 0fe18fb2be..baf09b23d0 100644 --- a/app/code/core/Mage/Adminhtml/controllers/DashboardController.php +++ b/app/code/core/Mage/Adminhtml/controllers/DashboardController.php @@ -70,19 +70,23 @@ public function ajaxBlockAction() public function tunnelAction() { $httpClient = new Varien_Http_Client(); + $gaData = $this->getRequest()->getParam('ga'); + $gaHash = $this->getRequest()->getParam('h'); + if ($gaData && $gaHash) { + $newHash = Mage::helper('adminhtml/dashboard_data')->getChartDataHash($gaData); + if ($newHash == $gaHash) { + if ($params = unserialize(base64_decode(urldecode($gaData)))) { + $response = $httpClient->setUri(Mage_Adminhtml_Block_Dashboard_Graph::API_URL) + ->setParameterGet($params) + ->setConfig(array('timeout' => 5)) + ->request('GET'); - if ($ga = $this->getRequest()->getParam('ga')) { - if ($params = unserialize(base64_decode(urldecode($ga)))) { - $response = $httpClient->setUri(Mage_Adminhtml_Block_Dashboard_Graph::API_URL) - ->setParameterGet($params) - ->setConfig(array('timeout' => 15)) - ->request('GET'); + $headers = $response->getHeaders(); - $headers = $response->getHeaders(); - - $this->getResponse() - ->setHeader('Content-type', $headers['Content-type']) - ->setBody($response->getBody()); + $this->getResponse() + ->setHeader('Content-type', $headers['Content-type']) + ->setBody($response->getBody()); + } } } } diff --git a/app/code/core/Mage/Adminhtml/controllers/Newsletter/SubscriberController.php b/app/code/core/Mage/Adminhtml/controllers/Newsletter/SubscriberController.php index 8bc10089dd..5258fda58b 100644 --- a/app/code/core/Mage/Adminhtml/controllers/Newsletter/SubscriberController.php +++ b/app/code/core/Mage/Adminhtml/controllers/Newsletter/SubscriberController.php @@ -70,7 +70,7 @@ public function exportCsvAction() { $fileName = 'subscribers.csv'; $content = $this->getLayout()->createBlock('adminhtml/newsletter_subscriber_grid') - ->getCsv(); + ->getCsvFile(); $this->_prepareDownloadResponse($fileName, $content); } @@ -82,7 +82,7 @@ public function exportXmlAction() { $fileName = 'subscribers.xml'; $content = $this->getLayout()->createBlock('adminhtml/newsletter_subscriber_grid') - ->getXml(); + ->getExcelFile(); $this->_prepareDownloadResponse($fileName, $content); } @@ -127,6 +127,31 @@ public function massUnsubscribeAction() $this->_redirect('*/*/index'); } + public function massDeleteAction() + { + $subscribersIds = $this->getRequest()->getParam('subscriber'); + if (!is_array($subscribersIds)) { + Mage::getSingleton('adminhtml/session')->addError(Mage::helper('newsletter')->__('Please select subscriber(s)')); + } + else { + try { + foreach ($subscribersIds as $subscriberId) { + $subscriber = Mage::getModel('newsletter/subscriber')->load($subscriberId); + $subscriber->delete(); + } + Mage::getSingleton('adminhtml/session')->addSuccess( + Mage::helper('adminhtml')->__( + 'Total of %d record(s) were deleted', count($subscribersIds) + ) + ); + } catch (Exception $e) { + Mage::getSingleton('adminhtml/session')->addError($e->getMessage()); + } + } + + $this->_redirect('*/*/index'); + } + protected function _isAllowed() { return Mage::getSingleton('admin/session')->isAllowed('newsletter/subscriber'); diff --git a/app/code/core/Mage/Adminhtml/controllers/Newsletter/TemplateController.php b/app/code/core/Mage/Adminhtml/controllers/Newsletter/TemplateController.php index 4da03ee951..3517a1f5f0 100644 --- a/app/code/core/Mage/Adminhtml/controllers/Newsletter/TemplateController.php +++ b/app/code/core/Mage/Adminhtml/controllers/Newsletter/TemplateController.php @@ -102,10 +102,10 @@ public function editAction () $model->addData($values); } - $content = $this->getLayout() - ->createBlock('adminhtml/newsletter_template_edit', 'template_edit') - ->setEditMode($model->getId() > 0); - $this->_addContent($content); + if ($editBlock = $this->getLayout()->getBlock('template_edit')) { + $editBlock->setEditMode($model->getId() > 0); + } + $this->renderLayout(); } @@ -132,6 +132,7 @@ public function saveAction () ->setTemplateSenderEmail($request->getParam('sender_email')) ->setTemplateSenderName($request->getParam('sender_name')) ->setTemplateText($request->getParam('text')) + ->setTemplateStyles($request->getParam('styles')) ->setModifiedAt(Mage::getSingleton('core/date')->gmtDate()); if (!$template->getId()) { @@ -139,6 +140,7 @@ public function saveAction () } if ($this->getRequest()->getParam('_change_type_flag')) { $template->setTemplateType(Mage_Newsletter_Model_Template::TYPE_TEXT); + $template->setTemplateStyles(''); } if ($this->getRequest()->getParam('_save_as_flag')) { $template->setId(null); diff --git a/app/code/core/Mage/Adminhtml/controllers/Permissions/RoleController.php b/app/code/core/Mage/Adminhtml/controllers/Permissions/RoleController.php index e80dfa9c5c..53b645bf7a 100644 --- a/app/code/core/Mage/Adminhtml/controllers/Permissions/RoleController.php +++ b/app/code/core/Mage/Adminhtml/controllers/Permissions/RoleController.php @@ -92,15 +92,18 @@ public function editRoleAction() public function deleteAction() { $rid = $this->getRequest()->getParam('rid', false); + $currentUser = Mage::getModel('admin/user')->setId(Mage::getSingleton('admin/session')->getUser()->getId()); - if ( in_array($rid, $currentUser->getRoles()) ) { + + if (in_array($rid, $currentUser->getRoles()) ) { Mage::getSingleton('adminhtml/session')->addError($this->__('You can not delete self assigned roles.')); $this->_redirect('*/*/editrole', array('rid' => $rid)); return; } try { - Mage::getModel("admin/roles")->setId($rid)->delete(); + $role = $this->_initRole()->delete(); + Mage::getSingleton('adminhtml/session')->addSuccess($this->__('Role successfully deleted.')); } catch (Exception $e) { Mage::getSingleton('adminhtml/session')->addError($this->__('Error while deleting this role. Please try again later.')); @@ -121,12 +124,17 @@ public function saveRoleAction() if ($isAll) $resource = array("all"); + $role = $this->_initRole('role_id'); + if (!$role->getId() && $rid) { + Mage::getSingleton('adminhtml/session')->addError($this->__('This Role no longer exists')); + $this->_redirect('*/*/'); + return; + } + try { - $role = Mage::getModel("admin/roles") - ->setId($rid) - ->setName($this->getRequest()->getParam('rolename', false)) - ->setPid($this->getRequest()->getParam('parent_id', false)) - ->setRoleType('G'); + $role->setName($this->getRequest()->getParam('rolename', false)) + ->setPid($this->getRequest()->getParam('parent_id', false)) + ->setRoleType('G'); Mage::dispatchEvent('admin_permissions_role_prepare_save', array('object' => $role, 'request' => $this->getRequest())); $role->save(); diff --git a/app/code/core/Mage/Adminhtml/controllers/Permissions/UserController.php b/app/code/core/Mage/Adminhtml/controllers/Permissions/UserController.php index 8254551b21..5ef953386a 100644 --- a/app/code/core/Mage/Adminhtml/controllers/Permissions/UserController.php +++ b/app/code/core/Mage/Adminhtml/controllers/Permissions/UserController.php @@ -82,7 +82,14 @@ public function editAction() public function saveAction() { if ($data = $this->getRequest()->getPost()) { - $model = Mage::getModel('admin/user'); + + $id = $this->getRequest()->getParam('user_id'); + $model = Mage::getModel('admin/user')->load($id); + if (!$model->getId() && $id) { + Mage::getSingleton('adminhtml/session')->addError($this->__('This User no longer exists')); + $this->_redirect('*/*/'); + return; + } $model->setData($data); /* diff --git a/app/code/core/Mage/Adminhtml/controllers/PollController.php b/app/code/core/Mage/Adminhtml/controllers/PollController.php index ca65d02e27..5e3b4b9fd3 100644 --- a/app/code/core/Mage/Adminhtml/controllers/PollController.php +++ b/app/code/core/Mage/Adminhtml/controllers/PollController.php @@ -171,6 +171,8 @@ public function validateAction() $pollModel->save(); + Mage::register('current_poll_model', $pollModel); + $answersDelete = $this->getRequest()->getParam('deleteAnswer'); if( is_array($answersDelete) ) { foreach( $answersDelete as $answer ) { diff --git a/app/code/core/Mage/Adminhtml/controllers/Report/CustomerController.php b/app/code/core/Mage/Adminhtml/controllers/Report/CustomerController.php index 086bac51e9..4cc28f3b57 100644 --- a/app/code/core/Mage/Adminhtml/controllers/Report/CustomerController.php +++ b/app/code/core/Mage/Adminhtml/controllers/Report/CustomerController.php @@ -62,7 +62,7 @@ public function exportAccountsCsvAction() { $fileName = 'new_accounts.csv'; $content = $this->getLayout()->createBlock('adminhtml/report_customer_accounts_grid') - ->getCsv(); + ->getCsvFile(); $this->_prepareDownloadResponse($fileName, $content); } @@ -74,7 +74,7 @@ public function exportAccountsExcelAction() { $fileName = 'accounts.xml'; $content = $this->getLayout()->createBlock('adminhtml/report_customer_accounts_grid') - ->getExcel($fileName); + ->getExcelFile($fileName); $this->_prepareDownloadResponse($fileName, $content); } @@ -96,7 +96,7 @@ public function exportOrdersCsvAction() { $fileName = 'customers_orders.csv'; $content = $this->getLayout()->createBlock('adminhtml/report_customer_orders_grid') - ->getCsv(); + ->getCsvFile(); $this->_prepareDownloadResponse($fileName, $content); } @@ -108,7 +108,7 @@ public function exportOrdersExcelAction() { $fileName = 'customers_orders.xml'; $content = $this->getLayout()->createBlock('adminhtml/report_customer_orders_grid') - ->getExcel($fileName); + ->getExcelFile($fileName); $this->_prepareDownloadResponse($fileName, $content); } @@ -130,7 +130,7 @@ public function exportTotalsCsvAction() { $fileName = 'cuatomer_totals.csv'; $content = $this->getLayout()->createBlock('adminhtml/report_customer_totals_grid') - ->getCsv(); + ->getCsvFile(); $this->_prepareDownloadResponse($fileName, $content); } @@ -142,7 +142,7 @@ public function exportTotalsExcelAction() { $fileName = 'customer_totals.xml'; $content = $this->getLayout()->createBlock('adminhtml/report_customer_totals_grid') - ->getExcel($fileName); + ->getExcelFile($fileName); $this->_prepareDownloadResponse($fileName, $content); } diff --git a/app/code/core/Mage/Adminhtml/controllers/Report/ProductController.php b/app/code/core/Mage/Adminhtml/controllers/Report/ProductController.php index d2fcc40b6b..b3c44fa9cf 100644 --- a/app/code/core/Mage/Adminhtml/controllers/Report/ProductController.php +++ b/app/code/core/Mage/Adminhtml/controllers/Report/ProductController.php @@ -71,7 +71,7 @@ public function exportOrderedCsvAction() { $fileName = 'products_bestsellers.csv'; $content = $this->getLayout()->createBlock('adminhtml/report_product_ordered_grid') - ->getCsv(); + ->getCsvFile(); $this->_prepareDownloadResponse($fileName, $content); } @@ -84,7 +84,7 @@ public function exportOrderedExcelAction() { $fileName = 'products_bestsellers.xml'; $content = $this->getLayout()->createBlock('adminhtml/report_product_ordered_grid') - ->getExcel($fileName); + ->getExcelFile($fileName); $this->_prepareDownloadResponse($fileName, $content); } @@ -111,7 +111,7 @@ public function exportSoldCsvAction() $fileName = 'products_ordered.csv'; $content = $this->getLayout() ->createBlock('adminhtml/report_product_sold_grid') - ->getCsv(); + ->getCsvFile(); $this->_prepareDownloadResponse($fileName, $content); } @@ -125,7 +125,7 @@ public function exportSoldExcelAction() $fileName = 'products_ordered.xml'; $content = $this->getLayout() ->createBlock('adminhtml/report_product_sold_grid') - ->getExcel($fileName); + ->getExcelFile($fileName); $this->_prepareDownloadResponse($fileName, $content); } @@ -151,7 +151,7 @@ public function exportViewedCsvAction() { $fileName = 'products_mostviewed.csv'; $content = $this->getLayout()->createBlock('adminhtml/report_product_viewed_grid') - ->getCsv(); + ->getCsvFile(); $this->_prepareDownloadResponse($fileName, $content); } @@ -164,7 +164,7 @@ public function exportViewedExcelAction() { $fileName = 'products_mostviewed.xml'; $content = $this->getLayout()->createBlock('adminhtml/report_product_viewed_grid') - ->getExcel($fileName); + ->getExcelFile($fileName); $this->_prepareDownloadResponse($fileName, $content); } @@ -191,7 +191,7 @@ public function exportLowstockCsvAction() $fileName = 'products_lowstock.csv'; $content = $this->getLayout()->createBlock('adminhtml/report_product_lowstock_grid') ->setSaveParametersInSession(true) - ->getCsv(); + ->getCsvFile(); $this->_prepareDownloadResponse($fileName, $content); } @@ -205,7 +205,7 @@ public function exportLowstockExcelAction() $fileName = 'products_lowstock.xml'; $content = $this->getLayout()->createBlock('adminhtml/report_product_lowstock_grid') ->setSaveParametersInSession(true) - ->getExcel($fileName); + ->getExcelFile($fileName); $this->_prepareDownloadResponse($fileName, $content); } @@ -232,7 +232,7 @@ public function exportDownloadsCsvAction() $fileName = 'products_downloads.csv'; $content = $this->getLayout()->createBlock('adminhtml/report_product_downloads_grid') ->setSaveParametersInSession(true) - ->getCsv(); + ->getCsvFile(); $this->_prepareDownloadResponse($fileName, $content); } @@ -246,7 +246,7 @@ public function exportDownloadsExcelAction() $fileName = 'products_downloads.xml'; $content = $this->getLayout()->createBlock('adminhtml/report_product_downloads_grid') ->setSaveParametersInSession(true) - ->getExcel($fileName); + ->getExcelFile($fileName); $this->_prepareDownloadResponse($fileName, $content); } diff --git a/app/code/core/Mage/Adminhtml/controllers/Report/ReviewController.php b/app/code/core/Mage/Adminhtml/controllers/Report/ReviewController.php index 7e2aac77ff..1a129ccfa3 100644 --- a/app/code/core/Mage/Adminhtml/controllers/Report/ReviewController.php +++ b/app/code/core/Mage/Adminhtml/controllers/Report/ReviewController.php @@ -61,7 +61,7 @@ public function exportCustomerCsvAction() { $fileName = 'review_customer.csv'; $content = $this->getLayout()->createBlock('adminhtml/report_review_customer_grid') - ->getCsv(); + ->getCsvFile(); $this->_prepareDownloadResponse($fileName, $content); } @@ -73,7 +73,7 @@ public function exportCustomerExcelAction() { $fileName = 'review_customer.xml'; $content = $this->getLayout()->createBlock('adminhtml/report_review_customer_grid') - ->getExcel($fileName); + ->getExcelFile($fileName); $this->_prepareDownloadResponse($fileName, $content); } @@ -94,7 +94,7 @@ public function exportProductCsvAction() { $fileName = 'review_product.csv'; $content = $this->getLayout()->createBlock('adminhtml/report_review_product_grid') - ->getCsv(); + ->getCsvFile(); $this->_prepareDownloadResponse($fileName, $content); } @@ -106,7 +106,7 @@ public function exportProductExcelAction() { $fileName = 'review_product.xml'; $content = $this->getLayout()->createBlock('adminhtml/report_review_product_grid') - ->getExcel($fileName); + ->getExcelFile($fileName); $this->_prepareDownloadResponse($fileName, $content); } @@ -128,7 +128,7 @@ public function exportProductDetailCsvAction() { $fileName = 'review_product_detail.csv'; $content = $this->getLayout()->createBlock('adminhtml/report_review_detail_grid') - ->getCsv(); + ->getCsvFile(); $this->_prepareDownloadResponse($fileName, $content); } @@ -140,7 +140,7 @@ public function exportProductDetailExcelAction() { $fileName = 'review_product_detail.xml'; $content = $this->getLayout()->createBlock('adminhtml/report_review_detail_grid') - ->getExcel($fileName); + ->getExcelFile($fileName); $this->_prepareDownloadResponse($fileName, $content); } diff --git a/app/code/core/Mage/Adminhtml/controllers/Report/SalesController.php b/app/code/core/Mage/Adminhtml/controllers/Report/SalesController.php index b7718e6097..ccc05163d5 100644 --- a/app/code/core/Mage/Adminhtml/controllers/Report/SalesController.php +++ b/app/code/core/Mage/Adminhtml/controllers/Report/SalesController.php @@ -60,7 +60,7 @@ public function exportSalesCsvAction() { $fileName = 'sales.csv'; $content = $this->getLayout()->createBlock('adminhtml/report_sales_sales_grid') - ->getCsv(); + ->getCsvFile(); $this->_prepareDownloadResponse($fileName, $content); } @@ -72,7 +72,7 @@ public function exportSalesExcelAction() { $fileName = 'sales.xml'; $content = $this->getLayout()->createBlock('adminhtml/report_sales_sales_grid') - ->getExcel($fileName); + ->getExcelFile($fileName); $this->_prepareDownloadResponse($fileName, $content); } @@ -93,7 +93,7 @@ public function exportTaxCsvAction() { $fileName = 'tax.csv'; $content = $this->getLayout()->createBlock('adminhtml/report_sales_tax_grid') - ->getCsv(); + ->getCsvFile(); $this->_prepareDownloadResponse($fileName, $content); } @@ -105,7 +105,7 @@ public function exportTaxExcelAction() { $fileName = 'tax.xml'; $content = $this->getLayout()->createBlock('adminhtml/report_sales_tax_grid') - ->getExcel($fileName); + ->getExcelFile($fileName); $this->_prepareDownloadResponse($fileName, $content); } @@ -126,7 +126,7 @@ public function exportInvoicedCsvAction() { $fileName = 'invoiced.csv'; $content = $this->getLayout()->createBlock('adminhtml/report_sales_invoiced_grid') - ->getCsv(); + ->getCsvFile(); $this->_prepareDownloadResponse($fileName, $content); } @@ -138,7 +138,7 @@ public function exportInvoicedExcelAction() { $fileName = 'invoiced.xml'; $content = $this->getLayout()->createBlock('adminhtml/report_sales_invoiced_grid') - ->getExcel($fileName); + ->getExcelFile($fileName); $this->_prepareDownloadResponse($fileName, $content); } @@ -159,7 +159,7 @@ public function exportRefundedCsvAction() { $fileName = 'refunded.csv'; $content = $this->getLayout()->createBlock('adminhtml/report_sales_refunded_grid') - ->getCsv(); + ->getCsvFile(); $this->_prepareDownloadResponse($fileName, $content); } @@ -171,7 +171,7 @@ public function exportRefundedExcelAction() { $fileName = 'refunded.xml'; $content = $this->getLayout()->createBlock('adminhtml/report_sales_refunded_grid') - ->getExcel($fileName); + ->getExcelFile($fileName); $this->_prepareDownloadResponse($fileName, $content); } @@ -192,7 +192,7 @@ public function exportCouponsCsvAction() { $fileName = 'coupons.csv'; $content = $this->getLayout()->createBlock('adminhtml/report_sales_coupons_grid') - ->getCsv(); + ->getCsvFile(); $this->_prepareDownloadResponse($fileName, $content); } @@ -204,7 +204,7 @@ public function exportCouponsExcelAction() { $fileName = 'coupons.xml'; $content = $this->getLayout()->createBlock('adminhtml/report_sales_coupons_grid') - ->getExcel($fileName); + ->getExcelFile($fileName); $this->_prepareDownloadResponse($fileName, $content); } @@ -225,7 +225,7 @@ public function exportShippingCsvAction() { $fileName = 'shipping.csv'; $content = $this->getLayout()->createBlock('adminhtml/report_sales_shipping_grid') - ->getCsv(); + ->getCsvFile(); $this->_prepareDownloadResponse($fileName, $content); } @@ -237,7 +237,7 @@ public function exportShippingExcelAction() { $fileName = 'shipping.xml'; $content = $this->getLayout()->createBlock('adminhtml/report_sales_shipping_grid') - ->getExcel($fileName); + ->getExcelFile($fileName); $this->_prepareDownloadResponse($fileName, $content); } diff --git a/app/code/core/Mage/Adminhtml/controllers/Report/ShopcartController.php b/app/code/core/Mage/Adminhtml/controllers/Report/ShopcartController.php index 34ff22b36c..7947501bcf 100644 --- a/app/code/core/Mage/Adminhtml/controllers/Report/ShopcartController.php +++ b/app/code/core/Mage/Adminhtml/controllers/Report/ShopcartController.php @@ -58,7 +58,7 @@ public function exportCustomerCsvAction() { $fileName = 'shopcart_customer.csv'; $content = $this->getLayout()->createBlock('adminhtml/report_shopcart_customer_grid') - ->getCsv(); + ->getCsvFile(); $this->_prepareDownloadResponse($fileName, $content); } @@ -70,7 +70,7 @@ public function exportCustomerExcelAction() { $fileName = 'shopcart_customer.xml'; $content = $this->getLayout()->createBlock('adminhtml/report_shopcart_customer_grid') - ->getExcel($fileName); + ->getExcelFile($fileName); $this->_prepareDownloadResponse($fileName, $content); } @@ -91,7 +91,7 @@ public function exportProductCsvAction() { $fileName = 'shopcart_product.csv'; $content = $this->getLayout()->createBlock('adminhtml/report_shopcart_product_grid') - ->getCsv(); + ->getCsvFile(); $this->_prepareDownloadResponse($fileName, $content); } @@ -103,7 +103,7 @@ public function exportProductExcelAction() { $fileName = 'shopcart_product.xml'; $content = $this->getLayout()->createBlock('adminhtml/report_shopcart_product_grid') - ->getExcel($fileName); + ->getExcelFile($fileName); $this->_prepareDownloadResponse($fileName, $content); } @@ -124,7 +124,7 @@ public function exportAbandonedCsvAction() { $fileName = 'shopcart_abandoned.csv'; $content = $this->getLayout()->createBlock('adminhtml/report_shopcart_abandoned_grid') - ->getCsv(); + ->getCsvFile(); $this->_prepareDownloadResponse($fileName, $content); } @@ -136,7 +136,7 @@ public function exportAbandonedExcelAction() { $fileName = 'shopcart_abandoned.xml'; $content = $this->getLayout()->createBlock('adminhtml/report_shopcart_abandoned_grid') - ->getExcel($fileName); + ->getExcelFile($fileName); $this->_prepareDownloadResponse($fileName, $content); } diff --git a/app/code/core/Mage/Adminhtml/controllers/Report/TagController.php b/app/code/core/Mage/Adminhtml/controllers/Report/TagController.php index a54640290e..2aaf911e57 100644 --- a/app/code/core/Mage/Adminhtml/controllers/Report/TagController.php +++ b/app/code/core/Mage/Adminhtml/controllers/Report/TagController.php @@ -61,7 +61,7 @@ public function exportCustomerCsvAction() { $fileName = 'tag_customer.csv'; $content = $this->getLayout()->createBlock('adminhtml/report_tag_customer_grid') - ->getCsv(); + ->getCsvFile(); $this->_prepareDownloadResponse($fileName, $content); } @@ -73,7 +73,7 @@ public function exportCustomerExcelAction() { $fileName = 'tag_customer.xml'; $content = $this->getLayout()->createBlock('adminhtml/report_tag_customer_grid') - ->getExcel($fileName); + ->getExcelFile($fileName); $this->_prepareDownloadResponse($fileName, $content); } @@ -94,7 +94,7 @@ public function exportProductCsvAction() { $fileName = 'tag_product.csv'; $content = $this->getLayout()->createBlock('adminhtml/report_tag_product_grid') - ->getCsv(); + ->getCsvFile(); $this->_prepareDownloadResponse($fileName, $content); } @@ -106,7 +106,7 @@ public function exportProductExcelAction() { $fileName = 'tag_product.xml'; $content = $this->getLayout()->createBlock('adminhtml/report_tag_product_grid') - ->getExcel($fileName); + ->getExcelFile($fileName); $this->_prepareDownloadResponse($fileName, $content); } @@ -128,7 +128,7 @@ public function exportPopularCsvAction() { $fileName = 'tag_popular.csv'; $content = $this->getLayout()->createBlock('adminhtml/report_tag_popular_grid') - ->getCsv(); + ->getCsvFile(); $this->_prepareDownloadResponse($fileName, $content); } @@ -140,7 +140,7 @@ public function exportPopularExcelAction() { $fileName = 'tag_popular.xml'; $content = $this->getLayout()->createBlock('adminhtml/report_tag_popular_grid') - ->getExcel($fileName); + ->getExcelFile($fileName); $this->_prepareDownloadResponse($fileName, $content); } @@ -162,7 +162,7 @@ public function exportCustomerDetailCsvAction() { $fileName = 'tag_customer_detail.csv'; $content = $this->getLayout()->createBlock('adminhtml/report_tag_customer_detail_grid') - ->getCsv(); + ->getCsvFile(); $this->_prepareDownloadResponse($fileName, $content); } @@ -174,7 +174,7 @@ public function exportCustomerDetailExcelAction() { $fileName = 'tag_customer_detail.xml'; $content = $this->getLayout()->createBlock('adminhtml/report_tag_customer_detail_grid') - ->getExcel($fileName); + ->getExcelFile($fileName); $this->_prepareDownloadResponse($fileName, $content); } @@ -196,7 +196,7 @@ public function exportProductDetailCsvAction() { $fileName = 'tag_product_detail.csv'; $content = $this->getLayout()->createBlock('adminhtml/report_tag_product_detail_grid') - ->getCsv(); + ->getCsvFile(); $this->_prepareDownloadResponse($fileName, $content); } @@ -208,7 +208,7 @@ public function exportProductDetailExcelAction() { $fileName = 'tag_product_detail.xml'; $content = $this->getLayout()->createBlock('adminhtml/report_tag_product_detail_grid') - ->getExcel($fileName); + ->getExcelFile($fileName); $this->_prepareDownloadResponse($fileName, $content); } @@ -230,7 +230,7 @@ public function exportTagDetailCsvAction() { $fileName = 'tag_detail.csv'; $content = $this->getLayout()->createBlock('adminhtml/report_tag_popular_detail_grid') - ->getCsv(); + ->getCsvFile(); $this->_prepareDownloadResponse($fileName, $content); } @@ -242,7 +242,7 @@ public function exportTagDetailExcelAction() { $fileName = 'tag_detail.xml'; $content = $this->getLayout()->createBlock('adminhtml/report_tag_popular_detail_grid') - ->getExcel($fileName); + ->getExcelFile($fileName); $this->_prepareDownloadResponse($fileName, $content); } diff --git a/app/code/core/Mage/Adminhtml/controllers/ReportController.php b/app/code/core/Mage/Adminhtml/controllers/ReportController.php index 0ff014dbda..a448fcec34 100644 --- a/app/code/core/Mage/Adminhtml/controllers/ReportController.php +++ b/app/code/core/Mage/Adminhtml/controllers/ReportController.php @@ -58,7 +58,7 @@ public function exportWishlistCsvAction() { $fileName = 'wishlist.csv'; $content = $this->getLayout()->createBlock('adminhtml/report_wishlist_grid') - ->getCsv(); + ->getCsvFile(); $this->_prepareDownloadResponse($fileName, $content); } @@ -70,7 +70,7 @@ public function exportWishlistExcelAction() { $fileName = 'wishlist.xml'; $content = $this->getLayout()->createBlock('adminhtml/report_wishlist_grid') - ->getExcel($fileName); + ->getExcelFile($fileName); $this->_prepareDownloadResponse($fileName, $content); } @@ -93,7 +93,7 @@ public function exportSearchCsvAction() { $fileName = 'search.csv'; $content = $this->getLayout()->createBlock('adminhtml/report_search_grid') - ->getCsv(); + ->getCsvFile(); $this->_prepareDownloadResponse($fileName, $content); } @@ -105,7 +105,7 @@ public function exportSearchExcelAction() { $fileName = 'search.xml'; $content = $this->getLayout()->createBlock('adminhtml/report_search_grid') - ->getExcel($fileName); + ->getExcelFile($fileName); $this->_prepareDownloadResponse($fileName, $content); } 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 e781e16842..150535bf1c 100644 --- a/app/code/core/Mage/Adminhtml/controllers/Sales/Order/CreditmemoController.php +++ b/app/code/core/Mage/Adminhtml/controllers/Sales/Order/CreditmemoController.php @@ -353,7 +353,8 @@ public function saveAction() $this->_getSession()->addError($e->getMessage()); } catch (Exception $e) { - $this->_getSession()->addError($this->__('Can not save credit memo')); + Mage::logException($e); + $this->_getSession()->addError($this->__('Cannot save Credit Memo.')); } $this->_redirect('*/*/new', array('_current' => true)); } diff --git a/app/code/core/Mage/Adminhtml/controllers/Sales/OrderController.php b/app/code/core/Mage/Adminhtml/controllers/Sales/OrderController.php index 31e49d85a5..f19cc076ec 100644 --- a/app/code/core/Mage/Adminhtml/controllers/Sales/OrderController.php +++ b/app/code/core/Mage/Adminhtml/controllers/Sales/OrderController.php @@ -38,7 +38,7 @@ class Mage_Adminhtml_Sales_OrderController extends Mage_Adminhtml_Controller_Act * * @var array */ - protected $_publicActions = array('view'); + protected $_publicActions = array('view', 'index'); /** * Additional initialization diff --git a/app/code/core/Mage/Adminhtml/controllers/System/AccountController.php b/app/code/core/Mage/Adminhtml/controllers/System/AccountController.php index a5ac47ba2c..62bb8d8b36 100644 --- a/app/code/core/Mage/Adminhtml/controllers/System/AccountController.php +++ b/app/code/core/Mage/Adminhtml/controllers/System/AccountController.php @@ -50,12 +50,13 @@ public function saveAction() $userId = Mage::getSingleton('admin/session')->getUser()->getId(); $pwd = null; - $user = Mage::getModel("admin/user") - ->setId($userId) - ->setUsername($this->getRequest()->getParam('username', false)) - ->setFirstname($this->getRequest()->getParam('firstname', false)) - ->setLastname($this->getRequest()->getParam('lastname', false)) - ->setEmail(strtolower($this->getRequest()->getParam('email', false))); + $user = Mage::getModel("admin/user")->load($userId); + + $user->setId($userId) + ->setUsername($this->getRequest()->getParam('username', false)) + ->setFirstname($this->getRequest()->getParam('firstname', false)) + ->setLastname($this->getRequest()->getParam('lastname', false)) + ->setEmail(strtolower($this->getRequest()->getParam('email', false))); if ( $this->getRequest()->getParam('new_password', false) ) { $user->setNewPassword($this->getRequest()->getParam('new_password', false)); } diff --git a/app/code/core/Mage/Adminhtml/controllers/System/BackupController.php b/app/code/core/Mage/Adminhtml/controllers/System/BackupController.php index 7a5eb2411d..34691d837c 100644 --- a/app/code/core/Mage/Adminhtml/controllers/System/BackupController.php +++ b/app/code/core/Mage/Adminhtml/controllers/System/BackupController.php @@ -74,6 +74,8 @@ public function createAction() ->setType('db') ->setPath(Mage::getBaseDir("var") . DS . "backups"); + Mage::register('backup_model', $backup); + $backupDb->createBackup($backup); $this->_getSession()->addSuccess(Mage::helper('adminhtml')->__('Backup successfully created')); } @@ -120,6 +122,8 @@ public function deleteAction() ->setPath(Mage::getBaseDir("var") . DS . "backups") ->deleteFile(); + Mage::register('backup_model', $backup); + $this->_getSession()->addSuccess(Mage::helper('adminhtml')->__('Backup record was deleted')); } catch (Exception $e) { diff --git a/app/code/core/Mage/Adminhtml/controllers/System/DesignController.php b/app/code/core/Mage/Adminhtml/controllers/System/DesignController.php index 72f78e150a..7267a9c2ca 100644 --- a/app/code/core/Mage/Adminhtml/controllers/System/DesignController.php +++ b/app/code/core/Mage/Adminhtml/controllers/System/DesignController.php @@ -99,8 +99,7 @@ public function saveAction() public function deleteAction() { if ($id = $this->getRequest()->getParam('id')) { - $design = Mage::getModel('core/design') - ->setId($id); + $design = Mage::getModel('core/design')->load($id); try { $design->delete(); diff --git a/app/code/core/Mage/Adminhtml/controllers/System/Email/TemplateController.php b/app/code/core/Mage/Adminhtml/controllers/System/Email/TemplateController.php index 7fd6df459b..c1cac2697c 100644 --- a/app/code/core/Mage/Adminhtml/controllers/System/Email/TemplateController.php +++ b/app/code/core/Mage/Adminhtml/controllers/System/Email/TemplateController.php @@ -54,9 +54,23 @@ public function gridAction() } + /** + * New transactional email action + * + */ public function newAction() + { + $this->_forward('edit'); + } + + /** + * Edit transactioanl email action + * + */ + public function editAction() { $this->loadLayout(); + $template = $this->_initTemplate('id'); $this->_setActiveMenu('system/email_template'); $this->_addBreadcrumb(Mage::helper('adminhtml')->__('Transactional Emails'), Mage::helper('adminhtml')->__('Transactional Emails'), $this->getUrl('*/*')); @@ -71,17 +85,16 @@ public function newAction() $this->renderLayout(); } - public function editAction() - { - $this->_forward('new'); - } - public function saveAction() { $request = $this->getRequest(); - $template = Mage::getModel('core/email_template'); - if ($id = (int)$request->getParam('id')) { - $template->load($id); + $id = $this->getRequest()->getParam('id'); + + $template = $this->_initTemplate('id'); + if (!$template->getId() && $id) { + Mage::getSingleton('adminhtml/session')->addError(Mage::helper('adminhtml')->__('This Email template no longer exists')); + $this->_redirect('*/*/'); + return; } try { @@ -92,19 +105,25 @@ public function saveAction() ->setTemplateSenderName($request->getParam('sender_name')) */ ->setTemplateText($request->getParam('template_text')) - ->setModifiedAt(Mage::getSingleton('core/date')->gmtDate()); + ->setTemplateStyles($request->getParam('template_styles')) + ->setModifiedAt(Mage::getSingleton('core/date')->gmtDate()) + ->setOrigTemplateCode($request->getParam('orig_template_code')) + ->setOrigTemplateVariables($request->getParam('orig_template_variables')); if (!$template->getId()) { //$type = constant(Mage::getConfig()->getModelClassName('core/email_template') . "::TYPE_HTML"); $template->setTemplateType(Mage_Core_Model_Email_Template::TYPE_HTML); } - if($this->getRequest()->getParam('_change_type_flag')) { + if($request->getParam('_change_type_flag')) { //$type = constant(Mage::getConfig()->getModelClassName('core/email_template') . "::TYPE_TEXT"); $template->setTemplateType(Mage_Core_Model_Email_Template::TYPE_TEXT); + $template->setTemplateStyles(''); } $template->save(); + Mage::getSingleton('adminhtml/session')->setFormData(false); + Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('adminhtml')->__('Email Template was successfully saved.')); $this->_redirect('*/*'); } catch (Exception $e) { @@ -117,18 +136,33 @@ public function saveAction() public function deleteAction() { - $template = Mage::getModel('core/email_template'); - $id = (int)$this->getRequest()->getParam('id'); - $template->load($id); + $template = $this->_initTemplate('id'); if($template->getId()) { try { $template->delete(); + // display success message + Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('adminhtml')->__('Email Template was successfully deleted.')); + // go to grid + $this->_redirect('*/*/'); + return; + } + catch (Mage_Core_Exception $e) { + $this->_getSession()->addError($e->getMessage()); } catch (Exception $e) { - // Nothing + $this->_getSession()->addError(Mage::helper('adminhtml')->__('Error while deleting email template data. Please review log and try again.')); + Mage::logException($e); + // save data in session + Mage::getSingleton('adminhtml/session')->setFormData($data); + // redirect to edit form + $this->_redirect('*/*/edit', array('id' => $id)); + return; } } - $this->_redirect('*/*'); + // display error message + Mage::getSingleton('adminhtml/session')->addError(Mage::helper('adminhtml')->__('Unable to find a Email Template to delete.')); + // go to grid + $this->_redirect('*/*/'); } public function previewAction() @@ -137,15 +171,47 @@ public function previewAction() $this->renderLayout(); } + /** + * Set template data to retrieve it in template info form + * + */ public function defaultTemplateAction() { - $template = Mage::getModel('core/email_template'); + $template = $this->_initTemplate('id'); + $templateCode = $this->getRequest()->getParam('code'); + + $template->loadDefault($templateCode, $this->getRequest()->getParam('locale')); + $template->setData('orig_template_code', $templateCode); + $template->setData('template_variables', Zend_Json::encode($template->getVariablesOptionArray(true))); - $template->loadDefault($this->getRequest()->getParam('code'), $this->getRequest()->getParam('locale')); + $templateBlock = $this->getLayout()->createBlock('adminhtml/system_email_template_edit'); + $template->setData('orig_template_used_default_for', $templateBlock->getUsedDefaultForPaths(false)); $this->getResponse()->setBody(Mage::helper('core')->jsonEncode($template->getData())); } + /** + * Load email template from request + * + * @param string $idFieldName + * @return Mage_Adminhtml_Model_Email_Template $model + */ + protected function _initTemplate($idFieldName = 'template_id') + { + $id = (int)$this->getRequest()->getParam($idFieldName); + $model = Mage::getModel('adminhtml/email_template'); + if ($id) { + $model->load($id); + } + if (!Mage::registry('email_template')) { + Mage::register('email_template', $model); + } + if (!Mage::registry('current_email_template')) { + Mage::register('current_email_template', $model); + } + return $model; + } + protected function _isAllowed() { return Mage::getSingleton('admin/session')->isAllowed('system/email_template'); diff --git a/app/code/core/Mage/Adminhtml/controllers/System/VariableController.php b/app/code/core/Mage/Adminhtml/controllers/System/VariableController.php new file mode 100644 index 0000000000..0afc5cca91 --- /dev/null +++ b/app/code/core/Mage/Adminhtml/controllers/System/VariableController.php @@ -0,0 +1,197 @@ + + */ +class Mage_Adminhtml_System_VariableController extends Mage_Adminhtml_Controller_Action +{ + /** + * Initialize Layout and set breadcrumbs + * + * @return Mage_Adminhtml_System_VariableController + */ + protected function _initLayout() + { + $this->loadLayout() + ->_setActiveMenu('system/variable') + ->_addBreadcrumb(Mage::helper('adminhtml')->__('Custom Variables'), Mage::helper('adminhtml')->__('Custom Variables')); + return $this; + } + + /** + * Initialize Variable object + * + * @return Mage_Core_Model_Variable + */ + protected function _initVariable() + { + $variableId = $this->getRequest()->getParam('variable_id', null); + $storeId = $this->getRequest()->getParam('store', 0); + /* @var $emailVariable Mage_Core_Model_Variable */ + $variable = Mage::getModel('core/variable'); + if ($variableId) { + $variable->setStoreId($storeId) + ->load($variableId); + } + Mage::register('current_variable', $variable); + return $variable; + } + + /** + * Index Action + * + */ + public function indexAction() + { + $this->_initLayout() + ->_addContent($this->getLayout()->createBlock('adminhtml/system_variable')) + ->renderLayout(); + } + + /** + * New Action (forward to edit action) + * + */ + public function newAction() + { + $this->_forward('edit'); + } + + /** + * Edit Action + * + */ + public function editAction() + { + $this->_initVariable(); + $this->_initLayout() + ->_addContent($this->getLayout()->createBlock('adminhtml/system_variable_edit')) + ->_addJs($this->getLayout()->createBlock('core/template', '', array('template' => 'system/variable/js.phtml'))) + ->renderLayout(); + } + + /** + * Validate Action + * + */ + public function validateAction() + { + $response = new Varien_Object(array('error' => false)); + $variable = $this->_initVariable(); + $variable->addData($this->getRequest()->getPost('variable')); + $result = $variable->validate(); + if ($result !== true && is_string($result)) { + $this->_getSession()->addError($result); + $this->_initLayoutMessages('adminhtml/session'); + $response->setError(true); + $response->setMessage($this->getLayout()->getMessagesBlock()->getGroupedHtml()); + } + $this->getResponse()->setBody($response->toJson()); + } + + /** + * Save Action + * + */ + public function saveAction() + { + $variable = $this->_initVariable(); + $data = $this->getRequest()->getPost('variable'); + $back = $this->getRequest()->getParam('back', false); + if ($data) { + $data['variable_id'] = $variable->getId(); + $variable->setData($data); + try { + $variable->save(); + $this->_getSession()->addSuccess( + Mage::helper('adminhtml')->__('Custom Variable has been successfully saved.') + ); + if ($back) { + $this->_redirect('*/*/edit', array('_current' => true, 'variable_id' => $variable->getId())); + } else { + $this->_redirect('*/*/', array()); + } + return; + } catch (Exception $e) { + $this->_getSession()->addError($e->getMessage()); + $this->_redirect('*/*/edit', array('_current' => true, )); + return; + } + } + $this->_redirect('*/*/', array()); + return; + } + + /** + * Delete Action + * + */ + public function deleteAction() + { + $variable = $this->_initVariable(); + if ($variable->getId()) { + try { + $variable->delete(); + $this->_getSession()->addSuccess( + Mage::helper('adminhtml')->__('Custom Variable has been successfully deleted.') + ); + } catch (Exception $e) { + $this->_getSession()->addError($e->getMessage()); + $this->_redirect('*/*/edit', array('_current' => true, )); + return; + } + } + $this->_redirect('*/*/', array()); + return; + } + + /** + * WYSIWYG Plugin Action + * + */ + public function wysiwygPluginAction() + { + $customVariables = Mage::getModel('core/variable')->getVariablesOptionArray(true); + $storeContactVariabls = Mage::getModel('core/source_email_variables')->toOptionArray(true); + $variables = array($storeContactVariabls, $customVariables); + $this->getResponse()->setBody(Zend_Json::encode($variables)); + } + + /** + * Check current user permission + * + * @return boolean + */ + protected function _isAllowed() + { + return Mage::getSingleton('admin/session')->isAllowed('system/variable'); + } +} diff --git a/app/code/core/Mage/Adminhtml/controllers/TagController.php b/app/code/core/Mage/Adminhtml/controllers/TagController.php index fbf03d2049..b7841a3c0a 100644 --- a/app/code/core/Mage/Adminhtml/controllers/TagController.php +++ b/app/code/core/Mage/Adminhtml/controllers/TagController.php @@ -39,8 +39,8 @@ protected function _initAction() $this->loadLayout() ->_setActiveMenu('catalog/tag') ->_addBreadcrumb(Mage::helper('adminhtml')->__('Catalog'), Mage::helper('adminhtml')->__('Catalog')) - ->_addBreadcrumb(Mage::helper('adminhtml')->__('Tags'), Mage::helper('adminhtml')->__('Tags')) - ; + ->_addBreadcrumb(Mage::helper('adminhtml')->__('Tags'), Mage::helper('adminhtml')->__('Tags')); + return $this; } @@ -51,15 +51,16 @@ protected function _initAction() */ protected function _initTag() { - $id = $this->getRequest()->getParam('tag_id'); - $storeId = $this->getRequest()->getParam('store'); $model = Mage::getModel('tag/tag'); - if ($id) { + + if (($id = $this->getRequest()->getParam('tag_id'))) { $model->load($id); - if (!$model->getId()) { + + if (! $model->getId()) { return false; } - $model->setStoreId($storeId); + + $model->setStoreId($this->getRequest()->getParam('store')); } Mage::register('current_tag', $model); @@ -73,17 +74,6 @@ protected function _initTag() */ public function indexAction() { - /** - * setting status parameter for grid filter for non-ajax request - * - */ - if ($this->getRequest()->getParam('pending') && !$this->getRequest()->getParam('isAjax')) { - $this->getRequest()->setParam('filter', base64_encode('status=' . Mage_Tag_Model_Tag::STATUS_PENDING)); - } - elseif (!$this->getRequest()->getParam('isAjax')) { - $this->getRequest()->setParam('filter', ''); - } - $this->_initAction() ->_addBreadcrumb(Mage::helper('adminhtml')->__('All Tags'), Mage::helper('adminhtml')->__('All Tags')) ->_setActiveMenu('catalog/tag/all') @@ -98,9 +88,17 @@ public function indexAction() public function ajaxGridAction() { $this->loadLayout(); - $this->getResponse()->setBody( - $this->getLayout()->createBlock('adminhtml/tag_tag_grid')->toHtml() - ); + $this->getResponse()->setBody($this->getLayout()->createBlock('adminhtml/tag_tag_grid')->toHtml()); + } + + /** + * Action to draw pending tags grid loaded by ajax + * + */ + public function ajaxPendingGridAction() + { + $this->loadLayout(); + $this->getResponse()->setBody($this->getLayout()->createBlock('adminhtml/tag_grid_pending')->toHtml()); } /** @@ -118,19 +116,13 @@ public function newAction() */ public function editAction() { - if (0 === (int)$this->getRequest()->getParam('store')) { - $this->_redirect('*/*/*/', array('store' => Mage::app()->getAnyStoreView()->getId(), '_current' => true)); - return; + if (! (int) $this->getRequest()->getParam('store')) { + return $this->_redirect('*/*/*/', array('store' => Mage::app()->getAnyStoreView()->getId(), '_current' => true)); } - if (!$model = $this->_initTag()) { - Mage::getSingleton('adminhtml/session')->addError( - Mage::helper('adminhtml')->__('Wrong Tag specified') - ); - $this->_redirect('*/*/index', array( - 'store' => $this->getRequest()->getParam('store') - )); - return; + if (! ($model = $this->_initTag())) { + Mage::getSingleton('adminhtml/session')->addError(Mage::helper('adminhtml')->__('Wrong Tag specified')); + return $this->_redirect('*/*/index', array('store' => $this->getRequest()->getParam('store'))); } $model->addSummary($this->getRequest()->getParam('store')); @@ -163,14 +155,10 @@ public function saveAction() $data['store'] = $postData['store_id']; if (!$model = $this->_initTag()) { - Mage::getSingleton('adminhtml/session')->addError( - Mage::helper('adminhtml')->__('Wrong Tag specified') - ); - $this->_redirect('*/*/index', array( - 'store' => $data['store'] - )); - return; + Mage::getSingleton('adminhtml/session')->addError(Mage::helper('adminhtml')->__('Wrong Tag specified')); + return $this->_redirect('*/*/index', array('store' => $data['store'])); } + $model->addData($data); if (isset($postData['tag_assigned_products'])) { @@ -179,101 +167,50 @@ public function saveAction() $tagRelationModel->addRelations($model, $productIds); } - switch( $this->getRequest()->getParam('ret') ) { - case 'all': - $url = $this->getUrl('*/*/index', array( - 'customer_id' => $this->getRequest()->getParam('customer_id'), - 'product_id' => $this->getRequest()->getParam('product_id'), - )); - break; - - case 'pending': - $url = $this->getUrl('*/tag/pending', array( - 'customer_id' => $this->getRequest()->getParam('customer_id'), - 'product_id' => $this->getRequest()->getParam('product_id'), - )); - break; - - default: - $url = $this->getUrl('*/*/index', array( - 'customer_id' => $this->getRequest()->getParam('customer_id'), - 'product_id' => $this->getRequest()->getParam('product_id'), - )); - } - try { $model->save(); $model->aggregate(); Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('adminhtml')->__('Tag was successfully saved')); Mage::getSingleton('adminhtml/session')->setTagData(false); - if ($this->getRequest()->getParam('ret') == 'edit') { - $url = $this->getUrl('*/tag/edit', array( - 'tag_id' => $model->getId(), - 'store' => $model->getStoreId() - )); + if (($continue = $this->getRequest()->getParam('continue'))) { + return $this->_redirect('*/tag/edit', array('tag_id' => $model->getId(), 'store' => $model->getStoreId(), 'ret' => $continue)); + } else { + return $this->_redirect('*/tag/' . $this->getRequest()->getParam('ret', 'index')); } - - $this->getResponse()->setRedirect($url); - return; } catch (Exception $e) { Mage::getSingleton('adminhtml/session')->addError($e->getMessage()); Mage::getSingleton('adminhtml/session')->setTagData($data); - $this->_redirect('*/*/edit', array( - 'tag_id' => $model->getId(), - 'store' => $model->getStoreId() - )); - return; + + return $this->_redirect('*/*/edit', array('tag_id' => $model->getId(), 'store' => $model->getStoreId())); } } - $this->getResponse()->setRedirect($url); + + return $this->_redirect('*/tag/index', array('_current' => true)); } /** * Delete tag action * + * @return void */ public function deleteAction() { - if ($id = $this->getRequest()->getParam('tag_id')) { - - switch( $this->getRequest()->getParam('ret') ) { - case 'all': - $url = $this->getUrl('*/*/', array( - 'customer_id' => $this->getRequest()->getParam('customer_id'), - 'product_id' => $this->getRequest()->getParam('product_id'), - )); - break; - - case 'pending': - $url = $this->getUrl('*/tag/pending', array( - 'customer_id' => $this->getRequest()->getParam('customer_id'), - 'product_id' => $this->getRequest()->getParam('product_id'), - )); - break; - - default: - $url = $this->getUrl('*/*/', array( - 'customer_id' => $this->getRequest()->getParam('customer_id'), - 'product_id' => $this->getRequest()->getParam('product_id'), - )); - } + $model = $this->_initTag(); + $session = Mage::getSingleton('adminhtml/session'); + if ($model && $model->getId()) { try { - $model = $this->_initTag(); $model->delete(); - Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('adminhtml')->__('Tag was successfully deleted')); - $this->getResponse()->setRedirect($url); - return; - } - catch (Exception $e) { - Mage::getSingleton('adminhtml/session')->addError($e->getMessage()); - $this->_redirect('*/*/edit', array('tag_id' => $this->getRequest()->getParam('tag_id'))); - return; + $session->addSuccess(Mage::helper('adminhtml')->__('Tag was successfully deleted')); + } catch (Exception $e) { + $session->addError($e->getMessage()); } + } else { + $session->addError(Mage::helper('adminhtml')->__('Unable to find a tag to delete')); } - Mage::getSingleton('adminhtml/session')->addError(Mage::helper('adminhtml')->__('Unable to find a tag to delete')); - $this->getResponse()->setRedirect($url); + + $this->getResponse()->setRedirect($this->getUrl('*/tag/' . $this->getRequest()->getParam('ret', 'index'))); } /** @@ -318,9 +255,7 @@ public function assignedGridOnlyAction() public function productAction() { $this->_initTag(); - $this->getResponse()->setBody( - $this->getLayout()->createBlock('adminhtml/tag_product_grid')->toHtml() - ); + $this->getResponse()->setBody($this->getLayout()->createBlock('adminhtml/tag_product_grid')->toHtml()); } /** @@ -330,9 +265,7 @@ public function productAction() public function customerAction() { $this->_initTag(); - $this->getResponse()->setBody( - $this->getLayout()->createBlock('adminhtml/tag_customer_grid')->toHtml() - ); + $this->getResponse()->setBody($this->getLayout()->createBlock('adminhtml/tag_customer_grid')->toHtml()); } /** @@ -357,8 +290,8 @@ public function massDeleteAction() Mage::getSingleton('adminhtml/session')->addError($e->getMessage()); } } - $ret = $this->getRequest()->getParam('ret') ? $this->getRequest()->getParam('ret') : 'index'; - $this->_redirect('*/*/'.$ret); + + $this->_redirect('*/*/' . $this->getRequest()->getParam('ret', 'index')); } /** diff --git a/app/code/core/Mage/Adminhtml/controllers/Tax/RateController.php b/app/code/core/Mage/Adminhtml/controllers/Tax/RateController.php index 32ad1ff25d..79f2c7e805 100644 --- a/app/code/core/Mage/Adminhtml/controllers/Tax/RateController.php +++ b/app/code/core/Mage/Adminhtml/controllers/Tax/RateController.php @@ -171,7 +171,7 @@ public function exportCsvAction() { $fileName = 'rates.csv'; $content = $this->getLayout()->createBlock('adminhtml/tax_rate_grid') - ->getCsv(); + ->getCsvFile(); $this->_prepareDownloadResponse($fileName, $content); } @@ -183,7 +183,7 @@ public function exportXmlAction() { $fileName = 'rates.xml'; $content = $this->getLayout()->createBlock('adminhtml/tax_rate_grid') - ->getXml(); + ->getExcelFile(); $this->_prepareDownloadResponse($fileName, $content); } @@ -352,36 +352,50 @@ protected function _importRates() */ public function exportPostAction() { - /** get rate types */ - $stores = array(); - $storeCollection = Mage::getModel('core/store')->getCollection()->setLoadDefault(false); - foreach ($storeCollection as $store) { - $stores[$store->getId()] = $store->getCode(); - } + $storeTaxTitleTemplate = array(); + $taxCalculationRateTitleDict = array(); /** start csv content and set template */ - $content = '"'.Mage::helper('tax')->__('Code').'","'.Mage::helper('tax')->__('Country').'","'.Mage::helper('tax')->__('State').'","'.Mage::helper('tax')->__('Zip/Post Code').'","'.Mage::helper('tax')->__('Rate').'"'; - $template = '"{{code}}","{{country_name}}","{{region_name}}","{{tax_postcode}}","{{rate}}"'; - foreach ($stores as $id => $name) { - $content .= ',"'.$name.'"'; - $template .= ',"{{title_'.$id.'}}"'; + $content = '"'.Mage::helper('tax')->__('Code') . '","' . Mage::helper('tax')->__('Country') . '","' + . Mage::helper('tax')->__('State') . '","' . Mage::helper('tax')->__('Zip/Post Code') . '","' + . Mage::helper('tax')->__('Rate') . '"'; + + $template = '"{{code}}","{{country_name}}","{{region_name}}","{{tax_postcode}}","{{rate}}"'; + + foreach (Mage::getModel('core/store')->getCollection()->setLoadDefault(false) as $store) { + $storeTitle = 'title_' . $store->getId(); + $content .= ',"' . $store->getCode() . '"'; + $template .= ',"{{' . $storeTitle . '}}"'; + $storeTaxTitleTemplate[$storeTitle] = null; } + $content .= "\n"; - $rateCollection = Mage::getModel('tax/calculation_rate')->getCollection() - ->joinStoreTitles() - ->joinCountryTable() - ->joinRegionTable(); - foreach ($rateCollection as $rate) { + foreach (Mage::getModel('tax/calculation_rate_title')->getCollection() as $title) { + $rateId = $title->getTaxCalculationRateId(); + + if (! array_key_exists($rateId, $taxCalculationRateTitleDict)) { + $taxCalculationRateTitleDict[$rateId] = $storeTaxTitleTemplate; + } + + $taxCalculationRateTitleDict[$rateId]['title_' . $title->getStoreId()] = $title->getValue(); + } + + foreach (Mage::getModel('tax/calculation_rate')->getCollection()->joinCountryTable()->joinRegionTable() as $rate) { if ($rate->getTaxRegionId() == 0) { $rate->setRegionName('*'); } - $content .= $rate->toString($template)."\n"; - } - $fileName = 'tax_rates.csv'; + if (array_key_exists($rate->getId(), $taxCalculationRateTitleDict)) { + $rate->addData($taxCalculationRateTitleDict[$rate->getId()]); + } else { + $rate->addData($storeTaxTitleTemplate); + } + + $content .= $rate->toString($template) . "\n"; + } - $this->_prepareDownloadResponse($fileName, $content); + $this->_prepareDownloadResponse('tax_rates.csv', $content); } protected function _isAllowed() diff --git a/app/code/core/Mage/Adminhtml/controllers/Tax/RuleController.php b/app/code/core/Mage/Adminhtml/controllers/Tax/RuleController.php index 236c7790d8..6fec735a5c 100644 --- a/app/code/core/Mage/Adminhtml/controllers/Tax/RuleController.php +++ b/app/code/core/Mage/Adminhtml/controllers/Tax/RuleController.php @@ -53,6 +53,7 @@ public function editAction() if ($taxRuleId) { $ruleModel->load($taxRuleId); if (!$ruleModel->getId()) { + Mage::getSingleton('adminhtml/session')->unsRuleData(); Mage::getSingleton('adminhtml/session')->addError(Mage::helper('tax')->__('This rule no longer exists')); $this->_redirect('*/*/'); return; diff --git a/app/code/core/Mage/Adminhtml/etc/adminhtml.xml b/app/code/core/Mage/Adminhtml/etc/adminhtml.xml index 4c302e812c..1d2b8dfc35 100644 --- a/app/code/core/Mage/Adminhtml/etc/adminhtml.xml +++ b/app/code/core/Mage/Adminhtml/etc/adminhtml.xml @@ -75,6 +75,11 @@ adminhtml/system_email_template 60 + + Custom Variables + adminhtml/system_variable + 65 + Permissions 70 @@ -212,6 +217,10 @@ Transactional Emails 40 + + Custom Variables + 45 + My Account 50 diff --git a/app/code/core/Mage/AmazonPayments/Model/Payment/Asp.php b/app/code/core/Mage/AmazonPayments/Model/Payment/Asp.php index 2ddf21574c..fe6667db61 100644 --- a/app/code/core/Mage/AmazonPayments/Model/Payment/Asp.php +++ b/app/code/core/Mage/AmazonPayments/Model/Payment/Asp.php @@ -280,7 +280,7 @@ public function initialize($paymentAction, $stateObject) * process Amazon Simple Pay notification request * * @param array $requestParams - * @return Mage_AmazonPayments_Model_Payment_Asp + * @return bool */ public function processNotification($requestParams) { @@ -299,11 +299,13 @@ public function processNotification($requestParams) $variables = array(); $variables['request'] = print_r($requestParams, 1); $variables['error'] = $e->getMessage(); - $this->_mail('email_template_notofication_error', $variables); + $this->_mail('email_template_notification_error', $variables); } + + return false; } - return $this; + return true; } /** @@ -353,7 +355,7 @@ public function processInvoice($invoice, $payment) $payment->getOrder()->addStatusToHistory( $payment->getOrder()->getStatus(), Mage::helper('amazonpayments')->__('Payment was captured online with Amazon Simple Pay service. Invoice was created. Waiting for capture confirmation from payment service.') - )->save(); + ); } } @@ -394,7 +396,7 @@ public function processCreditmemo($creditmemo, $payment) $payment->getOrder()->addStatusToHistory( $payment->getOrder()->getStatus(), Mage::helper('amazonpayments')->__('Payment refunded online with Amazon Simple Pay service. Creditmemo was created. Waiting for refund confirmation from Amazon Simple Pay service.') - )->save(); + ); } } return $this; @@ -425,7 +427,7 @@ public function cancel(Varien_Object $payment) true, Mage::helper('amazonpayments')->__('Payment authorization cancelled with Amazon Simple Pay service.'), $notified = false - )->save(); + ); } } return $this; diff --git a/app/code/core/Mage/AmazonPayments/Model/Payment/Asp/Notification.php b/app/code/core/Mage/AmazonPayments/Model/Payment/Asp/Notification.php index ea72ebc3ad..b0fcd369cd 100644 --- a/app/code/core/Mage/AmazonPayments/Model/Payment/Asp/Notification.php +++ b/app/code/core/Mage/AmazonPayments/Model/Payment/Asp/Notification.php @@ -100,7 +100,6 @@ public function process($requestParams) $this->_processSystemError($request, $order); break; } - $order->save(); } /** @@ -108,11 +107,11 @@ public function process($requestParams) */ protected function _processCancel($request, $order) { - if ($order->getState() == Mage_Sales_Model_Order::STATE_CANCELED) { + if ($order->isCanceled()) { $order->addStatusToHistory( $order->getStatus(), Mage::helper('amazonpayments')->__('Amazon Simple Pay service confirmed cancelation.') - ); + )->save(); return true; } @@ -120,7 +119,7 @@ protected function _processCancel($request, $order) $order->addStatusToHistory( $order->getStatus(), Mage::helper('amazonpayments')->__('Amazon Simple Pay service confirmed cancelation.') - )->cancel(); + )->cancel()->save(); return true; } @@ -143,7 +142,7 @@ protected function _processReserveSuccess($request, $order) 'pending_amazon_asp', Mage::helper('amazonpayments')->__('Amazon Simple Pay service confirmed amount authorization.'), $notified = false - ); + )->save(); return true; } @@ -163,7 +162,7 @@ protected function _processPaymetInitiated($request, $order) 'pending_amazon_asp', Mage::helper('amazonpayments')->__('Amazon Simple Pay service confirmed capture initiation.'), $notified = false - ); + )->save(); return true; } @@ -175,12 +174,11 @@ protected function _processPaymentSuccessful($request, $order) { if ($order->getState() != Mage_Sales_Model_Order::STATE_NEW && $order->getState() != Mage_Sales_Model_Order::STATE_PENDING_PAYMENT && - $order->getState() != Mage_Sales_Model_Order::STATE_PROCESSING) { + $order->getState() != Mage_Sales_Model_Order::STATE_PROCESSING && + $order->getState() != Mage_Sales_Model_Order::STATE_COMPLETE) { $this->_errorViolationSequenceStates($request, $order); } - $msg = ''; - if (!$invoice = $this->_getOrderInvoice($order)) { $orderAmount = Mage::app()->getStore()->roundPrice($order->getBaseGrandTotal()); @@ -198,13 +196,19 @@ protected function _processPaymentSuccessful($request, $order) $invoice->addComment(Mage::helper('amazonpayments')->__('Amazon Simple Pay service confirmed payment capture. Invoice created automatically.')); $invoice->setTransactionId($request->getTransactionId()); + $order->getPayment()->setLastTransId($request->getTransactionId()); + $order->setState( + Mage_Sales_Model_Order::STATE_PROCESSING, + true, + Mage::helper('amazonpayments')->__('Amazon Simple Pay service confirmed payment capture. Invoice %s was automatically created after confirmation.', $invoice->getIncrementId()), + $notified = true + ); + $transactionSave = Mage::getModel('core/resource_transaction') ->addObject($invoice) ->addObject($invoice->getOrder()) ->save(); - $msg = $msg . Mage::helper('amazonpayments')->__('Amazon Simple Pay service confirmed payment capture. Invoice %s was automatically created after confirmation.', $invoice->getIncrementId()); - } else { if ($invoice->getTransactionId() != $request->getTransactionId()) { @@ -225,11 +229,13 @@ protected function _processPaymentSuccessful($request, $order) ); } + $msg = ''; + switch ($invoice->getState()) { case Mage_Sales_Model_Order_Invoice::STATE_OPEN: $invoice->addComment(Mage::helper('amazonpayments')->__('Amazon Simple Pay service capture confirmation. Invoice was captured automatically.')); - $invoice->setState(Mage_Sales_Model_Order_Invoice::STATE_PAID)->save(); + $invoice->setState(Mage_Sales_Model_Order_Invoice::STATE_PAID); $msg = $msg . Mage::helper('amazonpayments')->__('Amazon Simple Pay service confirmed capture for invoice %s. Invoice automatically captured.', $invoice->getIncrementId()); break; @@ -239,16 +245,20 @@ protected function _processPaymentSuccessful($request, $order) break; } - } + $order->getPayment()->setLastTransId($request->getTransactionId()); + $order->setState( + Mage_Sales_Model_Order::STATE_PROCESSING, + true, + $msg, + $notified = true + ); - $order->getPayment()->getLastTransId($request->getTransactionId()); - $order->addStatusToHistory($order->getStatus(), $msg); - $order->setState( - Mage_Sales_Model_Order::STATE_PROCESSING, - true, - Mage::helper('amazonpayments')->__('Payment was authorized and captured successfully'), - $notified = true - ); + $transactionSave = Mage::getModel('core/resource_transaction') + ->addObject($invoice) + ->addObject($order) + ->save(); + + } return true; } @@ -268,7 +278,7 @@ protected function _processPaymentFailed($request, $order) true, Mage::helper('amazonpayments')->__('Amazon Simple Pay service payment confirmation failed'), $notified = false - ); + )->save(); return true; } @@ -284,8 +294,6 @@ protected function _processRefundSuccessful($request, $order) $this->_errorViolationSequenceStates($request, $order); } - $msg = ''; - if (!$creditmemo = $this->_getOrderCreditmemo($order)) { $orderAmount = Mage::app()->getStore()->roundPrice($order->getBaseGrandTotal()); @@ -309,9 +317,13 @@ protected function _processRefundSuccessful($request, $order) if ($creditmemo->getInvoice()) { $transactionSave->addObject($creditmemo->getInvoice()); } - $transactionSave->save(); - $msg = $msg . Mage::helper('amazonpayments')->__('Amazon Simple Pay service confirmed payment refund. Credit memo created automatically.', $creditmemo->getIncrementId()); + $order->addStatusToHistory( + $order->getStatus(), + Mage::helper('amazonpayments')->__('Amazon Simple Pay service confirmed payment refund. Credit memo created automatically.', $creditmemo->getIncrementId()) + ); + + $transactionSave->save(); } } else { @@ -334,11 +346,13 @@ protected function _processRefundSuccessful($request, $order) ); } + $msg = ''; + switch ($creditmemo->getState()) { case Mage_Sales_Model_Order_Creditmemo::STATE_OPEN: $creditmemo->addComment(Mage::helper('amazonpayments')->__('Amazon Simple Pay service confirmed refund. Creditmemo processed automatically.')); - $creditmemo->setState(Mage_Sales_Model_Order_Creditmemo::STATE_REFUNDED)->save(); + $creditmemo->setState(Mage_Sales_Model_Order_Creditmemo::STATE_REFUNDED); $msg = $msg . Mage::helper('amazonpayments')->__('Amazon Simple Pay service confirmed refunded creditmemo %s. Creditmemo processed automatically.', $creditmemo->getIncrementId()); break; @@ -348,9 +362,17 @@ protected function _processRefundSuccessful($request, $order) break; } - } + $order->addStatusToHistory( + $order->getStatus(), + Mage::helper('amazonpayments')->__('Amazon Simple Pay service confirmed payment refund. Credit memo created automatically.', $creditmemo->getIncrementId()) + ); - $order->addStatusToHistory($order->getStatus(), $msg); + $transactionSave = Mage::getModel('core/resource_transaction') + ->addObject($creditmemo) + ->addObject($order) + ->save(); + + } return true; } @@ -363,7 +385,7 @@ protected function _processRefundFailed($request, $order) $order->addStatusToHistory( $order->getStatus(), Mage::helper('amazonpayments')->__('Amazon Simple Pay service payment confirmation failed') - ); + )->save(); return true; } @@ -377,7 +399,7 @@ protected function _processSystemError($request, $order) true, Mage::helper('amazonpayments')->__('Amazon Simple Pay service is not available. Payment was not processed.'), $notified = false - ); + )->save(); return true; } @@ -428,7 +450,7 @@ protected function _getOrderInvoice($order) foreach ($order->getInvoiceCollection() as $orderInvoice) { if ($orderInvoice->getState() == Mage_Sales_Model_Order_Invoice::STATE_PAID || $orderInvoice->getState() == Mage_Sales_Model_Order_Invoice::STATE_OPEN) { - return $orderInvoice; + return $orderInvoice->load($orderInvoice->getId()); } } @@ -477,7 +499,7 @@ protected function _getOrderCreditmemo($order) foreach ($order->getCreditmemosCollection() as $orderCreditmemo) { if ($orderCreditmemo->getState() == Mage_Sales_Model_Order_Creditmemo::STATE_REFUNDED || $orderCreditmemo->getState() == Mage_Sales_Model_Order_Creditmemo::STATE_OPEN) { - return $orderCreditmemo; + return $orderCreditmemo->load($orderCreditmemo->getId()); } } diff --git a/app/code/core/Mage/AmazonPayments/controllers/AspController.php b/app/code/core/Mage/AmazonPayments/controllers/AspController.php index e29e35219f..cf5d9c5015 100644 --- a/app/code/core/Mage/AmazonPayments/controllers/AspController.php +++ b/app/code/core/Mage/AmazonPayments/controllers/AspController.php @@ -148,6 +148,8 @@ public function returnCancelAction() */ public function notificationAction() { - $this->getPayment()->processNotification($this->getRequest()->getParams()); + if (!$this->getPayment()->processNotification($this->getRequest()->getParams())) { + $this->_forward('noRoute'); + } } } diff --git a/app/code/core/Mage/AmazonPayments/etc/config.xml b/app/code/core/Mage/AmazonPayments/etc/config.xml index 72dda720dc..f09c7b187d 100644 --- a/app/code/core/Mage/AmazonPayments/etc/config.xml +++ b/app/code/core/Mage/AmazonPayments/etc/config.xml @@ -77,11 +77,11 @@ @@ -212,7 +212,7 @@ Something like this is to be added to resolve bug #4890 https://fps.sandbox.amazonaws.com/ general - payment_amazonpayments_asp + payment_amazonpayments_asp_email_template_notification_error 0 0 diff --git a/app/code/core/Mage/AmazonPayments/etc/system.xml b/app/code/core/Mage/AmazonPayments/etc/system.xml index 64c5daec42..2878ba5a15 100644 --- a/app/code/core/Mage/AmazonPayments/etc/system.xml +++ b/app/code/core/Mage/AmazonPayments/etc/system.xml @@ -129,7 +129,7 @@ 0 - + text 45 1 @@ -340,7 +340,7 @@ 30 1 1 - 0 + 1 @@ -348,7 +348,7 @@ 31 1 1 - 0 + 1 @@ -356,7 +356,7 @@ 32 1 1 - 0 + 1 @@ -364,7 +364,7 @@ 33 1 1 - 0 + 1 @@ -372,7 +372,7 @@ 34 1 1 - 0 + 1 @@ -380,7 +380,7 @@ 35 1 1 - 0 + 1 @@ -399,15 +399,15 @@ 1 0 - + select adminhtml/system_config_source_email_template 38 1 1 - 0 - + 1 + select diff --git a/app/code/core/Mage/Api/Model/Mysql4/Rules/Collection.php b/app/code/core/Mage/Api/Model/Mysql4/Rules/Collection.php index 161fcd86ae..5fe4ab7259 100644 --- a/app/code/core/Mage/Api/Model/Mysql4/Rules/Collection.php +++ b/app/code/core/Mage/Api/Model/Mysql4/Rules/Collection.php @@ -39,7 +39,7 @@ public function getByRoles($id) public function addSortByLength() { - $this->getSelect()->from('', array('length' => 'LENGTH(resource_id)')) + $this->getSelect()->columns(array('length' => 'LENGTH(resource_id)')) ->order('length desc'); return $this; } diff --git a/app/code/core/Mage/Api/Model/User.php b/app/code/core/Mage/Api/Model/User.php index f82bb2d5d0..22b84a80f0 100644 --- a/app/code/core/Mage/Api/Model/User.php +++ b/app/code/core/Mage/Api/Model/User.php @@ -69,7 +69,9 @@ public function save() public function delete() { + $this->_beforeDelete(); $this->_getResource()->delete($this); + $this->_afterDelete(); return $this; } diff --git a/app/code/core/Mage/Api/etc/wsdl.xml b/app/code/core/Mage/Api/etc/wsdl.xml index b8acdd4963..99229a333c 100644 --- a/app/code/core/Mage/Api/etc/wsdl.xml +++ b/app/code/core/Mage/Api/etc/wsdl.xml @@ -188,4 +188,4 @@ - \ No newline at end of file + diff --git a/app/code/core/Mage/Api/etc/wsdl2.xml b/app/code/core/Mage/Api/etc/wsdl2.xml index 7aa17e6054..8d2db7c8a9 100644 --- a/app/code/core/Mage/Api/etc/wsdl2.xml +++ b/app/code/core/Mage/Api/etc/wsdl2.xml @@ -226,4 +226,4 @@ - \ No newline at end of file + diff --git a/app/code/core/Mage/Backup/Model/Media.php b/app/code/core/Mage/Backup/Model/Media.php deleted file mode 100644 index 18acb3a7ba..0000000000 --- a/app/code/core/Mage/Backup/Model/Media.php +++ /dev/null @@ -1,25 +0,0 @@ -_read = Mage::getSingleton('core/resource')->getConnection('backup_read'); } + /** + * @deprecated after 1.4.0.0-alpha2 + */ + public function crear() + { + $this->clear(); + } + /** * Clear data * */ - public function crear() + public function clear() { $this->_foreignKeys = array(); } diff --git a/app/code/core/Mage/Backup/Model/View.php b/app/code/core/Mage/Backup/Model/View.php deleted file mode 100644 index 18acb3a7ba..0000000000 --- a/app/code/core/Mage/Backup/Model/View.php +++ /dev/null @@ -1,25 +0,0 @@ -setRenderer( $this->getLayout()->createBlock('adminhtml/catalog_product_edit_tab_price_tier') ->setPriceColumnHeader(Mage::helper('bundle')->__('Percent Discount')) + ->setPriceValidation('validate-greater-than-zero validate-percents') ); } } diff --git a/app/code/core/Mage/Bundle/Block/Adminhtml/Catalog/Product/Edit/Tab/Bundle/Option/Search/Grid.php b/app/code/core/Mage/Bundle/Block/Adminhtml/Catalog/Product/Edit/Tab/Bundle/Option/Search/Grid.php index b2cd554642..28f8fff64e 100644 --- a/app/code/core/Mage/Bundle/Block/Adminhtml/Catalog/Product/Edit/Tab/Bundle/Option/Search/Grid.php +++ b/app/code/core/Mage/Bundle/Block/Adminhtml/Catalog/Product/Edit/Tab/Bundle/Option/Search/Grid.php @@ -177,12 +177,13 @@ public function getStore() return Mage::app()->getStore(); } + /** + * Retrieve array of allowed product types for bundle selection product + * + * @return array + */ public function getAllowedSelectionTypes() { - $config = Mage::getConfig()->getNode('global/catalog/product/type/bundle')->asArray(); - return array_keys($config['allowed_selection_types']); + return Mage::helper('bundle')->getAllowedSelectionTypes(); } - - } - diff --git a/app/code/core/Mage/Bundle/Helper/Data.php b/app/code/core/Mage/Bundle/Helper/Data.php index fc889d2fc4..c77fd7e2da 100644 --- a/app/code/core/Mage/Bundle/Helper/Data.php +++ b/app/code/core/Mage/Bundle/Helper/Data.php @@ -33,5 +33,16 @@ */ class Mage_Bundle_Helper_Data extends Mage_Core_Helper_Abstract { + const XML_NODE_BUNDLE_PRODUCT_TYPE = 'global/catalog/product/type/bundle'; + /** + * Retrieve array of allowed product types for bundle selection product + * + * @return array + */ + public function getAllowedSelectionTypes() + { + $config = Mage::getConfig()->getNode(self::XML_NODE_BUNDLE_PRODUCT_TYPE); + return array_keys($config->allowed_selection_types->asArray()); + } } diff --git a/app/code/core/Mage/Bundle/Model/Mysql4/Indexer/Price.php b/app/code/core/Mage/Bundle/Model/Mysql4/Indexer/Price.php index 75421760e0..314a3536aa 100644 --- a/app/code/core/Mage/Bundle/Model/Mysql4/Indexer/Price.php +++ b/app/code/core/Mage/Bundle/Model/Mysql4/Indexer/Price.php @@ -96,6 +96,7 @@ protected function _prepareBundlePriceTable() . ' `min_price` DECIMAL(12,4) DEFAULT NULL,' . ' `max_price` DECIMAL(12,4) DEFAULT NULL,' . ' `tier_price` DECIMAL(12,4) DEFAULT NULL,' + . ' `base_tier` DECIMAL(12,4) DEFAULT NULL,' . ' PRIMARY KEY (`entity_id`,`customer_group_id`,`website_id`)' . ') ENGINE=MYISAM DEFAULT CHARSET=utf8', $write->quoteIdentifier($table)); @@ -111,7 +112,7 @@ protected function _prepareBundlePriceTable() */ protected function _getBundleSelectionTable() { - return $this->getMainTable() . '_bundle_selection'; + return $this->getMainTable() . '_bndl_sel'; } /** @@ -121,7 +122,7 @@ protected function _getBundleSelectionTable() */ protected function _getBundleOptionTable() { - return $this->getMainTable() . '_bundle_option'; + return $this->getMainTable() . '_bndl_opt'; } /** @@ -243,7 +244,7 @@ protected function _prepareBundlePriceByType($priceType, $entityIds = null) $finalPrice = new Zend_Db_Expr("IF({$specialExpr} > 0," . " ROUND($price * ({$specialExpr} / 100), 4), {$price})"); $tierPrice = new Zend_Db_Expr("IF({$tierExpr} IS NOT NULL," - . " ROUND({$price} * ({$tierExpr} / 100), 4), NULL)"); + . " ROUND({$price} - ({$price} * ({$tierExpr} / 100)), 4), NULL)"); } else { $finalPrice = new Zend_Db_Expr("0"); $tierPrice = new Zend_Db_Expr("IF({$tierExpr} IS NOT NULL, 0, NULL)"); @@ -253,11 +254,12 @@ protected function _prepareBundlePriceByType($priceType, $entityIds = null) 'price_type' => new Zend_Db_Expr($priceType), 'special_price' => $specialExpr, 'tier_percent' => $tierExpr, - 'price' => $finalPrice, 'orig_price' => new Zend_Db_Expr("IF({$price} IS NULL, 0, {$price})"), + 'price' => $finalPrice, 'min_price' => $finalPrice, 'max_price' => $finalPrice, - 'tier_price' => $tierPrice + 'tier_price' => $tierPrice, + 'base_tier' => $tierPrice, )); if (!is_null($entityIds)) { @@ -267,7 +269,7 @@ protected function _prepareBundlePriceByType($priceType, $entityIds = null) /** * Add additional external limitation */ - Mage::dispatchEvent('prepare_catalog_product_index_select', array( + Mage::dispatchEvent('catalog_product_prepare_index_select', array( 'select' => $select, 'entity_field' => new Zend_Db_Expr('e.entity_id'), 'website_field' => new Zend_Db_Expr('cw.website_id'), @@ -333,7 +335,8 @@ protected function _calculateBundleOptionPrice() 'price' => 'i.price', 'min_price' => $minPrice, 'max_price' => $maxPrice, - 'tier_price' => $tierPrice + 'tier_price' => $tierPrice, + 'base_tier' => 'i.base_tier' )); $query = $select->insertFromSelect($this->_getDefaultFinalPriceTable()); @@ -357,14 +360,14 @@ protected function _calculateBundleSelectionPrice($priceType) . "ROUND(i.price * (bs.selection_price_value / 100), 4), IF(i.special_price > 0, " . "ROUND(bs.selection_price_value * (i.special_price / 100), 4), bs.selection_price_value)) " . "* bs.selection_qty"); - $tierExpr = new Zend_Db_Expr("IF(i.tier_price IS NOT NULL, IF(bs.selection_price_type = 1, " - . "ROUND(i.tier_price * (bs.selection_price_value / 100), 4), IF(i.tier_percent > 0, " - . "ROUND(bs.selection_price_value * (i.tier_percent / 100), 4), bs.selection_price_value)) " - . "* bs.selection_qty, NULL)"); + $tierExpr = new Zend_Db_Expr("IF(i.base_tier IS NOT NULL, IF(bs.selection_price_type = 1, " + . "ROUND(i.base_tier - (i.base_tier * (bs.selection_price_value / 100)), 4), IF(i.tier_percent > 0, " + . "ROUND(bs.selection_price_value - (bs.selection_price_value * (i.tier_percent / 100)), 4), " + . "bs.selection_price_value)) * bs.selection_qty, NULL)"); } else { $priceExpr = new Zend_Db_Expr("IF(i.special_price > 0, ROUND(idx.min_price * (i.special_price / 100), 4), " . "idx.min_price) * bs.selection_qty"); - $tierExpr = new Zend_Db_Expr("IF(i.tier_price IS NOT NULL, ROUND(idx.min_price * (i.tier_price / 100), 4) " + $tierExpr = new Zend_Db_Expr("IF(i.base_tier IS NOT NULL, ROUND(idx.min_price * (i.base_tier / 100), 4) " . "* bs.selection_qty, NULL)"); } @@ -385,6 +388,10 @@ protected function _calculateBundleSelectionPrice($priceType) 'bs.product_id = idx.entity_id AND i.customer_group_id = idx.customer_group_id' . ' AND i.website_id = idx.website_id', array()) + ->join( + array('e' => $this->getTable('catalog/product')), + 'bs.product_id = e.entity_id AND e.required_options=0', + array()) ->where('i.price_type=?', $priceType) ->columns(array( 'group_type' => new Zend_Db_Expr("IF(bo.type = 'select' OR bo.type = 'radio', 0, 1)"), @@ -407,7 +414,7 @@ protected function _calculateBundleSelectionPrice($priceType) */ protected function _prepareBundlePrice($entityIds = null) { - $this->_prepareWebsiteDateTable(); + $this->_prepareTierPriceIndex($entityIds); $this->_prepareBundlePriceTable(); $this->_prepareBundlePriceByType(Mage_Bundle_Model_Product_Price::PRICE_TYPE_FIXED, $entityIds); $this->_prepareBundlePriceByType(Mage_Bundle_Model_Product_Price::PRICE_TYPE_DYNAMIC, $entityIds); @@ -420,7 +427,7 @@ protected function _prepareBundlePrice($entityIds = null) 'i.website_id = wd.website_id', array()); Mage::dispatchEvent('prepare_catalog_product_price_index_table', array( - 'index_table' => array('i' => $this->_getDefaultFinalPriceTable()), + 'index_table' => array('i' => $this->_getBundlePriceTable()), 'select' => $select, 'entity_id' => 'i.entity_id', 'customer_group_id' => 'i.customer_group_id', @@ -431,8 +438,72 @@ protected function _prepareBundlePrice($entityIds = null) $this->_calculateBundleOptionPrice(); $this->_applyCustomOption(); + $this->_movePriceDataToIndexTable(); return $this; } + + /** + * Retrieve table name for product tier price index + * + * @return string + */ + protected function _getTierPriceIndexTable() + { + return $this->getIdxTable($this->getValueTable('catalog/product', 'tier_price')); + } + + /** + * Prepare percentage tier price for bundle products + * + * @see Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Indexer_Price::_prepareTierPriceIndex + * @param int|array $entityIds + * @return Mage_Bundle_Model_Mysql4_Indexer_Price + */ + protected function _prepareTierPriceIndex($entityIds = null) + { + $adapter = $this->_getWriteAdapter(); + + // remove index by bundle products + $select = $adapter->select() + ->from(array('i' => $this->_getTierPriceIndexTable()), null) + ->join( + array('e' => $this->getTable('catalog/product')), + 'i.entity_id=e.entity_id', + array()) + ->where('e.type_id=?', $this->getTypeId()); + $query = $select->deleteFromSelect('i'); + $adapter->query($query); + + $select = $adapter->select() + ->from( + array('tp' => $this->getValueTable('catalog/product', 'tier_price')), + array('entity_id')) + ->join( + array('e' => $this->getTable('catalog/product')), + 'tp.entity_id=e.entity_id', + array()) + ->join( + array('cg' => $this->getTable('customer/customer_group')), + 'tp.all_groups = 1 OR (tp.all_groups = 0 AND tp.customer_group_id = cg.customer_group_id)', + array('customer_group_id')) + ->join( + array('cw' => $this->getTable('core/website')), + 'tp.website_id = 0 OR tp.website_id = cw.website_id', + array('website_id')) + ->where('cw.website_id != 0') + ->where('e.type_id=?', $this->getTypeId()) + ->columns(new Zend_Db_Expr('MIN(tp.value)')) + ->group(array('tp.entity_id', 'cg.customer_group_id', 'cw.website_id')); + + if (!empty($entityIds)) { + $select->where('tp.entity_id IN(?)', $entityIds); + } + + $query = $select->insertFromSelect($this->_getTierPriceIndexTable()); + $adapter->query($query); + + return $this; + } } diff --git a/app/code/core/Mage/Bundle/Model/Mysql4/Indexer/Stock.php b/app/code/core/Mage/Bundle/Model/Mysql4/Indexer/Stock.php index b9e9d43b96..90755c5c65 100644 --- a/app/code/core/Mage/Bundle/Model/Mysql4/Indexer/Stock.php +++ b/app/code/core/Mage/Bundle/Model/Mysql4/Indexer/Stock.php @@ -65,7 +65,7 @@ public function reindexEntity($entityIds) */ protected function _getBundleOptionTable() { - return $this->getMainTable() . '_bundle_option'; + return $this->getMainTable() . '_bndl_opt'; } /** @@ -114,7 +114,7 @@ protected function _prepareBundleOptionStockData($entityIds = null) array('cis' => $this->getTable('cataloginventory/stock')), '', array('stock_id')) - ->join( + ->joinLeft( array('bs' => $this->getTable('bundle/selection')), 'bs.option_id = bo.option_id', array()) @@ -122,12 +122,16 @@ protected function _prepareBundleOptionStockData($entityIds = null) array('i' => $this->getIdxTable()), 'i.product_id = bs.product_id AND i.website_id = cw.website_id AND i.stock_id = cis.stock_id', array()) + ->joinLeft( + array('e' => $this->getTable('catalog/product')), + 'e.entity_id = bs.product_id', + array()) ->where('cw.website_id != 0') ->where('bo.required = ?', 1) ->group(array('bo.parent_id', 'cw.website_id', 'cis.stock_id', 'bo.option_id')) ->columns(array( 'option_id' => 'bo.option_id', - 'status' => new Zend_Db_Expr("MAX(i.stock_status)") + 'status' => new Zend_Db_Expr("MAX(IF(e.required_options = 0, i.stock_status, 0))") )); if (!is_null($entityIds)) { @@ -185,7 +189,7 @@ protected function _prepareIndexTable($entityIds = null) . 'cisi.is_in_stock, 1)'); } - $select->columns(array('status' => new Zend_Db_Expr("LEAST(MAX(o.stock_status), {$statusExpr})"))); + $select->columns(array('status' => new Zend_Db_Expr("LEAST(MIN(o.stock_status), {$statusExpr})"))); if (!is_null($entityIds)) { $select->where('e.entity_id IN(?)', $entityIds); diff --git a/app/code/core/Mage/Bundle/Model/Mysql4/Option/Collection.php b/app/code/core/Mage/Bundle/Model/Mysql4/Option/Collection.php index abc01b2379..0c9a155bf6 100644 --- a/app/code/core/Mage/Bundle/Model/Mysql4/Option/Collection.php +++ b/app/code/core/Mage/Bundle/Model/Mysql4/Option/Collection.php @@ -44,11 +44,11 @@ public function joinValues($storeId) $this->getSelect()->joinLeft(array('option_value_default' => $this->getTable('bundle/option_value')), '`main_table`.`option_id` = `option_value_default`.`option_id` and `option_value_default`.`store_id` = "0"', array()) - ->from('', array('default_title' => 'option_value_default.title')); + ->columns(array('default_title' => 'option_value_default.title')); if ($storeId !== null) { $this->getSelect() - ->from('', array('title' => 'IFNULL(`option_value`.`title`, `option_value_default`.`title`)')) + ->columns(array('title' => 'IFNULL(`option_value`.`title`, `option_value_default`.`title`)')) ->joinLeft(array('option_value' => $this->getTable('bundle/option_value')), '`main_table`.`option_id` = `option_value`.`option_id` and `option_value`.`store_id` = "' . $storeId . '"', array()); diff --git a/app/code/core/Mage/Bundle/Model/Mysql4/Price/Index.php b/app/code/core/Mage/Bundle/Model/Mysql4/Price/Index.php index 5a67ec1c1c..6df208a4ec 100644 --- a/app/code/core/Mage/Bundle/Model/Mysql4/Price/Index.php +++ b/app/code/core/Mage/Bundle/Model/Mysql4/Price/Index.php @@ -28,9 +28,11 @@ /** * Bundle Product Price Index Resource model * - * @category Mage - * @package Mage_Bundle - * @author Magento Core Team + * @category Mage + * @package Mage_Bundle + * @author Magento Core Team + * @deprecated since 1.4.0.0 + * @see Mage_Bundle_Model_Mysql4_Indexer_Price */ class Mage_Bundle_Model_Mysql4_Price_Index extends Mage_Core_Model_Mysql4_Abstract { @@ -123,7 +125,7 @@ public function getProducts($product = null, $lastEntityId = 0, $limit = 100) array('e' => $this->getTable('catalog/product')), array('entity_id')) ->where('e.type_id=?', 'bundle'); - if ($product instanceof Mage_Core_Model_Product) { + if ($product instanceof Mage_Catalog_Model_Product) { $select->where('e.entity_id=?', $product->getId()); } elseif ($product instanceof Mage_Catalog_Model_Product_Condition_Interface) { diff --git a/app/code/core/Mage/Bundle/Model/Mysql4/Selection.php b/app/code/core/Mage/Bundle/Model/Mysql4/Selection.php index 035b9b4a8e..2b38a8f7ef 100644 --- a/app/code/core/Mage/Bundle/Model/Mysql4/Selection.php +++ b/app/code/core/Mage/Bundle/Model/Mysql4/Selection.php @@ -160,29 +160,19 @@ public function getChildrenIds($parentId, $required = true) } /** - * Retrieve parent ids array by requered child + * Retrieve array of related bundle product ids by selection product id(s) * * @param int|array $childId * @return array */ public function getParentIdsByChild($childId) { - $parentIds = array(); + $adapter = $this->_getReadAdapter(); + $select = $adapter->select() + ->distinct(true) + ->from($this->getMainTable(), 'parent_product_id') + ->where('product_id IN(?)', $childId); - $select = $this->_getReadAdapter()->select() - ->from( - array('tbl_selection' => $this->getMainTable()), - array('product_id', 'parent_product_id', 'option_id')) - ->join( - array('tbl_option' => $this->getTable('bundle/option')), - '`tbl_option`.`option_id` = `tbl_selection`.`option_id`', - array('required') - ) - ->where('`tbl_selection`.`product_id` IN(?)', $childId); - foreach ($this->_getReadAdapter()->fetchAll($select) as $row) { - $parentIds[] = $row['parent_product_id']; - } - - return $parentIds; + return $adapter->fetchCol($select); } } diff --git a/app/code/core/Mage/Bundle/Model/Observer.php b/app/code/core/Mage/Bundle/Model/Observer.php index 816018ff8a..6ccd3d501a 100644 --- a/app/code/core/Mage/Bundle/Model/Observer.php +++ b/app/code/core/Mage/Bundle/Model/Observer.php @@ -75,39 +75,60 @@ public function prepareProductSave($observer) */ public function appendUpsellProducts($observer) { + /* @var $product Mage_Catalog_Model_Product */ $product = $observer->getEvent()->getProduct(); - if ($product->getTypeId() != Mage_Catalog_Model_Product_Type::TYPE_SIMPLE) { + /** + * Check is current product type is allowed for bundle selection product type + */ + if (!in_array($product->getTypeId(), Mage::helper('bundle')->getAllowedSelectionTypes())) { return $this; } + /* @var $collection Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Link_Product_Collection */ $collection = $observer->getEvent()->getCollection(); - $limit = $observer->getEvent()->getLimit(); + $limit = $observer->getEvent()->getLimit(); + if (is_array($limit)) { + if (isset($limit['upsell'])) { + $limit = $limit['upsell']; + } else { + $limit = 0; + } + } - $bundles = Mage::getModel('catalog/product')->getResourceCollection() - ->addAttributeToSelect(Mage::getSingleton('catalog/config')->getProductAttributes()) - ->addStoreFilter() - ->addMinimalPrice() + /* @var $resource Mage_Bundle_Model_Mysql4_Selection */ + $resource = Mage::getResourceSingleton('bundle/selection'); - ->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()); + $productIds = array_keys($collection->getItems()); + if ($limit <= count($productIds)) { + return $this; + } + + // retrieve bundle product ids + $bundleIds = $resource->getParentIdsByChild($product->getId()); + // exclude up-sell product ids + $bundleIds = array_diff($bundleIds, $productIds); - $ids = $collection->getAllIds(); - if (count($ids)) { - $bundles->addIdFilter($ids, true); + if (!$bundleIds) { + return $this; } - Mage::getSingleton('catalog/product_status')->addSaleableFilterToCollection($bundles); - Mage::getSingleton('catalog/product_visibility')->addVisibleInCatalogFilterToCollection($bundles); + /* @var $bundleCollection Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Collection */ + $bundleCollection = $product->getCollection() + ->addAttributeToSelect(Mage::getSingleton('catalog/config')->getProductAttributes()) + ->addStoreFilter() + ->addMinimalPrice() + ->addFinalPrice() + ->addTaxPercents(); - $bundles->getSelect()->group('entity_id'); + Mage::getSingleton('catalog/product_visibility') + ->addVisibleInCatalogFilterToCollection($bundleCollection); - if (isset($limit['bundle'])) { - $bundles->setPageSize($limit['bundle']); - } - $bundles->load(); + $bundleCollection->setPageSize($limit - count($productIds)) + ->addFieldToFilter('entity_id', array('in' => $bundleIds)) + ->setFlag('do_not_use_category_id', true); - foreach ($bundles->getItems() as $item) { + foreach ($bundleCollection as $item) { $collection->addItem($item); } @@ -135,27 +156,17 @@ public function appendBundleSelectionData($observer) } /** - * loadding product options for products if there is one bundle in collection + * Add price index data for catalog product collection * only for front end * - * @param Varien_Object $observer + * @param Varien_Event_Observer $observer * @return Mage_Bundle_Model_Observer */ public function loadProductOptions($observer) { $collection = $observer->getEvent()->getCollection(); /* @var $collection Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Collection */ - $hasBundle = false; - foreach ($collection->getItems() as $item){ - if ($item->getTypeId() == Mage_Catalog_Model_Product_Type::TYPE_BUNDLE) { - $hasBundle = true; - } - } - - if ($hasBundle) { - Mage::getSingleton('bundle/price_index') - ->addPriceIndexToCollection($collection); - } + $collection->addPriceData(); return $this; } @@ -236,6 +247,8 @@ public function setAttributeTabBlock($observer) /** * Add price index to bundle product after load * + * @deprecated since 1.4.0.0 + * * @param Varien_Event_Observer $observer * @return Mage_Bundle_Model_Observer */ @@ -253,6 +266,9 @@ public function catalogProductLoadAfter(Varien_Event_Observer $observer) /** * CatalogIndex Indexer after plain reindex process * + * @deprecated since 1.4.0.0 + * @see Mage_Bundle_Model_Mysql4_Indexer_Price + * * @param Varien_Event_Observer $observer * @return Mage_Bundle_Model_Observer */ diff --git a/app/code/core/Mage/Bundle/Model/Price/Index.php b/app/code/core/Mage/Bundle/Model/Price/Index.php index 413b3eabd3..c1edb52d7d 100644 --- a/app/code/core/Mage/Bundle/Model/Price/Index.php +++ b/app/code/core/Mage/Bundle/Model/Price/Index.php @@ -28,9 +28,11 @@ /** * Bundle Product Price Index * - * @category Mage - * @package Mage_Bundle - * @author Magento Core Team + * @category Mage + * @package Mage_Bundle + * @author Magento Core Team + * @deprecated since 1.4.0.0 + * @see Mage_Bundle_Model_Mysql4_Indexer_Price */ class Mage_Bundle_Model_Price_Index extends Mage_Core_Model_Abstract { diff --git a/app/code/core/Mage/Bundle/Model/Product/Price.php b/app/code/core/Mage/Bundle/Model/Product/Price.php index a23072c48a..1084ca067f 100644 --- a/app/code/core/Mage/Bundle/Model/Product/Price.php +++ b/app/code/core/Mage/Bundle/Model/Product/Price.php @@ -64,14 +64,16 @@ public function getFinalPrice($qty=null, $product) } $finalPrice = $product->getPrice(); + $basePrice = $finalPrice; /** * Just product with fixed price calculation has price */ if ($finalPrice) { - $tierPrice = $this->_applyTierPrice($product, $qty, $finalPrice); - $specialPrice = $this->_applySpecialPrice($product, $finalPrice); - $finalPrice = min(array($tierPrice, $specialPrice)); + $tierPrice = $this->_applyTierPrice($product, $qty, $finalPrice); + $specialPrice = $this->_applySpecialPrice($product, $finalPrice); + $finalPrice = min(array($tierPrice, $specialPrice)); + $product->setFinalPrice($finalPrice); Mage::dispatchEvent('catalog_product_get_final_price', array('product'=>$product)); $finalPrice = $product->getData('final_price'); @@ -119,42 +121,56 @@ public function getChildFinalPrice($product, $productQty, $childProduct, $childP return $this->getSelectionFinalPrice($product, $childProduct, $productQty, $childProductQty, false); } + /** + * Retrieve Price + * + * @param unknown_type $product + * @param unknown_type $which + * @return unknown + */ public function getPrices($product, $which = null) { // check calculated price index - if ($product->getData('_price_index')) { - $minimalPrice = $product->getData('_price_index_min_price'); - $maximalPrice = $product->getData('_price_index_max_price'); - } - else { + if ($product->getData('min_price') && $product->getData('max_price')) { + $minimalPrice = $product->getData('min_price'); + $maximalPrice = $product->getData('max_price'); + } else { /** * Check if product price is fixed */ - if ($product->getPriceType()) { - $minimalPrice = $maximalPrice = $product->getFinalPrice(); - } else { - $minimalPrice = $maximalPrice = $product->getPrice(); + $finalPrice = $product->getFinalPrice(); + if ($product->getPriceType() == self::PRICE_TYPE_FIXED) { + $minimalPrice = $maximalPrice = $finalPrice; + } else { // PRICE_TYPE_DYNAMIC + $minimalPrice = $maximalPrice = 0; } - if ($options = $this->getOptions($product)) { - foreach ($options as $option) { - if ($option->getSelections()) { + $options = $this->getOptions($product); + if ($options) { + foreach ($options as $option) { + /* @var $option Mage_Bundle_Model_Option */ + $selections = $option->getSelections(); + if ($selections) { $selectionMinimalPrices = array(); $selectionMaximalPrices = array(); foreach ($option->getSelections() as $selection) { + /* @var $selection Mage_Bundle_Model_Selection */ if (!$selection->isSalable()) { + /** + * @todo CatalogInventory Show out of stock Products + */ continue; } $qty = $selection->getSelectionQty(); - if ($selection->getSelectionCanChangeQty() && $option->getType() != 'multi' && $option->getType() != 'checkbox') { + if ($selection->getSelectionCanChangeQty() && $option->isMultiSelection()) { $qty = min(1, $qty); } - $selectionMinimalPrices[] = $this->getSelectionPrice($product, $selection, $qty); - $selectionMaximalPrices[] = $this->getSelectionPrice($product, $selection); + $selectionMinimalPrices[] = $this->getSelectionFinalPrice($product, $selection, 1, $qty); + $selectionMaximalPrices[] = $this->getSelectionFinalPrice($product, $selection, 1); } if (count($selectionMinimalPrices)) { @@ -172,15 +188,24 @@ public function getPrices($product, $which = null) } } - // incorrect for fixed - //$this->_applySpecialPrice($product, $minimalPrice); + if ($product->getPriceType() == self::PRICE_TYPE_DYNAMIC) { + $minimalPrice = $this->_applySpecialPrice($product, $minimalPrice); + $maximalPrice = $this->_applySpecialPrice($product, $maximalPrice); + } + + $customOptions = $product->getOptions(); - if ($customOptions = $product->getOptions()) { + if ($product->getPriceType() == self::PRICE_TYPE_FIXED && $customOptions) { foreach ($customOptions as $customOption) { - if ($values = $customOption->getValues()) { + /* @var $customOption Mage_Catalog_Model_Product_Option */ + $values = $customOption->getValues(); + if ($values) { $prices = array(); foreach ($values as $value) { - $prices[] = $value->getPrice(); + /* @var $value Mage_Catalog_Model_Product_Option_Value */ + $valuePrice = $value->getPrice(true); + + $prices[] = $valuePrice; } if (count($prices)) { if ($customOption->getIsRequire()) { @@ -189,22 +214,24 @@ public function getPrices($product, $which = null) $maximalPrice += max($prices); } } else { + $valuePrice = $customOption->getPrice(true); + if ($customOption->getIsRequire()) { - $minimalPrice += $customOption->getPrice(); + $minimalPrice += $valuePrice; } - $maximalPrice += $customOption->getPrice(); + $maximalPrice += $valuePrice; } } } } - if (is_null($which)) { - return array($minimalPrice, $maximalPrice); - } else if ($which = 'max') { + + if ($which == 'max') { return $maximalPrice; - } else if ($which = 'min') { + } else if ($which == 'min') { return $minimalPrice; } - return 0; + + return array($minimalPrice, $maximalPrice); } /** @@ -274,10 +301,10 @@ public function getSelectionPrice($bundleProduct, $selectionProduct, $selectionQ } return $selectionPrice; } else { - if ($selectionProduct->getSelectionPriceType()) { - return ($bundleProduct->getPrice()*$selectionProduct->getSelectionPriceValue()/100)*$selectionQty; + if ($selectionProduct->getSelectionPriceType()) { // percent + return $bundleProduct->getPrice() * ($selectionProduct->getSelectionPriceValue() / 100) * $selectionQty; } else { - return $selectionProduct->getSelectionPriceValue()*$selectionQty; + return $selectionProduct->getSelectionPriceValue() * $selectionQty; } } } @@ -332,8 +359,9 @@ protected function _applyTierPrice($product, $qty, $finalPrice) } $tierPrice = $product->getTierPrice($qty); + if (is_numeric($tierPrice)) { - $tierPrice = $finalPrice - ($finalPrice*$tierPrice)/100; + $tierPrice = $finalPrice - ($finalPrice * ($tierPrice / 100)); $finalPrice = min($finalPrice, $tierPrice); } return $finalPrice; @@ -393,15 +421,30 @@ public function getTierPrice($qty=null, $product) // found tier qty is same as current tier qty but current tier group is ALL_GROUPS continue; } - $prevPrice = $price['website_price']; - $prevQty = $price['price_qty']; - $prevGroup = $price['cust_group']; + + if ($price['website_price'] > $prevPrice) { + $prevPrice = $price['website_price']; + $prevQty = $price['price_qty']; + $prevGroup = $price['cust_group']; + } } + return $prevPrice; } else { - foreach ($prices as $i=>$price) { - if ($price['cust_group']!=$custGroup && $price['cust_group']!=$allGroups) { + $qtyCache = array(); + foreach ($prices as $i => $price) { + if ($price['cust_group'] != $custGroup && $price['cust_group'] != $allGroups) { unset($prices[$i]); + } else if (isset($qtyCache[$price['price_qty']])) { + $j = $qtyCache[$price['price_qty']]; + if ($prices[$j]['website_price'] < $price['website_price']) { + unset($prices[$j]); + $qtyCache[$price['price_qty']] = $i; + } else { + unset($prices[$i]); + } + } else { + $qtyCache[$price['price_qty']] = $i; } } } @@ -565,6 +608,16 @@ public static function calculateSpecialPrice($finalPrice, $specialPrice, $specia return $finalPrice; } + /** + * Check is tier price value fixed or percent of original price + * + * @return bool + */ + public function isTierPriceFixed() + { + return false; + } + /* public function getCustomOptionPrices($productId, $storeId, $which = null) { diff --git a/app/code/core/Mage/Bundle/etc/config.xml b/app/code/core/Mage/Bundle/etc/config.xml index 547278fc81..44d78bd00f 100644 --- a/app/code/core/Mage/Bundle/etc/config.xml +++ b/app/code/core/Mage/Bundle/etc/config.xml @@ -112,6 +112,7 @@ + @@ -188,14 +189,6 @@ - - - - bundle/observer - catalogProductLoadAfter - - - diff --git a/app/code/core/Mage/Catalog/Block/Layer/Filter/Decimal.php b/app/code/core/Mage/Catalog/Block/Layer/Filter/Decimal.php new file mode 100644 index 0000000000..acf287f445 --- /dev/null +++ b/app/code/core/Mage/Catalog/Block/Layer/Filter/Decimal.php @@ -0,0 +1,57 @@ + + */ +class Mage_Catalog_Block_Layer_Filter_Decimal extends Mage_Catalog_Block_Layer_Filter_Abstract +{ + /** + * Initialize Decimal Filter Model + * + */ + public function __construct() + { + parent::__construct(); + $this->_filterModelName = 'catalog/layer_filter_decimal'; + } + + /** + * Prepare filter process + * + * @return Mage_Catalog_Block_Layer_Filter_Decimal + */ + protected function _prepareFilter() + { + $this->_filter->setAttributeModel($this->getAttributeModel()); + return $this; + } +} diff --git a/app/code/core/Mage/Catalog/Block/Layer/View.php b/app/code/core/Mage/Catalog/Block/Layer/View.php index a03966f30a..2fa07550d8 100644 --- a/app/code/core/Mage/Catalog/Block/Layer/View.php +++ b/app/code/core/Mage/Catalog/Block/Layer/View.php @@ -63,8 +63,10 @@ protected function _prepareLayout() $filterableAttributes = $this->_getFilterableAttributes(); foreach ($filterableAttributes as $attribute) { $filterBlockName = $this->_getAttributeFilterBlockName(); - if ($attribute->getFrontendInput() == 'price') { + if ($attribute->getAttributeCode() == 'price') { $filterBlockName = 'catalog/layer_filter_price'; + } else if ($attribute->getBackendType() == 'decimal') { + $filterBlockName = 'catalog/layer_filter_decimal'; } $this->setChild($attribute->getAttributeCode().'_filter', diff --git a/app/code/core/Mage/Catalog/Block/Product/Abstract.php b/app/code/core/Mage/Catalog/Block/Product/Abstract.php index 5d833b41f9..ccb92ea3c1 100644 --- a/app/code/core/Mage/Catalog/Block/Product/Abstract.php +++ b/app/code/core/Mage/Catalog/Block/Product/Abstract.php @@ -439,4 +439,24 @@ public function getPageLayout() { return $this->helper('page/layout')->getCurrentPageLayout(); } + + /** + * If exists price template block, retrieve price blocks from it + * + * @return Mage_Catalog_Block_Product_Abstract + */ + protected function _prepareLayout() + { + parent::_prepareLayout(); + + /* @var $block Mage_Catalog_Block_Product_Price_Template */ + $block = $this->getLayout()->getBlock('catalog_product_price_template'); + if ($block) { + foreach ($block->getPriceBlockTypes() as $type => $priceBlock) { + $this->addPriceBlockType($type, $priceBlock['block'], $priceBlock['template']); + } + } + + return $this; + } } diff --git a/app/code/core/Mage/Catalog/Block/Product/List/Toolbar.php b/app/code/core/Mage/Catalog/Block/Product/List/Toolbar.php index 057fb9a3c4..4d66ccac52 100644 --- a/app/code/core/Mage/Catalog/Block/Product/List/Toolbar.php +++ b/app/code/core/Mage/Catalog/Block/Product/List/Toolbar.php @@ -32,8 +32,22 @@ * @package Mage_Catalog * @author Magento Core Team */ -class Mage_Catalog_Block_Product_List_Toolbar extends Mage_Page_Block_Html_Pager +class Mage_Catalog_Block_Product_List_Toolbar extends Mage_Core_Block_Template { + /** + * Products collection + * + * @var Mage_Core_Model_Mysql4_Collection_Abstract + */ + protected $_collection = null; + + /** + * GET parameter page variable + * + * @var string + */ + protected $_pageVarName = 'p'; + /** * GET parameter order variable * @@ -55,6 +69,13 @@ class Mage_Catalog_Block_Product_List_Toolbar extends Mage_Page_Block_Html_Pager */ protected $_modeVarName = 'mode'; + /** + * GET parameter limit variable + * + * @var string + */ + protected $_limitVarName = 'limit'; + /** * List of available order fields * @@ -104,6 +125,20 @@ class Mage_Catalog_Block_Product_List_Toolbar extends Mage_Page_Block_Html_Pager */ protected $_viewMode = null; + /** + * Available page limits for different list modes + * + * @var array + */ + protected $_availableLimit = array(); + + /** + * Default limits per page + * + * @var array + */ + protected $_defaultAvailableLimit = array(10=>10,20=>20,50=>50); + /** * Retrieve Catalog Config object * @@ -155,13 +190,41 @@ protected function _construct() */ public function setCollection($collection) { - parent::setCollection($collection); + $this->_collection = $collection; + + $this->_collection->setCurPage($this->getCurrentPage()); + + // we need to set pagination only if passed value integer and more that 0 + $limit = (int)$this->getLimit(); + if ($limit) { + $this->_collection->setPageSize($limit); + } if ($this->getCurrentOrder()) { - $this->getCollection()->setOrder($this->getCurrentOrder(), $this->getCurrentDirection()); + $this->_collection->setOrder($this->getCurrentOrder(), $this->getCurrentDirection()); } return $this; } + /** + * Return products collection instance + * + * @return Mage_Core_Model_Mysql4_Collection_Abstract + */ + public function getCollection() + { + return $this->_collection; + } + + /** + * Getter for $_pageVarName + * + * @return string + */ + public function getPageVarName() + { + return $this->_pageVarName; + } + /** * Retrieve order field GET var name * @@ -192,6 +255,29 @@ public function getModeVarName() return $this->_modeVarName; } + /** + * Getter for $_limitVarName + * + * @return string + */ + public function getLimitVarName() + { + return $this->_limitVarName; + } + + /** + * Return current page from request + * + * @return int + */ + public function getCurrentPage() + { + if ($page = (int) $this->getRequest()->getParam($this->getPageVarName())) { + return $page; + } + return 1; + } + /** * Retrieve current order field * @@ -352,6 +438,22 @@ public function getOrderUrl($order, $direction) )); } + /** + * Return current URL with rewrites and additional parameters + * + * @param array $params Query parameters + * @return string + */ + public function getPagerUrl($params=array()) + { + $urlParams = array(); + $urlParams['_current'] = true; + $urlParams['_escape'] = true; + $urlParams['_use_rewrite'] = true; + $urlParams['_query'] = $params; + return $this->getUrl('*/*/*', $urlParams); + } + /** * Retrieve current View mode * @@ -362,15 +464,15 @@ public function getCurrentMode() $mode = $this->getRequest()->getParam($this->getModeVarName()); if ($mode) { Mage::getSingleton('catalog/session')->setDisplayMode($mode); - } - else { + } else { $mode = Mage::getSingleton('catalog/session')->getDisplayMode(); } if ($mode && isset($this->_availableMode[$mode])) { return $mode; } - return current(array_keys($this->_availableMode)); + $modes = array_keys($this->_availableMode); + return current($modes); } /** @@ -529,25 +631,33 @@ public function addPagerLimit($mode, $value, $label='') */ public function getAvailableLimit() { - if ($this->getCurrentMode() == 'list') { - if (isset($this->_availableLimit['list'])) { - return $this->_availableLimit['list']; - } - $perPageValues = (string)Mage::getStoreConfig('catalog/frontend/list_per_page_values'); - $perPageValues = explode(',', $perPageValues); - $perPageValues = array_combine($perPageValues, $perPageValues); - return ($perPageValues + array('all'=>$this->__('All'))); + $currentMode = $this->getCurrentMode(); + if (in_array($currentMode, array('list', 'grid'))) { + return $this->_getAvailableLimit($currentMode); + } else { + return $this->_defaultAvailableLimit; } - elseif ($this->getCurrentMode() == 'grid') { - if (isset($this->_availableLimit['grid'])) { - return $this->_availableLimit['grid']; - } - $perPageValues = (string)Mage::getStoreConfig('catalog/frontend/grid_per_page_values'); - $perPageValues = explode(',', $perPageValues); - $perPageValues = array_combine($perPageValues, $perPageValues); + } + + /** + * Retrieve available limits for specified view mode + * + * @return array + */ + protected function _getAvailableLimit($mode) + { + if (isset($this->_availableLimit[$mode])) { + return $this->_availableLimit[$mode]; + } + $perPageConfigKey = 'catalog/frontend/' . $mode . '_per_page_values'; + $perPageValues = (string)Mage::getStoreConfig($perPageConfigKey); + $perPageValues = explode(',', $perPageValues); + $perPageValues = array_combine($perPageValues, $perPageValues); + if (Mage::getStoreConfigFlag('design/pagination/list_allow_all')) { return ($perPageValues + array('all'=>$this->__('All'))); + } else { + return $perPageValues; } - return parent::getAvailableLimit(); } /** @@ -591,4 +701,66 @@ public function getLimitUrl($limit) $this->getPageVarName() => null )); } + + public function isLimitCurrent($limit) + { + return $limit == $this->getLimit(); + } + + public function getFirstNum() + { + $collection = $this->getCollection(); + return $collection->getPageSize()*($collection->getCurPage()-1)+1; + } + + public function getLastNum() + { + $collection = $this->getCollection(); + return $collection->getPageSize()*($collection->getCurPage()-1)+$collection->count(); + } + + public function getTotalNum() + { + return $this->getCollection()->getSize(); + } + + public function isFirstPage() + { + return $this->getCollection()->getCurPage() == 1; + } + + public function getLastPageNum() + { + return $this->getCollection()->getLastPageNumber(); + } + + /** + * Render pagination HTML + * + * @return string + */ + public function getPagerHtml() + { + $pagerBlock = $this->getChild('product_list_toolbar_pager'); + + if ($pagerBlock instanceof Varien_Object) { + + /* @var $pagerBlock Mage_Page_Block_Html_Pager */ + $pagerBlock->setAvailableLimit($this->getAvailableLimit()); + + $pagerBlock->setUseContainer(false) + ->setShowPerPage(false) + ->setShowAmounts(false) + ->setLimitVarName($this->getLimitVarName()) + ->setPageVarName($this->getPageVarName()) + ->setLimit($this->getLimit()) + ->setFrameLength(Mage::getStoreConfig('design/pagination/pagination_frame')) + ->setJump(Mage::getStoreConfig('design/pagination/pagination_frame_skip')) + ->setCollection($this->getCollection()); + + return $pagerBlock->toHtml(); + } + + return ''; + } } diff --git a/app/code/core/Mage/Catalog/Block/Product/List/Toolbar/Pager.php b/app/code/core/Mage/Catalog/Block/Product/List/Toolbar/Pager.php new file mode 100644 index 0000000000..3ec3d59237 --- /dev/null +++ b/app/code/core/Mage/Catalog/Block/Product/List/Toolbar/Pager.php @@ -0,0 +1,379 @@ + + */ +class Mage_Catalog_Block_Product_List_Toolbar_Pager extends Mage_Page_Block_Html_Pager +{ + /** + * Pages quantity per frame + * @var int + */ + protected $_frameLength = 5; + + /** + * Next/previous page position relatively to the current frame + * @var int + */ + protected $_jump = 5; + + /** + * Frame initialization flag + * @var bool + */ + protected $_frameInitialized = false; + + /** + * Start page position in frame + * @var int + */ + protected $_frameStart; + + /** + * Finish page position in frame + * @var int + */ + protected $_frameEnd; + + /** + * Custom limit + * @var int + */ + protected $_limit; + + /** + * Define default template and settings + */ + protected function _construct() + { + parent::_construct(); + $this->setTemplate('catalog/product/list/toolbar/pager.phtml'); + } + + /** + * Getter for $_frameStart + * + * @return int + */ + public function getFrameStart() + { + $this->_initFrame(); + return $this->_frameStart; + } + + /** + * Getter for $_frameEnd + * + * @return int + */ + public function getFrameEnd() + { + $this->_initFrame(); + return $this->_frameEnd; + } + + /** + * Return array of pages in frame + * + * @return array + */ + public function getFramePages() + { + $start = $this->getFrameStart(); + $end = $this->getFrameEnd(); + return range($start, $end); + } + + /** + * Return page number of Previous jump + * + * @return int + */ + public function getPreviousJumpPage() + { + if (!$this->getJump()) { + return null; + } + $frameStart = $this->getFrameStart(); + if ($frameStart - 1 > 1) { + return max(2, $frameStart - $this->getJump()); + } + + return null; + } + + /** + * Prepare URL for Previous Jump + * + * @return string + */ + public function getPreviousJumpUrl() + { + return $this->getPageUrl($this->getPreviousJumpPage()); + } + + /** + * Return page number of Next jump + * + * @return int + */ + public function getNextJumpPage() + { + if (!$this->getJump()) { + return null; + } + $frameEnd = $this->getFrameEnd(); + if ($this->getLastPageNum() - $frameEnd > 1) { + return min($this->getLastPageNum() - 1, $frameEnd + $this->getJump()); + } + + return null; + } + + /** + * Prepare URL for Next Jump + * + * @return string + */ + public function getNextJumpUrl() + { + return $this->getPageUrl($this->getNextJumpPage()); + } + + /** + * Getter for $_frameLength + * + * @return int + */ + public function getFrameLength() + { + return $this->_frameLength; + } + + /** + * Getter for $_jump + * + * @return int + */ + public function getJump() + { + return $this->_jump; + } + + /** + * Setter for $_frameLength + * + * @param int $frame + * @return Mage_Catalog_Block_Product_List_Toolbar_Pager + */ + public function setFrameLength($frame) + { + $frame = abs(intval($frame)); + if ($this->getFrameLength() != $frame) { + $this->_setFrameInitialized(false); + $this->_frameLength = $frame; + } + + return $this; + } + + /** + * Setter for $_jump + * + * @param int $jump + * @return Mage_Catalog_Block_Product_List_Toolbar_Pager + */ + public function setJump($jump) + { + $jump = abs(intval($jump)); + if ($this->getJump() != $jump) { + $this->_setFrameInitialized(false); + $this->_jump = $jump; + } + + return $this; + } + + /** + * Setter for $_limit + * + * @param int $limit + * @return Mage_Catalog_Block_Product_List_Toolbar_Pager + */ + public function setLimit($limit) + { + $this->_limit = abs(intval($limit)); + return $this; + } + + /** + * Return pager limitation from request or as assigned value + * + * @return int + */ + public function getLimit() + { + if ($this->_limit !== null) { + return $this->_limit; + } + return parent::getLimit(); + } + + /** + * Custom setter for pager collection + * + * @param Varien_Data_Collection + * @return Mage_Catalog_Block_Product_List_Toolbar_Pager + */ + public function setCollection($collection) + { + parent::setCollection($collection); + $this->_setFrameInitialized(false); + return $this; + } + + /** + * Whether to show first page in pagination or not + * + * @return bool + */ + public function canShowFirst() + { + return $this->getJump() > 1 && $this->getFrameStart() > 1; + } + + /** + * Whether to show last page in pagination or not + * + * @return bool + */ + public function canShowLast() + { + return $this->getJump() > 1 && $this->getFrameEnd() < $this->getLastPageNum(); + } + + /** + * Whether to show link to Previous Jump + * + * @return bool + */ + public function canShowPreviousJump() + { + return $this->getPreviousJumpPage() !== null; + } + + /** + * Whether to show link to Next Jump + * + * @return bool + */ + public function canShowNextJump() + { + return $this->getNextJumpPage() !== null; + } + + /** + * Initialize frame data, such as frame start, frame start etc. + * + * @return Mage_Catalog_Block_Product_List_Toolbar_Pager + */ + protected function _initFrame() + { + if (!$this->isFrameInitialized()) { + $start = 0; + $end = 0; + + $collection = $this->getCollection(); + if ($collection->getLastPageNumber() <= $this->getFrameLength()) { + $start = 1; + $end = $collection->getLastPageNumber(); + } + else { + $half = ceil($this->getFrameLength() / 2); + if ($collection->getCurPage() >= $half && $collection->getCurPage() <= $collection->getLastPageNumber() - $half) { + $start = ($collection->getCurPage() - $half) + 1; + $end = ($start + $this->getFrameLength()) - 1; + } + elseif ($collection->getCurPage() < $half) { + $start = 1; + $end = $this->getFrameLength(); + } + elseif ($collection->getCurPage() > ($collection->getLastPageNumber() - $half)) { + $end = $collection->getLastPageNumber(); + $start = $end - $this->getFrameLength() + 1; + } + } + + $this->_frameStart = $start; + $this->_frameEnd = $end; + + $this->_setFrameInitialized(true); + } + + return $this; + } + + /** + * Setter for flag _frameInitialized + * + * @param bool $flag + * @return Mage_Catalog_Block_Product_List_Toolbar_Pager + */ + protected function _setFrameInitialized($flag) + { + $this->_frameInitialized = (bool)$flag; + return $this; + } + + /** + * Check if frame data was initialized + * + * @return Mage_Catalog_Block_Product_List_Toolbar_Pager + */ + public function isFrameInitialized() + { + return $this->_frameInitialized; + } + + /** + * Render block HTML + * + * @return string + */ + protected function _toHtml() + { + if ($this->getLastPageNum() > 1) { + return parent::_toHtml(); + } else { + return ''; + } + } +} diff --git a/app/code/core/Mage/Catalog/Block/Product/Price/Template.php b/app/code/core/Mage/Catalog/Block/Product/Price/Template.php new file mode 100644 index 0000000000..61028125cf --- /dev/null +++ b/app/code/core/Mage/Catalog/Block/Product/Price/Template.php @@ -0,0 +1,76 @@ + + */ +class Mage_Catalog_Block_Product_Price_Template extends Mage_Core_Block_Abstract +{ + /** + * Product Price block types cache + * + * @var array + */ + protected $_priceBlockTypes = array(); + + /** + * Retrieve array of Price Block Types + * + * Key is price block type name and value is array of + * template and block strings + * + * @return array + */ + public function getPriceBlockTypes() + { + return $this->_priceBlockTypes; + } + + /** + * Adding customized price template for product type + * + * @param string $type + * @param string $block + * @param string $template + * @return Mage_Catalog_Block_Product_Price_Template + */ + public function addPriceBlockType($type, $block = '', $template = '') + { + if ($type) { + $this->_priceBlockTypes[$type] = array( + 'block' => $block, + 'template' => $template + ); + } + + return $this; + } +} 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 3ea502b58e..7693ed6be4 100644 --- a/app/code/core/Mage/Catalog/Block/Product/View/Attributes.php +++ b/app/code/core/Mage/Catalog/Block/Product/View/Attributes.php @@ -71,7 +71,7 @@ public function getAdditionalData(array $excludeAttr = array()) $value = $this->htmlEscape($value); } $data[$attribute->getAttributeCode()] = array( - 'label' => $attribute->getFrontend()->getLabel(), + 'label' => $attribute->getStoreLabel(), 'value' => $value, 'code' => $attribute->getAttributeCode() ); diff --git a/app/code/core/Mage/Catalog/Block/Product/View/Options.php b/app/code/core/Mage/Catalog/Block/Product/View/Options.php index c1af9e408f..3dc57dadb6 100644 --- a/app/code/core/Mage/Catalog/Block/Product/View/Options.php +++ b/app/code/core/Mage/Catalog/Block/Product/View/Options.php @@ -150,7 +150,7 @@ public function getJsonConfig() } $priceValue = $_tmpPriceValues; } else { - $priceValue = Mage::helper('core')->currency($option->getPrice(), false, false); + $priceValue = Mage::helper('core')->currency($option->getPrice(true), false, false); } $config[$option->getId()] = $priceValue; } diff --git a/app/code/core/Mage/Catalog/Block/Product/Widget/New.php b/app/code/core/Mage/Catalog/Block/Product/Widget/New.php index 830df61628..dcc605e6c0 100644 --- a/app/code/core/Mage/Catalog/Block/Product/Widget/New.php +++ b/app/code/core/Mage/Catalog/Block/Product/Widget/New.php @@ -33,7 +33,7 @@ */ class Mage_Catalog_Block_Product_Widget_New extends Mage_Catalog_Block_Product_New - implements Mage_Cms_Block_Widget_Interface + implements Mage_Widget_Block_Interface { /** * Internal contructor diff --git a/app/code/core/Mage/Catalog/Block/Widget/Link.php b/app/code/core/Mage/Catalog/Block/Widget/Link.php index f952c6f251..679a6fef1c 100644 --- a/app/code/core/Mage/Catalog/Block/Widget/Link.php +++ b/app/code/core/Mage/Catalog/Block/Widget/Link.php @@ -34,7 +34,7 @@ class Mage_Catalog_Block_Widget_Link extends Mage_Core_Block_Html_Link - implements Mage_Cms_Block_Widget_Interface + implements Mage_Widget_Block_Interface { /** * Entity model name which must be used to retrieve entity specific data. diff --git a/app/code/core/Mage/Catalog/Model/Category.php b/app/code/core/Mage/Catalog/Model/Category.php index fb751af6e6..21f8fb3b31 100644 --- a/app/code/core/Mage/Catalog/Model/Category.php +++ b/app/code/core/Mage/Catalog/Model/Category.php @@ -906,9 +906,9 @@ public function validate() * * @return Mage_Catalog_Model_Category */ - protected function _afterSaveCommit() + public function afterCommitCallback() { - parent::_afterSaveCommit(); + parent::afterCommitCallback(); Mage::getSingleton('index/indexer')->processEntityAction( $this, self::ENTITY, Mage_Index_Model_Event::TYPE_SAVE ); diff --git a/app/code/core/Mage/Catalog/Model/Category/Api.php b/app/code/core/Mage/Catalog/Model/Category/Api.php index 527fd73e8e..a7c66bf16b 100644 --- a/app/code/core/Mage/Catalog/Model/Category/Api.php +++ b/app/code/core/Mage/Catalog/Model/Category/Api.php @@ -121,18 +121,15 @@ public function level($website = null, $store = null, $categoryId = null) */ public function tree($parentId = null, $store = null) { - $tree = Mage::getResourceSingleton('catalog/category_tree') - ->load(); - if (is_null($parentId) && !is_null($store)) { $parentId = Mage::app()->getStore($this->_getStoreId($store))->getRootCategoryId(); } elseif (is_null($parentId)) { $parentId = 1; } + /* @var $tree Mage_Catalog_Model_Resource_Eav_Mysql4_Category_Tree */ $tree = Mage::getResourceSingleton('catalog/category_tree') ->load(); - /* @var $tree Mage_Catalog_Model_Resource_Eav_Mysql4_Category_Tree */ $root = $tree->getNodeById($parentId); @@ -236,7 +233,7 @@ public function info($categoryId, $store = null, $attributes = null) */ public function create($parentId, $categoryData, $store = null) { - $parent_category = $this->_initCategory($parentId); + $parent_category = $this->_initCategory($parentId, $store); $category = Mage::getModel('catalog/category') ->setStoreId($this->_getStoreId($store)); diff --git a/app/code/core/Mage/Catalog/Model/Category/Api/V2.php b/app/code/core/Mage/Catalog/Model/Category/Api/V2.php index d295337f5f..7b93b784df 100644 --- a/app/code/core/Mage/Catalog/Model/Category/Api/V2.php +++ b/app/code/core/Mage/Catalog/Model/Category/Api/V2.php @@ -74,7 +74,7 @@ public function info($categoryId, $store = null, $attributes = null) */ public function create($parentId, $categoryData, $store = null) { - $parent_category = $this->_initCategory($parentId); + $parent_category = $this->_initCategory($parentId, $store); $category = Mage::getModel('catalog/category') ->setStoreId($this->_getStoreId($store)); diff --git a/app/code/core/Mage/Catalog/Model/Category/Indexer/Flat.php b/app/code/core/Mage/Catalog/Model/Category/Indexer/Flat.php index b5df8fe484..f13f15364d 100644 --- a/app/code/core/Mage/Catalog/Model/Category/Indexer/Flat.php +++ b/app/code/core/Mage/Catalog/Model/Category/Indexer/Flat.php @@ -96,28 +96,43 @@ public function matchEvent(Mage_Index_Model_Event $event) return false; } + $data = $event->getNewData(); + $resultKey = 'catalog_category_flat_match_result'; + if (isset($data[$resultKey])) { + return $data[$resultKey]; + } + + $result = null; $entity = $event->getEntity(); if ($entity == Mage_Core_Model_Store::ENTITY) { if ($event->getType() == Mage_Index_Model_Event::TYPE_DELETE) { - return true; + $result = true; } else if ($event->getType() == Mage_Index_Model_Event::TYPE_SAVE) { /* @var $store Mage_Core_Model_Store */ $store = $event->getDataObject(); if ($store->isObjectNew() || $store->dataHasChangedFor('group_id')) { - return true; + $result = true; + } else { + $result = false; } - return false; + } else { + $result = false; } } else if ($entity == Mage_Core_Model_Store_Group::ENTITY) { /* @var $storeGroup Mage_Core_Model_Store_Group */ $storeGroup = $event->getDataObject(); if ($storeGroup->dataHasChangedFor('website_id')) { - return true; + $result = true; + } else { + $result = false; } - return false; + } else { + $result = parent::matchEvent($event); } - return parent::matchEvent($event); + $event->addNewData($resultKey, $result); + + return $result; } /** diff --git a/app/code/core/Mage/Catalog/Model/Category/Indexer/Product.php b/app/code/core/Mage/Catalog/Model/Category/Indexer/Product.php index 78688f5691..32144825c1 100644 --- a/app/code/core/Mage/Catalog/Model/Category/Indexer/Product.php +++ b/app/code/core/Mage/Catalog/Model/Category/Indexer/Product.php @@ -39,7 +39,8 @@ class Mage_Catalog_Model_Category_Indexer_Product extends Mage_Index_Model_Index */ protected $_matchedEntities = array( Mage_Catalog_Model_Product::ENTITY => array( - Mage_Index_Model_Event::TYPE_SAVE + Mage_Index_Model_Event::TYPE_SAVE, + Mage_Index_Model_Event::TYPE_MASS_ACTION ), Mage_Catalog_Model_Category::ENTITY => array( Mage_Index_Model_Event::TYPE_SAVE @@ -92,23 +93,37 @@ public function getDescription() */ public function matchEvent(Mage_Index_Model_Event $event) { + $data = $event->getNewData(); + $resultKey = 'catalog_category_product_match_result'; + if (isset($data[$resultKey])) { + return $data[$resultKey]; + } + + $result = null; $entity = $event->getEntity(); if ($entity == Mage_Core_Model_Store::ENTITY) { $store = $event->getDataObject(); if ($store->isObjectNew() || $store->dataHasChangedFor('group_id')) { - return true; + $result = true; + } else { + $result = false; } - return false; } elseif ($entity == Mage_Core_Model_Store_Group::ENTITY) { $storeGroup = $event->getDataObject(); $hasDataChanges = $storeGroup->dataHasChangedFor('root_category_id') || $storeGroup->dataHasChangedFor('website_id'); if (!$storeGroup->isObjectNew() && $hasDataChanges) { - return true; + $result = true; + } else { + $result = false; } - return false; + } else { + $result = parent::matchEvent($event); } - return parent::matchEvent($event); + + $event->addNewData($resultKey, $result); + + return $result; } @@ -150,13 +165,42 @@ protected function _registerEvent(Mage_Index_Model_Event $event) */ protected function _registerProductEvent(Mage_Index_Model_Event $event) { - $product = $event->getDataObject(); - /** - * Check if product categories data was changed - */ - if ($product->getIsChangedCategories() || $product->dataHasChangedFor('status') - || $product->dataHasChangedFor('visibility')) { - $event->addNewData('category_ids', $product->getCategoryIds()); + $eventType = $event->getType(); + if ($eventType == Mage_Index_Model_Event::TYPE_SAVE) { + $product = $event->getDataObject(); + /** + * Check if product categories data was changed + */ + if ($product->getIsChangedCategories() || $product->dataHasChangedFor('status') + || $product->dataHasChangedFor('visibility') || $product->getIsChangedWebsites()) { + $event->addNewData('category_ids', $product->getCategoryIds()); + } + } else if ($eventType == Mage_Index_Model_Event::TYPE_MASS_ACTION) { + /* @var $actionObject Varien_Object */ + $actionObject = $event->getDataObject(); + $attributes = array('status', 'visibility'); + $rebuildIndex = false; + + // check if attributes changed + $attrData = $actionObject->getAttributesData(); + if (is_array($attrData)) { + foreach ($attributes as $attributeCode) { + if (array_key_exists($attributeCode, $attrData)) { + $rebuildIndex = true; + break; + } + } + } + + // check changed websites + if ($actionObject->getWebsiteIds()) { + $rebuildIndex = true; + } + + // register affected products + if ($rebuildIndex) { + $event->addNewData('product_ids', $actionObject->getProductIds()); + } } } diff --git a/app/code/core/Mage/Catalog/Model/Config.php b/app/code/core/Mage/Catalog/Model/Config.php index 357a8635e9..5404f29398 100644 --- a/app/code/core/Mage/Catalog/Model/Config.php +++ b/app/code/core/Mage/Catalog/Model/Config.php @@ -189,7 +189,7 @@ public function getAttributeGroupId($attributeSetId, $name) $attributeSetId = $this->getAttributeSetId($attributeSetId); } $name = strtolower($name); - return isset($this->_attributeGroupsById[$attributeSetId][$name]) ? $this->_attributeGroupsById[$attributeSetId][$name] : false; + return isset($this->_attributeGroupsByName[$attributeSetId][$name]) ? $this->_attributeGroupsByName[$attributeSetId][$name] : false; } public function loadProductTypes() diff --git a/app/code/core/Mage/Catalog/Model/Indexer/Url.php b/app/code/core/Mage/Catalog/Model/Indexer/Url.php index f1d6032724..0914af50b2 100644 --- a/app/code/core/Mage/Catalog/Model/Indexer/Url.php +++ b/app/code/core/Mage/Catalog/Model/Indexer/Url.php @@ -97,30 +97,45 @@ public function getDescription() */ public function matchEvent(Mage_Index_Model_Event $event) { + $data = $event->getNewData(); + $resultKey = 'catalog_url_match_result'; + if (isset($data[$resultKey])) { + return $data[$resultKey]; + } + + $result = null; $entity = $event->getEntity(); if ($entity == Mage_Core_Model_Store::ENTITY) { $store = $event->getDataObject(); if ($store->isObjectNew() || $store->dataHasChangedFor('group_id')) { - return true; + $result = true; + } else { + $result = false; } - return false; - } elseif ($entity == Mage_Core_Model_Store_Group::ENTITY) { + } else if ($entity == Mage_Core_Model_Store_Group::ENTITY) { $storeGroup = $event->getDataObject(); $hasDataChanges = $storeGroup->dataHasChangedFor('root_category_id') || $storeGroup->dataHasChangedFor('website_id'); if (!$storeGroup->isObjectNew() && $hasDataChanges) { - return true; + $result = true; + } else { + $result = false; } - return false; - } elseif ($entity == Mage_Core_Model_Config_Data::ENTITY) { + } else if ($entity == Mage_Core_Model_Config_Data::ENTITY) { $configData = $event->getDataObject(); $path = $configData->getPath(); if (in_array($path, $this->_relatedConfigSettings)) { - return $configData->isValueChanged(); + $result = $configData->isValueChanged(); + } else { + $result = false; } - return false; + } else { + $result = parent::matchEvent($event); } - return parent::matchEvent($event); + + $event->addNewData($resultKey, $result); + + return $result; } /** diff --git a/app/code/core/Mage/Catalog/Model/Layer/Filter/Category.php b/app/code/core/Mage/Catalog/Model/Layer/Filter/Category.php index 9e70420b66..bf8509cd93 100644 --- a/app/code/core/Mage/Catalog/Model/Layer/Filter/Category.php +++ b/app/code/core/Mage/Catalog/Model/Layer/Filter/Category.php @@ -163,7 +163,7 @@ protected function _getItemsData() foreach ($categories as $category) { if ($category->getIsActive() && $category->getProductCount()) { $data[] = array( - 'label' => $category->getName(), + 'label' => Mage::helper('core')->htmlEscape($category->getName()), 'value' => $category->getId(), 'count' => $category->getProductCount(), ); diff --git a/app/code/core/Mage/Catalog/Model/Layer/Filter/Decimal.php b/app/code/core/Mage/Catalog/Model/Layer/Filter/Decimal.php new file mode 100644 index 0000000000..7e022390aa --- /dev/null +++ b/app/code/core/Mage/Catalog/Model/Layer/Filter/Decimal.php @@ -0,0 +1,233 @@ + + */ +class Mage_Catalog_Model_Layer_Filter_Decimal extends Mage_Catalog_Model_Layer_Filter_Abstract +{ + const MIN_RANGE_POWER = 10; + + /** + * Resource instance + * + * @var Mage_Catalog_Model_Resource_Eav_Mysql4_Layer_Filter_Decimal + */ + protected $_resource; + + /** + * Initialize filter and define request variable + * + */ + public function __construct() + { + parent::__construct(); + $this->_requestVar = 'decimal'; + } + + /** + * Retrieve resource instance + * + * @return Mage_Catalog_Model_Resource_Eav_Mysql4_Layer_Filter_Decimal + */ + protected function _getResource() + { + if (is_null($this->_resource)) { + $this->_resource = Mage::getResourceModel('catalog/layer_filter_decimal'); + } + return $this->_resource; + } + + /** + * Apply decimal range filter to product collection + * + * @param Zend_Controller_Request_Abstract $request + * @param Mage_Catalog_Block_Layer_Filter_Decimal $filterBlock + * @return Mage_Catalog_Model_Layer_Filter_Decimal + */ + public function apply(Zend_Controller_Request_Abstract $request, $filterBlock) + { + parent::apply($request, $filterBlock); + + /** + * Filter must be string: $index, $range + */ + $filter = $request->getParam($this->getRequestVar()); + if (!$filter) { + return $this; + } + + $filter = explode(',', $filter); + if (count($filter) != 2) { + return $this; + } + + list($index, $range) = $filter; + if ((int)$index && (int)$range) { + $this->setRange((int)$range); + + $this->_getResource()->applyFilterToCollection($this, $range, $index); + $this->getLayer()->getState()->addFilter( + $this->_createItem($this->_renderItemLabel($range, $index), $filter) + ); + + $this->_items = array(); + } + + return $this; + } + + /** + * Retrieve price aggreagation data cache key + * + * @return string + */ + protected function _getCacheKey() + { + $key = $this->getLayer()->getStateKey() + . '_ATTR_' . $this->getAttributeModel()->getAttributeCode(); + return $key; + } + + /** + * Prepare text of item label + * + * @param int $range + * @param float $value + * @return string + */ + protected function _renderItemLabel($range, $value) + { + $from = Mage::app()->getStore()->formatPrice(($value - 1) * $range, false); + $to = Mage::app()->getStore()->formatPrice($value * $range, false); + return Mage::helper('catalog')->__('%s - %s', $from, $to); + } + + /** + * Retrieve maximum value from layer products set + * + * @return float + */ + public function getMaxValue() + { + $max = $this->getData('max_value'); + if (is_null($max)) { + list($min, $max) = $this->_getResource()->getMinMax($this); + $this->setData('max_value', $max); + $this->setData('min_value', $min); + } + return $max; + } + + /** + * Retrieve minimal value from layer products set + * + * @return float + */ + public function getMinValue() + { + $min = $this->getData('min_value'); + if (is_null($min)) { + list($min, $max) = $this->_getResource()->getMinMax($this); + $this->setData('max_value', $max); + $this->setData('min_value', $min); + } + return $min; + } + + /** + * Retrieve range for building filter steps + * + * @return int + */ + public function getRange() + { + $range = $this->getData('range'); + if (is_null($range)) { + $max = $this->getMaxValue(); + $index = 1; + do { + $range = pow(10, (strlen(floor($max)) - $index)); + $items = $this->getRangeItemCounts($range); + $index ++; + } + while($range > self::MIN_RANGE_POWER && count($items) < 2); + + $this->setData('range', $range); + } + return $range; + } + + /** + * Retrieve information about products count in range + * + * @param int $range + * @return int + */ + public function getRangeItemCounts($range) + { + $rangeKey = 'range_item_counts_' . $range; + $items = $this->getData($rangeKey); + if (is_null($items)) { + $items = $this->_getResource()->getCount($this, $range); + $this->setData($rangeKey, $items); + } + return $items; + } + + /** + * Retrieve data for build decimal filter items + * + * @return array + */ + protected function _getItemsData() + { + $key = $this->_getCacheKey(); + + $data = $this->getLayer()->getAggregator()->getCacheData($key); + if ($data === null) { + $data = array(); + $range = $this->getRange(); + $dbRanges = $this->getRangeItemCounts($range); + + foreach ($dbRanges as $index => $count) { + $data[] = array( + 'label' => $this->_renderItemLabel($range, $index), + 'value' => $index . ',' . $range, + 'count' => $count, + ); + } + + + } + return $data; + } +} diff --git a/app/code/core/Mage/Catalog/Model/Observer.php b/app/code/core/Mage/Catalog/Model/Observer.php index 8fd71c34a1..c17e786d81 100644 --- a/app/code/core/Mage/Catalog/Model/Observer.php +++ b/app/code/core/Mage/Catalog/Model/Observer.php @@ -218,4 +218,50 @@ public function categorySaveAfter(Varien_Event_Observer $observer) } return $this; } + + /** + * Set flag dirty to compare product items if product was deleted + * + * @param Varien_Event_Observer $observer + * @return Mage_Catalog_Model_Observer + */ + public function markCompareProductsItemsAsDirtyByProduct(Varien_Event_Observer $observer) + { + $product = $observer->getEvent()->getProduct(); + if ($product) { + Mage::getResourceModel('catalog/product_compare_item')->markCompareProductItemsAsDirtyByProduct($product->getId()); + } + return $this; + } + + /** + * Set flag dirty to compare product items if product was disabled + * + * @param Varien_Event_Observer $observer + * @return Mage_Catalog_Model_Observer + */ + public function markCompareProductsItemsAsDirtyOnProductSaveAfter(Varien_Event_Observer $observer) + { + $product = $observer->getEvent()->getProduct(); + if ($product && ($product->getStatus() == Mage_Catalog_Model_Product_Status::STATUS_DISABLED || + $product->getVisibility() == Mage_Catalog_Model_Product_Visibility::VISIBILITY_NOT_VISIBLE)) { + Mage::getResourceModel('catalog/product_compare_item')->markCompareProductItemsAsDirtyByProduct($product->getId()); + } + return $this; + } + + /** + * Set flag dirty to compare product items if catalog compare item was deleted + * + * @param Varien_Event_Observer $observer + * @return Mage_Catalog_Model_Observer + */ + public function markCompareProductsItemsAsDirtyByItem(Varien_Event_Observer $observer) + { + $item = $observer->getEvent()->getItem(); + if ($item) { + Mage::getResourceModel('catalog/product_compare_item')->markCompareProductItemsAsDirtyByVisitor($item->getVisitorId()); + } + return $this; + } } diff --git a/app/code/core/Mage/Catalog/Model/Product.php b/app/code/core/Mage/Catalog/Model/Product.php index a78d7c0552..125815d8ab 100644 --- a/app/code/core/Mage/Catalog/Model/Product.php +++ b/app/code/core/Mage/Catalog/Model/Product.php @@ -327,9 +327,10 @@ public function setCategoryIds($ids) */ public function getCategoryIds() { - if (!$this->hasData('category_ids')) { + if (! $this->hasData('category_ids')) { $wasLocked = false; if ($this->isLockedAttribute('category_ids')) { + $wasLocked = true; $this->unlockAttribute('category_ids'); } $ids = $this->_getResource()->getCategoryIds($this); @@ -339,7 +340,7 @@ public function getCategoryIds() } } - return $this->_getData('category_ids'); + return (array) $this->_getData('category_ids'); } /** @@ -435,7 +436,7 @@ protected function _beforeSave() if ($this->getCanSaveCustomOptions()) { $options = $this->getProductOptions(); if (is_array($options)) { - $this->setIsCustomOptionChanged(); + $this->setIsCustomOptionChanged(true); foreach ($this->getProductOptions() as $option) { $this->getOptionInstance()->addOption($option); if ((!isset($option['is_delete'])) || $option['is_delete'] != '1') { @@ -509,9 +510,9 @@ protected function _afterSave() * * @return Mage_Catalog_Model_Product */ - protected function _afterSaveCommit() + public function afterCommitCallback() { - parent::_afterSaveCommit(); + parent::afterCommitCallback(); Mage::getSingleton('index/indexer')->processEntityAction( $this, self::ENTITY, Mage_Index_Model_Event::TYPE_SAVE ); @@ -526,8 +527,8 @@ protected function _afterSaveCommit() */ protected function _beforeDelete() { - $this->cleanCache(); $this->_protectFromNonAdmin(); + $this->cleanCache(); Mage::getSingleton('index/indexer')->logEvent( $this, self::ENTITY, Mage_Index_Model_Event::TYPE_DELETE ); diff --git a/app/code/core/Mage/Catalog/Model/Product/Api.php b/app/code/core/Mage/Catalog/Model/Product/Api.php index 2194a3d7dd..ad31e346b0 100644 --- a/app/code/core/Mage/Catalog/Model/Product/Api.php +++ b/app/code/core/Mage/Catalog/Model/Product/Api.php @@ -141,7 +141,7 @@ public function create($type, $set, $sku, $productData) $product = Mage::getModel('catalog/product'); /* @var $product Mage_Catalog_Model_Product */ - $product->setStoreId($this->_getStoreId($store)) + $product->setStoreId($this->_getStoreId()) ->setAttributeSetId($set) ->setTypeId($type) ->setSku($sku); diff --git a/app/code/core/Mage/Catalog/Model/Product/Api/V2.php b/app/code/core/Mage/Catalog/Model/Product/Api/V2.php index c5cc86476a..94e365b19c 100644 --- a/app/code/core/Mage/Catalog/Model/Product/Api/V2.php +++ b/app/code/core/Mage/Catalog/Model/Product/Api/V2.php @@ -160,10 +160,9 @@ public function create($type, $set, $sku, $productData) if (!$type || !$set || !$sku) { $this->_fault('data_invalid'); } - $store = null; $product = Mage::getModel('catalog/product'); /* @var $product Mage_Catalog_Model_Product */ - $product->setStoreId($this->_getStoreId($store)) + $product->setStoreId($this->_getStoreId()) ->setAttributeSetId($set) ->setTypeId($type) ->setSku($sku); diff --git a/app/code/core/Mage/Catalog/Model/Product/Attribute/Backend/Tierprice.php b/app/code/core/Mage/Catalog/Model/Product/Attribute/Backend/Tierprice.php index 44452212b8..f42ff2833a 100644 --- a/app/code/core/Mage/Catalog/Model/Product/Attribute/Backend/Tierprice.php +++ b/app/code/core/Mage/Catalog/Model/Product/Attribute/Backend/Tierprice.php @@ -189,8 +189,10 @@ public function afterLoad($object) } else if ($v['website_id'] == 0 && !isset($data[$key])) { $data[$key] = $v; $data[$key]['website_id'] = $websiteId; - $data[$key]['price'] = $v['price'] * $rates[$websiteId]['rate']; - $data[$key]['website_price'] = $v['price'] * $rates[$websiteId]['rate']; + if ($object->getPriceModel()->isTierPriceFixed()) { + $data[$key]['price'] = $v['price'] * $rates[$websiteId]['rate']; + $data[$key]['website_price'] = $v['price'] * $rates[$websiteId]['rate']; + } } } } @@ -231,6 +233,9 @@ public function afterSave($object) // prepare original data for compare $origTierPrices = $object->getOrigData($this->getAttribute()->getName()); + if (!is_array($origTierPrices)) { + $origTierPrices = array(); + } foreach ($origTierPrices as $data) { if ($data['website_id'] > 0 || ($data['website_id'] == '0' && $isGlobal)) { $key = join('-', array($data['website_id'], $data['cust_group'], $data['price_qty'] * 1)); diff --git a/app/code/core/Mage/Catalog/Model/Product/Image.php b/app/code/core/Mage/Catalog/Model/Product/Image.php index 9c85fb6308..7ea630e7fa 100644 --- a/app/code/core/Mage/Catalog/Model/Product/Image.php +++ b/app/code/core/Mage/Catalog/Model/Product/Image.php @@ -44,6 +44,7 @@ class Mage_Catalog_Model_Product_Image extends Mage_Core_Model_Abstract protected $_backgroundColor = array(255, 255, 255); protected $_baseFile; + protected $_isBaseFilePlaceholder; protected $_newFile; protected $_processor; protected $_destinationSubdir; @@ -175,7 +176,7 @@ protected function _checkMemory($file = null) // print '$this->_getMemoryUsage() = '.$this->_getMemoryUsage(); // print '$this->_getNeedMemoryForBaseFile() = '.$this->_getNeedMemoryForBaseFile(); - return $this->_getMemoryLimit() > ($this->_getMemoryUsage() + $this->_getNeedMemoryForFile($file)); + return $this->_getMemoryLimit() > ($this->_getMemoryUsage() + $this->_getNeedMemoryForFile($file)) || $this->_getMemoryLimit() == -1; } protected function _getMemoryLimit() @@ -255,6 +256,8 @@ private function _rgbToString($rgbArray) */ public function setBaseFile($file) { + $this->_isBaseFilePlaceholder = false; + if (($file) && (0 !== strpos($file, '/', 0))) { $file = '/' . $file; } @@ -287,6 +290,7 @@ public function setBaseFile($file) $baseDir = Mage::getDesign()->getSkinBaseDir(array('_theme' => 'default')); } } + $this->_isBaseFilePlaceholder = true; } $baseFile = $baseDir . $file; @@ -294,6 +298,7 @@ public function setBaseFile($file) if ((!$file) || (!file_exists($baseFile))) { throw new Exception(Mage::helper('catalog')->__('Image file not found')); } + $this->_baseFile = $baseFile; // build new filename (most important params) @@ -425,6 +430,11 @@ public function setAngle($angle) */ public function setWatermark($file, $position=null, $size=null, $width=null, $heigth=null, $imageOpacity=null) { + if ($this->_isBaseFilePlaceholder) + { + return $this; + } + if ($file) { $this->setWatermarkFile($file); } else { diff --git a/app/code/core/Mage/Catalog/Model/Product/Indexer/Eav.php b/app/code/core/Mage/Catalog/Model/Product/Indexer/Eav.php index c5e163e798..8bd109e8ba 100644 --- a/app/code/core/Mage/Catalog/Model/Product/Indexer/Eav.php +++ b/app/code/core/Mage/Catalog/Model/Product/Indexer/Eav.php @@ -126,9 +126,7 @@ protected function _attributeIsIndexable($attribute) ->getAttribute('catalog_product', $attribute); } - return (($attribute->getBackendType() == 'int' && $attribute->getFrontendInput() == 'select') - || ($attribute->getBackendType() == 'varchar' && $attribute->getFrontendInput() == 'multiselect')) - && ($attribute->getIsFilterable() || $attribute->getIsFilterableInSearch()); + return $attribute->isIndexable(); } /** @@ -223,17 +221,17 @@ protected function _registerCatalogAttributeSaveEvent(Mage_Index_Model_Event $ev { /* @var $attribute Mage_Catalog_Model_Resource_Eav_Attribute */ $attribute = $event->getDataObject(); - - $validateType = (($attribute->getBackendType() == 'int' && $attribute->getFrontendInput() == 'select') - || ($attribute->getBackendType() == 'varchar' && $attribute->getFrontendInput() == 'multiselect')); - if ($validateType) { + if ($attribute->isIndexable()) { $before = $attribute->getOrigData('is_filterable') - || $attribute->getOrigData('is_filterable_in_search'); + || $attribute->getOrigData('is_filterable_in_search') + || $attribute->getOrigData('is_visible_in_advanced_search'); $after = $attribute->getData('is_filterable') - || $attribute->getData('is_filterable_in_search'); + || $attribute->getData('is_filterable_in_search') + || $attribute->getData('is_visible_in_advanced_search'); if (!$before && $after || $before && !$after) { $event->addNewData('reindex_attribute', 1); + $event->addNewData('attribute_index_type', $attribute->getIndexType()); $event->addNewData('is_indexable', $after); } } diff --git a/app/code/core/Mage/Catalog/Model/Product/Indexer/Flat.php b/app/code/core/Mage/Catalog/Model/Product/Indexer/Flat.php index 3a138a676e..d428751f3e 100644 --- a/app/code/core/Mage/Catalog/Model/Product/Indexer/Flat.php +++ b/app/code/core/Mage/Catalog/Model/Product/Indexer/Flat.php @@ -95,6 +95,13 @@ public function matchEvent(Mage_Index_Model_Event $event) return false; } + $data = $event->getNewData(); + $resultKey = 'catalog_product_flat_match_result'; + if (isset($data[$resultKey])) { + return $data[$resultKey]; + } + + $result = null; $entity = $event->getEntity(); if ($entity == Mage_Catalog_Model_Resource_Eav_Attribute::ENTITY) { /* @var $attribute Mage_Catalog_Model_Resource_Eav_Attribute */ @@ -112,34 +119,43 @@ public function matchEvent(Mage_Index_Model_Event $event) || ($attribute->getData('used_for_sort_by') == 1); if ($event->getType() == Mage_Index_Model_Event::TYPE_DELETE) { - return $enableBefore; + $result = $enableBefore; } else if ($event->getType() == Mage_Index_Model_Event::TYPE_SAVE) { if ($enableAfter || $enableBefore) { - return true; + $result = true; + } else { + $result = false; } - return false; + } else { + $result = false; } } else if ($entity == Mage_Core_Model_Store::ENTITY) { if ($event->getType() == Mage_Index_Model_Event::TYPE_DELETE) { - return true; - } - - /* @var $store Mage_Core_Model_Store */ - $store = $event->getDataObject(); - if ($store->isObjectNew()) { - return true; + $result = true; + } else { + /* @var $store Mage_Core_Model_Store */ + $store = $event->getDataObject(); + if ($store->isObjectNew()) { + $result = true; + } else { + $result = false; + } } - return false; } else if ($entity == Mage_Core_Model_Store_Group::ENTITY) { /* @var $storeGroup Mage_Core_Model_Store_Group */ $storeGroup = $event->getDataObject(); if ($storeGroup->dataHasChangedFor('website_id')) { - return true; + $result = true; + } else { + $result = false; } - return false; + } else { + $result = parent::matchEvent($event); } - return parent::matchEvent($event); + $event->addNewData($resultKey, $result); + + return $result; } /** diff --git a/app/code/core/Mage/Catalog/Model/Product/Indexer/Price.php b/app/code/core/Mage/Catalog/Model/Product/Indexer/Price.php index dc5404696a..fb5557e493 100644 --- a/app/code/core/Mage/Catalog/Model/Product/Indexer/Price.php +++ b/app/code/core/Mage/Catalog/Model/Product/Indexer/Price.php @@ -42,6 +42,9 @@ class Mage_Catalog_Model_Product_Indexer_Price extends Mage_Index_Model_Indexer_ ), Mage_Catalog_Model_Convert_Adapter_Product::ENTITY => array( Mage_Index_Model_Event::TYPE_SAVE + ), + Mage_Customer_Model_Group::ENTITY => array( + Mage_Index_Model_Event::TYPE_SAVE ) ); @@ -92,6 +95,7 @@ protected function _getDependentAttributes() 'special_to_date', 'tax_class_id', 'status', + 'required_options' ); } @@ -104,15 +108,29 @@ protected function _getDependentAttributes() */ public function matchEvent(Mage_Index_Model_Event $event) { + $data = $event->getNewData(); + $resultKey = 'catalog_product_price_match_result'; + if (isset($data[$resultKey])) { + return $data[$resultKey]; + } + + $result = null; if ($event->getEntity() == Mage_Core_Model_Config_Data::ENTITY) { $data = $event->getDataObject(); if (in_array($data->getPath(), $this->_relatedConfigSettings)) { - return $data->isValueChanged(); + $result = $data->isValueChanged(); } else { - return false; + $result = false; } + } elseif ($event->getEntity() == Mage_Customer_Model_Group::ENTITY) { + $result = $event->getDataObject()->isObjectNew(); + } else { + $result = parent::matchEvent($event); } - return parent::matchEvent($event); + + $event->addNewData($resultKey, $result); + + return $result; } /** @@ -142,7 +160,8 @@ protected function _registerCatalogProductSaveEvent(Mage_Index_Model_Event $even $product = $event->getDataObject(); $attributes = $this->_getDependentAttributes(); $reindexPrice = $product->getIsRelationsChanged() || $product->getIsCustomOptionChanged() - || $product->dataHasChangedFor('tier_price_changed'); + || $product->dataHasChangedFor('tier_price_changed') + || $product->getIsChangedWebsites(); foreach ($attributes as $attributeCode) { $reindexPrice = $reindexPrice || $product->dataHasChangedFor($attributeCode); @@ -192,7 +211,7 @@ protected function _registerEvent(Mage_Index_Model_Event $event) { $entity = $event->getEntity(); - if ($entity == Mage_Core_Model_Config_Data::ENTITY) { + if ($entity == Mage_Core_Model_Config_Data::ENTITY || $entity == Mage_Customer_Model_Group::ENTITY) { $process = $event->getProcess(); $process->changeStatus(Mage_Index_Model_Process::STATUS_REQUIRE_REINDEX); } else if ($entity == Mage_Catalog_Model_Convert_Adapter_Product::ENTITY) { diff --git a/app/code/core/Mage/Catalog/Model/Product/Indexer/Status.php b/app/code/core/Mage/Catalog/Model/Product/Indexer/Status.php deleted file mode 100644 index c37097bf88..0000000000 --- a/app/code/core/Mage/Catalog/Model/Product/Indexer/Status.php +++ /dev/null @@ -1,25 +0,0 @@ -_timeExists()) { - $hour = $this->is24hTimeFormat() ? $value['hour'] : $value['hour'] + 12; - $timestamp += 60 * 60 * $hour + 60 * $value['minute']; + // 24hr hour conversion + if (! $this->is24hTimeFormat()) { + $pmDayPart = ('pm' == strtolower($value['day_part'])); + if (12 == $value['hour']) { + $value['hour'] = $pmDayPart ? 12 : 0; + } elseif ($pmDayPart) { + $value['hour'] += 12; + } + } + + $timestamp += 60 * 60 * $value['hour'] + 60 * $value['minute']; } $date = new Zend_Date($timestamp); 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 469277f594..c4c4e7a0a0 100644 --- a/app/code/core/Mage/Catalog/Model/Product/Type/Abstract.php +++ b/app/code/core/Mage/Catalog/Model/Product/Type/Abstract.php @@ -69,6 +69,13 @@ abstract class Mage_Catalog_Model_Product_Type_Abstract */ protected $_isComposite = false; + /** + * Whether product quantity is fractional number or not + * + * @var bool + */ + protected $_canUseQtyDecimals = true; + /** * @deprecated * @@ -469,6 +476,17 @@ public function isComposite($product = null) return $this->_isComposite; } + /** + * Check if product qty is fractional number + * + * @param Mage_Catalog_Model_Product $product + * @return bool + */ + public function canUseQtyDecimals() + { + return $this->_canUseQtyDecimals; + } + /** * Default action to get sku of product * @@ -639,6 +657,11 @@ public function setConfig($config) if (isset($config['composite'])) { $this->_isComposite = (bool) $config['composite']; } + + if (isset($config['can_use_qty_decimals'])) { + $this->_canUseQtyDecimals = (bool) $config['can_use_qty_decimals']; + } + return $this; } 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 3347e799f8..addecdc629 100644 --- a/app/code/core/Mage/Catalog/Model/Product/Type/Price.php +++ b/app/code/core/Mage/Catalog/Model/Product/Type/Price.php @@ -106,13 +106,14 @@ protected function _applyTierPrice($product, $qty, $finalPrice) * @param Mage_Catalog_Model_Product $product * @return double */ - public function getTierPrice($qty=null, $product) + public function getTierPrice($qty = null, $product) { $allGroups = Mage_Customer_Model_Group::CUST_GROUP_ALL; $prices = $product->getData('tier_price'); if (is_null($prices)) { - if ($attribute = $product->getResource()->getAttribute('tier_price')) { + $attribute = $product->getResource()->getAttribute('tier_price'); + if ($attribute) { $attribute->getBackend()->afterLoad($product); $prices = $product->getData('tier_price'); } @@ -153,15 +154,28 @@ public function getTierPrice($qty=null, $product) // found tier qty is same as current tier qty but current tier group is ALL_GROUPS continue; } - $prevPrice = $price['website_price']; - $prevQty = $price['price_qty']; - $prevGroup = $price['cust_group']; + if ($price['website_price'] < $prevPrice) { + $prevPrice = $price['website_price']; + $prevQty = $price['price_qty']; + $prevGroup = $price['cust_group']; + } } return $prevPrice; } else { - foreach ($prices as $i=>$price) { - if ($price['cust_group']!=$custGroup && $price['cust_group']!=$allGroups) { + $qtyCache = array(); + foreach ($prices as $i => $price) { + if ($price['cust_group'] != $custGroup && $price['cust_group'] != $allGroups) { unset($prices[$i]); + } else if (isset($qtyCache[$price['price_qty']])) { + $j = $qtyCache[$price['price_qty']]; + if ($prices[$j]['website_price'] > $price['website_price']) { + unset($prices[$j]); + $qtyCache[$price['price_qty']] = $i; + } else { + unset($prices[$i]); + } + } else { + $qtyCache[$price['price_qty']] = $i; } } } @@ -326,4 +340,14 @@ public static function calculateSpecialPrice($finalPrice, $specialPrice, $specia } return $finalPrice; } + + /** + * Check is tier price value fixed or percent of original price + * + * @return bool + */ + public function isTierPriceFixed() + { + return true; + } } diff --git a/app/code/core/Mage/Catalog/Model/Resource/Eav/Attribute.php b/app/code/core/Mage/Catalog/Model/Resource/Eav/Attribute.php index daf5c1c88a..e176c1b07c 100644 --- a/app/code/core/Mage/Catalog/Model/Resource/Eav/Attribute.php +++ b/app/code/core/Mage/Catalog/Model/Resource/Eav/Attribute.php @@ -97,16 +97,15 @@ protected function _afterSave() /** * Init indexing process after attribute data commit * - * @return Mage_Catalog_Model_Resource_Eav_Attribute + * @return Mage_CatalogInventory_Model_Stock_Item */ - protected function _afterSaveCommit() + public function afterCommitCallback() { - parent::_afterSaveCommit(); + parent::afterCommitCallback(); Mage::getSingleton('index/indexer')->processEntityAction( $this, self::ENTITY, Mage_Index_Model_Event::TYPE_SAVE ); - return $this; } @@ -290,4 +289,51 @@ public function _getDefaultSourceModel() { return 'eav/entity_attribute_source_table'; } + + /** + * Check is an attribute used in EAV index + * + * @return bool + */ + public function isIndexable() + { + // exclude price attribute + if ($this->getAttributeCode() == 'price') { + return false; + } + + if (!$this->getIsFilterableInSearch() && !$this->getIsVisibleInAdvancedSearch() && !$this->getIsFilterable()) { + return false; + } + + $backendType = $this->getBackendType(); + $frontendInput = $this->getFrontendInput(); + + if ($backendType == 'int' && $frontendInput == 'select') { + return true; + } else if ($backendType == 'varchar' && $frontendInput == 'multiselect') { + return true; + } else if ($backendType == 'decimal') { + return true; + } + + return false; + } + + /** + * Retrieve index type for indexable attribute + * + * @return string|false + */ + public function getIndexType() + { + if (!$this->isIndexable()) { + return false; + } + if ($this->getBackendType() == 'decimal') { + return 'decimal'; + } + + return 'source'; + } } 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 8d0d961363..324a86a50d 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 @@ -182,7 +182,7 @@ protected function _saveAttributeValue($object, $attribute, $value) /** * Update attribute value for store */ - $write->insertOnDuplicate($table, $bind, array('value')); + $this->_attributeValuesToSave[$table][] = $bind; } else if ($attribute->isScopeWebsite() && $storeId != $this->getDefaultStoreId()) { /** * Update attribute value for website @@ -190,14 +190,14 @@ protected function _saveAttributeValue($object, $attribute, $value) $storeIds = $object->getWebsiteStoreIds(); foreach ($storeIds as $storeId) { $bind['store_id'] = $storeId; - $write->insertOnDuplicate($table, $bind, array('value')); + $this->_attributeValuesToSave[$table][] = $bind; } } else { /** * Update global attribute value */ $bind['store_id'] = $this->getDefaultStoreId(); - $write->insertOnDuplicate($table, $bind, array('value')); + $this->_attributeValuesToSave[$table][] = $bind; } return $this; @@ -550,7 +550,7 @@ public function getAttributeRawValue($entityId, $attribute, $store) ->where('default_value.' . $this->getEntityIdField() . ' = ?', $entityId); if ($isStatic) { - $select->from('', $attrField); + $select->columns($attrField); } else { $select->where('default_value.attribute_id = ?', $attribute->getId()) ->where('default_value.store_id = 0'); diff --git a/app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Category/Flat.php b/app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Category/Flat.php index b2343f61b6..6a58bb271b 100644 --- a/app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Category/Flat.php +++ b/app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Category/Flat.php @@ -540,11 +540,14 @@ protected function _getStaticColumns() } $_type = ''; $_is_unsigned = ''; - switch ($column['DATA_TYPE']) { + switch ($column['DATA_TYPE']) { case 'smallint': case 'int': $_type = $column['DATA_TYPE'] . '(11)'; $_is_unsigned = (bool)$column['UNSIGNED']; + if ($column['DEFAULT'] === '') { + $column['DEFAULT'] = null; + } break; case 'varchar': $_type = $column['DATA_TYPE'] . '(' . $column['LENGTH'] . ')'; @@ -557,6 +560,9 @@ protected function _getStaticColumns() case 'decimal': $_type = $columns['DATA_TYPE'] . '(' . $column['PRECISION'] . ',' . $column['SCALE'] . ')'; $_is_unsigned = null; + if ($column['DEFAULT'] === '') { + $column['DEFAULT'] = null; + } break; } $columns[$column['COLUMN_NAME']] = array( diff --git a/app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Category/Indexer/Product.php b/app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Category/Indexer/Product.php index 21c64b07a7..a0ff4a8e01 100644 --- a/app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Category/Indexer/Product.php +++ b/app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Category/Indexer/Product.php @@ -93,6 +93,61 @@ public function catalogProductSave(Mage_Index_Model_Event $event) $this->_refreshAnchorRelations($allCategoryIds, $productId); $this->_refreshDirectRelations($categoryIds, $productId); + $this->_refreshRootRelations($productId); + return $this; + } + + /** + * Process Catalog Product mass action + * + * @param Mage_Index_Model_Event $event + * @return Mage_Catalog_Model_Resource_Eav_Mysql4_Category_Indexer_Product + */ + public function catalogProductMassAction(Mage_Index_Model_Event $event) + { + $data = $event->getNewData(); + + /** + * check is product ids were updated + */ + if (!isset($data['product_ids'])) { + return $this; + } + $productIds = $data['product_ids']; + $categoryIds = array(); + $allCategoryIds = array(); + + /** + * Select relations to categories + */ + $adapter = $this->_getWriteAdapter(); + $select = $adapter->select() + ->distinct(true) + ->from(array('cp' => $this->_categoryProductTable), array('category_id')) + ->join( + array('ce' => $this->_categoryTable), + 'ce.entity_id=cp.category_id', + array('path')) + ->where('cp.product_id IN(?)', $productIds); + $pairs = $adapter->fetchPairs($select); + foreach ($pairs as $categoryId => $categoryPath) { + $categoryIds[] = $categoryId; + $allCategoryIds = array_merge($allCategoryIds, explode('/', $categoryPath)); + } + + $allCategoryIds = array_unique($allCategoryIds); + $allCategoryIds = array_diff($allCategoryIds, $categoryIds); + + /** + * Delete previous index data + */ + $this->_getWriteAdapter()->delete( + $this->getMainTable(), $this->_getWriteAdapter()->quoteInto('product_id IN(?)', $productIds) + ); + + $this->_refreshAnchorRelations($allCategoryIds, $productIds); + $this->_refreshDirectRelations($categoryIds, $productIds); + $this->_refreshRootRelations($productIds); return $this; } @@ -262,7 +317,7 @@ protected function _refreshAnchorRelations($categoryIds=null, $productIds=null) $select->where('ce.entity_id IN (?)', $categoryIds); } if ($productIds) { - $select->where('pw.product_id=?', $productIds); + $select->where('pw.product_id IN(?)', $productIds); } $sql = $select->insertFromSelect($this->getMainTable()); @@ -270,6 +325,58 @@ protected function _refreshAnchorRelations($categoryIds=null, $productIds=null) return $this; } + /** + * Add product association with root store category for products which are not assigned to any another category + * + * @param int | array $productIds + * @return Mage_Catalog_Model_Resource_Eav_Mysql4_Category_Indexer_Product + */ + protected function _refreshRootRelations($productIds) + { + $visibilityInfo = $this->_getVisibilityAttributeInfo(); + $statusInfo = $this->_getStatusAttributeInfo(); + + /** + * Insert anchor categories relations + */ + $isParent = new Zend_Db_Expr('0'); + $position = new Zend_Db_Expr('0'); + $select = $this->_getReadAdapter()->select() + ->distinct(true) + ->from(array('pw' => $this->_productWebsiteTable), array()) + ->joinInner(array('g' => $this->_groupTable), 'g.website_id=pw.website_id', array()) + ->joinInner(array('s' => $this->_storeTable), 's.group_id=g.group_id', array()) + ->joinInner(array('rc' => $this->_categoryTable), 'rc.entity_id=g.root_category_id', + array('entity_id')) + ->joinLeft(array('cp' => $this->_categoryProductTable), 'cp.product_id=pw.product_id', + array('pw.product_id', $position, $isParent, 's.store_id')) + ->joinLeft( + array('dv'=>$visibilityInfo['table']), + "dv.entity_id=pw.product_id AND dv.attribute_id={$visibilityInfo['id']} AND dv.store_id=0", + array()) + ->joinLeft( + array('sv'=>$visibilityInfo['table']), + "sv.entity_id=pw.product_id AND sv.attribute_id={$visibilityInfo['id']} AND sv.store_id=s.store_id", + array('visibility' => 'IF(sv.value_id, sv.value, dv.value)')) + ->joinLeft( + array('ds'=>$statusInfo['table']), + "ds.entity_id=pw.product_id AND ds.attribute_id={$statusInfo['id']} AND ds.store_id=0", + array()) + ->joinLeft( + array('ss'=>$statusInfo['table']), + "ss.entity_id=pw.product_id AND ss.attribute_id={$statusInfo['id']} AND ss.store_id=s.store_id", + array()) + /** + * Condition for anchor or root category (all products should be assigned to root) + */ + ->where('cp.product_id IS NULL') + ->where('IF(ss.value_id, ss.value, ds.value)=?', Mage_Catalog_Model_Product_Status::STATUS_ENABLED) + ->where('pw.product_id IN(?)', $productIds); + $sql = $select->insertFromSelect($this->getMainTable()); + $this->_getWriteAdapter()->query($sql); + return $this; + } + /** * Get is_anchor category attribute information * @@ -333,9 +440,10 @@ public function reindexAll() * Build index for each store */ foreach ($stores as $storeData) { - $storeId = $storeData['store_id']; - $websiteId = $storeData['website_id']; - $rootPath = $storeData['root_path']; + $storeId = $storeData['store_id']; + $websiteId = $storeData['website_id']; + $rootPath = $storeData['root_path']; + $rootId = $storeData['root_id']; /** * Prepare visibility for all enabled store products */ @@ -357,6 +465,18 @@ public function reindexAll() WHERE ac.category_id IS NULL"; $idxAdapter->query($sql); + /** + * Assign products not associated to any category to root category in index + */ + $sql = "INSERT INTO {$idxTable} + SELECT + {$rootId}, pv.product_id, 0, 1, {$storeId}, pv.visibility + FROM + {$enabledTable} AS pv + LEFT JOIN {$this->_categoryProductTable} AS cp ON pv.product_id=cp.product_id + WHERE + cp.product_id IS NULL"; + $idxAdapter->query($sql); /** * Prepare anchor categories products */ @@ -413,7 +533,7 @@ protected function _getStoresInfo() { $stores = $this->_getReadAdapter()->fetchAll(" SELECT - s.store_id, s.website_id, c.path AS root_path + s.store_id, s.website_id, c.path AS root_path, c.entity_id AS root_id FROM {$this->getTable('core/store')} AS s, {$this->getTable('core/store_group')} AS sg, 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 8dad745eb8..4f32918fa2 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 @@ -129,12 +129,6 @@ public function addCollectionData($collection=null, $sorted=false, $exclude=arra $exclude = array($exclude); } - $collection->initCache( - Mage::app()->getCache(), - 'tree', - array(Mage_Catalog_Model_Category::CACHE_TAG) - ); - $nodeIds = array(); foreach ($this->getNodes() as $node) { if (!in_array($node->getId(), $exclude)) { diff --git a/app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Layer/Filter/Decimal.php b/app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Layer/Filter/Decimal.php new file mode 100644 index 0000000000..985ab005c2 --- /dev/null +++ b/app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Layer/Filter/Decimal.php @@ -0,0 +1,156 @@ + + */ +class Mage_Catalog_Model_Resource_Eav_Mysql4_Layer_Filter_Decimal extends Mage_Core_Model_Mysql4_Abstract +{ + /** + * Initialize connection and define main table name + * + */ + protected function _construct() + { + $this->_init('catalog/product_index_eav_decimal', 'entity_id'); + } + + /** + * Apply attribute filter to product collection + * + * @param Mage_Catalog_Model_Layer_Filter_Decimal $filter + * @param float $range + * @param int $index + * @return Mage_Catalog_Model_Resource_Eav_Mysql4_Layer_Filter_Decimal + */ + public function applyFilterToCollection($filter, $range, $index) + { + $collection = $filter->getLayer()->getProductCollection(); + $attribute = $filter->getAttributeModel(); + $connection = $this->_getReadAdapter(); + $tableAlias = $attribute->getAttributeCode() . '_idx'; + $conditions = array( + "{$tableAlias}.entity_id = e.entity_id", + $connection->quoteInto("{$tableAlias}.attribute_id = ?", $attribute->getAttributeId()), + $connection->quoteInto("{$tableAlias}.store_id = ?", $collection->getStoreId()) + ); + + $collection->getSelect()->join( + array($tableAlias => $this->getMainTable()), + join(' AND ', $conditions), + array() + ); + + $collection->getSelect() + ->where("{$tableAlias}.value >= ?", ($range * ($index - 1))) + ->where("{$tableAlias}.value < ?", ($range * $index)); + + return $this; + } + + /** + * Retrieve array of minimal and maximal values + * + * @param Mage_Catalog_Model_Layer_Filter_Decimal $filter + * @return array + */ + public function getMinMax($filter) + { + $select = $this->_getSelect($filter); + $adapter = $this->_getReadAdapter(); + + $select->columns(array( + 'min_value' => new Zend_Db_Expr('MIN(decimal_index.value)'), + 'max_value' => new Zend_Db_Expr('MAX(decimal_index.value)'), + )); + + $result = $adapter->fetchRow($select); + + return array($result['min_value'], $result['max_value']); + } + + /** + * Retrieve clean select with joined index table + * + * Joined table has index + * + * @param Mage_Catalog_Model_Layer_Filter_Decimal $filter + * @return Varien_Db_Select + */ + protected function _getSelect($filter) + { + $collection = $filter->getLayer()->getProductCollection(); + + // clone select from collection with filters + $select = clone $collection->getSelect(); + // reset columns, order and limitation conditions + $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); + + $attributeId = $filter->getAttributeModel()->getId(); + $storeId = $collection->getStoreId(); + + $select->join( + array('decimal_index' => $this->getMainTable()), + "e.entity_id=decimal_index.entity_id AND decimal_index.attribute_id={$attributeId}" + . " AND decimal_index.store_id={$storeId}", + array() + ); + + return $select; + } + + /** + * Retrieve array with products counts per range + * + * @param Mage_Catalog_Model_Layer_Filter_Decimal $filter + * @param int $range + * @return array + */ + public function getCount($filter, $range) + { + $select = $this->_getSelect($filter); + $adapter = $this->_getReadAdapter(); + + $countExpr = new Zend_Db_Expr("COUNT(*)"); + $rangeExpr = new Zend_Db_Expr("FLOOR(decimal_index.value / {$range}) + 1"); + + $select->columns(array( + 'range' => $rangeExpr, + 'count' => $countExpr + )); + $select->group('range'); + + return $adapter->fetchPairs($select); + } +} diff --git a/app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Layer/Filter/Price.php b/app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Layer/Filter/Price.php index 77f83dc6f9..ee4e5f02e5 100644 --- a/app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Layer/Filter/Price.php +++ b/app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Layer/Filter/Price.php @@ -157,6 +157,7 @@ public function getCount($filter, $range) 'range' => $rangeExpr, 'count' => $countExpr )); + $select->where("{$table}.min_price > 0"); $select->group('range'); return $connection->fetchPairs($select); diff --git a/app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Product/Action.php b/app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Product/Action.php index 0658367138..3674e7c831 100644 --- a/app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Product/Action.php +++ b/app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Product/Action.php @@ -70,11 +70,18 @@ public function updateAttributes($entityIds, $attrData, $storeId) continue; } + $i = 0; foreach ($entityIds as $entityId) { $object->setId($entityId); + // collect data for save $this->_saveAttributeValue($object, $attribute, $value); + // save collected data every 1000 rows + if ($i % 1000 == 0) { + $this->_processAttributeValues(); + } } } + $this->_processAttributeValues(); $this->_getWriteAdapter()->commit(); } catch (Exception $e) { $this->_getWriteAdapter()->rollBack(); diff --git a/app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Product/Attribute/Collection.php b/app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Product/Attribute/Collection.php index ccf870f147..0a54a026a3 100644 --- a/app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Product/Attribute/Collection.php +++ b/app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Product/Attribute/Collection.php @@ -33,6 +33,14 @@ */ class Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Attribute_Collection extends Mage_Eav_Model_Mysql4_Entity_Attribute_Collection { + /** + * Resource model initialization + */ + public function _construct() + { + $this->_init('catalog/resource_eav_attribute', 'eav/entity_attribute'); + } + protected function _initSelect() { $this->getSelect()->from(array('main_table' => $this->getResource()->getMainTable())) 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 901a84c475..9e20f520de 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 @@ -257,7 +257,7 @@ protected function _initSelect() if ($this->isEnabledFlat()) { $this->getSelect() ->from(array('e' => $this->getEntity()->getFlatTableName()), null) - ->from(null, array('status' => new Zend_Db_Expr(Mage_Catalog_Model_Product_Status::STATUS_ENABLED))); + ->columns(array('status' => new Zend_Db_Expr(Mage_Catalog_Model_Product_Status::STATUS_ENABLED))); $this->addAttributeToSelect(array('entity_id', 'type_id', 'attribute_set_id')); if ($this->getFlatHelper()->isAddChildData()) { $this->getSelect() @@ -303,7 +303,7 @@ public function addAttributeToSelect($attribute, $joinType = false) foreach ($attribute as $attributeCode) { if ($attributeCode == '*') { foreach ($this->getEntity()->getAllTableColumns() as $column) { - $this->getSelect()->from(null, 'e.'.$column); + $this->getSelect()->columns('e.'.$column); $this->_selectAttributes[$column] = $column; $this->_staticFields[$column] = $column; } @@ -311,7 +311,7 @@ public function addAttributeToSelect($attribute, $joinType = false) else { if ($columns = $this->getEntity()->getAttributeForSelect($attributeCode)) { foreach ($columns as $alias => $column) { - $this->getSelect()->from(null, array($alias => 'e.'.$column)); + $this->getSelect()->columns(array($alias => 'e.'.$column)); $this->_selectAttributes[$column] = $column; $this->_staticFields[$column] = $column; } @@ -368,10 +368,6 @@ protected function _afterLoad() */ protected function _prepareUrlDataObject() { - if (!$this->hasFlag('url_data_object')) { - return $this; - } - $objects = array(); /* @var $item Mage_Catalog_Model_Product */ foreach ($this->_items as $item) { @@ -383,7 +379,7 @@ protected function _prepareUrlDataObject() } } - if ($objects) { + if ($objects && $this->hasFlag('url_data_object')) { $objects = Mage::getResourceSingleton('catalog/url') ->getRewriteByProductStore($objects); foreach ($this->_items as $item) { @@ -670,7 +666,7 @@ public function getSelectCountSql() $countSelect->reset(Zend_Db_Select::LIMIT_OFFSET); $countSelect->reset(Zend_Db_Select::COLUMNS); - $countSelect->from('', 'COUNT(DISTINCT e.entity_id)'); + $countSelect->columns('COUNT(DISTINCT e.entity_id)'); $countSelect->resetJoinLeft(); return $countSelect; @@ -688,7 +684,7 @@ public function getAllIds($limit=null, $offset=null) $idsSelect->reset(Zend_Db_Select::LIMIT_COUNT); $idsSelect->reset(Zend_Db_Select::LIMIT_OFFSET); $idsSelect->reset(Zend_Db_Select::COLUMNS); - $idsSelect->from(null, 'e.'.$this->getEntity()->getIdFieldName()); + $idsSelect->columns('e.'.$this->getEntity()->getIdFieldName()); $idsSelect->limit($limit, $offset); $idsSelect->resetJoinLeft(); @@ -814,7 +810,7 @@ public function getSetIds() /* @var $select Zend_Db_Select */ $select->reset(Zend_Db_Select::COLUMNS); $select->distinct(true); - $select->from('', 'attribute_set_id'); + $select->columns('attribute_set_id'); return $this->getConnection()->fetchCol($select); } @@ -942,7 +938,7 @@ protected function _joinPriceRules() if ($this->isEnabledFlat()) { $customerGroup = Mage::getSingleton('customer/session')->getCustomerGroupId(); $priceColumn = 'e.display_price_group_' . $customerGroup; - $this->getSelect()->from(null, array('_rule_price' => $priceColumn)); + $this->getSelect()->columns(array('_rule_price' => $priceColumn)); return $this; } @@ -1418,7 +1414,7 @@ protected function _productLimitationJoinPrice() $minimalExpr = new Zend_Db_Expr( 'IF(`price_index`.`tier_price`, LEAST(`price_index`.`min_price`, `price_index`.`tier_price`), `price_index`.`min_price`)' ); - $this->getSelect()->joinLeft( + $this->getSelect()->join( array('price_index' => $this->getTable('catalog/product_index_price')), $joinCond, array('price', 'final_price', 'minimal_price'=>$minimalExpr , 'min_price', 'max_price', 'tier_price') diff --git a/app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Product/Compare/Item/Collection.php b/app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Product/Compare/Item/Collection.php index 877bd0af04..ca9489a317 100644 --- a/app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Product/Compare/Item/Collection.php +++ b/app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Product/Compare/Item/Collection.php @@ -146,6 +146,7 @@ public function _addJoinToSelect() 'customer_id' => 'customer_id', 'visitor_id' => 'visitor_id', 'item_store_id' => 'store_id', + 'catalog_compare_item_id' => 'catalog_compare_item_id' ), $this->getConditionForJoin() ); diff --git a/app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Product/Flat/Indexer.php b/app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Product/Flat/Indexer.php index 137ca52bfd..34c6dfb088 100644 --- a/app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Product/Flat/Indexer.php +++ b/app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Product/Flat/Indexer.php @@ -703,7 +703,7 @@ public function updateStaticAttributes($store, $productIds = null) continue; } $fieldList[] = $attributeCode; - $select->from(null, $attributeCode); + $select->columns($attributeCode, 'e'); } } @@ -954,7 +954,7 @@ public function updateChildrenDataFromParent($store, $productIds = null) if ($columnName == 'entity_id' || $columnName == 'child_id' || $columnName == 'is_child') { continue; } - $select->from(null, array($columnName => new Zend_Db_Expr('`t1`.`'. $columnName.'`'))); + $select->columns(array($columnName => new Zend_Db_Expr('`t1`.`'. $columnName.'`'))); } $select ->joinLeft( diff --git a/app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Product/Indexer/Eav.php b/app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Product/Indexer/Eav.php index 60ad3ab48a..f8a31d381d 100644 --- a/app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Product/Indexer/Eav.php +++ b/app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Product/Indexer/Eav.php @@ -34,6 +34,13 @@ class Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Indexer_Eav extends Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Indexer_Abstract { + /** + * EAV Indexers by type + * + * @var array + */ + protected $_types; + /** * Define main index table * @@ -44,51 +51,35 @@ protected function _construct() } /** - * Reindex by entities + * Retrieve array of EAV type indexers * - * @param int|array $processIds - * @return Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Indexer_Price + * @return array */ - protected function _reindexEntities($processIds) + public function getIndexers() { - $write = $this->_getWriteAdapter(); - - $this->cloneIndexTable(true); - - if (!is_array($processIds)) { - $processIds = array($processIds); + if (is_null($this->_types)) { + $this->_types = array( + 'source' => Mage::getResourceModel('catalog/product_indexer_eav_source'), + 'decimal' => Mage::getResourceModel('catalog/product_indexer_eav_decimal'), + ); } - $parentIds = $this->getRelationsByChild($processIds); - if ($parentIds) { - $processIds = array_unique(array_merge($processIds, $parentIds)); - } - $childIds = $this->getRelationsByParent($parentIds); - if ($childIds) { - $processIds = array_unique(array_merge($processIds, $childIds)); - } - - $this->_prepareSelectIndex($processIds); - $this->_prepareMultiselectIndex($processIds); - $this->_prepareRelationIndex($processIds); - $this->_removeNotVisibleEntityFromIndex(); - - $write->beginTransaction(); - try { - // remove old index - $where = $write->quoteInto('entity_id IN(?)', $processIds); - $write->delete($this->getMainTable(), $where); - - // insert new index - $this->insertFromTable($this->getIdxTable(), $this->getMainTable()); + return $this->_types; + } - $this->commit(); - } catch (Exception $e) { - $this->rollBack(); - throw $e; + /** + * Retrieve indexer instance by type + * + * @param string $type + * @return Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Indexer_Eav_Abstract + */ + public function getIndexer($type) + { + $indexers = $this->getIndexers(); + if (!isset($indexers[$type])) { + Mage::throwException(Mage::helper('catalog')->__('Unknown eav indexer type "%s"', $type)); } - - return $this; + return $indexers[$type]; } /** @@ -111,7 +102,12 @@ public function catalogProductSave(Mage_Index_Model_Event $event) return $this; } - return $this->_reindexEntities($productId); + foreach ($this->getIndexers() as $indexer) { + /* @var $indexer Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Indexer_Eav_Abstract */ + $indexer->reindexEntities($productId); + } + + return $this; } /** @@ -127,7 +123,12 @@ public function catalogProductDelete(Mage_Index_Model_Event $event) return $this; } - return $this->_reindexEntities($data['reindex_eav_parent_ids']); + foreach ($this->getIndexers() as $indexer) { + /* @var $indexer Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Indexer_Eav_Abstract */ + $indexer->reindexEntities($data['reindex_eav_parent_ids']); + } + + return $this; } /** @@ -143,7 +144,12 @@ public function catalogProductMassAction(Mage_Index_Model_Event $event) return $this; } - return $this->_reindexEntities($data['reindex_eav_product_ids']); + foreach ($this->getIndexers() as $indexer) { + /* @var $indexer Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Indexer_Eav_Abstract */ + $indexer->reindexEntities($data['reindex_eav_product_ids']); + } + + return $this; } /** @@ -159,230 +165,9 @@ public function catalogEavAttributeSave(Mage_Index_Model_Event $event) return $this; } - $attributeId = $event->getEntityPk(); - $write = $this->_getWriteAdapter(); - - if (empty($data['is_indexable'])) { - // remove attribute data from main index - $write->beginTransaction(); - try { - - $where = $write->quoteInto('attribute_id=?', $attributeId); - $write->delete($this->getMainTable(), $where); - $write->commit(); - } catch (Exception $e) { - $write->rollback(); - throw $e; - } - } else { - $this->cloneIndexTable(true); - - $this->_prepareSelectIndex(null, $attributeId); - $this->_prepareMultiselectIndex(null, $attributeId); - $this->_prepareRelationIndex(); - $this->_removeNotVisibleEntityFromIndex(); - - $this->beginTransaction(); - try { - // remove index by attribute - $where = $write->quoteInto('attribute_id=?', $attributeId); - $write->delete($this->getMainTable(), $where); - - // insert new index - $this->insertFromTable($this->getIdxTable(), $this->getMainTable()); - - $write->commit(); - } catch (Exception $e) { - $write->rollback(); - throw $e; - } - } - - return $this; - } - - /** - * Prepare temporary data index for select filtrable attribute - * - * @param array $entityIds the entity ids limitation - * @param int $attributeId the attribute id limitation - * @return Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Indexer_Eav - */ - protected function _prepareSelectIndex($entityIds = null, $attributeId = null) - { - $write = $this->_getWriteAdapter(); - $idxTable = $this->getIdxTable(); - // prepare select attributes - if (is_null($attributeId)) { - $attrIds = $this->_getFilterableAttributeIds(false); - } else { - $attrIds = array($attributeId); - } - - $select = $write->select() - ->from( - array('pid' => $this->getValueTable('catalog/product', 'int')), - array('entity_id', 'attribute_id')) - ->join( - array('cs' => $this->getTable('core/store')), - '', - array('store_id')) - ->joinLeft( - array('pis' => $this->getValueTable('catalog/product', 'int')), - 'pis.entity_id = pid.entity_id AND pis.attribute_id = pid.attribute_id' - . ' AND pis.store_id=cs.store_id', - array('value' => new Zend_Db_Expr('IF(pis.value_id > 0, pis.value, pid.value)'))) - ->where('pid.store_id=?', 0) - ->where('cs.store_id!=?', 0) - ->where('pid.attribute_id IN(?)', $attrIds) - ->where('IF(pis.value_id > 0, pis.value, pid.value) IS NOT NULL'); - - $statusCond = $write->quoteInto('=?', Mage_Catalog_Model_Product_Status::STATUS_ENABLED); - $this->_addAttributeToSelect($select, 'status', 'pid.entity_id', 'cs.store_id', $statusCond); - - if (!is_null($entityIds)) { - $select->where('pid.entity_id IN(?)', $entityIds); - } - - /** - * Add additional external limitation - */ - Mage::dispatchEvent('prepare_catalog_product_index_select', array( - 'select' => $select, - 'entity_field' => new Zend_Db_Expr('pid.entity_id'), - 'website_field' => new Zend_Db_Expr('cs.website_id'), - 'store_field' => new Zend_Db_Expr('cs.store_id') - )); - - $query = $select->insertFromSelect($idxTable); - $write->query($query); - - return $this; - } - - /** - * Prepare temporary data index for multiselect filtrable attribute - * - * @param array $entityIds the entity ids limitation - * @param int $attributeId the attribute id limitation - * @return Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Indexer_Eav - */ - protected function _prepareMultiselectIndex($entityIds = null, $attributeId = null) - { - $write = $this->_getWriteAdapter(); - $idxTable = $this->getIdxTable(); - - // prepare multiselect attributes - if (is_null($attributeId)) { - $attrIds = $this->_getFilterableAttributeIds(true); - } else { - $attrIds = array($attributeId); - } - - $select = $write->select() - ->from( - array('pvd' => $this->getValueTable('catalog/product', 'varchar')), - array('entity_id', 'attribute_id')) - ->join( - array('cs' => $this->getTable('core/store')), - '', - array('store_id')) - ->joinLeft( - array('pvs' => $this->getValueTable('catalog/product', 'varchar')), - 'pvs.entity_id = pvd.entity_id AND pvs.attribute_id = pvd.attribute_id' - . ' AND pvs.store_id=cs.store_id', - array('value' => new Zend_Db_Expr('IF(pvs.value_id > 0, pvs.value, pvd.value)'))) - ->join( - array('eo' => $this->getTable('eav/attribute_option')), - 'FIND_IN_SET(eo.option_id, IF(pvs.value_id, pvs.value, pvd.value))', - array() - ) - ->where('pvd.store_id=?', 0) - ->where('cs.store_id!=?', 0) - ->where('pvd.attribute_id IN(?)', $attrIds); - - $statusCond = $write->quoteInto('=?', '=' . Mage_Catalog_Model_Product_Status::STATUS_ENABLED); - $this->_addAttributeToSelect($select, 'status', 'pvd.entity_id', 'cs.store_id', $statusCond); - - if (!is_null($entityIds)) { - $select->where('pvd.entity_id IN(?)', $entityIds); - } - - /** - * Add additional external limitation - */ - Mage::dispatchEvent('prepare_catalog_product_index_select', array( - 'select' => $select, - 'entity_field' => new Zend_Db_Expr('pvd.entity_id'), - 'website_field' => new Zend_Db_Expr('cs.website_id'), - 'store_field' => new Zend_Db_Expr('cs.store_id') - )); + $indexer = $this->getIndexer($data['attribute_index_type']); - $query = $select->insertFromSelect($idxTable); - $write->query($query); - - return $this; - } - - /** - * Prepare temporary data index for product relations - * - * @param array $parentIds the parent entity ids limitation - * @return Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Indexer_Eav - */ - protected function _prepareRelationIndex($parentIds = null) - { - $write = $this->_getWriteAdapter(); - $idxTable = $this->getIdxTable(); - - $select = $write->select() - ->from(array('l' => $this->getTable('catalog/product_relation')), 'parent_id') - ->join( - array('cs' => $this->getTable('core/store')), - '', - array()) - ->join( - array('i' => $idxTable), - 'l.child_id=i.entity_id AND cs.store_id = i.store_id', - array('attribute_id', 'store_id', 'value')); - if (!is_null($parentIds)) { - $select->where('l.parent_id IN(?)', $parentIds); - } - - /** - * Add additional external limitation - */ - Mage::dispatchEvent('prepare_catalog_product_index_select', array( - 'select' => $select, - 'entity_field' => new Zend_Db_Expr('l.parent_id'), - 'website_field' => new Zend_Db_Expr('cs.website_id'), - 'store_field' => new Zend_Db_Expr('cs.store_id') - )); - - $query = $select->insertIgnoreFromSelect($idxTable); - $write->query($query); - - return $this; - } - - /** - * Remove Not Visible products from temporary data index - * - * @return Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Indexer_Eav - */ - protected function _removeNotVisibleEntityFromIndex() - { - $write = $this->_getWriteAdapter(); - $idxTable = $this->getIdxTable(); - - $select = $write->select() - ->from($idxTable, null); - - $condition = $write->quoteInto('=?',Mage_Catalog_Model_Product_Visibility::VISIBILITY_NOT_VISIBLE); - $this->_addAttributeToSelect($select, 'visibility', $idxTable.'.entity_id', $idxTable.'.store_id', $condition); - - $query = $select->deleteFromSelect($idxTable); - $write->query($query); + $indexer->reindexAttribute($event->getEntityPk(), !empty($data['is_indexable'])); return $this; } @@ -394,41 +179,11 @@ protected function _removeNotVisibleEntityFromIndex() */ public function reindexAll() { - $this->cloneIndexTable(true); - - $this->_prepareSelectIndex(); - $this->_prepareMultiselectIndex(); - $this->_prepareRelationIndex(); - $this->_removeNotVisibleEntityFromIndex(); - - $this->syncData(); - return $this; - } - - /** - * Retrieve filterable (used in LN) attribute ids - * - * @param bool $multiSelect - * @return array - */ - protected function _getFilterableAttributeIds($multiSelect) - { - $select = $this->_getReadAdapter()->select() - ->from(array('ca' => $this->getTable('catalog/eav_attribute')), 'attribute_id') - ->join( - array('ea' => $this->getTable('eav/attribute')), - 'ca.attribute_id = ea.attribute_id', - array()) - ->where('ca.is_filterable_in_search>0 OR ca.is_filterable>0'); - - if ($multiSelect == true) { - $select->where('ea.backend_type = ?', 'varchar') - ->where('ea.frontend_input = ?', 'multiselect'); - } else { - $select->where('ea.backend_type = ?', 'int') - ->where('ea.frontend_input = ?', 'select'); + foreach ($this->getIndexers() as $indexer) { + /* @var $indexer Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Indexer_Eav_Abstract */ + $indexer->reindexAll(); } - return $this->_getReadAdapter()->fetchCol($select); + return $this; } } diff --git a/app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Product/Indexer/Eav/Abstract.php b/app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Product/Indexer/Eav/Abstract.php new file mode 100644 index 0000000000..1a4e60f4e0 --- /dev/null +++ b/app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Product/Indexer/Eav/Abstract.php @@ -0,0 +1,266 @@ + + */ +abstract class Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Indexer_Eav_Abstract + extends Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Indexer_Abstract +{ + /** + * Rebuild all index data + * + * @param Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Indexer_Eav_Decimal + */ + public function reindexAll() + { + $this->cloneIndexTable(true); + + $this->_prepareIndex(); + $this->_prepareRelationIndex(); + $this->_removeNotVisibleEntityFromIndex(); + + $this->syncData(); + + return $this; + } + + /** + * Rebuild index data by entities + * + * @param int|array $processIds + * @param Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Indexer_Eav_Abstract + */ + public function reindexEntities($processIds) + { + $adapter = $this->_getWriteAdapter(); + + $this->cloneIndexTable(true); + + if (!is_array($processIds)) { + $processIds = array($processIds); + } + + $parentIds = $this->getRelationsByChild($processIds); + if ($parentIds) { + $processIds = array_unique(array_merge($processIds, $parentIds)); + } + $childIds = $this->getRelationsByParent($parentIds); + if ($childIds) { + $processIds = array_unique(array_merge($processIds, $childIds)); + } + + $this->_prepareIndex($processIds); + $this->_prepareRelationIndex($processIds); + $this->_removeNotVisibleEntityFromIndex(); + + $adapter->beginTransaction(); + try { + // remove old index + $where = $adapter->quoteInto('entity_id IN(?)', $processIds); + $adapter->delete($this->getMainTable(), $where); + + // insert new index + $this->insertFromTable($this->getIdxTable(), $this->getMainTable()); + + $adapter->commit(); + } catch (Exception $e) { + $adapter->rollBack(); + throw $e; + } + + return $this; + } + + /** + * Rebuild index data by attribute id + * If attribute is not indexable remove data by attribute + * + * @param int $attributeId + * @param bool $isIndexable + * @param Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Indexer_Eav_Abstract + */ + public function reindexAttribute($attributeId, $isIndexable = true) + { + if (!$isIndexable) { + $this->_removeAttributeIndexData($attributeId); + } else { + $this->cloneIndexTable(true); + + $this->_prepareIndex(null, $attributeId); + $this->_prepareRelationIndex(); + $this->_removeNotVisibleEntityFromIndex(); + + $this->_synchronizeAttributeIndexData($attributeId); + } + + return $this; + } + + /** + * Prepare data index for indexable attributes + * + * @param array $entityIds the entity ids limitation + * @param int $attributeId the attribute id limitation + * @return Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Indexer_Eav_Decimal + */ + abstract protected function _prepareIndex($entityIds = null, $attributeId = null); + + /** + * Remove Not Visible products from temporary data index + * + * @return Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Indexer_Eav + */ + protected function _removeNotVisibleEntityFromIndex() + { + $write = $this->_getWriteAdapter(); + $idxTable = $this->getIdxTable(); + + $select = $write->select() + ->from($idxTable, null); + + $condition = $write->quoteInto('=?',Mage_Catalog_Model_Product_Visibility::VISIBILITY_NOT_VISIBLE); + $this->_addAttributeToSelect($select, 'visibility', $idxTable.'.entity_id', $idxTable.'.store_id', $condition); + + $query = $select->deleteFromSelect($idxTable); + $write->query($query); + + return $this; + } + + /** + * Prepare data index for product relations + * + * @param array $parentIds the parent entity ids limitation + * @return Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Indexer_Eav + */ + protected function _prepareRelationIndex($parentIds = null) + { + $write = $this->_getWriteAdapter(); + $idxTable = $this->getIdxTable(); + + $select = $write->select() + ->from(array('l' => $this->getTable('catalog/product_relation')), 'parent_id') + ->join( + array('cs' => $this->getTable('core/store')), + '', + array()) + ->join( + array('i' => $idxTable), + 'l.child_id=i.entity_id AND cs.store_id = i.store_id', + array('attribute_id', 'store_id', 'value')); + if (!is_null($parentIds)) { + $select->where('l.parent_id IN(?)', $parentIds); + } + + /** + * Add additional external limitation + */ + Mage::dispatchEvent('prepare_catalog_product_index_select', array( + 'select' => $select, + 'entity_field' => new Zend_Db_Expr('l.parent_id'), + 'website_field' => new Zend_Db_Expr('cs.website_id'), + 'store_field' => new Zend_Db_Expr('cs.store_id') + )); + + $query = $select->insertIgnoreFromSelect($idxTable); + $write->query($query); + + return $this; + } + + /** + * Retrieve condition for retrieve indexable attribute select + * + * the catalog/eav_attribute table must have alias is ca + * + * @return string + */ + protected function _getIndexableAttributesCondition() + { + $conditions = array( + 'ca.is_filterable_in_search>0', + 'ca.is_visible_in_advanced_search>0', + 'ca.is_filterable>0' + ); + + return join(' OR ', $conditions); + } + + /** + * Remove index data from index by attribute id + * + * @param int $attributeId + * @return Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Indexer_Eav_Abstract + */ + protected function _removeAttributeIndexData($attributeId) + { + $adapter = $this->_getWriteAdapter(); + $adapter->beginTransaction(); + try { + $where = $adapter->quoteInto('attribute_id=?', $attributeId); + $adapter->delete($this->getMainTable(), $where); + $adapter->commit(); + } catch (Exception $e) { + $adapter->rollback(); + throw $e; + } + + return $this; + } + + /** + * Synchronize temporary index table with index table by attribute id + * + * @param int $attributeId + * @return Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Indexer_Eav_Abstract + */ + protected function _synchronizeAttributeIndexData($attributeId) + { + $adapter = $this->_getWriteAdapter(); + $adapter->beginTransaction(); + try { + // remove index by attribute + $where = $adapter->quoteInto('attribute_id=?', $attributeId); + $adapter->delete($this->getMainTable(), $where); + + // insert new index + $this->insertFromTable($this->getIdxTable(), $this->getMainTable()); + + $adapter->commit(); + } catch (Exception $e) { + $adapter->rollback(); + throw $e; + } + + return $this; + } +} diff --git a/app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Product/Indexer/Eav/Decimal.php b/app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Product/Indexer/Eav/Decimal.php new file mode 100644 index 0000000000..8bacb14ab8 --- /dev/null +++ b/app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Product/Indexer/Eav/Decimal.php @@ -0,0 +1,131 @@ + + */ +class Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Indexer_Eav_Decimal + extends Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Indexer_Eav_Abstract +{ + /** + * Initialize connection and define main index table + * + */ + protected function _construct() + { + $this->_init('catalog/product_index_eav_decimal', 'entity_id'); + } + + /** + * Prepare data index for indexable attributes + * + * @param array $entityIds the entity ids limitation + * @param int $attributeId the attribute id limitation + * @return Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Indexer_Eav_Decimal + */ + protected function _prepareIndex($entityIds = null, $attributeId = null) + { + $write = $this->_getWriteAdapter(); + $idxTable = $this->getIdxTable(); + // prepare select attributes + if (is_null($attributeId)) { + $attrIds = $this->_getIndexableAttributes(); + } else { + $attrIds = array($attributeId); + } + + if (!$attrIds) { + return $this; + } + + $select = $write->select() + ->from( + array('pdd' => $this->getValueTable('catalog/product', 'decimal')), + array('entity_id', 'attribute_id')) + ->join( + array('cs' => $this->getTable('core/store')), + '', + array('store_id')) + ->joinLeft( + array('pds' => $this->getValueTable('catalog/product', 'decimal')), + 'pds.entity_id = pdd.entity_id AND pds.attribute_id = pdd.attribute_id' + . ' AND pds.store_id=cs.store_id', + array('value' => new Zend_Db_Expr('IF(pds.value_id > 0, pds.value, pdd.value)'))) + ->where('pdd.store_id=?', 0) + ->where('cs.store_id!=?', 0) + ->where('pdd.attribute_id IN(?)', $attrIds) + ->where('IF(pds.value_id > 0, pds.value, pdd.value) IS NOT NULL'); + + $statusCond = $write->quoteInto('=?', Mage_Catalog_Model_Product_Status::STATUS_ENABLED); + $this->_addAttributeToSelect($select, 'status', 'pdd.entity_id', 'cs.store_id', $statusCond); + + if (!is_null($entityIds)) { + $select->where('pdd.entity_id IN(?)', $entityIds); + } + + /** + * Add additional external limitation + */ + Mage::dispatchEvent('prepare_catalog_product_index_select', array( + 'select' => $select, + 'entity_field' => new Zend_Db_Expr('pdd.entity_id'), + 'website_field' => new Zend_Db_Expr('cs.website_id'), + 'store_field' => new Zend_Db_Expr('cs.store_id') + )); + + $query = $select->insertFromSelect($idxTable); + $write->query($query); + + return $this; + } + + /** + * Retrieve decimal indexable attributes + * + * @return array + */ + protected function _getIndexableAttributes() + { + $adapter = $this->_getReadAdapter(); + $select = $adapter->select() + ->from(array('ca' => $this->getTable('catalog/eav_attribute')), 'attribute_id') + ->join( + array('ea' => $this->getTable('eav/attribute')), + 'ca.attribute_id = ea.attribute_id', + array()) + ->where('ea.attribute_code<>?', 'price') + ->where($this->_getIndexableAttributesCondition()) + ->where('ea.backend_type=?', 'decimal'); + + return $adapter->fetchCol($select); + } +} + diff --git a/app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Product/Indexer/Eav/Source.php b/app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Product/Indexer/Eav/Source.php new file mode 100644 index 0000000000..2d317b82d4 --- /dev/null +++ b/app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Product/Indexer/Eav/Source.php @@ -0,0 +1,264 @@ + + */ +class Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Indexer_Eav_Source + extends Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Indexer_Eav_Abstract +{ + /** + * Initialize connection and define main index table + * + */ + protected function _construct() + { + $this->_init('catalog/product_index_eav', 'entity_id'); + } + + /** + * Retrieve indexable eav attribute ids + * + * @param bool $multiSelect + * @return array + */ + protected function _getIndexableAttributes($multiSelect) + { + $select = $this->_getReadAdapter()->select() + ->from(array('ca' => $this->getTable('catalog/eav_attribute')), 'attribute_id') + ->join( + array('ea' => $this->getTable('eav/attribute')), + 'ca.attribute_id = ea.attribute_id', + array()) + ->where($this->_getIndexableAttributesCondition()); + + if ($multiSelect == true) { + $select->where('ea.backend_type = ?', 'varchar') + ->where('ea.frontend_input = ?', 'multiselect'); + } else { + $select->where('ea.backend_type = ?', 'int') + ->where('ea.frontend_input = ?', 'select'); + } + + return $this->_getReadAdapter()->fetchCol($select); + } + + /** + * Prepare data index for indexable attributes + * + * @param array $entityIds the entity ids limitation + * @param int $attributeId the attribute id limitation + * @return Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Indexer_Eav_Decimal + */ + protected function _prepareIndex($entityIds = null, $attributeId = null) + { + $this->_prepareSelectIndex($entityIds, $attributeId); + $this->_prepareMultiselectIndex($entityIds, $attributeId); + + return $this; + } + + + /** + * Prepare data index for indexable select attributes + * + * @param array $entityIds the entity ids limitation + * @param int $attributeId the attribute id limitation + * @return Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Indexer_Eav_Source + */ + protected function _prepareSelectIndex($entityIds = null, $attributeId = null) + { + $adapter = $this->_getWriteAdapter(); + $idxTable = $this->getIdxTable(); + // prepare select attributes + if (is_null($attributeId)) { + $attrIds = $this->_getIndexableAttributes(false); + } else { + $attrIds = array($attributeId); + } + + if (!$attrIds) { + return $this; + } + + $select = $adapter->select() + ->from( + array('pid' => $this->getValueTable('catalog/product', 'int')), + array('entity_id', 'attribute_id')) + ->join( + array('cs' => $this->getTable('core/store')), + '', + array('store_id')) + ->joinLeft( + array('pis' => $this->getValueTable('catalog/product', 'int')), + 'pis.entity_id = pid.entity_id AND pis.attribute_id = pid.attribute_id' + . ' AND pis.store_id=cs.store_id', + array('value' => new Zend_Db_Expr('IF(pis.value_id > 0, pis.value, pid.value)'))) + ->where('pid.store_id=?', 0) + ->where('cs.store_id!=?', 0) + ->where('pid.attribute_id IN(?)', $attrIds) + ->where('IF(pis.value_id > 0, pis.value, pid.value) IS NOT NULL'); + + $statusCond = $adapter->quoteInto('=?', Mage_Catalog_Model_Product_Status::STATUS_ENABLED); + $this->_addAttributeToSelect($select, 'status', 'pid.entity_id', 'cs.store_id', $statusCond); + + if (!is_null($entityIds)) { + $select->where('pid.entity_id IN(?)', $entityIds); + } + + /** + * Add additional external limitation + */ + Mage::dispatchEvent('prepare_catalog_product_index_select', array( + 'select' => $select, + 'entity_field' => new Zend_Db_Expr('pid.entity_id'), + 'website_field' => new Zend_Db_Expr('cs.website_id'), + 'store_field' => new Zend_Db_Expr('cs.store_id') + )); + + $query = $select->insertFromSelect($idxTable); + $adapter->query($query); + + return $this; + } + + /** + * Prepare data index for indexable multiply select attributes + * + * @param array $entityIds the entity ids limitation + * @param int $attributeId the attribute id limitation + * @return Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Indexer_Eav + */ + protected function _prepareMultiselectIndex($entityIds = null, $attributeId = null) + { + $adapter = $this->_getWriteAdapter(); + + // prepare multiselect attributes + if (is_null($attributeId)) { + $attrIds = $this->_getIndexableAttributes(true); + } else { + $attrIds = array($attributeId); + } + + if (!$attrIds) { + return $this; + } + + // load attribute options + $options = array(); + $select = $adapter->select() + ->from($this->getTable('eav/attribute_option'), array('attribute_id', 'option_id')) + ->where('attribute_id IN(?)', $attrIds); + $query = $select->query(); + while ($row = $query->fetch()) { + $options[$row['attribute_id']][$row['option_id']] = true; + } + + // prepare get multiselect values query + $select = $adapter->select() + ->from( + array('pvd' => $this->getValueTable('catalog/product', 'varchar')), + array('entity_id', 'attribute_id')) + ->join( + array('cs' => $this->getTable('core/store')), + '', + array('store_id')) + ->joinLeft( + array('pvs' => $this->getValueTable('catalog/product', 'varchar')), + 'pvs.entity_id = pvd.entity_id AND pvs.attribute_id = pvd.attribute_id' + . ' AND pvs.store_id=cs.store_id', + array('value' => new Zend_Db_Expr('IF(pvs.value_id>0, pvs.value, pvd.value)'))) + ->where('pvd.store_id=?', 0) + ->where('cs.store_id!=?', 0) + ->where('pvd.attribute_id IN(?)', $attrIds); + + $statusCond = $adapter->quoteInto('=?', Mage_Catalog_Model_Product_Status::STATUS_ENABLED); + $this->_addAttributeToSelect($select, 'status', 'pvd.entity_id', 'cs.store_id', $statusCond); + + if (!is_null($entityIds)) { + $select->where('pvd.entity_id IN(?)', $entityIds); + } + + /** + * Add additional external limitation + */ + Mage::dispatchEvent('prepare_catalog_product_index_select', array( + 'select' => $select, + 'entity_field' => new Zend_Db_Expr('pvd.entity_id'), + 'website_field' => new Zend_Db_Expr('cs.website_id'), + 'store_field' => new Zend_Db_Expr('cs.store_id') + )); + + $i = 0; + $data = array(); + $query = $select->query(); + while ($row = $query->fetch()) { + $values = explode(',', $row['value']); + foreach ($values as $valueId) { + if (isset($options[$row['attribute_id']][$valueId])) { + $data[] = array( + $row['entity_id'], + $row['attribute_id'], + $row['store_id'], + $valueId + ); + $i ++; + if ($i % 10000 == 0) { + $this->_saveIndexData($data); + $data = array(); + } + } + } + } + + $this->_saveIndexData($data); + unset($options); + unset($data); + + return $this; + } + + /** + * Save a data to temporary source index table + * + * @param array $data + * @return Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Indexer_Eav_Source + */ + protected function _saveIndexData(array $data) + { + if (!$data) { + return $this; + } + $adapter = $this->_getWriteAdapter(); + $adapter->insertArray($this->getIdxTable(), array('entity_id', 'attribute_id', 'store_id', 'value'), $data); + return $this; + } +} diff --git a/app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Product/Indexer/Price.php b/app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Product/Indexer/Price.php index 85240e655e..6a83c567a7 100644 --- a/app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Product/Indexer/Price.php +++ b/app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Product/Indexer/Price.php @@ -162,6 +162,7 @@ public function catalogProductSave(Mage_Index_Model_Event $event) } $this->cloneIndexTable(true); + $this->_prepareWebsiteDateTable(); $indexer = $this->_getIndexer($data['product_type_id']); $processIds = array($productId); @@ -348,6 +349,7 @@ public function getTypeIndexers() public function reindexAll() { $this->cloneIndexTable(true); + $this->_prepareWebsiteDateTable(); $this->_prepareTierPriceIndex(); $indexers = $this->getTypeIndexers(); @@ -406,8 +408,12 @@ protected function _prepareTierPriceIndex($entityIds = null) array('cw' => $this->getTable('core/website')), 'tp.website_id = 0 OR tp.website_id = cw.website_id', array('website_id')) + ->join( + array('cwd' => $this->_getWebsiteDateTable()), + 'cw.website_id = cwd.website_id', + array()) ->where('cw.website_id != 0') - ->columns(new Zend_Db_Expr('MIN(tp.value)')) + ->columns(new Zend_Db_Expr('MIN(IF(tp.website_id=0, ROUND(tp.value * cwd.rate, 4), tp.value))')) ->group(array('tp.entity_id', 'cg.customer_group_id', 'cw.website_id')); if (!empty($entityIds)) { @@ -449,4 +455,71 @@ protected function _copyRelationIndexData($parentIds, $excludeIds = null) return $this; } + + /** + * Retrieve website current dates table name + * + * @return string + */ + protected function _getWebsiteDateTable() + { + return $this->getIdxTable($this->getValueTable('core/website', 'date')); + } + + /** + * Prepare website current dates table + * + * @return Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Indexer_Price_Default + */ + protected function _prepareWebsiteDateTable() + { + $write = $this->_getWriteAdapter(); + $table = $this->_getWebsiteDateTable(); + + $query = sprintf('DROP TABLE IF EXISTS %s', $write->quoteIdentifier($table)); + $write->query($query); + + $query = sprintf('CREATE TABLE %s (' + . ' `website_id` SMALLINT(5) UNSIGNED NOT NULL,' + . ' `date` DATE DEFAULT NULL,' + . ' `rate` FLOAT(12, 4) UNSIGNED DEFAULT 1,' + . ' PRIMARY KEY (`website_id`),' + . ' KEY `IDX_DATE` (`date`)' + . ') ENGINE=INNODB DEFAULT CHARSET=utf8', + $write->quoteIdentifier($table)); + $write->query($query); + + $baseCurrency = Mage::app()->getBaseCurrencyCode(); + $data = array(); + /* @var $coreDate Mage_Core_Model_Date */ + $websites = Mage::app()->getWebsites(false); + foreach ($websites as $website) { + /* @var $website Mage_Core_Model_Website */ + if ($website->getBaseCurrencyCode() != $baseCurrency) { + $rate = Mage::getModel('directory/currency') + ->load($baseCurrency) + ->getRate($website->getBaseCurrencyCode()); + if (!$rate) { + $rate = 1; + } + } else { + $rate = 1; + } + $store = $website->getDefaultStore(); + if ($store) { + $timestamp = Mage::app()->getLocale()->storeTimeStamp($store); + $data[] = array( + 'website_id' => $website->getId(), + 'date' => $this->formatDate($timestamp, false), + 'rate' => $rate + ); + } + } + + if ($data) { + $write->insertMultiple($table, $data); + } + + return $this; + } } diff --git a/app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Product/Indexer/Price/Configurable.php b/app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Product/Indexer/Price/Configurable.php index c134cd7b07..1976884c58 100644 --- a/app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Product/Indexer/Price/Configurable.php +++ b/app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Product/Indexer/Price/Configurable.php @@ -182,6 +182,10 @@ protected function _applyConfigurableOption() 'a.product_super_attribute_id = apw.product_super_attribute_id' . ' AND apw.website_id = i.website_id AND cp.value = apw.value_index', array()) + ->join( + array('le' => $this->getTable('catalog/product')), + 'le.entity_id = l.product_id', + array()) ->columns(new Zend_Db_Expr("SUM(IF((@price:=IF(apw.value_id, apw.pricing_value, apd.pricing_value))" . " IS NULL, 0, IF(IF(apw.value_id, apw.is_percent, apd.is_percent) = 1, " . "ROUND(i.price * (@price / 100), 4), @price)))")) @@ -189,6 +193,7 @@ protected function _applyConfigurableOption() . "IF(apw.value_id, apw.pricing_value, apd.pricing_value)) IS NULL, 0, IF(" . "IF(apw.value_id, apw.is_percent, apd.is_percent) = 1, " . "ROUND(i.price * (@tier_price / 100), 4), @tier_price))), NULL)")) + ->where('le.required_options=0') ->group(array('l.parent_id', 'i.customer_group_id', 'i.website_id', 'l.product_id')); $query = $select->insertFromSelect($coaTable); diff --git a/app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Product/Indexer/Price/Default.php b/app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Product/Indexer/Price/Default.php index 6ccf50fc13..deec5dc292 100644 --- a/app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Product/Indexer/Price/Default.php +++ b/app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Product/Indexer/Price/Default.php @@ -136,16 +136,6 @@ public function reindexEntity($entityIds) return $this; } - /** - * Retrieve website current dates table name - * - * @return string - */ - protected function _getWebsiteDateTable() - { - return $this->getIdxTable($this->getValueTable('core/website', 'date')); - } - /** * Retrieve final price temporary index table name * @@ -157,50 +147,6 @@ protected function _getDefaultFinalPriceTable() return $this->getIdxTable($this->getMainTable() . '_final'); } - /** - * Prepare website current dates table - * - * @return Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Indexer_Price_Default - */ - protected function _prepareWebsiteDateTable() - { - $write = $this->_getWriteAdapter(); - $table = $this->_getWebsiteDateTable(); - - $query = sprintf('DROP TABLE IF EXISTS %s', $write->quoteIdentifier($table)); - $write->query($query); - - $query = sprintf('CREATE TABLE %s (' - . ' `website_id` SMALLINT(5) UNSIGNED NOT NULL,' - . ' `date` DATE DEFAULT NULL,' - . ' PRIMARY KEY (`website_id`),' - . ' KEY `IDX_DATE` (`date`)' - . ') ENGINE=INNODB DEFAULT CHARSET=utf8', - $write->quoteIdentifier($table)); - $write->query($query); - - $data = array(); - /* @var $coreDate Mage_Core_Model_Date */ - $websites = Mage::app()->getWebsites(false); - foreach ($websites as $website) { - /* @var $website Mage_Core_Model_Website */ - $store = $website->getDefaultStore(); - if ($store) { - $timestamp = Mage::app()->getLocale()->storeTimeStamp($store); - $data[] = array( - 'website_id' => $website->getId(), - 'date' => $this->formatDate($timestamp, false) - ); - } - } - - if ($data) { - $write->insertMultiple($table, $data); - } - - return $this; - } - /** * Prepare final price temporary index table * @@ -224,6 +170,7 @@ protected function _prepareDefaultFinalPriceTable() . ' `min_price` DECIMAL(12,4) DEFAULT NULL,' . ' `max_price` DECIMAL(12,4) DEFAULT NULL,' . ' `tier_price` DECIMAL(12,4) DEFAULT NULL,' + . ' `base_tier` DECIMAL(12,4) DEFAULT NULL,' . ' PRIMARY KEY (`entity_id`,`customer_group_id`,`website_id`)' . ') ENGINE=MYISAM DEFAULT CHARSET=utf8', $write->quoteIdentifier($table)); @@ -232,6 +179,16 @@ protected function _prepareDefaultFinalPriceTable() return $this; } + /** + * Retrieve website current dates table name + * + * @return string + */ + protected function _getWebsiteDateTable() + { + return $this->getIdxTable($this->getValueTable('core/website', 'date')); + } + /** * Prepare products default final price in temporary index table * @@ -240,7 +197,6 @@ protected function _prepareDefaultFinalPriceTable() */ protected function _prepareFinalPriceData($entityIds = null) { - $this->_prepareWebsiteDateTable(); $this->_prepareDefaultFinalPriceTable(); $write = $this->_getWriteAdapter(); @@ -299,7 +255,8 @@ protected function _prepareFinalPriceData($entityIds = null) 'price' => $finalPrice, 'min_price' => $finalPrice, 'max_price' => $finalPrice, - 'tier_price' => new Zend_Db_Expr('tp.min_price') + 'tier_price' => new Zend_Db_Expr('tp.min_price'), + 'base_tier' => new Zend_Db_Expr('tp.min_price'), )); if (!is_null($entityIds)) { @@ -467,10 +424,10 @@ protected function _applyCustomOption() $minPrice = new Zend_Db_Expr("IF(o.is_require, MIN(IF(IF(otps.option_type_price_id>0, otps.price_type, " . "otpd.price_type)='fixed', IF(otps.option_type_price_id>0, otps.price, otpd.price), " . "ROUND(i.price * (IF(otps.option_type_price_id>0, otps.price, otpd.price) / 100), 4))), 0)"); - $tierPrice = new Zend_Db_Expr("IF(i.tier_price IS NOT NULL, IF(o.is_require, " + $tierPrice = new Zend_Db_Expr("IF(i.base_tier IS NOT NULL, IF(o.is_require, " . "MIN(IF(IF(otps.option_type_price_id>0, otps.price_type, otpd.price_type)='fixed', " . "IF(otps.option_type_price_id>0, otps.price, otpd.price), " - . "ROUND(i.tier_price * (IF(otps.option_type_price_id>0, otps.price, otpd.price) / 100), 4))), 0), NULL)"); + . "ROUND(i.base_tier * (IF(otps.option_type_price_id>0, otps.price, otpd.price) / 100), 4))), 0), NULL)"); $maxPrice = new Zend_Db_Expr("IF((o.type='radio' OR o.type='drop_down'), " . "MAX(IF(IF(otps.option_type_price_id>0, otps.price_type, otpd.price_type)='fixed', " . "IF(otps.option_type_price_id>0, otps.price, otpd.price), " @@ -521,9 +478,9 @@ protected function _applyCustomOption() . " IF(ops.option_price_id>0, ops.price, opd.price), ROUND(i.price * (IF(ops.option_price_id>0, " . "ops.price, opd.price) / 100), 4))) AND o.is_require, @price,0)"); $maxPrice = new Zend_Db_Expr("@price"); - $tierPrice = new Zend_Db_Expr("IF(i.tier_price IS NOT NULL, IF((@tier_price:=IF(IF(ops.option_price_id>0, " + $tierPrice = new Zend_Db_Expr("IF(i.base_tier IS NOT NULL, IF((@tier_price:=IF(IF(ops.option_price_id>0, " . "ops.price_type, opd.price_type)='fixed', IF(ops.option_price_id>0, ops.price, opd.price), " - . "ROUND(i.tier_price * (IF(ops.option_price_id>0, ops.price, opd.price) / 100), 4))) AND o.is_require, " + . "ROUND(i.base_tier * (IF(ops.option_price_id>0, ops.price, opd.price) / 100), 4))) AND o.is_require, " . "@tier_price, 0), NULL)"); $select->columns(array( @@ -578,10 +535,22 @@ protected function _applyCustomOption() */ protected function _movePriceDataToIndexTable() { + $columns = array( + 'entity_id' => 'entity_id', + 'customer_group_id' => 'customer_group_id', + 'website_id' => 'website_id', + 'tax_class_id' => 'tax_class_id', + 'price' => 'orig_price', + 'final_price' => 'price', + 'min_price' => 'min_price', + 'max_price' => 'max_price', + 'tier_price' => 'tier_price' + ); + $write = $this->_getWriteAdapter(); $table = $this->_getDefaultFinalPriceTable(); $select = $write->select() - ->from($table); + ->from($table, $columns); $query = $select->insertFromSelect($this->getIdxTable()); $write->query($query); diff --git a/app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Product/Indexer/Price/Grouped.php b/app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Product/Indexer/Price/Grouped.php index 3d3f456247..6eff30c452 100644 --- a/app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Product/Indexer/Price/Grouped.php +++ b/app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Product/Indexer/Price/Grouped.php @@ -73,9 +73,9 @@ protected function _prepareGroupedProductPriceData($entityIds = null) $select = $write->select() ->from(array('e' => $this->getTable('catalog/product')), 'entity_id') - ->join( + ->joinLeft( array('l' => $this->getTable('catalog/product_link')), - 'e.entity_id = l.product_id', + 'e.entity_id = l.product_id AND l.link_type_id=' . Mage_Catalog_Model_Product_Link::LINK_TYPE_GROUPED, array()) ->join( array('cg' => $this->getTable('customer/customer_group')), @@ -84,21 +84,24 @@ protected function _prepareGroupedProductPriceData($entityIds = null) $this->_addWebsiteJoinToSelect($select, true); $this->_addProductWebsiteJoinToSelect($select, 'cw.website_id', 'e.entity_id'); $select->columns('website_id', 'cw') - ->join( + ->joinLeft( + array('le' => $this->getTable('catalog/product')), + 'le.entity_id = l.linked_product_id', + array()) + ->joinLeft( array('i' => $table), 'i.entity_id = l.linked_product_id AND i.website_id = cw.website_id' . ' AND i.customer_group_id = cg.customer_group_id', array( - 'tax_class_id', + 'tax_class_id'=> new Zend_Db_Expr('IFNULL(i.tax_class_id, 0)'), 'price' => new Zend_Db_Expr('NULL'), 'final_price' => new Zend_Db_Expr('NULL'), - 'min_price' => new Zend_Db_Expr('MIN(i.min_price)'), - 'max_price' => new Zend_Db_Expr('MAX(i.max_price)'), + 'min_price' => new Zend_Db_Expr('MIN(IF(le.required_options = 0, i.min_price, 0))'), + 'max_price' => new Zend_Db_Expr('MAX(IF(le.required_options = 0, i.max_price, 0))'), 'tier_price' => new Zend_Db_Expr('NULL') )) - ->group(array('e.entity_id', 'i.customer_group_id', 'i.website_id')) - ->where('e.type_id=?', $this->getTypeId()) - ->where('l.link_type_id=?', Mage_Catalog_Model_Product_Link::LINK_TYPE_GROUPED); + ->group(array('e.entity_id', 'cg.customer_group_id', 'cw.website_id')) + ->where('e.type_id=?', $this->getTypeId()); if (!is_null($entityIds)) { $select->where('l.product_id IN(?)', $entityIds); @@ -107,7 +110,7 @@ protected function _prepareGroupedProductPriceData($entityIds = null) /** * Add additional external limitation */ - Mage::dispatchEvent('prepare_catalog_product_price_index_select', array( + Mage::dispatchEvent('catalog_product_prepare_index_select', array( 'select' => $select, 'entity_field' => new Zend_Db_Expr('e.entity_id'), 'website_field' => new Zend_Db_Expr('cw.website_id'), 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 1b27dc0918..20974a72ba 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 @@ -89,7 +89,7 @@ protected function _afterSave(Mage_Core_Model_Abstract $object) $baseCurrency = Mage::app()->getBaseCurrencyCode(); - $storeIds = $object->getProduct()->getStoreIds(); + $storeIds = Mage::app()->getStore($object->getStoreId())->getWebsite()->getStoreIds(); if (is_array($storeIds)) { foreach ($storeIds as $storeId) { if ($object->getPriceType() == 'fixed') { diff --git a/app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Setup.php b/app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Setup.php index d7c981d82d..55aba909a2 100644 --- a/app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Setup.php +++ b/app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Setup.php @@ -53,6 +53,7 @@ protected function _prepareValues($attr) 'is_filterable' => $this->_getValue($attr, 'filterable', 0), 'is_comparable' => $this->_getValue($attr, 'comparable', 0), 'is_visible_on_front' => $this->_getValue($attr, 'visible_on_front', 0), + 'is_wysiwyg_enabled' => $this->_getValue($attr, 'wysiwyg_enabled', 0), 'is_html_allowed_on_front' => $this->_getValue($attr, 'is_html_allowed_on_front', 0), 'is_visible_in_advanced_search' => $this->_getValue($attr, 'visible_in_advanced_search', 0), @@ -141,6 +142,8 @@ public function getDefaultEntities() 'searchable' => false, 'filterable' => false, 'comparable' => false, + 'wysiwyg_enabled' => true, + 'is_html_allowed_on_front' => true, 'visible_on_front' => false, 'unique' => false, ), @@ -620,6 +623,8 @@ public function getDefaultEntities() 'searchable' => true, 'filterable' => false, 'comparable' => true, + 'wysiwyg_enabled' => true, + 'is_html_allowed_on_front' => true, 'visible_on_front' => false, 'visible_in_advanced_search' => true, 'unique' => false, @@ -640,6 +645,8 @@ public function getDefaultEntities() 'searchable' => true, 'filterable' => false, 'comparable' => true, + 'wysiwyg_enabled' => true, + 'is_html_allowed_on_front' => true, 'visible_on_front' => false, 'visible_in_advanced_search' => true, 'used_in_product_listing' => true, diff --git a/app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Url.php b/app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Url.php index 0abf7ef5a2..7cc66159c5 100644 --- a/app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Url.php +++ b/app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Url.php @@ -789,6 +789,7 @@ protected function _getProducts($productIds = null, $storeId, $entityId = 0, &$l $product = new Varien_Object($row); $product->setIdFieldName('entity_id'); $product->setCategoryIds(array()); + $product->setStoreId($storeId); $products[$product->getId()] = $product; $lastEntityId = $product->getId(); } diff --git a/app/code/core/Mage/Catalog/Model/Url.php b/app/code/core/Mage/Catalog/Model/Url.php index 4e40b99690..bc482710d1 100644 --- a/app/code/core/Mage/Catalog/Model/Url.php +++ b/app/code/core/Mage/Catalog/Model/Url.php @@ -560,7 +560,7 @@ public function getProductRequestPath($product, $category) /** * Check if existing request past can be used */ - if (strpos($existingRequestPath, $requestPath) !== false) { + if (!empty($requestPath) && strpos($existingRequestPath, $requestPath) !== false) { $existingRequestPath = str_replace($requestPath, '', $existingRequestPath); if (preg_match('#^-([0-9]+)$#i', $existingRequestPath)) { return $this->_rewrites[$idPath]->getRequestPath(); diff --git a/app/code/core/Mage/Catalog/etc/config.xml b/app/code/core/Mage/Catalog/etc/config.xml index 27eec4d731..7ff88701db 100644 --- a/app/code/core/Mage/Catalog/etc/config.xml +++ b/app/code/core/Mage/Catalog/etc/config.xml @@ -28,7 +28,7 @@ - 1.4.0.0.11 + 1.4.0.0.15 @@ -191,6 +191,7 @@ catalog_eav_attribute
catalog_product_relation
catalog_product_index_eav
+ catalog_product_index_eav_decimal
catalog_product_index_price
@@ -663,7 +664,7 @@ --> - + diff --git a/app/code/core/Mage/Catalog/etc/system.xml b/app/code/core/Mage/Catalog/etc/system.xml index 97b01be3ff..3dc6972975 100644 --- a/app/code/core/Mage/Catalog/etc/system.xml +++ b/app/code/core/Mage/Catalog/etc/system.xml @@ -121,7 +121,7 @@ 0 0 - + select diff --git a/app/code/core/Mage/Catalog/etc/widget.xml b/app/code/core/Mage/Catalog/etc/widget.xml index b87dbacbae..a154f24e18 100644 --- a/app/code/core/Mage/Catalog/etc/widget.xml +++ b/app/code/core/Mage/Catalog/etc/widget.xml @@ -29,6 +29,7 @@ Catalog New Products List List of Products that are set as New + 1 1 @@ -66,6 +67,7 @@ Catalog Product Link Link to a Specified Product + 1 1 @@ -115,6 +117,7 @@ Catalog Category Link Link to a Specified Category + 1 1 diff --git a/app/code/core/Mage/Catalog/etc/wsdl.xml b/app/code/core/Mage/Catalog/etc/wsdl.xml index 5f292e36dd..82eab59728 100644 --- a/app/code/core/Mage/Catalog/etc/wsdl.xml +++ b/app/code/core/Mage/Catalog/etc/wsdl.xml @@ -407,7 +407,7 @@ - + @@ -424,7 +424,7 @@ - + @@ -1342,4 +1342,4 @@ - \ No newline at end of file + diff --git a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.42-0.7.43.php b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.42-0.7.43.php deleted file mode 100644 index 56e66c129f..0000000000 --- a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.42-0.7.43.php +++ /dev/null @@ -1,26 +0,0 @@ -updateAttribute('catalog_category', 'url_path', 'is_unique', 0); +$installer->updateAttribute('catalog_product', 'url_path', 'is_unique', 0); diff --git a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.12-1.4.0.0.13.php b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.12-1.4.0.0.13.php new file mode 100644 index 0000000000..6f60c7c090 --- /dev/null +++ b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.12-1.4.0.0.13.php @@ -0,0 +1,47 @@ +startSetup(); +$installer->run(" +CREATE TABLE `{$installer->getTable('catalog/product_index_eav_decimal')}` ( + `entity_id` int(10) unsigned NOT NULL, + `attribute_id` smallint(5) unsigned NOT NULL, + `store_id` smallint(5) unsigned NOT NULL, + `value` decimal(12, 4) NOT NULL, + PRIMARY KEY (`entity_id`,`attribute_id`,`store_id`,`value`), + KEY `IDX_ENTITY` (`entity_id`), + KEY `IDX_ATTRIBUTE` (`attribute_id`), + KEY `IDX_STORE` (`store_id`), + KEY `IDX_VALUE` (`value`), + CONSTRAINT `FK_CATALOG_PRODUCT_INDEX_EAV_DECIMAL_ATTRIBUTE` FOREIGN KEY (`attribute_id`) REFERENCES `{$installer->getTable('eav/attribute')}` (`attribute_id`) ON DELETE CASCADE ON UPDATE CASCADE, + CONSTRAINT `FK_CATALOG_PRODUCT_INDEX_EAV_DECIMAL_ENTITY` FOREIGN KEY (`entity_id`) REFERENCES `{$installer->getTable('catalog/product')}` (`entity_id`) ON DELETE CASCADE ON UPDATE CASCADE, + CONSTRAINT `FK_CATALOG_PRODUCT_INDEX_EAV_DECIMAL_STORE` FOREIGN KEY (`store_id`) REFERENCES `{$installer->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/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.13-1.4.0.0.14.php b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.13-1.4.0.0.14.php new file mode 100644 index 0000000000..60f57acb65 --- /dev/null +++ b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.13-1.4.0.0.14.php @@ -0,0 +1,52 @@ +startSetup(); +$installer->getConnection()->dropKey($installer->getTable('catalog/product_option_price'), + 'IDX_CATALOG_PRODUCT_OPTION_PRICE_SI_OI'); +$installer->getConnection()->addKey($installer->getTable('catalog/product_option_price'), + 'UNQ_OPTION_STORE', array('option_id', 'store_id'), 'unique'); + +$installer->getConnection()->dropKey($installer->getTable('catalog/product_option_title'), + 'IDX_CATALOG_PRODUCT_OPTION_TITLE_SI_OI'); +$installer->getConnection()->addKey($installer->getTable('catalog/product_option_title'), + 'UNQ_OPTION_STORE', array('option_id', 'store_id'), 'unique'); + +$installer->getConnection()->dropKey($installer->getTable('catalog/product_option_type_price'), + 'IDX_CATALOG_PRODUCT_OPTION_TYPE_PRICE_SI_OTI'); +$installer->getConnection()->addKey($installer->getTable('catalog/product_option_type_price'), + 'UNQ_OPTION_TYPE_STORE', array('option_type_id', 'store_id'), 'unique'); + +$installer->getConnection()->dropKey($installer->getTable('catalog/product_option_type_title'), + 'IDX_CATALOG_PRODUCT_OPTION_TYPE_TITLE_SI_OTI'); +$installer->getConnection()->addKey($installer->getTable('catalog/product_option_type_title'), + 'UNQ_OPTION_TYPE_STORE', array('option_type_id', 'store_id'), 'unique'); + +$installer->endSetup(); diff --git a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.14-1.4.0.0.15.php b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.14-1.4.0.0.15.php new file mode 100644 index 0000000000..8e06c810c1 --- /dev/null +++ b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.14-1.4.0.0.15.php @@ -0,0 +1,45 @@ +startSetup(); +$installer->getConnection()->addColumn( + $installer->getTable('catalog/eav_attribute'), + 'is_wysiwyg_enabled', + "TINYINT(1) UNSIGNED NOT NULL DEFAULT '0'"); + +$categoryEntityTypeId = $installer->getEntityTypeId('catalog_category'); +$productEntityTypeId = $installer->getEntityTypeId('catalog_product'); +$installer->updateAttribute($categoryEntityTypeId, 'description', 'is_wysiwyg_enabled', 1); +$installer->updateAttribute($categoryEntityTypeId, 'description', 'is_html_allowed_on_front', 1); +$installer->updateAttribute($productEntityTypeId, 'description', 'is_wysiwyg_enabled', 1); +$installer->updateAttribute($productEntityTypeId, 'description', 'is_html_allowed_on_front', 1); +$installer->updateAttribute($productEntityTypeId, 'short_description', 'is_wysiwyg_enabled', 1); +$installer->updateAttribute($productEntityTypeId, 'short_description', 'is_html_allowed_on_front', 1); + +$installer->endSetup(); diff --git a/app/code/core/Mage/CatalogIndex/Model/Indexer.php b/app/code/core/Mage/CatalogIndex/Model/Indexer.php index 924a47643d..6fbb17449c 100644 --- a/app/code/core/Mage/CatalogIndex/Model/Indexer.php +++ b/app/code/core/Mage/CatalogIndex/Model/Indexer.php @@ -614,7 +614,7 @@ public function buildEntityPriceFilter($attributes, $values, &$filteredAttribute $additionalCalculations[$code] = $response->getAdditionalCalculations(); if ($indexer->isAttributeIdUsed()) { - $filter[$code]->where("$table.attribute_id = ?", $attribute->getId()); + //$filter[$code]->where("$table.attribute_id = ?", $attribute->getId()); } } if (is_array($values[$code])) { @@ -630,14 +630,14 @@ public function buildEntityPriceFilter($attributes, $values, &$filteredAttribute if (strlen($values[$code]['from'])>0) { $filter[$code]->where( - "($table.value".implode('', $additionalCalculations[$code]).")*{$rateConversion} >= ?", + "($table.min_price".implode('', $additionalCalculations[$code]).")*{$rateConversion} >= ?", $values[$code]['from'] ); } if (strlen($values[$code]['to'])>0) { $filter[$code]->where( - "($table.value".implode('', $additionalCalculations[$code]).")*{$rateConversion} <= ?", + "($table.min_price".implode('', $additionalCalculations[$code]).")*{$rateConversion} <= ?", $values[$code]['to'] ); } diff --git a/app/code/core/Mage/CatalogIndex/Model/Mysql4/Attribute.php b/app/code/core/Mage/CatalogIndex/Model/Mysql4/Attribute.php index b62333c9bb..a4dd5cb18e 100644 --- a/app/code/core/Mage/CatalogIndex/Model/Mysql4/Attribute.php +++ b/app/code/core/Mage/CatalogIndex/Model/Mysql4/Attribute.php @@ -62,7 +62,7 @@ public function getCount($attribute, $entitySelect) $fields = array('count'=>'COUNT(index.entity_id)', 'index.value'); - $select->from('', $fields) + $select->columns($fields) ->join(array('index'=>$this->getMainTable()), 'index.entity_id=e.entity_id', array()) ->where('index.store_id = ?', $this->getStoreId()) ->where('index.attribute_id = ?', $attribute->getId()) diff --git a/app/code/core/Mage/CatalogIndex/Model/Mysql4/Price.php b/app/code/core/Mage/CatalogIndex/Model/Mysql4/Price.php index 65e9a6b3d9..c78e865ece 100644 --- a/app/code/core/Mage/CatalogIndex/Model/Mysql4/Price.php +++ b/app/code/core/Mage/CatalogIndex/Model/Mysql4/Price.php @@ -89,7 +89,7 @@ public function getMaxValue($attribute = null, $entitySelect) } $select - ->from('', "MAX(price_table.value".implode('', $response->getAdditionalCalculations()).")") + ->columns("MAX(price_table.value".implode('', $response->getAdditionalCalculations()).")") ->where('price_table.website_id = ?', $this->getWebsiteId()) ->where('price_table.attribute_id = ?', $attribute->getId()); @@ -122,7 +122,7 @@ public function getCount($range, $attribute, $entitySelect) $fields = array('count'=>'COUNT(DISTINCT price_table.entity_id)', 'range'=>"FLOOR(((price_table.value".implode('', $response->getAdditionalCalculations()).")*{$this->getRate()})/{$range})+1"); - $select->from('', $fields) + $select->columns($fields) ->group('range') ->where('price_table.website_id = ?', $this->getWebsiteId()) ->where('price_table.attribute_id = ?', $attribute->getId()); diff --git a/app/code/core/Mage/CatalogIndex/etc/config.xml b/app/code/core/Mage/CatalogIndex/etc/config.xml index f1e98f32eb..56f4c2089b 100644 --- a/app/code/core/Mage/CatalogIndex/etc/config.xml +++ b/app/code/core/Mage/CatalogIndex/etc/config.xml @@ -73,8 +73,8 @@ Mage_CatalogIndex_Model_Mysql4 - catalogindex_eav
- catalogindex_price
+ catalog_product_index_eav
+ catalog_product_index_price
catalogindex_minimal_price
catalogindex_aggregation
catalogindex_aggregation_tag
@@ -256,14 +256,14 @@ - - 0 2 * * * - catalogindex/observer::reindexAll - - - * * * * * - catalogindex/observer::runQueuedIndexing - + + + + + + + +
diff --git a/app/code/core/Mage/CatalogInventory/Model/Indexer/Stock.php b/app/code/core/Mage/CatalogInventory/Model/Indexer/Stock.php index 6ef7845a5e..ddc8feaae6 100644 --- a/app/code/core/Mage/CatalogInventory/Model/Indexer/Stock.php +++ b/app/code/core/Mage/CatalogInventory/Model/Indexer/Stock.php @@ -117,30 +117,45 @@ public function getDescription() */ public function matchEvent(Mage_Index_Model_Event $event) { + $data = $event->getNewData(); + $resultKey = 'cataloginventory_stock_match_result'; + if (isset($data[$resultKey])) { + return $data[$resultKey]; + } + + $result = null; $entity = $event->getEntity(); if ($entity == Mage_Core_Model_Store::ENTITY) { /* @var $store Mage_Core_Model_Store */ $store = $event->getDataObject(); if ($store->isObjectNew()) { - return true; + $result = true; + } else { + $result = false; } - return false; } else if ($entity == Mage_Core_Model_Store_Group::ENTITY) { /* @var $storeGroup Mage_Core_Model_Store_Group */ $storeGroup = $event->getDataObject(); if ($storeGroup->dataHasChangedFor('website_id')) { - return true; + $result = true; + } else { + $result = false; } - return false; } else if ($entity == Mage_Core_Model_Config_Data::ENTITY) { $configData = $event->getDataObject(); $path = $configData->getPath(); if (in_array($path, $this->_relatedConfigSettings)) { - return $configData->isValueChanged(); + $result = $configData->isValueChanged(); + } else { + $result = false; } - return false; + } else { + $result = parent::matchEvent($event); } - return parent::matchEvent($event); + + $event->addNewData($resultKey, $result); + + return $result; } /** diff --git a/app/code/core/Mage/CatalogInventory/Model/Mysql4/Indexer/Stock/Configurable.php b/app/code/core/Mage/CatalogInventory/Model/Mysql4/Indexer/Stock/Configurable.php index 24dbfc854c..1e03148729 100644 --- a/app/code/core/Mage/CatalogInventory/Model/Mysql4/Indexer/Stock/Configurable.php +++ b/app/code/core/Mage/CatalogInventory/Model/Mysql4/Indexer/Stock/Configurable.php @@ -85,6 +85,10 @@ protected function _prepareIndexTable($entityIds = null) array('l' => $this->getTable('catalog/product_super_link')), 'l.parent_id = e.entity_id', array()) + ->join( + array('le' => $this->getTable('catalog/product')), + 'le.entity_id = l.product_id', + array()) ->joinLeft( array('i' => $this->getIdxTable()), 'i.product_id = l.product_id AND cw.website_id = i.website_id AND cis.stock_id = i.stock_id', @@ -94,9 +98,8 @@ protected function _prepareIndexTable($entityIds = null) ->where('e.type_id = ?', $this->getTypeId()) ->group(array('e.entity_id', 'cw.website_id', 'cis.stock_id')); - // add limitation of status - $condition = $write->quoteInto('=?', Mage_Catalog_Model_Product_Status::STATUS_ENABLED); - $this->_addAttributeToSelect($select, 'status', 'e.entity_id', 'cs.store_id', $condition); + $psExpr = $this->_addAttributeToSelect($select, 'status', 'e.entity_id', 'cs.store_id'); + $psCond = $write->quoteInto($psExpr . '=?', Mage_Catalog_Model_Product_Status::STATUS_ENABLED); if ($this->_isManageStock()) { $statusExpr = new Zend_Db_Expr('IF(cisi.use_config_manage_stock = 0 AND cisi.manage_stock = 0,' @@ -106,7 +109,12 @@ protected function _prepareIndexTable($entityIds = null) . 'cisi.is_in_stock, 1)'); } - $select->columns(array('status' => new Zend_Db_Expr("LEAST(MAX(i.stock_status), {$statusExpr})"))); + $stockStatusExpr = new Zend_Db_Expr("LEAST(MAX(IF({$psCond} AND le.required_options = 0, i.stock_status, 0))" + . ", {$statusExpr})"); + + $select->columns(array( + 'status' => $stockStatusExpr + )); if (!is_null($entityIds)) { $select->where('e.entity_id IN(?)', $entityIds); diff --git a/app/code/core/Mage/CatalogInventory/Model/Mysql4/Indexer/Stock/Grouped.php b/app/code/core/Mage/CatalogInventory/Model/Mysql4/Indexer/Stock/Grouped.php index f207988a8c..6777364634 100644 --- a/app/code/core/Mage/CatalogInventory/Model/Mysql4/Indexer/Stock/Grouped.php +++ b/app/code/core/Mage/CatalogInventory/Model/Mysql4/Indexer/Stock/Grouped.php @@ -83,7 +83,11 @@ protected function _prepareIndexTable($entityIds = null) array()) ->joinLeft( array('l' => $this->getTable('catalog/product_link')), - 'l.product_id = e.entity_id', + 'e.entity_id = l.product_id AND l.link_type_id=' . Mage_Catalog_Model_Product_Link::LINK_TYPE_GROUPED, + array()) + ->joinLeft( + array('le' => $this->getTable('catalog/product')), + 'le.entity_id = l.linked_product_id', array()) ->joinLeft( array('i' => $this->getIdxTable()), @@ -92,12 +96,11 @@ protected function _prepareIndexTable($entityIds = null) ->columns(array('qty' => new Zend_Db_Expr('0'))) ->where('cw.website_id != 0') ->where('e.type_id = ?', $this->getTypeId()) - ->where('l.link_type_id=?', Mage_Catalog_Model_Product_Link::LINK_TYPE_GROUPED) ->group(array('e.entity_id', 'cw.website_id', 'cis.stock_id')); // add limitation of status - $condition = $write->quoteInto('=?', Mage_Catalog_Model_Product_Status::STATUS_ENABLED); - $this->_addAttributeToSelect($select, 'status', 'e.entity_id', 'cs.store_id', $condition); + $psExpr = $this->_addAttributeToSelect($select, 'status', 'e.entity_id', 'cs.store_id'); + $psCond = $write->quoteInto($psExpr . '=?', Mage_Catalog_Model_Product_Status::STATUS_ENABLED); if ($this->_isManageStock()) { $statusExpr = new Zend_Db_Expr('IF(cisi.use_config_manage_stock = 0 AND cisi.manage_stock = 0,' @@ -107,7 +110,12 @@ protected function _prepareIndexTable($entityIds = null) . 'cisi.is_in_stock, 1)'); } - $select->columns(array('status' => new Zend_Db_Expr("LEAST(MAX(i.stock_status), {$statusExpr})"))); + $stockStatusExpr = new Zend_Db_Expr("LEAST(MAX(IF({$psCond} AND le.required_options = 0, i.stock_status, 0))" + . ", {$statusExpr})"); + + $select->columns(array( + 'status' => $stockStatusExpr + )); if (!is_null($entityIds)) { $select->where('e.entity_id IN(?)', $entityIds); diff --git a/app/code/core/Mage/CatalogInventory/Model/Stock/Item.php b/app/code/core/Mage/CatalogInventory/Model/Stock/Item.php index e2200d641c..a30cc6f6de 100644 --- a/app/code/core/Mage/CatalogInventory/Model/Stock/Item.php +++ b/app/code/core/Mage/CatalogInventory/Model/Stock/Item.php @@ -389,11 +389,7 @@ public function checkQuoteItemQty($qty, $summaryQty, $origQty = 0) } $result->setItemBackorders($backorderQty); 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->getProductName()) - ) - ; + $result->setMessage(Mage::helper('cataloginventory')->__('This product is not available in the requested quantity. %s of the items will be backordered.', ($backorderQty * 1), $this->getProductName())); } } } @@ -475,32 +471,20 @@ protected function _beforeSave() } /** - * Processing object after save data + * Process stock status index on item after commit * * @return Mage_CatalogInventory_Model_Stock_Item */ - protected function _afterSave() + public function afterCommitCallback() { - parent::_afterSave(); -// Mage::getSingleton('cataloginventory/stock_status') -// ->changeItemStatus($this); - return $this; - } - - /** - * Init indexing process after stock item data commit - * - * @return Mage_CatalogInventory_Model_Stock_Item - */ - protected function _afterSaveCommit() - { - parent::_afterSaveCommit(); + parent::afterCommitCallback(); Mage::getSingleton('index/indexer')->processEntityAction( $this, self::ENTITY, Mage_Index_Model_Event::TYPE_SAVE ); return $this; } + /** * Retrieve Stock Availability * diff --git a/app/code/core/Mage/CatalogInventory/etc/config.xml b/app/code/core/Mage/CatalogInventory/etc/config.xml index d71e599837..77b555d3fe 100644 --- a/app/code/core/Mage/CatalogInventory/etc/config.xml +++ b/app/code/core/Mage/CatalogInventory/etc/config.xml @@ -87,7 +87,7 @@ cataloginventory/observer - addStockStatusToPrepareIndexSelect + prepareCatalogProductIndexSelect @@ -213,6 +213,16 @@ cataloginventory/indexer_stock + + + + + + + + + + diff --git a/app/code/core/Mage/CatalogInventory/etc/wsdl.xml b/app/code/core/Mage/CatalogInventory/etc/wsdl.xml index 28fa870fa2..6291e9cc03 100644 --- a/app/code/core/Mage/CatalogInventory/etc/wsdl.xml +++ b/app/code/core/Mage/CatalogInventory/etc/wsdl.xml @@ -99,4 +99,4 @@ - \ 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 c60080b3ad..587e91437a 100644 --- a/app/code/core/Mage/CatalogRule/Model/Mysql4/Rule.php +++ b/app/code/core/Mage/CatalogRule/Model/Mysql4/Rule.php @@ -347,7 +347,7 @@ protected function _getRuleProductsStmt($fromDate, $toDate, $productId=null, $we $select->joinInner( array('product_website'=>$this->getTable('catalog/product_website')), - 'product_website.product_id=rp.product_id AND product_website.website_id='.$websiteId, + 'product_website.product_id=rp.product_id AND rp.website_id=product_website.website_id AND product_website.website_id='.$websiteId, array() ); diff --git a/app/code/core/Mage/CatalogRule/Model/Mysql4/Rule/Product/Price/Collection.php b/app/code/core/Mage/CatalogRule/Model/Mysql4/Rule/Product/Price/Collection.php index 7fca635d79..134f5c0841 100644 --- a/app/code/core/Mage/CatalogRule/Model/Mysql4/Rule/Product/Price/Collection.php +++ b/app/code/core/Mage/CatalogRule/Model/Mysql4/Rule/Product/Price/Collection.php @@ -40,7 +40,7 @@ public function getProductIds() $idsSelect->reset(Zend_Db_Select::LIMIT_COUNT); $idsSelect->reset(Zend_Db_Select::LIMIT_OFFSET); $idsSelect->reset(Zend_Db_Select::COLUMNS); - $idsSelect->from(null, 'main_table.product_id'); + $idsSelect->columns('main_table.product_id'); $idsSelect->distinct(true); return $this->getConnection()->fetchCol($idsSelect); } diff --git a/app/code/core/Mage/CatalogRule/sql/catalogrule_setup/mysql4-upgrade-0.7.7-0.7.8.php b/app/code/core/Mage/CatalogRule/sql/catalogrule_setup/mysql4-upgrade-0.7.7-0.7.8.php index 6fce1bd864..9dfbafef1e 100644 --- a/app/code/core/Mage/CatalogRule/sql/catalogrule_setup/mysql4-upgrade-0.7.7-0.7.8.php +++ b/app/code/core/Mage/CatalogRule/sql/catalogrule_setup/mysql4-upgrade-0.7.7-0.7.8.php @@ -52,4 +52,4 @@ $installer->getTable('core/website'), 'website_id', 'CASCADE', 'CASCADE' ); -$installer->run("ALTER TABLE `{$ruleGroupWebsiteTable}` ADD PRIMARY KEY ( `rule_id` , `customer_group_id`, `website_id` )"); \ No newline at end of file +$installer->run("ALTER TABLE `{$ruleGroupWebsiteTable}` ADD PRIMARY KEY ( `rule_id` , `customer_group_id`, `website_id` )"); diff --git a/app/code/core/Mage/CatalogSearch/Helper/Data.php b/app/code/core/Mage/CatalogSearch/Helper/Data.php index f27ed12f50..2f05d5f3ff 100644 --- a/app/code/core/Mage/CatalogSearch/Helper/Data.php +++ b/app/code/core/Mage/CatalogSearch/Helper/Data.php @@ -140,7 +140,7 @@ public function getQueryText() */ public function getEscapedQueryText() { - return $this->htmlEscape($this->getQueryText()); + return $this->getQueryText(); } /** @@ -164,7 +164,7 @@ public function getResultUrl($query = null) { return $this->_getUrl('catalogsearch/result', array( '_query' => array(self::QUERY_VAR_NAME => $query), - '_secure' => true + '_secure' => Mage::app()->getFrontController()->getRequest()->isSecure() )); } diff --git a/app/code/core/Mage/CatalogSearch/Model/Advanced.php b/app/code/core/Mage/CatalogSearch/Model/Advanced.php index a33aac5aeb..0f574792ec 100644 --- a/app/code/core/Mage/CatalogSearch/Model/Advanced.php +++ b/app/code/core/Mage/CatalogSearch/Model/Advanced.php @@ -31,7 +31,7 @@ * @package Mage_CatalogSearch * @author Magento Core Team */ -class Mage_CatalogSearch_Model_Advanced extends Varien_Object +class Mage_CatalogSearch_Model_Advanced extends Mage_Core_Model_Abstract { /** * User friendly search criteria list @@ -40,6 +40,30 @@ class Mage_CatalogSearch_Model_Advanced extends Varien_Object */ private $_searchCriterias = array(); + /** + * Initialize resource model + * + */ + protected function _construct() + { + $this->_init('catalogsearch/advanced'); + } + + /** + * Retrieve resource instance wrapper + * + * @return Mage_CatalogSearch_Model_Mysql4_Advanced + */ + protected function _getResource() + { + return parent::_getResource(); + } + + /** + * Retrieve array of attributes used in advanced search + * + * @return array + */ public function getAttributes() { /* @var $attributes Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Attribute_Collection */ @@ -61,6 +85,38 @@ public function getAttributes() return $attributes; } + /** + * Prepare search condition for attribute + * + * @param Mage_Catalog_Model_Resource_Eav_Attribute $attribute + * @param string|array $value + * @return mixed + */ + protected function _prepareCondition($attribute, $value) + { + $condition = false; + + if (is_array($value)) { + if (!empty($value['from']) || !empty($value['to'])) { // range + $condition = $value; + } else if ($attribute->getBackendType() == 'varchar') { // multiselect + $condition = array('in_set' => $value); + } else if (!isset($value['from']) && !isset($value['to'])) { // select + $condition = array('in' => $value); + } + } else { + if (strlen($value) > 0) { + if (in_array($attribute->getBackendType(), array('varchar', 'text', 'static'))) { + $condition = array('like' => '%' . $value . '%'); // text search + } else { + $condition = $value; + } + } + } + + return $condition; + } + /** * Add advanced search filters to product collection * @@ -69,85 +125,48 @@ public function getAttributes() */ public function addFilters($values) { - $attributes = $this->getAttributes(); - $allConditions = array(); - $filteredAttributes = array(); - $indexFilters = Mage::getModel('catalogindex/indexer')->buildEntityFilter( - $attributes, - $values, - $filteredAttributes, - $this->getProductCollection() - ); - - 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() - ); - } + $attributes = $this->getAttributes(); + $hasConditions = false; + $allConditions = array(); foreach ($attributes as $attribute) { - $code = $attribute->getAttributeCode(); - $condition = false; - - if (isset($values[$code])) { - $value = $values[$code]; - - if (is_array($value)) { - if ((isset($value['from']) && strlen($value['from']) > 0) - || (isset($value['to']) && strlen($value['to']) > 0)) { - $condition = $value; - } - elseif ($attribute->getBackend()->getType() == 'varchar') { - $condition = array('in_set'=>$value); - } - elseif (!isset($value['from']) && !isset($value['to'])) { - $condition = array('in'=>$value); - } - } else { - if (strlen($value)>0) { - if (in_array($attribute->getBackend()->getType(), array('varchar', 'text'))) { - $condition = array('like'=>'%'.$value.'%'); - } elseif ($attribute->getFrontendInput() == 'boolean') { - $condition = array('in' => array('0','1')); - } else { - $condition = $value; - } - } - } + /* @var $attribute Mage_Catalog_Model_Resource_Eav_Attribute */ + if (!isset($values[$attribute->getAttributeCode()])) { + continue; } + $value = $values[$attribute->getAttributeCode()]; - if (false !== $condition) { - $this->_addSearchCriteria($attribute, $value); - - if (in_array($code, $filteredAttributes)) + if ($attribute->getAttributeCode() == 'price') { + if ($this->_getResource()->addPriceFilter($this, $attribute, $value)) { + $hasConditions = true; + $this->_addSearchCriteria($attribute, $value); + } + } else if ($attribute->isIndexable()) { + if ($this->_getResource()->addIndexableAttributeFilter($this, $attribute, $value)) { + $hasConditions = true; + $this->_addSearchCriteria($attribute, $value); + } + } else { + $condition = $this->_prepareCondition($attribute, $value); + if ($condition === false) { continue; + } - $table = $attribute->getBackend()->getTable(); - $attributeId = $attribute->getId(); + $this->_addSearchCriteria($attribute, $value); + + $table = $attribute->getBackend()->getTable(); if ($attribute->getBackendType() == 'static'){ $attributeId = $attribute->getAttributeCode(); - $condition = array('like'=>"%{$condition}%"); + } else { + $attributeId = $attribute->getId(); } - $allConditions[$table][$attributeId] = $condition; } } + if ($allConditions) { $this->getProductCollection()->addFieldsToFilter($allConditions); - } else if (!count($filteredAttributes)) { + } else if (!$hasConditions) { Mage::throwException(Mage::helper('catalogsearch')->__('You have to specify at least one search term')); } @@ -213,6 +232,11 @@ public function getSearchCriterias() return $this->_searchCriterias; } + /** + * Retrieve advanced search product collection + * + * @return Mage_CatalogSearch_Model_Mysql4_Advanced_Collection + */ public function getProductCollection(){ if (is_null($this->_productCollection)) { $this->_productCollection = Mage::getResourceModel('catalogsearch/advanced_collection') diff --git a/app/code/core/Mage/CatalogSearch/Model/Indexer/Fulltext.php b/app/code/core/Mage/CatalogSearch/Model/Indexer/Fulltext.php index 338a2e8b81..b0b5d1c537 100644 --- a/app/code/core/Mage/CatalogSearch/Model/Indexer/Fulltext.php +++ b/app/code/core/Mage/CatalogSearch/Model/Indexer/Fulltext.php @@ -113,44 +113,59 @@ public function getDescription() */ public function matchEvent(Mage_Index_Model_Event $event) { + $data = $event->getNewData(); + $resultKey = 'catalogsearch_fulltext_match_result'; + if (isset($data[$resultKey])) { + return $data[$resultKey]; + } + + $result = null; $entity = $event->getEntity(); if ($entity == Mage_Catalog_Model_Resource_Eav_Attribute::ENTITY) { /* @var $attribute Mage_Catalog_Model_Resource_Eav_Attribute */ $attribute = $event->getDataObject(); if ($event->getType() == Mage_Index_Model_Event::TYPE_SAVE) { - return $attribute->dataHasChangedFor('is_searchable'); + $result = $attribute->dataHasChangedFor('is_searchable'); } else if ($event->getType() == Mage_Index_Model_Event::TYPE_DELETE) { - return $attribute->getIsSearchable(); + $result = $attribute->getIsSearchable(); + } else { + $result = false; } } else if ($entity == Mage_Core_Model_Store::ENTITY) { if ($event->getType() == Mage_Index_Model_Event::TYPE_DELETE) { - return true; - } - - /* @var $store Mage_Core_Model_Store */ - $store = $event->getDataObject(); - if ($store->isObjectNew()) { - return true; + $result = true; + } else { + /* @var $store Mage_Core_Model_Store */ + $store = $event->getDataObject(); + if ($store->isObjectNew()) { + $result = true; + } else { + $result = false; + } } - return false; } else if ($entity == Mage_Core_Model_Store_Group::ENTITY) { /* @var $storeGroup Mage_Core_Model_Store_Group */ $storeGroup = $event->getDataObject(); if ($storeGroup->dataHasChangedFor('website_id')) { - return true; + $result = true; + } else { + $result = false; } - return false; } else if ($entity == Mage_Core_Model_Config_Data::ENTITY) { $data = $event->getDataObject(); if (in_array($data->getPath(), $this->_relatedConfigSettings)) { - return $data->isValueChanged(); + $result = $data->isValueChanged(); } else { - return false; + $result = false; } + } else { + $result = parent::matchEvent($event); } - return parent::matchEvent($event); + $event->addNewData($resultKey, $result); + + return $result; } /** diff --git a/app/code/core/Mage/CatalogSearch/Model/Mysql4/Advanced.php b/app/code/core/Mage/CatalogSearch/Model/Mysql4/Advanced.php new file mode 100644 index 0000000000..eec025b49b --- /dev/null +++ b/app/code/core/Mage/CatalogSearch/Model/Mysql4/Advanced.php @@ -0,0 +1,162 @@ + + */ +class Mage_CatalogSearch_Model_Mysql4_Advanced extends Mage_Core_Model_Mysql4_Abstract +{ + /** + * Initialize connection and define catalog product table as main table + * + */ + protected function _construct() + { + $this->_init('catalog/product', 'entity_id'); + } + + /** + * Prepare response object and dispatch prepare price event + * + * Return response object + * + * @param Varien_Db_Select $select + * @return Varien_Object + */ + protected function _dispatchPreparePriceEvent($select) + { + // prepare response object for event + $response = new Varien_Object(); + $response->setAdditionalCalculations(array()); + + // prepare event arguments + $eventArgs = array( + 'select' => $select, + 'table' => 'price_index', + 'store_id' => Mage::app()->getStore()->getId(), + 'response_object' => $response + ); + + /** + * @deprecated since 1.3.2.2 + */ + Mage::dispatchEvent('catalogindex_prepare_price_select', $eventArgs); + + /** + * @since 1.4 + */ + Mage::dispatchEvent('catalog_prepare_price_select', $eventArgs); + + return $response; + } + + /** + * Add filter by attribute price + * + * @param Mage_CatalogSearch_Model_Advanced $object + * @param Mage_Catalog_Model_Resource_Eav_Attribute $attribute + * @param string|array $value + */ + public function addPriceFilter($object, $attribute, $value) + { + if (empty($value['from']) && empty($value['to'])) { + return false; + } + + $adapter = $this->_getReadAdapter(); + + $conditions = array(); + if (strlen($value['from']) > 0) { + $conditions[] = $adapter->quoteInto('price_index.min_price %s * %s >= ?', $value['from']); + } + if (strlen($value['to']) > 0) { + $conditions[] = $adapter->quoteInto('price_index.min_price %s * %s <= ?', $value['to']); + } + + if (!$conditions) { + return false; + } + + $object->getProductCollection()->addPriceData(); + $select = $object->getProductCollection()->getSelect(); + $response = $this->_dispatchPreparePriceEvent($select); + $additional = join('', $response->getAdditionalCalculations()); + + $rate = 1; + if (!empty($value['currency'])) { + $rate = Mage::app()->getStore()->getBaseCurrency()->getRate($value['currency']); + } + + foreach ($conditions as $condition) { + $select->where(sprintf($condition, $additional, $rate)); + } + + return true; + } + + /** + * Add filter by indexable attribute + * + * @param Mage_CatalogSearch_Model_Advanced $object + * @param Mage_Catalog_Model_Resource_Eav_Attribute $attribute + * @param string|array $value + */ + public function addIndexableAttributeFilter($object, $attribute, $value) + { + if (is_string($value) && strlen($value) == 0) { + return false; + } + if (is_array($value) && (isset($value['from']) || isset($value['to']))) { + return false; + } + + if ($attribute->getIndexType() == 'decimal') { + $table = $this->getTable('catalog/product_index_eav_decimal'); + } else { + $table = $this->getTable('catalog/product_index_eav'); + } + + $tableAlias = 'ast_' . $attribute->getAttributeCode(); + $storeId = Mage::app()->getStore()->getId(); + $select = $object->getProductCollection()->getSelect(); + + $select->distinct(true); + $select->join( + array($tableAlias => $table), + "e.entity_id={$tableAlias}.entity_id AND {$tableAlias}.attribute_id={$attribute->getAttributeId()}" + . " AND {$tableAlias}.store_id={$storeId}", + array() + ); + $select->where("{$tableAlias}.`value` IN(?)", $value); + + return true; + } +} diff --git a/app/code/core/Mage/CatalogSearch/Model/Mysql4/Query.php b/app/code/core/Mage/CatalogSearch/Model/Mysql4/Query.php index 4372b647be..1dcaafae3f 100644 --- a/app/code/core/Mage/CatalogSearch/Model/Mysql4/Query.php +++ b/app/code/core/Mage/CatalogSearch/Model/Mysql4/Query.php @@ -78,6 +78,26 @@ public function loadByQuery(Mage_Core_Model_Abstract $object, $value) return $this; } + /** + * Custom load model only by query text (skip synonym for) + * + * @param Mage_Core_Model_Abstract $object + * @param string $value + * @return Mage_CatalogSearch_Model_Mysql4_Query + */ + public function loadByQueryText(Mage_Core_Model_Abstract $object, $value) + { + $select = $this->_getReadAdapter()->select() + ->from($this->getMainTable()) + ->where('query_text = ?', $value) + ->where('store_id = ?', $object->getStoreId()); + if ($data = $this->_getReadAdapter()->fetchRow($select)) { + $object->setData($data); + $this->_afterLoad($object); + } + return $this; + } + public function load(Mage_Core_Model_Abstract $object, $value, $field=null) { if (is_numeric($value)) { diff --git a/app/code/core/Mage/CatalogSearch/Model/Query.php b/app/code/core/Mage/CatalogSearch/Model/Query.php index 9ca8bfc1d8..6fa443d0c4 100644 --- a/app/code/core/Mage/CatalogSearch/Model/Query.php +++ b/app/code/core/Mage/CatalogSearch/Model/Query.php @@ -45,6 +45,16 @@ protected function _construct() $this->_init('catalogsearch/query'); } + /** + * Retrieve search collection + * + * @return Mage_CatalogSearch_Model_Mysql4_Search_Collection + */ + public function getSearchCollection() + { + return Mage::getResourceModel('catalogsearch/search_collection'); + } + /** * Retrieve collection of search results * @@ -54,7 +64,7 @@ public function getResultCollection() { $collection = $this->getData('result_collection'); if (is_null($collection)) { - $collection = Mage::getResourceModel('catalogsearch/search_collection'); + $collection = $this->getSearchCollection(); $text = $this->getSynonymFor(); if (!$text) { @@ -101,6 +111,20 @@ public function loadByQuery($text) return $this; } + /** + * Load Query object only by query text (skip 'synonym for') + * + * @param string $text + * @return Mage_CatalogSearch_Model_Query + */ + public function loadByQueryText($text) + { + $this->_getResource()->loadByQueryText($this, $text); + $this->_afterLoad(); + $this->setOrigData(); + return $this; + } + /** * Set Store Id * diff --git a/app/code/core/Mage/Checkout/Block/Cart/Sidebar.php b/app/code/core/Mage/Checkout/Block/Cart/Sidebar.php index 4437ab0527..052146362a 100644 --- a/app/code/core/Mage/Checkout/Block/Cart/Sidebar.php +++ b/app/code/core/Mage/Checkout/Block/Cart/Sidebar.php @@ -46,30 +46,64 @@ public function __construct() } /** - * Get array last added items + * Retrieve count of display recently added items + * + * @return int + */ + public function getItemCount() + { + $count = $this->getData('item_count'); + if (is_null($count)) { + $count = Mage::getStoreConfig(self::XML_PATH_CHECKOUT_SIDEBAR_COUNT); + $this->setData('item_count', $count); + } + return $count; + } + + /** + * Get array of last added items * * @return array */ 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); + $count = $this->getItemCount(); } + $items = array(); if (!$this->getSummaryCount()) { return $items; } + $i = 0; + $storeId = Mage::app()->getStore()->getId(); $allItems = array_reverse($this->getItems()); foreach ($allItems as $item) { + /* @var $item Mage_Sales_Model_Quote_Item */ + if (!$item->getProduct()->isVisibleInSiteVisibility()) { + if ($item->getStoreId() == $storeId) { + continue; + } + $productId = $item->getProduct()->getId(); + $products = Mage::getResourceSingleton('catalog/url') + ->getRewriteByProductStore(array($productId => $item->getStoreId())); + if (!isset($products[$productId])) { + continue; + } + $urlDataObject = new Varien_Object($products[$productId]); + if (!in_array($urlDataObject->getVisibility(), $item->getProduct()->getVisibleInSiteVisibilities())) { + continue; + } + $item->getProduct()->setUrlDataObject($urlDataObject); + } + $items[] = $item; if (++$i == $count) { break; } } + return $items; } @@ -203,4 +237,4 @@ protected function _toHtml() } return $html; } -} \ No newline at end of file +} diff --git a/app/code/core/Mage/Checkout/Block/Multishipping/Overview.php b/app/code/core/Mage/Checkout/Block/Multishipping/Overview.php index 313f8fecc6..0de57a651d 100644 --- a/app/code/core/Mage/Checkout/Block/Multishipping/Overview.php +++ b/app/code/core/Mage/Checkout/Block/Multishipping/Overview.php @@ -63,9 +63,19 @@ public function getPaymentHtml() return $this->getChildHtml('payment_info'); } + /** + * Get object with payment info posted data + * + * @return Varien_Object + */ public function getPayment() { - return $this->getCheckout()->getQuote()->getPayment(); + if (!$this->hasData('payment')) { + $payment = new Varien_Object($this->getRequest()->getPost('payment')); + $this->setData('payment', $payment); + } + return $this->_getData('payment'); + //return $this->getCheckout()->getQuote()->getPayment(); } public function getShippingAddresses() diff --git a/app/code/core/Mage/Checkout/Block/Onepage/Billing.php b/app/code/core/Mage/Checkout/Block/Onepage/Billing.php index 6e77b9e663..d2fdcece66 100644 --- a/app/code/core/Mage/Checkout/Block/Onepage/Billing.php +++ b/app/code/core/Mage/Checkout/Block/Onepage/Billing.php @@ -67,7 +67,7 @@ public function getMethod() } function getAddress() { - if (!$this->isCustomerLoggedIn()) { + if ($this->isCustomerLoggedIn()) { return $this->getQuote()->getBillingAddress(); } else { return Mage::getModel('sales/quote_address'); diff --git a/app/code/core/Mage/Checkout/Helper/Cart.php b/app/code/core/Mage/Checkout/Helper/Cart.php index 44b16fec11..333a12f62d 100644 --- a/app/code/core/Mage/Checkout/Helper/Cart.php +++ b/app/code/core/Mage/Checkout/Helper/Cart.php @@ -31,6 +31,8 @@ */ class Mage_Checkout_Helper_Cart extends Mage_Core_Helper_Url { + const XML_PATH_REDIRECT_TO_CART = 'checkout/cart/redirect_to_cart'; + /** * Retrieve cart instance * @@ -148,4 +150,15 @@ public function getIsVirtualQuote() { return $this->getQuote()->isVirtual(); } + + /** + * Checks if customer should be redirected to shopping cart after adding a product + * + * @param int|string|Mage_Core_Model_Store $store + * @return bool + */ + public function getShouldRedirectToCart($store = null) + { + return Mage::getStoreConfigFlag(self::XML_PATH_REDIRECT_TO_CART, $store); + } } diff --git a/app/code/core/Mage/Checkout/Helper/Data.php b/app/code/core/Mage/Checkout/Helper/Data.php index 7aba7c9ceb..9c8ce1de45 100644 --- a/app/code/core/Mage/Checkout/Helper/Data.php +++ b/app/code/core/Mage/Checkout/Helper/Data.php @@ -266,6 +266,9 @@ public function isMultishippingCheckoutAvailable() */ public function isAllowedGuestCheckout(Mage_Sales_Model_Quote $quote, $store = null) { + if ($store === null) { + $store = $quote->getStoreId(); + } $guestCheckout = Mage::getStoreConfigFlag(self::XML_PATH_GUEST_CHECKOUT, $store); if ($guestCheckout == true) { diff --git a/app/code/core/Mage/Checkout/Model/Type/Multishipping.php b/app/code/core/Mage/Checkout/Model/Type/Multishipping.php index 229cb37b0f..2ebc3f7c2a 100644 --- a/app/code/core/Mage/Checkout/Model/Type/Multishipping.php +++ b/app/code/core/Mage/Checkout/Model/Type/Multishipping.php @@ -216,6 +216,16 @@ public function setShippingItemsInformation($info) } } + /** + * Delete all not virtual quote items which are not added to shipping address + * MultisippingQty should be defined for each quote item when it processed with _addShippingItem + */ + foreach ($quote->getAllItems() as $_item) { + if (!$_item->getProduct()->getIsVirtual() && !$_item->getMultisippingQty()) { + $_item->delete(); + } + } + if ($billingAddress = $quote->getBillingAddress()) { $quote->removeAddress($billingAddress->getId()); } @@ -247,16 +257,26 @@ public function setShippingItemsInformation($info) */ protected function _addShippingItem($quoteItemId, $data) { - $qty = isset($data['qty']) ? (int) $data['qty'] : 0; - $qty = $qty > 0 ? $qty : 1; + $qty = isset($data['qty']) ? (int) $data['qty'] : 1; + //$qty = $qty > 0 ? $qty : 1; $addressId = isset($data['address']) ? (int) $data['address'] : false; $quoteItem = $this->getQuote()->getItemById($quoteItemId); if ($addressId && $quoteItem) { + /** + * Decrease quote item QTY if address item has QTY 0 and skip this item processing + */ + if ($qty === 0) { + $quoteItemQty = $quoteItem->getQty(); + if ($quoteItemQty > 0) { + $quoteItem->setQty($quoteItemQty-1); + } + return $this; + } $quoteItem->setMultisippingQty((int)$quoteItem->getMultisippingQty()+$qty); $quoteItem->setQty($quoteItem->getMultisippingQty()); $address = $this->getCustomer()->getAddressById($addressId); - if ($address) { + if ($address->getId()) { if (!$quoteAddress = $this->getQuote()->getShippingAddressByCustomerAddressId($addressId)) { $quoteAddress = Mage::getModel('sales/quote_address')->importCustomerAddress($address); $this->getQuote()->addShippingAddress($quoteAddress); diff --git a/app/code/core/Mage/Checkout/Model/Type/Onepage.php b/app/code/core/Mage/Checkout/Model/Type/Onepage.php index a55177f8f5..ffc9481f35 100644 --- a/app/code/core/Mage/Checkout/Model/Type/Onepage.php +++ b/app/code/core/Mage/Checkout/Model/Type/Onepage.php @@ -24,9 +24,18 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ - +/** + * One page checkout processing model + */ class Mage_Checkout_Model_Type_Onepage { + /** + * Checkout types: Checkout as Guest, Register, Logged In Customer + */ + const METHOD_GUEST = 'guest'; + const METHOD_REGISTER = 'register'; + const METHOD_CUSTOMER = 'customer'; + /** * Error message of "customer already exists" * @@ -35,46 +44,80 @@ class Mage_Checkout_Model_Type_Onepage private $_customerEmailExistsMessage = ''; /** + * @var Mage_Customer_Model_Session + */ + protected $_customerSession; + + /** + * @var Mage_Checkout_Model_Session + */ + protected $_checkoutSession; + + /** + * @var Mage_Sales_Model_Quote + */ + protected $_quote; + + /** + * @var Mage_Checkout_Helper_Data + */ + protected $_helper; + + /** + * Class constructor * Set customer already exists message - * @return Mage_Checkout_Model_Type_Onepage */ public function __construct() { - $this->_customerEmailExistsMessage = Mage::helper('checkout')->__('There is already a customer registered using this email address. Please login using this email address or enter a different email address to register your account.'); + $this->_helper = Mage::helper('checkout'); + $this->_customerEmailExistsMessage = $this->_helper->__('There is already a customer registered using this email address. Please login using this email address or enter a different email address to register your account.'); + $this->_checkoutSession = Mage::getSingleton('checkout/session'); + $this->_quote = $this->_checkoutSession->getQuote(); + $this->_customerSession = Mage::getSingleton('customer/session'); } /** - * Enter description here... + * Get frontend checkout session object * * @return Mage_Checkout_Model_Session */ public function getCheckout() { - return Mage::getSingleton('checkout/session'); + return $this->_checkoutSession; } /** - * Enter description here... + * Quote object getter * * @return Mage_Sales_Model_Quote */ public function getQuote() { - return $this->getCheckout()->getQuote(); + return $this->_quote; } /** - * Enter description here... + * Get customer session object + * + * @return Mage_Customer_Model_Session + */ + public function getCustomerSession() + { + return $this->_customerSession; + } + + /** + * Initialize quote state to be valid for one page checkout * * @return Mage_Checkout_Model_Type_Onepage */ public function initCheckout() { $checkout = $this->getCheckout(); + $customerSession = $this->getCustomerSession(); if (is_array($checkout->getStepData())) { foreach ($checkout->getStepData() as $step=>$data) { - if (!($step==='login' - || Mage::getSingleton('customer/session')->isLoggedIn() && $step==='billing')) { + if (!($step==='login' || $customerSession->isLoggedIn() && $step==='billing')) { $checkout->setStepData($step, 'allow', false); } } @@ -93,7 +136,7 @@ public function initCheckout() * want to laod the correct customer information by assiging to address * instead of just loading from sales/quote_address */ - $customer = Mage::getSingleton('customer/session')->getCustomer(); + $customer = $customerSession->getCustomer(); if ($customer) { $this->getQuote()->assignCustomer($customer); } @@ -101,19 +144,35 @@ public function initCheckout() } /** - * Enter description here... + * Get quote checkout method * - * @param string $method - * @return array + * @return string + */ + public function getCheckoutMehod() + { + if ($this->getCustomerSession()->isLoggedIn()) { + return self::METHOD_CUSTOMER; + } + if (!$this->getQuote()->getCheckoutMethod()) { + if ($this->_helper->isAllowedGuestCheckout($this->getQuote())) { + $this->getQuote()->setCheckoutMethod(self::METHOD_GUEST); + } else { + $this->getQuote()->setCheckoutMethod(self::METHOD_REGISTER); + } + } + return $this->getQuote()->getCheckoutMethod(); + } + + /** + * Specify chceckout method + * + * @param string $method + * @return array */ public function saveCheckoutMethod($method) { if (empty($method)) { - $res = array( - 'error' => -1, - 'message' => Mage::helper('checkout')->__('Invalid data') - ); - return $res; + return array('error' => -1, 'message' => $this->_helper->__('Invalid data')); } $this->getQuote()->setCheckoutMethod($method)->save(); @@ -122,10 +181,10 @@ public function saveCheckoutMethod($method) } /** - * Enter description here... + * Get customer address by identifier * - * @param int $addressId - * @return Mage_Customer_Model_Address + * @param int $addressId + * @return Mage_Customer_Model_Address */ public function getAddress($addressId) { @@ -138,20 +197,17 @@ public function getAddress($addressId) } /** + * Save billing address information to quote * This method is called by One Page Checkout JS (AJAX) while saving the billing information. * - * @param unknown_type $data - * @param unknown_type $customerAddressId - * @return unknown + * @param array $data + * @param int $customerAddressId + * @return Mage_Checkout_Model_Type_Onepage */ public function saveBilling($data, $customerAddressId) { if (empty($data)) { - $res = array( - 'error' => -1, - 'message' => Mage::helper('checkout')->__('Invalid data') - ); - return $res; + return array('error' => -1, 'message' => $this->_helper->__('Invalid data')); } $address = $this->getQuote()->getBillingAddress(); @@ -160,7 +216,7 @@ public function saveBilling($data, $customerAddressId) if ($customerAddress->getId()) { if ($customerAddress->getCustomerId() != $this->getQuote()->getCustomerId()) { return array('error' => 1, - 'message' => Mage::helper('checkout')->__('Customer Address is not valid.') + 'message' => $this->_helper->__('Customer Address is not valid.') ); } $address->importCustomerAddress($customerAddress); @@ -172,18 +228,12 @@ public function saveBilling($data, $customerAddressId) } if (($validateRes = $address->validate())!==true) { - $res = array( - 'error' => 1, - 'message' => $validateRes - ); - return $res; + return array('error' => 1, 'message' => $validateRes); } - if (!$this->getQuote()->getCustomerId() && Mage_Sales_Model_Quote::CHECKOUT_METHOD_REGISTER == $this->getQuote()->getCheckoutMethod()) { + if (!$this->getQuote()->getCustomerId() && self::METHOD_REGISTER == $this->getQuote()->getCheckoutMethod()) { if ($this->_customerEmailExists($address->getEmail(), Mage::app()->getWebsite()->getId())) { - return array('error' => 1, - 'message' => $this->_customerEmailExistsMessage - ); + return array('error' => 1, 'message' => $this->_customerEmailExistsMessage); } } @@ -256,7 +306,7 @@ protected function _processValidateCustomer(Mage_Sales_Model_Quote_Address $addr } // invoke customer model, if it is registering - if (Mage_Sales_Model_Quote::CHECKOUT_METHOD_REGISTER == $this->getQuote()->getCheckoutMethod()) { + if (self::METHOD_REGISTER == $this->getQuote()->getCheckoutMethod()) { // set customer password hash for further usage $customer = Mage::getModel('customer/customer'); $this->getQuote()->setPasswordHash($customer->encryptPassword($address->getCustomerPassword())); @@ -283,12 +333,12 @@ protected function _processValidateCustomer(Mage_Sales_Model_Quote_Address $addr 'message' => implode(', ', $validationResult) ); } - } elseif(Mage_Sales_Model_Quote::CHECKOUT_METHOD_GUEST == $this->getQuote()->getCheckoutMethod()) { + } elseif(self::METHOD_GUEST == $this->getQuote()->getCheckoutMethod()) { $email = $address->getData('email'); if (!Zend_Validate::is($email, 'EmailAddress')) { return array( 'error' => -1, - 'message' => Mage::helper('checkout')->__('Invalid email address "%s"', $email) + 'message' => $this->_helper->__('Invalid email address "%s"', $email) ); } } @@ -296,14 +346,17 @@ protected function _processValidateCustomer(Mage_Sales_Model_Quote_Address $addr return true; } + /** + * Save checkout shipping address + * + * @param array $data + * @param int $customerAddressId + * @return Mage_Checkout_Model_Type_Onepage + */ public function saveShipping($data, $customerAddressId) { if (empty($data)) { - $res = array( - 'error' => -1, - 'message' => Mage::helper('checkout')->__('Invalid data') - ); - return $res; + return array('error' => -1, 'message' => $this->_helper->__('Invalid data')); } $address = $this->getQuote()->getShippingAddress(); @@ -312,7 +365,7 @@ public function saveShipping($data, $customerAddressId) if ($customerAddress->getId()) { if ($customerAddress->getCustomerId() != $this->getQuote()->getCustomerId()) { return array('error' => 1, - 'message' => Mage::helper('checkout')->__('Customer Address is not valid.') + 'message' => $this->_helper->__('Customer Address is not valid.') ); } $address->importCustomerAddress($customerAddress); @@ -325,11 +378,7 @@ public function saveShipping($data, $customerAddressId) $address->setCollectShippingRates(true); if (($validateRes = $address->validate())!==true) { - $res = array( - 'error' => 1, - 'message' => $validateRes - ); - return $res; + return array('error' => 1, 'message' => $validateRes); } $this->getQuote()->collectTotals()->save(); @@ -341,25 +390,25 @@ public function saveShipping($data, $customerAddressId) return array(); } + /** + * Specify quote shipping method + * + * @param string $shippingMethod + * @return array + */ public function saveShippingMethod($shippingMethod) { if (empty($shippingMethod)) { - $res = array( - 'error' => -1, - 'message' => Mage::helper('checkout')->__('Invalid shipping method.') - ); - return $res; + return array('error' => -1, 'message' => $this->_helper->__('Invalid shipping method.')); } $rate = $this->getQuote()->getShippingAddress()->getShippingRateByCode($shippingMethod); if (!$rate) { - $res = array( - 'error' => -1, - 'message' => Mage::helper('checkout')->__('Invalid shipping method.') - ); - return $res; + return array('error' => -1, 'message' => $this->_helper->__('Invalid shipping method.')); } - $this->getQuote()->getShippingAddress()->setShippingMethod($shippingMethod); - $this->getQuote()->collectTotals()->save(); + $this->getQuote()->getShippingAddress() + ->setShippingMethod($shippingMethod); + $this->getQuote()->collectTotals() + ->save(); $this->getCheckout() ->setStepData('shipping_method', 'complete', true) @@ -368,19 +417,20 @@ public function saveShippingMethod($shippingMethod) return array(); } + /** + * Specify quote payment method + * + * @param array $data + * @return array + */ public function savePayment($data) { if (empty($data)) { - $res = array( - 'error' => -1, - 'message' => Mage::helper('checkout')->__('Invalid data') - ); - return $res; + return array('error' => -1, 'message' => $this->_helper->__('Invalid data')); } if ($this->getQuote()->isVirtual()) { $this->getQuote()->getBillingAddress()->setPaymentMethod(isset($data['method']) ? $data['method'] : null); - } - else { + } else { $this->getQuote()->getShippingAddress()->setPaymentMethod(isset($data['method']) ? $data['method'] : null); } @@ -396,235 +446,180 @@ public function savePayment($data) return array(); } - protected function validateOrder() + /** + * Validate quote state to be integrated with obe page checkout process + */ + public function validate() { $helper = Mage::helper('checkout'); - if ($this->getQuote()->getIsMultiShipping()) { + $quote = $this->getQuote(); + if ($quote->getIsMultiShipping()) { Mage::throwException($helper->__('Invalid checkout type.')); } - if (!$this->getQuote()->isVirtual()) { - $address = $this->getQuote()->getShippingAddress(); - $addressValidation = $address->validate(); - if ($addressValidation !== true) { - Mage::throwException($helper->__('Please check shipping address information.')); - } - $method= $address->getShippingMethod(); - $rate = $address->getShippingRateByCode($method); - if (!$this->getQuote()->isVirtual() && (!$method || !$rate)) { - Mage::throwException($helper->__('Please specify shipping method.')); - } - } - - $addressValidation = $this->getQuote()->getBillingAddress()->validate(); - if ($addressValidation !== true) { - Mage::throwException($helper->__('Please check billing address information.')); + if ($quote->getCheckoutMethod() == self::METHOD_GUEST && !$quote->isAllowedGuestCheckout()) { + Mage::throwException($this->_helper->__('Sorry, guest checkout is not enabled. Please try again or contact store owner.')); } + } - if (!($this->getQuote()->getPayment()->getMethod())) { - Mage::throwException($helper->__('Please select valid payment method.')); - } + /** + * Prepare quote for guest checkout order submit + * + * @return Mage_Checkout_Model_Type_Onepage + */ + protected function _prepareGuestQuote() + { + $quote = $this->getQuote(); + $quote->setCustomerId(null) + ->setCustomerEmail($quote->getBillingAddress()->getEmail()) + ->setCustomerIsGuest(true) + ->setCustomerGroupId(Mage_Customer_Model_Group::NOT_LOGGED_IN_ID); + return $this; } /** - * Enter description here... + * Prepare quote for customer registration and customer order submit * - * @return array + * @return Mage_Checkout_Model_Type_Onepage */ - public function saveOrder() + protected function _prepareNewCustomerQuote() { - $this->validateOrder(); - $billing = $this->getQuote()->getBillingAddress(); - if (!$this->getQuote()->isVirtual()) { - $shipping = $this->getQuote()->getShippingAddress(); + $quote = $this->getQuote(); + $billing = $quote->getBillingAddress(); + $shipping = $quote->isVirtual() ? null : $quote->getShippingAddress(); + + //$customer = Mage::getModel('customer/customer'); + $customer = $quote->getCustomer(); + /* @var $customer Mage_Customer_Model_Customer */ + $customerBilling = $billing->exportCustomerAddress(); + $customer->addAddress($customerBilling); + $billing->setCustomerAddress($customerBilling); + $customerBilling->setIsDefaultBilling(true); + if ($shipping && !$shipping->getSameAsBilling()) { + $customerShipping = $shipping->exportCustomerAddress(); + $customer->addAddress($customerShipping); + $shipping->setCustomerAddress($customerShipping); + $customerShipping->setIsDefaultShipping(true); + } elseif ($shipping) { + $customerBilling->setIsDefaultShipping(true); } - - /* - * Check if before this step checkout method was not defined use default values. - * Related to issue with some browsers when checkout method was not saved during first step. + /** + * @todo integration with dynamica attributes customer_dob, customer_taxvat, customer_gender */ - if (!$this->getQuote()->getCheckoutMethod()) { - if (Mage::helper('checkout')->isAllowedGuestCheckout($this->getQuote(), $this->getQuote()->getStore())) { - $this->getQuote()->setCheckoutMethod(Mage_Sales_Model_Quote::CHECKOUT_METHOD_GUEST); - } else { - $this->getQuote()->setCheckoutMethod(Mage_Sales_Model_Quote::CHECKOUT_METHOD_REGISTER); - } + if ($quote->getCustomerDob() && !$billing->getCustomerDob()) { + $billing->setCustomerDob($quote->getCustomerDob()); } - switch ($this->getQuote()->getCheckoutMethod()) { - case Mage_Sales_Model_Quote::CHECKOUT_METHOD_GUEST: - if (!$this->getQuote()->isAllowedGuestCheckout()) { - Mage::throwException(Mage::helper('checkout')->__('Sorry, guest checkout is not enabled. Please try again or contact store owner.')); - } - $this->getQuote()->setCustomerId(null) - ->setCustomerEmail($billing->getEmail()) - ->setCustomerIsGuest(true) - ->setCustomerGroupId(Mage_Customer_Model_Group::NOT_LOGGED_IN_ID); - break; - - case Mage_Sales_Model_Quote::CHECKOUT_METHOD_REGISTER: - $customer = Mage::getModel('customer/customer'); - /* @var $customer Mage_Customer_Model_Customer */ - - $customerBilling = $billing->exportCustomerAddress(); - $customer->addAddress($customerBilling); - - if (!$this->getQuote()->isVirtual() && !$shipping->getSameAsBilling()) { - $customerShipping = $shipping->exportCustomerAddress(); - $customer->addAddress($customerShipping); - } - - if ($this->getQuote()->getCustomerDob() && !$billing->getCustomerDob()) { - $billing->setCustomerDob($this->getQuote()->getCustomerDob()); - } - - if ($this->getQuote()->getCustomerTaxvat() && !$billing->getCustomerTaxvat()) { - $billing->setCustomerTaxvat($this->getQuote()->getCustomerTaxvat()); - } - - if ($this->getQuote()->getCustomerGender() && !$billing->getCustomerGender()) { - $billing->setCustomerGender($this->getQuote()->getCustomerGender()); - } - - Mage::helper('core')->copyFieldset('checkout_onepage_billing', 'to_customer', $billing, $customer); - - $customer->setPassword($customer->decryptPassword($this->getQuote()->getPasswordHash())); - $customer->setPasswordHash($customer->hashPassword($customer->getPassword())); - - $this->getQuote()->setCustomer($customer); - break; - - default: - $customer = Mage::getSingleton('customer/session')->getCustomer(); - - if (!$billing->getCustomerId() || $billing->getSaveInAddressBook()) { - $customerBilling = $billing->exportCustomerAddress(); - $customer->addAddress($customerBilling); - } - if (!$this->getQuote()->isVirtual() && - ((!$shipping->getCustomerId() && !$shipping->getSameAsBilling()) || - (!$shipping->getSameAsBilling() && $shipping->getSaveInAddressBook()))) { + if ($quote->getCustomerTaxvat() && !$billing->getCustomerTaxvat()) { + $billing->setCustomerTaxvat($quote->getCustomerTaxvat()); + } - $customerShipping = $shipping->exportCustomerAddress(); - $customer->addAddress($customerShipping); - } - $customer->setSavedFromQuote(true); - $customer->save(); + if ($quote->getCustomerGender() && !$billing->getCustomerGender()) { + $billing->setCustomerGender($quote->getCustomerGender()); + } - $changed = false; - if (isset($customerBilling) && !$customer->getDefaultBilling()) { - $customer->setDefaultBilling($customerBilling->getId()); - $changed = true; - } - if (!$this->getQuote()->isVirtual() && isset($customerBilling) && !$customer->getDefaultShipping() && $shipping->getSameAsBilling()) { - $customer->setDefaultShipping($customerBilling->getId()); - $changed = true; - } - elseif (!$this->getQuote()->isVirtual() && isset($customerShipping) && !$customer->getDefaultShipping()){ - $customer->setDefaultShipping($customerShipping->getId()); - $changed = true; - } + Mage::helper('core')->copyFieldset('checkout_onepage_billing', 'to_customer', $billing, $customer); + $customer->setPassword($customer->decryptPassword($quote->getPasswordHash())); + $customer->setPasswordHash($customer->hashPassword($customer->getPassword())); + $quote->setCustomer($customer) + ->setCustomerId(true); + } - if ($changed) { - $customer->save(); - } - } + /** + * Prepare quote for customer order submit + * + * @return Mage_Checkout_Model_Type_Onepage + */ + protected function _prepareCustomerQuote() + { + $quote = $this->getQuote(); + $billing = $quote->getBillingAddress(); + $shipping = $quote->isVirtual() ? null : $quote->getShippingAddress(); - $this->getQuote()->reserveOrderId(); - $convertQuote = Mage::getModel('sales/convert_quote'); - /* @var $convertQuote Mage_Sales_Model_Convert_Quote */ - //$order = Mage::getModel('sales/order'); - if ($this->getQuote()->isVirtual()) { - $order = $convertQuote->addressToOrder($billing); + $customer = $this->getCustomerSession()->getCustomer(); + if (!$billing->getCustomerId() || $billing->getSaveInAddressBook()) { + $customerBilling = $billing->exportCustomerAddress(); + $customer->addAddress($customerBilling); + $billing->setCustomerAddress($customerBilling); } - else { - $order = $convertQuote->addressToOrder($shipping); + if ($shipping && ((!$shipping->getCustomerId() && !$shipping->getSameAsBilling()) + || (!$shipping->getSameAsBilling() && $shipping->getSaveInAddressBook()))) { + $customerShipping = $shipping->exportCustomerAddress(); + $customer->addAddress($customerShipping); + $shipping->setCustomerAddress($customerShipping); } - /* @var $order Mage_Sales_Model_Order */ - $order->setBillingAddress($convertQuote->addressToOrderAddress($billing)); - if (!$this->getQuote()->isVirtual()) { - $order->setShippingAddress($convertQuote->addressToOrderAddress($shipping)); + if (isset($customerBilling) && !$customer->getDefaultBilling()) { + $customerBilling->setIsDefaultBilling(true); } - - $order->setPayment($convertQuote->paymentToOrderPayment($this->getQuote()->getPayment())); - - foreach ($this->getQuote()->getAllItems() as $item) { - $orderItem = $convertQuote->itemToOrderItem($item); - if ($item->getParentItem()) { - $orderItem->setParentItem($order->getItemByQuoteItemId($item->getParentItem()->getId())); - } - $order->addItem($orderItem); + if ($shipping && isset($customerBilling) && !$customer->getDefaultShipping() && $shipping->getSameAsBilling()) { + $customerBilling->setIsDefaultShipping(true); + } elseif ($shipping && isset($customerShipping) && !$customer->getDefaultShipping()) { + $customerShipping->setIsDefaultShipping(true); } + $quote->setCustomer($customer); + } - /** - * We can use configuration data for declare new order status - */ - Mage::dispatchEvent('checkout_type_onepage_save_order', array('order'=>$order, 'quote'=>$this->getQuote())); - // check again, if customer exists - if ($this->getQuote()->getCheckoutMethod() == Mage_Sales_Model_Quote::CHECKOUT_METHOD_REGISTER) { - if ($this->_customerEmailExists($customer->getEmail(), Mage::app()->getWebsite()->getId())) { - Mage::throwException($this->_customerEmailExistsMessage); - } + /** + * Involve new customer to system + * + * @return Mage_Checkout_Model_Type_Onepage + */ + protected function _involveNewCustomer() + { + $customer = $this->getQuote()->getCustomer(); + if ($customer->isConfirmationRequired()) { + $customer->sendNewAccountEmail('confirmation'); + $url = Mage::helper('customer')->getEmailConfirmationUrl($customer->getEmail()); + $this->getCustomerSession()->addSuccess( + Mage::helper('customer')->__('Account confirmation is required. Please, check your e-mail for confirmation link. To resend confirmation email please click here.', $url) + ); + } else { + $customer->sendNewAccountEmail(); + $this->getCustomerSession()->loginById($customer->getId()); } - $order->place(); - - if ($this->getQuote()->getCheckoutMethod()==Mage_Sales_Model_Quote::CHECKOUT_METHOD_REGISTER) { - $customer->save(); - $customerBillingId = $customerBilling->getId(); - if (!$this->getQuote()->isVirtual()) { - $customerShippingId = isset($customerShipping) ? $customerShipping->getId() : $customerBillingId; - $customer->setDefaultShipping($customerShippingId); - } - $customer->setDefaultBilling($customerBillingId); - $customer->save(); - - $this->getQuote()->setCustomerId($customer->getId()); - - $order->setCustomerId($customer->getId()); - Mage::helper('core')->copyFieldset('customer_account', 'to_order', $customer, $order); - - $billing->setCustomerId($customer->getId())->setCustomerAddressId($customerBillingId); - if (!$this->getQuote()->isVirtual()) { - $shipping->setCustomerId($customer->getId())->setCustomerAddressId($customerShippingId); - } + return $this; + } + /** + * Create order based on checkout type. Create customer if necessary. + * + * @return Mage_Checkout_Model_Type_Onepage + */ + public function saveOrder() + { + $this->validate(); + $isNewCustomer = false; + switch ($this->getCheckoutMehod()) { + case self::METHOD_GUEST: + $this->_prepareGuestQuote(); + break; + case self::METHOD_REGISTER: + $this->_prepareNewCustomerQuote(); + $isNewCustomer = true; + break; + default: + $this->_prepareCustomerQuote(); + break; + } + + $service = Mage::getModel('sales/service_quote', $this->getQuote()); + $order = $service->submit(); + + if ($isNewCustomer) { try { - if ($customer->isConfirmationRequired()) { - $customer->sendNewAccountEmail('confirmation'); - } - else { - $customer->sendNewAccountEmail(); - } + $this->_involveNewCustomer(); } catch (Exception $e) { Mage::logException($e); } } + Mage::dispatchEvent('checkout_type_onepage_save_order_after', array('order'=>$order, 'quote'=>$this->getQuote())); /** * a flag to set that there will be redirect to third party after confirmation * eg: paypal standard ipn */ $redirectUrl = $this->getQuote()->getPayment()->getOrderPlaceRedirectUrl(); - if(!$redirectUrl){ - $order->setEmailSent(true); - } - - $order->save(); - - Mage::dispatchEvent('checkout_type_onepage_save_order_after', array('order'=>$order, 'quote'=>$this->getQuote())); - - /** - * need to have somelogic to set order as new status to make sure order is not finished yet - * quote will be still active when we send the customer to paypal - */ - - $orderId = $order->getIncrementId(); - $this->getCheckout()->setLastQuoteId($this->getQuote()->getId()); - $this->getCheckout()->setLastOrderId($order->getId()); - $this->getCheckout()->setLastRealOrderId($order->getIncrementId()); - $this->getCheckout()->setRedirectUrl($redirectUrl); - /** * we only want to send to customer about new order when there is no redirect to third party */ @@ -636,32 +631,48 @@ public function saveOrder() } } - if ($this->getQuote()->getCheckoutMethod(true)==Mage_Sales_Model_Quote::CHECKOUT_METHOD_REGISTER - && !Mage::getSingleton('customer/session')->isLoggedIn()) { - /** - * we need to save quote here to have it saved with Customer Id. - * so when loginById() executes checkout/session method loadCustomerQuote - * it would not create new quotes and merge it with old one. - */ - $this->getQuote()->save(); - if ($customer->isConfirmationRequired()) { - Mage::getSingleton('checkout/session')->addSuccess(Mage::helper('customer')->__('Account confirmation is required. Please, check your e-mail for confirmation link. To resend confirmation email please click here.', - Mage::helper('customer')->getEmailConfirmationUrl($customer->getEmail()) - )); + $this->getCheckout()->setLastQuoteId($this->getQuote()->getId()) + ->setLastOrderId($order->getId()) + ->setLastRealOrderId($order->getIncrementId()) + ->setRedirectUrl($redirectUrl) + ->setLastSuccessQuoteId($this->getQuote()->getId()); + return $this; + } + + /** + * Validate quote state to be able submited from one page checkout page + * + * @deprecated after 1.4 - service model doing quote validation + * @return Mage_Checkout_Model_Type_Onepage + */ + protected function validateOrder() + { + $helper = Mage::helper('checkout'); + if ($this->getQuote()->getIsMultiShipping()) { + Mage::throwException($helper->__('Invalid checkout type.')); + } + + if (!$this->getQuote()->isVirtual()) { + $address = $this->getQuote()->getShippingAddress(); + $addressValidation = $address->validate(); + if ($addressValidation !== true) { + Mage::throwException($helper->__('Please check shipping address information.')); } - else { - Mage::getSingleton('customer/session')->loginById($customer->getId()); + $method= $address->getShippingMethod(); + $rate = $address->getShippingRateByCode($method); + if (!$this->getQuote()->isVirtual() && (!$method || !$rate)) { + Mage::throwException($helper->__('Please specify shipping method.')); } } - //Setting this one more time like control flag that we haves saved order - //Must be checkout on success page to show it or not. - $this->getCheckout()->setLastSuccessQuoteId($this->getQuote()->getId()); - - $this->getQuote()->setIsActive(false); - $this->getQuote()->save(); + $addressValidation = $this->getQuote()->getBillingAddress()->validate(); + if ($addressValidation !== true) { + Mage::throwException($helper->__('Please check billing address information.')); + } - return $this; + if (!($this->getQuote()->getPayment()->getMethod())) { + Mage::throwException($helper->__('Please select valid payment method.')); + } } /** @@ -685,31 +696,257 @@ protected function _customerEmailExists($email, $websiteId = null) } /** - * Enter description here... + * Get last order increment id by order id * * @return string */ public function getLastOrderId() { - /* - $customerSession = Mage::getSingleton('customer/session'); - if (!$customerSession->isLoggedIn()) { - $this->_redirect('checkout/cart'); - return; - } - $collection = Mage::getResourceModel('sales/order_collection') - ->addAttributeSelect('self/real_order_id') - ->addAttributeFilter('self/customer_id', $customerSession->getCustomerId()) - ->setOrder('self/created_at', 'DESC') - ->setPageSize(1) - ->loadData(); - foreach ($collection as $order) { - $orderId = $order->getRealOrderId(); + $lastId = $this->getCheckout()->getLastOrderId(); + $orderId = false; + if ($lastId) { + $order = Mage::getModel('sales/order'); + $order->load(); + $orderId = $order->getIncrementId(); } - */ - $order = Mage::getModel('sales/order'); - $order->load($this->getCheckout()->getLastOrderId()); - $orderId = $order->getIncrementId(); return $orderId; } + + + /** + * Enter description here... + * + * @return array + */ +// public function saveOrder1() +// { +// $this->validateOrder(); +// $billing = $this->getQuote()->getBillingAddress(); +// if (!$this->getQuote()->isVirtual()) { +// $shipping = $this->getQuote()->getShippingAddress(); +// } +// +// /* +// * Check if before this step checkout method was not defined use default values. +// * Related to issue with some browsers when checkout method was not saved during first step. +// */ +// if (!$this->getQuote()->getCheckoutMethod()) { +// if ($this->_helper->isAllowedGuestCheckout($this->getQuote(), $this->getQuote()->getStore())) { +// $this->getQuote()->setCheckoutMethod(Mage_Sales_Model_Quote::CHECKOUT_METHOD_GUEST); +// } else { +// $this->getQuote()->setCheckoutMethod(Mage_Sales_Model_Quote::CHECKOUT_METHOD_REGISTER); +// } +// } +// +// switch ($this->getQuote()->getCheckoutMethod()) { +// case Mage_Sales_Model_Quote::CHECKOUT_METHOD_GUEST: +// if (!$this->getQuote()->isAllowedGuestCheckout()) { +// Mage::throwException($this->_helper->__('Sorry, guest checkout is not enabled. Please try again or contact store owner.')); +// } +// $this->getQuote()->setCustomerId(null) +// ->setCustomerEmail($billing->getEmail()) +// ->setCustomerIsGuest(true) +// ->setCustomerGroupId(Mage_Customer_Model_Group::NOT_LOGGED_IN_ID); +// break; +// +// case Mage_Sales_Model_Quote::CHECKOUT_METHOD_REGISTER: +// $customer = Mage::getModel('customer/customer'); +// /* @var $customer Mage_Customer_Model_Customer */ +// +// $customerBilling = $billing->exportCustomerAddress(); +// $customer->addAddress($customerBilling); +// +// if (!$this->getQuote()->isVirtual() && !$shipping->getSameAsBilling()) { +// $customerShipping = $shipping->exportCustomerAddress(); +// $customer->addAddress($customerShipping); +// } +// +// if ($this->getQuote()->getCustomerDob() && !$billing->getCustomerDob()) { +// $billing->setCustomerDob($this->getQuote()->getCustomerDob()); +// } +// +// if ($this->getQuote()->getCustomerTaxvat() && !$billing->getCustomerTaxvat()) { +// $billing->setCustomerTaxvat($this->getQuote()->getCustomerTaxvat()); +// } +// +// if ($this->getQuote()->getCustomerGender() && !$billing->getCustomerGender()) { +// $billing->setCustomerGender($this->getQuote()->getCustomerGender()); +// } +// +// Mage::helper('core')->copyFieldset('checkout_onepage_billing', 'to_customer', $billing, $customer); +// +// $customer->setPassword($customer->decryptPassword($this->getQuote()->getPasswordHash())); +// $customer->setPasswordHash($customer->hashPassword($customer->getPassword())); +// +// $this->getQuote()->setCustomer($customer); +// break; +// +// default: +// $customer = Mage::getSingleton('customer/session')->getCustomer(); +// +// if (!$billing->getCustomerId() || $billing->getSaveInAddressBook()) { +// $customerBilling = $billing->exportCustomerAddress(); +// $customer->addAddress($customerBilling); +// } +// if (!$this->getQuote()->isVirtual() && +// ((!$shipping->getCustomerId() && !$shipping->getSameAsBilling()) || +// (!$shipping->getSameAsBilling() && $shipping->getSaveInAddressBook()))) { +// +// $customerShipping = $shipping->exportCustomerAddress(); +// $customer->addAddress($customerShipping); +// } +// $customer->setSavedFromQuote(true); +// $customer->save(); +// +// $changed = false; +// if (isset($customerBilling) && !$customer->getDefaultBilling()) { +// $customer->setDefaultBilling($customerBilling->getId()); +// $changed = true; +// } +// if (!$this->getQuote()->isVirtual() && isset($customerBilling) && !$customer->getDefaultShipping() && $shipping->getSameAsBilling()) { +// $customer->setDefaultShipping($customerBilling->getId()); +// $changed = true; +// } +// elseif (!$this->getQuote()->isVirtual() && isset($customerShipping) && !$customer->getDefaultShipping()){ +// $customer->setDefaultShipping($customerShipping->getId()); +// $changed = true; +// } +// +// if ($changed) { +// $customer->save(); +// } +// } +// +// $this->getQuote()->reserveOrderId(); +// $convertQuote = Mage::getModel('sales/convert_quote'); +// /* @var $convertQuote Mage_Sales_Model_Convert_Quote */ +// //$order = Mage::getModel('sales/order'); +// if ($this->getQuote()->isVirtual()) { +// $order = $convertQuote->addressToOrder($billing); +// } +// else { +// $order = $convertQuote->addressToOrder($shipping); +// } +// /* @var $order Mage_Sales_Model_Order */ +// $order->setBillingAddress($convertQuote->addressToOrderAddress($billing)); +// +// if (!$this->getQuote()->isVirtual()) { +// $order->setShippingAddress($convertQuote->addressToOrderAddress($shipping)); +// } +// +// $order->setPayment($convertQuote->paymentToOrderPayment($this->getQuote()->getPayment())); +// +// foreach ($this->getQuote()->getAllItems() as $item) { +// $orderItem = $convertQuote->itemToOrderItem($item); +// if ($item->getParentItem()) { +// $orderItem->setParentItem($order->getItemByQuoteItemId($item->getParentItem()->getId())); +// } +// $order->addItem($orderItem); +// } +// +// /** +// * We can use configuration data for declare new order status +// */ +// Mage::dispatchEvent('checkout_type_onepage_save_order', array('order'=>$order, 'quote'=>$this->getQuote())); +// // check again, if customer exists +// if ($this->getQuote()->getCheckoutMethod() == Mage_Sales_Model_Quote::CHECKOUT_METHOD_REGISTER) { +// if ($this->_customerEmailExists($customer->getEmail(), Mage::app()->getWebsite()->getId())) { +// Mage::throwException($this->_customerEmailExistsMessage); +// } +// } +// $order->place(); +// +// if ($this->getQuote()->getCheckoutMethod()==Mage_Sales_Model_Quote::CHECKOUT_METHOD_REGISTER) { +// $customer->save(); +// $customerBillingId = $customerBilling->getId(); +// if (!$this->getQuote()->isVirtual()) { +// $customerShippingId = isset($customerShipping) ? $customerShipping->getId() : $customerBillingId; +// $customer->setDefaultShipping($customerShippingId); +// } +// $customer->setDefaultBilling($customerBillingId); +// $customer->save(); +// +// $this->getQuote()->setCustomerId($customer->getId()); +// +// $order->setCustomerId($customer->getId()); +// Mage::helper('core')->copyFieldset('customer_account', 'to_order', $customer, $order); +// +// $billing->setCustomerId($customer->getId())->setCustomerAddressId($customerBillingId); +// if (!$this->getQuote()->isVirtual()) { +// $shipping->setCustomerId($customer->getId())->setCustomerAddressId($customerShippingId); +// } +// +// try { +// if ($customer->isConfirmationRequired()) { +// $customer->sendNewAccountEmail('confirmation'); +// } +// else { +// $customer->sendNewAccountEmail(); +// } +// } catch (Exception $e) { +// Mage::logException($e); +// } +// } +// +// /** +// * a flag to set that there will be redirect to third party after confirmation +// * eg: paypal standard ipn +// */ +// $redirectUrl = $this->getQuote()->getPayment()->getOrderPlaceRedirectUrl(); +// if(!$redirectUrl){ +// $order->setEmailSent(true); +// } +// +// $order->save(); +// +// Mage::dispatchEvent('checkout_type_onepage_save_order_after', array('order'=>$order, 'quote'=>$this->getQuote())); +// +// /** +// * need to have somelogic to set order as new status to make sure order is not finished yet +// * quote will be still active when we send the customer to paypal +// */ +// +// $orderId = $order->getIncrementId(); +// $this->getCheckout()->setLastQuoteId($this->getQuote()->getId()); +// $this->getCheckout()->setLastOrderId($order->getId()); +// $this->getCheckout()->setLastRealOrderId($order->getIncrementId()); +// $this->getCheckout()->setRedirectUrl($redirectUrl); +// +// /** +// * we only want to send to customer about new order when there is no redirect to third party +// */ +// if(!$redirectUrl){ +// try { +// $order->sendNewOrderEmail(); +// } catch (Exception $e) { +// Mage::logException($e); +// } +// } +// +// if ($this->getQuote()->getCheckoutMethod(true)==Mage_Sales_Model_Quote::CHECKOUT_METHOD_REGISTER +// && !Mage::getSingleton('customer/session')->isLoggedIn()) { +// /** +// * we need to save quote here to have it saved with Customer Id. +// * so when loginById() executes checkout/session method loadCustomerQuote +// * it would not create new quotes and merge it with old one. +// */ +// $this->getQuote()->save(); +// if ($customer->isConfirmationRequired()) { +// Mage::getSingleton('checkout/session')->addSuccess(Mage::helper('customer')->__('Account confirmation is required. Please, check your e-mail for confirmation link. To resend confirmation email please click here.', Mage::helper('customer')->getEmailConfirmationUrl($customer->getEmail()))); +// } +// else { +// Mage::getSingleton('customer/session')->loginById($customer->getId()); +// } +// } +// +// //Setting this one more time like control flag that we haves saved order +// //Must be checkout on success page to show it or not. +// $this->getCheckout()->setLastSuccessQuoteId($this->getQuote()->getId()); +// +// $this->getQuote()->setIsActive(false); +// $this->getQuote()->save(); +// +// return $this; +// } +// } diff --git a/app/code/core/Mage/Checkout/Model/Type/Standard.php b/app/code/core/Mage/Checkout/Model/Type/Standard.php deleted file mode 100644 index 883090b9f7..0000000000 --- a/app/code/core/Mage/Checkout/Model/Type/Standard.php +++ /dev/null @@ -1,25 +0,0 @@ -_getCart(); $params = $this->getRequest()->getParams(); + if (isset($params['qty'])) { + $filter = new Zend_Filter_LocalizedToNormalized( + array('locale' => Mage::app()->getLocale()->getLocaleCode()) + ); + $params['qty'] = $filter->filter($params['qty']); + } $product= $this->_initProduct(); $related= $this->getRequest()->getParam('related_product'); @@ -248,6 +254,14 @@ public function updatePostAction() try { $cartData = $this->getRequest()->getParam('cart'); if (is_array($cartData)) { + $filter = new Zend_Filter_LocalizedToNormalized( + array('locale' => Mage::app()->getLocale()->getLocaleCode()) + ); + foreach ($cartData as $index => $data) { + if (isset($data['qty'])) { + $cartData[$index]['qty'] = $filter->filter($data['qty']); + } + } $cart = $this->_getCart(); $cart->updateItems($cartData) ->save(); diff --git a/app/code/core/Mage/Checkout/controllers/OnepageController.php b/app/code/core/Mage/Checkout/controllers/OnepageController.php index cb7be8ccc4..442068eeac 100644 --- a/app/code/core/Mage/Checkout/controllers/OnepageController.php +++ b/app/code/core/Mage/Checkout/controllers/OnepageController.php @@ -79,6 +79,11 @@ protected function _expireAjax() return false; } + /** + * Get shipping method step html + * + * @return string + */ protected function _getShippingMethodsHtml() { $layout = $this->getLayout(); @@ -90,6 +95,11 @@ protected function _getShippingMethodsHtml() return $output; } + /** + * Get payment method step html + * + * @return string + */ protected function _getPaymentMethodsHtml() { $layout = $this->getLayout(); @@ -112,13 +122,18 @@ protected function _getAdditionalHtml() return $output; } + /** + * Get order review step html + * + * @return string + */ protected function _getReviewHtml() { return $this->getLayout()->getBlock('root')->toHtml(); } /** - * Enter description here... + * Get one page checkout model * * @return Mage_Checkout_Model_Type_Onepage */ @@ -149,7 +164,7 @@ public function indexAction() return; } Mage::getSingleton('checkout/session')->setCartWasUpdated(false); - Mage::getSingleton('customer/session')->setBeforeAuthUrl($this->getRequest()->getRequestUri()); + Mage::getSingleton('customer/session')->setBeforeAuthUrl(Mage::getUrl('*/*/*', array('_secure'=>true))); $this->getOnepage()->initCheckout(); $this->loadLayout(); $this->_initLayoutMessages('customer/session'); @@ -187,6 +202,9 @@ public function reviewAction() $this->renderLayout(); } + /** + * Order success action + */ public function successAction() { if (!$this->getOnepage()->getCheckout()->getLastSuccessQuoteId()) { @@ -245,6 +263,9 @@ public function getAddressAction() } } + /** + * Save checkout method + */ public function saveMethodAction() { if ($this->_expireAjax()) { @@ -281,11 +302,8 @@ public function saveBillingAction() 'name' => 'payment-method', 'html' => $this->_getPaymentMethodsHtml() ); - } - elseif (isset($data['use_for_shipping']) && $data['use_for_shipping'] == 1) { - - $result['goto_section'] = 'shipping_method'; - + } elseif (isset($data['use_for_shipping']) && $data['use_for_shipping'] == 1) { + $result['goto_section'] = 'shipping_method'; $result['update_section'] = array( 'name' => 'shipping-method', 'html' => $this->_getShippingMethodsHtml() @@ -293,8 +311,7 @@ public function saveBillingAction() $result['allow_sections'] = array('shipping'); $result['duplicateBillingInfo'] = 'true'; - } - else { + } else { $result['goto_section'] = 'shipping'; } } @@ -303,6 +320,9 @@ public function saveBillingAction() } } + /** + * Shipping address save action + */ public function saveShippingAction() { if ($this->_expireAjax()) { @@ -320,15 +340,13 @@ public function saveShippingAction() 'html' => $this->_getShippingMethodsHtml() ); } - -// $this->loadLayout('checkout_onepage_shippingMethod'); -// $result['shipping_methods_html'] = $this->getLayout()->getBlock('root')->toHtml(); -// $result['shipping_methods_html'] = $this->_getShippingMethodsHtml(); - $this->getResponse()->setBody(Mage::helper('core')->jsonEncode($result)); } } + /** + * Shipping method save action + */ public function saveShippingMethodAction() { if ($this->_expireAjax()) { @@ -349,12 +367,9 @@ public function saveShippingMethodAction() 'name' => 'payment-method', 'html' => $this->_getPaymentMethodsHtml() ); - -// $result['payment_methods_html'] = $this->_getPaymentMethodsHtml(); } $this->getResponse()->setBody(Mage::helper('core')->jsonEncode($result)); } - } /** @@ -405,6 +420,9 @@ public function savePaymentAction() $this->getResponse()->setBody(Mage::helper('core')->jsonEncode($result)); } + /** + * Create order action + */ public function saveOrderAction() { if ($this->_expireAjax()) { @@ -430,8 +448,7 @@ public function saveOrderAction() $redirectUrl = $this->getOnepage()->getCheckout()->getRedirectUrl(); $result['success'] = true; $result['error'] = false; - } - catch (Mage_Core_Exception $e) { + } catch (Mage_Core_Exception $e) { Mage::logException($e); Mage::helper('checkout')->sendPaymentFailedEmail($this->getOnepage()->getQuote(), $e->getMessage()); $result['success'] = false; @@ -455,8 +472,7 @@ public function saveOrderAction() } $this->getOnepage()->getQuote()->save(); - } - catch (Exception $e) { + } catch (Exception $e) { Mage::logException($e); Mage::helper('checkout')->sendPaymentFailedEmail($this->getOnepage()->getQuote(), $e->getMessage()); $result['success'] = false; diff --git a/app/code/core/Mage/Cms/Block/Widget/Block.php b/app/code/core/Mage/Cms/Block/Widget/Block.php index 167dfec63d..120e906527 100644 --- a/app/code/core/Mage/Cms/Block/Widget/Block.php +++ b/app/code/core/Mage/Cms/Block/Widget/Block.php @@ -32,7 +32,7 @@ * @package Mage_Cms * @author Magento Core Team */ -class Mage_Cms_Block_Widget_Block extends Mage_Core_Block_Template implements Mage_Cms_Block_Widget_Interface +class Mage_Cms_Block_Widget_Block extends Mage_Core_Block_Template implements Mage_Widget_Block_Interface { /** * Prepare block text and determine whether block output enabled or not diff --git a/app/code/core/Mage/Cms/Block/Widget/Interface.php b/app/code/core/Mage/Cms/Block/Widget/Interface.php deleted file mode 100644 index 90843fba70..0000000000 --- a/app/code/core/Mage/Cms/Block/Widget/Interface.php +++ /dev/null @@ -1,80 +0,0 @@ - - */ -interface Mage_Cms_Block_Widget_Interface -{ - /** - * Produce and return widget's html output - * - * @return string - */ - public function toHtml(); - - /** - * Add data to the widget. - * Retains previous data in the widget. - * - * @param array $arr - * @return Mage_Cms_Block_Widget_Interface - */ - public function addData(array $arr); - - /** - * Overwrite data in the widget. - * - * $key can be string or array. - * If $key is string, the attribute value will be overwritten by $value. - * If $key is an array, it will overwrite all the data in the widget. - * - * @param string|array $key - * @param mixed $value - * @return Varien_Object - */ - public function setData($key, $value = null); - - /** - * Retrieve data from the widget. - * - * If $key is empty will return all the data as an array - * Otherwise it will return value of the attribute specified by $key - * - * If $index is specified it will assume that attribute data is an array - * and retrieve corresponding member. - * - * @param string $key - * @param string|int $index - * @return mixed - */ - public function getData($key = '', $index = null); -} diff --git a/app/code/core/Mage/Cms/Block/Widget/Page/Link.php b/app/code/core/Mage/Cms/Block/Widget/Page/Link.php index 3e387c4392..c6659c79b5 100644 --- a/app/code/core/Mage/Cms/Block/Widget/Page/Link.php +++ b/app/code/core/Mage/Cms/Block/Widget/Page/Link.php @@ -34,7 +34,7 @@ class Mage_Cms_Block_Widget_Page_Link extends Mage_Core_Block_Html_Link - implements Mage_Cms_Block_Widget_Interface + implements Mage_Widget_Block_Interface { /** * Prepared href attribute @@ -70,8 +70,7 @@ public function getHref() if ($this->getData('href')) { $this->_href = $this->getData('href'); } else if ($this->getData('page_id')) { - $href = Mage::getResourceSingleton('cms/page')->getCmsPageIdentifierById($this->getData('page_id')); - $this->_href = Mage::app()->getStore()->getUrl('', array('_direct' => $href)); + $this->_href = Mage::helper('cms/page')->getPageUrl($this->getData('page_id')); } } diff --git a/app/code/core/Mage/Cms/Helper/Page.php b/app/code/core/Mage/Cms/Helper/Page.php index 742ec3b626..86806119a9 100644 --- a/app/code/core/Mage/Cms/Helper/Page.php +++ b/app/code/core/Mage/Cms/Helper/Page.php @@ -97,11 +97,19 @@ protected function _renderPage(Mage_Core_Controller_Varien_Action $action, $pag $action->getLayout()->helper('page/layout')->applyHandle($handle); } + + Mage::dispatchEvent('cms_page_render', array('page' => $page, 'controller_action' => $action)); + $action->loadLayoutUpdates(); $layoutUpdate = ($page->getCustomLayoutUpdateXml() && $inRange) ? $page->getCustomLayoutUpdateXml() : $page->getLayoutUpdateXml(); $action->getLayout()->getUpdate()->addUpdate($layoutUpdate); $action->generateLayoutXml()->generateLayoutBlocks(); + $contentHeadingBlock = $action->getLayout()->getBlock('page_content_heading'); + if ($contentHeadingBlock) { + $contentHeadingBlock->setContentHeading($page->getContentHeading()); + } + if ($page->getRootTemplate()) { $action->getLayout()->helper('page/layout') ->applyTemplate($page->getRootTemplate()); @@ -144,7 +152,7 @@ public function renderPageExtended(Mage_Core_Controller_Varien_Action $action, $ */ public function getPageUrl($pageId = null) { - $page = Mage::getSingleton('cms/page'); + $page = Mage::getModel('cms/page'); if (!is_null($pageId) && $pageId !== $page->getId()) { $page->setStoreId(Mage::app()->getStore()->getId()); if (!$page->load($pageId)) { diff --git a/app/code/core/Mage/Cms/Helper/Wysiwyg/Images.php b/app/code/core/Mage/Cms/Helper/Wysiwyg/Images.php index a9b05d12de..1210f60c56 100644 --- a/app/code/core/Mage/Cms/Helper/Wysiwyg/Images.php +++ b/app/code/core/Mage/Cms/Helper/Wysiwyg/Images.php @@ -49,8 +49,7 @@ class Mage_Cms_Helper_Wysiwyg_Images extends Mage_Core_Helper_Abstract */ public function getStorageRoot() { - $root = $this->correctPath( $this->getStorage()->getConfigData('upload_root') ); - return Mage::getConfig()->getOptions()->getMediaDir() . DS . $root; + return Mage::getConfig()->getOptions()->getMediaDir() . DS; } /** @@ -60,8 +59,7 @@ public function getStorageRoot() */ public function getBaseUrl() { - $root = $this->correctPath( $this->getStorage()->getConfigData('upload_root') ); - return Mage::getBaseUrl('media') . $this->convertPathToUrl($root) . '/'; + return Mage::getBaseUrl('media') . '/'; } /** @@ -83,7 +81,7 @@ public function getTreeNodeName() public function convertPathToId($path) { $path = str_replace($this->getStorageRoot(), '', $path); - return Mage::helper('core')->urlEncode($path); + return $this->idEncode($path); } /** @@ -94,7 +92,7 @@ public function convertPathToId($path) */ public function convertIdToPath($id) { - $path = Mage::helper('core')->urlDecode($id); + $path = $this->idDecode($id); if (!strstr($path, $this->getStorageRoot())) { $path = $this->getStorageRoot() . $path; } @@ -144,7 +142,7 @@ public function getImageHtmlDeclaration($filename, $asIs = false) $html = sprintf('', $directive); } else { $directive = Mage::helper('core')->urlEncode($directive); - $html = Mage::helper('adminhtml')->getUrl('*/cms_wysiwyg/directive', array('directive' => $directive)); + $html = Mage::helper('adminhtml')->getUrl('*/cms_wysiwyg/directive', array('___directive' => $directive)); } return $html; } @@ -201,4 +199,42 @@ public function getStorage() { return Mage::getSingleton('cms/wysiwyg_images_storage'); } + + /** + * Encode string to valid HTML id element, based on base64 encoding + * + * @param string $string + * @return string + */ + public function idEncode($string) + { + return strtr(base64_encode($string), '+/=', ':_-'); + } + + /** + * Revert opration to idEncode + * + * @param string $string + * @return string + */ + public function idDecode($string) + { + $string = strtr($string, ':_-', '+/='); + return base64_decode($string); + } + + /** + * Reduce filename by replacing some characters with dots + * + * @param string $filename + * @param int $maxLength Maximum filename + * @return string Truncated filename + */ + public function getShortFilename($filename, $maxLength = 20) + { + if (strlen($filename) <= $maxLength) { + return $filename; + } + return substr($filename, 0, $maxLength) . '...'; + } } diff --git a/app/code/core/Mage/Cms/Model/Config.php b/app/code/core/Mage/Cms/Model/Config.php deleted file mode 100644 index c5d6647437..0000000000 --- a/app/code/core/Mage/Cms/Model/Config.php +++ /dev/null @@ -1,73 +0,0 @@ - - */ -class Mage_Cms_Model_Config -{ - /** - * Cms widgets installed in system. - * - * @var Varien_Simplexml_Element - */ - protected $_widgets; - - /** - * Retrieve widget by code - * - * @param string $code - * @return Varien_Simplexml_Element - */ - public function getWidget($code) - { - if ($code) { - return $this->getWidgets()->$code; - } - - return false; - } - - /** - * Retrieve widgets declared in system. - * - * @return Varien_Simplexml_Element - */ - public function getWidgets() - { - if (!$this->_widgets) { - $config = Mage::getConfig()->loadModulesConfiguration('widget.xml'); - $this->_widgets = $config->getNode(); - } - - return $this->_widgets; - } -} diff --git a/app/code/core/Mage/Cms/Model/Mysql4/Widget.php b/app/code/core/Mage/Cms/Model/Mysql4/Widget.php deleted file mode 100644 index 0b235a6f87..0000000000 --- a/app/code/core/Mage/Cms/Model/Mysql4/Widget.php +++ /dev/null @@ -1,65 +0,0 @@ - - */ - -class Mage_Cms_Model_Mysql4_Widget extends Mage_Core_Model_Mysql4_Abstract -{ - protected function _construct() - { - $this->_init('cms/widget', 'widget_id'); - } - - /** - * Retrieves preconfigured parameters for widget - * - * @param int $widgetId - * @return array - */ - public function loadPreconfiguredWidget($widgetId) - { - $read = $this->_getReadAdapter(); - $select = $read->select(); - $select->from($this->getMainTable()) - ->where($this->getIdFieldName() . ' = ?', $widgetId); - - $widget = $read->fetchRow($select); - if (is_array($widget)) { - if ($widget['parameters']) { - $widget['parameters'] = unserialize($widget['parameters']); - } - return $widget; - } - return false; - } - -} diff --git a/app/code/core/Mage/Cms/Model/Observer.php b/app/code/core/Mage/Cms/Model/Observer.php index 3cd0c92a48..37cc431e80 100644 --- a/app/code/core/Mage/Cms/Model/Observer.php +++ b/app/code/core/Mage/Cms/Model/Observer.php @@ -74,18 +74,4 @@ public function noCookies(Varien_Event_Observer $observer) return $this; } - /** - * Add additional settings to wysiwyg config for Widgets Insertion Plugin - * - * @param Varien_Event_Observer $observer - * @return Mage_Cms_Model_Observer - */ - public function prepareWidgetsPluginConfig(Varien_Event_Observer $observer) - { - $config = $observer->getEvent()->getConfig(); - $settings = Mage::getModel('cms/widget_config')->getPluginSettings($config); - $config->addData($settings); - return $this; - } - } diff --git a/app/code/core/Mage/Cms/Model/Template/Filter.php b/app/code/core/Mage/Cms/Model/Template/Filter.php index 969e9b2549..8f64ee0185 100644 --- a/app/code/core/Mage/Cms/Model/Template/Filter.php +++ b/app/code/core/Mage/Cms/Model/Template/Filter.php @@ -41,43 +41,6 @@ class Mage_Cms_Model_Template_Filter extends Mage_Core_Model_Email_Template_Filt */ protected $_useSessionInUrl = null; - /** - * Generate widget - * - * @param array $construction - * @return string - */ - public function widgetDirective($construction) - { - $params = $this->_getIncludeParameters($construction[2]); - - // Determine what name block should have in layout - $name = null; - if (isset($params['name'])) { - $name = $params['name']; - } - - // validate required parameter type or id - if (!empty($params['type'])) { - $type = $params['type']; - } elseif (!empty($params['id'])) { - $preconfigured = Mage::getResourceSingleton('cms/widget') - ->loadPreconfiguredWidget($params['id']); - $type = $preconfigured['type']; - $params = $preconfigured['parameters']; - } else { - return ''; - } - - // define widget block and check the type is instance of Widget Interface - $widget = Mage::app()->getLayout()->createBlock($type, $name, $params); - if (!$widget instanceof Mage_Cms_Block_Widget_Interface) { - return ''; - } - - return $widget->toHtml(); - } - /** * Setter whether SID is allowed in store directive * diff --git a/app/code/core/Mage/Cms/Model/Widget.php b/app/code/core/Mage/Cms/Model/Widget.php deleted file mode 100644 index 7cb10dd9b6..0000000000 --- a/app/code/core/Mage/Cms/Model/Widget.php +++ /dev/null @@ -1,292 +0,0 @@ - - */ -class Mage_Cms_Model_Widget extends Varien_Object -{ - /** - * Load Widgets XML config from widget.xml files and cache it - * - * @return Varien_Simplexml_Config - */ - public function getXmlConfig() - { - $cachedXml = Mage::app()->loadCache('cms_widget_config'); - if ($cachedXml) { - $xmlConfig = new Varien_Simplexml_Config($cachedXml); - } else { - $config = new Varien_Simplexml_Config(); - $config->loadString(''); - Mage::getConfig()->loadModulesConfiguration('widget.xml', $config); - $xmlConfig = $config; - if (Mage::app()->useCache('config')) { - Mage::app()->saveCache($config->getXmlString(), 'cms_widget_config', - array(Mage_Core_Model_Config::CACHE_TAG)); - } - } - return $xmlConfig; - } - - /** - * Return widget XML config element based on its type - * - * @param string $type Widget type - * @return null|Varien_Simplexml_Element - */ - public function getXmlElementByType($type) - { - $elements = $this->getXmlConfig()->getXpath('*[@type="' . $type . '"]'); - if (is_array($elements) && isset($elements[0]) && $elements[0] instanceof Varien_Simplexml_Element) { - return $elements[0]; - } - return null; - } - - /** - * Wrapper for getXmlElementByType method - * - * @param string $type Widget type - * @return null|Varien_Simplexml_Element - */ - public function getConfigAsXml($type) - { - return $this->getXmlElementByType($type); - } - - /** - * Return widget XML configuration as Varien_Object and makes some data preparations - * - * @param string $type Widget type - * @return Varien_Object - */ - public function getConfigAsObject($type) - { - $xml = $this->getConfigAsXml($type); - - $object = new Varien_Object(); - if ($xml === null) { - return $object; - } - - // Save all nodes to object data - $object->setType($type); - $object->setData($xml->asCanonicalArray()); - - // Set module for translations etc. - $module = $object->getData('@/module'); - if ($module) { - $object->setModule($module); - } - - // Correct widget parameters and convert its data to objects - $params = $object->getData('parameters'); - $newParams = array(); - if (is_array($params)) { - $sortOrder = 0; - foreach ($params as $key => $data) { - if (is_array($data)) { - $data['key'] = $key; - $data['sort_order'] = isset($data['sort_order']) ? (int)$data['sort_order'] : $sortOrder; - - // prepare values (for drop-dawns) specified directly in configuration - $values = array(); - if (isset($data['values']) && is_array($data['values'])) { - foreach ($data['values'] as $value) { - if (isset($value['label']) && isset($value['value'])) { - $values[] = $value; - } - } - } - $data['values'] = $values; - - // prepare helper block object - if (isset($data['helper_block'])) { - $helper = new Varien_Object(); - if (isset($data['helper_block']['data']) && is_array($data['helper_block']['data'])) { - $helper->addData($data['helper_block']['data']); - } - if (isset($data['helper_block']['type'])) { - $helper->setType($data['helper_block']['type']); - } - $data['helper_block'] = $helper; - } - - $newParams[$key] = new Varien_Object($data); - $sortOrder++; - } - } - } - uasort($newParams, array($this, '_sortParameters')); - $object->setData('parameters', $newParams); - - return $object; - } - - /** - * Return list of widgets as SimpleXml object - * - * @return Varien_Simplexml_Element - */ - public function getWidgetsXml() - { - return $this->getXmlConfig()->getNode(); - } - - /** - * Return list of widgets as array - * - * @param bool $withEmptyElement - * @return array - */ - public function getWidgetsArray($withEmptyElement = false) - { - if (!$this->_getData('widgets_array')) { - $result = array(); - foreach ($this->getWidgetsXml() as $widget) { - $helper = $widget->getAttribute('module') ? $widget->getAttribute('module') : 'cms'; - $helper = Mage::helper($helper); - $result[$widget->getName()] = array( - 'name' => $helper->__((string)$widget->name), - 'code' => $widget->getName(), - 'type' => $widget->getAttribute('type'), - 'description' => $helper->__((string)$widget->description) - ); - } - usort($result, array($this, "_sortWidgets")); - $this->setData('widgets_array', $result); - } - return $this->_getData('widgets_array'); - } - - /** - * Return widget presentation code in WYSIWYG editor - * - * @param string $type Widget Type - * @param array $params Pre-configured Widget Params - * @param bool $asIs Return result as widget directive(true) or as placeholder image(false) - * @return string Widget directive ready to parse - */ - public function getWidgetDeclaration($type, $params = array(), $asIs = true) - { - $directive = '{{widget type="' . $type . '"'; - - foreach ($params as $name => $value) { - // Retrieve default option value if pre-configured - if (is_array($value)) { - $value = implode(',', $value); - } elseif (trim($value) == '') { - $widget = $this->getConfigAsObject($type); - $parameters = $widget->getParameters(); - if (isset($parameters[$name]) && is_object($parameters[$name])) { - $value = $parameters[$name]->getValue(); - } - } - if ($value) { - $directive .= sprintf(' %s="%s"', $name, $value); - } - } - $directive .= '}}'; - - if ($asIs) { - return $directive; - } - - $config = Mage::getSingleton('cms/widget_config'); - $imageName = str_replace('/', '__', $type) . '.gif'; - if (is_file($config->getPlaceholderImagesBaseDir() . DS . $imageName)) { - $image = $config->getPlaceholderImagesBaseUrl() . $imageName; - } else { - $image = $config->getPlaceholderImagesBaseUrl() . 'default.gif'; - } - $html = sprintf('', - $this->_idEncode($directive), - $image, - Mage::helper('core')->urlEscape($directive) - ); - return $html; - } - - /** - * Return list of required JS files to be included on the top of the page before insertion plugin loaded - * - * @return array - */ - public function getWidgetsRequiredJsFiles() - { - $result = array(); - foreach ($this->getWidgetsXml() as $widget) { - if ($widget->js) { - foreach (explode(',', (string)$widget->js) as $js) { - $result[] = $js; - } - } - } - return $result; - } - - /** - * Encode string to valid HTML id element, based on base64 encoding - * - * @param string $string - * @return string - */ - protected function _idEncode($string) - { - return strtr(base64_encode($string), '+/=', ':_-'); - } - - /** - * User-defined widgets sorting by Name - * - * @param array $a - * @param array $b - * @return boolean - */ - protected function _sortWidgets($a, $b) - { - return strcmp($a["name"], $b["name"]); - } - - /** - * Widget parameters sort callback - * - * @param Varien_Object $a - * @param Varien_Object $b - * @return int - */ - protected function _sortParameters($a, $b) - { - $aOrder = (int)$a->getData('sort_order'); - $bOrder = (int)$b->getData('sort_order'); - return $aOrder < $bOrder ? -1 : ($aOrder > $bOrder ? 1 : 0); - } -} diff --git a/app/code/core/Mage/Cms/Model/Widget/Config.php b/app/code/core/Mage/Cms/Model/Widget/Config.php deleted file mode 100644 index 8bf9bf8673..0000000000 --- a/app/code/core/Mage/Cms/Model/Widget/Config.php +++ /dev/null @@ -1,138 +0,0 @@ - - */ -class Mage_Cms_Model_Widget_Config extends Varien_Object -{ - - /** - * Return config settings for widgets insertion plugin based on editor element config - * - * @param Varien_Object $config - * @return array - */ - public function getPluginSettings($config) - { - $settings = array( - 'widget_plugin_src' => Mage::getBaseUrl('js').'mage/adminhtml/wysiwyg/tiny_mce/plugins/magentowidget/editor_plugin.js', - 'widget_images_url' => $this->getPlaceholderImagesBaseUrl(), - 'widget_placeholders' => $this->getAvailablePlaceholderFilenames(), - 'widget_window_url' => $this->getWidgetWindowUrl($config), - 'widget_window_no_wysiwyg_url' => $this->getWidgetWindowUrl($config, false), - ); - - return $settings; - } - - /** - * Return Widget placeholders images URL - * - * @return string - */ - public function getPlaceholderImagesBaseUrl() - { - return Mage::getDesign()->getSkinUrl('images/widget/'); - } - - /** - * Return Widget placeholders images dir - * - * @return string - */ - public function getPlaceholderImagesBaseDir() - { - return Mage::getDesign()->getSkinBaseDir() . DS . 'images' . DS . 'widget'; - } - - /** - * Return list of existing widget image placeholders - * - * @return array - */ - public function getAvailablePlaceholderFilenames() - { - $collection = new Varien_Data_Collection_Filesystem(); - $collection->addTargetDir($this->getPlaceholderImagesBaseDir()) - ->setCollectDirs(false) - ->setCollectFiles(true) - ->setCollectRecursively(false); - $result = array(); - foreach ($collection as $file) { - $result[] = $file->getBasename(); - } - return $result; - } - - /** - * Return Widgets Insertion Plugin Window URL - * - * @param Varien_Object Editor element config - * @param array $params URL params - * @return string - */ - public function getWidgetWindowUrl($config, $wysiwygMode = true) - { - $params = $wysiwygMode ? array() : array('no_wysiwyg' => true); - - if ($config->hasData('skip_widgets')) { - $params['skip_widgets'] = $this->encodeWidgetsToQuery($config->getData('skip_widgets')); - } - - return Mage::getSingleton('adminhtml/url')->getUrl('*/cms_widget/index', $params); - } - - /** - * Encode list of widget types into query param - * - * @param array $widgets List of widgets - * @return string Query param value - */ - public function encodeWidgetsToQuery($widgets) - { - $widgets = is_array($widgets) ? $widgets : array($widgets); - $param = implode(',', $widgets); - return Mage::helper('core')->urlEncode($param); - } - - /** - * Decode URL query param and return list of widgets - * - * @param string $queryParam Query param value to decode - * @return array Array of widget types - */ - public function decodeWidgetsFromQuery($queryParam) - { - $param = Mage::helper('core')->urlDecode($queryParam); - return preg_split('/\s*\,\s*/', $param, 0, PREG_SPLIT_NO_EMPTY); - } - -} diff --git a/app/code/core/Mage/Cms/Model/Wysiwyg/Config.php b/app/code/core/Mage/Cms/Model/Wysiwyg/Config.php index 1c2e9ce95e..16ee165775 100644 --- a/app/code/core/Mage/Cms/Model/Wysiwyg/Config.php +++ b/app/code/core/Mage/Cms/Model/Wysiwyg/Config.php @@ -59,6 +59,7 @@ class Mage_Cms_Model_Wysiwyg_Config extends Varien_Object public function getConfig($data = array()) { $config = new Varien_Object(); + $config->setData(array( 'enabled' => $this->isEnabled(), 'hidden' => $this->isHidden(), @@ -66,12 +67,14 @@ public function getConfig($data = array()) 'no_display' => false, 'translator' => Mage::helper('cms'), 'files_browser_window_url' => Mage::getSingleton('adminhtml/url')->getUrl('*/cms_wysiwyg_images/index'), - 'files_browser_window_width' => Mage::getStoreConfig('cms/wysiwyg/browser_window_width'), - 'files_browser_window_height' => Mage::getStoreConfig('cms/wysiwyg/browser_window_height'), + 'files_browser_window_width' => (int) Mage::getConfig()->getNode('adminhtml/cms/browser/window_width'), + 'files_browser_window_height' => (int) Mage::getConfig()->getNode('adminhtml/cms/browser/window_height'), 'encode_directives' => true, 'directives_url' => Mage::getSingleton('adminhtml/url')->getUrl('*/cms_wysiwyg/directive'), 'popup_css' => Mage::getBaseUrl('js').'mage/adminhtml/wysiwyg/tiny_mce/themes/advanced/skins/default/dialog.css', 'content_css' => Mage::getBaseUrl('js').'mage/adminhtml/wysiwyg/tiny_mce/themes/advanced/skins/default/content.css', + 'width' => '100%', + 'plugins' => array() )); $config->setData('directives_url_quoted', preg_quote($config->getData('directives_url'))); diff --git a/app/code/core/Mage/Cms/Model/Wysiwyg/Images/Storage.php b/app/code/core/Mage/Cms/Model/Wysiwyg/Images/Storage.php index aa59e7743d..fe39bd9b96 100644 --- a/app/code/core/Mage/Cms/Model/Wysiwyg/Images/Storage.php +++ b/app/code/core/Mage/Cms/Model/Wysiwyg/Images/Storage.php @@ -34,6 +34,22 @@ class Mage_Cms_Model_Wysiwyg_Images_Storage extends Varien_Object { const DIRECTORY_NAME_REGEXP = '/^[a-z0-9\-\_]+$/si'; + const THUMBS_DIRECTORY_NAME = '.thumbs'; + const THUMB_PLACEHOLDER_PATH_SUFFIX = 'images/placeholder/thumbnail.jpg'; + + /** + * Config object + * + * @var Mage_Core_Model_Config_Element + */ + protected $_config; + + /** + * Config object as array + * + * @var array + */ + protected $_configAsArray; /** * Return one-level child directories for specified path @@ -43,11 +59,30 @@ class Mage_Cms_Model_Wysiwyg_Images_Storage extends Varien_Object */ public function getDirsCollection($path) { + $conditions = array('reg_exp' => array(), 'plain' => array()); + + foreach ($this->getConfig()->dirs->exclude->children() as $dir) { + $conditions[$dir->getAttribute('regexp') ? 'reg_exp' : 'plain'][(string) $dir] = true; + } + // "include" section takes precedence and can revoke directory exclusion + foreach ($this->getConfig()->dirs->include->children() as $dir) { + unset($conditions['regexp'][(string) $dir], $conditions['plain'][(string) $dir]); + } + + $regExp = $conditions['reg_exp'] ? ('~' . implode('|', array_keys($conditions['reg_exp'])) . '~i') : null; + $collection = $this->getCollection($path) ->setCollectDirs(true) - ->setDirsFilter(self::DIRECTORY_NAME_REGEXP) ->setCollectFiles(false) ->setCollectRecursively(false); + + foreach ($collection as $key => $value) { + if (array_key_exists($value->getBasename(), $conditions['plain']) + || ($regExp && preg_match($regExp, $value->getFilename()))) { + $collection->removeItemByKey($key); + } + } + return $collection; } @@ -71,6 +106,35 @@ public function getFilesCollection($path, $type = null) $collection->setFilesFilter('/\.(' . implode('|', $allowed). ')$/i'); } + $helper = $this->getHelper(); + + // prepare items + foreach ($collection as $item) { + $item->setId($helper->idEncode($item->getBasename())); + $item->setName($item->getBasename()); + $item->setShortName($helper->getShortFilename($item->getBasename())); + $item->setUrl($helper->getCurrentUrl() . $item->getBasename()); + + if ($this->isImage($item->getBasename())) { + $thumbUrl = $this->getThumbnailUrl($item->getFilename(), true); + // generate thumbnail "on the fly" if it does not exists + if(! $thumbUrl) { + $thumbUrl = Mage::getSingleton('adminhtml/url')->getUrl('*/*/thumbnail', array('file' => $item->getId())); + } + + $size = @getimagesize($item->getFilename()); + + if (is_array($size)) { + $item->setWidth($size[0]); + $item->setHeight($size[1]); + } + } else { + $thumbUrl = Mage::getDesign()->getSkinBaseUrl() . self::THUMB_PLACEHOLDER_PATH_SUFFIX; + } + + $item->setThumbUrl($thumbUrl); + } + return $collection; } @@ -100,10 +164,10 @@ public function getCollection($path = null) public function createDirectory($name, $path) { if (!preg_match(self::DIRECTORY_NAME_REGEXP, $name)) { - Mage::throwException(Mage::helper('cms')->__('Invalid folder name. Please, use alphanumeric characters')); + Mage::throwException(Mage::helper('cms')->__('Invalid folder name. Please, use alphanumeric characters, underscores and dashes.')); } if (!is_dir($path) || !is_writable($path)) { - $path = Mage::helper('cms/wysiwyg_images')->getStorageRoot(); + $path = $this->getHelper()->getStorageRoot(); } $newPath = $path . DS . $name; @@ -115,9 +179,10 @@ public function createDirectory($name, $path) $io = new Varien_Io_File(); if ($io->mkdir($newPath)) { $result = array( - 'name' => $name, - 'path' => $newPath, - 'id' => Mage::helper('cms/wysiwyg_images')->convertPathToId($newPath) + 'name' => $name, + 'short_name' => $this->getHelper()->getShortFilename($name), + 'path' => $newPath, + 'id' => $this->getHelper()->convertPathToId($newPath) ); return $result; } @@ -132,12 +197,43 @@ public function createDirectory($name, $path) */ public function deleteDirectory($path) { + // prevent accidental root directory deleting + $rootCmp = rtrim($this->getHelper()->getStorageRoot(), DS); + $pathCmp = rtrim($path, DS); + + if ($rootCmp == $pathCmp) { + Mage::throwException(Mage::helper('cms')->__('Cannot delete root directory %s', $path)); + } + $io = new Varien_Io_File(); + if (!$io->rmdir($path, true)) { Mage::throwException(Mage::helper('cms')->__('Cannot delete directory %s', $path)); } + + if (strpos($pathCmp, $rootCmp) === 0) { + $io->rmdir($this->getThumbnailRoot() . DS . ltrim(substr($pathCmp, strlen($rootCmp)), '\\/'), true); + } } + /** + * Delete file (and its thumbnail if exists) from storage + * + * @param string $target File path to be deleted + * @return Mage_Cms_Model_Wysiwyg_Images_Storage + */ + public function deleteFile($target) + { + $io = new Varien_Io_File(); + $io->rm($target); + $thumb = $this->getThumbnailPath($target, true); + if ($thumb) { + $io->rm($thumb); + } + return $this; + } + + /** * Upload and resize new file * @@ -161,17 +257,7 @@ public function uploadFile($targetPath, $type = null) } // create thumbnail - $thumbsPath = $targetPath . DS . '.thumbs'; - $io = new Varien_Io_File(); - if ($io->isWriteable($thumbsPath)) { - $io->mkdir($thumbsPath); - } - $image = Varien_Image_Adapter::factory('GD2'); - $image->open($targetPath . DS . $uploader->getUploadedFileName()); - $width = $this->getConfigData('browser_resize_width'); - $height = $this->getConfigData('browser_resize_height'); - $image->resize($width, $height); - $image->save($thumbsPath . DS . $uploader->getUploadedFileName()); + $this->resizeFile($targetPath . DS . $uploader->getUploadedFileName(), true); $result['cookie'] = array( 'name' => session_name(), @@ -184,6 +270,127 @@ public function uploadFile($targetPath, $type = null) return $result; } + /** + * Thumbnail path getter + * + * @param string $filePath original file path + * @param boolean $checkFile OPTIONAL is it necessary to check file availability + * @return string | false + */ + public function getThumbnailPath($filePath, $checkFile = false) + { + $mediaRootDir = $this->getHelper()->getStorageRoot(); + + if (strpos($filePath, $mediaRootDir) === 0) { + $thumbPath = $this->getThumbnailRoot() . DS . substr($filePath, strlen($mediaRootDir)); + + if (! $checkFile || is_readable($thumbPath)) { + return $thumbPath; + } + } + + return false; + } + + /** + * Thumbnail URL getter + * + * @param string $filePath original file path + * @param boolean $checkFile OPTIONAL is it necessary to check file availability + * @return string | false + */ + public function getThumbnailUrl($filePath, $checkFile = false) + { + $mediaRootDir = $this->getHelper()->getStorageRoot(); + + if (strpos($filePath, $mediaRootDir) === 0) { + $thumbSuffix = self::THUMBS_DIRECTORY_NAME . DS . substr($filePath, strlen($mediaRootDir)); + + if (! $checkFile || is_readable($mediaRootDir . $thumbSuffix)) { + return str_replace('\\', '/', $this->getHelper()->getBaseUrl() . $thumbSuffix); + } + } + + return false; + } + + /** + * Create thumbnail for image and save it to thumbnails directory + * + * @param string $source Image path to be resized + * @param bool $keepRation Keep aspect ratio or not + * @return bool|string Resized filepath or false if errors were occured + */ + public function resizeFile($source, $keepRation = true) + { + if (!is_file($source) || !is_readable($source)) { + return false; + } + + $targetDir = $this->getThumbsPath($source); + $io = new Varien_Io_File(); + if (!$io->isWriteable($targetDir)) { + $io->mkdir($targetDir); + } + if (!$io->isWriteable($targetDir)) { + return false; + } + $image = Varien_Image_Adapter::factory('GD2'); + $image->open($source); + $width = $this->getConfigData('resize_width'); + $height = $this->getConfigData('resize_height'); + $image->keepAspectRatio($keepRation); + $image->resize($width, $height); + $dest = $targetDir . DS . pathinfo($source, PATHINFO_BASENAME); + $image->save($dest); + if (is_file($dest)) { + return $dest; + } + return false; + } + + /** + * Resize images on the fly in controller action + * + * @param string File basename + * @return bool|string Thumbnail path or false for errors + */ + public function resizeOnTheFly($filename) + { + $path = $this->getSession()->getCurrentPath(); + if (!$path) { + $path = $this->getHelper()->getCurrentPath(); + } + return $this->resizeFile($path . DS . $filename); + } + + /** + * Return thumbnails directory path for file/current directory + * + * @param string $filePath Path to the file + * @return string + */ + public function getThumbsPath($filePath = false) + { + $mediaRootDir = Mage::getConfig()->getOptions()->getMediaDir(); + $thumbnailDir = $this->getThumbnailRoot(); + + if ($filePath && strpos($filePath, $mediaRootDir) === 0) { + $thumbnailDir .= DS . dirname(substr($filePath, strlen($mediaRootDir))); + } + + return $thumbnailDir; + } + + /** + * Media Storage Helper getter + * @return Mage_Cms_Helper_Wysiwyg_Images + */ + public function getHelper() + { + return Mage::helper('cms/wysiwyg_images'); + } + /** * Storage session * @@ -194,6 +401,34 @@ public function getSession() return Mage::getSingleton('adminhtml/session'); } + /** + * Config object getter + * + * @return Mage_Core_Model_Config_Element + */ + public function getConfig() + { + if (! $this->_config) { + $this->_config = Mage::getConfig()->getNode('cms/browser', 'adminhtml'); + } + + return $this->_config; + } + + /** + * Config object as array getter + * + * @return array + */ + public function getConfigAsArray() + { + if (! $this->_configAsArray) { + $this->_configAsArray = $this->getConfig()->asCanonicalArray(); + } + + return $this->_configAsArray; + } + /** * Wysiwyg Config reader * @@ -203,14 +438,10 @@ public function getSession() */ public function getConfigData($key, $default=false) { - if (!$this->hasData($key)) { - $value = Mage::getStoreConfig('cms/wysiwyg/'.$key); - if (is_null($value) || false===$value) { - $value = $default; - } - $this->setData($key, $value); - } - return $this->_getData($key); + $configArray = $this->getConfigAsArray(); + $key = (string) $key; + + return array_key_exists($key, $configArray) ? $configArray[$key] : $default; } /** @@ -221,11 +452,39 @@ public function getConfigData($key, $default=false) */ public function getAllowedExtensions($type = null) { - $configKey = is_null($type) ? 'browser_allowed_extensions' : 'browser_'.$type.'_allowed_extensions'; - if (preg_match_all('/[a-z0-9]+/si', strtolower($this->getConfigData($configKey)), $matches)) { - return $matches[0]; + $extensions = $this->getConfigData('extensions'); + + if (is_string($type) && array_key_exists("{$type}_allowed", $extensions)) { + $allowed = $extensions["{$type}_allowed"]; + } else { + $allowed = $extensions['allowed']; } - return array(); + + return array_keys(array_filter($allowed)); + } + + /** + * Thumbnail root directory getter + * + * @return string + */ + public function getThumbnailRoot() + { + return $this->getHelper()->getStorageRoot() . self::THUMBS_DIRECTORY_NAME; } + /** + * Simple way to check whether file is image or not based on extension + * + * @param string $filename + * @return bool + */ + public function isImage($filename) + { + if (!$this->hasData('_image_extensions')) { + $this->setData('_image_extensions', $this->getAllowedExtensions('image')); + } + $ext = strtolower(pathinfo($filename, PATHINFO_EXTENSION)); + return in_array($ext, $this->_getData('_image_extensions')); + } } diff --git a/app/code/core/Mage/Cms/etc/adminhtml.xml b/app/code/core/Mage/Cms/etc/adminhtml.xml index 32427b25ef..2d87ad48e4 100644 --- a/app/code/core/Mage/Cms/etc/adminhtml.xml +++ b/app/code/core/Mage/Cms/etc/adminhtml.xml @@ -41,11 +41,6 @@ adminhtml/cms_block 10 - - Polls - adminhtml/poll - 20 - @@ -75,10 +70,6 @@ - - Polls - 20 - diff --git a/app/code/core/Mage/Cms/etc/config.xml b/app/code/core/Mage/Cms/etc/config.xml index cc23b690a3..057a8c1c38 100644 --- a/app/code/core/Mage/Cms/etc/config.xml +++ b/app/code/core/Mage/Cms/etc/config.xml @@ -28,7 +28,7 @@ - 0.7.11 + 0.7.13 @@ -86,16 +86,6 @@ - - - - - cms/observer - prepareWidgetsPluginConfig - - - - @@ -103,6 +93,46 @@ + + + + + catalog + downloadable + flex + import + tmp + + + + + + 1 + 1 + 1 + 1 + + + 1 + 1 + 1 + 1 + + + 1 + 1 + 1 + 1 + 1 + 1 + + + 1000 + 600 + 100 + 75 + + @@ -125,9 +155,6 @@ cms_block_store
- - cms_widget
-
@@ -175,14 +202,6 @@ enabled - content/images - jpg,jpeg,png,gif - jpg,jpeg,png,gif - flv,swf,avi,mov,rm,wmv - 1000 - 800 - 100 - 75 diff --git a/app/code/core/Mage/Cms/etc/system.xml b/app/code/core/Mage/Cms/etc/system.xml index f0a1a3fd36..5528b6ef78 100644 --- a/app/code/core/Mage/Cms/etc/system.xml +++ b/app/code/core/Mage/Cms/etc/system.xml @@ -97,15 +97,6 @@ 1 1 - - - path within the media directory - text - 1 - 1 - 1 - 1 - diff --git a/app/code/core/Mage/Cms/etc/widget.xml b/app/code/core/Mage/Cms/etc/widget.xml index 886c21e454..7b097fe10d 100644 --- a/app/code/core/Mage/Cms/etc/widget.xml +++ b/app/code/core/Mage/Cms/etc/widget.xml @@ -29,8 +29,9 @@ CMS Page Link Link to a CMS Page + 1 - + 1 1 @@ -44,7 +45,7 @@ 10 - + 1 diff --git a/app/code/core/Mage/Cms/sql/cms_setup/mysql4-install-0.7.0.php b/app/code/core/Mage/Cms/sql/cms_setup/mysql4-install-0.7.0.php index c81de8e987..b7f84af9d7 100644 --- a/app/code/core/Mage/Cms/sql/cms_setup/mysql4-install-0.7.0.php +++ b/app/code/core/Mage/Cms/sql/cms_setup/mysql4-install-0.7.0.php @@ -44,7 +44,7 @@ PRIMARY KEY (`block_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='CMS Blocks'; -insert into {$this->getTable('cms_block')}(`block_id`,`title`,`identifier`,`content`,`creation_time`,`update_time`,`is_active`,`store_id`) values (5,'Footer Links','footer_links','',NOW(),NOW(),1,0); +insert into {$this->getTable('cms_block')}(`block_id`,`title`,`identifier`,`content`,`creation_time`,`update_time`,`is_active`,`store_id`) values (5,'Footer Links','footer_links','',NOW(),NOW(),1,0); -- DROP TABLE IF EXISTS {$this->getTable('cms_page')}; CREATE TABLE {$this->getTable('cms_page')} ( diff --git a/app/code/core/Mage/Cms/sql/cms_setup/mysql4-upgrade-0.7.11-0.7.12.php b/app/code/core/Mage/Cms/sql/cms_setup/mysql4-upgrade-0.7.11-0.7.12.php new file mode 100644 index 0000000000..70f0936eba --- /dev/null +++ b/app/code/core/Mage/Cms/sql/cms_setup/mysql4-upgrade-0.7.11-0.7.12.php @@ -0,0 +1,39 @@ +startSetup(); + +if ($installer->getTable('cms_widget')) { + $installer->run(" + ALTER TABLE `{$installer->getTable('cms_widget')}` COMMENT 'Preconfigured Widgets'; + ALTER TABLE `{$installer->getTable('cms_widget')}` RENAME TO `{$installer->getTable('widget/widget')}`; + "); +} + +$installer->endSetup(); diff --git a/app/code/core/Mage/Cms/sql/cms_setup/mysql4-upgrade-0.7.12-0.7.13.php b/app/code/core/Mage/Cms/sql/cms_setup/mysql4-upgrade-0.7.12-0.7.13.php new file mode 100644 index 0000000000..d585bd57ce --- /dev/null +++ b/app/code/core/Mage/Cms/sql/cms_setup/mysql4-upgrade-0.7.12-0.7.13.php @@ -0,0 +1,35 @@ +startSetup(); + +$installer->getConnection()->addColumn($installer->getTable('cms/page'), 'content_heading', + "VARCHAR(255) NOT NULL DEFAULT '' AFTER `identifier`"); + +$installer->endSetup(); diff --git a/app/code/core/Mage/Cms/sql/cms_setup/mysql4-upgrade-0.7.8-0.7.9.php b/app/code/core/Mage/Cms/sql/cms_setup/mysql4-upgrade-0.7.8-0.7.9.php index db44fee6bc..f557968855 100644 --- a/app/code/core/Mage/Cms/sql/cms_setup/mysql4-upgrade-0.7.8-0.7.9.php +++ b/app/code/core/Mage/Cms/sql/cms_setup/mysql4-upgrade-0.7.8-0.7.9.php @@ -28,7 +28,7 @@ $installer = $this; /* @var $installer Mage_Core_Model_Resource_Setup */ -$table = $installer->getTable('cms/widget'); +$table = $installer->getTable('cms_widget'); $installer->run(' CREATE TABLE IF NOT EXISTS `' . $table . '` ( diff --git a/app/code/core/Mage/Contacts/controllers/IndexController.php b/app/code/core/Mage/Contacts/controllers/IndexController.php index adaf3fd1d8..13f02dd49f 100644 --- a/app/code/core/Mage/Contacts/controllers/IndexController.php +++ b/app/code/core/Mage/Contacts/controllers/IndexController.php @@ -83,6 +83,11 @@ public function postAction() if (!Zend_Validate::is(trim($post['email']), 'EmailAddress')) { $error = true; } + + if (Zend_Validate::is(trim($post['hideit']), 'NotEmpty')) { + $error = true; + } + if ($error) { throw new Exception(); } diff --git a/app/code/core/Mage/Core/Block/Messages.php b/app/code/core/Mage/Core/Block/Messages.php index d6887a0d08..0111495388 100644 --- a/app/code/core/Mage/Core/Block/Messages.php +++ b/app/code/core/Mage/Core/Block/Messages.php @@ -40,6 +40,20 @@ class Mage_Core_Block_Messages extends Mage_Core_Block_Template */ protected $_messages; + /** + * Store first level html tag name for messages html output + * + * @var string + */ + protected $_messagesFirstLevelTagName = 'ul'; + + /** + * Store second level html tag name for messages html output + * + * @var string + */ + protected $_messagesSecondLevelTagName = 'li'; + /** * Flag which require message text escape * @@ -182,13 +196,13 @@ public function getMessages($type=null) */ public function getHtml($type=null) { - $html = '
    '; + $html = '<' . $this->_messagesFirstLevelTagName . ' id="admin_messages">'; foreach ($this->getMessages($type) as $message) { - $html.= '
  • ' + $html.= '<' . $this->_messagesSecondLevelTagName . ' class="'.$message->getType().'-msg">' . ($this->_escapeMessageFlag) ? $this->htmlEscape($message->getText()) : $message->getText() - . '
  • '; + . '_messagesSecondLevelTagName . '>'; } - $html .= '
'; + $html .= '_messagesFirstLevelTagName . '>'; return $html; } @@ -210,22 +224,22 @@ public function getGroupedHtml() foreach ($types as $type) { if ( $messages = $this->getMessages($type) ) { if ( !$html ) { - $html .= '
    '; + $html .= '<' . $this->_messagesFirstLevelTagName . ' class="messages">'; } - $html .= '
  • '; - $html .= '
      '; + $html .= '<' . $this->_messagesSecondLevelTagName . ' class="' . $type . '-msg">'; + $html .= '<' . $this->_messagesFirstLevelTagName . '>'; foreach ( $messages as $message ) { - $html.= '
    • '; + $html.= '<' . $this->_messagesSecondLevelTagName . '>'; $html.= ($this->_escapeMessageFlag) ? $this->htmlEscape($message->getText()) : $message->getText(); - $html.= '
    • '; + $html.= '_messagesSecondLevelTagName . '>'; } - $html .= '
    '; - $html .= '
  • '; + $html .= '_messagesFirstLevelTagName . '>'; + $html .= '_messagesSecondLevelTagName . '>'; } } if ( $html) { - $html .= '
'; + $html .= '_messagesFirstLevelTagName . '>'; } return $html; } @@ -234,4 +248,24 @@ protected function _toHtml() { return $this->getGroupedHtml(); } + + /** + * Set messages first level html tag name for output messages as html + * + * @param string $tagName + */ + public function setMessagesFirstLevelTagName($tagName) + { + $this->_messagesFirstLevelTagName = $tagName; + } + + /** + * Set messages first level html tag name for output messages as html + * + * @param string $tagName + */ + public function setMessagesSecondLevelTagName($tagName) + { + $this->_messagesSecondLevelTagName = $tagName; + } } diff --git a/app/code/core/Mage/Core/Block/Saver.php b/app/code/core/Mage/Core/Block/Saver.php deleted file mode 100644 index 78b2ae7b8b..0000000000 --- a/app/code/core/Mage/Core/Block/Saver.php +++ /dev/null @@ -1,25 +0,0 @@ -substr($string, 0, $length + 1)); + $preparedString = preg_replace('/\s+?(\S+)?$/u', '', $this->substr($string, 0, $length + 1)); $preparedlength = $this->strlen($preparedString); } $remainder = $this->substr($string, $preparedlength, $originalLength); @@ -71,30 +71,31 @@ public function truncate($string, $length = 80, $etc = '...', &$remainder = '', } /** - * Passthrough to iconv_strlen() + * Retrieve string length using default charset * - * @param string $str + * @param string $string * @return int */ - public function strlen($str) + public function strlen($string) { - return iconv_strlen($str, self::ICONV_CHARSET); + return iconv_strlen($string, self::ICONV_CHARSET); } /** * Passthrough to iconv_substr() * - * @param string $str + * @param string $string * @param int $offset * @param int $length * @return string */ - public function substr($str, $offset, $length = null) + public function substr($string, $offset, $length = null) { + $string = $this->cleanString($string); if (is_null($length)) { - $length = $this->strlen($str) - $offset; + $length = $this->strlen($string) - $offset; } - return iconv_substr($str, $offset, $length, self::ICONV_CHARSET); + return iconv_substr($string, $offset, $length, self::ICONV_CHARSET); } /** @@ -112,7 +113,7 @@ public function splitInjection($str, $length = 50, $needle = '-', $insert = ' ') $newStr = ''; foreach ($str as $part) { if ($this->strlen($part) >= $length) { - $lastDelimetr = iconv_strpos($this->strrev($part), $needle, null, self::ICONV_CHARSET); + $lastDelimetr = $this->strpos($this->strrev($part), $needle); $tmpNewStr = ''; $tmpNewStr = $this->substr($this->strrev($part), 0, $lastDelimetr) . $insert . $this->substr($this->strrev($part), $lastDelimetr); $newStr .= $this->strrev($tmpNewStr); @@ -164,7 +165,7 @@ public function str_split($str, $length = 1, $keepWords = false, $trim = false, } // trim if ($trim) { - $str = trim(preg_replace('/\s{2,}/is', ' ', $str)); + $str = trim(preg_replace('/\s{2,}/siu', ' ', $str)); } // do a usual str_split, but safe for our encoding if ((!$keepWords) || ($length < 2)) { @@ -174,7 +175,7 @@ public function str_split($str, $length = 1, $keepWords = false, $trim = false, } // split smartly, keeping words else { - $split = preg_split('/(' . $wordSeparatorRegex . '+)/is', $str, null, PREG_SPLIT_DELIM_CAPTURE); + $split = preg_split('/(' . $wordSeparatorRegex . '+)/siu', $str, null, PREG_SPLIT_DELIM_CAPTURE); $i = 0; $space = ''; $spaceLen = 0; @@ -240,8 +241,8 @@ public function str_split($str, $length = 1, $keepWords = false, $trim = false, function splitWords($str, $uniqueOnly = false, $maxWordLength = 0, $wordSeparatorRegexp = '\s') { $result = array(); - $split = preg_split('#' . $wordSeparatorRegexp . '#si', $str, null, PREG_SPLIT_NO_EMPTY); - foreach ($split as $key => $word) { + $split = preg_split('#' . $wordSeparatorRegexp . '#siu', $str, null, PREG_SPLIT_NO_EMPTY); + foreach ($split as $word) { if ($uniqueOnly) { $result[$word] = $word; } @@ -263,6 +264,19 @@ function splitWords($str, $uniqueOnly = false, $maxWordLength = 0, $wordSeparato */ public function cleanString($string) { - return iconv(self::ICONV_CHARSET, self::ICONV_CHARSET . '//IGNORE', $string); + return '"libiconv"' == ICONV_IMPL ? iconv(self::ICONV_CHARSET, self::ICONV_CHARSET . '//IGNORE', $string) : $string; + } + + /** + * Find position of first occurrence of a string + * + * @param string $haystack + * @param string $needle + * @param int $offset + * @return int|false + */ + public function strpos($haystack, $needle, $offset = null) + { + return iconv_strpos($haystack, $needle, $offset, self::ICONV_CHARSET); } } diff --git a/app/code/core/Mage/Core/Model/Abstract.php b/app/code/core/Mage/Core/Model/Abstract.php index c7aff1b872..8fcfeb8cab 100644 --- a/app/code/core/Mage/Core/Model/Abstract.php +++ b/app/code/core/Mage/Core/Model/Abstract.php @@ -226,6 +226,19 @@ public function load($id, $field=null) return $this; } + /** + * Get array of objects transfered to default events processing + * + * @return array + */ + protected function _getEventData() + { + return array( + 'data_object' => $this, + $this->_eventObject => $this, + ); + } + /** * Processing object after load data * @@ -234,14 +247,20 @@ public function load($id, $field=null) protected function _afterLoad() { Mage::dispatchEvent('model_load_after', array('object'=>$this)); - Mage::dispatchEvent($this->_eventPrefix.'_load_after', array($this->_eventObject=>$this)); + Mage::dispatchEvent($this->_eventPrefix.'_load_after', $this->_getEventData()); return $this; } + /** + * Object after load processing. Implemented as public interface for supporting objects after load in collections + * + * @return Mage_Core_Model_Abstract + */ public function afterLoad() { $this->getResource()->afterLoad($this); $this->_afterLoad(); + return $this; } /** @@ -265,7 +284,8 @@ public function save() $this->_getResource()->save($this); $this->_afterSave(); } - $this->_getResource()->commit(); + $this->_getResource()->addCommitCallback(array($this, 'afterCommitCallback')) + ->commit(); $dataCommited = true; } catch (Exception $e) { $this->_getResource()->rollBack(); @@ -278,14 +298,26 @@ public function save() } /** - * Processing data save after main transaction commit + * Callback function which called after transaction commit in resource model * * @return Mage_Core_Model_Abstract */ - protected function _afterSaveCommit() + public function afterCommitCallback() { Mage::dispatchEvent('model_save_commit_after', array('object'=>$this)); - Mage::dispatchEvent($this->_eventPrefix.'_save_commit_after', array($this->_eventObject=>$this)); + Mage::dispatchEvent($this->_eventPrefix.'_save_commit_after', $this->_getEventData()); + return $this; + } + + /** + * Processing data save after transaction commit. + * When method is called we don't have garantee what transaction was really commited + * + * @deprecated after 1.4.0.0 - please use afterCommitCallback instead + * @return Mage_Core_Model_Abstract + */ + protected function _afterSaveCommit() + { return $this; } @@ -320,7 +352,7 @@ protected function _beforeSave() $this->isObjectNew(true); } Mage::dispatchEvent('model_save_before', array('object'=>$this)); - Mage::dispatchEvent($this->_eventPrefix.'_save_before', array($this->_eventObject=>$this)); + Mage::dispatchEvent($this->_eventPrefix.'_save_before', $this->_getEventData()); return $this; } @@ -342,7 +374,7 @@ protected function _afterSave() Mage::app()->cleanCache($tags); } Mage::dispatchEvent('model_save_after', array('object'=>$this)); - Mage::dispatchEvent($this->_eventPrefix.'_save_after', array($this->_eventObject=>$this)); + Mage::dispatchEvent($this->_eventPrefix.'_save_after', $this->_getEventData()); return $this; } @@ -377,7 +409,7 @@ public function delete() protected function _beforeDelete() { Mage::dispatchEvent('model_delete_before', array('object'=>$this)); - Mage::dispatchEvent($this->_eventPrefix.'_delete_before', array($this->_eventObject=>$this)); + Mage::dispatchEvent($this->_eventPrefix.'_delete_before', $this->_getEventData()); return $this; } @@ -413,7 +445,7 @@ protected function _afterDelete() Mage::app()->cleanCache($tags); } Mage::dispatchEvent('model_delete_after', array('object'=>$this)); - Mage::dispatchEvent($this->_eventPrefix.'_delete_after', array($this->_eventObject=>$this)); + Mage::dispatchEvent($this->_eventPrefix.'_delete_after', $this->_getEventData()); return $this; } @@ -425,7 +457,7 @@ protected function _afterDelete() protected function _afterDeleteCommit() { Mage::dispatchEvent('model_delete_commit_after', array('object'=>$this)); - Mage::dispatchEvent($this->_eventPrefix.'_delete_commit_after', array($this->_eventObject=>$this)); + Mage::dispatchEvent($this->_eventPrefix.'_delete_commit_after', $this->_getEventData()); return $this; } diff --git a/app/code/core/Mage/Core/Model/App.php b/app/code/core/Mage/Core/Model/App.php index 607e2c8812..7bb588462a 100644 --- a/app/code/core/Mage/Core/Model/App.php +++ b/app/code/core/Mage/Core/Model/App.php @@ -230,12 +230,13 @@ class Mage_Core_Model_App /** * Constructor - * */ - public function __construct() {} + public function __construct() + { + } /** - * Initialize application + * Initialize application without request processing * * @param string|array $code * @param string $type @@ -244,46 +245,171 @@ public function __construct() {} */ public function init($code, $type=null, $options=array()) { - $this->setErrorHandler(self::DEFAULT_ERROR_HANDLER); - date_default_timezone_set(Mage_Core_Model_Locale::DEFAULT_TIMEZONE); - + $this->_initEnvironment(); if (is_string($options)) { $options = array('etc_dir'=>$options); } Varien_Profiler::start('mage::app::init::config'); $this->_config = Mage::getConfig(); + $this->_initBaseConfig(); + $this->_initCache(); $this->_config->init($options); Varien_Profiler::stop('mage::app::init::config'); if (Mage::isInstalled($options)) { - Varien_Profiler::start('mage::app::init::stores'); - $this->_initStores(); - Varien_Profiler::stop('mage::app::init::stores'); + $this->_initCurrentStore($code, $type); + $this->_initRequest(); + } + return $this; + } - if (empty($code) && !is_null($this->_website)) { - $code = $this->_website->getCode(); - $type = 'website'; - } - switch ($type) { - case 'store': - $this->_currentStore = $code; - break; - case 'group': - $this->_currentStore = $this->_getStoreByGroup($code); - break; - case 'website': - $this->_currentStore = $this->_getStoreByWebsite($code); - break; - default: - $this->throwStoreException(); - } + /** + * Run application. Run process responsible for request processing and sending response. + * List of suppported parametes: + * scope_code - code of default scope (website/store_group/store code) + * scope_type - type of default scope (website/group/store) + * options - configuration options + * + * @param array $params application run parameters + * + * @return Mage_Core_Model_App + */ + public function run($params) + { + $scopeCode = isset($params['scope_code']) ? $params['scope_code'] : ''; + $scopeType = isset($params['scope_type']) ? $params['scope_type'] : 'store'; + $options = isset($params['options']) ? $params['options'] : array(); + + $this->_initEnvironment(); + + $this->_config = Mage::getConfig(); + $this->_config->setOptions($options); + + $this->_initBaseConfig(); + $this->_initCache(); + $this->_initModules(); + + $this->loadAreaPart(Mage_Core_Model_App_Area::AREA_GLOBAL, Mage_Core_Model_App_Area::PART_EVENTS); + + if ($this->_config->isLocalConfigLoaded()) { + $this->_initCurrentStore($scopeCode, $scopeType); + $this->_initRequest(); + Mage_Core_Model_Resource_Setup::applyAllDataUpdates(); + } + + $this->getFrontController()->dispatch(); + return $this; + } + + /** + * Initialize PHP environment + * + * @return Mage_Core_Model_App + */ + protected function _initEnvironment() + { + $this->setErrorHandler(self::DEFAULT_ERROR_HANDLER); + date_default_timezone_set(Mage_Core_Model_Locale::DEFAULT_TIMEZONE); + return $this; + } + + /** + * Initialize base system configuration (local.xml and config.xml files). + * Base configuration provide ability initialize DB connection and cache backend + * + * @return Mage_Core_Model_App + */ + protected function _initBaseConfig() + { + Varien_Profiler::start('mage::app::init::system_config'); + $this->_config->loadBase(); + Varien_Profiler::stop('mage::app::init::system_config'); + return $this; + } + + /** + * Initialize application cache instance + * + * @return Mage_Core_Model_App + */ + protected function _initCache() + { + $options = $this->_config->getNode('global/cache'); + if ($options) { + $options = $options->asArray(); + } else { + $options = array(); + } + $this->_cache = Mage::getModel('core/cache', $options); + return $this; + } - if (!empty($this->_currentStore)) { - $this->_checkCookieStore($type); - $this->_checkGetStore($type); + /** + * Initialize active modules configuration and data + * + * @return Mage_Core_Model_App + */ + protected function _initModules() + { + if (!$this->_config->loadModulesCache()) { + $this->_config->loadModules(); + if ($this->_config->isLocalConfigLoaded()) { + Varien_Profiler::start('mage::app::init::apply_db_schema_updates'); + Mage_Core_Model_Resource_Setup::applyAllUpdates(); + Varien_Profiler::stop('mage::app::init::apply_db_schema_updates'); } - $this->getRequest()->setPathInfo(); + $this->_config->loadDb(); + $this->_config->saveCache(); + } + return $this; + } + + /** + * Init request object + * + * @return Mage_Core_Model_App + */ + protected function _initRequest() + { + $this->getRequest()->setPathInfo(); + return $this; + } + + /** + * Initialize currently ran store + * + * @param string $scopeCode code of default scope (website/store_group/store code) + * @param string $scopeType type of default scope (website/group/store) + * @return unknown_type + */ + protected function _initCurrentStore($scopeCode, $scopeType) + { + Varien_Profiler::start('mage::app::init::stores'); + $this->_initStores(); + Varien_Profiler::stop('mage::app::init::stores'); + + if (empty($scopeCode) && !is_null($this->_website)) { + $scopeCode = $this->_website->getCode(); + $scopeType = 'website'; + } + switch ($scopeType) { + case 'store': + $this->_currentStore = $scopeCode; + break; + case 'group': + $this->_currentStore = $this->_getStoreByGroup($scopeCode); + break; + case 'website': + $this->_currentStore = $this->_getStoreByWebsite($scopeCode); + break; + default: + $this->throwStoreException(); + } + + if (!empty($this->_currentStore)) { + $this->_checkCookieStore($scopeType); + $this->_checkGetStore($scopeType); } return $this; } @@ -312,7 +438,6 @@ protected function _checkGetStore($type) /** * @todo check XML_PATH_STORE_IN_URL */ - if (!isset($_GET['___store'])) { return $this; } @@ -734,7 +859,7 @@ public function getWebsite($id=null) throw Mage::exception('Mage_Core', 'Invalid website id requested.'); } } elseif (is_string($id)) { - $websiteConfig = Mage::getConfig()->getNode('websites/'.$id); + $websiteConfig = $this->_config->getNode('websites/'.$id); if (!$websiteConfig) { throw Mage::exception('Mage_Core', 'Invalid website code requested: '.$id); } @@ -771,7 +896,6 @@ public function getWebsites($withDefault = false, $codeKey = false) * * @return Mage_Core_Model_Store_Group */ - public function getGroup($id=null) { if (is_null($id)) { @@ -813,9 +937,11 @@ public function getLocale() public function getLayout() { if (!$this->_layout) { - $this->_layout = ($this->getFrontController()->getAction() - ? $this->getFrontController()->getAction()->getLayout() - : Mage::getSingleton('core/layout')); + if ($this->getFrontController()->getAction()) { + $this->_layout = $this->getFrontController()->getAction()->getLayout(); + } else { + $this->_layout = Mage::getSingleton('core/layout'); + } } return $this->_layout; } @@ -890,48 +1016,6 @@ public function isInstalled() return Mage::isInstalled(); } - /** - * Generate cache id with application specific data - * - * @param string $id - * @return string - */ - protected function _getCacheId($id=null) - { - if ($id) { - $id = $this->prepareCacheId($id); - } - return $id; - } - - /** - * Prepare identifier which can be used as cache id or cache tag - * - * @param string $id - * @return string - */ - public function prepareCacheId($id) - { - $id = strtoupper($id); - $id = preg_replace('/([^a-zA-Z0-9_]{1,1})/', '_', $id); - return $id; - } - - /** - * Generate cache tags from cache id - * - * @param string $id - * @param array $tags - * @return array - */ - protected function _getCacheTags($tags=array()) - { - foreach ($tags as $index=>$value) { - $tags[$index] = $this->_getCacheId($value); - } - return $tags; - } - /** * Retrieve cache object * @@ -940,70 +1024,9 @@ protected function _getCacheTags($tags=array()) public function getCache() { if (!$this->_cache) { - $backend = strtolower((string)Mage::getConfig()->getNode('global/cache/backend')); - $cachePrefix = (string)Mage::getConfig()->getNode('global/cache/prefix'); - if (!$cachePrefix) { - $cachePrefix = md5(Mage::getConfig()->getBaseDir()); - } - if (extension_loaded('apc') && ini_get('apc.enabled') && $backend == 'apc') { - $backend = 'Apc'; - $backendAttributes = array( - 'cache_prefix' => $cachePrefix - ); - } elseif (extension_loaded('eaccelerator') && ini_get('eaccelerator.enable') && $backend=='eaccelerator') { - $backend = 'Eaccelerator'; - $backendAttributes = array( - 'cache_prefix' => $cachePrefix - ); - } elseif ('memcached' == $backend && extension_loaded('memcache')) { - $backend = 'Memcached'; - $memcachedConfig = Mage::getConfig()->getNode('global/cache/memcached'); - $backendAttributes = array( - 'compression' => (bool)$memcachedConfig->compression, - 'cache_dir' => (string)$memcachedConfig->cache_dir, - 'hashed_directory_level' => (string)$memcachedConfig->hashed_directory_level, - 'hashed_directory_umask' => (string)$memcachedConfig->hashed_directory_umask, - 'file_name_prefix' => (string)$memcachedConfig->file_name_prefix, - 'servers' => array(), - ); - foreach ($memcachedConfig->servers->children() as $serverConfig) { - $backendAttributes['servers'][] = array( - 'host' => (string)$serverConfig->host, - 'port' => (string)$serverConfig->port, - 'persistent' => (string)$serverConfig->persistent, - ); - } - } else { - $backend = 'File'; - $backendAttributes = array( - 'cache_dir' => Mage::getBaseDir('cache'), - 'hashed_directory_level' => 1, - 'hashed_directory_umask' => 0777, - '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' => $lifetime, - 'automatic_cleaning_factor' => 0, - ), - $backendAttributes, - false, - false, - true - ); + $this->_initCache(); } - return $this->_cache; + return $this->_cache->getFrontend(); } /** @@ -1014,7 +1037,7 @@ public function getCache() */ public function loadCache($id) { - return $this->getCache()->load($this->_getCacheId($id)); + return $this->_cache->load($id); } /** @@ -1027,15 +1050,7 @@ public function loadCache($id) */ public function saveCache($data, $id, $tags=array(), $lifeTime=false) { - $tags = $this->_getCacheTags($tags); - - /** - * Add global magento cache tag to all cached data excluding config cache - */ - if (!in_array($this->_getCacheId(Mage_Core_Model_Config::CACHE_TAG), $tags)) { - $tags[] = self::CACHE_TAG; - } - $this->getCache()->save((string)$data, $this->_getCacheId($id), $tags, $lifeTime); + $this->_cache->save($data, $id, $tags, $lifeTime); return $this; } @@ -1047,7 +1062,7 @@ public function saveCache($data, $id, $tags=array(), $lifeTime=false) */ public function removeCache($id) { - $this->getCache()->remove($this->_getCacheId($id)); + $this->_cache->remove($id); return $this; } @@ -1059,80 +1074,30 @@ public function removeCache($id) */ public function cleanCache($tags=array()) { - if (!empty($tags)) { - if (!is_array($tags)) { - $tags = array($tags); - } - $tags = $this->_getCacheTags($tags); - $cacheTag = $this->_getCacheId(Mage_Core_Model_Config::CACHE_TAG); - $this->getCache()->clean(Zend_Cache::CLEANING_MODE_MATCHING_TAG, $tags); - } else { - $this->getCache()->clean(Zend_Cache::CLEANING_MODE_MATCHING_TAG, array(self::CACHE_TAG)); - /** - * Clear configuration cache separately - */ - Mage::getConfig()->cleanCache(); - } - + $this->_cache->clean($tags); Mage::dispatchEvent('application_clean_cache', array('tags' => $tags)); return $this; } - /** - * Get file name with cache configuration settings - * - * @return string - */ - public function getUseCacheFilename() - { - return Mage::getConfig()->getOptions()->getEtcDir().DS.'use_cache.ser'; - } - /** * Check whether to use cache for specific component * - * Components: - * - config - * - layout - * - eav - * - translate - * * @return boolean */ public function useCache($type=null) { - if (is_null($this->_useCache)) { - $filename = $this->getUseCacheFilename(); - if (is_readable($filename)) { - $this->_useCache = unserialize(file_get_contents($filename)); - } else { - $data = Mage::getConfig()->getNode('global/use_cache'); - if (!empty($data)) { - $this->_useCache = (array)$data; - } else { - $this->_useCache = array(); - } - } - } - if (empty($type)) { - return $this->_useCache; - } else { - return isset($this->_useCache[$type]) ? (bool)$this->_useCache[$type] : false; - } + return $this->_cache->canUse($type); } + /** + * Save cache usage settings + * + * @param array $data + * @return Mage_Core_Model_App + */ public function saveUseCache($data) { - //Mage::app()->saveCache(serialize($cacheData), 'use_cache', array(), null); - - $filename = $this->getUseCacheFilename(); - $fp = @fopen($filename, 'w'); - if (!$fp) { - Mage::throwException($filename.' is not writable, unable to save cache settings'); - } - @fwrite($fp, serialize($data)); - @fclose($fp); - @chmod($filename, 0666); + $this->_cache->saveOptions($data); return $this; } @@ -1353,4 +1318,62 @@ public function getGroups($withDefault = false, $codeKey = false) return $groups; } + + + + /** + * Generate cache tags from cache id + * + * @deprecated after 1.4.0.0-alpha3, functionality implemented in Mage_Core_Model_Cache + * @param string $id + * @param array $tags + * @return array + */ + protected function _getCacheTags($tags=array()) + { + foreach ($tags as $index=>$value) { + $tags[$index] = $this->_getCacheId($value); + } + return $tags; + } + + /** + * Get file name with cache configuration settings + * + * @deprecated after 1.4.0.0-alpha3, functionality implemented in Mage_Core_Model_Cache + * @return string + */ + public function getUseCacheFilename() + { + return $this->_config->getOptions()->getEtcDir().DS.'use_cache.ser'; + } + + /** + * Generate cache id with application specific data + * + * @deprecated after 1.4.0.0-alpha3, functionality implemented in Mage_Core_Model_Cache + * @param string $id + * @return string + */ + protected function _getCacheId($id=null) + { + if ($id) { + $id = $this->prepareCacheId($id); + } + return $id; + } + + /** + * Prepare identifier which can be used as cache id or cache tag + * + * @deprecated after 1.4.0.0-alpha3, functionality implemented in Mage_Core_Model_Cache + * @param string $id + * @return string + */ + public function prepareCacheId($id) + { + $id = strtoupper($id); + $id = preg_replace('/([^a-zA-Z0-9_]{1,1})/', '_', $id); + return $id; + } } diff --git a/app/code/core/Mage/Core/Model/Cache.php b/app/code/core/Mage/Core/Model/Cache.php new file mode 100644 index 0000000000..ba390997cb --- /dev/null +++ b/app/code/core/Mage/Core/Model/Cache.php @@ -0,0 +1,438 @@ + 0, + 'hashed_directory_umask' => 0777, + 'file_name_prefix' => 'mage', + ); + + /** + * List of allowed cache options + * + * @var array + */ + protected $_allowedCacheOptions = null; + + /** + * Class constructor. Initialize cache instance based on options + * + * @param array $options + */ + public function __construct(array $options = array()) + { + $this->_defaultBackendOptions['cache_dir'] = Mage::getBaseDir('cache'); + /** + * Initialize id prefix + */ + $this->_idPrefix = isset($options['id_prefix']) ? $options['id_prefix'] : ''; + if (!$this->_idPrefix && isset($options['prefix'])) { + $this->_idPrefix = $options['prefix']; + } + + $backend = $this->_getBackendOptions($options); + $frontend = $this->_getFrontendOptions($options); + + if (empty($this->_idPrefix)) { + $this->_idPrefix = substr(md5(Mage::getConfig()->getOptions()->getEtcDir()), 0, 5).'-'; + } + + $this->_frontend = Zend_Cache::factory('Core', $backend['type'], $frontend, $backend['options'], + false, true, true + ); + } + + /** + * Get cache backend options. Result array contain backend type ('type' key) and backend options ('options') + * + * @param array $cacheOptions + * @return array + */ + protected function _getBackendOptions(array $cacheOptions) + { + $enable2levels = false; + $type = isset($cacheOptions['backend']) ? $cacheOptions['backend'] : $this->_defaultBackend; + if (isset($cacheOptions['backend_options']) && is_array($cacheOptions['backend_options'])) { + $options = $cacheOptions['backend_options']; + } else { + $options = array(); + } + + $type = strtolower($type); + $backendType = false; + switch ($type) { + case 'sqlite': + if (extension_loaded('sqlite') && isset($options['cache_db_complete_path'])) { + $backendType = 'Sqlite'; + } + break; + case 'memcached': + if (extension_loaded('memcache')) { + if (isset($cacheOptions['memcached'])) { + $options = $cacheOptions['memcached']; + } + $enable2levels = true; + $backendType = 'Memcached'; + } + break; + case 'apc': + if (extension_loaded('apc') && ini_get('apc.enabled')) { + $enable2levels = true; + $backendType = 'Apc'; + } + break; + case 'xcache': + if (extension_loaded('xcache')) { + $enable2levels = true; + $backendType = 'Xcache'; + } + break; + case 'eaccelerator': + case 'varien_cache_backend_eaccelerator': + if (extension_loaded('eaccelerator') && ini_get('eaccelerator.enable')) { + $enable2levels = true; + $backendType = 'Varien_Cache_Backend_Eaccelerator'; + } + break; + case 'database': + $backendType = 'Varien_Cache_Backend_Database'; + $options = $this->getDbAdapterOptions(); + break; + } + + if (!$backendType) { + $backendType = $this->_defaultBackend; + foreach ($this->_defaultBackendOptions as $option => $value) { + if (!array_key_exists($option, $options)) { + $options[$option] = $value; + } + } + } + + $backendOptions = array('type' => $backendType, 'options' => $options); + if ($enable2levels) { + $backendOptions = $this->_getTwoLevelsBackendOptions($backendOptions, $cacheOptions); + } + return $backendOptions; + } + + /** + * Get options for database backend type + * + * @return array + */ + protected function getDbAdapterOptions() + { + $options['adapter_callback'] = array($this, 'getDbAdapter'); + $options['data_table'] = Mage::getSingleton('core/resource')->getTableName('core/cache'); + $options['tags_table'] = Mage::getSingleton('core/resource')->getTableName('core/cache_tag'); + return $options; + } + + /** + * Initialize two levels backend model options + * + * @param array $fastOptions fast level backend type and options + * @param array $cacheOptions all cache options + * @return array + */ + protected function _getTwoLevelsBackendOptions($fastOptions, $cacheOptions) + { + $options = array(); + $options['fast_backend'] = $fastOptions['type']; + $options['fast_backend_options'] = $fastOptions['options']; + $options['fast_backend_custom_naming'] = true; + $options['fast_backend_autoload'] = true; + $options['slow_backend_custom_naming'] = true; + $options['slow_backend_autoload'] = true; + + if (isset($cacheOptions['slow_backend'])) { + $options['slow_backend'] = $cacheOptions['slow_backend']; + } else { + $options['slow_backend'] = $this->_defaultBackend; + } + if (isset($cacheOptions['slow_backend_options'])) { + $options['slow_backend_options'] = $cacheOptions['slow_backend_options']; + } else { + $options['slow_backend_options'] = $this->_defaultBackendOptions; + } + if ($options['slow_backend'] == 'database') { + $options['slow_backend'] = 'Varien_Cache_Backend_Database'; + $options['slow_backend_options'] = $this->getDbAdapterOptions(); + } + + $backend = array( + 'type' => 'TwoLevels', + 'options' => $options + ); + return $backend; + } + + /** + * Get options of cache frontend (options of Zend_Cache_Core) + * + * @param array $cacheOptions + * @return array + */ + protected function _getFrontendOptions(array $cacheOptions) + { + $options = isset($cacheOptions['frontend_options']) ? $cacheOptions['frontend_options'] : array(); + if (!array_key_exists('caching', $options)) { + $options['caching'] = true; + } + if (!array_key_exists('lifetime', $options)) { + $options['lifetime'] = isset($cacheOptions['lifetime']) ? $cacheOptions['lifetime'] : self::DEFAULT_LIFETIME; + } + if (!array_key_exists('automatic_cleaning_factor', $options)) { + $options['automatic_cleaning_factor'] = 0; + } + return $options; + } + + /** + * Prepare unified valid identifier with preffix + * + * @param string $id + * @return string + */ + protected function _id($id) + { + if ($id) { + $id = strtoupper($this->_idPrefix.$id); + $id = preg_replace('/([^a-zA-Z0-9_]{1,1})/', '_', $id); + } + return $id; + } + + /** + * Prepare cache tags. + * + * @param array $tags + * @return array + */ + protected function _tags($tags = array()) + { + foreach ($tags as $key => $value) { + $tags[$key] = $this->_id($value); + } + return $tags; + } + + /** + * Get cache frontend API object + * + * @return Zend_Cache_Core + */ + public function getFrontend() + { + return $this->_frontend; + } + + /** + * Load data from cache by id + * + * @param string $id + * @return string + */ + public function load($id) + { + return $this->_frontend->load($this->_id($id)); + } + + /** + * Save data + * + * @param string $data + * @param string $id + * @param array $tags + * @param int $lifeTime + * @return bool + */ + public function save($data, $id, $tags=array(), $lifeTime=null) + { + /** + * Add global magento cache tag to all cached data exclude config cache + */ + if (!in_array(Mage_Core_Model_Config::CACHE_TAG, $tags)) { + $tags[] = Mage_Core_Model_App::CACHE_TAG; + } + return $this->_frontend->save((string)$data, $this->_id($id), $this->_tags($tags), $lifeTime); + } + + /** + * Remove cached data by identifier + * + * @param string $id + * @return bool + */ + public function remove($id) + { + return $this->_frontend->remove($this->_id($id)); + } + + /** + * Clean cached data by specific tag + * + * @param array $tags + * @return bool + */ + public function clean($tags=array()) + { + $mode = Zend_Cache::CLEANING_MODE_MATCHING_TAG; + if (!empty($tags)) { + if (!is_array($tags)) { + $tags = array($tags); + } + $res = $this->_frontend->clean($mode, $this->_tags($tags)); + } else { + $res = $this->_frontend->clean($mode, array(Mage_Core_Model_App::CACHE_TAG)); + $res = $res && $this->_frontend->clean($mode, array(Mage_Core_Model_Config::CACHE_TAG)); + } + return $res; + } + + /** + * Get adapter for database cache backend model + * + * @return Zend_Db_Adapter_Abstract + */ + public function getDbAdapter() + { + return Mage::getSingleton('core/resource')->getConnection('core_write'); + } + + /** + * Get cache resource model + * + * @return Mage_Core_Model_Mysql4_Cache + */ + protected function _getResource() + { + return Mage::getResourceSingleton('core/cache'); + } + + /** + * Initialize cache options + * + * @return Mage_Core_Model_Cache + */ + protected function _initOptions() + { + $options = $this->load(self::OPTIONS_CACHE_ID); + if ($options === false) { + $options = $this->_getResource()->getAllOptions(); + if (is_array($options)) { + $this->_allowedCacheOptions = $options; + $this->save(serialize($this->_allowedCacheOptions), self::OPTIONS_CACHE_ID); + } else { + $this->_allowedCacheOptions = array(); + } + } else { + $this->_allowedCacheOptions = unserialize($options); + } + return $this; + } + + /** + * Check if cache can be used for specific data group + * + * @param string $cacheType + * @return bool + */ + public function canUse($groupCode) + { + if (is_null($this->_allowedCacheOptions)) { + $this->_initOptions(); + } + + if (empty($groupCode)) { + return $this->_allowedCacheOptions; + } else { + if (isset($this->_allowedCacheOptions[$groupCode])) { + return (bool)$this->_allowedCacheOptions[$groupCode]; + } else { + return false; + } + } + } + + /** + * Save cache usage options + * + * @param array $options + * @return Mage_Core_Model_Cache + */ + public function saveOptions($options) + { + $this->remove(self::OPTIONS_CACHE_ID); + $options = $this->_getResource()->saveAllOptions($options); + return $this; + } +} diff --git a/app/code/core/Mage/Core/Model/Config.php b/app/code/core/Mage/Core/Model/Config.php index f294b5326a..b474f58c31 100644 --- a/app/code/core/Mage/Core/Model/Config.php +++ b/app/code/core/Mage/Core/Model/Config.php @@ -146,6 +146,20 @@ class Mage_Core_Model_Config extends Mage_Core_Model_Config_Base */ protected $_cachePartsForSave = array(); + /** + * Empty configuration object for loading and megring configuration parts + * + * @var Mage_Core_Model_Config_Base + */ + protected $_prototype; + + /** + * Flag which identify what local configuration is loaded + * + * @var bool + */ + protected $_isLocalConfigLoaded = false; + /** * Depricated properties * @@ -161,6 +175,12 @@ class Mage_Core_Model_Config extends Mage_Core_Model_Config_Base */ protected $_canUseLocalModules = null; + /** + * Active modules array per namespace + * @var array + */ + private $_moduleNamespaces = null; + /** * Class construct * @@ -169,7 +189,9 @@ class Mage_Core_Model_Config extends Mage_Core_Model_Config_Base public function __construct($sourceData=null) { $this->setCacheId('config_global'); - $this->_options = new Mage_Core_Model_Config_Options(); + $this->_options = new Mage_Core_Model_Config_Options(); + $this->_prototype = new Mage_Core_Model_Config_Base(); + $this->_cacheChecksum = null; parent::__construct($sourceData); } @@ -196,6 +218,20 @@ public function getOptions() return $this->_options; } + /** + * Set configuration options + * + * @param array $options + * @return Mage_Core_Model_Config + */ + public function setOptions($options) + { + if (is_array($options)) { + $this->getOptions()->addData($options); + } + return $this; + } + /** * Initialization of core configuration * @@ -205,14 +241,43 @@ public function init($options=array()) { $this->setCacheChecksum(null); $this->_cacheLoadedSections = array(); - if (is_array($options)) { - $this->getOptions()->addData($options); + $this->setOptions($options); + $this->loadBase(); + + $cacheLoad = $this->loadModulesCache(); + if ($cacheLoad) { + return $this; } + $this->loadModules(); + $this->loadDb(); + $this->saveCache(); + return $this; + } + /** + * Load base system configuration (config.xml and local.xml files) + * + * @return Mage_Core_Model_Config + */ + public function loadBase() + { $etcDir = $this->getOptions()->getEtcDir(); + $this->loadFile($etcDir.DS.'config.xml'); + $merge = clone $this->_prototype; + $this->_isLocalConfigLoaded = $merge->loadFile($etcDir.DS.'local.xml'); + if ($this->_isLocalConfigLoaded) { + $this->extend($merge); + } + return $this; + } - $localConfigLoaded = $this->loadFile($etcDir.DS.'local.xml'); - + /** + * Load cached modules configuration + * + * @return bool + */ + public function loadModulesCache() + { if (Mage::isInstalled()) { if ($this->_canUseCacheForInit()) { Varien_Profiler::start('mage::app::init::config::load_cache'); @@ -220,59 +285,61 @@ public function init($options=array()) Varien_Profiler::stop('mage::app::init::config::load_cache'); if ($loaded) { $this->_useCache = true; - return $this; + return true; } } } + return false; + } - /** - * Load base configuration data - */ - $configFile = $etcDir.DS.'config.xml'; - $this->loadFile($configFile); - $this->_loadDeclaredModules(); - - /** - * Load modules configuration data - */ + /** + * Load modules configuration + * + * @return Mage_Core_Model_Config + */ + public function loadModules() + { Varien_Profiler::start('config/load-modules'); + $this->_loadDeclaredModules(); $this->loadModulesConfiguration('config.xml', $this); - Varien_Profiler::stop('config/load-modules'); /** - * Load local configuration data + * Prevent local.xml directives overwriting */ - Varien_Profiler::start('config/load-local'); - - $mergeConfig = new Mage_Core_Model_Config_Base(); - $configFile = $etcDir.DS.'local.xml'; - if (is_readable($configFile)) { - $mergeConfig->loadFile($configFile); + $mergeConfig = clone $this->_prototype; + $this->_isLocalConfigLoaded = $mergeConfig->loadFile($this->getOptions()->getEtcDir().DS.'local.xml'); + if ($this->_isLocalConfigLoaded) { $this->extend($mergeConfig); } - Varien_Profiler::stop('config/load-local'); - $this->applyExtends(); + Varien_Profiler::stop('config/load-modules'); + return $this; + } - /** - * Load configuration from DB - */ - if ($localConfigLoaded) { - Varien_Profiler::start('dbUpdates'); - Mage_Core_Model_Resource_Setup::applyAllUpdates(); - Varien_Profiler::stop('dbUpdates'); + /** + * Check if local configuration (DB connection, etc) is loaded + * + * @return bool + */ + public function isLocalConfigLoaded() + { + return $this->_isLocalConfigLoaded; + } + /** + * Load config data from DB + * + * @return Mage_Core_Model_Config + */ + public function loadDb() + { + if ($this->_isLocalConfigLoaded) { Varien_Profiler::start('config/load-db'); $dbConf = $this->getResourceModel(); $dbConf->loadToXml($this); Varien_Profiler::stop('config/load-db'); } - - if (Mage::app()->useCache('config')) { - $this->saveCache(array(self::CACHE_TAG)); - } - return $this; } @@ -330,7 +397,8 @@ protected function _canUseLocalModules() */ protected function _canUseCacheForInit() { - return Mage::app()->useCache('config') && $this->_allowCacheForInit && !$this->_loadCache($this->_getCacheLockId()); + return Mage::app()->useCache('config') && $this->_allowCacheForInit + && !$this->_loadCache($this->_getCacheLockId()); } /** @@ -361,6 +429,12 @@ protected function _getCacheLockId() */ public function saveCache($tags=array()) { + if (!Mage::app()->useCache('config')) { + return $this; + } + if (!in_array(self::CACHE_TAG, $tags)) { + $tags[] = self::CACHE_TAG; + } $cacheLockId = $this->_getCacheLockId(); if ($this->_loadCache($cacheLockId)) { return $this; @@ -711,6 +785,48 @@ protected function _sortModuleDepends($modules) return $modules; } + /** + * Determine whether provided name begins from any available modules, according to namespaces priority + * If matched, returns as the matched module "factory" name or a fully qualified module name + * + * @param string $name + * @param bool $asFullModuleName + * @return string + */ + public function determineOmittedNamespace($name, $asFullModuleName = false) + { + if (null === $this->_moduleNamespaces) { + $this->_moduleNamespaces = array(); + foreach ($this->_xml->xpath('modules/*') as $m) { + if ((string)$m->active == 'true') { + $moduleName = $m->getName(); + $module = strtolower($moduleName); + $this->_moduleNamespaces[substr($module, 0, strpos($module, '_'))][$module] = $moduleName; + } + } + } + + $name = explode('_', strtolower($name)); + $partsNum = count($name); + $i = 0; + foreach ($this->_moduleNamespaces as $namespaceName => $namespace) { + // assume the namespace is omitted (default namespace only, which comes first) + if (0 === $i) { + $defaultNS = $namespaceName . '_' . $name[0]; + if (isset($namespace[$defaultNS])) { + return $asFullModuleName ? $namespace[$defaultNS] : $name[0]; // return omitted as well + } + } + // assume namespace is qualified + $fullNS = $name[0] . '_' . $name[1]; + if (2 <= $partsNum && isset($namespace[$fullNS])) { + return $asFullModuleName ? $namespace[$fullNS] : $fullNS; + } + $i++; + } + return ''; + } + /** * Iterate all active modules "etc" folders and combine data from * specidied xml file name to one object @@ -724,11 +840,11 @@ public function loadModulesConfiguration($fileName, $mergeToObject = null, $merg $disableLocalModules = !$this->_canUseLocalModules(); if ($mergeToObject === null) { - $mergeToObject = new Mage_Core_Model_Config_Base(); + $mergeToObject = clone $this->_prototype; $mergeToObject->loadString(''); } if ($mergeModel === null) { - $mergeModel = new Mage_Core_Model_Config_Base(); + $mergeModel = clone $this->_prototype; } $modules = $this->getNode('modules')->children(); foreach ($modules as $modName=>$module) { diff --git a/app/code/core/Mage/Core/Model/Design/Package.php b/app/code/core/Mage/Core/Model/Design/Package.php index 7cd7003da9..29900fd924 100644 --- a/app/code/core/Mage/Core/Model/Design/Package.php +++ b/app/code/core/Mage/Core/Model/Design/Package.php @@ -27,10 +27,15 @@ class Mage_Core_Model_Design_Package { - const DEFAULT_AREA = 'frontend'; - const DEFAULT_PACKAGE = 'default'; - const DEFAULT_THEME = 'default'; - const FALLBACK_THEME = 'default'; + const DEFAULT_AREA = 'frontend'; + const DEFAULT_PACKAGE = 'default'; + const DEFAULT_THEME = 'default'; + const BASE_PACKAGE = 'base'; + + /** + * @deprecated after 1.4.0.0-alpha3 + */ + const FALLBACK_THEME = 'default'; private static $_regexMatchCache = array(); private static $_customThemeTypeCache = array(); @@ -72,6 +77,13 @@ class Mage_Core_Model_Design_Package protected $_config = null; + /** + * Whether theme/skin hierarchy should be checked via fallback mechanism + * @TODO: implement setter for this value + * @var bool + */ + protected $_shouldFallback = true; + /** * Set store * @@ -198,6 +210,9 @@ public function designPackageExists($packageName, $area = self::DEFAULT_AREA) /** * Declare design package theme params + * Polymorph method: + * 1) if 1 parameter specified, sets everything to this value + * 2) if 2 parameters, treats 1st as key and 2nd as value * * @return Mage_Core_Model_Design_Package */ @@ -304,14 +319,10 @@ public function getSkinBaseUrl(array $params=array()) } /** - * Get absolute file path for requested file or false if doesn't exist + * Check whether requested file exists in specified theme params * * Possible params: - * - _type: - * - layout - * - template - * - skin - * - translate + * - _type: layout|template|skin|locale * - _package: design package, if not set = default * - _theme: if not set = default * - _file: path relative to theme root @@ -319,34 +330,69 @@ public function getSkinBaseUrl(array $params=array()) * @see Mage_Core_Model_Config::getBaseDir * @param string $file * @param array $params - * @return string|boolean - * + * @return string|false */ public function validateFile($file, array $params) { - Varien_Profiler::start(__METHOD__); + $fileName = $this->_renderFilename($file, $params); + $testFile = (empty($params['_relative']) ? '' : Mage::getBaseDir('design') . DS) . $fileName; + if (!file_exists($testFile)) { + return false; + } + return $fileName; + } + + /** + * Get filename by specified theme parameters + * + * @param array $file + * @param $params + * @return string + */ + protected function _renderFilename($file, array $params) + { switch ($params['_type']) { case 'skin': - $fileName = $this->getSkinBaseDir($params); + $dir = $this->getSkinBaseDir($params); break; case 'locale': - $fileName = $this->getLocaleBasedir($params); + $dir = $this->getLocaleBasedir($params); break; default: - $fileName = $this->getBaseDir($params); + $dir = $this->getBaseDir($params); break; } - $fileName.= DS.$file; - - $testFile = (empty($params['_relative']) ? '' : Mage::getBaseDir('design').DS) . $fileName; + return $dir . DS . $file; + } - if ($this->getDefaultTheme()!==$params['_theme'] && !file_exists($testFile)) { - return false; + /** + * Check for files existence by specified scheme + * + * If fallback enabled, the first found file will be returned. Otherwise the base package / default theme file, + * regardless of found or not. + * If disabled, the lookup won't be performed to spare filesystem calls. + * + * @param string $file + * @param array &$params + * @param array $fallbackScheme + * @return string + */ + protected function _fallback($file, array &$params, array $fallbackScheme = array(array())) + { + if ($this->_shouldFallback) { + foreach ($fallbackScheme as $try) { + $params = array_merge($params, $try); + $filename = $this->validateFile($file, $params); + if ($filename) { + return $filename; + } + } + $params['_package'] = self::BASE_PACKAGE; + $params['_theme'] = self::DEFAULT_THEME; } - Varien_Profiler::stop(__METHOD__); - return $fileName; + return $this->_renderFilename($file, $params); } /** @@ -362,25 +408,19 @@ public function getFilename($file, array $params) { Varien_Profiler::start(__METHOD__); $this->updateParamDefaults($params); - $filename = $this->validateFile($file, $params); - if (false===$filename) { - $params['_theme'] = $this->getFallbackTheme(); - $filename = $this->validateFile($file, $params); - if (false===$filename) { - if ($this->getDefaultTheme()===$params['_theme']) { - return $params['_default']; - } - $params['_theme'] = $this->getDefaultTheme(); - $filename = $this->validateFile($file, $params); - if (false===$filename) { - return $params['_default']; - } - } - } + $result = $this->_fallback($file, $params, array( + array(), + array('_theme' => $this->getFallbackTheme()), + array('_theme' => self::DEFAULT_THEME), + )); Varien_Profiler::stop(__METHOD__); - return $filename; + return $result; } + /** + * Default theme getter + * @return string + */ public function getFallbackTheme() { return Mage::getStoreConfig('design/theme/default', $this->getStore()); @@ -411,7 +451,7 @@ public function getLocaleFileName($file, array $params=array()) * @param array $params * @return string */ - public function getSkinUrl($file=null, array $params=array()) + public function getSkinUrl($file = null, array $params = array()) { Varien_Profiler::start(__METHOD__); if (empty($params['_type'])) { @@ -422,36 +462,32 @@ public function getSkinUrl($file=null, array $params=array()) } $this->updateParamDefaults($params); if (!empty($file)) { - $filename = $this->validateFile($file, $params); - if (false===$filename) { - - $params['_theme'] = $this->getFallbackTheme(); - $filename = $this->validateFile($file, $params); - if (false===$filename) { - if ($this->getDefaultTheme()===$params['_theme']) { - return $params['_default']; - } - $params['_theme'] = $this->getDefaultTheme(); - $filename = $this->validateFile($file, $params); - if (false===$filename) { - return $params['_default']; - } - } - - } + $result = $this->_fallback($file, $params, array( + array(), + array('_theme' => $this->getFallbackTheme()), + array('_theme' => self::DEFAULT_THEME), + )); } - - $url = $this->getSkinBaseUrl($params).(!empty($file) ? $file : ''); + $result = $this->getSkinBaseUrl($params) . (empty($file) ? '' : $file); Varien_Profiler::stop(__METHOD__); - return $url; + return $result; } + /** + * Design packages list getter + * @return array + */ public function getPackageList() { $directory = Mage::getBaseDir('design') . DS . 'frontend'; return $this->_listDirectories($directory); } + /** + * Design package (optional) themes list getter + * @param string $package + * @return string + */ public function getThemeList($package = null) { $result = array(); @@ -468,7 +504,15 @@ public function getThemeList($package = null) return $result; } - private function _listDirectories($path, $fullPath = false){ + /** + * Directories lister utility method + * + * @param string $path + * @param string|false $fullPath + * @return array + */ + private function _listDirectories($path, $fullPath = false) + { $result = array(); $dir = opendir($path); if ($dir) { diff --git a/app/code/core/Mage/Core/Model/Email/Template.php b/app/code/core/Mage/Core/Model/Email/Template.php index c24f9faf5b..ea8642cec2 100644 --- a/app/code/core/Mage/Core/Model/Email/Template.php +++ b/app/code/core/Mage/Core/Model/Email/Template.php @@ -42,7 +42,7 @@ * @package Mage_Core * @author Magento Core Team */ -class Mage_Core_Model_Email_Template extends Varien_Object +class Mage_Core_Model_Email_Template extends Mage_Core_Model_Abstract { /** * Types of template @@ -56,6 +56,7 @@ class Mage_Core_Model_Email_Template extends Varien_Object */ const XML_PATH_TEMPLATE_EMAIL = 'global/template/email'; const XML_PATH_SENDING_SET_RETURN_PATH = 'system/smtp/set_return_path'; + const XML_PATH_SENDING_RETURN_PATH_EMAIL = 'system/smtp/return_path_email'; protected $_templateFilter; protected $_preprocessFlag = false; @@ -71,13 +72,12 @@ class Mage_Core_Model_Email_Template extends Varien_Object protected $_designConfig; /** - * Return resource of template model. + * Initialize email template model * - * @return Mage_Newsletter_Model_Mysql4_Template */ - public function getResource() + protected function _construct() { - return Mage::getResourceSingleton('core/email_template'); + $this->_init('core/email_template'); } /** @@ -114,28 +114,17 @@ public function getTemplateFilter() { if (empty($this->_templateFilter)) { $this->_templateFilter = Mage::getModel('core/email_template_filter'); - $this->_templateFilter->setUseAbsoluteLinks($this->getUseAbsoluteLinks()); + $this->_templateFilter->setUseAbsoluteLinks($this->getUseAbsoluteLinks()) + ->setStoreId($this->getDesignConfig()->getStore()); } return $this->_templateFilter; } - /** - * Load template by id - * - * @param int $templateId - * return Mage_Newsletter_Model_Template - */ - public function load($templateId) - { - $this->addData($this->getResource()->load($templateId)); - return $this; - } - /** * Load template by code * * @param string $templateCode - * return Mage_Newsletter_Model_Template + * @return Mage_Core_Model_Email_Template */ public function loadByCode($templateCode) { @@ -164,7 +153,17 @@ public function loadDefault($templateId, $locale=null) ); if (preg_match('//', $templateText, $matches)) { - $this->setTemplateSubject($matches[1]); + $this->setTemplateSubject($matches[1]); + $templateText = str_replace($matches[0], '', $templateText); + } + + if (preg_match('//us', $templateText, $matches)) { + $this->setData('orig_template_variables', str_replace("\n", '', $matches[1])); + $templateText = str_replace($matches[0], '', $templateText); + } + + if (preg_match('//sm', $templateText, $matches)) { + $this->setTemplateStyles($matches[1]); $templateText = str_replace($matches[0], '', $templateText); } @@ -204,8 +203,18 @@ static public function getDefaultTemplatesAsOptionsArray() array('value'=>'', 'label'=> '') ); - foreach (self::getDefaultTemplates() as $templateId=>$value) { - $options[] = array('value'=>$templateId, 'label'=>$value['label']); + $idLabel = array(); + foreach (self::getDefaultTemplates() as $templateId => $row) { + if (isset($row['@']) && isset($row['@']['module'])) { + $module = $row['@']['module']; + } else { + $module = 'adminhtml'; + } + $idLabel[$templateId] = Mage::helper($module)->__($row['label']); + } + asort($idLabel); + foreach ($idLabel as $templateId => $label) { + $options[] = array('value' => $templateId, 'label' => $label); } return $options; @@ -252,15 +261,6 @@ public function isPlain() return $this->getTemplateType() == self::TYPE_TEXT; } - /** - * Save template - */ - public function save() - { - $this->getResource()->save($this); - return $this; - } - /** * Process email template code * @@ -270,7 +270,8 @@ public function save() public function getProcessedTemplate(array $variables = array()) { $processor = $this->getTemplateFilter(); - $processor->setUseSessionInUrl(false); + $processor->setUseSessionInUrl(false) + ->setPlainTemplateMode($this->isPlain()); if(!$this->_preprocessFlag) { $variables['this'] = $this; @@ -281,7 +282,7 @@ public function getProcessedTemplate(array $variables = array()) $this->_applyDesignConfig(); try{ - $processedResult = $processor->filter($this->getTemplateText()); + $processedResult = $processor->filter($this->getPreparedTemplateText()); } catch ( Exception $e) { $this->_cancelDesignConfig(); @@ -291,6 +292,21 @@ public function getProcessedTemplate(array $variables = array()) return $processedResult; } + /** + * Makes additional text preparations for HTML templates + * + * @return string + */ + public function getPreparedTemplateText() + { + if ($this->isPlain() || !$this->getTemplateStyles()) { + return $this->getTemplateText(); + } + // wrap styles into style tag + $html = "\n%s"; + return sprintf($html, $this->getTemplateStyles(), $this->getTemplateText()); + } + /** * Get template code for include directive * @@ -334,8 +350,21 @@ public function send($email, $name = null, array $variables = array()) $mail = $this->getMail(); - if (Mage::getStoreConfigFlag(self::XML_PATH_SENDING_SET_RETURN_PATH)) { - $mail->setReturnPath($this->getSenderEmail()); + $setReturnPath = Mage::getStoreConfig(self::XML_PATH_SENDING_SET_RETURN_PATH); + switch ($setReturnPath) { + case 1: + $returnPathEmail = $this->getSenderEmail(); + break; + case 2: + $returnPathEmail = Mage::getStoreConfig(self::XML_PATH_SENDING_RETURN_PATH_EMAIL); + break; + default: + $returnPathEmail = null; + break; + } + + if ($returnPathEmail !== null) { + $mail->setReturnPath($returnPathEmail); } if (is_array($email)) { @@ -355,8 +384,6 @@ public function send($email, $name = null, array $variables = array()) $mail->setBodyHTML($text); } - - $mail->setSubject('=?utf-8?B?'.base64_encode($this->getProcessedTemplateSubject($variables)).'?='); $mail->setFrom($this->getSenderEmail(), $this->getSenderName()); @@ -365,6 +392,8 @@ public function send($email, $name = null, array $variables = array()) $this->_mail = null; } catch (Exception $e) { + $this->_mail = null; + Mage::logException($e); return false; } @@ -408,17 +437,11 @@ public function sendTransactional($templateId, $sender, $email, $name, $vars=arr $this->setSenderEmail($sender['email']); } - $this->setSentSuccess($this->send($email, $name, $vars)); - return $this; - } + if (!isset($vars['store'])) { + $vars['store'] = Mage::app()->getStore($storeId); + } - /** - * Delete template from DB - */ - public function delete() - { - $this->getResource()->delete($this->getId()); - $this->setId(null); + $this->setSentSuccess($this->send($email, $name, $vars)); return $this; } @@ -561,4 +584,64 @@ public function setReplyTo($email) $this->getMail()->addHeader('Reply-To', $email); return $this; } + + /** + * Parse variables string into array of variables + * + * @param string $variablesString + * @return array + */ + protected function _parseVariablesString($variablesString) + { + $variables = array(); + if ($variablesString && is_string($variablesString)) { + $variablesString = str_replace("\n", '', $variablesString); + $variables = Zend_Json::decode($variablesString); + } + return $variables; + } + + /** + * Retrieve option array of variables + * + * @param boolean $withGroup if true wrap variable options in group + * @return array + */ + public function getVariablesOptionArray($withGroup = false) + { + $optionArray = array(); + $variables = $this->_parseVariablesString($this->getData('orig_template_variables')); + if ($variables) { + foreach ($variables as $value => $label) { + $optionArray[] = array( + 'value' => '{{' . $value . '}}', + 'label' => Mage::helper('core')->__('%s', $label) + ); + } + if ($withGroup) { + $optionArray = array( + 'label' => Mage::helper('core')->__('Template Variables'), + 'value' => $optionArray + ); + } + } + return $optionArray; + } + + /** + * Validate email template code + * + * @return Mage_Core_Model_Email_Template + */ + protected function _beforeSave() + { + $code = $this->getTemplateCode(); + if (empty($code)) { + Mage::throwException(Mage::helper('core')->__('Template Code must be not empty')); + } + if($this->_getResource()->checkCodeUsage($this)) { + Mage::throwException(Mage::helper('core')->__('Duplicate Of Template Code')); + } + return parent::_beforeSave(); + } } 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 9649e6eeae..552a1d21d9 100644 --- a/app/code/core/Mage/Core/Model/Email/Template/Filter.php +++ b/app/code/core/Mage/Core/Model/Email/Template/Filter.php @@ -61,6 +61,10 @@ class Mage_Core_Model_Email_Template_Filter extends Varien_Filter_Template */ protected $_modifiers = array('nl2br' => ''); + protected $_storeId = null; + + protected $_plainTemplateMode = false; + /** * Setup callbacks for filters * @@ -94,6 +98,54 @@ public function setUseSessionInUrl($flag) return $this; } + /** + * Setter + * + * @param boolean $plainTemplateMode + * @return Mage_Core_Model_Email_Template_Filter + */ + public function setPlainTemplateMode($plainTemplateMode) + { + $this->_plainTemplateMode = (bool)$plainTemplateMode; + return $this; + } + + /** + * Getter + * + * @return boolean + */ + public function getPlainTemplateMode() + { + return $this->_plainTemplateMode; + } + + /** + * Setter + * + * @param integer $storeId + * @return Mage_Core_Model_Email_Template_Filter + */ + public function setStoreId($storeId) + { + $this->_storeId = $storeId; + return $this; + } + + /** + * Getter + * if $_storeId is null return Design store id + * + * @return integer + */ + public function getStoreId() + { + if (null === $this->_storeId) { + $this->_storeId = Mage::app()->getStore()->getId(); + } + return $this->_storeId; + } + /** * Retrieve Block html directive * @@ -261,7 +313,7 @@ public function storeDirective($construction) unset($params['direct_url']); } else { - $path = $params['url']; + $path = isset($params['url']) ? $params['url'] : ''; unset($params['url']); } @@ -396,4 +448,61 @@ public function protocolDirective($construction) return $protocol; } + + /** + * Store config directive + * + * @param array $construction + * @return string + */ + public function configDirective($construction) + { + $configValue = ''; + $params = $this->_getIncludeParameters($construction[2]); + $storeId = $this->getStoreId(); + if (isset($params['path'])) { + $configValue = Mage::getStoreConfig($params['path'], $storeId); + } + return $configValue; + } + + /** + * Custom Variable directive + * + * @param array $construction + * @return string + */ + public function customvarDirective($construction) + { + $customVarValue = ''; + $params = $this->_getIncludeParameters($construction[2]); + if (isset($params['code'])) { + $variable = Mage::getModel('core/variable') + ->setStoreId($this->getStoreId()) + ->loadByCode($params['code']); + $mode = $this->getPlainTemplateMode()?Mage_Core_Model_Variable::TYPE_TEXT:Mage_Core_Model_Variable::TYPE_HTML; + if ($value = $variable->getValue($mode)) { + $customVarValue = $value; + } + } + return $customVarValue; + } + + /** + * Filter the string as template. + * Rewrited for logging exceptions + * + * @param string $value + * @return string + */ + public function filter($value) + { + try { + $value = parent::filter($value); + } catch (Exception $e) { + $value = ''; + Mage::logException($e); + } + return $value; + } } diff --git a/app/code/core/Mage/Core/Model/Layout.php b/app/code/core/Mage/Core/Model/Layout.php index 7037d7c385..902020069b 100644 --- a/app/code/core/Mage/Core/Model/Layout.php +++ b/app/code/core/Mage/Core/Model/Layout.php @@ -175,7 +175,9 @@ public function generateXml() if (($acl = (string)$attributes->acl) && Mage::getSingleton('admin/session')->isAllowed($acl)) { continue; } - $block->addAttribute('ignore', true); + if (!isset($block->attributes()->ignore)) { + $block->addAttribute('ignore', true); + } } } } @@ -590,6 +592,35 @@ public function helper($name) return $helper->setLayout($this); } + /** + * Lookup module name for translation from current specified layout node + * + * Priorities: + * 1) "module" attribute in the element + * 2) "module" attribute in any ancestor element + * 3) layout handle name - first 1 or 2 parts (namespace is determined automatically) + * + * @param Varien_Simplexml_Element $node + * @return string + */ + public static function findTranslationModuleName(Varien_Simplexml_Element $node) + { + if ($result = $node->getAttribute('module')) { + return (string)$result; + } + foreach (array_reverse($node->xpath('ancestor::*[@module]')) as $element) { + if ($result = $element->getAttribute('module')) { + return (string)$result; + } + } + foreach ($node->xpath('ancestor-or-self::*[last()-1]') as $handle) { + if ($name = Mage::getConfig()->determineOmittedNamespace($handle->getName())) { + return $name; + } + } + return 'core'; + } + /*public function setBlockCache($frontend='Core', $backend='File', array $frontendOptions=array(), array $backendOptions=array()) { diff --git a/app/code/core/Mage/Core/Model/Layout/Update.php b/app/code/core/Mage/Core/Model/Layout/Update.php index f052963390..025ecd12a8 100644 --- a/app/code/core/Mage/Core/Model/Layout/Update.php +++ b/app/code/core/Mage/Core/Model/Layout/Update.php @@ -377,6 +377,8 @@ public function fetchRecursiveUpdates($updateXml) foreach ($updateXml->children() as $child) { if (strtolower($child->getName())=='update' && isset($child['handle'])) { $this->merge((string)$child['handle']); + // Adding merged layout handle to the list of applied hanles + $this->addHandle((string)$child['handle']); } } return $this; @@ -388,11 +390,14 @@ public function fetchRecursiveUpdates($updateXml) * @param string $area * @param string $package * @param string $theme - * @param integer $storeId + * @param integer|null $storeId * @return Mage_Core_Model_Layout_Element */ - public function getFileLayoutUpdatesXml($area, $package, $theme, $storeId) + public function getFileLayoutUpdatesXml($area, $package, $theme, $storeId = null) { + if (null === $storeId) { + $storeId = Mage::app()->getStore()->getId(); + } /* @var $design Mage_Core_Model_Design_Package */ $design = Mage::getSingleton('core/design_package'); $layoutXml = null; diff --git a/app/code/core/Mage/Core/Model/Locale.php b/app/code/core/Mage/Core/Model/Locale.php index 863e14220c..8b4da2cbb6 100644 --- a/app/code/core/Mage/Core/Model/Locale.php +++ b/app/code/core/Mage/Core/Model/Locale.php @@ -381,11 +381,7 @@ protected function _sortOptionArray($option) */ public function getAllowLocales() { - $data = Mage::getConfig()->getNode(self::XML_PATH_ALLOW_CODES)->asArray(); - if ($data) { - return array_keys($data); - } - return array(); + return Mage::getSingleton('core/locale_config')->getAllowedLocales(); } /** @@ -399,12 +395,8 @@ public function getAllowCurrencies() if (Mage::isInstalled()) { $data = Mage::app()->getStore()->getConfig(self::XML_PATH_ALLOW_CURRENCIES_INSTALLED); return explode(',', $data); - } - else { - $data = Mage::getConfig()->getNode(self::XML_PATH_ALLOW_CURRENCIES)->asArray(); - if ($data) { - return array_keys($data); - } + } else { + $data = Mage::getSingleton('core/locale_config')->getAllowedCurrencies(); } return $data; } diff --git a/app/code/core/Mage/Core/Model/Locale/Config.php b/app/code/core/Mage/Core/Model/Locale/Config.php new file mode 100644 index 0000000000..9f682ccc8a --- /dev/null +++ b/app/code/core/Mage/Core/Model/Locale/Config.php @@ -0,0 +1,151 @@ +getNode(Mage_Core_Model_Locale::XML_PATH_ALLOW_CODES); + if ($configData) { + $configData = $configData->asArray(); + } + if ($configData) { + $configData = array_keys($configData); + } else { + $configData = array(); + } + return array_merge($this->_allowedLocales, $configData); + } + + /** + * Get list preconfigured allowed currencies + * + * @return array + */ + public function getAllowedCurrencies() + { + $configData = Mage::getConfig()->getNode(Mage_Core_Model_Locale::XML_PATH_ALLOW_CURRENCIES); + if ($configData) { + $configData = $configData->asArray(); + } + if ($configData) { + $configData = array_keys($configData); + } else { + $configData = array(); + } + return array_merge($this->_allowedCurrencies, $configData); + } +} diff --git a/app/code/core/Mage/Core/Model/Mysql4/Abstract.php b/app/code/core/Mage/Core/Model/Mysql4/Abstract.php index 1ea958fe2e..925b84dce3 100644 --- a/app/code/core/Mage/Core/Model/Mysql4/Abstract.php +++ b/app/code/core/Mage/Core/Model/Mysql4/Abstract.php @@ -447,7 +447,9 @@ public function delete(Mage_Core_Model_Abstract $object) */ public function addUniqueField($field) { - $this->_initUniqueFields(); + if (is_null($this->_uniqueFields)) { + $this->_initUniqueFields(); + } if(is_array($this->_uniqueFields) ) { $this->_uniqueFields[] = $field; } diff --git a/app/code/core/Mage/Core/Model/Mysql4/Cache.php b/app/code/core/Mage/Core/Model/Mysql4/Cache.php new file mode 100644 index 0000000000..77497dc7d8 --- /dev/null +++ b/app/code/core/Mage/Core/Model/Mysql4/Cache.php @@ -0,0 +1,75 @@ +_init('core/cache_option', 'code'); + } + + /** + * Get all cache options + * @return array | false + */ + public function getAllOptions() + { + $adapter = $this->_getReadAdapter(); + if ($adapter) { + /** + * Check if table exist (it protect upgrades. cache settings checked before upgrades) + */ + if ($adapter->fetchOne('SHOW TABLES LIKE ?', $this->getMainTable())) { + $select = $adapter->select() + ->from($this->getMainTable(), array('code', 'value')); + return $adapter->fetchPairs($select); + } + } + return false; + } + + /** + * Save all options to option table + * + * @param array $options + * @return Mage_Core_Model_Mysql4_Cache + */ + public function saveAllOptions($options) + { + if (!$this->_getWriteAdapter()) { + return $this; + } + $this->_getWriteAdapter()->delete($this->getMainTable()); + foreach ($options as $code => $value) { + $this->_getWriteAdapter()->insert($this->getMainTable(), array( + 'code' => $code, + 'value' => $value + )); + } + return $this; + } +} diff --git a/app/code/core/Mage/Core/Model/Mysql4/Collection/Abstract.php b/app/code/core/Mage/Core/Model/Mysql4/Collection/Abstract.php index 21f0cd41d6..c55e86230b 100644 --- a/app/code/core/Mage/Core/Model/Mysql4/Collection/Abstract.php +++ b/app/code/core/Mage/Core/Model/Mysql4/Collection/Abstract.php @@ -166,7 +166,7 @@ public function getAllIds() $idsSelect->reset(Zend_Db_Select::LIMIT_COUNT); $idsSelect->reset(Zend_Db_Select::LIMIT_OFFSET); $idsSelect->reset(Zend_Db_Select::COLUMNS); - $idsSelect->from(null, + $idsSelect->columns( 'main_table.' . $this->getResource()->getIdFieldName() ); return $this->getConnection()->fetchCol($idsSelect); @@ -223,9 +223,39 @@ public function save() return $this; } + /** + * Check if cache can be used for collection + * + * @return bool + */ protected function _canUseCache() { - return Mage::app()->useCache('collections'); + return Mage::app()->useCache('collections') && !empty($this->_cacheConf); + } + + /** + * Load cached data for select + * + * @param Zend_Db_Select $select + * @return string | false + */ + protected function _loadCache($select) + { + $data = Mage::app()->loadCache($this->_getSelectCacheId($select)); + return $data; + } + + /** + * Save collection data to cache + * + * @param array $data + * @param Zend_Db_Select $select + * @return unknown_type + */ + protected function _saveCache($data, $select) + { + Mage::app()->saveCache(serialize($data), $this->_getSelectCacheId($select), $this->_getCacheTags()); + return $this; } /** @@ -236,9 +266,6 @@ protected function _canUseCache() protected function _getCacheTags() { $tags = parent::_getCacheTags(); - foreach ($tags as $key => $value) { - $tags[$key] = Mage::app()->prepareCacheId($value); - } $tags[] = Mage_Core_Model_App::CACHE_TAG; return $tags; } diff --git a/app/code/core/Mage/Core/Model/Mysql4/Email/Template.php b/app/code/core/Mage/Core/Model/Mysql4/Email/Template.php index 188a1050e8..2074ed1393 100644 --- a/app/code/core/Mage/Core/Model/Mysql4/Email/Template.php +++ b/app/code/core/Mage/Core/Model/Mysql4/Email/Template.php @@ -31,7 +31,7 @@ * @package Mage_Core * @author Magento Core Team */ -class Mage_Core_Model_Mysql4_Email_Template +class Mage_Core_Model_Mysql4_Email_Template extends Mage_Core_Model_Mysql4_Abstract { /** @@ -51,36 +51,15 @@ class Mage_Core_Model_Mysql4_Email_Template protected $_read; /** - * Constructor + * Initialize email template resource model * - * Initializes resource */ - public function __construct() + public function _construct() { - $this->_templateTable = Mage::getSingleton('core/resource')->getTableName('core/email_template'); - $this->_read = Mage::getSingleton('core/resource')->getConnection('core_read'); - $this->_write = Mage::getSingleton('core/resource')->getConnection('core_write'); - } - - /** - * Load template from DB - * - * @param int $templateId - * @return array - */ - public function load($templateId) - { - $select = $this->_read->select() - ->from($this->_templateTable) - ->where('template_id=?', $templateId); - - $result = $this->_read->fetchRow($select); - - if (!$result) { - return array(); - } - - return $result; + $this->_init('core/email_template', 'template_id'); + $this->_templateTable = $this->getTable('core/email_template'); + $this->_read = $this->_getReadAdapter(); + $this->_write = $this->_getWriteAdapter(); } /** @@ -132,107 +111,44 @@ public function checkCodeUsage(Mage_Core_Model_Email_Template $template) } } - /** - * Save template to DB + /** + * Set template type, added at and modified at time * - * @param Mage_Core_Model_Email_Template $template - * @return Mage_Core_Model_Mysql_Email_Template + * @param Varien_Object $object */ - public function save(Mage_Core_Model_Email_Template $template) + protected function _beforeSave(Mage_Core_Model_Abstract $object) { - $this->_write->beginTransaction(); - try { - $data = $this->_prepareSave($template); - if($template->getId()) { - $this->_write->update($this->_templateTable, $data, - $this->_write->quoteInto('template_id=?',$template->getId())); - } else { - $this->_write->insert($this->_templateTable, $data); - $template->setId($this->_write->lastInsertId($this->_templateTable)); - } - - $this->_write->commit(); - } - catch (Exception $e) { - $this->_write->rollBack(); - throw $e; + if(!$object->getAddedAt()) { + $object->setAddedAt(Mage::getSingleton('core/date')->gmtDate()); + $object->setModifiedAt(Mage::getSingleton('core/date')->gmtDate()); } + $object->setTemplateType((int)$object->getTemplateType()); + return parent::_beforeSave($object); } /** - * Prepares template for saving, validates input data + * Retrieve config scope and scope id of specified email template by email pathes * - * @param Mage_Core_Model_Email_Template $template - * @return array + * @param array $paths + * @param int|string $templateId + * @return array */ - protected function _prepareSave(Mage_Core_Model_Email_Template $template) + public function getSystemConfigByPathsAndTemplateId($paths, $templateId) { - $data = array(); - $data['template_code'] = $template->getTemplateCode(); - $data['template_text'] = $template->getTemplateText(); - $data['template_type'] = (int) $template->getTemplateType(); - $data['template_subject'] = $template->getTemplateSubject(); - $data['template_sender_name'] = $template->getTemplateSenderName(); - $data['template_sender_email'] = $template->getTemplateSenderEmail(); - - if(!$template->getAddedAt()) { - $template->setAddedAt(Mage::getSingleton('core/date')->gmtDate()); - $template->setModifiedAt(Mage::getSingleton('core/date')->gmtDate()); - } - - $data['modified_at'] = $template->getModifiedAt(); - $data['added_at'] = $template->getAddedAt(); - - if($this->checkCodeUsage($template)) { - Mage::throwException(Mage::helper('core')->__('Duplicate Of Template Code')); - } - - $validators = array( - 'template_code' => array(Zend_Filter_Input::ALLOW_EMPTY => false), - #'template_type' => 'Alnum', - #'template_sender_email' => 'EmailAddress', - #'template_sender_name' => array(Zend_Filter_Input::ALLOW_EMPTY => false) - ); - - $validateInput = new Zend_Filter_Input(array(), $validators, $data); - if(!$validateInput->isValid()) { - $errorString = ''; - - foreach($validateInput->getMessages() as $message) { - if(is_array($message)) { - foreach($message as $str) { - $errorString.= $str . "\n"; - } - } else { - $errorString.= $message . "\n"; - } - - } - - Mage::throwException($errorString); + $adapter = $this->_getReadAdapter(); + $orWhere = array(); + foreach ($paths as $path) { + $orWhere[] = $adapter->quoteInto('path = ?', $path); } + $select = $this->_read->select() + ->from($this->getTable('core/config_data'), array('scope', 'scope_id', 'path')) + ->where('value=?', $templateId) + ->where(join(' OR ', $orWhere)); - return $data; - } - - /** - * Delete template record in DB. - * - * @param int $templateId - * @return Mage_Core_Model_Mysql_Email_Template - */ - public function delete($templateId) - { - $this->_write->beginTransaction(); - try { - $this->_write->delete($this->_templateTable, $this->_write->quoteInto('template_id=?', $templateId)); - $this->_write->commit(); - } - catch(Exception $e) { - $this->_write->rollBack(); - Mage::throwException(Mage::helper('core')->__('Cannot Delete Email Template')); + $result = $this->_read->fetchAll($select); + if (!$result) { + return array(); } - - return $this; + return $result; } } diff --git a/app/code/core/Mage/Core/Model/Mysql4/Resource.php b/app/code/core/Mage/Core/Model/Mysql4/Resource.php index fbb9241b16..0921e2b6c1 100644 --- a/app/code/core/Mage/Core/Model/Mysql4/Resource.php +++ b/app/code/core/Mage/Core/Model/Mysql4/Resource.php @@ -35,7 +35,11 @@ class Mage_Core_Model_Mysql4_Resource protected $_write = null; protected $_resTable = null; protected static $_versions = null; + protected static $_dataVersions = null; + /** + * Class constructor + */ public function __construct() { $this->_resTable = Mage::getSingleton('core/resource')->getTableName('core/resource'); @@ -82,7 +86,7 @@ function setDbVersion($resName, $version) 'version' => $version, ); - if ($this -> getDbVersion($resName)) { + if ($this->getDbVersion($resName)) { self::$_versions[$resName] = $version; $condition = $this->_write->quoteInto('code=?', $resName); return $this->_write->update($this->_resTable, $dbModuleInfo, $condition); @@ -92,4 +96,44 @@ function setDbVersion($resName, $version) return $this->_write->insert($this->_resTable, $dbModuleInfo); } } + + /** + * Get resource data version + * + * @param string $resName + * @return string | false + */ + public function getDataVersion($resName) + { + if (!$this->_read) { + return false; + } + if (is_null(self::$_dataVersions)) { + $select = $this->_read->select()->from($this->_resTable, array('code', 'data_version')); + self::$_dataVersions = $this->_read->fetchPairs($select); + } + return isset(self::$_dataVersions[$resName]) ? self::$_dataVersions[$resName] : false; + } + + /** + * Specify resource data version + * + * @param string $resName + * @param string $version + * @return Mage_Core_Model_Mysql4_Resource + */ + public function setDataVersion($resName, $version) + { + $data = array('code' => $resName, 'data_version' => $version); + + if ($this->getDbVersion($resName) || $this->getDataVersion($resName)) { + self::$_dataVersions[$resName] = $version; + $this->_write->update($this->_resTable, $data, array('code=?' => $resName)); + } + else { + self::$_dataVersions[$resName] = $version; + $this->_write->insert($this->_resTable, $data); + } + return $this; + } } diff --git a/app/code/core/Mage/Core/Model/Mysql4/Translate.php b/app/code/core/Mage/Core/Model/Mysql4/Translate.php index 7702826bcb..1e7d25da29 100644 --- a/app/code/core/Mage/Core/Model/Mysql4/Translate.php +++ b/app/code/core/Mage/Core/Model/Mysql4/Translate.php @@ -38,7 +38,7 @@ protected function _construct() $this->_init('core/translate', 'key_id'); } - public function getTranslationArray($storeId=null) + public function getTranslationArray($storeId=null, $locale=null) { if(!Mage::isInstalled()) { return array(); @@ -68,6 +68,7 @@ public function getTranslationArray($storeId=null) $select = $read->select() ->from($this->getMainTable()) ->where('store_id in (?)', array(0, $storeId)) + ->where('locale=?', $locale) ->order('store_id'); $result = array(); diff --git a/app/code/core/Mage/Core/Model/Mysql4/Variable.php b/app/code/core/Mage/Core/Model/Mysql4/Variable.php new file mode 100644 index 0000000000..b60e560c92 --- /dev/null +++ b/app/code/core/Mage/Core/Model/Mysql4/Variable.php @@ -0,0 +1,145 @@ + + */ +class Mage_Core_Model_Mysql4_Variable extends Mage_Core_Model_Mysql4_Abstract +{ + /** + * Constructor + */ + protected function _construct() + { + $this->_init('core/variable', 'variable_id'); + } + + /** + * Load variable by code + * + * @param Mage_Core_Model_Variable $object + * @param string $code + * @return Mage_Core_Model_Mysql4_Variable + */ + public function loadByCode(Mage_Core_Model_Variable $object, $code) + { + if ($result = $this->getVariableByCode($code, true, $object->getStoreId())) { + $object->setData($result); + } + return $this; + } + + /** + * Retrieve variable data by code + * + * @param string $code + * @param boolean $withValue + * @param integer $storeId + * @return array + */ + public function getVariableByCode($code, $withValue = false, $storeId = 0) + { + $select = $this->_getReadAdapter()->select() + ->from($this->getMainTable()) + ->where($this->getMainTable().'.code = ?', $code); + if ($withValue) { + $this->_addValueToSelect($select, $storeId); + } + return $this->_getReadAdapter()->fetchRow($select); + } + + /** + * Perform actions after object save + * + * @param Mage_Core_Model_Abstract $object + * @return Mage_Core_Model_Mysql4_Variable + */ + protected function _afterSave(Mage_Core_Model_Abstract $object) + { + parent::_afterSave($object); + if ($object->getUseDefaultValue()) { + /* + * remove store value + */ + $this->_getWriteAdapter()->delete( + $this->getTable('core/variable_value'), array( + 'variable_id = ?' => $object->getId(), + 'store_id = ?' => $object->getStoreId() + )); + } else { + $this->_getWriteAdapter()->insertOnDuplicate( + $this->getTable('core/variable_value'), array( + 'variable_id' => $object->getId(), + 'store_id' => $object->getStoreId(), + 'plain_value' => $object->getPlainValue(), + 'html_value' => $object->getHtmlValue() + ), array('plain_value', 'html_value')); + } + return $this; + } + + /** + * Retrieve select object for load object data + * + * @param string $field + * @param mixed $value + * @param Mage_Core_Model_Abstract $object + * @return Zend_Db_Select + */ + protected function _getLoadSelect($field, $value, $object) + { + $select = parent::_getLoadSelect($field, $value, $object); + $this->_addValueToSelect($select, $object->getStoreId()); + return $select; + } + + /** + * Add variable store and default value to select + * + * @param Zend_Db_Select $select + * @param integer $storeId + * @return Mage_Core_Model_Mysql4_Variable + */ + protected function _addValueToSelect(Zend_Db_Select $select, $storeId = 0) + { + $select->joinLeft( + array('default' => $this->getTable('core/variable_value')), + 'default.variable_id = '.$this->getMainTable().'.variable_id AND default.store_id = 0', + array()) + ->joinLeft( + array('store' => $this->getTable('core/variable_value')), + 'store.variable_id = default.variable_id AND store.store_id = ' . $storeId, + array()) + ->columns(array('plain_value' => new Zend_Db_Expr('IFNULL(store.plain_value, default.plain_value)'), + 'html_value' => new Zend_Db_Expr('IFNULL(store.html_value, default.html_value)'), + 'store_plain_value' => 'store.plain_value', 'store_html_value' => 'store.html_value')); + return $this; + } +} diff --git a/app/code/core/Mage/Core/Model/Mysql4/Variable/Collection.php b/app/code/core/Mage/Core/Model/Mysql4/Variable/Collection.php new file mode 100644 index 0000000000..4b8366362f --- /dev/null +++ b/app/code/core/Mage/Core/Model/Mysql4/Variable/Collection.php @@ -0,0 +1,95 @@ + + */ +class Mage_Core_Model_Mysql4_Variable_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract +{ + protected $_storeId = 0; + + /** + * Constructor + */ + protected function _construct() + { + parent::_construct(); + $this->_init('core/variable'); + } + + /** + * Setter + * + * @param integer $storeId + * @return Mage_Core_Model_Mysql4_Variable_Collection + */ + public function setStoreId($storeId) + { + $this->_storeId = $storeId; + return $this; + } + + /** + * Getter + * + * @return integer + */ + public function getStoreId() + { + return $this->_storeId; + } + + /** + * Add store values to result + * + * @return Mage_Core_Model_Mysql4_Variable_Collection + */ + public function addValuesToResult() + { + $this->getSelect() + ->join( + array('value_table' => $this->getTable('core/variable_value')), + $this->getConnection()->quoteInto('value_table.variable_id = main_table.variable_id AND store_id = ?', $this->getStoreId()), + array()) + ->columns(array('value' => 'value_table.value')); + return $this; + } + + /** + * Retrieve option array + * + * @return array + */ + public function toOptionArray() + { + return $this->_toOptionArray('code', 'name'); + } + +} diff --git a/app/code/core/Mage/Core/Model/Resource/Abstract.php b/app/code/core/Mage/Core/Model/Resource/Abstract.php index 56dd5bb45d..a1011e4d4f 100644 --- a/app/code/core/Mage/Core/Model/Resource/Abstract.php +++ b/app/code/core/Mage/Core/Model/Resource/Abstract.php @@ -27,8 +27,8 @@ /** * Abstract resource model * - * @category Mage - * @package Mage_Core + * @category Mage + * @package Mage_Core * @author Magento Core Team */ abstract class Mage_Core_Model_Resource_Abstract @@ -38,6 +38,13 @@ public function __construct() $this->_construct(); } + /** + * Array of callbacks subscribed to commit transaction commit + * + * @var array + */ + static protected $_commitCallbacks = array(); + /** * Resource initialization */ @@ -64,6 +71,19 @@ public function beginTransaction() return $this; } + /** + * Subscribe some callback to transaction commit + * + * @param callback $callback + * @return Mage_Core_Model_Resource_Abstract + */ + public function addCommitCallback($callback) + { + $adapterKey = spl_object_hash($this->_getWriteAdapter()); + self::$_commitCallbacks[$adapterKey][] = $callback; + return $this; + } + /** * Commit resource transaction * @@ -72,6 +92,18 @@ public function beginTransaction() public function commit() { $this->_getWriteAdapter()->commit(); + /** + * Process after commit callbacks + */ + if ($this->_getWriteAdapter()->getTransactionLevel() === 0) { + $adapterKey = spl_object_hash($this->_getWriteAdapter()); + if (isset(self::$_commitCallbacks[$adapterKey])) { + foreach (self::$_commitCallbacks[$adapterKey] as $index => $callback) { + unset(self::$_commitCallbacks[$adapterKey][$index]); + call_user_func($callback); + } + } + } return $this; } diff --git a/app/code/core/Mage/Core/Model/Resource/Setup.php b/app/code/core/Mage/Core/Model/Resource/Setup.php index aefdb45f01..29be54d8ce 100644 --- a/app/code/core/Mage/Core/Model/Resource/Setup.php +++ b/app/code/core/Mage/Core/Model/Resource/Setup.php @@ -50,8 +50,15 @@ class Mage_Core_Model_Resource_Setup protected $_tables = array(); protected $_setupCache = array(); + /** + * Flag wich allow to detect that some schema update was applied dueting request + * + * @var bool + */ protected static $_hadUpdates; + protected static $_schemaUpdatesChecked; + public function __construct($resourceName) { $config = Mage::getConfig(); @@ -70,7 +77,7 @@ public function __construct($resourceName) } /** - * get Connection + * Get connection object * * @return Varien_Db_Adapter_Pdo_Mysql */ @@ -79,6 +86,13 @@ public function getConnection() return $this->_conn; } + /** + * Add table placeholder/table name relation + * + * @param string $tableName + * @param string $realTableName + * @return Mage_Core_Model_Resource_Setup + */ public function setTable($tableName, $realTableName) { $this->_tables[$tableName] = $realTableName; @@ -86,18 +100,29 @@ public function setTable($tableName, $realTableName) } /** - * Get table name + * Get table name by table placeholder * - * @param string $tableName - * @return string + * @param string $tableName + * @return string */ - public function getTable($tableName) { + public function getTable($tableName) + { if (!isset($this->_tables[$tableName])) { $this->_tables[$tableName] = Mage::getSingleton('core/resource')->getTableName($tableName); } return $this->_tables[$tableName]; } + /** + * Get core resource resource model + * + * @return Mage_Core_Model_Mysql4_Resource + */ + protected function _getResource() + { + return Mage::getResourceSingleton('core/resource'); + } + /** * Apply database updates whenever needed * @@ -106,13 +131,6 @@ public function getTable($tableName) { static public function applyAllUpdates() { Mage::app()->setUpdateMode(true); - $res = Mage::getSingleton('core/resource'); - /* - if ($res->getAutoUpdate() == Mage_Core_Model_Resource::AUTO_UPDATE_NEVER) { - return true; - } - */ - self::$_hadUpdates = false; $resources = Mage::getConfig()->getNode('global/resources')->children(); @@ -127,20 +145,59 @@ static public function applyAllUpdates() $setupClass = new $className($resName); $setupClass->applyUpdates(); } -/* - if (self::$_hadUpdates) { - if ($res->getAutoUpdate() == Mage_Core_Model_Resource::AUTO_UPDATE_ONCE) { - $res->setAutoUpdate(Mage_Core_Model_Resource::AUTO_UPDATE_NEVER); - } - } -*/ Mage::app()->setUpdateMode(false); + self::$_schemaUpdatesChecked = true; return true; } + /** + * Apply database data updates whenever needed + */ + static public function applyAllDataUpdates() + { + if (!self::$_schemaUpdatesChecked) { + return; + } + $resources = Mage::getConfig()->getNode('global/resources')->children(); + foreach ($resources as $resName=>$resource) { + if (!$resource->setup) { + continue; + } + $className = __CLASS__; + if (isset($resource->setup->class)) { + $className = $resource->setup->getClassName(); + } + $setupClass = new $className($resName); + $setupClass->applyDataUpdates(); + } + } + + /** + * Apply data updates to the system after upgrading. + * + * @param string $fromVersion + * @return Mage_Core_Model_Resource_Setup + */ + public function applyDataUpdates() + { + $dataVer= $this->_getResource()->getDataVersion($this->_resourceName); + $configVer = (string)$this->_moduleConfig->version; + if ($dataVer !== false) { + $status = version_compare($configVer, $dataVer); + if ($status == self::VERSION_COMPARE_GREATER) { + $this->_upgradeData($dataVer, $configVer); + } + } elseif ($configVer) { + $this->_installData($configVer); + } + } + + /** + * Apply module resource install, upgrade and data scripts + */ public function applyUpdates() { - $dbVer = Mage::getResourceModel('core/resource')->getDbVersion($this->_resourceName); + $dbVer = $this->_getResource()->getDbVersion($this->_resourceName); $configVer = (string)$this->_moduleConfig->version; // Module is installed if ($dbVer!==false) { @@ -156,15 +213,37 @@ public function applyUpdates() return true; break; } - } - // Module not installed - elseif ($configVer) { + } elseif ($configVer) { $this->_installResourceDb($configVer); } } /** - * Install resource + * Run data install scripts + * + * @param string $newVersion + */ + protected function _installData($newVersion) + { + $oldVersion = $this->_modifyResourceDb('data-install', '', $newVersion); + $this->_modifyResourceDb('data-upgrade', $oldVersion, $newVersion); + $this->_getResource()->setDataVersion($this->_resourceName, $newVersion); + } + + /** + * Run data upgrade scripts + * + * @param string $oldVersion + * @param string $newVersion + */ + protected function _upgradeData($oldVersion, $newVersion) + { + $appliedVersion = $this->_modifyResourceDb('data-upgrade', $oldVersion, $newVersion); + $this->_getResource()->setDataVersion($this->_resourceName, $newVersion); + } + + /** + * Run resource installation file * * @param string $version * @return boolean @@ -173,10 +252,11 @@ protected function _installResourceDb($newVersion) { $oldVersion = $this->_modifyResourceDb('install', '', $newVersion); $this->_modifyResourceDb('upgrade', $oldVersion, $newVersion); + $this->_getResource()->setDbVersion($this->_resourceName, $newVersion); } /** - * Upgrade DB for new resource version + * Run resource upgrade files from $oldVersion to $newVersion * * @param string $oldVersion * @param string $newVersion @@ -184,6 +264,7 @@ protected function _installResourceDb($newVersion) protected function _upgradeResourceDb($oldVersion, $newVersion) { $this->_modifyResourceDb('upgrade', $oldVersion, $newVersion); + $this->_getResource()->setDbVersion($this->_resourceName, $newVersion); } /** @@ -211,12 +292,12 @@ protected function _uninstallResourceDb($version) } /** - * Run module modification sql + * Run module modification files. Return version of last applied upgrade (false if no upgrades applied) * * @param string $actionType install|upgrade|uninstall * @param string $fromVersion * @param string $toVersion - * @return bool + * @return string | false */ protected function _modifyResourceDb($actionType, $fromVersion, $toVersion) @@ -226,8 +307,7 @@ protected function _modifyResourceDb($actionType, $fromVersion, $toVersion) $sqlFilesDir = Mage::getModuleDir('sql', $modName).DS.$this->_resourceName; if (!is_dir($sqlFilesDir) || !is_readable($sqlFilesDir)) { - Mage::getResourceModel('core/resource')->setDbVersion($this->_resourceName, $toVersion); - return $toVersion; + return false; } // Read resource files $arrAvailableFiles = array(); @@ -240,22 +320,19 @@ protected function _modifyResourceDb($actionType, $fromVersion, $toVersion) } $sqlDir->close(); if (empty($arrAvailableFiles)) { - Mage::getResourceModel('core/resource')->setDbVersion($this->_resourceName, $toVersion); - return $toVersion; + return false; } // Get SQL files name $arrModifyFiles = $this->_getModifySqlFiles($actionType, $fromVersion, $toVersion, $arrAvailableFiles); if (empty($arrModifyFiles)) { - Mage::getResourceModel('core/resource')->setDbVersion($this->_resourceName, $toVersion); - return $toVersion; + return false; } - $modifyVersion = null; + $modifyVersion = false; foreach ($arrModifyFiles as $resourceFile) { $sqlFile = $sqlFilesDir.DS.$resourceFile['fileName']; $fileType = pathinfo($resourceFile['fileName'], PATHINFO_EXTENSION); - // Execute SQL if ($this->_conn) { try { @@ -268,50 +345,29 @@ protected function _modifyResourceDb($actionType, $fromVersion, $toVersion) $result = true; } break; - case 'php': $conn = $this->_conn; - /** - * useful variables: - * - $conn: setup db connection - * - $sqlFilesDir: root dir for sql update files - */ - try { - #$conn->beginTransaction(); - $result = include($sqlFile); - #$conn->commit(); - } catch (Exception $e) { - #$conn->rollback(); - throw ($e); - } + $result = include($sqlFile); break; - default: $result = false; } if ($result) { - /*$this->run("replace into ".$this->getTable('core/resource')." (code, version) values ('".$this->_resourceName."', '".$resourceFile['toVersion']."')");*/ - Mage::getResourceModel('core/resource')->setDbVersion($this->_resourceName, $resourceFile['toVersion']); + if (strpos($actionType, 'data-') !== false) { + $this->_getResource()->setDataVersion($this->_resourceName, $resourceFile['toVersion']); + } else { + $this->_getResource()->setDbVersion($this->_resourceName, $resourceFile['toVersion']); + } } - } - catch (Exception $e){ + } catch (Exception $e){ echo "
".print_r($e,1)."
"; throw Mage::exception('Mage_Core', Mage::helper('core')->__('Error in file: "%s" - %s', $sqlFile, $e->getMessage())); } } - $modifyVersion = $resourceFile['toVersion']; } - - if ($actionType == 'upgrade' && $modifyVersion != $toVersion) { - Mage::getResourceModel('core/resource')->setDbVersion($this->_resourceName, $toVersion); - } - else { - $toVersion = $modifyVersion; - } - self::$_hadUpdates = true; - return $toVersion; + return $modifyVersion; } /** @@ -320,13 +376,13 @@ protected function _modifyResourceDb($actionType, $fromVersion, $toVersion) * @param $actionType * @return array */ - protected function _getModifySqlFiles($actionType, $fromVersion, $toVersion, $arrFiles) { $arrRes = array(); switch ($actionType) { case 'install': + case 'data-install': uksort($arrFiles, 'version_compare'); foreach ($arrFiles as $version => $file) { if (version_compare($version, $toVersion)!==self::VERSION_COMPARE_GREATER) { @@ -336,6 +392,7 @@ protected function _getModifySqlFiles($actionType, $fromVersion, $toVersion, $ar break; case 'upgrade': + case 'data-upgrade': uksort($arrFiles, 'version_compare'); foreach ($arrFiles as $version => $file) { $version_info = explode('-', $version); @@ -515,6 +572,7 @@ public function addConfigField($path, $label, array $data=array(), $default=null public function setConfigData($path, $value, $scope='default', $scopeId=0, $inherit=0) { + $this->_conn->showTableStatus($this->getTable('core/config_data')); // this is a fix for mysql 4.1 $this->_conn->raw_query("replace into ".$this->getTable('core/config_data')." (scope, scope_id, path, value) values ('$scope', $scopeId, '$path', '$value')"); return $this; } @@ -556,7 +614,7 @@ public function endSetup() { $this->_conn->multi_query(" SET SQL_MODE=IFNULL(@OLD_SQL_MODE,''); -SET FOREIGN_KEY_CHECKS=IFNULL(@OLD_FOREIGN_KEY_CHECKS,0); +SET FOREIGN_KEY_CHECKS=IF(@OLD_FOREIGN_KEY_CHECKS=0, 0, 1); "); return $this; } diff --git a/app/code/core/Mage/Core/Model/Resource/Transaction.php b/app/code/core/Mage/Core/Model/Resource/Transaction.php index 848bea9b68..20e7e83713 100644 --- a/app/code/core/Mage/Core/Model/Resource/Transaction.php +++ b/app/code/core/Mage/Core/Model/Resource/Transaction.php @@ -35,39 +35,28 @@ */ class Mage_Core_Model_Resource_Transaction { - /** - * Enter description here... + * Objects which will be involved to transaction * * @var array */ protected $_objects = array(); /** - * Enter description here... + * Transaction objects array with alias key * * @var array */ protected $_objectsByAlias = array(); /** - * Enter description here... + * Callbacks array. * * @var array */ - protected $_resources = array(); - + protected $_beforeCommitCallbacks = array(); /** - * Enter description here... - * - */ - public function __construct() - { - - } - - /** - * Enter description here... + * Begin transaction for all involved object resources * * @return Mage_Core_Model_Resource_Transaction */ @@ -80,7 +69,7 @@ protected function _startTransaction() } /** - * Enter description here... + * Commit transaction for all resources * * @return Mage_Core_Model_Resource_Transaction */ @@ -93,7 +82,7 @@ protected function _commitTransaction() } /** - * Enter description here... + * Rollback transaction * * @return Mage_Core_Model_Resource_Transaction */ @@ -105,6 +94,19 @@ protected function _rollbackTransaction() return $this; } + /** + * Run all configured object callbacks + * + * @return Mage_Core_Model_Resource_Transaction + */ + protected function _runCallbacks() + { + foreach ($this->_beforeCommitCallbacks as $callback) { + call_user_func($callback); + } + return $this; + } + /** * Adding object for using in transaction * @@ -121,6 +123,18 @@ public function addObject(Mage_Core_Model_Abstract $object, $alias='') return $this; } + /** + * Add callback funtion which will be called befor commit transactions + * + * @param callback $callback + * @return Mage_Core_Model_Resource_Transaction + */ + public function addCommitCallback($callback) + { + $this->_beforeCommitCallbacks[] = $callback; + return $this; + } + /** * Initialize objects save transaction * @@ -129,37 +143,31 @@ public function addObject(Mage_Core_Model_Abstract $object, $alias='') public function save() { $this->_startTransaction(); - $commit = true; - $errors = array(); + $error = false; - foreach ($this->_objects as $object) { - try { + try { + foreach ($this->_objects as $object) { $object->save(); } - catch (Exception $e) { - $commit = false; - $errors[] = $e->getMessage(); - } + } catch (Exception $e) { + $error = $e; } - if ($commit) { - $this->_commitTransaction(); + if ($error === false) { + try { + $this->_runCallbacks(); + } catch (Exception $e) { + $error = $e; + } } - else { + + if ($error) { $this->_rollbackTransaction(); - Mage::throwException(join("\n", $errors)); + throw $error; + } else { + $this->_commitTransaction(); } -// try { -// foreach ($this->_objects as $object) { -// $object->save(); -// } -// $this->_commitTransaction(); -// } -// catch (Exception $e) { -// $this->_rollbackTransaction(); -// throw $e; -// } return $this; } @@ -171,15 +179,29 @@ public function save() public function delete() { $this->_startTransaction(); + $error = false; + try { foreach ($this->_objects as $object) { $object->delete(); } - $this->_commitTransaction(); + } catch (Exception $e) { + $error = $e; } - catch (Exception $e) { + + if ($error === false) { + try { + $this->_runCallbacks(); + } catch (Exception $e) { + $error = $e; + } + } + + if ($error) { $this->_rollbackTransaction(); - throw $e; + throw $error; + } else { + $this->_commitTransaction(); } return $this; } diff --git a/app/code/core/Mage/Core/Model/Source/Email/Variables.php b/app/code/core/Mage/Core/Model/Source/Email/Variables.php new file mode 100644 index 0000000000..fe64553ebe --- /dev/null +++ b/app/code/core/Mage/Core/Model/Source/Email/Variables.php @@ -0,0 +1,84 @@ + + */ +class Mage_Core_Model_Source_Email_Variables +{ + protected $_configVariables = array(); + + /** + * Constructor + * + */ + public function __construct() + { + $this->_configVariables = array( + array('value' => Mage_Core_Model_Url::XML_PATH_UNSECURE_URL, 'label' => 'Base Unsecure URL'), + array('value' => Mage_Core_Model_Url::XML_PATH_SECURE_URL, 'label' => 'Base Secure URL'), + array('value' => 'trans_email/ident_general/name', 'label' => 'General Contact Name'), + array('value' => 'trans_email/ident_general/email', 'label' => 'General Contact Email'), + array('value' => 'trans_email/ident_sales/name', 'label' => 'Sales Representative Contact Name'), + array('value' => 'trans_email/ident_sales/email', 'label' => 'Sales Representative Contact Email'), + array('value' => 'trans_email/ident_custom1/name', 'label' => 'Custom1 Contact Name'), + array('value' => 'trans_email/ident_custom1/email', 'label' => 'Custom1 Contact Email'), + array('value' => 'trans_email/ident_custom2/name', 'label' => 'Custom2 Contact Name'), + array('value' => 'trans_email/ident_custom2/email', 'label' => 'Custom2 Contact Email'), + array('value' => 'general/store_information/name', 'label' => 'Store Name'), + array('value' => 'general/store_information/phone', 'label' => 'Store Contact Telephone'), + array('value' => 'general/store_information/address', 'label' => 'Store Contact Address')); + } + + /** + * Retrieve option array of store contact variables + * + * @param boolean $withGroup + * @return array + */ + public function toOptionArray($withGroup = false) + { + $optionArray = array(); + foreach ($this->_configVariables as $variable) { + $optionArray[] = array( + 'value' => '{{config path="' . $variable['value'] . '"}}', + 'label' => Mage::helper('core')->__('%s', $variable['label']) + ); + } + if ($withGroup && $optionArray) { + $optionArray = array( + 'label' => Mage::helper('core')->__('Store Contact Information'), + 'value' => $optionArray + ); + } + return $optionArray; + } +} diff --git a/app/code/core/Mage/Core/Model/Store.php b/app/code/core/Mage/Core/Model/Store.php index 785ba1d102..db226b5f30 100644 --- a/app/code/core/Mage/Core/Model/Store.php +++ b/app/code/core/Mage/Core/Model/Store.php @@ -678,16 +678,19 @@ public function getAvailableCurrencyCodes($skipBaseNotAllowed = false) public function getCurrentCurrency() { $currency = $this->getData('current_currency'); + if (is_null($currency)) { - $currency = Mage::getModel('directory/currency')->load($this->getCurrentCurrencyCode()); - if ($this->getBaseCurrency()->getRate($currency)) { - $this->setData('current_currency', $currency); - } - else { - $this->setData('current_currency', $this->getBaseCurrency()); - $this->setCurrentCurrencyCode($this->getBaseCurrency()->getCode()); + $currency = Mage::getModel('directory/currency')->load($this->getCurrentCurrencyCode()); + $baseCurrency = $this->getBaseCurrency(); + + if (! $baseCurrency->getRate($currency)) { + $currency = $baseCurrency; + $this->setCurrentCurrencyCode($baseCurrency->getCode()); } + + $this->setData('current_currency', $currency); } + return $currency; } diff --git a/app/code/core/Mage/Core/Model/Translate.php b/app/code/core/Mage/Core/Model/Translate.php index d0db6d1628..946ffa43f9 100644 --- a/app/code/core/Mage/Core/Model/Translate.php +++ b/app/code/core/Mage/Core/Model/Translate.php @@ -281,7 +281,7 @@ protected function _loadThemeTranslation($forceReload = false) */ protected function _loadDbTranslation($forceReload = false) { - $arr = $this->getResource()->getTranslationArray(); + $arr = $this->getResource()->getTranslationArray(null, $this->getLocale()); $this->_addData($arr, $this->getConfig(self::CONFIG_KEY_STORE), $forceReload); return $this; } diff --git a/app/code/core/Mage/Core/Model/Translate/Abstract.php b/app/code/core/Mage/Core/Model/Translate/Abstract.php deleted file mode 100644 index 78b2ae7b8b..0000000000 --- a/app/code/core/Mage/Core/Model/Translate/Abstract.php +++ /dev/null @@ -1,25 +0,0 @@ - + */ +class Mage_Core_Model_Variable extends Mage_Core_Model_Abstract +{ + const TYPE_TEXT = 'text'; + const TYPE_HTML = 'html'; + + protected $_storeId = 0; + + /** + * Internal Constructor + */ + protected function _construct() + { + parent::_construct(); + $this->_init('core/variable'); + } + + /** + * Setter + * + * @param integer $storeId + * @return Mage_Core_Model_Variable + */ + public function setStoreId($storeId) + { + $this->_storeId = $storeId; + return $this; + } + + /** + * Getter + * + * @return integer + */ + public function getStoreId() + { + return $this->_storeId; + } + + /** + * Load variable by code + * + * @param string $code + * @return Mage_Core_Model_Variable + */ + public function loadByCode($code) + { + $this->getResource()->loadByCode($this, $code); + return $this; + } + + /** + * Return variable value depend on given type + * + * @param string $type + * @return string + */ + public function getValue($type = null) + { + if ($type === null) { + $type = self::TYPE_HTML; + } + if ($type == self::TYPE_TEXT || !(strlen((string)$this->getData('html_value')))) { + $value = $this->getData('plain_value'); + //escape html if type is html, but html value is not defined + if ($type == self::TYPE_HTML) { + $value = nl2br(Mage::helper('core')->htmlEscape($value)); + } + return $value; + } + return $this->getData('html_value'); + } + + /** + * Validation of object data. Checking for unique variable code + * + * @return boolean | string + */ + public function validate() + { + if ($this->getCode() && $this->getName() && ($this->getHtmlValue() || $this->getUseDefaultValue())) { + $variable = $this->getResource()->getVariableByCode($this->getCode()); + if (!empty($variable) && $variable['variable_id'] != $this->getId()) { + return Mage::helper('core')->__('Variable Code must be unique.'); + } + return true; + } + return Mage::helper('core')->__('Vaidation failed.'); + } + + /** + * Retrieve variables option array + * + * @param boolean $withValues + * @return array + */ + public function getVariablesOptionArray($withGroup = false) + { + /* @var $collection Mage_Core_Model_Mysql4_Variable_Collection */ + $collection = $this->getCollection(); + $variables = array(); + foreach ($collection->toOptionArray() as $variable) { + $variables[] = array( + 'value' => '{{customVar code=' . $variable['value'] . '}}', + 'label' => Mage::helper('core')->__('%s', $variable['label']) + ); + } + if ($withGroup && $variables) { + $variables = array( + 'label' => Mage::helper('core')->__('Custom Variables'), + 'value' => $variables + ); + } + return $variables; + } + +} diff --git a/app/code/core/Mage/Core/Model/Variable/Config.php b/app/code/core/Mage/Core/Model/Variable/Config.php new file mode 100644 index 0000000000..b5526f74d9 --- /dev/null +++ b/app/code/core/Mage/Core/Model/Variable/Config.php @@ -0,0 +1,81 @@ + + */ +class Mage_Core_Model_Variable_Config +{ + /** + * Prepare variable wysiwyg config + * + * @param Varien_Object $config + * @return array + */ + public function getWysiwygPluginSettings($config) + { + $variableConfig = array(); + $onclickParts = array( + 'search' => array('html_id'), + 'subject' => 'MagentovariablePlugin.loadChooser(\''.$this->getVariablesWysiwygActionUrl().'\', \'{{html_id}}\');' + ); + $variableWysiwygPlugin = array(array('name' => 'magentovariable', + 'src' => $this->getWysiwygJsPluginSrc(), + 'options' => array( + 'title' => Mage::helper('adminhtml')->__('Insert Variable...'), + 'url' => $this->getVariablesWysiwygActionUrl(), + 'onclick' => $onclickParts, + 'class' => 'add-variable plugin' + ))); + $configPlugins = $config->getData('plugins'); + $variableConfig['plugins'] = array_merge($configPlugins, $variableWysiwygPlugin); + return $variableConfig; + } + + /** + * Return url to wysiwyg plugin + * + * @return string + */ + public function getWysiwygJsPluginSrc() + { + return Mage::getBaseUrl('js').'mage/adminhtml/wysiwyg/tiny_mce/plugins/magentovariable/editor_plugin.js'; + } + + /** + * Return url of action to get variables + * + * @return string + */ + public function getVariablesWysiwygActionUrl() + { + return Mage::getSingleton('adminhtml/url')->getUrl('*/system_variable/wysiwygPlugin'); + } +} diff --git a/app/code/core/Mage/Core/Model/Variable/Observer.php b/app/code/core/Mage/Core/Model/Variable/Observer.php new file mode 100644 index 0000000000..7cb4ce6e49 --- /dev/null +++ b/app/code/core/Mage/Core/Model/Variable/Observer.php @@ -0,0 +1,49 @@ + + */ +class Mage_Core_Model_Variable_Observer +{ + /** + * Add variable wysiwyg plugin config + * + * @param Varien_Event_Observer $observer + * @return Mage_Core_Model_Variable_Observer + */ + public function prepareWysiwygPluginConfig(Varien_Event_Observer $observer) + { + $config = $observer->getEvent()->getConfig(); + $settings = Mage::getModel('core/variable_config')->getWysiwygPluginSettings($config); + $config->addData($settings); + return $this; + } +} diff --git a/app/code/core/Mage/Core/etc/config.xml b/app/code/core/Mage/Core/etc/config.xml index c6166bfca1..31b1495cda 100644 --- a/app/code/core/Mage/Core/etc/config.xml +++ b/app/code/core/Mage/Core/etc/config.xml @@ -28,7 +28,7 @@ - 0.8.14 + 0.8.22 @@ -42,6 +42,8 @@ core_config_field
core_config_data
core_email_template
+ core_variable
+ core_variable_value
core_translate
core_session
core_layout_update
@@ -128,6 +130,16 @@ + + + + + core/variable_observer + prepareWysiwygPluginConfig + + + + @@ -150,6 +162,10 @@ default default + + 1 + 5 + diff --git a/app/code/core/Mage/Core/etc/system.xml b/app/code/core/Mage/Core/etc/system.xml index c812bff435..dff2383d0b 100644 --- a/app/code/core/Mage/Core/etc/system.xml +++ b/app/code/core/Mage/Core/etc/system.xml @@ -387,6 +387,62 @@ + + + text + 500 + 1 + 1 + 1 + + + + whether to show "All" option in the "Show X Per Page" dropdown + select + adminhtml/system_config_source_yesno + 6 + 1 + 1 + 1 + + + + How many Links to display at once + text + 7 + 1 + 1 + 1 + + + + If the Current Frame Position does not cover Utmost Pages, will render Link to Current Position plus/minus this Value + text + 8 + 1 + 1 + 1 + + + + Alternative text for Previous link in pagination menu. If empty, default arrow image will used + text + 9 + 1 + 1 + 1 + + + + Alternative text for Next Link in pagination menu. If empty, default arrow image will used + text + 10 + 1 + 1 + 1 + + + @@ -634,6 +690,40 @@ + + + text + 100 + 1 + 1 + 1 + + + + text + 10 + 1 + 1 + 1 + + + + text + 20 + 1 + 1 + 1 + +
+ + textarea + 30 + 1 + 1 + 1 +
+
+
@@ -711,12 +801,23 @@ select - adminhtml/system_config_source_yesno + adminhtml/system_config_source_yesnocustom 70 1 0 0 + + + text + adminhtml/system_config_backend_email_address + validate-email + 80 + 1 + 0 + 0 + 2 + @@ -825,6 +926,15 @@ 0 0 + + + select + adminhtml/system_config_source_yesno + 1 + 1 + 0 + 0 + Values less than 60 are ignored. Please note, that changes will apply after logout. diff --git a/app/code/core/Mage/Core/sql/core_setup/mysql4-upgrade-0.8.14-0.8.15.php b/app/code/core/Mage/Core/sql/core_setup/mysql4-upgrade-0.8.14-0.8.15.php new file mode 100644 index 0000000000..ef6e95420c --- /dev/null +++ b/app/code/core/Mage/Core/sql/core_setup/mysql4-upgrade-0.8.14-0.8.15.php @@ -0,0 +1,33 @@ +startSetup(); +$installer->getConnection()->addColumn($installer->getTable('core/email_template'), 'orig_template_code', "VARCHAR(200) DEFAULT NULL"); +$installer->endSetup(); diff --git a/app/code/core/Mage/Core/sql/core_setup/mysql4-upgrade-0.8.15-0.8.16.php b/app/code/core/Mage/Core/sql/core_setup/mysql4-upgrade-0.8.15-0.8.16.php new file mode 100644 index 0000000000..ca49a3cb94 --- /dev/null +++ b/app/code/core/Mage/Core/sql/core_setup/mysql4-upgrade-0.8.15-0.8.16.php @@ -0,0 +1,33 @@ +startSetup(); +$installer->getConnection()->addColumn( + $installer->getTable('core_email_template'), 'template_styles', "text AFTER `template_text`" +); +$installer->endSetup(); diff --git a/app/code/core/Mage/Core/sql/core_setup/mysql4-upgrade-0.8.16-0.8.17.php b/app/code/core/Mage/Core/sql/core_setup/mysql4-upgrade-0.8.16-0.8.17.php new file mode 100644 index 0000000000..32452189cd --- /dev/null +++ b/app/code/core/Mage/Core/sql/core_setup/mysql4-upgrade-0.8.16-0.8.17.php @@ -0,0 +1,54 @@ +startSetup(); +$installer->run(" +CREATE TABLE IF NOT EXISTS `{$installer->getTable('core_email_variable')}` ( + `variable_id` int(11) unsigned NOT NULL AUTO_INCREMENT, + `code` varchar(255) NOT NULL DEFAULT '', + `name` varchar(255) CHARACTER SET utf8 NOT NULL DEFAULT '', + PRIMARY KEY (`variable_id`), + UNIQUE KEY `IDX_CODE` (`code`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + +CREATE TABLE IF NOT EXISTS `{$installer->getTable('core_email_variable_value')}` ( + `value_id` int(11) unsigned NOT NULL AUTO_INCREMENT, + `variable_id` int(11) unsigned NOT NULL DEFAULT '0', + `store_id` smallint(5) unsigned NOT NULL DEFAULT '0', + `value` varchar(255) NOT NULL DEFAULT '', + PRIMARY KEY (`value_id`), + UNIQUE KEY `IDX_VARIABLE_STORE` (`variable_id`,`store_id`), + KEY `IDX_VARIABLE_ID` (`variable_id`), + KEY `IDX_STORE_ID` (`store_id`), + CONSTRAINT `FK_CORE_EMAIL_VARIABLE_VALUE_STORE_ID` FOREIGN KEY (`store_id`) REFERENCES `{$installer->getTable('core/store')}` (`store_id`) ON DELETE CASCADE ON UPDATE CASCADE, + CONSTRAINT `FK_CORE_EMAIL_VARIABLE_VALUE_VARIABLE_ID` FOREIGN KEY (`variable_id`) REFERENCES `{$installer->getTable('core_email_variable')}` (`variable_id`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8 +"); +$installer->getConnection()->addColumn($installer->getTable('core/email_template'), 'orig_template_variables', "text NOT NULL"); +$installer->endSetup(); diff --git a/app/code/core/Mage/Core/sql/core_setup/mysql4-upgrade-0.8.17-0.8.18.php b/app/code/core/Mage/Core/sql/core_setup/mysql4-upgrade-0.8.17-0.8.18.php new file mode 100644 index 0000000000..b77186ea4d --- /dev/null +++ b/app/code/core/Mage/Core/sql/core_setup/mysql4-upgrade-0.8.17-0.8.18.php @@ -0,0 +1,35 @@ +startSetup(); +$installer->getConnection()->addColumn($installer->getTable('core_email_variable'), + 'is_html', "tinyint(1) NOT NULL DEFAULT '0'"); +$installer->getConnection()->changeColumn($installer->getTable('core_email_variable_value'), + 'value', 'value', 'TEXT NOT NULL'); +$installer->endSetup(); diff --git a/app/code/core/Mage/Core/sql/core_setup/mysql4-upgrade-0.8.18-0.8.19.php b/app/code/core/Mage/Core/sql/core_setup/mysql4-upgrade-0.8.18-0.8.19.php new file mode 100644 index 0000000000..83b9cf0e47 --- /dev/null +++ b/app/code/core/Mage/Core/sql/core_setup/mysql4-upgrade-0.8.18-0.8.19.php @@ -0,0 +1,44 @@ +startSetup(); +$installer->run(" + ALTER TABLE `{$installer->getTable('core_email_variable')}` RENAME TO `{$installer->getTable('core/variable')}`; + ALTER TABLE `{$installer->getTable('core_email_variable_value')}` RENAME TO `{$installer->getTable('core/variable_value')}`; +"); + +$installer->getConnection()->dropForeignKey($installer->getTable('core/variable_value'), 'FK_CORE_EMAIL_VARIABLE_VALUE_STORE_ID'); +$installer->getConnection()->dropForeignKey($installer->getTable('core/variable_value'), 'FK_CORE_EMAIL_VARIABLE_VALUE_VARIABLE_ID'); + +$installer->getConnection()->addConstraint('FK_CORE_VARIABLE_VALUE_STORE_ID', $installer->getTable('core/variable_value'), + 'store_id', $installer->getTable('core/store'), 'store_id'); +$installer->getConnection()->addConstraint('FK_CORE_VARIABLE_VALUE_VARIABLE_ID', $installer->getTable('core/variable_value'), + 'variable_id', $installer->getTable('core/variable'), 'variable_id'); + +$installer->endSetup(); diff --git a/app/code/core/Mage/Core/sql/core_setup/mysql4-upgrade-0.8.19-0.8.20.php b/app/code/core/Mage/Core/sql/core_setup/mysql4-upgrade-0.8.19-0.8.20.php new file mode 100644 index 0000000000..f670538511 --- /dev/null +++ b/app/code/core/Mage/Core/sql/core_setup/mysql4-upgrade-0.8.19-0.8.20.php @@ -0,0 +1,59 @@ +startSetup(); + +$installer->getConnection()->addColumn($installer->getTable('core/variable_value'), 'plain_value', 'TEXT NOT NULL'); +$installer->getConnection()->addColumn($installer->getTable('core/variable_value'), 'html_value', 'TEXT NOT NULL'); + +$select = $installer->getConnection()->select() + ->from(array('main_table' => $installer->getTable('core/variable')), array()) + ->join(array('value_table' => $installer->getTable('core/variable_value')), + 'value_table.variable_id = main_table.variable_id', array()) + ->columns(array('main_table.variable_id', 'main_table.is_html', 'value_table.value')); + +$data = array(); +foreach ($installer->getConnection()->fetchAll($select) as $row) { + if ($row['is_html']) { + $value = array('html_value' => $row['value']); + } else { + $value = array('plain_value' => $row['value']); + } + $data[$row['variable_id']] = $value; +} + +foreach ($data as $variableId => $value) { + $installer->getConnection()->update($installer->getTable('core/variable_value'), $value, + array('variable_id = ?' => $variableId)); +} + +$installer->getConnection()->dropColumn($installer->getTable('core/variable'), 'is_html'); +$installer->getConnection()->dropColumn($installer->getTable('core/variable_value'), 'value'); + +$installer->endSetup(); diff --git a/app/code/core/Mage/Core/sql/core_setup/mysql4-upgrade-0.8.20-0.8.21.php b/app/code/core/Mage/Core/sql/core_setup/mysql4-upgrade-0.8.20-0.8.21.php new file mode 100644 index 0000000000..42bf240a45 --- /dev/null +++ b/app/code/core/Mage/Core/sql/core_setup/mysql4-upgrade-0.8.20-0.8.21.php @@ -0,0 +1,31 @@ +getConnection()->addColumn($installer->getTable('core/resource'), 'data_version', 'varchar(50)'); + + diff --git a/app/code/core/Mage/Core/sql/core_setup/mysql4-upgrade-0.8.21-0.8.22.php b/app/code/core/Mage/Core/sql/core_setup/mysql4-upgrade-0.8.21-0.8.22.php new file mode 100644 index 0000000000..5e67ebcca7 --- /dev/null +++ b/app/code/core/Mage/Core/sql/core_setup/mysql4-upgrade-0.8.21-0.8.22.php @@ -0,0 +1,56 @@ +run(" +CREATE TABLE IF NOT EXISTS `{$installer->getTable('core/cache')}` ( + `id` VARCHAR(255) NOT NULL, + `data` mediumblob, + `create_time` int(11), + `update_time` int(11), + `expire_time` int(11), + PRIMARY KEY (`id`), + KEY `IDX_EXPIRE_TIME` (`expire_time`) +)ENGINE=InnoDB DEFAULT CHARSET=utf8; + +CREATE TABLE IF NOT EXISTS `{$installer->getTable('core/cache_tag')}` ( + `tag` VARCHAR(255) NOT NULL, + `cache_id` VARCHAR(255) NOT NULL, + KEY `IDX_TAG` (`tag`), + KEY `IDX_CACHE_ID` (`cache_id`), + CONSTRAINT `FK_CORE_CACHE_TAG` FOREIGN KEY (`cache_id`) REFERENCES `{$installer->getTable('core/cache')}` (`id`) + ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + + +CREATE TABLE IF NOT EXISTS `{$installer->getTable('core/cache_option')}` ( + `code` VARCHAR(32) NOT NULL, + `value` tinyint(3), + PRIMARY KEY (`code`) +)ENGINE=InnoDB DEFAULT CHARSET=utf8; + +"); diff --git a/app/code/core/Mage/Customer/Block/Account/Dashboard/Address.php b/app/code/core/Mage/Customer/Block/Account/Dashboard/Address.php index cf6e728cb0..17519b9c93 100644 --- a/app/code/core/Mage/Customer/Block/Account/Dashboard/Address.php +++ b/app/code/core/Mage/Customer/Block/Account/Dashboard/Address.php @@ -46,7 +46,7 @@ public function getPrimaryShippingAddressHtml() if( $address instanceof Varien_Object ) { return $address->format('html'); } else { - return Mage::helper('customer')->__('You have not set a primary shipping address.'); + return Mage::helper('customer')->__('You have not set a default shipping address.'); } } @@ -57,7 +57,7 @@ public function getPrimaryBillingAddressHtml() if( $address instanceof Varien_Object ) { return $address->format('html'); } else { - return Mage::helper('customer')->__('You have not set a primary billing address.'); + return Mage::helper('customer')->__('You have not set a default billing address.'); } } diff --git a/app/code/core/Mage/Customer/Block/Address/Renderer/Default.php b/app/code/core/Mage/Customer/Block/Address/Renderer/Default.php index 76be84430a..e61cec80f2 100644 --- a/app/code/core/Mage/Customer/Block/Address/Renderer/Default.php +++ b/app/code/core/Mage/Customer/Block/Address/Renderer/Default.php @@ -86,7 +86,11 @@ public function render(Mage_Customer_Model_Address_Abstract $address, $format=nu $data = $address->getData(); if ($this->getType()->getHtmlEscape()) { foreach ($data as $key => $value) { - $data[$key] = $this->htmlEscape($value); + if (is_object($value)) { + unset($data[$key]); + } else { + $data[$key] = $this->htmlEscape($value); + } } } $formater->setVariables(array_merge($data, array('country'=>$address->getCountryModel()->getName()))); diff --git a/app/code/core/Mage/Customer/Model/Customer.php b/app/code/core/Mage/Customer/Model/Customer.php index c5597107b8..55d147b213 100644 --- a/app/code/core/Mage/Customer/Model/Customer.php +++ b/app/code/core/Mage/Customer/Model/Customer.php @@ -67,7 +67,6 @@ class Mage_Customer_Model_Customer extends Mage_Core_Model_Abstract */ protected $_isReadonly = false; - private static $_isConfirmationRequired; function _construct() @@ -78,7 +77,7 @@ function _construct() /** * Retrieve customer sharing configuration model * - * @return unknown + * @return Mage_Customer_Model_Config_Share */ public function getSharingConfig() { @@ -250,6 +249,12 @@ public function getAttributes() return $this->_attributes; } + /** + * Get customer attribute model object + * + * @param string $attributeCode + * @return Mage_Customer_Model_Entity_Attribute || null + */ public function getAttribute($attributeCode) { $this->getAttributes(); @@ -273,7 +278,7 @@ public function setPassword($password) } /** - * Hach customer password + * Hash customer password * * @param string $password * @return string @@ -332,10 +337,10 @@ public function decryptPassword($password) } /** - * Retrieve primary address by type(attribute) + * Retrieve default address by type(attribute) * - * @param string $attributeCode - * @return Mage_Customer_Mode_Address + * @param string $attributeCode address type attribute code + * @return Mage_Customer_Model_Address */ public function getPrimaryAddress($attributeCode) { @@ -352,37 +357,47 @@ public function getPrimaryAddress($attributeCode) } /** - * Retrieve customer primary billing address + * Get customer default billing address * - * @return Mage_Customer_Mode_Address + * @return Mage_Customer_Model_Address */ public function getPrimaryBillingAddress() { return $this->getPrimaryAddress('default_billing'); } + /** + * Get customer default billing address + * + * @return Mage_Customer_Model_Address + */ public function getDefaultBillingAddress() { return $this->getPrimaryBillingAddress(); } /** - * Retrieve primary customer shipping address + * Get default customer shipping address * - * @return Mage_Customer_Mode_Address + * @return Mage_Customer_Model_Address */ public function getPrimaryShippingAddress() { return $this->getPrimaryAddress('default_shipping'); } + /** + * Get default customer shipping address + * + * @return Mage_Customer_Model_Address + */ public function getDefaultShippingAddress() { return $this->getPrimaryShippingAddress(); } /** - * Retrieve ids of primary addresses + * Retrieve ids of default addresses * * @return unknown */ @@ -399,7 +414,7 @@ public function getPrimaryAddressIds() } /** - * Retrieve all customer primary addresses + * Retrieve all customer default addresses * * @return array */ @@ -426,7 +441,7 @@ public function getPrimaryAddresses() } /** - * Retrieve not primary addresses + * Retrieve not default addresses * * @return array */ diff --git a/app/code/core/Mage/Customer/Model/Entity/Customer.php b/app/code/core/Mage/Customer/Model/Entity/Customer.php index cd295de22e..d7c5c5502e 100644 --- a/app/code/core/Mage/Customer/Model/Entity/Customer.php +++ b/app/code/core/Mage/Customer/Model/Entity/Customer.php @@ -131,28 +131,27 @@ protected function _afterSave(Varien_Object $customer) */ protected function _saveAddresses(Mage_Customer_Model_Customer $customer) { + $defaultBillingId = $customer->getData('default_billing'); + $defaultShippingId = $customer->getData('default_shipping'); foreach ($customer->getAddresses() as $address) { if ($address->getData('_deleted')) { - if ($address->getId() == $customer->getData('default_billing')) { + if ($address->getId() == $defaultBillingId) { $customer->setData('default_billing', null); } - if ($address->getId() == $customer->getData('default_shipping')) { + if ($address->getId() == $defaultShippingId) { $customer->setData('default_shipping', null); } $address->delete(); - } - else { + } else { $address->setParentId($customer->getId()) ->setStoreId($customer->getStoreId()) ->save(); - if ($address->getIsPrimaryBilling() - && $address->getId() != $customer->getData('default_billing')) - { + if (($address->getIsPrimaryBilling() || $address->getIsDefaultBilling()) + && $address->getId() != $defaultBillingId) { $customer->setData('default_billing', $address->getId()); } - if ($address->getIsPrimaryShipping() - && $address->getId() != $customer->getData('default_shipping')) - { + if (($address->getIsPrimaryShipping() || $address->getIsDefaultShipping()) + && $address->getId() != $defaultShippingId) { $customer->setData('default_shipping', $address->getId()); } } 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 c1471fe319..6ace7f093a 100644 --- a/app/code/core/Mage/Customer/Model/Entity/Customer/Collection.php +++ b/app/code/core/Mage/Customer/Model/Entity/Customer/Collection.php @@ -84,7 +84,7 @@ public function getSelectCountSql() $countSelect->reset(Zend_Db_Select::LIMIT_OFFSET); $countSelect->reset(Zend_Db_Select::COLUMNS); - $countSelect->from('', 'COUNT(*)'); + $countSelect->columns('COUNT(*)'); $countSelect->resetJoinLeft(); return $countSelect; diff --git a/app/code/core/Mage/Customer/Model/Group.php b/app/code/core/Mage/Customer/Model/Group.php index 8e1028af7c..72dea6db23 100644 --- a/app/code/core/Mage/Customer/Model/Group.php +++ b/app/code/core/Mage/Customer/Model/Group.php @@ -108,9 +108,9 @@ public function usesAsDefault() * * @return Mage_Customer_Model_Group */ - protected function _afterSaveCommit() + public function afterCommitCallback() { - parent::_afterSaveCommit(); + parent::afterCommitCallback(); Mage::getSingleton('index/indexer')->processEntityAction( $this, self::ENTITY, Mage_Index_Model_Event::TYPE_SAVE ); diff --git a/app/code/core/Mage/Customer/Model/Session.php b/app/code/core/Mage/Customer/Model/Session.php index 4847f7da68..40d9888149 100644 --- a/app/code/core/Mage/Customer/Model/Session.php +++ b/app/code/core/Mage/Customer/Model/Session.php @@ -33,8 +33,20 @@ */ class Mage_Customer_Model_Session extends Mage_Core_Model_Session_Abstract { + /** + * Customer object + * + * @var Mage_Customer_Model_Customer + */ protected $_customer; + /** + * Flag with customer id validations result + * + * @var bool + */ + protected $_isCustomerIdChecked = null; + /** * Retrieve customer sharing configuration model * @@ -110,7 +122,10 @@ public function getCustomer() */ public function getCustomerId() { - return $this->getId(); + if ($this->isLoggedIn()) { + return $this->getId(); + } + return null; } /** @@ -146,8 +161,10 @@ public function isLoggedIn() */ public function checkCustomerId($customerId) { - return Mage::getResourceSingleton('customer/customer') - ->checkCustomerId($customerId); + if ($this->_isCustomerIdChecked === null) { + $this->_isCustomerIdChecked = Mage::getResourceSingleton('customer/customer')->checkCustomerId($customerId); + } + return $this->_isCustomerIdChecked; } /** @@ -163,8 +180,7 @@ public function login($username, $password) ->setWebsiteId(Mage::app()->getStore()->getWebsiteId()); if ($customer->authenticate($username, $password)) { - $this->setCustomer($customer); - Mage::dispatchEvent('customer_login', array('customer'=>$customer)); + $this->setCustomerAsLoggedIn($customer); return true; } return false; @@ -186,9 +202,8 @@ public function setCustomerAsLoggedIn($customer) public function loginById($customerId) { $customer = Mage::getModel('customer/customer')->load($customerId); - if ($customer) { - $this->setCustomer($customer); - Mage::dispatchEvent('customer_login', array('customer'=>$customer)); + if ($customer->getId()) { + $this->setCustomerAsLoggedIn($customer); return true; } return false; diff --git a/app/code/core/Mage/Customer/controllers/AccountController.php b/app/code/core/Mage/Customer/controllers/AccountController.php index fd6e5b9460..2a13e3f8cd 100644 --- a/app/code/core/Mage/Customer/controllers/AccountController.php +++ b/app/code/core/Mage/Customer/controllers/AccountController.php @@ -140,9 +140,7 @@ public function loginPostAction() } catch (Mage_Core_Exception $e) { switch ($e->getCode()) { case Mage_Customer_Model_Customer::EXCEPTION_EMAIL_NOT_CONFIRMED: - $message = Mage::helper('customer')->__('This account is not confirmed. Click here to resend confirmation email.', - Mage::helper('customer')->getEmailConfirmationUrl($login['username']) - ); + $message = Mage::helper('customer')->__('This account is not confirmed. Click here to resend confirmation email.', Mage::helper('customer')->getEmailConfirmationUrl($login['username'])); break; case Mage_Customer_Model_Customer::EXCEPTION_INVALID_EMAIL_OR_PASSWORD: $message = $e->getMessage(); @@ -293,9 +291,7 @@ public function createPostAction() if ($customer->isConfirmationRequired()) { $customer->sendNewAccountEmail('confirmation', $session->getBeforeAuthUrl()); - $session->addSuccess($this->__('Account confirmation is required. Please, check your e-mail for confirmation link. To resend confirmation email please click here.', - Mage::helper('customer')->getEmailConfirmationUrl($customer->getEmail()) - )); + $session->addSuccess($this->__('Account confirmation is required. Please, check your e-mail for confirmation link. To resend confirmation email please click here.', Mage::helper('customer')->getEmailConfirmationUrl($customer->getEmail()))); $this->_redirectSuccess(Mage::getUrl('*/*/index', array('_secure'=>true))); return; } diff --git a/app/code/core/Mage/Customer/etc/wsdl.xml b/app/code/core/Mage/Customer/etc/wsdl.xml index 58c4564da9..a02542d8fb 100644 --- a/app/code/core/Mage/Customer/etc/wsdl.xml +++ b/app/code/core/Mage/Customer/etc/wsdl.xml @@ -344,4 +344,4 @@ - \ No newline at end of file + diff --git a/app/code/core/Mage/Customer/sql/customer_setup/mysql4-upgrade-0.7.0-0.7.1.php b/app/code/core/Mage/Customer/sql/customer_setup/mysql4-upgrade-0.7.0-0.7.1.php deleted file mode 100644 index e5fc69d2ba..0000000000 --- a/app/code/core/Mage/Customer/sql/customer_setup/mysql4-upgrade-0.7.0-0.7.1.php +++ /dev/null @@ -1,26 +0,0 @@ -setVoidTransactionId($document->getTransactionId()); + $payment->setVoidTransactionId($invoice->getTransactionId()); $payment->setVoidCybersourceToken($invoice->getCybersourceToken()); return $this; } diff --git a/app/code/core/Mage/Dataflow/Model/Batch/Abstract.php b/app/code/core/Mage/Dataflow/Model/Batch/Abstract.php index cecc99d0e7..eda0973ae0 100644 --- a/app/code/core/Mage/Dataflow/Model/Batch/Abstract.php +++ b/app/code/core/Mage/Dataflow/Model/Batch/Abstract.php @@ -43,17 +43,14 @@ abstract class Mage_Dataflow_Model_Batch_Abstract extends Mage_Core_Model_Abstra */ public function setBatchData($data) { - /** - * need prepare valid utf-8 data - * related with php bug #42588 - */ - foreach ($data as $key=>$value) { - $str = @iconv("utf-8", "utf-8//IGNORE", $value); - if ($str) { - $data[$key] = $str; - } + if ('"libiconv"' == ICONV_IMPL) { + foreach ($data as $key => &$value) { + $value = iconv('utf-8', 'utf-8//IGNORE', $value); + } } + $this->setData('batch_data', serialize($data)); + return $this; } diff --git a/app/code/core/Mage/Directory/Block/Currency.php b/app/code/core/Mage/Directory/Block/Currency.php index dedd936ee8..bfe37ba44c 100644 --- a/app/code/core/Mage/Directory/Block/Currency.php +++ b/app/code/core/Mage/Directory/Block/Currency.php @@ -93,11 +93,12 @@ public function getSwitchUrl() */ public function getCurrentCurrencyCode() { - $code = $this->getData('current_currency_code'); - if (is_null($code)) { - $code = Mage::app()->getStore()->getCurrentCurrencyCode(); - $this->setData('current_currency_code', $code); + if (is_null($this->_getData('current_currency_code'))) { + // do not use Mage::app()->getStore()->getCurrentCurrencyCode() because of probability + // to get an invalid (without base rate) currency from code saved in session + $this->setData('current_currency_code', Mage::app()->getStore()->getCurrentCurrency()->getCode()); } - return $code; + + return $this->_getData('current_currency_code'); } } diff --git a/app/code/core/Mage/Directory/Model/Currency.php b/app/code/core/Mage/Directory/Model/Currency.php index c83f59a9e2..32ec1c145c 100644 --- a/app/code/core/Mage/Directory/Model/Currency.php +++ b/app/code/core/Mage/Directory/Model/Currency.php @@ -225,8 +225,11 @@ public function formatTxt($price, $options=array()) } /** * Fix problem with 12 000 000, 1 200 000 + * + * %f - the argument is treated as a float, and presented as a floating-point number (locale aware). + * %F - the argument is treated as a float, and presented as a floating-point number (non-locale aware). */ - $price = sprintf("%f", $price); + $price = sprintf("%F", $price); return Mage::app()->getLocale()->currency($this->getCode())->toCurrency($price, $options); } diff --git a/app/code/core/Mage/Directory/etc/config.xml b/app/code/core/Mage/Directory/etc/config.xml index 8b7396b933..1388284ebb 100644 --- a/app/code/core/Mage/Directory/etc/config.xml +++ b/app/code/core/Mage/Directory/etc/config.xml @@ -28,7 +28,7 @@ - 0.8.7 + 0.8.10 @@ -132,7 +132,7 @@ - AZN,AZM,AFN,ALL,DZD,AOA,ARS,AMD,AWG,AUD,BSD,BHD,BDT,BBD,BYR,BZD,BMD,BTN,BOB,BAM,BWP,BRL,GBP,BND,BGN,BUK,BIF,KHR,CAD,CVE,CZK,KYD,CLP,CNY,COP,KMF,CDF,CRC,HRK,CUP,DKK,DJF,DOP,XCD,EGP,SVC,GQE,ERN,EEK,ETB,EUR,FKP,FJD,GMD,GEK,GHS,GIP,GTQ,GNF,GYD,HTG,HNL,HKD,HUF,ISK,INR,IDR,IRR,IQD,ILS,JMD,JPY,JOD,KZT,KES,KWD,KGS,LAK,LVL,LBP,LSL,LRD,LYD,LTL,MOP,MKD,MGA,MWK,MYR,MVR,LSM,MRO,MUR,MXN,MDL,MNT,MAD,MZN,MMK,NAD,NPR,ANG,TRL,TRY,NZD,NIC,NGN,KPW,NOK,OMR,PKR,PAB,PGK,PYG,PEN,PHP,PLN,QAR,RHD,RON,ROL,RUB,RWF,SHP,STD,SAR,RSD,SCR,SLL,SGD,SKK,SBD,SOS,ZAR,KRW,LKR,SDG,SRD,SZL,SEK,CHF,SYP,TWD,TJS,TZS,THB,TOP,TTD,TND,TMM,USD,UGX,UAH,AED,UYU,UZS,VUV,VEB,VND,CHE,CHW,XOF,XPF,WST,YER,ZMK,ZWD + AZN,AZM,AFN,ALL,DZD,AOA,ARS,AMD,AWG,AUD,BSD,BHD,BDT,BBD,BYR,BZD,BMD,BTN,BOB,BAM,BWP,BRL,GBP,BND,BGN,BUK,BIF,KHR,CAD,CVE,CZK,KYD,CLP,CNY,COP,KMF,CDF,CRC,HRK,CUP,DKK,DJF,DOP,XCD,EGP,SVC,GQE,ERN,EEK,ETB,EUR,FKP,FJD,GMD,GEK,GEL,GHS,GIP,GTQ,GNF,GYD,HTG,HNL,HKD,HUF,ISK,INR,IDR,IRR,IQD,ILS,JMD,JPY,JOD,KZT,KES,KWD,KGS,LAK,LVL,LBP,LSL,LRD,LYD,LTL,MOP,MKD,MGA,MWK,MYR,MVR,LSM,MRO,MUR,MXN,MDL,MNT,MAD,MZN,MMK,NAD,NPR,ANG,TRL,TRY,NZD,NIC,NGN,KPW,NOK,OMR,PKR,PAB,PGK,PYG,PEN,PHP,PLN,QAR,RHD,RON,ROL,RUB,RWF,SHP,STD,SAR,RSD,SCR,SLL,SGD,SKK,SBD,SOS,ZAR,KRW,LKR,SDG,SRD,SZL,SEK,CHF,SYP,TWD,TJS,TZS,THB,TOP,TTD,TND,TMM,USD,UGX,UAH,AED,UYU,UZS,VUV,VEB,VEF,VND,CHE,CHW,XOF,XPF,WST,YER,ZMK,ZWD @@ -155,7 +155,7 @@ - AF,AL,DZ,AS,AD,AO,AI,AQ,AG,AR,AM,AW,AU,AT,AZ,BS,BH,BD,BB,BY,BE,BZ,BJ,BM,BT,BO,BA,BW,BV,BR,IO,VG,BN,BG,BF,BI,KH,CM,CA,CV,KY,CF,TD,CL,CN,CX,CC,CO,KM,CG,CK,CR,HR,CU,CY,CZ,DK,DJ,DM,DO,EC,EG,SV,GQ,ER,EE,ET,FK,FO,FJ,FI,FR,GF,PF,TF,GA,GM,GE,DE,GH,GI,GR,GL,GD,GP,GU,GT,GN,GW,GY,HT,HM,HN,HK,HU,IS,IN,ID,IR,IQ,IE,IL,IT,CI,JM,JP,JO,KZ,KE,KI,KW,KG,LA,LV,LB,LS,LR,LY,LI,LT,LU,MO,MK,MG,MW,MY,MV,ML,MT,MH,MQ,MR,MU,YT,FX,MX,FM,MD,MC,MN,MS,MA,MZ,MM,NA,NR,NP,NL,AN,NC,NZ,NI,NE,NG,NU,NF,KP,MP,NO,OM,PK,PW,PA,PG,PY,PE,PH,PN,PL,PT,PR,QA,RE,RO,RU,RW,SH,KN,LC,PM,VC,WS,SM,ST,SA,SN,SC,SL,SG,SK,SI,SB,SO,ZA,GS,KR,ES,LK,SD,SR,SJ,SZ,SE,CH,SY,TW,TJ,TZ,TH,TG,TK,TO,TT,TN,TR,TM,TC,TV,VI,UG,UA,AE,GB,US,UM,UY,UZ,VU,VA,VE,VN,WF,EH,YE,ZM,ZW + AF,AL,DZ,AS,AD,AO,AI,AQ,AG,AR,AM,AW,AU,AT,AX,AZ,BS,BH,BD,BB,BY,BE,BZ,BJ,BM,BL,BT,BO,BA,BW,BV,BR,IO,VG,BN,BG,BF,BI,KH,CM,CA,CD,CV,KY,CF,TD,CL,CN,CX,CC,CO,KM,CG,CK,CR,HR,CU,CY,CZ,DK,DJ,DM,DO,EC,EG,SV,GQ,ER,EE,ET,FK,FO,FJ,FI,FR,GF,PF,TF,GA,GM,GE,DE,GG,GH,GI,GR,GL,GD,GP,GU,GT,GN,GW,GY,HT,HM,HN,HK,HU,IS,IM,IN,ID,IR,IQ,IE,IL,IT,CI,JE,JM,JP,JO,KZ,KE,KI,KW,KG,LA,LV,LB,LS,LR,LY,LI,LT,LU,ME,MF,MO,MK,MG,MW,MY,MV,ML,MT,MH,MQ,MR,MU,YT,FX,MX,FM,MD,MC,MN,MS,MA,MZ,MM,NA,NR,NP,NL,AN,NC,NZ,NI,NE,NG,NU,NF,KP,MP,NO,OM,PK,PW,PA,PG,PY,PE,PH,PN,PL,PS,PT,PR,QA,RE,RO,RS,RU,RW,SH,KN,LC,PM,VC,WS,SM,ST,SA,SN,SC,SL,SG,SK,SI,SB,SO,ZA,GS,KR,ES,LK,SD,SR,SJ,SZ,SE,CH,SY,TL,TW,TJ,TZ,TH,TG,TK,TO,TT,TN,TR,TM,TC,TV,VI,UG,UA,AE,GB,US,UM,UY,UZ,VU,VA,VE,VN,WF,EH,YE,ZM,ZW US diff --git a/app/code/core/Mage/Directory/etc/wsdl.xml b/app/code/core/Mage/Directory/etc/wsdl.xml index ae6021f176..5ace224293 100644 --- a/app/code/core/Mage/Directory/etc/wsdl.xml +++ b/app/code/core/Mage/Directory/etc/wsdl.xml @@ -87,4 +87,4 @@ - \ No newline at end of file + diff --git a/app/code/core/Mage/Directory/sql/directory_setup/mysql4-upgrade-0.8.7-0.8.8.php b/app/code/core/Mage/Directory/sql/directory_setup/mysql4-upgrade-0.8.7-0.8.8.php new file mode 100644 index 0000000000..03733b0488 --- /dev/null +++ b/app/code/core/Mage/Directory/sql/directory_setup/mysql4-upgrade-0.8.7-0.8.8.php @@ -0,0 +1,47 @@ +startSetup(); + +//Entries for 'Newfoundland' should be corrected because of the province changed its name and code + +$installer->run(" + UPDATE {$installer->getTable('directory/country_region')} + SET code = 'NL', default_name = 'Newfoundland and Labrador' + WHERE region_id = 69 +"); + +$installer->run(" + UPDATE {$installer->getTable('directory/country_region_name')} + SET `name` = 'Newfoundland and Labrador' + WHERE `region_id` = 69 AND `name` = 'Newfoundland' +"); + +$installer->endSetup(); diff --git a/app/code/core/Mage/Directory/sql/directory_setup/mysql4-upgrade-0.8.8-0.8.9.php b/app/code/core/Mage/Directory/sql/directory_setup/mysql4-upgrade-0.8.8-0.8.9.php new file mode 100644 index 0000000000..232f84f61d --- /dev/null +++ b/app/code/core/Mage/Directory/sql/directory_setup/mysql4-upgrade-0.8.8-0.8.9.php @@ -0,0 +1,59 @@ +getConnection(); +$regionTable = $installer->getTable('directory/country_region'); + +$regionsToIns = array( + array('RO', 'AB', 'Alba'), array('RO', 'AR', 'Arad'), array('RO', 'AG', 'Argeş'), + array('RO', 'BC', 'Bacău'), array('RO', 'BH', 'Bihor'), array('RO', 'BN', 'Bistriţa-Năsăud'), + array('RO', 'BT', 'Botoşani'), array('RO', 'BV', 'Braşov'), array('RO', 'BR', 'Brăila'), + array('RO', 'B', 'Bucureşti'), array('RO', 'BZ', 'Buzău'), array('RO', 'CS', 'Caraş-Severin'), + array('RO', 'CL', 'Călăraşi'), array('RO', 'CJ', 'Cluj'), array('RO', 'CT', 'Constanţa'), + array('RO', 'CV', 'Covasna'), array('RO', 'DB', 'Dâmboviţa'), array('RO', 'DJ', 'Dolj'), + array('RO', 'GL', 'Galaţi'), array('RO', 'GR', 'Giurgiu'), array('RO', 'GJ', 'Gorj'), + array('RO', 'HR', 'Harghita'), array('RO', 'HD', 'Hunedoara'), array('RO', 'IL', 'Ialomiţa'), + array('RO', 'IS', 'Iaşi'), array('RO', 'IF', 'Ilfov'), array('RO', 'MM', 'Maramureş'), + array('RO', 'MH', 'Mehedinţi'), array('RO', 'MS', 'Mureş'), array('RO', 'NT', 'Neamţ'), + array('RO', 'OT', 'Olt'), array('RO', 'PH', 'Prahova'), array('RO', 'SM', 'Satu-Mare'), + array('RO', 'SJ', 'Sălaj'), array('RO', 'SB', 'Sibiu'), array('RO', 'SV', 'Suceava'), + array('RO', 'TR', 'Teleorman'), array('RO', 'TM', 'Timiş'), array('RO', 'TL', 'Tulcea'), + array('RO', 'VS', 'Vaslui'), array('RO', 'VL', 'Vâlcea'), array('RO', 'VN', 'Vrancea') +); + +foreach ($regionsToIns as $row) { + if (! ($connection->fetchOne("SELECT 1 FROM `{$regionTable}` WHERE `country_id` = :country_id && `code` = :code", array('country_id' => $row[0], 'code' => $row[1])))) { + $connection->insert($regionTable, array( + 'country_id' => $row[0], + 'code' => $row[1], + 'default_name' => $row[2] + )); + } +} diff --git a/app/code/core/Mage/Directory/sql/directory_setup/mysql4-upgrade-0.8.9-0.8.10.php b/app/code/core/Mage/Directory/sql/directory_setup/mysql4-upgrade-0.8.9-0.8.10.php new file mode 100644 index 0000000000..44c7cbd676 --- /dev/null +++ b/app/code/core/Mage/Directory/sql/directory_setup/mysql4-upgrade-0.8.9-0.8.10.php @@ -0,0 +1,62 @@ +getConnection(); +$regionTable = $installer->getTable('directory/country_region'); +$regNameTable = $installer->getTable('directory/country_region_name'); + +$regionsToIns = array( + array('RO', 'AB', 'Alba'), array('RO', 'AR', 'Arad'), array('RO', 'AG', 'Argeş'), + array('RO', 'BC', 'Bacău'), array('RO', 'BH', 'Bihor'), array('RO', 'BN', 'Bistriţa-Năsăud'), + array('RO', 'BT', 'Botoşani'), array('RO', 'BV', 'Braşov'), array('RO', 'BR', 'Brăila'), + array('RO', 'B', 'Bucureşti'), array('RO', 'BZ', 'Buzău'), array('RO', 'CS', 'Caraş-Severin'), + array('RO', 'CL', 'Călăraşi'), array('RO', 'CJ', 'Cluj'), array('RO', 'CT', 'Constanţa'), + array('RO', 'CV', 'Covasna'), array('RO', 'DB', 'Dâmboviţa'), array('RO', 'DJ', 'Dolj'), + array('RO', 'GL', 'Galaţi'), array('RO', 'GR', 'Giurgiu'), array('RO', 'GJ', 'Gorj'), + array('RO', 'HR', 'Harghita'), array('RO', 'HD', 'Hunedoara'), array('RO', 'IL', 'Ialomiţa'), + array('RO', 'IS', 'Iaşi'), array('RO', 'IF', 'Ilfov'), array('RO', 'MM', 'Maramureş'), + array('RO', 'MH', 'Mehedinţi'), array('RO', 'MS', 'Mureş'), array('RO', 'NT', 'Neamţ'), + array('RO', 'OT', 'Olt'), array('RO', 'PH', 'Prahova'), array('RO', 'SM', 'Satu-Mare'), + array('RO', 'SJ', 'Sălaj'), array('RO', 'SB', 'Sibiu'), array('RO', 'SV', 'Suceava'), + array('RO', 'TR', 'Teleorman'), array('RO', 'TM', 'Timiş'), array('RO', 'TL', 'Tulcea'), + array('RO', 'VS', 'Vaslui'), array('RO', 'VL', 'Vâlcea'), array('RO', 'VN', 'Vrancea') +); + +foreach ($regionsToIns as $row) { + $regionId = $connection->fetchOne("SELECT `region_id` FROM `{$regionTable}` WHERE `country_id` = :country_id && `code` = :code", array('country_id' => $row[0], 'code' => $row[1])); + + if (! $connection->fetchOne("SELECT 1 FROM `{$regNameTable}` WHERE `region_id` = {$regionId}")) { + $connection->insert($regNameTable, array( + 'locale' => 'en_US', + 'region_id' => $regionId, + 'name' => $row[2] + )); + } +} diff --git a/app/code/core/Mage/Downloadable/Model/Observer.php b/app/code/core/Mage/Downloadable/Model/Observer.php index 865079160a..5a15f10063 100644 --- a/app/code/core/Mage/Downloadable/Model/Observer.php +++ b/app/code/core/Mage/Downloadable/Model/Observer.php @@ -158,7 +158,7 @@ public function setLinkStatus($observer) $orderItemStatusToEnable = Mage::getStoreConfig(Mage_Downloadable_Model_Link_Purchased_Item::XML_PATH_ORDER_ITEM_STATUS, $order->getStoreId()); if ($order->getState() == Mage_Sales_Model_Order::STATE_HOLDED) { $status = Mage_Downloadable_Model_Link_Purchased_Item::LINK_STATUS_PENDING; - } elseif ($order->getState() == Mage_Sales_Model_Order::STATE_CANCELED + } elseif ($order->isCanceled() || $order->getState() == Mage_Sales_Model_Order::STATE_CLOSED) { $status = Mage_Downloadable_Model_Link_Purchased_Item::LINK_STATUS_EXPIRED; } elseif ($order->getState() == Mage_Sales_Model_Order::STATE_PENDING_PAYMENT) { diff --git a/app/code/core/Mage/Eav/Model/Entity/Abstract.php b/app/code/core/Mage/Eav/Model/Entity/Abstract.php index 4d0b48e228..d7ed44188a 100644 --- a/app/code/core/Mage/Eav/Model/Entity/Abstract.php +++ b/app/code/core/Mage/Eav/Model/Entity/Abstract.php @@ -39,14 +39,14 @@ abstract class Mage_Eav_Model_Entity_Abstract /** * Read connection * - * @var Zend_Db_Adapter_Abstract + * @var Varien_Db_Adapter_Pdo_Mysql */ protected $_read; /** * Write connection * - * @var Zend_Db_Adapter_Abstract + * @var Varien_Db_Adapter_Pdo_Mysql */ protected $_write; @@ -141,6 +141,20 @@ abstract class Mage_Eav_Model_Entity_Abstract */ protected $_sortingSetId = null; + /** + * Entity attribute values per backend table to delete + * + * @var array + */ + protected $_attributeValuesToDelete = array(); + + /** + * Entity attribute values per backend table to save + * + * @var array + */ + protected $_attributeValuesToSave = array(); + /** * Set connections for entity operations * @@ -166,7 +180,7 @@ protected function _construct() /** * Retrieve connection for read data * - * @return Zend_Db_Adapter_Abstract + * @return Varien_Db_Adapter_Pdo_Mysql */ protected function _getReadAdapter() { @@ -176,7 +190,7 @@ protected function _getReadAdapter() /** * Retrieve connection for write data * - * @return Zend_Db_Adapter_Abstract + * @return Varien_Db_Adapter_Pdo_Mysql */ protected function _getWriteAdapter() { @@ -186,7 +200,7 @@ protected function _getWriteAdapter() /** * Retrieve read DB connection * - * @return Zend_Db_Adapter_Abstract + * @return Varien_Db_Adapter_Pdo_Mysql */ public function getReadConnection() { @@ -196,7 +210,7 @@ public function getReadConnection() /** * Retrieve write DB connection * - * @return Zend_Db_Adapter_Abstract + * @return Varien_Db_Adapter_Pdo_Mysql */ public function getWriteConnection() { @@ -1148,6 +1162,8 @@ protected function _processSaveData($saveData) } } + $this->_processAttributeValues(); + return $this; } @@ -1161,15 +1177,16 @@ protected function _processSaveData($saveData) */ protected function _insertAttribute($object, $attribute, $value) { - $entityIdField = $attribute->getBackend()->getEntityIdField(); - $row = array( - $entityIdField => $object->getId(), - 'entity_type_id'=> $object->getEntityTypeId(), - 'attribute_id' => $attribute->getId(), - 'value' => $this->_prepareValueForSave($value, $attribute), - ); - $this->_getWriteAdapter()->insert($attribute->getBackend()->getTable(), $row); - return $this; + return $this->_saveAttribute($object, $attribute, $value); + +// $row = array( +// $entityIdField => $object->getId(), +// 'entity_type_id'=> $object->getEntityTypeId(), +// 'attribute_id' => $attribute->getId(), +// 'value' => $this->_prepareValueForSave($value, $attribute), +// ); +// $this->_getWriteAdapter()->insert($attribute->getBackend()->getTable(), $row); +// return $this; } /** @@ -1183,10 +1200,65 @@ protected function _insertAttribute($object, $attribute, $value) */ protected function _updateAttribute($object, $attribute, $valueId, $value) { - $this->_getWriteAdapter()->update($attribute->getBackend()->getTable(), - array('value' => $this->_prepareValueForSave($value, $attribute)), - 'value_id='.(int)$valueId + return $this->_saveAttribute($object, $attribute, $value); +// $this->_getWriteAdapter()->update($attribute->getBackend()->getTable(), +// array('value' => $this->_prepareValueForSave($value, $attribute)), +// 'value_id='.(int)$valueId +// ); +// return $this; + } + + /** + * Save entity attribute value + * + * Collect for mass save + * + * @param Mage_Core_Model_Abstract $object + * @param Mage_Eav_Model_Entity_Attribute_Abstract $attribute + * @param mixed $value + * @return Mage_Eav_Model_Entity_Abstract + */ + protected function _saveAttribute($object, $attribute, $value) + { + $table = $attribute->getBackend()->getTable(); + if (!isset($this->_attributeValuesToSave[$table])) { + $this->_attributeValuesToSave[$table] = array(); + } + + $entityIdField = $attribute->getBackend()->getEntityIdField(); + + $data = array( + 'entity_type_id' => $object->getEntityTypeId(), + $entityIdField => $object->getId(), + 'attribute_id' => $attribute->getId(), + 'value' => $this->_prepareValueForSave($value, $attribute) ); + + $this->_attributeValuesToSave[$table][] = $data; + + return $this; + } + + /** + * Save and detele collected attribute values + * + * @return Mage_Eav_Model_Entity_Abstract + */ + protected function _processAttributeValues() + { + $adapter = $this->_getWriteAdapter(); + foreach ($this->_attributeValuesToSave as $table => $data) { + $adapter->insertOnDuplicate($table, $data, array('value')); + } + + foreach ($this->_attributeValuesToDelete as $table => $valueIds) { + $adapter->delete($table, array('value_id IN(?)' => $valueIds)); + } + + // reset data arrays + $this->_attributeValuesToSave = array(); + $this->_attributeValuesToDelete = array(); + return $this; } @@ -1219,11 +1291,24 @@ protected function _deleteAttributes($object, $table, $info) foreach ($info as $itemData) { $valueIds[] = $itemData['value_id']; } - if (!empty($valueIds)) { - $condition = $this->_getWriteAdapter()->quoteInto('value_id IN (?)', $valueIds); - $this->_getWriteAdapter()->delete($table, $condition); + + if (empty($valueIds)) { + return $this; + } + + if (isset($this->_attributeValuesToDelete[$table])) { + $this->_attributeValuesToDelete[$table] = array_merge($this->_attributeValuesToDelete[$table], $valueIds); + } else { + $this->_attributeValuesToDelete[$table] = $valueIds; } + return $this; + +// if (!empty($valueIds)) { +// $condition = $this->_getWriteAdapter()->quoteInto('value_id IN (?)', $valueIds); +// $this->_getWriteAdapter()->delete($table, $condition); +// } +// return $this; } /** @@ -1280,6 +1365,8 @@ public function saveAttribute(Varien_Object $object, $attributeCode) throw $e; } + $this->_processAttributeValues(); + return $this; } 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 cdf387af51..f4309c29c3 100644 --- a/app/code/core/Mage/Eav/Model/Entity/Collection/Abstract.php +++ b/app/code/core/Mage/Eav/Model/Entity/Collection/Abstract.php @@ -459,7 +459,7 @@ public function addExpressionAttributeToSelect($alias, $expression, $attribute) $fullExpression = str_replace('{{' . $attributeItem . '}}', $attrField, $fullExpression); } - $this->getSelect()->from(null, array($alias=>$fullExpression)); + $this->getSelect()->columns(array($alias=>$fullExpression)); $this->_joinFields[$alias] = array( 'table' => false, @@ -821,7 +821,7 @@ protected function _getAllIdsSelect($limit=null, $offset=null) $idsSelect->reset(Zend_Db_Select::LIMIT_COUNT); $idsSelect->reset(Zend_Db_Select::LIMIT_OFFSET); $idsSelect->reset(Zend_Db_Select::COLUMNS); - $idsSelect->from(null, 'e.'.$this->getEntity()->getIdFieldName()); + $idsSelect->columns('e.'.$this->getEntity()->getIdFieldName()); $idsSelect->limit($limit, $offset); return $idsSelect; } @@ -849,7 +849,7 @@ public function getAllIdsSql() $idsSelect->reset(Zend_Db_Select::LIMIT_OFFSET); $idsSelect->reset(Zend_Db_Select::COLUMNS); $idsSelect->reset(Zend_Db_Select::GROUP); - $idsSelect->from(null, 'e.'.$this->getEntity()->getIdFieldName()); + $idsSelect->columns('e.'.$this->getEntity()->getIdFieldName()); return $idsSelect; } diff --git a/app/code/core/Mage/Eav/Model/Entity/Setup.php b/app/code/core/Mage/Eav/Model/Entity/Setup.php index 4dc95a1dfc..5734c0f5a2 100644 --- a/app/code/core/Mage/Eav/Model/Entity/Setup.php +++ b/app/code/core/Mage/Eav/Model/Entity/Setup.php @@ -1070,6 +1070,8 @@ public function installEntities($entities=null) */ public function createEntityTables($baseName, array $options=array()) { + $sql = ''; + if (empty($options['no-main'])) { $sql = " DROP TABLE IF EXISTS `{$baseName}`; diff --git a/app/code/core/Mage/GiftMessage/Block/Message/Form.php b/app/code/core/Mage/GiftMessage/Block/Message/Form.php index f94217f21e..0bf8950a4c 100644 --- a/app/code/core/Mage/GiftMessage/Block/Message/Form.php +++ b/app/code/core/Mage/GiftMessage/Block/Message/Form.php @@ -26,8 +26,8 @@ /** - * Gift Message from block * + * @deprecated after 1.3.2.4 * @category Mage * @package Mage_GiftMessage * @author Magento Core Team diff --git a/app/code/core/Mage/GiftMessage/Block/Message/Helper.php b/app/code/core/Mage/GiftMessage/Block/Message/Helper.php index 5010a0b107..7646799b2b 100644 --- a/app/code/core/Mage/GiftMessage/Block/Message/Helper.php +++ b/app/code/core/Mage/GiftMessage/Block/Message/Helper.php @@ -26,8 +26,8 @@ /** - * Gift Message helper block for another modules * + * @deprecated after 1.3.2.4 * @category Mage * @package Mage_GiftMessage * @author Magento Core Team diff --git a/app/code/core/Mage/GiftMessage/controllers/IndexController.php b/app/code/core/Mage/GiftMessage/controllers/IndexController.php index 87ac4a3140..342d58d658 100644 --- a/app/code/core/Mage/GiftMessage/controllers/IndexController.php +++ b/app/code/core/Mage/GiftMessage/controllers/IndexController.php @@ -26,8 +26,8 @@ /** - * Gift Messages index controller * + * @deprecated after 1.3.2.4 * @category Mage * @package Mage_GiftMessage * @author Magento Core Team diff --git a/app/code/core/Mage/GiftRegistry/Helper/Data.php b/app/code/core/Mage/GiftRegistry/Helper/Data.php deleted file mode 100644 index 8b13789179..0000000000 --- a/app/code/core/Mage/GiftRegistry/Helper/Data.php +++ /dev/null @@ -1 +0,0 @@ - diff --git a/app/code/core/Mage/GoogleBase/Block/Adminhtml/Items/Product.php b/app/code/core/Mage/GoogleBase/Block/Adminhtml/Items/Product.php index 46e86a98dc..9f01502bff 100644 --- a/app/code/core/Mage/GoogleBase/Block/Adminhtml/Items/Product.php +++ b/app/code/core/Mage/GoogleBase/Block/Adminhtml/Items/Product.php @@ -95,6 +95,15 @@ protected function _prepareColumns() ->load() ->toOptionHash(); + $this->addColumn('type', + array( + 'header'=> Mage::helper('catalog')->__('Type'), + 'width' => '60px', + 'index' => 'type_id', + 'type' => 'options', + 'options' => Mage::getSingleton('catalog/product_type')->getOptionArray(), + )); + $this->addColumn('set_name', array( 'header'=> Mage::helper('catalog')->__('Attrib. Set Name'), diff --git a/app/code/core/Mage/GoogleBase/controllers/TypesController.php b/app/code/core/Mage/GoogleBase/controllers/TypesController.php index d7712b7332..f280ce5625 100644 --- a/app/code/core/Mage/GoogleBase/controllers/TypesController.php +++ b/app/code/core/Mage/GoogleBase/controllers/TypesController.php @@ -34,6 +34,18 @@ */ class Mage_GoogleBase_TypesController extends Mage_Adminhtml_Controller_Action { + /** + * Dispatches controller_action_postdispatch_adminhtml Event (as not Adminhtml router) + */ + public function postDispatch() + { + parent::postDispatch(); + if ($this->getFlag('', self::FLAG_NO_POST_DISPATCH)) { + return; + } + Mage::dispatchEvent('controller_action_postdispatch_adminhtml', array('controller_action' => $this)); + } + protected function _initItemType() { Mage::register('current_item_type', Mage::getModel('googlebase/type')); diff --git a/app/code/core/Mage/GoogleCheckout/Block/Link.php b/app/code/core/Mage/GoogleCheckout/Block/Link.php index 44ff7beaff..151cadde9d 100644 --- a/app/code/core/Mage/GoogleCheckout/Block/Link.php +++ b/app/code/core/Mage/GoogleCheckout/Block/Link.php @@ -75,15 +75,16 @@ public function getImageHeight() return $v[1]; } + /** + * Check whether method is available and render HTML + * @return string + */ public function _toHtml() { - if (!Mage::getSingleton('checkout/session')->getQuote()->validateMinimumAmount()) { - return ''; - } - if (Mage::getStoreConfigFlag('google/checkout/active')) { + $quote = Mage::getSingleton('checkout/session')->getQuote(); + if (Mage::getModel('googlecheckout/payment')->isAvailable($quote) && $quote->validateMinimumAmount()) { return parent::_toHtml(); } - return ''; } 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 366174491a..ab26467266 100644 --- a/app/code/core/Mage/GoogleCheckout/Model/Api/Xml/Checkout.php +++ b/app/code/core/Mage/GoogleCheckout/Model/Api/Xml/Checkout.php @@ -100,7 +100,6 @@ protected function _getItemsXml() $shippingDiscount = (float)$this->getQuote()->getShippingAddress()->getBaseDiscountAmount(); $billingDiscount = (float)$this->getQuote()->getBillingAddress()->getBaseDiscountAmount(); if ($discount = $billingDiscount + $shippingDiscount) { - $discount = -$discount; $xml .= << _INTERNAL_DISCOUNT_ diff --git a/app/code/core/Mage/GoogleCheckout/Model/Payment.php b/app/code/core/Mage/GoogleCheckout/Model/Payment.php index fd4d81e4e7..ecb1831d08 100644 --- a/app/code/core/Mage/GoogleCheckout/Model/Payment.php +++ b/app/code/core/Mage/GoogleCheckout/Model/Payment.php @@ -162,4 +162,20 @@ public function cancel(Varien_Object $payment) return $this; } + + /** + * Retrieve information from payment configuration. + * Rewrited because of custom node for checkout settings + * + * @param string $field + * @return mixed + */ + public function getConfigData($field, $storeId = null) + { + if (null === $storeId) { + $storeId = $this->getStore(); + } + $path = 'google/checkout/'.$field; + return Mage::getStoreConfig($path, $storeId); + } } diff --git a/app/code/core/Mage/GoogleCheckout/etc/wsdl.xml b/app/code/core/Mage/GoogleCheckout/etc/wsdl.xml index 9c0c0dcbc9..c4fb83af74 100644 --- a/app/code/core/Mage/GoogleCheckout/etc/wsdl.xml +++ b/app/code/core/Mage/GoogleCheckout/etc/wsdl.xml @@ -12,4 +12,4 @@ - \ No newline at end of file + 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 index 67190c715f..1e21dc8c02 100644 --- 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 @@ -173,7 +173,9 @@ public function _prepareLayout() $fakeEntityAttribute = Mage::getModel('catalog/resource_eav_attribute'); + $readonly = $this->getCategory()->getOptimizationReadonly(); foreach ($fieldset->getElements() as $element) { + $element->setDisabled($readonly); if ($element->getId() != 'store_flag') { $element->setEntityAttribute($fakeEntityAttribute); } diff --git a/app/code/core/Mage/Index/Block/Adminhtml/Notifications.php b/app/code/core/Mage/Index/Block/Adminhtml/Notifications.php index 3b4aba5c23..b8ec1bafd8 100644 --- a/app/code/core/Mage/Index/Block/Adminhtml/Notifications.php +++ b/app/code/core/Mage/Index/Block/Adminhtml/Notifications.php @@ -52,4 +52,17 @@ public function getManageUrl() { return $this->getUrl('adminhtml/process/list'); } + + /** + * ACL validation before html generation + * + * @return string + */ + protected function _toHtml() + { + if (Mage::getSingleton('admin/session')->isAllowed('system/index')) { + return parent::_toHtml(); + } + return ''; + } } diff --git a/app/code/core/Mage/Index/Model/Indexer.php b/app/code/core/Mage/Index/Model/Indexer.php index d61b188ffc..e0bbf5c2be 100644 --- a/app/code/core/Mage/Index/Model/Indexer.php +++ b/app/code/core/Mage/Index/Model/Indexer.php @@ -61,6 +61,22 @@ public function getProcessesCollection() return $this->_processesCollection; } + /** + * Get index process by specific id + * + * @param int $processId + * @return Mage_Index_Model_Process | false + */ + public function getProcessById($processId) + { + foreach ($this->_processesCollection as $process) { + if ($process->getId() == $processId) { + return $process; + } + } + return false; + } + /** * Get index process by specific code * @@ -119,9 +135,7 @@ public function indexEvents($entity=null, $type=null) return $this; } - foreach ($this->_processesCollection as $process) { - $process->indexEvents($entity, $type); - } + $this->_runAll('indexEvents', array($entity, $type)); return $this; } @@ -137,9 +151,7 @@ public function indexEvent(Mage_Index_Model_Event $event) return $this; } - foreach ($this->_processesCollection as $process) { - $process->processEvent($event); - } + $this->_runAll('processEvent', array($event)); return $this; } @@ -154,9 +166,7 @@ public function registerEvent(Mage_Index_Model_Event $event) return $this; } - foreach ($this->_processesCollection as $process) { - $process->register($event); - } + $this->_runAll('register', array($event)); return $this; } @@ -211,4 +221,37 @@ public function processEntityAction(Varien_Object $entity, $entityType, $eventTy } return $this; } + + /** + * Run all processes method with parameters + * Run by depends priority + * Not recursive call is not implement + * + * @param string $method + * @param array $args + * @return Mage_Index_Model_Indexer + */ + protected function _runAll($method, $args) + { + $pid = 'runed_' . $method; + + foreach ($this->_processesCollection as $process) { + /* @var $process Mage_Index_Model_Process */ + if ($process->getData($pid)) { + continue; + } + if ($process->getDepends()) { + foreach ($process->getDepends() as $processCode) { + $dependProcess = $this->getProcessByCode($processCode); + if ($dependProcess && !$dependProcess->getData($pid)) { + call_user_func_array(array($dependProcess, $method), $args); + $dependProcess->setData($pid, true); + } + } + } + + call_user_func_array(array($process, $method), $args); + $process->setData($pid); + } + } } diff --git a/app/code/core/Mage/Index/Model/Mysql4/Setup.php b/app/code/core/Mage/Index/Model/Mysql4/Setup.php index 00f36d6d63..8a530e7c21 100644 --- a/app/code/core/Mage/Index/Model/Mysql4/Setup.php +++ b/app/code/core/Mage/Index/Model/Mysql4/Setup.php @@ -55,7 +55,14 @@ protected function _syncIndexes() $connection->delete($table, $connection->quoteInto('indexer_code IN (?)', $delete)); } if (!empty($insert)) { - $connection->insertArray($table, array('indexer_code'), $insert); + $inserData = array(); + foreach ($insert as $code) { + $inserData[] = array( + 'indexer_code' => $code, + 'status' => Mage_Index_Model_Process::STATUS_REQUIRE_REINDEX + ); + } + $connection->insertArray($table, array('indexer_code', 'status'), $inserData); } } } diff --git a/app/code/core/Mage/Index/Model/Process.php b/app/code/core/Mage/Index/Model/Process.php index 3162b56f15..315ff7622f 100644 --- a/app/code/core/Mage/Index/Model/Process.php +++ b/app/code/core/Mage/Index/Model/Process.php @@ -141,6 +141,32 @@ public function reindexAll() $this->_getResource()->endProcess($this); } + /** + * Reindex all data what this process responsible is + * Check and using depends processes + * + * @return Mage_Index_Model_Process + */ + public function reindexEverything() + { + if ($this->getData('runed_reindexall')) { + return $this; + } + + if ($this->getDepends()) { + $indexer = Mage::getSingleton('index/indexer'); + foreach ($this->getDepends() as $code) { + $process = $indexer->getProcessByCode($code); + if ($process) { + $process->reindexEverything(); + } + } + } + + $this->setData('runed_reindexall', true); + return $this->reindexAll(); + } + /** * Process event with assigned indexer object * @@ -387,4 +413,29 @@ public function getStatusesOptions() self::STATUS_REQUIRE_REINDEX => Mage::helper('index')->__('Reindex Required'), ); } + + /** + * Retrieve depend indexer codes + * + * @return array + */ + public function getDepends() + { + $depends = $this->getData('depends'); + if (is_null($depends)) { + $depends = array(); + $path = self::XML_PATH_INDEXER_DATA . '/' . $this->getIndexerCode(); + $node = Mage::getConfig()->getNode($path); + if ($node) { + $data = $node->asArray(); + if (isset($data['depends']) && is_array($data['depends'])) { + $depends = array_keys($data['depends']); + } + } + + $this->setData('depends', $depends); + } + + return $depends; + } } diff --git a/app/code/core/Mage/Index/controllers/Adminhtml/ProcessController.php b/app/code/core/Mage/Index/controllers/Adminhtml/ProcessController.php index 7e7dd08250..a9721c468a 100644 --- a/app/code/core/Mage/Index/controllers/Adminhtml/ProcessController.php +++ b/app/code/core/Mage/Index/controllers/Adminhtml/ProcessController.php @@ -28,7 +28,7 @@ class Mage_Index_Adminhtml_ProcessController extends Mage_Adminhtml_Controller_A /** * Initialize process object by request * - * @return false | Mage_Index_Model_Process + * @return Mage_Index_Model_Process|false */ protected function _initProcess() { @@ -112,7 +112,8 @@ public function reindexProcessAction() if ($process) { try { Varien_Profiler::start('__INDEX_PROCESS_REINDEX_ALL__'); - $process->reindexAll(); + + $process->reindexEverything(); Varien_Profiler::stop('__INDEX_PROCESS_REINDEX_ALL__'); $this->_getSession()->addSuccess( Mage::helper('index')->__('%s index was rebuilt successfully.', $process->getIndexer()->getName()) @@ -155,6 +156,8 @@ public function reindexAllAction() */ public function massReindexAction() { + /* @var $indexer Mage_Index_Model_Indexer */ + $indexer = Mage::getSingleton('index/indexer'); $processIds = $this->getRequest()->getParam('process'); if (empty($processIds) || !is_array($processIds)) { $this->_getSession()->addError(Mage::helper('index')->__('Please select Indexes')); @@ -162,9 +165,9 @@ public function massReindexAction() try { foreach ($processIds as $processId) { /* @var $process Mage_Index_Model_Process */ - $process = Mage::getModel('index/process')->load($processId); - if ($process->getId()) { - $process->reindexAll(); + $process = $indexer->getProcessById($processId); + if ($process) { + $process->reindexEverything(); } } $count = count($processIds); @@ -214,4 +217,14 @@ public function massChangeModeAction() $this->_redirect('*/*/list'); } + + /** + * Check ACL permissins + * + * @return bool + */ + protected function _isAllowed() + { + return Mage::getSingleton('admin/session')->isAllowed('system/index'); + } } diff --git a/app/code/core/Mage/Index/etc/adminhtml.xml b/app/code/core/Mage/Index/etc/adminhtml.xml index bca57cd34c..cd791c8268 100644 --- a/app/code/core/Mage/Index/etc/adminhtml.xml +++ b/app/code/core/Mage/Index/etc/adminhtml.xml @@ -43,9 +43,9 @@ - + Index Management - + diff --git a/app/code/core/Mage/Log/Model/Mysql4/Log.php b/app/code/core/Mage/Log/Model/Mysql4/Log.php index f651d25981..8a01c6b271 100644 --- a/app/code/core/Mage/Log/Model/Mysql4/Log.php +++ b/app/code/core/Mage/Log/Model/Mysql4/Log.php @@ -43,36 +43,6 @@ protected function _construct() $this->_init('log/visitor', 'visitor_id'); } - /** - * Start resource transaction - * - * @return Mage_Log_Model_Mysql4_Log - */ - public function beginTransaction() - { - return $this; - } - - /** - * Commit resource transaction - * - * @return Mage_Log_Model_Mysql4_Log - */ - public function commit() - { - return $this; - } - - /** - * Roll back resource transaction - * - * @return Mage_Log_Model_Mysql4_Log - */ - public function rollBack() - { - return $this; - } - /** * Clean logs * diff --git a/app/code/core/Mage/Log/Model/Mysql4/Visitor.php b/app/code/core/Mage/Log/Model/Mysql4/Visitor.php index 81c775452f..79978d4300 100644 --- a/app/code/core/Mage/Log/Model/Mysql4/Visitor.php +++ b/app/code/core/Mage/Log/Model/Mysql4/Visitor.php @@ -38,36 +38,6 @@ protected function _construct() $this->_init('log/visitor', 'visitor_id'); } - /** - * Start resource transaction - * - * @return Mage_Log_Model_Mysql4_Visitor - */ - public function beginTransaction() - { - return $this; - } - - /** - * Commit resource transaction - * - * @return Mage_Log_Model_Mysql4_Visitor - */ - public function commit() - { - return $this; - } - - /** - * Roll back resource transaction - * - * @return Mage_Log_Model_Mysql4_Visitor - */ - public function rollBack() - { - return $this; - } - protected function _prepareDataForSave(Mage_Core_Model_Abstract $visitor) { return array( diff --git a/app/code/core/Mage/Log/Model/Mysql4/Visitor/Collection.php b/app/code/core/Mage/Log/Model/Mysql4/Visitor/Collection.php index 4dfa90590b..5b35078a9f 100644 --- a/app/code/core/Mage/Log/Model/Mysql4/Visitor/Collection.php +++ b/app/code/core/Mage/Log/Model/Mysql4/Visitor/Collection.php @@ -151,7 +151,7 @@ public function useOnlineFilter($minutes=null) $email = $customersCollection->getAttribute('email'); $this->_select - ->from('', array('type' => 'IF(customer_id, \''.Mage_Log_Model_Visitor::VISITOR_TYPE_CUSTOMER.'\', \''.Mage_Log_Model_Visitor::VISITOR_TYPE_VISITOR.'\')')) + ->columns(array('type' => 'IF(customer_id, \''.Mage_Log_Model_Visitor::VISITOR_TYPE_CUSTOMER.'\', \''.Mage_Log_Model_Visitor::VISITOR_TYPE_VISITOR.'\')')) ->joinLeft( array('customer_lastname_table'=>$lastname->getBackend()->getTable()), 'customer_lastname_table.entity_id=customer_table.customer_id diff --git a/app/code/core/Mage/Log/etc/config.xml b/app/code/core/Mage/Log/etc/config.xml index 6809769ed2..f93f9194d3 100644 --- a/app/code/core/Mage/Log/etc/config.xml +++ b/app/code/core/Mage/Log/etc/config.xml @@ -28,7 +28,7 @@ - 0.7.6 + 0.7.7 diff --git a/app/code/core/Mage/Log/sql/log_setup/mysql4-upgrade-0.7.6-0.7.7.php b/app/code/core/Mage/Log/sql/log_setup/mysql4-upgrade-0.7.6-0.7.7.php new file mode 100644 index 0000000000..2a12a62f1f --- /dev/null +++ b/app/code/core/Mage/Log/sql/log_setup/mysql4-upgrade-0.7.6-0.7.7.php @@ -0,0 +1,43 @@ +startSetup(); + +$installer->run(" + ALTER TABLE `{$installer->getTable('log/customer')}` ENGINE INNODB; + ALTER TABLE `{$installer->getTable('log/quote_table')}` ENGINE INNODB; + ALTER TABLE `{$installer->getTable('log/summary_table')}` ENGINE INNODB; + ALTER TABLE `{$installer->getTable('log/summary_type_table')}` ENGINE INNODB; + ALTER TABLE `{$installer->getTable('log/url_table')}` ENGINE INNODB; + ALTER TABLE `{$installer->getTable('log/url_info_table')}` ENGINE INNODB; + ALTER TABLE `{$installer->getTable('log/visitor')}` ENGINE INNODB; + ALTER TABLE `{$installer->getTable('log/visitor_info')}` ENGINE INNODB; +"); + +$installer->endSetup(); diff --git a/app/code/core/Mage/Newsletter/Helper/Data.php b/app/code/core/Mage/Newsletter/Helper/Data.php index 863093f00f..ca9957c535 100644 --- a/app/code/core/Mage/Newsletter/Helper/Data.php +++ b/app/code/core/Mage/Newsletter/Helper/Data.php @@ -34,6 +34,8 @@ */ class Mage_Newsletter_Helper_Data extends Mage_Core_Helper_Abstract { + const XML_PATH_TEMPLATE_FILTER = 'global/newsletter/tempate_filter'; + /** * Retrieve subsription confirmation url * @@ -67,4 +69,15 @@ public function getUnsubscribeUrl($subscriber) '_nosid' => true )); } + + /** + * Retrieve Template processor for Newsletter template + * + * @return Varien_Filter_Template + */ + public function getTemplateProcessor() + { + $model = (string)Mage::getConfig()->getNode(self::XML_PATH_TEMPLATE_FILTER); + return Mage::getModel($model); + } } 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 e947e4cfd6..12a886bd5f 100644 --- a/app/code/core/Mage/Newsletter/Model/Mysql4/Subscriber/Collection.php +++ b/app/code/core/Mage/Newsletter/Model/Mysql4/Subscriber/Collection.php @@ -155,7 +155,7 @@ public function showCustomerInfo() public function addSubscriberTypeField() { $this->getSelect() - ->from(null, array('type'=>new Zend_Db_Expr('IF(main_table.customer_id = 0, 1, 2)'))); + ->columns(array('type'=>new Zend_Db_Expr('IF(main_table.customer_id = 0, 1, 2)'))); return $this; } diff --git a/app/code/core/Mage/Newsletter/Model/Queue.php b/app/code/core/Mage/Newsletter/Model/Queue.php index ca190a650f..d04fbe64f6 100644 --- a/app/code/core/Mage/Newsletter/Model/Queue.php +++ b/app/code/core/Mage/Newsletter/Model/Queue.php @@ -52,12 +52,22 @@ class Mage_Newsletter_Model_Queue extends Mage_Core_Model_Abstract protected $_stores = false; + /** + * Design changes object instance + * @var Varien_Object + */ + protected $_designConfig; + const STATUS_NEVER = 0; const STATUS_SENDING = 1; const STATUS_CANCEL = 2; const STATUS_SENT = 3; const STATUS_PAUSE = 4; + /** + * Default design area for emulation + */ + const DEFAULT_DESIGN_AREA = 'frontend'; protected function _construct() { @@ -126,10 +136,20 @@ public function sendPerSubscriber($count=20, array $additionalVariables=array()) } } + // save current design settings + $currentDesignConfig = clone $this->_getDesignConfig(); foreach($collection->getItems() as $item) { + if ($this->_getDesignConfig()->getStore() != $item->getStoreId()) { + $this->_setDesignConfig(array('area' => self::DEFAULT_DESIGN_AREA, 'store' => $item->getStoreId())); + $this->_applyDesignConfig(); + } $this->getTemplate()->send($item, array('subscriber'=>$item), null, $this); } + // restore previous design settings + $this->_setDesignConfig($currentDesignConfig->getData()); + $this->_applyDesignConfig(); + if(count($collection->getItems()) < $count-1 || count($collection->getItems()) == 0) { $this->setQueueFinishAt(now()); $this->setQueueStatus(self::STATUS_SENT); @@ -204,4 +224,69 @@ public function getTemplate() } return $this->_template; } + + /** + * Setter for design changes + * + * @param array $config + * @return Mage_Newsletter_Model_Queue + */ + protected function _setDesignConfig(array $config) + { + $this->_getDesignConfig()->setData($config); + return $this; + } + + /** + * Getter for design changes + * + * @return Varien_Object + */ + protected function _getDesignConfig() + { + if(is_null($this->_designConfig)) { + + $store = is_object(Mage::getDesign()->getStore()) + ? Mage::getDesign()->getStore()->getId() + : Mage::getDesign()->getStore(); + + $this->_designConfig = new Varien_Object(array( + 'area' => Mage::getDesign()->getArea(), + 'store' => $store + )); + } + return $this->_designConfig; + } + + protected function _applyDesignConfig() + { + $designConfig = $this->_getDesignConfig(); + + $design = Mage::getDesign(); + $designConfig->setOldArea($design->getArea()) + ->setOldStore($design->getStore()); + + if ($designConfig->hasData('area')) { + Mage::getDesign()->setArea($designConfig->getArea()); + } + + if ($designConfig->hasData('store')) { + $store = $designConfig->getStore(); + Mage::app()->setCurrentStore($store); + + $locale = new Zend_Locale(Mage::getStoreConfig(Mage_Core_Model_Locale::XML_PATH_DEFAULT_LOCALE, $store)); + Mage::app()->getLocale()->setLocale($locale); + Mage::app()->getLocale()->setLocaleCode($locale->toString()); + if ($designConfig->hasData('area')) { + Mage::getSingleton('core/translate')->setLocale($locale) + ->init($designConfig->getArea(), true); + } + + $design->setStore($store); + $design->setTheme(''); + $design->setPackageName(''); + } + + return $this; + } } diff --git a/app/code/core/Mage/Newsletter/Model/Subscriber.php b/app/code/core/Mage/Newsletter/Model/Subscriber.php index 061a2c681b..88f37c4083 100644 --- a/app/code/core/Mage/Newsletter/Model/Subscriber.php +++ b/app/code/core/Mage/Newsletter/Model/Subscriber.php @@ -47,6 +47,23 @@ class Mage_Newsletter_Model_Subscriber extends Mage_Core_Model_Abstract const XML_PATH_SENDING_SET_RETURN_PATH = Mage_Core_Model_Email_Template::XML_PATH_SENDING_SET_RETURN_PATH; + /** + * Prefix of model events names + * + * @var string + */ + protected $_eventPrefix = 'newsletter_subscriber'; + + /** + * Parameter name in event + * + * In observe method you can use $observer->getEvent()->getObject() in this case + * + * @var string + */ + protected $_eventObject = 'subscriber'; + + protected $_isStatusChanged = false; /** diff --git a/app/code/core/Mage/Newsletter/Model/Template.php b/app/code/core/Mage/Newsletter/Model/Template.php index 8207743ff9..eafcab4a83 100644 --- a/app/code/core/Mage/Newsletter/Model/Template.php +++ b/app/code/core/Mage/Newsletter/Model/Template.php @@ -179,7 +179,8 @@ public function getTemplateTextPreprocessed() */ public function getProcessedTemplate(array $variables = array(), $usePreprocess = false) { - $processor = Mage::getModel('core/email_template_filter'); + $processor = Mage::helper('newsletter')->getTemplateProcessor(); + /* @var $processor Mage_Newsletter_Model_Template_Filter */ if (!$this->_preprocessFlag) { $variables['this'] = $this; @@ -190,10 +191,28 @@ public function getProcessedTemplate(array $variables = array(), $usePreprocess ->setVariables($variables); if ($usePreprocess && $this->isPreprocessed()) { - return $processor->filter($this->getTemplateTextPreprocessed()); + return $processor->filter($this->getPreparedTemplateText(true)); } - return $processor->filter($this->getTemplateText()); + return $processor->filter($this->getPreparedTemplateText()); + } + + /** + * Makes additional text preparations for HTML templates + * + * @param bool $usePreprocess Use Preprocessed text or original text + * @return string + */ + public function getPreparedTemplateText($usePreprocess = false) + { + $text = $usePreprocess ? $this->getTemplateTextPreprocessed() : $this->getTemplateText(); + + if ($this->_preprocessFlag || $this->isPlain() || !$this->getTemplateStyles()) { + return $text; + } + // wrap styles into style tag + $html = "\n%s"; + return sprintf($html, $this->getTemplateStyles(), $text); } /** diff --git a/app/code/core/Mage/Newsletter/Model/Template/Filter.php b/app/code/core/Mage/Newsletter/Model/Template/Filter.php new file mode 100644 index 0000000000..36f4a51230 --- /dev/null +++ b/app/code/core/Mage/Newsletter/Model/Template/Filter.php @@ -0,0 +1,50 @@ + + */ +class Mage_Newsletter_Model_Template_Filter extends Mage_Widget_Model_Template_Filter +{ + /** + * Generate widget HTML if template variables are assigned + * + * @param array $construction + * @return string + */ + public function widgetDirective($construction) + { + if (!isset($this->_templateVars['subscriber'])) { + return $construction[0]; + } + + return parent::widgetDirective($construction); + } +} diff --git a/app/code/core/Mage/Newsletter/etc/config.xml b/app/code/core/Mage/Newsletter/etc/config.xml index 40cf8d7ea0..2819bd2aa3 100644 --- a/app/code/core/Mage/Newsletter/etc/config.xml +++ b/app/code/core/Mage/Newsletter/etc/config.xml @@ -28,7 +28,7 @@ - 0.8.1 + 0.8.2 @@ -90,6 +90,9 @@ + + newsletter/template_filter + @@ -119,6 +122,13 @@
+ + + + newsletter.xml + + + diff --git a/app/code/core/Mage/Newsletter/sql/newsletter_setup/mysql4-upgrade-0.8.1-0.8.2.php b/app/code/core/Mage/Newsletter/sql/newsletter_setup/mysql4-upgrade-0.8.1-0.8.2.php new file mode 100644 index 0000000000..0cd9df6885 --- /dev/null +++ b/app/code/core/Mage/Newsletter/sql/newsletter_setup/mysql4-upgrade-0.8.1-0.8.2.php @@ -0,0 +1,33 @@ +startSetup(); +$installer->getConnection()->addColumn( + $installer->getTable('newsletter_template'), 'template_styles', "text AFTER `template_text_preprocessed`" +); +$installer->endSetup(); diff --git a/app/code/core/Mage/Ogone/Helper/Data.php b/app/code/core/Mage/Ogone/Helper/Data.php index 0a2dde427d..1f461918e5 100644 --- a/app/code/core/Mage/Ogone/Helper/Data.php +++ b/app/code/core/Mage/Ogone/Helper/Data.php @@ -29,6 +29,8 @@ */ class Mage_Ogone_Helper_Data extends Mage_Core_Helper_Abstract { + const HASH_ALGO = 'sha1'; + /** * Crypt Data by SHA1 ctypting algorithm by secret key * @@ -36,12 +38,12 @@ class Mage_Ogone_Helper_Data extends Mage_Core_Helper_Abstract * @param string $key * @return hash */ - public function shaCrypt($data, $key='') + public function shaCrypt($data, $key = '') { if (is_array($data)) { - return bin2hex(mhash(MHASH_SHA1, implode("", $data), $key)); + return hash(self::HASH_ALGO, implode("", $data)); }if (is_string($data)) { - return bin2hex(mhash(MHASH_SHA1, $data, $key)); + return hash(self::HASH_ALGO, $data); } else { return ""; } @@ -58,9 +60,9 @@ public function shaCrypt($data, $key='') public function shaCryptValidation($data, $hash, $key='') { if (is_array($data)) { - return (bool) (strtoupper(bin2hex(mhash(MHASH_SHA1, implode("", $data), $key)))== $hash); + return (bool)(strtoupper(hash(self::HASH_ALGO, implode("", $data)))== $hash); } elseif (is_string($data)) { - return (bool) (strtoupper(bin2hex(mhash(MHASH_SHA1, $data, $key)))== $hash); + return (bool)(strtoupper(hash(self::HASH_ALGO, $data))== $hash); } else { return false; } diff --git a/app/code/core/Mage/Ogone/Model/Api.php b/app/code/core/Mage/Ogone/Model/Api.php index 0f6229e593..ebf494670a 100644 --- a/app/code/core/Mage/Ogone/Model/Api.php +++ b/app/code/core/Mage/Ogone/Model/Api.php @@ -39,7 +39,7 @@ class Mage_Ogone_Model_Api extends Mage_Payment_Model_Method_Abstract */ protected $_isGateway = false; protected $_canAuthorize = true; - protected $_canCapture = true; + protected $_canCapture = false; protected $_canCapturePartial = false; protected $_canRefund = false; protected $_canVoid = false; @@ -186,7 +186,7 @@ public function getFormFields($order) $formFields['catalogurl'] = $this->getConfig()->getHomeUrl(); $formFields['accepturl'] = $this->getConfig()->getAcceptUrl(); $formFields['declineurl'] = $this->getConfig()->getDeclineUrl(); - $formFields['excteptionurl'] = $this->getConfig()->getExceptionUrl(); + $formFields['exceptionurl'] = $this->getConfig()->getExceptionUrl(); $formFields['cancelurl'] = $this->getConfig()->getCancelUrl(); if ($this->getConfig()->getConfigData('template')=='ogone') { diff --git a/app/code/core/Mage/Ogone/controllers/ApiController.php b/app/code/core/Mage/Ogone/controllers/ApiController.php index bae4f1c02b..25ef44fa59 100644 --- a/app/code/core/Mage/Ogone/controllers/ApiController.php +++ b/app/code/core/Mage/Ogone/controllers/ApiController.php @@ -151,9 +151,10 @@ public function postBackAction() { if (!$this->_validateOgoneData()) { $this->getResponse()->setHeader("Status", "404 Not Found"); + return false; } - $this->_offlineProcess(); + $this->_ogoneProcess(); } /** @@ -164,14 +165,15 @@ public function offlineProcessAction() { if (!$this->_validateOgoneData()) { $this->getResponse()->setHeader("Status","404 Not Found"); + return false; } - $this->_offlineProcess(); + $this->_ogoneProcess(); } /** * Made offline ogone data processing, depending of incoming statuses */ - protected function _offlineProcess() + protected function _ogoneProcess() { $status = $this->getRequest()->getParam('STATUS'); switch ($status) { @@ -190,7 +192,8 @@ protected function _offlineProcess() $this->_exceptionProcess(); break; default: - $this->_cancelProcess(); + //all unknown transaction will accept as exceptional + $this->_exceptionProcess(); } } @@ -206,7 +209,7 @@ public function acceptAction() $this->_redirect('checkout/cart'); return; } - $this->_acceptProcess(); + $this->_ogoneProcess(); } /** @@ -217,7 +220,7 @@ protected function _acceptProcess() $params = $this->getRequest()->getParams(); $order = $this->_getOrder(); - $this->_getCheckout()->setLastSuccessQuoteId($this->_getCheckout()->getOgoneLastSuccessQuoteId()); + $this->_getCheckout()->setLastSuccessQuoteId($order->getQuoteId()); $this->_prepareCCInfo($order, $params); $order->getPayment()->setLastTransId($params['PAYID']); @@ -292,8 +295,11 @@ protected function _processAuthorize() if ($status == Mage_Ogone_Model_Api::OGONE_AUTH_PROCESSING) { $order->setState(Mage_Sales_Model_Order::STATE_NEW, Mage_Ogone_Model_Api::WAITING_AUTHORIZATION, Mage::helper('ogone')->__('Authorization Waiting from Ogone')); } else { + //to send new order email only when state is pending payment + if ($order->getState()==Mage_Sales_Model_Order::STATE_PENDING_PAYMENT) { + $order->sendNewOrderEmail(); + } $order->setState(Mage_Sales_Model_Order::STATE_NEW, Mage_Ogone_Model_Api::PROCESSED_OGONE_STATUS, Mage::helper('ogone')->__('Processed by Ogone')); - $order->sendNewOrderEmail(); } $order->save(); $this->_redirect('checkout/onepage/success'); @@ -354,19 +360,25 @@ public function _exceptionProcess() $exception = Mage::helper('ogone')->__('Payment uncertain: A technical problem arose during payment process, giving unpredictable result'); break; case Mage_Ogone_Model_Api::OGONE_AUTH_UKNKOWN_STATUS : - $exception = Mage::helper('ogone')->__('Authorisation not known: A technical problem arose during authorisation process, giving unpredictable result'); + $exception = Mage::helper('ogone')->__('Authorization not known: A technical problem arose during authorization process, giving unpredictable result'); break; default: - $exception = ''; + $exception = Mage::helper('ogone')->__('Unknown exception'); } if (!empty($exception)) { try{ + $this->_getCheckout()->setLastSuccessQuoteId($order->getQuoteId()); $this->_prepareCCInfo($order, $params); $order->getPayment()->setLastTransId($params['PAYID']); - $order->addStatusToHistory(Mage_Ogone_Model_Api::PROCESSING_OGONE_STATUS, $exception); + //to send new order email only when state is pending payment + if ($order->getState()==Mage_Sales_Model_Order::STATE_PENDING_PAYMENT) { + $order->sendNewOrderEmail(); + $order->setState(Mage_Sales_Model_Order::STATE_PROCESSING, Mage_Ogone_Model_Api::PROCESSING_OGONE_STATUS, $exception); + } else { + $order->addStatusToHistory(Mage_Ogone_Model_Api::PROCESSING_OGONE_STATUS, $exception); + } $order->save(); - $this->_getCheckout()->addError($exception); }catch(Exception $e) { $this->_getCheckout()->addError(Mage::helper('ogone')->__('Order can not be save for system reason')); } @@ -375,7 +387,6 @@ public function _exceptionProcess() } $this->_redirect('checkout/onepage/success'); - return; } /** diff --git a/app/code/core/Mage/Ogone/etc/config.xml b/app/code/core/Mage/Ogone/etc/config.xml index 837c7aa503..cd68a4b1ae 100644 --- a/app/code/core/Mage/Ogone/etc/config.xml +++ b/app/code/core/Mage/Ogone/etc/config.xml @@ -45,11 +45,24 @@ - + Mage_Ogone + + core_setup + + + + core_write + + + + + core_read + + @@ -66,6 +79,18 @@ + + + + + + + + + + + +
diff --git a/app/code/core/Mage/Ogone/etc/system.xml b/app/code/core/Mage/Ogone/etc/system.xml index 73de9b9a02..ba839b1ead 100644 --- a/app/code/core/Mage/Ogone/etc/system.xml +++ b/app/code/core/Mage/Ogone/etc/system.xml @@ -109,7 +109,7 @@ 0 - + text For production, replace "test" with "prod" Example: https://secure.ogone.com/ncol/prod/orderstandard.asp 7 diff --git a/app/code/core/Mage/Oscommerce/Model/Mysql4/Oscommerce/Order/Collection.php b/app/code/core/Mage/Oscommerce/Model/Mysql4/Oscommerce/Order/Collection.php index d3692a9221..532b161cbe 100644 --- a/app/code/core/Mage/Oscommerce/Model/Mysql4/Oscommerce/Order/Collection.php +++ b/app/code/core/Mage/Oscommerce/Model/Mysql4/Oscommerce/Order/Collection.php @@ -39,7 +39,7 @@ protected function _construct() public function addOrderTotalField() { $this->_select - ->from(null, array('orders_total'=>new Zend_Db_Expr('FORMAT(main_table.orders_total,2)'))); + ->columns(array('orders_total'=>new Zend_Db_Expr('FORMAT(main_table.orders_total,2)'))); return $this; } diff --git a/app/code/core/Mage/Page/Block/Html/Header.php b/app/code/core/Mage/Page/Block/Html/Header.php index 853995ddd8..ca67510061 100644 --- a/app/code/core/Mage/Page/Block/Html/Header.php +++ b/app/code/core/Mage/Page/Block/Html/Header.php @@ -38,6 +38,16 @@ public function _construct() $this->setTemplate('page/html/header.phtml'); } + /** + * Check if current url is url for home page + * + * @return true + */ + public function getIsHomePage() + { + return $this->getUrl('') == $this->getUrl('*/*/*', array('_current'=>true, '_use_rewrite'=>true)); + } + public function setLogo($logo_src, $logo_alt) { $this->setLogoSrc($logo_src); diff --git a/app/code/core/Mage/Page/Block/Html/Pager.php b/app/code/core/Mage/Page/Block/Html/Pager.php index 4fdff08c55..d9bb273413 100644 --- a/app/code/core/Mage/Page/Block/Html/Pager.php +++ b/app/code/core/Mage/Page/Block/Html/Pager.php @@ -41,11 +41,44 @@ class Mage_Page_Block_Html_Pager extends Mage_Core_Block_Template protected $_availableLimit = array(10=>10,20=>20,50=>50); protected $_dispersion = 3; protected $_displayPages = 5; - protected $_showPerPage = true; + protected $_showPerPage = true; + protected $_limit = null; + + /** + * Pages quantity per frame + * @var int + */ + protected $_frameLength = 5; + + /** + * Next/previous page position relatively to the current frame + * @var int + */ + protected $_jump = 5; + + /** + * Frame initialization flag + * @var bool + */ + protected $_frameInitialized = false; + + /** + * Start page position in frame + * @var int + */ + protected $_frameStart; + + /** + * Finish page position in frame + * @var int + */ + protected $_frameEnd; protected function _construct() { parent::_construct(); + $this->setData('show_amounts', true); + $this->setData('use_container', true); $this->setTemplate('page/html/pager.phtml'); } @@ -59,6 +92,9 @@ public function getCurrentPage() public function getLimit() { + if ($this->_limit !== null) { + return $this->_limit; + } $limits = $this->getAvailableLimit(); if ($limit = $this->getRequest()->getParam($this->getLimitVarName())) { if (isset($limits[$limit])) { @@ -69,6 +105,18 @@ public function getLimit() return $limits[0]; } + /** + * Setter for limit items per page + * + * @param int $limit + * @return Mage_Page_Block_Html_Pager + */ + public function setLimit($limit) + { + $this->_limit = $limit; + return $this; + } + public function setCollection($collection) { $this->_collection = $collection @@ -78,6 +126,8 @@ public function setCollection($collection) $this->_collection->setPageSize($this->getLimit()); } + $this->_setFrameInitialized(false); + return $this; } @@ -103,6 +153,7 @@ public function getPageVarName() public function setShowPerPage($varName) { $this->_showPerPage=$varName; + return $this; } public function getShowPerPage() @@ -202,15 +253,6 @@ public function getPages() $pages = range($start, $finish); } return $pages; - -// $pages = array(); -// for ($i=$this->getCollection()->getCurPage(-$this->_dispersion); $i <= $this->getCollection()->getCurPage(+($this->_dispersion-1)); $i++) -// { -// -// $pages[] = $i; -// } -// -// return $pages; } public function getFirstPageUrl() @@ -252,5 +294,274 @@ public function getPagerUrl($params=array()) $urlParams['_query'] = $params; return $this->getUrl('*/*/*', $urlParams); } + + /** + * Getter for $_frameStart + * + * @return int + */ + public function getFrameStart() + { + $this->_initFrame(); + return $this->_frameStart; + } + + /** + * Getter for $_frameEnd + * + * @return int + */ + public function getFrameEnd() + { + $this->_initFrame(); + return $this->_frameEnd; + } + + /** + * Return array of pages in frame + * + * @return array + */ + public function getFramePages() + { + $start = $this->getFrameStart(); + $end = $this->getFrameEnd(); + return range($start, $end); + } + + /** + * Return page number of Previous jump + * + * @return int + */ + public function getPreviousJumpPage() + { + if (!$this->getJump()) { + return null; + } + $frameStart = $this->getFrameStart(); + if ($frameStart - 1 > 1) { + return max(2, $frameStart - $this->getJump()); + } + + return null; + } + + /** + * Prepare URL for Previous Jump + * + * @return string + */ + public function getPreviousJumpUrl() + { + return $this->getPageUrl($this->getPreviousJumpPage()); + } + + /** + * Return page number of Next jump + * + * @return int + */ + public function getNextJumpPage() + { + if (!$this->getJump()) { + return null; + } + $frameEnd = $this->getFrameEnd(); + if ($this->getLastPageNum() - $frameEnd > 1) { + return min($this->getLastPageNum() - 1, $frameEnd + $this->getJump()); + } + + return null; + } + + /** + * Prepare URL for Next Jump + * + * @return string + */ + public function getNextJumpUrl() + { + return $this->getPageUrl($this->getNextJumpPage()); + } + + /** + * Getter for $_frameLength + * + * @return int + */ + public function getFrameLength() + { + return $this->_frameLength; + } + + /** + * Getter for $_jump + * + * @return int + */ + public function getJump() + { + return $this->_jump; + } + + /** + * Setter for $_frameLength + * + * @param int $frame + * @return Mage_Catalog_Block_Product_List_Toolbar_Pager + */ + public function setFrameLength($frame) + { + $frame = abs(intval($frame)); + if ($frame == 0) { + $frame = $this->_frameLength; + } + if ($this->getFrameLength() != $frame) { + $this->_setFrameInitialized(false); + $this->_frameLength = $frame; + } + + return $this; + } + + /** + * Setter for $_jump + * + * @param int $jump + * @return Mage_Catalog_Block_Product_List_Toolbar_Pager + */ + public function setJump($jump) + { + $jump = abs(intval($jump)); + if ($this->getJump() != $jump) { + $this->_setFrameInitialized(false); + $this->_jump = $jump; + } + + return $this; + } + + /** + * Whether to show first page in pagination or not + * + * @return bool + */ + public function canShowFirst() + { + return $this->getJump() > 1 && $this->getFrameStart() > 1; + } + + /** + * Whether to show last page in pagination or not + * + * @return bool + */ + public function canShowLast() + { + return $this->getJump() > 1 && $this->getFrameEnd() < $this->getLastPageNum(); + } + + /** + * Whether to show link to Previous Jump + * + * @return bool + */ + public function canShowPreviousJump() + { + return $this->getPreviousJumpPage() !== null; + } + + /** + * Whether to show link to Next Jump + * + * @return bool + */ + public function canShowNextJump() + { + return $this->getNextJumpPage() !== null; + } + + /** + * Initialize frame data, such as frame start, frame start etc. + * + * @return Mage_Catalog_Block_Product_List_Toolbar_Pager + */ + protected function _initFrame() + { + if (!$this->isFrameInitialized()) { + $start = 0; + $end = 0; + + $collection = $this->getCollection(); + if ($collection->getLastPageNumber() <= $this->getFrameLength()) { + $start = 1; + $end = $collection->getLastPageNumber(); + } + else { + $half = ceil($this->getFrameLength() / 2); + if ($collection->getCurPage() >= $half && $collection->getCurPage() <= $collection->getLastPageNumber() - $half) { + $start = ($collection->getCurPage() - $half) + 1; + $end = ($start + $this->getFrameLength()) - 1; + } + elseif ($collection->getCurPage() < $half) { + $start = 1; + $end = $this->getFrameLength(); + } + elseif ($collection->getCurPage() > ($collection->getLastPageNumber() - $half)) { + $end = $collection->getLastPageNumber(); + $start = $end - $this->getFrameLength() + 1; + } + } + $this->_frameStart = $start; + $this->_frameEnd = $end; + + $this->_setFrameInitialized(true); + } + + return $this; + } + + /** + * Setter for flag _frameInitialized + * + * @param bool $flag + * @return Mage_Catalog_Block_Product_List_Toolbar_Pager + */ + protected function _setFrameInitialized($flag) + { + $this->_frameInitialized = (bool)$flag; + return $this; + } + + /** + * Check if frame data was initialized + * + * @return Mage_Catalog_Block_Product_List_Toolbar_Pager + */ + public function isFrameInitialized() + { + return $this->_frameInitialized; + } + + /** + * Getter for alternative text for Previous link in pagination frame + * + * @return string + */ + public function getAnchorTextForPrevious() + { + return Mage::getStoreConfig('design/pagination/anchor_text_for_previous'); + } + + /** + * Getter for alternative text for Next link in pagination frame + * + * @return string + */ + public function getAnchorTextForNext() + { + return Mage::getStoreConfig('design/pagination/anchor_text_for_next'); + } } diff --git a/app/code/core/Mage/Page/Block/Html/Wrapper.php b/app/code/core/Mage/Page/Block/Html/Wrapper.php index e665a0b82f..9197866947 100644 --- a/app/code/core/Mage/Page/Block/Html/Wrapper.php +++ b/app/code/core/Mage/Page/Block/Html/Wrapper.php @@ -29,6 +29,12 @@ */ class Mage_Page_Block_Html_Wrapper extends Mage_Core_Block_Abstract { + /** + * Whether block should render its content if there are no children (no) + * @var bool + */ + protected $_dependsOnChildren = true; + /** * Render the wrapper element html * Supports different optional parameters, set in data by keys: @@ -43,6 +49,9 @@ class Mage_Page_Block_Html_Wrapper extends Mage_Core_Block_Abstract */ protected function _toHtml() { + if ($this->_dependsOnChildren && empty($this->_children)) { + return ''; + } $id = $this->hasElementId() ? sprintf(' id="%s"', $this->getElementId()) : ''; $class = $this->hasElementClass() ? sprintf(' class="%s"', $this->getElementClass()) : ''; $otherParams = $this->hasOtherParams() ? ' ' . $this->getOtherParams() : ''; @@ -60,4 +69,15 @@ public function getElementTagName() $tagName = $this->_getData('html_tag_name'); return $tagName ? $tagName : 'div'; } + + /** + * Setter whether this block depends on children + * @param $depends + * @return Mage_Page_Block_Html_Wrapper + */ + public function dependsOnChildren($depends = '0') + { + $this->_dependsOnChildren = (bool)(int)$depends; + return $this; + } } diff --git a/app/code/core/Mage/Paygate/Model/Authorizenet.php b/app/code/core/Mage/Paygate/Model/Authorizenet.php index 651dcf4eae..e790ab4a80 100644 --- a/app/code/core/Mage/Paygate/Model/Authorizenet.php +++ b/app/code/core/Mage/Paygate/Model/Authorizenet.php @@ -93,12 +93,27 @@ class Mage_Paygate_Model_Authorizenet extends Mage_Payment_Model_Method_Cc */ public function canUseForCurrency($currencyCode) { - if (!in_array($currencyCode, $this->_allowCurrencyCode)) { + if (!in_array($currencyCode, $this->getAcceptedCurrencyCodes())) { return false; } return true; } + /** + * Return array of currency codes supplied by Payment Gateway + * + * @return array + */ + public function getAcceptedCurrencyCodes() + { + if (!$this->hasData('_accepted_currency')) { + $acceptedCurrencyCodes = $this->_allowCurrencyCode; + $acceptedCurrencyCodes[] = $this->getConfigData('currency'); + $this->setData('_accepted_currency', $acceptedCurrencyCodes); + } + return $this->_getData('_accepted_currency'); + } + /** * Send authorize request to gateway * @@ -409,7 +424,7 @@ protected function _postRequest(Varien_Object $request) ->setCustomerId($r[12]) ->setMd5Hash($r[37]) ->setCardCodeResponseCode($r[38]) - ->setCAVVResponseCode($r[39]); + ->setCAVVResponseCode( (isset($r[39])) ? $r[39] : null); } else { Mage::throwException( Mage::helper('paygate')->__('Error in payment gateway') diff --git a/app/code/core/Mage/Paygate/etc/config.xml b/app/code/core/Mage/Paygate/etc/config.xml index cf6b754501..5342114d8a 100644 --- a/app/code/core/Mage/Paygate/etc/config.xml +++ b/app/code/core/Mage/Paygate/etc/config.xml @@ -95,6 +95,7 @@ Credit Card (Authorize.net) 0 + USD diff --git a/app/code/core/Mage/Paygate/etc/system.xml b/app/code/core/Mage/Paygate/etc/system.xml index 3efd42e96d..95acda0ede 100644 --- a/app/code/core/Mage/Paygate/etc/system.xml +++ b/app/code/core/Mage/Paygate/etc/system.xml @@ -159,6 +159,15 @@ 1 0 + + + select + adminhtml/system_config_source_currency + 6 + 1 + 1 + 0 + allowspecific diff --git a/app/code/core/Mage/Payment/Block/Info.php b/app/code/core/Mage/Payment/Block/Info.php index b5f07c3838..796c06816b 100644 --- a/app/code/core/Mage/Payment/Block/Info.php +++ b/app/code/core/Mage/Payment/Block/Info.php @@ -45,7 +45,7 @@ public function getInfo() { $info = $this->getData('info'); if (!($info instanceof Mage_Payment_Model_Info)) { - Mage::throwException($this->__('Can not retrieve payment info model object.')); + Mage::throwException($this->__('Cannot retrieve payment info model object.')); } return $info; } @@ -59,7 +59,7 @@ public function getMethod() { return $this->getInfo()->getMethodInstance(); } - + public function toPdf() { $this->setTemplate('payment/info/pdf/default.phtml'); diff --git a/app/code/core/Mage/Payment/Model/Method/Abstract.php b/app/code/core/Mage/Payment/Model/Method/Abstract.php index b901781277..1737e23ec1 100644 --- a/app/code/core/Mage/Payment/Model/Method/Abstract.php +++ b/app/code/core/Mage/Payment/Model/Method/Abstract.php @@ -46,7 +46,8 @@ abstract class Mage_Payment_Model_Method_Abstract extends Varien_Object protected $_infoBlockType = 'payment/info'; /** - * Availability options + * Payment Method features + * @var bool */ protected $_isGateway = false; protected $_canAuthorize = false; @@ -59,6 +60,12 @@ abstract class Mage_Payment_Model_Method_Abstract extends Varien_Object protected $_canUseCheckout = true; protected $_canUseForMultishipping = true; protected $_isInitializeNeeded = false; + /** + * TODO: whether a captured transaction may be voided by this gateway + * This may happen when amount is captured, but not settled + * @var bool + */ + protected $_canCancelInvoice = false; public function __construct() { @@ -327,12 +334,27 @@ public function capture(Varien_Object $payment, $amount) return $this; } + /** + * Set capture transaction ID to invoice for informational purposes + * @param Mage_Sales_Model_Order_Invoice $invoice + * @param Mage_Sales_Model_Order_Payment $payment + * @return Mage_Payment_Model_Method_Abstract + */ public function processInvoice($invoice, $payment) { $invoice->setTransactionId($payment->getLastTransId()); return $this; } + /** + * Set refund transaction id to payment object for informational purposes + * Candidate to be deprecated: + * there can be multiple refunds per payment, thus payment.refund_transaction_id doesn't make big sense + * + * @param Mage_Sales_Model_Order_Invoice $invoice + * @param Mage_Sales_Model_Order_Payment $payment + * @return Mage_Payment_Model_Method_Abstract + */ public function processBeforeRefund($invoice, $payment) { $payment->setRefundTransactionId($invoice->getTransactionId()); @@ -357,6 +379,12 @@ public function refund(Varien_Object $payment, $amount) return $this; } + /** + * Set transaction ID into creditmemo for informational purposes + * @param Mage_Sales_Model_Order_Creditmemo $creditmemo + * @param Mage_Sales_Model_Order_Payment $payment + * @return Mage_Payment_Model_Method_Abstract + */ public function processCreditmemo($creditmemo, $payment) { $creditmemo->setTransactionId($payment->getLastTransId()); @@ -374,6 +402,14 @@ public function cancel(Varien_Object $payment) return $this; } + /** + * @deprecated after 1.4.0.0-alpha3 + * this method doesn't make sense, because invoice must not void entire authorization + * there should be method for invoice cancellation + * @param Mage_Sales_Model_Order_Invoice $invoice + * @param Mage_Sales_Model_Order_Payment $payment + * @return Mage_Payment_Model_Method_Abstract + */ public function processBeforeVoid($invoice, $payment) { $payment->setVoidTransactionId($invoice->getTransactionId()); @@ -475,4 +511,15 @@ public function initialize($paymentAction, $stateObject) { return $this; } + + /** + * Get config peyment action url + * Used to universalize payment actions when processing payment place + * + * @return string + */ + public function getConfigPaymentAction() + { + return $this->getConfigData('payment_action'); + } } diff --git a/app/code/core/Mage/Payment/Model/Observer.php b/app/code/core/Mage/Payment/Model/Observer.php index eeb723d0e2..98931ee7dc 100644 --- a/app/code/core/Mage/Payment/Model/Observer.php +++ b/app/code/core/Mage/Payment/Model/Observer.php @@ -51,7 +51,7 @@ public function salesOrderBeforeSave($observer) return $this; } - if ($order->getState() === Mage_Sales_Model_Order::STATE_CANCELED || + if ($order->isCanceled() || $order->getState() === Mage_Sales_Model_Order::STATE_CLOSED ) { return $this; } diff --git a/app/code/core/Mage/Paypal/Block/Adminhtml/Direct/Iframe.php b/app/code/core/Mage/Paypal/Block/Adminhtml/Direct/Iframe.php new file mode 100644 index 0000000000..9ac504cbc6 --- /dev/null +++ b/app/code/core/Mage/Paypal/Block/Adminhtml/Direct/Iframe.php @@ -0,0 +1,73 @@ +setJsObjectName('payPalCentinel'); + $this->setCentinelIframeId('paypal_3dsecure_iframe'); + return $this; + } + + /** + * Return 3D secure validate url + * + * @return string + */ + public function getValidateUrl() + { + return $this->getUrl('*/paypal_direct/lookup', array('_current' => true, '_secure' => true)); + } + + + /** + * Return formated centinel js object name + * + * @return string + */ + public function getCentinelJsObjectName() + { + return $this->getJsObjectName(); + } + + /** + * Return direct paymethod + * + * @return Mage_PayPal_Model_Direct + */ + public function getMethod() + { + return Mage::getSingleton('paypal/direct'); + } +} diff --git a/app/code/core/Mage/Paypal/Block/Direct/Finalize.php b/app/code/core/Mage/Paypal/Block/Direct/Finalize.php new file mode 100644 index 0000000000..b330f6913e --- /dev/null +++ b/app/code/core/Mage/Paypal/Block/Direct/Finalize.php @@ -0,0 +1,55 @@ +setJsObjectName('payPalCentinel'); + $this->setCentinelIframeId('paypal_3dsecure_iframe'); + parent::_construct(); + return $this; + } + + /** + * Return Centinel js object name, used to call parent object with correcponding action + * + * @return string + */ + public function getCentinelJsObjectName() + { + return $this->getJsObjectName(); + } +} diff --git a/app/code/core/Mage/Paypal/Block/Direct/Form.php b/app/code/core/Mage/Paypal/Block/Direct/Form.php new file mode 100644 index 0000000000..e355295e03 --- /dev/null +++ b/app/code/core/Mage/Paypal/Block/Direct/Form.php @@ -0,0 +1,80 @@ +setJsObjectName('payPalCentinel'); + $this->setCentinelIframeId('paypal_3dsecure_iframe'); + parent::_construct(); + return $this; + } + + /** + * Return 3D secure validate url + * + * @return string + */ + public function getValidateUrl() + { + return $this->getUrl('paypal/direct/lookup', array('_secure' => true)); + } + + /** + * Add UK domestic cards additional fields as child block + * + * Forks a clone, but with a different form + * + * @return Mage_PaypalUk_Block_Direct_Form + */ + public function _beforeToHtml() + { + $child = clone $this; + $this->setChild('paypal_direct', + $child->setTemplate('paypal/direct/form.phtml')); + return parent::_beforeToHtml(); + } + + /** + * Return formated centinel js object name + * + * @return string + */ + public function getCentinelJsObjectName() + { + return $this->getJsObjectName(); + } +} diff --git a/app/code/core/Mage/Paypal/Block/Direct/Info.php b/app/code/core/Mage/Paypal/Block/Direct/Info.php new file mode 100644 index 0000000000..526a83bcce --- /dev/null +++ b/app/code/core/Mage/Paypal/Block/Direct/Info.php @@ -0,0 +1,87 @@ +setTemplate('paypal/direct/info.phtml'); + return $this; + } + + /** + * Get Avs checking detailed description + * + * @return string + */ + public function getAvsDetail() + { + if ($this->getInfo()) { + $avs = $this->getInfo()->getCcAvsStatus(); + return $this->getMethod()->getApi()->getAvsDetail($avs); + } else { + return ''; + } + } + + /** + * Get cvv checking detailed description + * + * @return string + */ + public function getCvvVerified() + { + if ($this->getInfo()) { + $cvv = $this->getInfo()->getCcCidStatus(); + return $this->getMethod()->getApi()->getCvvDetail($cvv); + } else { + return ''; + } + } + + /** + * Get 3D secure validation description + * + * @return bool + */ + public function getIs3DSecureVerified() + { + if ($this->getInfo()) { + return $this->getInfo()->getCcCidStatus(); + } else { + return false; + } + } +} diff --git a/app/code/core/Mage/Paypal/Block/Direct/Validate.php b/app/code/core/Mage/Paypal/Block/Direct/Validate.php new file mode 100644 index 0000000000..c2979618c0 --- /dev/null +++ b/app/code/core/Mage/Paypal/Block/Direct/Validate.php @@ -0,0 +1,94 @@ +getValidation()->getACSUrl(); + } + + /** + * Return exncripted code, result 3d secure lookup api call + * + * @return string + */ + public function getPayload() + { + return $this->getValidation()->getPayload(); + } + + /** + * Return url, customer will redirect to this url after success verification + * + * @return string + */ + public function getTermUrl() + { + return $this->getValidation()->getTermUrl(); + } + + /** + * return transaction id. result of 3d secure lookup api call + * + * @return string + */ + public function getTocken() + { + return $this->getValidation()->getTransactionId(); + } +} diff --git a/app/code/core/Mage/Paypal/Block/Express/Form.php b/app/code/core/Mage/Paypal/Block/Express/Form.php index 328ddf0a90..8d3fb446fe 100644 --- a/app/code/core/Mage/Paypal/Block/Express/Form.php +++ b/app/code/core/Mage/Paypal/Block/Express/Form.php @@ -27,9 +27,15 @@ class Mage_Paypal_Block_Express_Form extends Mage_Payment_Block_Form { + /** + * Init Express pay form + * + * @return Mage_Paypal_Block_Express_Form + */ protected function _construct() { $this->setTemplate('paypal/express/form.phtml'); parent::_construct(); + return $this; } } diff --git a/app/code/core/Mage/Paypal/Block/Express/Info.php b/app/code/core/Mage/Paypal/Block/Express/Info.php index d1cb88baba..fa9b236793 100644 --- a/app/code/core/Mage/Paypal/Block/Express/Info.php +++ b/app/code/core/Mage/Paypal/Block/Express/Info.php @@ -24,15 +24,28 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ +/** + * Display PayPal Express payment form + */ class Mage_Paypal_Block_Express_Info extends Mage_Payment_Block_Info { + /** + * Setup PayPal Express payment form template url + * + * @return $this; + */ protected function _construct() { parent::_construct(); $this->setTemplate('paypal/express/info.phtml'); + return $this; } + /** + * Customer email address getter + * @return string + */ public function getEmail() { $p = $this->getInfo(); @@ -52,6 +65,11 @@ public function getEmail() return $email; } + /** + * Return PayPal Express payment information as formated pdf block + * + * @return string + */ public function toPdf() { $this->setTemplate('paypal/express/pdf/info.phtml'); diff --git a/app/code/core/Mage/Paypal/Block/Express/Review.php b/app/code/core/Mage/Paypal/Block/Express/Review.php index 1000b7cbdd..0c40ec776b 100644 --- a/app/code/core/Mage/Paypal/Block/Express/Review.php +++ b/app/code/core/Mage/Paypal/Block/Express/Review.php @@ -44,16 +44,31 @@ public function getReview() return Mage::getSingleton('paypal/express_review'); } + /** + * Return quote billing address + * + * @return Mage_Sales_Quote_Address + */ public function getBillingAddress() { return $this->getReview()->getQuote()->getBillingAddress(); } + /** + * Return quote shipping address + * + * @return Mage_Sales_Quote_Address + */ public function getShippingAddress() { return $this->getReview()->getQuote()->getShippingAddress(); } + /** + * Return address base on quote shipping address + * + * @return Mage_Sales_Quote_Address + */ public function getAddress() { if (empty($this->_address)) { @@ -62,6 +77,11 @@ public function getAddress() return $this->_address; } + /** + * Return shipping rates + * + * @return array + */ public function getShippingRates() { if (empty($this->_rates)) { @@ -81,6 +101,12 @@ public function getShippingRates() return $this->_rates; } + /** + * Return carrier name from config, base on carrier code + * + * @param $carrierCode string + * @return string + */ public function getCarrierName($carrierCode) { if ($name = Mage::getStoreConfig('carriers/'.$carrierCode.'/title')) { @@ -89,26 +115,55 @@ public function getCarrierName($carrierCode) return $carrierCode; } + /** + * get shipping method + * + * @return string + */ public function getAddressShippingMethod() { return $this->getAddress()->getShippingMethod(); } + /** + * set payment method. + * + * @param $varName string + */ public function setMethod($varName) { $this->_method=$varName; } + /** + * Return formated shipping price + * + * @param $price float + * @param $flag bool + * + * @return bool + */ public function getShippingPrice($price, $flag) { return $this->formatPrice($this->helper('tax')->getShippingPrice($price, $flag, $this->getAddress())); } + /** + * Format price base on store convert price method + * + * @param $price float + * @return string + */ public function formatPrice($price) { return $this->getReview()->getQuote()->getStore()->convertPrice($price, true); } + /** + * Return quote virtual status + * + * @return bool + */ public function isVirtual() { return $this->getReview()->getQuote()->getIsVirtual(); diff --git a/app/code/core/Mage/Paypal/Block/Express/Review/Details.php b/app/code/core/Mage/Paypal/Block/Express/Review/Details.php index c013b2b5ee..cc15824aa8 100644 --- a/app/code/core/Mage/Paypal/Block/Express/Review/Details.php +++ b/app/code/core/Mage/Paypal/Block/Express/Review/Details.php @@ -31,7 +31,7 @@ * @package Mage_Paypal * @author Magento Core Team */ -class Mage_Paypal_Block_Express_Review_Details extends Mage_Core_Block_Template +class Mage_Paypal_Block_Express_Review_Details extends Mage_Checkout_Block_Cart_Totals { protected $_address; @@ -45,6 +45,11 @@ public function getReview() return Mage::getSingleton('paypal/express_review'); } + /** + * Return review shipping address + * + * @return Mage_Sales_Model_Order_Address + */ public function getAddress() { if (empty($this->_address)) { @@ -53,23 +58,23 @@ public function getAddress() return $this->_address; } + /** + * Return review quote items + * + * @return Mage_Sales_Model_Quote + */ public function getItems() { -// $priceFilter = Mage::app()->getStore()->getPriceFilter(); -// $itemsFilter = new Varien_Filter_Object_Grid(); -// $itemsFilter->addFilter(new Varien_Filter_Sprintf('%d'), 'qty'); -// $itemsFilter->addFilter($priceFilter, 'price'); -// $itemsFilter->addFilter($priceFilter, 'row_total'); -// return $itemsFilter->filter($this->getAddress()->getAllItems()); return $this->getReview()->getQuote()->getAllItems(); } + /** + * Return review quote totals + * + * @return array + */ public function getTotals() { -// $totals = $this->getAddress()->getTotals(); -// $totalsFilter = new Varien_Filter_Object_Grid(); -// $totalsFilter->addFilter(Mage::app()->getStore()->getPriceFilter(), 'value'); -// return $totalsFilter->filter($totals); return $this->getReview()->getQuote()->getTotals(); } } diff --git a/app/code/core/Mage/Paypal/Block/Link/Shortcut.php b/app/code/core/Mage/Paypal/Block/Link/Shortcut.php index 5d1ee5ae0d..8557cfa2c6 100644 --- a/app/code/core/Mage/Paypal/Block/Link/Shortcut.php +++ b/app/code/core/Mage/Paypal/Block/Link/Shortcut.php @@ -33,19 +33,72 @@ */ class Mage_Paypal_Block_Link_Shortcut extends Mage_Core_Block_Template { + protected $_method = null; + + /** + * Return checkout url as click action to button + * + * @return string + */ public function getCheckoutUrl() { return $this->getUrl('paypal/express/shortcut', array('_secure'=>true)); } + + /** + * Return payment model object + * + * @return Mage_Paypal_Model_Express + */ + public function getPayment() + { + if (empty($this->_method)) { + $this->_method = Mage::getModel('paypal/express'); + } + return $this->_method; + } + + /** + * Return image url based on configuration data + * + * @return string + */ public function getImageUrl() { $locale = Mage::app()->getLocale()->getLocaleCode(); - if (strpos('en_GB', $locale)===false) { - $locale = 'en_US'; - } + $quote = Mage::getSingleton('checkout/session')->getQuote(); - return 'https://www.paypal.com/'.$locale.'/i/btn/btn_xpressCheckout.gif'; + + if ($this->getPayment()->getApi()->getStyleConfigData('button_flavor') == Mage_Paypal_Model_Api_Abstract::BUTTON_FLAVOR_DYNAMIC) { + if ($this->getPayment()->getApi()->getSandboxFlag()) { + $url = 'https://fpdbs.sandbox.paypal.com/dynamicimageweb?cmd=_dynamic-image&locale=' . $locale; + } else { + $url = 'https://fpdbs.paypal.com/dynamicimageweb?cmd=_dynamic-image&locale=' . $locale; + } + + $orderTotal = $quote->getGrandTotal(); + if ($orderTotal) { + $url .= '&ordertotal=' . $orderTotal; + } + + $pal = $this->getPayment()->getPalDetails(); + if ($pal) { + $url .= '&pal=' . $pal; + } + + $buttonType = $this->getPayment()->getApi()->getStyleConfigData('button_type'); + if ($buttonType) { + $url .= '&buttontype=' . $buttonType; + } + + return $url; + } else { + if (strpos('en_GB', $locale)===false) { + $locale = 'en_US'; + } + return 'https://www.paypal.com/'.$locale.'/i/btn/btn_xpressCheckout.gif'; + } } /** diff --git a/app/code/core/Mage/Paypal/Block/Standard/Form.php b/app/code/core/Mage/Paypal/Block/Standard/Form.php index d6e5ddb962..f0d874b160 100644 --- a/app/code/core/Mage/Paypal/Block/Standard/Form.php +++ b/app/code/core/Mage/Paypal/Block/Standard/Form.php @@ -24,12 +24,20 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ +/** + * Display PayPal Standard payment form + */ class Mage_Paypal_Block_Standard_Form extends Mage_Payment_Block_Form { + /** + * Setup template url for PayPal Standsrd payment form + * @return Mage_Paypal_Block_Standard_Form + */ protected function _construct() { $this->setTemplate('paypal/standard/form.phtml'); parent::_construct(); + return $this; } } diff --git a/app/code/core/Mage/Paypal/Block/Standard/Redirect.php b/app/code/core/Mage/Paypal/Block/Standard/Redirect.php index f634b2629f..48540057a7 100644 --- a/app/code/core/Mage/Paypal/Block/Standard/Redirect.php +++ b/app/code/core/Mage/Paypal/Block/Standard/Redirect.php @@ -39,7 +39,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/Helper/Currency.php b/app/code/core/Mage/Paypal/Helper/Currency.php new file mode 100644 index 0000000000..7c726703c1 --- /dev/null +++ b/app/code/core/Mage/Paypal/Helper/Currency.php @@ -0,0 +1,230 @@ + '784', + 'AFN' => '971', + 'ALL' => '008', + 'AMD' => '051', + 'ANG' => '532', + 'AOA' => '973', + 'ARS' => '032', + 'AUD' => '036', + 'AWG' => '533', + 'AZN' => '944', + 'BAM' => '977', + 'BBD' => '052', + 'BDT' => '050', + 'BGN' => '975', + 'BHD' => '048', + 'BIF' => '108', + 'BMD' => '060', + 'BND' => '096', + 'BOB' => '068', + 'BOV' => '984', + 'BRL' => '986', + 'BSD' => '044', + 'BTN' => '064', + 'BWP' => '072', + 'BYR' => '974', + 'BZD' => '084', + 'CAD' => '124', + 'CDF' => '976', + 'CHE' => '947', + 'CHF' => '756', + 'CHW' => '948', + 'CLF' => '990', + 'CLP' => '152', + 'CNY' => '156', + 'COP' => '170', + 'COU' => '970', + 'CRC' => '188', + 'CUC' => '931', + 'CUP' => '192', + 'CVE' => '132', + 'CZK' => '203', + 'DJF' => '262', + 'DKK' => '208', + 'DOP' => '214', + 'DZD' => '012', + 'EEK' => '233', + 'EGP' => '818', + 'ERN' => '232', + 'ETB' => '230', + 'EUR' => '978', + 'FJD' => '242', + 'FKP' => '238', + 'GBP' => '826', + 'GEL' => '981', + 'GHS' => '936', + 'GIP' => '292', + 'GMD' => '270', + 'GNF' => '324', + 'GTQ' => '320', + 'GYD' => '328', + 'HKD' => '344', + 'HNL' => '340', + 'HRK' => '191', + 'HTG' => '332', + 'HUF' => '348', + 'IDR' => '360', + 'ILS' => '376', + 'INR' => '356', + 'IQD' => '368', + 'IRR' => '364', + 'ISK' => '352', + 'JMD' => '388', + 'JOD' => '400', + 'JPY' => '392', + 'KES' => '404', + 'KGS' => '417', + 'KHR' => '116', + 'KMF' => '174', + 'KPW' => '408', + 'KRW' => '410', + 'KWD' => '414', + 'KYD' => '136', + 'KZT' => '398', + 'LAK' => '418', + 'LBP' => '422', + 'LKR' => '144', + 'LRD' => '430', + 'LSL' => '426', + 'LTL' => '440', + 'LVL' => '428', + 'LYD' => '434', + 'MAD' => '504', + 'MDL' => '498', + 'MGA' => '969', + 'MKD' => '807', + 'MMK' => '104', + 'MNT' => '496', + 'MOP' => '446', + 'MRO' => '478', + 'MUR' => '480', + 'MVR' => '462', + 'MWK' => '454', + 'MXN' => '484', + 'MXV' => '979', + 'MYR' => '458', + 'MZN' => '943', + 'NAD' => '516', + 'NGN' => '566', + 'NIO' => '558', + 'NOK' => '578', + 'NPR' => '524', + 'NZD' => '554', + 'OMR' => '512', + 'PAB' => '590', + 'PEN' => '604', + 'PGK' => '598', + 'PHP' => '608', + 'PKR' => '586', + 'PLN' => '985', + 'PYG' => '600', + 'QAR' => '634', + 'RON' => '946', + 'RSD' => '941', + 'RUB' => '643', + 'RWF' => '646', + 'SAR' => '682', + 'SBD' => '090', + 'SCR' => '690', + 'SDG' => '938', + 'SEK' => '752', + 'SGD' => '702', + 'SHP' => '654', + 'SLL' => '694', + 'SOS' => '706', + 'SRD' => '968', + 'STD' => '678', + 'SYP' => '760', + 'SZL' => '748', + 'THB' => '764', + 'TJS' => '972', + 'TMT' => '934', + 'TND' => '788', + 'TOP' => '776', + 'TRY' => '949', + 'TTD' => '780', + 'TWD' => '901', + 'TZS' => '834', + 'UAH' => '980', + 'UGX' => '800', + 'USD' => '840', + 'USN' => '997', + 'USS' => '998', + 'UYU' => '858', + 'UZS' => '860', + 'VEF' => '937', + 'VND' => '704', + 'VUV' => '548', + 'WST' => '882', + 'XAF' => '950', + 'XAG' => '961', + 'XAU' => '959', + 'XBA' => '955', + 'XBB' => '956', + 'XBC' => '957', + 'XBD' => '958', + 'XCD' => '951', + 'XDR' => '960', + 'XOF' => '952', + 'XPD' => '964', + 'XPF' => '953', + 'XPT' => '962', + 'XTS' => '963', + 'XXX' => '999', + 'YER' => '886', + 'ZAR' => '710', + 'ZMK' => '894', + 'ZWL' => '932', + ); + + /** + * By using mapping array get numeric code by alphabetical code + * + * @param $code string + * @return string + * @throws Mage_Core_Exception + */ + public function getIso4217CurrencyCode($code) + { + if (!empty($this->_isoMap[$code])) { + return $this->_isoMap[$code]; + } + Mage::throwException(Mage::helper('paypal')->__('Not supported currency code %s.', $code)); + } +} diff --git a/app/code/core/Mage/Paypal/Helper/Data.php b/app/code/core/Mage/Paypal/Helper/Data.php index b027bc07c6..442ac05c31 100644 --- a/app/code/core/Mage/Paypal/Helper/Data.php +++ b/app/code/core/Mage/Paypal/Helper/Data.php @@ -25,9 +25,42 @@ */ /** - * Paypal data helper + * Paypal Data helper */ class Mage_Paypal_Helper_Data extends Mage_Core_Helper_Abstract { + //@ phpdoc + protected $_logoList = array( + 'de_DE' => 'https://www.paypal.com/de_DE/DE/i/logo/lockbox_150x65.gif', + 'en_GB' => 'https://www.paypal.com/en_GB/i/bnr/vertical_solution_PP.gif', + 'en_US' => 'https://www.paypal.com/en_US/i/bnr/horizontal_solution_PP.gif', + 'fr_FR' => 'https://www.paypal.com/fr_FR/FR/i/bnr/bnr_wePrefer_150x60.gif', + 'it_IT' => 'https://www.paypal.com/it_IT/IT/i/bnr/bnr_horizontal_solution_PP_178wx80h.gif', + 'es_ES' => 'https://www.paypal.com/en_US/ES/i/bnr/bnr_horizontal_solution_PP_178wx80h.gif', + ); + /** + * Return logo url by given locale code + * + * @return string + */ + public function getLogo() + { + $locale = Mage::app()->getLocale()->getLocaleCode(); + if (!empty($this->_logoList[$locale])) { + return $this->_logoList[$locale]; + } else { + return $this->_logoList['en_US']; + } + } + + /** + * Return user language + * + * @return string + */ + public function getLanguage() + { + return substr(Mage::app()->getLocale()->getLocaleCode(), 0, 2); + } } diff --git a/app/code/core/Mage/Paypal/Model/Abstract.php b/app/code/core/Mage/Paypal/Model/Abstract.php index 84521d826e..cf80322737 100644 --- a/app/code/core/Mage/Paypal/Model/Abstract.php +++ b/app/code/core/Mage/Paypal/Model/Abstract.php @@ -72,6 +72,11 @@ public function getQuote() return $this->getCheckout()->getQuote(); } + /** + * Return Api redirect url + * + * @return string + */ public function getRedirectUrl() { return $this->getApi()->getRedirectUrl(); diff --git a/app/code/core/Mage/Paypal/Model/Api/Abstract.php b/app/code/core/Mage/Paypal/Model/Api/Abstract.php index 948e23a9ea..c3eebc9016 100644 --- a/app/code/core/Mage/Paypal/Model/Api/Abstract.php +++ b/app/code/core/Mage/Paypal/Model/Api/Abstract.php @@ -43,7 +43,48 @@ abstract class Mage_Paypal_Model_Api_Abstract extends Varien_Object const USER_ACTION_COMMIT = 'commit'; const USER_ACTION_CONTINUE = 'continue'; + const USER_GIROPAY_REDIRECT = 'giropay_redirect'; + + const SOLUTION_TYPE_SOLE = 'Sole'; + const SOLUTION_TYPE_MARK = 'Mark'; + + const ACTION_ACCEPT = 'Acept'; + const ACTION_DENY = 'Deny'; + + const BUTTON_TYPE_DEFAULT = 'ec-shortcut'; + const BUTTON_TYPE_ACCEPTANCE = 'ec-mark'; + const BUTTON_FLAVOR_STATIC = 'static'; + const BUTTON_FLAVOR_DYNAMIC = 'dynamic'; + + const FRAUD_ERROR_CODE = 11610; + + const AVS_RESPONSE_MATCH = 'Y'; + const AVS_RESPONSE_NO_MATCH = 'N'; + const AVS_RESPONSE_NO_CARDHOLDER = 'X'; + const AVS_RESPONSE_ALL = 0; + const AVS_RESPONSE_NONE = 1; + const AVS_RESPONSE_PARTIAL = 2; + const AVS_RESPONSE_NOT_PROCESSED = 3; + const AVS_RESPONSE_NOT_AVAILIABLE = 4; + + const CVV_RESPONSE_MATCH_CC = 'M'; + const CVV_RESPONSE_MATCH_SOLO = 0; + const CVV_RESPONSE_NOT_MATCH_CC = 'N'; + const CVV_RESPONSE_NOT_MATCH_SOLO = 1; + const CVV_RESPONSE_NOT_PROCESSED_CC = 'P'; + const CVV_RESPONSE_NOT_IMPLEMENTED_SOLO = 2; + const CVV_RESPONSE_NOT_SUPPORTED_CC = 'S'; + const CVV_RESPONSE_NOT_PRESENT_SOLO = 3; + const CVV_RESPONSE_NOT_AVAILIBLE_CC = 'U'; + const CVV_RESPONSE_NOT_AVAILIBLE_SOLO = 4; + const CVV_RESPONSE_NOT_RESPONSE_CC = 'X'; + + /** + * return server name from as server variable + * + * @return string + */ public function getServerName() { if (!$this->hasServerName()) { @@ -52,14 +93,37 @@ public function getServerName() return $this->getData('server_name'); } + /** + * Return config data based on paymethod, store id + * + * @return string + */ public function getConfigData($key, $default=false, $storeId = null) + { + return $this->getGeneralConfigData($key, $default, $storeId, 'paypal/wpp/'); + } + + /** + * Get PayPal Account Style Configuration + * + */ + public function getStyleConfigData($key, $default=false, $storeId = null) + { + return $this->getGeneralConfigData($key, $default, $storeId, 'paypal/style/'); + } + + /** + * Return config data by give path, key, default and store Id + * + */ + public function getGeneralConfigData($key, $default=false, $storeId = null, $path = 'paypal/wpp/') { if (!$this->hasData($key)) { if ($storeId === null && $this->getPayment() instanceof Varien_Object) { $storeId = $this->getPayment()->getOrder()->getStoreId(); } - $value = Mage::getStoreConfig('paypal/wpp/'.$key, $storeId); - if (is_null($value) || false===$value) { + $value = Mage::getStoreConfig($path . $key, $storeId); + if (empty($value)) { $value = $default; } $this->setData($key, $value); @@ -67,11 +131,21 @@ public function getConfigData($key, $default=false, $storeId = null) return $this->getData($key); } + /** + * Return paypal session model + * + * @return Mage_Paypal_Model_Session + */ public function getSession() { return Mage::getSingleton('paypal/session'); } + /** + * Flag which check if we are use session or not. + * + * @return bool + */ public function getUseSession() { if (!$this->hasData('use_session')) { @@ -80,6 +154,14 @@ public function getUseSession() return $this->getData('use_session'); } + /** + * Return data from session based on key and default value + * + * @param $key string + * @param $default string + * + * @return string + */ public function getSessionData($key, $default=false) { if (!$this->hasData($key)) { @@ -94,6 +176,14 @@ public function getSessionData($key, $default=false) return $this->getData($key); } + /** + * Set data in session scope + * + * @param $key string + * @param $value string + * + * @return Mage_Paypal_Model_Api_Abstract + */ public function setSessionData($key, $value) { if ($this->getUseSession()) { @@ -103,51 +193,101 @@ public function setSessionData($key, $value) return $this; } + /** + * Return sandbox flag state, by config + * + * @return bool + */ public function getSandboxFlag() { return $this->getConfigData('sandbox_flag', true); } + /** + * Return Paypal Api user name based on config data + * + * @return string + */ public function getApiUsername() { return $this->getConfigData('api_username'); } + /** + * Return Paypal Api password based on config data + * + * @return string + */ public function getApiPassword() { return $this->getConfigData('api_password'); } + /** + * Return Paypal Api signature based on config data + * + * @return string + */ public function getApiSignature() { return $this->getConfigData('api_signature'); } + /** + * Return Paypal Express check out button source + * + * @return string + */ public function getButtonSourceEc() { return $this->getConfigData('button_source_ec', 'Varien_Cart_EC_US'); } + /** + * Return Paypal direct payment button source + * + * @return string + */ public function getButtonSourceDp() { return $this->getConfigData('button_source_dp', 'Varien_Cart_DP_US'); } + /** + * Return Paypal Api proxy status based on config data + * + * @return bool + */ public function getUseProxy() { return $this->getConfigData('use_proxy', false); } + /** + * Return Paypal Api proxy host based on config data + * + * @return string + */ public function getProxyHost() { return $this->getConfigData('proxy_host', '127.0.0.1'); } + /** + * Return Paypal Api proxy port based on config data + * + * @return string + */ public function getProxyPort() { return $this->getConfigData('proxy_port', '808'); } + /** + * Return Paypal Api debug flag based on config data + * + * @return bool + */ public function getDebug() { return $this->getConfigData('debug_flag', true); @@ -173,6 +313,16 @@ public function getReturnUrl() return Mage::getUrl($this->getConfigData('api_return_url', 'paypal/express/return')); } + /** + * Your URL for receiving Instant Payment Notification + * + * @return string + */ + public function getNotifyUrl($orderId, $method='express') + { + return Mage::getUrl($this->getConfigData('api_notify_url', 'paypal/' . $method . '/notify'), array('invoice' => $orderId)); + } + /** * The page where buyers return to when they cancel the payment review on PayPal * @@ -183,6 +333,50 @@ public function getCancelUrl() return Mage::getUrl($this->getConfigData('api_cancel_url', 'paypal/express/cancel')); } + /** + * The page where buyer return to continue giropay transaction + * + * @return string + */ + public function getGiropayRedirectUrl() + { + if ($this->getSandboxFlag()) { + $redirect = 'https://www.sandbox.paypal.com/'; + } else { + $redirect = 'https://www.paypal.com/'; + } + $redirect .= 'webscr?cmd=_complete-express-checkout&token=%s'; + return $redirect; + } + + /** + * The URL on the merchant site to redirect to after a giropay or bank transfer payment is cancelled or fails. + * Use this field only if you are using giropay or bank transfer payment methods in Germany + * + */ + public function getGiropayCancelUrl() + { + return Mage::getUrl($this->getConfigData('giropay_cancel_url', 'paypal/express/cancel')); + } + + /** + * The URL on the merchant site to redirect to after a successful giropay payment. + * Use this field only if you are using giropay or bank transfer payment methods in Germany. + */ + public function getGiropaySuccessUrl() + { + return Mage::getUrl($this->getConfigData('giropay_success_url', 'checkout/onepage/success')); + } + + /** + * The URL on the merchant site to transfer to after a bank transfer payment. + * Use this field only if you are using giropay or bank transfer payment methods in Germany. + */ + public function getGiropayBankTxnPendingUrl() + { + return Mage::getUrl($this->getConfigData('giropay_bank_pending', 'paypal/express/bank')); + } + /** * Decide whether to return from Paypal EC before payment was made or after * @@ -193,6 +387,11 @@ public function getUserAction() return $this->getSessionData('user_action', self::USER_ACTION_CONTINUE); } + /** + * Return user action based on paypal reqponse process + * + * @return string + */ public function setUserAction($data) { return $this->setSessionData('user_action', $data); @@ -208,36 +407,82 @@ public function getToken() return $this->getSessionData('token'); } + /** + * Set tiken value in session + * + * @package $data string + * + * @return Mage_Paypal_Model_Api_Abstract + */ public function setToken($data) { return $this->setSessionData('token', $data); } + /** + * Return transaction id from session + * + * @return string + */ public function getTransactionId() { return $this->getSessionData('transaction_id'); } + /** + * Set transaction id in session + * + * @param $data string + * + * @return Mage_Paypal_Model_Api_Abstract + * + */ public function setTransactionId($data) { return $this->setSessionData('transaction_id', $data); } + /** + * Get authorization id from session data + * + * @return string + */ public function getAuthorizationId() { return $this->getSessionData('authorization_id'); } + /** + * Set authorization id in session + * + * @param $data string + * + * @return Mage_Paypal_Model_Api_Abstract + * + */ public function setAuthorizationId($data) { return $this->setSessionData('authorization_id', $data); } + /** + * Return payer id from session + * + * @return string + */ public function getPayerId() { return $this->getSessionData('payer_id'); } + /** + * Set payer id in session + * + * @param $data string + * + * @return Mage_Paypal_Model_Api_Abstract + * + */ public function setPayerId($data) { return $this->setSessionData('payer_id', $data); @@ -253,6 +498,14 @@ public function getCompleteType() return $this->getSessionData('complete_type'); } + /** + * Set Complite type code in session + * + * @param $data string + * + * @return Mage_Paypal_Model_Api_Abstract + * + */ public function setCompleteType($data) { return $this->setSessionData('complete_type', $data); @@ -268,6 +521,13 @@ public function getPaymentType() return $this->getSessionData('payment_type'); } + /** + * Set payment type in session as paypal response comes result + * + * @param $data string + * + * @return Mage_Paypal_Model_Api_Abstract + */ public function setPaymentType($data) { return $this->setSessionData('payment_type', $data); @@ -285,18 +545,38 @@ public function getAmount() return $this->getSessionData('amount'); } - public function setAmount($data) + /** + * Set payment amount in session + * + * @param $data string + * + * @return Mage_Paypal_Model_Api_Abstract + */ + public function setAmount($amount) { - $data = sprintf('%.2f', $data); - return $this->setSessionData('amount', $data); + $amount = sprintf('%.2F', $amount); + return $this->setSessionData('amount', $amount); } + /** + * Return currency code from session data + * + * @return string + */ public function getCurrencyCode() { //return $this->getSessionData('currency_code', 'USD'); return $this->getSessionData('currency_code', Mage::app()->getStore()->getBaseCurrencyCode()); } + /** + * Set currency code in session + * + * @param $data string + * + * @return Mage_Paypal_Model_Api_Abstract + */ + public function setCurrencyCode($data) { return $this->setSessionData('currency_code', $data); @@ -312,29 +592,133 @@ public function getRefundType() return $this->getSessionData('refund_type'); } + /** + * Set payment return type in session as a result of paypal response come + * + * @param $data string + * + * @return Mage_Paypal_Model_Api_Abstract + */ public function setRefundType($data) { return $this->setSessionData('refund_type', $data); } + /** + * Return paypal request errors, get error message from response and set in session + * + * @return string + */ public function getError() { return $this->getSessionData('error'); } + + /** + * Error message getter intended to be based on error session data + * @return string + */ + public function getErrorMessage() + { + return ''; + } + + /** + * Set paypal request error data in session + * + * @param $data string + * + * @return Mage_Paypal_Model_Api_Abstract + */ public function setError($data) { return $this->setSessionData('error', $data); } + /** + * Return ccType title by given type code + * + * @return string + */ public function getCcTypeName($ccType) { $types = array('AE'=>Mage::helper('paypal')->__('Amex'), 'VI'=>Mage::helper('paypal')->__('Visa'), 'MC'=>Mage::helper('paypal')->__('MasterCard'), 'DI'=>Mage::helper('paypal')->__('Discover')); return isset($types[$ccType]) ? $types[$ccType] : false; } + /** + * Reset session error scope + * + * @return Mage_Paypal_Model_Api_Abstract + */ public function unsError() { return $this->setSessionData('error', null); } + + /** + * Get AVS proper text by given AVS response code + * + * @return string + */ + public function getAvsDetail($avsCode) + { + switch ($avsCode) { + case self::AVS_RESPONSE_MATCH: + return Mage::helper('paypal')->__('All the address information matched.'); + case self::AVS_RESPONSE_NONE: + case self::AVS_RESPONSE_NO_MATCH: + return Mage::helper('paypal')->__('None of the address information matched.'); + case self::AVS_RESPONSE_PARTIAL : + return Mage::helper('paypal')->__('Part of the address information matched.'); + case self::AVS_RESPONSE_NOT_AVAILIABLE : + return Mage::helper('paypal')->__('Address not checked, or acquirer had no response. Service not available.'); + case self::AVS_RESPONSE_NO_CARDHOLDER: + return Mage::helper('paypal')->__('Cardholder\'s bank doesn\'t support address verification'); + case self::AVS_RESPONSE_NOT_PROCESSED : + return Mage::helper('paypal')->__('The merchant did not provide AVS information. Not processed.'); + default: + if ($avsCode === self::AVS_RESPONSE_ALL) { + return Mage::helper('paypal')->__('All the address information matched.'); + } else { + return ''; + } + } + } + + /** + * Return mapped CVV text by given cvv code + * + * @return string + */ + public function getCvvDetail($cvvCode) + { + switch ($cvvCode) { + case self::CVV_RESPONSE_MATCH_CC: + return Mage::helper('paypal')->__('Matched'); + case self::CVV_RESPONSE_NOT_MATCH_CC: + case self::CVV_RESPONSE_NOT_MATCH_SOLO: + return Mage::helper('paypal')->__('No match'); + case self::CVV_RESPONSE_NOT_PROCESSED_CC : + return Mage::helper('paypal')->__('Not processed'); + case self::CVV_RESPONSE_NOT_IMPLEMENTED_SOLO : + return Mage::helper('paypal')->__('The merchant has not implemented CVV2 code handling'); + case self::CVV_RESPONSE_NOT_SUPPORTED_CC : + return Mage::helper('paypal')->__('Service not supported'); + case self::CVV_RESPONSE_NOT_PRESENT_SOLO : + return Mage::helper('paypal')->__('Merchant has indicated that CVV2 is not present on card'); + case self::CVV_RESPONSE_NOT_AVAILIBLE_CC : + case self::CVV_RESPONSE_NOT_AVAILIBLE_SOLO : + return Mage::helper('paypal')->__('Service not available'); + case self::CVV_RESPONSE_NOT_RESPONSE_CC : + return Mage::helper('paypal')->__('No response'); + default: + if (self::CVV_RESPONSE_MATCH_SOLO === $cvvCode) { + return Mage::helper('paypal')->__('Matched'); + } else { + return ''; + } + } + } } diff --git a/app/code/core/Mage/Paypal/Model/Api/Debug.php b/app/code/core/Mage/Paypal/Model/Api/Debug.php index c540e9b3de..4d07e08da6 100644 --- a/app/code/core/Mage/Paypal/Model/Api/Debug.php +++ b/app/code/core/Mage/Paypal/Model/Api/Debug.php @@ -25,9 +25,7 @@ */ /** - * Abstract class for Paypal Debug - * - * @author Magento Core Team + * Paypal Debug model */ class Mage_Paypal_Model_Api_Debug extends Mage_Core_Model_Abstract { diff --git a/app/code/core/Mage/Paypal/Model/Api/Nvp.php b/app/code/core/Mage/Paypal/Model/Api/Nvp.php index 9e21620e48..02282bb746 100644 --- a/app/code/core/Mage/Paypal/Model/Api/Nvp.php +++ b/app/code/core/Mage/Paypal/Model/Api/Nvp.php @@ -26,8 +26,6 @@ /** * NVP API wrappers model - * - * @author Magento Core Team */ class Mage_Paypal_Model_Api_Nvp extends Mage_Paypal_Model_Api_Abstract { @@ -36,16 +34,25 @@ class Mage_Paypal_Model_Api_Nvp extends Mage_Paypal_Model_Api_Abstract * * @var array */ - protected $_debugReplacePrivateDataKeys = array('ACCT', 'EXPDATE', 'CVV2', - 'CARDISSUE', 'CARDSTART', - 'CREDITCARDTYPE', 'USER', - 'PWD', 'SIGNATURE'); + protected $_debugReplacePrivateDataKeys = array( + 'ACCT', 'EXPDATE', 'CVV2', 'CARDISSUE', 'CARDSTART', 'CREDITCARDTYPE', 'USER', 'PWD', 'SIGNATURE' + ); + /** + * Return page style for given paymethod + * + * @return string + */ public function getPageStyle() { - return $this->getConfigData('page_style'); + return $this->getStyleConfigData('page_style'); } + /** + * Return Api endpoint url. used for direct paypal requests + * + * @return string + */ public function getApiEndpoint() { if (!$this->getData('api_endpoint')) { @@ -59,6 +66,12 @@ public function getApiEndpoint() return $this->getData('api_endpoint'); } + /** + * return paypal sandbox url, depending of sendbox flag. + * used for redirect to paypal, express method + * + * @return string + */ public function getPaypalUrl() { if (!$this->hasPaypalUrl()) { @@ -76,11 +89,35 @@ public function getPaypalUrl() return $url . $this->getToken(); } + /** + * Return Paypal Api version + * + * @return string + */ public function getVersion() { - return '3.0'; + return '60.0'; } + /** + * Set redirect requered valie in session + * + * @return Mage_Paypal_Model_Api_Nvp + */ + public function setRedirectRequered($value) + { + $this->getSession()->setData('redirect_requered',$value); + return $this; + } + + /** + * + * Return redirect_requesred element from session + */ + public function getRedirectRequered() + { + return $this->getSession()->getData('redirect_requered'); + } /** * SetExpressCheckout API call * @@ -98,11 +135,16 @@ public function callSetExpressCheckout() $nvpArr = array( 'PAYMENTACTION' => $this->getPaymentType(), - 'AMT' => $this->getAmount(), + 'AMT' => (float) $this->getAmount(), 'CURRENCYCODE' => $this->getCurrencyCode(), 'RETURNURL' => $this->getReturnUrl(), 'CANCELURL' => $this->getCancelUrl(), - 'INVNUM' => $this->getInvNum() + 'INVNUM' => $this->getInvNum(), + 'HDRIMG' => $this->getStyleConfigData('paypal_hdrimg'), + 'HDRBORDERCOLOR' => $this->getStyleConfigData('paypal_hdrbordercolor'), + 'HDRBACKCOLOR' => $this->getStyleConfigData('paypal_hdrbackcolor'), + 'PAYFLOWCOLOR' => $this->getStyleConfigData('paypal_payflowcolor'), + 'LOCALECODE' => Mage::app()->getLocale()->getLocaleCode() ); if ($this->getPageStyle()) { @@ -111,6 +153,23 @@ public function callSetExpressCheckout() )); } + $nvpArr = array_merge($nvpArr, array( + 'GIROPAYCANCELURL' => $this->getGiropayCancelUrl(), + 'GIROPAYSUCCESSURL' => $this->getGiropaySuccessUrl(), + 'BANKTXNPENDINGURL' => $this->getGiropayBankTxnPendingUrl(), + )); + + if ($this->getSolutionType()) { + $nvpArr = array_merge($nvpArr, array( + 'SOLUTIONTYPE' => $this->getSolutionType(), + )); + } + + if ($lineItems = $this->getLineItems()) { + $lineItemArray = $this->_prepareLineItem($lineItems, $this->getItemAmount(), $this->getItemTaxAmount(), $this->getShippingAmount(), $this->getDiscountAmount()); + $nvpArr = array_merge($nvpArr, $lineItemArray); + } + $this->setUserAction(self::USER_ACTION_CONTINUE); // for mark SetExpressCheckout API call @@ -185,22 +244,39 @@ function callGetExpressCheckoutDetails() return false; } - $this->setPayerId($resArr['PAYERID']); + if (!empty($resArr['PAYERID'])) { + $this->setPayerId($resArr['PAYERID']); + } + if (!empty($resArr['PAYERSTATUS'])) { + $this->setAccountStatus($resArr['PAYERSTATUS']); + } + $this->setCorrelationId($resArr['CORRELATIONID']); - $this->setPayerStatus($resArr['PAYERSTATUS']); + if (!empty($resArr['PAYERSTATUS'])) { + $this->setPayerStatus($resArr['PAYERSTATUS']); + } if (isset($resArr['ADDRESSID'])) { $this->setAddressId($resArr['ADDRESSID']); } + $this->setAddressStatus($resArr['ADDRESSSTATUS']); $this->setPaypalPayerEmail($resArr['EMAIL']); if (!$this->getShippingAddress()) { $this->setShippingAddress(Mage::getModel('customer/address')); } + $a = $this->getShippingAddress(); $a->setEmail($resArr['EMAIL']); - $a->setFirstname($resArr['FIRSTNAME']); - $a->setLastname($resArr['LASTNAME']); + if (isset($resArr['SHIPTONAME']) && $resArr['SHIPTONAME']) { + $data = explode(' ', $resArr['SHIPTONAME']); + $a->setFirstname($data[0]); + $a->setLastname(isset($data[1]) ? $data[1] : $resArr['LASTNAME']); + } else { + $a->setFirstname($resArr['FIRSTNAME']); + $a->setLastname($resArr['LASTNAME']); + } + $street = array($resArr['SHIPTOSTREET']); if (isset($resArr['SHIPTOSTREET2'])) { $street[] = $resArr['SHIPTOSTREET2']; @@ -211,6 +287,11 @@ function callGetExpressCheckoutDetails() $a->setPostcode($resArr['SHIPTOZIP']); $a->setCountry($resArr['SHIPTOCOUNTRYCODE']); $a->setTelephone(Mage::helper('paypal')->__('N/A')); + if (!empty($resArr['REDIRECTREQUIRED']) && $resArr['REDIRECTREQUIRED']==true) { + $this->setRedirectRequered(true); + } else { + $this->setRedirectRequered(false); + } return $resArr; } @@ -238,23 +319,42 @@ public function callDoExpressCheckoutPayment() 'CURRENCYCODE' => $this->getCurrencyCode(), 'IPADDRESS' => $this->getServerName(), 'BUTTONSOURCE' => $this->getButtonSourceEc(), + 'NOTIFYURL' => $this->getNotifyUrl($this->getInvNum()), ); - /* Make the call to PayPal to finalize payment + if ($lineItems = $this->getLineItems()) { + $lineItemArray = $this->_prepareLineItem($lineItems, $this->getItemAmount(), $this->getItemTaxAmount(), $this->getShippingAmount(), $this->getDiscountAmount()); + $nvpArr = array_merge($nvpArr, $lineItemArray); + } + if ($this->getReturnFmfDetailes()) { + $nvpArr['RETURNFMFDETAILS '] = 1; + } + + /* Make the call to PayPal to finalize payment If an error occured, show the resulting errors - */ + */ $resArr = $this->call('DoExpressCheckoutPayment', $nvpArr); if (false===$resArr) { return false; } - $this->setTransactionId($resArr['TRANSACTIONID']); + if (!empty($resArr['PROTECTIONELIGIBILITY'])) { + $this->setProtectionEligibility($resArr['PROTECTIONELIGIBILITY']); + } $this->setAmount($resArr['AMT']); - + if (!empty($resArr['REDIRECTREQUIRED']) && $resArr['REDIRECTREQUIRED']==true) { + $this->setRedirectRequered(true); + }else{ + $this->setRedirectRequered(false); + } return $resArr; } + /** + * Process a credit card payment. + * + */ public function callDoDirectPayment() { $p = $this->getPayment(); @@ -271,7 +371,6 @@ public function callDoDirectPayment() 'CURRENCYCODE' => $this->getCurrencyCode(), 'BUTTONSOURCE' => $this->getButtonSourceDp(), 'INVNUM' => $this->getInvNum(), - 'CREDITCARDTYPE' => $this->getCcTypeName($p->getCcType()), 'ACCT' => $p->getCcNumber(), 'EXPDATE' => sprintf('%02d%02d', $p->getCcExpMonth(), $p->getCcExpYear()), @@ -293,9 +392,25 @@ public function callDoDirectPayment() 'SHIPTOSTATE' => ($s->getRegionCode() ? $s->getRegionCode() : $s->getRegion()), 'SHIPTOZIP' => $s->getPostcode(), 'SHIPTOCOUNTRYCODE' => $s->getCountry(), + 'NOTIFYURL' => $this->getNotifyUrl($this->getInvNum(), 'direct'), ); -#echo "
".print_r($nvpArr,1)."
"; die; + if ($this->getMpiVendor()) { + $nvpArr['AUTHSTATUS3D'] = $this->getAuthStatus(); + $nvpArr['MPIVENDOR3DS'] = $this->getMpiVendor(); + $nvpArr['CAVV'] = $this->getCavv(); + $nvpArr['ECI3DS'] = $this->getEci3d(); + $nvpArr['XID'] = $this->getXid(); + } + if ($this->getReturnFmfDetails()) { + $nvpArr['RETURNFMFDETAILS '] = 1; + } + + if ($lineItems = $this->getLineItems()) { + $lineItemArray = $this->_prepareLineItem($lineItems, $this->getItemAmount(), $this->getItemTaxAmount(), $this->getShippingAmount(), $this->getDiscountAmount()); + $nvpArr = array_merge($nvpArr, $lineItemArray); + } + $resArr = $this->call('DoDirectPayment', $nvpArr); if (false===$resArr) { @@ -310,6 +425,10 @@ public function callDoDirectPayment() return $resArr; } + /** + * Made additional request to paypal to get autharization id + * + */ public function callDoReauthorization() { $nvpArr = array( @@ -324,11 +443,18 @@ public function callDoReauthorization() return false; } + if (!empty($resArr['PROTECTIONELIGIBILITY'])) { + $this->setProtectionEligibility($resArr['PROTECTIONELIGIBILITY']); + } $this->setAuthorizationId($resArr['AUTHORIZATIONID']); return $resArr; } + /** + * Capture an authorized payment + * + */ public function callDoCapture() { $nvpArr = array( @@ -346,6 +472,12 @@ public function callDoCapture() return false; } + if (!empty($resArr['PAYERSTATUS'])) { + $this->setAccountStatus($resArr['PAYERSTATUS']); + } + if (!empty($resArr['PROTECTIONELIGIBILITY'])) { + $this->setProtectionEligibility($resArr['PROTECTIONELIGIBILITY']); + } $this->setAuthorizationId($resArr['AUTHORIZATIONID']); $this->setTransactionId($resArr['TRANSACTIONID']); $this->setPaymentStatus($resArr['PAYMENTSTATUS']); @@ -355,6 +487,10 @@ public function callDoCapture() return $resArr; } + /** + * Void an order or an authorization. + * + */ public function callDoVoid() { $nvpArr = array( @@ -373,6 +509,10 @@ public function callDoVoid() return $resArr; } + /** + * Obtain information about a specific transaction. + * + */ public function callGetTransactionDetails() { $nvpArr = array( @@ -385,6 +525,7 @@ public function callGetTransactionDetails() return false; } + $this->setRedirectRequered($resArr['REDIRECTREQUIRED']); $this->setPayerEmail($resArr['RECEIVEREMAIL']); $this->setPayerId($resArr['PAYERID']); $this->setFirstname($resArr['FIRSTNAME']); @@ -393,11 +534,21 @@ public function callGetTransactionDetails() $this->setParentTransactionId($resArr['PARENTTRANSACTIONID']); $this->setCurrencyCode($resArr['CURRENCYCODE']); $this->setAmount($resArr['AMT']); - $this->setPaymentStatus($resArr['PAYERSTATUS']); + if (!empty($resArr['PAYERSTATUS'])) { + $this->setPaymentStatus($resArr['PAYERSTATUS']); + $this->setAccountStatus($resArr['PAYERSTATUS']); + } + if (!empty($resArr['PROTECTIONELIGIBILITY'])) { + $this->setProtectionEligibility($resArr['PROTECTIONELIGIBILITY']); + } return $resArr; } + /** + * Issue a refund to the PayPal account holder associatedwith a transaction. + * + */ public function callRefundTransaction() { $nvpArr = array( @@ -422,6 +573,47 @@ public function callRefundTransaction() return $resArr; } + /** + * Manage transaction by changing staus to decline or accept. + * User for fraud check transaction + * + * @return array + */ + public function callManagePendingTransactionStatus() + { + $nvpArr = array( + 'TRANSACTIONID' => $this->getTransactionId(), + 'ACTION' => $this->getAction(), + ); + + $resArr = $this->call('ManagePendingTransactionStatus', $nvpArr); + + if (false===$resArr) { + return false; + } + + $this->setTransactionId($resArr['TRANSACTIONID']); + return $resArr; + } + + /** + * Get Pal Detailes for dynamic buttons using + * + * @return array + */ + public function callPalDetails() + { + $nvpArr = array(); + + $resArr = $this->call('getPalDetails', $nvpArr); + + if (false===$resArr) { + return false; + } + $this->setPal($resArr['PAL']); + return $this; + } + /** * Function to perform the API call to PayPal using API signature * @@ -451,6 +643,7 @@ public function call($methodName, array $nvpArr) $nvpReqDebug .= urlencode($v); } } + $nvpReq = substr($nvpReq, 1); if ($this->getDebug()) { $debug = Mage::getModel('paypal/api_debug') @@ -458,7 +651,6 @@ public function call($methodName, array $nvpArr) ->setRequestBody($nvpReqDebug) ->save(); } - $http = new Varien_Http_Adapter_Curl(); $config = array('timeout' => 30); if ($this->getUseProxy()) { @@ -494,11 +686,17 @@ public function call($methodName, array $nvpArr) $this->getSession() ->setLastCallMethod($methodName) ->setResHash($nvpResArray); - $ack = strtoupper($nvpResArray['ACK']); - if ($ack == 'SUCCESS' || $ack=='SUCCESSWITHWARNING') { $this->unsError(); + if ($ack=='SUCCESSWITHWARNING') { + //fraud checking + for ($i=0; isset($nvpResArray['L_SHORTMESSAGE'.$i]); $i++) { + if ($nvpResArray['L_ERRORCODE'.$i] == self::FRAUD_ERROR_CODE) { + $this->setIsFraud(true); + } + } + } return $nvpResArray; } @@ -553,4 +751,71 @@ public function deformatNVP($nvpstr) return $nvpArray; } + /** + * Prepare Line item array to move in paypal, canculate all fields + * + * @param $items Mage_Sales_Model_Entity_Quote_Item_Collection + * @param $shippingAmount float + * @param $discountAmount float + * + * @return array + */ + protected function _prepareLineItem($lineItems, $itemAmount, $itemTaxAmount, $shippingAmount, $discountAmount) + { + $nvpArr = array(); + $itemAmt = 0; + $taxItemAmt = 0; + foreach($lineItems as $index => $item) { + if ($item->getName() && $item->getBaseRowTotal()) { + $nvpArr['L_NAME' . $index] = $item->getName(); + $nvpArr['L_NUMBER' . $index] = $item->getProductId(); + if ($item->getBaseCalculationPrice()) { + $nvpArr['L_AMT' . $index] = (float)$item->getBaseCalculationPrice(); + } else { + $nvpArr['L_AMT' . $index] = (float)$item->getBasePrice(); + } + if ($item->getTotalQty()) { + $nvpArr['L_QTY' . $index] = $item->getTotalQty(); + $nvpArr['L_TAXAMT' . $index] = (float)($item->getBaseTaxAmount() / $item->getTotalQty()); + } else { + $nvpArr['L_QTY' . $index] = (int) $item->getQtyOrdered(); + $nvpArr['L_TAXAMT' . $index] = (float)($item->getBaseTaxAmount() / $item->getQtyOrdered()); + } + } + } + + if ($discountAmount > 0) { + $index++; + $nvpArr['L_NAME' . $index] = Mage::helper('paypal')->__('Discount'); + $nvpArr['L_NUMBER' . $index] = 0; + $nvpArr['L_AMT' . $index] = (float) $discountAmount; + $nvpArr['L_QTY' . $index] = 1; + $nvpArr['L_DESC' . $index] = Mage::helper('paypal')->__('Discount'); + $nvpArr['L_TAXAMT' . $index] = 0; + } + + $nvpArr['TAXAMT'] = (float) round($itemTaxAmount,2); + $nvpArr['ITEMAMT']= (float) ($itemAmount + $discountAmount); + $nvpArr['SHIPPINGAMT'] = (float) $shippingAmount; + return $nvpArr; + } + + /** + * Error message NVP getter + * @return string + */ + public function getErrorMessage($addErrorCode = false) + { + $e = $this->getError(); + $shortMessage = ''; + if (!isset($e['short_message'])) { + if (isset($e['code'])) { + $shortMessage = Mage::helper('paypal')->__('Unknown API error #%s', $e['code']); + } + } else { + $shortMessage = $e['short_message']; + } + $message = (isset($e['long_message']) ? sprintf('%s: %s', $shortMessage, $e['long_message']) : $shortMessage); + return ($e['code'] ? sprintf('(#%s) ', $e['code']) : '' ) . $message; + } } diff --git a/app/code/core/Mage/Paypal/Model/Config.php b/app/code/core/Mage/Paypal/Model/Config.php new file mode 100644 index 0000000000..22df2557e7 --- /dev/null +++ b/app/code/core/Mage/Paypal/Model/Config.php @@ -0,0 +1,289 @@ +setMethod($method); + if ($params) { + $storeId = array_shift($params); + $this->setStoreId($storeId); + } + } + } + + /** + * Method code setter + * + * @param string|Mage_Payment_Model_Method_Abstract $method + * @return Mage_Paypal_Model_Config + */ + public function setMethod($method) + { + if ($method instanceof Mage_Payment_Model_Method_Abstract) { + $this->_methodCode = $method->getCode(); + } elseif (is_string($method)) { + $this->_methodCode = $method; + } + return $this; + } + + /** + * Store ID setter + * @param int $storeId + * @return Mage_Paypal_Model_Config + */ + public function setStoreId($storeId) + { + $this->_storeId = $storeId; + return $this; + } + + /** + * Config field magic getter + * The specified key can be either in camelCase or under_score format + * Tries to map specified value according to set payment method code, into the configuration value + * Sets the values into public class parameters, to avoid redundant calls of this method + * + * @param string $key + * @return string|null + */ + public function __get($key) + { + $underscored = strtolower(preg_replace('/(.)([A-Z])/', "$1_$2", $key)); + $value = Mage::getStoreConfig($this->_getSpecificConfigPath($underscored), $this->_storeId); + $this->$key = $value; + $this->$underscored = $value; + return $value; + } + + /** + * Map any supported payment method into a config path by specified field name + * @param string $fieldName + * @return string|null + */ + protected function _getSpecificConfigPath($fieldName) + { + if (self::METHOD_WPS === $this->_methodCode) { + return $this->_mapStandardFieldset($fieldName); + } elseif (self::METHOD_WPP_EXPRESS === $this->_methodCode || self::METHOD_WPP_DIRECT === $this->_methodCode) { + $path = self::METHOD_WPP_EXPRESS ? $this->_mapExpressFieldset($fieldName) + : $this->_mapDirectFieldset($fieldName); + if (!$path) { + $path = $this->_mapWppFieldset($fieldName); + } + if (!$path) { + $path = $this->_mapWppStyleFieldset($fieldName); + } + return $path; + } + } + + /** + * Map PayPal Standard config fields + * + * @param string $fieldName + * @return string|null + */ + protected function _mapStandardFieldset($fieldName) + { + switch ($fieldName) + { + case 'business_account': + case 'business_name': + case 'debug_flag': + case 'sandbox_flag': + return "paypal/wps/{$fieldName}"; + case 'active': + case 'title': + case 'payment_action': + case 'types': + case 'order_status': + case 'transaction_type': + case 'sort_order': + case 'allowspecific': + case 'specificcountry': + return 'payment/' . self::METHOD_WPS . "/{$fieldName}"; + } + } + + /** + * Map PayPal Website Payments Pro common style config fields + * + * @param string $fieldName + * @return string|null + */ + protected function _mapWppStyleFieldset($fieldName) + { + switch ($fieldName) + { + case 'button_flavor': + case 'button_type': + case 'logo_url': + case 'page_style': + case 'paypal_hdrbackcolor': + case 'paypal_hdrbordercolor': + case 'paypal_hdrimg': + case 'paypal_payflowcolor': + return "paypal/style/{$fieldName}"; + } + } + + /** + * Map PayPal Website Payments Pro common config fields + * + * @param string $fieldName + * @return string|null + */ + protected function _mapWppFieldset($fieldName) + { + switch ($fieldName) + { + case 'api_password': + case 'api_signature': + case 'api_username': + case 'business_account': + case 'debug_flag': + case 'paypal_url': + case 'proxy_host': + case 'proxy_port': + case 'sandbox_flag': + case 'use_proxy': + return "paypal/wpp/{$fieldName}"; + } + } + + /** + * Map PayPal Express config fields + * + * @param string $fieldName + * @return string|null + */ + protected function _mapExpressFieldset($fieldName) + { + switch ($fieldName) + { + case 'active': + case 'allowspecific': + case 'fraud_filter': + case 'invoice_email_copy': + case 'line_item': + case 'order_status': + case 'payment_action': + case 'solution_type': + case 'sort_order': + case 'specificcountry': + case 'title': + case 'visible_on_cart': + return 'payment/' . self::METHOD_WPP_EXPRESS . "/{$fieldName}"; + } + } + + /** + * Map PayPal Direct config fields + * + * @param string $fieldName + * @return string|null + */ + protected function _mapDirectFieldset($fieldName) + { + switch ($fieldName) + { + case 'active': + case 'allowspecific': + case 'cctypes': + case 'centinel': + case 'centinel_maps_url': + case 'centinel_merchant_id': + case 'centinel_password': + case 'centinel_processor_id': + case 'centinel_timeout_connect': + case 'centinel_timeout_read': + case 'fraud_filter': + case 'line_item': + case 'order_status': + case 'payment_action': + case 'sort_order': + case 'specificcountry': + case 'title': + return 'payment/' . self::METHOD_WPP_DIRECT . "/{$fieldName}"; + } + } + + /** + * PayPal gateway submission URL getter + * + * @return string + */ + public function getPaypalUrl() + { + if ($this->sandboxFlag) { + return 'https://www.sandbox.paypal.com/cgi-bin/webscr'; + } + return 'https://www.paypal.com/cgi-bin/webscr'; + } +} diff --git a/app/code/core/Mage/Paypal/Model/Direct.php b/app/code/core/Mage/Paypal/Model/Direct.php index db78dbf9b7..2f38f18770 100644 --- a/app/code/core/Mage/Paypal/Model/Direct.php +++ b/app/code/core/Mage/Paypal/Model/Direct.php @@ -33,6 +33,8 @@ class Mage_Paypal_Model_Direct extends Mage_Payment_Model_Method_Cc { protected $_code = 'paypal_direct'; + protected $_formBlockType = 'paypal/direct_form'; + protected $_infoBlockType = 'paypal/direct_info'; /** * Availability options @@ -41,8 +43,8 @@ class Mage_Paypal_Model_Direct extends Mage_Payment_Model_Method_Cc protected $_canAuthorize = true; protected $_canCapture = true; protected $_canCapturePartial = false; - protected $_canRefund = false; - protected $_canVoid = true; + protected $_canRefund = true; + protected $_canVoid = false; protected $_canUseInternal = true; protected $_canUseCheckout = true; protected $_canUseForMultishipping = true; @@ -64,6 +66,16 @@ public function canUseForCurrency($currencyCode) return true; } + /** + * Used for enablin line item options + * + * @return string + */ + public function getLineItemEnabled() + { + return $this->getConfigData('line_item'); + } + /** * Get Paypal API Model * @@ -84,6 +96,68 @@ public function getSession() return Mage::getSingleton('paypal/session'); } + /** + * Return config value for fraud management option + * + * @return string + */ + public function getFraudFilterStatus() + { + return $this->getConfigData('fraud_filter'); + } + + /** + * Return fraud status, if fraud management enabled and api returned fraud suspicious + * we return true, we may store fraud result, otherwise return false, + * don't perform any actions with frauds + * + * @return bool + */ + public function canStoreFraud() + { + if ($this->getFraudFilterStatus() && $this->getApi()->getIsFraud()) { + return true; + } else { + return false; + } + } + + /** + * Return status if user may perform any action with fraud transaction + * + * @param $payment Varien_Object + * + * @return bool + */ + public function canManageFraud(Varien_Object $payment) + { + if ($this->getFraudFilterStatus() && $payment->getOrder()->getStatus() == $this->getConfigData('fraud_order_status')) { + return true; + } else { + return false; + } + } + + /** + * Get 3D secure checking if it enabled or disabled + * + * @return string + */ + public function get3DSecureEnabled() + { + return $this->getConfigData('centinel'); + } + + /** + * return paypal direct validation object + * are used for 3d Secure validation + * + */ + public function getValidate() + { + return Mage::getSingleton('paypal/direct_validate'); + } + /** * Get checkout session namespace * @@ -104,17 +178,33 @@ public function getQuote() return $this->getCheckout()->getQuote(); } + /** + * Return redirect url which settuped as paypal request result. + * comes in response + * + * @return string + */ public function getRedirectUrl() { return $this->getApi()->getRedirectUrl(); } + /** + * return state code + * + * return string + */ public function getCountryRegionId() { $a = $this->getApi()->getShippingAddress(); - return $this; + return $a->getRegionCode(); } + /** + * Return payment action, depends of paypal response. + * + * return string + */ public function getPaymentAction() { $paymentAction = $this->getConfigData('payment_action'); @@ -135,13 +225,21 @@ public function authorize(Varien_Object $payment, $amount) ->setPayment($payment) ->setInvNum($payment->getOrder()->getIncrementId()); + $this->_appendAdditionalToApi($payment, $api); + if ($api->callDoDirectPayment()!==false) { + if ($this->canStoreFraud()) { + $payment->setFraudFlag(true); + } + $payment - ->setStatus('APPROVED') + ->setStatus(self::STATUS_APPROVED) ->setCcTransId($api->getTransactionId()) ->setCcAvsStatus($api->getAvsCode()) + ->setCcSecureVerify((bool)$api->getXid()) ->setCcCidStatus($api->getCvv2Match()); + #$payment->getOrder()->addStatusToHistory(Mage::getStoreConfig('payment/paypal_direct/order_status')); } else { $e = $api->getError(); @@ -168,7 +266,9 @@ public function capture(Varien_Object $payment, $amount) ->setEmail($payment->getOrder()->getCustomerEmail()) ->setPayment($payment) ->setInvNum($payment->getOrder()->getIncrementId()); - ; + + $this->_appendAdditionalToApi($payment, $api); + if ($payment->getCcTransId()) { $api->setAuthorizationId($payment->getCcTransId()) ->setCompleteType('NotComplete'); @@ -177,14 +277,20 @@ public function capture(Varien_Object $payment, $amount) $result = $api->callDoDirectPayment()!==false; } if ($result) { + if ($this->canStoreFraud()) { + $payment->getOrder()->setFraudFlag(true); + } + $payment - ->setStatus('APPROVED') - //->setCcTransId($api->getTransactionId()) + ->setStatus(self::STATUS_APPROVED) + ->setAccountStatus($api->getAccountStatus()) ->setLastTransId($api->getTransactionId()) + ->setCcSecureVerify((bool)$api->getXid()) ->setCcAvsStatus($api->getAvsCode()) ->setCcCidStatus($api->getCvv2Match()); - - #$payment->getOrder()->addStatusToHistory(Mage::getStoreConfig('payment/paypal_direct/order_status')); + if ($this->canManageFraud($payment)) { + $this->updateGatewayStatus($payment, Mage_Paypal_Model_Api_Abstract::ACTION_ACCEPT); + } } else { $e = $api->getError(); if (isset($e['short_message'])) { @@ -209,13 +315,19 @@ public function onOrderValidate(Mage_Sales_Model_Order_Payment $payment) ->setPayment($payment) ->setInvNum($payment->getOrder()->getIncrementId()); + $this->_appendAdditionalToApi($payment, $api); + if ($api->callDoDirectPayment()!==false) { + if ($this->canStoreFraud()) { + $payment->getOrder()->setFraudFlag(true); + } + $payment - ->setStatus('APPROVED') - ->setCcTransId($api->getTransactionId()) + ->setStatus(self::STATUS_APPROVED) + ->setLastTransId($api->getTransactionId()) + ->setCcSecureVerify((bool)$api->getXid()) ->setCcAvsStatus($api->getAvsCode()) ->setCcCidStatus($api->getCvv2Match()); - #$payment->getOrder()->addStatusToHistory(Mage::getStoreConfig('payment/paypal_direct/order_status')); } else { $e = $api->getError(); @@ -244,11 +356,15 @@ public function onOrderValidate(Mage_Sales_Model_Order_Payment $payment) public function void(Varien_Object $payment) { $error = false; + if($payment->getVoidTransactionId()){ $api = $this->getApi(); $api->setPayment($payment); $api->setAuthorizationId($payment->getVoidTransactionId()); if ($api->callDoVoid()!==false){ + if ($this->canManageFraud($payment)) { + $this->updateGatewayStatus($payment, Mage_Paypal_Model_Api_Abstract::ACTION_DENY); + } $payment->setStatus('SUCCESS') ->setCcTransId($api->getTransactionId()); }else{ @@ -284,6 +400,9 @@ public function refund(Varien_Object $payment, $amount) ->setAmount($amount); if ($api->callRefundTransaction()!==false){ + if ($this->canManageFraud($payment)) { + $this->updateGatewayStatus($payment, Mage_Paypal_Model_Api_Abstract::ACTION_DENY); + } $payment->setStatus('SUCCESS') ->setCcTransId($api->getTransactionId()); }else{ @@ -299,4 +418,105 @@ public function refund(Varien_Object $payment, $amount) return $this; } + /** + * Process pending transaction, set status deny or approve + * @param Varien_Object $payment + * @param string $action + * @return Mage_PayPal_Model_Direct + */ + public function updateGatewayStatus(Varien_Object $payment, $action) + { + if ($payment && $action) { + if ($payment->getCcTransId()) { + $transactionId = $payment->getCcTransId(); + } else { + $transactionId = $payment->getLastTransId(); + } + $api = $this->getApi(); + $api->setAction($action) + ->setTransactionId($transactionId) + ->callManagePendingTransactionStatus(); + } + return $this; + } + + /** + * cancel payment, if it has fraud status, need to update paypal status + * + * @param Varien_Object $payment + * @return Mage_Paypal_Model_Direct + */ + public function cancel(Varien_Object $payment) + { + if ($this->canManageFraud($payment)) { + $this->updateGatewayStatus($payment, Mage_Paypal_Model_Api_Abstract::ACTION_DENY); + } + + if (!$payment->getOrder()->getInvoiceCollection()->count() && ($payment->getCcTransId() || $payment->getLastTransId())) { + if ($payment->getCcTransId()) { + $payment->setVoidTransactionId($payment->getCcTransId()); + } else { + $payment->setVoidTransactionId($payment->getLastTransId()); + } + $this->void($payment); + } + parent::cancel($payment); + return $this; + } + + + /** + * Get config paypal action url + * Used to universilize payment actions when processing payment place + * + * @return string + */ + public function getConfigPaymentAction() + { + $paymentAction = $this->getConfigData('payment_action'); + switch ($paymentAction){ + case Mage_Paypal_Model_Api_Abstract::PAYMENT_TYPE_SALE: + $paymentAction = Mage_Payment_Model_Method_Abstract::ACTION_AUTHORIZE_CAPTURE; + break; + case Mage_Paypal_Model_Api_Abstract::PAYMENT_TYPE_AUTH: + default: + $paymentAction = Mage_Payment_Model_Method_Abstract::ACTION_AUTHORIZE; + break; + } + return $paymentAction; + } + + /** + * Add additional fields to Api + * + * @param $payment Varien_Object + * @param $api Mage_PayPal_Model_Api_Nvp + * + * @return Mage_PayPal_Model_Direct + */ + protected function _appendAdditionalToApi($payment, $api) + { + if (is_object($api) && is_object($payment)) { + if ($this->getLineItemEnabled()) { + $api->setLineItems($this->getQuote()->getAllItems()) + ->setShippingAmount($payment->getOrder()->getBaseShippingAmount()) + ->setDiscountAmount($payment->getOrder()->getBaseDiscountAmount()) + ->setItemAmount($payment->getOrder()->getBaseSubtotal()) + ->setItemTaxAmount($payment->getOrder()->getTaxAmount()); + } + + if ($this->get3DSecureEnabled()) { + $api->setAuthStatus($this->getValidate()->getPaResStatus()) + ->setMpiVendor($this->getValidate()->getEnrolled()) + ->setCavv($this->getValidate()->getCavv()) + ->setEci3d($this->getValidate()->getEciFlag()) + ->setXid($this->getValidate()->getXid()); + } + + if ($this->getFraudFilterStatus()) { + $api->setReturnFmfDetails(true); + } + } + return $this; + } } diff --git a/app/code/core/Mage/Paypal/Model/Direct/Validate.php b/app/code/core/Mage/Paypal/Model/Direct/Validate.php new file mode 100644 index 0000000000..7fda511535 --- /dev/null +++ b/app/code/core/Mage/Paypal/Model/Direct/Validate.php @@ -0,0 +1,516 @@ +_thinClient)) { + $this->_thinClient = new CentinelClient(); + } + return $this->_thinClient; + } + + /** + * Return Centinel Api version + * + * @return string + */ + public function getVersion() + { + return '1.7'; + } + + /** + * Return centinel processor id, based on config data for given payment + * + * @return string + */ + public function getProcessorId() + { + return $this->getConfigData('centinel_processor_id'); + } + + /** + * Return centinel merchant id, based on config data for given payment + * + * @return string + */ + public function getMerchantId() + { + return $this->getConfigData('centinel_merchant_id'); + } + + /** + * Return centinel transaction password, based on config data for given payment + * + * @return string + */ + public function getTransactionPwd() + { + return $this->getConfigData('centinel_password'); + } + + /** + * Return centinel map url, based on config data for given payment + * + * @return string + */ + public function getMapUrl() + { + return $this->getConfigData('centinel_maps_url'); + } + + /** + * Return centinel timeout connect , based on config data for give payment + * + * @return string + */ + public function getTimeoutConnect() + { + return $this->getConfigData('centinel_timeout_connect'); + } + + /** + * Return centinel timeout read, based on config data for give payment + * + * @return string + */ + public function getTimeoutRead() + { + return $this->getConfigData('centinel_timeout_read'); + } + + /** + * Return transaction type. according centinel documetation it should be "C" + * + * @return "C" + */ + public function getTransactionType() + { + return 'C'; + } + + /** + * Return term url, witch is used for return after card holder process validation + * + * @return string + */ + public function getTermUrl() + { + $formKey = Mage::getSingleton('core/session')->getFormKey(); + if (Mage::app()->getStore()->isAdmin()) { + return Mage::getUrl('*/paypal_direct/termValidate', array('_secure' => true,'_current' => true, 'form_key' => $formKey)); + } else { + return Mage::getUrl('paypal/direct/termValidate', array('_secure' => true, 'form_key' => $formKey)); + } + } + + /** + * Get checkout session namespace + * + * @return Mage_Checkout_Model_Session + */ + public function getCheckout() + { + return Mage::getSingleton('checkout/session'); + } + + /** + * Return quoter namespace + * + * @return Mage_Sales_Model_Quote + */ + public function getQuote() + { + if (Mage::app()->getStore()->isAdmin()) { + return Mage::getSingleton('adminhtml/session_quote')->getQuote(); + } else { + return $this->getCheckout()->getQuote(); + } + } + + /** + * Return payment model + * + * @return Mage_Paypal_Model_Direct + */ + public function getPayPal() + { + return Mage::getSingleton('paypal/direct'); + } + + /** + * Retrieve information from cardinal lib configuration + * + * @param string $field + * @return mixed + */ + public function getConfigData($field, $storeId = null) + { + return $this->getPayPal()->getConfigData($field, $storeId); + } + + /** + * Return paypal session model + * + * @return Mage_Paypal_Model_Session + */ + public function getSession() + { + return $this->getPayPal()->getSession(); + } + + /** + * Set AcsUrl in session, url used for redirect customer to cardholder verification page. + * + * @return Mage_Paypal_Model_Direct_Validate + */ + public function setAcsUrl($url) + { + $this->getSession()->setData('centinel_asc_url', $url); + return $this; + } + + /** + * Get card holder url from session + * + * @return string + */ + public function getAcsUrl() + { + return $this->getSession()->getData('centinel_asc_url'); + } + + /** + * Set Enrolled status in session, url to verify lookup status + * + * @return Mage_Paypal_Model_Direct_Validate + */ + public function setEnrolled($enrolled) + { + $this->getSession()->setData('centinel_enrolled', $enrolled); + return $this; + } + + /** + * Return lookup status from session + * + * @return string + */ + public function getEnrolled() + { + return $this->getSession()->getData('centinel_enrolled'); + } + + /** + * Set Payload status in session, encrypted data, result of centinel api lookup method call + * + * @return Mage_Paypal_Model_Direct_Validate + */ + public function setPayload($payLoad) + { + $this->getSession()->setData('centinel_payload', $payLoad); + return $this; + } + + /** + * Return payload from session + * + * @return string + */ + public function getPayload() + { + return $this->getSession()->getData('centinel_payload'); + } + + /** + * Set Electronic Commerce indicator in session + * + * @return Mage_Paypal_Model_Direct_Validate + */ + public function setEciFlag($eciFlag) + { + $this->getSession()->setData('centinel_eci_flag', $eciFlag); + return $this; + } + + /** + * Return Electronic Commerce indicator from session + * + * @return string + */ + public function getEciFlag() + { + return $this->getSession()->getData('centinel_eci_flag'); + } + + /** + * Set outcome of the issuer authentication in session + * + * @return Mage_Paypal_Model_Direct_Validate + */ + public function setPaResStatus($status) + { + $this->getSession()->setData('centinel_pa_res_status', $status); + return $this; + } + + /** + * Get outcome of the issuer authentication + * + * @return string + */ + public function getPaResStatus() + { + return $this->getSession()->getData('centinel_pa_res_status'); + } + + /** + * Set status of authntication elgibility + * + * @return Mage_Paypal_Model_Direct_Validate + */ + public function setSignature($signature) + { + $this->getSession()->setData('centinel_signature', $signature); + return $this; + } + + /** + * Return status of authntication elgibility + * + * @return string + */ + public function getSignature() + { + return $this->getSession()->getData('centinel_signature'); + } + + /** + * Set cavv, result of api authentiocation in session + * A random sequence of characters. This is encoded authentication. + * + * @return Mage_Paypal_Model_Direct_Validate + */ + public function setCavv($cavv) + { + $this->getSession()->setData('centinel_cavv', $cavv); + return $this; + } + + /** + * Return Cavv value from session + * + * @return string + */ + public function getCavv() + { + return $this->getSession()->getData('centinel_cavv'); + } + + /** + * Set transaction identifier from authentication in session + * + * @return Mage_Paypal_Model_Direct_Validate + */ + public function setXid($xid) + { + $this->getSession()->setData('centinel_xid', $xid); + return $this; + } + + /** + * Get transaction identifier from session + * + * @return string + */ + public function getXid() + { + return $this->getSession()->getData('centinel_xid'); + } + + /** + * Set centinel transaction id. Transaction id within Centinel + * + * @return Mage_Paypal_Model_Direct_Validate + */ + public function setTransactionId($transactionId) + { + $this->getSession()->setData('centinel_transaction_id', $transactionId); + return $this; + } + + /** + * Return internal Centinel transaction id from session + * + * @return string + */ + public function getTransactionId() + { + return $this->getSession()->getData('centinel_transaction_id'); + } + + /** + * Set Authentication information from cardholder to session. + * it will be passed to centinel authentication request + * + * @return Mage_Paypal_Model_Direct_Validate + */ + public function setPaResPayload($payloadRes) + { + $this->getSession()->setData('centinel_pa_res_payload', $payloadRes); + return $this; + } + + /** + * Return cardholder payload information from session + * + * @return string + */ + public function getPaResPayload() + { + return $this->getSession()->getData('centinel_pa_res_payload'); + } + + /** + * Call centinel api lookup method + * + * @return Mage_Paypal_Model_Direct_Validate + */ + public function callLookup() + { + $payment = $this->getQuote()->getPayment(); + + $month = strlen($this->getCcExpMonth())==1 ? '0' . $this->getCcExpMonth() : $this->getCcExpMonth(); + + $currencyIso = ""; + + try { + $currencyIso = Mage::helper('paypal/currency')->getIso4217CurrencyCode($this->getQuote()->getBaseCurrencyCode()); + }catch (Mage_Core_Exception $e) { + $this->setErrorNo(1); + $this->setErrorDesc($e); + return $this; + } + + $lookUpArray = array( + 'Amount' => round($this->getQuote()->getBaseGrandTotal()*100), + 'CurrencyCode' => $currencyIso, + 'CardNumber' => $this->getCcNumber(), + 'CardExpMonth'=> $month, + 'CardExpYear' => $this->getCcExpYear() + ); + + if (!$this->getQuote()->getReservedOrderId()) { + $this->getQuote()->reserveOrderId(); + } + $lookUpArray['OrderNumber'] = $this->getQuote()->getReservedOrderId(); + + $clientResponse = $this->call('cmpi_lookup', $lookUpArray); + + $this->setEnrolled($clientResponse->getValue('Enrolled')); + $this->setErrorNo($clientResponse->getValue('ErrorNo')); + $this->setErrorDesc($clientResponse->getValue('ErrorDesc')); + $this->setEciFlag($clientResponse->getValue('EciFlag')); + $this->setAcsUrl($clientResponse->getValue('ACSUrl')); + $this->setPayload($clientResponse->getValue('Payload')); + $this->setOrderId($clientResponse->getValue('OrderId')); + $this->setTransactionId($clientResponse->getValue('TransactionId')); + $this->setAuthenticationPath($clientResponse->getValue('AuthenticationPath')); + $this->setTermUrl($this->getTermUrl()); + return $this; + } + + /** + * Call centinel api authentication method + * + * @return Mage_Paypal_Model_Direct_Validate + */ + public function callAuthentication() + { + $authArray = array( + 'TransactionId' => $this->getTransactionId(), + 'PAResPayload' => $this->getPaResPayload(), + ); + + $clientResponse = $this->call('cmpi_authenticate', $authArray); + $this->setErrorNo($clientResponse->getValue('ErrorNo')); + $this->setErrorDesc($clientResponse->getValue('ErrorDesc')); + $this->setPaResStatus($clientResponse->getValue('PAResStatus')); + $this->setCavv($clientResponse->getValue('Cavv')); + $this->setSignature($clientResponse->getValue('SignatureVerification')); + $this->setEciFlag($clientResponse->getValue('EciFlag')); + $this->setXid($clientResponse->getValue('Xid')); + return $this; + } + + /** + * Call centinel api methods by given method name and data + * + * @param $method string + * @param $data array + * + * @return CentinelClient + */ + public function call($method, $data) + { + $thinData = array( + 'MsgType' => $method, + 'Version' => $this->getVersion(), + 'ProcessorId' => $this->getProcessorId(), + 'MerchantId' => $this->getMerchantId(), + 'TransactionPwd' => Mage::helper('core')->decrypt($this->getTransactionPwd()), + 'TransactionType' => $this->getTransactionType(), + ); + + $thinClient = $this->getThinClient(); + $thinData = array_merge($thinData, $data); + if (count($thinData) > 0) { + foreach($thinData AS $key => $val) { + $thinClient->add($key, $val); + } + } + + $thinClient->sendHttp($this->getMapUrl(), $this->getTimeoutConnect(), $this->getTimeoutRead()); + return $thinClient; + } +} diff --git a/app/code/core/Mage/Paypal/Model/Express.php b/app/code/core/Mage/Paypal/Model/Express.php index b39cbf091c..c04d556f49 100644 --- a/app/code/core/Mage/Paypal/Model/Express.php +++ b/app/code/core/Mage/Paypal/Model/Express.php @@ -43,8 +43,8 @@ class Mage_Paypal_Model_Express extends Mage_Payment_Model_Method_Abstract protected $_canAuthorize = true; protected $_canCapture = true; protected $_canCapturePartial = false; - protected $_canRefund = false; - protected $_canVoid = true; + protected $_canRefund = true; + protected $_canVoid = false; protected $_canUseInternal = false; protected $_canUseCheckout = true; protected $_canUseForMultishipping = false; @@ -108,6 +108,47 @@ public function getQuote() return $this->getCheckout()->getQuote(); } + /** + * Return fraud filter config valie: enabed/ disabled + * + * @return bool + */ + public function getFraudFilterStatus() + { + return $this->getConfigData('fraud_filter'); + } + + /** + * Return fraud status, if fraud management enabled and api returned fraud suspicious + * we return true, we may store fraud result, otherwise return false, + * don't perform any actions with frauds + * + * @return bool + */ + public function canStoreFraud() + { + if ($this->getFraudFilterStatus() && $this->getApi()->getIsFraud()) { + return true; + } else { + return false; + } + } + + /** + * Return status if user may perform any action with fraud transaction + * + * @param Varien_Object $payment + * @return bool + */ + public function canManageFraud(Varien_Object $payment) + { + if ($this->getFraudFilterStatus() && $payment->getOrder()->getStatus() == $this->getConfigData('fraud_order_status')) { + return true; + } else { + return false; + } + } + /** * Retrieve redirect url * @@ -144,6 +185,26 @@ public function canUseForMultishipping() return false; } + /** + * Used for Express Account optional + * + * @return string + */ + public function getSolutionType() + { + return $this->getConfigData('solution_type'); + } + + /** + * Used for enablin line item options + * + * @return string + */ + public function getLineItemEnabled() + { + return $this->getConfigData('line_item'); + } + /** * Processing error from paypal * @@ -151,18 +212,10 @@ public function canUseForMultishipping() */ public function catchError() { - if ($this->getApi()->getError()) { - $s = $this->getCheckout(); - $e = $this->getApi()->getError(); - switch ($e['type']) { - case 'CURL': - $s->addError(Mage::helper('paypal')->__('There was an error connecting to the Paypal server: %s', $e['message'])); - break; - - case 'API': - $s->addError(Mage::helper('paypal')->__('There was an error during communication with Paypal: %s - %s', $e['short_message'], $e['long_message'])); - break; - } + try { + $this->throwError(); + } catch (Mage_Core_Exception $e) { + $this->getCheckout()->addError($e->getMessage()); } return $this; } @@ -174,17 +227,13 @@ public function catchError() */ public function throwError() { - if ($this->getApi()->getError()) { - $s = $this->getCheckout(); - $e = $this->getApi()->getError(); + $e = $this->getApi()->getError(); + if ($e && !empty($e['type'])) { switch ($e['type']) { case 'CURL': - Mage::throwException(Mage::helper('paypal')->__('There was an error connecting to the Paypal server: %s', $e['message'])); - break; - + Mage::throwException(Mage::helper('paypal')->__('There was an error connecting to the PayPal server: %s', $e['message'])); case 'API': - Mage::throwException(Mage::helper('paypal')->__('There was an error during communication with Paypal: %s - %s', $e['short_message'], $e['long_message'])); - break; + Mage::throwException(Mage::helper('paypal')->__('There was an error during communication with PayPal: %s - %s', $e['short_message'], $e['long_message'])); } } return $this; @@ -220,6 +269,11 @@ public function createInfoBlock($name) return $block; } + /** + * Return Api redirect url + * + * @return string + */ public function getOrderPlaceRedirectUrl() { return $this->getRedirectUrl(); @@ -239,6 +293,20 @@ public function getPaymentAction() return $paymentAction; } + /** + * Get Pal Detailes for dynamic buttons using + * + */ + public function getPalDetails() + { + if (!$this->getSession()->getPalDetails()) { + $api = $this->getApi() + ->callPalDetails(); + $this->getSession()->setPalDetails($api->getPal()); + } + return $this->getSession()->getPalDetails(); + } + /** * Making API call to start transaction from shopping cart * @@ -246,14 +314,16 @@ public function getPaymentAction() */ public function shortcutSetExpressCheckout() { + $api = $this->getApi(); $this->getQuote()->reserveOrderId()->save(); - $this->getApi() + $api->setSolutionType($this->getSolutionType()) ->setPayment($this->getPayment()) ->setPaymentType($this->getPaymentAction()) ->setAmount($this->getQuote()->getBaseGrandTotal()) ->setCurrencyCode($this->getQuote()->getBaseCurrencyCode()) - ->setInvNum($this->getQuote()->getReservedOrderId()) - ->callSetExpressCheckout(); + ->setInvNum($this->getQuote()->getReservedOrderId()); + + $api->callSetExpressCheckout(); $this->catchError(); @@ -278,11 +348,11 @@ public function returnFromPaypal() $this->getSession()->addError($e->getMessage()); $this->getApi()->setRedirectUrl('paypal/express/review'); } + switch ($this->getApi()->getUserAction()) { case Mage_Paypal_Model_Api_Nvp::USER_ACTION_CONTINUE: $this->getApi()->setRedirectUrl(Mage::getUrl('paypal/express/review')); break; - case Mage_Paypal_Model_Api_Nvp::USER_ACTION_COMMIT: if ($this->getSession()->getExpressCheckoutMethod() == 'shortcut') { $this->getApi()->setRedirectUrl(Mage::getUrl('paypal/express/saveOrder')); @@ -331,6 +401,9 @@ protected function _getExpressCheckoutDetails() ->setSuffix($a->getSuffix()) ->setEmail($a->getEmail()); } + if ($this->getSession()->getExpressCheckoutMethod()=='shortcut') { + $q->getBillingAddress()->importCustomerAddress($a); + } $q->getShippingAddress() ->importCustomerAddress($a) @@ -342,10 +415,16 @@ protected function _getExpressCheckoutDetails() ->setMethod('paypal_express') ->setPaypalCorrelationId($api->getCorrelationId()) ->setPaypalPayerId($api->getPayerId()) + ->setAddressStatus($api->getAddressStatus()) ->setPaypalPayerStatus($api->getPayerStatus()) + ->setAccountStatus($api->getAccountStatus()) ->setAdditionalData($api->getPaypalPayerEmail()) ; + if ($this->canStoreFraud()) { + $q->getPayment()->setFraudFlag(true); + } + $q->collectTotals()->save(); } @@ -372,30 +451,30 @@ public function capture(Varien_Object $payment, $amount) { if ($payment->getCcTransId()) { $api = $this->getApi() - ->setPaymentType(Mage_Paypal_Model_Api_Nvp::PAYMENT_TYPE_SALE) + ->setPaymentType($this->getPaymentAction()) ->setAmount($amount) ->setBillingAddress($payment->getOrder()->getBillingAddress()) ->setPayment($payment); $api->setAuthorizationId($payment->getCcTransId()) ->setCompleteType('NotComplete'); - $result = $api->callDoCapture()!==false; + $this->_wrapApiError($api, $api->callDoCapture()); - if ($result) { - $payment->setStatus('APPROVED'); - //$payment->setCcTransId($api->getTransactionId()); - $payment->setLastTransId($api->getTransactionId()); - } else { - $e = $api->getError(); - if (isset($e['short_message'])) { - $message = $e['short_message']; - } else { - $message = Mage::helper('paypal')->__("Unknown PayPal API error: %s", $e['code']); - } - if (isset($e['long_message'])) { - $message .= ': '.$e['long_message']; - } - Mage::throwException($message); + if ($this->canStoreFraud()) { + $payment->setFraudFlag(true); + } + $payment->setStatus('APPROVED'); + + if ($api->getAccountStatus()) { + $payment->setAccountStatus($api->getAccountStatus()); + } + if ($api->getProtectionEligibility()) { + $payment->setProtectionEligibility($api->getProtectionEligibility()); + } + $payment->setLastTransId($api->getTransactionId()); + + if ($this->canManageFraud($payment)) { + $this->updateGatewayStatus($payment, Mage_Paypal_Model_Api_Abstract::ACTION_ACCEPT); } } else { $this->placeOrder($payment); @@ -413,28 +492,45 @@ public function placeOrder(Varien_Object $payment) { $api = $this->getApi(); + if ($this->getQuote()->isVirtual()) { + $address = $this->getQuote()->getBillingAddress(); + } else { + $address = $this->getQuote()->getShippingAddress(); + } + $api->setAmount($payment->getOrder()->getBaseGrandTotal()) - ->setPayment($payment) + ->setPaymentType($this->getPaymentAction()) ->setCurrencyCode($payment->getOrder()->getBaseCurrencyCode()) ->setInvNum($this->getQuote()->getReservedOrderId()); - if ($api->callDoExpressCheckoutPayment()!==false) { - $payment->setStatus('APPROVED') - ->setPayerId($api->getPayerId()); - if ($this->getPaymentAction()== Mage_Paypal_Model_Api_Nvp::PAYMENT_TYPE_AUTH) { - $payment->setCcTransId($api->getTransactionId()); - } else { - $payment->setLastTransId($api->getTransactionId()); - } + $this->_appendAdditionalToApi($payment->getOrder(), $api); + + $this->_wrapApiError($api, $api->callDoExpressCheckoutPayment()); + $payment->setStatus('APPROVED') + ->setProtectionEligibility($api->getProtectionEligibility()) + ->setPayerId($api->getPayerId()); + + if ($this->getQuote()->getPayment()->getAccountStatus()) { + $payment->setAccountStatus($this->getQuote()->getPayment()->getAccountStatus()); + } + + if ($this->getQuote()->getPayment()->getAddressStatus()) { + $payment->setAddressStatus($this->getQuote()->getPayment()->getAddressStatus()); + } + + if ($this->getPaymentAction()== Mage_Paypal_Model_Api_Nvp::PAYMENT_TYPE_AUTH) { + $payment->setCcTransId($api->getTransactionId()); } else { - $e = $api->getError(); - die($e['short_message'].': '.$e['long_message']); + $payment->setLastTransId($api->getTransactionId()); + } + if ($this->canStoreFraud()) { + $payment->setFraudFlag(true); } return $this; } /** - * void + * Void payment * * @access public * @param string $payment Varien_Object object @@ -442,24 +538,18 @@ public function placeOrder(Varien_Object $payment) */ public function void(Varien_Object $payment) { - $error = false; if($payment->getVoidTransactionId()){ $api = $this->getApi(); $api->setPayment($payment); $api->setAuthorizationId($payment->getVoidTransactionId()); - - if ($api->callDoVoid()!==false){ - $payment->setStatus('SUCCESS') - ->setCcTransId($api->getTransactionId()); - }else{ - $e = $api->getError(); - $error = $e['short_message'].': '.$e['long_message']; - } - }else{ - $error = Mage::helper('paypal')->__('Invalid transaction id'); - } - if ($error !== false) { - Mage::throwException($error); + $this->_wrapApiError($api, $api->callDoVoid()); + $payment->setStatus('SUCCESS') + ->setCcTransId($api->getTransactionId()); + if ($this->canManageFraud($payment)) { + $this->updateGatewayStatus($payment, Mage_Paypal_Model_Api_Abstract::ACTION_DENY); + } + } else { + Mage::throwException(Mage::helper('paypal')->__('Invalid transaction id')); } return $this; } @@ -473,28 +563,20 @@ public function void(Varien_Object $payment) */ public function refund(Varien_Object $payment, $amount) { - $error = false; - if ($payment->getRefundTransactionId() && $amount>0) { + if ($payment->getRefundTransactionId() && $amount > 0) { $api = $this->getApi(); - //we can refund the amount full or partial so it is good to set up as partial refund $api->setPayment($payment) ->setTransactionId($payment->getRefundTransactionId()) - ->setRefundType(Mage_Paypal_Model_Api_Nvp::REFUND_TYPE_PARTIAL) ->setAmount($amount); - - if ($api->callRefundTransaction()!==false){ - $payment->setStatus('SUCCESS') - ->setCcTransId($api->getTransactionId()); - } else { - $e = $api->getError(); - $error = $e['short_message'].': '.$e['long_message']; - } - }else{ - $error = Mage::helper('paypal')->__('Error in refunding the payment'); - } - - if ($error !== false) { - Mage::throwException($error); + $api->setRefundType($payment->getOrder()->canCreditmemo() + ? Mage_Paypal_Model_Api_Abstract::REFUND_TYPE_PARTIAL + : Mage_Paypal_Model_Api_Abstract::REFUND_TYPE_FULL + ); + $this->_wrapApiError($api, $api->callRefundTransaction()); + $payment->setStatus('SUCCESS') + ->setCcTransId($api->getTransactionId()); + } else { + Mage::throwException(Mage::helper('paypal')->__('No refund transaction ID found or wrong amount.')); } return $this; } @@ -505,21 +587,25 @@ public function refund(Varien_Object $payment, $amount) */ public function initialize($paymentAction, $stateObject) { + $api = $this->getApi(); if ($this->getQuote()->isVirtual()) { $address = $this->getQuote()->getBillingAddress(); } else { $address = $this->getQuote()->getShippingAddress(); } - $this->getApi() - ->setPayment($this->getPayment()) + + $api->setPayment($this->getPayment()) ->setPaymentType($paymentAction) + ->setSolutionType($this->getSolutionType()) ->setAmount($address->getBaseGrandTotal()) ->setCurrencyCode($this->getQuote()->getBaseCurrencyCode()) ->setShippingAddress($address) - ->setInvNum($this->getQuote()->getReservedOrderId()) - ->callSetExpressCheckout(); + ->setInvNum($this->getQuote()->getReservedOrderId()); + + $this->_appendAdditionalToApi($address, $api); + $api->callSetExpressCheckout(); $this->throwError(); $stateObject->setState(Mage_Sales_Model_Order::STATE_PENDING_PAYMENT); @@ -550,4 +636,168 @@ public function isVisibleOnCartPage() { return (bool)$this->getConfigData('visible_on_cart'); } + + /** + * Process pending transaction, set status deny or approve + * @param Varien_Object $payment + * @param string $action + * @return Mage_Paypal_Model_Express + */ + public function updateGatewayStatus(Varien_Object $payment, $action) + { + if ($payment && $action) { + if ($payment->getCcTransId()) { + $transactionId = $payment->getCcTransId(); + } else { + $transactionId = $payment->getLastTransId(); + } + $api = $this->getApi(); + $api->setAction($action) + ->setTransactionId($transactionId) + ->callManagePendingTransactionStatus(); + } + return $this; + } + + /** + * cancel payment, if it has fraud status, need to update paypal status + * + * @param Varien_Object $payment + * @return Mage_Paypal_Model_Express + */ + public function cancel(Varien_Object $payment) + { + if (!$payment->getOrder()->getInvoiceCollection()->count() && ($payment->getCcTransId() || $payment->getLastTransId())) { + if ($payment->getCcTransId()) { + $payment->setVoidTransactionId($payment->getCcTransId()); + } else { + $payment->setVoidTransactionId($payment->getLastTransId()); + } + $this->void($payment); + } + parent::cancel($payment); + return $this; + } + + /** + * Return giropay redirect url to continue giropay transaction + * + * @return string + */ + public function getGiropayRedirectUrl() + { + if ($this->getApi()->getRedirectRequered()) { + return sprintf($this->getApi()->getGiropayRedirectUrl(), $this->getApi()->getToken()); + } + return ""; + } + + /** + * Check whether invoice email should be sent + * @return bool + */ + public function canSendEmailCopy() + { + return (bool)$this->getConfigData('invoice_email_copy'); + } + + /** + * Get config paypal action url + * Used to universilize payment actions when processing payment place + * + * @return string + */ + public function getConfigPaymentAction() + { + $paymentAction = $this->getConfigData('payment_action'); + switch ($paymentAction){ + case Mage_Paypal_Model_Api_Abstract::PAYMENT_TYPE_SALE: + $paymentAction = Mage_Payment_Model_Method_Abstract::ACTION_AUTHORIZE_CAPTURE; + break; + case Mage_Paypal_Model_Api_Abstract::PAYMENT_TYPE_AUTH: + default: + $paymentAction = Mage_Payment_Model_Method_Abstract::ACTION_AUTHORIZE; + break; + } + return $paymentAction; + } + + /** + * Add additional fields to Api + * + * @param $paymentInfo Varien_Object + * @param $api Mage_PayPal_Model_Api_Nvp + * + * @return Mage_PayPal_Model_Express + */ + protected function _appendAdditionalToApi($paymentInfo, $api) + { + if (is_object($paymentInfo) && is_object($api)) { + if ($this->getLineItemEnabled()) { + $api->setLineItems($this->getQuote()->getAllItems()) + ->setShippingAmount($paymentInfo->getBaseShippingAmount()) + ->setDiscountAmount($paymentInfo->getBaseDiscountAmount()) + ->setItemAmount($paymentInfo->getBaseSubtotal()) + ->setItemTaxAmount($paymentInfo->getTaxAmount()); + } + if ($this->getFraudFilterStatus()) { + $api->setReturnFmfDetails(true); + } + } + return $this; + } + + /** + * Do order update after return from PayPal + * + * @param int $orderId + * @return Mage_PayPal_Model_Express; + */ + public function updateOrder($orderId) + { + $order = Mage::getModel('sales/order')->load($orderId); + if (!$order->getId()) { + Mage::throwException(Mage::helper('paypal')->__('Wrong Order ID.')); + } + + $transaction = Mage::getModel('core/resource_transaction')->addObject($order); + $invoice = null; + if ($order->canInvoice() && $this->getPaymentAction() == Mage_Paypal_Model_Api_Abstract::PAYMENT_TYPE_SALE) { + $invoice = $order->prepareInvoice(); + $invoice->register()->capture(); + $transaction->addObject($invoice); + } else { + $this->placeOrder($order->getPayment()); + $comment = Mage::helper('paypal')->__('Customer returned from PayPal site.'); + } + + $order->setState(Mage_Sales_Model_Order::STATE_PROCESSING, true); + $transaction->save(); + $order->sendNewOrderEmail(); + if ($invoice) { + $comment = Mage::helper('paypal')->__('Invoice #%s created.', $invoice->getIncrementId()); + } + $order->addStatusHistoryComment(Mage::helper('paypal')->__('PayPal Express processing: %s', $comment)) + ->setIsCustomerNotified(true) + ->save(); + return $this; + } + + /** + * Convert api cal result into exception + * @param Mage_Paypal_Model_Api_Abstract $api + * @param mixed $callResult + * @throws Mage_Core_Exception + */ + private function _wrapApiError($api, $callResult = null) + { + if (false === $callResult) { + Mage::throwException(Mage::helper('paypal')->__('Unable to communicate with PayPal gateway.')); + } + if ($api->getError()) { + Mage::throwException( + Mage::helper('paypal')->__('PayPal gateway returned error: %s.', $api->getErrorMessage()) + ); + } + } } diff --git a/app/code/core/Mage/Paypal/Model/Express/Review.php b/app/code/core/Mage/Paypal/Model/Express/Review.php index c3b2e9ff5a..089794c3ad 100644 --- a/app/code/core/Mage/Paypal/Model/Express/Review.php +++ b/app/code/core/Mage/Paypal/Model/Express/Review.php @@ -24,7 +24,10 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ - +/** + * + * Express Review Session class + */ class Mage_Paypal_Model_Express_Review { /** diff --git a/app/code/core/Mage/Paypal/Model/Ipn.php b/app/code/core/Mage/Paypal/Model/Ipn.php new file mode 100644 index 0000000000..36719b791a --- /dev/null +++ b/app/code/core/Mage/Paypal/Model/Ipn.php @@ -0,0 +1,516 @@ +_config = $config; + return $this; + } + + /** + * IPN request data setter + * @param array $data + * @return Mage_Paypal_Model_Ipn + */ + public function setIpnFormData(array $data) + { + $this->_ipnFormData = $data; + return $this; + } + + /** + * IPN request data getter + * @param string $key + * @return array|string + */ + public function getIpnFormData($key = null) + { + if (null === $key) { + return $this->_ipnFormData; + } + return isset($this->_ipnFormData[$key]) ? $this->_ipnFormData[$key] : null; + } + + /** + * Get ipn data, send verification to PayPal, run corresponding handler + */ + public function processIpnRequest() + { + if (!$this->_ipnFormData) { + return; + } + + // debug requested + if ($this->_config->debugFlag) { + Mage::getModel('paypal/api_debug') + ->setApiEndpoint($this->_config->getPaypalUrl()) + ->setRequestBody(print_r($this->_ipnFormData, 1)) + ->save(); + } + + $sReq = ''; + $sReqDebug = ''; + foreach ($this->_ipnFormData as $k => $v) { + $sReq .= '&'.$k.'='.urlencode(stripslashes($v)); + $sReqDebug .= '&'.$k.'='; + } + // append ipn command + $sReq .= "&cmd=_notify-validate"; + $sReq = substr($sReq, 1); + + $http = new Varien_Http_Adapter_Curl(); + $http->write(Zend_Http_Client::POST, $this->_config->getPaypalUrl(), '1.1', array(), $sReq); + $response = $http->read(); + + // debug postback request & response + if ($this->_config->debugFlag) { + Mage::getModel('paypal/api_debug') + ->setApiEndpoint($this->_config->getPaypalUrl()) + ->setRequestBody($sReq) + ->setResponseBody($response) + ->save(); + } + + if ($error = $http->getError()) { + $this->_notifyAdmin(Mage::helper('paypal')->__('PayPal IPN postback HTTP error: %s', $http->getError())); + return; + } + + $response = preg_split('/^\r?$/m', $response, 2); + $response = trim($response[1]); + if ($response == 'VERIFIED') { + $this->processIpnVerified(); + } else { + // TODO: possible PCI compliance issue - the $sReq may contain data that is supposed to be encrypted + $this->_notifyAdmin(Mage::helper('paypal')->__('PayPal IPN postback Validation error: %s', $sReq)); + } + } + + /** + * Load and validate order + * + * @return Mage_Sales_Model_Order + * @throws Exception + */ + protected function _getOrder() + { + if (empty($this->_order)) { + // get proper order + $id = $this->getIpnFormData('invoice'); + $order = Mage::getModel('sales/order'); + $order->loadByIncrementId($id); + if (!$order->getId()) { + // throws Exception intentionally, because cannot be logged to order comments + throw new Exception(Mage::helper('paypal')->__('Wrong Order ID (%s) specified.', $id)); + } + $this->_order = $order; + $this->_config = Mage::getModel('paypal/config', array($order->getPayment()->getMethod())); + $this->_verifyOrder($order); + } + return $this->_order; + } + + /** + * Validate incoming request data, as PayPal recommends + * + * @param Mage_Sales_Model_Order $order + * @throws Mage_Core_Exception + */ + protected function _verifyOrder(Mage_Sales_Model_Order $order) + { + // verify merchant email intended to receive notification + $merchantEmail = $this->_config->businessAccount; + if ($merchantEmail && $merchantEmail != $this->getIpnFormData('receiver_email')) { + Mage::throwException(Mage::helper('paypal')->__('Requested %s and configured %s merchant emails do not match.', $this->getIpnFormData('receiver_email'), $merchantEmail)); + } + } + + /** + * IPN workflow implementation + * Everything should be added to order comments. In positive processing cases customer will get email notifications. + * Admin will be notified on errors. + */ + public function processIpnVerified() + { + try { + try { + $order = $this->_getOrder(); + $shouldNotifyAdmin = false; + $paymentStatus = $this->getIpnFormData('payment_status'); + switch ($paymentStatus) { + // paid with german bank + case self::STATUS_CREATED: + // break intentionally omitted + // paid with PayPal + case self::STATUS_COMPLETED: + $this->_registerPaymentCapture(); + break; + + // the holded payment was denied on paypal side + case self::STATUS_DENIED: + $this->_registerPaymentFailure( + Mage::helper('paypal')->__('Merchant denied this pending payment.') + ); + break; + // customer attempted to pay via bank account, but failed + case self::STATUS_FAILED: + // cancel order + $this->_registerPaymentFailure(Mage::helper('paypal')->__('Customer failed to pay.')); + break; + + // refund forced by PayPal + case self::STATUS_REVERSED: + // break intentionally omitted + // refund by merchant on PayPal side + case self::STATUS_REFUNDED: + $this->_registerPaymentRefund(); + break; + + // refund that was forced by PayPal, returnred back. + case self::STATUS_CANCELED_REV: + // Magento cannot handle this for now. Just notify admin. + // potentially @see Mage_Sales_Model_Order_Creditmemo::cancel() + $history = $this->_explainRefundReason()->save(); + $this->_notifyAdmin($history->getComment()); + break; + + // payment was obtained, but money were not captured yet + case self::STATUS_PENDING: + $this->_registerPaymentPending(); + break; + + // no really useful information here, just add status comment + case self::STATUS_PROCESSED: + $this->_createIpnComment(''); + break; + + // authorization expired, must void + case self::STATUS_EXPIRED: + $this->_registerPaymentVoid(Mage::helper('paypal')->__('Authorization expired.')); + break; + // void by merchant on PayPal side + case self::STATUS_VOIDED: + $this->_registerPaymentVoid(Mage::helper('paypal')->__('Authorization was voided by merchant.')); + break; + } + } + catch (Mage_Core_Exception $e) { + $history = $this->_createIpnComment(Mage::helper('paypal')->__('Failure: %s', $e->getMessage())) + ->save(); + $this->_notifyAdmin($history->getComment(), $e); + } + } catch (Exception $e) { + Mage::logException($e); + } + } + + /** + * Process completed payment + * If an existing authorized invoice with specified txn_id exists - mark it as paid and save, + * otherwise create a completely authorized/captured invoice + * + * Everything after saving order is not critical, thus done outside the transaction. + * + * @throws Mage_Core_Exception + */ + protected function _registerPaymentCapture() + { + $order = $this->_getOrder(); + $payment = $order->getPayment(); + $payment->setTransactionId($this->getIpnFormData('txn_id')) + ->setPreparedMessage($this->_createIpnComment('', false)) + ->setParentTransactionId($this->getIpnFormData('parent_txn_id')) + ->setIsTransactionClosed(0) + ->registerCaptureNotification($this->getIpnFormData('mc_gross')); + $order->save(); + + // notify customer + if ($invoice = $payment->getCreatedInvoice()) { + $comment = $order->sendNewOrderEmail()->addStatusHistoryComment( + Mage::helper('paypal')->__('Notified customer about invoice #%s.', $invoice->getIncrementId()) + ) + ->setIsCustomerNotified(true) + ->save(); + } + + // mark authorization as closed, if any + $authStatus = $this->getIpnFormData('auth_status'); + if (self::AUTH_STATUS_COMPLETED === $authStatus && $transaction = $payment->getCreatedTransaction()) { + $transaction->closeAuthorization(); + } + } + + /** + * Treat failed payment as order cancellation + */ + protected function _registerPaymentFailure($explanationMessage = '') + { + $order = $this->_getOrder(); + $order->registerCancellation($this->_createIpnComment($explanationMessage, false), false) + ->save(); + } + + /** + * + * + */ + protected function _registerPaymentRefund() + { + // refund issued by merchant, cannot be reversed in future. Unlike reversals + $isRefundFinal = (int)(self::STATUS_REVERSED !== $this->getIpnFormData('payment_status')); + + $order = $this->_getOrder(); + $payment = $order->getPayment() + ->setPreparedMessage($this->_explainRefundReason(false)) + ->setTransactionId($this->getIpnFormData('txn_id')) + ->setParentTransactionId($this->getIpnFormData('parent_txn_id')) + ->setIsTransactionClosed($isRefundFinal) + ->registerRefundNotification(-1 * $this->getIpnFormData('mc_gross')); + $order->save(); + + // TODO: there is no way to close a capture right now + + if ($creditmemo = $payment->getCreatedCreditmemo()) { + $creditmemo->sendEmail(); + $comment = $order->addStatusHistoryComment( + Mage::helper('paypal')->__('Notified customer about creditmemo #%s.', $creditmemo->getIncrementId()) + ) + ->setIsCustomerNotified(true) + ->save(); + } + } + + /** + * @see pending_reason at https://cms.paypal.com/us/cgi-bin/?&cmd=_render-content&content_ID=developer/e_howto_admin_IPNReference + */ + public function _registerPaymentPending() + { + $order = $this->_getOrder(); + $message = null; + switch ($this->getIpnFormData('pending_reason')) { + case 'address': + $message = Mage::helper('paypal')->__('Customer used non-confirmed address.'); + break; + case 'echeck': + $message = Mage::helper('paypal')->__('Waiting until Customer\'s eCheck will be cleared.'); + // possible requires processing on our side as well + break; + case 'intl': + $message = Mage::helper('paypal')->__('Merchant account doesn\'t have a withdrawal mechanism. Merchant must manually accept or deny this payment from your Account Overview.'); + break; + case 'multi-currency': + $message = Mage::helper('paypal')->__('Multi-currency issue. Merchant must manually accept or deny this payment from PayPal Account Overview.'); + break; + case 'order': + Mage::throwException('"Order" authorizations are not implemented. Please use "simple" authorization.'); + case 'authorization': + $this->_registerPaymentAuthorization(); + break; + case 'paymentreview': + $message = Mage::helper('paypal')->__('Payment is being reviewed by PayPal for risk.'); + break; + case 'unilateral': + $message = Mage::helper('paypal')->__('Payment was made to an email address that is not yet registered or confirmed.'); + break; + case 'upgrade': + $message = Mage::helper('paypal')->__('Merchant must upgrade account to Business or Premier status.'); + break; + case 'verify': + $message = Mage::helper('paypal')->__('Merchant account is not verified.'); + break; + case 'other': + $message = Mage::helper('paypal')->__('Please contact PayPal Customer Service.'); + break; + } + if ($message) { + $this->_createIpnComment($message); + } + } + + /** + * Register authorization of a payment: create a non-paid invoice + */ + protected function _registerPaymentAuthorization() + { + // authorize payment + $order = $this->_getOrder(); + $payment = $order->getPayment() + ->setPreparedMessage($this->_createIpnComment('', false)) + ->setTransactionId($this->getIpnFormData('txn_id')) + ->setParentTransactionId($this->getIpnFormData('parent_txn_id')) + ->setIsTransactionClosed(0) + ->registerAuthorizationNotification($this->getIpnFormData('mc_gross')); + + $order->save(); + } + + /** + * Process transaction voiding. + * We just can void only authorized transaction + * Check if transaction authorized and not captured + */ + protected function _registerPaymentVoid($explanationMessage = '') + { + $order = $this->_getOrder(); + + $txnId = $this->getIpnFormData('txn_id'); + $parentTxnId = $this->getIpnFormData('parent_txn_id'); + // workaround for receiving a dupe of txn_id without parent_txn_id + if (!$parentTxnId) { + $parentTxnId = $txnId; + $txnId .= '-VOID-WORKAROUND'; + } + + $order->getPayment() + ->setPreparedMessage($this->_createIpnComment($explanationMessage, false)) + ->setTransactionId($txnId) + ->setParentTransactionId($parentTxnId) + ->registerVoidNotification(); + $order->save(); + } + + /** + * Generate a "PayPal Verified" comment with additional explanation. + * Returns the generated comment or order status history object + * + * @param string $comment + * @param bool $addToHistory + * @return string|Mage_Sales_Model_Order_Status_History + */ + protected function _createIpnComment($comment = '', $addToHistory = true) + { + $paymentStatus = $this->getIpnFormData('payment_status'); + $message = Mage::helper('paypal')->__('IPN verification "%s".', $paymentStatus); + if ($comment) { + $message .= ' ' . $comment; + } + if ($addToHistory) { + return $this->_getOrder()->addStatusHistoryComment($message); + } + return $message; + } + + /** + * Notify Administrator about exceptional situation + * + * @param $message + * @param Exception $exception + */ + protected function _notifyAdmin($message, Exception $exception = null) + { + // prevent notification failure cause order procesing failure + try { + Mage::log($message); + if ($exception) { + Mage::logException($exception); + } + // @TODO: dump the message and IPN form data + } catch (Exception $e) { + Mage::logException($e); + } + } + + /** + * Generate a message basing on request reason_code + * Should be invoked only on refunds + * @see payment_status at https://cms.paypal.com/us/cgi-bin/?&cmd=_render-content&content_ID=developer/e_howto_admin_IPNReference + * + * @return Mage_Sales_Model_Order_Status_History + */ + private function _explainRefundReason($addToHistory = true) + { + $message = Mage::helper('paypal')->__('unknown reason'); + switch ($this->getIpnFormData('reason_code')) { + case 'adjustment_reversal': + $message = Mage::helper('paypal')->__('reversal of an adjustment'); + break; + case 'buyer-complaint': + $message = Mage::helper('paypal')->__('customer complaint'); + break; + case 'chargeback': + $message = Mage::helper('paypal')->__('customer triggered a chargeback'); + break; + case 'chargeback_reimbursement': + $message = Mage::helper('paypal')->__('chargeback reimbursed'); + break; + case 'chargeback_settlement': + $message = Mage::helper('paypal')->__('chargeback settled'); + break; + case 'guarantee': + $message = Mage::helper('paypal')->__('customer triggered money-back guarantee'); + break; + case 'other': + $message = Mage::helper('paypal')->__('no reason'); + break; + case 'refund': + $message = Mage::helper('paypal')->__('merchant refunded payment'); + break; + } + return $this->_createIpnComment(Mage::helper('paypal')->__('Explanation: %s.', $message), $addToHistory); + } +} diff --git a/app/code/core/Mage/Paypal/Model/Ipn_1.php b/app/code/core/Mage/Paypal/Model/Ipn_1.php new file mode 100644 index 0000000000..13d2c1c13e --- /dev/null +++ b/app/code/core/Mage/Paypal/Model/Ipn_1.php @@ -0,0 +1,517 @@ +_config = $config; + return $this; + } + + /** + * IPN request data setter + * @param array $data + * @return Mage_Paypal_Model_Ipn + */ + public function setIpnFormData(array $data) + { + $this->_ipnFormData = $data; + return $this; + } + + /** + * IPN request data getter + * @param string $key + * @return array|string + */ + public function getIpnFormData($key = null) + { + if (null === $key) { + return $this->_ipnFormData; + } + return isset($this->_ipnFormData[$key]) ? $this->_ipnFormData[$key] : null; + } + + /** + * Get ipn data, send verification to PayPal, run corresponding handler + */ + public function processIpnRequest() + { + if (!$this->_ipnFormData) { + return; + } + + // debug requested + if ($this->_config->debugFlag) { + Mage::getModel('paypal/api_debug') + ->setApiEndpoint($this->_config->getPaypalUrl()) + ->setRequestBody(print_r($this->_ipnFormData, 1)) + ->save(); + } + + $sReq = ''; + $sReqDebug = ''; + foreach ($this->_ipnFormData as $k => $v) { + $sReq .= '&'.$k.'='.urlencode(stripslashes($v)); + $sReqDebug .= '&'.$k.'='; + } + // append ipn command + $sReq .= "&cmd=_notify-validate"; + $sReq = substr($sReq, 1); + + $http = new Varien_Http_Adapter_Curl(); + $http->write(Zend_Http_Client::POST, $this->_config->getPaypalUrl(), '1.1', array(), $sReq); + $response = $http->read(); + + // debug postback request & response + if ($this->_config->debugFlag) { + Mage::getModel('paypal/api_debug') + ->setApiEndpoint($this->_config->getPaypalUrl()) + ->setRequestBody($sReq) + ->setResponseBody($response) + ->save(); + } + + if ($error = $http->getError()) { + $this->_notifyAdmin(Mage::helper('paypal')->__('PayPal IPN postback HTTP error: %s', $http->getError())); + return; + } + + $response = preg_split('/^\r?$/m', $response, 2); + $response = trim($response[1]); + if ($response == 'VERIFIED') { + $this->processIpnVerified(); + } else { + // TODO: possible PCI compliance issue - the $sReq may contain data that is supposed to be encrypted + $this->_notifyAdmin(Mage::helper('paypal')->__('PayPal IPN postback Validation error: %s', $sReq)); + } + } + + /** + * Load and validate order + * + * @return Mage_Sales_Model_Order + * @throws Exception + */ + protected function _getOrder() + { + if (empty($this->_order)) { + // get proper order + $id = $this->getIpnFormData('invoice'); + $order = Mage::getModel('sales/order'); + $order->loadByIncrementId($id); + if (!$order->getId()) { + // throws Exception intentionally, because cannot be logged to order comments + throw new Exception(Mage::helper('paypal')->__('Wrong Order ID (%s) specified.', $id)); + } + $this->_order = $order; + $this->_config = Mage::getModel('paypal/config', array($order->getPayment()->getMethod())); + $this->_verifyOrder($order); + } + return $this->_order; + } + + /** + * Validate incoming request data, as PayPal recommends + * + * @param Mage_Sales_Model_Order $order + * @throws Mage_Core_Exception + */ + protected function _verifyOrder(Mage_Sales_Model_Order $order) + { + // verify merchant email intended to receive notification + $merchantEmail = $this->_config->businessAccount; + $receiver = ($this->getIpnFormData('business') ? $this->getIpnFormData('business') : $this->getIpnFormData('receiver_email')); + if ($merchantEmail && $receiver && $merchantEmail != $receiver) { + Mage::throwException(Mage::helper('paypal')->__('Requested %s and configured %s merchant emails do not match.', $receiver, $merchantEmail)); + } + } + + /** + * IPN workflow implementation + * Everything should be added to order comments. In positive processing cases customer will get email notifications. + * Admin will be notified on errors. + */ + public function processIpnVerified() + { + try { + try { + $order = $this->_getOrder(); + $shouldNotifyAdmin = false; + $paymentStatus = $this->getIpnFormData('payment_status'); + switch ($paymentStatus) { + // paid with german bank + case self::STATUS_CREATED: + // break intentionally omitted + // paid with PayPal + case self::STATUS_COMPLETED: + $this->_registerPaymentCapture(); + break; + + // the holded payment was denied on paypal side + case self::STATUS_DENIED: + $this->_registerPaymentFailure( + Mage::helper('paypal')->__('Merchant denied this pending payment.') + ); + break; + // customer attempted to pay via bank account, but failed + case self::STATUS_FAILED: + // cancel order + $this->_registerPaymentFailure(Mage::helper('paypal')->__('Customer failed to pay.')); + break; + + // refund forced by PayPal + case self::STATUS_REVERSED: + // break intentionally omitted + // refund by merchant on PayPal side + case self::STATUS_REFUNDED: + $this->_registerPaymentRefund(); + break; + + // refund that was forced by PayPal, returnred back. + case self::STATUS_CANCELED_REV: + // Magento cannot handle this for now. Just notify admin. + // potentially @see Mage_Sales_Model_Order_Creditmemo::cancel() + $history = $this->_explainRefundReason()->save(); + $this->_notifyAdmin($history->getComment()); + break; + + // payment was obtained, but money were not captured yet + case self::STATUS_PENDING: + $this->_registerPaymentPending(); + break; + + // no really useful information here, just add status comment + case self::STATUS_PROCESSED: + $this->_createIpnComment(''); + break; + + // authorization expired, must void + case self::STATUS_EXPIRED: + $this->_registerPaymentVoid(Mage::helper('paypal')->__('Authorization expired.')); + break; + // void by merchant on PayPal side + case self::STATUS_VOIDED: + $this->_registerPaymentVoid(Mage::helper('paypal')->__('Authorization was voided by merchant.')); + break; + } + } + catch (Mage_Core_Exception $e) { + $history = $this->_createIpnComment(Mage::helper('paypal')->__('Failure: %s', $e->getMessage())) + ->save(); + $this->_notifyAdmin($history->getComment(), $e); + } + } catch (Exception $e) { + Mage::logException($e); + } + } + + /** + * Process completed payment + * If an existing authorized invoice with specified txn_id exists - mark it as paid and save, + * otherwise create a completely authorized/captured invoice + * + * Everything after saving order is not critical, thus done outside the transaction. + * + * @throws Mage_Core_Exception + */ + protected function _registerPaymentCapture() + { + $order = $this->_getOrder(); + $payment = $order->getPayment(); + $payment->setTransactionId($this->getIpnFormData('txn_id')) + ->setPreparedMessage($this->_createIpnComment('', false)) + ->setParentTransactionId($this->getIpnFormData('parent_txn_id')) + ->setIsTransactionClosed(0) + ->registerCaptureNotification($this->getIpnFormData('mc_gross')); + $order->save(); + + // notify customer + if ($invoice = $payment->getCreatedInvoice()) { + $comment = $order->sendNewOrderEmail()->addStatusHistoryComment( + Mage::helper('paypal')->__('Notified customer about invoice #%s.', $invoice->getIncrementId()) + ) + ->setIsCustomerNotified(true) + ->save(); + } + + // mark authorization as closed, if any + $authStatus = $this->getIpnFormData('auth_status'); + if (self::AUTH_STATUS_COMPLETED === $authStatus && $transaction = $payment->getCreatedTransaction()) { + $transaction->closeAuthorization(); + } + } + + /** + * Treat failed payment as order cancellation + */ + protected function _registerPaymentFailure($explanationMessage = '') + { + $order = $this->_getOrder(); + $order->registerCancellation($this->_createIpnComment($explanationMessage, false), false) + ->save(); + } + + /** + * + * + */ + protected function _registerPaymentRefund() + { + // refund issued by merchant, cannot be reversed in future. Unlike reversals + $isRefundFinal = (int)(self::STATUS_REVERSED !== $this->getIpnFormData('payment_status')); + + $order = $this->_getOrder(); + $payment = $order->getPayment() + ->setPreparedMessage($this->_explainRefundReason(false)) + ->setTransactionId($this->getIpnFormData('txn_id')) + ->setParentTransactionId($this->getIpnFormData('parent_txn_id')) + ->setIsTransactionClosed($isRefundFinal) + ->registerRefundNotification(-1 * $this->getIpnFormData('mc_gross')); + $order->save(); + + // TODO: there is no way to close a capture right now + + if ($creditmemo = $payment->getCreatedCreditmemo()) { + $creditmemo->sendEmail(); + $comment = $order->addStatusHistoryComment( + Mage::helper('paypal')->__('Notified customer about creditmemo #%s.', $creditmemo->getIncrementId()) + ) + ->setIsCustomerNotified(true) + ->save(); + } + } + + /** + * @see pending_reason at https://cms.paypal.com/us/cgi-bin/?&cmd=_render-content&content_ID=developer/e_howto_admin_IPNReference + */ + public function _registerPaymentPending() + { + $order = $this->_getOrder(); + $message = null; + switch ($this->getIpnFormData('pending_reason')) { + case 'address': + $message = Mage::helper('paypal')->__('Customer used non-confirmed address.'); + break; + case 'echeck': + $message = Mage::helper('paypal')->__('Waiting until Customer\'s eCheck will be cleared.'); + // possible requires processing on our side as well + break; + case 'intl': + $message = Mage::helper('paypal')->__('Merchant account doesn\'t have a withdrawal mechanism. Merchant must manually accept or deny this payment from your Account Overview.'); + break; + case 'multi-currency': + $message = Mage::helper('paypal')->__('Multi-currency issue. Merchant must manually accept or deny this payment from PayPal Account Overview.'); + break; + case 'order': + Mage::throwException('"Order" authorizations are not implemented. Please use "simple" authorization.'); + case 'authorization': + $this->_registerPaymentAuthorization(); + break; + case 'paymentreview': + $message = Mage::helper('paypal')->__('Payment is being reviewed by PayPal for risk.'); + break; + case 'unilateral': + $message = Mage::helper('paypal')->__('Payment was made to an email address that is not yet registered or confirmed.'); + break; + case 'upgrade': + $message = Mage::helper('paypal')->__('Merchant must upgrade account to Business or Premier status.'); + break; + case 'verify': + $message = Mage::helper('paypal')->__('Merchant account is not verified.'); + break; + case 'other': + $message = Mage::helper('paypal')->__('Please contact PayPal Customer Service.'); + break; + } + if ($message) { + $this->_createIpnComment($message); + } + } + + /** + * Register authorization of a payment: create a non-paid invoice + */ + protected function _registerPaymentAuthorization() + { + // authorize payment + $order = $this->_getOrder(); + $payment = $order->getPayment() + ->setPreparedMessage($this->_createIpnComment('', false)) + ->setTransactionId($this->getIpnFormData('txn_id')) + ->setParentTransactionId($this->getIpnFormData('parent_txn_id')) + ->setIsTransactionClosed(0) + ->registerAuthorizationNotification($this->getIpnFormData('mc_gross')); + + $order->save(); + } + + /** + * Process transaction voiding. + * We just can void only authorized transaction + * Check if transaction authorized and not captured + */ + protected function _registerPaymentVoid($explanationMessage = '') + { + $order = $this->_getOrder(); + + $txnId = $this->getIpnFormData('txn_id'); + $parentTxnId = $this->getIpnFormData('parent_txn_id'); + // workaround for receiving a dupe of txn_id without parent_txn_id + if (!$parentTxnId) { + $parentTxnId = $txnId; + $txnId .= '-VOID-WORKAROUND'; + } + + $order->getPayment() + ->setPreparedMessage($this->_createIpnComment($explanationMessage, false)) + ->setTransactionId($txnId) + ->setParentTransactionId($parentTxnId) + ->registerVoidNotification(); + $order->save(); + } + + /** + * Generate a "PayPal Verified" comment with additional explanation. + * Returns the generated comment or order status history object + * + * @param string $comment + * @param bool $addToHistory + * @return string|Mage_Sales_Model_Order_Status_History + */ + protected function _createIpnComment($comment = '', $addToHistory = true) + { + $paymentStatus = $this->getIpnFormData('payment_status'); + $message = Mage::helper('paypal')->__('IPN verification "%s".', $paymentStatus); + if ($comment) { + $message .= ' ' . $comment; + } + if ($addToHistory) { + return $this->_getOrder()->addStatusHistoryComment($message); + } + return $message; + } + + /** + * Notify Administrator about exceptional situation + * + * @param $message + * @param Exception $exception + */ + protected function _notifyAdmin($message, Exception $exception = null) + { + // prevent notification failure cause order procesing failure + try { + Mage::log($message); + if ($exception) { + Mage::logException($exception); + } + // @TODO: dump the message and IPN form data + } catch (Exception $e) { + Mage::logException($e); + } + } + + /** + * Generate a message basing on request reason_code + * Should be invoked only on refunds + * @see payment_status at https://cms.paypal.com/us/cgi-bin/?&cmd=_render-content&content_ID=developer/e_howto_admin_IPNReference + * + * @return Mage_Sales_Model_Order_Status_History + */ + private function _explainRefundReason($addToHistory = true) + { + $message = Mage::helper('paypal')->__('unknown reason'); + switch ($this->getIpnFormData('reason_code')) { + case 'adjustment_reversal': + $message = Mage::helper('paypal')->__('reversal of an adjustment'); + break; + case 'buyer-complaint': + $message = Mage::helper('paypal')->__('customer complaint'); + break; + case 'chargeback': + $message = Mage::helper('paypal')->__('customer triggered a chargeback'); + break; + case 'chargeback_reimbursement': + $message = Mage::helper('paypal')->__('chargeback reimbursed'); + break; + case 'chargeback_settlement': + $message = Mage::helper('paypal')->__('chargeback settled'); + break; + case 'guarantee': + $message = Mage::helper('paypal')->__('customer triggered money-back guarantee'); + break; + case 'other': + $message = Mage::helper('paypal')->__('no reason'); + break; + case 'refund': + $message = Mage::helper('paypal')->__('merchant refunded payment'); + break; + } + return $this->_createIpnComment(Mage::helper('paypal')->__('Explanation: %s.', $message), $addToHistory); + } +} diff --git a/app/code/core/Mage/Paypal/Model/Mysql4/Setup.php b/app/code/core/Mage/Paypal/Model/Mysql4/Setup.php index 57c537e522..2922a68dc6 100644 --- a/app/code/core/Mage/Paypal/Model/Mysql4/Setup.php +++ b/app/code/core/Mage/Paypal/Model/Mysql4/Setup.php @@ -26,11 +26,8 @@ /** - * Enter description here... - * - * @category Mage - * @package Mage_Paypal * + * PayPal Setup Resource class */ class Mage_Paypal_Model_Mysql4_Setup extends Mage_Sales_Model_Mysql4_Setup { diff --git a/app/code/core/Mage/Paypal/Model/Source/ButtonFlavor.php b/app/code/core/Mage/Paypal/Model/Source/ButtonFlavor.php new file mode 100644 index 0000000000..0e03904ecd --- /dev/null +++ b/app/code/core/Mage/Paypal/Model/Source/ButtonFlavor.php @@ -0,0 +1,44 @@ + Mage_Paypal_Model_Api_Abstract::BUTTON_FLAVOR_DYNAMIC, 'label' => Mage::helper('paypal')->__('Dynamic')), + array('value' => Mage_Paypal_Model_Api_Abstract::BUTTON_FLAVOR_STATIC, 'label' => Mage::helper('paypal')->__('Static')), + ); + } +} diff --git a/app/code/core/Mage/Paypal/Model/Source/ButtonType.php b/app/code/core/Mage/Paypal/Model/Source/ButtonType.php new file mode 100644 index 0000000000..fd3029f72f --- /dev/null +++ b/app/code/core/Mage/Paypal/Model/Source/ButtonType.php @@ -0,0 +1,44 @@ + Mage_Paypal_Model_Api_Abstract::BUTTON_TYPE_ACCEPTANCE, 'label' => Mage::helper('paypal')->__('Standard')), + array('value' => Mage_Paypal_Model_Api_Abstract::BUTTON_TYPE_DEFAULT, 'label' => Mage::helper('paypal')->__('Acceptance Mark Image')), + ); + } +} diff --git a/app/code/core/Mage/Paypal/Model/Source/Cctype.php b/app/code/core/Mage/Paypal/Model/Source/Cctype.php index 7a0ad866de..6c4dc932f8 100644 --- a/app/code/core/Mage/Paypal/Model/Source/Cctype.php +++ b/app/code/core/Mage/Paypal/Model/Source/Cctype.php @@ -33,8 +33,12 @@ */ class Mage_Paypal_Model_Source_Cctype extends Mage_Payment_Model_Source_Cctype { + /** + * Get available credit cards as option array + * @return array + */ public function getAllowedTypes() { - return array('VI', 'MC', 'AE', 'DI', 'OT'); + return array('VI', 'MC', 'AE', 'DI', 'SS', 'OT'); } } diff --git a/app/code/core/Mage/Paypal/Model/Source/SolutionType.php b/app/code/core/Mage/Paypal/Model/Source/SolutionType.php new file mode 100644 index 0000000000..aa0e2de2c9 --- /dev/null +++ b/app/code/core/Mage/Paypal/Model/Source/SolutionType.php @@ -0,0 +1,44 @@ + Mage_Paypal_Model_Api_Abstract::SOLUTION_TYPE_SOLE, 'label' => Mage::helper('paypal')->__('Express Checkout for auctions')), + array('value' => Mage_Paypal_Model_Api_Abstract::SOLUTION_TYPE_MARK, 'label' => Mage::helper('paypal')->__('Normal Express Checkout')), + ); + } +} diff --git a/app/code/core/Mage/Paypal/Model/Source/StandardAction.php b/app/code/core/Mage/Paypal/Model/Source/StandardAction.php index 0134c19b85..e5b878813c 100644 --- a/app/code/core/Mage/Paypal/Model/Source/StandardAction.php +++ b/app/code/core/Mage/Paypal/Model/Source/StandardAction.php @@ -25,13 +25,14 @@ */ /** - * - * PayPal Payment Action Dropdown source - * - * @author Magento Core Team + * PayPal Payment standard payment method source */ class Mage_Paypal_Model_Source_StandardAction { + /** + * Get available PayPal Standard Actions as option array + * @return array + */ public function toOptionArray() { return array( diff --git a/app/code/core/Mage/Paypal/Model/Standard.php b/app/code/core/Mage/Paypal/Model/Standard.php index f3161cf929..88f944a647 100644 --- a/app/code/core/Mage/Paypal/Model/Standard.php +++ b/app/code/core/Mage/Paypal/Model/Standard.php @@ -113,6 +113,10 @@ public function canUseForMultishipping() return false; } + /** + * Create main block for standard form + * + */ public function createFormBlock($name) { $block = $this->getLayout()->createBlock('paypal/standard_form', $name) @@ -144,16 +148,21 @@ public function onInvoiceCreate(Mage_Sales_Model_Invoice_Payment $payment) } - public function canCapture() - { - return false; - } - + /** + * Return Order place redirect url + * + * @return string + */ public function getOrderPlaceRedirectUrl() { return Mage::getUrl('paypal/standard/redirect', array('_secure' => true)); } + /** + * Return form field array + * + * @return array + */ public function getStandardCheckoutFormFields() { if ($this->getQuote()->getIsVirtual()) { @@ -182,7 +191,7 @@ public function getStandardCheckoutFormFields() 'business' => Mage::getStoreConfig('paypal/wps/business_account'), 'return' => Mage::getUrl('paypal/standard/success',array('_secure' => true)), 'cancel_return' => Mage::getUrl('paypal/standard/cancel',array('_secure' => false)), - 'notify_url' => Mage::getUrl('paypal/standard/ipn'), + 'notify_url' => Mage::getUrl('paypal/ipn/standard'), 'invoice' => $this->getCheckout()->getLastRealOrderId(), 'currency_code' => $currency_code, 'address_override' => 1, @@ -197,7 +206,7 @@ public function getStandardCheckoutFormFields() 'bn' => 'Varien_Cart_WPS_US' ); - $logoUrl = Mage::getStoreConfig('paypal/wps/logo_url'); + $logoUrl = Mage::getStoreConfig('paypal/style/logo_url'); if($logoUrl){ $sArr = array_merge($sArr, array( 'cpp_header_image' => $logoUrl @@ -217,8 +226,8 @@ public function getStandardCheckoutFormFields() */ if ($transaciton_type=='O') { $businessName = Mage::getStoreConfig('paypal/wps/business_name'); - $storeName = Mage::getStoreConfig('store/system/name'); - $amount = ($a->getBaseSubtotal()+$b->getBaseSubtotal())-($a->getBaseDiscountAmount()+$b->getBaseDiscountAmount()); + $storeName = Mage::getStoreConfig('system/store/name'); + $amount = $a->getBaseSubtotal()+$b->getBaseSubtotal()+$a->getBaseDiscountAmount()+$b->getBaseDiscountAmount(); $sArr = array_merge($sArr, array( 'cmd' => '_ext-enter', 'redirect_cmd' => '_xclick', @@ -251,7 +260,7 @@ public function getStandardCheckoutFormFields() 'item_name_'.$i => $item->getName(), 'item_number_'.$i => $item->getSku(), 'quantity_'.$i => $item->getQty(), - 'amount_'.$i => sprintf('%.2f', ($item->getBaseCalculationPrice() - $item->getBaseDiscountAmount())), + 'amount_'.$i => sprintf('%.2f', ($item->getBaseCalculationPrice() + $item->getBaseDiscountAmount())), )); if($item->getBaseTaxAmount()>0){ $sArr = array_merge($sArr, array( @@ -312,6 +321,10 @@ public function getStandardCheckoutFormFields() return $rArr; } + /** + * Return request url, all information will be sended to this url + * @return string + */ public function getPaypalUrl() { if (Mage::getStoreConfig('paypal/wps/sandbox_flag')==1) { @@ -322,170 +335,41 @@ public function getPaypalUrl() return $url; } + /** + * Get debug flag value + * + * @return bool + */ public function getDebug() { return Mage::getStoreConfig('paypal/wps/debug_flag'); } + /** + * Process IPN request, store data in comments + * @deprecated after 1.4.0.0-alpha3 + */ public function ipnPostSubmit() { - $sReq = ''; - $sReqDebug = ''; - foreach($this->getIpnFormData() as $k=>$v) { - $sReq .= '&'.$k.'='.urlencode(stripslashes($v)); - $sReqDebug .= '&'.$k.'='; - - } - //append ipn commdn - $sReq .= "&cmd=_notify-validate"; - $sReq = substr($sReq, 1); - - if ($this->getDebug()) { - $debug = Mage::getModel('paypal/api_debug') - ->setApiEndpoint($this->getPaypalUrl()) - ->setRequestBody($sReq) - ->save(); - } - $http = new Varien_Http_Adapter_Curl(); - $http->write(Zend_Http_Client::POST,$this->getPaypalUrl(), '1.1', array(), $sReq); - $response = $http->read(); - $response = preg_split('/^\r?$/m', $response, 2); - $response = trim($response[1]); - if ($this->getDebug()) { - $debug->setResponseBody($response)->save(); - } - - //when verified need to convert order into invoice - $id = $this->getIpnFormData('invoice'); - $order = Mage::getModel('sales/order'); - $order->loadByIncrementId($id); - - if ($response=='VERIFIED') { - if (!$order->getId()) { - /* - * need to have logic when there is no order with the order id from paypal - */ - - } else { - - if ($this->getIpnFormData('mc_gross')!=$order->getBaseGrandTotal()) { - //when grand total does not equal, need to have some logic to take care - $order->addStatusToHistory( - $order->getStatus(),//continue setting current order status - Mage::helper('paypal')->__('Order total amount does not match paypal gross total amount') - ); - $order->save(); - } else { - /* - //quote id - $quote_id = $order->getQuoteId(); - //the customer close the browser or going back after submitting payment - //so the quote is still in session and need to clear the session - //and send email - if ($this->getQuote() && $this->getQuote()->getId()==$quote_id) { - $this->getCheckout()->clear(); - $order->sendNewOrderEmail(); - } - */ - - /* - if payer_status=verified ==> transaction in sale mode - if transactin in sale mode, we need to create an invoice - otherwise transaction in authorization mode - */ - if ($this->getIpnFormData('payment_status') == 'Completed') { - if (!$order->canInvoice()) { - //when order cannot create invoice, need to have some logic to take care - $order->addStatusToHistory( - $order->getStatus(), // keep order status/state - Mage::helper('paypal')->__('Error in creating an invoice', true), - $notified = true - ); - - } else { - //need to save transaction id - $order->getPayment()->setTransactionId($this->getIpnFormData('txn_id')); - //need to convert from order into invoice - $invoice = $order->prepareInvoice(); - $invoice->register()->pay(); - Mage::getModel('core/resource_transaction') - ->addObject($invoice) - ->addObject($invoice->getOrder()) - ->save(); - $order->setState( - Mage_Sales_Model_Order::STATE_COMPLETE, true, - Mage::helper('paypal')->__('Invoice #%s created', $invoice->getIncrementId()), - $notified = true - ); - } - } else { - $newOrderStatus = $this->getConfigData('order_status', $order->getStoreId()); - if (empty($newOrderStatus)) { - $newOrderStatus = true; - } - $order->setState( - Mage_Sales_Model_Order::STATE_PROCESSING, $newOrderStatus, - Mage::helper('paypal')->__('Received IPN verification'), - $notified = true - ); - } - - $ipnCustomerNotified = true; - if (!$order->getPaypalIpnCustomerNotified()) { - $ipnCustomerNotified = false; - $order->setPaypalIpnCustomerNotified(1); - } - - $order->save(); - - if (!$ipnCustomerNotified) { - $order->sendNewOrderEmail(); - } - - }//else amount the same and there is order obj - //there are status added to order - } - }else{ - /* - Canceled_Reversal - Completed - Denied - Expired - Failed - Pending - Processed - Refunded - Reversed - Voided - */ - $payment_status= $this->getIpnFormData('payment_status'); - $comment = $payment_status; - if ($payment_status == 'Pending') { - $comment .= ' - ' . $this->getIpnFormData('pending_reason'); - } elseif ( ($payment_status == 'Reversed') || ($payment_status == 'Refunded') ) { - $comment .= ' - ' . $this->getIpnFormData('reason_code'); - } - //response error - if (!$order->getId()) { - /* - * need to have logic when there is no order with the order id from paypal - */ - } else { - $order->addStatusToHistory( - $order->getStatus(),//continue setting current order status - Mage::helper('paypal')->__('Paypal IPN Invalid %s.', $comment) - ); - $order->save(); - } - } + $ipn = Mage::getModel('paypal/ipn'); + $ipn->setIpnFormData($this->getIpnFormData())->processIpnRequest(); } + /** + * Get initialized flag status + * @return true + */ public function isInitializeNeeded() { return true; } + /** + * Instantiate state and set it to state onject + * //@param + * //@param + */ public function initialize($paymentAction, $stateObject) { $state = Mage_Sales_Model_Order::STATE_PENDING_PAYMENT; diff --git a/app/code/core/Mage/Paypal/controllers/Adminhtml/Paypal/DirectController.php b/app/code/core/Mage/Paypal/controllers/Adminhtml/Paypal/DirectController.php new file mode 100644 index 0000000000..e3704541b8 --- /dev/null +++ b/app/code/core/Mage/Paypal/controllers/Adminhtml/Paypal/DirectController.php @@ -0,0 +1,118 @@ +getRequest()->getParam('payment'); + + $this->_getValidation() + ->setCcNumber($payment['cc_number']) + ->setCcExpMonth($payment['cc_exp_month']) + ->setCcExpYear($payment['cc_exp_year']) + ->callLookup(); + + $result = array(); + if ($this->_getValidation()->getEnrolled() == 'Y' + && !$this->_getValidation()->getErrorNo() + && $this->_getValidation()->getAcsUrl()) { + $result = array('iframeUrl' => $this->getUrl('*/paypal_direct/validate', array('_current' => true, '_secure' => true))); + } else { + $result = array('iframeUrl' => $this->getUrl('*/paypal_direct/finalizeValidate', array('_current' => true, '_secure' => true))); + } + $this->getResponse()->setBody(Zend_Json::encode($result)); + } + + /** + * Load auto submit form, for sending customer to card holder validation page + * + */ + public function validateAction() + { + $this->loadLayout(); + $this->renderLayout(); + } + + /** + * Show finalize page. close iframe and redirect to next step + * + */ + public function finalizeValidateAction() + { + $this->loadLayout(); + $this->renderLayout(); + } + + /** + * Loaded as callback url from cardholder validation page + * analize incoming data, call cmpi_authorization method, analize result. + * show finalize page with success result or error message + * + */ + public function termValidateAction() + { + $PAResPayload = $this->getRequest()->getParam('PaRes'); + $MD = $this->getRequest()->getParam('MD'); + $this->_getValidation() + ->setPaResPayload($PAResPayload) + ->setMd($MD) + ->callAuthentication(); + + if ($this->_getValidation()->getErrorNo()==0 + && $this->_getValidation()->getSignature() == 'Y' + && $this->_getValidation()->getPaResStatus() != 'N') { + $this->loadLayout(); + $this->renderLayout(); + } else { + $this->loadLayout(); + $this->getLayout()->getBlock('root')->setError($this->_getValidation()->getErrorDesc()); + $this->renderLayout(); + } + + } +} diff --git a/app/code/core/Mage/Paypal/controllers/DirectController.php b/app/code/core/Mage/Paypal/controllers/DirectController.php new file mode 100644 index 0000000000..4b128a3ad9 --- /dev/null +++ b/app/code/core/Mage/Paypal/controllers/DirectController.php @@ -0,0 +1,127 @@ +getRequest()->getParam('payment'); + + $this->_getValidation() + ->setCcNumber($payment['cc_number']) + ->setCcExpMonth($payment['cc_exp_month']) + ->setCcExpYear($payment['cc_exp_year']) + ->callLookup(); + + $result = array(); + if ($this->_getValidation()->getEnrolled() == 'Y' + && !$this->_getValidation()->getErrorNo() + && $this->_getValidation()->getAcsUrl()) { + $result = array('iframeUrl'=>Mage::getUrl('paypal/direct/validate', array('_secure' => true))); + } else { + $result = array('iframeUrl'=>Mage::getUrl('paypal/direct/finalizeValidate', array('_secure' => true))); + } + $this->getResponse()->setBody(Zend_Json::encode($result)); + } + + /** + * IPN Notify url. process IPN acion. + */ + public function notifyAction() + { + $ipn = Mage::getModel('paypal/api_ipn'); + $ipn->setIpnFormData($this->getRequest()->getParams()); + $ipn->processIpnRequest(); + } + + /** + * Load auto submit form, for sending customer to card holder validation page + * + */ + public function validateAction() + { + $this->loadLayout(); + $this->renderLayout(); + } + + /** + * Show finalize page. close iframe and redirect to next step + * + */ + public function finalizeValidateAction() + { + $this->loadLayout(); + $this->renderLayout(); + } + + /** + * Loaded as callback url from cardholder validation page + * analize incoming data, call cmpi_authorization method, analize result. + * show finalize page with success result or error message + */ + public function termValidateAction() + { + $PAResPayload = $this->getRequest()->getParam('PaRes'); + $MD = $this->getRequest()->getParam('MD'); + $this->_getValidation() + ->setPaResPayload($PAResPayload) + ->setMd($MD) + ->callAuthentication(); + + if ($this->_getValidation()->getErrorNo()==0 + && $this->_getValidation()->getSignature() == 'Y' + && $this->_getValidation()->getPaResStatus() != 'N') { + $this->loadLayout(); + $this->renderLayout(); + } else { + $this->loadLayout(); + $this->getLayout()->getBlock('root')->setError($this->_getValidation()->getErrorDesc()); + $this->renderLayout(); + } + + } +} diff --git a/app/code/core/Mage/Paypal/controllers/ExpressController.php b/app/code/core/Mage/Paypal/controllers/ExpressController.php index 3c1897d46d..9a6c14c588 100644 --- a/app/code/core/Mage/Paypal/controllers/ExpressController.php +++ b/app/code/core/Mage/Paypal/controllers/ExpressController.php @@ -26,8 +26,6 @@ /** * Express Checkout Controller - * - * @author Magento Core Team */ class Mage_Paypal_ExpressController extends Mage_Core_Controller_Front_Action { @@ -37,22 +35,40 @@ class Mage_Paypal_ExpressController extends Mage_Core_Controller_Front_Action */ protected function _expireAjax() { - if (!Mage::getSingleton('checkout/session')->getQuote()->hasItems()) { + if (!$this->_getQuote()->hasItems()) { $this->getResponse()->setHeader('HTTP/1.1','403 Session Expired'); exit; } } + /** + * @deprecated after 1.4.0.0-alpha3 + */ + public function getExpress() + { + return $this->_getExpress(); + } + /** * Get singleton with paypal express order transaction information * * @return Mage_Paypal_Model_Express */ - public function getExpress() + protected function _getExpress() { return Mage::getSingleton('paypal/express'); } + /** + * Return Express payPal method Api object + * + * @return Mage_PayPal_Model_Api_Nvp + */ + protected function _getExpressApi() + { + return $this->_getExpress()->getApi(); + } + /** * When there's an API error */ @@ -70,18 +86,60 @@ public function cancelAction() $this->_redirect('checkout/cart'); } + /** + * PayPal session instance getter + * @return Mage_PayPal_Model_Session + */ + protected function _getSession() + { + return Mage::getSingleton('paypal/session'); + } + + /** + * Return checkout session object + * @return Mage_Checkout_Model_Session + */ + protected function _getCheckout() + { + return Mage::getSingleton('checkout/session'); + } + + /** + * Return checkout quote object + * + * @return Mage_Sale_Model_Quote + */ + protected function _getQuote() + { + return Mage::getSingleton('checkout/session')->getQuote(); + } + + /** + * IPN Notify url. process IPN acion. + */ + public function notifyAction() + { + $ipn = Mage::getModel('paypal/api_ipn'); + $ipn->setIpnFormData($this->getRequest()->getParams()); + $ipn->processIpnRequest(); + } + /** * When a customer clicks Paypal button on shopping cart */ public function shortcutAction() { - $this->getExpress()->shortcutSetExpressCheckout(); - $this->getResponse()->setRedirect($this->getExpress()->getRedirectUrl()); + $this->_getExpress()->shortcutSetExpressCheckout(); + $this->getResponse()->setRedirect($this->_getExpress()->getRedirectUrl()); } + /** + * redirect customer back to paypal, to edit his payment account data + * + */ public function editAction() { - $this->getResponse()->setRedirect($this->getExpress()->getApi()->getPaypalUrl()); + $this->getResponse()->setRedirect($this->_getExpressApi()->getPaypalUrl()); } /** @@ -90,8 +148,20 @@ public function editAction() */ public function returnAction() { - $this->getExpress()->returnFromPaypal(); - $this->getResponse()->setRedirect($this->getExpress()->getRedirectUrl()); + $this->_getExpress()->returnFromPaypal(); + $this->getResponse()->setRedirect($this->_getExpress()->getRedirectUrl()); + } + + /** + * This is shown behind a link on the PayPal site with the bank number. + * The customer can click thr link to return to the shop. + * So this url should show the customer that his order is completed + * and will be shipped as soon as he transfered the money. + */ + public function bankAction() + { + $this->loadLayout(); + $this->renderLayout(); } /** @@ -100,7 +170,7 @@ public function returnAction() */ public function reviewAction() { - $payment = Mage::getSingleton('checkout/session')->getQuote()->getPayment(); + $payment = $this->_getQuote()->getPayment(); if ($payment && $payment->getPaypalPayerId()) { $this->loadLayout(); $this->_initLayoutMessages('paypal/session'); @@ -110,12 +180,20 @@ public function reviewAction() } } + /** + * @deprecated after 1.4.0.0-alpha3 + */ + public function getReview() + { + return $this->_getReview(); + } + /** * Get PayPal Onepage checkout model * * @return Mage_Paypal_Model_Express_Onepage */ - public function getReview() + protected function _getReview() { return Mage::getSingleton('paypal/express_review'); } @@ -135,7 +213,7 @@ public function saveShippingMethodAction() } $data = $this->getRequest()->getParam('shipping_method', ''); - $result = $this->getReview()->saveShippingMethod($data); + $result = $this->_getReview()->saveShippingMethod($data); if ($this->getRequest()->getParam('ajax')) { $this->loadLayout('paypal_express_review_details'); @@ -151,121 +229,59 @@ public function saveShippingMethodAction() */ public function saveOrderAction() { - /** - * 1- create order - * 2- place order (call doexpress checkout) - * 3- save order - */ $error_message = ''; - $payPalSession = Mage::getSingleton('paypal/session'); + $payPalSession = $this->_getSession(); try { - $address = $this->getReview()->getQuote()->getShippingAddress(); + $address = $this->_getQuote()->getShippingAddress(); if (!$address->getShippingMethod()) { if ($shippingMethod = $this->getRequest()->getParam('shipping_method')) { - $this->getReview()->saveShippingMethod($shippingMethod); - } else if (!$this->getReview()->getQuote()->getIsVirtual()) { + $this->_getReview()->saveShippingMethod($shippingMethod); + } else if (!$this->_getReview()->getQuote()->getIsVirtual()) { $payPalSession->addError(Mage::helper('paypal')->__('Please select a valid shipping method')); $this->_redirect('paypal/express/review'); return; } } - - $customer = $this->getReview()->getQuote()->getCustomer(); - if (!$customer || !$customer->getId()) { - $this->getReview()->getQuote() - ->setCustomerIsGuest(true) - ->setCustomerGroupId(Mage_Customer_Model_Group::NOT_LOGGED_IN_ID); - } - unset($customer); // for backward compatibility, see logic after place order - - $billing = $this->getReview()->getQuote()->getBillingAddress(); - $shipping = $this->getReview()->getQuote()->getShippingAddress(); - - $convertQuote = Mage::getModel('sales/convert_quote'); - /* @var $convertQuote Mage_Sales_Model_Convert_Quote */ - $order = Mage::getModel('sales/order'); - /* @var $order Mage_Sales_Model_Order */ - - if ($this->getReview()->getQuote()->isVirtual()) { - $order = $convertQuote->addressToOrder($billing); - } else { - $order = $convertQuote->addressToOrder($shipping); - } - - $order->setBillingAddress($convertQuote->addressToOrderAddress($billing)); - $order->setShippingAddress($convertQuote->addressToOrderAddress($shipping)); - $order->setPayment($convertQuote->paymentToOrderPayment($this->getReview()->getQuote()->getPayment())); - - foreach ($this->getReview()->getQuote()->getAllItems() as $item) { - $order->addItem($convertQuote->itemToOrderItem($item)); - } - - /** - * We can use configuration data for declare new order status - */ - Mage::dispatchEvent('checkout_type_onepage_save_order', array('order'=>$order, 'quote'=>$this->getReview()->getQuote())); - - //customer checkout from shopping cart page - if (!$order->getCustomerEmail()) { - $order->setCustomerEmail($shipping->getEmail()); - } - - $order->place(); - - if (isset($customer) && $customer && $this->getReview()->getQuote()->getCheckoutMethod()==Mage_Sales_Model_Quote::CHECKOUT_METHOD_REGISTER) { - $customer->save(); - $customer->setDefaultBilling($customerBilling->getId()); - $customerShippingId = isset($customerShipping) ? $customerShipping->getId() : $customerBilling->getId(); - $customer->setDefaultShipping($customerShippingId); - $customer->save(); - - $order->setCustomerId($customer->getId()) - ->setCustomerEmail($customer->getEmail()) - ->setCustomerPrefix($customer->getPrefix()) - ->setCustomerFirstname($customer->getFirstname()) - ->setCustomerMiddlename($customer->getMiddlename()) - ->setCustomerLastname($customer->getLastname()) - ->setCustomerSuffix($customer->getSuffix()) - ->setCustomerGroupId($customer->getGroupId()) - ->setCustomerTaxClassId($customer->getTaxClassId()); - - $billing->setCustomerId($customer->getId())->setCustomerAddressId($customerBilling->getId()); - $shipping->setCustomerId($customer->getId())->setCustomerAddressId($customerShippingId); - } - + $service = Mage::getModel('sales/service_quote', $this->_getQuote()); + $order = $service->submit(); } catch (Mage_Core_Exception $e){ - $error_message = $e->getMessage(); - } catch (Exception $e){ - if (isset($order)) { - $error_message = $order->getErrors(); - } else { - $error_message = $e->getMessage(); - } - } - - if ($error_message) { $payPalSession->addError($e->getMessage()); $this->_redirect('paypal/express/review'); return; + } catch (Exception $e) { + Mage::logException($e); + $payPalSession->addError($this->__('There was an error processing your order. Please contact us.')); + $this->_redirect('paypal/express/review'); + return; } - $order->save(); + //@todo, bug: email send flag not set. + if ($order->hasInvoices() && $this->_getExpress()->canSendEmailCopy()) { + foreach ($order->getInvoiceCollection() as $invoice) { + $invoice->sendEmail()->setEmailSent(true); + } + } - $this->getReview()->getQuote()->setIsActive(false); - $this->getReview()->getQuote()->save(); + $order->sendNewOrderEmail(); - $orderId = $order->getIncrementId(); - $this->getReview()->getCheckout()->setLastQuoteId($this->getReview()->getQuote()->getId()); - $this->getReview()->getCheckout()->setLastSuccessQuoteId($this->getReview()->getQuote()->getId()); - $this->getReview()->getCheckout()->setLastOrderId($order->getId()); - $this->getReview()->getCheckout()->setLastRealOrderId($order->getIncrementId()); + $this->_getReview()->getQuote()->setIsActive(false); + $this->_getReview()->getQuote()->save(); - $order->sendNewOrderEmail(); + $orderId = $order->getIncrementId(); + $this->_getReview()->getCheckout()->setLastQuoteId($this->_getReview()->getQuote()->getId()); + $this->_getReview()->getCheckout()->setLastSuccessQuoteId($this->_getReview()->getQuote()->getId()); + $this->_getReview()->getCheckout()->setLastOrderId($order->getId()); + $this->_getReview()->getCheckout()->setLastRealOrderId($order->getIncrementId()); + $redirect = $this->_getExpress()->getGiropayRedirectUrl(); $payPalSession->unsExpressCheckoutMethod(); - $this->_redirect('checkout/onepage/success'); + if ($redirect) { + $this->getResponse()->setRedirect($redirect); + } else { + $this->_redirect('checkout/onepage/success'); + } } /** @@ -273,51 +289,36 @@ public function saveOrderAction() * as payment method not a separate checkout from shopping cart * */ - public function updateOrderAction() { + public function updateOrderAction() + { $error_message = ''; - $payPalSession = Mage::getSingleton('paypal/session'); - - $order = Mage::getModel('sales/order')->load(Mage::getSingleton('checkout/session')->getLastOrderId()); - - if ($order->getId()) { - $comment = null; - if ($order->canInvoice() && $this->getExpress()->getPaymentAction() == Mage_Paypal_Model_Api_Abstract::PAYMENT_TYPE_SALE) { - $invoice = $order->prepareInvoice(); - $invoice->register()->capture(); - Mage::getModel('core/resource_transaction') - ->addObject($invoice) - ->addObject($invoice->getOrder()) - ->save(); - - $orderState = Mage_Sales_Model_Order::STATE_PROCESSING; - $orderStatus = $this->getExpress()->getConfigData('order_status'); - $comment = Mage::helper('paypal')->__('Invoice #%s created', $invoice->getIncrementId()); - } else { - $this->getExpress()->placeOrder($order->getPayment()); - - $orderState = Mage_Sales_Model_Order::STATE_PROCESSING; - $orderStatus = $this->getExpress()->getConfigData('order_status'); - } - - if (!$orderStatus) { - $orderStatus = $order->getConfig()->getStateDefaultStatus($orderState); + $payPalSession = $this->_getSession(); + + if ($orderId = $this->_getCheckout()->getLastOrderId()) { + try{ + $this->_getExpress()->updateOrder($orderId); + } catch (Mage_Core_Exception $e) { + $this->_getSession()->addError($e->getMessage()); + $this->_redirect('paypal/express/review'); + return; + } catch (Exception $e) { + Mage::helper('checkout')->sendPaymentFailedEmail($this->_getQuote(), $e->getMessage()); + $this->_getSession()->addError( + Mage::helper('paypal')->__('There was an error processing your order. Please contact us.') + ); + $this->_redirect('paypal/express/review'); + return; } - if (!$comment) { - $comment = Mage::helper('paypal')->__('Customer returned from PayPal site.'); - } - - $order->setState($orderState, $orderStatus, $comment, $notified = true); - $order->save(); - - Mage::getSingleton('checkout/session')->getQuote()->setIsActive(false); - Mage::getSingleton('checkout/session')->getQuote()->save(); - - $order->sendNewOrderEmail(); + $this->_getQuote()->setIsActive(false); + $this->_getQuote()->save(); } $payPalSession->unsExpressCheckoutMethod(); - - $this->_redirect('checkout/onepage/success'); + //process Giropay or ordinary payment + if ($redirect = $this->_getExpress()->getGiropayRedirectUrl()) { + $this->getResponse()->setRedirect($redirect); + } else { + $this->_redirect('checkout/onepage/success'); + } } - } diff --git a/app/code/core/Mage/Paypal/controllers/IpnController.php b/app/code/core/Mage/Paypal/controllers/IpnController.php new file mode 100644 index 0000000000..84ec0c7481 --- /dev/null +++ b/app/code/core/Mage/Paypal/controllers/IpnController.php @@ -0,0 +1,66 @@ +_ipnAction(Mage_Paypal_Model_Config::METHOD_WPS); + } + + /** + * Process IPN for PayPal Express + */ + public function expressAction() + { + return $this->_ipnAction(Mage_Paypal_Model_Config::METHOD_WPP_EXPRESS); + } + + /** + * Actually process the IPN + * @param string $method + */ + protected function _ipnAction($method) + { + if (!$this->getRequest()->isPost()) { + return; + } + $config = Mage::getModel('paypal/config', array($method)); + if (!$config->active) { + return; + } + Mage::getModel('paypal/ipn') + ->setConfig($config) + ->setIpnFormData($this->getRequest()->getPost()) + ->processIpnRequest(); + } +} diff --git a/app/code/core/Mage/Paypal/controllers/StandardController.php b/app/code/core/Mage/Paypal/controllers/StandardController.php index 1bf36ab28c..2863c96937 100644 --- a/app/code/core/Mage/Paypal/controllers/StandardController.php +++ b/app/code/core/Mage/Paypal/controllers/StandardController.php @@ -52,6 +52,10 @@ public function getOrder() return $this->_order; } + /** + * Send expire header to ajax response + * + */ protected function _expireAjax() { if (!Mage::getSingleton('checkout/session')->getQuote()->hasItems()) { @@ -87,6 +91,8 @@ public function redirectAction() */ public function cancelAction() { + // TODO: this code is deprecated. The registerCancellation() order method should be called instead + $session = Mage::getSingleton('checkout/session'); $session->setQuoteId($session->getPaypalStandardQuoteId(true)); @@ -129,27 +135,11 @@ public function successAction() } /** - * when paypal returns via ipn - * cannot have any output here - * validate IPN data - * if data is valid need to update the database that the user has + * @deprecated after 1.4.0.0-alpha3 + * @see Mage_Paypal_IpnController */ public function ipnAction() { - if (!$this->getRequest()->isPost()) { - $this->_redirect(''); - return; - } - - if($this->getStandard()->getDebug()){ - $debug = Mage::getModel('paypal/api_debug') - ->setApiEndpoint($this->getStandard()->getPaypalUrl()) - ->setRequestBody(print_r($this->getRequest()->getPost(),1)) - ->save(); - } - - $this->getStandard()->setIpnFormData($this->getRequest()->getPost()); - $this->getStandard()->ipnPostSubmit(); + $this->_forward('standard', 'ipn'); } - } diff --git a/app/code/core/Mage/Paypal/etc/config.xml b/app/code/core/Mage/Paypal/etc/config.xml index b97c37b5e3..40df257201 100644 --- a/app/code/core/Mage/Paypal/etc/config.xml +++ b/app/code/core/Mage/Paypal/etc/config.xml @@ -28,7 +28,7 @@ - 0.7.2 + 0.7.3 @@ -69,6 +69,29 @@ + + + + + SS + Maestro/Solo + 40 + + + + + + + * + * + * + + + * + * + * + + @@ -102,6 +125,13 @@ + + + + paypal.xml + + + @@ -112,39 +142,70 @@ - + + + + + + Mage_Paypal_Adminhtml + + + + + + + + + + + dynamic + ec-shortcut - - Authorization + paypal/express - Paypal Express + PayPal + Sale 0 + Sole + 1 + fraud_order + 0 - - Authorization + + Sale paypal/direct - Paypal Direct + Debit or Credit Card AE,VI,MC,DI 0 + fraud_order + 0 + 0 + + + + https://centineltest.cardinalcommerce.com/maps/txns.asp + 100 + 100 - - paypal/standard - Paypal Standard - IPN - 0 - O - pending_paypal + + paypal/standard + PayPal + IPN + 0 + Sale + I + pending_paypal diff --git a/app/code/core/Mage/Paypal/etc/system.xml b/app/code/core/Mage/Paypal/etc/system.xml index 84ebb23236..ce11c3d01f 100644 --- a/app/code/core/Mage/Paypal/etc/system.xml +++ b/app/code/core/Mage/Paypal/etc/system.xml @@ -29,7 +29,7 @@ - + Sign up for PayPal Merchant Account now!]]> text @@ -47,11 +47,19 @@ 1 0 + + <label>Title</label> + <frontend_type>text</frontend_type> + <sort_order>2</sort_order> + <show_in_default>1</show_in_default> + <show_in_website>1</show_in_website> + <show_in_store>1</show_in_store> + select adminhtml/system_config_source_order_status_processing - 2 + 3 1 1 0 @@ -60,11 +68,93 @@ select paypal/source_paymentAction - 2 + 4 1 1 0 + + + select + adminhtml/system_config_source_yesno + 5 + 1 + 1 + 0 + + + + select + adminhtml/system_config_source_yesno + 18 + 1 + 1 + 0 + + + + select + adminhtml/system_config_source_yesno + 20 + 1 + 1 + 0 + + + + text + 22 + 1 + 1 + 0 + 1 + + + + text + 24 + 1 + 1 + 0 + 1 + + + + obscure + adminhtml/system_config_backend_encrypted + 26 + 1 + 1 + 0 + 1 + + + + text + 28 + 1 + 1 + 0 + 1 + + + + text + 30 + 1 + 1 + 0 + 1 + + + + text + 32 + 1 + 1 + 0 + 1 + text @@ -73,14 +163,6 @@ 1 0 - - <label>Title</label> - <frontend_type>text</frontend_type> - <sort_order>2</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - multiselect @@ -110,7 +192,7 @@ - + Sign up for PayPal Merchant Account now!]]> text @@ -163,6 +245,33 @@ 1 0 + + + select + adminhtml/system_config_source_yesno + 45 + 1 + 1 + 0 + + + + select + paypal/source_solutionType + 5 + 1 + 1 + 0 + + + + select + 6 + adminhtml/system_config_source_yesno + 1 + 1 + 0 + allowspecific @@ -189,12 +298,18 @@ 1 0 - - - + + + select + adminhtml/system_config_source_yesno + 80 + 1 + 1 + 0 + - + Sign up for PayPal Merchant Account now!]]> text @@ -220,7 +335,7 @@ 1 1 - + select paypal/source_standardAction @@ -256,7 +371,7 @@ 1 0 - + text 100 @@ -264,7 +379,7 @@ 1 0 - + allowspecific 50 @@ -295,15 +410,105 @@ 1 0 - + + - Sign up for PayPal Merchant Account now!]]> + Sign up for PayPal Merchant Account now!
+ See Demo]]>
text 1 1 1 0 + + + obscure + adminhtml/system_config_backend_encrypted + 1 + 1 + 1 + 0 + obscure @@ -331,14 +536,6 @@ 1 0 - - - text - 4 - 1 - 1 - 1 - text @@ -383,16 +580,16 @@ 0 - + 100 1 1 0 - https://www.paypal.com/au/cgi-bin/webscr?cmd=_express-checkout&useraction=&token= Where <user_action> is 'commit' or 'continue', depending on your preference of commit button text.]]> + https://www.paypal.com/cgi-bin/webscr?cmd=_express-checkout&useraction=&token= Where <user_action> is 'commit' or 'continue', depending on your preference of commit button text.]]>
- + Sign up for PayPal Merchant Account now!]]> text @@ -405,7 +602,7 @@ obscure adminhtml/system_config_backend_encrypted - 2 + 1 1 1 0 @@ -418,16 +615,6 @@ 1 0 - - - Maximum image size is 750x90 px. - text - 3 - 1 - 1 - 0 - - select diff --git a/app/code/core/Mage/Paypal/sql/paypal_setup/mysql4-upgrade-0.7.2-0.7.3.php b/app/code/core/Mage/Paypal/sql/paypal_setup/mysql4-upgrade-0.7.2-0.7.3.php new file mode 100644 index 0000000000..f4906ab064 --- /dev/null +++ b/app/code/core/Mage/Paypal/sql/paypal_setup/mysql4-upgrade-0.7.2-0.7.3.php @@ -0,0 +1,48 @@ +startSetup(); +$installer->addAttribute('quote_payment', 'account_status', array()); +$installer->addAttribute('quote_payment', 'address_status', array()); +$installer->addAttribute('quote_payment', 'protection_eligibility', array()); + +$installer->addAttribute('order_payment', 'cc_secure_verify', array()); +$installer->addAttribute('order_payment', 'account_status', array()); +$installer->addAttribute('order_payment', 'protection_eligibility', array()); +$installer->addAttribute('order_payment', 'address_status', array()); + +// move paypal style settings to new paths +foreach (array( + 'paypal/wpp/page_style' => 'paypal/style/page_style', + 'paypal/wps/logo_url' => 'paypal/style/logo_url', + ) as $from => $to) { + $installer->run(" + UPDATE {$installer->getTable('core/config_data')} SET `path` = '{$to}' + WHERE `path` = '{$from}' + "); +} +$installer->endSetup(); diff --git a/app/code/core/Mage/PaypalUk/Block/Adminhtml/Direct/Iframe.php b/app/code/core/Mage/PaypalUk/Block/Adminhtml/Direct/Iframe.php new file mode 100644 index 0000000000..552001299e --- /dev/null +++ b/app/code/core/Mage/PaypalUk/Block/Adminhtml/Direct/Iframe.php @@ -0,0 +1,72 @@ +setJsObjectName('payPalUkCentinel'); + $this->setCentinelIframeId('paypaluk_3dsecure_iframe'); + } + + /** + * Return 3D secure validate url + * + * @return string + */ + public function getValidateUrl() + { + return $this->getUrl('*/paypaluk_direct/lookup', array('_current' => true, '_secure' => true)); + } + + /** + * Return formated centinel js object name + * + * @return string + */ + public function getCentinelJsObjectName() + { + return $this->getJsObjectName(); + } + + /** + * Return direct paymethod + * + * @return Mage_PayPalUk_Model_Direct + */ + public function getMethod() + { + return Mage::getSingleton('paypalUk/direct'); + } + +} diff --git a/app/code/core/Mage/PaypalUk/Block/Direct/Finalize.php b/app/code/core/Mage/PaypalUk/Block/Direct/Finalize.php new file mode 100644 index 0000000000..e8a2190d3a --- /dev/null +++ b/app/code/core/Mage/PaypalUk/Block/Direct/Finalize.php @@ -0,0 +1,52 @@ +setJsObjectName('payPalUkCentinel'); + $this->setCentinelIframeId('paypaluk_3dsecure_iframe'); + } + + /** + * Return formated centinel js object name + * + * @return string + */ + public function getCentinelJsObjectName() + { + return $this->getJsObjectName(); + } +} diff --git a/app/code/core/Mage/PaypalUk/Block/Direct/Form.php b/app/code/core/Mage/PaypalUk/Block/Direct/Form.php index a83e08addb..7ac3a5455d 100644 --- a/app/code/core/Mage/PaypalUk/Block/Direct/Form.php +++ b/app/code/core/Mage/PaypalUk/Block/Direct/Form.php @@ -29,11 +29,26 @@ */ class Mage_PaypalUk_Block_Direct_Form extends Mage_Payment_Block_Form_Cc { + + /** + * Payment method object getter + * @return Mage_PayPalUk_Model_Direct + */ protected function _getDirect() { return Mage::getSingleton('paypaluk/direct'); } + /** + * Set 3dsecure-specific parameters + */ + public function __construct() + { + parent::__construct(); + $this->setJsObjectName('payPalUkCentinel'); + $this->setCentinelIframeId('paypaluk_3dsecure_iframe'); + } + /** * Retrieve availables credit card types * @@ -90,7 +105,7 @@ public function hasSsCardType() /** * Add UK domestic cards additional fields as child block - * + * * Forks a clone, but with a different form * * @return Mage_PaypalUk_Block_Direct_Form @@ -103,4 +118,24 @@ public function _beforeToHtml() ); return parent::_beforeToHtml(); } + + /** + * Return 3D secure validate url + * + * @return string + */ + public function getValidateUrl() + { + return $this->getUrl('paypaluk/direct/lookup', array('_secure' => true)); + } + + /** + * Return formated centinel js object name + * + * @return string + */ + public function getCentinelJsObjectName() + { + return $this->getJsObjectName(); + } } diff --git a/app/code/core/Mage/PaypalUk/Block/Direct/Info.php b/app/code/core/Mage/PaypalUk/Block/Direct/Info.php index 20df77907f..ff31b070c2 100644 --- a/app/code/core/Mage/PaypalUk/Block/Direct/Info.php +++ b/app/code/core/Mage/PaypalUk/Block/Direct/Info.php @@ -24,15 +24,27 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ - +/** + * display payment information on view order page in admin scope + */ class Mage_PaypalUk_Block_Direct_Info extends Mage_Payment_Block_Info_Cc { + /** + *Setup template for info page + * @return Mage_PaypalUk_Block_Direct_Info + */ protected function _construct() { parent::_construct(); $this->setTemplate('paypaluk/direct/info.phtml'); } + /** + * Return payment instance for paypal uk direct method + * + * @return Mage_PayPalUk_Model_Direct + * + */ protected function _getDirect() { return Mage::getSingleton('paypaluk/direct'); @@ -65,10 +77,54 @@ public function getCcStartMonth() } return $month; } - + public function toPdf() { $this->setTemplate('paypaluk/direct/pdf/info.phtml'); return $this->toHtml(); } + + /** + * Get Avs checking detailed description + * + * @return string + */ + public function getAvsDetail() + { + if ($this->getInfo()) { + $avs = $this->getInfo()->getCcAvsStatus(); + return $this->getMethod()->getApi()->getAvsDetail($avs); + } else { + return ''; + } + } + + /** + * Get cvv checking detailed description + * + * @return string + */ + public function getCvvVerified() + { + if ($this->getInfo()) { + $cvv = $this->getInfo()->getCcCidStatus(); + return $this->getMethod()->getApi()->getCvvDetail($cvv); + } else { + return ''; + } + } + + /** + * Get 3D secure validation description + * + * @return bool + */ + public function getIs3DSecureVerified() + { + if ($this->getInfo()) { + return $this->getInfo()->getCcCidStatus(); + } else { + return false; + } + } } diff --git a/app/code/core/Mage/PaypalUk/Block/Direct/Validate.php b/app/code/core/Mage/PaypalUk/Block/Direct/Validate.php new file mode 100644 index 0000000000..45e5d3b000 --- /dev/null +++ b/app/code/core/Mage/PaypalUk/Block/Direct/Validate.php @@ -0,0 +1,91 @@ +getValidation()->getACSUrl(); + } + + /** + * Return exncripted code, result 3d secure lookup api call + * + * @return string + */ + public function getPayload() + { + return $this->getValidation()->getPayload(); + } + + /** + * Return url, customer will redirect to this url after success verification + * + * @return string + */ + public function getTermUrl() + { + return $this->getValidation()->getTermUrl(); + } + + /** + * return transaction id. result of 3d secure lookup api call + * + * @return string + */ + public function getTocken() + { + return $this->getValidation()->getTocken(); + } +} diff --git a/app/code/core/Mage/PaypalUk/Block/Express/Info.php b/app/code/core/Mage/PaypalUk/Block/Express/Info.php index d6f3dc6932..1708ab5630 100644 --- a/app/code/core/Mage/PaypalUk/Block/Express/Info.php +++ b/app/code/core/Mage/PaypalUk/Block/Express/Info.php @@ -24,15 +24,28 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ - +/* + * Display PaypalUk Express payment block on order review page in admin scope + */ class Mage_PaypalUk_Block_Express_Info extends Mage_Payment_Block_Info { + /* + * Setup template for info block + * + * @return Mage_PaypalUk_Block_Express_Info + */ protected function _construct() { parent::_construct(); $this->setTemplate('paypaluk/express/info.phtml'); + return $this; } + /** + * Return customer email + * + * @return string + */ public function getEmail() { $p = $this->getInfo(); diff --git a/app/code/core/Mage/PaypalUk/Block/Express/Review.php b/app/code/core/Mage/PaypalUk/Block/Express/Review.php index 15c1dfe511..f35d7855bd 100644 --- a/app/code/core/Mage/PaypalUk/Block/Express/Review.php +++ b/app/code/core/Mage/PaypalUk/Block/Express/Review.php @@ -34,6 +34,7 @@ class Mage_PaypalUk_Block_Express_Review extends Mage_Core_Block_Template { protected $_method='express'; + /** * Get PayPal Express Review Information * @@ -44,16 +45,31 @@ public function getReview() return Mage::getSingleton('paypaluk/express_review'); } + /** + * Return billing address object + * + * @return Mage_Sales_Order_Address + */ public function getBillingAddress() { return $this->getReview()->getQuote()->getBillingAddress(); } + /** + * Return shipping address object + * + * @return Mage_Sales_Order_Address + */ public function getShippingAddress() { return $this->getReview()->getQuote()->getShippingAddress(); } + /** + * Return shipping address object + * + * @return Mage_Sales_Order_Address + */ public function getAddress() { if (empty($this->_address)) { @@ -62,6 +78,11 @@ public function getAddress() return $this->_address; } + /** + * Return all shipping rates + * + * @return array + */ public function getShippingRates() { if (empty($this->_rates)) { @@ -81,6 +102,11 @@ public function getShippingRates() return $this->_rates; } + /** + * Return carrier name from config + * + * @return string + */ public function getCarrierName($carrierCode) { if ($name = Mage::getStoreConfig('carriers/'.$carrierCode.'/title')) { @@ -89,26 +115,47 @@ public function getCarrierName($carrierCode) return $carrierCode; } + /** + * Return shipping method for give shipping address + * + * @return string + */ public function getAddressShippingMethod() { return $this->getAddress()->getShippingMethod(); } + /** + * Set shipping method + */ public function setMethod($varName) { $this->_method=$varName; } + /** + * Return shipping price + * + * @return string + */ public function getShippingPrice($price, $flag) { return $this->formatPrice($this->helper('tax')->getShippingPrice($price, $flag, $this->getAddress())); } + /** + * Format price to shipping using + * @return string + */ public function formatPrice($price) { return $this->getReview()->getQuote()->getStore()->convertPrice($price, true); } + /** + * Check if items in cart is virtual + * @return bool + */ public function isVirtual() { return $this->getReview()->getQuote()->getIsVirtual(); diff --git a/app/code/core/Mage/PaypalUk/Block/Express/Review/Details.php b/app/code/core/Mage/PaypalUk/Block/Express/Review/Details.php index c1c1ce5603..1fa0b965d2 100644 --- a/app/code/core/Mage/PaypalUk/Block/Express/Review/Details.php +++ b/app/code/core/Mage/PaypalUk/Block/Express/Review/Details.php @@ -31,7 +31,7 @@ * @package Mage_PaypalUk * @author Magento Core Team */ -class Mage_PaypalUk_Block_Express_Review_Details extends Mage_Core_Block_Template +class Mage_PaypalUk_Block_Express_Review_Details extends Mage_Checkout_Block_Cart_Totals { protected $_address; @@ -40,11 +40,21 @@ class Mage_PaypalUk_Block_Express_Review_Details extends Mage_Core_Block_Templat * * @return Mage_Paypal_Model_Express_Review */ + /** + * Get PayPalUk Express Review Information + * + * @return Mage_PaypalUk_Model_Express_Review + */ public function getReview() { return Mage::getSingleton('paypaluk/express_review'); } + /** + * Return review shipping address + * + * @return Mage_Sales_Model_Order_address + */ public function getAddress() { if (empty($this->_address)) { @@ -53,23 +63,22 @@ public function getAddress() return $this->_address; } + /** + * Return review quote items + * + * @return Mage_Sales_Model_Mysql4_Order_Item_Collection + */ public function getItems() { -// $priceFilter = Mage::app()->getStore()->getPriceFilter(); -// $itemsFilter = new Varien_Filter_Object_Grid(); -// $itemsFilter->addFilter(new Varien_Filter_Sprintf('%d'), 'qty'); -// $itemsFilter->addFilter($priceFilter, 'price'); -// $itemsFilter->addFilter($priceFilter, 'row_total'); -// return $itemsFilter->filter($this->getAddress()->getAllItems()); return $this->getReview()->getQuote()->getAllItems(); } + /** + * Return review quote totals + * @return array + */ public function getTotals() { -// $totals = $this->getAddress()->getTotals(); -// $totalsFilter = new Varien_Filter_Object_Grid(); -// $totalsFilter->addFilter(Mage::app()->getStore()->getPriceFilter(), 'value'); -// return $totalsFilter->filter($totals); return $this->getReview()->getQuote()->getTotals(); } } diff --git a/app/code/core/Mage/PaypalUk/Block/Link/Shortcut.php b/app/code/core/Mage/PaypalUk/Block/Link/Shortcut.php index 8da8f031b8..3487c6f960 100644 --- a/app/code/core/Mage/PaypalUk/Block/Link/Shortcut.php +++ b/app/code/core/Mage/PaypalUk/Block/Link/Shortcut.php @@ -33,11 +33,19 @@ */ class Mage_PaypalUk_Block_Link_Shortcut extends Mage_Core_Block_Template { + /** + * Return checkout url, on click to checkout now button + * + */ public function getCheckoutUrl() { return $this->getUrl('paypaluk/express/shortcut', array('_secure'=>true)); } + /** + * Checkout now button image + * @return string + */ public function getImageUrl() { $locale = Mage::app()->getLocale()->getLocaleCode(); @@ -48,13 +56,18 @@ public function getImageUrl() return 'https://www.paypal.com/'.$locale.'/i/btn/btn_xpressCheckout.gif'; } + /** + * Render block html output + * @return string + */ public function _toHtml() { - if (Mage::getStoreConfigFlag('payment/paypaluk_express/active') - && Mage::getSingleton('checkout/session')->getQuote()->validateMinimumAmount()) { + $quote = Mage::getSingleton('checkout/session')->getQuote(); + $paypalUkModel = Mage::getModel('paypaluk/express'); + if ($paypalUkModel->isAvailable($quote) && $paypalUkModel->isVisibleOnCartPage() + && $quote->validateMinimumAmount()) { return parent::_toHtml(); } - return ''; } } diff --git a/app/code/core/Mage/PaypalUk/Model/Api/Abstract.php b/app/code/core/Mage/PaypalUk/Model/Api/Abstract.php index 34c7ecd6bf..cf282e4ec0 100644 --- a/app/code/core/Mage/PaypalUk/Model/Api/Abstract.php +++ b/app/code/core/Mage/PaypalUk/Model/Api/Abstract.php @@ -25,9 +25,7 @@ */ /** - * Abstract class for Paypal API wrappers - * - * @author Magento Core Team + * Abstract class for PayflowUk Pro API wrappers */ abstract class Mage_PaypalUk_Model_Api_Abstract extends Varien_Object { @@ -44,15 +42,46 @@ abstract class Mage_PaypalUk_Model_Api_Abstract extends Varien_Object const USER_ACTION_COMMIT = 'commit'; const USER_ACTION_CONTINUE = 'continue'; + const ACTION_ACCEPT = 'Acept'; + const ACTION_DENY = 'Deny'; + + const SOLUTION_TYPE_SOLE = 'Sole'; + const SOLUTION_TYPE_MARK = 'Mark'; + + const AVS_RESPONSE_MATCH = 'Y'; + const AVS_RESPONSE_NO_MATCH = 'N'; + const AVS_RESPONSE_NO_CARDHOLDER = 'X'; + const AVS_RESPONSE_ALL = 0; + const AVS_RESPONSE_NONE = 1; + const AVS_RESPONSE_PARTIAL = 2; + const AVS_RESPONSE_NOT_PROCESSED = 3; + const AVS_RESPONSE_NOT_AVAILIABLE = 4; + + const CVV_RESPONSE_MATCH_CC = 'M'; + const CVV_RESPONSE_MATCH_SOLO = 0; + const CVV_RESPONSE_NOT_MATCH_CC = 'N'; + const CVV_RESPONSE_NOT_MATCH_SOLO = 1; + const CVV_RESPONSE_NOT_PROCESSED_CC = 'P'; + const CVV_RESPONSE_NOT_IMPLEMENTED_SOLO = 2; + const CVV_RESPONSE_NOT_SUPPORTED_CC = 'S'; + const CVV_RESPONSE_NOT_PRESENT_SOLO = 3; + const CVV_RESPONSE_NOT_AVAILIBLE_CC = 'U'; + const CVV_RESPONSE_NOT_AVAILIBLE_SOLO = 4; + const CVV_RESPONSE_NOT_RESPONSE_CC = 'X'; /******************************************************************************************************************/ - public function getConfigData($key, $default=false, $storeId = null) + /** + * Return config data based on payment and store id + * + * @return string + */ + public function getGeneralConfigData($key, $default=false, $storeId = null, $path = 'paypal/wpuk/') { if (!$this->hasData($key)) { if ($storeId === null && $this->getPayment() instanceof Varien_Object) { $storeId = $this->getPayment()->getOrder()->getStoreId(); } - $value = Mage::getStoreConfig('paypal/wpuk/'.$key, $storeId); + $value = Mage::getStoreConfig($path . $key, $storeId); if (is_null($value) || false===$value) { $value = $default; } @@ -61,11 +90,40 @@ public function getConfigData($key, $default=false, $storeId = null) return $this->getData($key); } + /** + * Return config data based on paymethod, store id + * + * @return string + */ + public function getConfigData($key, $default=false, $storeId = null) + { + return $this->getGeneralConfigData($key, $default, $storeId, 'paypal/wpuk/'); + } + + /** + * Get PayPal Account Style Configuration + * + */ + public function getStyleConfigData($key, $default=false, $storeId = null) + { + return $this->getGeneralConfigData($key, $default, $storeId, 'paypal/style/'); + } + + /** + * Return paypaluk session model + * + * @return Mage_PayplaUk_Model_Session + */ public function getSession() { return Mage::getSingleton('paypaluk/session'); } + /** + * Get use session flag status + * + * @return bool + */ public function getUseSession() { if (!$this->hasData('use_session')) { @@ -74,6 +132,14 @@ public function getUseSession() return $this->getData('use_session'); } + /** + * Return session data + * + * @param $key string + * @param $default string, default value + * + * @return string + */ public function getSessionData($key, $default=false) { if (!$this->hasData($key)) { @@ -88,6 +154,14 @@ public function getSessionData($key, $default=false) return $this->getData($key); } + /** + * Set data in paypaluk session + * + * @param $key string + * @param $value string + * + * @return Mage_PayplaUk_Model_Api_Abstract + */ public function setSessionData($key, $value) { if ($this->getUseSession()) { @@ -97,41 +171,83 @@ public function setSessionData($key, $value) return $this; } + /** + * Return api config url + * + * @return string + */ public function getApiUrl() { return $this->getConfigData('url'); } + /** + * Return Api user from config + * + * @return string + */ public function getApiUser() { return $this->getConfigData('user'); } + /** + * Return Api vendor id from config + * + * @return string + */ public function getApiVendor() { return $this->getConfigData('vendor'); } + /** + * Return Api password from config + * + * @return string + */ public function getApiPassword() { return $this->getConfigData('pwd'); } + /** + * Return debug status based on config data + * + * @return bool + */ public function getDebug() { return $this->getConfigData('debug_flag', true); } + /** + * Get partner value from config + * + * @return string + */ public function getPartner() { return $this->getConfigData('partner', 'PayPalUK'); } + /** + * Get Error Message from session + * + * @return string + */ public function getError() { return $this->getSessionData('error'); } + /** + * Set error mesage in session + * + * @param string + * + * @return Mage_PayplaUk_Model_Api_Abstract + */ public function setError($data) { return $this->setSessionData('error', $data); @@ -167,6 +283,13 @@ public function getUserAction() return $this->getSessionData('user_action', self::USER_ACTION_CONTINUE); } + /** + * Set user action to session data + * + * @param $data string + * + * @return Mage_PayplaUk_Model_Api_Abstract + */ public function setUserAction($data) { return $this->setSessionData('user_action', $data); @@ -182,36 +305,85 @@ public function getToken() return $this->getSessionData('token'); } + /** + * Set token data to session + * + * @param $data string + * + * @return Mage_PayplaUk_Model_Api_Abstract + * + */ public function setToken($data) { return $this->setSessionData('token', $data); } + /** + * Get transaction id from session + * + * @return string + */ public function getTransactionId() { return $this->getSessionData('transaction_id'); } + /** + * Set transaction id to session + * + * @param $data string + * + * @return Mage_PayplaUk_Model_Api_Abstract + * + */ public function setTransactionId($data) { return $this->setSessionData('transaction_id', $data); } + /** + * Get authorization id from session + * + * @return string + * + */ public function getAuthorizationId() { return $this->getSessionData('authorization_id'); } + /** + * Set authorization id to session + * + * @param $data string + * + * @return Mage_PayplaUk_Model_Api_Abstract + * + */ public function setAuthorizationId($data) { return $this->setSessionData('authorization_id', $data); } + /** + * Get payer id from session + * + * @return string + * + */ public function getPayerId() { return $this->getSessionData('payer_id'); } + /** + * Set payer id to session + * + * @param $data string + * + * @return Mage_PayplaUk_Model_Api_Abstract + * + */ public function setPayerId($data) { return $this->setSessionData('payer_id', $data); @@ -242,6 +414,14 @@ public function getPaymentType() return $this->getSessionData('payment_type'); } + /** + * Set payment type to session + * + * @param $data string + * + * @return Mage_PayplaUk_Model_Api_Abstract + * + */ public function setPaymentType($data) { return $this->setSessionData('payment_type', $data); @@ -259,12 +439,26 @@ public function getAmount() return $this->getSessionData('amount'); } + /** + * Set formated amount value to session + * + * @param $data string + * + * @return Mage_PayplaUk_Model_Api_Abstract + * + */ public function setAmount($data) { $data = sprintf('%.2f', $data); return $this->setSessionData('amount', $data); } + /** + * get formated currency code from session + * + * @return string + * + */ public function getCurrencyCode() { //return $this->getSessionData('currency_code', 'USD'); @@ -272,17 +466,36 @@ public function getCurrencyCode() return $this->getSessionData('currency_code', Mage::app()->getStore()->getBaseCurrencyCode()); } + /** + * Set currency code to session + * + * @param $data string + * + * @return Mage_PayplaUk_Model_Api_Abstract + * + */ public function setCurrencyCode($data) { return $this->setSessionData('currency_code', $data); } - + /** + * return source for express checkout button from config + * + * @return string + * + */ public function getButtonSourceEc() { return $this->getConfigData('button_source', 'Varien_Cart_EC_UK'); } + /** + * return source for direct payment button from config + * + * @return string + * + */ public function getButtonSourceDp() { return $this->getConfigData('button_source', 'Varien_Cart_DP_UK'); @@ -309,4 +522,68 @@ public function getCcTypes() return $ccTypes; } + /** + * Get AVS proper text by given AVS response code + * + * @return string + */ + public function getAvsDetail($avsCode) + { + switch ($avsCode) { + case self::AVS_RESPONSE_MATCH: + return Mage::helper('paypal')->__('All the address information matched.'); + case self::AVS_RESPONSE_NONE: + case self::AVS_RESPONSE_NO_MATCH: + return Mage::helper('paypal')->__('None of the address information matched.'); + case self::AVS_RESPONSE_PARTIAL : + return Mage::helper('paypal')->__('Part of the address information matched.'); + case self::AVS_RESPONSE_NOT_AVAILIABLE : + return Mage::helper('paypal')->__('Address not checked, or acquirer had no response. Service not available.'); + case self::AVS_RESPONSE_NO_CARDHOLDER: + return Mage::helper('paypal')->__('Cardholder\'s bank doesn\'t support address verification'); + case self::AVS_RESPONSE_NOT_PROCESSED : + return Mage::helper('paypal')->__('The merchant did not provide AVS information. Not processed.'); + default: + if ($avsCode === self::AVS_RESPONSE_ALL) { + return Mage::helper('paypal')->__('All the address information matched.'); + } else { + return ''; + } + } + } + + /** + * Return Cvv Detailed description by cvv responce code + * + * @return string + */ + public function getCvvDetail($cvvCode) + { + switch ($cvvCode) { + case self::CVV_RESPONSE_MATCH_CC: + return Mage::helper('paypal')->__('Matched'); + case self::CVV_RESPONSE_NOT_MATCH_CC: + case self::CVV_RESPONSE_NOT_MATCH_SOLO: + return Mage::helper('paypal')->__('No match'); + case self::CVV_RESPONSE_NOT_PROCESSED_CC : + return Mage::helper('paypal')->__('Not processed'); + case self::CVV_RESPONSE_NOT_IMPLEMENTED_SOLO : + return Mage::helper('paypal')->__('The merchant has not implemented CVV2 code handling'); + case self::CVV_RESPONSE_NOT_SUPPORTED_CC : + return Mage::helper('paypal')->__('Service not supported'); + case self::CVV_RESPONSE_NOT_PRESENT_SOLO : + return Mage::helper('paypal')->__('Merchant has indicated that CVV2 is not present on card'); + case self::CVV_RESPONSE_NOT_AVAILIBLE_CC : + case self::CVV_RESPONSE_NOT_AVAILIBLE_SOLO : + return Mage::helper('paypal')->__('Service not available'); + case self::CVV_RESPONSE_NOT_RESPONSE_CC : + return Mage::helper('paypal')->__('No response'); + default: + if (self::CVV_RESPONSE_MATCH_SOLO === $cvvCode) { + return Mage::helper('paypal')->__('Matched'); + } else { + return ''; + } + } + } } diff --git a/app/code/core/Mage/PaypalUk/Model/Api/Debug.php b/app/code/core/Mage/PaypalUk/Model/Api/Debug.php index 4f11a8e1cf..39bfbe4af6 100644 --- a/app/code/core/Mage/PaypalUk/Model/Api/Debug.php +++ b/app/code/core/Mage/PaypalUk/Model/Api/Debug.php @@ -25,7 +25,7 @@ */ /** - * Abstract class for PaypalUk Debug + * Abstract class for PayflowUk Pro Debug * * @author Magento Core Team */ diff --git a/app/code/core/Mage/PaypalUk/Model/Api/Pro.php b/app/code/core/Mage/PaypalUk/Model/Api/Pro.php index 602080c1d4..f59ba93050 100644 --- a/app/code/core/Mage/PaypalUk/Model/Api/Pro.php +++ b/app/code/core/Mage/PaypalUk/Model/Api/Pro.php @@ -94,6 +94,9 @@ class Mage_PaypalUk_Model_Api_Pro extends Mage_PaypalUk_Model_Api_Abstract protected $_validVoidTransState = array(3,6,9); /*********************** DIRECT PAYMENT ***************************/ + /** + * Process a credit card payment. + */ public function callDoDirectPayment() { $p = $this->getPayment(); @@ -110,6 +113,19 @@ public function callDoDirectPayment() 'BUTTONSOURCE' => $this->getButtonSourceDp(), ); + if ($this->getMpiVendor()) { + $proArr['AUTHSTATUS3D'] = $this->getAuthStatus(); + $proArr['MPIVENDOR3DS'] = $this->getMpiVendor(); + $proArr['CAVV'] = $this->getCavv(); + $proArr['ECI3D'] = $this->getEci3d(); + $proArr['XID'] = $this->getXid(); + } + + if ($lineItems = $this->getLineItems()) { + $lineItemArray = $this->_prepareLineItem($lineItems, $this->getItemAmount(), $this->getItemTaxAmount(), $this->getShippingAmount(), $this->getDiscountAmount()); + $proArr = array_merge($proArr, $lineItemArray); + } + if($this->getTrxtype()==self::TRXTYPE_AUTH_ONLY || $this->getTrxtype()==self::TRXTYPE_SALE){ $proArr = array_merge(array( 'ACCT' => $p->getCcNumber(), @@ -172,6 +188,11 @@ public function callDoDirectPayment() /*********************** EXPRESS PAYMENT ***************************/ + /** + * Return post paypal url + * + * @return string + */ public function getPaypalUrl() { if (!$this->hasPaypalUrl()) { @@ -190,6 +211,12 @@ public function getPaypalUrl() return $url . $this->getToken(); } + /** + * Initiates an Express Checkout transaction. + * Optionally, the SetExpressCheckout APIoperation can set up billing + * agreements for reference transactionsand recurring payments. + * + */ public function callSetExpressCheckout() { $proArr = array( @@ -197,8 +224,12 @@ public function callSetExpressCheckout() 'AMT' => $this->getAmount(), 'ACTION' => self::ACIONT_SET_EXPRESS, 'CURRENCY' => $this->getCurrencyCode(), - "RETURNURL" => $this->getReturnUrl(), + 'RETURNURL' => $this->getReturnUrl(), 'CANCELURL' => $this->getCancelUrl(), + 'HDRIMG' => $this->getStyleConfigData('paypal_hdrimg'), + 'HDRBORDERCOLOR' => $this->getStyleConfigData('paypal_hdrbordercolor'), + 'HDRBACKCOLOR' => $this->getStyleConfigData('paypal_hdrbackcolor'), + 'PAYFLOWCOLOR' => $this->getStyleConfigData('paypal_payflowcolor') ); $this->setUserAction(self::USER_ACTION_CONTINUE); @@ -219,6 +250,11 @@ public function callSetExpressCheckout() $this->setUserAction(self::USER_ACTION_COMMIT); } + if ($lineItems = $this->getLineItems()) { + $lineItemArray = $this->_prepareLineItem($lineItems, $this->getItemAmount(), $this->getItemTaxAmount(), $this->getShippingAmount(), $this->getDiscountAmount()); + $proArr = array_merge($proArr, $lineItemArray); + } + $result = $this->postRequest($proArr); if ($result && $result->getResultCode()==self::RESPONSE_CODE_APPROVED) { @@ -236,6 +272,9 @@ public function callSetExpressCheckout() return $this; } + /** + * Obtain information about an Express Checkout transaction. + */ public function callGetExpressCheckoutDetails() { $proArr = array( @@ -272,7 +311,7 @@ public function callGetExpressCheckoutDetails() $a->setRegion($result->getShiptostate()); $a->setPostcode($result->getShiptozip()); $a->setCountry($result->getShiptocountry()); - $a->setTelephone(Mage::helper('paypalUk')->__('N/A')); + $a->setTelephone(Mage::helper('paypal')->__('N/A')); //echo "
"; //print_r($a->getData()); //echo "
"; @@ -287,6 +326,12 @@ public function callGetExpressCheckoutDetails() return $this; } + /** + * Completes an Express Checkout transaction. + * If you set up a billing agreement in your SetExpressCheckout APIcall, + * the billing agreement is created when you call + * the DoExpressCheckoutPayment APIoperation. + */ public function callDoExpressCheckoutPayment() { /* Gather the information to make the final call to @@ -304,6 +349,11 @@ public function callDoExpressCheckoutPayment() 'BUTTONSOURCE' => $this->getButtonSourceEc(), ); + if ($lineItems = $this->getLineItems()) { + $lineItemArray = $this->_prepareLineItem($lineItems, $this->getItemAmount(), $this->getItemTaxAmount(), $this->getShippingAmount(), $this->getDiscountAmount()); + $proArr = array_merge($proArr, $lineItemArray); + } + $result = $this->postRequest($proArr); if ($result && $result->getResultCode()==self::RESPONSE_CODE_APPROVED) { @@ -350,6 +400,11 @@ public function deformatNVP($nvpstr) return $nvpArray; } + /** + * Send post request to paypal + * + * @return Mage_PaypalUk_Model_Api_Result + */ public function postRequest(array $proArr) { $proArr = array_merge(array( @@ -457,6 +512,11 @@ public function postRequest(array $proArr) return $result; } + /** + * Generate random request id + * + * @return string + */ protected function _generateRequestId() { return Mage::helper('core')->uniqHash(); @@ -483,7 +543,7 @@ public function canVoid() if ($result && $result->getResultCode()==self::RESPONSE_CODE_APPROVED) { if ($result->getTransstate()>1000) { $errorArr['code'] = $result->getResultCode(); - $errorArr['message'] = Mage::helper('paypalUk')->__('Voided transaction'); + $errorArr['message'] = Mage::helper('paypal')->__('Voided transaction'); $this->setError($errorArr); return false; } elseif(in_array($result->getTransstate(),$this->_validVoidTransState)) { @@ -493,7 +553,7 @@ public function canVoid() } $errorArr['code'] = $result->getResultCode(); - $errorArr['message'] = $result->getRespmsg() ? $result->getRespmsg() : Mage::helper('paypalUk')->__('Error in inquriing the transaction'); + $errorArr['message'] = $result->getRespmsg() ? $result->getRespmsg() : Mage::helper('paypal')->__('Error in inquriing the transaction'); $this->setError($errorArr); return false; } @@ -511,7 +571,7 @@ public function void() 'TENDER' => self::TENDER_CC, 'ORIGID' => $this->getTransactionId(), ); - $this->getTrxtype(self::TRXTYPE_DELAYED_VOID); + $this->setTrxtype(self::TRXTYPE_DELAYED_VOID); $result = $this->postRequest($proArr); if ($result && $result->getResultCode()==self::RESPONSE_CODE_APPROVED) { @@ -519,7 +579,7 @@ public function void() return $this; } $errorArr['code'] = $result->getResultCode(); - $errorArr['message'] = $result->getRespmsg() ? $result->getRespmsg() : Mage::helper('paypalUk')->__('Error in voiding the transaction'); + $errorArr['message'] = $result->getRespmsg() ? $result->getRespmsg() : Mage::helper('paypal')->__('Error in voiding the transaction'); $this->setError($errorArr); return false; } @@ -548,8 +608,52 @@ public function refund() } $errorArr['code'] = $result->getResultCode(); - $errorArr['message'] = $result->getRespmsg() ? $result->getRespmsg() : Mage::helper('paypalUk')->__('Error in voiding the transaction'); + $errorArr['message'] = $result->getRespmsg() ? $result->getRespmsg() : Mage::helper('paypal')->__('Error in voiding the transaction'); $this->setError($errorArr); return false; } + + /** + * Prepare Line item array to move in paypal, canculate all fields + * + * @param $items Mage_Sales_Model_Entity_Quote_Item_Collection + * @param $shippingAmount float + * @param $discountAmount float + * + * @return array + */ + protected function _prepareLineItem($lineItems, $itemAmount, $itemTaxAmount, $shippingAmount, $discountAmount) + { + + $proArr = array(); + $itemAmt = 0; + $taxItemAmt = 0; + foreach($lineItems as $index => $item) { + if ($item->getName() && $item->getBaseRowTotal()) { + $proArr['L_NAME' . $index] = $item->getName(); + $proArr['L_NUMBER' . $index] = $item->getProductId(); + $proArr['L_COST' . $index] = (float)$item->getBaseCalculationPrice(); + $proArr['L_AMT' . $index] = (float)$item->getBaseCalculationPrice(); + $proArr['L_QTY' . $index] = $item->getTotalQty(); + $proArr['L_DESC' . $index] = $item->getDescription(); + $proArr['L_TAXAMT' . $index] = (float)($item->getBaseTaxAmount() / $item->getTotalQty()); + } + } + + if ($discountAmount > 0) { + $index++; + $proArr['L_NAME' . $index] = Mage::helper('paypal')->__('Discount'); + $proArr['L_NUMBER' . $index] = 0; + $proArr['L_COST' . $index] = (float) $discountAmount; + $proArr['L_QTY' . $index] = 1; + $proArr['L_DESC' . $index] = Mage::helper('paypal')->__('Discount'); + $proArr['L_TAXAMT' . $index] = 0; + } + + $proArr['TAXAMT'] = (float) round($itemTaxAmount,2); + $proArr['ITEMAMT']= (float) ($itemAmount + $discountAmount); + $proArr['FREIGHTAMT'] = (float) $shippingAmount; + return $proArr; + } + } diff --git a/app/code/core/Mage/PaypalUk/Model/Direct.php b/app/code/core/Mage/PaypalUk/Model/Direct.php index 982fcf84eb..3a520dd17a 100644 --- a/app/code/core/Mage/PaypalUk/Model/Direct.php +++ b/app/code/core/Mage/PaypalUk/Model/Direct.php @@ -44,8 +44,8 @@ class Mage_PaypalUk_Model_Direct extends Mage_Payment_Model_Method_Cc protected $_canAuthorize = true; protected $_canCapture = true; protected $_canCapturePartial = false; - protected $_canRefund = false; - protected $_canVoid = true; + protected $_canRefund = true; + protected $_canVoid = false; protected $_canUseInternal = true; protected $_canUseCheckout = true; protected $_canUseForMultishipping = true; @@ -66,6 +66,66 @@ public function canUseForCurrency($currencyCode) return true; } + /** + * Get 3D secure checking if it enabled or disabled + * + * @return string + */ + public function get3DSecureEnabled() + { + return $this->getConfigData('centinel'); + } + + /** + * Used for enablin line item options + * + * @return string + */ + public function getLineItemEnabled() + { + return $this->getConfigData('line_item'); + } + + /** + * Return paypaluk 3d secure validation model + * + * @return Mage_PaypalUk_Model_Direct_Validate + */ + public function getValidate() + { + return Mage::getSingleton('paypaluk/direct_validate'); + } + + /** + * Get paypal session namespace + * + * @return Mage_Paypal_Model_Session + */ + public function getSession() + { + return Mage::getSingleton('paypaluk/session'); + } + + /** + * Get checkout session namespace + * + * @return Mage_Checkout_Model_Session + */ + public function getCheckout() + { + return Mage::getSingleton('checkout/session'); + } + + /** + * Get current quote + * + * @return Mage_Sales_Model_Quote + */ + public function getQuote() + { + return $this->getCheckout()->getQuote(); + } + /** * overwrites the method of Mage_Payment_Model_Method_Cc * for switch or solo card @@ -110,31 +170,65 @@ public function getApi() return Mage::getSingleton('paypaluk/api_pro'); } + /** + * Authorize payment + * @param Verien_Object $payment + * @param double $amount + * @return Mage_PayPalUk_Model_Direct + */ public function authorize(Varien_Object $payment, $amount) { + $isCentinelVerified = false; + $items = null; + if ($this->getLineItemEnabled()) { + $items = $this->getQuote()->getAllItems(); + } + $api = $this->getApi() + ->setLineItems($items) + ->setShippingAmount($payment->getOrder()->getBaseShippingAmount()) + ->setDiscountAmount($payment->getOrder()->getBaseDiscountAmount()) + ->setItemAmount($payment->getOrder()->getBaseSubtotal()) + ->setItemTaxAmount($payment->getOrder()->getTaxAmount()) ->setTrxtype(Mage_PaypalUk_Model_Api_Pro::TRXTYPE_AUTH_ONLY) ->setAmount($amount) ->setBillingAddress($payment->getOrder()->getBillingAddress()) ->setShippingAddress($payment->getOrder()->getShippingAddress()) ->setPayment($payment); - if($api->callDoDirectPayment()!==false) { - $payment - ->setStatus('APPROVED') - ->setPaymentStatus('AUTHORIZE') - ->setCcTransId($api->getTransactionId()) - ->setCcAvsStatus($api->getAvsCode()) - ->setCcCidStatus($api->getCvv2Match()); - }else{ - $e = $api->getError(); - Mage::throwException($e['message']?$e['message']:Mage::helper('paypalUk')->__('There has been an error processing your payment. Please try later or contact us for help.')); - } + if ($this->get3DSecureEnabled()) { + $isCentinelVerified = true; + $api->setAuthStatus($this->getValidate()->getPaResStatus()) + ->setMpiVendor($this->getValidate()->getEnrolled()) + ->setCavv($this->getValidate()->getCavv()) + ->setEci3d($this->getValidate()->getEciFlag()) + ->setXid($this->getValidate()->getXid()); + } + if($api->callDoDirectPayment()!==false) { + $payment + ->setStatus('APPROVED') + ->setPaymentStatus('AUTHORIZE') + ->setCcTransId($api->getTransactionId()) + ->setCcSecureVerify($isCentinelVerified) + ->setCcAvsStatus($api->getAvsCode()) + ->setCcCidStatus($api->getCvv2Match()); + }else{ + $e = $api->getError(); + Mage::throwException($e['message']?$e['message']:Mage::helper('paypal')->__('There has been an error processing your payment. Please try later or contact us for help.')); + } + return $this; } + /** + * Capture payment + * @param Verien_Object $payment + * @param double $amount + * @return Mage_PayPalUk_Model_Direct + */ public function capture(Varien_Object $payment, $amount) { + $isCentinelVerified = false; if ($payment->getCcTransId()) { $trxType=Mage_PaypalUk_Model_Api_Pro::TRXTYPE_DELAYED_CAPTURE; } else { @@ -142,7 +236,17 @@ public function capture(Varien_Object $payment, $amount) $trxType=Mage_PaypalUk_Model_Api_Pro::TRXTYPE_SALE; } + $items = null; + if ($this->getLineItemEnabled()) { + $items = $this->getQuote()->getAllItems(); + } + $api = $this->getApi() + ->setLineItems($items) + ->setShippingAmount($payment->getOrder()->getBaseShippingAmount()) + ->setDiscountAmount($payment->getOrder()->getBaseDiscountAmount()) + ->setItemAmount($payment->getOrder()->getBaseSubtotal()) + ->setItemTaxAmount($payment->getOrder()->getTaxAmount()) ->setTrxtype($trxType) ->setAmount($amount) ->setTransactionId($payment->getCcTransId()) @@ -150,21 +254,36 @@ public function capture(Varien_Object $payment, $amount) ->setShippingAddress($payment->getOrder()->getShippingAddress()) ->setPayment($payment); - if ($api->callDoDirectPayment()!==false) { + if ($this->get3DSecureEnabled()) { + $isCentinelVerified = true; + $api->setAuthStatus($this->getValidate()->getPaResStatus()) + ->setMpiVendor($this->getValidate()->getEnrolled()) + ->setCavv($this->getValidate()->getCavv()) + ->setEci3d($this->getValidate()->getEciFlag()) + ->setXid($this->getValidate()->getXid()); + } + + if ($api->callDoDirectPayment()!==false) { $payment ->setStatus('APPROVED') ->setPaymentStatus('CAPTURE') + ->setCcSecureVerify($isCentinelVerified) ->setCcTransId($api->getTransactionId()) ->setCcAvsStatus($api->getAvsCode()) ->setCcCidStatus($api->getCvv2Match()); - } else { + } else { $e = $api->getError(); - Mage::throwException($e['message']?$e['message']:Mage::helper('paypalUk')->__('There has been an error processing your payment. Please try later or contact us for help.')); - } + Mage::throwException($e['message']?$e['message']:Mage::helper('paypal')->__('There has been an error processing your payment. Please try later or contact us for help.')); + } - return $this; + return $this; } + /** + * checking the transaction id is valid or not and transction id was not settled + * + * @return Mage_PaypalUk_Model_Direct + */ public function canVoid(Varien_Object $payment) { if ($payment->getCcTransId()) { @@ -180,11 +299,16 @@ public function canVoid(Varien_Object $payment) } } else { $payment->setStatus(self::STATUS_ERROR); - $payment->setStatusDescription(Mage::helper('paypalUk')->__('Invalid transaction id')); + $payment->setStatusDescription(Mage::helper('paypal')->__('Invalid transaction id')); } return $this; } + /** + * Void payment + * @param Verien_Object $payment + * @return Mage_PayPalUk_Model_Direct + */ public function void(Varien_Object $payment) { $error = false; @@ -201,7 +325,7 @@ public function void(Varien_Object $payment) $error = $e['message']; } } else { - $error = Mage::helper('paypalUk')->__('Invalid transaction id'); + $error = Mage::helper('paypal')->__('Invalid transaction id'); } if ($error !== false) { Mage::throwException($error); @@ -209,6 +333,12 @@ public function void(Varien_Object $payment) return $this; } + /** + * Refund payment + * @param Verien_Object $payment + * @param double $amount + * @return Mage_PayPalUk_Model_Direct + */ public function refund(Varien_Object $payment, $amount) { $error = false; @@ -226,7 +356,7 @@ public function refund(Varien_Object $payment, $amount) $error = $e['message']; } } else { - $error = Mage::helper('paypalUk')->__('Error in refunding the payment'); + $error = Mage::helper('paypal')->__('Error in refunding the payment'); } if ($error !== false) { Mage::throwException($error); @@ -234,4 +364,24 @@ public function refund(Varien_Object $payment, $amount) return $this; } + /** + * cancel payment + * + * @param Varien_Object $payment + * @return Mage_PaypalUk_Model_Direct + */ + public function cancel(Varien_Object $payment) + { + if (!$payment->getOrder()->getInvoiceCollection()->count() && ($payment->getCcTransId() || $payment->getLastTransId())) { + if ($payment->getCcTransId()) { + $payment->setVoidTransactionId($payment->getCcTransId()); + } else { + $payment->setVoidTransactionId($payment->getLastTransId()); + } + + $this->void($payment); + } + parent::cancel($payment); + return $this; + } } diff --git a/app/code/core/Mage/PaypalUk/Model/Direct/Validate.php b/app/code/core/Mage/PaypalUk/Model/Direct/Validate.php new file mode 100644 index 0000000000..d773e68e24 --- /dev/null +++ b/app/code/core/Mage/PaypalUk/Model/Direct/Validate.php @@ -0,0 +1,514 @@ +_thinClient)) { + $this->_thinClient = new CentinelClient(); + } + return $this->_thinClient; + } + + /** + * Return Centinel Api version + * + * @return string + */ + public function getVersion() + { + return '1.7'; + } + + /** + * Return centinel processor id, based on config data for given payment + * + * @return string + */ + public function getProcessorId() + { + return $this->getConfigData('centinel_processor_id'); + } + + /** + * Return centinel merchant id, based on config data for given payment + * + * @return string + */ + public function getMerchantId() + { + return $this->getConfigData('centinel_merchant_id'); + } + + /** + * Return centinel transaction password, based on config data for given payment + * + * @return string + */ + public function getTransactionPwd() + { + return $this->getConfigData('centinel_password'); + } + + /** + * Return centinel map url, based on config data for given payment + * + * @return string + */ + public function getMapUrl() + { + return $this->getConfigData('centinel_maps_url'); + } + + /** + * Return centinel timeout connect , based on config data for give payment + * + * @return string + */ + public function getTimeoutConnect() + { + return $this->getConfigData('centinel_timeout_connect'); + } + + /** + * Return centinel timeout read, based on config data for give payment + * + * @return string + */ + public function getTimeoutRead() + { + return $this->getConfigData('centinel_timeout_read'); + } + + /** + * Return transaction type. according centinel documetation it should be "C" + * + * @return "C" + */ + public function getTransactionType() + { + return 'C'; + } + + /** + * Return term url, witch is used for return after card holder process validation + * + * @return string + */ + public function getTermUrl() + { + $formKey = Mage::getSingleton('core/session')->getFormKey(); + if (Mage::app()->getStore()->isAdmin()) { + return Mage::getUrl('*/paypaluk_direct/termValidate', array('_secure' => true, '_current' => true, 'form_key' => $formKey)); + } else { + return Mage::getUrl('paypaluk/direct/termValidate', array('_secure' => true, 'form_key' => $formKey)); + } + } + + /** + * Get checkout session namespace + * + * @return Mage_Checkout_Model_Session + */ + public function getCheckout() + { + return Mage::getSingleton('checkout/session'); + } + + /** + * Return quoter namespace + * + * @return Mage_Sales_Model_Quote + */ + public function getQuote() + { + if (Mage::app()->getStore()->isAdmin()) { + return Mage::getSingleton('adminhtml/session_quote')->getQuote(); + } else { + return $this->getCheckout()->getQuote(); + } + } + + /** + * Return payment model + * + * @return Mage_Paypal_Model_Direct + */ + public function getPayPal() + { + return Mage::getSingleton('paypaluk/direct'); + } + + /** + * Retrieve information from cardinal lib configuration + * + * @param string $field + * @return mixed + */ + public function getConfigData($field, $storeId = null) + { + return $this->getPayPal()->getConfigData($field, $storeId); + } + + /** + * Return paypal session model + * + * @return Mage_Paypal_Model_Session + */ + public function getSession() + { + return $this->getPayPal()->getSession(); + } + + /** + * Set AcsUrl in session, url used for redirect customer to cardholder verification page. + * + * @return Mage_Paypal_Model_Direct_Validate + */ + public function setAcsUrl($url) + { + $this->getSession()->setData('centinel_asc_url', $url); + return $this; + } + + /** + * Get card holder url from session + * + * @return string + */ + public function getAcsUrl() + { + return $this->getSession()->getData('centinel_asc_url'); + } + + /** + * Set Enrolled status in session, url to verify lookup status + * + * @return Mage_Paypal_Model_Direct_Validate + */ + public function setEnrolled($enrolled) + { + $this->getSession()->setData('centinel_enrolled', $enrolled); + return $this; + } + + /** + * Return lookup status from session + * + * @return string + */ + public function getEnrolled() + { + return $this->getSession()->getData('centinel_enrolled'); + } + + /** + * Set Payload status in session, encrypted data, result of centinel api lookup method call + * + * @return Mage_Paypal_Model_Direct_Validate + */ + public function setPayload($payLoad) + { + $this->getSession()->setData('centinel_payload', $payLoad); + return $this; + } + + /** + * Return payload from session + * + * @return string + */ + public function getPayload() + { + return $this->getSession()->getData('centinel_payload'); + } + + /** + * Set Electronic Commerce indicator in session + * + * @return Mage_Paypal_Model_Direct_Validate + */ + public function setEciFlag($eciFlag) + { + $this->getSession()->setData('centinel_eci_flag', $eciFlag); + return $this; + } + + /** + * Return Electronic Commerce indicator from session + * + * @return string + */ + public function getEciFlag() + { + return $this->getSession()->getData('centinel_eci_flag'); + } + + /** + * Set outcome of the issuer authentication in session + * + * @return Mage_Paypal_Model_Direct_Validate + */ + public function setPaResStatus($status) + { + $this->getSession()->setData('centinel_pa_res_status', $status); + return $this; + } + + /** + * Get outcome of the issuer authentication + * + * @return string + */ + public function getPaResStatus() + { + return $this->getSession()->getData('centinel_pa_res_status'); + } + + /** + * Set status of authntication elgibility + * + * @return Mage_Paypal_Model_Direct_Validate + */ + public function setSignature($signature) + { + $this->getSession()->setData('centinel_signature', $signature); + return $this; + } + + /** + * Return status of authntication elgibility + * + * @return string + */ + public function getSignature() + { + return $this->getSession()->getData('centinel_signature'); + } + + /** + * Set cavv, result of api authentiocation in session + * A random sequence of characters. This is encoded authentication. + * + * @return Mage_Paypal_Model_Direct_Validate + */ + public function setCavv($cavv) + { + $this->getSession()->setData('centinel_cavv', $cavv); + return $this; + } + + /** + * Return Cavv value from session + * + * @return string + */ + public function getCavv() + { + return $this->getSession()->getData('centinel_cavv'); + } + + /** + * Set transaction identifier from authentication in session + * + * @return Mage_Paypal_Model_Direct_Validate + */ + public function setXid($xid) + { + $this->getSession()->setData('centinel_xid', $xid); + return $this; + } + + /** + * Get transaction identifier from session + * + * @return string + */ + public function getXid() + { + return $this->getSession()->getData('centinel_xid'); + } + + /** + * Set centinel transaction id. Transaction id within Centinel + * + * @return Mage_Paypal_Model_Direct_Validate + */ + public function setTransactionId($transactionId) + { + $this->getSession()->setData('centinel_transaction_id', $transactionId); + return $this; + } + + /** + * Return internal Centinel transaction id from session + * + * @return string + */ + public function getTransactionId() + { + return $this->getSession()->getData('centinel_transaction_id'); + } + + /** + * Set Authentication information from cardholder to session. + * it will be passed to centinel authentication request + * + * @return Mage_Paypal_Model_Direct_Validate + */ + public function setPaResPayload($payloadRes) + { + $this->getSession()->setData('centinel_pa_res_payload', $payloadRes); + return $this; + } + + /** + * Return cardholder payload information from session + * + * @return string + */ + public function getPaResPayload() + { + return $this->getSession()->getData('centinel_pa_res_payload'); + } + + /** + * Call centinel api lookup method + * + * @return Mage_Paypal_Model_Direct_Validate + */ + public function callLookup() + { + $payment = $this->getQuote()->getPayment(); + + $currencyIso = ""; + try { + $currencyIso = Mage::helper('paypal/currency')->getIso4217CurrencyCode($this->getQuote()->getBaseCurrencyCode()); + }catch (Mage_Core_Exception $e) { + $this->setErrorNo(1); + $this->setErrorDesc($e); + return $this; + } + + $month = strlen($this->getCcExpMonth())==1 ? '0' . $this->getCcExpMonth() : $this->getCcExpMonth(); + $lookUpArray = array( + 'Amount' => round($this->getQuote()->getBaseGrandTotal()*100), + 'CurrencyCode' => $currencyIso, + 'CardNumber' => $this->getCcNumber(), + 'CardExpMonth'=> $month, + 'CardExpYear' => $this->getCcExpYear() + ); + + if (!$this->getQuote()->getReservedOrderId()) { + $this->getQuote()->reserveOrderId(); + } + $lookUpArray['OrderNumber'] = $this->getQuote()->getReservedOrderId(); + + $clientResponse = $this->call('cmpi_lookup', $lookUpArray); + + $this->setEnrolled($clientResponse->getValue('Enrolled')); + $this->setErrorNo($clientResponse->getValue('ErrorNo')); + $this->setErrorDesc($clientResponse->getValue('ErrorDesc')); + $this->setEciFlag($clientResponse->getValue('EciFlag')); + $this->setAcsUrl($clientResponse->getValue('ACSUrl')); + $this->setPayload($clientResponse->getValue('Payload')); + $this->setOrderId($clientResponse->getValue('OrderId')); + $this->setTransactionId($clientResponse->getValue('TransactionId')); + $this->setAuthenticationPath($clientResponse->getValue('AuthenticationPath')); + $this->setTermUrl($this->getTermUrl()); + return $this; + } + + /** + * Call centinel api authentication method + * + * @return Mage_Paypal_Model_Direct_Validate + */ + public function callAuthentication() + { + $authArray = array( + 'TransactionId' => $this->getTransactionId(), + 'PAResPayload' => $this->getPaResPayload(), + ); + + $clientResponse = $this->call('cmpi_authenticate', $authArray); + $this->setErrorNo($clientResponse->getValue('ErrorNo')); + $this->setErrorDesc($clientResponse->getValue('ErrorDesc')); + $this->setPaResStatus($clientResponse->getValue('PAResStatus')); + $this->setCavv($clientResponse->getValue('Cavv')); + $this->setSignature($clientResponse->getValue('SignatureVerification')); + $this->setEciFlag($clientResponse->getValue('EciFlag')); + $this->setXid($clientResponse->getValue('Xid')); + return $this; + } + + /** + * Call centinel api methods by given method name and data + * + * @param $method string + * @param $data array + * + * @return CentinelClient + */ + public function call($method, $data) + { + $thinData = array( + 'MsgType' => $method, + 'Version' => $this->getVersion(), + 'ProcessorId' => $this->getProcessorId(), + 'MerchantId' => $this->getMerchantId(), + 'TransactionPwd' => Mage::helper('core')->decrypt($this->getTransactionPwd()), + 'TransactionType' => $this->getTransactionType(), + ); + + $thinClient = $this->getThinClient(); + $thinData = array_merge($thinData, $data); + if (count($thinData) > 0) { + foreach($thinData AS $key => $val) { + $thinClient->add($key, $val); + } + } + + $thinClient->sendHttp($this->getMapUrl(), $this->getTimeoutConnect(), $this->getTimeoutRead()); + return $thinClient; + } +} diff --git a/app/code/core/Mage/PaypalUk/Model/Express.php b/app/code/core/Mage/PaypalUk/Model/Express.php index a39af9dca9..c6e58c71f9 100644 --- a/app/code/core/Mage/PaypalUk/Model/Express.php +++ b/app/code/core/Mage/PaypalUk/Model/Express.php @@ -25,10 +25,8 @@ */ /** - * - * PayPal Express Checkout Module - * - * @author Magento Core Team + * Payflow Pro Express Checkout Module + * @TODO extend this from Mage_Paypal_Model_Express */ class Mage_PaypalUk_Model_Express extends Mage_Payment_Model_Method_Abstract { @@ -43,8 +41,8 @@ class Mage_PaypalUk_Model_Express extends Mage_Payment_Model_Method_Abstract protected $_canAuthorize = true; protected $_canCapture = true; protected $_canCapturePartial = false; - protected $_canRefund = false; - protected $_canVoid = true; + protected $_canRefund = true; + protected $_canVoid = false; protected $_canUseInternal = false; protected $_canUseCheckout = true; protected $_canUseForMultishipping = false; @@ -98,6 +96,16 @@ public function getSession() return Mage::getSingleton('paypaluk/session'); } + /** + * Check send email copy config flag + * + * @return bool + */ + public function canSendEmailCopy() + { + return (bool)$this->getConfigData('invoice_email_copy'); + } + /** * Get checkout session namespace * @@ -118,6 +126,16 @@ public function getQuote() return $this->getCheckout()->getQuote(); } + /** + * Used for enablin line item options + * + * @return string + */ + public function getLineItemEnabled() + { + return $this->getConfigData('line_item'); + } + /** * Getting paypal action url * @@ -167,6 +185,7 @@ public function createFormBlock($name) */ public function shortcutSetExpressCheckout() { + $this->getQuote()->reserveOrderId(); $this->getApi() ->setPayment($this->getPayment()) @@ -190,7 +209,7 @@ public function catchError() if ($this->getApi()->hasError() || !$this->getRedirectUrl()) { $s = $this->getCheckout(); $e = $this->getApi()->getError(); - $s->addError(Mage::helper('paypalUk')->__('There was an error connecting to the Paypal server: %s', $e['message'])); + $s->addError(Mage::helper('paypal')->__('There was an error connecting to the PayPal server: %s', $e['message'])); $this->getApi()->setRedirectUrl(Mage::getUrl('checkout/cart')); } return $this; @@ -207,7 +226,7 @@ public function throwError() if ($this->getApi()->hasError() || !$this->getRedirectUrl()) { $s = $this->getCheckout(); $e = $this->getApi()->getError(); - Mage::throwException(Mage::helper('paypalUk')->__('There was an error connecting to the Paypal server: %s', $e['message'])); + Mage::throwException(Mage::helper('paypal')->__('There was an error connecting to the PayPal server: %s', $e['message'])); } return $this; } @@ -246,7 +265,7 @@ public function returnFromPaypal() } /* - * gett + * Get payflow express checkout details from gateway */ protected function _getExpressCheckoutDetails() { @@ -256,7 +275,7 @@ protected function _getExpressCheckoutDetails() if ($api->callGetExpressCheckoutDetails()===false) { //here need to take care where is the page should land - Mage::throwException(Mage::helper('paypalUk')->__('There has been an error processing your payment. Please try later or contact us for help.')); + Mage::throwException(Mage::helper('paypal')->__('There has been an error processing your payment. Please try later or contact us for help.')); } $q = $this->getQuote(); @@ -281,7 +300,9 @@ protected function _getExpressCheckoutDetails() ->setLastname($a->getLastname()) ->setEmail($a->getEmail()); } - + if ($this->getSession()->getExpressCheckoutMethod()=='shortcut') { + $q->getBillingAddress()->importCustomerAddress($a); + } $q->getShippingAddress() ->importCustomerAddress($a) ->setCollectShippingRates(true); @@ -298,15 +319,24 @@ protected function _getExpressCheckoutDetails() $q->collectTotals()->save(); } + /*********************** DO EXPRESS CHECKOUT DETAILS ***************************/ public function placeOrder(Varien_Object $payment) { - $api = $this->getApi() - ->setPayment($payment) + $api = $this->getApi(); + + if ($this->getQuote()->isVirtual()) { + $address = $this->getQuote()->getBillingAddress(); + } else { + $address = $this->getQuote()->getShippingAddress(); + } + + $api->setPayment($payment) ->setAmount($payment->getOrder()->getBaseGrandTotal()) ->setTrxtype($this->getPaymentAction()) ->setCurrencyCode($payment->getOrder()->getBaseCurrencyCode()); + $this->_appendAdditionalToApi($address, $api); if ($api->callDoExpressCheckoutPayment()!==false) { $payment->setStatus('APPROVED') ->setPayerId($api->getPayerId()); @@ -361,7 +391,7 @@ public function capture(Varien_Object $payment, $amount) ->setCcCidStatus($api->getCvv2Match()); } else { $e = $api->getError(); - Mage::throwException($e['message']?$e['message']:Mage::helper('paypalUk')->__('Error in capture payment')); + Mage::throwException($e['message']?$e['message']:Mage::helper('paypal')->__('Error in capture payment')); } } else { $this->placeOrder($payment); @@ -369,6 +399,11 @@ public function capture(Varien_Object $payment, $amount) return $this; } + /** + * check if payment can be voided + * + * @return Mage_PayPalUk_Model_Express + */ public function canVoid(Varien_Object $payment) { if ($payment->getCcTransId()) { @@ -384,11 +419,16 @@ public function canVoid(Varien_Object $payment) } } else { $payment->setStatus(self::STATUS_ERROR); - $payment->setStatusDescription(Mage::helper('paypalUk')->__('Invalid transaction id')); + $payment->setStatusDescription(Mage::helper('paypal')->__('Invalid transaction id')); } return $this; } + /** + * Void payment + * @param Varien_Object $payment + * @return Mage_PayPalUk_Model_Express + */ public function void(Varien_Object $payment) { $error = false; @@ -405,7 +445,7 @@ public function void(Varien_Object $payment) $error = $e['message']; } } else { - $error = Mage::helper('paypalUk')->__('Invalid transaction id'); + $error = Mage::helper('paypal')->__('Invalid transaction id'); } if ($error !== false) { Mage::throwException($error); @@ -413,6 +453,12 @@ public function void(Varien_Object $payment) return $this; } + /** + * Refund payment + * @param Varien_Object $payment + * @param double $amount + * @return Mage_PayPalUk_Model_Express + */ public function refund(Varien_Object $payment, $amount) { $error = false; @@ -430,7 +476,7 @@ public function refund(Varien_Object $payment, $amount) } } else { - $error = Mage::helper('paypalUk')->__('Error in refunding the payment'); + $error = Mage::helper('paypal')->__('Error in refunding the payment'); } if ($error !== false) { Mage::throwException($error); @@ -450,14 +496,17 @@ public function initialize($paymentAction, $stateObject) $address = $this->getQuote()->getShippingAddress(); } - $this->getApi() - ->setPayment($this->getPayment()) + $api = $this->getApi(); + + $api->setPayment($this->getPayment()) ->setTrxtype($this->getPaymentAction($paymentAction)) ->setAmount($address->getBaseGrandTotal()) ->setCurrencyCode($this->getQuote()->getBaseCurrencyCode()) ->setShippingAddress($address) - ->setInvNum($this->getQuote()->getReservedOrderId()) - ->callSetExpressCheckout(); + ->setInvNum($this->getQuote()->getReservedOrderId()); + + $this->_appendAdditionalToApi($address, $api); + $api->callSetExpressCheckout(); $this->throwError(); @@ -479,4 +528,89 @@ public function isInitializeNeeded() { return is_object(Mage::registry('_singleton/checkout/type_onepage')); } + + /** + * Check whether is visible on cart page + * + * @return bool + */ + public function isVisibleOnCartPage() + { + return (bool)$this->getConfigData('visible_on_cart'); + } + + /** + * Add additional fields to Api + * + * @param Varien_Object $payment + * @param Mage_PayPalUk_Model_Api_Pro $api + * + * @return Mage_PayPalUk_Model_Express + */ + protected function _appendAdditionalToApi($address, $api) + { + if (is_object($address) && is_object($api)) { + if ($this->getLineItemEnabled()) { + $api->setLineItems($this->getQuote()->getAllItems()) + ->setShippingAmount($address->getBaseShippingAmount()) + ->setDiscountAmount($address->getBaseDiscountAmount()) + ->setItemAmount($address->getBaseSubtotal()) + ->setItemTaxAmount($address->getTaxAmount()); + } + } + return $this; + } + + /** + * cancel payment + * + * @param Varien_Object $payment + * @return Mage_PaypalUk_Model_Express + */ + public function cancel(Varien_Object $payment) + { + if (!$payment->getOrder()->getInvoiceCollection()->count() && ($payment->getCcTransId() || $payment->getLastTransId())) { + if ($payment->getCcTransId()) { + $payment->setVoidTransactionId($payment->getCcTransId()); + } else { + $payment->setVoidTransactionId($payment->getLastTransId()); + } + $this->void($payment); + } + parent::cancel($payment); + return $this; + } + + /** + * Update Order value after returning from PayPal + * + * @param int $orderId + * @return Mage_PayPalUk_Model_Express + */ + public function updateOrder($orderId) + { + $order = Mage::getModel('sales/order')->load($orderId); + if ($order->getId()) { + $transaction = Mage::getModel('core/resource_transaction') + ->addObject($order); + if ($order->canInvoice() && $this->getPaymentAction() == Mage_Paypal_Model_Api_Abstract::PAYMENT_TYPE_SALE) { + $invoice = $order->prepareInvoice(); + $invoice->register()->capture(); + $transaction->addObject($invoice); + $comment = Mage::helper('paypal')->__('Invoice was created'); + } else { + $this->placeOrder($order->getPayment()); + $comment = Mage::helper('paypal')->__('Customer returned from PayPal site.'); + } + $orderState = Mage_Sales_Model_Order::STATE_PROCESSING; + $orderStatus = $this->getConfigData('order_status'); + if (!$orderStatus) { + $orderStatus = $order->getConfig()->getStateDefaultStatus($orderState); + } + $order->setState($orderState, $orderStatus, $comment, $notified = true); + $transaction->save(); + $order->sendNewOrderEmail(); + } + return $this; + } } diff --git a/app/code/core/Mage/PaypalUk/Model/Express/Review.php b/app/code/core/Mage/PaypalUk/Model/Express/Review.php index 39a8b891b2..52cf5877da 100644 --- a/app/code/core/Mage/PaypalUk/Model/Express/Review.php +++ b/app/code/core/Mage/PaypalUk/Model/Express/Review.php @@ -24,7 +24,9 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ - +/** + * Payflow Pro express review session + */ class Mage_PaypalUk_Model_Express_Review { /** @@ -74,7 +76,7 @@ public function saveShippingMethod($shippingMethod) if (empty($shippingMethod)) { $res = array( 'error' => -1, - 'message' => Mage::helper('paypalUk')->__('Invalid data') + 'message' => Mage::helper('paypal')->__('Invalid data') ); return $res; } diff --git a/app/code/core/Mage/PaypalUk/Model/Mysql4/Api/Debug.php b/app/code/core/Mage/PaypalUk/Model/Mysql4/Api/Debug.php index 45d4ac48fc..b9ce34b448 100644 --- a/app/code/core/Mage/PaypalUk/Model/Mysql4/Api/Debug.php +++ b/app/code/core/Mage/PaypalUk/Model/Mysql4/Api/Debug.php @@ -24,7 +24,9 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ - +/** + * Payflow Pro debug resourse model + */ class Mage_PaypalUk_Model_Mysql4_Api_Debug extends Mage_Core_Model_Mysql4_Abstract { protected function _construct() diff --git a/app/code/core/Mage/PaypalUk/Model/Mysql4/Api/Debug/Collection.php b/app/code/core/Mage/PaypalUk/Model/Mysql4/Api/Debug/Collection.php index 52d547476e..fa90c19b9f 100644 --- a/app/code/core/Mage/PaypalUk/Model/Mysql4/Api/Debug/Collection.php +++ b/app/code/core/Mage/PaypalUk/Model/Mysql4/Api/Debug/Collection.php @@ -24,7 +24,9 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ - +/** + * Payflow Pro debug collection resource model + */ class Mage_PaypalUk_Model_Mysql4_Api_Debug_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract { protected function _construct() diff --git a/app/code/core/Mage/PaypalUk/Model/Session.php b/app/code/core/Mage/PaypalUk/Model/Session.php index 5542d791ae..0ef9c5c5a8 100644 --- a/app/code/core/Mage/PaypalUk/Model/Session.php +++ b/app/code/core/Mage/PaypalUk/Model/Session.php @@ -26,7 +26,7 @@ /** * - * PaypalUk transaction session namespace + * Payflow Pro transaction session namespace * * @author Magento Core Team */ diff --git a/app/code/core/Mage/PaypalUk/Model/Source/Cctype.php b/app/code/core/Mage/PaypalUk/Model/Source/Cctype.php index 4cae330054..0483cebcec 100644 --- a/app/code/core/Mage/PaypalUk/Model/Source/Cctype.php +++ b/app/code/core/Mage/PaypalUk/Model/Source/Cctype.php @@ -24,8 +24,16 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ +/** + * + * PayPalUk Payment Action Dropdown source + */ class Mage_PaypalUk_Model_Source_Cctype extends Mage_Payment_Model_Source_Cctype { + /** + * Get Credit card types as Optional array + * @return array + */ public function getAllowedTypes() { return array('VI', 'MC', 'AE', 'DI', 'SS', 'OT'); diff --git a/app/code/core/Mage/PaypalUk/Model/Source/PaymentAction.php b/app/code/core/Mage/PaypalUk/Model/Source/PaymentAction.php index 41fb34788a..44ac4a5c3f 100644 --- a/app/code/core/Mage/PaypalUk/Model/Source/PaymentAction.php +++ b/app/code/core/Mage/PaypalUk/Model/Source/PaymentAction.php @@ -27,16 +27,18 @@ /** * * PayPalUk Payment Action Dropdown source - * - * @author Magento Core Team */ class Mage_PaypalUk_Model_Source_PaymentAction { public function toOptionArray() { + /** + * Get allowed Payment Action Types as optional array + * @return array + */ return array( - array('value' => Mage_PaypalUk_Model_Api_Abstract::PAYMENT_TYPE_AUTH, 'label' => Mage::helper('paypalUk')->__('Authorization')), - array('value' => Mage_PaypalUk_Model_Api_Abstract::PAYMENT_TYPE_SALE, 'label' => Mage::helper('paypalUk')->__('Sale')), + array('value' => Mage_PaypalUk_Model_Api_Abstract::PAYMENT_TYPE_AUTH, 'label' => Mage::helper('paypal')->__('Authorization')), + array('value' => Mage_PaypalUk_Model_Api_Abstract::PAYMENT_TYPE_SALE, 'label' => Mage::helper('paypal')->__('Sale')), ); } } diff --git a/app/code/core/Mage/PaypalUk/controllers/Adminhtml/Paypaluk/DirectController.php b/app/code/core/Mage/PaypalUk/controllers/Adminhtml/Paypaluk/DirectController.php new file mode 100644 index 0000000000..4a2287bc03 --- /dev/null +++ b/app/code/core/Mage/PaypalUk/controllers/Adminhtml/Paypaluk/DirectController.php @@ -0,0 +1,116 @@ +getRequest()->getParam('payment'); + $this->_getValidation() + ->setCcNumber($payment['cc_number']) + ->setCcExpMonth($payment['cc_exp_month']) + ->setCcExpYear($payment['cc_exp_year']) + ->callLookup(); + + $result = array(); + if ($this->_getValidation()->getEnrolled() == 'Y' + && !$this->_getValidation()->getErrorNo() + && $this->_getValidation()->getAcsUrl()) { + $result = array('iframeUrl' => $this->getUrl('*/paypaluk_direct/validate', array('_current' => true, '_secure' => true))); + } else { + $result = array('iframeUrl' => $this->getUrl('*/paypaluk_direct/finalizeValidate', array('_current' => true, '_secure' => true))); + } + $this->getResponse()->setBody(Zend_Json::encode($result)); + } + + /** + * Load auto submit form, for sending customer to card holder validation page + * + */ + public function validateAction() + { + $this->loadLayout(); + $this->renderLayout(); + } + + /** + * Show finalize page. close iframe and redirect to next step + * + */ + public function finalizeValidateAction() + { + $this->loadLayout(); + $this->renderLayout(); + } + + /** + * Loaded as callback url from cardholder validation page + * analize incoming data, call cmpi_authorization method, analize result. + * show finalize page with success result or error message + * + */ + public function termValidateAction() + { + $PAResPayload = $this->getRequest()->getParam('PaRes'); + $MD = $this->getRequest()->getParam('MD'); + $this->_getValidation() + ->setPaResPayload($PAResPayload) + ->setMd($MD) + ->callAuthentication(); + + if ($this->_getValidation()->getErrorNo() == 0 + && $this->_getValidation()->getSignature() == 'Y' + && $this->_getValidation()->getPaResStatus() != 'N') { + $this->loadLayout(); + $this->renderLayout(); + } else { + $this->loadLayout(); + $this->getLayout()->getBlock('root')->setError($this->_getValidation()->getErrorDesc()); + $this->renderLayout(); + } + } +} diff --git a/app/code/core/Mage/PaypalUk/controllers/DirectController.php b/app/code/core/Mage/PaypalUk/controllers/DirectController.php new file mode 100644 index 0000000000..37efc34d7f --- /dev/null +++ b/app/code/core/Mage/PaypalUk/controllers/DirectController.php @@ -0,0 +1,125 @@ +getRequest()->getParam('payment'); + $this->getValidation() + ->setCcNumber($payment['cc_number']) + ->setCcExpMonth($payment['cc_exp_month']) + ->setCcExpYear($payment['cc_exp_year']) + ->callLookup(); + + $result = array(); + if ($this->getValidation()->getEnrolled() == 'Y' + && !$this->getValidation()->getErrorNo() + && $this->getValidation()->getAcsUrl()) { + $result = array('iframeUrl'=>Mage::getUrl('paypaluk/direct/validate', array('_secure' => true))); + } else { + $result = array('iframeUrl'=>Mage::getUrl('paypaluk/direct/finalizeValidate', array('_secure' => true))); + } + $this->getResponse()->setBody(Zend_Json::encode($result)); + } + + /** + * Load auto submit form, for sending customer to card holder validation page + * + */ + public function validateAction() + { + $this->loadLayout(); + $this->renderLayout(); + } + + /** + * Show finalize page. close iframe and redirect to next step * + * + */ + public function finalizeValidateAction() + { + $this->loadLayout(); + $this->renderLayout(); + } + + /** + * Loaded as callback url from cardholder validation page + * analize incoming data, call cmpi_authorization method, analize result. + * show finalize page with success result or error message + * + */ + public function termValidateAction() + { + $PAResPayload = $this->getRequest()->getParam('PaRes'); + $MD = $this->getRequest()->getParam('MD'); + $this->getValidation() + ->setPaResPayload($PAResPayload) + ->setMd($MD) + ->callAuthentication(); + + if ($this->getValidation()->getErrorNo()==0 + && $this->getValidation()->getSignature() == 'Y' + && $this->getValidation()->getPaResStatus() != 'N') { + $this->loadLayout(); + $this->renderLayout(); + } else { + $this->loadLayout(); + $this->getLayout()->getBlock('root')->setError($this->getValidation()->getErrorDesc()); + $this->renderLayout(); + } + } +} diff --git a/app/code/core/Mage/PaypalUk/controllers/ExpressController.php b/app/code/core/Mage/PaypalUk/controllers/ExpressController.php index 852cf1625d..e445a05236 100644 --- a/app/code/core/Mage/PaypalUk/controllers/ExpressController.php +++ b/app/code/core/Mage/PaypalUk/controllers/ExpressController.php @@ -71,6 +71,9 @@ public function shortcutAction() $this->getResponse()->setRedirect($this->getExpress()->getRedirectUrl()); } + /** + * Redirect to paypal account, to edit transaction detail + */ public function editAction() { $this->getResponse()->setRedirect($this->getExpress()->getApi()->getPaypalUrl()); @@ -166,90 +169,29 @@ public function saveOrderAction() if ($shippingMethod = $this->getRequest()->getParam('shipping_method')) { $this->getReview()->saveShippingMethod($shippingMethod); } else if (!$this->getReview()->getQuote()->getIsVirtual()) { - $payPalSession->addError(Mage::helper('paypalUk')->__('Please select a valid shipping method')); + $payPalSession->addError(Mage::helper('paypal')->__('Please select a valid shipping method')); $this->_redirect('paypaluk/express/review'); return; } } - - $customer = $this->getReview()->getQuote()->getCustomer(); - if (!$customer || !$customer->getId()) { - $this->getReview()->getQuote() - ->setCustomerIsGuest(true) - ->setCustomerGroupId(Mage_Customer_Model_Group::NOT_LOGGED_IN_ID); - } - unset($customer); // for backward compatibility, see logic after place order - - $billing = $this->getReview()->getQuote()->getBillingAddress(); - $shipping = $this->getReview()->getQuote()->getShippingAddress(); - - $convertQuote = Mage::getModel('sales/convert_quote'); - /* @var $convertQuote Mage_Sales_Model_Convert_Quote */ - $order = Mage::getModel('sales/order'); - /* @var $order Mage_Sales_Model_Order */ - - if ($this->getReview()->getQuote()->isVirtual()) { - $order = $convertQuote->addressToOrder($billing); - } else { - $order = $convertQuote->addressToOrder($shipping); - } - $order->setBillingAddress($convertQuote->addressToOrderAddress($billing)); - $order->setShippingAddress($convertQuote->addressToOrderAddress($shipping)); - $order->setPayment($convertQuote->paymentToOrderPayment($this->getReview()->getQuote()->getPayment())); - - foreach ($this->getReview()->getQuote()->getAllItems() as $item) { - $order->addItem($convertQuote->itemToOrderItem($item)); - } - /** - * We can use configuration data for declare new order status - */ - Mage::dispatchEvent('checkout_type_onepage_save_order', array('order'=>$order, 'quote'=>$this->getReview()->getQuote())); - - //customer checkout from shopping cart page - if (!$order->getCustomerEmail()) { - $order->setCustomerEmail($shipping->getEmail()); - } - - $order->place(); - - if (isset($customer) && $customer && $this->getReview()->getQuote()->getCheckoutMethod()==Mage_Sales_Model_Quote::CHECKOUT_METHOD_REGISTER) { - $customer->save(); - $customer->setDefaultBilling($customerBilling->getId()); - $customerShippingId = isset($customerShipping) ? $customerShipping->getId() : $customerBilling->getId(); - $customer->setDefaultShipping($customerShippingId); - $customer->save(); - - $order->setCustomerId($customer->getId()) - ->setCustomerEmail($customer->getEmail()) - ->setCustomerPrefix($customer->getPrefix()) - ->setCustomerFirstname($customer->getFirstname()) - ->setCustomerMiddlename($customer->getMiddlename()) - ->setCustomerLastname($customer->getLastname()) - ->setCustomerSuffix($customer->getSuffix()) - ->setCustomerGroupId($customer->getGroupId()) - ->setCustomerTaxClassId($customer->getTaxClassId()); - - $billing->setCustomerId($customer->getId())->setCustomerAddressId($customerBilling->getId()); - $shipping->setCustomerId($customer->getId())->setCustomerAddressId($customerShippingId); - } - + $service = Mage::getModel('sales/service_quote', $this->getReview()->getQuote()); + $order = $service->submit(); } catch (Mage_Core_Exception $e){ - $error_message = $e->getMessage(); + $payPalSession->addError($e->getMessage()); + $this->_redirect('paypaluk/express/review'); + return; } catch (Exception $e){ - if (isset($order)) { - $error_message = $order->getErrors(); - } else { - $error_message = $e->getMessage(); - } - } - - if ($error_message) { $payPalSession->addError($e->getMessage()); $this->_redirect('paypaluk/express/review'); return; } - $order->save(); + if ($order->hasInvoices() && $this->getExpress()->canSendEmailCopy()) { + foreach ($order->getInvoiceCollection() as $invoice) { + $invoice->sendEmail()->setEmailSent(true); + } + } + $order->sendNewOrderEmail(); $this->getReview()->getQuote()->setIsActive(false); $this->getReview()->getQuote()->save(); @@ -260,8 +202,6 @@ public function saveOrderAction() $this->getReview()->getCheckout()->setLastOrderId($order->getId()); $this->getReview()->getCheckout()->setLastRealOrderId($order->getIncrementId()); - $order->sendNewOrderEmail(); - $payPalSession->unsExpressCheckoutMethod(); $this->_redirect('checkout/onepage/success'); @@ -281,50 +221,27 @@ public function errorAction() * as payment method not a separate checkout from shopping cart * */ - public function updateOrderAction() { + public function updateOrderAction() + { $error_message = ''; $payPalSession = Mage::getSingleton('paypal/session'); - - $order = Mage::getModel('sales/order')->load(Mage::getSingleton('checkout/session')->getLastOrderId()); - - if ($order->getId()) { - $comment = null; - if ($order->canInvoice() && $this->getExpress()->getPaymentAction() == Mage_Paypal_Model_Api_Abstract::PAYMENT_TYPE_SALE) { - $invoice = $order->prepareInvoice(); - $invoice->register()->capture(); - Mage::getModel('core/resource_transaction') - ->addObject($invoice) - ->addObject($invoice->getOrder()) - ->save(); - - $orderState = Mage_Sales_Model_Order::STATE_PROCESSING; - $orderStatus = $this->getExpress()->getConfigData('order_status'); - $comment = Mage::helper('paypal')->__('Invoice #%s created', $invoice->getIncrementId()); - } else { - $this->getExpress()->placeOrder($order->getPayment()); - - $orderState = Mage_Sales_Model_Order::STATE_PROCESSING; - $orderStatus = $this->getExpress()->getConfigData('order_status'); - } - - if (!$orderStatus) { - $orderStatus = $order->getConfig()->getStateDefaultStatus($orderState); - } - if (!$comment) { - $comment = Mage::helper('paypal')->__('Customer returned from PayPal site.'); + if ($orderId = Mage::getSingleton('checkout/session')->getLastOrderId()) { + try{ + $this->getExpress()->updateOrder($orderId); + } catch (Mage_Core_Exception $e) { + $payPalSession->addError($e->getMessage()); + $this->_redirect('paypaluk/express/review'); + return; + } catch (Exception $e) { + Mage::helper('checkout')->sendPaymentFailedEmail($this->getReview()->getQuote(), $e->getMessage()); + $payPalSession->addError(Mage::helper('paypal')->__('There was an error processing your order. Please contact us or try again later.')); + $this->_redirect('paypaluk/express/review'); + return; } - - $order->setState($orderState, $orderStatus, $comment, $notified = true); - $order->save(); - - Mage::getSingleton('checkout/session')->getQuote()->setIsActive(false); - Mage::getSingleton('checkout/session')->getQuote()->save(); - - $order->sendNewOrderEmail(); + $this->getReview()->getQuote()->setIsActive(false); + $this->getReview()->getQuote()->save(); } - $payPalSession->unsExpressCheckoutMethod(); - $this->_redirect('checkout/onepage/success'); } diff --git a/app/code/core/Mage/PaypalUk/etc/config.xml b/app/code/core/Mage/PaypalUk/etc/config.xml index 2d52e978f2..fb335b057c 100644 --- a/app/code/core/Mage/PaypalUk/etc/config.xml +++ b/app/code/core/Mage/PaypalUk/etc/config.xml @@ -74,17 +74,6 @@ - - - - - SS - Maestro/Solo - 40 - - - - @@ -117,6 +106,13 @@ + + + + paypaluk.xml + + + @@ -127,7 +123,17 @@ - + + + + + + Mage_PaypalUk_Adminhtml + + + + + @@ -135,21 +141,33 @@ PayPalUK + + + + - - authorize + paypaluk/express - PaypalUk Express + PayPal 0 + 1 + Sale - - authorize + + Sale paypaluk/direct - PaypalUk Direct - AE,VI,MC,DI + Debit or Credit Card + AE,VI,MC,DI,SS 0 + 0 + + + + https://centineltest.cardinalcommerce.com/maps/txns.asp + 100 + 100 diff --git a/app/code/core/Mage/PaypalUk/etc/system.xml b/app/code/core/Mage/PaypalUk/etc/system.xml index f00808a546..6fb8ce459b 100644 --- a/app/code/core/Mage/PaypalUk/etc/system.xml +++ b/app/code/core/Mage/PaypalUk/etc/system.xml @@ -29,7 +29,7 @@ - + Sign up for PayPal Merchant Account now!]]> text @@ -81,6 +81,79 @@ 1 1 + + + select + adminhtml/system_config_source_yesno + 18 + 1 + 1 + 0 + + + + select + adminhtml/system_config_source_yesno + 20 + 1 + 1 + 0 + + + + text + 22 + 1 + 1 + 0 + 1 + + + + text + 24 + 1 + 1 + 0 + 1 + + + + obscure + adminhtml/system_config_backend_encrypted + 26 + 1 + 1 + 0 + 1 + + + + text + 28 + 1 + 1 + 0 + 1 + + + + text + 30 + 1 + 1 + 0 + 1 + + + + text + 32 + 1 + 1 + 0 + 1 + multiselect @@ -110,7 +183,7 @@ - + Sign up for PayPal Merchant Account now!]]> text @@ -123,49 +196,59 @@ select adminhtml/system_config_source_yesno - 1 + 10 1 1 0 - - + + <label>Title</label> + <frontend_type>text</frontend_type> + <sort_order>20</sort_order> + <show_in_default>1</show_in_default> + <show_in_website>1</show_in_website> + <show_in_store>1</show_in_store> + + + select - adminhtml/system_config_source_order_status_processing - 2 + adminhtml/system_config_source_yesno + 30 1 1 0 - + select paypaluk/source_paymentAction - 2 + 40 1 1 0 - - - text - 100 + + + select + adminhtml/system_config_source_order_status_processing + 50 1 1 0 - - - <label>Title</label> - <frontend_type>text</frontend_type> - <sort_order>2</sort_order> + </order_status> + <line_item translate="label"> + <label>Line Item Enabled</label> + <frontend_type>select</frontend_type> + <source_model>adminhtml/system_config_source_yesno</source_model> + <sort_order>10</sort_order> <show_in_default>1</show_in_default> <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - - + 0 + + allowspecific - 50 + 60 adminhtml/system_config_source_payment_allspecificcountries 1 1 @@ -174,19 +257,27 @@ multiselect - 51 + 70 adminhtml/system_config_source_country 1 1 0 + + + text + 80 + 1 + 1 + 0 + - + Sign up for PayPal Merchant Account now!]]> text diff --git a/app/code/core/Mage/Poll/etc/adminhtml.xml b/app/code/core/Mage/Poll/etc/adminhtml.xml new file mode 100644 index 0000000000..d36d7c0876 --- /dev/null +++ b/app/code/core/Mage/Poll/etc/adminhtml.xml @@ -0,0 +1,56 @@ + + + + + + + + Polls + adminhtml/poll + 20 + + + + + + + + + + + + Polls + 20 + + + + + + + + diff --git a/app/code/core/Mage/Rating/Model/Mysql4/Rating.php b/app/code/core/Mage/Rating/Model/Mysql4/Rating.php index 89bb0cc413..62de1ad3f7 100644 --- a/app/code/core/Mage/Rating/Model/Mysql4/Rating.php +++ b/app/code/core/Mage/Rating/Model/Mysql4/Rating.php @@ -305,4 +305,39 @@ public function getReviewSummary($object, $onlyForCurrentStore = true) return array_values($result); } + + /** + * Get rating entity type id by code + * + * @param string $entityCode + * @return int + */ + public function getEntityIdByCode($entityCode) + { + $select = $this->_getReadAdapter()->select() + ->from( $this->getTable('rating_entity'), array('entity_id')) + ->where('entity_code = ?', $entityCode); + return $this->_getReadAdapter()->fetchOne($select); + } + + /** + * Delete ratings by product id + * + * @param int $productId + * @return Mage_Rating_Model_Mysql4_Rating + */ + public function deleteAggregatedRatingsByProductId($productId) + { + $entityId = $this->getEntityIdByCode(Mage_Rating_Model_Rating::ENTITY_PRODUCT_CODE); + $select = $this->_getReadAdapter()->select() + ->from($this->getTable('rating/rating'), array('rating_id')) + ->where('entity_id = ?', $entityId); + $ratings = $this->_getReadAdapter()->fetchCol($select); + + $this->_getWriteAdapter()->delete($this->getTable('rating/rating_vote_aggregated'), array( + 'entity_pk_value=?' => $productId, + 'rating_id IN(?)' => $ratings + )); + return $this; + } } diff --git a/app/code/core/Mage/Rating/Model/Mysql4/Rating/Value.php b/app/code/core/Mage/Rating/Model/Mysql4/Rating/Value.php deleted file mode 100644 index d130b42a75..0000000000 --- a/app/code/core/Mage/Rating/Model/Mysql4/Rating/Value.php +++ /dev/null @@ -1,25 +0,0 @@ - + */ +class Mage_Rating_Model_Observer +{ + /** + * Cleanup product ratings after product delete + * + * @param Varien_Event_Observer $observer + * @return Mage_CatalogIndex_Model_Observer + */ + public function processProductAfterDeleteEvent(Varien_Event_Observer $observer) + { + $eventProduct = $observer->getEvent()->getProduct(); + if ($eventProduct && $eventProduct->getId()) { + Mage::getResourceSingleton('rating/rating')->deleteAggregatedRatingsByProductId($eventProduct->getId()); + } + return $this; + } +} diff --git a/app/code/core/Mage/Rating/Model/Rating.php b/app/code/core/Mage/Rating/Model/Rating.php index 606c135003..536d588841 100644 --- a/app/code/core/Mage/Rating/Model/Rating.php +++ b/app/code/core/Mage/Rating/Model/Rating.php @@ -33,6 +33,14 @@ */ class Mage_Rating_Model_Rating extends Mage_Core_Model_Abstract { + /** + * rating entity codes + * + */ + const ENTITY_PRODUCT_CODE = 'product'; + const ENTITY_PRODUCT_REVIEW_CODE = 'product_review'; + const ENTITY_REVIEW_CODE = 'review'; + public function __construct() { $this->_init('rating/rating'); @@ -95,4 +103,15 @@ public function getReviewSummary($reviewId, $onlyForCurrentStore = true) $this->setReviewId($reviewId); return $this->_getResource()->getReviewSummary($this, $onlyForCurrentStore); } + + /** + * Get rating entity type id by code + * + * @param string $entityCode + * @return int + */ + public function getEntityIdByCode($entityCode) + { + return $this->getResource()->getEntityIdByCode($entityCode); + } } diff --git a/app/code/core/Mage/Rating/Model/Rating/Value.php b/app/code/core/Mage/Rating/Model/Rating/Value.php deleted file mode 100644 index d130b42a75..0000000000 --- a/app/code/core/Mage/Rating/Model/Rating/Value.php +++ /dev/null @@ -1,25 +0,0 @@ - + + + + + rating/observer + processProductAfterDeleteEvent + + + +
diff --git a/app/code/core/Mage/Reports/Block/Product/Widget/Compared.php b/app/code/core/Mage/Reports/Block/Product/Widget/Compared.php index 79992f9e05..5bd1cf817a 100644 --- a/app/code/core/Mage/Reports/Block/Product/Widget/Compared.php +++ b/app/code/core/Mage/Reports/Block/Product/Widget/Compared.php @@ -33,7 +33,7 @@ */ class Mage_Reports_Block_Product_Widget_Compared extends Mage_Reports_Block_Product_Compared - implements Mage_Cms_Block_Widget_Interface + implements Mage_Widget_Block_Interface { /** * Internal constructor diff --git a/app/code/core/Mage/Reports/Block/Product/Widget/Viewed.php b/app/code/core/Mage/Reports/Block/Product/Widget/Viewed.php index 5359662ece..275a8be364 100644 --- a/app/code/core/Mage/Reports/Block/Product/Widget/Viewed.php +++ b/app/code/core/Mage/Reports/Block/Product/Widget/Viewed.php @@ -33,7 +33,7 @@ */ class Mage_Reports_Block_Product_Widget_Viewed extends Mage_Reports_Block_Product_Viewed - implements Mage_Cms_Block_Widget_Interface + implements Mage_Widget_Block_Interface { /** * Internal constructor diff --git a/app/code/core/Mage/Reports/Model/Mysql4/Coupons/Collection.php b/app/code/core/Mage/Reports/Model/Mysql4/Coupons/Collection.php index e0646c8cbd..fbb7a5c5e9 100644 --- a/app/code/core/Mage/Reports/Model/Mysql4/Coupons/Collection.php +++ b/app/code/core/Mage/Reports/Model/Mysql4/Coupons/Collection.php @@ -57,7 +57,7 @@ public function joinFields($from, $to, $storeIds = array()) $this->groupByAttribute('coupon_code') ->addAttributeToFilter('created_at', array('from' => $from, 'to' => $to, 'datetime' => true)) ->addAttributeToFilter('coupon_code', array('neq' => '')) - ->getselect()->from('', array('uses' => 'COUNT(e.entity_id)')) + ->getselect()->columns(array('uses' => 'COUNT(e.entity_id)')) ->having('uses > 0') ->order('uses desc'); //die($this->getSelect()); @@ -101,7 +101,7 @@ public function getSelectCountSql() $countSelect->reset(Zend_Db_Select::COLUMNS); $countSelect->reset(Zend_Db_Select::GROUP); $countSelect->reset(Zend_Db_Select::HAVING); - $countSelect->from("", "count(DISTINCT main_table.rule_id)"); + $countSelect->columns("count(DISTINCT main_table.rule_id)"); $sql = $countSelect->__toString(); return $sql; } diff --git a/app/code/core/Mage/Reports/Model/Mysql4/Customer/Collection.php b/app/code/core/Mage/Reports/Model/Mysql4/Customer/Collection.php index 735ad39b92..951580bbe9 100644 --- a/app/code/core/Mage/Reports/Model/Mysql4/Customer/Collection.php +++ b/app/code/core/Mage/Reports/Model/Mysql4/Customer/Collection.php @@ -104,7 +104,7 @@ public function addOrdersCount() $_joinCondition .= $this->getConnection()->quoteInto(' AND order_state.value<>? ', Mage_Sales_Model_Order::STATE_CANCELED); $this->getSelect() - ->from('', array("orders_count" => "COUNT(order_state.entity_id)")) + ->columns(array("orders_count" => "COUNT(order_state.entity_id)")) ->joinLeft( array('order_state' => $stateAttr->getBackend()->getTable()), $_joinCondition, @@ -155,8 +155,8 @@ public function addSumAvgTotals($storeId = 0) } $this->getSelect() - ->from('', array("orders_avg_amount" => "AVG({$expr})")) - ->from('', array("orders_sum_amount" => "SUM({$expr})")); + ->columns(array("orders_avg_amount" => "AVG({$expr})")) + ->columns(array("orders_sum_amount" => "SUM({$expr})")); return $this; } @@ -183,7 +183,7 @@ public function getSelectCountSql() $countSelect->reset(Zend_Db_Select::COLUMNS); $countSelect->reset(Zend_Db_Select::GROUP); $countSelect->reset(Zend_Db_Select::HAVING); - $countSelect->from("", "count(DISTINCT e.entity_id)"); + $countSelect->columns("count(DISTINCT e.entity_id)"); $sql = $countSelect->__toString(); return $sql; } diff --git a/app/code/core/Mage/Reports/Model/Mysql4/Invoiced/Collection.php b/app/code/core/Mage/Reports/Model/Mysql4/Invoiced/Collection.php index 503cf9655c..b376436de1 100644 --- a/app/code/core/Mage/Reports/Model/Mysql4/Invoiced/Collection.php +++ b/app/code/core/Mage/Reports/Model/Mysql4/Invoiced/Collection.php @@ -96,7 +96,7 @@ public function getSelectCountSql() $countSelect->reset(Zend_Db_Select::COLUMNS); $countSelect->reset(Zend_Db_Select::GROUP); $countSelect->reset(Zend_Db_Select::HAVING); - $countSelect->from("", "count(*)"); + $countSelect->columns("count(*)"); $sql = $countSelect->__toString(); return $sql; } diff --git a/app/code/core/Mage/Reports/Model/Mysql4/Order/Collection.php b/app/code/core/Mage/Reports/Model/Mysql4/Order/Collection.php index 9b1d979975..207e143195 100644 --- a/app/code/core/Mage/Reports/Model/Mysql4/Order/Collection.php +++ b/app/code/core/Mage/Reports/Model/Mysql4/Order/Collection.php @@ -250,7 +250,7 @@ public function setDateRange($from, $to) // $this->getSelect() // ->joinLeft(array("order_items2" => $tableName), // "order_items2.entity_id = `order_items`.entity_id and order_items2.attribute_id = {$attrId}", array()) -// ->from("", array("items" => "sum(order_items2.{$fieldName})")); +// ->columns(array("items" => "sum(order_items2.{$fieldName})")); $countSql = clone $this->getSelect(); $countSql->reset(); @@ -261,7 +261,7 @@ public function setDateRange($from, $to) ->where("`order_items`.`order_id` = `e`.`entity_id`") ->where("`order_items2`.`parent_item_id` is NULL"); - $this->getSelect()->from("", array("items" => "SUM((".$countSql."))")); + $this->getSelect()->columns(array("items" => "SUM((".$countSql."))")); return $this; } @@ -301,8 +301,8 @@ public function setStoreIds($storeIds) array('base_total_refunded')) ->addExpressionAttributeToSelect( 'profit', - 'SUM({{base_total_paid}}) - SUM({{base_total_refunded}}) - SUM({{base_total_invoiced_cost}})', - array('base_total_paid', 'base_total_refunded', 'base_total_invoiced_cost')); + 'SUM({{base_subtotal_invoiced}}) + SUM({{base_discount_refunded}}) - SUM({{base_subtotal_refunded}}) - SUM({{base_discount_invoiced}}) - SUM({{base_total_invoiced_cost}})', + array('base_subtotal_invoiced', 'base_discount_refunded', 'base_subtotal_refunded', 'base_discount_invoiced', 'base_total_invoiced_cost')); } else { $this->addExpressionAttributeToSelect( 'subtotal', @@ -334,8 +334,8 @@ public function setStoreIds($storeIds) array('base_total_refunded', 'base_to_global_rate')) ->addExpressionAttributeToSelect( 'profit', - 'SUM({{base_total_paid}}*{{base_to_global_rate}}) - SUM({{base_total_refunded}}*{{base_to_global_rate}}) - SUM({{base_total_invoiced_cost}}*{{base_to_global_rate}})', - array('base_total_paid', 'base_total_refunded', 'base_total_invoiced_cost', 'base_to_global_rate')); + 'SUM({{base_subtotal_invoiced}}*{{base_to_global_rate}}) + SUM({{base_discount_refunded}}*{{base_to_global_rate}}) - SUM({{base_subtotal_refunded}}*{{base_to_global_rate}}) - SUM({{base_discount_invoiced}}*{{base_to_global_rate}}) - SUM({{base_total_invoiced_cost}}*{{base_to_global_rate}})', + array('base_subtotal_invoiced', 'base_discount_refunded', 'base_subtotal_refunded', 'base_discount_invoiced', 'base_total_invoiced_cost', 'base_to_global_rate')); } return $this; @@ -363,7 +363,7 @@ public function joinCustomerName() //TODO: add full name logic $this->joinAttribute('firstname', 'customer/firstname', 'customer_id'); $this->joinAttribute('lastname', 'customer/lastname', 'customer_id'); - $this->getSelect()->from("", array('name' => 'CONCAT(_table_firstname.value," ", _table_lastname.value)')); + $this->getSelect()->columns(array('name' => 'CONCAT(_table_firstname.value," ", _table_lastname.value)')); return $this; } @@ -376,7 +376,7 @@ public function addOrdersCount() { $this->addAttributeToFilter('state', array('neq' => Mage_Sales_Model_Order::STATE_CANCELED)); $this->getSelect() - ->from('', array("orders_count" => "COUNT(e.entity_id)")); + ->columns(array("orders_count" => "COUNT(e.entity_id)")); return $this; } @@ -421,8 +421,8 @@ public function addSumAvgTotals($storeId = 0) } $this->getSelect() - ->from('', array("orders_avg_amount" => "AVG({$expr})")) - ->from('', array("orders_sum_amount" => "SUM({$expr})")); + ->columns(array("orders_avg_amount" => "AVG({$expr})")) + ->columns(array("orders_sum_amount" => "SUM({$expr})")); return $this; } @@ -462,7 +462,7 @@ public function getSelectCountSql() $countSelect->reset(Zend_Db_Select::COLUMNS); $countSelect->reset(Zend_Db_Select::GROUP); $countSelect->reset(Zend_Db_Select::HAVING); - $countSelect->from("", "count(DISTINCT e.entity_id)"); + $countSelect->columns("count(DISTINCT e.entity_id)"); $sql = $countSelect->__toString(); 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 24176190ca..1f8dea27eb 100644 --- a/app/code/core/Mage/Reports/Model/Mysql4/Product/Collection.php +++ b/app/code/core/Mage/Reports/Model/Mysql4/Product/Collection.php @@ -104,7 +104,7 @@ protected function _joinFields() $this->addAttributeToSelect('entity_id') ->addAttributeToSelect('name') ->addAttributeToSelect('price'); - /*$this->getSelect()->from('', array( + /*$this->getSelect()->columns(array( 'viewed' => 'CONCAT("","")', 'added' => 'CONCAT("","")', 'purchased' => 'CONCAT("","")', @@ -134,7 +134,7 @@ public function getSelectCountSql() $countSelect->reset(Zend_Db_Select::COLUMNS); $countSelect->reset(Zend_Db_Select::GROUP); $countSelect->reset(Zend_Db_Select::HAVING); - $countSelect->from("", "count(DISTINCT e.entity_id)"); + $countSelect->columns("count(DISTINCT e.entity_id)"); $sql = $countSelect->__toString(); return $sql; } @@ -151,7 +151,7 @@ public function addCartsCount() ->where("quote_items.product_id = e.entity_id"); $this->getSelect() - ->from("", array("carts" => "({$countSelect})")) + ->columns(array("carts" => "({$countSelect})")) ->group("e.{$this->getProductEntityId()}") ->having('carts > 0'); @@ -163,7 +163,7 @@ public function addOrdersCount($from = '', $to = '') $this->getSelect() ->joinLeft(array("order_items" => $this->getTable('sales/order_item')), "order_items.product_id = e.{$this->getProductEntityId()}", array()) - ->from("", array("orders" => "count(`order_items2`.item_id)")) + ->columns(array("orders" => "count(`order_items2`.item_id)")) ->group("e.{$this->getProductEntityId()}"); if ($from != '' && $to != '') { diff --git a/app/code/core/Mage/Reports/Model/Mysql4/Product/Downloads/Collection.php b/app/code/core/Mage/Reports/Model/Mysql4/Product/Downloads/Collection.php index aba1526e3c..afb9fb899f 100644 --- a/app/code/core/Mage/Reports/Model/Mysql4/Product/Downloads/Collection.php +++ b/app/code/core/Mage/Reports/Model/Mysql4/Product/Downloads/Collection.php @@ -48,8 +48,8 @@ public function addSummary() array('d' => $this->getTable('downloadable/link_purchased_item')), 'e.entity_id=d.product_id', array( - 'purchases' => 'd.number_of_downloads_bought', - 'downloads' => 'd.number_of_downloads_used' + 'purchases' => new Zend_Db_Expr('SUM(d.number_of_downloads_bought)'), + 'downloads' => new Zend_Db_Expr('SUM(d.number_of_downloads_used)') ) ) ->joinInner( diff --git a/app/code/core/Mage/Reports/Model/Mysql4/Quote/Collection.php b/app/code/core/Mage/Reports/Model/Mysql4/Quote/Collection.php index ec8fc0ced8..2f07609afe 100644 --- a/app/code/core/Mage/Reports/Model/Mysql4/Quote/Collection.php +++ b/app/code/core/Mage/Reports/Model/Mysql4/Quote/Collection.php @@ -115,10 +115,10 @@ public function addCustomerData($filter = null) public function addSubtotal($storeIds = '', $filter = null) { if (is_array($storeIds)) { - $this->getSelect()->from("", array("subtotal" => "(main_table.base_subtotal_with_discount*main_table.base_to_global_rate)")); + $this->getSelect()->columns(array("subtotal" => "(main_table.base_subtotal_with_discount*main_table.base_to_global_rate)")); $this->_joinedFields['subtotal'] = '(main_table.base_subtotal_with_discount*main_table.base_to_global_rate)'; } else { - $this->getSelect()->from("", array("subtotal" => "main_table.base_subtotal_with_discount")); + $this->getSelect()->columns(array("subtotal" => "main_table.base_subtotal_with_discount")); $this->_joinedFields['subtotal'] = 'main_table.base_subtotal_with_discount'; } @@ -143,7 +143,7 @@ public function getSelectCountSql() $countSelect->reset(Zend_Db_Select::COLUMNS); $countSelect->reset(Zend_Db_Select::GROUP); - $countSelect->from("", "count(DISTINCT main_table.entity_id)"); + $countSelect->columns("count(DISTINCT main_table.entity_id)"); $sql = $countSelect->__toString(); return $sql; diff --git a/app/code/core/Mage/Reports/Model/Mysql4/Refunded/Collection.php b/app/code/core/Mage/Reports/Model/Mysql4/Refunded/Collection.php index c058ceb57b..4f6333acd1 100644 --- a/app/code/core/Mage/Reports/Model/Mysql4/Refunded/Collection.php +++ b/app/code/core/Mage/Reports/Model/Mysql4/Refunded/Collection.php @@ -94,7 +94,7 @@ public function getSelectCountSql() $countSelect->reset(Zend_Db_Select::COLUMNS); $countSelect->reset(Zend_Db_Select::GROUP); $countSelect->reset(Zend_Db_Select::HAVING); - $countSelect->from("", "count(*)"); + $countSelect->columns("count(*)"); $sql = $countSelect->__toString(); return $sql; } diff --git a/app/code/core/Mage/Reports/Model/Mysql4/Review/Customer/Collection.php b/app/code/core/Mage/Reports/Model/Mysql4/Review/Customer/Collection.php index 1773a232d8..8c9ee0f0cd 100644 --- a/app/code/core/Mage/Reports/Model/Mysql4/Review/Customer/Collection.php +++ b/app/code/core/Mage/Reports/Model/Mysql4/Review/Customer/Collection.php @@ -67,7 +67,7 @@ public function joinCustomers() $this->getSelect()->joinInner(array('_table_customer_lastname' => $lastnameTable), '_table_customer_lastname.entity_id=detail.customer_id'.$attrCondition, array()) - ->from("", array( + ->columns(array( 'customer_name' => "CONCAT(_table_customer_firstname.{$firstnameField}, ' ', _table_customer_lastname.{$lastnameField})", 'review_cnt' => "COUNT(main_table.review_id)")) ->group('detail.customer_id'); diff --git a/app/code/core/Mage/Reports/Model/Mysql4/Tag/Customer/Collection.php b/app/code/core/Mage/Reports/Model/Mysql4/Tag/Customer/Collection.php index a3f4581ba1..4e7dab5431 100644 --- a/app/code/core/Mage/Reports/Model/Mysql4/Tag/Customer/Collection.php +++ b/app/code/core/Mage/Reports/Model/Mysql4/Tag/Customer/Collection.php @@ -38,7 +38,7 @@ class Mage_Reports_Model_Mysql4_Tag_Customer_Collection extends Mage_Tag_Model_M public function addTagedCount() { $this->getSelect() - ->from('', array('taged' => 'count(tr.tag_relation_id)')); + ->columns(array('taged' => 'count(tr.tag_relation_id)')); //->order('taged desc'); return $this; } diff --git a/app/code/core/Mage/Reports/Model/Mysql4/Tag/Product/Collection.php b/app/code/core/Mage/Reports/Model/Mysql4/Tag/Product/Collection.php index 69c8418757..a3c61e436e 100644 --- a/app/code/core/Mage/Reports/Model/Mysql4/Tag/Product/Collection.php +++ b/app/code/core/Mage/Reports/Model/Mysql4/Tag/Product/Collection.php @@ -37,7 +37,7 @@ class Mage_Reports_Model_Mysql4_Tag_Product_Collection extends Mage_Tag_Model_My public function addUniqueTagedCount() { $this->getSelect() - ->from('', array('utaged' => 'count(DISTINCT(relation.tag_id))')); + ->columns(array('utaged' => 'count(DISTINCT(relation.tag_id))')); //->order('taged desc'); return $this; } @@ -45,7 +45,7 @@ public function addUniqueTagedCount() public function addAllTagedCount() { $this->getSelect() - ->from('', array('taged' => 'count(relation.tag_id)')); + ->columns(array('taged' => 'count(relation.tag_id)')); //->order('taged desc'); return $this; } @@ -53,7 +53,7 @@ public function addAllTagedCount() public function addTagedCount() { $this->getSelect() - ->from('', array('taged' => 'count(relation.tag_relation_id)')); + ->columns(array('taged' => 'count(relation.tag_relation_id)')); //->order('taged desc'); return $this; } diff --git a/app/code/core/Mage/Reports/Model/Mysql4/Tax/Collection.php b/app/code/core/Mage/Reports/Model/Mysql4/Tax/Collection.php index 9589bf3c30..6729c82d1f 100644 --- a/app/code/core/Mage/Reports/Model/Mysql4/Tax/Collection.php +++ b/app/code/core/Mage/Reports/Model/Mysql4/Tax/Collection.php @@ -60,7 +60,7 @@ public function setStoreIds($storeIds) if (count($storeIds) >= 1 && $vals[0] != '') { $this->getSelect() ->where('e.store_id in (?)', (array)$storeIds) - ->from('', array('tax'=>'SUM(tax_table.base_real_amount)')); + ->columns(array('tax'=>'SUM(tax_table.base_real_amount)')); } else { $this->addExpressionAttributeToSelect( 'tax', @@ -80,7 +80,7 @@ public function getSelectCountSql() $countSelect->reset(Zend_Db_Select::COLUMNS); $countSelect->reset(Zend_Db_Select::GROUP); $countSelect->reset(Zend_Db_Select::HAVING); - $countSelect->from("", "count(DISTINCT e.entity_id)"); + $countSelect->columns("count(DISTINCT e.entity_id)"); $sql = $countSelect->__toString(); return $sql; } diff --git a/app/code/core/Mage/Reports/etc/config.xml b/app/code/core/Mage/Reports/etc/config.xml index 46fd9c4cf5..e8fc96ebb1 100644 --- a/app/code/core/Mage/Reports/etc/config.xml +++ b/app/code/core/Mage/Reports/etc/config.xml @@ -28,7 +28,7 @@ - 0.7.9 + 0.7.10 diff --git a/app/code/core/Mage/Reports/sql/reports_setup/mysql4-upgrade-0.7.9-0.7.10.php b/app/code/core/Mage/Reports/sql/reports_setup/mysql4-upgrade-0.7.9-0.7.10.php new file mode 100644 index 0000000000..57d020744f --- /dev/null +++ b/app/code/core/Mage/Reports/sql/reports_setup/mysql4-upgrade-0.7.9-0.7.10.php @@ -0,0 +1,34 @@ +startSetup(); +$installer->getConnection()->modifyColumn($installer->getTable('reports/compared_product_index'), 'visitor_id', + 'INT(10) UNSIGNED NULL'); +$installer->endSetup(); diff --git a/app/code/core/Mage/Review/Model/Mysql4/Review.php b/app/code/core/Mage/Review/Model/Mysql4/Review.php index 9d2a59f397..cad5196a75 100644 --- a/app/code/core/Mage/Review/Model/Mysql4/Review.php +++ b/app/code/core/Mage/Review/Model/Mysql4/Review.php @@ -312,4 +312,38 @@ public function reAggregateReview($reviewId, $entityPkValue) { $this->_aggregateRatings($this->_loadVotedRatingIds($reviewId), $entityPkValue); } + + /** + * Get review entity type id by code + * + * @param string $entityCode + * @return int|bool + */ + public function getEntityIdByCode($entityCode) + { + $select = $this->_getReadAdapter()->select() + ->from($this->_reviewEntityTable, array('entity_id')) + ->where('entity_code = ?', $entityCode); + return $this->_getReadAdapter()->fetchOne($select); + } + + /** + * Delete reviews by product id. + * Better to call this method in transaction, because operation performed on two separated tables + * + * @param int $productId + * @return Mage_Review_Model_Mysql4_Review + */ + public function deleteReviewsByProductId($productId) + { + $this->_getWriteAdapter()->delete($this->_reviewTable, array( + 'entity_pk_value=?' => $productId, + 'entity_id=?' => $this->getEntityIdByCode(Mage_Review_Model_Review::ENTITY_PRODUCT_CODE) + )); + $this->_getWriteAdapter()->delete($this->getTable('review/review_aggregate'), array( + 'entity_pk_value=?' => $productId, + 'entity_type=?' => $this->getEntityIdByCode(Mage_Review_Model_Review::ENTITY_PRODUCT_CODE) + )); + return $this; + } } diff --git a/app/code/core/Mage/Review/Model/Mysql4/Review/Comment.php b/app/code/core/Mage/Review/Model/Mysql4/Review/Comment.php deleted file mode 100644 index 0fb78bdc11..0000000000 --- a/app/code/core/Mage/Review/Model/Mysql4/Review/Comment.php +++ /dev/null @@ -1,25 +0,0 @@ -reset(Zend_Db_Select::LIMIT_COUNT); $idsSelect->reset(Zend_Db_Select::LIMIT_OFFSET); $idsSelect->reset(Zend_Db_Select::COLUMNS); - $idsSelect->from(null, 'rt.review_id'); + $idsSelect->columns('rt.review_id'); return $this->getConnection()->fetchCol($idsSelect); } diff --git a/app/code/core/Mage/Review/Model/Observer.php b/app/code/core/Mage/Review/Model/Observer.php index e6b9f335e3..8f95dfd5eb 100644 --- a/app/code/core/Mage/Review/Model/Observer.php +++ b/app/code/core/Mage/Review/Model/Observer.php @@ -48,4 +48,19 @@ public function tagProductCollectionLoadAfter(Varien_Event_Observer $observer) return $this; } + + /** + * Cleanup product reviews after product delete + * + * @param Varien_Event_Observer $observer + * @return Mage_CatalogIndex_Model_Observer + */ + public function processProductAfterDeleteEvent(Varien_Event_Observer $observer) + { + $eventProduct = $observer->getEvent()->getProduct(); + if ($eventProduct && $eventProduct->getId()) { + Mage::getResourceSingleton('review/review')->deleteReviewsByProductId($eventProduct->getId()); + } + return $this; + } } diff --git a/app/code/core/Mage/Review/Model/Review.php b/app/code/core/Mage/Review/Model/Review.php index f1eb7928f5..5ef3ea954f 100644 --- a/app/code/core/Mage/Review/Model/Review.php +++ b/app/code/core/Mage/Review/Model/Review.php @@ -41,8 +41,20 @@ class Mage_Review_Model_Review extends Mage_Core_Model_Abstract */ protected $_eventPrefix = 'review'; + /** + * @deprecated after 1.3.2.4 + * + */ const ENTITY_PRODUCT = 1; + /** + * Review entity codes + * + */ + const ENTITY_PRODUCT_CODE = 'product'; + const ENTITY_CUSTOMER_CODE = 'customer'; + const ENTITY_CATEGORY_CODE = 'category'; + const STATUS_APPROVED = 1; const STATUS_PENDING = 2; const STATUS_NOT_APPROVED = 3; @@ -181,4 +193,15 @@ public function isAvailableOnStore($store = null) return false; } + + /** + * Get review entity type id by code + * + * @param string $entityCode + * @return int|bool + */ + public function getEntityIdByCode($entityCode) + { + return $this->getResource()->getEntityIdByCode($entityCode); + } } diff --git a/app/code/core/Mage/Review/Model/Review/Comment.php b/app/code/core/Mage/Review/Model/Review/Comment.php deleted file mode 100644 index 0fb78bdc11..0000000000 --- a/app/code/core/Mage/Review/Model/Review/Comment.php +++ /dev/null @@ -1,25 +0,0 @@ -validate(); if ($validate === true) { try { - $review->setEntityId(Mage_Review_Model_Review::ENTITY_PRODUCT) + $review->setEntityId($review->getEntityIdByCode(Mage_Review_Model_Review::ENTITY_PRODUCT_CODE)) ->setEntityPkValue($product->getId()) ->setStatusId(Mage_Review_Model_Review::STATUS_PENDING) ->setCustomerId(Mage::getSingleton('customer/session')->getCustomerId()) diff --git a/app/code/core/Mage/Review/etc/config.xml b/app/code/core/Mage/Review/etc/config.xml index 06ebd4f66d..8157249837 100644 --- a/app/code/core/Mage/Review/etc/config.xml +++ b/app/code/core/Mage/Review/etc/config.xml @@ -28,7 +28,7 @@ - 0.7.5 + 0.7.6 @@ -84,6 +84,16 @@ + + + + + review/observer + processProductAfterDeleteEvent + + + + diff --git a/app/code/core/Mage/Review/sql/review_setup/mysql4-upgrade-0.7.5-0.7.6.php b/app/code/core/Mage/Review/sql/review_setup/mysql4-upgrade-0.7.5-0.7.6.php new file mode 100644 index 0000000000..42f1091df1 --- /dev/null +++ b/app/code/core/Mage/Review/sql/review_setup/mysql4-upgrade-0.7.5-0.7.6.php @@ -0,0 +1,32 @@ +startSetup(); +$installer->getConnection()->dropForeignKey($this->getTable('review'), 'FK_REVIEW_PARENT_PRODUCT'); +$installer->endSetup(); diff --git a/app/code/core/Mage/Rss/Block/Catalog/Abstract.php b/app/code/core/Mage/Rss/Block/Catalog/Abstract.php new file mode 100644 index 0000000000..82e72eb098 --- /dev/null +++ b/app/code/core/Mage/Rss/Block/Catalog/Abstract.php @@ -0,0 +1,124 @@ +_priceBlock[$productTypeId])) { + $block = $this->_priceBlockDefaultType; + if (isset($this->_priceBlockTypes[$productTypeId])) { + if ($this->_priceBlockTypes[$productTypeId]['block'] != '') { + $block = $this->_priceBlockTypes[$productTypeId]['block']; + } + } + $this->_priceBlock[$productTypeId] = $this->getLayout()->createBlock($block); + } + return $this->_priceBlock[$productTypeId]; + } + + /** + * Return template for Price Block renderer + * + * @param string $productTypeId Catalog Product type + * @return string + */ + protected function _getPriceBlockTemplate($productTypeId) + { + if (isset($this->_priceBlockTypes[$productTypeId])) { + if ($this->_priceBlockTypes[$productTypeId]['template'] != '') { + return $this->_priceBlockTypes[$productTypeId]['template']; + } + } + return $this->_priceBlockDefaultTemplate; + } + + /** + * Returns product price html for RSS feed + * + * @param Mage_Catalog_Model_Product $product + * @param bool $displayMinimalPrice Display "As low as" etc. + * @param string $idSuffix Suffix for HTML containers + * @return string + */ + public function getPriceHtml($product, $displayMinimalPrice = false, $idSuffix='') + { + return $this->_getPriceBlock($product->getTypeId()) + ->setTemplate($this->_getPriceBlockTemplate($product->getTypeId())) + ->setProduct($product) + ->setDisplayMinimalPrice($displayMinimalPrice) + ->setIdSuffix($idSuffix) + ->setUseLinkForAsLowAs($this->_useLinkForAsLowAs) + ->toHtml(); + } + + /** + * Adding customized price template for product type, used as action in layouts + * + * @param string $type Catalog Product Type + * @param string $block Block Type + * @param string $template Template + */ + public function addPriceBlockType($type, $block = '', $template = '') + { + if ($type) { + $this->_priceBlockTypes[$type] = array( + 'block' => $block, + 'template' => $template + ); + } + } +} diff --git a/app/code/core/Mage/Rss/Block/Catalog/Category.php b/app/code/core/Mage/Rss/Block/Catalog/Category.php index b078b5da3c..0054a79de2 100644 --- a/app/code/core/Mage/Rss/Block/Catalog/Category.php +++ b/app/code/core/Mage/Rss/Block/Catalog/Category.php @@ -31,7 +31,7 @@ * @package Mage_Rss * @author Magento Core Team */ -class Mage_Rss_Block_Catalog_Category extends Mage_Rss_Block_Abstract +class Mage_Rss_Block_Catalog_Category extends Mage_Rss_Block_Catalog_Abstract { protected function _construct() { @@ -113,6 +113,7 @@ public function addNewItemXmlCallback($args) { $product = $args['product']; $product->setAllowedInRss(true); + $product->setAllowedPriceInRss(true); Mage::dispatchEvent('rss_catalog_category_xml_callback', $args); @@ -121,17 +122,13 @@ public function addNewItemXmlCallback($args) } $description = '' - . '' - . '' + . '
' . $product->getDescription(); + . '' . $product->getDescription(); if ($product->getAllowedPriceInRss()) { - $description .= '

Price:'.Mage::helper('core')->currency($product->getPrice()); - if ($product->getPrice() != $product->getFinalPrice()) { - $description .= ' Special Price:' . Mage::helper('core')->currency($product->getFinalPrice()); - } - $description .= '

'; + $description.= $this->getPriceHtml($product,true); } $description .= '
'; diff --git a/app/code/core/Mage/Rss/Block/Catalog/New.php b/app/code/core/Mage/Rss/Block/Catalog/New.php index 0525e32ea9..6f9e477716 100644 --- a/app/code/core/Mage/Rss/Block/Catalog/New.php +++ b/app/code/core/Mage/Rss/Block/Catalog/New.php @@ -31,7 +31,7 @@ * @package Mage_Rss * @author Magento Core Team */ -class Mage_Rss_Block_Catalog_New extends Mage_Rss_Block_Abstract +class Mage_Rss_Block_Catalog_New extends Mage_Rss_Block_Catalog_Abstract { protected function _construct() { @@ -116,11 +116,7 @@ public function addNewItemXmlCallback($args) ''.$product->getDescription(); if ($allowedPriceInRss) { - $description .= '

Price:' . Mage::helper('core')->currency($product->getPrice()); - if ($product->getPrice() != $product->getFinalPrice()){ - $description .= ' Special Price:' . Mage::helper('core')->currency($product->getFinalPrice()); - } - $description .= '

'; + $description .= $this->getPriceHtml($product,true); } $description .= ''. diff --git a/app/code/core/Mage/Rss/Block/Catalog/NotifyStock.php b/app/code/core/Mage/Rss/Block/Catalog/NotifyStock.php index 214f091918..c4b081f39b 100644 --- a/app/code/core/Mage/Rss/Block/Catalog/NotifyStock.php +++ b/app/code/core/Mage/Rss/Block/Catalog/NotifyStock.php @@ -78,6 +78,8 @@ protected function _toHtml() ; $_globalNotifyStockQty = (float) Mage::getStoreConfig(Mage_CatalogInventory_Model_Stock_Item::XML_PATH_NOTIFY_STOCK_QTY); + Mage::dispatchEvent('rss_catalog_notify_stock_collection_select', array('collection' => $collection)); + /* using resource iterator to load the data one by one instead of loading all at the same time. loading all data at the same time can cause the big memory allocation. diff --git a/app/code/core/Mage/Rss/Block/Catalog/Review.php b/app/code/core/Mage/Rss/Block/Catalog/Review.php index 1f56dc2a76..279fd2c89b 100644 --- a/app/code/core/Mage/Rss/Block/Catalog/Review.php +++ b/app/code/core/Mage/Rss/Block/Catalog/Review.php @@ -71,7 +71,9 @@ protected function _toHtml() ->addAttributeToSelect('name', 'inner') ->setDateOrder(); - Mage::getSingleton('core/resource_iterator') + Mage::dispatchEvent('rss_catalog_review_collection_select', array('collection' => $collection)); + + Mage::getSingleton('core/resource_iterator') ->walk($collection->getSelect(), array(array($this, 'addReviewItemXmlCallback')), array('rssObj'=> $rssObj, 'reviewModel'=> $reviewModel)); return $rssObj->createRssXml(); } @@ -82,9 +84,11 @@ public function addReviewItemXmlCallback($args) $reviewModel = $args['reviewModel']; $row = $args['row']; - $productUrl = Mage::getUrl('catalog/product/view',array('id'=>$row['entity_id'])); - $reviewUrl = Mage::helper('adminhtml')->getUrl('adminhtml/catalog_product_review/edit/', array('id'=>$row['review_id'],'_secure' => true,'_nosecret' => true)); - $storeName = Mage::app()->getStore($row['store_id'])->getName(); + $store = Mage::app()->getStore($row['store_id']); + $urlModel = Mage::getModel('core/url')->setStore($store); + $productUrl = $urlModel->getUrl('catalog/product/view', array('id'=>$row['entity_id'])); + $reviewUrl = Mage::helper('adminhtml')->getUrl('adminhtml/catalog_product_review/edit/', array('id'=>$row['review_id'], '_secure' => true, '_nosecret'=>true)); + $storeName = $store->getName(); $description = '

'. $this->__('Product: %s
',$productUrl,$row['name']). diff --git a/app/code/core/Mage/Rss/Block/Catalog/Special.php b/app/code/core/Mage/Rss/Block/Catalog/Special.php index 2723f9eab2..e9b5bce08b 100644 --- a/app/code/core/Mage/Rss/Block/Catalog/Special.php +++ b/app/code/core/Mage/Rss/Block/Catalog/Special.php @@ -159,7 +159,7 @@ public function addSpecialXmlCallback($args) if ($product->getAllowedPriceInRss()) { $specialPrice = $row['special_price']; - $rule_price = $row['rule_price']; + $rulePrice = $row['rule_price']; if (!$rulePrice || ($rulePrice && $specialPrice && $specialPrice<=$rulePrice)) { $row['start_date'] = $row['special_from_date']; $row['use_special'] = true; diff --git a/app/code/core/Mage/Rss/Block/Catalog/Tag.php b/app/code/core/Mage/Rss/Block/Catalog/Tag.php index da63bb86c8..a6eb69076e 100644 --- a/app/code/core/Mage/Rss/Block/Catalog/Tag.php +++ b/app/code/core/Mage/Rss/Block/Catalog/Tag.php @@ -31,7 +31,7 @@ * @package Mage_Rss * @author Magento Core Team */ -class Mage_Rss_Block_Catalog_Tag extends Mage_Rss_Block_Abstract +class Mage_Rss_Block_Catalog_Tag extends Mage_Rss_Block_Catalog_Abstract { protected function _construct() { @@ -99,7 +99,7 @@ public function addTaggedItemXml($args) ''.$product->getDescription(); if ($allowedPriceInRss) { - $description .= '

Price:'.Mage::helper('core')->currency($product->getFinalPrice()).'

'; + $description .= $this->getPriceHtml($product,true); } $description .=''; diff --git a/app/code/core/Mage/Rss/controllers/CatalogController.php b/app/code/core/Mage/Rss/controllers/CatalogController.php index fa90c9e8a4..22bca32cdb 100644 --- a/app/code/core/Mage/Rss/controllers/CatalogController.php +++ b/app/code/core/Mage/Rss/controllers/CatalogController.php @@ -91,7 +91,6 @@ public function tagAction() public function notifystockAction() { - Mage::helper('rss')->authAdmin('catalog/products'); $this->getResponse()->setHeader('Content-type', 'text/xml; charset=UTF-8'); $this->loadLayout(false); $this->renderLayout(); @@ -99,7 +98,6 @@ public function notifystockAction() public function reviewAction() { - Mage::helper('rss')->authAdmin('catalog/reviews_ratings'); $this->getResponse()->setHeader('Content-type', 'text/xml; charset=UTF-8'); $this->loadLayout(false); $this->renderLayout(); @@ -112,4 +110,22 @@ public function categoryAction() $this->renderLayout(); } } + + /** + * Controller predispatch method to change area for some specific action. + * + * @return Mage_Rss_CatalogController + */ + public function preDispatch() + { + if ($this->getRequest()->getActionName() == 'notifystock') { + $this->_currentArea = 'adminhtml'; + Mage::helper('rss')->authAdmin('catalog/products'); + } + if ($this->getRequest()->getActionName() == 'review') { + $this->_currentArea = 'adminhtml'; + Mage::helper('rss')->authAdmin('catalog/reviews_ratings'); + } + return parent::preDispatch(); + } } diff --git a/app/code/core/Mage/Rss/controllers/OrderController.php b/app/code/core/Mage/Rss/controllers/OrderController.php index 21ab799c01..49f116b4aa 100644 --- a/app/code/core/Mage/Rss/controllers/OrderController.php +++ b/app/code/core/Mage/Rss/controllers/OrderController.php @@ -81,6 +81,6 @@ public function preDispatch() $this->_currentArea = 'adminhtml'; Mage::helper('rss')->authAdmin('sales/order'); } - parent::preDispatch(); + return parent::preDispatch(); } } diff --git a/app/code/core/Mage/Sales/Block/Order/Totals.php b/app/code/core/Mage/Sales/Block/Order/Totals.php index 5ecf86b1de..ae62bc8a36 100644 --- a/app/code/core/Mage/Sales/Block/Order/Totals.php +++ b/app/code/core/Mage/Sales/Block/Order/Totals.php @@ -94,17 +94,20 @@ public function getSource() */ protected function _initTotals() { + $source = $this->getSource(); + $this->_totals = array(); $this->_totals['subtotal'] = new Varien_Object(array( 'code' => 'subtotal', - 'value' => $this->getSource()->getSubtotal(), + 'value' => $source->getSubtotal(), 'label' => $this->__('Subtotal') )); + /** * Add shipping */ - if (!$this->getSource()->getIsVirtual() && ((float) $this->getSource()->getShippingAmount() || $this->getSource()->getShippingDescription())) + if (!$source->getIsVirtual() && ((float) $source->getShippingAmount() || $source->getShippingDescription())) { $this->_totals['shipping'] = new Varien_Object(array( 'code' => 'shipping', @@ -119,14 +122,14 @@ protected function _initTotals() */ if (((float)$this->getSource()->getDiscountAmount()) != 0) { if ($this->getSource()->getDiscountDescription()) { - $discountLabel = $this->__('Discount (%s)', $this->getSource()->getDiscountDescription()); + $discountLabel = $this->__('Discount (%s)', $source->getDiscountDescription()); } else { $discountLabel = $this->__('Discount'); } $this->_totals['discount'] = new Varien_Object(array( 'code' => 'discount', 'field' => 'discount_amount', - 'value' => $this->getSource()->getDiscountAmount(), + 'value' => $source->getDiscountAmount(), 'label' => $discountLabel )); } @@ -135,7 +138,7 @@ protected function _initTotals() 'code' => 'grand_total', 'field' => 'grand_total', 'strong'=> true, - 'value' => $this->getSource()->getGrandTotal(), + 'value' => $source->getGrandTotal(), 'label' => $this->__('Grand Total') )); @@ -145,7 +148,7 @@ protected function _initTotals() if ($this->getOrder()->isCurrencyDifferent()) { $this->_totals['base_grandtotal'] = new Varien_Object(array( 'code' => 'base_grandtotal', - 'value' => $this->getOrder()->formatBasePrice($this->getSource()->getBaseGrandTotal()), + 'value' => $this->getOrder()->formatBasePrice($source->getBaseGrandTotal()), 'label' => $this->__('Grand Total to be charged'), 'is_formated' => true, )); @@ -201,16 +204,21 @@ public function addTotal(Varien_Object $total, $after=null) public function addTotalBefore(Varien_Object $total, $before=null) { if ($before !== null) { - if (isset($this->_totals[$before])) { - $totals = array(); - foreach ($this->_totals as $code => $item) { - if ($code == $before) { - $totals[$total->getCode()] = $total; + if (!is_array($before)) { + $before = array($before); + } + foreach ($before as $beforeTotals) { + if (isset($this->_totals[$beforeTotals])) { + $totals = array(); + foreach ($this->_totals as $code => $item) { + if ($code == $beforeTotals) { + $totals[$total->getCode()] = $total; + } + $totals[$code] = $item; } - $totals[$code] = $item; + $this->_totals = $totals; + return $this; } - $this->_totals = $totals; - return $this; } } $totals = array(); diff --git a/app/code/core/Mage/Sales/Block/Reorder/Sidebar.php b/app/code/core/Mage/Sales/Block/Reorder/Sidebar.php index 7d50b624cb..4dce8b3e8c 100644 --- a/app/code/core/Mage/Sales/Block/Reorder/Sidebar.php +++ b/app/code/core/Mage/Sales/Block/Reorder/Sidebar.php @@ -53,6 +53,17 @@ public function __construct() } } + /** + * Check item product availability for reorder + * + * @param Mage_Sales_Model_Order_Item $orderItem + * @return boolean + */ + public function isItemAvailableForReorder(Mage_Sales_Model_Order_Item $orderItem) + { + return $orderItem->getProduct()->getStockItem()->getIsInStock(); + } + /** * Retrieve form action url and set "secure" param to avoid confirm * message when we submit form from secure page to unsecure @@ -64,6 +75,11 @@ public function getFormActionUrl() return $this->getUrl('checkout/cart/addgroup', array('_secure' => true)); } + /** + * Last order getter + * + * @return Mage_Sales_Model_Order | false + */ public function getLastOrder() { foreach ($this->getOrders() as $order) { diff --git a/app/code/core/Mage/Sales/Model/Convert/Order.php b/app/code/core/Mage/Sales/Model/Convert/Order.php index c1f22a9a95..c84b1c64e8 100644 --- a/app/code/core/Mage/Sales/Model/Convert/Order.php +++ b/app/code/core/Mage/Sales/Model/Convert/Order.php @@ -27,8 +27,8 @@ /** * Order data convert model * - * @category Mage - * @package Mage_Sales + * @category Mage + * @package Mage_Sales * @author Magento Core Team */ class Mage_Sales_Model_Convert_Order extends Varien_Object @@ -45,52 +45,11 @@ public function toQuote(Mage_Sales_Model_Order $order, $quote=null) $quote = Mage::getModel('sales/quote'); } - $quote - /** - * Base Data - */ - ->setStoreId($order->getStoreId()) + $quote->setStoreId($order->getStoreId()) ->setOrderId($order->getId()); Mage::helper('core')->copyFieldset('sales_convert_order', 'to_quote', $order, $quote); -// /** -// * Customer data -// */ -// ->setCustomerId($order->getCustomerId()) -// ->setCustomerEmail($order->getCustomerEmail()) -// ->setCustomerGroupId($order->getCustomerGroupId()) -// ->setCustomerTaxClassId($order->getCustomerTaxClassId()) -// /** -// * Not use note from previos order -// */ -// //->setCustomerNote($order->getCustomerNote()) -// //->setCustomerNoteNotify($order->getCustomerNoteNotify()) -// ->setCustomerIsGuest($order->getCustomerIsGuest()) -// -// /** -// * Currency data -// */ -// ->setBaseCurrencyCode($order->getBaseCurrencyCode()) -// ->setStoreCurrencyCode($order->getStoreCurrencyCode()) -// ->setQuoteCurrencyCode($order->getOrderCurrencyCode()) -// ->setStoreToBaseRate($order->getStoreToBaseRate()) -// ->setStoreToQuoteRate($order->getStoreToOrderRate()) -// -// /** -// * Totals data -// */ -// ->setGrandTotal($order->getGrandTotal()) -// ->setBaseGrandTotal($order->getBaseGrandTotal()) -// -// /** -// * Another data -// */ -// ->setCouponCode($order->getCouponCode()) -// ->setAppliedRuleIds($order->getAppliedRuleIds()); -// //->collectTotals(); -// - Mage::dispatchEvent('sales_convert_order_to_quote', array('order'=>$order, 'quote'=>$quote)); return $quote; } @@ -106,24 +65,6 @@ public function toQuoteShippingAddress(Mage_Sales_Model_Order $order) $address = $this->addressToQuoteAddress($order->getShippingAddress()); Mage::helper('core')->copyFieldset('sales_convert_order', 'to_quote_address', $order, $address); -// $address->setWeight($order->getWeight()) -// ->setShippingMethod($order->getShippingMethod()) -// ->setShippingDescription($order->getShippingDescription()) -// ->setShippingRate($order->getShippingRate()) -// -// ->setSubtotal($order->getSubtotal()) -// ->setTaxAmount($order->getTaxAmount()) -// ->setDiscountAmount($order->getDiscountAmount()) -// ->setShippingAmount($order->getShippingAmount()) -// ->setCustbalanceAmount($order->getCustbalanceAmount()) -// ->setGrandTotal($order->getGrandTotal()) -// -// ->setBaseSubtotal($order->getBaseSubtotal()) -// ->setBaseTaxAmount($order->getBaseTaxAmount()) -// ->setBaseDiscountAmount($order->getBaseDiscountAmount()) -// ->setBaseShippingAmount($order->getBaseShippingAmount()) -// ->setBaseCustbalanceAmount($order->getBaseCustbalanceAmount()) -// ->setBaseGrandTotal($order->getBaseGrandTotal()); return $address; } @@ -142,20 +83,6 @@ public function addressToQuoteAddress(Mage_Sales_Model_Order_Address $address) ->setCustomerAddressId($address->getCustomerAddressId()); Mage::helper('core')->copyFieldset('sales_convert_order_address', 'to_quote_address', $address, $quoteAddress); -// ->setPrefix($address->getPrefix()) -// ->setFirstname($address->getFirstname()) -// ->setMiddlename($address->getMiddlename()) -// ->setLastname($address->getLastname()) -// ->setSuffix($address->setSuffix()) -// ->setCompany($address->getCompany()) -// ->setStreet($address->getStreet(-1)) -// ->setCity($address->getCity()) -// ->setRegion($address->getRegion()) -// ->setRegionId($address->getRegionId()) -// ->setPostcode($address->getPostcode()) -// ->setCountryId($address->getCountryId()) -// ->setTelephone($address->getTelephone()) -// ->setFax($address->getFax()); return $quoteAddress; } @@ -175,21 +102,6 @@ public function paymentToQuotePayment(Mage_Sales_Model_Order_Payment $payment, $ ->setCustomerPaymentId($payment->getCustomerPaymentId()); Mage::helper('core')->copyFieldset('sales_convert_order_payment', 'to_quote_payment', $payment, $quotePayment); -// ->setMethod($payment->getMethod()) -// ->setAdditionalData($payment->getAdditionalData()) -// ->setPoNumber($payment->getPoNumber()) -// ->setCcType($payment->getCcType()) -// ->setCcNumberEnc($payment->getCcNumberEnc()) -// ->setCcLast4($payment->getCcLast4()) -// ->setCcOwner($payment->getCcOwner()) -// ->setCcCidEnc($payment->getCcCidEnc()) -// ->setCcExpMonth($payment->getCcExpMonth()) -// ->setCcExpYear($payment->getCcExpYear()) -// -// ->setCcSsIssue($payment->getCcSsIssue()) //for direct payment -// ->setCcSsStartMonth($payment->getCcSsStartMonth()) //for direct payment -// ->setCcSsStartYear($payment->getCcSsStartYear()) //for direct payment -// ; return $quotePayment; } @@ -208,24 +120,6 @@ public function itemToQuoteItem(Mage_Sales_Model_Order_Item $item) ->setParentProductId($item->getParentProductId()); Mage::helper('core')->copyFieldset('sales_convert_order_item', 'to_quote_item', $item, $quoteItem); -// ->setSku($item->getSku()) -// ->setName($item->getName()) -// ->setDescription($item->getDescription()) -// ->setWeight($item->getWeight()) -// ->setCustomPrice($item->getPrice()) -// ->setDiscountPercent($item->getDiscountPercent()) -// ->setDiscountAmount($item->getDiscountAmount()) -// ->setTaxPercent($item->getTaxPercent()) -// ->setTaxAmount($item->getTaxAmount()) -// ->setRowWeight($item->getRowWeight()) -// ->setRowTotal($item->getRowTotal()) -// ->setAppliedRuleIds($item->getAppliedRuleIds()) -// -// ->setBaseDiscountAmount($item->getBaseDiscountAmount()) -// ->setBaseTaxAmount($item->getBaseTaxAmount()) -// ->setBaseRowTotal($item->getBaseRowTotal()) -// ; - return $quoteItem; } @@ -245,12 +139,6 @@ public function toInvoice(Mage_Sales_Model_Order $order) ->setShippingAddressId($order->getShippingAddressId()); Mage::helper('core')->copyFieldset('sales_convert_order', 'to_invoice', $order, $invoice); -// ->setBaseCurrencyCode($order->getBaseCurrencyCode()) -// ->setStoreCurrencyCode($order->getStoreCurrencyCode()) -// ->setOrderCurrencyCode($order->getOrderCurrencyCode()) -// ->setStoreToBaseRate($order->getStoreToBaseRate()) -// ->setStoreToOrderRate($order->getStoreToOrderRate()); - return $invoice; } @@ -267,13 +155,6 @@ public function itemToInvoiceItem(Mage_Sales_Model_Order_Item $item) ->setProductId($item->getProductId()); Mage::helper('core')->copyFieldset('sales_convert_order_item', 'to_invoice_item', $item, $invoiceItem); -// ->setName($item->getName()) -// ->setSku($item->getSku()) -// ->setDescription($item->getDescription()) -// ->setPrice($item->getPrice()) -// ->setBasePrice($item->getBasePrice()) -// ->setCost($item->getCost()); - return $invoiceItem; } @@ -293,12 +174,6 @@ public function toShipment(Mage_Sales_Model_Order $order) ->setShippingAddressId($order->getShippingAddressId()); Mage::helper('core')->copyFieldset('sales_convert_order', 'to_shipment', $order, $shipment); -// ->setBaseCurrencyCode($order->getBaseCurrencyCode()) -// ->setStoreCurrencyCode($order->getStoreCurrencyCode()) -// ->setOrderCurrencyCode($order->getOrderCurrencyCode()) -// ->setStoreToBaseRate($order->getStoreToBaseRate()) -// ->setStoreToOrderRate($order->getStoreToOrderRate()); - return $shipment; } @@ -315,13 +190,6 @@ public function itemToShipmentItem(Mage_Sales_Model_Order_Item $item) ->setProductId($item->getProductId()); Mage::helper('core')->copyFieldset('sales_convert_order_item', 'to_shipment_item', $item, $shipmentItem); -// ->setName($item->getName()) -// ->setSku($item->getSku()) -// ->setDescription($item->getDescription()) -// ->setPrice($item->getPrice()) -// ->setBasePrice($item->getBasePrice()) -// ->setWeight($item->getWeight()); - return $shipmentItem; } @@ -341,12 +209,6 @@ public function toCreditmemo(Mage_Sales_Model_Order $order) ->setShippingAddressId($order->getShippingAddressId()); Mage::helper('core')->copyFieldset('sales_convert_order', 'to_cm', $order, $creditmemo); -// ->setBaseCurrencyCode($order->getBaseCurrencyCode()) -// ->setStoreCurrencyCode($order->getStoreCurrencyCode()) -// ->setOrderCurrencyCode($order->getOrderCurrencyCode()) -// ->setStoreToBaseRate($order->getStoreToBaseRate()) -// ->setStoreToOrderRate($order->getStoreToOrderRate()); - return $creditmemo; } @@ -363,13 +225,6 @@ public function itemToCreditmemoItem(Mage_Sales_Model_Order_Item $item) ->setProductId($item->getProductId()); Mage::helper('core')->copyFieldset('sales_convert_order_item', 'to_cm_item', $item, $creditmemoItem); -// ->setName($item->getName()) -// ->setSku($item->getSku()) -// ->setDescription($item->getDescription()) -// ->setPrice($item->getPrice()) -// ->setBasePrice($item->getBasePrice()) -// ->setCost($item->getCost()); - return $creditmemoItem; } } diff --git a/app/code/core/Mage/Sales/Model/Convert/Quote.php b/app/code/core/Mage/Sales/Model/Convert/Quote.php index 38ede9c523..6d0956dd0f 100644 --- a/app/code/core/Mage/Sales/Model/Convert/Quote.php +++ b/app/code/core/Mage/Sales/Model/Convert/Quote.php @@ -25,13 +25,10 @@ */ /** - * Order data convert model + * Quote data convert model * - * EVENTS - * - * - * @category Mage - * @package Mage_Sales + * @category Mage + * @package Mage_Sales * @author Magento Core Team */ class Mage_Sales_Model_Convert_Quote extends Varien_Object @@ -50,57 +47,12 @@ public function toOrder(Mage_Sales_Model_Quote $quote, $order=null) } /* @var $order Mage_Sales_Model_Order */ - $order - /** - * Base Data - */ - ->setIncrementId($quote->getReservedOrderId()) + $order->setIncrementId($quote->getReservedOrderId()) ->setStoreId($quote->getStoreId()) - ->setQuoteId($quote->getId()); + ->setQuoteId($quote->getId()) + ->setCustomer($quote->getCustomer()); Mage::helper('core')->copyFieldset('sales_convert_quote', 'to_order', $quote, $order); - - if (!$quote->getCustomerId()) { - $order->setCustomerId(null); - } -// -// ->setRemoteIp($quote->getRemoteIp()) -// -// /** -// * Customer data -// */ -// ->setCustomerId($quote->getCustomerId()) -// ->setCustomerEmail($quote->getCustomerEmail()) -// ->setCustomerPrefix($quote->getCustomerPrefix()) -// ->setCustomerFirstname($quote->getCustomerFirstname()) -// ->setCustomerMiddlename($quote->getCustomerMiddlename()) -// ->setCustomerLastname($quote->getCustomerLastname()) -// ->setCustomerSuffix($quote->getCustomerSuffix()) -// ->setCustomerGroupId($quote->getCustomerGroupId()) -// ->setCustomerTaxClassId($quote->getCustomerTaxClassId()) -// ->setCustomerNote($quote->getCustomerNote()) -// ->setCustomerNoteNotify($quote->getCustomerNoteNotify()) -// ->setCustomerIsGuest($quote->getCustomerIsGuest()) -// ->setCustomerDob($quote->getCustomerDob()) -// -// /** -// * Currency data -// */ -// ->setBaseCurrencyCode($quote->getBaseCurrencyCode()) -// ->setStoreCurrencyCode($quote->getStoreCurrencyCode()) -// ->setOrderCurrencyCode($quote->getQuoteCurrencyCode()) -// ->setStoreToBaseRate($quote->getStoreToBaseRate()) -// ->setStoreToOrderRate($quote->getStoreToQuoteRate()) -// -// /** -// * Another data -// */ -// ->setCouponCode($quote->getCouponCode()) -// ->setIsVirtual($quote->getIsVirtual()) -// ->setIsMultiPayment($quote->getIsMultiPayment()) -// ->setAppliedRuleIds($quote->getAppliedRuleIds()); - - Mage::dispatchEvent('sales_convert_quote_to_order', array('order'=>$order, 'quote'=>$quote)); return $order; } @@ -119,28 +71,6 @@ public function addressToOrder(Mage_Sales_Model_Quote_Address $address, $order=n Mage::helper('core')->copyFieldset('sales_convert_quote_address', 'to_order', $address, $order); -// $order -// ->setWeight($address->getWeight()) -// ->setShippingMethod($address->getShippingMethod()) -// ->setShippingDescription($address->getShippingDescription()) -// ->setShippingRate($address->getShippingRate()) -// -// ->setSubtotal($address->getSubtotal()) -// ->setTaxAmount($address->getTaxAmount()) -// ->setDiscountAmount($address->getDiscountAmount()) -// ->setShippingAmount($address->getShippingAmount()) -// ->setShippingTaxAmount($address->getShippingTaxAmount()) -// ->setCustbalanceAmount($address->getCustbalanceAmount()) -// ->setGrandTotal($address->getGrandTotal()) -// -// ->setBaseSubtotal($address->getBaseSubtotal()) -// ->setBaseTaxAmount($address->getBaseTaxAmount()) -// ->setBaseDiscountAmount($address->getBaseDiscountAmount()) -// ->setBaseShippingAmount($address->getBaseShippingAmount()) -// ->setBaseShippingTaxAmount($address->getBaseShippingTaxAmount()) -// ->setBaseCustbalanceAmount($address->getBaseCustbalanceAmount()) -// ->setBaseGrandTotal($address->getBaseGrandTotal()); - Mage::dispatchEvent('sales_convert_quote_address_to_order', array('address'=>$address, 'order'=>$order)); return $order; } @@ -160,20 +90,6 @@ public function addressToOrderAddress(Mage_Sales_Model_Quote_Address $address) ->setCustomerAddressId($address->getCustomerAddressId()); Mage::helper('core')->copyFieldset('sales_convert_quote_address', 'to_order_address', $address, $orderAddress); -// ->setPrefix($address->getPrefix()) -// ->setFirstname($address->getFirstname()) -// ->setMiddlename($address->getMiddlename()) -// ->setLastname($address->getLastname()) -// ->setSuffix($address->getSuffix()) -// ->setCompany($address->getCompany()) -// ->setStreet($address->getStreet(-1)) -// ->setCity($address->getCity()) -// ->setRegion($address->getRegion()) -// ->setRegionId($address->getRegionId()) -// ->setPostcode($address->getPostcode()) -// ->setCountryId($address->getCountryId()) -// ->setTelephone($address->getTelephone()) -// ->setFax($address->getFax()); Mage::dispatchEvent('sales_convert_quote_address_to_order_address', array('address' => $address, 'order_address' => $orderAddress)); @@ -193,23 +109,6 @@ public function paymentToOrderPayment(Mage_Sales_Model_Quote_Payment $payment) ->setStoreId($payment->getStoreId()) ->setCustomerPaymentId($payment->getCustomerPaymentId()); Mage::helper('core')->copyFieldset('sales_convert_quote_payment', 'to_order_payment', $payment, $orderPayment); -// ->setMethod($payment->getMethod()) -// ->setAdditionalData($payment->getAdditionalData()) -// ->setPoNumber($payment->getPoNumber()) -// ->setCcType($payment->getCcType()) -// ->setCcNumberEnc($payment->getCcNumberEnc()) -// ->setCcLast4($payment->getCcLast4()) -// ->setCcOwner($payment->getCcOwner()) -// ->setCcExpMonth($payment->getCcExpMonth()) -// ->setCcExpYear($payment->getCcExpYear()) -// -// ->setCcNumber($payment->getCcNumber()) // only for doing first transaction, not for save -// ->setCcCid($payment->getCcCid()) // only for doing first transaction, not for save -// -// ->setCcSsIssue($payment->getCcSsIssue()) //for direct payment -// ->setCcSsStartMonth($payment->getCcSsStartMonth()) //for direct payment -// ->setCcSsStartYear($payment->getCcSsStartYear()) //for direct payment -// ; Mage::dispatchEvent('sales_convert_quote_payment_to_order_payment', array('order_payment' => $orderPayment, 'quote_payment' => $payment)); @@ -240,32 +139,9 @@ public function itemToOrderItem(Mage_Sales_Model_Quote_Item_Abstract $item) if ($item->getParentItem()) { $orderItem->setQtyOrdered($orderItem->getQtyOrdered()*$item->getParentItem()->getQty()); } -// ->setSku($item->getSku()) -// ->setName($item->getName()) -// ->setDescription($item->getDescription()) -// ->setWeight($item->getWeight()) -// ->setIsQtyDecimal($item->getIsQtyDecimal()) -// ->setQtyOrdered($item->getQty()) -// ->setOriginalPrice($item->getOriginalPrice()) -// ->setAppliedRuleIds($item->getAppliedRuleIds()) -// ->setAdditionalData($item->getAdditionalData()) -// -// ->setPrice($item->getCalculationPrice()) -// ->setTaxPercent($item->getTaxPercent()) -// ->setTaxAmount($item->getTaxAmount()) -// ->setRowWeight($item->getRowWeight()) -// ->setRowTotal($item->getRowTotal()) -// -// ->setBasePrice($item->getBaseCalculationPrice()) -// ->setBaseOriginalPrice($item->getPrice()) -// ->setBaseTaxAmount($item->getBaseTaxAmount()) -// ->setBaseRowTotal($item->getBaseRowTotal()); if (!$item->getNoDiscount()) { Mage::helper('core')->copyFieldset('sales_convert_quote_item', 'to_order_item_discount', $item, $orderItem); -// $orderItem->setDiscountPercent($item->getDiscountPercent()) -// ->setDiscountAmount($item->getDiscountAmount()) -// ->setBaseDiscountAmount($item->getBaseDiscountAmount()); } Mage::dispatchEvent('sales_convert_quote_item_to_order_item', diff --git a/app/code/core/Mage/Sales/Model/Mysql4/Order/Payment/Transaction.php b/app/code/core/Mage/Sales/Model/Mysql4/Order/Payment/Transaction.php new file mode 100644 index 0000000000..3037a1d1b1 --- /dev/null +++ b/app/code/core/Mage/Sales/Model/Mysql4/Order/Payment/Transaction.php @@ -0,0 +1,196 @@ +_init('sales/payment_transaction', 'transaction_id'); + } + + /** + * Update transactions in database using provided transaction as parent for them + * have to repeat the business logic to avoid accidental injection of wrong transactions + * @param Mage_Sales_Model_Order_Payment_Transaction $transaction + */ + public function injectAsParent(Mage_Sales_Model_Order_Payment_Transaction $transaction) + { + $txnId = $transaction->getTxnId(); + if ($txnId && Mage_Sales_Model_Order_Payment_Transaction::TYPE_PAYMENT === $transaction->getTxnType() + && $id = $transaction->getId()) { + $adapter = $this->_getWriteAdapter(); + + // verify such transaction exists, determine payment and order id + $verificationRow = $adapter->fetchRow( + $adapter->select()->from($this->getMainTable(), array('payment_id', 'order_id')) + ->where("{$this->getIdFieldName()} = ?", (int)$id) + ); + if (!$verificationRow) { + return; + } + list($paymentId, $orderId) = array_values($verificationRow); + + // inject + $adapter->update($this->getMainTable(), array('parent_id' => $id), + sprintf('%s <> %d AND parent_id IS NULL AND payment_id = %d AND order_id = %d AND parent_txn_id = %s', + $this->getIdFieldName(), $id, + (int)$paymentId, (int)$orderId, + $adapter->quote($txnId) + )); + } + } + + /** + * Load the tansaction object by specified txn_id + * @param Mage_Sales_Model_Order_Payment_Transaction $transaction + * @param int $orderId + * @param int $paymentId + * @param string $txnId + */ + public function loadObjectByTxnId(Mage_Sales_Model_Order_Payment_Transaction $transaction, $orderId, $paymentId, $txnId) + { + $select = $this->_getLoadByUniqueKeySelect($orderId, $paymentId, $txnId); + $data = $this->_getWriteAdapter()->fetchRow($select); + $transaction->setData($data); + $this->_afterLoad($transaction); + } + + /** + * Lookup for parent_id in already saved transactions of this payment by the order_id + * Also serialize additional information, if any + * + * @param Mage_Sales_Model_Order_Payment_Transaction $transaction + * @return Mage_Sales_Model_Mysql4_Order_Payment_Transaction + * @throws Mage_Core_Exception + */ + protected function _beforeSave(Mage_Core_Model_Abstract $transaction) + { + $parentTxnId = $transaction->getData('parent_txn_id'); + if ($parentTxnId) { + $txnId = $transaction->getData('txn_id'); + $orderId = $transaction->getData('order_id'); + $paymentId = $transaction->getData('payment_id'); + if (!$txnId || !$orderId || !$paymentId) { + Mage::throwException(Mage::helper('sales')->__('Not enough valid data to save parent transaction ID.')); + } + $parentId = (int)$this->_lookupByTxnId($orderId, $paymentId, $parentTxnId, $this->getIdFieldName()); + if ($parentId) { + $transaction->setData('parent_id', $parentId); + } + } + + // serialize or set additional information to null + $additionalInformation = $transaction->getData('additional_information'); + if (empty($additionalInformation)) { + $transaction->setData('additional_information', null); + } elseif (is_array($additionalInformation)) { + $transaction->setData('additional_information', serialize($additionalInformation)); + } + return parent::_beforeSave($transaction); + } + + /** + * Unserialize additional data after loading the object + * + * @param Mage_Core_Model_Abstract $transaction + * @return Mage_Sales_Model_Mysql4_Order_Payment_Transaction + */ + protected function _afterLoad(Mage_Core_Model_Abstract $transaction) + { + $this->unserializeFields($transaction); + return parent::_afterLoad($transaction); + } + + /** + * Unserialize additional data after saving the object (to have the data and orig_data consistent) + * + * @param Mage_Core_Model_Abstract $transaction + * @return Mage_Sales_Model_Mysql4_Order_Payment_Transaction + */ + protected function _afterSave(Mage_Core_Model_Abstract $transaction) + { + $this->unserializeFields($transaction); + return parent::_afterSave($transaction); + } + + /** + * Unserialize additional information if required + * @param Mage_Sales_Model_Order_Payment_Transaction $transaction + */ + public function unserializeFields(Mage_Sales_Model_Order_Payment_Transaction $transaction) + { + $additionalInformation = $transaction->getData('additional_information'); + if (empty($additionalInformation)) { + $transaction->setData('additional_information', array()); + } elseif (!is_array($additionalInformation)) { + $transaction->setData('additional_information', unserialize($additionalInformation)); + } + } + + /** + * Load cell/row by specified unique key parts + * @param int $orderId + * @param int $paymentId + * @param string $txnId + * @param mixed (array|string|object) $columns + * @param bool $isRow + * @param string $txnType + * @return mixed (array|string) + */ + private function _lookupByTxnId($orderId, $paymentId, $txnId, $columns, $isRow = false, $txnType = null) + { + $select = $this->_getLoadByUniqueKeySelect($orderId, $paymentId, $txnId, $columns); + if ($txnType) { + $select->where('txn_type = ?', $txnType); + } + if ($isRow) { + return $this->_getWriteAdapter()->fetchRow($select); + } + return $this->_getWriteAdapter()->fetchOne($select); + } + + /** + * Get select object for loading transaction by the unique key of order_id, payment_id, txn_id + * @param int $orderId + * @param int $paymentId + * @param string $txnId + * @param string|array|Zend_Db_Expr $columns + */ + private function _getLoadByUniqueKeySelect($orderId, $paymentId, $txnId, $columns = '*') + { + return $this->_getWriteAdapter()->select() + ->from($this->getMainTable(), $columns) + ->where('order_id = ?', $orderId) + ->where('payment_id = ?', $paymentId) + ->where('txn_id = ?', $txnId); + } +} diff --git a/app/code/core/Mage/Sales/Model/Mysql4/Order/Payment/Transaction/Collection.php b/app/code/core/Mage/Sales/Model/Mysql4/Order/Payment/Transaction/Collection.php new file mode 100644 index 0000000000..152ba3055b --- /dev/null +++ b/app/code/core/Mage/Sales/Model/Mysql4/Order/Payment/Transaction/Collection.php @@ -0,0 +1,116 @@ +_init('sales/order_payment_transaction'); + return parent::_construct(); + } + + /** + * Payment ID filter setter + * Can take either the integer id or the payment instance + * @param Mage_Sales_Model_Order_Payment|int $payment + * @return Mage_Sales_Model_Mysql4_Order_Payment_Transaction_Collection + */ + public function addPaymentIdFilter($payment) + { + $id = $payment; + if (is_object($payment)) { + $id = $payment->getId(); + } + $this->_paymentId = (int)$id; + return $this; + } + + /** + * Parent ID filter setter + * @param int $parentId + * @return Mage_Sales_Model_Mysql4_Order_Payment_Transaction_Collection + */ + public function addParentIdFilter($parentId) + { + $this->_parentId = (int)$parentId; + return $this; + } + + /** + * Prepare filters and load the collection + * @param bool $printQuery + * @param bool $logQuery + * @return Mage_Sales_Model_Mysql4_Order_Payment_Transaction_Collection + */ + public function load($printQuery = false, $logQuery = false) + { + if ($this->isLoaded()) { + return $this; + } + + // payment_id filter + if ($this->_paymentId) { + $this->getSelect()->where('payment_id = ?', $this->_paymentId); + } + + // parent_id filter + if ($this->_parentId) { + $this->getSelect()->where('parent_id = ?', $this->_parentId); + } + + return parent::load($printQuery, $logQuery); + } + + /** + * Unserialize additional_information in each item + * @return Mage_Sales_Model_Mysql4_Order_Payment_Transaction_Collection + */ + protected function _afterLoad() + { + foreach ($this->_items as $item) { + $this->getResource()->unserializeFields($item); + } + return parent::_afterLoad(); + } +} diff --git a/app/code/core/Mage/Sales/Model/Order.php b/app/code/core/Mage/Sales/Model/Order.php index d7c7c0db29..7e1bb612b3 100644 --- a/app/code/core/Mage/Sales/Model/Order.php +++ b/app/code/core/Mage/Sales/Model/Order.php @@ -191,7 +191,7 @@ public function canCancel() return false; } - if ($this->getState() === self::STATE_CANCELED || + if ($this->isCanceled() || $this->getState() === self::STATE_COMPLETE || $this->getState() === self::STATE_CLOSED) { return false; @@ -223,7 +223,7 @@ public function canInvoice() if ($this->canUnhold()) { return false; } - if ($this->getState() === self::STATE_CANCELED || + if ($this->isCanceled() || $this->getState() === self::STATE_COMPLETE || $this->getState() === self::STATE_CLOSED ) { return false; @@ -256,7 +256,7 @@ public function canCreditmemo() return false; } - if ($this->getState() === self::STATE_CANCELED || + if ($this->isCanceled() || $this->getState() === self::STATE_CLOSED ) { return false; } @@ -284,7 +284,7 @@ public function canCreditmemo() */ public function canHold() { - if ($this->getState() === self::STATE_CANCELED || + if ($this->isCanceled() || $this->getState() === self::STATE_COMPLETE || $this->getState() === self::STATE_CLOSED || $this->getState() === self::STATE_HOLDED) { @@ -361,7 +361,7 @@ public function canEdit() return false; } - if ($this->getState() === self::STATE_CANCELED || + if ($this->isCanceled() || $this->getState() === self::STATE_COMPLETE || $this->getState() === self::STATE_CLOSED) { return false; @@ -434,6 +434,7 @@ protected function _placePayment() $this->getPayment()->place(); return $this; } + /** * Retrieve order payment model object * @@ -512,26 +513,68 @@ public function getShippingAddress() } /** - * Declare order state + * Order state setter. + * If status is specified, will add order status history with specified comment + * the setData() cannot be overriden because of compatibility issues with resource model * * @param string $state - * @param string $status + * @param string|bool $status * @param string $comment * @param bool $isCustomerNotified - * @return Mage_Sales_Model_Order + * @return Mage_Sales_Model_Order */ public function setState($state, $status = false, $comment = '', $isCustomerNotified = false) { + return $this->_setState($state, $status, $comment, $isCustomerNotified, true); + } + + /** + * Order state protected setter. + * By default allows to set any state. Can also update status to default or specified value + * Сomplete and closed states are encapsulated intentionally, see the _checkState() + * + * @param string $state + * @param string|bool $status + * @param string $comment + * @param bool $isCustomerNotified + * @param $shouldProtectState + * @return Mage_Sales_Model_Order + */ + protected function _setState($state, $status = false, $comment = '', $isCustomerNotified = false, $shouldProtectState = false) + { + // attempt to set the specified state + if ($shouldProtectState) { + if ($this->isStateProtected($state)) { + Mage::throwException(Mage::helper('sales')->__('The Order State "%s" must not be set manually.', $state)); + } + } $this->setData('state', $state); + + // add status history if ($status) { if ($status === true) { $status = $this->getConfig()->getStateDefaultStatus($state); } - $this->addStatusToHistory($status, $comment, $isCustomerNotified); + $this->setStatus($status); + $history = $this->addStatusHistoryComment($comment, false); // no sense to set $status again + $history->setIsCustomerNotified($isCustomerNotified); // for backwards compatibility } return $this; } + /** + * Whether specified state can be set from outside + * @param $state + * @return bool + */ + public function isStateProtected($state) + { + if (empty($state)) { + return false; + } + return self::STATE_COMPLETE == $state || self::STATE_CLOSED == $state; + } + /** * Retrieve label of order status * @@ -544,22 +587,43 @@ public function getStatusLabel() /** * Add status change information to history + * @deprecated after 1.4.0.0-alpha3 * - * @param string $status - * @param string $comments - * @param boolean $is_customer_notified - * @return Mage_Sales_Model_Order + * @param string $status + * @param string $comment + * @param bool $isCustomerNotified + * @return Mage_Sales_Model_Order */ - public function addStatusToHistory($status, $comment='', $isCustomerNotified = false) + public function addStatusToHistory($status, $comment = '', $isCustomerNotified = false) { - $status = Mage::getModel('sales/order_status_history') - ->setStatus($status) - ->setComment($comment) + $history = $this->addStatusHistoryComment($comment, $status) ->setIsCustomerNotified($isCustomerNotified); - $this->addStatusHistory($status); return $this; } + /* + * Add a comment to order + * Different or default status may be specified + * + * @param string $comment + * @param string $status + * @return Mage_Sales_Order_Status_History + */ + public function addStatusHistoryComment($comment, $status = false) + { + if (false === $status) { + $status = $this->getStatus(); + } elseif (true === $status) { + $status = $this->getConfig()->getStateDefaultStatus($this->getState()); + } else { + $this->setStatus($status); + } + $history = Mage::getModel('sales/order_status_history') + ->setStatus($status) + ->setComment($comment); + $this->addStatusHistory($history); + return $history; + } /** * Place order @@ -569,23 +633,7 @@ public function addStatusToHistory($status, $comment='', $isCustomerNotified = f public function place() { Mage::dispatchEvent('sales_order_place_before', array('order'=>$this)); - $this->setState(self::STATE_NEW, true)->save(); - try { - $this->_placePayment(); - } catch (Mage_Core_Exception $e){ - $message = $e->getMessage(); - Mage::logException($e); - $this->addStatusToHistory( - $this->getStatus(), - Mage::helper('sales')->__('Payment failed: %s', $message) - )->save(); - } catch (Exception $e){ - Mage::logException($e); - $this->addStatusToHistory( - $this->getStatus(), - Mage::helper('sales')->__('Payment failed') - )->save(); - } + $this->_placePayment(); Mage::dispatchEvent('sales_order_place_after', array('order'=>$this)); return $this; } @@ -618,6 +666,21 @@ public function cancel() { if ($this->canCancel()) { $this->getPayment()->cancel(); + $this->registerCancellation(); + } + return $this; + } + + /** + * Prepare order totlas to cancellation + * @param string $comment + * @param bool $graceful + * @return Mage_Sales_Model_Order + * @throws Mage_Core_Exception + */ + public function registerCancellation($comment = '', $graceful = true) + { + if ($this->canCancel()) { $cancelState = self::STATE_CANCELED; foreach ($this->getAllItems() as $item) { if ($item->getQtyInvoiced()>$item->getQtyRefunded()) { @@ -635,14 +698,12 @@ public function cancel() $this->setShippingCanceled($this->getShippingAmount() - $this->getShippingInvoiced()); $this->setBaseShippingCanceled($this->getBaseShippingAmount() - $this->getBaseShippingInvoiced()); - $this->setDiscountCanceled( - $this->getDiscountAmount() - $this->getDiscountInvoiced() - ); - $this->setBaseDiscountCanceled( - $this->getBaseDiscountAmount() - $this->getBaseDiscountInvoiced() - ); + $this->setDiscountCanceled($this->getDiscountAmount() - $this->getDiscountInvoiced()); + $this->setBaseDiscountCanceled($this->getBaseDiscountAmount() - $this->getBaseDiscountInvoiced()); - $this->setState($cancelState, true); + $this->_setState($cancelState, true, $comment); + } elseif (!$graceful) { + Mage::throwException(Mage::helper('sales')->__('Order does not allow to be canceled.')); } return $this; } @@ -748,7 +809,8 @@ public function sendNewOrderEmail() ) ); } - + $this->setEmailSent(true); + $this->_getResource()->saveAttribute($this, 'email_sent'); $translate->setTranslateInline(true); return $this; @@ -1103,14 +1165,21 @@ public function getStatusHistoryById($statusId) return false; } - public function addStatusHistory(Mage_Sales_Model_Order_Status_History $status) + /** + * Set the order status history object and the order object to each other + * Adds the object to the status history collection, which is automatically saved when the order is saved. + * See the entity_id attribute backend model. + * Or the history record can be saved standalone after this. + * + * @param Mage_Sales_Model_Order_Status_History $status + * @return Mage_Sales_Model_Order + */ + public function addStatusHistory(Mage_Sales_Model_Order_Status_History $history) { - $status->setOrder($this) - ->setParentId($this->getId()) - ->setStoreId($this->getStoreId()); - $this->setStatus($status->getStatus()); - if (!$status->getId()) { - $this->getStatusHistoryCollection()->addItem($status); + $history->setOrder($this); + $this->setStatus($history->getStatus()); + if (!$history->getId()) { + $this->getStatusHistoryCollection()->addItem($history); } return $this; } @@ -1192,7 +1261,7 @@ public function getBaseCurrency() */ public function getStoreCurrency() { - return $this->getStoreCurrency(); + return $this->getData('store_currency'); } public function formatBasePrice($price) @@ -1302,7 +1371,7 @@ public function getCreditmemosCollection() { if (empty($this->_creditmemos)) { if ($this->getId()) { - $this->_creditmemos = Mage::getResourceModel('sales/order_Creditmemo_collection') + $this->_creditmemos = Mage::getResourceModel('sales/order_creditmemo_collection') ->addAttributeToSelect('*') ->setOrderFilter($this->getId()) ->load(); @@ -1442,9 +1511,10 @@ protected function _beforeSave() } } } - + if ($this->getCustomer()) { + $this->setCustomerId($this->getCustomer()->getId()); + } $this->setData('protect_code', substr(md5(uniqid(mt_rand(), true) . ':' . microtime(true)), 5, 6)); - return $this; } @@ -1454,13 +1524,13 @@ protected function _checkState() return $this; } - if ($this->getState() !== self::STATE_CANCELED + if (!$this->isCanceled() && !$this->canUnhold() && !$this->canInvoice() && !$this->canShip()) { if ($this->canCreditmemo()) { if ($this->getState() !== self::STATE_COMPLETE) { - $this->setState(self::STATE_COMPLETE, true); + $this->_setState(self::STATE_COMPLETE, true); } } /** @@ -1468,7 +1538,7 @@ protected function _checkState() */ elseif(floatval($this->getTotalRefunded())) { if ($this->getState() !== self::STATE_CLOSED) { - $this->setState(self::STATE_CLOSED, true); + $this->_setState(self::STATE_CLOSED, true); } } } @@ -1556,7 +1626,7 @@ public function prepareInvoice($qtys = array()) $invoice->addItem($item); } $invoice->collectTotals(); - + $this->getInvoiceCollection()->addItem($invoice); return $invoice; } @@ -1639,6 +1709,16 @@ protected function _needToAddDummy($item, $qtys = array()) { } } + /** + * Check whether order is canceled + * + * @return bool + */ + public function isCanceled() + { + return ($this->getState() === self::STATE_CANCELED); + } + protected function _beforeDelete() { $this->_protectFromNonAdmin(); diff --git a/app/code/core/Mage/Sales/Model/Order/Creditmemo.php b/app/code/core/Mage/Sales/Model/Order/Creditmemo.php index bba769b1de..57060657c5 100644 --- a/app/code/core/Mage/Sales/Model/Order/Creditmemo.php +++ b/app/code/core/Mage/Sales/Model/Order/Creditmemo.php @@ -376,7 +376,7 @@ public function register() { if ($this->getId()) { Mage::throwException( - Mage::helper('sales')->__('Can not register existing creditmemo') + Mage::helper('sales')->__('Cannot register existing creditmemo') ); } diff --git a/app/code/core/Mage/Sales/Model/Order/Invoice.php b/app/code/core/Mage/Sales/Model/Order/Invoice.php index 9f72b16e08..03e8a72df4 100644 --- a/app/code/core/Mage/Sales/Model/Order/Invoice.php +++ b/app/code/core/Mage/Sales/Model/Order/Invoice.php @@ -63,6 +63,12 @@ class Mage_Sales_Model_Order_Invoice extends Mage_Sales_Model_Abstract protected $_eventPrefix = 'sales_order_invoice'; protected $_eventObject = 'invoice'; + /** + * Whether the pay() was called + * @var bool + */ + protected $_wasPayCalled = false; + public function __destruct() { if ($this->_saveBeforeDestruct) { @@ -181,12 +187,9 @@ public function isCanceled() */ public function canCapture() { - if ($this->getState() != self::STATE_CANCELED && - $this->getState() != self::STATE_PAID && - $this->getOrder()->getPayment()->canCapture()) { - return true; - } - return false; + return $this->getState() != self::STATE_CANCELED + && $this->getState() != self::STATE_PAID + && $this->getOrder()->getPayment()->canCapture(); } /** @@ -245,6 +248,11 @@ public function capture() */ public function pay() { + if ($this->_wasPayCalled) { + return $this; + } + $this->_wasPayCalled = true; + $invoiceState = self::STATE_PAID; if ($this->getOrder()->getPayment()->hasForcedState()) { $invoiceState = $this->getOrder()->getPayment()->getForcedState(); @@ -421,9 +429,7 @@ public function getStateName($stateId = null) public function register() { if ($this->getId()) { - Mage::throwException( - Mage::helper('sales')->__('Can not register existing invoice') - ); + Mage::throwException(Mage::helper('sales')->__('Cannot register existing invoice')); } foreach ($this->getAllItems() as $item) { @@ -435,6 +441,7 @@ public function register() } } + $order = $this->getOrder(); if ($this->canCapture()) { if ($captureCase = $this->getRequestedCaptureCase()) { if ($captureCase == self::CAPTURE_ONLINE) { @@ -446,47 +453,25 @@ public function register() } } } - elseif(!$this->getOrder()->getPayment()->getMethodInstance()->isGateway()) { + elseif(!$order->getPayment()->getMethodInstance()->isGateway()) { $this->pay(); } - $this->getOrder()->setTotalInvoiced( - $this->getOrder()->getTotalInvoiced()+$this->getGrandTotal() - ); - $this->getOrder()->setBaseTotalInvoiced( - $this->getOrder()->getBaseTotalInvoiced()+$this->getBaseGrandTotal() - ); + $order->setTotalInvoiced($order->getTotalInvoiced() + $this->getGrandTotal()); + $order->setBaseTotalInvoiced($order->getBaseTotalInvoiced() + $this->getBaseGrandTotal()); - $this->getOrder()->setSubtotalInvoiced( - $this->getOrder()->getSubtotalInvoiced()+$this->getSubtotal() - ); - $this->getOrder()->setBaseSubtotalInvoiced( - $this->getOrder()->getBaseSubtotalInvoiced()+$this->getBaseSubtotal() - ); + $order->setSubtotalInvoiced($order->getSubtotalInvoiced() + $this->getSubtotal()); + $order->setBaseSubtotalInvoiced($order->getBaseSubtotalInvoiced() + $this->getBaseSubtotal()); - $this->getOrder()->setTaxInvoiced( - $this->getOrder()->getTaxInvoiced()+$this->getTaxAmount() - ); - $this->getOrder()->setBaseTaxInvoiced( - $this->getOrder()->getBaseTaxInvoiced()+$this->getBaseTaxAmount() - ); + $order->setTaxInvoiced($order->getTaxInvoiced() + $this->getTaxAmount()); + $order->setBaseTaxInvoiced($order->getBaseTaxInvoiced() + $this->getBaseTaxAmount()); - $this->getOrder()->setShippingInvoiced( - $this->getOrder()->getShippingInvoiced()+$this->getShippingAmount() - ); - $this->getOrder()->setBaseShippingInvoiced( - $this->getOrder()->getBaseShippingInvoiced()+$this->getBaseShippingAmount() - ); + $order->setShippingInvoiced($order->getShippingInvoiced() + $this->getShippingAmount()); + $order->setBaseShippingInvoiced($order->getBaseShippingInvoiced() + $this->getBaseShippingAmount()); - $this->getOrder()->setDiscountInvoiced( - $this->getOrder()->getDiscountInvoiced()+$this->getDiscountAmount() - ); - $this->getOrder()->setBaseDiscountInvoiced( - $this->getOrder()->getBaseDiscountInvoiced()+$this->getBaseDiscountAmount() - ); - $this->getOrder()->setBaseTotalInvoicedCost( - $this->getOrder()->getBaseTotalInvoicedCost()+$this->getBaseCost() - ); + $order->setDiscountInvoiced($order->getDiscountInvoiced() + $this->getDiscountAmount()); + $order->setBaseDiscountInvoiced($order->getBaseDiscountInvoiced() + $this->getBaseDiscountAmount()); + $order->setBaseTotalInvoicedCost($order->getBaseTotalInvoicedCost() + $this->getBaseCost()); $state = $this->getState(); if (is_null($state)) { diff --git a/app/code/core/Mage/Sales/Model/Order/Invoice/Api.php b/app/code/core/Mage/Sales/Model/Order/Invoice/Api.php index 69a0d802aa..79fb2708e1 100644 --- a/app/code/core/Mage/Sales/Model/Order/Invoice/Api.php +++ b/app/code/core/Mage/Sales/Model/Order/Invoice/Api.php @@ -202,7 +202,7 @@ public function addComment($invoiceIncrementId, $comment, $email = false, $inclu try { $invoice->addComment($comment, $email); - $invoice->sendUpdateEmail($email, ($includeInEmail ? $comment : '')); + $invoice->sendUpdateEmail($email, ($includeComment ? $comment : '')); $invoice->save(); } catch (Mage_Core_Exception $e) { $this->_fault('data_invalid', $e->getMessage()); diff --git a/app/code/core/Mage/Sales/Model/Order/Invoice/Item.php b/app/code/core/Mage/Sales/Model/Order/Invoice/Item.php index 584ac5ba2a..71ade745f8 100644 --- a/app/code/core/Mage/Sales/Model/Order/Invoice/Item.php +++ b/app/code/core/Mage/Sales/Model/Order/Invoice/Item.php @@ -113,8 +113,9 @@ public function setQty($qty) /** * Check qty availability */ - - if ($qty <= $this->getOrderItem()->getQtyToInvoice() || $this->getOrderItem()->isDummy()) { + $qtyToInvoice = sprintf("%F", $this->getOrderItem()->getQtyToInvoice()); + $qty = sprintf("%F", $qty); + if ($qty <= $qtyToInvoice || $this->getOrderItem()->isDummy()) { $this->setData('qty', $qty); } else { diff --git a/app/code/core/Mage/Sales/Model/Order/Invoice/Total/Subtotal.php b/app/code/core/Mage/Sales/Model/Order/Invoice/Total/Subtotal.php index 911d337d9c..e0e19a317b 100644 --- a/app/code/core/Mage/Sales/Model/Order/Invoice/Total/Subtotal.php +++ b/app/code/core/Mage/Sales/Model/Order/Invoice/Total/Subtotal.php @@ -40,6 +40,8 @@ public function collect(Mage_Sales_Model_Order_Invoice $invoice) $subtotalInclTax= 0; $baseSubtotalInclTax = 0; + $order = $invoice->getOrder(); + foreach ($invoice->getAllItems() as $item) { $item->calcRowTotal(); @@ -52,7 +54,10 @@ public function collect(Mage_Sales_Model_Order_Invoice $invoice) $subtotalInclTax+= $item->getRowTotalInclTax(); $baseSubtotalInclTax += $item->getBaseRowTotalInclTax(); } - + $allowedSubtotal = $order->getSubtotal()-$order->getSubtotalInvoiced(); + $baseAllowedSubtotal = $order->getBaseSubtotal()-$order->getBaseSubtotalInvoiced(); + $subtotal = min($allowedSubtotal, $subtotal); + $baseSubtotal = min($baseAllowedSubtotal, $baseSubtotal); $invoice->setSubtotal($subtotal); $invoice->setBaseSubtotal($baseSubtotal); $invoice->setSubtotalInclTax($subtotalInclTax); diff --git a/app/code/core/Mage/Sales/Model/Order/Payment.php b/app/code/core/Mage/Sales/Model/Order/Payment.php index ba14a6e7b3..bd11410976 100644 --- a/app/code/core/Mage/Sales/Model/Order/Payment.php +++ b/app/code/core/Mage/Sales/Model/Order/Payment.php @@ -95,9 +95,8 @@ public function canCapturePartial() } /** - * Place payment information - * - * This method is called when order will be placed + * Authorize or authorize and capture payment on gateway, if applicable + * This method is supposed to be called only when order is placed * * @return Mage_Sales_Model_Order_Payment */ @@ -122,34 +121,27 @@ public function place() * validating payment method again */ $methodInstance->validate(); - if ($action = $methodInstance->getConfigData('payment_action')) { + if ($action = $methodInstance->getConfigPaymentAction()) { /** * Run action declared for payment method in configuration */ if ($methodInstance->isInitializeNeeded()) { - $methodInstance->initialize($action, $stateObject); + /** + * For method initialization we have to use original config value for payment action + */ + $methodInstance->initialize($methodInstance->getConfigData('payment_action'), $stateObject); } else { + $orderState = Mage_Sales_Model_Order::STATE_PROCESSING; switch ($action) { case Mage_Payment_Model_Method_Abstract::ACTION_AUTHORIZE: - case Mage_Paypal_Model_Api_Abstract::PAYMENT_TYPE_AUTH: - $methodInstance->authorize($this, $this->getOrder()->getBaseTotalDue()); - $this->setAmountAuthorized($this->getOrder()->getTotalDue()); - $this->setBaseAmountAuthorized($this->getOrder()->getBaseTotalDue()); - - $orderState = Mage_Sales_Model_Order::STATE_PROCESSING; + $this->_authorize(true, $this->getOrder()->getBaseTotalDue()); // base amount will be set inside break; case Mage_Payment_Model_Method_Abstract::ACTION_AUTHORIZE_CAPTURE: - case Mage_Paypal_Model_Api_Abstract::PAYMENT_TYPE_SALE: - $invoice = $this->_invoice(); - $this->setAmountAuthorized($this->getOrder()->getTotalDue()); $this->setBaseAmountAuthorized($this->getOrder()->getBaseTotalDue()); - - $orderState = $this->getOrder()->getIsVirtual() - ? Mage_Sales_Model_Order::STATE_COMPLETE - : Mage_Sales_Model_Order::STATE_PROCESSING; + $this->capture(null); break; default: break; @@ -194,61 +186,136 @@ public function place() } /** - * Capture payment + * Capture the payment online + * Requires an invoice. If there is no invoice specified, will automatically prepare an invoice for order + * Updates transactions hierarchy, if required + * Updates payment totals, updates order status and adds proper comments * * @return Mage_Sales_Model_Order_Payment */ public function capture($invoice) { +/** + * TODO + * capture should be allowed only when there is no parent transaction id + * or the parent transaction id is a non-voided authorization + */ + if (is_null($invoice)) { $invoice = $this->_invoice(); + return $this; // @see Mage_Sales_Model_Order_Invoice::capture() } Mage::dispatchEvent('sales_order_payment_capture', array('payment' => $this, 'invoice' => $invoice)); + $amountToCapture = $this->_formatAmount($invoice->getBaseGrandTotal()); $this->getMethodInstance() ->setStore($this->getOrder()->getStoreId()) - ->capture($this, sprintf('%.2f', $invoice->getBaseGrandTotal())); - $this->getMethodInstance()->processInvoice($invoice, $this); + ->capture($this, $amountToCapture); + + // update transactions, set order state (order will close itself if required) + $transaction = $this->_addTransaction(Mage_Sales_Model_Order_Payment_Transaction::TYPE_CAPTURE, $invoice); + $message = $this->_appendTransactionToMessage($transaction, + Mage::helper('sales')->__('Captured amount of %s online.', $amountToCapture) + ); + $this->getOrder()->setState(Mage_Sales_Model_Order::STATE_PROCESSING, true, $message); + $this->getMethodInstance()->processInvoice($invoice, $this); // should be deprecated return $this; } - /** - * Register payment fact + * Process a capture notification from a payment gateway for specified amount + * Creates an invoice automatically if the amount covers the order base grand total completely + * Updates transactions hierarchy, if required + * Prevents transaction double processing + * Updates payment totals, updates order status and adds proper comments * - * @param unknown_type $invoice - * @return unknown + * @param float $amount + * @return Mage_Sales_Model_Order_Payment */ - public function pay($invoice) + public function registerCaptureNotification($amount) { - $this->setAmountPaid($this->getAmountPaid()+$invoice->getGrandTotal()); - $this->setBaseAmountPaid($this->getBaseAmountPaid()+$invoice->getBaseGrandTotal()); - - $this->setShippingCaptured($this->getShippingCaptured()+$invoice->getShippingAmount()); - $this->setBaseShippingCaptured($this->getBaseShippingCaptured()+$invoice->getBaseShippingAmount()); + $this->_avoidDoubleTransactionProcessing(); + $order = $this->getOrder(); + $invoice = null; + $amount = (float)$amount; + if (!$amount) { + Mage::throwException(Mage::helper('sales')->__('Impossible to process transaction with zero amount.')); + } - Mage::dispatchEvent('sales_order_payment_pay', array('payment' => $this, 'invoice' => $invoice)); + // prepare invoice if total paid is going to be equal to order grand total + // possible bug: we are not protected from case when order grand total != total authorized + if ((float)$order->getBaseGrandTotal() === ((float)$this->getBaseAmountPaid() + $amount)) { + // ok, we may create an invoice + if (!$order->canInvoice()) { + Mage::throwException(Mage::helper('sales')->__('Order does not allow to create an invoice.')); + } + $invoice = $order->prepareInvoice()->register()->pay(); + $order->addRelatedObject($invoice); + } else { + $this->_updateTotals(array('base_amount_paid' => $amount)); + // shipping captured amount should be updated with the invoice + } + // update transactions, set order state (order will close itself later if required) + $transaction = $this->_addTransaction(Mage_Sales_Model_Order_Payment_Transaction::TYPE_CAPTURE, $invoice); + $message = $this->_prependMessage( + Mage::helper('sales')->__('Registered notification about captured amount of %s.', $this->_formatAmount($amount)) + ); + $message = $this->_appendTransactionToMessage($transaction, $message); + $order->setState(Mage_Sales_Model_Order::STATE_PROCESSING, true, $message); + if ($invoice) { + $this->setCreatedInvoice($invoice); + } return $this; } /** - * Cancel invoice + * Process authorization notification * - * @param unknown_type $invoice - * @return unknown + * @see self::_authorize() + * @param float $amount + * @return Mage_Sales_Model_Order_Payment */ - public function cancelInvoice($invoice) + public function registerAuthorizationNotification($amount) { - $this->setAmountPaid($this->getAmountPaid()-$invoice->getGrandTotal()); - $this->setBaseAmountPaid($this->getBaseAmountPaid()-$invoice->getBaseGrandTotal()); + $this->_avoidDoubleTransactionProcessing(); + return $this->_authorize(false, $amount); + } - $this->setShippingCaptured($this->getShippingCaptured()-$invoice->getShippingAmount()); - $this->setBaseShippingCaptured($this->getBaseShippingCaptured()-$invoice->getBaseShippingAmount()); + /** + * Register payment fact: update self totals from the invoice + * + * @param Mage_Sales_Model_Order_Invoice $invoice + * @return Mage_Sales_Model_Order_Payment + */ + public function pay($invoice) + { + $this->_updateTotals(array( + 'amount_paid' => $invoice->getGrandTotal(), + 'base_amount_paid' => $invoice->getBaseGrandTotal(), + 'shipping_captured' => $invoice->getShippingAmount(), + 'base_shipping_captured' => $invoice->getBaseShippingAmount(), + )); + Mage::dispatchEvent('sales_order_payment_pay', array('payment' => $this, 'invoice' => $invoice)); + return $this; + } + /** + * Cancel specified invoice: update self totals from it + * + * @param Mage_Sales_Model_Order_Invoice $invoice + * @return Mage_Sales_Model_Order_Payment + */ + public function cancelInvoice($invoice) + { + $this->_updateTotals(array( + 'amount_paid' => -1 * $invoice->getGrandTotal(), + 'base_amount_paid' => -1 * $invoice->getBaseGrandTotal(), + 'shipping_captured' => -1 * $invoice->getShippingAmount(), + 'base_shipping_captured' => -1 * $invoice->getBaseShippingAmount(), + )); Mage::dispatchEvent('sales_order_payment_cancel_invoice', array('payment' => $this, 'invoice' => $invoice)); - return $this; } @@ -281,52 +348,142 @@ public function canVoid(Varien_Object $document) return $this->getMethodInstance()->canVoid($document); } + /** + * Void payment online + * + * @see self::_void() + * @param Varien_Object $document + * @return Mage_Sales_Model_Order_Payment + */ public function void(Varien_Object $document) { - $this->getMethodInstance() - ->setStore($this->getOrder()->getStoreId()) - ->processBeforeVoid($document, $this); - //$this->getMethodInstance()->void($document); - $this->getMethodInstance()->void($this); - + $this->_void(true); Mage::dispatchEvent('sales_order_payment_void', array('payment' => $this, 'invoice' => $document)); - return $this; } + /** + * Process void notification + * + * @see self::_void() + * @param float $amount + * @return Mage_Sales_Model_Payment + */ + public function registerVoidNotification($amount = null) + { + $this->_avoidDoubleTransactionProcessing(); + return $this->_void(false, $amount); + } + + /** + * Refund payment online or offline, depending on whether there is invoice set in the creditmemo instance + * Updates transactions hierarchy, if required + * Updates payment totals, updates order status and adds proper comments + * + * @param Mage_Sales_Model_Order_Creditmemo $creditmemo + * @return Mage_Sales_Model_Order_Payment + */ public function refund($creditmemo) { - if ($this->getMethodInstance()->canRefund() && $creditmemo->getDoTransaction()) { + $baseAmountToRefund = $this->_formatAmount($creditmemo->getBaseGrandTotal()); + $order = $this->getOrder(); + + // call refund from gateway if required + $invoice = null; + $gateway = $this->getMethodInstance(); + if ($gateway->canRefund() && $creditmemo->getDoTransaction()) { $this->setCreditmemo($creditmemo); - if ($creditmemo->getInvoice()) { - $this->getMethodInstance()->setStore($this->getOrder()->getStoreId()); - $this->getMethodInstance()->processBeforeRefund($creditmemo->getInvoice(), $this); - $this->getMethodInstance()->refund($this, $creditmemo->getBaseGrandTotal()); - $this->getMethodInstance()->processCreditmemo($creditmemo, $this); + $invoice = $creditmemo->getInvoice(); + if ($invoice) { + $gateway->setStore($this->getOrder()->getStoreId()) + ->processBeforeRefund($invoice, $this) // should be deprecated + ->refund($this, $baseAmountToRefund) + ->processCreditmemo($creditmemo, $this) // should be deprecated + ; } } - $this->setAmountRefunded($this->getAmountRefunded()+$creditmemo->getGrandTotal()); - $this->setBaseAmountRefunded($this->getBaseAmountRefunded()+$creditmemo->getBaseGrandTotal()); - - $this->setShippingRefunded($this->getShippingRefunded()+$creditmemo->getShippingAmount()); - $this->setBaseShippingRefunded($this->getBaseShippingRefunded()+$creditmemo->getBaseShippingAmount()); + // update self totals from creditmemo + $this->_updateTotals(array( + 'amount_refunded' => $creditmemo->getGrandTotal(), + 'base_amount_refunded' => $baseAmountToRefund, + 'shipping_refunded' => $creditmemo->getShippingAmount(), + 'base_shipping_refunded' => $creditmemo->getBaseShippingAmount() + )); + + // update transactions and order state + $transaction = $this->_addTransaction(Mage_Sales_Model_Order_Payment_Transaction::TYPE_REFUND, $creditmemo); + if ($invoice) { + $message = Mage::helper('sales')->__('Refunded amount of %s online.', $baseAmountToRefund); + } else { + $message = Mage::helper('sales')->__('Refunded amount of %s offline.', $baseAmountToRefund); + } + $message = $this->_appendTransactionToMessage($transaction, $message); + $order->setState(Mage_Sales_Model_Order::STATE_PROCESSING, true, $message); Mage::dispatchEvent('sales_order_payment_refund', array('payment' => $this, 'creditmemo' => $creditmemo)); - return $this; } - public function cancelCreditmemo($creditmemo) + /** + * Process payment refund notification + * Updates transactions hierarchy, if required + * Prevents transaction double processing + * Updates payment totals, updates order status and adds proper comments + * TODO: potentially a full capture can be refunded. In this case if there was only one invoice for that transaction + * then we should create a creditmemo from invoice and also refund it offline + * + * @param float $amount + * @return Mage_Sales_Model_Order_Payment + */ + public function registerRefundNotification($amount) { - $this->setAmountRefunded($this->getAmountRefunded()-$creditmemo->getGrandTotal()); - $this->setBaseAmountRefunded($this->getBaseAmountRefunded()-$creditmemo->getBaseGrandTotal()); + $this->_avoidDoubleTransactionProcessing(); + $order = $this->getOrder(); - $this->setShippingRefunded($this->getShippingRefunded()-$creditmemo->getShippingAmount()); - $this->setBaseShippingRefunded($this->getBaseShippingRefunded()-$creditmemo->getBaseShippingAmount()); + // create an offline creditmemo (from order), if the entire grand total of order is covered by this refund + $creditmemo = null; + if ($amount == $order->getBaseGrandTotal()) { + /* + $creditmemo = $order->prepareCreditmemo()->register()->refund(); + $this->_updateTotals(array( + 'amount_refunded' => $creditmemo->getGrandTotal(), + 'shipping_refunded' => $creditmemo->getShippingRefunded(), + 'base_shipping_refunded' => $creditmemo->getBaseShippingRefunded() + )); + $order->addRelatedObject($creditmemo); + $this->setCreatedCreditmemo($creditmemo); + */ + } + $this->_updateTotals(array('base_amount_refunded' => $amount)); - Mage::dispatchEvent('sales_order_payment_cancel_creditmemo', array('payment' => $this, 'creditmemo' => $creditmemo)); + // update transactions and order state + $transaction = $this->_addTransaction(Mage_Sales_Model_Order_Payment_Transaction::TYPE_REFUND, $creditmemo); + $message = $this->_prependMessage( + Mage::helper('sales')->__('Registered notification about refunded amount of %s.', $this->_formatAmount($amount)) + ); + $message = $this->_appendTransactionToMessage($transaction, $message); + $order->setState(Mage_Sales_Model_Order::STATE_PROCESSING, true, $message); + return $this; + } + /** + * Cancel a creditmemo: substract its totals from the payment + * + * @param Mage_Sales_Model_Order_Creditmemo $creditmemo + * @return Mage_Sales_Model_Order_Payment + */ + public function cancelCreditmemo($creditmemo) + { + $this->_updateTotals(array( + 'amount_refunded' => -1 * $creditmemo->getGrandTotal(), + 'base_amount_refunded' => -1 * $creditmemo->getBaseGrandTotal(), + 'shipping_refunded' => -1 * $creditmemo->getShippingAmount(), + 'base_shipping_refunded' => -1 * $creditmemo->getBaseShippingAmount() + )); + Mage::dispatchEvent('sales_order_payment_cancel_creditmemo', + array('payment' => $this, 'creditmemo' => $creditmemo) + ); return $this; } @@ -340,4 +497,253 @@ public function cancel() return $this; } + + /** + * Authorize payment either online or offline (process auth notification) + * Updates transactions hierarchy, if required + * Prevents transaction double processing + * Updates payment totals, updates order status and adds proper comments + * + * @param bool $isOnline + * @param float $amount + * @return Mage_Sales_Model_Order_Payment + */ + protected function _authorize($isOnline, $amount) + { + // only 1 authorization per payment + if ((float)$this->getBaseAmountAuthorized()) { + Mage::throwException(Mage::helper('sales')->__('Payment can be authorized only once.')); + } + + // update totals + $amount = $this->_formatAmount($amount, true); + $this->setBaseAmountAuthorized($amount); + + // do online authorization + $order = $this->getOrder(); + if ($isOnline) { + $this->getMethodInstance()->setStore($order->getStoreId())->authorize($this, $amount); + } + + // update transactions, order state and add comments + $message = $this->_prependMessage($isOnline + ? Mage::helper('sales')->__('Authorized amount of %s.', $amount) + : Mage::helper('sales')->__('Registered notification about authorized amount of %s.', $amount) + ); + $transaction = $this->_addTransaction(Mage_Sales_Model_Order_Payment_Transaction::TYPE_AUTH); + $message = $this->_appendTransactionToMessage($transaction, $message); + $order->setState(Mage_Sales_Model_Order::STATE_PROCESSING, true, $message); + + return $this; + } + + /** + * Void payment either online or offline (process void notification) + * NOTE: that in some cases authorization can be voided after a capture. In such case it makes sense to use + * the amount void amount, for informational purposes. + * If voiding entire authorization, the order will be canceled. + * Updates transactions hierarchy, if required + * Prevents transaction double processing + * Updates payment totals, updates order status and adds proper comments + * + * @param bool $isOnline + * @param float $amount + * @return Mage_Sales_Model_Order_Payment + */ + protected function _void($isOnline, $amount = null) + { + $order = $this->getOrder(); + + // do online void. This may set a transaction + if ($isOnline) { + $this->getMethodInstance()->setStore($order->getStoreId())->void($this); + } + + // if the authorization was untouched, we may cancel the order + // but only if the payment auth amount equals to order grand total + $mayCancelOrder = false; + if ($order->getBaseGrandTotal() == $this->getBaseAmountAuthorized()) { + $parentTxnId = $this->getParentTransactionId(); + $authTransaction = null; + if ($parentTxnId) { + $authTransaction = Mage::getModel('sales/order_payment_transaction') + ->setOrderPaymentObject($this) + ->loadByTxnId($parentTxnId); + if ($authTransaction->canVoidAuthorizationCompletely()) { + $mayCancelOrder = true; + $amount = (float)$order->getBaseGrandTotal(); + } + } + } + + if ($amount) { + $this->_updateTotals(array('base_amount_canceled' => $amount)); + $amount = $this->_formatAmount($amount); + } + + // update transactions, order state and add comments + $transaction = $this->_addTransaction(Mage_Sales_Model_Order_Payment_Transaction::TYPE_VOID); + $message = $this->_prependMessage($isOnline ? Mage::helper('sales')->__('Voided authorization.') + : Mage::helper('sales')->__('Registered a Void notification.')); + if ($amount) { + $message .= ' ' . Mage::helper('sales')->__('Amount: %s.', $amount); + } + $message = $this->_appendTransactionToMessage($transaction, $message); + if ($mayCancelOrder) { + $order->registerCancellation($message, false); + } else { + $order->setState(Mage_Sales_Model_Order::STATE_PROCESSING, true, $message); // or better to put on hold? + } + return $this; + } + +// /** +// * TODO: implement this +// * @param Mage_Sales_Model_Order_Invoice $invoice +// * @return Mage_Sales_Model_Order_Payment +// */ +// public function cancelCapture($invoice = null) +// { +// } + + /** + * Create transaction, prepare its insertion into hierarchy and add its information to payment and comments + * + * To add transactions and related information, the following information should be set to payment before processing: + * - transaction_id + * - parent_transaction_id (optional) + * - is_transaction_closed (optional) - whether transaction should be closed or open (closed by default) + * + * If the sales document is specified, it will be linked to the transaction as related for future usage. + * Currently transaction ID is set into the sales object + * + * This method writes the added transaction ID into last_trans_id field of the payment object + * + * @param string $type + * @param Mage_Sales_Model_Abstract $salesDocument + * @return null|Mage_Sales_Model_Order_Payment_Transaction + */ + protected function _addTransaction($type, $salesDocument = null) + { + // look for set transaction ids + $transactionId = $this->getTransactionId(); + if (null !== $transactionId) { + // set basic parameters + $transaction = Mage::getModel('sales/order_payment_transaction') + ->setOrderPaymentObject($this) + ->setTxnType($type) + ->setTxnId($transactionId); + $this->setLastTransId($transactionId); + + // special state whether transaction is closed + if ($this->hasIsTransactionClosed()) { + $transaction->setIsClosed((int)$this->getIsTransactionClosed()); + } + + // build chain with parent transaction + $parentTransactionId = $this->getParentTransactionId(); + if ($parentTransactionId) { + $transaction->setParentTxnId($parentTransactionId); + } + + if ($salesDocument && $salesDocument instanceof Mage_Sales_Model_Abstract) { + $salesDocument->setTransactionId($transactionId); + // TODO: linking transaction with the sales document + } + $this->setCreatedTransaction($transaction); + $this->getOrder()->addRelatedObject($transaction); + return $transaction; + } + } + + /** + * Totals updater utility method + * Updates self totals by keys in data array('key' => $delta) + * + * @param array $data + */ + private function _updateTotals($data) + { + foreach ($data as $key => $amount) { + if (null !== $amount) { + $was = $this->getDataUsingMethod($key); + $this->setDataUsingMethod($key, $was + $amount); + } + } + } + + /** + * Prevent double processing of the same transaction by a payment notification + * Uses either specified txn_id or the transaction id that was set before + * + * @param string $txnId + * @throws Mage_Core_Exception + */ + protected function _avoidDoubleTransactionProcessing($txnId = null) + { + if (null === $txnId) { + $txnId = $this->getTransactionId(); + } + if ($txnId) { + $transaction = Mage::getModel('sales/order_payment_transaction') + ->setOrderPaymentObject($this) + ->loadByTxnId($txnId); + if ($transaction->getId()) { + Mage::throwException( + Mage::helper('sales')->__('Transaction "%s" was already processed.', $transaction->getTxnId()) + ); + } + } + } + + /** + * Append transaction ID (if any) message to the specified message + * + * @param Mage_Sales_Model_Order_Payment_Transaction|null $transaction + * @param string $message + * @return string + */ + private function _appendTransactionToMessage($transaction, $message) + { + if ($transaction) { + $message .= ' ' . Mage::helper('sales')->__('Transaction ID: "%s".', $transaction->getTxnId()); + } + return $message; + } + + /** + * Prepend a "prepared_message" that may be set to the payment instance before, to the specified message + * Prepends value to the specified string or to the comment of specified order status history item instance + * + * @param string|Mage_Sales_Model_Order_Status_History $messagePrependTo + * @return string|Mage_Sales_Model_Order_Status_History + */ + private function _prependMessage($messagePrependTo) + { + $preparedMessage = $this->getPreparedMessage(); + if ($preparedMessage) { + if (is_string($preparedMessage)) { + return $preparedMessage . ' ' . $messagePrependTo; + } + elseif (is_object($preparedMessage) && ($preparedMessage instanceof Mage_Sales_Model_Order_Status_History)) { + $comment = $preparedMessage->getComment() . ' ' . $messagePrependTo; + $preparedMessage->setComment($comment); + return $comment; + } + } + return $messagePrependTo; + } + + /** + * Round up and cast specified amount to float or string + * + * @param string|float $amount + * @param bool $asFloat + * @return string|float + */ + protected function _formatAmount($amount, $asFloat = false) + { + $amount = sprintf('%.2F', $amount); // "f" depends on locale, "F" doesn't + return $asFloat ? (float)$amount : $amount; + } } diff --git a/app/code/core/Mage/Sales/Model/Order/Payment/Transaction.php b/app/code/core/Mage/Sales/Model/Order/Payment/Transaction.php new file mode 100644 index 0000000000..9dc7b763b0 --- /dev/null +++ b/app/code/core/Mage/Sales/Model/Order/Payment/Transaction.php @@ -0,0 +1,626 @@ + instance + * @var array + */ + protected $_children = null; + + /** + * Child transactions, assoc array of txn_id => instance + * Filled only in case when all child transactions have txn_id + * Used for quicker search of child transactions using isset() as oposite to foreaching $_children + * @var array + */ + protected $_identifiedChildren = null; + + /** + * Whether to perform automatic actions on transactions, such as auto-closing and putting as a parent + * @var bool + */ + protected $_transactionsAutoLinking = true; + + /** + * Whether transaction has children + * @var bool + */ + private $_hasChild = null; + + /** + * Initialize resource model + */ + protected function _construct() + { + $this->_init('sales/order_payment_transaction'); + return parent::_construct(); + } + + /** + * Payment instance setter + * @param Mage_Sales_Model_Order_Payment $payment + * @return Mage_Sales_Model_Order_Payment_Transaction + */ + public function setOrderPaymentObject(Mage_Sales_Model_Order_Payment $payment) + { + $this->_paymentObject = $payment; + return $this; + } + + /** + * Transaction ID setter + * @param string $txnId + * @return Mage_Sales_Model_Order_Payment_Transaction + */ + public function setTxnId($txnId) + { + $this->_verifyTxnId($txnId); + return $this->setData('txn_id', $txnId); + } + + /** + * Parent transaction ID setter + * Can set the transaction id as well + * @param string $parentTxnId + * @param string $txnId + * @return Mage_Sales_Model_Order_Payment_Transaction + * @throws Mage_Core_Exception + */ + public function setParentTxnId($parentTxnId, $txnId = null) + { + $this->_verifyTxnId($parentTxnId); + if (empty($txnId)) { + if ('' == $this->getTxnId()) { + Mage::throwException( + Mage::helper('sales')->__('Parent transaction ID must have a transaction ID.') + ); + } + } else { + $this->setTxnId($txnId); + } + return $this->setData('parent_txn_id', $parentTxnId); + } + + /** + * Transaction type setter + * + * @param $txnType + * @return Mage_Sales_Model_Order_Payment_Transaction + */ + public function setTxnType($txnType) + { + $this->_verifyTxnType($txnType); + return $this->setData('txn_type', $txnType); + } + + /** + * Parent transaction getter + * May attempt to load it. + * + * @param bool $shouldLoad + * @return Mage_Sales_Model_Order_Payment_Transaction|false + */ + public function getParentTransaction($shouldLoad = true) + { + if (null === $this->_parentTransaction) { + $this->_verifyThisTransactionExists(); + $this->_parentTransaction = false; + $parentId = $this->getParentId(); + if ($parentId) { + $class = get_class($this); + $this->_parentTransaction = new $class; + if ($shouldLoad) { + $this->_parentTransaction->load($parentId); + if (!$this->_parentTransaction->getId()) { + $this->_parentTransaction = false; + } else { + $this->_parentTransaction + ->hasChildTransaction(true) + ->setOrderPaymentObject($this->_paymentObject); + } + } + } + } + return $this->_parentTransaction; + } + + /** + * Child transaction(s) getter + * Will attempt to load them first + * Can be filtered by types and/or transaction_id + * Returns transaction object if transaction_id is specified, otherwise - array + * TODO: $recursive is not implemented + * + * @param array|string $types + * @param string $txnId + * @param bool $recursive + * @return Mage_Sales_Model_Order_Payment_Transaction|array|null + */ + public function getChildTransactions($types = null, $txnId = null, $recursive = false) + { + $this->_loadChildren(); + + // grab all transactions + if (empty($types) && null === $txnId) { + return $this->_children; + } elseif ($types && !is_array($types)) { + $types = array($types); + } + + // get a specific transaction + if ($txnId) { + if (empty($this->_children)) { + return; + } + $transaction = null; + if ($this->_identifiedChildren) { + if (isset($this->_identifiedChildren[$txnId])) { + $transaction = $this->_identifiedChildren[$txnId]; + } + } else { + foreach ($this->_children as $child) { + if ($child->getTxnId() === $tnxId) { + $transaction = $child; + break; + } + } + } + // return transaction only if type matches + if (!$transaction || $types && !in_array($transaction->getType(), $types, true)) { + return; + } + return $transaction; + } + + // filter transactions by types + $result = array(); + foreach ($this->_children as $child) { + if (in_array($child->getType(), $types, true)) { + $result[$child->getId()] = $child; + } + } + return $result; + } + + /** + * Close an authorization transaction + * This method can be invoked from any child transaction of the transaction to be closed + * Returns the authorization transaction on success. Otherwise false. + * $dryRun = true prevents actual closing, it just allows to check whether this operation is possible + * + * @param bool $shouldSave + * @param bool $dryRun + * @return Mage_Sales_Model_Order_Payment_Transaction|false + * @throws Exception + */ + public function closeAuthorization($shouldSave = true, $dryRun = false) + { + try { + $this->_verifyThisTransactionExists(); + } catch (Exception $e) { + if ($dryRun) { + return false; + } + throw $e; + } + $authTransaction = false; + switch ($this->getTxnType()) { + case self::TYPE_VOID: + // break intentionally omitted + case self::TYPE_CAPTURE: + $authTransaction = $this->getParentTransaction(); + break; + case self::TYPE_AUTH: + $authTransaction = $this; + break; + // case self::TYPE_PAYMENT? + } + if ($authTransaction) { + if (!$dryRun) { + $authTransaction->close($shouldSave); + } + } + return $authTransaction; + } + + /** + * Close a capture transaction + * Logic is similar to closeAuthorization(), but for a capture transaction + * @see self::closeAuthorization() + * @para, bool $shouldSave + * @param unknown_type $shouldSave + */ + public function closeCapture($shouldSave = true) + { + $this->_verifyThisTransactionExists(); + $captureTransaction = false; + switch ($this->getTxnType()) { + case self::TYPE_CAPTURE: + $captureTransaction = $this; + break; + case self::TYPE_REFUND: + $captureTransaction = $this->getParentTransaction(); + break; + } + if ($captureTransaction) { + $captureTransaction->close($shouldSave); + } + return $captureTransaction; + } + + /** + * Check whether authorization in current hierarchy can be voided completely + * Basically checks whether the authorization exists and it is not affected by a capture or void + * @return bool + */ + public function canVoidAuthorizationCompletely() + { + try { + $authTransaction = $this->closeAuthorization('', true); + if ($authTransaction->hasChildTransaction() || $this->_children) { + return false; + } + return true; + } catch (Mage_Core_Exception $e) { + // jam all logical exceptions, fallback to false + } + return false; + } + + /** + * Getter/Setter of whether current transaction has a child transaction + * @param bool $whetherHasChild + * @return bool|Mage_Sales_Model_Order_Payment_Transaction + */ + public function hasChildTransaction($whetherHasChild = null) + { + if (null !== $whetherHasChild) { + $this->_hasChild = (bool)$whetherHasChild; + return $this; + } + elseif (null === $this->_hasChild) { + if ($this->getChildTransactions()) { + $this->_hasChild = true; + } else { + $this->_hasChild = false; + } + } + return $this->_hasChild; + } + + /** + * Load self by specified transaction ID. Requires the valid payment object to be set + * @param string $txnId + * @return Mage_Sales_Model_Order_Payment_Transaction + */ + public function loadByTxnId($txnId) + { + $this->_verifyPaymentObject(); + $this->getResource()->loadObjectByTxnId( + $this, $this->getOrderId(), $this->_paymentObject->getId(), $txnId + ); + return $this; + } + + /** + * Additional information setter + * Updates data inside the 'additional_information' array + * Doesn't allow to set arrays + * + * @param string $key + * @param mixed $value + * @return Mage_Sales_Model_Order_Payment_Transaction + * @throws Mage_Core_Exception + */ + public function setAdditionalInformation($key, $value) + { + if (is_object($value)) { + Mage::throwException(Mage::helper('sales')->__('Payment transactions disallow storing objects.')); + } + $info = $this->_getData('additional_information'); + if (!$info) { + $info = array(); + } + $info[$key] = $value; + return $this->setData('additional_information', $info); + } + + /** + * Getter for entire additional_information value or one of its element by key + * @param string $key + * @return array|null|mixed + */ + public function getAdditionalInformation($key = null) + { + $info = $this->_getData('additional_information'); + if (!$info) { + $info = array(); + } + if ($key) { + return (isset($info[$key]) ? $info[$key] : null); + } + return $info; + } + + /** + * Unsetter for entire additional_information value or one of its element by key + * @param string $key + * @return Mage_Sales_Model_Order_Payment_Transaction + */ + public function unsAdditionalInformation($key = null) + { + if ($key) { + $info = $this->_getData('additional_information'); + if (is_array($info)) { + unset($info[$key]); + } + } else { + $info = array(); + } + return $this->setData('additional_information', $info); + } + + /** + * Close this transaction + * @param bool $shouldSave + * @return Mage_Sales_Model_Order_Payment_Transaction + * @throws Mage_Core_Exception + */ + public function close($shouldSave = true) + { + $this->_verifyThisTransactionExists(); + if (1 == $this->getIsClosed()) { + Mage::throwException(Mage::helper('sales')->__('The transaction "%s" (%s) is already closed.', $this->getTxnId(), $this->getTxnType())); + } + $this->setIsClosed(1); + if ($shouldSave) { + $this->save(); + } + if ($this->_transactionsAutoLinking && self::TYPE_AUTH === $this->getTxnType()) { + $paymentTransaction = $this->getParentTransaction(); + if ($paymentTransaction) { + $paymentTransaction->close($shouldSave); + } + } + return $this; + } + + /** + * Order Payment instance getter + * Will attempt to load by payment_id if it is set in data + * @param bool $shouldLoad + * @return Mage_Sales_Model_Order_Payment + */ + public function getOrderPaymentObject($shouldLoad = true) + { + $this->_verifyThisTransactionExists(); + if (null === $this->_paymentObject && $shouldLoad) { + $payment = Mage::getModel('sales/order_payment')->load($this->getPaymentId()); + if ($payment->getId()) { + $this->setOrderPaymentObject($payment); + } + } + return $this->_paymentObject; + } + + /** + * Order ID getter + * Attempts to get ID from set order payment object, if any, or from data by key 'order_id' + * @return int|null + */ + public function getOrderId() + { + $orderId = $this->_getData('order_id'); + if ($orderId) { + return $orderId; + } + if ($this->_paymentObject) { + return $this->_paymentObject->getOrder() + ? $this->_paymentObject->getOrder()->getId() + : $this->_paymentObject->getParentId(); + } + } + + /** + * Verify data required for saving + * @return Mage_Sales_Model_Order_Payment_Transaction + * @throws Mage_Core_Exception + */ + protected function _beforeSave() + { + // set parent id + $this->_verifyPaymentObject(); + $this->setPaymentId($this->_paymentObject->getId()) + ->setOrderId($this->getOrderId()); + return parent::_beforeSave(); + } + + /** + * Perform automatic actions with transactions hierarchy, if required + * @return Mage_Sales_Model_Order_Payment_Transaction + */ + protected function _afterSave() + { + if ($this->_transactionsAutoLinking) { + $txnType = $this->getTxnType(); + // auto close authorizations after void + if (self::TYPE_VOID === $txnType) { + $this->closeAuthorization(); + } + } + return parent::_afterSave(); + } + + /** + * Load child transactions + * @throws Mage_Core_Exception + */ + protected function _loadChildren() + { + if (null !== $this->_children) { + return; + } + + // make sure minimum required data is set + $this->_verifyThisTransactionExists(); + $payment = $this->_verifyPaymentObject(true); + $paymentId = $payment ? $payment->getId() : $this->_getData('payment_id'); + if (!$paymentId) { + Mage::throwException(Mage::helper('sales')->__('At least a payment ID must be set.')); + } + + // prepare children collection + $children = $this->getResourceCollection() + ->addPaymentIdFilter($paymentId) + ->addParentIdFilter($this->getId()); + + // set basic children array and attempt to map them per txn_id, if all of them have txn_id + $this->_children = array(); + $this->_identifiedChildren = array(); + foreach ($children as $child) { + if ($payment) { + $child->setOrderPaymentObject($payment); + } + $this->_children[$child->getId()] = $child; + if (false !== $this->_identifiedChildren) { + $childTxnId = $child->getTxnId(); + if (!$childTxnId || '0' == $childTxnId) { + $this->_identifiedChildren = false; + } else { + $this->_identifiedChildren[$child->getTxnId()] = $child; + } + } + } + if (false === $this->_identifiedChildren) { + $this->_identifiedChildren = array(); + } + } + + /** + * Check whether this transaction is voided + * TODO: implement that there should be only one void per authorization + * @return bool + */ + private function _isVoided() + { + $this->_verifyThisTransactionExists(); + return self::TYPE_AUTH === $this->getTxnType() + && (bool)count($this->getChildTransactions(self::TYPE_VOID)); + } + + /** + * Check whether specified or set transaction type is supported + * @param string $txnType + * @throws Mage_Core_Exception + */ + private function _verifyTxnType($txnType = null) + { + if (null === $txnType) { + $txnType = $this->getTxnType(); + } + switch ($txnType) { + case self::TYPE_PAYMENT: + case self::TYPE_AUTH: + case self::TYPE_CAPTURE: + case self::TYPE_VOID: + case self::TYPE_REFUND: + break; + default: + Mage::throwException(Mage::helper('sales')->__('Non-supported Transaction Type "%s".', $txnType)); + } + } + + /** + * Check whether the payment object is set and it has order object or there is an order_id is set + * $dryRun allows to not throw exception + * @param bool $dryRun + * @return Mage_Sales_Model_Order_Payment|null|false + * @throws Mage_Core_Exception + */ + private function _verifyPaymentObject($dryRun = false) + { + if (!$this->_paymentObject || !$this->getOrderId()) { + if (!$dryRun) { + Mage::throwException(Mage::helper('sales')->__('Proper payment object must be set.')); + } + } + return $this->_paymentObject; + } + + /** + * Check whether specified transaction ID is valid + * @param string $txnId + * @throws Mage_Core_Exception + */ + private function _verifyTxnId($txnId) + { + if (null !== $txnId && 0 == strlen($txnId)) { + Mage::throwException(Mage::helper('sales')->__('Transaction ID must not be empty.')); + } + } + + /** + * Make sure this object is a valid transaction + * TODO for more restriction we can check for data consistency + * @throws Mage_Core_Exception + */ + private function _verifyThisTransactionExists() + { + if (!$this->getId()) { + Mage::throwException(Mage::helper('sales')->__('This operation requires an existing transaction object.')); + } + $this->_verifyTxnType(); + } +} 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 10c30ecc80..2fd708356c 100644 --- a/app/code/core/Mage/Sales/Model/Order/Pdf/Abstract.php +++ b/app/code/core/Mage/Sales/Model/Order/Pdf/Abstract.php @@ -81,7 +81,8 @@ abstract public function getPdf(); */ public function widthForStringUsingFontSize($string, $font, $fontSize) { - $drawingString = iconv('UTF-8', 'UTF-16BE//IGNORE', $string); + $drawingString = '"libiconv"' == ICONV_IMPL ? iconv('UTF-8', 'UTF-16BE//IGNORE', $string) : @iconv('UTF-8', 'UTF-16BE', $string); + $characters = array(); for ($i = 0; $i < strlen($drawingString); $i++) { $characters[] = (ord($drawingString[$i++]) << 8) | ord($drawingString[$i]); diff --git a/app/code/core/Mage/Sales/Model/Order/Shipment/Api/V2.php b/app/code/core/Mage/Sales/Model/Order/Shipment/Api/V2.php index 4748bc393b..8d7b582b2a 100644 --- a/app/code/core/Mage/Sales/Model/Order/Shipment/Api/V2.php +++ b/app/code/core/Mage/Sales/Model/Order/Shipment/Api/V2.php @@ -128,7 +128,6 @@ public function create($orderIncrementId, $itemsQty = array(), $comment = null, $this->_fault('data_invalid', Mage::helper('sales')->__('Can not do shipment for order.')); } - $shipment = $convertor->toShipment($order); /* @var $shipment Mage_Sales_Model_Order_Shipment */ $shipment = $order->prepareShipment($itemsQty); if ($shipment) { diff --git a/app/code/core/Mage/Sales/Model/Order/Status/History.php b/app/code/core/Mage/Sales/Model/Order/Status/History.php index 98f143d003..47e5cae961 100644 --- a/app/code/core/Mage/Sales/Model/Order/Status/History.php +++ b/app/code/core/Mage/Sales/Model/Order/Status/History.php @@ -24,7 +24,9 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ - +/** + * Order status history comments + */ class Mage_Sales_Model_Order_Status_History extends Mage_Sales_Model_Abstract { /** @@ -34,6 +36,12 @@ class Mage_Sales_Model_Order_Status_History extends Mage_Sales_Model_Abstract */ protected $_order; + /** + * Whether setting order again is required (for example when setting non-saved yet order) + * @var bool + */ + private $_shouldSetOrderBeforeSave = false; + /** * Initialize resource model */ @@ -43,7 +51,7 @@ protected function _construct() } /** - * declare order instance + * Set order object and grab some metadata from it * * @param Mage_Sales_Model_Order $order * @return Mage_Sales_Model_Order_Status_History @@ -51,7 +59,11 @@ protected function _construct() public function setOrder(Mage_Sales_Model_Order $order) { $this->_order = $order; - return $this; + $id = $order->getId(); + if (!$id) { + $this->_shouldSetOrderBeforeSave = true; + } + return $this->setParentId($id)->setStoreId($order->getStoreId()); } /** @@ -88,4 +100,16 @@ public function getStore() } return Mage::app()->getStore(); } + + /** + * Set order again if required + * @return Mage_Sales_Model_Order_Status_History + */ + protected function _beforeSave() + { + if ($this->_shouldSetOrderBeforeSave) { + $this->setOrder($this->_order); + } + return parent::_beforeSave(); + } } diff --git a/app/code/core/Mage/Sales/Model/Quote.php b/app/code/core/Mage/Sales/Model/Quote.php index 8659d3fca1..41ac7fed56 100644 --- a/app/code/core/Mage/Sales/Model/Quote.php +++ b/app/code/core/Mage/Sales/Model/Quote.php @@ -38,19 +38,6 @@ */ class Mage_Sales_Model_Quote extends Mage_Core_Model_Abstract { - /** - * Checkout methods - */ - const CHECKOUT_METHOD_REGISTER = 'register'; - const CHECKOUT_METHOD_GUEST = 'guest'; - const CHECKOUT_METHOD_LOGIN_IN = 'login_in'; - - /** - * Performance +30% without cache - */ -// const CACHE_TAG = 'sales_quote'; -// protected $_cacheTag = 'sales_quote'; - protected $_eventPrefix = 'sales_quote'; protected $_eventObject = 'quote'; @@ -194,6 +181,10 @@ protected function _beforeSave() $this->setIsChanged(0); } + if ($this->_customer) { + $this->setCustomerId($this->_customer->getId()); + } + parent::_beforeSave(); } @@ -280,6 +271,7 @@ public function assignCustomer(Mage_Customer_Model_Customer $customer) public function setCustomer(Mage_Customer_Model_Customer $customer) { $this->_customer = $customer; + $this->setCustomerId($customer->getId()); Mage::helper('core')->copyFieldset('customer_account', 'to_quote', $customer, $this); return $this; } @@ -316,20 +308,6 @@ public function getCustomerTaxClassId() return $this->getData('customer_tax_class_id'); } - /** - * Return quote checkout method code - * - * @param boolean $originalMethod if true return defined method from begining - * @return string - */ - public function getCheckoutMethod($originalMethod = false) - { - if ($this->getCustomerId() && !$originalMethod) { - return self::CHECKOUT_METHOD_LOGIN_IN; - } - return $this->_getData('checkout_method'); - } - /** * Retrieve quote address collection * @@ -1048,6 +1026,11 @@ public function getMessages() return $messages; } + /** + * Generate new increment order id and associate it with current quote + * + * @return Mage_Sales_Model_Quote + */ public function reserveOrderId() { if (!$this->getReservedOrderId()) { @@ -1145,16 +1128,6 @@ public function hasVirtualItems() return $hasVirtual; } - /** - * Check is allow Guest Checkout - * - * @return bool - */ - public function isAllowedGuestCheckout() - { - return Mage::helper('checkout')->isAllowedGuestCheckout($this, $this->getStoreId()); - } - /** * Merge quotes * @@ -1242,4 +1215,41 @@ protected function _afterLoad() } return parent::_afterLoad(); } + + + + + + /** + * @deprecated after 1.4 beta1 - one page checkout responsibility + */ + const CHECKOUT_METHOD_REGISTER = 'register'; + const CHECKOUT_METHOD_GUEST = 'guest'; + const CHECKOUT_METHOD_LOGIN_IN = 'login_in'; + + /** + * Return quote checkout method code + * + * @deprecated after 1.4 beta1 it is checkout module responsibility + * @param boolean $originalMethod if true return defined method from begining + * @return string + */ + public function getCheckoutMethod($originalMethod = false) + { + if ($this->getCustomerId() && !$originalMethod) { + return self::CHECKOUT_METHOD_LOGIN_IN; + } + return $this->_getData('checkout_method'); + } + + /** + * Check is allow Guest Checkout + * + * @deprecated after 1.4 beta1 it is checkout module responsibility + * @return bool + */ + public function isAllowedGuestCheckout() + { + return Mage::helper('checkout')->isAllowedGuestCheckout($this, $this->getStoreId()); + } } diff --git a/app/code/core/Mage/Sales/Model/Quote/Address.php b/app/code/core/Mage/Sales/Model/Quote/Address.php index 2d708f66e1..a63829a194 100644 --- a/app/code/core/Mage/Sales/Model/Quote/Address.php +++ b/app/code/core/Mage/Sales/Model/Quote/Address.php @@ -100,10 +100,16 @@ protected function _beforeSave() $quoteId = $this->getQuote()->getId(); if ($quoteId) { $this->setQuoteId($quoteId); - } - else { + } else { $this->_dataSaveAllowed = false; } + $this->setCustomerId($this->getQuote()->getCustomerId()); + /** + * Init customer address id if customer address is assigned + */ + if ($this->getCustomerAddress()) { + $this->setCustomerAddressId($this->getCustomerAddress()->getId()); + } } return $this; } @@ -157,7 +163,16 @@ public function getQuote() public function importCustomerAddress(Mage_Customer_Model_Address $address) { Mage::helper('core')->copyFieldset('customer_address', 'to_quote_address', $address, $this); - $this->setEmail($address->hasEmail() ? $address->getEmail() : $address->getCustomer()->getEmail()); + $email = null; + if ($address->hasEmail()) { + $email = $address->getEmail(); + } + elseif ($address->getCustomer()) { + $email = $address->getCustomer()->getEmail(); + } + if ($email) { + $this->setEmail($email); + } return $this; } @@ -199,7 +214,7 @@ public function importOrderAddress(Mage_Sales_Model_Order_Address $address) */ public function toArray(array $arrAttributes = array()) { - $arr = parent::toArray(); + $arr = parent::toArray($arrAttributes); $arr['rates'] = $this->getShippingRatesCollection()->toArray($arrAttributes); $arr['items'] = $this->getItemsCollection()->toArray($arrAttributes); foreach ($this->getTotals() as $k=>$total) { @@ -605,32 +620,8 @@ public function collectShippingRates() $request->setDestStreet($this->getStreet(-1)); $request->setDestCity($this->getCity()); $request->setDestPostcode($this->getPostcode()); - - /** - * Count total amount and total discount for shipping. Only not virtual quote items. - * Fix bug #15971 - */ - $quoteItems = $this->getAllItems(); - $subtotal = 0; - $discountAmount = 0; - foreach ($quoteItems as $quoteItem) { - if (!$quoteItem->getParentItem() && !$quoteItem->getProduct()->isVirtual()) { - $subtotal += $quoteItem->getRowTotal(); - $discountAmount += $quoteItem->getDiscountAmount(); - if ($quoteItem->getHasChildren()) { - foreach ($quoteItem->getChildren() as $child) { - $discountAmount += $child->getDiscountAmount(); - } - } - } - } - - $request->setPackageValue($subtotal); - $request->setPackageValueWithDiscount($subtotal - $discountAmount); - /** - * End fix - */ - + $request->setPackageValue($this->getBaseSubtotal()); + $request->setPackageValueWithDiscount($this->getBaseSubtotalWithDiscount()); $request->setPackageWeight($this->getWeight()); $request->setPackageQty($this->getItemQty()); diff --git a/app/code/core/Mage/Sales/Model/Quote/Item.php b/app/code/core/Mage/Sales/Model/Quote/Item.php index 9b0f5ca1b3..21b208d915 100644 --- a/app/code/core/Mage/Sales/Model/Quote/Item.php +++ b/app/code/core/Mage/Sales/Model/Quote/Item.php @@ -305,21 +305,37 @@ public function representProduct($product) return false; } - $itemOptions = $this->getOptions(); + $itemOptions = $this->getOptionsByCode(); $productOptions = $product->getCustomOptions(); - if (count($itemOptions) != count($productOptions)) { + if(!$this->compareOptions($itemOptions, $productOptions)){ return false; } + if(!$this->compareOptions($productOptions, $itemOptions)){ + return false; + } + return true; + } - foreach ($itemOptions as $option) { + /** + * Check if two options array are identical + * First options array is prerogative + * Second options array checked against first one + * + * @param array $options1 + * @param array $options2 + * @return bool + */ + public function compareOptions($options1, $options2) + { + foreach ($options1 as $option) { $code = $option->getCode(); if (in_array($code, $this->_notRepresentOptions )) { continue; } - if ( !isset($productOptions[$code]) - || ($productOptions[$code]->getValue() === null) - || $productOptions[$code]->getValue() != $option->getValue()) { + if ( !isset($options2[$code]) + || ($options2[$code]->getValue() === null) + || $options2[$code]->getValue() != $option->getValue()) { return false; } } @@ -431,6 +447,16 @@ public function getOptions() return $this->_options; } + /** + * Get all item options as array with codes in array key + * + * @return array + */ + public function getOptionsByCode() + { + return $this->_optionsByCode; + } + /** * Add option to item * 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 722c7989bd..620f668630 100644 --- a/app/code/core/Mage/Sales/Model/Quote/Item/Abstract.php +++ b/app/code/core/Mage/Sales/Model/Quote/Item/Abstract.php @@ -170,7 +170,7 @@ public function checkData() $this->unsMessage(); $qty = $this->_getData('qty'); - + try { $this->setQty($qty); } catch (Mage_Core_Exception $e){ @@ -338,6 +338,8 @@ public function getPrice() */ public function setCustomPrice($value) { + $this->setCalculationPrice(null); + $this->setBaseCalculationPrice(null); return $this->setData('custom_price', $value); } @@ -518,7 +520,7 @@ public function getTaxAmount() public function getBaseTaxAmount() { return $this->_getData('base_tax_amount'); - + $priceType = $this->getProduct()->getPriceType(); if ($this->getHasChildren() && (null !== $priceType) && (int)$priceType === Mage_Catalog_Model_Product_Type_Abstract::CALCULATE_CHILD) { $baseAmount = 0; diff --git a/app/code/core/Mage/Sales/Model/Service/Quote.php b/app/code/core/Mage/Sales/Model/Service/Quote.php new file mode 100644 index 0000000000..cf942ba711 --- /dev/null +++ b/app/code/core/Mage/Sales/Model/Service/Quote.php @@ -0,0 +1,162 @@ +_quote = $quote; + $this->_convertor = Mage::getModel('sales/convert_quote'); + } + + /** + * Quote convertor declaration + * + * @param Mage_Sales_Model_Convert_Quote $convertor + * @return Mage_Sales_Model_Service_Quote + */ + public function setConvertor(Mage_Sales_Model_Convert_Quote $convertor) + { + $this->_convertor = $convertor; + return $this; + } + + /** + * Get assigned quote object + * + * @return Mage_Sales_Model_Quote + */ + public function getQuote() + { + return $this->_quote; + } + + /** + * Submit the quote. Quote submit process will create the order based on quote data + * + * @return Mage_Sales_Model_Order + */ + public function submit() + { + $this->_validate(); + $quote = $this->_quote; + $isVirtual = $quote->isVirtual(); + + $transaction = Mage::getModel('core/resource_transaction'); + if ($quote->getCustomerId()) { + $transaction->addObject($quote->getCustomer()); + } + $transaction->addObject($quote); + + $quote->reserveOrderId(); + if ($isVirtual) { + $order = $this->_convertor->addressToOrder($quote->getBillingAddress()); + } else { + $order = $this->_convertor->addressToOrder($quote->getShippingAddress()); + } + $order->setBillingAddress($this->_convertor->addressToOrderAddress($quote->getBillingAddress())); + if (!$isVirtual) { + $order->setShippingAddress($this->_convertor->addressToOrderAddress($quote->getShippingAddress())); + } + $order->setPayment($this->_convertor->paymentToOrderPayment($quote->getPayment())); + + foreach ($quote->getAllItems() as $item) { + $orderItem = $this->_convertor->itemToOrderItem($item); + if ($item->getParentItem()) { + $orderItem->setParentItem($order->getItemByQuoteItemId($item->getParentItem()->getId())); + } + $order->addItem($orderItem); + } + $quote->setIsActive(false); + + $transaction->addObject($order); + $transaction->addCommitCallback(array($order, 'place')); + $transaction->addCommitCallback(array($order, 'save')); + + /** + * We can use configuration data for declare new order status + */ + Mage::dispatchEvent('checkout_type_onepage_save_order', array('order'=>$order, 'quote'=>$quote)); + Mage::dispatchEvent('sales_model_service_quote_submit_before', array('order'=>$order, 'quote'=>$quote)); + $transaction->save(); + Mage::dispatchEvent('sales_model_service_quote_submit_after', array('order'=>$order, 'quote'=>$quote)); + return $order; + } + + /** + * Validate quote data before converting to order + * + * @return Mage_Sales_Model_Service_Quote + */ + protected function _validate() + { + $helper = Mage::helper('sales'); + if (!$this->getQuote()->isVirtual()) { + $address = $this->getQuote()->getShippingAddress(); + $addressValidation = $address->validate(); + if ($addressValidation !== true) { + Mage::throwException($helper->__('Please check shipping address information.')); + } + $method= $address->getShippingMethod(); + $rate = $address->getShippingRateByCode($method); + if (!$this->getQuote()->isVirtual() && (!$method || !$rate)) { + Mage::throwException($helper->__('Please specify shipping method.')); + } + } + + $addressValidation = $this->getQuote()->getBillingAddress()->validate(); + if ($addressValidation !== true) { + Mage::throwException($helper->__('Please check billing address information.')); + } + + if (!($this->getQuote()->getPayment()->getMethod())) { + Mage::throwException($helper->__('Please select valid payment method.')); + } + return $this; + } +} diff --git a/app/code/core/Mage/Sales/etc/adminhtml.xml b/app/code/core/Mage/Sales/etc/adminhtml.xml index 486995d457..d56f26d556 100644 --- a/app/code/core/Mage/Sales/etc/adminhtml.xml +++ b/app/code/core/Mage/Sales/etc/adminhtml.xml @@ -81,6 +81,7 @@ Ship Comment Reorder + Send Sales Emails diff --git a/app/code/core/Mage/Sales/etc/config.xml b/app/code/core/Mage/Sales/etc/config.xml index 96f885efb2..5ce5073c38 100644 --- a/app/code/core/Mage/Sales/etc/config.xml +++ b/app/code/core/Mage/Sales/etc/config.xml @@ -28,7 +28,7 @@ - 0.9.44 + 0.9.50 @@ -355,6 +355,20 @@ sales_flat_order_item
sales_flat_order_item_option
sales_order_entity
+ + sales_order_aggregated_created
+ sales_order_aggregated_updated
+ + sales_shipping_aggregated
+ sales_shipping_aggregated_order
+ + sales_invoiced_aggregated
+ sales_invoiced_aggregated_order
+ + sales_refunded_aggregated
+ sales_refunded_aggregated_order
+ + sales_payment_transaction
tax/checkout_subtotal adminhtml/sales_order_create_totals_subtotal diff --git a/app/code/core/Mage/Tax/etc/system.xml b/app/code/core/Mage/Tax/etc/system.xml index 7124f8cfc5..7d30fbbb1a 100644 --- a/app/code/core/Mage/Tax/etc/system.xml +++ b/app/code/core/Mage/Tax/etc/system.xml @@ -80,7 +80,8 @@ 0 - + + Whether Catalog Prices entered by Admin include Tax select tax/config_price_include tax/system_config_source_priceType @@ -90,7 +91,8 @@ 0 - + + Whether Shipping Amounts entered by Admin or obtained from Gateways include Tax select tax/config_price_include tax/system_config_source_priceType diff --git a/app/code/core/Mage/Tax/sql/tax_setup/mysql4-upgrade-0.7.10-0.7.11.php b/app/code/core/Mage/Tax/sql/tax_setup/mysql4-upgrade-0.7.10-0.7.11.php new file mode 100644 index 0000000000..b56d2a3bf8 --- /dev/null +++ b/app/code/core/Mage/Tax/sql/tax_setup/mysql4-upgrade-0.7.10-0.7.11.php @@ -0,0 +1,50 @@ +startSetup(); + +$installer->run(" + CREATE TABLE IF NOT EXISTS `{$installer->getTable('tax_order_aggregated_created')}` + ( + `id` int(11) unsigned NOT NULL auto_increment, + `period` date NOT NULL DEFAULT '0000-00-00', + `store_id` smallint(5) unsigned NULL DEFAULT NULL, + `code` varchar(255) NOT NULL default '', + `order_status` varchar(50) NOT NULL default '', + `percent` float(12,4) NOT NULL default '0.0000', + `orders_count` int(11) unsigned NOT NULL default '0', + `tax_base_amount_sum` float(12,4) NOT NULL default '0.0000', + PRIMARY KEY (`id`), + UNIQUE KEY `UNQ_TAX_ORDER_AGGREGATED_CREATED_PERIOD_STORE_CODE` (`period`,`store_id`, `code`, `order_status`), + KEY `FK_TAX_ORDER_AGGREGATED_CREATED_STORE` (`store_id`), + CONSTRAINT `FK_TAX_ORDER_AGGREGATED_CREATED_STORE` FOREIGN KEY (`store_id`) REFERENCES `core_store` (`store_id`) ON DELETE SET NULL ON UPDATE CASCADE + ) ENGINE=InnoDB DEFAULT CHARSET=utf8; +"); + +$installer->endSetup(); diff --git a/app/code/core/Mage/Usa/Model/Shipping/Carrier/Ups.php b/app/code/core/Mage/Usa/Model/Shipping/Carrier/Ups.php index 2f09b289ec..ca3fa9aed8 100644 --- a/app/code/core/Mage/Usa/Model/Shipping/Carrier/Ups.php +++ b/app/code/core/Mage/Usa/Model/Shipping/Carrier/Ups.php @@ -209,7 +209,7 @@ protected function _getCgiQuotes() '14_origCountry' => $r->getOrigCountry(), '15_origPostal' => $r->getOrigPostal(), 'origCity' => $r->getOrigCity(), - '19_destPostal' => substr($r->getDestPostal(), 0, 5), + '19_destPostal' => 'US' == $r->getDestCountry() ? substr($r->getDestPostal(), 0, 5) : $r->getDestPostal(), // UPS returns error for zip+4 US codes '22_destCountry' => $r->getDestCountry(), '23_weight' => $r->getWeight(), '47_rate_chart' => $r->getPickup(), @@ -512,7 +512,7 @@ protected function _getXmlQuotes() '15_origPostal' => $r->getOrigPostal(), 'origCity' => $r->getOrigCity(), 'origRegionCode' => $r->getOrigRegionCode(), - '19_destPostal' => substr($r->getDestPostal(), 0, 5), + '19_destPostal' => 'US' == $r->getDestCountry() ? substr($r->getDestPostal(), 0, 5) : $r->getDestPostal(), // UPS returns error for zip+4 US codes '22_destCountry' => $r->getDestCountry(), 'destRegionCode' => $r->getDestRegionCode(), '23_weight' => $r->getWeight(), @@ -601,6 +601,7 @@ protected function _getXmlQuotes() XMLRequest; + try { $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); @@ -609,6 +610,7 @@ protected function _getXmlQuotes() curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, $xmlRequest); curl_setopt($ch, CURLOPT_TIMEOUT, 30); + curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, (boolean)$this->getConfigFlag('mode_xml')); $xmlResponse = curl_exec ($ch); } catch (Exception $e) { $xmlResponse = ''; @@ -624,7 +626,7 @@ protected function _parseXmlResponse($xmlResponse) $xml = new Varien_Simplexml_Config(); $xml->loadString($xmlResponse); $arr = $xml->getXpath("//RatingServiceSelectionResponse/Response/ResponseStatusCode/text()"); - $success = (int)$arr[0][0]; + $success = (int)$arr[0]; if($success===1){ $arr = $xml->getXpath("//RatingServiceSelectionResponse/RatedShipment"); $allowedMethods = explode(",", $this->getConfigData('allowed_methods')); diff --git a/app/code/core/Mage/Usa/Model/Shipping/Carrier/Ups/Source/Mode.php b/app/code/core/Mage/Usa/Model/Shipping/Carrier/Ups/Source/Mode.php new file mode 100644 index 0000000000..38e48cd2f2 --- /dev/null +++ b/app/code/core/Mage/Usa/Model/Shipping/Carrier/Ups/Source/Mode.php @@ -0,0 +1,43 @@ + + */ +class Mage_Usa_Model_Shipping_Carrier_Ups_Source_Mode +{ + public function toOptionArray() + { + return array( + array('value' => '1', 'label' => Mage::helper('usa')->__('Live')), + array('value' => '0', 'label' => Mage::helper('usa')->__('Development')), + ); + } +} diff --git a/app/code/core/Mage/Usa/etc/config.xml b/app/code/core/Mage/Usa/etc/config.xml index 5beb17430f..dafc41d5ec 100644 --- a/app/code/core/Mage/Usa/etc/config.xml +++ b/app/code/core/Mage/Usa/etc/config.xml @@ -164,6 +164,7 @@ F O 0 + 1 diff --git a/app/code/core/Mage/Usa/etc/system.xml b/app/code/core/Mage/Usa/etc/system.xml index 399998ae6c..3e4b8968c1 100644 --- a/app/code/core/Mage/Usa/etc/system.xml +++ b/app/code/core/Mage/Usa/etc/system.xml @@ -814,6 +814,16 @@ 1 1 + + + Enables/Disables SSL verification of Magento server by UPS + select + usa/shipping_carrier_ups_source_mode + 3 + 1 + 1 + 0 + diff --git a/app/code/core/Mage/Widget/Block/Adminhtml/Widget.php b/app/code/core/Mage/Widget/Block/Adminhtml/Widget.php new file mode 100644 index 0000000000..79fb1e2e12 --- /dev/null +++ b/app/code/core/Mage/Widget/Block/Adminhtml/Widget.php @@ -0,0 +1,55 @@ + + */ +class Mage_Widget_Block_Adminhtml_Widget extends Mage_Adminhtml_Block_Widget_Form_Container +{ + public function __construct() + { + parent::__construct(); + + $this->_blockGroup = 'widget'; + $this->_controller = 'adminhtml'; + $this->_mode = 'widget'; + $this->_headerText = 'Widget Insertion'; + + $this->removeButton('reset'); + $this->removeButton('back'); + $this->_updateButton('save', 'label', $this->helper('widget')->__('Insert Widget')); + $this->_updateButton('save', 'class', 'add-widget'); + $this->_updateButton('save', 'id', 'insert_button'); + $this->_updateButton('save', 'onclick', 'wWidget.insertWidget()'); + + $this->_formScripts[] = 'wWidget = new WysiwygWidget.Widget("edit_form", "select_widget_type", "widget_options", "' + . $this->getUrl('*/*/loadOptions').'", "' . $this->getRequest()->getParam('widget_target_id') . '");'; + } +} diff --git a/app/code/core/Mage/Adminhtml/Block/Cms/Widget/Chooser.php b/app/code/core/Mage/Widget/Block/Adminhtml/Widget/Chooser.php similarity index 94% rename from app/code/core/Mage/Adminhtml/Block/Cms/Widget/Chooser.php rename to app/code/core/Mage/Widget/Block/Adminhtml/Widget/Chooser.php index 636c39c592..e768fc9469 100644 --- a/app/code/core/Mage/Adminhtml/Block/Cms/Widget/Chooser.php +++ b/app/code/core/Mage/Widget/Block/Adminhtml/Widget/Chooser.php @@ -19,7 +19,7 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category Mage - * @package Mage_Adminhtml + * @package Mage_Widget * @copyright Copyright (c) 2009 Irubin Consulting Inc. DBA Varien (http://www.varien.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -32,7 +32,7 @@ * @author Magento Core Team */ -class Mage_Adminhtml_Block_Cms_Widget_Chooser extends Mage_Adminhtml_Block_Template +class Mage_Widget_Block_Adminhtml_Widget_Chooser extends Mage_Adminhtml_Block_Template { /** * Chooser source URL getter @@ -79,8 +79,8 @@ public function getConfig() // chooser control buttons $buttons = array( - 'open' => Mage::helper('cms')->__('Choose...'), - 'close' => Mage::helper('cms')->__('Close') + 'open' => Mage::helper('widget')->__('Choose...'), + 'close' => Mage::helper('widget')->__('Close') ); if (isset($configArray['button']) && is_array($configArray['button'])) { foreach ($configArray['button'] as $id => $label) { @@ -102,7 +102,7 @@ public function getTranslationHelper() if ($this->_getData('translation_helper') instanceof Mage_Core_Helper_Abstract) { return $this->_getData('translation_helper'); } - return $this->helper('cms'); + return $this->helper('widget'); } /** @@ -176,7 +176,7 @@ protected function _toHtml() - + '; } } diff --git a/app/code/core/Mage/Widget/Block/Adminhtml/Widget/Form.php b/app/code/core/Mage/Widget/Block/Adminhtml/Widget/Form.php new file mode 100644 index 0000000000..fad7a12922 --- /dev/null +++ b/app/code/core/Mage/Widget/Block/Adminhtml/Widget/Form.php @@ -0,0 +1,132 @@ + + */ + +class Mage_Widget_Block_Adminhtml_Widget_Form extends Mage_Adminhtml_Block_Widget_Form +{ + /** + * Form with widget to select + */ + protected function _prepareForm() + { + $form = new Varien_Data_Form(); + + $fieldset = $form->addFieldset('base_fieldset', array( + 'legend' => $this->helper('widget')->__('Widget') + )); + + $select = $fieldset->addField('select_widget_type', 'select', array( + 'label' => $this->helper('widget')->__('Widget Type'), + 'title' => $this->helper('widget')->__('Widget Type'), + 'name' => 'widget_type', + 'required' => true, + 'options' => $this->_getWidgetSelectOptions(), + 'after_element_html' => $this->_getWidgetSelectAfterHtml(), + )); + + $form->setUseContainer(true); + $form->setId('edit_form'); + $form->setMethod('post'); + $form->setAction($this->getUrl('*/*/buildWidget')); + $this->setForm($form); + } + + /** + * Prepare options for widgets HTML select + * + * @return array + */ + protected function _getWidgetSelectOptions() + { + foreach ($this->_getAvailableWidgets(true) as $data) { + $options[$data['type']] = $data['name']; + } + return $options; + } + + /** + * Prepare widgets select after element HTML + * + * @return string + */ + protected function _getWidgetSelectAfterHtml() + { + $html = '

'; + $i = 0; + foreach ($this->_getAvailableWidgets(true) as $data) { + $html .= sprintf('
%s
', $i, $data['description']); + $i++; + } + return $html; + } + + /** + * Return array of available widgets based on configuration + * + * @return array + */ + protected function _getAvailableWidgets($withEmptyElement = false) + { + if (!$this->hasData('available_widgets')) { + $result = array(); + $allWidgets = Mage::getModel('widget/widget')->getWidgetsArray(); + $skipped = $this->_getSkippedWidgets(); + foreach ($allWidgets as $widget) { + if (is_array($skipped) && in_array($widget['type'], $skipped)) { + continue; + } + $result[] = $widget; + } + if ($withEmptyElement) { + array_unshift($result, array( + 'type' => '', + 'name' => $this->helper('adminhtml')->__('-- Please Select --'), + 'description' => '', + )); + } + $this->setData('available_widgets', $result); + } + + return $this->_getData('available_widgets'); + } + + /** + * Return array of widgets disabled for selection + * + * @return array + */ + protected function _getSkippedWidgets() + { + return Mage::registry('skip_widgets'); + } +} diff --git a/app/code/core/Mage/Widget/Block/Adminhtml/Widget/Instance.php b/app/code/core/Mage/Widget/Block/Adminhtml/Widget/Instance.php new file mode 100644 index 0000000000..bbcb91ffbc --- /dev/null +++ b/app/code/core/Mage/Widget/Block/Adminhtml/Widget/Instance.php @@ -0,0 +1,47 @@ + + */ +class Mage_Widget_Block_Adminhtml_Widget_Instance extends Mage_Adminhtml_Block_Widget_Grid_Container +{ + /** + * Block constructor + */ + public function __construct() + { + $this->_blockGroup = 'widget'; + $this->_controller = 'adminhtml_widget_instance'; + $this->_headerText = Mage::helper('widget')->__('Manage Widget Instances'); + parent::__construct(); + $this->_updateButton('add', 'label', Mage::helper('widget')->__('Add New Widget Instance')); + } +} diff --git a/app/code/core/Mage/Widget/Block/Adminhtml/Widget/Instance/Edit.php b/app/code/core/Mage/Widget/Block/Adminhtml/Widget/Instance/Edit.php new file mode 100644 index 0000000000..00da707a30 --- /dev/null +++ b/app/code/core/Mage/Widget/Block/Adminhtml/Widget/Instance/Edit.php @@ -0,0 +1,116 @@ + + */ +class Mage_Widget_Block_Adminhtml_Widget_Instance_Edit extends Mage_Adminhtml_Block_Widget_Form_Container +{ + /** + * Internal constructor + * + */ + protected function _construct() + { + parent::_construct(); + $this->_objectId = 'instance_id'; + $this->_blockGroup = 'widget'; + $this->_controller = 'adminhtml_widget_instance'; + } + + /** + * Getter + * + * @return Mage_Widget_Model_Widget_Instance + */ + public function getWidgetInstance() + { + return Mage::registry('current_widget_instance'); + } + + /** + * Prepare layout. + * Adding save_and_continue button + * + * @return Mage_Widget_Block_Adminhtml_Widget_Instance_Edit + */ + protected function _preparelayout() + { + if ($this->getWidgetInstance()->isCompleteToCreate()) { + $this->_addButton( + 'save_and_edit_button', + array( + 'label' => Mage::helper('widget')->__('Save and Continue Edit'), + 'class' => 'save', + 'onclick' => 'saveAndContinueEdit()' + ), + 100 + ); + } else { + $this->removeButton('save'); + } + return parent::_prepareLayout(); + } + + /** + * Return translated header text depending on creating/editing action + * + * @return string + */ + public function getHeaderText() + { + if ($this->getWidgetInstance()->getId()) { + return Mage::helper('widget')->__('Widget "%s"', $this->htmlEscape($this->getWidgetInstance()->getTitle())); + } + else { + return Mage::helper('widget')->__('New Widget Instance'); + } + } + + /** + * Return validation url for edit form + * + * @return string + */ + public function getValidationUrl() + { + return $this->getUrl('*/*/validate', array('_current'=>true)); + } + + /** + * Return save url for edit form + * + * @return string + */ + public function getSaveUrl() + { + return $this->getUrl('*/*/save', array('_current'=>true, 'back'=>null)); + } +} diff --git a/app/code/core/Mage/Widget/Block/Adminhtml/Widget/Instance/Edit/Chooser/Block.php b/app/code/core/Mage/Widget/Block/Adminhtml/Widget/Instance/Edit/Chooser/Block.php new file mode 100644 index 0000000000..049f921dbe --- /dev/null +++ b/app/code/core/Mage/Widget/Block/Adminhtml/Widget/Instance/Edit/Chooser/Block.php @@ -0,0 +1,253 @@ + + */ +class Mage_Widget_Block_Adminhtml_Widget_Instance_Edit_Chooser_Block + extends Mage_Adminhtml_Block_Widget +{ + protected $_layoutHandlesXml = null; + + protected $_layoutHandleUpdates = array(); + + protected $_layoutHandleUpdatesXml = null; + + protected $_layoutHandle = array(); + + protected $_blocks = array(); + + protected $_allowedBlocks = array(); + + /** + * Setter + * + * @param array $allowedBlocks + * @return Mage_Widget_Block_Adminhtml_Widget_Instance_Edit_Chooser_Block + */ + public function setAllowedBlocks($allowedBlocks) + { + $this->_allowedBlocks = $allowedBlocks; + return $this; + } + + /** + * Add allowed block + * + * @param string $block + * @return Mage_Widget_Block_Adminhtml_Widget_Instance_Edit_Chooser_Block + */ + public function addAllowedBlock($block) + { + $this->_allowedBlocks[] = $type; + return $this; + } + + /** + * Getter + * + * @return array + */ + public function getAllowedBlocks() + { + return $this->_allowedBlocks; + } + + /** + * Setter + * If string given exlopde to array by ',' delimiter + * + * @param string|array $layoutHandle + * @return Mage_Widget_Block_Adminhtml_Widget_Instance_Edit_Chooser_Block + */ + public function setLayoutHandle($layoutHandle) + { + if (is_string($layoutHandle)) { + $layoutHandle = explode(',', $layoutHandle); + } + $this->_layoutHandle = array_merge(array('default'), $layoutHandle); + return $this; + } + + /** + * Getter + * + * @return array + */ + public function getLayoutHandle() + { + return $this->_layoutHandle; + } + + /** + * Getter + * + * @return string + */ + public function getArea() + { + if (!$this->_getData('area')) { + return Mage_Core_Model_Design_Package::DEFAULT_AREA; + } + return $this->_getData('area'); + } + + /** + * Getter + * + * @return string + */ + public function getPackage() + { + if (!$this->_getData('package')) { + return Mage_Core_Model_Design_Package::DEFAULT_PACKAGE; + } + return $this->_getData('package'); + } + + /** + * Getter + * + * @return string + */ + public function getTheme() + { + if (!$this->_getData('theme')) { + return Mage_Core_Model_Design_Package::DEFAULT_THEME; + } + return $this->_getData('theme'); + } + + /** + * Prepare html output + * + * @return string + */ + protected function _toHtml() + { + $selectBlock = $this->getLayout()->createBlock('core/html_select') + ->setName('block') + ->setClass('required-entry select') + ->setExtraParams('onchange="WidgetInstance.loadSelectBoxByType(\'block_template\', this.up(\'div.group_container\'), this.value)"') + ->setOptions($this->getBlocks()) + ->setValue($this->getSelected()); + return parent::_toHtml().$selectBlock->toHtml(); + } + + /** + * Retrieve blocks array + * + * @return array + */ + public function getBlocks() + { + if (empty($this->_blocks)) { + /* @var $update Mage_Core_Model_Layout_Update */ + $update = Mage::getModel('core/layout')->getUpdate(); + /* @var $layoutHandles Mage_Core_Model_Layout_Element */ + $this->_layoutHandlesXml = $update->getFileLayoutUpdatesXml( + $this->getArea(), + $this->getPackage(), + $this->getTheme()); + $this->_collectLayoutHandles(); + $this->_collectBlocks(); + array_unshift($this->_blocks, array( + 'value' => '', + 'label' => Mage::helper('widget')->__('-- Please Select --') + )); + } + return $this->_blocks; + } + + /** + * Merging layout handles and create xml of merged layout handles + * + */ + protected function _collectLayoutHandles() + { + foreach ($this->getLayoutHandle() as $handle) { + $this->_mergeLayoutHandles($handle); + } + $updatesStr = '<'.'?xml version="1.0"?'.'>'.implode('', $this->_layoutHandleUpdates).''; + $this->_layoutHandleUpdatesXml = simplexml_load_string($updatesStr, 'Varien_Simplexml_Element'); + } + + /** + * Adding layout handle that specified in node 'update' to general layout handles + * + * @param string $handle + */ + public function _mergeLayoutHandles($handle) + { + foreach ($this->_layoutHandlesXml->{$handle} as $updateXml) { + foreach ($updateXml->children() as $child) { + if (strtolower($child->getName()) == 'update' && isset($child['handle'])) { + $this->_mergeLayoutHandles((string)$child['handle']); + } + } + $this->_layoutHandleUpdates[] = $updateXml->asNiceXml(); + } + } + + + /** + * Filter and collect blocks into array + */ + protected function _collectBlocks() + { + if ($blocks = $this->_layoutHandleUpdatesXml->xpath('//block/label/..')) { + /* @var $block Mage_Core_Model_Layout_Element */ + foreach ($blocks as $block) { + if ((string)$block->getAttribute('name') && $this->_filterBlock($block)) { + $helper = Mage::helper(Mage_Core_Model_Layout::findTranslationModuleName($block)); + $this->_blocks[(string)$block->getAttribute('name')] = $helper->__((string)$block->label); + } + } + } + asort($this->_blocks, SORT_STRING); + } + + /** + * Check whether given block match allowed block types + * + * @param Mage_Core_Model_Layout_Element $block + * @return boolean + */ + protected function _filterBlock($block) + { + if (!$this->getAllowedBlocks()) { + return true; + } + if (in_array((string)$block->getAttribute('name'), $this->getAllowedBlocks())) { + return true; + } + return false; + } +} diff --git a/app/code/core/Mage/Widget/Block/Adminhtml/Widget/Instance/Edit/Chooser/Layout.php b/app/code/core/Mage/Widget/Block/Adminhtml/Widget/Instance/Edit/Chooser/Layout.php new file mode 100644 index 0000000000..235cd94bc3 --- /dev/null +++ b/app/code/core/Mage/Widget/Block/Adminhtml/Widget/Instance/Edit/Chooser/Layout.php @@ -0,0 +1,190 @@ + + */ +class Mage_Widget_Block_Adminhtml_Widget_Instance_Edit_Chooser_Layout + extends Mage_Adminhtml_Block_Widget +{ + protected $_layoutHandles = array(); + + /** + * layout handles wildcar patterns + * + * @var array + */ + protected $_layoutHandlePatterns = array( + '^default$', + '^catalog_category_*', + '^catalog_product_*', + '^PRODUCT_*' + ); + + /** + * Constructor + */ + protected function _construct() + { + parent::_construct(); + } + + /** + * Add not allowed layout handle pattern + * + * @param string $pattern + * @return Mage_Widget_Block_Adminhtml_Widget_Instance_Edit_Chooser_Layout + */ + public function addLayoutHandlePattern($pattern) + { + $this->_layoutHandlePatterns[] = $pattern; + return $this; + } + + /** + * Getter + * + * @return array + */ + public function getLayoutHandlePatterns() + { + return $this->_layoutHandlePatterns; + } + + /** + * Getter + * + * @return string + */ + public function getArea() + { + if (!$this->_getData('area')) { + return Mage_Core_Model_Design_Package::DEFAULT_AREA; + } + return $this->_getData('area'); + } + + /** + * Getter + * + * @return string + */ + public function getPackage() + { + if (!$this->_getData('package')) { + return Mage_Core_Model_Design_Package::DEFAULT_PACKAGE; + } + return $this->_getData('package'); + } + + /** + * Getter + * + * @return string + */ + public function getTheme() + { + if (!$this->_getData('theme')) { + return Mage_Core_Model_Design_Package::DEFAULT_THEME; + } + return $this->_getData('theme'); + } + + /** + * Prepare html output + * + * @return string + */ + protected function _toHtml() + { + $selectBlock = $this->getLayout()->createBlock('core/html_select') + ->setName($this->getSelectName()) + ->setId('layout_handle') + ->setClass('select') + ->setExtraParams("onchange=\"WidgetInstance.loadSelectBoxByType(\'block_reference\', this.up(\'div.pages\'), this.value)\"") + ->setOptions($this->getLayoutHandles( + $this->getArea(), + $this->getPackage(), + $this->getTheme())); + return parent::_toHtml().$selectBlock->toHtml(); + } + + /** + * Retrieve layout handles + * + * @param string $area + * @param string $package + * @param string $theme + * @return array + */ + public function getLayoutHandles($area, $package, $theme) + { + if (empty($this->_layoutHandles)) { + /* @var $update Mage_Core_Model_Layout_Update */ + $update = Mage::getModel('core/layout')->getUpdate(); + $this->_layoutHandles[''] = Mage::helper('widget')->__('-- Please Select --'); + $this->_collectLayoutHandles($update->getFileLayoutUpdatesXml($area, $package, $theme)); + } + return $this->_layoutHandles; + } + + /** + * Filter and collect layout handles into array + * + * @param Mage_Core_Model_Layout_Element $layoutHandles + */ + protected function _collectLayoutHandles($layoutHandles) + { + if ($layoutHandlesArr = $layoutHandles->xpath('/*/*/label/..')) { + foreach ($layoutHandlesArr as $node) { + if ($this->_filterLayoutHandle($node->getName())) { + $helper = Mage::helper(Mage_Core_Model_Layout::findTranslationModuleName($node)); + $this->_layoutHandles[$node->getName()] = $helper->__((string)$node->label); + } + } + asort($this->_layoutHandles, SORT_STRING); + } + } + + /** + * Check if given layout handle allowed (do not match not allowed patterns) + * + * @param string $layoutHandle + * @return boolean + */ + protected function _filterLayoutHandle($layoutHandle) + { + $wildCard = '/('.implode(')|(', $this->getLayoutHandlePatterns()).')/'; + if (preg_match($wildCard, $layoutHandle)) { + return false; + } + return true; + } +} diff --git a/app/code/core/Mage/Widget/Block/Adminhtml/Widget/Instance/Edit/Chooser/Template.php b/app/code/core/Mage/Widget/Block/Adminhtml/Widget/Instance/Edit/Chooser/Template.php new file mode 100644 index 0000000000..3290009ceb --- /dev/null +++ b/app/code/core/Mage/Widget/Block/Adminhtml/Widget/Instance/Edit/Chooser/Template.php @@ -0,0 +1,59 @@ + + */ +class Mage_Widget_Block_Adminhtml_Widget_Instance_Edit_Chooser_Template + extends Mage_Adminhtml_Block_Widget +{ + /** + * Prepare html output + * + * @return string + */ + protected function _toHtml() + { + if (!$this->getWidgetTemplates()) { + $html = '

' . Mage::helper('widget')->__('Please Select Block Reference First') . '

'; + } elseif (count($this->getWidgetTemplates()) == 1) { + $widgetTemplate = current($this->getWidgetTemplates()); + $html = ''; + $html .= $widgetTemplate['label']; + } else { + $html = $this->getLayout()->createBlock('core/html_select') + ->setName('template') + ->setClass('select') + ->setOptions($this->getWidgetTemplates()) + ->setValue($this->getSelected())->toHtml(); + } + return parent::_toHtml().$html; + } +} diff --git a/app/code/core/Mage/Widget/Block/Adminhtml/Widget/Instance/Edit/Form.php b/app/code/core/Mage/Widget/Block/Adminhtml/Widget/Instance/Edit/Form.php new file mode 100644 index 0000000000..eb85e3c434 --- /dev/null +++ b/app/code/core/Mage/Widget/Block/Adminhtml/Widget/Instance/Edit/Form.php @@ -0,0 +1,49 @@ + + */ +class Mage_Widget_Block_Adminhtml_Widget_Instance_Edit_Form extends Mage_Adminhtml_Block_Widget_Form +{ + /** + * Prepare form before rendering HTML + * + * @return Mage_Widget_Block_Adminhtml_Widget_Instance_Edit_Form + */ + protected function _prepareForm() + { + $form = new Varien_Data_Form(array('id' => 'edit_form', 'action' => $this->getData('action'), 'method' => 'post')); + $form->setUseContainer(true); + $this->setForm($form); + return parent::_prepareForm(); + } + +} diff --git a/app/code/core/Mage/Widget/Block/Adminhtml/Widget/Instance/Edit/Tab/Main.php b/app/code/core/Mage/Widget/Block/Adminhtml/Widget/Instance/Edit/Tab/Main.php new file mode 100644 index 0000000000..683df29e52 --- /dev/null +++ b/app/code/core/Mage/Widget/Block/Adminhtml/Widget/Instance/Edit/Tab/Main.php @@ -0,0 +1,215 @@ + + */ +class Mage_Widget_Block_Adminhtml_Widget_Instance_Edit_Tab_Main + extends Mage_Adminhtml_Block_Widget_Form + implements Mage_Adminhtml_Block_Widget_Tab_Interface +{ + /** + * Internal constructor + * + */ + protected function _construct() + { + parent::_construct(); + $this->setActive(true); + } + + /** + * Prepare label for tab + * + * @return string + */ + public function getTabLabel() + { + return Mage::helper('widget')->__('Frontend Properties'); + } + + /** + * Prepare title for tab + * + * @return string + */ + public function getTabTitle() + { + return Mage::helper('widget')->__('Frontend Properties'); + } + + /** + * Returns status flag about this tab can be showen or not + * + * @return true + */ + public function canShowTab() + { + return $this->getWidgetInstance()->isCompleteToCreate(); + } + + /** + * Returns status flag about this tab hidden or not + * + * @return true + */ + public function isHidden() + { + return false; + } + + /** + * Getter + * + * @return Widget_Model_Widget_Instance + */ + public function getWidgetInstance() + { + return Mage::registry('current_widget_instance'); + } + + /** + * Prepare form before rendering HTML + * + * @return Mage_Widget_Block_Adminhtml_Widget_Instance_Edit_Tab_Main + */ + protected function _prepareForm() + { + $widgetInstance = $this->getWidgetInstance(); + $form = new Varien_Data_Form(array( + 'id' => 'edit_form', + 'action' => $this->getData('action'), + 'method' => 'post' + )); + + $fieldset = $form->addFieldset('base_fieldset', + array('legend' => Mage::helper('widget')->__('Frontend Properties')) + ); + + if ($widgetInstance->getId()) { + $fieldset->addField('instance_id', 'hidden', array( + 'name' => 'isntance_id', + )); + } + + $this->_addElementTypes($fieldset); + + $fieldset->addField('type', 'select', array( + 'name' => 'type', + 'label' => Mage::helper('widget')->__('Type'), + 'title' => Mage::helper('widget')->__('Type'), + 'class' => '', + 'values' => $this->getTypesOptionsArray(), + 'disabled' => true + )); + + $fieldset->addField('package_theme', 'select', array( + 'name' => 'package_theme', + 'label' => Mage::helper('widget')->__('Design Package/Theme'), + 'title' => Mage::helper('widget')->__('Design Package/Theme'), + 'required' => false, + 'values' => $this->getPackegeThemeOptionsArray(), + 'disabled' => true + )); + + $fieldset->addField('title', 'text', array( + 'name' => 'title', + 'label' => Mage::helper('widget')->__('Widget Instance Title'), + 'title' => Mage::helper('widget')->__('Widget Instance Title'), + 'class' => '', + 'required' => true, + )); + + if (!Mage::app()->isSingleStoreMode()) { + $fieldset->addField('store_ids', 'multiselect', array( + 'name' => 'store_ids[]', + 'label' => Mage::helper('widget')->__('Assign to Store Views'), + 'title' => Mage::helper('widget')->__('Assign to Store Views'), + 'required' => true, + 'values' => Mage::getSingleton('adminhtml/system_store')->getStoreValuesForForm(false, true), + )); + } + + $fieldset->addField('sort_order', 'text', array( + 'name' => 'sort_order', + 'label' => Mage::helper('widget')->__('Sort Order'), + 'title' => Mage::helper('widget')->__('Sort Order'), + 'class' => '', + 'required' => false, + 'note' => Mage::helper('widget')->__('Sort Order of widget instances in the same block reference') + )); + + /* @var $layoutBlock Mage_Widget_Block_Adminhtml_Widget_Instance_Edit_Tab_Main_Layout */ + $layoutBlock = $this->getLayout() + ->createBlock('widget/adminhtml_widget_instance_edit_tab_main_layout') + ->setWidgetInstance($widgetInstance); + $fieldset = $form->addFieldset('layout_updates_fieldset', + array('legend' => Mage::helper('widget')->__('Layout Updates')) + ); + $fieldset->addField('layout_updates', 'note', array( + )); + $form->getElement('layout_updates_fieldset')->setRenderer($layoutBlock); + $this->setForm($form); + + return parent::_prepareForm(); + } + + /** + * Retrieve array (widget_type => widget_name) of available widgets + * + * @return array + */ + public function getTypesOptionsArray() + { + return $this->getWidgetInstance()->getWidgetsOptionArray(); + } + + /** + * Retrieve design package/theme options array + * + * @return array + */ + public function getPackegeThemeOptionsArray() + { + return Mage::getModel('core/design_source_design') + ->setIsFullLabel(true)->getAllOptions(true); + } + + /** + * Initialize form fileds values + * + * @return Mage_Widget_Block_Adminhtml_Widget_Instance_Edit_Tab_Main + */ + protected function _initFormValues() + { + $this->getForm()->addValues($this->getWidgetInstance()->getData()); + return parent::_initFormValues(); + } +} diff --git a/app/code/core/Mage/Widget/Block/Adminhtml/Widget/Instance/Edit/Tab/Main/Layout.php b/app/code/core/Mage/Widget/Block/Adminhtml/Widget/Instance/Edit/Tab/Main/Layout.php new file mode 100644 index 0000000000..529846f962 --- /dev/null +++ b/app/code/core/Mage/Widget/Block/Adminhtml/Widget/Instance/Edit/Tab/Main/Layout.php @@ -0,0 +1,315 @@ + + */ +class Mage_Widget_Block_Adminhtml_Widget_Instance_Edit_Tab_Main_Layout + extends Mage_Adminhtml_Block_Template implements Varien_Data_Form_Element_Renderer_Interface +{ + /** + * @var Varien_Data_Form_Element_Abstract + */ + protected $_element = null; + + /** + * Internal constructor + */ + protected function _construct() + { + parent::_construct(); + $this->setTemplate('widget/instance/edit/layout.phtml'); + } + + /** + * Render given element (return html of element) + * + * @return string + */ + public function render(Varien_Data_Form_Element_Abstract $element) + { + $this->setElement($element); + return $this->toHtml(); + } + + /** + * Setter + * + * @param Varien_Data_Form_Element_Abstract $element + * @return + */ + public function setElement(Varien_Data_Form_Element_Abstract $element) + { + $this->_element = $element; + return $this; + } + + /** + * Getter + * + * @return Varien_Data_Form_Element_Abstract + */ + public function getElement() + { + return $this->_element; + } + + /** + * Generate url to get categories chooser by ajax query + * + * @return string + */ + public function getCategoriesChooserUrl() + { + return $this->getUrl('*/*/categories', array('_current' => true)); + } + + /** + * Generate url to get products chooser by ajax query + * + * @return string + */ + public function getProductsChooserUrl() + { + return $this->getUrl('*/*/products', array('_current' => true)); + } + + /** + * Generate url to get reference block chooser by ajax query + * + * @return string + */ + public function getBlockChooserUrl() + { + return $this->getUrl('*/*/blocks', array('_current' => true)); + } + + /** + * Generate url to get template chooser by ajax query + * + * @return string + */ + public function getTemplateChooserUrl() + { + return $this->getUrl('*/*/template', array('_current' => true)); + } + + /** + * Create and return html of select box Display On + * + * @return string + */ + public function getDisplayOnSelectHtml() + { + $selectBlock = $this->getLayout()->createBlock('core/html_select') + ->setName('widget_instance[{{id}}][page_group]') + ->setId('widget_instance[{{id}}][page_group]') + ->setClass('required-entry page_group_select select') + ->setExtraParams("onchange=\"WidgetInstance.displayPageGroup(this.value+\'_{{id}}\')\"") + ->setOptions($this->_getDisplayOnOptions()); + return $selectBlock->toHtml(); + } + + /** + * Retrieve Display On options array. + * - Categories (anchor and not anchor) + * - Products (product types depend on configuration) + * - Generic (predefined) pages (all pages and single layout update) + * + * @return array + */ + protected function _getDisplayOnOptions() + { + $options = array(); + $options[] = array( + 'value' => '', + 'label' => Mage::helper('widget')->__('-- Please Select --') + ); + $options[] = array( + 'label' => Mage::helper('widget')->__('Categories'), + 'value' => array( + array( + 'value' => 'anchor_categories', + 'label' => Mage::helper('widget')->__('Anchor Categories') + ), + array( + 'value' => 'notanchor_categories', + 'label' => Mage::helper('widget')->__('Non-Anchor Categories') + ) + ) + ); + foreach (Mage_Catalog_Model_Product_Type::getTypes() as $typeId => $type) { + $productsOptions[] = array( + 'value' => $typeId.'_products', + 'label' => $type['label'] + ); + } + array_unshift($productsOptions, array( + 'value' => 'all_products', + 'label' => Mage::helper('widget')->__('All Product Types') + )); + $options[] = array( + 'label' => Mage::helper('widget')->__('Products'), + 'value' => $productsOptions + ); + $options[] = array( + 'label' => Mage::helper('widget')->__('Generic Pages'), + 'value' => array( + array( + 'value' => 'all_pages', + 'label' => Mage::helper('widget')->__('All Pages') + ), + array( + 'value' => 'pages', + 'label' => Mage::helper('widget')->__('Specified Page') + ) + ) + ); + return $options; + } + + /** + * Generate array of parameters for every container type to create html template + * + * @return array + */ + public function getDisplayOnContainers() + { + $container = array(); + $container['anchor'] = array( + 'label' => 'Categories', + 'code' => 'categories', + 'name' => 'anchor_categories', + 'layout_handle' => 'default,catalog_category_layered', + 'is_anchor_only' => 1, + 'product_type_id' => '' + ); + $container['notanchor'] = array( + 'label' => 'Categories', + 'code' => 'categories', + 'name' => 'notanchor_categories', + 'layout_handle' => 'default,catalog_category_default', + 'is_anchor_only' => 0, + 'product_type_id' => '' + ); + $container['all_products'] = array( + 'label' => 'Products', + 'code' => 'products', + 'name' => 'all_products', + 'layout_handle' => 'default,catalog_product_view', + 'is_anchor_only' => '', + 'product_type_id' => '' + ); + foreach (Mage_Catalog_Model_Product_Type::getTypes() as $typeId => $type) { + $container[$typeId] = array( + 'label' => 'Products', + 'code' => 'products', + 'name' => $typeId . '_products', + 'layout_handle' => 'default,catalog_product_view,PRODUCT_TYPE_'.$typeId, + 'is_anchor_only' => '', + 'product_type_id' => $typeId + ); + } + return $container; + } + + /** + * Retrieve layout select chooser html + * + * @return string + */ + public function getLayoutsChooser() + { + $layouts = $this->getLayout() + ->createBlock('widget/adminhtml_widget_instance_edit_chooser_layout') + ->setSelectName('widget_instance[{{id}}][pages][layout_handle]') + ->setArea($this->getWidgetInstance()->getArea()) + ->setPackage($this->getWidgetInstance()->getPackage()) + ->setTheme($this->getWidgetInstance()->getTheme()); + return $layouts->toHtml(); + } + + /** + * Retrieve add layout button html + * + * @return string + */ + public function getAddLayoutButtonHtml() + { + $button = $this->getLayout()->createBlock('adminhtml/widget_button') + ->setData(array( + 'label' => Mage::helper('widget')->__('Add Layout Update'), + 'onclick' => 'WidgetInstance.addPageGroup({})', + 'class' => 'add' + )); + return $button->toHtml(); + } + + /** + * Retrieve remove layout button html + * + * @return string + */ + public function getRemoveLayoutButtonHtml() + { + $button = $this->getLayout()->createBlock('adminhtml/widget_button') + ->setData(array( + 'label' => Mage::helper('widget')->__('Remove Layout Update'), + 'onclick' => 'WidgetInstance.removePageGroup(this)', + 'class' => 'delete' + )); + return $button->toHtml(); + } + + /** + * Prepare and retrieve page groups data of widget instance + * + * @return array + */ + public function getPageGroups() + { + $widgetInstance = $this->getWidgetInstance(); + $pageGroups = array(); + if ($widgetInstance->getPageGroups()) { + foreach ($widgetInstance->getPageGroups() as $pageGroup) { + $pageGroups[] = array( + 'page_id' => $pageGroup['page_id'], + 'group' => $pageGroup['group'], + 'block' => $pageGroup['block_reference'], + 'for_value' => $pageGroup['for'], + 'layout_handle' => $pageGroup['layout_handle'], + $pageGroup['group'].'_entities' => $pageGroup['entities'], + 'template' => $pageGroup['template'] + ); + } + } + return $pageGroups; + } +} diff --git a/app/code/core/Mage/Widget/Block/Adminhtml/Widget/Instance/Edit/Tab/Properties.php b/app/code/core/Mage/Widget/Block/Adminhtml/Widget/Instance/Edit/Tab/Properties.php new file mode 100644 index 0000000000..50a5c574a9 --- /dev/null +++ b/app/code/core/Mage/Widget/Block/Adminhtml/Widget/Instance/Edit/Tab/Properties.php @@ -0,0 +1,114 @@ + + */ +class Mage_Widget_Block_Adminhtml_Widget_Instance_Edit_Tab_Properties + extends Mage_Widget_Block_Adminhtml_Widget_Options + implements Mage_Adminhtml_Block_Widget_Tab_Interface +{ + /** + * Prepare label for tab + * + * @return string + */ + public function getTabLabel() + { + return Mage::helper('widget')->__('Widget Options'); + } + + /** + * Prepare title for tab + * + * @return string + */ + public function getTabTitle() + { + return Mage::helper('widget')->__('Widget Options'); + } + + /** + * Returns status flag about this tab can be showen or not + * + * @return true + */ + public function canShowTab() + { + return $this->getWidgetInstance()->isCompleteToCreate(); + } + + /** + * Returns status flag about this tab hidden or not + * + * @return true + */ + public function isHidden() + { + return false; + } + + /** + * Getter + * + * @return age_Widget_Model_Widget_Instance + */ + public function getWidgetInstance() + { + return Mage::registry('current_widget_instance'); + } + + /** + * Prepare block children and data. + * Set widget type and widget parameters if available + * + * @return Mage_Widget_Block_Adminhtml_Widget_Instance_Edit_Tab_Properties + */ + protected function _preparelayout() + { + $this->setWidgetType($this->getWidgetInstance()->getType()) + ->setWidgetValues($this->getWidgetInstance()->getWidgetParameters()); + return parent::_prepareLayout(); + } + + /** + * Add field to Options form based on option configuration + * + * @param Varien_Object $parameter + * @return Varien_Data_Form_Element_Abstract + */ + protected function _addField($parameter) + { + if ($parameter->getKey() != 'template') { + return parent::_addField($parameter); + } + return false; + } +} diff --git a/app/code/core/Mage/Widget/Block/Adminhtml/Widget/Instance/Edit/Tab/Settings.php b/app/code/core/Mage/Widget/Block/Adminhtml/Widget/Instance/Edit/Tab/Settings.php new file mode 100644 index 0000000000..8870cdb494 --- /dev/null +++ b/app/code/core/Mage/Widget/Block/Adminhtml/Widget/Instance/Edit/Tab/Settings.php @@ -0,0 +1,196 @@ + + */ +class Mage_Widget_Block_Adminhtml_Widget_Instance_Edit_Tab_Settings + extends Mage_Adminhtml_Block_Widget_Form + implements Mage_Adminhtml_Block_Widget_Tab_Interface +{ + protected function _construct() + { + parent::_construct(); + $this->setActive(true); + } + + /** + * Prepare label for tab + * + * @return string + */ + public function getTabLabel() + { + return Mage::helper('widget')->__('Settings'); + } + + /** + * Prepare title for tab + * + * @return string + */ + public function getTabTitle() + { + return Mage::helper('widget')->__('Settings'); + } + + /** + * Returns status flag about this tab can be showen or not + * + * @return true + */ + public function canShowTab() + { + return !(bool)$this->getWidgetInstance()->isCompleteToCreate(); + } + + /** + * Returns status flag about this tab hidden or not + * + * @return true + */ + public function isHidden() + { + return false; + } + + /** + * Getter + * + * @return Mage_Widget_Model_Widget_Instance + */ + public function getWidgetInstance() + { + return Mage::registry('current_widget_instance'); + } + + /** + * Prepare form before rendering HTML + * + * @return Mage_Widget_Block_Adminhtml_Widget_Instance_Edit_Tab_Settings + */ + protected function _prepareForm() + { + $widgetInstance = $this->getWidgetInstance(); + $form = new Varien_Data_Form(array( + 'id' => 'edit_form', + 'action' => $this->getData('action'), + 'method' => 'post' + )); + + $fieldset = $form->addFieldset('base_fieldset', + array('legend'=>Mage::helper('widget')->__('Settings')) + ); + + $this->_addElementTypes($fieldset); + + $fieldset->addField('type', 'select', array( + 'name' => 'type', + 'label' => Mage::helper('widget')->__('Type'), + 'title' => Mage::helper('widget')->__('Type'), + 'class' => '', + 'values' => $this->getTypesOptionsArray() + )); + + $fieldset->addField('package_theme', 'select', array( + 'name' => 'package_theme', + 'label' => Mage::helper('widget')->__('Design Package/Theme'), + 'title' => Mage::helper('widget')->__('Design Package/Theme'), + 'required' => false, + 'values' => $this->getPackegeThemeOptionsArray() + )); + $continueButton = $this->getLayout() + ->createBlock('adminhtml/widget_button') + ->setData(array( + 'label' => Mage::helper('widget')->__('Continue'), + 'onclick' => "setSettings('".$this->getContinueUrl()."', 'type', 'package_theme')", + 'class' => 'save' + )); + $fieldset->addField('continue_button', 'note', array( + 'text' => $continueButton->toHtml(), + )); + + $this->setForm($form); + + return parent::_prepareForm(); + } + + /** + * Return url for continue button + * + * @return string + */ + public function getContinueUrl() + { + return $this->getUrl('*/*/*', array( + '_current' => true, + 'type' => '{{type}}', + 'package_theme' => '{{package_theme}}' + )); + } + + /** + * Retrieve array (widget_type => widget_name) of available widgets + * + * @return array + */ + public function getTypesOptionsArray() + { + $widgets = $this->getWidgetInstance()->getWidgetsOptionArray(); + array_unshift($widgets, array( + 'value' => '', + 'label' => Mage::helper('widget')->__('-- Please Select --') + )); + return $widgets; + } + + /** + * User-defined widgets sorting by Name + * + * @param array $a + * @param array $b + * @return boolean + */ + protected function _sortWidgets($a, $b) + { + return strcmp($a["label"], $b["label"]); + } + + /** + * Retrieve package/theme options array + * + * @return array + */ + public function getPackegeThemeOptionsArray() + { + return Mage::getModel('core/design_source_design') + ->setIsFullLabel(true)->getAllOptions(true); + } +} diff --git a/app/code/core/Mage/Widget/Block/Adminhtml/Widget/Instance/Edit/Tabs.php b/app/code/core/Mage/Widget/Block/Adminhtml/Widget/Instance/Edit/Tabs.php new file mode 100644 index 0000000000..c1e91f76ac --- /dev/null +++ b/app/code/core/Mage/Widget/Block/Adminhtml/Widget/Instance/Edit/Tabs.php @@ -0,0 +1,47 @@ + + */ +class Mage_Widget_Block_Adminhtml_Widget_Instance_Edit_Tabs extends Mage_Adminhtml_Block_Widget_Tabs +{ + /** + * Internal constructor + * + */ + protected function _construct() + { + parent::_construct(); + $this->setId('widget_instace_tabs'); + $this->setDestElementId('edit_form'); + $this->setTitle(Mage::helper('widget')->__('Widget Instance')); + } +} diff --git a/app/code/core/Mage/Widget/Block/Adminhtml/Widget/Instance/Grid.php b/app/code/core/Mage/Widget/Block/Adminhtml/Widget/Instance/Grid.php new file mode 100644 index 0000000000..40c46a6352 --- /dev/null +++ b/app/code/core/Mage/Widget/Block/Adminhtml/Widget/Instance/Grid.php @@ -0,0 +1,152 @@ + + */ +class Mage_Widget_Block_Adminhtml_Widget_Instance_Grid extends Mage_Adminhtml_Block_Widget_Grid +{ + /** + * Internal constructor + * + */ + protected function _construct() + { + parent::_construct(); + $this->setId('widgetInstanceGrid'); + $this->setDefaultSort('instance_id'); + $this->setDefaultDir('ASC'); + } + + /** + * Prepare grid collection object + * + * @return Mage_Widget_Block_Adminhtml_Widget_Instance_Grid + */ + protected function _prepareCollection() + { + /* @var $collection Mage_Widget_Model_Mysql4_Widget_Instance_Collection */ + $collection = Mage::getModel('widget/widget_instance')->getCollection(); + $this->setCollection($collection); + return parent::_prepareCollection(); + } + + /** + * Prepare grid columns + * + * @return Mage_Widget_Block_Adminhtml_Widget_Instance_Grid + */ + protected function _prepareColumns() + { + $this->addColumn('instance_id', array( + 'header' => Mage::helper('widget')->__('Widget ID'), + 'align' => 'left', + 'index' => 'instance_id', + )); + + $this->addColumn('title', array( + 'header' => Mage::helper('widget')->__('Widget Instance Title'), + 'align' => 'left', + 'index' => 'title', + )); + + $this->addColumn('type', array( + 'header' => Mage::helper('widget')->__('Type'), + 'align' => 'left', + 'index' => 'type', + 'type' => 'options', + 'options' => $this->getTypesOptionsArray() + )); + + $this->addColumn('package_theme', array( + 'header' => Mage::helper('widget')->__('Design Package/Theme'), + 'align' => 'left', + 'index' => 'package_theme', + 'type' => 'theme', + 'with_empty' => true, + )); + + $this->addColumn('sort_order', array( + 'header' => Mage::helper('widget')->__('Sort Order'), + 'width' => '100', + 'align' => 'center', + 'index' => 'sort_order', + )); + + return parent::_prepareColumns(); + } + + /** + * Retrieve array (widget_type => widget_name) of available widgets + * + * @return array + */ + public function getTypesOptionsArray() + { + $widgets = array(); + $widgetsOptionsArr = Mage::getModel('widget/widget_instance')->getWidgetsOptionArray(); + foreach ($widgetsOptionsArr as $widget) { + $widgets[$widget['value']] = $widget['label']; + } + return $widgets; + } + + /** + * Retrieve design package/theme options array + * + * @return array + */ + public function getPackageThemeOptionsArray() + { + $packageThemeArray = array(); + $packageThemeOptions = Mage::getModel('core/design_source_design') + ->setIsFullLabel(true)->getAllOptions(false); + foreach ($packageThemeOptions as $item) { + if (is_array($item['value'])) { + foreach ($item['value'] as $valueItem) { + $packageThemeArray[$valueItem['value']] = $valueItem['label']; + } + } else { + $packageThemeArray[$item['value']] = $item['label']; + } + } + return $packageThemeArray; + } + + /** + * Row click url + * + * @return string + */ + public function getRowUrl($row) + { + return $this->getUrl('*/*/edit', array('instance_id' => $row->getId())); + } +} diff --git a/app/code/core/Mage/Adminhtml/Block/Cms/Widget/Options.php b/app/code/core/Mage/Widget/Block/Adminhtml/Widget/Options.php similarity index 75% rename from app/code/core/Mage/Adminhtml/Block/Cms/Widget/Options.php rename to app/code/core/Mage/Widget/Block/Adminhtml/Widget/Options.php index 3379736f87..996125a8c3 100644 --- a/app/code/core/Mage/Adminhtml/Block/Cms/Widget/Options.php +++ b/app/code/core/Mage/Widget/Block/Adminhtml/Widget/Options.php @@ -1,4 +1,4 @@ - */ -class Mage_Adminhtml_Block_Cms_Widget_Options extends Mage_Adminhtml_Block_Widget_Form +class Mage_Widget_Block_Adminhtml_Widget_Options extends Mage_Adminhtml_Block_Widget_Form { + /** + * Element type used by default if configuration is omitted + * @var string + */ protected $_defaultElementType = 'text'; + + /** + * Translation helper instance, defined by the widget type declaration root config node + * @var Mage_Core_Helper_Abstract + */ protected $_translationHelper = null; /** @@ -75,11 +84,18 @@ public function getMainFieldset() if ($this->_getData('main_fieldset') instanceof Varien_Data_Form_Element_Fieldset) { return $this->_getData('main_fieldset'); } - $fieldset = $this->getForm()->addFieldset('options_fieldset', array( - 'legend' => $this->helper('cms')->__('Widget Options'), - 'class' => 'fieldset-wide' + $mainFieldsetHtmlId = 'options_fieldset' . md5($this->getWidgetType()); + $this->setMainFieldsetHtmlId($mainFieldsetHtmlId); + $fieldset = $this->getForm()->addFieldset($mainFieldsetHtmlId, array( + 'legend' => $this->helper('widget')->__('Widget Options'), + 'class' => 'fieldset-wide', )); $this->setData('main_fieldset', $fieldset); + + // add dependence javascript block + $block = $this->getLayout()->createBlock('adminhtml/widget_form_element_dependence'); + $this->setChild('form_after', $block); + return $fieldset; } @@ -94,12 +110,12 @@ public function addFields() if (!$this->getWidgetType()) { Mage::throwException($this->__('Widget Type is not specified')); } - $config = Mage::getSingleton('cms/widget')->getConfigAsObject($this->getWidgetType()); + $config = Mage::getSingleton('widget/widget')->getConfigAsObject($this->getWidgetType()); if (!$config->getParameters()) { return $this; } $module = $config->getModule(); - $this->_translationHelper = Mage::helper($module ? $module : 'cms'); + $this->_translationHelper = Mage::helper($module ? $module : 'widget'); foreach ($config->getParameters() as $parameter) { $this->_addField($parameter); } @@ -155,23 +171,24 @@ protected function _addField($parameter) $data['values'] = Mage::getModel($sourceModel)->toOptionArray(); } - // prepare field type and renderers - $fieldRenderer = 'adminhtml/cms_widget_options_renderer_element'; + // prepare field type or renderer + $fieldRenderer = null; $fieldType = $parameter->getType(); - // hidden element if (!$parameter->getVisible()) { $fieldType = 'hidden'; } // just an element renderer elseif (false !== strpos($fieldType, '/')) { + $fieldRenderer = $this->getLayout()->createBlock($fieldType); $fieldType = $this->_defaultElementType; - $fieldRenderer = $fieldType; } // instantiate field and render html - $field = $fieldset->addField('option_' . $fieldName, $fieldType, $data) - ->setRenderer($this->getLayout()->createBlock($fieldRenderer)); + $field = $fieldset->addField($this->getMainFieldsetHtmlId() . '_' . $fieldName, $fieldType, $data); + if ($fieldRenderer) { + $field->setRenderer($fieldRenderer); + } // extra html preparations if ($helper = $parameter->getHelperBlock()) { @@ -184,6 +201,16 @@ protected function _addField($parameter) } } + // dependencies from other fields + $dependenceBlock = $this->getChild('form_after'); + $dependenceBlock->addFieldMap($field->getId(), $fieldName); + if ($parameter->getDepends()) { + foreach ($parameter->getDepends() as $from => $row) { + $values = isset($row['values']) ? array_values($row['values']) : (string)$row['value']; + $dependenceBlock->addFieldDependence($fieldName, $from, $values); + } + } + return $field; } } diff --git a/app/code/core/Mage/Widget/Block/Interface.php b/app/code/core/Mage/Widget/Block/Interface.php new file mode 100644 index 0000000000..f2aa65b8ad --- /dev/null +++ b/app/code/core/Mage/Widget/Block/Interface.php @@ -0,0 +1,64 @@ + + */ +interface Mage_Widget_Block_Interface +{ + /** + * Produce and return widget's html output + * + * @return string + */ + public function toHtml(); + + /** + * Add data to the widget. + * Retains previous data in the widget. + * + * @param array $arr + * @return Mage_Widget_Block_Interface + */ + public function addData(array $arr); + + /** + * Overwrite data in the widget. + * + * $key can be string or array. + * If $key is string, the attribute value will be overwritten by $value. + * If $key is an array, it will overwrite all the data in the widget. + * + * @param string|array $key + * @param mixed $value + * @return Varien_Object + */ + public function setData($key, $value = null); +} diff --git a/app/code/core/Mage/Widget/Helper/Data.php b/app/code/core/Mage/Widget/Helper/Data.php new file mode 100644 index 0000000000..d5f3fddd02 --- /dev/null +++ b/app/code/core/Mage/Widget/Helper/Data.php @@ -0,0 +1,36 @@ + + */ +class Mage_Widget_Helper_Data extends Mage_Core_Helper_Abstract +{ +} diff --git a/app/code/core/Mage/Widget/Model/Mysql4/Widget.php b/app/code/core/Mage/Widget/Model/Mysql4/Widget.php new file mode 100644 index 0000000000..fd9e162629 --- /dev/null +++ b/app/code/core/Mage/Widget/Model/Mysql4/Widget.php @@ -0,0 +1,63 @@ + + */ +class Mage_Widget_Model_Mysql4_Widget extends Mage_Core_Model_Mysql4_Abstract +{ + protected function _construct() + { + $this->_init('widget/widget', 'widget_id'); + } + + /** + * Retrieves preconfigured parameters for widget + * + * @param int $widgetId + * @return array + */ + public function loadPreconfiguredWidget($widgetId) + { + $read = $this->_getReadAdapter(); + $select = $read->select(); + $select->from($this->getMainTable()) + ->where($this->getIdFieldName() . ' = ?', $widgetId); + + $widget = $read->fetchRow($select); + if (is_array($widget)) { + if ($widget['parameters']) { + $widget['parameters'] = unserialize($widget['parameters']); + } + return $widget; + } + return false; + } +} diff --git a/app/code/core/Mage/Widget/Model/Mysql4/Widget/Instance.php b/app/code/core/Mage/Widget/Model/Mysql4/Widget/Instance.php new file mode 100644 index 0000000000..b09387a313 --- /dev/null +++ b/app/code/core/Mage/Widget/Model/Mysql4/Widget/Instance.php @@ -0,0 +1,353 @@ + + */ +class Mage_Widget_Model_Mysql4_Widget_Instance extends Mage_Core_Model_Mysql4_Abstract +{ + protected $_handlesToCleanCache = array(); + + /** + * Constructor + */ + protected function _construct() + { + $this->_init('widget/widget_instance', 'instance_id'); + } + + /** + * Reset handles to clean in cache + * + * @return Mage_Widget_Model_Mysql4_Widget_Instance + */ + public function resetHandlesToCleanCache() + { + $this->_handlesToCleanCache = array(); + return $this; + } + + /** + * Setter + * + * @param array $handles + * @return Mage_Widget_Model_Mysql4_Widget_Instance + */ + public function setHandlesToCleanCache($handles) + { + $this->_handlesToCleanCache = $handles; + return $this; + } + + /** + * Add handle to clean in cache + * + * @param string $handle + * @return Mage_Widget_Model_Mysql4_Widget_Instance + */ + public function addHandleToCleanCache($handle) + { + $this->_handlesToCleanCache[] = $handle; + return $this; + } + + /** + * Getter + * + * @return array + */ + public function getHandlesToCleanCache() + { + return $this->_handlesToCleanCache; + } + + /** + * Perform actions after object load + * + * @param Mage_Widget_Model_Widget_Instance $object + * @return Mage_Widget_Model_Mysql4_Widget_Instance + */ + protected function _afterLoad(Mage_Core_Model_Abstract $object) + { + $select = $this->_getReadAdapter()->select() + ->from($this->getTable('widget/widget_instance_page')) + ->where('instance_id = ?', $object->getId()); + $object->setData('page_groups', $this->_getReadAdapter()->fetchAll($select)); + return parent::_afterLoad($object); + } + + /** + * Perform actions after object save + * + * @param Mage_Widget_Model_Widget_Instance $object + * @return Mage_Widget_Model_Mysql4_Widget_Instance + */ + protected function _afterSave(Mage_Core_Model_Abstract $object) + { + $this->resetHandlesToCleanCache(); + + $pageTable = $this->getTable('widget/widget_instance_page'); + $pageLayoutTable = $this->getTable('widget/widget_instance_page_layout'); + $layoutUpdateTable = $this->getTable('core/layout_update'); + $layoutLinkTable = $this->getTable('core/layout_link'); + $write = $this->_getWriteAdapter(); + + $select = $write->select() + ->from($pageTable, array('page_id')) + ->where('instance_id = ?', $object->getId()); + $pageIds = $write->fetchCol($select); + + $removePageIds = array_diff($pageIds, $object->getData('page_group_ids')); + + $select = $write->select() + ->from($pageLayoutTable, array('layout_update_id')) + ->where('page_id in (?)', $pageIds); + $removeLayoutUpdateIds = $write->fetchCol($select); + + $select = $write->select() + ->from($layoutUpdateTable, array('handle')) + ->where('layout_update_id in (?)', $removeLayoutUpdateIds); + $this->setHandlesToCleanCache($write->fetchCol($select)); + + $this->_deleteWidgetInstancePages($removePageIds); + $write->delete($pageLayoutTable, $write->quoteInto('page_id in (?)', $pageIds)); + $this->_deleteLayoutUpdates($removeLayoutUpdateIds); + + foreach ($object->getData('page_groups') as $pageGroup) { + $pageLayoutUpdateIds = $this->_saveLayoutUpdates($object, $pageGroup); + $data = array( + 'group' => $pageGroup['group'], + 'layout_handle' => $pageGroup['layout_handle'], + 'block_reference' => $pageGroup['block_reference'], + 'for' => $pageGroup['for'], + 'entities' => $pageGroup['entities'], + 'template' => $pageGroup['template'], + ); + $pageId = $pageGroup['page_id']; + if (in_array($pageGroup['page_id'], $pageIds)) { + $write->update($pageTable, $data, $write->quoteInto('page_id = ?', $pageId)); + } else { + $write->insert($pageTable, + array_merge(array( + 'instance_id' => $object->getId()),$data + )); + $pageId = $write->lastInsertId(); + } + foreach ($pageLayoutUpdateIds as $layoutUpdateId) { + $write->insert($pageLayoutTable, array( + 'page_id' => $pageId, + 'layout_update_id' => $layoutUpdateId + )); + } + } + + $this->_cleanLayoutCache() + ->_cleanBlocksOutputCache(); + + return parent::_afterSave($object); + } + + /** + * Prepare and save layout updates data + * + * @param Mage_Widget_Model_Widget_Instance $widgetInstance + * @param array $pageGroupData + * @return array of inserted layout updates ids + */ + protected function _saveLayoutUpdates($widgetInstance, $pageGroupData) + { + $write = $this->_getWriteAdapter(); + $pageLayoutUpdateIds = array(); + $storeIds = $this->_prepareStoreIds($widgetInstance->getStoreIds()); + foreach ($pageGroupData['layout_handle_updates'] as $handle) { + $this->_getWriteAdapter()->insert( + $this->getTable('core/layout_update'), array( + 'handle' => $handle, + 'xml' => $widgetInstance->generateLayoutUpdateXml( + $pageGroupData['block_reference'], + $pageGroupData['template']), + 'sort_order' => $widgetInstance->getSortOrder() + )); + $layoutUpdateId = $this->_getWriteAdapter()->lastInsertId(); + $this->addHandleToCleanCache($handle); + $pageLayoutUpdateIds[] = $layoutUpdateId; + foreach ($storeIds as $storeId) { + $this->_getWriteAdapter()->insert( + $this->getTable('core/layout_link'), array( + 'store_id' => $storeId, + 'package' => $widgetInstance->getPackage(), + 'theme' => $widgetInstance->getTheme(), + 'layout_update_id' => $layoutUpdateId + )); + } + } + return $pageLayoutUpdateIds; + } + + /** + * Prepare store ids. + * If one of store id is default (0) return all store ids + * + * @param array $storeIds + * @return array + */ + protected function _prepareStoreIds($storeIds) + { + if (in_array(0, $storeIds)) { + $storeIds = array(0); + } + return $storeIds; + } + + /** + * Perform actions before object delete. + * Collect page ids and layout update ids and set to object for further delete + * + * @param Varien_Object $object + */ + protected function _beforeDelete(Mage_Core_Model_Abstract $object) + { + $select = $this->_getWriteAdapter()->select() + ->from(array('main_table' => $this->getTable('widget/widget_instance_page')), array()) + ->joinInner( + array('layout_page_table' => $this->getTable('widget/widget_instance_page_layout')), + 'layout_page_table.page_id = main_table.page_id', + array('layout_page_table.layout_update_id') + ) + ->where('main_table.instance_id = ?', $object->getId()); + $object->setLayoutUpdateIdsToDelete($this->_getWriteAdapter()->fetchCol($select)); + return $this; + } + + /** + * Perform actions after object delete. + * Delete layout updates by layout update ids collected in _beforeSave + * and clean cache + * + * @param Mage_Widget_Model_Widget_Instance $object + * @return Mage_Widget_Model_Mysql4_Widget_Instance + */ + protected function _afterDelete(Mage_Core_Model_Abstract $object) + { + $this->resetHandlesToCleanCache(); + + $select = $this->_getWriteAdapter()->select() + ->from($this->getTable('core/layout_update'), array('handle')) + ->where('layout_update_id in (?)', $object->getLayoutUpdateIdsToDelete()); + $this->setHandlesToCleanCache($this->_getWriteAdapter()->fetchCol($select)); + + $this->_deleteLayoutUpdates($object->getLayoutUpdateIdsToDelete()); + + $this->_cleanLayoutCache() + ->_cleanBlocksOutputCache(); + + return parent::_afterDelete($object); + } + + /** + * Delete widget instance pages by given ids + * + * @param array $pageIds + * @return Mage_Widget_Model_Mysql4_Widget_Instance + */ + protected function _deleteWidgetInstancePages($pageIds) + { + $this->_getWriteAdapter()->delete( + $this->getTable('widget/widget_instance_page'), + $this->_getWriteAdapter()->quoteInto('page_id in (?)', $pageIds) + ); + $this->_getWriteAdapter()->delete( + $this->getTable('widget/widget_instance_page_layout'), + $this->_getWriteAdapter()->quoteInto('page_id in (?)', $pageIds) + ); + return $this; + } + + /** + * Delete layout updates by given ids + * + * @param array $layoutUpdateIds + * @return Mage_Widget_Model_Mysql4_Widget_Instance + */ + protected function _deleteLayoutUpdates($layoutUpdateIds) + { + $this->_getWriteAdapter()->delete( + $this->getTable('core/layout_update'), + $this->_getWriteAdapter()->quoteInto('layout_update_id in (?)', $layoutUpdateIds) + ); + $this->_getWriteAdapter()->delete( + $this->getTable('core/layout_link'), + $this->_getWriteAdapter()->quoteInto('layout_update_id in (?)', $layoutUpdateIds) + ); + return $this; + } + + /** + * Clean cache by handles + * + * @return Mage_Widget_Model_Mysql4_Widget_Instance + */ + protected function _cleanLayoutCache() + { + $handles = $this->getHandlesToCleanCache(); + if (!empty($handles) && Mage::app()->useCache('layout')) { + Mage::app()->cleanCache($handles); + } + return $this; + } + + /** + * Clean blocks HTML otput cache + * + * @return Mage_Widget_Model_Mysql4_Widget_Instance + */ + protected function _cleanBlocksOutputCache() + { + if (Mage::app()->useCache('block_html')) { + Mage::app()->cleanCache(array('block_html')); + } + return $this; + } + + /** + * Get store ids to which specified item is assigned + * + * @param int $id + * @return array + */ + public function lookupStoreIds($id) + { + $storeIds = $this->_getReadAdapter()->fetchOne($this->_getReadAdapter()->select() + ->from($this->getMainTable(), 'store_ids') + ->where("{$this->getIdFieldName()} = ?", $id) + ); + return $storeIds ? explode(',', $storeIds) : array(); + } +} diff --git a/app/code/core/Mage/Widget/Model/Mysql4/Widget/Instance/Collection.php b/app/code/core/Mage/Widget/Model/Mysql4/Widget/Instance/Collection.php new file mode 100644 index 0000000000..627d62f21c --- /dev/null +++ b/app/code/core/Mage/Widget/Model/Mysql4/Widget/Instance/Collection.php @@ -0,0 +1,66 @@ + + */ +class Mage_Widget_Model_Mysql4_Widget_Instance_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract +{ + /** + * Constructor + */ + protected function _construct() + { + parent::_construct(); + $this->_init('widget/widget_instance'); + } + + /** + * Filter by store ids + * + * @param array|integer $storeIds + * @param boolean $withDefaultStore if TRUE also filter by store id '0' + * @return Mage_Widget_Model_Mysql4_Widget_Instance_Collection + */ + public function addStoreFilter($storeIds = array(), $withDefaultStore = true) + { + if (!is_array($storeIds)) { + $storeIds = array($storeIds); + } + if ($withDefaultStore && !in_array(0, $storeIds)) { + array_unshift($storeIds, 0); + } + $select = $this->getSelect(); + foreach ($storeIds as $storeId) { + $select->orWhere('FIND_IN_SET(?, `store_ids`)', $storeId); + } + return $this; + } +} diff --git a/app/code/core/Mage/Widget/Model/Observer.php b/app/code/core/Mage/Widget/Model/Observer.php new file mode 100644 index 0000000000..c6a8acdf6c --- /dev/null +++ b/app/code/core/Mage/Widget/Model/Observer.php @@ -0,0 +1,50 @@ + + */ +class Mage_Widget_Model_Observer +{ + /** + * Add additional settings to wysiwyg config for Widgets Insertion Plugin + * + * @param Varien_Event_Observer $observer + * @return Mage_Widget_Model_Observer + */ + public function prepareWidgetsPluginConfig(Varien_Event_Observer $observer) + { + $config = $observer->getEvent()->getConfig(); + $settings = Mage::getModel('widget/widget_config')->getPluginSettings($config); + $config->addData($settings); + return $this; + } + +} diff --git a/app/code/core/Mage/Widget/Model/Template/Filter.php b/app/code/core/Mage/Widget/Model/Template/Filter.php new file mode 100644 index 0000000000..ec5f0f3727 --- /dev/null +++ b/app/code/core/Mage/Widget/Model/Template/Filter.php @@ -0,0 +1,72 @@ + + */ +class Mage_Widget_Model_Template_Filter extends Mage_Cms_Model_Template_Filter +{ + /** + * Generate widget + * + * @param array $construction + * @return string + */ + public function widgetDirective($construction) + { + $params = $this->_getIncludeParameters($construction[2]); + + // Determine what name block should have in layout + $name = null; + if (isset($params['name'])) { + $name = $params['name']; + } + + // validate required parameter type or id + if (!empty($params['type'])) { + $type = $params['type']; + } elseif (!empty($params['id'])) { + $preconfigured = Mage::getResourceSingleton('widget/widget') + ->loadPreconfiguredWidget($params['id']); + $type = $preconfigured['type']; + $params = $preconfigured['parameters']; + } else { + return ''; + } + + // define widget block and check the type is instance of Widget Interface + $widget = Mage::app()->getLayout()->createBlock($type, $name, $params); + if (!$widget instanceof Mage_Widget_Block_Interface) { + return ''; + } + + return $widget->toHtml(); + } +} diff --git a/app/code/core/Mage/Widget/Model/Widget.php b/app/code/core/Mage/Widget/Model/Widget.php new file mode 100644 index 0000000000..6db1bfee5f --- /dev/null +++ b/app/code/core/Mage/Widget/Model/Widget.php @@ -0,0 +1,313 @@ + + */ +class Mage_Widget_Model_Widget extends Varien_Object +{ + /** + * Load Widgets XML config from widget.xml files and cache it + * + * @return Varien_Simplexml_Config + */ + public function getXmlConfig() + { + $cachedXml = Mage::app()->loadCache('widget_config'); + if ($cachedXml) { + $xmlConfig = new Varien_Simplexml_Config($cachedXml); + } else { + $config = new Varien_Simplexml_Config(); + $config->loadString(''); + Mage::getConfig()->loadModulesConfiguration('widget.xml', $config); + $xmlConfig = $config; + if (Mage::app()->useCache('config')) { + Mage::app()->saveCache($config->getXmlString(), 'widget_config', + array(Mage_Core_Model_Config::CACHE_TAG)); + } + } + return $xmlConfig; + } + + /** + * Return widget XML config element based on its type + * + * @param string $type Widget type + * @return null|Varien_Simplexml_Element + */ + public function getXmlElementByType($type) + { + $elements = $this->getXmlConfig()->getXpath('*[@type="' . $type . '"]'); + if (is_array($elements) && isset($elements[0]) && $elements[0] instanceof Varien_Simplexml_Element) { + return $elements[0]; + } + return null; + } + + /** + * Wrapper for getXmlElementByType method + * + * @param string $type Widget type + * @return null|Varien_Simplexml_Element + */ + public function getConfigAsXml($type) + { + return $this->getXmlElementByType($type); + } + + /** + * Return widget XML configuration as Varien_Object and makes some data preparations + * + * @param string $type Widget type + * @return Varien_Object + */ + public function getConfigAsObject($type) + { + $xml = $this->getConfigAsXml($type); + + $object = new Varien_Object(); + if ($xml === null) { + return $object; + } + + // Save all nodes to object data + $object->setType($type); + $object->setData($xml->asCanonicalArray()); + + // Set module for translations etc. + $module = $object->getData('@/module'); + if ($module) { + $object->setModule($module); + } + + // Correct widget parameters and convert its data to objects + $params = $object->getData('parameters'); + $newParams = array(); + if (is_array($params)) { + $sortOrder = 0; + foreach ($params as $key => $data) { + if (is_array($data)) { + $data['key'] = $key; + $data['sort_order'] = isset($data['sort_order']) ? (int)$data['sort_order'] : $sortOrder; + + // prepare values (for drop-dawns) specified directly in configuration + $values = array(); + if (isset($data['values']) && is_array($data['values'])) { + foreach ($data['values'] as $value) { + if (isset($value['label']) && isset($value['value'])) { + $values[] = $value; + } + } + } + $data['values'] = $values; + + // prepare helper block object + if (isset($data['helper_block'])) { + $helper = new Varien_Object(); + if (isset($data['helper_block']['data']) && is_array($data['helper_block']['data'])) { + $helper->addData($data['helper_block']['data']); + } + if (isset($data['helper_block']['type'])) { + $helper->setType($data['helper_block']['type']); + } + $data['helper_block'] = $helper; + } + + $newParams[$key] = new Varien_Object($data); + $sortOrder++; + } + } + } + uasort($newParams, array($this, '_sortParameters')); + $object->setData('parameters', $newParams); + + return $object; + } + + /** + * Return filtered list of widgets as SimpleXml object + * + * @param array $filters Key-value array of filters for widget node properties + * @return Varien_Simplexml_Element + */ + public function getWidgetsXml($filters = array()) + { + $widgets = $this->getXmlConfig()->getNode(); + $result = clone $widgets; + + // filter widgets by params + if (is_array($filters) && count($filters) > 0) { + foreach ($widgets as $code => $widget) { + try { + $reflection = new ReflectionObject($widget); + foreach ($filters as $field => $value) { + if (!$reflection->hasProperty($field) || (string)$widget->{$field} != $value) { + throw new Exception(); + } + } + } catch (Exception $e) { + unset($result->{$code}); + continue; + } + } + } + + return $result; + } + + /** + * Return list of widgets as array + * + * @param array $filters Key-value array of filters for widget node properties + * @return array + */ + public function getWidgetsArray($filters = array()) + { + if (!$this->_getData('widgets_array')) { + $result = array(); + foreach ($this->getWidgetsXml($filters) as $widget) { + $helper = $widget->getAttribute('module') ? $widget->getAttribute('module') : 'widget'; + $helper = Mage::helper($helper); + $result[$widget->getName()] = array( + 'name' => $helper->__((string)$widget->name), + 'code' => $widget->getName(), + 'type' => $widget->getAttribute('type'), + 'description' => $helper->__((string)$widget->description) + ); + } + usort($result, array($this, "_sortWidgets")); + $this->setData('widgets_array', $result); + } + return $this->_getData('widgets_array'); + } + + /** + * Return widget presentation code in WYSIWYG editor + * + * @param string $type Widget Type + * @param array $params Pre-configured Widget Params + * @param bool $asIs Return result as widget directive(true) or as placeholder image(false) + * @return string Widget directive ready to parse + */ + public function getWidgetDeclaration($type, $params = array(), $asIs = true) + { + $directive = '{{widget type="' . $type . '"'; + + foreach ($params as $name => $value) { + // Retrieve default option value if pre-configured + if (is_array($value)) { + $value = implode(',', $value); + } elseif (trim($value) == '') { + $widget = $this->getConfigAsObject($type); + $parameters = $widget->getParameters(); + if (isset($parameters[$name]) && is_object($parameters[$name])) { + $value = $parameters[$name]->getValue(); + } + } + if ($value) { + $directive .= sprintf(' %s="%s"', $name, $value); + } + } + $directive .= '}}'; + + if ($asIs) { + return $directive; + } + + $config = Mage::getSingleton('widget/widget_config'); + $imageName = str_replace('/', '__', $type) . '.gif'; + if (is_file($config->getPlaceholderImagesBaseDir() . DS . $imageName)) { + $image = $config->getPlaceholderImagesBaseUrl() . $imageName; + } else { + $image = $config->getPlaceholderImagesBaseUrl() . 'default.gif'; + } + $html = sprintf('', + $this->_idEncode($directive), + $image, + Mage::helper('core')->urlEscape($directive) + ); + return $html; + } + + /** + * Return list of required JS files to be included on the top of the page before insertion plugin loaded + * + * @return array + */ + public function getWidgetsRequiredJsFiles() + { + $result = array(); + foreach ($this->getWidgetsXml() as $widget) { + if ($widget->js) { + foreach (explode(',', (string)$widget->js) as $js) { + $result[] = $js; + } + } + } + return $result; + } + + /** + * Encode string to valid HTML id element, based on base64 encoding + * + * @param string $string + * @return string + */ + protected function _idEncode($string) + { + return strtr(base64_encode($string), '+/=', ':_-'); + } + + /** + * User-defined widgets sorting by Name + * + * @param array $a + * @param array $b + * @return boolean + */ + protected function _sortWidgets($a, $b) + { + return strcmp($a["name"], $b["name"]); + } + + /** + * Widget parameters sort callback + * + * @param Varien_Object $a + * @param Varien_Object $b + * @return int + */ + protected function _sortParameters($a, $b) + { + $aOrder = (int)$a->getData('sort_order'); + $bOrder = (int)$b->getData('sort_order'); + return $aOrder < $bOrder ? -1 : ($aOrder > $bOrder ? 1 : 0); + } +} diff --git a/app/code/core/Mage/Widget/Model/Widget/Config.php b/app/code/core/Mage/Widget/Model/Widget/Config.php new file mode 100644 index 0000000000..0a1177ab92 --- /dev/null +++ b/app/code/core/Mage/Widget/Model/Widget/Config.php @@ -0,0 +1,151 @@ + + */ +class Mage_Widget_Model_Widget_Config extends Varien_Object +{ + + /** + * Return config settings for widgets insertion plugin based on editor element config + * + * @param Varien_Object $config + * @return array + */ + public function getPluginSettings($config) + { + $settings = array( + 'widget_plugin_src' => Mage::getBaseUrl('js').'mage/adminhtml/wysiwyg/tiny_mce/plugins/magentowidget/editor_plugin.js', + 'widget_images_url' => $this->getPlaceholderImagesBaseUrl(), + 'widget_placeholders' => $this->getAvailablePlaceholderFilenames(), + 'widget_window_url' => $this->getWidgetWindowUrl($config) + ); + + return $settings; + } + + /** + * Return Widget placeholders images URL + * + * @return string + */ + public function getPlaceholderImagesBaseUrl() + { + return Mage::getDesign()->getSkinUrl('images/widget/'); + } + + /** + * Return Widget placeholders images dir + * + * @return string + */ + public function getPlaceholderImagesBaseDir() + { + return Mage::getDesign()->getSkinBaseDir() . DS . 'images' . DS . 'widget'; + } + + /** + * Return list of existing widget image placeholders + * + * @return array + */ + public function getAvailablePlaceholderFilenames() + { + $result = array(); + $targetDir = $this->getPlaceholderImagesBaseDir(); + if (is_dir($targetDir) && is_readable($targetDir)) { + $collection = new Varien_Data_Collection_Filesystem(); + $collection->addTargetDir($targetDir) + ->setCollectDirs(false) + ->setCollectFiles(true) + ->setCollectRecursively(false); + foreach ($collection as $file) { + $result[] = $file->getBasename(); + } + } + + return $result; + } + + /** + * Return Widgets Insertion Plugin Window URL + * + * @param Varien_Object Editor element config + * @return string + */ + public function getWidgetWindowUrl($config) + { + $params = array(); + + $skipped = is_array($config->getData('skip_widgets')) ? $config->getData('skip_widgets') : array(); + if ($config->hasData('widget_filters')) { + $all = Mage::getModel('widget/widget')->getWidgetsXml(); + $filtered = Mage::getModel('widget/widget')->getWidgetsXml($config->getData('widget_filters')); + $reflection = new ReflectionObject($filtered); + foreach ($all as $code => $widget) { + if (!$reflection->hasProperty($code)) { + $skipped[] = $widget->getAttribute('type'); + } + } + } + + if (count($skipped) > 0) { + $params['skip_widgets'] = $this->encodeWidgetsToQuery($skipped); + } + return Mage::getSingleton('adminhtml/url')->getUrl('*/widget/index', $params); + } + + /** + * Encode list of widget types into query param + * + * @param array $widgets List of widgets + * @return string Query param value + */ + public function encodeWidgetsToQuery($widgets) + { + $widgets = is_array($widgets) ? $widgets : array($widgets); + $param = implode(',', $widgets); + return Mage::helper('core')->urlEncode($param); + } + + /** + * Decode URL query param and return list of widgets + * + * @param string $queryParam Query param value to decode + * @return array Array of widget types + */ + public function decodeWidgetsFromQuery($queryParam) + { + $param = Mage::helper('core')->urlDecode($queryParam); + return preg_split('/\s*\,\s*/', $param, 0, PREG_SPLIT_NO_EMPTY); + } + +} diff --git a/app/code/core/Mage/Widget/Model/Widget/Instance.php b/app/code/core/Mage/Widget/Model/Widget/Instance.php new file mode 100644 index 0000000000..6919ff51f2 --- /dev/null +++ b/app/code/core/Mage/Widget/Model/Widget/Instance.php @@ -0,0 +1,488 @@ + + */ +class Mage_Widget_Model_Widget_Instance extends Mage_Core_Model_Abstract +{ + const SPECIFIC_ENTITIES = 'specific'; + const ALL_ENTITIES = 'all'; + + const DEFAULT_LAYOUT_HANDLE = 'default'; + const PRODUCT_LAYOUT_HANDLE = 'catalog_product_view'; + const SINGLE_PRODUCT_LAYOUT_HANLDE = 'PRODUCT_{{ID}}'; + const PRODUCT_TYPE_LAYOUT_HANDLE = 'PRODUCT_TYPE_{{TYPE}}'; + const ANCHOR_CATEGORY_LAYOUT_HANDLE = 'catalog_category_layered'; + const NOTANCHOR_CATEGORY_LAYOUT_HANDLE = 'catalog_category_default'; + const SINGLE_CATEGORY_LAYOUT_HANDLE = 'CATEGORY_{{ID}}'; + + protected $_layoutHandles = array(); + + protected $_specificEntitiesLayoutHandles = array(); + + /** + * @var Varien_Simplexml_Element + */ + protected $_widgetConfigXml = null; + + /** + * Internal Constructor + */ + protected function _construct() + { + parent::_construct(); + $this->_init('widget/widget_instance'); + $this->_layoutHandles = array( + 'anchor_categories' => self::ANCHOR_CATEGORY_LAYOUT_HANDLE, + 'notanchor_categories' => self::NOTANCHOR_CATEGORY_LAYOUT_HANDLE, + 'all_products' => self::PRODUCT_LAYOUT_HANDLE, + 'all_pages' => self::DEFAULT_LAYOUT_HANDLE + ); + $this->_specificEntitiesLayoutHandles = array( + 'anchor_categories' => self::SINGLE_CATEGORY_LAYOUT_HANDLE, + 'notanchor_categories' => self::SINGLE_CATEGORY_LAYOUT_HANDLE, + 'all_products' => self::SINGLE_PRODUCT_LAYOUT_HANLDE, + ); + foreach (Mage_Catalog_Model_Product_Type::getTypes() as $typeId => $type) { + $this->_layoutHandles[$typeId.'_products'] = str_replace('{{TYPE}}', $typeId, self::PRODUCT_TYPE_LAYOUT_HANDLE) ; + $this->_specificEntitiesLayoutHandles[$typeId.'_products'] = self::SINGLE_PRODUCT_LAYOUT_HANLDE; + } + } + + /** + * Processing object before save data + * + * @return Mage_Widget_Model_Widget_Instance + */ + protected function _beforeSave() + { + $pageGroupIds = array(); + $tmpPageGroups = array(); + $pageGroups = $this->getData('page_groups'); + if ($pageGroups) { + foreach ($pageGroups as $pageGroup) { + $tmpPageGroup = array(); + if (isset($pageGroup[$pageGroup['page_group']])) { + $pageGroupData = $pageGroup[$pageGroup['page_group']]; + if ($pageGroupData['page_id']) { + $pageGroupIds[] = $pageGroupData['page_id']; + } + if ($pageGroup['page_group'] == 'pages') { + $layoutHandle = $pageGroupData['layout_handle']; + } else { + $layoutHandle = $this->_layoutHandles[$pageGroup['page_group']]; + } + if (!isset($pageGroupData['template'])) { + $pageGroupData['template'] = ''; + } + $tmpPageGroup = array( + 'page_id' => $pageGroupData['page_id'], + 'group' => $pageGroup['page_group'], + 'layout_handle' => $layoutHandle, + 'for' => $pageGroupData['for'], + 'block_reference' => $pageGroupData['block'], + 'entities' => '', + 'layout_handle_updates' => array($layoutHandle), + 'template' => $pageGroupData['template']?$pageGroupData['template']:'' + ); + if ($pageGroupData['for'] == self::SPECIFIC_ENTITIES) { + $layoutHandleUpdates = array(); + foreach (explode(',', $pageGroupData['entities']) as $entity) { + $layoutHandleUpdates[] = str_replace('{{ID}}', $entity, + $this->_specificEntitiesLayoutHandles[$pageGroup['page_group']]); + } + $tmpPageGroup['entities'] = $pageGroupData['entities']; + $tmpPageGroup['layout_handle_updates'] = $layoutHandleUpdates; + } + $tmpPageGroups[] = $tmpPageGroup; + } + } + } + if (is_array($this->getData('store_ids'))) { + $this->setData('store_ids', implode(',', $this->getData('store_ids'))); + } + if (is_array($this->getData('widget_parameters'))) { + $this->setData('widget_parameters', serialize($this->getData('widget_parameters'))); + } + $this->setData('page_groups', $tmpPageGroups); + $this->setData('page_group_ids', $pageGroupIds); + return parent::_beforeSave(); + } + + /** + * Validate widget instance data + * + * @return string|boolean + */ + public function validate() + { + if ($this->isCompleteToCreate()) { + return true; + } + return Mage::helper('widget')->__('Widget instance is not full complete to create.'); + } + + /** + * Check if widget instance has required data (other data depends on it) + * + * @return boolean + */ + public function isCompleteToCreate() + { + return (bool)($this->getType() && $this->getPackageTheme()); + } + + /** + * Setter + * Prepare widget type + * + * @param string $type + * @return Mage_Widget_Model_Widget_Instance + */ + public function setType($type) + { + $this->setData('type', $type); + $this->_prepareType(); + return $this; + } + + /** + * Getter + * Prepare widget type + * + * @return string + */ + public function getType() + { + $this->_prepareType(); + return $this->_getData('type'); + } + + /** + * Replace '-' to '/', if was passed from request(GET request) + * + * @return Mage_Widget_Model_Widget_Instance + */ + protected function _prepareType() + { + if (strpos($this->_getData('type'), '-') >= 0) { + $this->setData('type', str_replace('-', '/', $this->_getData('type'))); + } + return $this; + } + + /** + * Setter + * Prepare widget package theme + * + * @param string $packageTheme + * @return Mage_Widget_Model_Widget_Instance + */ + public function setPackageTheme($packageTheme) + { + $this->setData('package_theme', $packageTheme); + $this->_preparePackageTheme(); + return $this; + } + + /** + * Getter + * Prepare widget package theme + * + * @return string + */ + public function getPackageTheme() + { + $this->_preparePackageTheme(); + return $this->_getData('package_theme'); + } + + /** + * Replace '_' to '/', if was set from request(GET request) + * + * @return Mage_Widget_Model_Widget_Instance + */ + protected function _preparePackageTheme() + { + if (strpos($this->_getData('package_theme'), '_') >= 0) { + $this->setData('package_theme', str_replace('_', '/', $this->_getData('package_theme'))); + } + return $this; + } + + /** + * Getter. + * If not set return default + * + * @return string + */ + public function getArea() + { + if (!$this->_getData('area')) { + return Mage_Core_Model_Design_Package::DEFAULT_AREA; + } + return $this->_getData('area'); + } + + /** + * Getter + * + * @return string + */ + public function getPackage() + { + if (!$this->_getData('package')) { + $this->_parsePackageTheme(); + } + return $this->_getData('package'); + } + + /** + * Getter + * + * @return string + */ + public function getTheme() + { + if (!$this->_getData('theme')) { + $this->_parsePackageTheme(); + } + return $this->_getData('theme'); + } + + /** + * Parse packageTheme and set parsed package and theme + * + * @return Mage_Widget_Model_Widget_Instance + */ + protected function _parsePackageTheme() + { + if ($this->getPackageTheme() && strpos($this->getPackageTheme(), '/')) { + list($package, $theme) = explode('/', $this->getPackageTheme()); + $this->setData('package', $package); + $this->setData('theme', $theme); + } + return $this; + } + + /** + * Getter + * Explode to array if string setted + * + * @return array + */ + public function getStoreIds() + { + if (is_string($this->getData('store_ids'))) { + return explode(',', $this->getData('store_ids')); + } + return $this->getData('store_ids'); + } + + /** + * Getter + * Unserialize if serialized string setted + * + * @return array + */ + public function getWidgetParameters() + { + if (is_string($this->getData('widget_parameters'))) { + return unserialize($this->getData('widget_parameters')); + } + return $this->getData('widget_parameters'); + } + + /** + * Retrieve option arra of widget types + * + * @return array + */ + public function getWidgetsOptionArray() + { + $widgets = array(); + $widgetsArr = Mage::getSingleton('widget/widget')->getWidgetsArray(); + foreach ($widgetsArr as $widget) { + $widgets[] = array( + 'value' => $widget['type'], + 'label' => $widget['name'] + ); + } + return $widgets; + } + + /** + * Load widget XML config and merge with theme widget config + * + * @return Varien_Simplexml_Element|null + */ + public function getWidgetConfig() + { + if ($this->_widgetConfigXml === null) { + $this->_widgetConfigXml = Mage::getSingleton('widget/widget') + ->getXmlElementByType($this->getType()); + if ($this->_widgetConfigXml) { + $configFile = Mage::getSingleton('core/design_package')->getBaseDir(array( + '_area' => $this->getArea(), + '_package' => $this->getPackage(), + '_theme' => $this->getTheme(), + '_type' => 'etc' + )) . DS . 'widget.xml'; + if (is_readable($configFile)) { + $themeWidgetsConfig = new Varien_Simplexml_Config(); + $themeWidgetsConfig->loadFile($configFile); + if ($themeWidgetTypeConfig = $themeWidgetsConfig->getNode($this->_widgetConfigXml->getName())) { + $this->_widgetConfigXml->extend($themeWidgetTypeConfig); + } + } + } + } + return $this->_widgetConfigXml; + } + + /** + * Retrieve widget availabel templates + * + * @return array + */ + public function getWidgetTemplates() + { + $templates = array(); + if ($this->getWidgetConfig() && ($configTemplates = $this->getWidgetConfig()->parameters->template)) { + if ($configTemplates->values && $configTemplates->values->children()) { + foreach ($configTemplates->values->children() as $name => $template) { + $helper = $template->getAttribute('module') ? $template->getAttribute('module') : 'widget'; + $templates[(string)$name] = array( + 'value' => (string)$template->value, + 'label' => Mage::helper($helper)->__((string)$template->label) + ); + } + } elseif ($configTemplates->value) { + $templates['default'] = array( + 'value' => (string)$configTemplates->value, + 'label' => Mage::helper('widget')->__('Default Template') + ); + } + } + return $templates; + } + + /** + * Retrieve blocks that widget support + * + * @return array + */ + public function getWidgetSupportedBlocks() + { + $blocks = array(); + if ($this->getWidgetConfig() && ($supportedBlocks = $this->getWidgetConfig()->supported_blocks)) { + foreach ($supportedBlocks->children() as $block) { + $blocks[] = (string)$block->block_name; + } + } + return $blocks; + } + + /** + * Retrieve widget templates that supported by given block reference + * + * @param string $blockReference + * @return array + */ + public function getWidgetSupportedTemplatesByBlock($blockReference) + { + $templates = array(); + $widgetTemplates = $this->getWidgetTemplates(); + if ($this->getWidgetConfig()) { + if (!($supportedBlocks = $this->getWidgetConfig()->supported_blocks)) { + return $widgetTemplates; + } + foreach ($supportedBlocks->children() as $block) { + if ((string)$block->block_name == $blockReference) { + if ($block->template && $block->template->children()) { + foreach ($block->template->children() as $template) { + if (isset($widgetTemplates[(string)$template])) { + $templates[] = $widgetTemplates[(string)$template]; + } + } + } else { + $templates[] = $widgetTemplates[(string)$template]; + } + } + } + } else { + return $widgetTemplates; + } + return $templates; + } + + /** + * Generate layout update xml + * + * @param string $blockReference + * @param string $position + * @return string + */ + public function generateLayoutUpdateXml($blockReference, $templatePath = '') + { + $templateFilename = Mage::getSingleton('core/design_package')->getTemplateFilename($templatePath, array( + '_area' => $this->getArea(), + '_package' => $this->getPackage(), + '_theme' => $this->getTheme() + )); + if (!$this->getId() && !$this->isCompleteToCreate() + || ($templatePath && !is_readable($templateFilename))) + { + return ''; + } + $parameters = $this->getWidgetParameters(); + $xml = ''; + $template = ''; + if (isset($parameters['template'])) { + unset($parameters['template']); + } + if ($templatePath) { + $template = ' template="' . $templatePath . '"'; + } + $xml .= ''; + foreach ($parameters as $name => $value) { + if (is_array($value)) { + $value = implode(',', $value); + } + if ($name && strlen((string)$value)) { + $xml .= '' . $name . '' . Mage::helper('widget')->htmlEscape($value) . ''; + } + } + $xml .= ''; + return $xml; + } + +} diff --git a/app/code/core/Mage/Widget/controllers/Adminhtml/Widget/InstanceController.php b/app/code/core/Mage/Widget/controllers/Adminhtml/Widget/InstanceController.php new file mode 100644 index 0000000000..e8f0b10ea8 --- /dev/null +++ b/app/code/core/Mage/Widget/controllers/Adminhtml/Widget/InstanceController.php @@ -0,0 +1,286 @@ + + */ +class Mage_Widget_Adminhtml_Widget_InstanceController extends Mage_Adminhtml_Controller_Action +{ + /** + * Session getter + * + * @return Mage_Adminhtml_Model_Session + */ + protected function _getSession() + { + return Mage::getSingleton('adminhtml/session'); + } + + /** + * Load layout, set active menu and breadcrumbs + * + * @return Mage_Widget_Adminhtml_Widget_InstanceController + */ + protected function _initAction() + { + $this->loadLayout() + ->_setActiveMenu('cms/widgets') + ->_addBreadcrumb(Mage::helper('widget')->__('CMS'), + Mage::helper('widget')->__('CMS')) + ->_addBreadcrumb(Mage::helper('widget')->__('Manage Widget Instances'), + Mage::helper('widget')->__('Manage Widget Instances')); + return $this; + } + + /** + * Init widget instance object and set it to registry + * + * @return age_Widget_Model_Widget_Instance|boolean + */ + protected function _initWidgetInstance() + { + $widgetInstance = Mage::getModel('widget/widget_instance'); + $instanceId = $this->getRequest()->getParam('instance_id', null); + $type = $this->getRequest()->getParam('type', null); + $packageTheme = $this->getRequest()->getParam('package_theme', null); + if ($instanceId) { + $widgetInstance->load($instanceId); + if (!$widgetInstance->getId()) { + $this->_getSession()->addError(Mage::helper('widget')->__('Wrong wigdet instance specified.')); + return false; + } + $data['type'] = $widgetInstance->getType(); + $data['package_theme'] = $widgetInstance->getPackageTheme(); + } else { + $widgetInstance->setType($type) + ->setPackageTheme($packageTheme); + } + Mage::register('current_widget_instance', $widgetInstance); + return $widgetInstance; + } + + /** + * Widget Instances Grid + * + */ + public function indexAction() + { + $this->_initAction() + ->renderLayout(); + } + + /** + * New widget instance action (forward to edit action) + * + */ + public function newAction() + { + $this->_forward('edit'); + } + + /** + * Edit widget instance action + * + */ + public function editAction() + { + $widgetInstance = $this->_initWidgetInstance(); + if (!$widgetInstance) { + $this->_redirect('*/*/'); + return; + } + $this->_initAction(); + $this->renderLayout(); + } + + /** + * Validate action + * + */ + public function validateAction() + { + $response = new Varien_Object(); + $response->setError(false); + $widgetInstance = $this->_initWidgetInstance(); + $result = $widgetInstance->validate(); + if ($result !== true && is_string($result)) { + $this->_getSession()->addError($result); + $this->_initLayoutMessages('adminhtml/session'); + $response->setError(true); + $response->setMessage($this->getLayout()->getMessagesBlock()->getGroupedHtml()); + } + $this->getResponse()->setBody($response->toJson()); + } + + /** + * Save action + * + */ + public function saveAction() + { + $widgetInstance = $this->_initWidgetInstance(); + if (!$widgetInstance) { + $this->_redirect('*/*/'); + return; + } + $widgetInstance->setTitle($this->getRequest()->getPost('title')) + ->setStoreIds($this->getRequest()->getPost('store_ids', array(0))) + ->setSortOrder($this->getRequest()->getPost('sort_order', 0)) + ->setPageGroups($this->getRequest()->getPost('widget_instance')) + ->setWidgetParameters($this->getRequest()->getPost('parameters')); + try { + $widgetInstance->save(); + $this->_getSession()->addSuccess( + Mage::helper('widget')->__('Widget instance has been successfully saved.') + ); + if ($this->getRequest()->getParam('back', false)) { + $this->_redirect('*/*/edit', array( + 'instance_id' => $widgetInstance->getId(), + '_current' => true + )); + } else { + $this->_redirect('*/*/'); + } + return; + } catch (Exception $e) { + $this->_getSession()->addError($e->getMessage()); + $this->_redirect('*/*/edit', array('_current' => true)); + return; + } + $this->_redirect('*/*/'); + return; + } + + /** + * Delete Action + * + */ + public function deleteAction() + { + $widgetInstance = $this->_initWidgetInstance(); + if ($widgetInstance) { + try { + $widgetInstance->delete(); + $this->_getSession()->addSuccess( + Mage::helper('widget')->__('Widget instance has been successfully deleted.') + ); + } catch (Exception $e) { + $this->_getSession()->addError($e->getMessage()); + } + } + $this->_redirect('*/*/'); + return; + } + + /** + * Categories chooser Action (Ajax request) + * + */ + public function categoriesAction() + { + $selected = $this->getRequest()->getParam('selected', ''); + $isAnchorOnly = $this->getRequest()->getParam('is_anchor_only', 0); + $chooser = $this->getLayout() + ->createBlock('adminhtml/catalog_category_widget_chooser') + ->setUseMassaction(true) + ->setId(Mage::helper('core')->uniqHash('categories')) + ->setIsAnchorOnly($isAnchorOnly) + ->setSelectedCategories(explode(',', $selected)); + $this->getResponse()->setBody($chooser->toHtml()); + } + + /** + * Products chooser Action (Ajax request) + * + */ + public function productsAction() + { + $selected = $this->getRequest()->getParam('selected', ''); + $productTypeId = $this->getRequest()->getParam('product_type_id', ''); + $chooser = $this->getLayout() + ->createBlock('adminhtml/catalog_product_widget_chooser') + ->setName(Mage::helper('core')->uniqHash('products_grid_')) + ->setUseMassaction(true) + ->setProductTypeId($productTypeId) + ->setSelectedProducts(explode(',', $selected)); + /* @var $serializer Mage_Adminhtml_Block_Widget_Grid_Serializer */ + $serializer = $this->getLayout()->createBlock('adminhtml/widget_grid_serializer'); + $serializer->initSerializerBlock($chooser, 'getSelectedProducts', 'selected_products', 'selected_products'); + $this->getResponse()->setBody($chooser->toHtml().$serializer->toHtml()); + } + + /** + * Blocks Action (Ajax request) + * + */ + public function blocksAction() + { + /* @var $widgetInstance age_Widget_Model_Widget_Instance */ + $widgetInstance = $this->_initWidgetInstance(); + $layout = $this->getRequest()->getParam('layout'); + $selected = $this->getRequest()->getParam('selected', null); + $blocksChooser = $this->getLayout() + ->createBlock('widget/adminhtml_widget_instance_edit_chooser_block') + ->setArea($widgetInstance->getArea()) + ->setPackage($widgetInstance->getPackage()) + ->setTheme($widgetInstance->getTheme()) + ->setLayoutHandle($layout) + ->setSelected($selected) + ->setAllowedBlocks($widgetInstance->getWidgetSupportedBlocks()); + $this->getResponse()->setBody($blocksChooser->toHtml()); + } + + /** + * Templates Chooser Action (Ajax request) + * + */ + public function templateAction() + { + /* @var $widgetInstance age_Widget_Model_Widget_Instance */ + $widgetInstance = $this->_initWidgetInstance(); + $block = $this->getRequest()->getParam('block'); + $selected = $this->getRequest()->getParam('selected', null); + $templateChooser = $this->getLayout() + ->createBlock('widget/adminhtml_widget_instance_edit_chooser_template') + ->setSelected($selected) + ->setWidgetTemplates($widgetInstance->getWidgetSupportedTemplatesByBlock($block)); + $this->getResponse()->setBody($templateChooser->toHtml()); + } + + /** + * Check is allowed access to action + * + * @return bool + */ + protected function _isAllowed() + { + return Mage::getSingleton('admin/session')->isAllowed('cms/widget_instance'); + } +} diff --git a/app/code/core/Mage/Widget/controllers/Adminhtml/WidgetController.php b/app/code/core/Mage/Widget/controllers/Adminhtml/WidgetController.php new file mode 100644 index 0000000000..93aae342c1 --- /dev/null +++ b/app/code/core/Mage/Widget/controllers/Adminhtml/WidgetController.php @@ -0,0 +1,87 @@ + + */ +class Mage_Widget_Adminhtml_WidgetController extends Mage_Adminhtml_Controller_Action +{ + /** + * Wisywyg widget plugin main page + */ + public function indexAction() + { + // save extra params for widgets insertion form + $skipped = $this->getRequest()->getParam('skip_widgets'); + $skipped = Mage::getSingleton('widget/widget_config')->decodeWidgetsFromQuery($skipped); + + Mage::register('skip_widgets', $skipped); + + $this->loadLayout('empty')->renderLayout(); + } + + /** + * Ajax responder for loading plugin options form + */ + public function loadOptionsAction() + { + try { + $this->loadLayout('empty'); + if ($paramsJson = $this->getRequest()->getParam('widget')) { + $request = Mage::helper('core')->jsonDecode($paramsJson); + if (is_array($request)) { + $optionsBlock = $this->getLayout()->getBlock('wysiwyg_widget.options'); + if (isset($request['widget_type'])) { + $optionsBlock->setWidgetType($request['widget_type']); + } + if (isset($request['values'])) { + $optionsBlock->setWidgetValues($request['values']); + } + } + $this->renderLayout(); + } + } catch (Mage_Core_Exception $e) { + $result = array('error' => true, 'message' => $e->getMessage()); + $this->getResponse()->setBody(Mage::helper('core')->jsonEncode($result)); + } + } + + /** + * Format widget pseudo-code for inserting into wysiwyg editor + */ + public function buildWidgetAction() + { + $type = $this->getRequest()->getPost('widget_type'); + $params = $this->getRequest()->getPost('parameters', array()); + $asIs = $this->getRequest()->getPost('as_is'); + $html = Mage::getSingleton('widget/widget')->getWidgetDeclaration($type, $params, $asIs); + $this->getResponse()->setBody($html); + } +} diff --git a/app/code/core/Mage/Widget/etc/adminhtml.xml b/app/code/core/Mage/Widget/etc/adminhtml.xml new file mode 100644 index 0000000000..cc06d7c328 --- /dev/null +++ b/app/code/core/Mage/Widget/etc/adminhtml.xml @@ -0,0 +1,56 @@ + + + + + + + + + + + Widgets + 15 + + + + + + + + + + + + Widgets + 15 + adminhtml/widget_instance + + + + + diff --git a/app/code/core/Mage/Widget/etc/config.xml b/app/code/core/Mage/Widget/etc/config.xml new file mode 100644 index 0000000000..79eb090b6b --- /dev/null +++ b/app/code/core/Mage/Widget/etc/config.xml @@ -0,0 +1,118 @@ + + + + + + 1.4.0.0.0 + + + + + + Mage_Widget_Model + widget_mysql4 + + + Mage_Widget_Model_Mysql4 + + + widget
+
+ + widget_instance
+
+ + widget_instance_page
+
+ + widget_instance_page_layout
+
+
+
+
+ + + + Mage_Widget + + + + + + Mage_Widget_Block + + + + + widget/template_filter + + + widget/template_filter + + +
+ + + + + + Mage_Widget.csv + + + + + + + + widget.xml + + + + + + + + widget/observer + prepareWidgetsPluginConfig + + + + + + + + + + + Mage_Widget_Adminhtml + + + + + +
diff --git a/app/code/core/Mage/Widget/sql/widget_setup/mysql4-install-1.4.0.0.0.php b/app/code/core/Mage/Widget/sql/widget_setup/mysql4-install-1.4.0.0.0.php new file mode 100644 index 0000000000..74b1abef0b --- /dev/null +++ b/app/code/core/Mage/Widget/sql/widget_setup/mysql4-install-1.4.0.0.0.php @@ -0,0 +1,78 @@ +startSetup(); + +$installer->run(" +CREATE TABLE IF NOT EXISTS `{$installer->getTable('widget/widget')}` ( + `widget_id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT, + `code` VARCHAR(255) NOT NULL, + `type` VARCHAR(255) NOT NULL, + `parameters` text, + PRIMARY KEY (`widget_id`), + KEY `IDX_CODE` (`code`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Preconfigured Widgets'; + +CREATE TABLE IF NOT EXISTS `{$installer->getTable('widget/widget_instance')}` ( + `instance_id` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT, + `type` VARCHAR(255) NOT NULL DEFAULT '', + `package_theme` VARCHAR(255) NOT NULL DEFAULT '', + `title` VARCHAR(255) NOT NULL DEFAULT '', + `store_ids` VARCHAR(255) NOT NULL DEFAULT '0', + `widget_parameters` TEXT, + `sort_order` SMALLINT(5) NOT NULL DEFAULT '0', + PRIMARY KEY (`instance_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + +CREATE TABLE IF NOT EXISTS `{$installer->getTable('widget/widget_instance_page')}` ( + `page_id` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT, + `instance_id` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `group` VARCHAR(25) NOT NULL DEFAULT '', + `layout_handle` VARCHAR(255) NOT NULL DEFAULT '', + `block_reference` VARCHAR(255) NOT NULL DEFAULT '', + `for` VARCHAR(25) NOT NULL DEFAULT '', + `entities` TEXT, + `template` VARCHAR(255) NOT NULL DEFAULT '', + PRIMARY KEY (`page_id`), + KEY `IDX_WIDGET_WIDGET_INSTANCE_ID` (`instance_id`), + CONSTRAINT `FK_WIDGET_WIDGET_INSTANCE_ID` FOREIGN KEY (`instance_id`) REFERENCES `{$installer->getTable('widget/widget_instance')}` (`instance_id`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + +CREATE TABLE IF NOT EXISTS `{$installer->getTable('widget/widget_instance_page_layout')}` ( + `page_id` int(11) UNSIGNED NOT NULL DEFAULT '0', + `layout_update_id` int(10) UNSIGNED NOT NULL DEFAULT '0', + UNIQUE KEY `page_id` (`page_id`,`layout_update_id`), + KEY `IDX_WIDGET_WIDGET_INSTANCE_PAGE_ID` (`page_id`), + KEY `IDX_WIDGET_WIDGET_INSTANCE_LAYOUT_UPDATE_ID` (`layout_update_id`), + CONSTRAINT `FK_WIDGET_WIDGET_INSTANCE_LAYOUT_UPDATE_ID` FOREIGN KEY (`layout_update_id`) REFERENCES `{$installer->getTable('core/layout_update')}` (`layout_update_id`) ON DELETE CASCADE ON UPDATE CASCADE, + CONSTRAINT `FK_WIDGET_WIDGET_INSTANCE_PAGE_ID` FOREIGN KEY (`page_id`) REFERENCES `{$installer->getTable('widget/widget_instance_page')}` (`page_id`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +"); + +$installer->endSetup(); diff --git a/app/code/core/Mage/Wishlist/Block/Abstract.php b/app/code/core/Mage/Wishlist/Block/Abstract.php index cc4958354d..b0536c3b25 100644 --- a/app/code/core/Mage/Wishlist/Block/Abstract.php +++ b/app/code/core/Mage/Wishlist/Block/Abstract.php @@ -119,7 +119,7 @@ public function getWishlistItems() ->addUrlRewrite(); Mage::getSingleton('catalog/product_visibility') - ->addVisibleInSearchFilterToCollection($this->_collection); + ->addVisibleInSiteFilterToCollection($this->_collection); $this->_prepareCollection($this->_collection); } diff --git a/app/code/core/Mage/Wishlist/Controller/Abstract.php b/app/code/core/Mage/Wishlist/Controller/Abstract.php new file mode 100644 index 0000000000..34f60bd99b --- /dev/null +++ b/app/code/core/Mage/Wishlist/Controller/Abstract.php @@ -0,0 +1,163 @@ + + */ +abstract class Mage_Wishlist_Controller_Abstract extends Mage_Core_Controller_Front_Action +{ + /** + * Retrieve current wishlist instance + * + * @return Mage_Wishlist_Model_Wishlist|false + */ + abstract protected function _getWishlist(); + + /** + * Add all items from wishlist to shopping cart + * + */ + public function allcartAction() + { + $wishlist = $this->_getWishlist(); + if (!$wishlist) { + $this->_forward('noRoute'); + return ; + } + $isOwner = $wishlist->isOwner(Mage::getSingleton('customer/session')->getCustomerId()); + + $messages = array(); + $addedItems = array(); + $notSalable = array(); + $hasOptions = array(); + + $cart = Mage::getSingleton('checkout/cart'); + $collection = $wishlist->getItemCollection(); + + foreach ($collection as $item) { + /* @var $item Mage_Wishlist_Model_Item */ + try { + if ($item->addToCart($cart, $isOwner)) { + $addedItems[] = $item->getProduct(); + } + + } catch (Mage_Core_Exception $e) { + if ($e->getCode() == Mage_Wishlist_Model_Item::EXCEPTION_CODE_NOT_SALABLE) { + $notSalable[] = $item; + } else if ($e->getCode() == Mage_Wishlist_Model_Item::EXCEPTION_CODE_HAS_REQUIRED_OPTIONS) { + $hasOptions[] = $item; + } else { + $messages[] = $e->getMessage(); + } + } catch (Exception $e) { + Mage::logException($e); + $messages[] = Mage::helper('wishlist')->__('Cannot add to shopping cart'); + } + } + + if ($isOwner) { + $indexUrl = Mage::helper('wishlist')->getListUrl(); + } else { + $indexUrl = Mage::getUrl('wishlist/shared', array('code' => $wishlist->getSharingCode())); + } + if (Mage::helper('checkout/cart')->getShouldRedirectToCart()) { + $redirectUrl = Mage::helper('checkout/cart')->getCartUrl(); + } else if ($this->_getRefererUrl()) { + $redirectUrl = $this->_getRefererUrl(); + } else { + $redirectUrl = $indexUrl; + } + + if (!empty($notSalable)) { + $products = array(); + foreach ($notSalable as $item) { + $products[] = Mage::helper('wishlist')->__('"%s"', $item->getProduct()->getName()); + } + $products = join(', ', $products); + + Mage::getSingleton('wishlist/session')->addError( + Mage::helper('wishlist')->__('Unable to add the following product(s) to shopping cart: %s.', $products) + ); + + $redirectUrl = $indexUrl; + } + + if (!empty($hasOptions)) { + if (empty($messages) && empty($notSalable) && count($hasOptions) == 1) { + $item = $hasOptions[0]; + if ($isOwner) { + $item->delete(); + } + $redirectUrl = $item->getProductUrl(); + } else { + $products = array(); + foreach ($hasOptions as $item) { + $products[] = Mage::helper('wishlist')->__('"%s"', $item->getProduct()->getName()); + } + $products = join(', ', $products); + + Mage::getSingleton('wishlist/session')->addError( + Mage::helper('wishlist')->__('Product(s) %s have required options. Each of them can be added to cart separately only.', $products) + ); + + $redirectUrl = $indexUrl; + } + } + + if (!empty($addedItems)) { + $products = array(); + foreach ($addedItems as $product) { + $products[] = Mage::helper('wishlist')->__('"%s"', $product->getName()); + } + $products = join(', ', $products); + $qty = count($addedItems); + + Mage::getSingleton('checkout/session')->addSuccess( + Mage::helper('wishlist')->__('%d product(s) have been added to shopping cart: %s.', $qty, $products) + ); + } + + if (!empty($messages)) { + foreach ($messages as $message) { + Mage::getSingleton('wishlist/session')->addError($message); + } + + $redirectUrl = $indexUrl; + } + + // save cart and collect totals + $cart->save()->getQuote()->collectTotals(); + + Mage::helper('wishlist')->calculate(); + + $this->_redirectUrl($redirectUrl); + } +} diff --git a/app/code/core/Mage/Wishlist/Helper/Data.php b/app/code/core/Mage/Wishlist/Helper/Data.php index e386303d9b..9b88b38bff 100644 --- a/app/code/core/Mage/Wishlist/Helper/Data.php +++ b/app/code/core/Mage/Wishlist/Helper/Data.php @@ -130,7 +130,7 @@ public function getProductCollection() ->getProductCollection(); Mage::getSingleton('catalog/product_visibility') - ->addVisibleInSearchFilterToCollection($this->_productCollection); + ->addVisibleInSiteFilterToCollection($this->_productCollection); } return $this->_productCollection; } diff --git a/app/code/core/Mage/Wishlist/Model/Item.php b/app/code/core/Mage/Wishlist/Model/Item.php index ad0cfc2507..8dc6e259e6 100644 --- a/app/code/core/Mage/Wishlist/Model/Item.php +++ b/app/code/core/Mage/Wishlist/Model/Item.php @@ -28,18 +28,83 @@ /** * Wishlist item model * - * @category Mage - * @package Mage_Wishlist + * @category Mage + * @package Mage_Wishlist * @author Magento Core Team */ class Mage_Wishlist_Model_Item extends Mage_Core_Model_Abstract { + const EXCEPTION_CODE_NOT_SALABLE = 901; + const EXCEPTION_CODE_HAS_REQUIRED_OPTIONS = 902; + /** + * Initialize resource model + * + */ protected function _construct() { $this->_init('wishlist/item'); } + /** + * Retrieve resource instance wrapper + * + * @return Mage_Wishlist_Model_Mysql4_Item + */ + protected function _getResource() + { + return parent::_getResource(); + } + + /** + * Validate wish list item data + * + * @throws Mage_Core_Exception + * @return bool + */ + public function validate() + { + if (!$this->getWishlistId()) { + Mage::throwException(Mage::helper('wishlist')->__('Can\'t specify wishlist')); + } + if (!$this->getProductId()) { + Mage::throwException(Mage::helper('wishlist')->__('Can\'t specify product')); + } + + return true; + } + + /** + * Check required data + * + * @return Mage_Wishlist_Model_Item + */ + protected function _beforeSave() + { + parent::_beforeSave(); + + // validate required item data + $this->validate(); + + // set current store id if it is not defined + if (is_null($this->getStoreId())) { + $this->setStoreId(Mage::app()->getStore()->getId()); + } + + // set current date if added at data is not defined + if (is_null($this->getAddedAt())) { + $this->setAddedAt(Mage::getSingleton('core/date')->gmtDate()); + } + + return $this; + } + + /** + * Retrieve wishlist item data as array + * + * @deprecated since 1.4.0.0 + * @return array + */ public function getDataForSave() { $data = array(); @@ -52,10 +117,115 @@ public function getDataForSave() return $data; } + /** + * Load item by product, wishlist and shared stores + * + * @param int $wishlistId + * @param int $productId + * @param array $sharedStores + * @return Mage_Wishlist_Model_Item + */ public function loadByProductWishlist($wishlistId, $productId, $sharedStores) { $this->_getResource()->loadByProductWishlist($this, $wishlistId, $productId, $sharedStores); + $this->_afterLoad(); + $this->setOrigData(); + return $this; } + /** + * Retrieve item product instance + * + * @throws Mage_Core_Exception + * @return Mage_Catalog_Model_Product + */ + public function getProduct() + { + $product = $this->_getData('product'); + if (is_null($product)) { + if (!$this->getProductId()) { + Mage::throwException(Mage::helper('wishlist')->__('Can\'t specify product')); + } + + $product = Mage::getModel('catalog/product') + ->load($this->getProductId()); + + $this->setData('product', $product); + } + return $product; + } + + /** + * Add or Move item product to shopping cart + * + * Return true if product was successful added or exception with code + * Return false for disabled or unvisible products + * + * @throws Mage_Core_Exception + * @param Mage_Checkout_Model_Cart $cart + * @param bool $delete delete the item after successful add to cart + * @return bool + */ + public function addToCart(Mage_Checkout_Model_Cart $cart, $delete = false) + { + $product = $this->getProduct(); + $product->setQty(1); + $storeId = $this->getStoreId(); + + if ($product->getStatus() != Mage_Catalog_Model_Product_Status::STATUS_ENABLED) { + return false; + } + + if (!$product->isVisibleInSiteVisibility()) { + if ($product->getStoreId() == $storeId) { + return false; + } + $urlData = Mage::getResourceSingleton('catalog/url') + ->getRewriteByProductStore(array($product->getId() => $storeId)); + if (!isset($urlData[$product->getId()])) { + return false; + } + $product->setUrlDataObject(new Varien_Object($urlData)); + $visibility = $product->getUrlDataObject()->getVisibility(); + if (!in_array($visibility, $product->getVisibleInSiteVisibilities())) { + return false; + } + } + + if (!$product->isSalable()) { + throw new Mage_Core_Exception(null, self::EXCEPTION_CODE_NOT_SALABLE); + } + + if ($product->getTypeInstance(true)->hasRequiredOptions($product)) { + throw new Mage_Core_Exception(null, self::EXCEPTION_CODE_HAS_REQUIRED_OPTIONS); + } + + $cart->addProduct($product); + if (!$product->isVisibleInSiteVisibility()) { + $cart->getQuote()->getItemByProduct($product)->setStoreId($storeId); + } + + if ($delete) { + $this->delete(); + } + + return true; + } + + /** + * Retrieve Product View Page URL + * + * If product has required options add special key to URL + * + * @return string + */ + public function getProductUrl() + { + $product = $this->getProduct(); + if ($product->getTypeInstance(true)->hasRequiredOptions($product)) { + $query['options'] = 'cart'; + } + return $product->getUrlModel()->getUrl($product, array('_query' => $query)); + } } diff --git a/app/code/core/Mage/Wishlist/Model/Mysql4/Item.php b/app/code/core/Mage/Wishlist/Model/Mysql4/Item.php index bb9ea27cca..071176acf1 100644 --- a/app/code/core/Mage/Wishlist/Model/Mysql4/Item.php +++ b/app/code/core/Mage/Wishlist/Model/Mysql4/Item.php @@ -34,27 +34,40 @@ */ class Mage_Wishlist_Model_Mysql4_Item extends Mage_Core_Model_Mysql4_Abstract { - - protected $_productIdFieldName = 'product_id'; - + /** + * Initialize connection and define main table + * + */ protected function _construct() { $this->_init('wishlist/item', 'wishlist_item_id'); } - public function loadByProductWishlist(Mage_Wishlist_Model_Item $item, $wishlistId, $productId, array $sharedStores) + /** + * Load item by wishlist, product and shared stores + * + * @param Mage_Wishlist_Model_Item $object + * @param int $wishlistId + * @param int $productId + * @param array $sharedStores + * @return Mage_Wishlist_Model_Mysql4_Item + */ + public function loadByProductWishlist($object, $wishlistId, $productId, $sharedStores) { - $select = $this->_getReadAdapter()->select() - ->from(array('main_table'=>$this->getTable('item'))) - ->where('main_table.wishlist_id = ?', $wishlistId) - ->where('main_table.product_id = ?', $productId) - ->where('main_table.store_id in (?)', $sharedStores); + $adapter = $this->_getReadAdapter(); + $select = $adapter->select() + ->from($this->getMainTable()) + ->where('wishlist_id=?', $wishlistId) + ->where('product_id=?', $productId) + ->where('store_id IN(?)', $sharedStores); - if($_data = $this->_getReadAdapter()->fetchRow($select)) { - $item->setData($_data); + $data = $adapter->fetchRow($select); + if ($data) { + $object->setData($data); } - return $item; - } + $this->_afterLoad($object); + return $this; + } } diff --git a/app/code/core/Mage/Wishlist/Model/Mysql4/Item/Collection.php b/app/code/core/Mage/Wishlist/Model/Mysql4/Item/Collection.php index 2f454531b6..47e992a4f9 100644 --- a/app/code/core/Mage/Wishlist/Model/Mysql4/Item/Collection.php +++ b/app/code/core/Mage/Wishlist/Model/Mysql4/Item/Collection.php @@ -32,66 +32,51 @@ * @package Mage_Wishlist * @author Magento Core Team */ -class Mage_Wishlist_Model_Mysql4_Item_Collection extends Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Collection +class Mage_Wishlist_Model_Mysql4_Item_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract { - + /** + * Initialize resource model for collection + * + */ public function _construct() { - $this->_init('wishlist/item', 'catalog/product'); + $this->_init('wishlist/item'); } - public function useProductItem() + /** + * Add filter by wishlist object + * + * @param Mage_Wishlist_Model_Wishlist $wishlist + * @return Mage_Wishlist_Model_Mysql4_Item_Collection + */ + public function addWishlistFilter(Mage_Wishlist_Model_Wishlist $wishlist) { - $this->setObject(Mage::getModel('catalog/product')); + $this->addFieldToFilter('wishlist_id', $wishlist->getId()); + return $this; } - public function addWishlistFilter(Mage_Wishlist_Model_Wishlist $wishlist) + /** + * Add filter by shared stores + * + * @param int|array $store + * @return Mage_Wishlist_Model_Mysql4_Item_Collection + */ + public function addStoreFilter($store) { - $this->_joinFields['e_id'] = array('table'=>'e','field'=>'entity_id'); - $this->joinTable('wishlist/item', - 'product_id=e_id', - array( - 'wishlist_item_id' => 'wishlist_item_id', - 'product_id' => 'product_id', - 'store_id' => 'store_id', - 'wishlist_id' => 'wishlist_id', - 'added_at' => 'added_at', - 'description' => 'description' - ), - array('wishlist_id'=>$wishlist->getId()) - ); + $this->addFieldToFilter('store_id', array('in' => $store)); return $this; } + /** + * This method will be not supported anymore + * + * @deprecated since 1.4.0.0 + * @return Mage_Wishlist_Model_Mysql4_Item_Collection + */ public function addStoreData() { - if(!isset($this->_joinFields['e_id'])) { - return $this; - } - - $dayTable = $this->_getAttributeTableAlias('days_in_wishlist'); - $this->joinField('store_name', 'core/store', 'name', 'store_id=store_id') - ->joinField('days_in_wishlist', - 'wishlist/item', - "(TO_DAYS('" . Mage::getSingleton('core/date')->date() . "') - TO_DAYS(DATE_ADD(".$dayTable.".added_at, INTERVAL " .(int) Mage::getSingleton('core/date')->getGmtOffset() . " SECOND)))", - 'wishlist_item_id=wishlist_item_id'); - return $this; } - - protected function _getAttributeFieldName($attributeCode) - { - if($attributeCode == 'days_in_wishlist') { - return $this->_joinFields[$attributeCode]['field']; - } - return parent::_getAttributeFieldName($attributeCode); - } - - public function load($p=false, $l=false) - { - return parent::load($p, $l); - } - } diff --git a/app/code/core/Mage/Wishlist/Model/Mysql4/Product/Collection.php b/app/code/core/Mage/Wishlist/Model/Mysql4/Product/Collection.php index da0d271f3d..e3c0af2c20 100644 --- a/app/code/core/Mage/Wishlist/Model/Mysql4/Product/Collection.php +++ b/app/code/core/Mage/Wishlist/Model/Mysql4/Product/Collection.php @@ -84,7 +84,8 @@ public function addWishlistFilter(Mage_Wishlist_Model_Wishlist $wishlist) 'wishlist_item_id' => 'wishlist_item_id', ), array( - 'wishlist_id' => $wishlist->getId() + 'wishlist_id' => $wishlist->getId(), + 'store_id' => array('in' => $wishlist->getSharedStoreIds()) ) ); diff --git a/app/code/core/Mage/Wishlist/Model/Observer.php b/app/code/core/Mage/Wishlist/Model/Observer.php index 3361e4da4f..fcd8d40f04 100644 --- a/app/code/core/Mage/Wishlist/Model/Observer.php +++ b/app/code/core/Mage/Wishlist/Model/Observer.php @@ -160,4 +160,50 @@ public function customerLogout(Varien_Event_Observer $observer) return $this; } + + /** + * Set flag dirty to wishlists if product was deleted + * + * @param Varien_Event_Observer $observer + * @return Mage_Wishlist_Model_Observer + */ + public function markWishlistsAsDirtyByProduct(Varien_Event_Observer $observer) + { + $product = $observer->getEvent()->getProduct(); + if ($product) { + Mage::getResourceModel('wishlist/wishlist')->markWishlistsAsDirtyByProduct($product->getId()); + } + return $this; + } + + /** + * Set flag dirty to wishlists if product was disabled + * + * @param Varien_Event_Observer $observer + * @return Mage_Wishlist_Model_Observer + */ + public function markWishlistsAsDirtyOnProductSaveAfter(Varien_Event_Observer $observer) + { + $product = $observer->getEvent()->getProduct(); + if ($product && ($product->getStatus() == Mage_Catalog_Model_Product_Status::STATUS_DISABLED || + $product->getVisibility() == Mage_Catalog_Model_Product_Visibility::VISIBILITY_NOT_VISIBLE)) { + Mage::getResourceModel('wishlist/wishlist')->markWishlistsAsDirtyByProduct($product->getId()); + } + return $this; + } + + /** + * Set flag dirty to wishlists if wishlist item was deleted + * + * @param Varien_Event_Observer $observer + * @return Mage_Wishlist_Model_Observer + */ + public function markWishlistsAsDirtyByItem(Varien_Event_Observer $observer) + { + $item = $observer->getEvent()->getItem(); + if ($item) { + Mage::getResourceSingleton('wishlist/wishlist')->markWishlistAsDirty($item->getWishlistId()); + } + return $this; + } } diff --git a/app/code/core/Mage/Wishlist/Model/Wishlist.php b/app/code/core/Mage/Wishlist/Model/Wishlist.php index 088b62b610..ef97832caf 100644 --- a/app/code/core/Mage/Wishlist/Model/Wishlist.php +++ b/app/code/core/Mage/Wishlist/Model/Wishlist.php @@ -100,6 +100,7 @@ public function loadByCode($code) if(!$this->getShared()) { $this->setId(null); } + return $this; } @@ -120,9 +121,8 @@ protected function _getSharingRandomCode() */ public function getItemCollection() { - if(is_null($this->_itemCollection)) { + if (is_null($this->_itemCollection)) { $this->_itemCollection = Mage::getResourceModel('wishlist/item_collection') - ->setStoreId($this->getStore()->getId()) ->addWishlistFilter($this); } @@ -287,4 +287,15 @@ public function isSalable() } return false; } + + /** + * Check customer is owner this wishlist + * + * @param int $customerId + * @return bool + */ + public function isOwner($customerId) + { + return $customerId == $this->getCustomerId(); + } } diff --git a/app/code/core/Mage/Wishlist/controllers/IndexController.php b/app/code/core/Mage/Wishlist/controllers/IndexController.php index 76a1c11008..81ca40cf90 100644 --- a/app/code/core/Mage/Wishlist/controllers/IndexController.php +++ b/app/code/core/Mage/Wishlist/controllers/IndexController.php @@ -28,11 +28,11 @@ /** * Wishlist front controller * - * @category Mage - * @package Mage_Wishlist - * @author Magento Core Team + * @category Mage + * @package Mage_Wishlist + * @author Magento Core Team */ -class Mage_Wishlist_IndexController extends Mage_Core_Controller_Front_Action +class Mage_Wishlist_IndexController extends Mage_Wishlist_Controller_Abstract { /** * Action list where need check enabled cookie @@ -60,7 +60,7 @@ public function preDispatch() /** * Retrieve wishlist object * - * @return Mage_Wishlist_Model_Wishlist + * @return Mage_Wishlist_Model_Wishlist|false */ protected function _getWishlist() { @@ -68,9 +68,12 @@ protected function _getWishlist() $wishlist = Mage::getModel('wishlist/wishlist') ->loadByCustomer(Mage::getSingleton('customer/session')->getCustomer(), true); Mage::register('wishlist', $wishlist); - } - catch (Exception $e) { - Mage::getSingleton('wishlist/session')->addError($this->__('Cannot create wishlist')); + } catch (Mage_Core_Exception $e) { + Mage::getSingleton('wishlist/session')->addError($e->getMessage()); + } catch (Exception $e) { + Mage::getSingleton('wishlist/session')->addException($e, + Mage::helper('wishlist')->__('Cannot create wishlist') + ); return false; } return $wishlist; @@ -83,24 +86,22 @@ public function indexAction() { $this->_getWishlist(); $this->loadLayout(); - $this->_initLayoutMessages('customer/session'); - $this->_initLayoutMessages('catalog/session'); - - if ($block = $this->getLayout()->getBlock('customer.wishlist')) { - $block->setRefererUrl($this->_getRefererUrl()); - } $session = Mage::getSingleton('customer/session'); - - /** - * Get referer to avoid referring to the compare popup window - */ - if ($block && $referer = $session->getAddActionReferer(true)) { - $block->setRefererUrl($referer); + $block = $this->getLayout()->getBlock('customer.wishlist'); + $referer = $session->getAddActionReferer(true); + if ($block) { + $block->setRefererUrl($this->_getRefererUrl()); + if ($referer) { + $block->setRefererUrl($referer); + } } $this->_initLayoutMessages('customer/session'); $this->_initLayoutMessages('checkout/session'); + $this->_initLayoutMessages('catalog/session'); + $this->_initLayoutMessages('wishlist/session'); + $this->renderLayout(); } @@ -236,167 +237,51 @@ public function removeAction() public function cartAction() { $wishlist = $this->_getWishlist(); + if (!$wishlist) { + return $this->_redirect('*/*'); + } + $itemId = (int)$this->getRequest()->getParam('item'); /* @var $item Mage_Wishlist_Model_Item */ $item = Mage::getModel('wishlist/item')->load($itemId); - if ($item->getWishlistId() == $wishlist->getId()) { - try { - /* @var $product Mage_Catalog_Model_Product */ - $product = Mage::getModel('catalog/product') - ->load($item->getProductId()) - ->setQty(1); - - if ($product->getTypeInstance(true)->hasRequiredOptions($product)) { - $url = $product->getProductUrl(); - $sep = (strpos($url, '?') !== false) ? '&' : '?'; - $url = $url . $sep . 'options=cart'; - - $item->delete(); - Mage::helper('wishlist')->calculate(); - - $this->_redirectUrl($url); - return; - } - - Mage::getSingleton('checkout/cart') - ->addProduct($product) - ->save(); - - $item->delete(); - Mage::helper('wishlist')->calculate(); - } - catch (Exception $e) { - if ($e instanceof Mage_Core_Exception) { - Mage::getSingleton('checkout/session')->addError($e->getMessage()); - } - else { - Mage::getSingleton('checkout/session')->addException($e, - Mage::helper('wishlist')->__('Can not add item to shopping cart')); - } - - $url = Mage::getSingleton('checkout/session')->getRedirectUrl(true); - if ($url) { - $url = Mage::getUrl('catalog/product/view', array( - 'id' => $item->getProductId(), - 'wishlist_next' => 1 - )); - Mage::getSingleton('checkout/session')->setSingleWishlistId($item->getId()); - $this->getResponse()->setRedirect($url); - } - else { - $this->_redirect('*/*/'); - } - return; - } - } - - if (Mage::getStoreConfig('checkout/cart/redirect_to_cart')) { - $this->_redirect('checkout/cart'); - } - else { - if ($this->getRequest()->getParam(self::PARAM_NAME_BASE64_URL)) { - $this->getResponse()->setRedirect( - Mage::helper('core')->urlDecode($this->getRequest()->getParam(self::PARAM_NAME_BASE64_URL)) - ); - } - else { - $this->_redirect('*/*/'); - } + if (!$item->getId() || $item->getWishlistId() != $wishlist->getId()) { + return $this->_redirect('*/*'); } - } - /** - * Add all items from wishlist to shopping cart - * - * If wishlist has products with required options - * remove it from wishlist and redirect to product view page - * - */ - public function allcartAction() { - $messages = array(); - $urls = array(); - $wishlistIds = array(); - $notSalableNames = array(); // Out of stock products message - - $wishlist = $this->_getWishlist(); - $collection = $wishlist->getItemCollection()->load(); - /* @var $cart Mage_Checkout_Model_Cart */ + /* @var $session Mage_Wishlist_Model_Session */ + $session = Mage::getSingleton('wishlist/session'); $cart = Mage::getSingleton('checkout/cart'); - /* @var $item Mage_Wishlist_Model_Item */ - foreach ($collection as $item) { - try { - /* @var $product Mage_Catalog_Model_Product */ - $product = Mage::getModel('catalog/product') - ->load($item->getProductId()) - ->setQty(1); - - if ($product->isSalable()) { - // check required options - if ($product->getTypeInstance(true)->hasRequiredOptions($product)) { - $url = $product->getUrlModel()->getUrl($product, array('_query' => array( - 'options' => 'cart' - ))); - - $item->delete(); - Mage::helper('wishlist')->calculate(); - - $this->_redirectUrl($url); - return; - } - - $cart->addProduct($product); - if (!$product->isVisibleInSiteVisibility()) { - $cart->getQuote()->getItemByProduct($product) - ->setStoreId($item->getStoreId()); - } - - $item->delete(); - } - else { - $notSalableNames[] = $product->getName(); - } - } - catch (Exception $e) { - $url = Mage::getSingleton('checkout/session')->getRedirectUrl(true); - if ($url) { - $url = Mage::getUrl('catalog/product/view', array( - 'id' => $item->getProductId(), - 'wishlist_next' => 1 - )); + $redirectUrl = Mage::getUrl('*/*'); - $urls[] = $url; - $messages[] = $e->getMessage(); - $wishlistIds[] = $item->getId(); - } - else { - $item->delete(); - } - } + try { + $item->addToCart($cart, true); + $cart->save()-> getQuote()->collectTotals(); - Mage::getSingleton('checkout/cart')->save(); - } + Mage::helper('wishlist')->calculate(); - if (count($notSalableNames) > 0) { - Mage::getSingleton('checkout/session') - ->addNotice($this->__('This product(s) is currently out of stock:')); - array_map(array(Mage::getSingleton('checkout/session'), 'addNotice'), $notSalableNames); + if (Mage::helper('checkout/cart')->getShouldRedirectToCart()) { + $redirectUrl = Mage::helper('checkout/cart')->getCartUrl(); + } else if ($this->_getRefererUrl()) { + $redirectUrl = $this->_getRefererUrl(); + } + } catch (Mage_Core_Exception $e) { + if ($e->getCode() == Mage_Wishlist_Model_Item::EXCEPTION_CODE_NOT_SALABLE) { + $session->addError(Mage::helper('wishlist')->__('This product(s) is currently out of stock')); + } else if ($e->getCode() == Mage_Wishlist_Model_Item::EXCEPTION_CODE_HAS_REQUIRED_OPTIONS) { + $redirectUrl = $item->getProductUrl(); + $item->delete(); + } else { + $session->addError($e->getMessage()); + } + } catch (Exception $e) { + $session->addException($e, Mage::helper('wishlist')->__('Cannot add item to shopping cart')); } Mage::helper('wishlist')->calculate(); - if ($urls) { - Mage::getSingleton('checkout/session')->addError(array_shift($messages)); - $this->getResponse()->setRedirect(array_shift($urls)); - - Mage::getSingleton('checkout/session')->setWishlistPendingUrls($urls); - Mage::getSingleton('checkout/session')->setWishlistPendingMessages($messages); - Mage::getSingleton('checkout/session')->setWishlistIds($wishlistIds); - } - else { - $this->_redirect('checkout/cart'); - } + return $this->_redirectUrl($redirectUrl); } public function shareAction() @@ -423,7 +308,7 @@ public function sendAction() foreach ($emails as $index => $email) { $email = trim($email); if (!Zend_Validate::is($email, 'EmailAddress')) { - $error = $this->__('You input not valid email address.'); + $error = $this->__('Please input a valid email address.'); break; } $emails[$index] = $email; diff --git a/app/code/core/Mage/Wishlist/controllers/SharedController.php b/app/code/core/Mage/Wishlist/controllers/SharedController.php index 6f8145146b..a560123ac6 100644 --- a/app/code/core/Mage/Wishlist/controllers/SharedController.php +++ b/app/code/core/Mage/Wishlist/controllers/SharedController.php @@ -28,89 +28,53 @@ /** * Wishlist shared items controllers * - * @category Mage - * @package Mage_Wishlist + * @category Mage + * @package Mage_Wishlist * @author Magento Core Team */ -class Mage_Wishlist_SharedController extends Mage_Core_Controller_Front_Action +class Mage_Wishlist_SharedController extends Mage_Wishlist_Controller_Abstract { - - public function indexAction() + /** + * Retrieve wishlist instance by requested code + * + * @return Mage_Wishlist_Model_Wishlist|false + */ + protected function _getWishlist() { - $code = (string) $this->getRequest()->getParam('code'); + $code = (string)$this->getRequest()->getParam('code'); if (empty($code)) { - $this->_forward('noRoute'); - return; + return false; } - $wishlist = Mage::getModel('wishlist/wishlist')->loadByCode($code); - if ($wishlist->getCustomerId() && $wishlist->getCustomerId() == Mage::getSingleton('customer/session')->getCustomerId()) { - $this->_redirectUrl(Mage::helper('wishlist')->getListUrl()); - return; + $wishlist = Mage::getModel('wishlist/wishlist')->loadByCode($code); + if (!$wishlist->getId()) { + return false; } - if(!$wishlist->getId()) { - $this->_forward('noRoute'); - return; - } else { - Mage::register('shared_wishlist', $wishlist); - $this->loadLayout(); - $this->_initLayoutMessages('wishlist/session'); - $this->renderLayout(); - } + Mage::getSingleton('checkout/session')->setSharedWishlist($code); + return $wishlist; } - public function allcartAction() + /** + * Shared wishlist view page + * + */ + public function indexAction() { - $code = (string) $this->getRequest()->getParam('code'); - if (empty($code)) { - $this->_forward('noRoute'); - return; - } - - $wishlist = Mage::getModel('wishlist/wishlist')->loadByCode($code); - Mage::getSingleton('checkout/session')->setSharedWishlist($code); + $wishlist = $this->_getWishlist(); + $customerId = Mage::getSingleton('customer/session')->getCustomerId(); - if (!$wishlist->getId()) { - $this->_forward('noRoute'); + if ($wishlist->getCustomerId() && $wishlist->getCustomerId() == $customerId) { + $this->_redirectUrl(Mage::helper('wishlist')->getListUrl()); return; - } else { - $urls = false; - foreach ($wishlist->getProductCollection() as $item) { - try { - $product = Mage::getModel('catalog/product') - ->load($item->getProductId()); - if ($product->isSalable()){ - Mage::getSingleton('checkout/cart')->addProduct($product); - } - } - catch (Exception $e) { - $url = Mage::getSingleton('checkout/session')->getRedirectUrl(true); - if ($url){ - $url = Mage::getModel('core/url')->getUrl('catalog/product/view', array( - 'id'=>$item->getProductId(), - 'wishlist_next'=>1 - )); - - $urls[] = $url; - $messages[] = $e->getMessage(); - $wishlistIds[] = $item->getId(); - } - } + } - Mage::getSingleton('checkout/cart')->save(); - } - if ($urls) { - Mage::getSingleton('checkout/session')->addError(array_shift($messages)); - $this->getResponse()->setRedirect(array_shift($urls)); + Mage::register('shared_wishlist', $wishlist); - Mage::getSingleton('checkout/session')->setWishlistPendingUrls($urls); - Mage::getSingleton('checkout/session')->setWishlistPendingMessages($messages); - Mage::getSingleton('checkout/session')->setWishlistIds($wishlistIds); - } else { - $this->_redirect('checkout/cart'); - } - } + $this->loadLayout(); + $this->_initLayoutMessages('checkout/session'); + $this->_initLayoutMessages('wishlist/session'); + $this->renderLayout(); } } diff --git a/app/code/core/Zend/Cache/Backend/Apc.php b/app/code/core/Zend/Cache/Backend/Apc.php deleted file mode 100644 index d8bd9e2d49..0000000000 --- a/app/code/core/Zend/Cache/Backend/Apc.php +++ /dev/null @@ -1,352 +0,0 @@ - '', - 'tag_prefix' => 'APC_TAG_', - 'tag_storage' => 'APC_ALL_TAGS' - ); - - /** - * Constructor - * - * @param array $options associative array of options - */ - public function __construct($options = array()) - { - if (!extension_loaded('apc')) { - Zend_Cache::throwException('The apc extension must be loaded for using this backend !'); - } - parent::__construct($options); - } - - /** - * Get tag storage cache identifier - * - * @return string - */ - protected function _getTagStorageId() - { - return $this->_prepareId($this->_options['tag_storage']); - } - - /** - * Get all cache ids identifier - * - * @return string - */ - protected function _getCachePrefix() - { - return $this->_options['cache_prefix']; - } - - /** - * Prepare cache identifier - * - * @param string $origId - * @return string - */ - protected function _prepareId($origId) - { - return $this->_getCachePrefix() . $origId; - } - - /** - * Parepare tag identifier - * - * @param string $tagId - * @return string - */ - protected function _prepareTagId($tagId) - { - return $this->_options['tag_prefix'] . $tagId; - } - - /** - * Test if a cache is available for the given id and (if yes) return it (false else) - * - * WARNING $doNotTestCacheValidity=true is unsupported by the Apc backend - * - * @param string $id cache id - * @param boolean $doNotTestCacheValidity if set to true, the cache validity won't be tested - * @return string cached datas (or false) - */ - public function load($id, $doNotTestCacheValidity = false) - { - $id = $this->_prepareId($id); - - if ($doNotTestCacheValidity) { - $this->_log("Zend_Cache_Backend_Apc::load() : \$doNotTestCacheValidity=true is unsupported by the Apc backend"); - } - - $tmp = apc_fetch($id); - if (is_array($tmp) && isset($tmp[0])) { - return $tmp[0]; - } else { - return $tmp; - } - return false; - } - - /** - * Test if a cache is available or not (for the given id) - * - * @param string $id cache id - * @return mixed false (a cache is not available) or "last modified" timestamp (int) of the available cache record - */ - public function test($id) - { - $id = $this->_prepareId($id); - $tmp = apc_fetch($id); - if (is_array($tmp)) { - return $tmp[1]; - } - return false; - } - - /** - * Save some string datas into a cache record - * - * Note : $data is always "string" (serialization is done by the - * core not by the backend) - * - * @param string $data datas to cache - * @param string $id cache id - * @param array $tags array of strings, the cache record will be tagged by each string entry - * @param int $specificLifetime if != false, set a specific lifetime for this cache record (null => infinite lifetime) - * @return boolean true if no problem - */ - public function save($data, $id, $tags = array(), $specificLifetime = false) - { - $id = $this->_prepareId($id); - $lifetime = $this->getLifetime($specificLifetime); - $result1 = apc_store($id, array($data, time()), $lifetime); - $result2 = true; - - if (count($tags) > 0) { - foreach ($tags as $tag) { - $this->recordTagUsage($tag); - - $tagid = $this->_prepareTagId($tag); - $old_tags = apc_fetch($this->_prepareId($tagid)); - if ($old_tags === false) { - $old_tags = array(); - } - $old_tags[$id] = $id; - $this->remove($tagid); - $result2 = apc_store($this->_prepareId($tagid), $old_tags); - } - } - - return $result1 && $result2; - } - - /** - * Save this tagId into a global array of all tags with self::TAGS_MASTER_ID as the id. - * - * @param $tagId string the id of the tag being used - * @return bool true if the tag was set or was already present - */ - private function recordTagUsage($tagId) - { - $old_tmaster_wrapper = apc_fetch($this->_getTagStorageId()); - - if (!is_array($old_tmaster_wrapper)) { - $old_tmaster = array(); - } else { - $old_tmaster = $old_tmaster_wrapper[0]; - } - - if (in_array($tagId, $old_tmaster)) { - return true; - } else { - //master tag list has tag ID as both key and value for speed - $old_tmaster[$tagId] = $tagId; - return apc_store($this->_getTagStorageId(), array($old_tmaster, time())); - } - } - - /** - * Remove this tagId from a global array of all tags with self::TAGS_MASTER_ID as the id. - * - * @param $tagId string the id of the tag being removed - * @return bool true if the tag was removed, false otherwise - */ - private function removeTagUsage($tagId) - { - $tmaster_wrapper = apc_fetch($this->_getTagStorageId()); - if (!is_array($tmaster_wrapper)) { - $old_tmaster = array(); - return false; - } else { - $old_tmaster = $tmaster_wrapper[0]; - } - - if (in_array($tagId, $old_tmaster)) { - //master tag list has tag ID as both key and value for speed - unset($old_tmaster[$tagId]); - return apc_store($this->_getTagStorageId(), array($old_tmaster, time())); - } - return false; - } - - /** - * Remove a cache record - * - * @param string $id cache id - * @return boolean true if no problem - */ - public function remove($id) - { - return apc_delete($this->_prepareId($id)); - } - - /** - * Clean some cache records - * - * Available modes are : - * 'all' (default) => remove all cache entries ($tags is not used) - * 'old' => remove too old cache entries ($tags is not used) - * 'matchingTag' => remove cache entries matching all given tags - * ($tags can be an array of strings or a single string) - * 'notMatchingTag' => remove cache entries not matching one of the given tags - * ($tags can be an array of strings or a single string) - * - * @param string $mode clean mode - * @param array $tags array of tags - * @return boolean true if no problem - */ - public function clean($mode = Zend_Cache::CLEANING_MODE_ALL, $tags = array()) - { - if ($mode==Zend_Cache::CLEANING_MODE_ALL) { - return apc_clear_cache('user'); - } - - if ($mode==Zend_Cache::CLEANING_MODE_OLD) { - $this->_log("Zend_Cache_Backend_Apc::clean() : CLEANING_MODE_OLD is unsupported by the Apc backend"); - } - - if ($mode==Zend_Cache::CLEANING_MODE_MATCHING_TAG) { - $idList = array(); - foreach ($tags as $tag) { - $tagId = $this->_prepareTagId($tag); - $current_idList = apc_fetch($this->_prepareId($tagId)); - if (is_array($current_idList)) { - $idList = array_merge($idList, $current_idList); - } - } - - //clean up all tags completely - //remove tagIds from the master tag list - foreach ($tags as $tag) { - $tagId = $this->_prepareTagId($tag); - apc_delete($this->_prepareId($tagId)); - $this->removeTagUsage($tag); - } - - //leave if there were no found IDs - if( count($idList) < 1) { - return true; - } - - //remove the deleted IDs from any other tag references - $masterTagWrapper = apc_fetch($this->_getTagStorageId()); - $masterTagList = null; - if (is_array($masterTagWrapper)) { - $masterTagList = $masterTagWrapper[0]; - } - - foreach ($masterTagList as $tag) { - $needsUpdate = false; - $tagId = $this->_prepareTagId($tag); - $other_tagList = apc_fetch($this->_prepareId($tagId)); - - if (is_array($other_tagList) ) { - foreach ($other_tagList as $_tagIdx => $otherRefId) { - if ( in_array($otherRefId, $idList)) { - unset($other_tagList[$_tagIdx]); - $needsUpdate = true; - } - } - - if ($needsUpdate) { - //completely remove tags if there are no more items in their array. - if ( count($other_tagList) < 1) { - apc_delete($this->_prepareId($tagId)); - } else { - apc_store($this->_prepareId($tagId), $other_tagList); - } - } - } - } - - foreach ($idList as $id) { - apc_delete($id); - } - return true; - } - - if ($mode==Zend_Cache::CLEANING_MODE_NOT_MATCHING_TAG) { - $this->_log("Zend_Cache_Backend_Apc::clean() : tags are unsupported by the Apc backend"); - } - return $this; - } - - /** - * Return true if the automatic cleaning is available for the backend - * - * @return boolean - */ - public function isAutomaticCleaningAvailable() - { - return false; - } - -} diff --git a/app/code/core/Zend/Cache/Backend/Eaccelerator.php b/app/code/core/Zend/Cache/Backend/Eaccelerator.php deleted file mode 100644 index 6a5d430008..0000000000 --- a/app/code/core/Zend/Cache/Backend/Eaccelerator.php +++ /dev/null @@ -1,338 +0,0 @@ - '', - 'tag_prefix' => 'EAC_TAG_', - 'tag_storage' => 'EAC_ALL_TAGS' - ); - -/** - * Constructor - * - * @param array $options associative array of options - */ - public function __construct($options = array()) - { - if (!extension_loaded('eaccelerator')) { - Zend_Cache::throwException('The eaccelerator extension must be loaded for using this backend !'); - } - parent::__construct($options); - } - -/** - * Get tag storage cache identifier - * - * @return string - */ - protected function _getTagStorageId() - { - return $this->_prepareId($this->_options['tag_storage']); - } - - /** - * Get all cache ids identifier - * - * @return string - */ - protected function _getCachePrefix() - { - return $this->_options['cache_prefix']; - } - - /** - * Prepare cache identifier - * - * @param string $origId - * @return string - */ - protected function _prepareId($origId) - { - return $this->_getCachePrefix() . $origId; - } - - /** - * Parepare tag identifier - * - * @param string $tagId - * @return string - */ - protected function _prepareTagId($tagId) - { - return $this->_options['tag_prefix'] . $tagId; - } - - /** - * Test if a cache is available for the given id and (if yes) return it (false else) - * - * - * @param string $id cache id - * @param boolean $doNotTestCacheValidity if set to true, the cache validity won't be tested - * @return string cached datas (or false) - */ - public function load($id, $doNotTestCacheValidity = false) - { - $id = $this->_prepareId($id); - - if ($doNotTestCacheValidity) { - $this->_log("Zend_Cache_Backend_Eaccelerator::load() : \$doNotTestCacheValidity=true is unsupported by the Eaccelerator backend"); - } - - $tmp = eaccelerator_get($id); - if (is_array($tmp) && isset($tmp[0])) { - return $tmp[0]; - } else { - return $tmp; - } - return false; - } - - /** - * Test if a cache is available or not (for the given id) - * - * @param string $id cache id - * @return mixed false (a cache is not available) or "last modified" timestamp (int) of the available cache record - */ - public function test($id) - { - $id = $this->_prepareId($id); - $tmp = eaccelerator_get($id); - if (is_array($tmp)) { - return $tmp[1]; - } - return false; - } - - /** - * Save some string datas into a cache record - * - * Note : $data is always "string" (serialization is done by the - * core not by the backend) - * - * @param string $data datas to cache - * @param string $id cache id - * @param array $tags array of strings, the cache record will be tagged by each string entry - * @param int $specificLifetime if != false, set a specific lifetime for this cache record (null => infinite lifetime) - * @return boolean true if no problem - */ - public function save($data, $id, $tags = array(), $specificLifetime = false) - { - $id = $this->_prepareId($id); - $lifetime = $this->getLifetime($specificLifetime); - $result1 = eaccelerator_put($id, array($data, time()), $lifetime); - $result2 = true; - - if (count($tags) > 0) { - foreach ($tags as $tag) { - $this->recordTagUsage($tag); - - $tagid = $this->_prepareTagId($tag); - $old_tags = eaccelerator_get($this->_prepareId($tagid)); - if ($old_tags === false) { - $old_tags = array(); - } - $old_tags[$id] = $id; - $this->remove($tagid); - $result2 = eaccelerator_put($this->_prepareId($tagid), $old_tags); - } - } - - return $result1 && $result2; - } - - /** - * Save this tagId into a global array of all tags with self::TAGS_MASTER_ID as the id. - * - * @param $tagId string the id of the tag being used - * @return bool true if the tag was set or was already present - */ - private function recordTagUsage($tagId) - { - $old_tmaster_wrapper = eaccelerator_get($this->_getTagStorageId()); - - if (!is_array($old_tmaster_wrapper)) { - $old_tmaster = array(); - } else { - $old_tmaster = $old_tmaster_wrapper[0]; - } - - if (in_array($tagId, $old_tmaster)) { - return true; - } else { - //master tag list has tag ID as both key and value for speed - $old_tmaster[$tagId] = $tagId; - return eaccelerator_put($this->_getTagStorageId(), array($old_tmaster, time())); - } - } - - /** - * Remove this tagId from a global array of all tags with self::TAGS_MASTER_ID as the id. - * - * @param $tagId string the id of the tag being removed - * @return bool true if the tag was removed, false otherwise - */ - private function removeTagUsage($tagId) - { - $tmaster_wrapper = eaccelerator_get($this->_getTagStorageId()); - if (!is_array($tmaster_wrapper)) { - $old_tmaster = array(); - return false; - } else { - $old_tmaster = $tmaster_wrapper[0]; - } - - if (in_array($tagId, $old_tmaster)) { - //master tag list has tag ID as both key and value for speed - unset($old_tmaster[$tagId]); - return eaccelerator_put($this->_getTagStorageId(), array($old_tmaster, time())); - } - return false; - } - - /** - * Remove a cache record - * - * @param string $id cache id - * @return boolean true if no problem - */ - public function remove($id) - { - return eaccelerator_rm($this->_prepareId($id)); - } - - /** - * Clean some cache records - * - * Available modes are : - * 'all' (default) => remove all cache entries ($tags is not used) - * 'old' => remove too old cache entries ($tags is not used) - * 'matchingTag' => remove cache entries matching all given tags - * ($tags can be an array of strings or a single string) - * 'notMatchingTag' => remove cache entries not matching one of the given tags - * ($tags can be an array of strings or a single string) - * - * @param string $mode clean mode - * @param array $tags array of tags - * @return boolean true if no problem - */ - public function clean($mode = Zend_Cache::CLEANING_MODE_ALL, $tags = array()) - { - if ($mode==Zend_Cache::CLEANING_MODE_ALL) { - return eaccelerator_clean(); - } - - if ($mode==Zend_Cache::CLEANING_MODE_OLD) { - $this->_log("Zend_Cache_Backend_Eaccelerator::clean() : CLEANING_MODE_OLD is unsupported by the Eaccelerator backend"); - } - - if ($mode==Zend_Cache::CLEANING_MODE_MATCHING_TAG) { - $idList = array(); - foreach ($tags as $tag) { - $tagId = $this->_prepareTagId($tag); - $current_idList = eaccelerator_get($this->_prepareId($tagId)); - if (is_array($current_idList)) { - $idList = array_merge($idList, $current_idList); - } - } - - //clean up all tags completely - //remove tagIds from the master tag list - foreach ($tags as $tag) { - $tagId = $this->_prepareTagId($tag); - eaccelerator_rm($this->_prepareId($tagId)); - $this->removeTagUsage($tag); - } - - //leave if there were no found IDs - if( count($idList) < 1) { - return true; - } - - //remove the deleted IDs from any other tag references - $masterTagWrapper = eaccelerator_get($this->_getTagStorageId()); - $masterTagList = null; - if (is_array($masterTagWrapper)) { - $masterTagList = $masterTagWrapper[0]; - } - - foreach ($masterTagList as $tag) { - $needsUpdate = false; - $tagId = $this->_prepareTagId($tag); - $other_tagList = eaccelerator_get($this->_prepareId($tagId)); - - if (is_array($other_tagList) ) { - foreach ($other_tagList as $_tagIdx => $otherRefId) { - if ( in_array($otherRefId, $idList)) { - unset($other_tagList[$_tagIdx]); - $needsUpdate = true; - } - } - - if ($needsUpdate) { - //completely remove tags if there are no more items in their array. - if ( count($other_tagList) < 1) { - eaccelerator_rm($this->_prepareId($tagId)); - } else { - eaccelerator_put($this->_prepareId($tagId), $other_tagList); - } - } - } - } - - foreach ($idList as $id) { - eaccelerator_rm($id); - } - return true; - } - - if ($mode==Zend_Cache::CLEANING_MODE_NOT_MATCHING_TAG) { - $this->_log("Zend_Cache_Backend_Eaccelerator::clean() : tags are unsupported by the Eaccelerator backend"); - } - return $this; - } - - /** - * Return true if the automatic cleaning is available for the backend - * - * @return boolean - */ - public function isAutomaticCleaningAvailable() - { - return false; - } -} diff --git a/app/code/core/Zend/Cache/Backend/File.php b/app/code/core/Zend/Cache/Backend/File.php deleted file mode 100644 index 5734f2910b..0000000000 --- a/app/code/core/Zend/Cache/Backend/File.php +++ /dev/null @@ -1,719 +0,0 @@ - (string) cache_dir : - * - Directory where to put the cache files - * - * =====> (boolean) file_locking : - * - Enable / disable file_locking - * - Can avoid cache corruption under bad circumstances but it doesn't work on multithread - * webservers and on NFS filesystems for example - * - * =====> (boolean) read_control : - * - Enable / disable read control - * - If enabled, a control key is embeded in cache file and this key is compared with the one - * calculated after the reading. - * - * =====> (string) read_control_type : - * - Type of read control (only if read control is enabled). Available values are : - * 'md5' for a md5 hash control (best but slowest) - * 'crc32' for a crc32 hash control (lightly less safe but faster, better choice) - * 'adler32' for an adler32 hash control (excellent choice too, faster than crc32) - * 'strlen' for a length only test (fastest) - * - * =====> (int) hashed_directory_level : - * - Hashed directory level - * - Set the hashed directory structure level. 0 means "no hashed directory - * structure", 1 means "one level of directory", 2 means "two levels"... - * This option can speed up the cache only when you have many thousands of - * cache file. Only specific benchs can help you to choose the perfect value - * for you. Maybe, 1 or 2 is a good start. - * - * =====> (int) hashed_directory_umask : - * - Umask for hashed directory structure - * - * =====> (string) file_name_prefix : - * - prefix for cache files - * - be really carefull with this option because a too generic value in a system cache dir - * (like /tmp) can cause disasters when cleaning the cache - * - * =====> (int) cache_file_umask : - * - Umask for cache files - * - * =====> (int) metatadatas_array_max_size : - * - max size for the metadatas array (don't change this value unless you - * know what you are doing) - * - * @var array available options - */ - protected $_options = array( - 'cache_dir' => null, - 'file_locking' => true, - 'read_control' => true, - 'read_control_type' => 'crc32', - 'hashed_directory_level' => 0, - 'hashed_directory_umask' => 0700, - 'file_name_prefix' => 'zend_cache', - 'cache_file_umask' => 0600, - 'metadatas_array_max_size' => 100 - ); - - /** - * Array of metadatas (each item is an associative array) - * - * @var array - */ - private $_metadatasArray = array(); - - - /** - * Constructor - * - * @param array $options associative array of options - * @throws Zend_Cache_Exception - * @return void - */ - public function __construct($options = array()) - { - parent::__construct($options); - if (!is_null($this->_options['cache_dir'])) { // particular case for this option - $this->setCacheDir($this->_options['cache_dir']); - } else { - $this->setCacheDir(self::getTmpDir() . DIRECTORY_SEPARATOR, false); - } - if (isset($this->_options['file_name_prefix'])) { // particular case for this option - if (!preg_match('~^[\w]+$~', $this->_options['file_name_prefix'])) { - Zend_Cache::throwException('Invalid file_name_prefix : must use only [a-zA-A0-9_]'); - } - } - if ($this->_options['metadatas_array_max_size'] < 10) { - Zend_Cache::throwException('Invalid metadatas_array_max_size, must be > 10'); - } - } - - /** - * Set the cache_dir (particular case of setOption() method) - * - * @param string $value - * @param boolean $trailingSeparator If true, add a trailing separator is necessary - * @throws Zend_Cache_Exception - * @return void - */ - public function setCacheDir($value, $trailingSeparator = true) - { - if (!is_dir($value)) { - Zend_Cache::throwException('cache_dir must be a directory'); - } - if (!is_writable($value)) { - Zend_Cache::throwException('cache_dir is not writable'); - } - if ($trailingSeparator) { - // add a trailing DIRECTORY_SEPARATOR if necessary - $value = rtrim(realpath($value), '\\/') . DIRECTORY_SEPARATOR; - } - $this->_options['cache_dir'] = $value; - } - - /** - * Test if a cache is available for the given id and (if yes) return it (false else) - * - * @param string $id cache id - * @param boolean $doNotTestCacheValidity if set to true, the cache validity won't be tested - * @return string|false cached datas - */ - public function load($id, $doNotTestCacheValidity = false) - { - if (!($this->_test($id, $doNotTestCacheValidity))) { - // The cache is not hit ! - return false; - } - $metadatas = $this->_getMetadatas($id); - $file = $this->_file($id); - $data = $this->_fileGetContents($file); - if ($this->_options['read_control']) { - $hashData = $this->_hash($data, $this->_options['read_control_type']); - $hashControl = $metadatas['hash']; - if ($hashData != $hashControl) { - // Problem detected by the read control ! - $this->_log('Zend_Cache_Backend_File::load() / read_control : stored hash and computed hash do not match'); - $this->remove($id); - return false; - } - } - return $data; - } - - /** - * Test if a cache is available or not (for the given id) - * - * @param string $id cache id - * @return mixed false (a cache is not available) or "last modified" timestamp (int) of the available cache record - */ - public function test($id) - { - clearstatcache(); - return $this->_test($id, false); - } - - /** - * Save some string datas into a cache record - * - * Note : $data is always "string" (serialization is done by the - * core not by the backend) - * - * @param string $data Datas to cache - * @param string $id Cache id - * @param array $tags Array of strings, the cache record will be tagged by each string entry - * @param int $specificLifetime If != false, set a specific lifetime for this cache record (null => infinite lifetime) - * @return boolean true if no problem - */ - public function save($data, $id, $tags = array(), $specificLifetime = false) - { - clearstatcache(); - $file = $this->_file($id); - $path = $this->_path($id); - $firstTry = true; - $result = false; - if ($this->_options['hashed_directory_level'] > 0) { - if (!is_writable($path)) { - // maybe, we just have to build the directory structure - @mkdir($this->_path($id), $this->_options['hashed_directory_umask'], true); - @chmod($this->_path($id), $this->_options['hashed_directory_umask']); // see #ZF-320 (this line is required in some configurations) - } - if (!is_writable($path)) { - return false; - } - } - if ($this->_options['read_control']) { - $hash = $this->_hash($data, $this->_options['read_control_type']); - } else { - $hash = ''; - } - $metadatas = array( - 'hash' => $hash, - 'mtime' => time(), - 'expire' => $this->_expireTime($this->getLifetime($specificLifetime)), - 'tags' => $tags - ); - $res = $this->_setMetadatas($id, $metadatas); - if (!$res) { - // FIXME : log - return false; - } - $res = $this->_filePutContents($file, $data); - return $res; - } - - /** - * Remove a cache record - * - * @param string $id cache id - * @return boolean true if no problem - */ - public function remove($id) - { - $file = $this->_file($id); - return ($this->_delMetadatas($id) && $this->_remove($file)); - } - - /** - * Clean some cache records - * - * Available modes are : - * 'all' (default) => remove all cache entries ($tags is not used) - * 'old' => remove too old cache entries ($tags is not used) - * 'matchingTag' => remove cache entries matching all given tags - * ($tags can be an array of strings or a single string) - * 'notMatchingTag' => remove cache entries not matching one of the given tags - * ($tags can be an array of strings or a single string) - * - * @param string $mode clean mode - * @param tags array $tags array of tags - * @return boolean true if no problem - */ - public function clean($mode = Zend_Cache::CLEANING_MODE_ALL, $tags = array()) - { - // We use this private method to hide the recursive stuff - clearstatcache(); - return $this->_clean($this->_options['cache_dir'], $mode, $tags); - } - - /** - * PUBLIC METHOD FOR UNIT TESTING ONLY ! - * - * Force a cache record to expire - * - * @param string $id cache id - */ - public function ___expire($id) - { - $metadatas = $this->_getMetadatas($id); - if ($metadatas) { - $metadatas['expire'] = 1; - $this->_setMetadatas($id, $metadatas); - } - } - - /** - * Get a metadatas record - * - * @param string $id Cache id - * @return array|false Associative array of metadatas - */ - private function _getMetadatas($id) - { - if (isset($this->_metadatasArray[$id])) { - return $this->_metadatasArray[$id]; - } else { - $metadatas = $this->_loadMetadatas($id); - if (!$metadatas) { - return false; - } - $this->_setMetadatas($id, $metadatas); - return $metadatas; - } - } - - /** - * Set a metadatas record - * - * @param string $id Cache id - * @param array $metadatas Associative array of metadatas - * @return boolean True if no problem - */ - private function _setMetadatas($id, $metadatas) - { - if (count($this->_metadatasArray) >= $this->_options['metadatas_array_max_size']) { - $n = (int) ($this->_options['metadatas_array_max_size'] / 10); - $this->_metadatasArray = array_slice($this->_metadatasArray, $n); - } - $result = $this->_saveMetadatas($id, $metadatas); - if (!$result) { - return false; - } - $this->_metadatasArray[$id] = $metadatas; - return true; - } - - /** - * Drop a metadata record - * - * @param string $id Cache id - * @return boolean True if no problem - */ - private function _delMetadatas($id) - { - if (isset($this->_metadatasArray[$id])) { - unset($this->_metadatasArray[$id]); - } - $file = $this->_metadatasFile($id); - return $this->_remove($file); - } - - /** - * Clear the metadatas array - * - * @return void - */ - private function _cleanMetadatas() - { - $this->_metadatasArray = array(); - } - - /** - * Load metadatas from disk - * - * @param string $id Cache id - * @return array|false Metadatas associative array - */ - private function _loadMetadatas($id) - { - $file = $this->_metadatasFile($id); - $result = $this->_fileGetContents($file); - if (!$result) { - return false; - } - $tmp = @unserialize($result); - return $tmp; - } - - /** - * Save metadatas to disk - * - * @param string $id Cache id - * @param array $metadatas Associative array - * @return boolean True if no problem - */ - private function _saveMetadatas($id, $metadatas) - { - $file = $this->_metadatasFile($id); - $result = $this->_filePutContents($file, serialize($metadatas)); - if (!$result) { - return false; - } - return true; - } - - /** - * Make and return a file name (with path) for metadatas - * - * @param string $id Cache id - * @return string Metadatas file name (with path) - */ - private function _metadatasFile($id) - { - $path = $this->_path($id); - $fileName = $this->_idToFileName('internal-metadatas---' . $id); - return $path . $fileName; - } - - /** - * Check if the given filename is a metadatas one - * - * @param string $fileName File name - * @return boolean True if it's a metadatas one - */ - private function _isMetadatasFile($fileName) - { - $id = $this->_fileNameToId($fileName); - if (substr($id, 0, 21) == 'internal-metadatas---') { - return true; - } else { - return false; - } - } - - /** - * Remove a file - * - * If we can't remove the file (because of locks or any problem), we will touch - * the file to invalidate it - * - * @param string $file Complete file path - * @return boolean True if ok - */ - private function _remove($file) - { - if (!is_file($file)) { - return false; - } - if (!@unlink($file)) { - # we can't remove the file (because of locks or any problem) - $this->_log("Zend_Cache_Backend_File::_remove() : we can't remove $file"); - return false; - } - return true; - } - - /** - * Clean some cache records (private method used for recursive stuff) - * - * Available modes are : - * Zend_Cache::CLEANING_MODE_ALL (default) => remove all cache entries ($tags is not used) - * Zend_Cache::CLEANING_MODE_OLD => remove too old cache entries ($tags is not used) - * Zend_Cache::CLEANING_MODE_MATCHING_TAG => remove cache entries matching all given tags - * ($tags can be an array of strings or a single string) - * Zend_Cache::CLEANING_MODE_NOT_MATCHING_TAG => remove cache entries not {matching one of the given tags} - * ($tags can be an array of strings or a single string) - * - * @param string $dir Directory to clean - * @param string $mode Clean mode - * @param array $tags Array of tags - * @throws Zend_Cache_Exception - * @return boolean True if no problem - */ - private function _clean($dir, $mode = Zend_Cache::CLEANING_MODE_ALL, $tags = array()) - { - if (!is_dir($dir)) { - return false; - } - $result = true; - $prefix = $this->_options['file_name_prefix']; - $glob = @glob($dir . $prefix . '--*'); - if ($glob === false) { - return true; - } - foreach ($glob as $file) { - if (is_file($file)) { - $fileName = basename($file); - if ($this->_isMetadatasFile($fileName)) { - // in CLEANING_MODE_ALL, we drop anything, even remainings old metadatas files - if ($mode != Zend_Cache::CLEANING_MODE_ALL) { - continue; - } - } - $id = $this->_fileNameToId($fileName); - $metadatas = $this->_getMetadatas($id); - if ($metadatas === FALSE) { - $metadatas = array('expire' => 1, 'tags' => array()); - } - switch ($mode) { - case Zend_Cache::CLEANING_MODE_ALL: - $res = $this->remove($id); - if (!$res) { - // in this case only, we accept a problem with the metadatas file drop - $res = $this->_remove($file); - } - $result = $result && $res; - break; - case Zend_Cache::CLEANING_MODE_OLD: - if (time() > $metadatas['expire']) { - $result = ($result) && ($this->remove($id)); - } - break; - case Zend_Cache::CLEANING_MODE_MATCHING_TAG: - $matching = (bool)array_intersect($tags, $metadatas['tags']); -// $matching = true; -// foreach ($tags as $tag) { -// if (!in_array($tag, $metadatas['tags'])) { -// $matching = false; -// break; -// } -// } - if ($matching) { - $result = ($result) && ($this->remove($id)); - } - break; - case Zend_Cache::CLEANING_MODE_NOT_MATCHING_TAG: - $matching = (bool)array_intersect($tags, $metadatas['tags']); -// $matching = false; -// foreach ($tags as $tag) { -// if (in_array($tag, $metadatas['tags'])) { -// $matching = true; -// break; -// } -// } - if (!$matching) { - $result = ($result) && $this->remove($id); - } - break; - default: - Zend_Cache::throwException('Invalid mode for clean() method'); - break; - } - } - if ((is_dir($file)) and ($this->_options['hashed_directory_level']>0)) { - // Recursive call - $result = ($result) && ($this->_clean($file . DIRECTORY_SEPARATOR, $mode, $tags)); - if ($mode=='all') { - // if mode=='all', we try to drop the structure too - @rmdir($file); - } - } - } - return $result; - } - - /** - * Compute & return the expire time - * - * @return int expire time (unix timestamp) - */ - private function _expireTime($lifetime) - { - if (is_null($lifetime)) { - return 9999999999; - } - return time() + $lifetime; - } - - /** - * Make a control key with the string containing datas - * - * @param string $data Data - * @param string $controlType Type of control 'md5', 'crc32' or 'strlen' - * @throws Zend_Cache_Exception - * @return string Control key - */ - private function _hash($data, $controlType) - { - switch ($controlType) { - case 'md5': - return md5($data); - case 'crc32': - return crc32($data); - case 'strlen': - return strlen($data); - case 'adler32': - return hash('adler32', $data); - default: - Zend_Cache::throwException("Incorrect hash function : $controlType"); - } - } - - /** - * Transform a cache id into a file name and return it - * - * @param string $id Cache id - * @return string File name - */ - private function _idToFileName($id) - { - $prefix = $this->_options['file_name_prefix']; - $result = $prefix . '---' . $id; - return $result; - } - - /** - * Make and return a file name (with path) - * - * @param string $id Cache id - * @return string File name (with path) - */ - private function _file($id) - { - $path = $this->_path($id); - $fileName = $this->_idToFileName($id); - return $path . $fileName; - } - - /** - * Return the complete directory path of a filename (including hashedDirectoryStructure) - * - * @param string $id Cache id - * @return string Complete directory path - */ - private function _path($id) - { - $root = $this->_options['cache_dir']; - $prefix = $this->_options['file_name_prefix']; - if ($this->_options['hashed_directory_level']>0) { - $hash = hash('adler32', $id); - for ($i=0 ; $i < $this->_options['hashed_directory_level'] ; $i++) { - $root = $root . $prefix . '--' . substr($hash, 0, $i + 1) . DIRECTORY_SEPARATOR; - } - } - return $root; - } - - /** - * Test if the given cache id is available (and still valid as a cache record) - * - * @param string $id Cache id - * @param boolean $doNotTestCacheValidity If set to true, the cache validity won't be tested - * @return boolean|mixed false (a cache is not available) or "last modified" timestamp (int) of the available cache record - */ - private function _test($id, $doNotTestCacheValidity) - { - $metadatas = $this->_getMetadatas($id); - if (!$metadatas) { - return false; - } - if ($doNotTestCacheValidity || (time() <= $metadatas['expire'])) { - return $metadatas['mtime']; - } - return false; - } - - /** - * Return the file content of the given file - * - * @param string $file File complete path - * @return string File content (or false if problem) - */ - private function _fileGetContents($file) - { - $result = false; - if (!is_file($file)) { - return false; - } - if (function_exists('get_magic_quotes_runtime')) { - $mqr = @get_magic_quotes_runtime(); - @set_magic_quotes_runtime(0); - } - $f = @fopen($file, 'rb'); - if ($f) { - if ($this->_options['file_locking']) @flock($f, LOCK_SH); - $fsize = @filesize($file); - if ($fsize == 0) { - $result = ''; - } else { - $result = fread($f, $fsize); - } - if ($this->_options['file_locking']) @flock($f, LOCK_UN); - @fclose($f); - } - if (function_exists('set_magic_quotes_runtime')) { - @set_magic_quotes_runtime($mqr); - } - return $result; - } - - /** - * Put the given string into the given file - * - * @param string $file File complete path - * @param string $string String to put in file - * @return boolean true if no problem - */ - private function _filePutContents($file, $string) - { - $result = false; - $f = @fopen($file, 'wb'); - if ($f) { - if ($this->_options['file_locking']) @flock($f, LOCK_EX); - $tmp = @fwrite($f, $string); - if (!($tmp === FALSE)) { - $result = true; - } - if ($this->_options['file_locking']) @flock($f, LOCK_UN); - @fclose($f); - } - @chmod($file, $this->_options['cache_file_umask']); - return $result; - } - - /** - * Transform a file name into cache id and return it - * - * @param string $fileName File name - * @return string Cache id - */ - private function _fileNameToId($fileName) - { - $prefix = $this->_options['file_name_prefix']; - return preg_replace('~^' . $prefix . '---(.*)$~', '$1', $fileName); - } - -} diff --git a/app/code/core/Zend/Cache/Backend/Memcached.php b/app/code/core/Zend/Cache/Backend/Memcached.php deleted file mode 100644 index 6a2ddbf462..0000000000 --- a/app/code/core/Zend/Cache/Backend/Memcached.php +++ /dev/null @@ -1,364 +0,0 @@ - (array) servers : - * an array of memcached server ; each memcached server is described by an associative array : - * 'host' => (string) : the name of the memcached server - * 'port' => (int) : the port of the memcached server - * 'persistent' => (bool) : use or not persistent connections to this memcached server - * - * =====> (boolean) compression : - * true if you want to use on-the-fly compression - * - * @var array available options - */ - protected $_options = array( - 'servers' => array(array( - 'host' => Zend_Cache_Backend_Memcached::DEFAULT_HOST, - 'port' => Zend_Cache_Backend_Memcached::DEFAULT_PORT, - 'persistent' => Zend_Cache_Backend_Memcached::DEFAULT_PERSISTENT - )), - 'compression' => false, - 'cache_dir' => null, - 'hashed_directory_level' => null, - 'hashed_directory_umask' => null, - 'file_name_prefix' => null, - ); - - /** - * Memcache object - * - * @var mixed memcache object - */ - private $_memcache = null; - - - // ---------------------- - // --- Public methods --- - // ---------------------- - - /** - * Constructor - * - * @param array $options associative array of options - */ - public function __construct($options = array()) - { - if (!extension_loaded('memcache')) { - Zend_Cache::throwException('The memcache extension must be loaded for using this backend !'); - } - parent::__construct($options); - if (isset($this->_options['servers'])) { - $value= $this->_options['servers']; - if (isset($value['host'])) { - // in this case, $value seems to be a simple associative array (one server only) - $value = array(0 => $value); // let's transform it into a classical array of associative arrays - } - $this->setOption('servers', $value); - } - $this->_memcache = new Memcache; - foreach ($this->_options['servers'] as $server) { - if (!array_key_exists('persistent', $server)) { - $server['persistent'] = Zend_Cache_Backend_Memcached::DEFAULT_PERSISTENT; - } - if (!array_key_exists('port', $server)) { - $server['port'] = Zend_Cache_Backend_Memcached::DEFAULT_PORT; - } - $this->_memcache->addServer($server['host'], $server['port'], $server['persistent']); - } - } - - /** - * Test if a cache is available for the given id and (if yes) return it (false else) - * - * @param string $id cache id - * @param boolean $doNotTestCacheValidity if set to true, the cache validity won't be tested - * @return string cached datas (or false) - */ - public function load($id, $doNotTestCacheValidity = false) - { - // WARNING : $doNotTestCacheValidity is not supported !!! - if ($doNotTestCacheValidity) { - $this->_log("Zend_Cache_Backend_Memcached::load() : \$doNotTestCacheValidity=true is unsupported by the Memcached backend"); - } - $tmp = $this->_memcache->get($id); - if (is_array($tmp) && isset($tmp[0])) { - return $tmp[0]; - } else { return $tmp; } - return false; - } - - /** - * Test if a cache is available or not (for the given id) - * - * @param string $id cache id - * @return mixed false (a cache is not available) or "last modified" timestamp (int) of the available cache record - */ - public function test($id) - { - $tmp = $this->_memcache->get($id); - if (is_array($tmp)) { - return $tmp[1]; - } - return false; - } - - /** - * Save some string datas into a cache record - * - * Note : $data is always "string" (serialization is done by the - * core not by the backend) - * - * @param string $data datas to cache - * @param string $id cache id - * @param array $tags array of strings, the cache record will be tagged by each string entry - * @param int $specificLifetime if != false, set a specific lifetime for this cache record (null => infinite lifetime) - * @return boolean true if no problem - */ - public function save($data, $id, $tags = array(), $specificLifetime = false) - { - $lifetime = $this->getLifetime($specificLifetime); - if ($this->_options['compression']) { - $flag = MEMCACHE_COMPRESSED; - } else { - $flag = 0; - } - //DEBUG ADDED TO WATCH ALL THE KEYS - /* -$old_master_wrapper = $this->_memcache->get('master_ids'); -if (! is_array($old_master_wrapper) ) { - $old_master = array(); -} else { - $old_master = $old_master_wrapper[0]; -} -$old_master[] = $id; -$this->_memcache->set('master_ids', array($old_master, time())); - //DEBUG ADDED TO WATCH ALL THE KEYS -//*/ - - if (count($tags) > 0) { - } - - $result1 = $this->_memcache->set($id, array($data, time()), $flag, $lifetime); - $result2 = (count($tags) == 0); - - if (count($tags) > 0) { - foreach ($tags as $tag) { - $this->recordTagUsage($tag); - $tagid = self::TAGS_PREFIX.$tag; - $old_tags = $this->_memcache->get($tagid); - if ($old_tags === false) { - $old_tags = array(); - } - $old_tags[$id] = $id; - $this->remove($tagid); - $result2 = $this->_memcache->set($tagid, $old_tags); - } - } - - return $result1 && $result2; - } - - /** - * Save this tagId into a global array of all tags with self::TAGS_MASTER_ID as the id. - * - * @param $tagId string the id of the tag being used - * @return bool true if the tag was set or was already present - */ - private function recordTagUsage($tagId) { - $old_tmaster_wrapper = $this->_memcache->get(self::TAGS_MASTER_ID); - if (! is_array($old_tmaster_wrapper) ) { - $old_tmaster = array(); - } else { - $old_tmaster = $old_tmaster_wrapper[0]; - } - if (in_array( $tagId, $old_tmaster) ) { - return true; - } else { - //master tag list has tag ID as both key and value for speed - $old_tmaster[$tagId] = $tagId; - return $this->_memcache->set(self::TAGS_MASTER_ID, array($old_tmaster, time())); - } - } - - /** - * Remove this tagId from a global array of all tags with self::TAGS_MASTER_ID as the id. - * - * @param $tagId string the id of the tag being removed - * @return bool true if the tag was removed, false otherwise - */ - private function removeTagUsage($tagId) { - $tmaster_wrapper = $this->_memcache->get(self::TAGS_MASTER_ID); - if (! is_array($tmaster_wrapper) ) { - $old_tmaster = array(); - return false; - } else { - $old_tmaster = $tmaster_wrapper[0]; - } - if (in_array( $tagId, $old_tmaster) ) { - //master tag list has tag ID as both key and value for speed - unset($old_tmaster[$tagId]); - return $this->_memcache->set(self::TAGS_MASTER_ID, array($old_tmaster, time())); - } - return false; - } - - /** - * Remove a cache record - * - * @param string $id cache id - * @return boolean true if no problem - */ - public function remove($id) - { - return $this->_memcache->delete($id); - } - - /** - * Clean some cache records - * - * Available modes are : - * 'all' (default) => remove all cache entries ($tags is not used) - * 'old' => remove too old cache entries ($tags is not used) - * 'matchingTag' => remove cache entries matching all given tags - * ($tags can be an array of strings or a single string) - * 'notMatchingTag' => remove cache entries not matching one of the given tags - * ($tags can be an array of strings or a single string) - * - * @param string $mode clean mode - * @param array $tags array of tags - * @return boolean true if no problem - */ - public function clean($mode = Zend_Cache::CLEANING_MODE_ALL, $tags = array()) - { - if ($mode==Zend_Cache::CLEANING_MODE_ALL) { - return $this->_memcache->flush(); - } - if ($mode==Zend_Cache::CLEANING_MODE_OLD) { - $this->_log("Zend_Cache_Backend_Memcached::clean() : CLEANING_MODE_OLD is unsupported by the Memcached backend"); - } - if ($mode==Zend_Cache::CLEANING_MODE_MATCHING_TAG) { - $idList = array(); - foreach ($tags as $tag) { - $current_idList = $this->_memcache->get(self::TAGS_PREFIX.$tag); - if (is_array($current_idList)) { - $idList = array_merge($idList, $current_idList); - } - } - //clean up all tags completely - //remove tagIds from the master tag list - foreach ($tags as $tag) { - $this->_memcache->delete(self::TAGS_PREFIX.$tag); - $this->removeTagUsage($tag); - } - - //leave if there were no found IDs - if( count($idList) < 1) { - return true; - } - - //remove the deleted IDs from any other tag references - $masterTagWrapper = $this->_memcache->get(self::TAGS_MASTER_ID); - $masterTagList = null; - if (is_array($masterTagWrapper)) { - $masterTagList = $masterTagWrapper[0]; - } - foreach ($masterTagList as $tag) { - $needsUpdate = false; - $other_tagList = $this->_memcache->get(self::TAGS_PREFIX.$tag); - if (is_array($other_tagList) ) { - foreach ($other_tagList as $_tagIdx => $otherRefId) { - if ( in_array($otherRefId, $idList)) { - unset($other_tagList[$_tagIdx]); - $needsUpdate = true; - } - } - if ($needsUpdate) { - //completely remove tags if there are no more items in their array. - if ( count($other_tagList) < 1) { - $this->_memcache->delete(self::TAGS_PREFIX.$tag); - } else { - $this->_memcache->set(self::TAGS_PREFIX.$tag, $other_tagList); - } - } - } - } - - foreach ($idList as $id) { - $this->_memcache->delete($id); - } - return true; - } - if ($mode==Zend_Cache::CLEANING_MODE_NOT_MATCHING_TAG) { - $this->_log("Zend_Cache_Backend_Memcached::clean() : tags are unsupported by the Memcached backend"); - } - } - - /** - * Return true if the automatic cleaning is available for the backend - * - * @return boolean - */ - public function isAutomaticCleaningAvailable() - { - return false; - } - -} diff --git a/app/code/core/Zend/Mime.php b/app/code/core/Zend/Mime.php index 92c5644f13..fb47734081 100644 --- a/app/code/core/Zend/Mime.php +++ b/app/code/core/Zend/Mime.php @@ -14,8 +14,9 @@ * * @category Zend * @package Zend_Mime - * @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License + * @version $Id: Mime.php 16541 2009-07-07 06:59:03Z bkarwin $ */ @@ -24,7 +25,7 @@ * * @category Zend * @package Zend_Mime - * @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Mime @@ -114,7 +115,7 @@ public static function isPrintable($str) } /** - * Encode a given string with the QUOTED_PRINTABLE mechanism + * Encode a given string with the QUOTED_PRINTABLE mechanism and wrap the lines. * * @param string $str * @param int $lineLength Defaults to {@link LINELENGTH} @@ -126,9 +127,7 @@ public static function encodeQuotedPrintable($str, $lineEnd = self::LINEEND) { $out = ''; - $str = str_replace('=', '=3D', $str); - $str = str_replace(self::$qpKeys, self::$qpReplaceValues, $str); - $str = rtrim($str); + $str = self::_encodeQuotedPrintable($str); // Split encoded text into separate lines while ($str) { @@ -158,6 +157,120 @@ public static function encodeQuotedPrintable($str, return $out; } + /** + * Converts a string into quoted printable format. + * + * @param string $str + * @return string + */ + private static function _encodeQuotedPrintable($str) + { + $str = str_replace('=', '=3D', $str); + $str = str_replace(self::$qpKeys, self::$qpReplaceValues, $str); + $str = rtrim($str); + return $str; + } + + /** + * Encode a given string with the QUOTED_PRINTABLE mechanism for Mail Headers. + * + * Mail headers depend on an extended quoted printable algorithm otherwise + * a range of bugs can occur. + * + * @param string $str + * @param string $charset + * @param int $lineLength Defaults to {@link LINELENGTH} + * @param int $lineEnd Defaults to {@link LINEEND} + * @return string + */ + public static function encodeQuotedPrintableHeader($str, $charset, + $lineLength = self::LINELENGTH, + $lineEnd = self::LINEEND) + { + // Reduce line-length by the length of the required delimiter, charsets and encoding + $prefix = sprintf('=?%s?Q?', $charset); + $lineLength = $lineLength-strlen($prefix)-3; + + $str = self::_encodeQuotedPrintable($str); + + // Mail-Header required chars have to be encoded also: + $str = str_replace(array('?', ' ', '_'), array('=3F', '=20', '=5F'), $str); + + // initialize first line, we need it anyways + $lines = array(0 => ""); + + // Split encoded text into separate lines + $tmp = ""; + while(strlen($str) > 0) { + $currentLine = max(count($lines)-1, 0); + $token = self::getNextQuotedPrintableToken($str); + $str = substr($str, strlen($token)); + + $tmp .= $token; + if($token == '=20') { + // only if we have a single char token or space, we can append the + // tempstring it to the current line or start a new line if necessary. + if(strlen($lines[$currentLine].$tmp) > $lineLength) { + $lines[$currentLine+1] = $tmp; + } else { + $lines[$currentLine] .= $tmp; + } + $tmp = ""; + } + // don't forget to append the rest to the last line + if(strlen($str) == 0) { + $lines[$currentLine] .= $tmp; + } + } + + // assemble the lines together by pre- and appending delimiters, charset, encoding. + for($i = 0; $i < count($lines); $i++) { + $lines[$i] = " ".$prefix.$lines[$i]."?="; + } + $str = trim(implode($lineEnd, $lines)); + return $str; + } + + /** + * Retrieves the first token from a quoted printable string. + * + * @param string $str + * @return string + */ + private static function getNextQuotedPrintableToken($str) + { + if(substr($str, 0, 1) == "=") { + $token = substr($str, 0, 3); + } else { + $token = substr($str, 0, 1); + } + return $token; + } + + /** + * Encode a given string in mail header compatible base64 encoding. + * + * @param string $str + * @param string $charset + * @param int $lineLength Defaults to {@link LINELENGTH} + * @param int $lineEnd Defaults to {@link LINEEND} + * @return string + */ + public static function encodeBase64Header($str, + $charset, + $lineLength = self::LINELENGTH, + $lineEnd = self::LINEEND) + { + $prefix = '=?' . $charset . '?B?'; + $suffix = '?='; + $remainingLength = $lineLength - strlen($prefix) - strlen($suffix); + + $encodedValue = self::encodeBase64($str, $remainingLength, $lineEnd); + $encodedValue = str_replace($lineEnd, $suffix . $lineEnd . ' ' . $prefix, $encodedValue); + $encodedValue = $prefix . $encodedValue . $suffix; + return $encodedValue; + } + /** * Encode a given string in base64 encoding and break lines * according to the maximum linelength. diff --git a/app/design/adminhtml/default/default/layout/catalog.xml b/app/design/adminhtml/default/default/layout/catalog.xml index e624d8687f..448d8db146 100644 --- a/app/design/adminhtml/default/default/layout/catalog.xml +++ b/app/design/adminhtml/default/default/layout/catalog.xml @@ -38,6 +38,7 @@ + @@ -45,11 +46,13 @@ - + + + @@ -58,7 +61,8 @@ - + + @@ -150,7 +154,7 @@ Layout handle for grouped products superadminhtml/catalog_product_edit_tab_super_group - + @@ -170,7 +174,7 @@ Layout handle for grouped products - + @@ -210,14 +214,18 @@ Layout handle for configurable products - + + + + + diff --git a/app/design/adminhtml/default/default/layout/cms.xml b/app/design/adminhtml/default/default/layout/cms.xml index 51b413683f..08df65da56 100644 --- a/app/design/adminhtml/default/default/layout/cms.xml +++ b/app/design/adminhtml/default/default/layout/cms.xml @@ -38,6 +38,7 @@ + @@ -66,6 +67,7 @@ + @@ -73,12 +75,13 @@ + - + + - @@ -86,21 +89,7 @@ - + - - - - - - - - - - - - - - diff --git a/app/design/adminhtml/default/default/layout/customer.xml b/app/design/adminhtml/default/default/layout/customer.xml index 0eef4faf6e..274a7dcb0d 100644 --- a/app/design/adminhtml/default/default/layout/customer.xml +++ b/app/design/adminhtml/default/default/layout/customer.xml @@ -47,4 +47,9 @@ + + + + + diff --git a/app/design/adminhtml/default/default/layout/main.xml b/app/design/adminhtml/default/default/layout/main.xml index 0b26996c76..c917353a53 100644 --- a/app/design/adminhtml/default/default/layout/main.xml +++ b/app/design/adminhtml/default/default/layout/main.xml @@ -136,6 +136,33 @@ Layout for pop up windows + + + + + + + + + + + + 1 + + + + + + + js_cssprototype/windows/themes/default.css + js_cssprototype/windows/themes/magento.css + + + diff --git a/app/design/adminhtml/default/default/layout/newsletter.xml b/app/design/adminhtml/default/default/layout/newsletter.xml new file mode 100644 index 0000000000..65a8a2b6f9 --- /dev/null +++ b/app/design/adminhtml/default/default/layout/newsletter.xml @@ -0,0 +1,36 @@ + + + + + + + + + + + diff --git a/app/design/adminhtml/default/default/layout/paypal.xml b/app/design/adminhtml/default/default/layout/paypal.xml new file mode 100644 index 0000000000..a5de063b63 --- /dev/null +++ b/app/design/adminhtml/default/default/layout/paypal.xml @@ -0,0 +1,52 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/design/adminhtml/default/default/layout/paypaluk.xml b/app/design/adminhtml/default/default/layout/paypaluk.xml new file mode 100644 index 0000000000..f440715a89 --- /dev/null +++ b/app/design/adminhtml/default/default/layout/paypaluk.xml @@ -0,0 +1,52 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/design/adminhtml/default/default/layout/widget.xml b/app/design/adminhtml/default/default/layout/widget.xml new file mode 100644 index 0000000000..b48063ddc7 --- /dev/null +++ b/app/design/adminhtml/default/default/layout/widget.xml @@ -0,0 +1,69 @@ + + + + + + + + + + + + + + + + + + + + + 1 + + jsprototype/window.js + js_cssprototype/windows/themes/default.css + js_cssprototype/windows/themes/magento.css + + + + + + + + + + settings_sectionwidget_instance_edit_tab_settings + main_sectionwidget_instance_edit_tab_main + properties_sectionwidget_instance_edit_tab_properties + + + + + + + diff --git a/app/design/adminhtml/default/default/template/catalog/category/widget/tree.phtml b/app/design/adminhtml/default/default/template/catalog/category/widget/tree.phtml index c8afb81912..20c2c49af1 100644 --- a/app/design/adminhtml/default/default/template/catalog/category/widget/tree.phtml +++ b/app/design/adminhtml/default/default/template/catalog/category/widget/tree.phtml @@ -73,6 +73,8 @@ Ext.extend(Ext.tree.TreePanel.Enhanced, Ext.tree.TreePanel, { Ext.onReady(function() { + var emptyNodeAdded = getWithEmptyNode() ? 'false' : 'true') ?>; + var categoryLoader = new Ext.tree.TreeLoader({ dataUrl: 'getLoadTreeUrl() ?>' }); @@ -81,6 +83,7 @@ Ext.onReady(function() { if (!config) return null; + if (parent && config && config.length){ for (var i = 0; i < config.length; i++) { var node; @@ -88,6 +91,19 @@ Ext.onReady(function() config[i].uiProvider = Ext.tree.CheckboxNodeUI; } var _node = Object.clone(config[i]); + + // Add empty node to reset category filter + if(!emptyNodeAdded) { + var empty = Object.clone(_node); + empty.text = '__('None') ?>'; + empty.children = []; + empty.id = 'none'; + empty.path = '1/none'; + empty.cls = 'leaf'; + parent.appendChild(new Ext.tree.TreeNode(empty)); + emptyNodeAdded = true; + } + if (_node.children && !_node.children.length) { delete(_node.children); node = new Ext.tree.AsyncTreeNode(_node); 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 81df511498..c047e0a3fc 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 @@ -93,22 +93,33 @@ function bindAttributeInputType() } } else { - if ($('used_for_sort_by')) { + if ($('used_for_sort_by') && !$('used_for_sort_by').getAttribute('readonly')) { $('used_for_sort_by').disabled = false; } } - if ($('frontend_input') && ($('frontend_input').value=='text' || $('frontend_input').value=='textarea')) { - if($('is_html_allowed_on_front')){ - $('is_html_allowed_on_front').disabled = false; - } + if ($('frontend_input').value=='textarea') { + setRowVisibility('is_wysiwyg_enabled', true); + setRowVisibility('is_html_allowed_on_front', false); + + $('frontend_class').value = ''; + $('frontend_class').disabled = true; } - else { - if($('is_html_allowed_on_front')){ - $('is_html_allowed_on_front').selectedIndex=0; - $('is_html_allowed_on_front').disabled = true; + else if($('frontend_input').value=='text'){ + setRowVisibility('is_wysiwyg_enabled', false); + setRowVisibility('is_html_allowed_on_front', true); + + if (!$('frontend_class').getAttribute('readonly')) { + $('frontend_class').disabled = false; } } + else{ + setRowVisibility('is_wysiwyg_enabled', false); + setRowVisibility('is_html_allowed_on_front', false); + + $('frontend_class').value = ''; + $('frontend_class').disabled = true; + } switchIsFilterable(); } @@ -119,7 +130,9 @@ function switchIsFilterable() if ($('is_filterable').selectedIndex == 0) { $('position').disabled = true; } else { - $('position').disabled = false; + if (!$('position').getAttribute('readonly')){ + $('position').disabled = false; + } } } } @@ -296,5 +309,4 @@ if ($('is_required')) { Event.observe($('is_required'), 'change', updateRequriedOptions); } bindAttributeInputType(); - diff --git a/app/design/adminhtml/default/default/template/catalog/product/attribute/options.phtml b/app/design/adminhtml/default/default/template/catalog/product/attribute/options.phtml index 621c557663..9192aedb55 100644 --- a/app/design/adminhtml/default/default/template/catalog/product/attribute/options.phtml +++ b/app/design/adminhtml/default/default/template/catalog/product/attribute/options.phtml @@ -57,7 +57,7 @@ getLabelValues() ?> getStores() as $_store): ?> - + getReadOnly()):?> disabled="disabled"/> @@ -79,17 +79,23 @@ __('Position') ?> __('Is Default') ?> - getAddNewButtonHtml() ?> + + getReadOnly()):?> + getAddNewButtonHtml() ?> + + getStores() as $_store): ?> - + getReadOnly()):?> disabled="disabled"/> - - + getReadOnly()):?> disabled="disabled"/> + getReadOnly()):?> disabled="disabled"/> - getDeleteButtonHtml() ?> + getReadOnly()):?> + getDeleteButtonHtml() ?> + @@ -105,13 +111,15 @@ var optionDefaultInputType = 'radio'; var templateText = ''+ getStores() as $_store): ?> - '<\/td>'+ + 'getReadOnly()):?> disabled="disabled"/><\/td>'+ - '<\/td>'+ - '<\/td>'+ + 'getReadOnly()):?> disabled="disabled"/><\/td>'+ + 'getReadOnly()):?> disabled="disabled"/><\/td>'+ ''+ ''+ - 'getDeleteButtonHtml() ?>'+ + getReadOnly()):?> + 'getDeleteButtonHtml() ?>'+ + '<\/td>'+ '<\/tr>'; 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 a3d60c5152..5813a8a97b 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 @@ -41,7 +41,7 @@ var firstStepTemplate = '
'+ '__('Input Type') ?> *'+ '__('Is Required') ?>'+ '__('Sort Order') ?>'+ - 'getDeleteButtonHtml() ?>'+ + 'jsQuoteEscape($this->getDeleteButtonHtml()) ?>'+ ''+ ''+ ''+ 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 83f0efb2d1..e477c44ce5 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 @@ -33,7 +33,7 @@ OptionTemplateDate = ''+ ''+ ''+ ''+ - ''+ + ''+ ''+ ''+ ''+ diff --git a/app/design/adminhtml/default/default/template/catalog/product/edit/price/tier.phtml b/app/design/adminhtml/default/default/template/catalog/product/edit/price/tier.phtml index dbbf785b61..0ab77e7d11 100644 --- a/app/design/adminhtml/default/default/template/catalog/product/edit/price/tier.phtml +++ b/app/design/adminhtml/default/default/template/catalog/product/edit/price/tier.phtml @@ -31,6 +31,7 @@ getElement()->getReadonly() ?> isShowWebsiteColumn(); ?> isAllowChangeWebsite(); ?> +getPriceValidation('validate-greater-than-zero'); ?> isShowWebsiteColumn(); ?> @@ -65,25 +66,26 @@
__('SKU') ?>
getPriceTypeSelectHtml() ?>{{checkboxScopePrice}}
diff --git a/app/design/adminhtml/default/default/template/cms/browser/content.phtml b/app/design/adminhtml/default/default/template/cms/browser/content.phtml new file mode 100644 index 0000000000..2926b50c9b --- /dev/null +++ b/app/design/adminhtml/default/default/template/cms/browser/content.phtml @@ -0,0 +1,59 @@ + + +getChildHtml('wysiwyg_images.js') ?> + + + +
+ + + + + +

getHeaderText() ?>

+ getButtonsHtml() ?> +
+
+ +
getChildHtml('wysiwyg_images.uploader') ?>
+
+
getChildHtml('wysiwyg_images.newfolder') ?>
diff --git a/app/design/adminhtml/default/default/template/cms/browser/content/files.phtml b/app/design/adminhtml/default/default/template/cms/browser/content/files.phtml new file mode 100644 index 0000000000..d313e3862f --- /dev/null +++ b/app/design/adminhtml/default/default/template/cms/browser/content/files.phtml @@ -0,0 +1,54 @@ + + +getImagesWidth(); +$_height = $this->getImagesHeight(); +?> +getFilesCount() > 0): ?> + getFiles() as $file): ?> +
+

+ getFileThumbUrl($file)):?> + <?php echo $this->getFileName($file) ?> + +

+ getFileWidth($file)): ?> + getFileWidth($file) ?>xgetFileHeight($file) ?> helper('cms')->__('px.') ?>
+ + getFileShortName($file); ?> +
+ + + helper('cms')->__('No files found') ?> + diff --git a/app/design/adminhtml/default/default/template/cms/wysiwyg/content/newfolder.phtml b/app/design/adminhtml/default/default/template/cms/browser/content/newfolder.phtml similarity index 100% rename from app/design/adminhtml/default/default/template/cms/wysiwyg/content/newfolder.phtml rename to app/design/adminhtml/default/default/template/cms/browser/content/newfolder.phtml diff --git a/app/design/adminhtml/default/default/template/cms/wysiwyg/content/uploader.phtml b/app/design/adminhtml/default/default/template/cms/browser/content/uploader.phtml similarity index 85% rename from app/design/adminhtml/default/default/template/cms/wysiwyg/content/uploader.phtml rename to app/design/adminhtml/default/default/template/cms/browser/content/uploader.phtml index a45242efe8..84ef58b9a7 100644 --- a/app/design/adminhtml/default/default/template/cms/wysiwyg/content/uploader.phtml +++ b/app/design/adminhtml/default/default/template/cms/browser/content/uploader.phtml @@ -31,10 +31,8 @@ * @see Mage_Adminhtml_Block_Cms_Wysiwyg_Images_Content_Uploader */ ?> -helper('adminhtml/media_js')->includeScript('lib/flex.js') ?> -helper('adminhtml/media_js')->includeScript('mage/adminhtml/flexuploader.js') ?> -helper('adminhtml/media_js')->getTranslatorScript() ?> +helper('adminhtml/media_js')->getTranslatorScript() ?>
@@ -58,11 +56,16 @@ diff --git a/app/design/adminhtml/default/default/template/cms/browser/tree.phtml b/app/design/adminhtml/default/default/template/cms/browser/tree.phtml new file mode 100644 index 0000000000..e8fd03ec20 --- /dev/null +++ b/app/design/adminhtml/default/default/template/cms/browser/tree.phtml @@ -0,0 +1,75 @@ + + + + +
+ + diff --git a/app/design/adminhtml/default/default/template/cms/page/edit/form/renderer/content.phtml b/app/design/adminhtml/default/default/template/cms/page/edit/form/renderer/content.phtml index b290ca6c60..fa4f1f2d1b 100644 --- a/app/design/adminhtml/default/default/template/cms/page/edit/form/renderer/content.phtml +++ b/app/design/adminhtml/default/default/template/cms/page/edit/form/renderer/content.phtml @@ -27,7 +27,6 @@ getElement() ?> getNoDisplay()): ?> - getElementHtml()) ?> - getNote()): ?> class="note" id="note_getId()?>">getNote()?$_element->getNote():' ' ?> + getElementHtml()) ?> diff --git a/app/design/adminhtml/default/default/template/cms/widget/options/renderer/element.phtml b/app/design/adminhtml/default/default/template/cms/widget/options/renderer/element.phtml deleted file mode 100644 index 451ae728f4..0000000000 --- a/app/design/adminhtml/default/default/template/cms/widget/options/renderer/element.phtml +++ /dev/null @@ -1,38 +0,0 @@ - -getElement() ?> -getNoDisplay()): ?> -getHtmlContainerId() ?> - id=""> - getType()=='hidden'): ?> - getElementHtml()) ?> - - getLabelHtml()) ?> - getElementHtml()) ?>getNote()): ?>

getNote() ?>

- - - diff --git a/app/design/adminhtml/default/default/template/cms/wysiwyg/content.phtml b/app/design/adminhtml/default/default/template/cms/wysiwyg/content.phtml deleted file mode 100644 index c14fa02245..0000000000 --- a/app/design/adminhtml/default/default/template/cms/wysiwyg/content.phtml +++ /dev/null @@ -1,55 +0,0 @@ - - -getChildHtml('wysiwyg_images.js') ?> - - - -
- - - - - -

getHeaderText() ?>

- getButtonsHtml() ?> -
-
- -
getChildHtml('wysiwyg_images.uploader') ?>
-
-
getChildHtml('wysiwyg_images.newfolder') ?>
diff --git a/app/design/adminhtml/default/default/template/cms/wysiwyg/content/files.phtml b/app/design/adminhtml/default/default/template/cms/wysiwyg/content/files.phtml deleted file mode 100644 index f42feab4b8..0000000000 --- a/app/design/adminhtml/default/default/template/cms/wysiwyg/content/files.phtml +++ /dev/null @@ -1,48 +0,0 @@ - - -getImagesWidth(); -$_height = $this->getImagesHeight(); -?> -getContentsCollection()->count() > 0): ?> - getContentsCollection() as $item): ?> -
-
- getWidth(); ?>xgetHeight(); ?> helper('cms')->__('px.') ?>
- getName(); ?> -
- - - helper('cms')->__('No files found') ?> - diff --git a/app/design/adminhtml/default/default/template/cms/wysiwyg/js.phtml b/app/design/adminhtml/default/default/template/cms/wysiwyg/js.phtml deleted file mode 100644 index bd9eefd866..0000000000 --- a/app/design/adminhtml/default/default/template/cms/wysiwyg/js.phtml +++ /dev/null @@ -1,272 +0,0 @@ - - - diff --git a/app/design/adminhtml/default/default/template/cms/wysiwyg/tree.phtml b/app/design/adminhtml/default/default/template/cms/wysiwyg/tree.phtml deleted file mode 100644 index 59ade57f9c..0000000000 --- a/app/design/adminhtml/default/default/template/cms/wysiwyg/tree.phtml +++ /dev/null @@ -1,76 +0,0 @@ - - - - -
- - diff --git a/app/design/adminhtml/default/default/template/customer/group/list.phtml b/app/design/adminhtml/default/default/template/customer/group/list.phtml deleted file mode 100644 index 4f3973db92..0000000000 --- a/app/design/adminhtml/default/default/template/customer/group/list.phtml +++ /dev/null @@ -1,56 +0,0 @@ - -
- - - - - -

__('Customer Groups') ?>

-
-getChildHtml('grid') ?> - diff --git a/app/design/adminhtml/default/default/template/customer/tab/view.phtml b/app/design/adminhtml/default/default/template/customer/tab/view.phtml index 4d2f0d0c5e..c806932dd6 100644 --- a/app/design/adminhtml/default/default/template/customer/tab/view.phtml +++ b/app/design/adminhtml/default/default/template/customer/tab/view.phtml @@ -74,7 +74,7 @@ $createDateStore = $this->getStoreCreateDate();
- __('Primary Billing Address') ?>
+ __('Default Billing Address') ?>
getBillingAddressHtml() ?>
diff --git a/app/design/adminhtml/default/default/template/downloadable/product/edit/downloadable/links.phtml b/app/design/adminhtml/default/default/template/downloadable/product/edit/downloadable/links.phtml index bfbdc492a2..a62837c3af 100644 --- a/app/design/adminhtml/default/default/template/downloadable/product/edit/downloadable/links.phtml +++ b/app/design/adminhtml/default/default/template/downloadable/product/edit/downloadable/links.phtml @@ -248,11 +248,8 @@ var linkItems = { downloadsElm.disabled = true; } Event.observe(isUnlimitedElm, 'click', function(event){ - if (isUnlimitedElm.checked == true) { - downloadsElm.disabled = true; - } else { - downloadsElm.disabled = false; - } + elm = Event.element(event); + elm.up('td').down('input[type="text"].downloads').disabled = elm.checked; }); if (data.is_shareable) { diff --git a/app/design/adminhtml/default/default/template/forgotpassword.phtml b/app/design/adminhtml/default/default/template/forgotpassword.phtml index 49cd351758..12d745e491 100644 --- a/app/design/adminhtml/default/default/template/forgotpassword.phtml +++ b/app/design/adminhtml/default/default/template/forgotpassword.phtml @@ -38,7 +38,7 @@ - + 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 b906876ad0..6988aa6704 100644 --- a/app/design/adminhtml/default/default/template/newsletter/template/edit.phtml +++ b/app/design/adminhtml/default/default/template/newsletter/template/edit.phtml @@ -56,6 +56,7 @@
+
diff --git a/app/design/adminhtml/default/default/template/paypal/direct/form.phtml b/app/design/adminhtml/default/default/template/paypal/direct/form.phtml new file mode 100644 index 0000000000..cad2e74ac0 --- /dev/null +++ b/app/design/adminhtml/default/default/template/paypal/direct/form.phtml @@ -0,0 +1,61 @@ + + +getMethod()->get3DSecureEnabled()): ?> + + + + + diff --git a/app/design/adminhtml/default/default/template/paypal/direct/info.phtml b/app/design/adminhtml/default/default/template/paypal/direct/info.phtml new file mode 100644 index 0000000000..1eaac84808 --- /dev/null +++ b/app/design/adminhtml/default/default/template/paypal/direct/info.phtml @@ -0,0 +1,66 @@ + +getInfo()): ?> +

getMethod()->getTitle() ?>


+ +__('Credit Card Type: %s', $this->getCcTypeName()) ?>
+__('Credit Card Number: xxxx-%s', $this->getInfo()->getCcLast4()) ?>
+getInfo()->getCcSsIssue()): ?> +__("Switch/Solo card issue number: %s", $this->getInfo()->getCcSsIssue()) ?>
+ +getInfo()->getCcSsStartYear()): ?> +__('Switch/Solo card start Date: %s/%s', $this->getInfo()->getCcStartMonth(), $this->getInfo()->getCcSsStartYear()) ?> + + +getInfo()->getCcTransId()): ?> + __('Transaction Id');?>: getInfo()->getCcTransId();?>
+getInfo()->getLastTransId()): ?> + __('Transaction Id');?>: getInfo()->getLastTransId();?>
+ + + +getCvvVerified()): ?> + __('CVV2 check by PayPal'); ?> : getCvvVerified();?>
+ + +getAvsDetail()):?> + __('Address Verification System'); ?> : getAvsDetail();?>
+ + +getIs3DSecureVerified()):?> + __('Verified by Centinel Software'); ?>
+ + +getInfo()->getAccountStatus()): ?> + __('Customer account status'); ?> : getInfo()->getAccountStatus();?>
+ + +getInfo()->getProtectionEligibility()): ?> + __('Seller protection eligibility'); ?> : getInfo()->getProtectionEligibility();?>
+ + + diff --git a/app/design/adminhtml/default/default/template/paypal/direct/validate.phtml b/app/design/adminhtml/default/default/template/paypal/direct/validate.phtml new file mode 100644 index 0000000000..6ece02381c --- /dev/null +++ b/app/design/adminhtml/default/default/template/paypal/direct/validate.phtml @@ -0,0 +1,40 @@ + +
+ + + +
+ + diff --git a/app/design/adminhtml/default/default/template/paypal/express/info.phtml b/app/design/adminhtml/default/default/template/paypal/express/info.phtml index f42a502617..f1a3af9d1a 100644 --- a/app/design/adminhtml/default/default/template/paypal/express/info.phtml +++ b/app/design/adminhtml/default/default/template/paypal/express/info.phtml @@ -26,3 +26,20 @@ ?>

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

+getInfo()->getCcTransId()): ?> + __('Transaction Id');?>: getInfo()->getCcTransId();?>
+getInfo()->getLastTransId()): ?> + __('Transaction Id');?>: getInfo()->getLastTransId();?>
+ + +getInfo()->getAccountStatus()): ?> + __('Customer account status'); ?> : getInfo()->getAccountStatus();?>
+ + +getInfo()->getProtectionEligibility()): ?> + __('Seller protection eligibility'); ?> : getInfo()->getProtectionEligibility();?>
+ + +getInfo()->getAddressStatus()): ?> + __('Shipping address status'); ?> : getInfo()->getAddressStatus();?>
+ diff --git a/app/design/adminhtml/default/default/template/paypaluk/direct/finalize.phtml b/app/design/adminhtml/default/default/template/paypaluk/direct/finalize.phtml new file mode 100644 index 0000000000..ad1f7615c4 --- /dev/null +++ b/app/design/adminhtml/default/default/template/paypaluk/direct/finalize.phtml @@ -0,0 +1,34 @@ + + + diff --git a/app/design/adminhtml/default/default/template/paypaluk/direct/form.phtml b/app/design/adminhtml/default/default/template/paypaluk/direct/form.phtml index b607d4599a..37c53da200 100644 --- a/app/design/adminhtml/default/default/template/paypaluk/direct/form.phtml +++ b/app/design/adminhtml/default/default/template/paypaluk/direct/form.phtml @@ -24,142 +24,37 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> - getMethodCode() ?> - - + return false; + }; + } + Event.observe(window, 'load', getCentinelJsObjectName();?>RedeclareSave); + + diff --git a/app/design/adminhtml/default/default/template/paypaluk/direct/info.phtml b/app/design/adminhtml/default/default/template/paypaluk/direct/info.phtml index b1f75d5ab3..7ff3de0993 100644 --- a/app/design/adminhtml/default/default/template/paypaluk/direct/info.phtml +++ b/app/design/adminhtml/default/default/template/paypaluk/direct/info.phtml @@ -25,14 +25,34 @@ */ ?> getInfo()): ?> +

getMethod()->getTitle() ?>


__('Credit Card Type: %s', $this->getCcTypeName()) ?>
__('Credit Card Number: xxxx-%s', $this->getInfo()->getCcLast4()) ?>
-__('Expiration Date: %s/%s', $this->getCcExpMonth(), $this->getInfo()->getCcExpYear()) ?>
getInfo()->getCcSsIssue()): ?> __("Switch/Solo card issue number: %s", $this->getInfo()->getCcSsIssue()) ?>
getInfo()->getCcSsStartYear()): ?> __('Switch/Solo card start Date: %s/%s', $this->getCcStartMonth(), $this->getInfo()->getCcSsStartYear()) ?> + +getInfo()->getCcTransId()): ?> + __('Transaction Id');?>: getInfo()->getCcTransId();?>
+getInfo()->getLastTransId()): ?> + __('Transaction Id');?>: getInfo()->getLastTransId();?>
+ + + +getCvvVerified()): ?> + __('CVV2 check by PayPal'); ?> : getCvvVerified();?>
+ + +getAvsDetail()):?> + __('Address Verification System'); ?> : getAvsDetail();?>
+ + +getIs3DSecureVerified()):?> + __('Verified by Centinel Software');?>
+ + diff --git a/app/design/adminhtml/default/default/template/paypaluk/direct/validate.phtml b/app/design/adminhtml/default/default/template/paypaluk/direct/validate.phtml new file mode 100644 index 0000000000..6ece02381c --- /dev/null +++ b/app/design/adminhtml/default/default/template/paypaluk/direct/validate.phtml @@ -0,0 +1,40 @@ + +
+ + + +
+ + diff --git a/app/design/adminhtml/default/default/template/paypaluk/express/info.phtml b/app/design/adminhtml/default/default/template/paypaluk/express/info.phtml index f42a502617..01a643fdac 100644 --- a/app/design/adminhtml/default/default/template/paypaluk/express/info.phtml +++ b/app/design/adminhtml/default/default/template/paypaluk/express/info.phtml @@ -26,3 +26,10 @@ ?>

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

+ +getInfo()->getCcTransId()): ?> + __('Transaction Id');?>: getInfo()->getCcTransId();?>
+getInfo()->getLastTransId()): ?> + __('Transaction Id');?>: getInfo()->getLastTransId();?>
+ + 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 2657e243ff..92456b41f4 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 @@ -30,15 +30,16 @@ * */ ?> - - - - - -
- getButtonHtml(Mage::helper('sales')->__('Apply'), 'order.applyCoupon($F(\'coupons:code\'))') ?>
-getCouponCode()): ?> -
- getCouponCode() ?> - [__('Remove') ?>] - +
+
+

__('Apply Coupon Code') ?>

+
+
+
+

 getButtonHtml(Mage::helper('sales')->__('Apply'), 'order.applyCoupon($F(\'coupons:code\'))') ?>

+ getCouponCode()): ?> +

getCouponCode() ?> [__('Remove') ?>]

+ +
+
+
diff --git a/app/design/adminhtml/default/default/template/sales/order/create/items/grid.phtml b/app/design/adminhtml/default/default/template/sales/order/create/items/grid.phtml index 9c71d87815..6110d85a14 100644 --- a/app/design/adminhtml/default/default/template/sales/order/create/items/grid.phtml +++ b/app/design/adminhtml/default/default/template/sales/order/create/items/grid.phtml @@ -368,8 +368,6 @@ - - isGiftMessagesAvailable()): ?> @@ -392,17 +390,16 @@
- - - - - - + + - + +
getInclExclTaxMessage(); ?>getButtonHtml($this->helper('sales')->__('Update Items and Qty\'s'),'order.itemsUpdate()'); ?>
getChildHtml() ?>
getInclExclTaxMessage(); ?>getButtonHtml($this->helper('sales')->__('Update Items and Qty\'s'),'order.itemsUpdate()'); ?>
-
+
+
getChildHtml() ?>
+
diff --git a/app/design/adminhtml/default/default/template/sales/order/shipment/view/form.phtml b/app/design/adminhtml/default/default/template/sales/order/shipment/view/form.phtml index f34e0cfec1..579d0f88e6 100644 --- a/app/design/adminhtml/default/default/template/sales/order/shipment/view/form.phtml +++ b/app/design/adminhtml/default/default/template/sales/order/shipment/view/form.phtml @@ -48,7 +48,7 @@
getShipment()->getTracksCollection()->count()): ?> - __('Track this shipment') ?> + __('Track this shipment') ?>
getShippingDescription() ?> diff --git a/app/design/adminhtml/default/default/template/sales/order/shipment/view/tracking.phtml b/app/design/adminhtml/default/default/template/sales/order/shipment/view/tracking.phtml index df7ccaa8e2..a3e2c1fa29 100644 --- a/app/design/adminhtml/default/default/template/sales/order/shipment/view/tracking.phtml +++ b/app/design/adminhtml/default/default/template/sales/order/shipment/view/tracking.phtml @@ -62,7 +62,7 @@ isCustom()): ?> getNumber() ?> - getNumber() ?> + getNumber() ?>
diff --git a/app/design/adminhtml/default/default/template/sales/order/view/history.phtml b/app/design/adminhtml/default/default/template/sales/order/view/history.phtml index e6b6cf72fc..2e66337431 100644 --- a/app/design/adminhtml/default/default/template/sales/order/view/history.phtml +++ b/app/design/adminhtml/default/default/template/sales/order/view/history.phtml @@ -54,20 +54,20 @@
    - getOrder()->getStatusHistoryCollection(true) as $_history): ?> + getOrder()->getStatusHistoryCollection(true) as $_item): ?>
  • - helper('core')->formatDate($_history->getCreatedAtDate(), 'medium') ?> - helper('core')->formatTime($_history->getCreatedAtDate(), 'medium') ?>|getStatusLabel() ?>
    helper('sales')->__('Customer') ?> + helper('core')->formatDate($_item->getCreatedAtDate(), 'medium') ?> + helper('core')->formatTime($_item->getCreatedAtDate(), 'medium') ?>|getStatusLabel() ?>
    helper('sales')->__('Customer') ?> - getIsCustomerNotified()): ?> + getIsCustomerNotified()): ?> helper('sales')->__('Notified') ?> helper('sales')->__('Not Notified') ?> - getComment()): ?> -
    htmlEscape($_history->getComment(), array('b','br','strong','i','u')) ?> + getComment()): ?> +
    htmlEscape($_item->getComment(), array('b','br','strong','i','u')) ?>
  • diff --git a/app/design/adminhtml/default/default/template/sales/order/view/tab/history.phtml b/app/design/adminhtml/default/default/template/sales/order/view/tab/history.phtml index a787bde7eb..f99a15179c 100644 --- a/app/design/adminhtml/default/default/template/sales/order/view/tab/history.phtml +++ b/app/design/adminhtml/default/default/template/sales/order/view/tab/history.phtml @@ -27,24 +27,25 @@
      - getFullHistory() as $_history): ?> + getFullHistory() as $_item): ?>
    • - helper('core')->formatDate($_history['created_at'], 'medium') ?> - helper('core')->formatTime($_history['created_at'], 'medium') ?>| - - - |helper('sales')->__('Customer') ?> - - helper('sales')->__('Notified') ?> - - - helper('sales')->__('Not Notified') ?> + getItemCreatedAt($_item) ?> + getItemCreatedAt($_item, 'time') ?>| + getItemTitle($_item) ?> + isItemNotified($_item, false)): ?> + |helper('sales')->__('Customer') ?> + + isItemNotified($_item)): ?> + helper('sales')->__('Notified') ?> + + + helper('sales')->__('Not Notified') ?> + + + getItemComment($_item)): ?> +
      -
      - -
      -
    diff --git a/app/design/adminhtml/default/default/template/sales/order/view/tab/info.phtml b/app/design/adminhtml/default/default/template/sales/order/view/tab/info.phtml index 8355a828ee..e1adf8dc3d 100644 --- a/app/design/adminhtml/default/default/template/sales/order/view/tab/info.phtml +++ b/app/design/adminhtml/default/default/template/sales/order/view/tab/info.phtml @@ -56,7 +56,7 @@
    getTracksCollection()->count()) : ?> - __('Track order') ?> + __('Track order') ?>
    getShippingDescription()): ?> diff --git a/app/design/adminhtml/default/default/template/system/email/template/edit.phtml b/app/design/adminhtml/default/default/template/system/email/template/edit.phtml index 6cf745bf3e..00e8e573a6 100644 --- a/app/design/adminhtml/default/default/template/system/email/template/edit.phtml +++ b/app/design/adminhtml/default/default/template/system/email/template/edit.phtml @@ -104,6 +104,7 @@ getBlockHtml('formkey')?>
    + getFormHtml() ?>
    @@ -112,6 +113,7 @@
    +
    diff --git a/app/design/adminhtml/default/default/template/tax/importExport.phtml b/app/design/adminhtml/default/default/template/tax/importExport.phtml index 567024e0b7..9a28d5db86 100644 --- a/app/design/adminhtml/default/default/template/tax/importExport.phtml +++ b/app/design/adminhtml/default/default/template/tax/importExport.phtml @@ -32,6 +32,7 @@
+ getIsReadonly()): ?>
getBlockHtml('formkey')?> @@ -48,7 +49,8 @@ var importForm = new varienForm('import_form');
-
+ +
getBlockHtml('formkey')?>
diff --git a/app/design/adminhtml/default/default/template/tax/rate/form.phtml b/app/design/adminhtml/default/default/template/tax/rate/form.phtml index 09bb7bfdf6..addcefc419 100644 --- a/app/design/adminhtml/default/default/template/tax/rate/form.phtml +++ b/app/design/adminhtml/default/default/template/tax/rate/form.phtml @@ -27,6 +27,7 @@
getFormHtml() ?>
+getChildHtml('form_after');?> diff --git a/app/design/adminhtml/default/default/template/tax/toolbar/rate/add.phtml b/app/design/adminhtml/default/default/template/tax/toolbar/rate/add.phtml index 05b75ad7c5..29b6e02fdc 100644 --- a/app/design/adminhtml/default/default/template/tax/toolbar/rate/add.phtml +++ b/app/design/adminhtml/default/default/template/tax/toolbar/rate/add.phtml @@ -29,7 +29,7 @@

- + getChildHtml('addButton') ?> diff --git a/app/design/adminhtml/default/default/template/widget/form.phtml b/app/design/adminhtml/default/default/template/widget/form.phtml index 4becf8f0e6..f0e078c7f2 100644 --- a/app/design/adminhtml/default/default/template/widget/form.phtml +++ b/app/design/adminhtml/default/default/template/widget/form.phtml @@ -25,14 +25,6 @@ */ ?>
- getFormHtml() ?> -getUseContainer() === true ): ?> -getFormEnctype() ) ? 'enctype="' . $this->getForm()->getFormEnctype() . '"' : '' ?> > - - getElements() as $_element): ?> - drawElement($_element) ?> - -getUseContainer() === true ): ?> - - + getFormHtml();?>
+getChildHtml('form_after');?> diff --git a/app/design/adminhtml/default/default/template/widget/form/container.phtml b/app/design/adminhtml/default/default/template/widget/form/container.phtml index ae6ebb423b..13fb7889dc 100644 --- a/app/design/adminhtml/default/default/template/widget/form/container.phtml +++ b/app/design/adminhtml/default/default/template/widget/form/container.phtml @@ -41,6 +41,6 @@
getFormScripts() ?> diff --git a/app/design/adminhtml/default/default/template/widget/form/renderer/fieldset/element.phtml b/app/design/adminhtml/default/default/template/widget/form/renderer/fieldset/element.phtml index bcf20d3eb0..e23e86a230 100644 --- a/app/design/adminhtml/default/default/template/widget/form/renderer/fieldset/element.phtml +++ b/app/design/adminhtml/default/default/template/widget/form/renderer/fieldset/element.phtml @@ -33,11 +33,15 @@ $_class = $_element->getFieldsetHtmlClass(); getNoDisplay()): ?> id=""> getType()=='hidden'): ?> - getElementHtml()) ?> + getElementHtml()) ?> ">getLabelHtml()) ?> - ">getElementHtml()) ?> - class="note" id="note_getId()?>"> + "> + getElementHtml()) ?> + +

" id="note_getId()?>">

+ + diff --git a/app/design/adminhtml/default/default/template/widget/instance/edit/layout.phtml b/app/design/adminhtml/default/default/template/widget/instance/edit/layout.phtml new file mode 100644 index 0000000000..849cf38709 --- /dev/null +++ b/app/design/adminhtml/default/default/template/widget/instance/edit/layout.phtml @@ -0,0 +1,431 @@ + +
+

__('Layout Updates') ?>

+
getAddLayoutButtonHtml() ?>
+
+
+
+
+
+
+ diff --git a/app/design/adminhtml/default/default/template/widget/instance/js.phtml b/app/design/adminhtml/default/default/template/widget/instance/js.phtml new file mode 100644 index 0000000000..1c28d3b9f1 --- /dev/null +++ b/app/design/adminhtml/default/default/template/widget/instance/js.phtml @@ -0,0 +1,38 @@ + + diff --git a/app/design/frontend/base/default/etc/widget.xml b/app/design/frontend/base/default/etc/widget.xml new file mode 100644 index 0000000000..087d8a6f11 --- /dev/null +++ b/app/design/frontend/base/default/etc/widget.xml @@ -0,0 +1,166 @@ + + + + + + + + + + left + + + + content + + + + right + + + + + + + + + + + + left + + + + content + + + + right + + + + + + + + + + + + left + + + + content + + + + right + + + + + diff --git a/app/design/frontend/base/default/layout/amazonpayments.xml b/app/design/frontend/base/default/layout/amazonpayments.xml new file mode 100755 index 0000000000..95d74368cb --- /dev/null +++ b/app/design/frontend/base/default/layout/amazonpayments.xml @@ -0,0 +1,61 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/design/frontend/base/default/layout/bundle.xml b/app/design/frontend/base/default/layout/bundle.xml new file mode 100644 index 0000000000..89e6a5511d --- /dev/null +++ b/app/design/frontend/base/default/layout/bundle.xml @@ -0,0 +1,316 @@ + + + + + + + + + bundlebundle/catalog_product_price + + + + + + bundlebundle/catalog_product_price + + + + + + bundlebundle/catalog_product_price + + + + + + bundlebundle/catalog_product_price + + + + + + bundlebundle/catalog_product_price + + + + + + bundlebundle/catalog_product_price + + + + + + bundlebundle/catalog_product_price + + + + + + bundlebundle/catalog_product_price + + + + + + bundlebundle/checkout_cart_item_renderer + + + bundlebundle/catalog_product_price + + + bundlebundle/catalog_product_price + + + + + + bundlebundle/catalog_product_price + + + + + + bundlebundle/catalog_product_price + + + + + + bundlebundle/catalog_product_price + + + + + + + + + bundlebundle/catalog_product_price + bundle4 + + + + + + + + bundlebundle/checkout_cart_item_renderer + + + + + + + + bundlebundle/checkout_cart_item_renderer + + + bundlebundle/catalog_product_price + + + + + + + + bundlebundle/checkout_cart_item_renderer + + + + + + bundlebundle/checkout_cart_item_renderer + + + + + + bundlebundle/checkout_cart_item_renderer + + + bundlebundle/checkout_cart_item_renderer + + + + + + bundlebundle/checkout_cart_item_renderer + + + + + + + + + skin_jsjs/bundle.js + + + + bundlebundle/catalog_product_price + + + + + + selectbundle/catalog_product_view_type_bundle_option_select + multibundle/catalog_product_view_type_bundle_option_multi + radiobundle/catalog_product_view_type_bundle_option_radio + checkboxbundle/catalog_product_view_type_bundle_option_checkbox + + product.info.bundle.options + + + + + + + bundlebundle/catalog_product_price + + + + + + bundlebundle/sales_order_items_renderer + + + + + + bundlebundle/sales_order_items_renderer + + + + + + bundlebundle/sales_order_items_renderer + + + + + + bundlebundle/sales_order_items_renderer + + + + + + + + bundlebundle/sales_order_items_renderer + + + + + + bundlebundle/sales_order_items_renderer + + + + + + bundlebundle/sales_order_items_renderer + + + + + + bundlebundle/sales_order_items_renderer + + + + + + + bundlebundle/sales_order_items_renderer + + + + + + bundlebundle/sales_order_items_renderer + + + + + + + bundlebundle/sales_order_items_renderer + + + + + + bundlebundle/sales_order_items_renderer + + + + + + + bundlebundle/catalog_product_price + + + + + bundlebundle/catalog_product_price + + + + + bundlebundle/catalog_product_price + + + diff --git a/app/design/frontend/base/default/layout/catalog.xml b/app/design/frontend/base/default/layout/catalog.xml new file mode 100644 index 0000000000..2728dd60b9 --- /dev/null +++ b/app/design/frontend/base/default/layout/catalog.xml @@ -0,0 +1,413 @@ + + + + + + + + + + + + + + + images/media/col_left_callout.jpg + Our customer service is available 24/7. Call us at (555) 555-0123. + checkout/cart + + + + + + + + Site Map + + + + + + + + + + + + + + + + + + + + + empty6 + one_column5 + two_columns_left4 + two_columns_right4 + three_columns3 + product_list_toolbar + + + + + + + + + + + + + + + + + + + + + + empty6 + one_column5 + two_columns_left4 + two_columns_right4 + three_columns3 + product_list_toolbar + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + catalog.compare.sidebar + + + + + + + + + + + + + + + js_csscalendar/calendar-win2k-1.css + jscalendar/calendar.js + jscalendar/calendar-setup.js + + + + + + + + + + + + + 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 + + + + + + + + + + + + + seo.sitemap.tree.pager.top + seo.sitemap.tree.pager.bottom + + + + + + + + + Products + + seo.sitemap.pager.top + seo.sitemap.pager.bottom + products + + + + Categories Sitemap + + + + + + + + + + + + + + + + + + + diff --git a/app/design/frontend/base/default/layout/catalogsearch.xml b/app/design/frontend/base/default/layout/catalogsearch.xml new file mode 100644 index 0000000000..be0bbd6043 --- /dev/null +++ b/app/design/frontend/base/default/layout/catalogsearch.xml @@ -0,0 +1,131 @@ + + + + + + + + + + + + + Search Terms + + + + + Advanced Search + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + js_csscalendar/calendar-win2k-1.css + jscalendar/calendar.js + jscalendar/calendar-setup.js + + + + + + + + + + + + + + + + + + + + empty6 + one_column5 + two_columns_left4 + two_columns_right4 + three_columns3 + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/design/frontend/base/default/layout/checkout.xml b/app/design/frontend/base/default/layout/checkout.xml new file mode 100644 index 0000000000..36835eb867 --- /dev/null +++ b/app/design/frontend/base/default/layout/checkout.xml @@ -0,0 +1,403 @@ + + + + + + + + + + + + + + + + + + simplecheckout/cart_item_renderer + groupedcheckout/cart_item_renderer_grouped + configurablecheckout/cart_item_renderer_configurable + + + + + + + + + + + + + + + + + + + checkout/cart.phtml + checkout/cart/noItems.phtml + + simplecheckout/cart_item_renderer + groupedcheckout/cart_item_renderer_grouped + configurablecheckout/cart_item_renderer_configurable + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + defaultcheckout/cart_item_renderer + groupedcheckout/cart_item_renderer_grouped + configurablecheckout/cart_item_renderer_configurable + + + + + + + + + + + + + defaultcheckout/cart_item_renderer + groupedcheckout/cart_item_renderer_grouped + configurablecheckout/cart_item_renderer_configurable + + + defaultcheckout/cart_item_renderer + groupedcheckout/cart_item_renderer_grouped + configurablecheckout/cart_item_renderer_configurable + + + + + + + + + + + + + + purchaseorder + + + + + + + + + + + + + + + + defaultcheckout/cart_item_renderer + groupedcheckout/cart_item_renderer_grouped + configurablecheckout/cart_item_renderer_configurable + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + checkout-progress-wrapper + + + + + + + + + + + + + + + purchaseorder + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + purchaseorder + + + + + + + + + + + + + + + + + + + + + 1 + + + + + + + + + + + + defaultcheckout/cart_item_renderer + groupedcheckout/cart_item_renderer_grouped + configurablecheckout/cart_item_renderer_configurable + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/design/frontend/base/default/layout/chronopay.xml b/app/design/frontend/base/default/layout/chronopay.xml new file mode 100644 index 0000000000..5e5d5a92b1 --- /dev/null +++ b/app/design/frontend/base/default/layout/chronopay.xml @@ -0,0 +1,42 @@ + + + + + + + + + + + + + + diff --git a/app/design/frontend/base/default/layout/cms.xml b/app/design/frontend/base/default/layout/cms.xml new file mode 100644 index 0000000000..45f01fa9e2 --- /dev/null +++ b/app/design/frontend/base/default/layout/cms.xml @@ -0,0 +1,88 @@ + + + + + + + + + + footer_links + + + + + + + + + + std + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/design/frontend/base/default/layout/contacts.xml b/app/design/frontend/base/default/layout/contacts.xml new file mode 100644 index 0000000000..cd5a08514b --- /dev/null +++ b/app/design/frontend/base/default/layout/contacts.xml @@ -0,0 +1,45 @@ + + + + + + contactsContact Ustrue + + + + + + + + Contact Us + + + + + + diff --git a/app/design/frontend/base/default/layout/core.xml b/app/design/frontend/base/default/layout/core.xml new file mode 100644 index 0000000000..dc6233c981 --- /dev/null +++ b/app/design/frontend/base/default/layout/core.xml @@ -0,0 +1,33 @@ + + + + + + + diff --git a/app/design/frontend/base/default/layout/customer.xml b/app/design/frontend/base/default/layout/customer.xml new file mode 100644 index 0000000000..3c3c1ac35b --- /dev/null +++ b/app/design/frontend/base/default/layout/customer.xml @@ -0,0 +1,270 @@ + + + + + + + + + + My Account10 + + + + + + + + Log Out100 + + + + + + + + + Log In100 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Password forgotten + + + + + + + + + + + + + + Send confirmation link + + + + + + + + + + + Edit Account Info + + + + + + + left.permanent.callout + + + + + + + + + + + + + + + my-account + + + + + + accountcustomer/account/ + account_editcustomer/account/edit/ + address_bookcustomer/address/ + + + simplecheckout/cart_item_renderer + groupedcheckout/cart_item_renderer_grouped + configurablecheckout/cart_item_renderer_configurable + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/design/frontend/base/default/layout/cybermut.xml b/app/design/frontend/base/default/layout/cybermut.xml new file mode 100644 index 0000000000..665b80c9ee --- /dev/null +++ b/app/design/frontend/base/default/layout/cybermut.xml @@ -0,0 +1,40 @@ + + + + + + + + + + + + + diff --git a/app/design/frontend/base/default/layout/directory.xml b/app/design/frontend/base/default/layout/directory.xml new file mode 100644 index 0000000000..e9eab4582b --- /dev/null +++ b/app/design/frontend/base/default/layout/directory.xml @@ -0,0 +1,73 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/design/frontend/base/default/layout/downloadable.xml b/app/design/frontend/base/default/layout/downloadable.xml new file mode 100644 index 0000000000..02576d24e0 --- /dev/null +++ b/app/design/frontend/base/default/layout/downloadable.xml @@ -0,0 +1,169 @@ + + + + + + + downloadable_productsdownloadable/customer/products + + + + + + + + + + + My Downloadable Products + + + + + + downloadabledownloadable/checkout_cart_item_renderer + + + + + + downloadabledownloadable/checkout_cart_item_renderer + + + + + + + + + + + + downloadabledownloadable/checkout_cart_item_renderer + + + + + + downloadabledownloadable/checkout_cart_item_renderer + + + + + + downloadabledownloadable/checkout_cart_item_renderer + + + + + + + + + + + + downloadabledownloadable/sales_order_item_renderer_downloadable + + + + + + downloadabledownloadable/sales_order_item_renderer_downloadable + + + + + + downloadabledownloadable/sales_order_item_renderer_downloadable + + + + + + + + downloadabledownloadable/sales_order_item_renderer_downloadable + + + + + + downloadabledownloadable/sales_order_item_renderer_downloadable + + + + + + downloadabledownloadable/sales_order_item_renderer_downloadable + + + + + + + + + + downloadabledownloadable/sales_order_email_items_order_downloadable + + + + + + downloadabledownloadable/sales_order_email_items_downloadable + + + + + + downloadabledownloadable/sales_order_email_items_downloadable + + + + + + + + + + + + + product.info.downloadable.options + + + + diff --git a/app/design/frontend/base/default/layout/eway.xml b/app/design/frontend/base/default/layout/eway.xml new file mode 100644 index 0000000000..fa6f5e08f0 --- /dev/null +++ b/app/design/frontend/base/default/layout/eway.xml @@ -0,0 +1,53 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/design/frontend/base/default/layout/googleanalytics.xml b/app/design/frontend/base/default/layout/googleanalytics.xml new file mode 100644 index 0000000000..a48a091cb4 --- /dev/null +++ b/app/design/frontend/base/default/layout/googleanalytics.xml @@ -0,0 +1,41 @@ + + + + + + + + + + + + + diff --git a/app/design/frontend/base/default/layout/googlecheckout.xml b/app/design/frontend/base/default/layout/googlecheckout.xml new file mode 100644 index 0000000000..fbb8ce5593 --- /dev/null +++ b/app/design/frontend/base/default/layout/googlecheckout.xml @@ -0,0 +1,53 @@ + + + + + + + + + + + + + + + true + + + + + + + + + + + + diff --git a/app/design/frontend/base/default/layout/googleoptimizer.xml b/app/design/frontend/base/default/layout/googleoptimizer.xml new file mode 100644 index 0000000000..5c73f77d7b --- /dev/null +++ b/app/design/frontend/base/default/layout/googleoptimizer.xml @@ -0,0 +1,153 @@ + + + + + + + + + + control_script + + + + + tracking_script + + + + + + + + control_script + + + + + tracking_script + + + + + + + + control_script + + + + + tracking_script + + + + + + + + control_script + + + + + tracking_script + + + + + + + + control_script + + + + + tracking_script + + + + + + + + conversion_script + checkout_cart + + + + + + + + conversion_script + checkout_onepage + + + + + + + + conversion_script + checkout_onepage_success + + + + + + + + conversion_script + checkout_multishipping_success + + + + + + + + conversion_script + checkout_multishipping + + + + + + + + conversion_script + customer_account_create + + + + + diff --git a/app/design/frontend/base/default/layout/ideal.xml b/app/design/frontend/base/default/layout/ideal.xml new file mode 100644 index 0000000000..0b6a9cb6bf --- /dev/null +++ b/app/design/frontend/base/default/layout/ideal.xml @@ -0,0 +1,51 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/design/frontend/base/default/layout/newsletter.xml b/app/design/frontend/base/default/layout/newsletter.xml new file mode 100644 index 0000000000..6ac355ad5c --- /dev/null +++ b/app/design/frontend/base/default/layout/newsletter.xml @@ -0,0 +1,70 @@ + + + + + + + + + + + + + + + + + + + + + newsletternewsletter/manage/ + + + + + + + right.newsletter + + + + + + + + + + + + diff --git a/app/design/frontend/base/default/layout/ogone.xml b/app/design/frontend/base/default/layout/ogone.xml new file mode 100644 index 0000000000..afd19656c5 --- /dev/null +++ b/app/design/frontend/base/default/layout/ogone.xml @@ -0,0 +1,59 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/design/frontend/base/default/layout/oscommerce.xml b/app/design/frontend/base/default/layout/oscommerce.xml new file mode 100644 index 0000000000..77c4b3e009 --- /dev/null +++ b/app/design/frontend/base/default/layout/oscommerce.xml @@ -0,0 +1,41 @@ + + + + + + + + + + + + + + + diff --git a/app/design/frontend/base/default/layout/page.xml b/app/design/frontend/base/default/layout/page.xml new file mode 100644 index 0000000000..fd57b36e33 --- /dev/null +++ b/app/design/frontend/base/default/layout/page.xml @@ -0,0 +1,179 @@ + + + + + + + + + + + + + + + + + + + + + + + + + css/widgets.css + css/styles.css + skin_csscss/styles-ie.csslt IE 8 + + jslib/ds-sleight.jslt IE 7 + skin_jsjs/ie6.jslt IE 7 + + css/print.cssmedia="print" + + + + + + + + + + + top-container + + + + + + + + + + + + + + + + + + + + + + + + bottom-container + + + + + + + + + + + + + + + + + + + + + + + css/widgets.css + css/styles.css + skin_csscss/styles-ie.csslt IE 8 + css/print.cssmedia="print" + + jslib/ds-sleight.jslt IE 7 + skin_jsjs/ie6.jslt IE 7 + + + + + + + + + + + + + + + + + 1 + + + + + + + + + 1 + + + + + + + + + 1 + + + + + + + + + 1 + + + + + + + + + 1 + + + diff --git a/app/design/frontend/base/default/layout/paybox.xml b/app/design/frontend/base/default/layout/paybox.xml new file mode 100644 index 0000000000..27d5abf549 --- /dev/null +++ b/app/design/frontend/base/default/layout/paybox.xml @@ -0,0 +1,56 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/design/frontend/base/default/layout/paypal.xml b/app/design/frontend/base/default/layout/paypal.xml new file mode 100644 index 0000000000..4f5c725174 --- /dev/null +++ b/app/design/frontend/base/default/layout/paypal.xml @@ -0,0 +1,95 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/design/frontend/base/default/layout/paypaluk.xml b/app/design/frontend/base/default/layout/paypaluk.xml new file mode 100644 index 0000000000..d907fba753 --- /dev/null +++ b/app/design/frontend/base/default/layout/paypaluk.xml @@ -0,0 +1,83 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/design/frontend/base/default/layout/poll.xml b/app/design/frontend/base/default/layout/poll.xml new file mode 100644 index 0000000000..8bd128b5c8 --- /dev/null +++ b/app/design/frontend/base/default/layout/poll.xml @@ -0,0 +1,57 @@ + + + + + + + + + + + + poll + results + + + + + + + + + + right.poll + + + + diff --git a/app/design/frontend/base/default/layout/productalert.xml b/app/design/frontend/base/default/layout/productalert.xml new file mode 100644 index 0000000000..a2d8f578c2 --- /dev/null +++ b/app/design/frontend/base/default/layout/productalert.xml @@ -0,0 +1,40 @@ + + + + + + + + + + + + + + diff --git a/app/design/frontend/base/default/layout/protx.xml b/app/design/frontend/base/default/layout/protx.xml new file mode 100644 index 0000000000..e98cfa6c47 --- /dev/null +++ b/app/design/frontend/base/default/layout/protx.xml @@ -0,0 +1,43 @@ + + + + + + + + + + + + + + + diff --git a/app/design/frontend/base/default/layout/reports.xml b/app/design/frontend/base/default/layout/reports.xml new file mode 100644 index 0000000000..9f65bf8d02 --- /dev/null +++ b/app/design/frontend/base/default/layout/reports.xml @@ -0,0 +1,37 @@ + + + + + + + + + + + diff --git a/app/design/frontend/base/default/layout/review.xml b/app/design/frontend/base/default/layout/review.xml new file mode 100644 index 0000000000..b4cfe5cb18 --- /dev/null +++ b/app/design/frontend/base/default/layout/review.xml @@ -0,0 +1,121 @@ + + + + + + + + reviewsreview/customer + + + + + + + + + + + customer_account_dashboard_info1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/design/frontend/base/default/layout/rss.xml b/app/design/frontend/base/default/layout/rss.xml new file mode 100644 index 0000000000..05548868aa --- /dev/null +++ b/app/design/frontend/base/default/layout/rss.xml @@ -0,0 +1,93 @@ + + + + + + rssRSStrue
  • class="link-rss" + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/design/frontend/base/default/layout/sales.xml b/app/design/frontend/base/default/layout/sales.xml new file mode 100644 index 0000000000..564a093bf9 --- /dev/null +++ b/app/design/frontend/base/default/layout/sales.xml @@ -0,0 +1,284 @@ + + + + + + + + + + + + + + + + + + reorder + + + + + + + orderssales/order/history/ + + + + + + + + + + top + + + + + + + + + + + + + + + + + + + + + + + defaultsales/order_item_renderer_default + groupedsales/order_item_renderer_grouped + + colspan="4" class="a-right" + class="last a-right" + + + + + + + view + invoice*/*/invoice + shipment*/*/shipment + creditmemo*/*/creditmemo + + + + + + + + + + + defaultsales/order_item_renderer_default + groupedsales/order_item_renderer_grouped + + colspan="4" class="a-right" + class="last a-right" + + + + + + + view*/*/view + invoice + shipment*/*/shipment + creditmemo*/*/creditmemo + + + + + + + + + + + defaultsales/order_item_renderer_default + + + + + view*/*/view + invoice*/*/invoice + shipment + creditmemo*/*/creditmemo + + + + + + + + + + + defaultsales/order_item_renderer_default + groupedsales/order_item_renderer_grouped + + colspan="6" class="a-right" + class="a-right" + + + + + + + view*/*/view + invoice*/*/invoice + shipment*/*/shipment + creditmemo + + + + + + + + + + + + + + + defaultsales/order_item_renderer_default + groupedsales/order_item_renderer_grouped + + colspan="4" class="a-right" + class="last a-right" + + 1 + + + + + + + + + + + defaultsales/order_item_renderer_default + groupedsales/order_item_renderer_grouped + + colspan="4" class="a-right" + class="last a-right" + + + + + + + + + + + defaultsales/order_item_renderer_default + + + + + + + + defaultsales/order_item_renderer_default + groupedsales/order_item_renderer_grouped + + colspan="6" class="a-right" + class="a-right" + + + + + + + + + + defaultsales/order_email_items_order_default + groupedsales/order_email_items_order_grouped + + colspan="3" align="right" style="padding:3px 9px" + align="right" style="padding:3px 9px" + + 1 + + + + + + + + defaultsales/order_email_items_default + groupedsales/order_email_items_order_grouped + + colspan="3" align="right" style="padding:3px 9px" + align="right" style="padding:3px 9px" + + + + + + + + defaultsales/order_email_items_default + + + + + + defaultsales/order_email_items_default + groupedsales/order_email_items_order_grouped + + colspan="3" align="right" style="padding:3px 9px" + align="right" style="padding:3px 9px" + + + + + + diff --git a/app/design/frontend/base/default/layout/sendfriend.xml b/app/design/frontend/base/default/layout/sendfriend.xml new file mode 100644 index 0000000000..d5071c9846 --- /dev/null +++ b/app/design/frontend/base/default/layout/sendfriend.xml @@ -0,0 +1,41 @@ + + + + + + + + + + + + + + + + diff --git a/app/design/frontend/base/default/layout/shipping.xml b/app/design/frontend/base/default/layout/shipping.xml new file mode 100644 index 0000000000..8b2537ac76 --- /dev/null +++ b/app/design/frontend/base/default/layout/shipping.xml @@ -0,0 +1,52 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/design/frontend/base/default/layout/tag.xml b/app/design/frontend/base/default/layout/tag.xml new file mode 100644 index 0000000000..7415f436e1 --- /dev/null +++ b/app/design/frontend/base/default/layout/tag.xml @@ -0,0 +1,125 @@ + + + + + + + + + + + + + + + + + + + + + + tagstag/customer/ + + + + + + + + + customer_account_dashboard_info2 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + My Account + + + + + + + + + + + My Account + + + + + + + diff --git a/app/design/frontend/default/default/layout/weee.xml b/app/design/frontend/base/default/layout/weee.xml similarity index 98% rename from app/design/frontend/default/default/layout/weee.xml rename to app/design/frontend/base/default/layout/weee.xml index 2ecde59622..2867585e59 100644 --- a/app/design/frontend/default/default/layout/weee.xml +++ b/app/design/frontend/base/default/layout/weee.xml @@ -20,7 +20,7 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category design - * @package default_default + * @package base_default * @copyright Copyright (c) 2009 Irubin Consulting Inc. DBA Varien (http://www.varien.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ diff --git a/app/design/frontend/base/default/layout/wishlist.xml b/app/design/frontend/base/default/layout/wishlist.xml new file mode 100644 index 0000000000..f8741b90d3 --- /dev/null +++ b/app/design/frontend/base/default/layout/wishlist.xml @@ -0,0 +1,107 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + wishlistwishlist/ + + + + + + + + + wishlist + + + + + + + + + + + + + + wishlist_customer_sidebar + + + + + + + + + + + + wishlist_customer_sidebar + + + + + + + + + + + diff --git a/app/design/frontend/base/default/template/amazonpayments/asp/form.phtml b/app/design/frontend/base/default/template/amazonpayments/asp/form.phtml new file mode 100644 index 0000000000..fea6d3e209 --- /dev/null +++ b/app/design/frontend/base/default/template/amazonpayments/asp/form.phtml @@ -0,0 +1,32 @@ + +getMethodCode() ?> + diff --git a/app/design/frontend/base/default/template/amazonpayments/asp/redirect.phtml b/app/design/frontend/base/default/template/amazonpayments/asp/redirect.phtml new file mode 100644 index 0000000000..d5df8c04e0 --- /dev/null +++ b/app/design/frontend/base/default/template/amazonpayments/asp/redirect.phtml @@ -0,0 +1,39 @@ + + + + getRedirectMessage()); ?> +
    +
    + getRedirectParams() as $name => $value) { ?> + + +
    +
    + + + diff --git a/app/design/frontend/base/default/template/amazonpayments/asp/shortcut.phtml b/app/design/frontend/base/default/template/amazonpayments/asp/shortcut.phtml new file mode 100644 index 0000000000..b51e54cd59 --- /dev/null +++ b/app/design/frontend/base/default/template/amazonpayments/asp/shortcut.phtml @@ -0,0 +1,31 @@ + + diff --git a/app/design/frontend/base/default/template/amazonpayments/cba/form.phtml b/app/design/frontend/base/default/template/amazonpayments/cba/form.phtml new file mode 100644 index 0000000000..66e6bd685f --- /dev/null +++ b/app/design/frontend/base/default/template/amazonpayments/cba/form.phtml @@ -0,0 +1,32 @@ + +getMethodCode() ?> + diff --git a/app/design/frontend/base/default/template/amazonpayments/cba/success.phtml b/app/design/frontend/base/default/template/amazonpayments/cba/success.phtml new file mode 100644 index 0000000000..3391a32868 --- /dev/null +++ b/app/design/frontend/base/default/template/amazonpayments/cba/success.phtml @@ -0,0 +1,35 @@ + +SUCCESS +
    +

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

    +
    +

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

    +

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

    +
    + +
    diff --git a/app/design/frontend/base/default/template/amazonpayments/link.phtml b/app/design/frontend/base/default/template/amazonpayments/link.phtml new file mode 100644 index 0000000000..db3b7e6bf6 --- /dev/null +++ b/app/design/frontend/base/default/template/amazonpayments/link.phtml @@ -0,0 +1,51 @@ + + +
  • + getIsDisabled()): ?> + getIsOneClickEnabled()): ?> + + + +
    +
    + +
    +
    + + <?php echo Mage::helper('amazonpayments')->__('Checkout by Amazon');?> + + +
  • diff --git a/app/design/frontend/base/default/template/bundle/catalog/product/list/partof.phtml b/app/design/frontend/base/default/template/bundle/catalog/product/list/partof.phtml new file mode 100644 index 0000000000..6bf7d82a91 --- /dev/null +++ b/app/design/frontend/base/default/template/bundle/catalog/product/list/partof.phtml @@ -0,0 +1,52 @@ + +getItemCollection()->getSize()): ?> +
    +

    __('This product is also part of bundle(s)') ?>

    + + setColumnCount(4); // uncomment this line if you want to have another number of columns ?> + resetItemsIterator() ?> + getRowCount();$_i++): ?> + + getColumnCount();$_j++): ?> + getIterableItem()): ?> + + + + + + + +
    + <?php echo $this->htmlEscape($_bundle->getName()) ?> +

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

    + getPriceHtml($_bundle, true) ?> + getReviewsSummaryHtml($_bundle) ?> +
     
    + +
    + diff --git a/app/design/frontend/base/default/template/bundle/catalog/product/price.phtml b/app/design/frontend/base/default/template/bundle/catalog/product/price.phtml new file mode 100644 index 0000000000..8727c1470a --- /dev/null +++ b/app/design/frontend/base/default/template/bundle/catalog/product/price.phtml @@ -0,0 +1,262 @@ + +getProduct() ?> +getPriceModel()->getPrices($_product) ?> +getId() ?> + + + +getPrice($_product, $_minimalPrice); ?> +getPrice($_product, $_minimalPrice, true); ?> + +getPriceType() == 1) { + $_weeeTaxAmount = Mage::helper('weee')->getAmount($_product); + if ($_weeeTaxAmount && Mage::helper('weee')->typeOfDisplay($_product, array(0, 1, 4))) { + $_minimalPriceTax += $_weeeTaxAmount; + $_minimalPriceInclTax += $_weeeTaxAmount; + } + if ($_weeeTaxAmount && Mage::helper('weee')->typeOfDisplay($_product, 2)) { + $_minimalPriceInclTax += $_weeeTaxAmount; + } + + if (Mage::helper('weee')->typeOfDisplay($_product, array(1,2,4))) { + $_weeeTaxAttributes = Mage::helper('weee')->getProductWeeeAttributesForDisplay($_product); + } +} +?> + +
    + getPriceView()): ?> +

    + __('As low as') ?>: + helper('tax')->displayBothPrices()): ?> + + __('Excl. Tax:') ?> + currency($_minimalPriceTax) ?> + + getPriceType() == 1 && Mage::helper('weee')->typeOfDisplay($_product, array(2, 1, 4))): ?> + ( + + typeOfDisplay($_product, array(2, 4))): ?> + getAmount()+$_weeeTaxAttribute->getTaxAmount(); ?> + + getAmount(); ?> + + + + getName(); ?>: currency($amount, true, true); ?> + + + ) + + + __('Incl. Tax:') ?> + currency($_minimalPriceInclTax) ?> + + + currency($_minimalPriceTax) ?> + getPriceType() == 1 && Mage::helper('weee')->typeOfDisplay($_product, array(2, 1, 4))): ?> + ( + + typeOfDisplay($_product, array(2, 4))): ?> + getAmount()+$_weeeTaxAttribute->getTaxAmount(); ?> + + getAmount(); ?> + + + + getName(); ?>: currency($amount, true, true); ?> + + + ) + + typeOfDisplay($_product, 2) && $_weeeTaxAmount): ?> + currency($_minimalPriceInclTax) ?> + + +

    + + $_maximalPrice): ?> +

    + __('From') ?>: + helper('tax')->displayBothPrices()): ?> + + __('Excl. Tax:') ?> + currency($_minimalPriceTax) ?> + + getPriceType() == 1 && Mage::helper('weee')->typeOfDisplay($_product, array(2, 1, 4))): ?> + ( + + typeOfDisplay($_product, array(2, 4))): ?> + getAmount()+$_weeeTaxAttribute->getTaxAmount(); ?> + + getAmount(); ?> + + + + getName(); ?>: currency($amount, true, true); ?> + + + ) + + + __('Incl. Tax:') ?> + currency($_minimalPriceInclTax) ?> + + + currency($_minimalPriceTax) ?> + getPriceType() == 1 && Mage::helper('weee')->typeOfDisplay($_product, array(2, 1, 4))): ?> + ( + + typeOfDisplay($_product, array(2, 4))): ?> + getAmount()+$_weeeTaxAttribute->getTaxAmount(); ?> + + getAmount(); ?> + + + + getName(); ?>: currency($amount, true, true); ?> + + + ) + + typeOfDisplay($_product, 2) && $_weeeTaxAmount): ?> + currency($_minimalPriceInclTax) ?> + + +

    + getPrice($_product, $_maximalPrice); ?> + getPrice($_product, $_maximalPrice, true); ?> + getPriceType() == 1) { + if ($_weeeTaxAmount && Mage::helper('weee')->typeOfDisplay($_product, array(0, 1, 4))) { + $_maximalPriceTax += $_weeeTaxAmount; + $_maximalPriceInclTax += $_weeeTaxAmount; + } + if ($_weeeTaxAmount && Mage::helper('weee')->typeOfDisplay($_product, 2)) { + $_maximalPriceInclTax += $_weeeTaxAmount; + } + } + ?> +

    + __('To') ?>: + helper('tax')->displayBothPrices()): ?> + + __('Excl. Tax:') ?> + currency($_maximalPriceTax) ?> + + getPriceType() == 1 && Mage::helper('weee')->typeOfDisplay($_product, array(2, 1, 4))): ?> + ( + + typeOfDisplay($_product, array(2, 4))): ?> + getAmount()+$_weeeTaxAttribute->getTaxAmount(); ?> + + getAmount(); ?> + + + + getName(); ?>: currency($amount, true, true); ?> + + + ) + + + __('Incl. Tax') ?> + currency($_maximalPriceInclTax) ?> + + + currency($_maximalPriceTax) ?> + getPriceType() == 1 && Mage::helper('weee')->typeOfDisplay($_product, array(2, 1, 4))): ?> + ( + + typeOfDisplay($_product, array(2, 4))): ?> + getAmount()+$_weeeTaxAttribute->getTaxAmount(); ?> + + getAmount(); ?> + + + + getName(); ?>: currency($amount, true, true); ?> + + + ) + + typeOfDisplay($_product, 2) && $_weeeTaxAmount): ?> + currency($_maximalPriceInclTax) ?> + + +

    + + helper('tax')->displayBothPrices()): ?> + + __('Excl. Tax:') ?> + currency($_minimalPriceTax) ?> + + getPriceType() == 1 && Mage::helper('weee')->typeOfDisplay($_product, array(2, 1, 4))): ?> + ( + + typeOfDisplay($_product, array(2, 4))): ?> + getAmount()+$_weeeTaxAttribute->getTaxAmount(); ?> + + getAmount(); ?> + + + + getName(); ?>: currency($amount, true, true); ?> + + + ) + + + __('Incl. Tax:') ?> + currency($_minimalPriceInclTax) ?> + + + currency($_minimalPriceTax) ?> + getPriceType() == 1 && Mage::helper('weee')->typeOfDisplay($_product, array(2, 1, 4))): ?> + ( + + typeOfDisplay($_product, array(2, 4))): ?> + getAmount()+$_weeeTaxAttribute->getTaxAmount(); ?> + + getAmount(); ?> + + + + getName(); ?>: currency($amount, true, true); ?> + + + ) + + typeOfDisplay($_product, 2) && $_weeeTaxAmount): ?> + currency($_minimalPriceInclTax) ?> + + + + +
    diff --git a/app/design/frontend/base/default/template/bundle/catalog/product/view/price.phtml b/app/design/frontend/base/default/template/bundle/catalog/product/view/price.phtml new file mode 100644 index 0000000000..43277d4f6b --- /dev/null +++ b/app/design/frontend/base/default/template/bundle/catalog/product/view/price.phtml @@ -0,0 +1,93 @@ + +getProduct() ?> +getPrice($_product, $_product->getFinalPrice()); ?> +getPrice($_product, $_product->getFinalPrice(), true); ?> + +getPriceType() == 1) { + $_weeeTaxAmount = Mage::helper('weee')->getAmount($_product); + if (Mage::helper('weee')->typeOfDisplay($_product, array(1,2,4))) { + $_weeeTaxAttributes = Mage::helper('weee')->getProductWeeeAttributesForDisplay($_product); + } +} +?> + +
    +

    + helper('bundle')->__('Price as configured') ?>: + helper('tax')->displayBothPrices()): ?> + + + __('Excl. Tax:') ?> + currency($_finalPrice,true,false) ?> + + getPriceType() == 1 && Mage::helper('weee')->typeOfDisplay($_product, array(2, 1, 4))): ?> + ( + + typeOfDisplay($_product, array(2, 4))): ?> + getAmount()+$_weeeTaxAttribute->getTaxAmount(); ?> + + getAmount(); ?> + + + + getName(); ?>: currency($amount, true, true); ?> + + + ) + + + __('Incl. Tax:') ?> + currency($_finalPriceInclTax,true,false) ?> + + + + currency($_finalPrice,true,false) ?> + getPriceType() == 1 && Mage::helper('weee')->typeOfDisplay($_product, array(2, 1, 4))): ?> + ( + + typeOfDisplay($_product, array(2, 4))): ?> + getAmount()+$_weeeTaxAttribute->getTaxAmount(); ?> + + getAmount(); ?> + + + + getName(); ?>: currency($amount, true, true); ?> + + + ) + + +

    +
    +isSaleable()): ?> + + diff --git a/app/design/frontend/base/default/template/bundle/catalog/product/view/tierprices.phtml b/app/design/frontend/base/default/template/bundle/catalog/product/view/tierprices.phtml new file mode 100644 index 0000000000..ddee83926a --- /dev/null +++ b/app/design/frontend/base/default/template/bundle/catalog/product/view/tierprices.phtml @@ -0,0 +1,41 @@ + + +getProduct(); +$_tierPrices = $this->getTierPrices(); +?> + 0): ?> +
      + +
    • __('Buy %1$s with %2$s discount each', $_price['price_qty'], ''.($_price['price']*1).'%') ?>
    • + +
    + diff --git a/app/design/frontend/base/default/template/bundle/catalog/product/view/type/bundle.phtml b/app/design/frontend/base/default/template/bundle/catalog/product/view/type/bundle.phtml new file mode 100644 index 0000000000..dfddb66bd5 --- /dev/null +++ b/app/design/frontend/base/default/template/bundle/catalog/product/view/type/bundle.phtml @@ -0,0 +1,44 @@ + +getProduct() ?> + +isSaleable()): ?> + +

    helper('catalog')->__('Availability:') ?> helper('catalog')->__('In stock') ?>

    + +

    helper('catalog')->__('Availability:') ?> helper('catalog')->__('Out of stock') ?>

    + + +
    + getPriceHtml($_product) ?> +
    +getChildHtml('bundle_prices') ?> diff --git a/app/design/frontend/base/default/template/bundle/catalog/product/view/type/bundle/option/checkbox.phtml b/app/design/frontend/base/default/template/bundle/catalog/product/view/type/bundle/option/checkbox.phtml new file mode 100644 index 0000000000..bfb7580219 --- /dev/null +++ b/app/design/frontend/base/default/template/bundle/catalog/product/view/type/bundle/option/checkbox.phtml @@ -0,0 +1,48 @@ + +getOption() ?> +getSelections() ?> +
    +decoratedIsLast){?> class="last"> +getRequired()): ?> + getSelectionQtyTitlePrice($_selections[0]) ?> + + +
      + +
    • getIsDefault() && $_selection->isSaleable())?' checked="checked" ':'' ?>isSaleable()?' disabled="disabled" ':'' ?> value="getSelectionId() ?>" /> + + getRequired()): ?> + setValidationContainer('bundle-option-'.$_option->getId().'-'.$_selection->getSelectionId(), 'bundle-option-'.$_option->getId().'-container') ?> + +
    • + +
    + + + diff --git a/app/design/frontend/base/default/template/bundle/catalog/product/view/type/bundle/option/multi.phtml b/app/design/frontend/base/default/template/bundle/catalog/product/view/type/bundle/option/multi.phtml new file mode 100644 index 0000000000..01a689fba4 --- /dev/null +++ b/app/design/frontend/base/default/template/bundle/catalog/product/view/type/bundle/option/multi.phtml @@ -0,0 +1,46 @@ + + +getOption() ?> +getSelections() ?> +
    +decoratedIsLast){?> class="last"> + getRequired()): ?> + getSelectionQtyTitlePrice($_selections[0]) ?> + + + + + diff --git a/app/design/frontend/base/default/template/bundle/catalog/product/view/type/bundle/option/radio.phtml b/app/design/frontend/base/default/template/bundle/catalog/product/view/type/bundle/option/radio.phtml new file mode 100644 index 0000000000..c938469b0c --- /dev/null +++ b/app/design/frontend/base/default/template/bundle/catalog/product/view/type/bundle/option/radio.phtml @@ -0,0 +1,72 @@ + + +getOption() ?> +getSelections() ?> +getDefaultSelection() ?> +getRequired()) ?> +
    + + getSelectionQty()*1 ?> + getSelectionCanChangeQty() ?> + + + + + + getSelectionQty()*1 ?> + getSelectionCanChangeQty() ?> + + + id="bundle-option-getId() ?>-qty-input" class="input-text qty" type="text" name="bundle_option_qty[getId() ?>]" value="" /> + + +
    +decoratedIsLast){?> class="last"> + getRequired()): ?> + getSelectionTitlePrice($_selections[0]) ?> + + +
      + getRequired()): ?> +
    • isSalable())?'':' checked="checked" ' ?> value="" /> + +
    • + + +
    • getIsDefault() && $_selection->isSaleable())?' checked="checked" ':'' ?>isSaleable()?' disabled="disabled" ':'' ?>value="getSelectionId() ?>" /> + + getRequired()): ?> + setValidationContainer('bundle-option-'.$_option->getId().'-'.$_selection->getSelectionId(), 'bundle-option-'.$_option->getId().'-container') ?> + +
    • + +
    + + + diff --git a/app/design/frontend/base/default/template/bundle/catalog/product/view/type/bundle/option/select.phtml b/app/design/frontend/base/default/template/bundle/catalog/product/view/type/bundle/option/select.phtml new file mode 100644 index 0000000000..e70905f2fb --- /dev/null +++ b/app/design/frontend/base/default/template/bundle/catalog/product/view/type/bundle/option/select.phtml @@ -0,0 +1,61 @@ + + +getOption() ?> +getSelections() ?> +getRequired()) ?> +
    + getDefaultSelection()): ?> + getSelectionQty()*1 ?> + getSelectionCanChangeQty() ?> + + + + + + getSelectionQty()*1 ?> + getSelectionCanChangeQty() ?> + + + id="bundle-option-getId() ?>-qty-input" class="input-text qty" type="text" name="bundle_option_qty[getId() ?>]" value="" /> + + +
    +decoratedIsLast){?> class="last"> + + getSelectionTitlePrice($_selections[0]) ?> + + + + + diff --git a/app/design/frontend/base/default/template/bundle/catalog/product/view/type/bundle/options.phtml b/app/design/frontend/base/default/template/bundle/catalog/product/view/type/bundle/options.phtml new file mode 100644 index 0000000000..6756fce75a --- /dev/null +++ b/app/design/frontend/base/default/template/bundle/catalog/product/view/type/bundle/options.phtml @@ -0,0 +1,45 @@ + + +getProduct(); +$_options = Mage::helper('core')->decorateArray($this->getOptions()); +?> +isSaleable()):?> + +
    + + getSelections()): ?> + + + getOptionHtml($_option) ?> + +
    + +

    __('No options of this product are available.') ?>

    + + diff --git a/app/design/frontend/base/default/template/bundle/email/order/items/creditmemo/default.phtml b/app/design/frontend/base/default/template/bundle/email/order/items/creditmemo/default.phtml new file mode 100644 index 0000000000..e2b04da210 --- /dev/null +++ b/app/design/frontend/base/default/template/bundle/email/order/items/creditmemo/default.phtml @@ -0,0 +1,168 @@ + +getItem() ?> +getItem()->getOrder(); ?> + +getChilds($parentItem) ?> + + + + + +getItemOptions() || $parentItem->getDescription() || $this->helper('giftmessage/message')->getIsMessagesAvailable('order_item', $parentItem) && $parentItem->getGiftMessageId()): ?> + + + + + +getOrderItem()->getParentItem()): ?> + getSelectionAttributes($_item) ?> + + + +   +   +   + + + + + + getOrderItem()->getParentItem()): ?> + htmlEscape($_item->getName()) ?> + + getValueHtml($_item)?> + + getSku() ?> + + canShowPriceInfo($_item)): ?> + getQty()*1 ?> + +   + + + + canShowPriceInfo($_item)): ?> + helper('tax')->displaySalesPriceExclTax($_order->getStore()) || $this->helper('tax')->displaySalesBothPrices($_order->getStore())): ?> + helper('tax')->displaySalesBothPrices($_order->getStore())): ?> + __('Excl. Tax'); ?>: + + typeOfDisplay($_item, array(0, 1, 4), 'email', $_order->getStore())): ?> + formatPrice($_item->getRowTotal()+$_item->getWeeeTaxAppliedRowAmount()+$_item->getWeeeTaxRowDisposition()); ?> + + formatPrice($_item->getRowTotal()) ?> + + + + getApplied($_item)): ?> +
    + typeOfDisplay($_item, 1, 'email', $_order->getStore())): ?> + + getApplied($_item) as $tax): ?> + : formatPrice($tax['row_amount'],true,true); ?>
    + +
    + typeOfDisplay($_item, 2, 'email', $_order->getStore())): ?> + getApplied($_item) as $tax): ?> + : formatPrice($tax['row_amount_incl_tax'],true,true); ?>
    + + typeOfDisplay($_item, 4, 'email', $_order->getStore())): ?> + + getApplied($_item) as $tax): ?> + : formatPrice($tax['row_amount_incl_tax'],true,true); ?>
    + +
    + + + typeOfDisplay($_item, 2, 'email', $_order->getStore())): ?> +
    + __('Total'); ?>:
    formatPrice($_item->getCalculationPrice()+$_item->getWeeeTaxAppliedRowAmount()+$_item->getWeeeTaxRowDisposition()); ?>
    + + + + + + helper('tax')->displaySalesPriceInclTax($_order->getStore()) || $this->helper('tax')->displaySalesBothPrices($_order->getStore())): ?> + helper('tax')->displaySalesBothPrices($_order->getStore())): ?> +
    __('Incl. Tax'); ?>: + + helper('checkout')->getSubtotalInclTax($_item); ?> + typeOfDisplay($_item, array(0, 1, 4), 'email', $_order->getStore())): ?> + formatPrice($_incl+$_item->getWeeeTaxAppliedRowAmount()); ?> + + formatPrice($_incl-$_item->getWeeeTaxRowDisposition()) ?> + + getApplied($_item)): ?> +
    + typeOfDisplay($_item, 1, 'email', $_order->getStore())): ?> + + getApplied($_item) as $tax): ?> + : formatPrice($tax['row_amount'],true,true); ?>
    + +
    + typeOfDisplay($_item, 2, 'email', $_order->getStore())): ?> + getApplied($_item) as $tax): ?> + : formatPrice($tax['row_amount_incl_tax'],true,true); ?>
    + + typeOfDisplay($_item, 4, 'email', $_order->getStore())): ?> + + getApplied($_item) as $tax): ?> + : formatPrice($tax['row_amount_incl_tax'],true,true); ?>
    + +
    + + + typeOfDisplay($_item, 2, 'email', $_order->getStore())): ?> + __('Total incl. tax'); ?>:
    formatPrice($_incl+$_item->getWeeeTaxAppliedRowAmount()); ?>
    + + + + +   + + + + + + + + + getItemOptions()): ?> +
    + getItemOptions() as $option): ?> +
    +
    + +
    + + getDescription() ?> + +   +   +   + + diff --git a/app/design/frontend/base/default/template/bundle/email/order/items/invoice/default.phtml b/app/design/frontend/base/default/template/bundle/email/order/items/invoice/default.phtml new file mode 100644 index 0000000000..3a6ede197d --- /dev/null +++ b/app/design/frontend/base/default/template/bundle/email/order/items/invoice/default.phtml @@ -0,0 +1,169 @@ + + +getItem() ?> +getChilds($parentItem) ?> + +getItem()->getOrder(); ?> + + + + + +getItemOptions() || $parentItem->getDescription() || $this->helper('giftmessage/message')->getIsMessagesAvailable('order_item', $parentItem) && $parentItem->getGiftMessageId()): ?> + + + + + +getOrderItem()->getParentItem()): ?> + getSelectionAttributes($_item) ?> + + + +   +   +   + + + + + + getOrderItem()->getParentItem()): ?> + htmlEscape($_item->getName()) ?> + + getValueHtml($_item)?> + + getSku() ?> + + canShowPriceInfo($_item)): ?> + getQty()*1 ?> + +   + + + + canShowPriceInfo($_item)): ?> + helper('tax')->displaySalesPriceExclTax($_order->getStore()) || $this->helper('tax')->displaySalesBothPrices($_order->getStore())): ?> + helper('tax')->displaySalesBothPrices($_order->getStore())): ?> + __('Excl. Tax'); ?>: + + typeOfDisplay($_item, array(0, 1, 4), 'email', $_order->getStore())): ?> + formatPrice($_item->getRowTotal()+$_item->getWeeeTaxAppliedRowAmount()+$_item->getWeeeTaxRowDisposition()); ?> + + formatPrice($_item->getRowTotal()) ?> + + + + getApplied($_item)): ?> +
    + typeOfDisplay($_item, 1, 'email', $_order->getStore())): ?> + + getApplied($_item) as $tax): ?> + : formatPrice($tax['row_amount'],true,true); ?>
    + +
    + typeOfDisplay($_item, 2, 'email', $_order->getStore())): ?> + getApplied($_item) as $tax): ?> + : formatPrice($tax['row_amount_incl_tax'],true,true); ?>
    + + typeOfDisplay($_item, 4, 'email', $_order->getStore())): ?> + + getApplied($_item) as $tax): ?> + : formatPrice($tax['row_amount_incl_tax'],true,true); ?>
    + +
    + + + typeOfDisplay($_item, 2, 'email', $_order->getStore())): ?> +
    + __('Total'); ?>:
    formatPrice($_item->getCalculationPrice()+$_item->getWeeeTaxAppliedRowAmount()+$_item->getWeeeTaxRowDisposition()); ?>
    + + + + + + helper('tax')->displaySalesPriceInclTax($_order->getStore()) || $this->helper('tax')->displaySalesBothPrices($_order->getStore())): ?> + helper('tax')->displaySalesBothPrices($_order->getStore())): ?> +
    __('Incl. Tax'); ?>: + + helper('checkout')->getSubtotalInclTax($_item); ?> + typeOfDisplay($_item, array(0, 1, 4), 'email', $_order->getStore())): ?> + formatPrice($_incl+$_item->getWeeeTaxAppliedRowAmount()); ?> + + formatPrice($_incl-$_item->getWeeeTaxRowDisposition()) ?> + + getApplied($_item)): ?> +
    + typeOfDisplay($_item, 1, 'email', $_order->getStore())): ?> + + getApplied($_item) as $tax): ?> + : formatPrice($tax['row_amount'],true,true); ?>
    + +
    + typeOfDisplay($_item, 2, 'email', $_order->getStore())): ?> + getApplied($_item) as $tax): ?> + : formatPrice($tax['row_amount_incl_tax'],true,true); ?>
    + + typeOfDisplay($_item, 4, 'email', $_order->getStore())): ?> + + getApplied($_item) as $tax): ?> + : formatPrice($tax['row_amount_incl_tax'],true,true); ?>
    + +
    + + + typeOfDisplay($_item, 2, 'email', $_order->getStore())): ?> + __('Total incl. tax'); ?>:
    formatPrice($_incl+$_item->getWeeeTaxAppliedRowAmount()); ?>
    + + + + +   + + + + + + + + + getItemOptions()): ?> +
    + getItemOptions() as $option): ?> +
    +
    + +
    + + getDescription() ?> + +   +   +   + + diff --git a/app/design/frontend/base/default/template/bundle/email/order/items/order/default.phtml b/app/design/frontend/base/default/template/bundle/email/order/items/order/default.phtml new file mode 100644 index 0000000000..68bc250ec5 --- /dev/null +++ b/app/design/frontend/base/default/template/bundle/email/order/items/order/default.phtml @@ -0,0 +1,174 @@ + +getItem() ?> +getOrder() ?> + +getItem() ?> +getChildrenItems()); ?> + +getItemOptions() || $_item->getDescription() || $this->helper('giftmessage/message')->getIsMessagesAvailable('order_item', $_item) && $_item->getGiftMessageId()): ?> + + + + + + + + + +getParentItem()): ?> + getSelectionAttributes($_item) ?> + + + +   +   +   + + + + + + getParentItem()): ?> + htmlEscape($_item->getName()) ?> + + getValueHtml($_item)?> + + getSku() ?> + + getParentItem()): ?> + getQtyOrdered()*1 ?> + +   + + + + getParentItem()): ?> + helper('tax')->displaySalesPriceExclTax($_order->getStore()) || $this->helper('tax')->displaySalesBothPrices($_order->getStore())): ?> + helper('tax')->displaySalesBothPrices($_order->getStore())): ?> + __('Excl. Tax'); ?>: + + typeOfDisplay($_item, array(0, 1, 4), 'email', $_order->getStore())): ?> + formatPrice($_item->getRowTotal()+$_item->getWeeeTaxAppliedRowAmount()+$_item->getWeeeTaxRowDisposition()); ?> + + formatPrice($_item->getRowTotal()) ?> + + + + getApplied($_item)): ?> +
    + typeOfDisplay($_item, 1, 'email', $_order->getStore())): ?> + + getApplied($_item) as $tax): ?> + : formatPrice($tax['row_amount'],true,true); ?>
    + +
    + typeOfDisplay($_item, 2, 'email', $_order->getStore())): ?> + getApplied($_item) as $tax): ?> + : formatPrice($tax['row_amount_incl_tax'],true,true); ?>
    + + typeOfDisplay($_item, 4, 'email', $_order->getStore())): ?> + + getApplied($_item) as $tax): ?> + : formatPrice($tax['row_amount_incl_tax'],true,true); ?>
    + +
    + + + typeOfDisplay($_item, 2, 'email', $_order->getStore())): ?> +
    + __('Total'); ?>:
    formatPrice($_item->getCalculationPrice()+$_item->getWeeeTaxAppliedRowAmount()+$_item->getWeeeTaxRowDisposition()); ?>
    + + + + + + helper('tax')->displaySalesPriceInclTax($_order->getStore()) || $this->helper('tax')->displaySalesBothPrices($_order->getStore())): ?> + helper('tax')->displaySalesBothPrices($_order->getStore())): ?> +
    __('Incl. Tax'); ?>: + + helper('checkout')->getSubtotalInclTax($_item); ?> + typeOfDisplay($_item, array(0, 1, 4), 'email', $_order->getStore())): ?> + formatPrice($_incl+$_item->getWeeeTaxAppliedRowAmount()); ?> + + formatPrice($_incl-$_item->getWeeeTaxRowDisposition()) ?> + + getApplied($_item)): ?> +
    + typeOfDisplay($_item, 1, 'email', $_order->getStore())): ?> + + getApplied($_item) as $tax): ?> + : formatPrice($tax['row_amount'],true,true); ?>
    + +
    + typeOfDisplay($_item, 2, 'email', $_order->getStore())): ?> + getApplied($_item) as $tax): ?> + : formatPrice($tax['row_amount_incl_tax'],true,true); ?>
    + + typeOfDisplay($_item, 4, 'email', $_order->getStore())): ?> + + getApplied($_item) as $tax): ?> + : formatPrice($tax['row_amount_incl_tax'],true,true); ?>
    + +
    + + + typeOfDisplay($_item, 2, 'email', $_order->getStore())): ?> + __('Total incl. tax'); ?>:
    formatPrice($_incl+$_item->getWeeeTaxAppliedRowAmount()); ?>
    + + + + +   + + + + + + + + + getItemOptions()): ?> +
    + getItemOptions() as $option): ?> +
    +
    + +
    + + getGiftMessageId() && $_giftMessage = $this->helper('giftmessage/message')->getGiftMessage($_item->getGiftMessageId())): ?> +
    __('Gift Message') ?> +
    __('From:'); ?> htmlEscape($_giftMessage->getSender()) ?> +
    __('To:'); ?> htmlEscape($_giftMessage->getRecipient()) ?> +
    __('Message:'); ?>
    htmlEscape($_giftMessage->getMessage()) ?> + + +   +   +   + + diff --git a/app/design/frontend/base/default/template/bundle/email/order/items/shipment/default.phtml b/app/design/frontend/base/default/template/bundle/email/order/items/shipment/default.phtml new file mode 100644 index 0000000000..4092264c35 --- /dev/null +++ b/app/design/frontend/base/default/template/bundle/email/order/items/shipment/default.phtml @@ -0,0 +1,92 @@ + +getItem() ?> + +getOrderItem()), $parentItem->getOrderItem()->getChildrenItems()) ?> +getChilds($parentItem) ?> + + + + + +getItemOptions() || $parentItem->getDescription() || $this->helper('giftmessage/message')->getIsMessagesAvailable('order_item', $parentItem) && $parentItem->getGiftMessageId()): ?> + + + + + +getParentItem()): ?> + getSelectionAttributes($_item) ?> + + + +   +   + + + + + + getParentItem()): ?> + htmlEscape($_item->getName()) ?> + + getValueHtml($_item) ?> + + getSku() ?> + + isShipmentSeparately() && $_item->getParentItem()) || (!$this->isShipmentSeparately() && !$_item->getParentItem())): ?> + getId()])): ?> + getId()]->getQty()*1 ?> + getIsVirtual()): ?> + __('N/A') ?> + + 0 + + +   + + + + + + + + + getItemOptions()): ?> +
    + getItemOptions() as $option): ?> +
    +
    + +
    + + getDescription() ?> + +   +   + + diff --git a/app/design/frontend/base/default/template/bundle/rss/catalog/product/price.phtml b/app/design/frontend/base/default/template/bundle/rss/catalog/product/price.phtml new file mode 100644 index 0000000000..f85e39002f --- /dev/null +++ b/app/design/frontend/base/default/template/bundle/rss/catalog/product/price.phtml @@ -0,0 +1,271 @@ + + + + +getProduct() ?> +getPriceModel()->getPrices($_product) ?> +getId() ?> + + + +getPrice($_product, $_minimalPrice); ?> +getPrice($_product, $_minimalPrice, true); ?> + +getPriceType() == 1) { + $_weeeTaxAmount = Mage::helper('weee')->getAmount($_product); + if ($_weeeTaxAmount && Mage::helper('weee')->typeOfDisplay($_product, array(0, 1, 4))) { + $_minimalPriceTax += $_weeeTaxAmount; + $_minimalPriceInclTax += $_weeeTaxAmount; + } + if ($_weeeTaxAmount && Mage::helper('weee')->typeOfDisplay($_product, 2)) { + $_minimalPriceInclTax += $_weeeTaxAmount; + } + + if (Mage::helper('weee')->typeOfDisplay($_product, array(1,2,4))) { + $_weeeTaxAttributes = Mage::helper('weee')->getProductWeeeAttributesForDisplay($_product); + } +} +?> + +
    + getPriceView()): ?> +

    + __('As low as') ?>: + helper('tax')->displayBothPrices()): ?> + + __('Excl. Tax:') ?> + currency($_minimalPriceTax) ?> + + getPriceType() == 1 && Mage::helper('weee')->typeOfDisplay($_product, array(2, 1, 4))): ?> + ( + + typeOfDisplay($_product, array(2, 4))): ?> + getAmount()+$_weeeTaxAttribute->getTaxAmount(); ?> + + getAmount(); ?> + + + + getName(); ?>: currency($amount, true, true); ?> + + + ) + + + __('Incl. Tax:') ?> + currency($_minimalPriceInclTax) ?> + + + currency($_minimalPriceTax) ?> + getPriceType() == 1 && Mage::helper('weee')->typeOfDisplay($_product, array(2, 1, 4))): ?> + ( + + typeOfDisplay($_product, array(2, 4))): ?> + getAmount()+$_weeeTaxAttribute->getTaxAmount(); ?> + + getAmount(); ?> + + + + getName(); ?>: currency($amount, true, true); ?> + + + ) + + typeOfDisplay($_product, 2) && $_weeeTaxAmount): ?> + currency($_minimalPriceInclTax) ?> + + +

    + + $_maximalPrice): ?> +

    + __('From') ?>: + helper('tax')->displayBothPrices()): ?> + + __('Excl. Tax:') ?> + currency($_minimalPriceTax) ?> + + getPriceType() == 1 && Mage::helper('weee')->typeOfDisplay($_product, array(2, 1, 4))): ?> + ( + + typeOfDisplay($_product, array(2, 4))): ?> + getAmount()+$_weeeTaxAttribute->getTaxAmount(); ?> + + getAmount(); ?> + + + + getName(); ?>: currency($amount, true, true); ?> + + + ) + + + __('Incl. Tax:') ?> + currency($_minimalPriceInclTax) ?> + + + currency($_minimalPriceTax) ?> + getPriceType() == 1 && Mage::helper('weee')->typeOfDisplay($_product, array(2, 1, 4))): ?> + ( + + typeOfDisplay($_product, array(2, 4))): ?> + getAmount()+$_weeeTaxAttribute->getTaxAmount(); ?> + + getAmount(); ?> + + + + getName(); ?>: currency($amount, true, true); ?> + + + ) + + typeOfDisplay($_product, 2) && $_weeeTaxAmount): ?> + currency($_minimalPriceInclTax) ?> + + +

    + getPrice($_product, $_maximalPrice); ?> + getPrice($_product, $_maximalPrice, true); ?> + getPriceType() == 1) { + if ($_weeeTaxAmount && Mage::helper('weee')->typeOfDisplay($_product, array(0, 1, 4))) { + $_maximalPriceTax += $_weeeTaxAmount; + $_maximalPriceInclTax += $_weeeTaxAmount; + } + if ($_weeeTaxAmount && Mage::helper('weee')->typeOfDisplay($_product, 2)) { + $_maximalPriceInclTax += $_weeeTaxAmount; + } + } + ?> +

    + __('To') ?>: + helper('tax')->displayBothPrices()): ?> + + __('Excl. Tax:') ?> + currency($_maximalPriceTax) ?> + + getPriceType() == 1 && Mage::helper('weee')->typeOfDisplay($_product, array(2, 1, 4))): ?> + ( + + typeOfDisplay($_product, array(2, 4))): ?> + getAmount()+$_weeeTaxAttribute->getTaxAmount(); ?> + + getAmount(); ?> + + + + getName(); ?>: currency($amount, true, true); ?> + + + ) + + + __('Incl. Tax') ?> + currency($_maximalPriceInclTax) ?> + + + currency($_maximalPriceTax) ?> + getPriceType() == 1 && Mage::helper('weee')->typeOfDisplay($_product, array(2, 1, 4))): ?> + ( + + typeOfDisplay($_product, array(2, 4))): ?> + getAmount()+$_weeeTaxAttribute->getTaxAmount(); ?> + + getAmount(); ?> + + + + getName(); ?>: currency($amount, true, true); ?> + + + ) + + typeOfDisplay($_product, 2) && $_weeeTaxAmount): ?> + currency($_maximalPriceInclTax) ?> + + +

    + + helper('tax')->displayBothPrices()): ?> + + __('Excl. Tax:') ?> + currency($_minimalPriceTax) ?> + + getPriceType() == 1 && Mage::helper('weee')->typeOfDisplay($_product, array(2, 1, 4))): ?> + ( + + typeOfDisplay($_product, array(2, 4))): ?> + getAmount()+$_weeeTaxAttribute->getTaxAmount(); ?> + + getAmount(); ?> + + + + getName(); ?>: currency($amount, true, true); ?> + + + ) + + + __('Incl. Tax:') ?> + currency($_minimalPriceInclTax) ?> + + + currency($_minimalPriceTax) ?> + getPriceType() == 1 && Mage::helper('weee')->typeOfDisplay($_product, array(2, 1, 4))): ?> + ( + + typeOfDisplay($_product, array(2, 4))): ?> + getAmount()+$_weeeTaxAttribute->getTaxAmount(); ?> + + getAmount(); ?> + + + + getName(); ?>: currency($amount, true, true); ?> + + + ) + + typeOfDisplay($_product, 2) && $_weeeTaxAmount): ?> + currency($_minimalPriceInclTax) ?> + + + + +
    diff --git a/app/design/frontend/base/default/template/bundle/sales/order/creditmemo/items/renderer.phtml b/app/design/frontend/base/default/template/bundle/sales/order/creditmemo/items/renderer.phtml new file mode 100644 index 0000000000..79bb650345 --- /dev/null +++ b/app/design/frontend/base/default/template/bundle/sales/order/creditmemo/items/renderer.phtml @@ -0,0 +1,328 @@ + +getItem() ?> + +getChilds($parentItem) ?> +getItem()->getOrderItem()->getOrder() ?> + + + + + + + +getItemOptions() || $parentItem->getDescription() || $this->helper('giftmessage/message')->getIsMessagesAvailable('order_item', $parentItem) && $parentItem->getGiftMessageId()): ?> + + + + + +getOrderItem()->getParentItem()): ?> + getSelectionAttributes($_item) ?> + + +
    +   +   +   +   +   +   + + + + + id="order-item-row-getId() ?>"> + getOrderItem()->getParentItem()): ?> +

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

    + + +
    getValueHtml($_item) ?>
    + + getSku() ?> + + canShowPriceInfo($_item)): ?> + helper('tax')->displaySalesBothPrices() || $this->helper('tax')->displaySalesPriceExclTax()): ?> + + helper('tax')->displaySalesBothPrices()): ?> + typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> + + + __('Excl. Tax'); ?>: + typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> + + + + typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> + + + + + + typeOfDisplay($this->getItem(), array(0, 1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> + getOrder()->formatPrice($this->getItem()->getPrice()+$this->getItem()->getWeeeTaxAppliedAmount()+$this->getItem()->getWeeeTaxDisposition()); ?> + + getOrder()->formatPrice($this->getItem()->getPrice()) ?> + + + + + + getApplied($this->getItem())): ?> + + + + typeOfDisplay($this->getItem(), 2, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> + + __('Total'); ?>:
    getOrder()->formatPrice($this->getItem()->getPrice()+$this->getItem()->getWeeeTaxAppliedAmount()+$this->getItem()->getWeeeTaxDisposition()); ?>
    +
    + + +
    +
    + + helper('tax')->displaySalesBothPrices() || $this->helper('tax')->displaySalesPriceInclTax()): ?> + + helper('tax')->displaySalesBothPrices()): ?> + typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> + + + __('Incl. Tax'); ?>: + typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> + + + + helper('checkout')->getPriceInclTax($this->getItem()); ?> + typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> + + + + + + typeOfDisplay($this->getItem(), array(0, 1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> + getOrder()->formatPrice($_incl+$this->getItem()->getWeeeTaxAppliedAmount()); ?> + + getOrder()->formatPrice($_incl-$this->getItem()->getWeeeTaxDisposition()) ?> + + + + + + getApplied($this->getItem())): ?> + + + + typeOfDisplay($this->getItem(), 2, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> + + __('Total incl. tax'); ?>:
    getOrder()->formatPrice($_incl+$this->getItem()->getWeeeTaxAppliedAmount()); ?>
    +
    + + +
    + + +   + + + + canShowPriceInfo($_item)): ?> + getQty()*1 ?> + +   + + + + canShowPriceInfo($_item)): ?> + helper('tax')->displaySalesBothPrices() || $this->helper('tax')->displaySalesPriceExclTax()): ?> + + helper('tax')->displaySalesBothPrices()): ?> + typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> + + + __('Excl. Tax'); ?>: + typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> + + + + typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> + + + + + + typeOfDisplay($this->getItem(), array(0, 1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> + getOrder()->formatPrice($this->getItem()->getRowTotal()+$this->getItem()->getWeeeTaxAppliedRowAmount()+$this->getItem()->getWeeeTaxRowDisposition()); ?> + + getOrder()->formatPrice($this->getItem()->getRowTotal()) ?> + + + + + + getApplied($this->getItem())): ?> + + + + typeOfDisplay($this->getItem(), 2, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> + + __('Total'); ?>:
    getOrder()->formatPrice($this->getItem()->getRowTotal()+$this->getItem()->getWeeeTaxAppliedRowAmount()+$this->getItem()->getWeeeTaxRowDisposition()); ?>
    +
    + + +
    +
    + + helper('tax')->displaySalesBothPrices() || $this->helper('tax')->displaySalesPriceInclTax()): ?> + + helper('tax')->displaySalesBothPrices()): ?> + typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> + + + __('Incl. Tax'); ?>: + typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> + + + getOrder()->formatPrice($this->helper('checkout')->getSubtotalInclTax($_item)); ?> + + + +   + + +   + + + + canShowPriceInfo($_item)): ?> + getOrder()->formatPrice(-$_item->getDiscountAmount()) ?> + +   + + + + canShowPriceInfo($_item)): ?> + getOrder()->formatPrice($_item->getRowTotal()-$_item->getDiscountAmount()+$_item->getTaxAmount()+$_item->getWeeeTaxAppliedRowAmount()) ?> + +   + + + + + + + + + getItemOptions()): ?> +
    + +
    htmlEscape($_option['label']) ?>
    + getPrintStatus()): ?> + getFormatedOptionValue($_option) ?> + class="truncated"> + + +
    +
    +
    htmlEscape($_option['label']) ?>
    +
    +
    +
    + + + +
    htmlEscape( (isset($_option['print_value']) ? $_option['print_value'] : $_option['value']) ) ?>
    + + +
    + + getDescription() ?> + helper('giftmessage/message')->getIsMessagesAvailable('order_item', $parentItem) && $parentItem->getGiftMessageId()): ?> + __('Gift Message') ?> + + +   +   +   +   +   +   + + diff --git a/app/design/frontend/base/default/template/bundle/sales/order/invoice/items/renderer.phtml b/app/design/frontend/base/default/template/bundle/sales/order/invoice/items/renderer.phtml new file mode 100644 index 0000000000..0bd44d0789 --- /dev/null +++ b/app/design/frontend/base/default/template/bundle/sales/order/invoice/items/renderer.phtml @@ -0,0 +1,352 @@ + +getItem() ?> +getItem()->getOrderItem()->getOrder() ?> + +getChilds($parentItem) ?> + + + + + + + +getItemOptions() || $parentItem->getDescription() || $this->helper('giftmessage/message')->getIsMessagesAvailable('order_item', $parentItem) && $parentItem->getGiftMessageId()): ?> + + + + + +getOrderItem()->getParentItem()): ?> + getSelectionAttributes($_item) ?> + + +
    +   +   +   +   + + + + + id="order-item-row-getId() ?>"> + getOrderItem()->getParentItem()): ?> +

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

    + +
    getValueHtml($_item) ?>
    + + getSku() ?> + + canShowPriceInfo($_item)): ?> + helper('tax')->displaySalesBothPrices() || $this->helper('tax')->displaySalesPriceExclTax()): ?> + + helper('tax')->displaySalesBothPrices()): ?> + typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> + + + __('Excl. Tax'); ?>: + typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> + + + + typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> + + + + + + typeOfDisplay($this->getItem(), array(0, 1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> + getOrder()->formatPrice($this->getItem()->getPrice()+$this->getItem()->getWeeeTaxAppliedAmount()+$this->getItem()->getWeeeTaxDisposition()); ?> + + getOrder()->formatPrice($this->getItem()->getPrice()) ?> + + + + + + getApplied($this->getItem())): ?> + + + + typeOfDisplay($this->getItem(), 2, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> + + __('Total'); ?>:
    getOrder()->formatPrice($this->getItem()->getPrice()+$this->getItem()->getWeeeTaxAppliedAmount()+$this->getItem()->getWeeeTaxDisposition()); ?>
    +
    + + +
    +
    + + helper('tax')->displaySalesBothPrices() || $this->helper('tax')->displaySalesPriceInclTax()): ?> + + helper('tax')->displaySalesBothPrices()): ?> + typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> + + + __('Incl. Tax'); ?>: + typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> + + + + helper('checkout')->getPriceInclTax($this->getItem()); ?> + typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> + + + + + + typeOfDisplay($this->getItem(), array(0, 1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> + getOrder()->formatPrice($_incl+$this->getItem()->getWeeeTaxAppliedAmount()); ?> + + getOrder()->formatPrice($_incl-$this->getItem()->getWeeeTaxDisposition()) ?> + + + + + + getApplied($this->getItem())): ?> + + + + typeOfDisplay($this->getItem(), 2, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> + + __('Total incl. tax'); ?>:
    getOrder()->formatPrice($_incl+$this->getItem()->getWeeeTaxAppliedAmount()); ?>
    +
    + + +
    + + +   + + + + canShowPriceInfo($_item)): ?> + getQty()*1 ?> + +   + + + + canShowPriceInfo($_item)): ?> + helper('tax')->displaySalesBothPrices() || $this->helper('tax')->displaySalesPriceExclTax()): ?> + + helper('tax')->displaySalesBothPrices()): ?> + typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> + + + __('Excl. Tax'); ?>: + typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> + + + + typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> + + + + + + typeOfDisplay($this->getItem(), array(0, 1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> + getOrder()->formatPrice($this->getItem()->getRowTotal()+$this->getItem()->getWeeeTaxAppliedRowAmount()+$this->getItem()->getWeeeTaxRowDisposition()); ?> + + getOrder()->formatPrice($this->getItem()->getRowTotal()) ?> + + + + + + getApplied($this->getItem())): ?> + + + + typeOfDisplay($this->getItem(), 2, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> + + __('Total'); ?>:
    getOrder()->formatPrice($this->getItem()->getRowTotal()+$this->getItem()->getWeeeTaxAppliedRowAmount()+$this->getItem()->getWeeeTaxRowDisposition()); ?>
    +
    + + +
    +
    + + helper('tax')->displaySalesBothPrices() || $this->helper('tax')->displaySalesPriceInclTax()): ?> + + helper('tax')->displaySalesBothPrices()): ?> + typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> + + + __('Incl. Tax'); ?>: + typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> + + + + helper('checkout')->getSubtotalInclTax($this->getItem()); ?> + typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> + + + + + typeOfDisplay($this->getItem(), array(0, 1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> + getOrder()->formatPrice($_incl+$this->getItem()->getWeeeTaxAppliedRowAmount()); ?> + + getOrder()->formatPrice($_incl-$this->getItem()->getWeeeTaxRowDisposition()) ?> + + + + + + getApplied($this->getItem())): ?> + + + + typeOfDisplay($this->getItem(), 2, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> + + __('Total incl. tax'); ?>:
    getOrder()->formatPrice($_incl+$this->getItem()->getWeeeTaxAppliedRowAmount()); ?>
    +
    + + + + + +
    + + +   + + + + + + + + + getItemOptions()): ?> +
    + +
    htmlEscape($_option['label']) ?>
    + getPrintStatus()): ?> + getFormatedOptionValue($_option) ?> + class="truncated"> + + +
    +
    +
    htmlEscape($_option['label']) ?>
    +
    +
    +
    + + + +
    htmlEscape( (isset($_option['print_value']) ? $_option['print_value'] : $_option['value']) ) ?>
    + + +
    + + getDescription() ?> + helper('giftmessage/message')->getIsMessagesAvailable('order_item', $parentItem) && $parentItem->getGiftMessageId()): ?> + __('Gift Message') ?> + + +   +   +   +   + + diff --git a/app/design/frontend/base/default/template/bundle/sales/order/items/renderer.phtml b/app/design/frontend/base/default/template/bundle/sales/order/items/renderer.phtml new file mode 100644 index 0000000000..1f7d11cd4f --- /dev/null +++ b/app/design/frontend/base/default/template/bundle/sales/order/items/renderer.phtml @@ -0,0 +1,375 @@ + +getItem() ?> +getChildrenItems()); ?> + + + + + + + +getItemOptions() || $parentItem->getDescription() || $this->helper('giftmessage/message')->getIsMessagesAvailable('order_item', $parentItem) && $parentItem->getGiftMessageId()): ?> + + + + + +getParentItem()): ?> + getSelectionAttributes($_item) ?> + + getLastRow()) echo 'class="last"'; ?>> +
    +   +   +   +   + + + + + id="order-item-row-getId() ?>"> + + getParentItem()): ?> +

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

    + +
    getValueHtml($_item)?>
    + + splitInjection($_item->getSku()) ?> + + getParentItem()): ?> + helper('tax')->displaySalesBothPrices() || $this->helper('tax')->displaySalesPriceExclTax()): ?> + + helper('tax')->displaySalesBothPrices()): ?> + typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> + + + __('Excl. Tax'); ?>: + typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> + + + + typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> + + + + + + typeOfDisplay($this->getItem(), array(0, 1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> + getOrder()->formatPrice($this->getItem()->getPrice()+$this->getItem()->getWeeeTaxAppliedAmount()+$this->getItem()->getWeeeTaxDisposition()); ?> + + getOrder()->formatPrice($this->getItem()->getPrice()) ?> + + + + + + getApplied($this->getItem())): ?> + + + + typeOfDisplay($this->getItem(), 2, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> + + __('Total'); ?>:
    getOrder()->formatPrice($this->getItem()->getPrice()+$this->getItem()->getWeeeTaxAppliedAmount()+$this->getItem()->getWeeeTaxDisposition()); ?>
    +
    + + +
    +
    + + helper('tax')->displaySalesBothPrices() || $this->helper('tax')->displaySalesPriceInclTax()): ?> + + helper('tax')->displaySalesBothPrices()): ?> + typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> + + + __('Incl. Tax'); ?>: + typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> + + + + helper('checkout')->getPriceInclTax($this->getItem()); ?> + typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> + + + + + + typeOfDisplay($this->getItem(), array(0, 1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> + getOrder()->formatPrice($_incl+$this->getItem()->getWeeeTaxAppliedAmount()); ?> + + getOrder()->formatPrice($_incl-$this->getItem()->getWeeeTaxDisposition()) ?> + + + + + + getApplied($this->getItem())): ?> + + + + typeOfDisplay($this->getItem(), 2, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> + + __('Total incl. tax'); ?>:
    getOrder()->formatPrice($_incl+$this->getItem()->getWeeeTaxAppliedAmount()); ?>
    +
    + + +
    + + +   + + + + getParentItem() && $this->isChildCalculated()) || + (!$_item->getParentItem() && !$this->isChildCalculated())): ?> + + getQtyOrdered() > 0): ?> + __('Ordered'); ?>: getQtyOrdered()*1 ?>
    + + getQtyShipped() > 0 && !$this->isShipmentSeparately()): ?> + __('Shipped'); ?>: getQtyShipped()*1 ?>
    + + getQtyCanceled() > 0): ?> + __('Canceled'); ?>: getQtyCanceled()*1 ?>
    + + getQtyRefunded() > 0): ?> + __('Refunded'); ?>: getQtyRefunded()*1 ?> + +
    + getQtyShipped() > 0 && $_item->getParentItem() && $this->isShipmentSeparately()): ?> + __('Shipped'); ?>: getQtyShipped()*1 ?> + +   + + + + getParentItem()): ?> + helper('tax')->displaySalesBothPrices() || $this->helper('tax')->displaySalesPriceExclTax()): ?> + + helper('tax')->displaySalesBothPrices()): ?> + typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> + + + __('Excl. Tax'); ?>: + typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> + + + + typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> + + + + + + typeOfDisplay($this->getItem(), array(0, 1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> + getOrder()->formatPrice($this->getItem()->getRowTotal()+$this->getItem()->getWeeeTaxAppliedRowAmount()+$this->getItem()->getWeeeTaxRowDisposition()); ?> + + getOrder()->formatPrice($this->getItem()->getRowTotal()) ?> + + + + + + getApplied($this->getItem())): ?> + + + + typeOfDisplay($this->getItem(), 2, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> + + __('Total'); ?>:
    getOrder()->formatPrice($this->getItem()->getRowTotal()+$this->getItem()->getWeeeTaxAppliedRowAmount()+$this->getItem()->getWeeeTaxRowDisposition()); ?>
    +
    + + +
    +
    + + helper('tax')->displaySalesBothPrices() || $this->helper('tax')->displaySalesPriceInclTax()): ?> + + helper('tax')->displaySalesBothPrices()): ?> + typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> + + + __('Incl. Tax'); ?>: + typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> + + + + helper('checkout')->getSubtotalInclTax($this->getItem()); ?> + typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> + + + + + typeOfDisplay($this->getItem(), array(0, 1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> + getOrder()->formatPrice($_incl+$this->getItem()->getWeeeTaxAppliedRowAmount()); ?> + + getOrder()->formatPrice($_incl-$this->getItem()->getWeeeTaxRowDisposition()) ?> + + + + + + getApplied($this->getItem())): ?> + + + + typeOfDisplay($this->getItem(), 2, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> + + __('Total incl. tax'); ?>:
    getOrder()->formatPrice($_incl+$this->getItem()->getWeeeTaxAppliedRowAmount()); ?>
    +
    + + + + + +
    + + +   + + + + + + + + + + getItemOptions()): ?> +
    + +
    htmlEscape($_option['label']) ?>
    + getPrintStatus()): ?> + getFormatedOptionValue($_option) ?> + class="truncated"> + + +
    +
    +
    htmlEscape($_option['label']) ?>
    +
    +
    +
    + + + +
    htmlEscape( (isset($_option['print_value']) ? $_option['print_value'] : $_option['value']) ) ?>
    + + +
    + + getDescription() ?> + helper('giftmessage/message')->getIsMessagesAvailable('order_item', $parentItem) && $parentItem->getGiftMessageId()): ?> + __('Gift Message') ?> + + +   +   +   +   + + diff --git a/app/design/frontend/base/default/template/bundle/sales/order/shipment/items/renderer.phtml b/app/design/frontend/base/default/template/bundle/sales/order/shipment/items/renderer.phtml new file mode 100644 index 0000000000..0bfe6cf39a --- /dev/null +++ b/app/design/frontend/base/default/template/bundle/sales/order/shipment/items/renderer.phtml @@ -0,0 +1,111 @@ + +getItem() ?> +getOrderItem()), $parentItem->getOrderItem()->getChildrenItems()) ?> +getChilds($parentItem) ?> + + + + + + + +getItemOptions() || $parentItem->getDescription() || $this->helper('giftmessage/message')->getIsMessagesAvailable('order_item', $parentItem) && $parentItem->getGiftMessageId()): ?> + + + + + +getParentItem()): ?> + getSelectionAttributes($_item) ?> + + +
    +   +   + + + + + id="order-item-row-getId() ?>"> + getParentItem()): ?> +

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

    + +
    getValueHtml($_item) ?>
    + + getSku() ?> + + isShipmentSeparately() && $_item->getParentItem()) || (!$this->isShipmentSeparately() && !$_item->getParentItem())): ?> + getId()])): ?> + getId()]->getQty()*1 ?> + getIsVirtual()): ?> + __('N/A') ?> + + 0 + + +   + + + + + + + + + getItemOptions()): ?> +
    + +
    htmlEscape($_option['label']) ?>
    + getPrintStatus()): ?> + getFormatedOptionValue($_option) ?> + class="truncated"> + + +
    +
    +
    htmlEscape($_option['label']) ?>
    +
    +
    +
    + + + +
    htmlEscape( (isset($_option['print_value']) ? $_option['print_value'] : $_option['value']) ) ?>
    + + +
    + + getDescription() ?> + helper('giftmessage/message')->getIsMessagesAvailable('order_item', $parentItem) && $parentItem->getGiftMessageId()): ?> + __('Gift Message') ?> + + +   +   + + diff --git a/app/design/frontend/base/default/template/callouts/left_col.phtml b/app/design/frontend/base/default/template/callouts/left_col.phtml new file mode 100644 index 0000000000..239c98c000 --- /dev/null +++ b/app/design/frontend/base/default/template/callouts/left_col.phtml @@ -0,0 +1,39 @@ + +
    +
    + getLinkUrl(),0,4))==='http'): ?> + + getLinkUrl()): ?> + + + <?php echo $this->__($this->getImgAlt()) ?> + getLinkUrl()): ?> + + +
    +
    diff --git a/app/design/frontend/base/default/template/callouts/right_col.phtml b/app/design/frontend/base/default/template/callouts/right_col.phtml new file mode 100644 index 0000000000..43cff7eb0e --- /dev/null +++ b/app/design/frontend/base/default/template/callouts/right_col.phtml @@ -0,0 +1,31 @@ + +
    +
    + <?php echo $this->__('Keep your eyes open for our special Back to School items and save A LOT!') ?> +
    +
    diff --git a/app/design/frontend/base/default/template/catalog/category/page.phtml b/app/design/frontend/base/default/template/catalog/category/page.phtml new file mode 100644 index 0000000000..dbbd750dc5 --- /dev/null +++ b/app/design/frontend/base/default/template/catalog/category/page.phtml @@ -0,0 +1,36 @@ + +
    +

    getTitle() ?>

    +
    +
    + getContent() ?> +
    diff --git a/app/design/frontend/base/default/template/catalog/category/view.phtml b/app/design/frontend/base/default/template/catalog/category/view.phtml new file mode 100644 index 0000000000..70c0c7af45 --- /dev/null +++ b/app/design/frontend/base/default/template/catalog/category/view.phtml @@ -0,0 +1,71 @@ + + +helper('catalog/output'); + $_category = $this->getCurrentCategory(); + $_imgHtml = ''; + if ($_imgUrl = $_category->getImageUrl()) { + $_imgHtml = '

    '.$this->htmlEscape($_category->getName()).'

    '; + $_imgHtml = $_helper->categoryAttribute($_category, $_imgHtml, 'image'); + } +?> +
    + IsRssCatalogEnable() && $this->IsTopCategory()): ?> + __('Subscribe to RSS Feed') ?> + +

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

    +
    + +getMessagesBlock()->getGroupedHtml() ?> + + + + + +getCurrentCategory()->getDescription()): ?> +
    + categoryAttribute($_category, $_description, 'description') ?> +
    + + +isContentMode()): ?> + getCmsBlockHtml() ?> + +isMixedMode()): ?> + getCmsBlockHtml() ?> + getProductListHtml() ?> + + + getProductListHtml() ?> + diff --git a/app/design/frontend/base/default/template/catalog/category/widget/link/link_block.phtml b/app/design/frontend/base/default/template/catalog/category/widget/link/link_block.phtml new file mode 100644 index 0000000000..9d1cc60110 --- /dev/null +++ b/app/design/frontend/base/default/template/catalog/category/widget/link/link_block.phtml @@ -0,0 +1,27 @@ + +getLinkAttributes() ?>>htmlEscape($this->getAnchorText()) ?> diff --git a/app/design/frontend/base/default/template/catalog/category/widget/link/link_inline.phtml b/app/design/frontend/base/default/template/catalog/category/widget/link/link_inline.phtml new file mode 100644 index 0000000000..615f7c365c --- /dev/null +++ b/app/design/frontend/base/default/template/catalog/category/widget/link/link_inline.phtml @@ -0,0 +1,27 @@ + +getLinkAttributes() ?>>htmlEscape($this->getAnchorText()) ?> diff --git a/app/design/frontend/base/default/template/catalog/layer/filter.phtml b/app/design/frontend/base/default/template/catalog/layer/filter.phtml new file mode 100644 index 0000000000..95516238d1 --- /dev/null +++ b/app/design/frontend/base/default/template/catalog/layer/filter.phtml @@ -0,0 +1,45 @@ + + + +
      +getItems() as $_item): ?> +
    1. + getCount() > 0): ?> + getLabel() ?> + getLabel() ?> + + (getCount() ?>) +
    2. + +
    diff --git a/app/design/frontend/base/default/template/catalog/layer/state.phtml b/app/design/frontend/base/default/template/catalog/layer/state.phtml new file mode 100644 index 0000000000..e93e87fb25 --- /dev/null +++ b/app/design/frontend/base/default/template/catalog/layer/state.phtml @@ -0,0 +1,46 @@ + + +getActiveFilters() ?> + +

    __('Currently Shopping by') ?>

    +
      + +
    1. + __('Remove This Item') ?> + __($_filter->getName()) ?>: getLabel() ?> +
    2. + +
    + + diff --git a/app/design/frontend/base/default/template/catalog/layer/view.phtml b/app/design/frontend/base/default/template/catalog/layer/view.phtml new file mode 100644 index 0000000000..e0da114044 --- /dev/null +++ b/app/design/frontend/base/default/template/catalog/layer/view.phtml @@ -0,0 +1,56 @@ + + +canShowBlock()): ?> +
    +
    + __('Shop by') ?> +
    +
    + getStateHtml() ?> + canShowOptions()): ?> +

    __('Shopping Options') ?>

    +
    + getFilters() ?> + + getItemsCount()): ?> +
    __($_filter->getName()) ?>
    +
    getHtml() ?>
    + + +
    + + +
    +
    + diff --git a/app/design/frontend/base/default/template/catalog/navigation/left.phtml b/app/design/frontend/base/default/template/catalog/navigation/left.phtml new file mode 100644 index 0000000000..cb97836601 --- /dev/null +++ b/app/design/frontend/base/default/template/catalog/navigation/left.phtml @@ -0,0 +1,59 @@ + + +getCurrentChildCategories() ?> +count(); ?> + +
    +
    + __('Browse By') ?> +
    +
    +
    +
    __('Category') ?>
    +
    +
      + + getIsActive()): ?> +
    1. + isCategoryActive($_category)): ?> class="current">htmlEscape($_category->getName()) ?> (getProductCount() ?>) +
    2. + + +
    +
    +
    + +
    +
    + diff --git a/app/design/frontend/base/default/template/catalog/navigation/top.phtml b/app/design/frontend/base/default/template/catalog/navigation/top.phtml new file mode 100644 index 0000000000..1cd0a5f668 --- /dev/null +++ b/app/design/frontend/base/default/template/catalog/navigation/top.phtml @@ -0,0 +1,42 @@ + + +getStoreCategories()) > 0): ?> + + diff --git a/app/design/frontend/base/default/template/catalog/product/compare/list.phtml b/app/design/frontend/base/default/template/catalog/product/compare/list.phtml new file mode 100644 index 0000000000..1fefa49ca9 --- /dev/null +++ b/app/design/frontend/base/default/template/catalog/product/compare/list.phtml @@ -0,0 +1,139 @@ + +
    +

    __('Compare Products') ?>

    + __('Print This Page') ?> +
    +getItems()->getSize() ?> + + + + getItems() as $_item): ?> + + + + + +2): ?> + + + + getItems() as $_item): ?> + + + + + + + + + + + + getItems() as $_item): ?> + + + + + + + + + getAttributes() as $_attribute): ?> + + + getItems() as $_item): ?> + + + + + + + + + + + + getItems() as $_item): ?> + + + + + + + +
     __('Remove This Item') ?>
      + <?php echo $this->htmlEscape($_item->getName()) ?> +

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

    + getReviewsSummaryHtml($_item, 'short') ?> + getPriceHtml($_item, true) ?> + isSaleable()): ?> +

    + +

    __('Out of stock') ?>

    + + helper('wishlist')->isAllow()) : ?> + + +
    getStoreLabel() ?> + getAttributeCode()) { + case "price": ?> + getPriceHtml($_item, true) ?> + + <?php echo $this->htmlEscape($_item->getName()) ?> + getProductAttributeValue($_item, $_attribute),0,10); + break; + default: ?> + getProductAttributeValue($_item, $_attribute)) ?> + +
      + getPriceHtml($_item) ?> + isSaleable()): ?> +

    + +

    __('Out of stock') ?>

    + + helper('wishlist')->isAllow()) : ?> + + +
    +
    + +
    + + + + diff --git a/app/design/frontend/base/default/template/catalog/product/compare/sidebar.phtml b/app/design/frontend/base/default/template/catalog/product/compare/sidebar.phtml new file mode 100644 index 0000000000..dd07fd3bcc --- /dev/null +++ b/app/design/frontend/base/default/template/catalog/product/compare/sidebar.phtml @@ -0,0 +1,56 @@ + +
    +
    + __('Compare Products') ?> + helper('catalog/product_compare')->getItemCount() > 0): ?> + __('(%d)', $this->helper('catalog/product_compare')->getItemCount()) ?> + + +
    +
    + helper('catalog/product_compare')->getItemCount() > 0): ?> +
      + helper('catalog/product_compare')->getItemCollection() as $_index=>$_item): ?> +
    1. + + __('Remove This Item') ?> +

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

      +
    2. + +
    + +
    + __('Clear All') ?> + +
    + +

    __('You have no items to compare.') ?>

    + +
    +
    diff --git a/app/design/frontend/base/default/template/catalog/product/gallery.phtml b/app/design/frontend/base/default/template/catalog/product/gallery.phtml new file mode 100644 index 0000000000..424a7fbc36 --- /dev/null +++ b/app/design/frontend/base/default/template/catalog/product/gallery.phtml @@ -0,0 +1,63 @@ + +getImageWidth() ?> +
    +

    __('Close Window') ?>

    + getPreviusImageUrl() || $this->getNextImageUrl()): ?> + + + htmlEscape($this->getCurrentImage()->getLabel())): ?> +

    + + width="" alt="htmlEscape($this->getCurrentImage()->getLabel()) ?>" title="htmlEscape($this->getCurrentImage()->getLabel()) ?>" id="product-gallery-image" class="image" /> + getPreviusImageUrl() || $this->getNextImageUrl()): ?> + + +

    __('Close Window') ?>

    +
    + diff --git a/app/design/frontend/base/default/template/catalog/product/list.phtml b/app/design/frontend/base/default/template/catalog/product/list.phtml new file mode 100644 index 0000000000..5b6f6c8ff9 --- /dev/null +++ b/app/design/frontend/base/default/template/catalog/product/list.phtml @@ -0,0 +1,128 @@ + + +getLoadedProductCollection() ?> +count()): ?> +

    __('There are no products matching the selection.') ?>

    + +
    +
    + getToolbarHtml() ?> +
    + + + getMode()!='grid'): ?> + +
      + +
    1. + + <?php echo $this->htmlEscape($this->getImageLabel($_product, 'small_image')) ?> + + +
      +
      +

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

      + getRatingSummary()): ?> + getReviewsSummaryHtml($_product) ?> + + getPriceHtml($_product, true) ?> + isSaleable()): ?> +

      + +

      __('Out of stock') ?>

      + +
      + getShortDescription()) ?> + __('Learn More') ?> +
      + +
      +
      +
    2. + +
    + + + + + + + count() ?> + getColumnCount(); ?> + + +
      + +
    1. + <?php echo $this->htmlEscape($this->getImageLabel($_product, 'small_image')) ?> +

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

      + getRatingSummary()): ?> + getReviewsSummaryHtml($_product, 'short') ?> + + getPriceHtml($_product, true) ?> +
      + isSaleable()): ?> + + +

      __('Out of stock') ?>

      + + +
      +
    2. + +
    + + + + + +
    + getToolbarHtml() ?> +
    +
    + diff --git a/app/design/frontend/base/default/template/catalog/product/list/related.phtml b/app/design/frontend/base/default/template/catalog/product/list/related.phtml new file mode 100644 index 0000000000..7c5f89c89e --- /dev/null +++ b/app/design/frontend/base/default/template/catalog/product/list/related.phtml @@ -0,0 +1,94 @@ + +getItems()->getSize()): ?> + + diff --git a/app/design/frontend/base/default/template/catalog/product/list/toolbar.phtml b/app/design/frontend/base/default/template/catalog/product/list/toolbar.phtml new file mode 100644 index 0000000000..9f943995b6 --- /dev/null +++ b/app/design/frontend/base/default/template/catalog/product/list/toolbar.phtml @@ -0,0 +1,94 @@ + + +getCollection()->getSize()): ?> +
    +

    + getLastPageNum()>1): ?> + __('Items %s to %s of %s total', $this->getFirstNum(), $this->getLastNum(), $this->getTotalNum()) ?> + + __('%s Item(s)', $this->getTotalNum()) ?> + +

    + +
    + + __('per page') ?> +
    + + getPagerHtml() ?> + +
    + +isExpanded() ): ?> +
    + isEnabledViewSwitcher() ): ?> +

    + getModes(); ?> + 1): ?> + + getModes() as $_code=>$_label): ?> + isModeActive($_code)): ?> +   + +   + + + +

    + + +
    + + + getCurrentDirection() == 'desc'): ?> + <?php echo $this->__('Set Ascending Direction') ?> + + <?php echo $this->__('Set Descending Direction') ?> + +
    +
    + + diff --git a/app/design/frontend/base/default/template/catalog/product/list/upsell.phtml b/app/design/frontend/base/default/template/catalog/product/list/upsell.phtml new file mode 100644 index 0000000000..4a7546fd9e --- /dev/null +++ b/app/design/frontend/base/default/template/catalog/product/list/upsell.phtml @@ -0,0 +1,52 @@ + +getItemCollection()->getItems())): ?> +
    +

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

    + + setColumnCount(5); // uncomment this line if you want to have another number of columns. also can be changed in layout ?> + resetItemsIterator() ?> + getRowCount();$_i++): ?> + + getColumnCount();$_j++): ?> + getIterableItem()): ?> + + + + + + + +
    + <?php echo $this->htmlEscape($_link->getName()) ?> +

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

    + getPriceHtml($_link, true, '-upsell') ?> + getReviewsSummaryHtml($_link) ?> +
     
    + +
    + diff --git a/app/design/frontend/base/default/template/catalog/product/new.phtml b/app/design/frontend/base/default/template/catalog/product/new.phtml new file mode 100644 index 0000000000..08eb66acc8 --- /dev/null +++ b/app/design/frontend/base/default/template/catalog/product/new.phtml @@ -0,0 +1,59 @@ + +getProductCollection()) && $_products->getSize()): ?> +

    __('New Products') ?>

    +getColumnCount(); ?> + getItems() as $_product): ?> + + + + + diff --git a/app/design/frontend/base/default/template/catalog/product/price.phtml b/app/design/frontend/base/default/template/catalog/product/price.phtml new file mode 100644 index 0000000000..123a860080 --- /dev/null +++ b/app/design/frontend/base/default/template/catalog/product/price.phtml @@ -0,0 +1,420 @@ + + + +helper('core'); + $_weeeHelper = $this->helper('weee'); + $_taxHelper = $this->helper('tax'); + /* @var $_coreHelper Mage_Core_Helper_Data */ + /* @var $_weeeHelper Mage_Weee_Helper_Data */ + /* @var $_taxHelper Mage_Tax_Helper_Data */ + + $_product = $this->getProduct(); + $_id = $_product->getId(); + $_weeeSeparator = ''; + $_simplePricesTax = ($_taxHelper->displayPriceIncludingTax() || $_taxHelper->displayBothPrices()); + $_minimalPriceValue = $_product->getMinimalPrice(); + $_minimalPrice = $_taxHelper->getPrice($_product, $_minimalPriceValue, $_simplePricesTax); +?> + +isGrouped()): ?> + getAmountForDisplay($_product); ?> + typeOfDisplay($_product, array(1,2,4))): ?> + getAmount($_product); ?> + getProductWeeeAttributesForDisplay($_product); ?> + + +
    + getPrice($_product, $_product->getPrice()) ?> + getPrice($_product, $_product->getPrice(), $_simplePricesTax) ?> + getPrice($_product, $_product->getFinalPrice()) ?> + getPrice($_product, $_product->getFinalPrice(), true) ?> + getPriceDisplayType(); ?> + + displayBothPrices()): ?> + typeOfDisplay($_product, 0)): // including ?> + + __('Excl. Tax:') ?> + + currency($_price+$_weeeTaxAmount,true,false) ?> + + + + __('Incl. Tax:') ?> + + currency($_finalPriceInclTax+$_weeeTaxAmount,true,false) ?> + + + typeOfDisplay($_product, 1)): // incl. + weee ?> + + __('Excl. Tax:') ?> + + currency($_price+$_weeeTaxAmount,true,false) ?> + + + + __('Incl. Tax:') ?> + + currency($_finalPriceInclTax+$_weeeTaxAmount,true,false) ?> + + ( + + + getName(); ?>: currency($_weeeTaxAttribute->getAmount(), true, true); ?> + + + ) + + typeOfDisplay($_product, 4)): // incl. + weee ?> + + __('Excl. Tax:') ?> + + currency($_price+$_weeeTaxAmount,true,false) ?> + + + + __('Incl. Tax:') ?> + + currency($_finalPriceInclTax+$_weeeTaxAmount,true,false) ?> + + ( + + + getName(); ?>: currency($_weeeTaxAttribute->getAmount()+$_weeeTaxAttribute->getTaxAmount(), true, true); ?> + + + ) + + typeOfDisplay($_product, 2)): // excl. + weee + final ?> + + __('Excl. Tax:') ?> + + currency($_price,true,false) ?> + + + + + + getName(); ?>: currency($_weeeTaxAttribute->getAmount(), true, true); ?> + + + + + __('Incl. Tax:') ?> + + currency($_finalPriceInclTax+$_weeeTaxAmount,true,false) ?> + + + + + __('Excl. Tax:') ?> + + currency($_price,true,false) ?> + + + + __('Incl. Tax:') ?> + + currency($_finalPriceInclTax,true,false) ?> + + + + + typeOfDisplay($_product, 0)): // including ?> + + currency($_price+$_weeeTaxAmount,true,true) ?> + + typeOfDisplay($_product, 1)): // incl. + weee ?> + + currency($_price+$_weeeTaxAmount,true,true) ?> + + ( + + + getName(); ?>: currency($_weeeTaxAttribute->getAmount(), true, true); ?> + + + ) + typeOfDisplay($_product, 4)): // incl. + weee ?> + + currency($_price+$_weeeTaxAmount,true,true) ?> + + ( + + + getName(); ?>: currency($_weeeTaxAttribute->getAmount()+$_weeeTaxAttribute->getTaxAmount(), true, true); ?> + + + ) + typeOfDisplay($_product, 2)): // excl. + weee + final ?> + currency($_price,true,true) ?>
    + + + + getName(); ?>: currency($_weeeTaxAttribute->getAmount(), true, true); ?> + + + + + currency($_price+$_weeeTaxAmount,true,true) ?> + + + + currency($_price,true,true) ?> + + + + + getOriginalAmount($_product); ?> + + typeOfDisplay($_product, 0)): // including ?> +

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

    + + displayBothPrices()): ?> +

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

    + +

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

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

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

    + +

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

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

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

    + +

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

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

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

    + +

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

    + +

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

    + + displayBothPrices()): ?> +

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

    + +

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

    + + + + + + getDisplayMinimalPrice() && $_minimalPriceValue && $_minimalPriceValue < $_product->getFinalPrice()): ?> + + + typeOfDisplay($_product, array(0, 1, 4))): ?> + + + + getUseLinkForAsLowAs()):?> + + + + + __('As low as:') ?> + + currency($_minimalPriceDisplayValue,true,false) ?> + + getUseLinkForAsLowAs()):?> + + + + + getDisplayMinimalPrice() && $_minimalPrice && $_minimalPrice < $_finalPrice): */ ?> +
    + +isGrouped()): */ ?> + getPrice($_product, $_minimalPriceValue, $includingTax = null); + $_inclTax = $_taxHelper->getPrice($_product, $_minimalPriceValue, $includingTax = true); + ?> + getDisplayMinimalPrice() && $_minimalPriceValue): ?> +
    +

    + __('Starting at:') ?> + displayBothPrices()): ?> + + __('Excl. Tax:') ?> + + currency($_exclTax, true, false) ?> + + + + __('Incl. Tax:') ?> + + currency($_inclTax, true, false) ?> + + + + displayPriceIncludingTax()) { + $_showPrice = $_exclTax; + } + ?> + + currency($_showPrice, true, false) ?> + + +

    +
    + getDisplayMinimalPrice() && $_minimalPrice): */ ?> +isGrouped()): */ ?> diff --git a/app/design/frontend/base/default/template/catalog/product/view.phtml b/app/design/frontend/base/default/template/catalog/product/view.phtml new file mode 100644 index 0000000000..26e8902d2c --- /dev/null +++ b/app/design/frontend/base/default/template/catalog/product/view.phtml @@ -0,0 +1,120 @@ + +helper('catalog/output'); + $_product = $this->getProduct(); +?> + +
    getMessagesBlock()->getGroupedHtml() ?>
    +
    +
    +
    getOptions()): ?> enctype="multipart/form-data"> +
    + + +
    + +
    +
    +

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

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

    __('Quick Overview') ?>

    +
    productAttribute($_product, nl2br($_product->getShortDescription()), 'short_description') ?>
    +
    + + + getChildHtml('other');?> + + isSaleable() && $this->hasOptions()):?> + getChildChildHtml('container1', '', true, true) ?> + + +
    + +
    + getChildHtml('media') ?> +
    + +
    + isSaleable() && $this->hasOptions()):?> + getChildChildHtml('container2', '', true, true) ?> + +
    + +
    + +
    + getChildHtml('description') ?> + getChildHtml('additional') ?> + getChildHtml('upsell_products') ?> + getChildHtml('product_additional_data') ?> +
    +
    diff --git a/app/design/frontend/base/default/template/catalog/product/view/additional.phtml b/app/design/frontend/base/default/template/catalog/product/view/additional.phtml new file mode 100644 index 0000000000..55f656a3fa --- /dev/null +++ b/app/design/frontend/base/default/template/catalog/product/view/additional.phtml @@ -0,0 +1,29 @@ + +getChildHtmlList() as $_html): ?> + + diff --git a/app/design/frontend/base/default/template/catalog/product/view/addto.phtml b/app/design/frontend/base/default/template/catalog/product/view/addto.phtml new file mode 100644 index 0000000000..f239665576 --- /dev/null +++ b/app/design/frontend/base/default/template/catalog/product/view/addto.phtml @@ -0,0 +1,36 @@ + + +getProduct() ?> + diff --git a/app/design/frontend/base/default/template/catalog/product/view/addtocart.phtml b/app/design/frontend/base/default/template/catalog/product/view/addtocart.phtml new file mode 100644 index 0000000000..fa8cc5cea8 --- /dev/null +++ b/app/design/frontend/base/default/template/catalog/product/view/addtocart.phtml @@ -0,0 +1,38 @@ + + +getProduct() ?> + +isSaleable()): ?> +
    + isGrouped()): ?> + + + + +
    + diff --git a/app/design/frontend/base/default/template/catalog/product/view/attributes.phtml b/app/design/frontend/base/default/template/catalog/product/view/attributes.phtml new file mode 100644 index 0000000000..214ab2361d --- /dev/null +++ b/app/design/frontend/base/default/template/catalog/product/view/attributes.phtml @@ -0,0 +1,54 @@ + +helper('catalog/output'); + $_product = $this->getProduct() +?> +getAdditionalData()): ?> +
    +

    __('Additional Information') ?>

    + + + + + + + + + + + +
    htmlEscape($this->__($_data['label'])) ?>productAttribute($_product, $_data['value'], $_data['code']) ?>
    + +
    + diff --git a/app/design/frontend/base/default/template/catalog/product/view/description.phtml b/app/design/frontend/base/default/template/catalog/product/view/description.phtml new file mode 100644 index 0000000000..c915c85b21 --- /dev/null +++ b/app/design/frontend/base/default/template/catalog/product/view/description.phtml @@ -0,0 +1,41 @@ + +getProduct()->getDescription(); ?> + +
    +

    __('Product Description') ?>

    +
    + helper('catalog/output')->productAttribute($this->getProduct(), nl2br($_description), 'description') ?> +
    +
    + diff --git a/app/design/frontend/base/default/template/catalog/product/view/media.phtml b/app/design/frontend/base/default/template/catalog/product/view/media.phtml new file mode 100644 index 0000000000..7797355403 --- /dev/null +++ b/app/design/frontend/base/default/template/catalog/product/view/media.phtml @@ -0,0 +1,78 @@ + +getProduct(); + $_helper = $this->helper('catalog/output'); +?> +getImage() != 'no_selection' && $_product->getImage()): ?> +

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

    +

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

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

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

    + +getGalleryImages()) > 0): ?> +
    +

    __('More Views') ?>

    +
      + getGalleryImages() as $_image): ?> +
    • + <?php echo $this->htmlEscape($_image->getLabel()) ?> +
    • + +
    +
    + diff --git a/app/design/frontend/base/default/template/catalog/product/view/options.phtml b/app/design/frontend/base/default/template/catalog/product/view/options.phtml new file mode 100644 index 0000000000..11d7763428 --- /dev/null +++ b/app/design/frontend/base/default/template/catalog/product/view/options.phtml @@ -0,0 +1,176 @@ + + +decorateArray($this->getOptions()) ?> + + +
    + + getOptionHtml($_option) ?> + +
    + diff --git a/app/design/frontend/base/default/template/catalog/product/view/options/js.phtml b/app/design/frontend/base/default/template/catalog/product/view/options/js.phtml new file mode 100644 index 0000000000..a1cb6ba61a --- /dev/null +++ b/app/design/frontend/base/default/template/catalog/product/view/options/js.phtml @@ -0,0 +1,90 @@ + + diff --git a/app/design/frontend/base/default/template/catalog/product/view/options/type/date.phtml b/app/design/frontend/base/default/template/catalog/product/view/options/type/date.phtml new file mode 100644 index 0000000000..8614dd9889 --- /dev/null +++ b/app/design/frontend/base/default/template/catalog/product/view/options/type/date.phtml @@ -0,0 +1,72 @@ + +getOption() ?> +getId() ?> +
    + getFormatedPrice() ?>
    +decoratedIsLast){?> class="last"> + +getType() == Mage_Catalog_Model_Product_Option::OPTION_TYPE_DATE_TIME + || $_option->getType() == Mage_Catalog_Model_Product_Option::OPTION_TYPE_DATE): ?> + + getDateHtml() ?> + + useCalendar()): ?> + + + + + +getType() == Mage_Catalog_Model_Product_Option::OPTION_TYPE_DATE_TIME + || $_option->getType() == Mage_Catalog_Model_Product_Option::OPTION_TYPE_TIME): ?> +   getTimeHtml() ?> + + +getIsRequire()): ?> + + + + diff --git a/app/design/frontend/base/default/template/catalog/product/view/options/type/default.phtml b/app/design/frontend/base/default/template/catalog/product/view/options/type/default.phtml new file mode 100644 index 0000000000..744f5c061c --- /dev/null +++ b/app/design/frontend/base/default/template/catalog/product/view/options/type/default.phtml @@ -0,0 +1,30 @@ + +getOption() ?> +
    + +
    diff --git a/app/design/frontend/base/default/template/catalog/product/view/options/type/file.phtml b/app/design/frontend/base/default/template/catalog/product/view/options/type/file.phtml new file mode 100644 index 0000000000..287727ea57 --- /dev/null +++ b/app/design/frontend/base/default/template/catalog/product/view/options/type/file.phtml @@ -0,0 +1,41 @@ + +getOption() ?> +
    + getFormatedPrice() ?>
    +decoratedIsLast){?> class="last"> + +getFileExtension()): ?> +

    __('Allowed file extensions to upload')?>: getFileExtension() ?>

    + +getImageSizeX() > 0): ?> +

    __('Maximum image width')?>: getImageSizeX() ?> __('px.')?>

    + +getImageSizeY() > 0): ?> +

    __('Maximum image height')?>: getImageSizeY() ?> __('px.')?>

    + + diff --git a/app/design/frontend/base/default/template/catalog/product/view/options/type/select.phtml b/app/design/frontend/base/default/template/catalog/product/view/options/type/select.phtml new file mode 100644 index 0000000000..696f777e4a --- /dev/null +++ b/app/design/frontend/base/default/template/catalog/product/view/options/type/select.phtml @@ -0,0 +1,37 @@ + + +getOption() ?> +
    +decoratedIsLast){?> class="last"> + getValuesHtml() ?> + getIsRequire()): ?> + getType() == Mage_Catalog_Model_Product_Option::OPTION_TYPE_RADIO || $_option->getType() == Mage_Catalog_Model_Product_Option::OPTION_TYPE_CHECKBOX): ?> + + + + diff --git a/app/design/frontend/base/default/template/catalog/product/view/options/type/text.phtml b/app/design/frontend/base/default/template/catalog/product/view/options/type/text.phtml new file mode 100644 index 0000000000..9cd33946b9 --- /dev/null +++ b/app/design/frontend/base/default/template/catalog/product/view/options/type/text.phtml @@ -0,0 +1,39 @@ + +getOption() ?> +
    + getFormatedPrice() ?>
    +decoratedIsLast){?> class="last"> +getType() == Mage_Catalog_Model_Product_Option::OPTION_TYPE_FIELD): ?> + +getType() == Mage_Catalog_Model_Product_Option::OPTION_TYPE_AREA): ?> + + +getMaxCharacters()): ?> +

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

    + + diff --git a/app/design/frontend/base/default/template/catalog/product/view/options/wrapper.phtml b/app/design/frontend/base/default/template/catalog/product/view/options/wrapper.phtml new file mode 100644 index 0000000000..5200297ce9 --- /dev/null +++ b/app/design/frontend/base/default/template/catalog/product/view/options/wrapper.phtml @@ -0,0 +1,33 @@ + +
    + getChildHtml('', true, true);?> + hasRequiredOptions()):?> +

    __('* Required Fields') ?>

    + +
    + diff --git a/app/design/frontend/base/default/template/catalog/product/view/options/wrapper/bottom.phtml b/app/design/frontend/base/default/template/catalog/product/view/options/wrapper/bottom.phtml new file mode 100644 index 0000000000..a550da4252 --- /dev/null +++ b/app/design/frontend/base/default/template/catalog/product/view/options/wrapper/bottom.phtml @@ -0,0 +1,29 @@ + +
    + getChildHtml('', true, true);?> +
    diff --git a/app/design/frontend/base/default/template/catalog/product/view/price.phtml b/app/design/frontend/base/default/template/catalog/product/view/price.phtml new file mode 100644 index 0000000000..51a8755ad8 --- /dev/null +++ b/app/design/frontend/base/default/template/catalog/product/view/price.phtml @@ -0,0 +1,34 @@ + +
    +

    __('Old Price:') ?> getPrice() ?>

    +

    getPrice() ?>

    +
    diff --git a/app/design/frontend/base/default/template/catalog/product/view/price_clone.phtml b/app/design/frontend/base/default/template/catalog/product/view/price_clone.phtml new file mode 100644 index 0000000000..120438b239 --- /dev/null +++ b/app/design/frontend/base/default/template/catalog/product/view/price_clone.phtml @@ -0,0 +1,28 @@ + +getProduct() ?> +getPriceHtml($_product, false, '_clone') ?> diff --git a/app/design/frontend/base/default/template/catalog/product/view/tierprices.phtml b/app/design/frontend/base/default/template/catalog/product/view/tierprices.phtml new file mode 100644 index 0000000000..b8dadef48b --- /dev/null +++ b/app/design/frontend/base/default/template/catalog/product/view/tierprices.phtml @@ -0,0 +1,181 @@ + + +getProduct(); +$_tierPrices = $this->getTierPrices(); +$_finalPriceInclTax = $this->helper('tax')->getPrice($_product, $_product->getFinalPrice(), true); + +$_weeeTaxAmount = Mage::helper('weee')->getAmountForDisplay($_product); +if (Mage::helper('weee')->typeOfDisplay($_product, array(1,2,4))) { + $_weeeTaxAttributes = Mage::helper('weee')->getProductWeeeAttributesForDisplay($_product); +} + +?> + 0): ?> +
      + getInGrouped()): ?> + getTierPrices($_product); ?> + + processTierPrices($_product, $_tierPrices); ?> + + + helper('tax')->displayBothPrices()): ?> + typeOfDisplay($_product, 0)): ?> +
    • __('Buy %1$s for %2$s (%3$s incl. tax) each', $_price['price_qty'], $_price['formated_price_incl_weee_only'], $_price['formated_price_incl_weee']) ?> + typeOfDisplay($_product, 1)): ?> +
    • __('Buy %1$s for %2$s', $_price['price_qty'], $_price['formated_price_incl_weee_only']); ?> + + ( + __('%1$s incl tax.', $_price['formated_price_incl_weee']); ?> + + + getName(); ?>: currency($_attribute->getAmount()); ?> + + ) + + __('each') ?> + typeOfDisplay($_product, 4)): ?> +
    • __('Buy %1$s for %2$s', $_price['price_qty'], $_price['formated_price_incl_weee_only']); ?> + + ( + __('%1$s incl tax.', $_price['formated_price_incl_weee']); ?> + + + getName(); ?>: currency($_attribute->getAmount()+$_attribute->getTaxAmount()); ?> + + ) + + __('each') ?> + typeOfDisplay($_product, 2)): ?> +
    • __('Buy %1$s for %2$s', $_price['price_qty'], $_price['formated_price']); ?> + + ( + + getName(); ?>: currency($_attribute->getAmount()); ?> + + __('Total incl. Tax: %1$s', $_price['formated_price_incl_weee']); ?> + ) + + __('each') ?> + +
    • __('Buy %1$s for %2$s (%3$s incl. tax) each', $_price['price_qty'], $_price['formated_price'], $_price['formated_price_incl_tax']) ?> + + + helper('tax')->displayPriceIncludingTax()): ?> + typeOfDisplay($_product, 0)): ?> +
    • __('Buy %1$s for %2$s each', $_price['price_qty'], $_price['formated_price_incl_weee']) ?> + typeOfDisplay($_product, 1)): ?> +
    • __('Buy %1$s for %2$s', $_price['price_qty'], $_price['formated_price_incl_weee']); ?> + + ( + + + getName(); ?>: currency($_attribute->getAmount()); ?> + + ) + + __('each') ?> + typeOfDisplay($_product, 4)): ?> +
    • __('Buy %1$s for %2$s', $_price['price_qty'], $_price['formated_price_incl_weee']); ?> + + ( + + + getName(); ?>: currency($_attribute->getAmount()+$_attribute->getTaxAmount()); ?> + + ) + + __('each') ?> + typeOfDisplay($_product, 2)): ?> +
    • __('Buy %1$s for %2$s', $_price['price_qty'], $_price['formated_price_incl_tax']); ?> + + ( + + getName(); ?>: currency($_attribute->getAmount()); ?> + + __('Total incl. Tax: %1$s', $_price['formated_price_incl_weee']); ?> + ) + + __('each') ?> + +
    • __('Buy %1$s for %2$s each', $_price['price_qty'], $_price['formated_price_incl_tax']) ?> + + + typeOfDisplay($_product, 0)): ?> +
    • __('Buy %1$s for %2$s each', $_price['price_qty'], $_price['formated_price_incl_weee_only']) ?> + typeOfDisplay($_product, 1)): ?> +
    • __('Buy %1$s for %2$s', $_price['price_qty'], $_price['formated_price_incl_weee_only']); ?> + + ( + + + getName(); ?>: currency($_attribute->getAmount()); ?> + + ) + + __('each') ?> + typeOfDisplay($_product, 4)): ?> +
    • __('Buy %1$s for %2$s', $_price['price_qty'], $_price['formated_price_incl_weee_only']); ?> + + ( + + + getName(); ?>: currency($_attribute->getAmount()+$_attribute->getTaxAmount()); ?> + + ) + + __('each') ?> + typeOfDisplay($_product, 2)): ?> +
    • __('Buy %1$s for %2$s', $_price['price_qty'], $_price['formated_price']); ?> + + ( + + getName(); ?>: currency($_attribute->getAmount()); ?> + + __('Total incl. Tax: %1$s', $_price['formated_price_incl_weee_only']); ?> + ) + + __('each') ?> + +
    • __('Buy %1$s for %2$s each', $_price['price_qty'], $_price['formated_price']) ?> + + + + getInGrouped()): ?> + getPrice() == $_product->getFinalPrice() && $_product->getPrice() > $_price['price']) + || ($_product->getPrice() != $_product->getFinalPrice() && $_product->getFinalPrice() > $_price['price'])): ?> + __('and') ?> __('save')?> % + + +
    • + +
    + diff --git a/app/design/frontend/base/default/template/catalog/product/view/type/configurable.phtml b/app/design/frontend/base/default/template/catalog/product/view/type/configurable.phtml new file mode 100644 index 0000000000..973187768f --- /dev/null +++ b/app/design/frontend/base/default/template/catalog/product/view/type/configurable.phtml @@ -0,0 +1,39 @@ + +getProduct() ?> +isSaleable()): ?> +

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

    + +

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

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

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

    + +

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

    + + + + + + + + + + isSaleable()): ?> + + + + + + + + helper('tax')->getPrice($_item, $_item->getFinalPrice(), true) ?> + + + + isSaleable()): ?> + + + + + + + + + + +
    __('Product Name') ?>__('Price') ?>__('Qty') ?>
    htmlEscape($_item->getName()) ?> + getPriceHtml($_item, true) ?> + getTierPriceHtml($_item) ?> + + isSaleable()) : ?> + + +

    __('Out of stock') ?>

    + +
    __('No options of this product are available.') ?>
    + diff --git a/app/design/frontend/base/default/template/catalog/product/view/type/options/configurable.phtml b/app/design/frontend/base/default/template/catalog/product/view/type/options/configurable.phtml new file mode 100644 index 0000000000..4468158ce4 --- /dev/null +++ b/app/design/frontend/base/default/template/catalog/product/view/type/options/configurable.phtml @@ -0,0 +1,46 @@ + + +getProduct(); +$_attributes = Mage::helper('core')->decorateArray($this->getAllowAttributes()); +?> +isSaleable() && count($_attributes)):?> +
    + +
    + decoratedIsLast){?> class="last"> + + + +
    + + diff --git a/app/design/frontend/base/default/template/catalog/product/view/type/simple.phtml b/app/design/frontend/base/default/template/catalog/product/view/type/simple.phtml new file mode 100644 index 0000000000..339adffffb --- /dev/null +++ b/app/design/frontend/base/default/template/catalog/product/view/type/simple.phtml @@ -0,0 +1,40 @@ + +getProduct() ?> + +isSaleable()): ?> +

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

    + +

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

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

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

    + +

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

    + +getPriceHtml($_product) ?> diff --git a/app/design/frontend/base/default/template/catalog/product/widget/link/link_block.phtml b/app/design/frontend/base/default/template/catalog/product/widget/link/link_block.phtml new file mode 100644 index 0000000000..caa06b088e --- /dev/null +++ b/app/design/frontend/base/default/template/catalog/product/widget/link/link_block.phtml @@ -0,0 +1,27 @@ + +getLinkAttributes() ?>>htmlEscape($this->getAnchorText()) ?> diff --git a/app/design/frontend/base/default/template/catalog/product/widget/link/link_inline.phtml b/app/design/frontend/base/default/template/catalog/product/widget/link/link_inline.phtml new file mode 100644 index 0000000000..93438e6161 --- /dev/null +++ b/app/design/frontend/base/default/template/catalog/product/widget/link/link_inline.phtml @@ -0,0 +1,27 @@ + +getLinkAttributes() ?>>htmlEscape($this->getAnchorText()) ?> diff --git a/app/design/frontend/base/default/template/catalog/product/widget/new/column/new_default_list.phtml b/app/design/frontend/base/default/template/catalog/product/widget/new/column/new_default_list.phtml new file mode 100644 index 0000000000..b6c93a46a7 --- /dev/null +++ b/app/design/frontend/base/default/template/catalog/product/widget/new/column/new_default_list.phtml @@ -0,0 +1,55 @@ + +getProductCollection()) && $_products->getSize()): ?> +
    +
    +
    + __('New Products') ?> +
    +
    + getNameInLayout(); ?> +
      + getItems() as $_product): ?> +
    1. + <?php echo $this->htmlEscape($_product->getName()) ?> +
      +

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

      + getPriceHtml($_product, true, '-widget-new-'.$suffix) ?> + isSaleable()): ?> + __('Add to Cart') ?> + +

      __('Out of stock') ?>

      + +
      +
    2. + +
    + +
    +
    +
    + diff --git a/app/design/frontend/base/default/template/catalog/product/widget/new/column/new_images_list.phtml b/app/design/frontend/base/default/template/catalog/product/widget/new/column/new_images_list.phtml new file mode 100644 index 0000000000..29b924198a --- /dev/null +++ b/app/design/frontend/base/default/template/catalog/product/widget/new/column/new_images_list.phtml @@ -0,0 +1,46 @@ + +getProductCollection()) && $_products->getSize()): ?> +
    +
    +
    + __('New Products') ?> +
    +
    + getNameInLayout(); ?> +
      + getItems() as $_product): ?> +
    1. + <?php echo $this->htmlEscape($_product->getName()) ?> +
    2. + +
    + +
    +
    +
    + diff --git a/app/design/frontend/base/default/template/catalog/product/widget/new/column/new_names_list.phtml b/app/design/frontend/base/default/template/catalog/product/widget/new/column/new_names_list.phtml new file mode 100644 index 0000000000..b9a4f2c605 --- /dev/null +++ b/app/design/frontend/base/default/template/catalog/product/widget/new/column/new_names_list.phtml @@ -0,0 +1,46 @@ + +getProductCollection()) && $_products->getSize()): ?> +
    +
    +
    + __('New Products') ?> +
    +
    + getNameInLayout(); ?> +
      + getItems() as $_product): ?> +
    1. +

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

      +
    2. + +
    + +
    +
    +
    + diff --git a/app/design/frontend/base/default/template/catalog/product/widget/new/content/new_grid.phtml b/app/design/frontend/base/default/template/catalog/product/widget/new/content/new_grid.phtml new file mode 100644 index 0000000000..7500852b2e --- /dev/null +++ b/app/design/frontend/base/default/template/catalog/product/widget/new/content/new_grid.phtml @@ -0,0 +1,65 @@ + +getProductCollection()) && $_products->getSize()): ?> +
    +
    +

    __('New Products') ?>

    +
    +
    + getColumnCount(); ?> + getItems() as $_product): ?> + + + + +
    +
    + diff --git a/app/design/frontend/base/default/template/catalog/product/widget/new/content/new_list.phtml b/app/design/frontend/base/default/template/catalog/product/widget/new/content/new_list.phtml new file mode 100644 index 0000000000..a29ff8354d --- /dev/null +++ b/app/design/frontend/base/default/template/catalog/product/widget/new/content/new_list.phtml @@ -0,0 +1,62 @@ + +getProductCollection()) && $_products->getSize()): ?> +
    +
    +

    __('New Products') ?>

    +
    +
    +
      + getItems() as $_product): ?> +
    1. + <?php echo $this->htmlEscape($_product->getName()) ?> +
      +
      +

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

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

      __('Out of stock') ?>

      + + +
      +
      +
    2. + +
    +
    +
    + diff --git a/app/design/frontend/base/default/template/catalog/rss/product/price.phtml b/app/design/frontend/base/default/template/catalog/rss/product/price.phtml new file mode 100644 index 0000000000..a35ac46822 --- /dev/null +++ b/app/design/frontend/base/default/template/catalog/rss/product/price.phtml @@ -0,0 +1,356 @@ + + + + +getProduct() ?> +getId() ?> +getCanShowPrice() !== false):?> + + + +helper('tax')->displayPriceIncludingTax() || $this->helper('tax')->displayBothPrices()); ?> + +getMinimalPrice() ?> +helper('tax')->getPrice($_product, $_minimalPriceValue, $simplePricesTax) ?> + +isGrouped()): ?> + getAmountForDisplay($_product); ?> + typeOfDisplay($_product, array(1,2,4))): ?> + getAmount($_product); ?> + getProductWeeeAttributesForDisplay($_product); ?> + + +
    + helper('tax')->getPrice($_product, $_product->getPrice()) ?> + helper('tax')->getPrice($_product, $_product->getPrice(), $simplePricesTax) ?> + helper('tax')->getPrice($_product, $_product->getFinalPrice()) ?> + helper('tax')->getPrice($_product, $_product->getFinalPrice(), true) ?> + getPriceDisplayType(); ?> + + helper('tax')->displayBothPrices()): ?> + typeOfDisplay($_product, 0)): // including ?> + + __('Excl. Tax:') ?> + currency($_price+$_weeeTaxAmount,true,false) ?> + + + __('Incl. Tax:') ?> + currency($_finalPriceInclTax+$_weeeTaxAmount,true,false) ?> + + typeOfDisplay($_product, 1)): // incl. + weee ?> + + __('Excl. Tax:') ?> + currency($_price+$_weeeTaxAmount,true,false) ?> + + + __('Incl. Tax:') ?> + currency($_finalPriceInclTax+$_weeeTaxAmount,true,false) ?> +
    + ( + + + getName(); ?>: currency($_weeeTaxAttribute->getAmount(), true, true); ?> + + + ) +
    + typeOfDisplay($_product, 4)): // incl. + weee ?> + + __('Excl. Tax:') ?> + currency($_price+$_weeeTaxAmount,true,false) ?> + + + __('Incl. Tax:') ?> + currency($_finalPriceInclTax+$_weeeTaxAmount,true,false) ?> +
    + ( + + + getName(); ?>: currency($_weeeTaxAttribute->getAmount()+$_weeeTaxAttribute->getTaxAmount(), true, true); ?> + + + ) +
    + typeOfDisplay($_product, 2)): // excl. + weee + final ?> + + __('Excl. Tax:') ?> + currency($_price,true,false) ?> + + + + + getName(); ?>: currency($_weeeTaxAttribute->getAmount(), true, true); ?> + + +
    + + + __('Incl. Tax:') ?> + currency($_finalPriceInclTax+$_weeeTaxAmount,true,false) ?> + + + + __('Excl. Tax:') ?> + currency($_price,true,false) ?> + + + __('Incl. Tax:') ?> + currency($_finalPriceInclTax,true,false) ?> + + + + typeOfDisplay($_product, 0)): // including ?> + currency($_price+$_weeeTaxAmount,true,true) ?> + typeOfDisplay($_product, 1)): // incl. + weee ?> + currency($_price+$_weeeTaxAmount,true,true) ?> +
    + ( + + + getName(); ?>: currency($_weeeTaxAttribute->getAmount(), true, true); ?> + + + ) + typeOfDisplay($_product, 4)): // incl. + weee ?> + currency($_price+$_weeeTaxAmount,true,true) ?> +
    + ( + + + getName(); ?>: currency($_weeeTaxAttribute->getAmount()+$_weeeTaxAttribute->getTaxAmount(), true, true); ?> + + + ) + typeOfDisplay($_product, 2)): // excl. + weee + final ?> + currency($_price,true,true) ?>
    + + + + getName(); ?>: currency($_weeeTaxAttribute->getAmount(), true, true); ?> + + +
    + + currency($_price+$_weeeTaxAmount,true,true) ?> + + currency($_price,true,true) ?> + + + + getOriginalAmount($_product); ?> + + typeOfDisplay($_product, 0)): // including ?> +

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

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

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

    + +

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

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

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

    + +

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

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

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

    + +

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

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

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

    + +

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

    + +

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

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

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

    + +

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

    + + + + + + getDisplayMinimalPrice() && $_minimalPriceValue && $_minimalPriceValue < $_product->getFinalPrice()): ?> + + + typeOfDisplay($_product, array(0, 1, 4))): ?> + + + + getUseLinkForAsLowAs()):?> + + + + + __('As low as:') ?> + currency($_minimalPriceDisplayValue,true,false) ?> + getUseLinkForAsLowAs()):?> + + + + + getDisplayMinimalPrice() && $_minimalPrice && $_minimalPrice < $_finalPrice): */ ?> +
    + +isGrouped()): */ ?> + helper('tax')->getPrice($_product, $_minimalPriceValue, $includingTax = null); + $_inclTax = $this->helper('tax')->getPrice($_product, $_minimalPriceValue, $includingTax = true); + ?> + getDisplayMinimalPrice() && $_minimalPriceValue): ?> +
    +

    + __('Starting at:') ?> + helper('tax')->displayBothPrices()): ?> + + __('Excl. Tax:') ?> + currency($_exclTax, true, false) ?> + + + __('Incl. Tax:') ?> + currency($_inclTax, true, false) ?> + + + helper('tax')->displayPriceIncludingTax()) { + $_showPrice = $_exclTax; + } + ?> + currency($_showPrice, true, false) ?> + +

    +
    + getDisplayMinimalPrice() && $_minimalPrice): */ ?> +isGrouped()): */ ?> + +helper('catalog')->__('Price is not available');?> +getCanShowPrice()): */?> diff --git a/app/design/frontend/base/default/template/catalog/seo/sitemap.phtml b/app/design/frontend/base/default/template/catalog/seo/sitemap.phtml new file mode 100644 index 0000000000..b74cb44889 --- /dev/null +++ b/app/design/frontend/base/default/template/catalog/seo/sitemap.phtml @@ -0,0 +1,43 @@ + + +getCollection(); ?> +getSize()): ?> + + +

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

    + diff --git a/app/design/frontend/base/default/template/catalog/seo/sitemap/container.phtml b/app/design/frontend/base/default/template/catalog/seo/sitemap/container.phtml new file mode 100644 index 0000000000..088b242ce8 --- /dev/null +++ b/app/design/frontend/base/default/template/catalog/seo/sitemap/container.phtml @@ -0,0 +1,36 @@ + +
    +
    +

    getTitle() ?>

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

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

    + diff --git a/app/design/frontend/base/default/template/catalogsearch/advanced/form.phtml b/app/design/frontend/base/default/template/catalogsearch/advanced/form.phtml new file mode 100644 index 0000000000..743abb426c --- /dev/null +++ b/app/design/frontend/base/default/template/catalogsearch/advanced/form.phtml @@ -0,0 +1,95 @@ + + +
    +

    __('Catalog Advanced Search') ?>

    +
    +getMessagesBlock()->getGroupedHtml() ?> +
    + +
    + +
    +
    + diff --git a/app/design/frontend/base/default/template/catalogsearch/advanced/result.phtml b/app/design/frontend/base/default/template/catalogsearch/advanced/result.phtml new file mode 100644 index 0000000000..2195b4cc9a --- /dev/null +++ b/app/design/frontend/base/default/template/catalogsearch/advanced/result.phtml @@ -0,0 +1,60 @@ + +
    +

    __('Catalog Advanced Search') ?>

    +
    +getMessagesBlock()->getGroupedHtml() ?> +getResultCount()): ?> +

    + helper('catalogsearch')->__('%d item(s) were found using the following search criteria', $this->getResultCount()); ?> +

    + +

    helper('catalogsearch')->__('No items were found using the following search criteria.');?> helper('catalogsearch')->__('Modify your search'); ?>

    + + +
    + getSearchCriterias(); ?> + + +
      + +
    • htmlEscape($this->helper('catalog')->__($criteria['name'])); ?>: htmlEscape($criteria['value']); ?>
    • + +
    + + + getResultCount()): ?> +

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

    + +
    +getResultCount()): ?> + getProductListHtml() ?> + +getSearchCriterias(); ?> diff --git a/app/design/frontend/base/default/template/catalogsearch/form.mini.phtml b/app/design/frontend/base/default/template/catalogsearch/form.mini.phtml new file mode 100644 index 0000000000..0a30ce3ebd --- /dev/null +++ b/app/design/frontend/base/default/template/catalogsearch/form.mini.phtml @@ -0,0 +1,40 @@ + +
    + +
    diff --git a/app/design/frontend/base/default/template/catalogsearch/result.phtml b/app/design/frontend/base/default/template/catalogsearch/result.phtml new file mode 100644 index 0000000000..87ef8e54e4 --- /dev/null +++ b/app/design/frontend/base/default/template/catalogsearch/result.phtml @@ -0,0 +1,55 @@ + +getResultCount()): ?> +getMessagesBlock()->getGroupedHtml() ?> +
    + helper('rss/catalog')->getTagFeedUrl()): ?> + __('Subscribe to Feed') ?> + +

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

    +
    + getNoteMessages()):?> +

    + +
    + +

    + + getProductListHtml() ?> + +
    +

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

    +
    +

    + getNoResultText()) ? $this->getNoResultText() : $this->__('Your search returns no results.') ?> + getNoteMessages()):?> + +
    + + +

    + diff --git a/app/design/frontend/base/default/template/catalogsearch/term.phtml b/app/design/frontend/base/default/template/catalogsearch/term.phtml new file mode 100644 index 0000000000..0fa1c256a3 --- /dev/null +++ b/app/design/frontend/base/default/template/catalogsearch/term.phtml @@ -0,0 +1,38 @@ + +
    +

    __('Popular Search Terms') ?>

    +
    +getTerms()) > 0 ): ?> + + +

    __('There are no search terms available.'); ?>

    + diff --git a/app/design/frontend/base/default/template/checkout/cart.phtml b/app/design/frontend/base/default/template/checkout/cart.phtml new file mode 100644 index 0000000000..b0709ee045 --- /dev/null +++ b/app/design/frontend/base/default/template/checkout/cart.phtml @@ -0,0 +1,127 @@ + + +
    +
    +

    __('Shopping Cart') ?>

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

    __('Discount Codes') ?>

    + + +
    + +
    +
    + + getCouponCode())): ?> +   + +
    +
    +
    + diff --git a/app/design/frontend/base/default/template/checkout/cart/crosssell.phtml b/app/design/frontend/base/default/template/checkout/cart/crosssell.phtml new file mode 100644 index 0000000000..4155985734 --- /dev/null +++ b/app/design/frontend/base/default/template/checkout/cart/crosssell.phtml @@ -0,0 +1,58 @@ + + +getItemCount()): ?> +
    +

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

    + +
    + diff --git a/app/design/frontend/base/default/template/checkout/cart/item/default.phtml b/app/design/frontend/base/default/template/checkout/cart/item/default.phtml new file mode 100644 index 0000000000..5f0065bfd9 --- /dev/null +++ b/app/design/frontend/base/default/template/checkout/cart/item/default.phtml @@ -0,0 +1,256 @@ + +getItem()?> + + __('Remove item')?> + hasProductUrl()):?><?php echo $this->htmlEscape($this->getProductName()) ?>hasProductUrl()):?> + +

    hasProductUrl()):?> + getProductName() ?> + + getProductName() ?> + +

    + getOptionList()):?> +
    + + getFormatedOptionValue($_option) ?> +
    htmlEscape($_option['label']) ?>
    + class="truncated"> + +
    +
    +
    htmlEscape($_option['label']) ?>
    +
    +
    +
    + + + +
    + + getMessages()): ?> + +

    *

    + + + + helper('wishlist')->isAllowInCart()) : ?> + + + + + helper('tax')->displayCartPriceExclTax() || $this->helper('tax')->displayCartBothPrices()): ?> + + typeOfDisplay($_item, array(1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?> + + + + + + typeOfDisplay($_item, array(0, 1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?> + helper('checkout')->formatPrice($_item->getCalculationPrice()+$_item->getWeeeTaxAppliedAmount()+$_item->getWeeeTaxDisposition()); ?> + + helper('checkout')->formatPrice($_item->getCalculationPrice()) ?> + + + + + + getApplied($_item)): ?> + + + + typeOfDisplay($_item, 2, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?> +
    + __('Total'); ?>:
    helper('checkout')->formatPrice($_item->getCalculationPrice()+$_item->getWeeeTaxAppliedAmount()+$_item->getWeeeTaxDisposition()); ?>
    +
    + + + + + helper('tax')->displayCartPriceInclTax() || $this->helper('tax')->displayCartBothPrices()): ?> + + helper('checkout')->getPriceInclTax($_item); ?> + typeOfDisplay($_item, array(1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?> + + + + + + typeOfDisplay($_item, array(0, 1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?> + helper('checkout')->formatPrice($_incl+$_item->getWeeeTaxAppliedAmount()); ?> + + helper('checkout')->formatPrice($_incl-$_item->getWeeeTaxDisposition()) ?> + + + + getApplied($_item)): ?> + + + + typeOfDisplay($_item, 2, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?> +
    + __('Total incl. tax'); ?>:
    helper('checkout')->formatPrice($_incl+$_item->getWeeeTaxAppliedAmount()); ?>
    +
    + + + + + + + + helper('tax')->displayCartPriceExclTax() || $this->helper('tax')->displayCartBothPrices()): ?> + + typeOfDisplay($_item, array(1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?> + + + + + + typeOfDisplay($_item, array(0, 1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?> + helper('checkout')->formatPrice($_item->getRowTotal()+$_item->getWeeeTaxAppliedRowAmount()+$_item->getWeeeTaxRowDisposition()); ?> + + helper('checkout')->formatPrice($_item->getRowTotal()) ?> + + + + getApplied($_item)): ?> + + + + typeOfDisplay($_item, 2, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?> +
    + __('Total'); ?>:
    helper('checkout')->formatPrice($_item->getRowTotal()+$_item->getWeeeTaxAppliedRowAmount()+$_item->getWeeeTaxRowDisposition()); ?>
    +
    + + + + + helper('tax')->displayCartPriceInclTax() || $this->helper('tax')->displayCartBothPrices()): ?> + + helper('checkout')->getSubtotalInclTax($_item); ?> + typeOfDisplay($_item, array(1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?> + + + + + + typeOfDisplay($_item, array(0, 1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?> + helper('checkout')->formatPrice($_incl+$_item->getWeeeTaxAppliedRowAmount()); ?> + + helper('checkout')->formatPrice($_incl-$_item->getWeeeTaxRowDisposition()) ?> + + + + + + getApplied($_item)): ?> + + + + typeOfDisplay($_item, 2, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?> +
    + __('Total incl. tax'); ?>:
    helper('checkout')->formatPrice($_incl+$_item->getWeeeTaxAppliedRowAmount()); ?>
    +
    + + + + + diff --git a/app/design/frontend/base/default/template/checkout/cart/noItems.phtml b/app/design/frontend/base/default/template/checkout/cart/noItems.phtml new file mode 100644 index 0000000000..959af4d66f --- /dev/null +++ b/app/design/frontend/base/default/template/checkout/cart/noItems.phtml @@ -0,0 +1,32 @@ + +
    +

    __('Shopping Cart is Empty') ?>

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

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

    +

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

    diff --git a/app/design/frontend/base/default/template/checkout/cart/render/default.phtml b/app/design/frontend/base/default/template/checkout/cart/render/default.phtml new file mode 100644 index 0000000000..ad0015ee29 --- /dev/null +++ b/app/design/frontend/base/default/template/checkout/cart/render/default.phtml @@ -0,0 +1,70 @@ + +getItem() ?> + + __('Remove Item')?> + <?php echo $this->htmlEscape($this->getItemName($_item)) ?> + +

    getItemName($_item) ?>

    + getItemDescription($_item) ?> + getMessage()): ?> +

    * getMessage() ?>

    + + + helper('wishlist')->isAllowInCart()) : ?> + + + + + helper('tax')->displayCartPriceExclTax() || $this->helper('tax')->displayCartBothPrices()): ?> + + helper('checkout')->formatPrice($_item->getCalculationPrice()) ?> + + + helper('tax')->displayCartPriceInclTax() || $this->helper('tax')->displayCartBothPrices()): ?> + + helper('checkout')->formatPrice($this->helper('checkout')->getPriceInclTax($_item)); ?> + + + + + + helper('tax')->displayCartPriceExclTax() || $this->helper('tax')->displayCartBothPrices()): ?> + + helper('checkout')->formatPrice($_item->getRowTotal()) ?> + + + helper('tax')->displayCartPriceInclTax() || $this->helper('tax')->displayCartBothPrices()): ?> + + helper('checkout')->formatPrice($this->helper('checkout')->getSubtotalInclTax($_item)); ?> + + + diff --git a/app/design/frontend/base/default/template/checkout/cart/render/simple.phtml b/app/design/frontend/base/default/template/checkout/cart/render/simple.phtml new file mode 100644 index 0000000000..e5b5b0b042 --- /dev/null +++ b/app/design/frontend/base/default/template/checkout/cart/render/simple.phtml @@ -0,0 +1,70 @@ + +getItem() ?> + + __('Remove Item')?> + <?php echo $this->htmlEscape($this->getItemName($_item)) ?> + +

    getItemName($_item) ?>

    + getItemDescription($_item) ?> + getMessage()): ?> +

    * getMessage() ?>

    + + + helper('wishlist')->isAllowInCart()) : ?> + + + + + helper('tax')->displayCartPriceExclTax() || $this->helper('tax')->displayCartBothPrices()): ?> + + helper('checkout')->formatPrice($_item->getCalculationPrice()) ?> + + + helper('tax')->displayCartPriceInclTax() || $this->helper('tax')->displayCartBothPrices()): ?> + + helper('checkout')->formatPrice($this->helper('checkout')->getPriceInclTax($_item)); ?> + + + + + + helper('tax')->displayCartPriceExclTax() || $this->helper('tax')->displayCartBothPrices()): ?> + + helper('checkout')->formatPrice($_item->getRowTotal()) ?> + + + helper('tax')->displayCartPriceInclTax() || $this->helper('tax')->displayCartBothPrices()): ?> + + helper('checkout')->formatPrice($this->helper('checkout')->getSubtotalInclTax($_item)); ?> + + + diff --git a/app/design/frontend/base/default/template/checkout/cart/shipping.phtml b/app/design/frontend/base/default/template/checkout/cart/shipping.phtml new file mode 100644 index 0000000000..4df59893f9 --- /dev/null +++ b/app/design/frontend/base/default/template/checkout/cart/shipping.phtml @@ -0,0 +1,122 @@ + + +
    +

    __('Estimate Shipping and Tax') ?>

    +
    +

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

    +
      +
    • + +
      + getCountryHtmlSelect($this->getEstimateCountryId()) ?> +
      +
    • + getStateActive()): ?> +
    • + +
      + + + +
      +
    • + + getCityActive()): ?> +
    • + +
      + +
      +
    • + +
    • + +
      + +
      +
    • +
    +
    + +
    +
    + + + getEstimateRates())): ?> +
    +
    + $_rates): ?> +
    getCarrierName($code) ?>
    +
    +
      + + getErrorMessage()) echo ' class="error-msg"';?>> + getErrorMessage()): ?> + getErrorMessage() ?> + + getCode()===$this->getAddressShippingMethod()) echo ' checked="checked"' ?> class="radio" /> + + + + +
    +
    + +
    +
    + +
    +
    + + +
    diff --git a/app/design/frontend/base/default/template/checkout/cart/sidebar.phtml b/app/design/frontend/base/default/template/checkout/cart/sidebar.phtml new file mode 100644 index 0000000000..e279b88859 --- /dev/null +++ b/app/design/frontend/base/default/template/checkout/cart/sidebar.phtml @@ -0,0 +1,72 @@ + +
    + getSummaryCount() ?> +
    + __('My Cart') ?> +
    +
    + 0): ?> +
    + +

    __('There is 1 item in your cart.', $this->getUrl('checkout/cart')) ?>

    + +

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

    + +

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

    +
    + + isPossibleOnepageCheckout()): ?> +
    + +
    + + getRecentItems() ?> + +

    __('Recently added item(s)') ?>

    +
      + + getItemHtml($_item) ?> + +
    + + +

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

    + +
    +
    diff --git a/app/design/frontend/base/default/template/checkout/cart/sidebar/default.phtml b/app/design/frontend/base/default/template/checkout/cart/sidebar/default.phtml new file mode 100644 index 0000000000..155554a151 --- /dev/null +++ b/app/design/frontend/base/default/template/checkout/cart/sidebar/default.phtml @@ -0,0 +1,125 @@ + +getItem() ?> +
  • + <?php echo $this->htmlEscape($this->getProductName()) ?> +
    + __('Remove This Item') ?> +

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

    + getQty() ?> x + + helper('tax')->displayCartPriceExclTax() || $this->helper('tax')->displayCartBothPrices()): ?> + helper('tax')->displayCartBothPrices()): ?> + __('Excl. Tax'); ?>: + + typeOfDisplay($_item, array(0, 1, 4), 'sales')): ?> + helper('checkout')->formatPrice($_item->getCalculationPrice()+$_item->getWeeeTaxAppliedAmount()+$_item->getWeeeTaxDisposition()); ?> + + helper('checkout')->formatPrice($_item->getCalculationPrice()) ?> + + getApplied($_item)): ?> +
    + typeOfDisplay($_item, 1, 'sales')): ?> + + getApplied($_item) as $tax): ?> + : formatPrice($tax['amount'],true,true); ?>
    + +
    + typeOfDisplay($_item, 2, 'sales')): ?> + getApplied($_item) as $tax): ?> + : formatPrice($tax['amount_incl_tax'],true,true); ?>
    + + typeOfDisplay($_item, 4, 'sales')): ?> + + getApplied($_item) as $tax): ?> + : formatPrice($tax['amount_incl_tax'],true,true); ?>
    + +
    + + typeOfDisplay($_item, 2, 'sales')): ?> + __('Total'); ?>:
    helper('checkout')->formatPrice($_item->getCalculationPrice()+$_item->getWeeeTaxAppliedAmount()+$_item->getWeeeTaxDisposition()); ?>
    + + + + + + + helper('tax')->displayCartPriceInclTax() || $this->helper('tax')->displayCartBothPrices()): ?> + helper('checkout')->getPriceInclTax($_item); ?> + helper('tax')->displayCartBothPrices()): ?> +
    __('Incl. Tax'); ?>: + + typeOfDisplay($_item, array(0, 1, 4), 'sales')): ?> + helper('checkout')->formatPrice($_incl+$_item->getWeeeTaxAppliedAmount()); ?> + + helper('checkout')->formatPrice($_incl-$_item->getWeeeTaxDisposition()) ?> + + getApplied($_item)): ?> +
    + typeOfDisplay($_item, 1, 'sales')): ?> + + getApplied($_item) as $tax): ?> + : formatPrice($tax['amount'],true,true); ?>
    + +
    + typeOfDisplay($_item, 2, 'sales')): ?> + getApplied($_item) as $tax): ?> + : formatPrice($tax['amount_incl_tax'],true,true); ?>
    + + typeOfDisplay($_item, 4, 'sales')): ?> + + getApplied($_item) as $tax): ?> + : formatPrice($tax['amount_incl_tax'],true,true); ?>
    + +
    + + typeOfDisplay($_item, 2, 'sales')): ?> + __('Total incl. tax'); ?>:
    helper('checkout')->formatPrice($_incl+$_item->getWeeeTaxAppliedAmount()); ?>
    + + + + getOptionList()):?> +
    +
    +
    + +
    htmlEscape($_option['label']) ?>
    +
    + + + + + +
    + +
    +
    + __('Details') ?> +
    + +
    +
  • diff --git a/app/design/frontend/base/default/template/checkout/cart/totals.phtml b/app/design/frontend/base/default/template/checkout/cart/totals.phtml new file mode 100644 index 0000000000..7ae65255b2 --- /dev/null +++ b/app/design/frontend/base/default/template/checkout/cart/totals.phtml @@ -0,0 +1,43 @@ + + + + + + + renderTotals('footer'); ?> + + + renderTotals(); ?> + +
    diff --git a/app/design/frontend/base/default/template/checkout/multishipping/address/select.phtml b/app/design/frontend/base/default/template/checkout/multishipping/address/select.phtml new file mode 100644 index 0000000000..d5b8089af6 --- /dev/null +++ b/app/design/frontend/base/default/template/checkout/multishipping/address/select.phtml @@ -0,0 +1,58 @@ + +
    +
    +

    __('Change Billing Address') ?>

    + +
    + getMessagesBlock()->getGroupedHtml() ?> + + getAddressCollection() as $_address): ?> +
    +
    +

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

    +
    + format('html') ?> +
    + isAddressDefaultBilling($_address)): ?> + __('Default Billing') ?> + + isAddressDefaultShipping($_address)): ?> +
    __('Default Shipping') ?> + +
    + +
    + +
    + +
    diff --git a/app/design/frontend/base/default/template/checkout/multishipping/addresses.phtml b/app/design/frontend/base/default/template/checkout/multishipping/addresses.phtml new file mode 100644 index 0000000000..524aea0bfd --- /dev/null +++ b/app/design/frontend/base/default/template/checkout/multishipping/addresses.phtml @@ -0,0 +1,79 @@ + + +getMessagesBlock()->getGroupedHtml() ?> +
    +
    +
    +

    __('Ship to Multiple Addresses') ?>

    + +
    + + +

    __('Please select shipping address for applicable items') ?>

    + + + + + + + + + + + + + + + + + + + + getItems() as $_index => $_item): ?> + + + + + + + + +
    __('Product') ?>__('Qty') ?>__('Send to') ?> 
    getItemHtml($_item->getQuoteItem())?>getProduct()->getIsVirtual()): echo $this->__('Shipping selection is not applicable'); else: echo $this->getAddressesHtmlSelect($_item, $_index); endif; ?>__('Remove Item') ?>
    + +
    + + +
    +
    +
    diff --git a/app/design/frontend/base/default/template/checkout/multishipping/agreements.phtml b/app/design/frontend/base/default/template/checkout/multishipping/agreements.phtml new file mode 100644 index 0000000000..77d288adb3 --- /dev/null +++ b/app/design/frontend/base/default/template/checkout/multishipping/agreements.phtml @@ -0,0 +1,49 @@ + + + +getAgreements()) return; ?> +
      +getAgreements() as $_a): ?> +
    1. +
      getContentHeight() ? ' style="height:' . $_a->getContentHeight() . '"' : '')?>> + getIsHtml()):?> + getContent() ?> + + htmlEscape($_a->getContent())) ?> + +
      +

      + +

      +
    2. + +
    diff --git a/app/design/frontend/base/default/template/checkout/multishipping/billing.phtml b/app/design/frontend/base/default/template/checkout/multishipping/billing.phtml new file mode 100644 index 0000000000..4ad86e4259 --- /dev/null +++ b/app/design/frontend/base/default/template/checkout/multishipping/billing.phtml @@ -0,0 +1,116 @@ + + +
    +
    +

    __('Billing Information') ?>

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

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

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

    __('Payment Method') ?>

    +
    +
    + + +
    + getMethods(); + $_methodsCount = count($_methods); + ?> + getCode() ?> +
    + 1): ?> + getSelectedMethodCode()==$_code): ?> checked="checked" class="radio" /> + + + + +
    + getChildHtml('payment.method.'.$_code)) : ?> +
    + +
    + + +
    + getChildHtml('checkout_billing_items') ?> +
    +
    +
    +
    +
    + + +
    +
    + +
    diff --git a/app/design/frontend/base/default/template/checkout/multishipping/billing/items.phtml b/app/design/frontend/base/default/template/checkout/multishipping/billing/items.phtml new file mode 100644 index 0000000000..653e10bdec --- /dev/null +++ b/app/design/frontend/base/default/template/checkout/multishipping/billing/items.phtml @@ -0,0 +1,54 @@ + +getQuote()->hasVirtualItems()): ?> +
    +

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

    +
    +
    +

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

    + + + + + + + + + + + getVirtualQuoteItems() as $_item): ?> + + + + + + +
    __('Product Name') ?>__('Qty') ?>
    getItemHtml($_item) ?>getQty() ?>
    + +
    +
    + diff --git a/app/design/frontend/base/default/template/checkout/multishipping/item/default.phtml b/app/design/frontend/base/default/template/checkout/multishipping/item/default.phtml new file mode 100644 index 0000000000..4e2a7ded64 --- /dev/null +++ b/app/design/frontend/base/default/template/checkout/multishipping/item/default.phtml @@ -0,0 +1,45 @@ + +

    getProductName() ?>

    +getOptionList()):?> +
    + + getFormatedOptionValue($_option) ?> +
    htmlEscape($_option['label']) ?>
    + class="truncated"> + +
    +
    +
    htmlEscape($_option['label']) ?>
    +
    +
    +
    + + + +
    + diff --git a/app/design/frontend/base/default/template/checkout/multishipping/link.phtml b/app/design/frontend/base/default/template/checkout/multishipping/link.phtml new file mode 100644 index 0000000000..3dab23cdc1 --- /dev/null +++ b/app/design/frontend/base/default/template/checkout/multishipping/link.phtml @@ -0,0 +1,27 @@ + +
  • __('Checkout with Multiple Addresses');?>
  • diff --git a/app/design/frontend/base/default/template/checkout/multishipping/overview.phtml b/app/design/frontend/base/default/template/checkout/multishipping/overview.phtml new file mode 100644 index 0000000000..4caac43f6c --- /dev/null +++ b/app/design/frontend/base/default/template/checkout/multishipping/overview.phtml @@ -0,0 +1,285 @@ + +
    +
    +

    __('Review Order') ?>

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

    __('Billing Information') ?>

    +
    +
    + getBillingAddress() ?> +
    +

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

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

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

    +
    +
    + + + getPaymentHtml() ?> +
    +
    +
    +
    + helper('tax')->displayCartBothPrices() ? 2 : 1); ?> +
    +

    __('Shipping Information') ?>

    + getShippingAddresses() as $_index => $_address): ?> +

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

    +
    +
    +
    +

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

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

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

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

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

    + +
    +
    +
    +
    +

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

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

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

    +
    +
    +

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

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

    __('Select Shipping Method') ?>

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

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

    +
    +
    +
    +

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

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

    __('Shipping Method') ?>

    +
    +
    + getShippingRates($_address))): ?> +

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

    + +
    + $_rates): ?> +
    getCarrierName($code) ?>
    +
    +
      + +
    • + getErrorMessage()): ?> + getCarrierTitle() ?>: getErrorMessage() ?> + + getCode()===$this->getAddressShippingMethod($_address)) echo ' checked="checked"' ?> class="radio" /> + + +
    • + +
    +
    + +
    + +
    +
    +
    +
    + helper('giftmessage/message')->getInline('multishipping_adress_checkbox', $_address); ?> +

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

    + + + + + + + + + + + getAddressItems($_address) as $_item): ?> + + + + + + +
    __('Product Name') ?>__('Qty') ?>
    + getItemHtml($_item->getQuoteItem()) ?> + getQty() ?>
    + + helper('giftmessage/message')->getInline('multishipping_adress', $_address); ?> +
    +
    + + getChildHtml('checkout_billing_items') ?> +
    + + +
    +
    +
    diff --git a/app/design/frontend/base/default/template/checkout/multishipping/state.phtml b/app/design/frontend/base/default/template/checkout/multishipping/state.phtml new file mode 100644 index 0000000000..c871cb80ac --- /dev/null +++ b/app/design/frontend/base/default/template/checkout/multishipping/state.phtml @@ -0,0 +1,38 @@ + + +
      +getSteps() as $_step): ?> +
    • getIsActive()): ?> class="active">getLabel() ?>
    • + +
    diff --git a/app/design/frontend/base/default/template/checkout/multishipping/success.phtml b/app/design/frontend/base/default/template/checkout/multishipping/success.phtml new file mode 100644 index 0000000000..027498f2ba --- /dev/null +++ b/app/design/frontend/base/default/template/checkout/multishipping/success.phtml @@ -0,0 +1,48 @@ + +
    +

    __('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): ?> + + + + + + +

    + +getChildHtml() ?> +
    + +
    diff --git a/app/design/frontend/base/default/template/checkout/onepage.phtml b/app/design/frontend/base/default/template/checkout/onepage.phtml new file mode 100644 index 0000000000..562cc651db --- /dev/null +++ b/app/design/frontend/base/default/template/checkout/onepage.phtml @@ -0,0 +1,61 @@ + +
    +

    __('Checkout') ?>

    +
    + + + +
      +getSteps() as $_stepId => $_stepInfo): ?> +getChild($_stepId) || !$this->getChild($_stepId)->isShow()): continue; endif; $i++ ?> +
    1. +
      + +

      + __('Edit') ?> +
      + +
    2. + +
    + diff --git a/app/design/frontend/base/default/template/checkout/onepage/agreements.phtml b/app/design/frontend/base/default/template/checkout/onepage/agreements.phtml new file mode 100644 index 0000000000..4f3a15b4e0 --- /dev/null +++ b/app/design/frontend/base/default/template/checkout/onepage/agreements.phtml @@ -0,0 +1,51 @@ + + + +getAgreements()) return; ?> +
    +
      +getAgreements() as $_a): ?> +
    1. +
      getContentHeight() ? ' style="height:' . $_a->getContentHeight() . '"' : '')?>> + getIsHtml()):?> + getContent() ?> + + htmlEscape($_a->getContent())) ?> + +
      +

      + +

      +
    2. + +
    +
    diff --git a/app/design/frontend/base/default/template/checkout/onepage/billing.phtml b/app/design/frontend/base/default/template/checkout/onepage/billing.phtml new file mode 100644 index 0000000000..d024067b95 --- /dev/null +++ b/app/design/frontend/base/default/template/checkout/onepage/billing.phtml @@ -0,0 +1,204 @@ + +
    +
    +
      + customerHasAddresses()): ?> +
    • + +
      + getAddressesHtmlSelect('billing') ?> +
      +
    • + +
    • customerHasAddresses()): ?> style="display:none;"> +
      + __('New Address') ?> + +
        +
      • getLayout()->createBlock('customer/widget_name')->setObject($this->getAddress())->setFieldIdFormat('billing:%s')->setFieldNameFormat('billing[%s]')->toHtml() ?>
      • +
      • +
        + +
        + +
        +
        + isCustomerLoggedIn()): ?> +
        + +
        + +
        +
        + +
      • +
      • + +
        + +
        +
      • + helper('customer/address')->getStreetLines(); $_i<=$_n; $_i++): ?> +
      • +
        + +
        +
      • + +
      • +
        + +
        + +
        +
        +
        + +
        + + + +
        +
        +
      • +
      • +
        + +
        + +
        +
        +
        + +
        + getCountryHtmlSelect('billing') ?> +
        +
        +
      • +
      • +
        + +
        + +
        +
        +
        + +
        + +
        +
        +
      • + isCustomerLoggedIn()): ?> + + getLayout()->createBlock('customer/widget_dob') ?> + getLayout()->createBlock('customer/widget_gender') ?> + isEnabled() || $_gender->isEnabled()): ?> +
      • + isEnabled()): ?> +
        + setDate($this->getQuote()->getCustomerDob())->setFieldIdFormat('billing:%s')->setFieldNameFormat('billing[%s]')->toHtml() ?> +
        + + isEnabled()): ?> +
        + setGender($this->getQuote()->getCustomerGender())->setFieldIdFormat('billing:%s')->setFieldNameFormat('billing[%s]')->toHtml() ?> +
        + +
      • + + + getLayout()->createBlock('customer/widget_taxvat') ?> + isEnabled()): ?> +
      • + setTaxvat($this->getQuote()->getCustomerTaxvat())->setFieldIdFormat('billing:%s')->setFieldNameFormat('billing[%s]')->toHtml() ?> +
      • + + +
      • +
        + +
        + +
        +
        +
        + +
        + +
        +
        +
      • + + isCustomerLoggedIn() && $this->customerHasAddresses()):?> +
      • + getAddress()->getSaveInAddressBook()):?> checked="checked" class="checkbox" /> +
      • + +
      • + +
      +
      +
    • + canShip()): ?> +
    • + isUseBillingAddressForShipping()) {?> checked="checked" title="__('Ship to this address') ?>" onclick="$('shipping:same_as_billing').checked = true;" class="radio" />
    • +
    • + isUseBillingAddressForShipping()) {?> checked="checked" title="__('Ship to different address') ?>" onclick="$('shipping:same_as_billing').checked = false;" class="radio" /> +
    • + +
    + canShip()): ?> + + +
    +

    __('* Required Fields') ?>

    + + +
    +
    +
    + diff --git a/app/design/frontend/base/default/template/checkout/onepage/failure.phtml b/app/design/frontend/base/default/template/checkout/onepage/failure.phtml new file mode 100644 index 0000000000..1bb98e3bc7 --- /dev/null +++ b/app/design/frontend/base/default/template/checkout/onepage/failure.phtml @@ -0,0 +1,32 @@ + +
    +

    __('An error occurred in the process of payment') ?>

    +
    +getRealOrderId()) : ?>

    __('Order #') . $this->getRealOrderId() ?>

    +getErrorMessage()) : ?>

    +

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

    diff --git a/app/design/frontend/base/default/template/checkout/onepage/link.phtml b/app/design/frontend/base/default/template/checkout/onepage/link.phtml new file mode 100644 index 0000000000..9974af3720 --- /dev/null +++ b/app/design/frontend/base/default/template/checkout/onepage/link.phtml @@ -0,0 +1,31 @@ + +isPossibleOnepageCheckout()):?> +
  • + +
  • + diff --git a/app/design/frontend/base/default/template/checkout/onepage/login.phtml b/app/design/frontend/base/default/template/checkout/onepage/login.phtml new file mode 100644 index 0000000000..ad87213105 --- /dev/null +++ b/app/design/frontend/base/default/template/checkout/onepage/login.phtml @@ -0,0 +1,119 @@ + +
    +
    +

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

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

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

    + +

    __('Register and save time!') ?>
    + __('Register with us for future convenience:') ?>

    +
      +
    • __('Fast and easy check out') ?>
    • +
    • __('Easy access to your order history and status') ?>
    • +
    + + getQuote()->isAllowedGuestCheckout() ): ?> +
      + getQuote()->isAllowedGuestCheckout() ): ?> +
    • + getQuote()->getCheckoutMethod()==Mage_Checkout_Model_Type_Onepage::METHOD_GUEST): ?> checked="checked" class="radio" /> +
    • + +
    • + getQuote()->getCheckoutMethod()==Mage_Checkout_Model_Type_Onepage::METHOD_REGISTER || !$this->getQuote()->isAllowedGuestCheckout()): ?> checked="checked" class="radio" /> +
    • +
    +

    __('Register and save time!') ?>

    +

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

    +
      +
    • __('Fast and easy check out') ?>
    • +
    • __('Easy access to your order history and status') ?>
    • +
    + + + +
    +
    +

    __('Login') ?>

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

    __('Already registered?') ?>

    +

    __('Please log in below:') ?>

    +
      +
    • + +
      + +
      +
    • +
    • + +
      + +
      +
    • +
    +
    +
    +
    +
    +
    +
    +
    +

     

    + +
    +
    +
    +
    +

    __('* Required Fields') ?>

    + __('Forgot your password?') ?> + +
    +
    +
    + diff --git a/app/design/frontend/base/default/template/checkout/onepage/payment.phtml b/app/design/frontend/base/default/template/checkout/onepage/payment.phtml new file mode 100644 index 0000000000..ea25114b5a --- /dev/null +++ b/app/design/frontend/base/default/template/checkout/onepage/payment.phtml @@ -0,0 +1,70 @@ + + +
    +
    + getChildHtml('methods') ?> +
    +
    + +
    +

    __('* Required Fields') ?>

    + + + +
    + + diff --git a/app/design/frontend/base/default/template/checkout/onepage/payment/methods.phtml b/app/design/frontend/base/default/template/checkout/onepage/payment/methods.phtml new file mode 100644 index 0000000000..4e971cf915 --- /dev/null +++ b/app/design/frontend/base/default/template/checkout/onepage/payment/methods.phtml @@ -0,0 +1,51 @@ + + +
    +getMethods() as $_method): $_code = $_method->getCode() ?> +
    + getMethods()) > 1 ): ?> + getSelectedMethodCode()==$_code): ?> checked="checked" class="radio" /> + + + + +
    + getChildHtml('payment.method.'.$_code)) : ?> +
    + +
    + + +
    + diff --git a/app/design/frontend/base/default/template/checkout/onepage/progress.phtml b/app/design/frontend/base/default/template/checkout/onepage/progress.phtml new file mode 100644 index 0000000000..ab75f2fbd9 --- /dev/null +++ b/app/design/frontend/base/default/template/checkout/onepage/progress.phtml @@ -0,0 +1,110 @@ + +
    +
    + __('Your Checkout Progress') ?> +
    +
    +
    + getCheckout()->getStepData('billing', 'is_show')): ?> + getCheckout()->getStepData('billing', 'complete')): ?> +
    + __('Billing Address') ?> | __('Change') ?> +
    +
    +
    getBilling()->format('html') ?>
    +
    + +
    + __('Billing Address') ?> +
    + + + + getCheckout()->getStepData('shipping', 'is_show')): ?> + getCheckout()->getStepData('shipping', 'complete')): ?> +
    + __('Shipping Address') ?> | __('Change') ?> +
    +
    +
    getShipping()->format('html') ?>
    +
    + +
    + __('Shipping Address') ?> +
    + + + + getCheckout()->getStepData('shipping_method', 'is_show')): ?> + getCheckout()->getStepData('shipping_method', 'complete')): ?> +
    + __('Shipping Method') ?> | __('Change') ?> +
    +
    + getShippingMethod()): ?> + getShippingDescription() ?> + + getShippingPriceExclTax(); ?> + getShippingPriceInclTax(); ?> + helper('tax')->displayShippingPriceIncludingTax()): ?> + + + + + helper('tax')->displayShippingBothPrices() && $_incl != $_excl): ?> + (__('Incl. Tax'); ?> ) + + + + __('Shipping method has not been selected yet') ?> + +
    + +
    + __('Shipping Method') ?> +
    + + + + getCheckout()->getStepData('payment', 'is_show')): ?> + getCheckout()->getStepData('payment', 'complete')): ?> +
    + __('Payment Method') ?> | __('Change') ?> +
    +
    + getPaymentHtml() ?> +
    + +
    + __('Payment Method') ?> +
    + + +
    +
    +
    diff --git a/app/design/frontend/base/default/template/checkout/onepage/review.phtml b/app/design/frontend/base/default/template/checkout/onepage/review.phtml new file mode 100644 index 0000000000..9052abee82 --- /dev/null +++ b/app/design/frontend/base/default/template/checkout/onepage/review.phtml @@ -0,0 +1,42 @@ + +
    + getChildHtml('info') ?> +
    +getChildHtml('agreements') ?> +
    +

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

    + + +
    + diff --git a/app/design/frontend/base/default/template/checkout/onepage/review/info.phtml b/app/design/frontend/base/default/template/checkout/onepage/review/info.phtml new file mode 100644 index 0000000000..8776cd79b0 --- /dev/null +++ b/app/design/frontend/base/default/template/checkout/onepage/review/info.phtml @@ -0,0 +1,65 @@ + + + helper('tax')->displayCartBothPrices()): $colspan = $rowspan = 2; else: $colspan = $rowspan = 1; endif; ?> + + + + + helper('tax')->displayCartBothPrices()): ?> + + + + + + + + + + + helper('tax')->displayCartBothPrices()): ?> + + + + + + + + + getChildHtml('totals'); ?> + + getItems() as $_item): ?> + getItemHtml($_item)?> + + +
    __('Product Name') ?>__('Price') ?>__('Qty') ?>__('Subtotal') ?>
    helper('tax')->getIncExcTaxLabel(false) ?>helper('tax')->getIncExcTaxLabel(true) ?>helper('tax')->getIncExcTaxLabel(false) ?>helper('tax')->getIncExcTaxLabel(true) ?>
    + diff --git a/app/design/frontend/base/default/template/checkout/onepage/review/item.phtml b/app/design/frontend/base/default/template/checkout/onepage/review/item.phtml new file mode 100644 index 0000000000..c5198ee7c3 --- /dev/null +++ b/app/design/frontend/base/default/template/checkout/onepage/review/item.phtml @@ -0,0 +1,236 @@ + +getItem()?> + +

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

    + getOptionList()):?> +
    + + getFormatedOptionValue($_option) ?> +
    htmlEscape($_option['label']) ?>
    + class="truncated"> + +
    +
    +
    htmlEscape($_option['label']) ?>
    +
    +
    +
    + + + +
    + + + helper('tax')->displayCartPriceExclTax() || $this->helper('tax')->displayCartBothPrices()): ?> + + typeOfDisplay($_item, array(1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?> + + + + + + typeOfDisplay($_item, array(0, 1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?> + helper('checkout')->formatPrice($_item->getCalculationPrice()+$_item->getWeeeTaxAppliedAmount()+$_item->getWeeeTaxDisposition()); ?> + + helper('checkout')->formatPrice($_item->getCalculationPrice()) ?> + + + + + + getApplied($_item)): ?> + + + + typeOfDisplay($_item, 2, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?> +
    + __('Total'); ?>:
    helper('checkout')->formatPrice($_item->getCalculationPrice()+$_item->getWeeeTaxAppliedAmount()+$_item->getWeeeTaxDisposition()); ?>
    +
    + + + + + helper('tax')->displayCartPriceInclTax() || $this->helper('tax')->displayCartBothPrices()): ?> + + helper('checkout')->getPriceInclTax($_item); ?> + typeOfDisplay($_item, array(1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?> + + + + + + typeOfDisplay($_item, array(0, 1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?> + helper('checkout')->formatPrice($_incl+$_item->getWeeeTaxAppliedAmount()); ?> + + helper('checkout')->formatPrice($_incl-$_item->getWeeeTaxDisposition()) ?> + + + + getApplied($_item)): ?> + + + + typeOfDisplay($_item, 2, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?> +
    + __('Total incl. tax'); ?>:
    helper('checkout')->formatPrice($_incl+$_item->getWeeeTaxAppliedAmount()); ?>
    +
    + + + + + getQty() ?> + helper('tax')->displayCartPriceExclTax() || $this->helper('tax')->displayCartBothPrices()): ?> + + typeOfDisplay($_item, array(1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?> + + + + + + typeOfDisplay($_item, array(0, 1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?> + helper('checkout')->formatPrice($_item->getRowTotal()+$_item->getWeeeTaxAppliedRowAmount()+$_item->getWeeeTaxRowDisposition()); ?> + + helper('checkout')->formatPrice($_item->getRowTotal()) ?> + + + + getApplied($_item)): ?> + + + + typeOfDisplay($_item, 2, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?> +
    + __('Total'); ?>:
    helper('checkout')->formatPrice($_item->getRowTotal()+$_item->getWeeeTaxAppliedRowAmount()+$_item->getWeeeTaxRowDisposition()); ?>
    +
    + + + + + helper('tax')->displayCartPriceInclTax() || $this->helper('tax')->displayCartBothPrices()): ?> + + helper('checkout')->getSubtotalInclTax($_item); ?> + typeOfDisplay($_item, array(1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?> + + + + + + typeOfDisplay($_item, array(0, 1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?> + helper('checkout')->formatPrice($_incl+$_item->getWeeeTaxAppliedRowAmount()); ?> + + helper('checkout')->formatPrice($_incl-$_item->getWeeeTaxRowDisposition()) ?> + + + + + + getApplied($_item)): ?> + + + + typeOfDisplay($_item, 2, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?> +
    + __('Total incl. tax'); ?>:
    helper('checkout')->formatPrice($_incl+$_item->getWeeeTaxAppliedRowAmount()); ?>
    +
    + + + + + diff --git a/app/design/frontend/base/default/template/checkout/onepage/review/totals.phtml b/app/design/frontend/base/default/template/checkout/onepage/review/totals.phtml new file mode 100644 index 0000000000..51d57924a9 --- /dev/null +++ b/app/design/frontend/base/default/template/checkout/onepage/review/totals.phtml @@ -0,0 +1,43 @@ + +getTotals()): ?> + + helper('tax')->displayCartBothPrices() ? 5 : 3; ?> + renderTotals(null, $_colspan); ?> + renderTotals('footer', $_colspan); ?> + needDisplayBaseGrandtotal()):?> + + + helper('sales')->__('Your credit card will be charged for') ?> + + + displayBaseGrandtotal() ?> + + + + + diff --git a/app/design/frontend/base/default/template/checkout/onepage/shipping.phtml b/app/design/frontend/base/default/template/checkout/onepage/shipping.phtml new file mode 100644 index 0000000000..1d7691bff5 --- /dev/null +++ b/app/design/frontend/base/default/template/checkout/onepage/shipping.phtml @@ -0,0 +1,154 @@ + +
    +
      + customerHasAddresses()): ?> +
    • + +
      + getAddressesHtmlSelect('shipping') ?> +
      +
    • + +
    • customerHasAddresses()): ?> style="display:none;"> +
      + +
        +
      • getLayout()->createBlock('customer/widget_name')->setObject($this->getAddress())->setFieldIdFormat('shipping:%s')->setFieldNameFormat('shipping[%s]')->setFieldParams('onchange="shipping.setSameAsBilling(false)"')->toHtml() ?>
      • +
      • +
        + +
        + +
        +
        + +
        + +
        + +
        +
        + +
      • +
      • + +
        + +
        +
      • + helper('customer/address')->getStreetLines(); $_i<=$_n; $_i++): ?> +
      • +
        + +
        +
      • + +
      • +
        + +
        + +
        +
        +
        + +
        + + + +
        +
        +
      • +
      • +
        + +
        + +
        +
        +
        + +
        + getCountryHtmlSelect('shipping') ?> +
        +
        +
      • +
      • +
        + +
        + +
        +
        +
        + +
        + +
        +
        +
      • + isCustomerLoggedIn() && $this->customerHasAddresses()):?> +
      • + getAddress()->getSaveInAddressBook()):?> checked="checked" class="checkbox" />
      • + +
      • + +
      +
      +
    • +
    • + getAddress()->getSameAsBilling()): ?> checked="checked" title="__('Use Billing Address') ?>" onclick="shipping.setSameAsBilling(this.checked)" class="checkbox" /> +
    • +
    +
    +

    __('* Required Fields') ?>

    + + + +
    +
    + diff --git a/app/design/frontend/base/default/template/checkout/onepage/shipping_method.phtml b/app/design/frontend/base/default/template/checkout/onepage/shipping_method.phtml new file mode 100644 index 0000000000..f7114830ce --- /dev/null +++ b/app/design/frontend/base/default/template/checkout/onepage/shipping_method.phtml @@ -0,0 +1,46 @@ + +
    +
    + getChildHtml('available') ?> +
    + +
    + getChildHtml('additional') ?> +
    +
    + + + +
    +
    diff --git a/app/design/frontend/base/default/template/checkout/onepage/shipping_method/additional.phtml b/app/design/frontend/base/default/template/checkout/onepage/shipping_method/additional.phtml new file mode 100644 index 0000000000..13a5bc6526 --- /dev/null +++ b/app/design/frontend/base/default/template/checkout/onepage/shipping_method/additional.phtml @@ -0,0 +1,27 @@ + +helper('giftmessage/message')->getInline('onepage_checkout', $this->getQuote(), $this->getDontDisplayContainer()) ?> diff --git a/app/design/frontend/base/default/template/checkout/onepage/shipping_method/available.phtml b/app/design/frontend/base/default/template/checkout/onepage/shipping_method/available.phtml new file mode 100644 index 0000000000..8fbfd89b39 --- /dev/null +++ b/app/design/frontend/base/default/template/checkout/onepage/shipping_method/available.phtml @@ -0,0 +1,56 @@ + +getShippingRates())): ?> +

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

    + +
    + $_rates): ?> +
    getCarrierName($code) ?>
    +
    +
      + +
    • + getErrorMessage()): ?> +
        • getErrorMessage() ?>
      + + getCode()===$this->getAddressShippingMethod()) echo ' checked="checked"' ?> class="radio" /> + + +
    • + +
    +
    + +
    + diff --git a/app/design/frontend/base/default/template/checkout/success.phtml b/app/design/frontend/base/default/template/checkout/success.phtml new file mode 100644 index 0000000000..07590ad4d3 --- /dev/null +++ b/app/design/frontend/base/default/template/checkout/success.phtml @@ -0,0 +1,46 @@ + +
    +

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

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

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

    +canPrint()) :?> +

    __('Your order # is: %s', $this->getViewOrderUrl(), $this->getOrderId()) ?>.

    + +

    __('Your order # is: %s', $this->getOrderId()) ?>.

    + +

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

    +canPrint()) :?> +

    + __('Click here to print a copy of your order confirmation.', $this->getPrintUrl()) ?> + getChildHtml() ?> +

    + +
    + +
    diff --git a/app/design/frontend/base/default/template/checkout/total/default.phtml b/app/design/frontend/base/default/template/checkout/total/default.phtml new file mode 100644 index 0000000000..820cf313b2 --- /dev/null +++ b/app/design/frontend/base/default/template/checkout/total/default.phtml @@ -0,0 +1,38 @@ + + + + getRenderingArea() == $this->getTotal()->getArea()): ?> + getTotal()->getTitle() ?> + getRenderingArea() == $this->getTotal()->getArea()): ?> + + + getRenderingArea() == $this->getTotal()->getArea()): ?> + helper('checkout')->formatPrice($this->getTotal()->getValue()) ?> + getRenderingArea() == $this->getTotal()->getArea()): ?> + + diff --git a/app/design/frontend/base/default/template/checkout/total/tax.phtml b/app/design/frontend/base/default/template/checkout/total/tax.phtml new file mode 100644 index 0000000000..29d66283f4 --- /dev/null +++ b/app/design/frontend/base/default/template/checkout/total/tax.phtml @@ -0,0 +1,68 @@ + + +helper('tax')->displayFullSummary() && $this->getTotal()->getValue()!=0): ?> + + getTotal()->getFullInfo() as $info): ?> + + + + + + + + + + + + (%) + +
    + + + + helper('checkout')->formatPrice($amount); ?> + + + + + + + + +helper('tax')->displayFullSummary() && $this->getTotal()->getValue()!=0): ?> class="tax-total" onclick="expandDetails(this, '.tax-details-')"> + + helper('tax')->displayFullSummary()): ?> +
    getTotal()->getTitle() ?>
    + + getTotal()->getTitle() ?> + + + + helper('checkout')->formatPrice($this->getTotal()->getValue()) ?> + + diff --git a/app/design/frontend/base/default/template/chronopay/form.phtml b/app/design/frontend/base/default/template/chronopay/form.phtml new file mode 100644 index 0000000000..db460fc05e --- /dev/null +++ b/app/design/frontend/base/default/template/chronopay/form.phtml @@ -0,0 +1,90 @@ + + +getMethodCode() ?> + diff --git a/app/design/frontend/base/default/template/chronopay/info.phtml b/app/design/frontend/base/default/template/chronopay/info.phtml new file mode 100644 index 0000000000..8430ba2a21 --- /dev/null +++ b/app/design/frontend/base/default/template/chronopay/info.phtml @@ -0,0 +1,34 @@ + +getInfo()): ?> +getMethod()->getTitle() ?>
    +__('Name on the Card: %s', $this->htmlEscape($this->getInfo()->getCcOwner())) ?>
    +__('Credit Card Type: %s', $this->htmlEscape($this->getCcTypeName())) ?>
    +__('Credit Card Number: xxxx-%s', $this->htmlEscape($this->getInfo()->getCcLast4())) ?> + + + diff --git a/app/design/frontend/base/default/template/chronopay/standard/failure.phtml b/app/design/frontend/base/default/template/chronopay/standard/failure.phtml new file mode 100644 index 0000000000..fa9a707f59 --- /dev/null +++ b/app/design/frontend/base/default/template/chronopay/standard/failure.phtml @@ -0,0 +1,30 @@ + +
    +

    __('Error occured') ?>

    +
    +

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

    diff --git a/app/design/frontend/base/default/template/chronopay/standard/form.phtml b/app/design/frontend/base/default/template/chronopay/standard/form.phtml new file mode 100644 index 0000000000..ca80c5a31e --- /dev/null +++ b/app/design/frontend/base/default/template/chronopay/standard/form.phtml @@ -0,0 +1,30 @@ + +getMethodCode() ?> + diff --git a/app/design/frontend/base/default/template/cms/content.phtml b/app/design/frontend/base/default/template/cms/content.phtml new file mode 100644 index 0000000000..f0d3acb6a5 --- /dev/null +++ b/app/design/frontend/base/default/template/cms/content.phtml @@ -0,0 +1,27 @@ + +getPageContent(); ?> diff --git a/app/design/frontend/base/default/template/cms/content_heading.phtml b/app/design/frontend/base/default/template/cms/content_heading.phtml new file mode 100644 index 0000000000..50009991b2 --- /dev/null +++ b/app/design/frontend/base/default/template/cms/content_heading.phtml @@ -0,0 +1,31 @@ + +getContentHeading()): ?> +
    +

    getContentHeading(); ?>

    +
    + diff --git a/app/design/frontend/base/default/template/cms/default/home.phtml b/app/design/frontend/base/default/template/cms/default/home.phtml new file mode 100644 index 0000000000..227b8ed32b --- /dev/null +++ b/app/design/frontend/base/default/template/cms/default/home.phtml @@ -0,0 +1,27 @@ + +There was no Home CMS page configured or found. diff --git a/app/design/frontend/base/default/template/cms/default/no-route.phtml b/app/design/frontend/base/default/template/cms/default/no-route.phtml new file mode 100644 index 0000000000..c12ec57f73 --- /dev/null +++ b/app/design/frontend/base/default/template/cms/default/no-route.phtml @@ -0,0 +1,27 @@ + +There was no 404 CMS page configured or found. diff --git a/app/design/frontend/base/default/template/cms/meta.phtml b/app/design/frontend/base/default/template/cms/meta.phtml new file mode 100644 index 0000000000..e9e2713142 --- /dev/null +++ b/app/design/frontend/base/default/template/cms/meta.phtml @@ -0,0 +1,32 @@ + +getPageMetaKeywords()): ?> + + +getPageMetaDescription()): ?> + + diff --git a/app/design/frontend/base/default/template/cms/widget/link/link_block.phtml b/app/design/frontend/base/default/template/cms/widget/link/link_block.phtml new file mode 100644 index 0000000000..cdc9c911cc --- /dev/null +++ b/app/design/frontend/base/default/template/cms/widget/link/link_block.phtml @@ -0,0 +1,27 @@ + +getLinkAttributes() ?>>htmlEscape($this->getAnchorText()) ?> diff --git a/app/design/frontend/base/default/template/cms/widget/link/link_inline.phtml b/app/design/frontend/base/default/template/cms/widget/link/link_inline.phtml new file mode 100644 index 0000000000..b681a6e76f --- /dev/null +++ b/app/design/frontend/base/default/template/cms/widget/link/link_inline.phtml @@ -0,0 +1,27 @@ + +getLinkAttributes() ?>>htmlEscape($this->getAnchorText()) ?> diff --git a/app/design/frontend/base/default/template/cms/widget/static_block/default.phtml b/app/design/frontend/base/default/template/cms/widget/static_block/default.phtml new file mode 100644 index 0000000000..9923e472dc --- /dev/null +++ b/app/design/frontend/base/default/template/cms/widget/static_block/default.phtml @@ -0,0 +1,27 @@ + +
    getText(); ?>
    diff --git a/app/design/frontend/base/default/template/contacts/form.phtml b/app/design/frontend/base/default/template/contacts/form.phtml new file mode 100644 index 0000000000..a23f8fa6a5 --- /dev/null +++ b/app/design/frontend/base/default/template/contacts/form.phtml @@ -0,0 +1,73 @@ + +
    getMessagesBlock()->getGroupedHtml() ?>
    +
    +

    __('Contact Us') ?>

    +
    +
    +
    +

    __('Contact Information') ?>

    +
      +
    • +
      + +
      + +
      +
      +
      + +
      + +
      +
      +
    • +
    • + +
      + +
      +
    • +
    • + +
      + +
      +
    • +
    +
    +
    +

    __('* Required Fields') ?>

    + + +
    +
    + diff --git a/app/design/frontend/base/default/template/core/formkey.phtml b/app/design/frontend/base/default/template/core/formkey.phtml new file mode 100644 index 0000000000..7db0f6f793 --- /dev/null +++ b/app/design/frontend/base/default/template/core/formkey.phtml @@ -0,0 +1,27 @@ + + diff --git a/app/design/frontend/base/default/template/core/link.phtml b/app/design/frontend/base/default/template/core/link.phtml new file mode 100644 index 0000000000..78662a6e79 --- /dev/null +++ b/app/design/frontend/base/default/template/core/link.phtml @@ -0,0 +1,27 @@ + +getLinkAttributes() ?>>htmlEscape($this->getAnchorText()) ?> diff --git a/app/design/frontend/base/default/template/core/messages.phtml b/app/design/frontend/base/default/template/core/messages.phtml new file mode 100644 index 0000000000..667d401ee2 --- /dev/null +++ b/app/design/frontend/base/default/template/core/messages.phtml @@ -0,0 +1,47 @@ + +getMessages($type) ) { + if ( !$html ) { + $html .= '
      '; + } + $html .= '
    • '; + $html .= '
        '; + + foreach ( $messages as $message ) { + $html.= '
      • '; + $html.= $message->getText(); + $html.= '
      • '; + } + $html .= '
      '; + $html .= '
    • '; + } + } + if ( $html) { + $html .= '
    '; + } +?> diff --git a/app/design/frontend/base/default/template/customer/account/dashboard.phtml b/app/design/frontend/base/default/template/customer/account/dashboard.phtml new file mode 100644 index 0000000000..765970972e --- /dev/null +++ b/app/design/frontend/base/default/template/customer/account/dashboard.phtml @@ -0,0 +1,43 @@ + +
    +
    +

    __('My Dashboard') ?>

    +
    + getMessagesBlock()->getGroupedHtml() ?> + getChildHtml('hello') ?> + getChildHtml('top') ?> + + getChildHtml('info1') ?> + getChildHtml('info2') ?> +
    diff --git a/app/design/frontend/base/default/template/customer/account/dashboard/address.phtml b/app/design/frontend/base/default/template/customer/account/dashboard/address.phtml new file mode 100644 index 0000000000..57ed9c9349 --- /dev/null +++ b/app/design/frontend/base/default/template/customer/account/dashboard/address.phtml @@ -0,0 +1,50 @@ + +
    +
    +
    +

    __('Address Book') ?>

    + __('Manage Addresses') ?> +
    +
    +
    +

    __('Default Billing Address') ?>

    +
    + getPrimaryBillingAddressHtml() ?>
    + __('Edit Address') ?> +
    +
    +
    +

    __('Default Shipping Address') ?>

    +
    + getPrimaryShippingAddressHtml() ?>
    + __('Edit Address') ?> +
    +
    +
    +
    +
    diff --git a/app/design/frontend/base/default/template/customer/account/dashboard/hello.phtml b/app/design/frontend/base/default/template/customer/account/dashboard/hello.phtml new file mode 100644 index 0000000000..2e35e2895a --- /dev/null +++ b/app/design/frontend/base/default/template/customer/account/dashboard/hello.phtml @@ -0,0 +1,30 @@ + +
    +

    __('Hello, %s!', $this->htmlEscape($this->getCustomerName())) ?>

    +

    __('From your My Account Dashboard you have the ability to view a snapshot of your recent account activity and update your account information. Select a link below to view or edit information.') ?>

    +
    diff --git a/app/design/frontend/base/default/template/customer/account/dashboard/info.phtml b/app/design/frontend/base/default/template/customer/account/dashboard/info.phtml new file mode 100644 index 0000000000..5be6369dcd --- /dev/null +++ b/app/design/frontend/base/default/template/customer/account/dashboard/info.phtml @@ -0,0 +1,62 @@ + +
    +
    +
    +
    +

    __('Contact Information') ?>

    + __('Edit') ?> +
    +
    +

    + htmlEscape($this->getCustomer()->getName()) ?>
    + htmlEscape($this->getCustomer()->getEmail()) ?>
    + __('Change Password') ?> +

    +
    +
    +
    + isNewsletterEnabled() ): ?> +
    +
    +
    +

    __('Newsletters') ?>

    + __('Edit') ?> +
    +
    +

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

    +
    +
    +
    + +
    diff --git a/app/design/frontend/base/default/template/customer/account/dashboard/newsletter.phtml b/app/design/frontend/base/default/template/customer/account/dashboard/newsletter.phtml new file mode 100644 index 0000000000..c468945d19 --- /dev/null +++ b/app/design/frontend/base/default/template/customer/account/dashboard/newsletter.phtml @@ -0,0 +1,31 @@ + +
    +

    __('Newsletters') ?>

    + __('Edit Newsletters') ?> +

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

    +
    diff --git a/app/design/frontend/base/default/template/customer/account/link/back.phtml b/app/design/frontend/base/default/template/customer/account/link/back.phtml new file mode 100644 index 0000000000..9dc9778547 --- /dev/null +++ b/app/design/frontend/base/default/template/customer/account/link/back.phtml @@ -0,0 +1,29 @@ + + diff --git a/app/design/frontend/base/default/template/customer/account/navigation.phtml b/app/design/frontend/base/default/template/customer/account/navigation.phtml new file mode 100644 index 0000000000..e5a65e9564 --- /dev/null +++ b/app/design/frontend/base/default/template/customer/account/navigation.phtml @@ -0,0 +1,46 @@ + + diff --git a/app/design/frontend/base/default/template/customer/address.phtml b/app/design/frontend/base/default/template/customer/address.phtml new file mode 100644 index 0000000000..5a8f18c6a0 --- /dev/null +++ b/app/design/frontend/base/default/template/customer/address.phtml @@ -0,0 +1,94 @@ + +
    +

    __('Address Books') ?>

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

    Default

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

    + __('Edit Address') ?> +

    +
    +

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

    +
    +

    __('Additional Address Entries') ?>

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

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

    +
    +

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

    +
    +
    +
    + + +
    + diff --git a/app/design/frontend/base/default/template/customer/address/book.phtml b/app/design/frontend/base/default/template/customer/address/book.phtml new file mode 100644 index 0000000000..d831997fc7 --- /dev/null +++ b/app/design/frontend/base/default/template/customer/address/book.phtml @@ -0,0 +1,120 @@ + + +
    +

    __('Address Book') ?>

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

    __('Default Addresses') ?>

    +
      + getCustomer()->getDefaultBilling()): ?> +
    1. +

      __('Default Billing Address') ?>

      +
      + getAddressHtml(Mage::getSingleton('customer/session')->getCustomer()->getAddressById($_pAddsses)) ?> +
      +

      __('Change Billing Address') ?>

      +
    2. + getCustomer()->getDefaultShipping()): ?> +
    3. +

      __('Default Billing Address') ?>

      +
      + getAddressHtml(Mage::getSingleton('customer/session')->getCustomer()->getAddressById($_pAddsses)) ?> +
      +

      __('Change Billing Address') ?>

      +
    4. + +
    5. +

      __('Default Billing Address') ?>

      + __('You have no default billing address in your address book.') ?> +
    6. + + getCustomer()->getDefaultShipping()): ?> +
    7. +

      __('Default Shipping Address') ?>

      +
      + getAddressHtml(Mage::getSingleton('customer/session')->getCustomer()->getAddressById($_pAddsses)) ?> +
      +

      __('Change Shipping Address') ?>

      +
    8. + getCustomer()->getDefaultBilling()): ?> +
    9. +

      __('Default Shipping Address') ?>

      +
      + getAddressHtml(Mage::getSingleton('customer/session')->getCustomer()->getAddressById($_pAddsses)) ?> +
      +

      __('Change Shipping Address') ?>

      +
    10. + +
    11. +

      __('Default Shipping Address') ?>

      +

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

      +
    12. + +
    +
    +
    +

    __('Additional Address Entries') ?>

    +
      + getAdditionalAddresses()): ?> + +
    1. +
      + getAddressHtml($_address) ?> +
      +

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

      +
    2. + + +
    3. +

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

      +
    4. + +
    +
    +
    + + diff --git a/app/design/frontend/base/default/template/customer/address/edit.phtml b/app/design/frontend/base/default/template/customer/address/edit.phtml new file mode 100644 index 0000000000..f0c054e2ca --- /dev/null +++ b/app/design/frontend/base/default/template/customer/address/edit.phtml @@ -0,0 +1,155 @@ + + +getTitle()): ?> +
    +

    getTitle() ?>

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

    __('Contact Information') ?>

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

    __('Address') ?>

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

    __('* Required Fields') ?>

    + + +
    +
    + diff --git a/app/design/frontend/base/default/template/customer/balance.phtml b/app/design/frontend/base/default/template/customer/balance.phtml new file mode 100644 index 0000000000..6a57b6fea0 --- /dev/null +++ b/app/design/frontend/base/default/template/customer/balance.phtml @@ -0,0 +1,31 @@ + +getMessagesBlock()->getGroupedHtml() ?> +__('Your account balance is: %s', $customer->getStoreBalance()) ?> + diff --git a/app/design/frontend/base/default/template/customer/form/address.phtml b/app/design/frontend/base/default/template/customer/form/address.phtml new file mode 100644 index 0000000000..af4573b834 --- /dev/null +++ b/app/design/frontend/base/default/template/customer/form/address.phtml @@ -0,0 +1,141 @@ + + + +
    +

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

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

    __('Personal Information') ?>

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

    __('Address') ?>

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

    __('* Required Fields') ?>

    + + +
    +
    + diff --git a/app/design/frontend/base/default/template/customer/form/changepassword.phtml b/app/design/frontend/base/default/template/customer/form/changepassword.phtml new file mode 100644 index 0000000000..1a591d5925 --- /dev/null +++ b/app/design/frontend/base/default/template/customer/form/changepassword.phtml @@ -0,0 +1,67 @@ + +
    +

    __('Change Account Password') ?>

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

    __('Change Account Password') ?>

    +
      +
    • + +
      + +
      +
    • +
    • +
      + +
      + +
      +
      +
      + +
      + +
      +
      +
    • +
    +
    +
    +

    __('* Required Fields') ?>

    + + +
    +
    + diff --git a/app/design/frontend/base/default/template/customer/form/confirmation.phtml b/app/design/frontend/base/default/template/customer/form/confirmation.phtml new file mode 100644 index 0000000000..6435ab771d --- /dev/null +++ b/app/design/frontend/base/default/template/customer/form/confirmation.phtml @@ -0,0 +1,54 @@ + +
    +

    __('Send confirmation link') ?>

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

    __('Retrieve your confirmation link here') ?>

    +

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

    +
      +
    • + +
      + +
      +
    • +
    +
    +
    +

    __('* Required Fields') ?>

    + + +
    +
    + diff --git a/app/design/frontend/base/default/template/customer/form/edit.phtml b/app/design/frontend/base/default/template/customer/form/edit.phtml new file mode 100644 index 0000000000..04c88042f7 --- /dev/null +++ b/app/design/frontend/base/default/template/customer/form/edit.phtml @@ -0,0 +1,114 @@ + +
    +

    __('Edit Account Information') ?>

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

    __('Account Information') ?>

    +
      +
    • + getLayout()->createBlock('customer/widget_name')->setObject($this->getCustomer())->toHtml() ?> +
    • +
    • + +
      + +
      +
    • + getLayout()->createBlock('customer/widget_dob') ?> + isEnabled()): ?> +
    • setDate($this->getCustomer()->getDob())->toHtml() ?>
    • + + getLayout()->createBlock('customer/widget_taxvat') ?> + isEnabled()): ?> +
    • setTaxvat($this->getCustomer()->getTaxvat())->toHtml() ?>
    • + + getLayout()->createBlock('customer/widget_gender') ?> + isEnabled()): ?> +
    • setGender($this->getCustomer()->getGender())->toHtml() ?>
    • + +
    • + getCustomer()->getChangePassword()==1): ?> checked="checked" class="checkbox" /> +
    • +
    +
    + +
    +

    __('* Required Fields') ?>

    + + +
    +
    + diff --git a/app/design/frontend/base/default/template/customer/form/forgotpassword.phtml b/app/design/frontend/base/default/template/customer/form/forgotpassword.phtml new file mode 100644 index 0000000000..53505be4f2 --- /dev/null +++ b/app/design/frontend/base/default/template/customer/form/forgotpassword.phtml @@ -0,0 +1,54 @@ + +
    +

    __('Forgot Your Password?') ?>

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

    __('Retrieve your password here') ?>

    +

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

    +
      +
    • + +
      + +
      +
    • +
    +
    +
    +

    __('* Required Fields') ?>

    + + +
    +
    + diff --git a/app/design/frontend/base/default/template/customer/form/login.phtml b/app/design/frontend/base/default/template/customer/form/login.phtml new file mode 100644 index 0000000000..7e7cc1ebd1 --- /dev/null +++ b/app/design/frontend/base/default/template/customer/form/login.phtml @@ -0,0 +1,88 @@ + + + diff --git a/app/design/frontend/base/default/template/customer/form/mini.login.phtml b/app/design/frontend/base/default/template/customer/form/mini.login.phtml new file mode 100644 index 0000000000..f7f25edec4 --- /dev/null +++ b/app/design/frontend/base/default/template/customer/form/mini.login.phtml @@ -0,0 +1,40 @@ + + diff --git a/app/design/frontend/base/default/template/customer/form/newsletter.phtml b/app/design/frontend/base/default/template/customer/form/newsletter.phtml new file mode 100644 index 0000000000..7c1022ed50 --- /dev/null +++ b/app/design/frontend/base/default/template/customer/form/newsletter.phtml @@ -0,0 +1,47 @@ + +
    +

    __('Newsletter Subscription') ?>

    +
    +getMessagesBlock()->getGroupedHtml() ?> +
    +
    + getBlockHtml('formkey')?> +
      +
    • getIsSubscribed()): ?> checked="checked" class="checkbox" />
    • +
    +
    + + +
    +
    +
    + diff --git a/app/design/frontend/base/default/template/customer/form/register.phtml b/app/design/frontend/base/default/template/customer/form/register.phtml new file mode 100644 index 0000000000..83bb96797b --- /dev/null +++ b/app/design/frontend/base/default/template/customer/form/register.phtml @@ -0,0 +1,179 @@ + + + diff --git a/app/design/frontend/base/default/template/customer/logout.phtml b/app/design/frontend/base/default/template/customer/logout.phtml new file mode 100644 index 0000000000..65a495bbb4 --- /dev/null +++ b/app/design/frontend/base/default/template/customer/logout.phtml @@ -0,0 +1,35 @@ + +
    +

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

    +
    +

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

    + diff --git a/app/design/frontend/base/default/template/customer/orders.phtml b/app/design/frontend/base/default/template/customer/orders.phtml new file mode 100644 index 0000000000..37f96195ed --- /dev/null +++ b/app/design/frontend/base/default/template/customer/orders.phtml @@ -0,0 +1,65 @@ + +
    +

    __('My Orders') ?>

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

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

    + + diff --git a/app/design/frontend/base/default/template/customer/widget/dob.phtml b/app/design/frontend/base/default/template/customer/widget/dob.phtml new file mode 100644 index 0000000000..25b2b26c74 --- /dev/null +++ b/app/design/frontend/base/default/template/customer/widget/dob.phtml @@ -0,0 +1,87 @@ +getLayout()->createBlock('customer/widget_dob') + ->setDate($this->getCustomer()->getDob()) + ->toHtml() ?> + +For checkout/onepage/billing.phtml: + +getLayout()->createBlock('customer/widget_dob') + ->setDate($this->getCustomer()->getDob()) + ->setFieldIdFormat('billing:%s') + ->setFieldNameFormat('billing[%s]') + ->toHtml() ?> + +NOTE: Regarding styles - if we leave it this way, we'll move it to boxes.css + Alternatively we could calculate widths automatically using block input parameters. +*/ + +/** + * @see Mage_Customer_Block_Widget_Dob + */ +?> + +
    +setDateInput('d', + '
    + getFieldParams() . ' /> + +
    ' + ); + + $this->setDateInput('m', + '
    + getFieldParams() . ' /> + +
    ' + ); + + $this->setDateInput('y', + '
    + getFieldParams() . ' /> + +
    ' + ); +?> + getSortedDateInputs() ?> + + + +
    + diff --git a/app/design/frontend/base/default/template/customer/widget/gender.phtml b/app/design/frontend/base/default/template/customer/widget/gender.phtml new file mode 100644 index 0000000000..6cefa1f34c --- /dev/null +++ b/app/design/frontend/base/default/template/customer/widget/gender.phtml @@ -0,0 +1,36 @@ + + +
    + +
    diff --git a/app/design/frontend/base/default/template/customer/widget/name.phtml b/app/design/frontend/base/default/template/customer/widget/name.phtml new file mode 100644 index 0000000000..400e3bf161 --- /dev/null +++ b/app/design/frontend/base/default/template/customer/widget/name.phtml @@ -0,0 +1,99 @@ +getLayout()->createBlock('customer/widget_name') + ->setObject($this->getAddress()) + ->toHtml() ?> + +For checkout/onepage/shipping.phtml: + +getLayout()->createBlock('customer/widget_name') + ->setObject($this->getAddress()) + ->setFieldIdFormat('shipping:%s') + ->setFieldNameFormat('shipping[%s]') + ->setFieldParams('onchange="shipping.setSameAsBilling(false);"') + ->toHtml() ?> +*/ +?> +
    +showPrefix()): ?> +
    + +
    + getPrefixOptions()===false): ?> + getFieldParams() ?> /> + + + +
    +
    + +
    + +
    + getFieldParams() ?> /> +
    +
    +showMiddlename()): ?> +
    + +
    + getFieldParams() ?> /> +
    +
    + +
    + +
    + getFieldParams() ?> /> +
    +
    +showSuffix()): ?> +
    + +
    + getSuffixOptions()===false): ?> + getFieldParams() ?> /> + + + +
    +
    + +
    diff --git a/app/design/frontend/base/default/template/customer/widget/taxvat.phtml b/app/design/frontend/base/default/template/customer/widget/taxvat.phtml new file mode 100644 index 0000000000..a285527f04 --- /dev/null +++ b/app/design/frontend/base/default/template/customer/widget/taxvat.phtml @@ -0,0 +1,30 @@ + + +
    + getFieldParams() ?> /> +
    diff --git a/app/design/frontend/base/default/template/customer/wishlist.phtml b/app/design/frontend/base/default/template/customer/wishlist.phtml new file mode 100644 index 0000000000..78ef543a7a --- /dev/null +++ b/app/design/frontend/base/default/template/customer/wishlist.phtml @@ -0,0 +1,73 @@ + +
    +

    __('Wishlist') ?>

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

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

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

    __('Error occured') ?>

    +
    +

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

    diff --git a/app/design/frontend/base/default/template/cybermut/form.phtml b/app/design/frontend/base/default/template/cybermut/form.phtml new file mode 100644 index 0000000000..6fb780cf68 --- /dev/null +++ b/app/design/frontend/base/default/template/cybermut/form.phtml @@ -0,0 +1,30 @@ + +getMethodCode() ?> + diff --git a/app/design/frontend/base/default/template/cybersource/form.phtml b/app/design/frontend/base/default/template/cybersource/form.phtml new file mode 100644 index 0000000000..5305464139 --- /dev/null +++ b/app/design/frontend/base/default/template/cybersource/form.phtml @@ -0,0 +1,190 @@ + +getMethodCode() ?> + + + diff --git a/app/design/frontend/base/default/template/cybersource/info.phtml b/app/design/frontend/base/default/template/cybersource/info.phtml new file mode 100644 index 0000000000..9b533d108e --- /dev/null +++ b/app/design/frontend/base/default/template/cybersource/info.phtml @@ -0,0 +1,38 @@ + +getInfo()): ?> +getMethod()->getTitle() ?>
    + +__('Credit Card Type: %s', $this->getCcTypeName()) ?>
    +__('Credit Card Number: xxxx-%s', $this->getInfo()->getCcLast4()) ?>
    +getInfo()->getCcSsIssue()): ?> +__("Switch/Solo/Maestro(UK Domestic) card issue number: %s", $this->getInfo()->getCcSsIssue()) ?>
    + +getInfo()->getCcSsStartYear()): ?> +__('Switch/Solo/Maestro(UK Domestic) card start Date: %s/%s', $this->getCcStartMonth(), $this->getInfo()->getCcSsStartYear()) ?> + + diff --git a/app/design/frontend/base/default/template/directory/currency.phtml b/app/design/frontend/base/default/template/directory/currency.phtml new file mode 100644 index 0000000000..e8efab0fdf --- /dev/null +++ b/app/design/frontend/base/default/template/directory/currency.phtml @@ -0,0 +1,58 @@ + + +getCurrencyCount()>1): ?> +
    +
    + __('Select Your Currency') ?> +
    +
    + +
    + +
    + diff --git a/app/design/frontend/base/default/template/directory/currency/switch.phtml b/app/design/frontend/base/default/template/directory/currency/switch.phtml new file mode 100644 index 0000000000..c8648360da --- /dev/null +++ b/app/design/frontend/base/default/template/directory/currency/switch.phtml @@ -0,0 +1,31 @@ + +
    +

    __('Currency') ?>

    +
    +

    __('Your current currency is: %s', $currency->getCode()) ?>

    +

    __('Continue »') ?>

    diff --git a/app/design/frontend/default/default/template/directory/js/optional_zip_countries.phtml b/app/design/frontend/base/default/template/directory/js/optional_zip_countries.phtml similarity index 97% rename from app/design/frontend/default/default/template/directory/js/optional_zip_countries.phtml rename to app/design/frontend/base/default/template/directory/js/optional_zip_countries.phtml index 909415a618..5ad7c0bbbb 100644 --- a/app/design/frontend/default/default/template/directory/js/optional_zip_countries.phtml +++ b/app/design/frontend/base/default/template/directory/js/optional_zip_countries.phtml @@ -19,7 +19,7 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category design - * @package default_default + * @package base_default * @copyright Copyright (c) 2009 Irubin Consulting Inc. DBA Varien (http://www.varien.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ diff --git a/app/design/frontend/base/default/template/downloadable/catalog/product/links.phtml b/app/design/frontend/base/default/template/downloadable/catalog/product/links.phtml new file mode 100644 index 0000000000..5482417b43 --- /dev/null +++ b/app/design/frontend/base/default/template/downloadable/catalog/product/links.phtml @@ -0,0 +1,118 @@ + +getLinksPurchasedSeparately() ?> +getProduct()->isSaleable() && $this->hasLinks()):?> +
    + getLinks(); ?> + getLinkSelectionRequired(); ?> +
    + decoratedIsLast){?> class="last"> + + + + + + +
    + + diff --git a/app/design/frontend/base/default/template/downloadable/catalog/product/samples.phtml b/app/design/frontend/base/default/template/downloadable/catalog/product/samples.phtml new file mode 100644 index 0000000000..6f134b0ebb --- /dev/null +++ b/app/design/frontend/base/default/template/downloadable/catalog/product/samples.phtml @@ -0,0 +1,45 @@ + + +hasSamples()): ?> +
    +
    getSamplesTitle() ?>
    + getSamples() ?> + +
    + getIsOpenInNewWindow()?'onclick="this.target=\'_blank\'"':''; ?>>getTitle() ?> +
    + +
    + diff --git a/app/design/frontend/base/default/template/downloadable/catalog/product/type.phtml b/app/design/frontend/base/default/template/downloadable/catalog/product/type.phtml new file mode 100644 index 0000000000..20274f8713 --- /dev/null +++ b/app/design/frontend/base/default/template/downloadable/catalog/product/type.phtml @@ -0,0 +1,41 @@ + +getProduct() ?> + +isSaleable()): ?> +

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

    + +

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

    + +getPriceHtml($_product) ?> +getChildHtml('samples') ?> diff --git a/app/design/frontend/base/default/template/downloadable/checkout/cart/item/default.phtml b/app/design/frontend/base/default/template/downloadable/checkout/cart/item/default.phtml new file mode 100644 index 0000000000..48a8f05ca0 --- /dev/null +++ b/app/design/frontend/base/default/template/downloadable/checkout/cart/item/default.phtml @@ -0,0 +1,264 @@ + +getItem()?> + + __('Remove Item') ?> + <?php echo $this->htmlEscape($this->getProductName()) ?> + +

    getProductName() ?>

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

    getProductName() ?>

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

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

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

    __('My Downloadable Products') ?>

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

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

    + +getChildHtml('pager'); ?> + diff --git a/app/design/frontend/base/default/template/downloadable/email/order/items/creditmemo/downloadable.phtml b/app/design/frontend/base/default/template/downloadable/email/order/items/creditmemo/downloadable.phtml new file mode 100644 index 0000000000..db062241eb --- /dev/null +++ b/app/design/frontend/base/default/template/downloadable/email/order/items/creditmemo/downloadable.phtml @@ -0,0 +1,128 @@ + +getItem() ?> +getItem()->getOrder(); ?> + + + htmlEscape($_item->getName()) ?> + getItemOptions()): ?> +
    + getItemOptions() as $option): ?> +
    +
    + +
    + + getLinks()->getPurchasedItems()): ?> +
    +
    getLinksTitle() ?>
    + +
    getLinkTitle() ?>
    + +
    + + getDescription() ?> + + getSku($_item) ?> + getQty()*1 ?> + + helper('tax')->displayCartPriceExclTax($_order->getStore()) || $this->helper('tax')->displayCartBothPrices($_order->getStore())): ?> + helper('tax')->displayCartBothPrices($_order->getStore())): ?> + __('Excl. Tax'); ?>: + + typeOfDisplay($_item, array(0, 1, 4), 'email', $_order->getStore())): ?> + formatPrice($_item->getRowTotal()+$_item->getWeeeTaxAppliedRowAmount()+$_item->getWeeeTaxRowDisposition()); ?> + + formatPrice($_item->getRowTotal()) ?> + + + + getApplied($_item)): ?> +
    + typeOfDisplay($_item, 1, 'email', $_order->getStore())): ?> + + getApplied($_item) as $tax): ?> + : formatPrice($tax['row_amount'],true,true); ?>
    + +
    + typeOfDisplay($_item, 2, 'email', $_order->getStore())): ?> + getApplied($_item) as $tax): ?> + : formatPrice($tax['row_amount_incl_tax'],true,true); ?>
    + + typeOfDisplay($_item, 4, 'email', $_order->getStore())): ?> + + getApplied($_item) as $tax): ?> + : formatPrice($tax['row_amount_incl_tax'],true,true); ?>
    + +
    + + + typeOfDisplay($_item, 2, 'email', $_order->getStore())): ?> +
    + __('Total'); ?>:
    formatPrice($_item->getCalculationPrice()+$_item->getWeeeTaxAppliedRowAmount()+$_item->getWeeeTaxRowDisposition()); ?>
    + + + + + + helper('tax')->displayCartPriceInclTax($_order->getStore()) || $this->helper('tax')->displayCartBothPrices($_order->getStore())): ?> + helper('tax')->displayCartBothPrices($_order->getStore())): ?> +
    __('Incl. Tax'); ?>: + + helper('checkout')->getSubtotalInclTax($_item); ?> + typeOfDisplay($_item, array(0, 1, 4), 'email', $_order->getStore())): ?> + formatPrice($_incl+$_item->getWeeeTaxAppliedRowAmount()); ?> + + formatPrice($_incl-$_item->getWeeeTaxRowDisposition()) ?> + + getApplied($_item)): ?> +
    + typeOfDisplay($_item, 1, 'email', $_order->getStore())): ?> + + getApplied($_item) as $tax): ?> + : formatPrice($tax['row_amount'],true,true); ?>
    + +
    + typeOfDisplay($_item, 2, 'email', $_order->getStore())): ?> + getApplied($_item) as $tax): ?> + : formatPrice($tax['row_amount_incl_tax'],true,true); ?>
    + + typeOfDisplay($_item, 4, 'email', $_order->getStore())): ?> + + getApplied($_item) as $tax): ?> + : formatPrice($tax['row_amount_incl_tax'],true,true); ?>
    + +
    + + + typeOfDisplay($_item, 2, 'email', $_order->getStore())): ?> + __('Total incl. tax'); ?>:
    formatPrice($_incl+$_item->getWeeeTaxAppliedRowAmount()); ?>
    + + + + + diff --git a/app/design/frontend/base/default/template/downloadable/email/order/items/invoice/downloadable.phtml b/app/design/frontend/base/default/template/downloadable/email/order/items/invoice/downloadable.phtml new file mode 100644 index 0000000000..78e727ea13 --- /dev/null +++ b/app/design/frontend/base/default/template/downloadable/email/order/items/invoice/downloadable.phtml @@ -0,0 +1,131 @@ + +getItem() ?> +getItem()->getOrder(); ?> + + + htmlEscape($_item->getName()) ?> + getItemOptions()): ?> +
    + getItemOptions() as $option): ?> +
    +
    + +
    + + getLinks()->getPurchasedItems()): ?> +
    +
    getLinksTitle() ?>
    + +
    + getLinkTitle() ?>  + (__('download') ?>) +
    + +
    + + getDescription() ?> + + getSku($_item) ?> + getQty()*1 ?> + + helper('tax')->displayCartPriceExclTax($_order->getStore()) || $this->helper('tax')->displayCartBothPrices($_order->getStore())): ?> + helper('tax')->displayCartBothPrices($_order->getStore())): ?> + __('Excl. Tax'); ?>: + + typeOfDisplay($_item, array(0, 1, 4), 'email', $_order->getStore())): ?> + formatPrice($_item->getRowTotal()+$_item->getWeeeTaxAppliedRowAmount()+$_item->getWeeeTaxRowDisposition()); ?> + + formatPrice($_item->getRowTotal()) ?> + + + + getApplied($_item)): ?> +
    + typeOfDisplay($_item, 1, 'email', $_order->getStore())): ?> + + getApplied($_item) as $tax): ?> + : formatPrice($tax['row_amount'],true,true); ?>
    + +
    + typeOfDisplay($_item, 2, 'email', $_order->getStore())): ?> + getApplied($_item) as $tax): ?> + : formatPrice($tax['row_amount_incl_tax'],true,true); ?>
    + + typeOfDisplay($_item, 4, 'email', $_order->getStore())): ?> + + getApplied($_item) as $tax): ?> + : formatPrice($tax['row_amount_incl_tax'],true,true); ?>
    + +
    + + + typeOfDisplay($_item, 2, 'email', $_order->getStore())): ?> +
    + __('Total'); ?>:
    formatPrice($_item->getCalculationPrice()+$_item->getWeeeTaxAppliedRowAmount()+$_item->getWeeeTaxRowDisposition()); ?>
    + + + + + + helper('tax')->displayCartPriceInclTax($_order->getStore()) || $this->helper('tax')->displayCartBothPrices($_order->getStore())): ?> + helper('tax')->displayCartBothPrices($_order->getStore())): ?> +
    __('Incl. Tax'); ?>: + + helper('checkout')->getSubtotalInclTax($_item); ?> + typeOfDisplay($_item, array(0, 1, 4), 'email', $_order->getStore())): ?> + formatPrice($_incl+$_item->getWeeeTaxAppliedRowAmount()); ?> + + formatPrice($_incl-$_item->getWeeeTaxRowDisposition()) ?> + + getApplied($_item)): ?> +
    + typeOfDisplay($_item, 1, 'email', $_order->getStore())): ?> + + getApplied($_item) as $tax): ?> + : formatPrice($tax['row_amount'],true,true); ?>
    + +
    + typeOfDisplay($_item, 2, 'email', $_order->getStore())): ?> + getApplied($_item) as $tax): ?> + : formatPrice($tax['row_amount_incl_tax'],true,true); ?>
    + + typeOfDisplay($_item, 4, 'email', $_order->getStore())): ?> + + getApplied($_item) as $tax): ?> + : formatPrice($tax['row_amount_incl_tax'],true,true); ?>
    + +
    + + + typeOfDisplay($_item, 2, 'email', $_order->getStore())): ?> + __('Total incl. tax'); ?>:
    formatPrice($_incl+$_item->getWeeeTaxAppliedRowAmount()); ?>
    + + + + + diff --git a/app/design/frontend/base/default/template/downloadable/email/order/items/order/downloadable.phtml b/app/design/frontend/base/default/template/downloadable/email/order/items/order/downloadable.phtml new file mode 100644 index 0000000000..d212858f07 --- /dev/null +++ b/app/design/frontend/base/default/template/downloadable/email/order/items/order/downloadable.phtml @@ -0,0 +1,137 @@ + +getItem() ?> +getItem()->getOrder() ?> + + + htmlEscape($_item->getName()) ?> + getItemOptions()): ?> +
    + getItemOptions() as $option): ?> +
    +
    + +
    + + getLinks()->getPurchasedItems()): ?> +
    +
    getLinksTitle() ?>
    + +
    + getLinkTitle() ?>  + (__('download') ?>) +
    + +
    + + getDescription() ?> + getGiftMessageId() && $_giftMessage = $this->helper('giftmessage/message')->getGiftMessage($_item->getGiftMessageId())): ?> +
    __('Gift Message') ?> +
    __('From:'); ?> htmlEscape($_giftMessage->getSender()) ?> +
    __('To:'); ?> htmlEscape($_giftMessage->getRecipient()) ?> +
    __('Message:'); ?>
    htmlEscape($_giftMessage->getMessage()) ?> + + + getSku($_item) ?> + getQtyOrdered()*1 ?> + + helper('tax')->displayCartPriceExclTax($_order->getStore()) || $this->helper('tax')->displayCartBothPrices($_order->getStore())): ?> + helper('tax')->displayCartBothPrices($_order->getStore())): ?> + __('Excl. Tax'); ?>: + + typeOfDisplay($_item, array(0, 1, 4), 'email', $_order->getStore())): ?> + formatPrice($_item->getRowTotal()+$_item->getWeeeTaxAppliedRowAmount()+$_item->getWeeeTaxRowDisposition()); ?> + + formatPrice($_item->getRowTotal()) ?> + + + + getApplied($_item)): ?> +
    + typeOfDisplay($_item, 1, 'email', $_order->getStore())): ?> + + getApplied($_item) as $tax): ?> + : formatPrice($tax['row_amount'],true,true); ?>
    + +
    + typeOfDisplay($_item, 2, 'email', $_order->getStore())): ?> + getApplied($_item) as $tax): ?> + : formatPrice($tax['row_amount_incl_tax'],true,true); ?>
    + + typeOfDisplay($_item, 4, 'email', $_order->getStore())): ?> + + getApplied($_item) as $tax): ?> + : formatPrice($tax['row_amount_incl_tax'],true,true); ?>
    + +
    + + + typeOfDisplay($_item, 2, 'email', $_order->getStore())): ?> +
    + __('Total'); ?>:
    formatPrice($_item->getCalculationPrice()+$_item->getWeeeTaxAppliedRowAmount()+$_item->getWeeeTaxRowDisposition()); ?>
    + + + + + + helper('tax')->displayCartPriceInclTax($_order->getStore()) || $this->helper('tax')->displayCartBothPrices($_order->getStore())): ?> + helper('tax')->displayCartBothPrices($_order->getStore())): ?> +
    __('Incl. Tax'); ?>: + + helper('checkout')->getSubtotalInclTax($_item); ?> + typeOfDisplay($_item, array(0, 1, 4), 'email', $_order->getStore())): ?> + formatPrice($_incl+$_item->getWeeeTaxAppliedRowAmount()); ?> + + formatPrice($_incl-$_item->getWeeeTaxRowDisposition()) ?> + + getApplied($_item)): ?> +
    + typeOfDisplay($_item, 1, 'email', $_order->getStore())): ?> + + getApplied($_item) as $tax): ?> + : formatPrice($tax['row_amount'],true,true); ?>
    + +
    + typeOfDisplay($_item, 2, 'email', $_order->getStore())): ?> + getApplied($_item) as $tax): ?> + : formatPrice($tax['row_amount_incl_tax'],true,true); ?>
    + + typeOfDisplay($_item, 4, 'email', $_order->getStore())): ?> + + getApplied($_item) as $tax): ?> + : formatPrice($tax['row_amount_incl_tax'],true,true); ?>
    + +
    + + + typeOfDisplay($_item, 2, 'email', $_order->getStore())): ?> + __('Total incl. tax'); ?>:
    formatPrice($_incl+$_item->getWeeeTaxAppliedRowAmount()); ?>
    + + + + + diff --git a/app/design/frontend/base/default/template/downloadable/sales/order/creditmemo/items/renderer/downloadable.phtml b/app/design/frontend/base/default/template/downloadable/sales/order/creditmemo/items/renderer/downloadable.phtml new file mode 100644 index 0000000000..54b5d85ce6 --- /dev/null +++ b/app/design/frontend/base/default/template/downloadable/sales/order/creditmemo/items/renderer/downloadable.phtml @@ -0,0 +1,307 @@ + +getItem() ?> +getItem()->getOrderItem()->getOrder() ?> + +

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

    + getItemOptions()): ?> +
    + +
    htmlEscape($_option['label']) ?>
    + getPrintStatus()): ?> + getFormatedOptionValue($_option) ?> + class="truncated"> + +
    +
    +
    htmlEscape($_option['label']) ?>
    +
    +
    +
    + + + +
    htmlEscape( (isset($_option['print_value']) ? $_option['print_value'] : $_option['value']) ) ?>
    + + +
    + + + + getLinks()): ?> +
    +
    getLinksTitle() ?>
    + getPurchasedItems() as $link): ?> +
    getLinkTitle() ?>
    + +
    + + + + getDescription() ?> + helper('giftmessage/message')->getIsMessagesAvailable('order_item', $_item->getOrderItem()) && $_item->getGiftMessageId()): ?> +
    __('Gift Message') ?> + + + splitInjection($this->getSku()) ?> + + helper('tax')->displayCartBothPrices() || $this->helper('tax')->displayCartPriceExclTax()): ?> + + helper('tax')->displayCartBothPrices()): ?> + typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> + + + __('Excl. Tax'); ?>: + typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> + + + + typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> + + + + + + typeOfDisplay($this->getItem(), array(0, 1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> + getOrder()->formatPrice($this->getItem()->getPrice()+$this->getItem()->getWeeeTaxAppliedAmount()+$this->getItem()->getWeeeTaxDisposition()); ?> + + getOrder()->formatPrice($this->getItem()->getPrice()) ?> + + + + + + getApplied($this->getItem())): ?> + + + + typeOfDisplay($this->getItem(), 2, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> + + __('Total'); ?>:
    getOrder()->formatPrice($this->getItem()->getPrice()+$this->getItem()->getWeeeTaxAppliedAmount()+$this->getItem()->getWeeeTaxDisposition()); ?>
    +
    + + +
    +
    + + helper('tax')->displayCartBothPrices() || $this->helper('tax')->displayCartPriceInclTax()): ?> + + helper('tax')->displayCartBothPrices()): ?> + typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> + + + __('Incl. Tax'); ?>: + typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> + + + + helper('checkout')->getPriceInclTax($this->getItem()); ?> + typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> + + + + + + typeOfDisplay($this->getItem(), array(0, 1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> + getOrder()->formatPrice($_incl+$this->getItem()->getWeeeTaxAppliedAmount()); ?> + + getOrder()->formatPrice($_incl-$this->getItem()->getWeeeTaxDisposition()) ?> + + + + + + getApplied($this->getItem())): ?> + + + + typeOfDisplay($this->getItem(), 2, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> + + __('Total incl. tax'); ?>:
    getOrder()->formatPrice($_incl+$this->getItem()->getWeeeTaxAppliedAmount()); ?>
    +
    + + +
    + + + getQty()*1 ?> + + helper('tax')->displayCartBothPrices() || $this->helper('tax')->displayCartPriceExclTax()): ?> + + helper('tax')->displayCartBothPrices()): ?> + typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> + + + __('Excl. Tax'); ?>: + typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> + + + + typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> + + + + + + typeOfDisplay($this->getItem(), array(0, 1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> + getOrder()->formatPrice($this->getItem()->getRowTotal()+$this->getItem()->getWeeeTaxAppliedRowAmount()+$this->getItem()->getWeeeTaxRowDisposition()); ?> + + getOrder()->formatPrice($this->getItem()->getRowTotal()) ?> + + + + + + getApplied($this->getItem())): ?> + + + + typeOfDisplay($this->getItem(), 2, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> + + __('Total'); ?>:
    getOrder()->formatPrice($this->getItem()->getRowTotal()+$this->getItem()->getWeeeTaxAppliedRowAmount()+$this->getItem()->getWeeeTaxRowDisposition()); ?>
    +
    + + +
    +
    + + helper('tax')->displayCartBothPrices() || $this->helper('tax')->displayCartPriceInclTax()): ?> + + helper('tax')->displayCartBothPrices()): ?> + typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> + + + __('Incl. Tax'); ?>: + typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> + + + + helper('checkout')->getSubtotalInclTax($this->getItem()); ?> + typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> + + + + + typeOfDisplay($this->getItem(), array(0, 1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> + getOrder()->formatPrice($_incl+$this->getItem()->getWeeeTaxAppliedRowAmount()); ?> + + getOrder()->formatPrice($_incl-$this->getItem()->getWeeeTaxRowDisposition()) ?> + + + + + getApplied($this->getItem())): ?> + + + + typeOfDisplay($this->getItem(), 2, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> + + __('Total incl. tax'); ?>:
    getOrder()->formatPrice($_incl+$this->getItem()->getWeeeTaxAppliedRowAmount()); ?>
    +
    + + + +
    + + + formatPrice(-$_item->getDiscountAmount()) ?> + + formatPrice($_item->getRowTotal()-$_item->getDiscountAmount()+$_item->getTaxAmount()+$_item->getWeeeTaxAppliedRowAmount()) ?> + + diff --git a/app/design/frontend/base/default/template/downloadable/sales/order/invoice/items/renderer/downloadable.phtml b/app/design/frontend/base/default/template/downloadable/sales/order/invoice/items/renderer/downloadable.phtml new file mode 100644 index 0000000000..487bb20d3c --- /dev/null +++ b/app/design/frontend/base/default/template/downloadable/sales/order/invoice/items/renderer/downloadable.phtml @@ -0,0 +1,307 @@ + +getItem() ?> +getItem()->getOrderItem()->getOrder() ?> + +

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

    + getItemOptions()): ?> +
    + +
    htmlEscape($_option['label']) ?>
    + getPrintStatus()): ?> + getFormatedOptionValue($_option) ?> + class="truncated"> + + +
    +
    +
    htmlEscape($_option['label']) ?>
    +
    +
    +
    + + + +
    htmlEscape( (isset($_option['print_value']) ? $_option['print_value'] : $_option['value']) ) ?>
    + + +
    + + + + getLinks()): ?> +
    +
    getLinksTitle() ?>
    + getPurchasedItems() as $link): ?> +
    getLinkTitle() ?>
    + +
    + + + + getDescription() ?> + helper('giftmessage/message')->getIsMessagesAvailable('order_item', $_item->getOrderItem()) && $_item->getGiftMessageId()): ?> +
    __('Gift Message') ?> + + + splitInjection($this->getSku()) ?> + + helper('tax')->displayCartBothPrices() || $this->helper('tax')->displayCartPriceExclTax()): ?> + + helper('tax')->displayCartBothPrices()): ?> + typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> + + + __('Excl. Tax'); ?>: + typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> + + + + typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> + + + + + + typeOfDisplay($this->getItem(), array(0, 1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> + getOrder()->formatPrice($this->getItem()->getPrice()+$this->getItem()->getWeeeTaxAppliedAmount()+$this->getItem()->getWeeeTaxDisposition()); ?> + + getOrder()->formatPrice($this->getItem()->getPrice()) ?> + + + + + + getApplied($this->getItem())): ?> + + + + typeOfDisplay($this->getItem(), 2, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> + + __('Total'); ?>:
    getOrder()->formatPrice($this->getItem()->getPrice()+$this->getItem()->getWeeeTaxAppliedAmount()+$this->getItem()->getWeeeTaxDisposition()); ?>
    +
    + + +
    +
    + + helper('tax')->displayCartBothPrices() || $this->helper('tax')->displayCartPriceInclTax()): ?> + + helper('tax')->displayCartBothPrices()): ?> + typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> + + + __('Incl. Tax'); ?>: + typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> + + + + helper('checkout')->getPriceInclTax($this->getItem()); ?> + typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> + + + + + + typeOfDisplay($this->getItem(), array(0, 1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> + getOrder()->formatPrice($_incl+$this->getItem()->getWeeeTaxAppliedAmount()); ?> + + getOrder()->formatPrice($_incl-$this->getItem()->getWeeeTaxDisposition()) ?> + + + + + + getApplied($this->getItem())): ?> + + + + typeOfDisplay($this->getItem(), 2, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> + + __('Total incl. tax'); ?>:
    getOrder()->formatPrice($_incl+$this->getItem()->getWeeeTaxAppliedAmount()); ?>
    +
    + + +
    + + + getQty()*1 ?> + + helper('tax')->displayCartBothPrices() || $this->helper('tax')->displayCartPriceExclTax()): ?> + + helper('tax')->displayCartBothPrices()): ?> + typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> + + + __('Excl. Tax'); ?>: + typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> + + + + typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> + + + + + + typeOfDisplay($this->getItem(), array(0, 1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> + getOrder()->formatPrice($this->getItem()->getRowTotal()+$this->getItem()->getWeeeTaxAppliedRowAmount()+$this->getItem()->getWeeeTaxRowDisposition()); ?> + + getOrder()->formatPrice($this->getItem()->getRowTotal()) ?> + + + + + + getApplied($this->getItem())): ?> + + + + typeOfDisplay($this->getItem(), 2, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> + + __('Total'); ?>:
    getOrder()->formatPrice($this->getItem()->getRowTotal()+$this->getItem()->getWeeeTaxAppliedRowAmount()+$this->getItem()->getWeeeTaxRowDisposition()); ?>
    +
    + + +
    +
    + + helper('tax')->displayCartBothPrices() || $this->helper('tax')->displayCartPriceInclTax()): ?> + + helper('tax')->displayCartBothPrices()): ?> + typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> + + + __('Incl. Tax'); ?>: + typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> + + + + helper('checkout')->getSubtotalInclTax($this->getItem()); ?> + typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> + + + + + typeOfDisplay($this->getItem(), array(0, 1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> + getOrder()->formatPrice($_incl+$this->getItem()->getWeeeTaxAppliedRowAmount()); ?> + + getOrder()->formatPrice($_incl-$this->getItem()->getWeeeTaxRowDisposition()) ?> + + + + + + getApplied($this->getItem())): ?> + + + + typeOfDisplay($this->getItem(), 2, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> + + __('Total incl. tax'); ?>:
    getOrder()->formatPrice($_incl+$this->getItem()->getWeeeTaxAppliedRowAmount()); ?>
    +
    + + + + + +
    + + + diff --git a/app/design/frontend/base/default/template/downloadable/sales/order/items/renderer/downloadable.phtml b/app/design/frontend/base/default/template/downloadable/sales/order/items/renderer/downloadable.phtml new file mode 100644 index 0000000000..c8dffaf22b --- /dev/null +++ b/app/design/frontend/base/default/template/downloadable/sales/order/items/renderer/downloadable.phtml @@ -0,0 +1,329 @@ + +getItem() ?> + +

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

    + getItemOptions()): ?> +
    + +
    htmlEscape($_option['label']) ?>
    + getPrintStatus()): ?> + getFormatedOptionValue($_option) ?> + class="truncated"> + + +
    +
    +
    htmlEscape($_option['label']) ?>
    +
    +
    +
    + + + +
    htmlEscape( (isset($_option['print_value']) ? $_option['print_value'] : $_option['value']) ) ?>
    + + +
    + + + + getLinks()): ?> +
    +
    getLinksTitle() ?>
    + getPurchasedItems() as $link): ?> +
    getLinkTitle() ?>
    + +
    + + + + getDescription() ?> + helper('giftmessage/message')->getIsMessagesAvailable('order_item', $_item) && $_item->getGiftMessageId()): ?> +
    __('Gift Message') ?> + + + splitInjection($this->getSku()) ?> + + helper('tax')->displayCartBothPrices() || $this->helper('tax')->displayCartPriceExclTax()): ?> + + helper('tax')->displayCartBothPrices()): ?> + typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> + + + __('Excl. Tax'); ?>: + typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> + + + + typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> + + + + + + typeOfDisplay($this->getItem(), array(0, 1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> + getOrder()->formatPrice($this->getItem()->getPrice()+$this->getItem()->getWeeeTaxAppliedAmount()+$this->getItem()->getWeeeTaxDisposition()); ?> + + getOrder()->formatPrice($this->getItem()->getPrice()) ?> + + + + + + getApplied($this->getItem())): ?> + + + + typeOfDisplay($this->getItem(), 2, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> + + __('Total'); ?>:
    getOrder()->formatPrice($this->getItem()->getPrice()+$this->getItem()->getWeeeTaxAppliedAmount()+$this->getItem()->getWeeeTaxDisposition()); ?>
    +
    + + +
    +
    + + helper('tax')->displayCartBothPrices() || $this->helper('tax')->displayCartPriceInclTax()): ?> + + helper('tax')->displayCartBothPrices()): ?> + typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> + + + __('Incl. Tax'); ?>: + typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> + + + + helper('checkout')->getPriceInclTax($this->getItem()); ?> + typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> + + + + + + typeOfDisplay($this->getItem(), array(0, 1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> + getOrder()->formatPrice($_incl+$this->getItem()->getWeeeTaxAppliedAmount()); ?> + + getOrder()->formatPrice($_incl-$this->getItem()->getWeeeTaxDisposition()) ?> + + + + + + getApplied($this->getItem())): ?> + + + + typeOfDisplay($this->getItem(), 2, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> + + __('Total incl. tax'); ?>:
    getOrder()->formatPrice($_incl+$this->getItem()->getWeeeTaxAppliedAmount()); ?>
    +
    + + +
    + + + + + getItem()->getQtyOrdered() > 0): ?> + __('Ordered'); ?>: getItem()->getQtyOrdered()*1 ?>
    + + getItem()->getQtyShipped() > 0): ?> + __('Shipped'); ?>: getItem()->getQtyShipped()*1 ?>
    + + getItem()->getQtyCanceled() > 0): ?> + __('Canceled'); ?>: getItem()->getQtyCanceled()*1 ?>
    + + getItem()->getQtyRefunded() > 0): ?> + __('Refunded'); ?>: getItem()->getQtyRefunded()*1 ?>
    + +
    + + + helper('tax')->displayCartBothPrices() || $this->helper('tax')->displayCartPriceExclTax()): ?> + + helper('tax')->displayCartBothPrices()): ?> + typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> + + + __('Excl. Tax'); ?>: + typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> + + + + typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> + + + + + + typeOfDisplay($this->getItem(), array(0, 1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> + getOrder()->formatPrice($this->getItem()->getRowTotal()+$this->getItem()->getWeeeTaxAppliedRowAmount()+$this->getItem()->getWeeeTaxRowDisposition()); ?> + + getOrder()->formatPrice($this->getItem()->getRowTotal()) ?> + + + + + + getApplied($this->getItem())): ?> + + + + typeOfDisplay($this->getItem(), 2, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> + + __('Total'); ?>:
    getOrder()->formatPrice($this->getItem()->getRowTotal()+$this->getItem()->getWeeeTaxAppliedRowAmount()+$this->getItem()->getWeeeTaxRowDisposition()); ?>
    +
    + + +
    +
    + + helper('tax')->displayCartBothPrices() || $this->helper('tax')->displayCartPriceInclTax()): ?> + + helper('tax')->displayCartBothPrices()): ?> + typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> + + + __('Incl. Tax'); ?>: + typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> + + + + helper('checkout')->getSubtotalInclTax($this->getItem()); ?> + typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> + + + + + typeOfDisplay($this->getItem(), array(0, 1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> + getOrder()->formatPrice($_incl+$this->getItem()->getWeeeTaxAppliedRowAmount()); ?> + + getOrder()->formatPrice($_incl-$this->getItem()->getWeeeTaxRowDisposition()) ?> + + + + + + getApplied($this->getItem())): ?> + + + + typeOfDisplay($this->getItem(), 2, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> + + __('Total incl. tax'); ?>:
    getOrder()->formatPrice($_incl+$this->getItem()->getWeeeTaxAppliedRowAmount()); ?>
    +
    + + + + + +
    + + + + diff --git a/app/design/frontend/base/default/template/email/order/creditmemo/items.phtml b/app/design/frontend/base/default/template/email/order/creditmemo/items.phtml new file mode 100644 index 0000000000..ef59787657 --- /dev/null +++ b/app/design/frontend/base/default/template/email/order/creditmemo/items.phtml @@ -0,0 +1,51 @@ + +getCreditmemo() ?> +getOrder() ?> + + + + + + + + + + + + getAllItems() as $_item): ?> + getOrderItem()->getParentItem()) continue; else $i++; ?> + > + getItemHtml($_item) ?> + + + + + getChildHtml('creditmemo_totals');?> + +
    __('Item') ?>__('Sku') ?>__('Qty') ?>__('Subtotal') ?>
    + diff --git a/app/design/frontend/base/default/template/email/order/invoice/items.phtml b/app/design/frontend/base/default/template/email/order/invoice/items.phtml new file mode 100644 index 0000000000..1b701a8d3e --- /dev/null +++ b/app/design/frontend/base/default/template/email/order/invoice/items.phtml @@ -0,0 +1,51 @@ + +getInvoice() ?> +getOrder() ?> + + + + + + + + + + + + getAllItems() as $_item): ?> + getOrderItem()->getParentItem()) continue; else $i++; ?> + > + getItemHtml($_item) ?> + + + + + getChildHtml('invoice_totals')?> + +
    __('Item') ?>__('Sku') ?>__('Qty') ?>__('Subtotal') ?>
    + diff --git a/app/design/frontend/base/default/template/email/order/items.phtml b/app/design/frontend/base/default/template/email/order/items.phtml new file mode 100644 index 0000000000..e71b492d5a --- /dev/null +++ b/app/design/frontend/base/default/template/email/order/items.phtml @@ -0,0 +1,58 @@ + +getOrder() ?> + + + + + + + + + + + + getGiftMessageId() && $_giftMessage = $this->helper('giftmessage/message')->getGiftMessage($_order->getGiftMessageId())): ?> + + + + + getChildHtml('order_totals') ?> + + + getAllItems() as $_item): ?> + getParentItem()) continue; else $i++; ?> + > + getItemHtml($_item) ?> + + +
    __('Item') ?>__('Sku') ?>__('Qty') ?>__('Subtotal') ?>
    + __('Gift Message for this Order') ?> +
    __('From:'); ?> htmlEscape($_giftMessage->getSender()) ?> +
    __('To:'); ?> htmlEscape($_giftMessage->getRecipient()) ?> +
    __('Message:'); ?>
    htmlEscape($_giftMessage->getMessage()) ?> +
    diff --git a/app/design/frontend/base/default/template/email/order/items/creditmemo/default.phtml b/app/design/frontend/base/default/template/email/order/items/creditmemo/default.phtml new file mode 100644 index 0000000000..1e2fb443ff --- /dev/null +++ b/app/design/frontend/base/default/template/email/order/items/creditmemo/default.phtml @@ -0,0 +1,120 @@ + +getItem() ?> +getItem()->getOrder(); ?> + + + htmlEscape($_item->getName()) ?> + getItemOptions()): ?> +
    + getItemOptions() as $option): ?> +
    +
    + +
    + + getDescription() ?> + + getSku($_item) ?> + getQty()*1 ?> + + helper('tax')->displaySalesPriceExclTax($_order->getStore()) || $this->helper('tax')->displaySalesBothPrices($_order->getStore())): ?> + helper('tax')->displaySalesBothPrices($_order->getStore())): ?> + __('Excl. Tax'); ?>: + + typeOfDisplay($_item, array(0, 1, 4), 'email', $_order->getStore())): ?> + formatPrice($_item->getRowTotal()+$_item->getWeeeTaxAppliedRowAmount()+$_item->getWeeeTaxRowDisposition()); ?> + + formatPrice($_item->getRowTotal()) ?> + + + + getApplied($_item)): ?> +
    + typeOfDisplay($_item, 1, 'email', $_order->getStore())): ?> + + getApplied($_item) as $tax): ?> + : formatPrice($tax['row_amount'],true,true); ?>
    + +
    + typeOfDisplay($_item, 2, 'email', $_order->getStore())): ?> + getApplied($_item) as $tax): ?> + : formatPrice($tax['row_amount_incl_tax'],true,true); ?>
    + + typeOfDisplay($_item, 4, 'email', $_order->getStore())): ?> + + getApplied($_item) as $tax): ?> + : formatPrice($tax['row_amount_incl_tax'],true,true); ?>
    + +
    + + + typeOfDisplay($_item, 2, 'email', $_order->getStore())): ?> +
    + __('Total'); ?>:
    formatPrice($_item->getCalculationPrice()+$_item->getWeeeTaxAppliedRowAmount()+$_item->getWeeeTaxRowDisposition()); ?>
    + + + + + + helper('tax')->displaySalesPriceInclTax($_order->getStore()) || $this->helper('tax')->displaySalesBothPrices($_order->getStore())): ?> + helper('tax')->displaySalesBothPrices($_order->getStore())): ?> +
    __('Incl. Tax'); ?>: + + helper('checkout')->getSubtotalInclTax($_item); ?> + typeOfDisplay($_item, array(0, 1, 4), 'email', $_order->getStore())): ?> + formatPrice($_incl+$_item->getWeeeTaxAppliedRowAmount()); ?> + + formatPrice($_incl-$_item->getWeeeTaxRowDisposition()) ?> + + getApplied($_item)): ?> +
    + typeOfDisplay($_item, 1, 'email', $_order->getStore())): ?> + + getApplied($_item) as $tax): ?> + : formatPrice($tax['row_amount'],true,true); ?>
    + +
    + typeOfDisplay($_item, 2, 'email', $_order->getStore())): ?> + getApplied($_item) as $tax): ?> + : formatPrice($tax['row_amount_incl_tax'],true,true); ?>
    + + typeOfDisplay($_item, 4, 'email', $_order->getStore())): ?> + + getApplied($_item) as $tax): ?> + : formatPrice($tax['row_amount_incl_tax'],true,true); ?>
    + +
    + + + typeOfDisplay($_item, 2, 'email', $_order->getStore())): ?> + __('Total incl. tax'); ?>:
    formatPrice($_incl+$_item->getWeeeTaxAppliedRowAmount()); ?>
    + + + + + diff --git a/app/design/frontend/base/default/template/email/order/items/invoice/default.phtml b/app/design/frontend/base/default/template/email/order/items/invoice/default.phtml new file mode 100644 index 0000000000..1e2fb443ff --- /dev/null +++ b/app/design/frontend/base/default/template/email/order/items/invoice/default.phtml @@ -0,0 +1,120 @@ + +getItem() ?> +getItem()->getOrder(); ?> + + + htmlEscape($_item->getName()) ?> + getItemOptions()): ?> +
    + getItemOptions() as $option): ?> +
    +
    + +
    + + getDescription() ?> + + getSku($_item) ?> + getQty()*1 ?> + + helper('tax')->displaySalesPriceExclTax($_order->getStore()) || $this->helper('tax')->displaySalesBothPrices($_order->getStore())): ?> + helper('tax')->displaySalesBothPrices($_order->getStore())): ?> + __('Excl. Tax'); ?>: + + typeOfDisplay($_item, array(0, 1, 4), 'email', $_order->getStore())): ?> + formatPrice($_item->getRowTotal()+$_item->getWeeeTaxAppliedRowAmount()+$_item->getWeeeTaxRowDisposition()); ?> + + formatPrice($_item->getRowTotal()) ?> + + + + getApplied($_item)): ?> +
    + typeOfDisplay($_item, 1, 'email', $_order->getStore())): ?> + + getApplied($_item) as $tax): ?> + : formatPrice($tax['row_amount'],true,true); ?>
    + +
    + typeOfDisplay($_item, 2, 'email', $_order->getStore())): ?> + getApplied($_item) as $tax): ?> + : formatPrice($tax['row_amount_incl_tax'],true,true); ?>
    + + typeOfDisplay($_item, 4, 'email', $_order->getStore())): ?> + + getApplied($_item) as $tax): ?> + : formatPrice($tax['row_amount_incl_tax'],true,true); ?>
    + +
    + + + typeOfDisplay($_item, 2, 'email', $_order->getStore())): ?> +
    + __('Total'); ?>:
    formatPrice($_item->getCalculationPrice()+$_item->getWeeeTaxAppliedRowAmount()+$_item->getWeeeTaxRowDisposition()); ?>
    + + + + + + helper('tax')->displaySalesPriceInclTax($_order->getStore()) || $this->helper('tax')->displaySalesBothPrices($_order->getStore())): ?> + helper('tax')->displaySalesBothPrices($_order->getStore())): ?> +
    __('Incl. Tax'); ?>: + + helper('checkout')->getSubtotalInclTax($_item); ?> + typeOfDisplay($_item, array(0, 1, 4), 'email', $_order->getStore())): ?> + formatPrice($_incl+$_item->getWeeeTaxAppliedRowAmount()); ?> + + formatPrice($_incl-$_item->getWeeeTaxRowDisposition()) ?> + + getApplied($_item)): ?> +
    + typeOfDisplay($_item, 1, 'email', $_order->getStore())): ?> + + getApplied($_item) as $tax): ?> + : formatPrice($tax['row_amount'],true,true); ?>
    + +
    + typeOfDisplay($_item, 2, 'email', $_order->getStore())): ?> + getApplied($_item) as $tax): ?> + : formatPrice($tax['row_amount_incl_tax'],true,true); ?>
    + + typeOfDisplay($_item, 4, 'email', $_order->getStore())): ?> + + getApplied($_item) as $tax): ?> + : formatPrice($tax['row_amount_incl_tax'],true,true); ?>
    + +
    + + + typeOfDisplay($_item, 2, 'email', $_order->getStore())): ?> + __('Total incl. tax'); ?>:
    formatPrice($_incl+$_item->getWeeeTaxAppliedRowAmount()); ?>
    + + + + + diff --git a/app/design/frontend/base/default/template/email/order/items/order/default.phtml b/app/design/frontend/base/default/template/email/order/items/order/default.phtml new file mode 100644 index 0000000000..ce9523d5df --- /dev/null +++ b/app/design/frontend/base/default/template/email/order/items/order/default.phtml @@ -0,0 +1,126 @@ + +getItem() ?> +getItem()->getOrder() ?> + + + htmlEscape($_item->getName()) ?> + getItemOptions()): ?> +
    + getItemOptions() as $option): ?> +
    +
    + +
    + + getDescription() ?> + getGiftMessageId() && $_giftMessage = $this->helper('giftmessage/message')->getGiftMessage($_item->getGiftMessageId())): ?> +
    __('Gift Message') ?> +
    __('From:'); ?> htmlEscape($_giftMessage->getSender()) ?> +
    __('To:'); ?> htmlEscape($_giftMessage->getRecipient()) ?> +
    __('Message:'); ?>
    htmlEscape($_giftMessage->getMessage()) ?> + + + getSku($_item) ?> + getQtyOrdered()*1 ?> + + helper('tax')->displaySalesPriceExclTax($_order->getStore()) || $this->helper('tax')->displaySalesBothPrices($_order->getStore())): ?> + helper('tax')->displaySalesBothPrices($_order->getStore())): ?> + __('Excl. Tax'); ?>: + + typeOfDisplay($_item, array(0, 1, 4), 'email', $_order->getStore())): ?> + formatPrice($_item->getRowTotal()+$_item->getWeeeTaxAppliedRowAmount()+$_item->getWeeeTaxRowDisposition()); ?> + + formatPrice($_item->getRowTotal()) ?> + + + + getApplied($_item)): ?> +
    + typeOfDisplay($_item, 1, 'email', $_order->getStore())): ?> + + getApplied($_item) as $tax): ?> + : formatPrice($tax['row_amount'],true,true); ?>
    + +
    + typeOfDisplay($_item, 2, 'email', $_order->getStore())): ?> + getApplied($_item) as $tax): ?> + : formatPrice($tax['row_amount_incl_tax'],true,true); ?>
    + + typeOfDisplay($_item, 4, 'email', $_order->getStore())): ?> + + getApplied($_item) as $tax): ?> + : formatPrice($tax['row_amount_incl_tax'],true,true); ?>
    + +
    + + + typeOfDisplay($_item, 2, 'email', $_order->getStore())): ?> +
    + __('Total'); ?>:
    formatPrice($_item->getCalculationPrice()+$_item->getWeeeTaxAppliedRowAmount()+$_item->getWeeeTaxRowDisposition()); ?>
    + + + + + + helper('tax')->displaySalesPriceInclTax($_order->getStore()) || $this->helper('tax')->displaySalesBothPrices($_order->getStore())): ?> + helper('tax')->displaySalesBothPrices($_order->getStore())): ?> +
    __('Incl. Tax'); ?>: + + helper('checkout')->getSubtotalInclTax($_item); ?> + typeOfDisplay($_item, array(0, 1, 4), 'email', $_order->getStore())): ?> + formatPrice($_incl+$_item->getWeeeTaxAppliedRowAmount()); ?> + + formatPrice($_incl-$_item->getWeeeTaxRowDisposition()) ?> + + getApplied($_item)): ?> +
    + typeOfDisplay($_item, 1, 'email', $_order->getStore())): ?> + + getApplied($_item) as $tax): ?> + : formatPrice($tax['row_amount'],true,true); ?>
    + +
    + typeOfDisplay($_item, 2, 'email', $_order->getStore())): ?> + getApplied($_item) as $tax): ?> + : formatPrice($tax['row_amount_incl_tax'],true,true); ?>
    + + typeOfDisplay($_item, 4, 'email', $_order->getStore())): ?> + + getApplied($_item) as $tax): ?> + : formatPrice($tax['row_amount_incl_tax'],true,true); ?>
    + +
    + + + typeOfDisplay($_item, 2, 'email', $_order->getStore())): ?> + __('Total incl. tax'); ?>:
    formatPrice($_incl+$_item->getWeeeTaxAppliedRowAmount()); ?>
    + + + + + diff --git a/app/design/frontend/base/default/template/email/order/items/shipment/default.phtml b/app/design/frontend/base/default/template/email/order/items/shipment/default.phtml new file mode 100644 index 0000000000..8f94f99a9b --- /dev/null +++ b/app/design/frontend/base/default/template/email/order/items/shipment/default.phtml @@ -0,0 +1,43 @@ + +getItem() ?> + + + htmlEscape($_item->getName()) ?> + getItemOptions()): ?> +
    + getItemOptions() as $option): ?> +
    +
    + +
    + + getDescription() ?> + + getSku($_item) ?> + getQty()*1 ?> + diff --git a/app/design/frontend/base/default/template/email/order/shipment/items.phtml b/app/design/frontend/base/default/template/email/order/shipment/items.phtml new file mode 100644 index 0000000000..4884da2602 --- /dev/null +++ b/app/design/frontend/base/default/template/email/order/shipment/items.phtml @@ -0,0 +1,47 @@ + +getShipment() ?> +getOrder() ?> + + + + + + + + + + + getAllItems() as $_item): ?> + getOrderItem()->getParentItem()) continue; else $i++; ?> + > + getItemHtml($_item) ?> + + + +
    __('Item') ?>__('Sku') ?>__('Qty') ?>
    + diff --git a/app/design/frontend/base/default/template/email/order/shipment/track.phtml b/app/design/frontend/base/default/template/email/order/shipment/track.phtml new file mode 100644 index 0000000000..6f3809d466 --- /dev/null +++ b/app/design/frontend/base/default/template/email/order/shipment/track.phtml @@ -0,0 +1,46 @@ + +getShipment() ?> +getOrder() ?> +getAllTracks()): ?> + + + + + + + + + getAllTracks() as $_item): $i++ ?> + > + + + + + +
    __('Shipped By') ?>__('Tracking Number') ?>
    getTitle() ?>getNumber() ?>
    + diff --git a/app/design/frontend/base/default/template/email/productalert/price.phtml b/app/design/frontend/base/default/template/email/productalert/price.phtml new file mode 100644 index 0000000000..500208add0 --- /dev/null +++ b/app/design/frontend/base/default/template/email/productalert/price.phtml @@ -0,0 +1,50 @@ + +getProducts()): ?> +

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

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

    + +

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

    +

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

    +
    +

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

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

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

    + + + + + + + +
    + + getShortDescription()): ?> +

    + +

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

    +

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

    +
    +

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

    + diff --git a/app/design/frontend/base/default/template/eway/form.phtml b/app/design/frontend/base/default/template/eway/form.phtml new file mode 100644 index 0000000000..451b9e3529 --- /dev/null +++ b/app/design/frontend/base/default/template/eway/form.phtml @@ -0,0 +1,91 @@ + + +getMethodCode() ?> + diff --git a/app/design/frontend/base/default/template/eway/info.phtml b/app/design/frontend/base/default/template/eway/info.phtml new file mode 100644 index 0000000000..2ca9124283 --- /dev/null +++ b/app/design/frontend/base/default/template/eway/info.phtml @@ -0,0 +1,33 @@ + +getInfo()): ?> + __('Name on the Card: %s', $this->htmlEscape($this->getInfo()->getCcOwner())) ?>
    + __('Credit Card Type: %s', $this->htmlEscape($this->getCcTypeName())) ?>
    + __('Credit Card Number: xxxx-%s', $this->htmlEscape($this->getInfo()->getCcLast4())) ?> + + + diff --git a/app/design/frontend/base/default/template/eway/secure/failure.phtml b/app/design/frontend/base/default/template/eway/secure/failure.phtml new file mode 100644 index 0000000000..8770e821af --- /dev/null +++ b/app/design/frontend/base/default/template/eway/secure/failure.phtml @@ -0,0 +1,31 @@ + +
    +

    __('Error occured') ?>

    +
    +

    getErrorMessage() ?>.

    +

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

    diff --git a/app/design/frontend/base/default/template/eway/secure/form.phtml b/app/design/frontend/base/default/template/eway/secure/form.phtml new file mode 100644 index 0000000000..752b95794c --- /dev/null +++ b/app/design/frontend/base/default/template/eway/secure/form.phtml @@ -0,0 +1,30 @@ + +getMethodCode() ?> + diff --git a/app/design/frontend/base/default/template/eway/shared/failure.phtml b/app/design/frontend/base/default/template/eway/shared/failure.phtml new file mode 100644 index 0000000000..8770e821af --- /dev/null +++ b/app/design/frontend/base/default/template/eway/shared/failure.phtml @@ -0,0 +1,31 @@ + +
    +

    __('Error occured') ?>

    +
    +

    getErrorMessage() ?>.

    +

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

    diff --git a/app/design/frontend/base/default/template/eway/shared/form.phtml b/app/design/frontend/base/default/template/eway/shared/form.phtml new file mode 100644 index 0000000000..9c5c40544e --- /dev/null +++ b/app/design/frontend/base/default/template/eway/shared/form.phtml @@ -0,0 +1,30 @@ + +getMethodCode() ?> + diff --git a/app/design/frontend/base/default/template/flo2cash/form.phtml b/app/design/frontend/base/default/template/flo2cash/form.phtml new file mode 100644 index 0000000000..a7e828c2b3 --- /dev/null +++ b/app/design/frontend/base/default/template/flo2cash/form.phtml @@ -0,0 +1,90 @@ + + +getMethodCode() ?> + diff --git a/app/design/frontend/base/default/template/flo2cash/info.phtml b/app/design/frontend/base/default/template/flo2cash/info.phtml new file mode 100644 index 0000000000..6d0e87c4e4 --- /dev/null +++ b/app/design/frontend/base/default/template/flo2cash/info.phtml @@ -0,0 +1,34 @@ + +getInfo()): ?> +getMethod()->getTitle() ?>
    + __('Name on the Card: %s', $this->htmlEscape($this->getInfo()->getCcOwner())) ?>
    + __('Credit Card Type: %s', $this->htmlEscape($this->getCcTypeName())) ?>
    + __('Credit Card Number: xxxx-%s', $this->htmlEscape($this->getInfo()->getCcLast4())) ?> + + + diff --git a/app/design/frontend/base/default/template/giftmessage/inline.phtml b/app/design/frontend/base/default/template/giftmessage/inline.phtml new file mode 100644 index 0000000000..5611effd6f --- /dev/null +++ b/app/design/frontend/base/default/template/giftmessage/inline.phtml @@ -0,0 +1,299 @@ + +getDontDisplayContainer()): ?> + + +getType()): ?> + +
    +

    __('Do you have any gift items in your order?'); ?>

    +

    + getItemsHasMesssages() || $this->getEntityHasMessage()): ?> checked="checked" class="checkbox" /> +

    +
    +
    +
    + isMessagesAvailable('quote', $this->getEntity())): ?> +
    +

    __('Enter a gift message for entire order.'); ?>

    +

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

    + +
      +
    • +
      + +
      + +
      +
      +
      + +
      + +
      +
      +
    • +
    • + +
      + +
      +
    • +
    + +
    + + isItemsAvailable()): ?> +

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

    +

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

    +
      + getItems() as $_index=>$_item): ?> + getProduct() ?> +
    1. +
      +

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

      +

      __('Item %d of %d', $_index+1, $this->countItems()) ?>

      +
      +
      +
      +
      htmlEscape($_product->getName()) ?>
      + +
        +
      • +
        + +
        + +
        +
        +
        + +
        + +
        +
        +
      • +
      • + +
        + +
        +
      • +
      + +
      +
      +
    2. + +
    + +
    +
    + + + + + + +
    +

    __('Gift Messages'); ?>

    +

    + getItemsHasMesssages() || $this->getEntityHasMessage()): ?> checked="checked" class="checkbox" /> +

    +
    +
    +
    + isMessagesAvailable('quote', $this->getEntity())): ?> +
    +

    __('Enter a gift message for this address.'); ?>

    +

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

    + +
      +
    • +
      + +
      + +
      +
      +
      + +
      + +
      +
      +
    • +
    • + +
      + +
      +
    • +
    + +
    + + isItemsAvailable()): ?> +

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

    +

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

    +
      + getItems() as $_index=>$_item): ?> + getProduct() ?> +
    1. +
      +

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

      +

      __('Item %d of %d', $_index+1, $this->countItems()) ?>

      +
      +
      +
      + + +
      htmlEscape($_product->getName()) ?>
      +
        +
      • +
        + +
        + +
        +
        +
        + +
        + +
        +
        +
      • +
      • + +
        + +
        +
      • +
      + +
      +
      +
    2. + +
    + +
    +
    + + + diff --git a/app/design/frontend/base/default/template/googlecheckout/form.phtml b/app/design/frontend/base/default/template/googlecheckout/form.phtml new file mode 100644 index 0000000000..a67cecb786 --- /dev/null +++ b/app/design/frontend/base/default/template/googlecheckout/form.phtml @@ -0,0 +1,30 @@ + +getMethodCode() ?> + diff --git a/app/design/frontend/base/default/template/googlecheckout/link.phtml b/app/design/frontend/base/default/template/googlecheckout/link.phtml new file mode 100644 index 0000000000..161d62cb6f --- /dev/null +++ b/app/design/frontend/base/default/template/googlecheckout/link.phtml @@ -0,0 +1,38 @@ + +
  • + getIsDisabled()): ?> + <?php echo Mage::helper('googlecheckout')->__('Fast checkout through Google');?> + +
    getIsActiveAanalytics()):?> onsubmit="setUrchinInputCode(pageTracker)"> +
    + + +
    +
    + +
  • diff --git a/app/design/frontend/base/default/template/ideal/advanced/failure.phtml b/app/design/frontend/base/default/template/ideal/advanced/failure.phtml new file mode 100644 index 0000000000..aa06ad7a49 --- /dev/null +++ b/app/design/frontend/base/default/template/ideal/advanced/failure.phtml @@ -0,0 +1,31 @@ + +
    +

    __('Error occured') ?>

    +
    +

    getErrorMessage() ?>

    +

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

    diff --git a/app/design/frontend/base/default/template/ideal/advanced/form.phtml b/app/design/frontend/base/default/template/ideal/advanced/form.phtml new file mode 100755 index 0000000000..f9d46898a6 --- /dev/null +++ b/app/design/frontend/base/default/template/ideal/advanced/form.phtml @@ -0,0 +1,42 @@ + +getMethodCode() ?> +getIssuerList()):?> + + diff --git a/app/design/frontend/base/default/template/ideal/advanced/info.phtml b/app/design/frontend/base/default/template/ideal/advanced/info.phtml new file mode 100644 index 0000000000..855979f8ef --- /dev/null +++ b/app/design/frontend/base/default/template/ideal/advanced/info.phtml @@ -0,0 +1,33 @@ + +getInfo()): ?> +getMethod()->getTitle() ?> +
    + __('Issuer'). ': ' . $this->getIssuerTitle() ?> + + + diff --git a/app/design/frontend/base/default/template/ideal/basic/failure.phtml b/app/design/frontend/base/default/template/ideal/basic/failure.phtml new file mode 100644 index 0000000000..aa06ad7a49 --- /dev/null +++ b/app/design/frontend/base/default/template/ideal/basic/failure.phtml @@ -0,0 +1,31 @@ + +
    +

    __('Error occured') ?>

    +
    +

    getErrorMessage() ?>

    +

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

    diff --git a/app/design/frontend/base/default/template/ideal/basic/form.phtml b/app/design/frontend/base/default/template/ideal/basic/form.phtml new file mode 100755 index 0000000000..10d125708c --- /dev/null +++ b/app/design/frontend/base/default/template/ideal/basic/form.phtml @@ -0,0 +1,30 @@ + +getMethodCode() ?> + diff --git a/app/design/frontend/base/default/template/newsletter/subscribe.phtml b/app/design/frontend/base/default/template/newsletter/subscribe.phtml new file mode 100644 index 0000000000..5a5b874a2c --- /dev/null +++ b/app/design/frontend/base/default/template/newsletter/subscribe.phtml @@ -0,0 +1,47 @@ + +
    +
    + __('Newsletter') ?> +
    +
    +
    + +
    + +
    +
    + +
    +
    +
    + +
    diff --git a/app/design/frontend/base/default/template/ogone/form.phtml b/app/design/frontend/base/default/template/ogone/form.phtml new file mode 100644 index 0000000000..f3e4233c46 --- /dev/null +++ b/app/design/frontend/base/default/template/ogone/form.phtml @@ -0,0 +1,33 @@ + + +getMethodCode() ?> + diff --git a/app/design/frontend/base/default/template/ogone/info.phtml b/app/design/frontend/base/default/template/ogone/info.phtml new file mode 100644 index 0000000000..5a42b8e950 --- /dev/null +++ b/app/design/frontend/base/default/template/ogone/info.phtml @@ -0,0 +1,27 @@ + +

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

    diff --git a/app/design/frontend/base/default/template/ogone/paypage.phtml b/app/design/frontend/base/default/template/ogone/paypage.phtml new file mode 100644 index 0000000000..1f0876d499 --- /dev/null +++ b/app/design/frontend/base/default/template/ogone/paypage.phtml @@ -0,0 +1,28 @@ + + +$$$PAYMENT ZONE$$$ diff --git a/app/design/frontend/base/default/template/ogone/placeform.phtml b/app/design/frontend/base/default/template/ogone/placeform.phtml new file mode 100644 index 0000000000..be0b2e8368 --- /dev/null +++ b/app/design/frontend/base/default/template/ogone/placeform.phtml @@ -0,0 +1,43 @@ + + +

    __('Please, wait a moment. This page will transfer your data to Ogone payment gateway in a few seconds.'); ?>

    +
    + getFormData())): ?> +
    + getFormData() as $name => $value) { ?> + + +
    + +
    + diff --git a/app/design/frontend/base/default/template/oscommerce/order/list.phtml b/app/design/frontend/base/default/template/oscommerce/order/list.phtml new file mode 100644 index 0000000000..ee32015efb --- /dev/null +++ b/app/design/frontend/base/default/template/oscommerce/order/list.phtml @@ -0,0 +1,56 @@ + +getOsCommerceOrders(); ?> + +
    +

    __('My Previous Orders') ?>

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

    __('Order') ?> #

    +
    +

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

    + +
    +
    +

    __('Shipping Address') ?>

    +
    +
    +
    + +
    +
    +T: + +
    +
    + + +
    +

    __('Shipping Method') ?>

    + +
    + +
    + + +
    +
    +

    __('Billing Address') ?>

    +
    +
    +
    + +
    +
    +T: + +
    +
    +
    +

    Payment Method

    + +
    +
    + +

    __('Items Ordered') ?>

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

    __('About Your Order') ?>

    +
    + +
    formatDate($_historyItem['date_added'], 'medium', true) ?> |
    +
    + +
    + + diff --git a/app/design/frontend/base/default/template/page/1column.phtml b/app/design/frontend/base/default/template/page/1column.phtml new file mode 100644 index 0000000000..fe133d23fa --- /dev/null +++ b/app/design/frontend/base/default/template/page/1column.phtml @@ -0,0 +1,57 @@ + + + + + +getChildHtml('head') ?> + +getBodyClass()?' class="'.$this->getBodyClass().'"':'' ?>> +
    + getChildHtml('global_notices') ?> +
    + getChildHtml('header') ?> +
    +
    + getChildHtml('breadcrumbs') ?> +
    + getChildHtml('global_messages') ?> + getChildHtml('content') ?> +
    +
    +
    + getChildHtml('footer') ?> + getChildHtml('before_body_end') ?> +
    +
    +getAbsoluteFooter() ?> + + diff --git a/app/design/frontend/base/default/template/page/2columns-left.phtml b/app/design/frontend/base/default/template/page/2columns-left.phtml new file mode 100644 index 0000000000..6ea47dde8f --- /dev/null +++ b/app/design/frontend/base/default/template/page/2columns-left.phtml @@ -0,0 +1,58 @@ + + + + + +getChildHtml('head') ?> + +getBodyClass()?' class="'.$this->getBodyClass().'"':'' ?>> +
    + getChildHtml('global_notices') ?> +
    + getChildHtml('header') ?> +
    +
    + getChildHtml('breadcrumbs') ?> + +
    + getChildHtml('global_messages') ?> + getChildHtml('content') ?> +
    +
    +
    + getChildHtml('footer') ?> + getChildHtml('before_body_end') ?> +
    +
    +getAbsoluteFooter() ?> + + diff --git a/app/design/frontend/base/default/template/page/2columns-right.phtml b/app/design/frontend/base/default/template/page/2columns-right.phtml new file mode 100644 index 0000000000..b11ac7c548 --- /dev/null +++ b/app/design/frontend/base/default/template/page/2columns-right.phtml @@ -0,0 +1,58 @@ + + + + + +getChildHtml('head') ?> + +getBodyClass()?' class="'.$this->getBodyClass().'"':'' ?>> +
    + getChildHtml('global_notices') ?> +
    + getChildHtml('header') ?> +
    +
    + getChildHtml('breadcrumbs') ?> + +
    + getChildHtml('global_messages') ?> + getChildHtml('content') ?> +
    +
    +
    + getChildHtml('footer') ?> + getChildHtml('before_body_end') ?> +
    +
    +getAbsoluteFooter() ?> + + diff --git a/app/design/frontend/base/default/template/page/3columns.phtml b/app/design/frontend/base/default/template/page/3columns.phtml new file mode 100644 index 0000000000..0586b81ec6 --- /dev/null +++ b/app/design/frontend/base/default/template/page/3columns.phtml @@ -0,0 +1,59 @@ + + + + + +getChildHtml('head') ?> + +getBodyClass()?' class="'.$this->getBodyClass().'"':'' ?>> +
    + getChildHtml('global_notices') ?> +
    + getChildHtml('header') ?> +
    +
    + getChildHtml('breadcrumbs') ?> + + +
    + getChildHtml('global_messages') ?> + getChildHtml('content') ?> +
    +
    +
    + getChildHtml('footer') ?> + getChildHtml('before_body_end') ?> +
    +
    +getAbsoluteFooter() ?> + + diff --git a/app/design/frontend/base/default/template/page/empty.phtml b/app/design/frontend/base/default/template/page/empty.phtml new file mode 100644 index 0000000000..41fa212ce6 --- /dev/null +++ b/app/design/frontend/base/default/template/page/empty.phtml @@ -0,0 +1,42 @@ + + + + + + getChildHtml('head') ?> + + + getChildHtml('content') ?> + getChildHtml('before_body_end') ?> + getAbsoluteFooter() ?> + + diff --git a/app/design/frontend/base/default/template/page/html/breadcrumbs.phtml b/app/design/frontend/base/default/template/page/html/breadcrumbs.phtml new file mode 100644 index 0000000000..0115e5e02b --- /dev/null +++ b/app/design/frontend/base/default/template/page/html/breadcrumbs.phtml @@ -0,0 +1,46 @@ + + + + diff --git a/app/design/frontend/base/default/template/page/html/footer.phtml b/app/design/frontend/base/default/template/page/html/footer.phtml new file mode 100644 index 0000000000..4312c735a5 --- /dev/null +++ b/app/design/frontend/base/default/template/page/html/footer.phtml @@ -0,0 +1,33 @@ + + diff --git a/app/design/frontend/base/default/template/page/html/head.phtml b/app/design/frontend/base/default/template/page/html/head.phtml new file mode 100644 index 0000000000..2f7a87e87d --- /dev/null +++ b/app/design/frontend/base/default/template/page/html/head.phtml @@ -0,0 +1,43 @@ + +<?php echo $this->getTitle() ?> + + + + + + + +getCssJsHtml() ?> +getChildHtml() ?> +helper('core/js')->getTranslatorScript() ?> +getIncludes() ?> diff --git a/app/design/frontend/base/default/template/page/html/header.phtml b/app/design/frontend/base/default/template/page/html/header.phtml new file mode 100644 index 0000000000..ec02bfc73a --- /dev/null +++ b/app/design/frontend/base/default/template/page/html/header.phtml @@ -0,0 +1,43 @@ + +
    +
    + getIsHomePage()):?> +

    getLogoAlt() ?>

    + + + +
    + getChildHtml('topSearch') ?> +

    getWelcome()?>

    + getChildHtml('topLinks') ?> + getChildHtml('store_language') ?> +
    + getChildHtml('topContainer'); ?> +
    +
    +getChildHtml('topMenu') ?> diff --git a/app/design/frontend/base/default/template/page/html/notices.phtml b/app/design/frontend/base/default/template/page/html/notices.phtml new file mode 100644 index 0000000000..348d842fb7 --- /dev/null +++ b/app/design/frontend/base/default/template/page/html/notices.phtml @@ -0,0 +1,44 @@ + + +displayNoscriptNotice()): ?> + + +displayDemoNotice()): ?> +

    __('This is a demo store. Any orders placed through this store will not be honored or fulfilled.') ?>

    + diff --git a/app/design/frontend/base/default/template/page/html/pager.phtml b/app/design/frontend/base/default/template/page/html/pager.phtml new file mode 100644 index 0000000000..945dad7421 --- /dev/null +++ b/app/design/frontend/base/default/template/page/html/pager.phtml @@ -0,0 +1,124 @@ + + +getCollection()->getSize()): ?> + + getUseContainer()): ?> +
    + + + getShowAmounts()): ?> +

    + getLastPageNum()>1): ?> + __('Items %s to %s of %s total', $this->getFirstNum(), $this->getLastNum(), $this->getTotalNum()) ?> + + __('%s Item(s)', $this->getTotalNum()) ?> + +

    + + + getShowPerPage()): ?> +
    + + __('per page') ?> +
    + + + getLastPageNum()>1): ?> +
    + __('Page:') ?> +
      + isFirstPage()): ?> +
    1. + +
    2. + + + canShowFirst()): ?> +
    3. 1
    4. + + + canShowPreviousJump()): ?> +
    5. ...
    6. + + + getFramePages() as $_page): ?> + isPageCurrent($_page)): ?> +
    7. + +
    8. + + + + + canShowNextJump()): ?> +
    9. ...
    10. + + + canShowLast()): ?> +
    11. getLastPageNum() ?>
    12. + + + isLastPage()): ?> +
    13. + +
    14. + +
    + +
    + + + getUseContainer()): ?> +
    + + + diff --git a/app/design/frontend/base/default/template/page/html/top.links.phtml b/app/design/frontend/base/default/template/page/html/top.links.phtml new file mode 100644 index 0000000000..3d6705b597 --- /dev/null +++ b/app/design/frontend/base/default/template/page/html/top.links.phtml @@ -0,0 +1,34 @@ + + + + diff --git a/app/design/frontend/base/default/template/page/html/wrapper.phtml b/app/design/frontend/base/default/template/page/html/wrapper.phtml new file mode 100644 index 0000000000..a98e8dc6cf --- /dev/null +++ b/app/design/frontend/base/default/template/page/html/wrapper.phtml @@ -0,0 +1,50 @@ + + + * some-custom-identificator + * + * + * span + * class="custom-class" + * + * + * + */ +?> +hasTag() ? $this->getTag() : "div" ?> +< id="getId()?>" getParams()?>> +getChildHtml()?> +> diff --git a/app/design/frontend/base/default/template/page/js/calendar.phtml b/app/design/frontend/base/default/template/page/js/calendar.phtml new file mode 100644 index 0000000000..04a8c3cbab --- /dev/null +++ b/app/design/frontend/base/default/template/page/js/calendar.phtml @@ -0,0 +1,94 @@ + + + + diff --git a/app/design/frontend/base/default/template/page/popup.phtml b/app/design/frontend/base/default/template/page/popup.phtml new file mode 100644 index 0000000000..a44ed53351 --- /dev/null +++ b/app/design/frontend/base/default/template/page/popup.phtml @@ -0,0 +1,44 @@ + + + + + +getChildHtml('head') ?> + + +
    + getChildHtml('content') ?> + getChildHtml('before_body_end') ?> +
    +getAbsoluteFooter() ?> + + diff --git a/app/design/frontend/base/default/template/page/print.phtml b/app/design/frontend/base/default/template/page/print.phtml new file mode 100644 index 0000000000..3e058076ef --- /dev/null +++ b/app/design/frontend/base/default/template/page/print.phtml @@ -0,0 +1,52 @@ + + + + + +getChildHtml('head') ?> + + +
    + + getChildHtml('content') ?> +
    + +
    + getAbsoluteFooter() ?> +
    + + diff --git a/app/design/frontend/base/default/template/page/redirect.phtml b/app/design/frontend/base/default/template/page/redirect.phtml new file mode 100644 index 0000000000..850ed39964 --- /dev/null +++ b/app/design/frontend/base/default/template/page/redirect.phtml @@ -0,0 +1,36 @@ + +
    +

    __('Redirecting...') ?>

    +
    +getMessage()): ?> +

    getMessage() ?>

    + +getRedirectOutput() ?> +isHtmlFormRedirect()): ?> +

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

    + diff --git a/app/design/frontend/base/default/template/page/switch/flags.phtml b/app/design/frontend/base/default/template/page/switch/flags.phtml new file mode 100644 index 0000000000..d0291588e3 --- /dev/null +++ b/app/design/frontend/base/default/template/page/switch/flags.phtml @@ -0,0 +1,37 @@ + +getStores())>1): ?> +
    + + +
    + diff --git a/app/design/frontend/base/default/template/page/switch/languages.phtml b/app/design/frontend/base/default/template/page/switch/languages.phtml new file mode 100644 index 0000000000..0aa86a67e3 --- /dev/null +++ b/app/design/frontend/base/default/template/page/switch/languages.phtml @@ -0,0 +1,44 @@ + + +getStores())>1): ?> +
    + + +
    + diff --git a/app/design/frontend/base/default/template/page/switch/stores.phtml b/app/design/frontend/base/default/template/page/switch/stores.phtml new file mode 100644 index 0000000000..d9f0a25b17 --- /dev/null +++ b/app/design/frontend/base/default/template/page/switch/stores.phtml @@ -0,0 +1,47 @@ + + +getGroups())>1): ?> +
    + + +
    + diff --git a/app/design/frontend/base/default/template/page/template/container.phtml b/app/design/frontend/base/default/template/page/template/container.phtml new file mode 100644 index 0000000000..7667444098 --- /dev/null +++ b/app/design/frontend/base/default/template/page/template/container.phtml @@ -0,0 +1,35 @@ + + +
    +

    getTitle() ?>

    +
    +getChildHtml() ?> diff --git a/app/design/frontend/base/default/template/page/template/links.phtml b/app/design/frontend/base/default/template/page/template/links.phtml new file mode 100644 index 0000000000..1871eeefbd --- /dev/null +++ b/app/design/frontend/base/default/template/page/template/links.phtml @@ -0,0 +1,39 @@ + + +getLinks(); ?> +0): ?> + + diff --git a/app/design/frontend/base/default/template/paybox/direct/form.phtml b/app/design/frontend/base/default/template/paybox/direct/form.phtml new file mode 100644 index 0000000000..a42ca991ac --- /dev/null +++ b/app/design/frontend/base/default/template/paybox/direct/form.phtml @@ -0,0 +1,92 @@ + + + +getMethodCode() ?> + diff --git a/app/design/frontend/base/default/template/paybox/direct/info.phtml b/app/design/frontend/base/default/template/paybox/direct/info.phtml new file mode 100644 index 0000000000..9daf53f925 --- /dev/null +++ b/app/design/frontend/base/default/template/paybox/direct/info.phtml @@ -0,0 +1,34 @@ + +getInfo()): ?> + getMethod()->getTitle() ?>
    + __('Name on the Card: %s', $this->htmlEscape($this->getInfo()->getCcOwner())) ?>
    + __('Credit Card Type: %s', $this->htmlEscape($this->getCcTypeName())) ?>
    + __('Credit Card Number: xxxx-%s', $this->htmlEscape($this->getInfo()->getCcLast4())) ?> + + + diff --git a/app/design/frontend/base/default/template/paybox/system/error.phtml b/app/design/frontend/base/default/template/paybox/system/error.phtml new file mode 100644 index 0000000000..8770e821af --- /dev/null +++ b/app/design/frontend/base/default/template/paybox/system/error.phtml @@ -0,0 +1,31 @@ + +
    +

    __('Error occured') ?>

    +
    +

    getErrorMessage() ?>.

    +

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

    diff --git a/app/design/frontend/base/default/template/paybox/system/form.phtml b/app/design/frontend/base/default/template/paybox/system/form.phtml new file mode 100644 index 0000000000..68195e9046 --- /dev/null +++ b/app/design/frontend/base/default/template/paybox/system/form.phtml @@ -0,0 +1,30 @@ + +getMethodCode() ?> + diff --git a/app/design/frontend/base/default/template/payment/form/cc.phtml b/app/design/frontend/base/default/template/payment/form/cc.phtml new file mode 100644 index 0000000000..542ec49af5 --- /dev/null +++ b/app/design/frontend/base/default/template/payment/form/cc.phtml @@ -0,0 +1,86 @@ + +getMethodCode() ?> + diff --git a/app/design/frontend/base/default/template/payment/form/ccsave.phtml b/app/design/frontend/base/default/template/payment/form/ccsave.phtml new file mode 100644 index 0000000000..58b198e4a4 --- /dev/null +++ b/app/design/frontend/base/default/template/payment/form/ccsave.phtml @@ -0,0 +1,85 @@ + +getMethodCode() ?> + diff --git a/app/design/frontend/base/default/template/payment/form/checkmo.phtml b/app/design/frontend/base/default/template/payment/form/checkmo.phtml new file mode 100644 index 0000000000..b70a8e9a90 --- /dev/null +++ b/app/design/frontend/base/default/template/payment/form/checkmo.phtml @@ -0,0 +1,43 @@ + +getMethod()->getMailingAddress() || $this->getMethod()->getPayableTo()): ?> + + diff --git a/app/design/frontend/base/default/template/payment/form/purchaseorder.phtml b/app/design/frontend/base/default/template/payment/form/purchaseorder.phtml new file mode 100644 index 0000000000..8f486537ea --- /dev/null +++ b/app/design/frontend/base/default/template/payment/form/purchaseorder.phtml @@ -0,0 +1,34 @@ + + diff --git a/app/design/frontend/base/default/template/payment/info/cc.phtml b/app/design/frontend/base/default/template/payment/info/cc.phtml new file mode 100644 index 0000000000..0d2bda8ac1 --- /dev/null +++ b/app/design/frontend/base/default/template/payment/info/cc.phtml @@ -0,0 +1,33 @@ + +getInfo()): ?> + + __('Credit Card Type: %s', $this->htmlEscape($this->getCcTypeName())) ?>
    + __('Credit Card Number: xxxx-%s', $this->htmlEscape($this->getInfo()->getCcLast4())) ?> + + + diff --git a/app/design/frontend/base/default/template/payment/info/ccsave.phtml b/app/design/frontend/base/default/template/payment/info/ccsave.phtml new file mode 100644 index 0000000000..942888d20f --- /dev/null +++ b/app/design/frontend/base/default/template/payment/info/ccsave.phtml @@ -0,0 +1,29 @@ + +__('Name on the Card: %s', $this->htmlEscape($this->getInfo()->getCcOwner())) ?>
    +__('Credit Card Type: %s', $this->htmlEscape($this->getCcTypeName())) ?>
    +__('Credit Card Number: xxxx-%s', $this->htmlEscape($this->getInfo()->getCcLast4())) ?> diff --git a/app/design/frontend/base/default/template/payment/info/checkmo.phtml b/app/design/frontend/base/default/template/payment/info/checkmo.phtml new file mode 100644 index 0000000000..b83758fa5f --- /dev/null +++ b/app/design/frontend/base/default/template/payment/info/checkmo.phtml @@ -0,0 +1,38 @@ + +

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

    diff --git a/app/design/frontend/base/default/template/payment/info/default.phtml b/app/design/frontend/base/default/template/payment/info/default.phtml new file mode 100644 index 0000000000..5a42b8e950 --- /dev/null +++ b/app/design/frontend/base/default/template/payment/info/default.phtml @@ -0,0 +1,27 @@ + +

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

    diff --git a/app/design/frontend/base/default/template/payment/info/purchaseorder.phtml b/app/design/frontend/base/default/template/payment/info/purchaseorder.phtml new file mode 100644 index 0000000000..6cfe4c4015 --- /dev/null +++ b/app/design/frontend/base/default/template/payment/info/purchaseorder.phtml @@ -0,0 +1,28 @@ + +

    getMethod()->getTitle() ?>

    +

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

    diff --git a/app/design/frontend/base/default/template/paypal/direct/finalize.phtml b/app/design/frontend/base/default/template/paypal/direct/finalize.phtml new file mode 100644 index 0000000000..2a8dccbce8 --- /dev/null +++ b/app/design/frontend/base/default/template/paypal/direct/finalize.phtml @@ -0,0 +1,39 @@ + + + diff --git a/app/design/frontend/base/default/template/paypal/direct/form.phtml b/app/design/frontend/base/default/template/paypal/direct/form.phtml new file mode 100644 index 0000000000..96749b90e0 --- /dev/null +++ b/app/design/frontend/base/default/template/paypal/direct/form.phtml @@ -0,0 +1,90 @@ + +getMethod()->get3DSecureEnabled()): ?> + + + + diff --git a/app/design/frontend/base/default/template/paypal/direct/info.phtml b/app/design/frontend/base/default/template/paypal/direct/info.phtml new file mode 100644 index 0000000000..ba3fd4102d --- /dev/null +++ b/app/design/frontend/base/default/template/paypal/direct/info.phtml @@ -0,0 +1,42 @@ + +getInfo()): ?> + +__('Credit Card Type: %s', $this->getCcTypeName()) ?>
    +__('Credit Card Number: xxxx-%s', $this->getInfo()->getCcLast4()) ?>
    +getInfo()->getCcSsIssue()): ?> +__("Switch/Solo card issue number: %s", $this->getInfo()->getCcSsIssue()) ?>
    + +getInfo()->getCcSsStartYear()): ?> +__('Switch/Solo card start Date: %s/%s', $this->getCcStartMonth(), $this->getInfo()->getCcSsStartYear()) ?> + + diff --git a/app/design/frontend/base/default/template/paypal/direct/validate.phtml b/app/design/frontend/base/default/template/paypal/direct/validate.phtml new file mode 100644 index 0000000000..e0129d3abc --- /dev/null +++ b/app/design/frontend/base/default/template/paypal/direct/validate.phtml @@ -0,0 +1,45 @@ + + +
    + + + +
    + + diff --git a/app/design/frontend/base/default/template/paypal/express/bank.phtml b/app/design/frontend/base/default/template/paypal/express/bank.phtml new file mode 100644 index 0000000000..6ed68c09d5 --- /dev/null +++ b/app/design/frontend/base/default/template/paypal/express/bank.phtml @@ -0,0 +1,32 @@ + +__('Order is completed. As soon as the Bank transfers money, the Order Items will be shipped.') ?> diff --git a/app/design/frontend/base/default/template/paypal/express/form.phtml b/app/design/frontend/base/default/template/paypal/express/form.phtml new file mode 100644 index 0000000000..1a02ceaf7d --- /dev/null +++ b/app/design/frontend/base/default/template/paypal/express/form.phtml @@ -0,0 +1,42 @@ + +getMethodCode() ?> + diff --git a/app/design/frontend/base/default/template/paypal/express/info.phtml b/app/design/frontend/base/default/template/paypal/express/info.phtml new file mode 100644 index 0000000000..49c31c385b --- /dev/null +++ b/app/design/frontend/base/default/template/paypal/express/info.phtml @@ -0,0 +1,32 @@ + +

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

    diff --git a/app/design/frontend/base/default/template/paypal/express/review.phtml b/app/design/frontend/base/default/template/paypal/express/review.phtml new file mode 100644 index 0000000000..c1e0e8fe2b --- /dev/null +++ b/app/design/frontend/base/default/template/paypal/express/review.phtml @@ -0,0 +1,149 @@ + +
    +

    __('Review Order') ?>

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

    __('Shipping Information') ?>

    +
    +

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

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

    __('Shipping Method') ?>

    + isVirtual()): ?> + __('No shipping method required.') ?> + + getShippingRates())): ?> +

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

    + + +
    + +

    + +

    +
    + + + + +
    +
    + +
    + +

    __('Billing Information') ?>

    +

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

    +

    __('PayPal Account') ?>

    +
    getBillingAddress()->getEmail() ?>
    + +

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

    + +
    + getChildHtml('details') ?> +
    + + +
    + +
    +
    + + + + +
    +
    + diff --git a/app/design/frontend/base/default/template/paypal/express/review/details.phtml b/app/design/frontend/base/default/template/paypal/express/review/details.phtml new file mode 100644 index 0000000000..4bde667ea2 --- /dev/null +++ b/app/design/frontend/base/default/template/paypal/express/review/details.phtml @@ -0,0 +1,75 @@ + + + + + + + + + + + + + + + getTotals()): ?> + + helper('tax')->displayCartBothPrices() ? 5 : 3; ?> + renderTotals(null, $_colspan); ?> + renderTotals('footer', $_colspan); ?> + needDisplayBaseGrandtotal()):?> + + + + + + + + + getItems() as $_item): ?> + getParentItem()) continue ?> + + + + + + + + +
    __('Product Name') ?>__('Price') ?>__('Qty') ?>__('Subtotal') ?>
    + helper('sales')->__('Your credit card will be charged for') ?> + + displayBaseGrandtotal() ?> +
    + getProduct()->getName() ?> + getProduct()->getDescription() ?> + helper('checkout')->formatPrice($_item->getCalculationPrice()); ?>getQty() ?>helper('checkout')->formatPrice($_item->getRowTotal()); ?>
    diff --git a/app/design/frontend/base/default/template/paypal/link.phtml b/app/design/frontend/base/default/template/paypal/link.phtml new file mode 100644 index 0000000000..aeb50b6b39 --- /dev/null +++ b/app/design/frontend/base/default/template/paypal/link.phtml @@ -0,0 +1,27 @@ + +
  • <?php echo Mage::helper('paypal')->__('PayPal Checkout');?>
  • diff --git a/app/design/frontend/base/default/template/paypal/standard/form.phtml b/app/design/frontend/base/default/template/paypal/standard/form.phtml new file mode 100644 index 0000000000..0993cad468 --- /dev/null +++ b/app/design/frontend/base/default/template/paypal/standard/form.phtml @@ -0,0 +1,41 @@ + +getMethodCode() ?> + diff --git a/app/design/frontend/base/default/template/paypaluk/direct/finalize.phtml b/app/design/frontend/base/default/template/paypaluk/direct/finalize.phtml new file mode 100644 index 0000000000..3ec9c3c8cf --- /dev/null +++ b/app/design/frontend/base/default/template/paypaluk/direct/finalize.phtml @@ -0,0 +1,39 @@ + + + diff --git a/app/design/frontend/base/default/template/paypaluk/direct/form.phtml b/app/design/frontend/base/default/template/paypaluk/direct/form.phtml new file mode 100644 index 0000000000..b6328d60c6 --- /dev/null +++ b/app/design/frontend/base/default/template/paypaluk/direct/form.phtml @@ -0,0 +1,195 @@ + + +getMethodCode() ?> +hasSsCardType()): ?> +
  • +
    +
    +
      +
    • + +
      + +
      +
    • +
    • + +
      + +
      +
      + +
      +
    • +
    •  
    • +
    +
    + + +
  • + + + +getMethod()->get3DSecureEnabled()): ?> + + + + diff --git a/app/design/frontend/base/default/template/paypaluk/direct/info.phtml b/app/design/frontend/base/default/template/paypaluk/direct/info.phtml new file mode 100644 index 0000000000..6bcbad9922 --- /dev/null +++ b/app/design/frontend/base/default/template/paypaluk/direct/info.phtml @@ -0,0 +1,42 @@ + +getInfo()): ?> + + __('Credit Card Type: %s', $this->getCcTypeName()) ?>
    + __('Credit Card Number: xxxx-%s', $this->getInfo()->getCcLast4()) ?>
    + getInfo()->getCcSsIssue()): ?> + __("Switch/Solo card issue number: %s", $this->getInfo()->getCcSsIssue()) ?>
    + + getInfo()->getCcSsStartYear()): ?> + __('Switch/Solo card start Date: %s/%s', $this->getCcStartMonth(), $this->getInfo()->getCcSsStartYear()) ?> + + diff --git a/app/design/frontend/base/default/template/paypaluk/direct/validate.phtml b/app/design/frontend/base/default/template/paypaluk/direct/validate.phtml new file mode 100644 index 0000000000..e873f772b3 --- /dev/null +++ b/app/design/frontend/base/default/template/paypaluk/direct/validate.phtml @@ -0,0 +1,46 @@ + + +
    + + + +
    + + diff --git a/app/design/frontend/base/default/template/paypaluk/express/form.phtml b/app/design/frontend/base/default/template/paypaluk/express/form.phtml new file mode 100644 index 0000000000..236487dfa5 --- /dev/null +++ b/app/design/frontend/base/default/template/paypaluk/express/form.phtml @@ -0,0 +1,42 @@ + +getMethodCode() ?> + diff --git a/app/design/frontend/base/default/template/paypaluk/express/info.phtml b/app/design/frontend/base/default/template/paypaluk/express/info.phtml new file mode 100644 index 0000000000..9bb5284280 --- /dev/null +++ b/app/design/frontend/base/default/template/paypaluk/express/info.phtml @@ -0,0 +1,33 @@ + +

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

    diff --git a/app/design/frontend/base/default/template/paypaluk/express/review.phtml b/app/design/frontend/base/default/template/paypaluk/express/review.phtml new file mode 100644 index 0000000000..7a23feb439 --- /dev/null +++ b/app/design/frontend/base/default/template/paypaluk/express/review.phtml @@ -0,0 +1,145 @@ + +
    +

    __('Review Order') ?>

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

    __('Shipping Information') ?>

    +
    +
    +

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

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

    __('Shipping Method') ?>

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

    +
    + + + +
    +
    +
    + +
    +

    __('Billing Information') ?>

    +

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

    +

    __('PayPal Uk Account') ?>

    + getBillingAddress()->getEmail() ?> +
    + +

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

    + + +
    + getChildHtml('details') ?> +
    + +
    +
    + + +
    +
    + diff --git a/app/design/frontend/base/default/template/paypaluk/express/review/details.phtml b/app/design/frontend/base/default/template/paypaluk/express/review/details.phtml new file mode 100644 index 0000000000..0530948f63 --- /dev/null +++ b/app/design/frontend/base/default/template/paypaluk/express/review/details.phtml @@ -0,0 +1,75 @@ + + + + + + + + + + + + + + + getTotals()): ?> + + helper('tax')->displayCartBothPrices() ? 5 : 3; ?> + renderTotals(null, $_colspan); ?> + renderTotals('footer', $_colspan); ?> + needDisplayBaseGrandtotal()):?> + + + + + + + + + getItems() as $_item): ?> + getParentItem()) continue ?> + + + + + + + + +
    __('Product Name') ?>__('Price') ?>__('Qty') ?>__('Subtotal') ?>
    + helper('sales')->__('Your credit card will be charged for') ?> + + displayBaseGrandtotal() ?> +
    + getProduct()->getName() ?> + getProduct()->getDescription() ?> + helper('checkout')->formatPrice($_item->getCalculationPrice()); ?>getQty() ?>helper('checkout')->formatPrice($_item->getRowTotal()); ?>
    diff --git a/app/design/frontend/base/default/template/paypaluk/link.phtml b/app/design/frontend/base/default/template/paypaluk/link.phtml new file mode 100644 index 0000000000..63dd214b09 --- /dev/null +++ b/app/design/frontend/base/default/template/paypaluk/link.phtml @@ -0,0 +1,27 @@ + +
  • <?php echo Mage::helper('paypalUk')->__('PayPal UK Checkout');?>
  • diff --git a/app/design/frontend/base/default/template/poll/active.phtml b/app/design/frontend/base/default/template/poll/active.phtml new file mode 100644 index 0000000000..2300b7bfef --- /dev/null +++ b/app/design/frontend/base/default/template/poll/active.phtml @@ -0,0 +1,66 @@ + + + +
    +
    + __('Community Poll') ?> +
    +
    +
    +

    getPollTitle(); ?>

    + +
      + +
    • + + +
    • + +
    + + +
    + +
    +
    +
    +
    + diff --git a/app/design/frontend/base/default/template/poll/result.phtml b/app/design/frontend/base/default/template/poll/result.phtml new file mode 100644 index 0000000000..c2aa752a8d --- /dev/null +++ b/app/design/frontend/base/default/template/poll/result.phtml @@ -0,0 +1,47 @@ + + +
    +
    + __('Community Poll') ?> +
    +
    +

    getPollTitle(); ?>

    + +
      + +
    1. + getVotesCount() ?> (getPercent() ?>%) + getAnswerTitle() ?>: +
    2. + +
    + + +
    +
    + diff --git a/app/design/frontend/base/default/template/productalert/price.phtml b/app/design/frontend/base/default/template/productalert/price.phtml new file mode 100644 index 0000000000..0203d6aa17 --- /dev/null +++ b/app/design/frontend/base/default/template/productalert/price.phtml @@ -0,0 +1,29 @@ + +isShow()): ?> +

    __('Sign up for price alert'); ?>

    + diff --git a/app/design/frontend/base/default/template/productalert/stock.phtml b/app/design/frontend/base/default/template/productalert/stock.phtml new file mode 100644 index 0000000000..213f2aaadc --- /dev/null +++ b/app/design/frontend/base/default/template/productalert/stock.phtml @@ -0,0 +1,29 @@ + +isShow()): ?> +

    __('Sign up to get notified when this product is back in stock'); ?>

    + diff --git a/app/design/frontend/base/default/template/protx/standard/failure.phtml b/app/design/frontend/base/default/template/protx/standard/failure.phtml new file mode 100644 index 0000000000..8770e821af --- /dev/null +++ b/app/design/frontend/base/default/template/protx/standard/failure.phtml @@ -0,0 +1,31 @@ + +
    +

    __('Error occured') ?>

    +
    +

    getErrorMessage() ?>.

    +

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

    diff --git a/app/design/frontend/base/default/template/protx/standard/form.phtml b/app/design/frontend/base/default/template/protx/standard/form.phtml new file mode 100644 index 0000000000..281f191ba8 --- /dev/null +++ b/app/design/frontend/base/default/template/protx/standard/form.phtml @@ -0,0 +1,30 @@ + +getMethodCode() ?> + diff --git a/app/design/frontend/base/default/template/rating/detailed.phtml b/app/design/frontend/base/default/template/rating/detailed.phtml new file mode 100644 index 0000000000..b12e934b39 --- /dev/null +++ b/app/design/frontend/base/default/template/rating/detailed.phtml @@ -0,0 +1,46 @@ + +getSize()): ?> + + + + + + getSummary()): ?> + + + + + + + +
    __($_rating->getRatingCode()) ?> +
    +
    +
    +
    + diff --git a/app/design/frontend/base/default/template/rating/empty.phtml b/app/design/frontend/base/default/template/rating/empty.phtml new file mode 100644 index 0000000000..25c62b4c04 --- /dev/null +++ b/app/design/frontend/base/default/template/rating/empty.phtml @@ -0,0 +1,27 @@ + +

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

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

    __('Your Recently Compared') ?>

    +getColumnCount(); ?> + + + + + + diff --git a/app/design/frontend/base/default/template/reports/home_product_viewed.phtml b/app/design/frontend/base/default/template/reports/home_product_viewed.phtml new file mode 100644 index 0000000000..52bb2a536c --- /dev/null +++ b/app/design/frontend/base/default/template/reports/home_product_viewed.phtml @@ -0,0 +1,65 @@ + + +getRecentlyViewedProducts()): ?> +

    __('Your Recently Viewed') ?>

    +getColumnCount(); ?> + + + + + + diff --git a/app/design/frontend/base/default/template/reports/product_compared.phtml b/app/design/frontend/base/default/template/reports/product_compared.phtml new file mode 100644 index 0000000000..6b6f4646b3 --- /dev/null +++ b/app/design/frontend/base/default/template/reports/product_compared.phtml @@ -0,0 +1,42 @@ + +getRecentlyComparedProducts()): ?> +
    +
    + __('Recently Compared Products') ?> +
    +
    +
      + +
    1. htmlEscape($_item->getName()) ?>

    2. + +
    + +
    +
    + diff --git a/app/design/frontend/base/default/template/reports/product_viewed.phtml b/app/design/frontend/base/default/template/reports/product_viewed.phtml new file mode 100644 index 0000000000..db8e375799 --- /dev/null +++ b/app/design/frontend/base/default/template/reports/product_viewed.phtml @@ -0,0 +1,42 @@ + +getRecentlyViewedProducts()): ?> +
    +
    + __('Recently Viewed Products') ?> +
    +
    +
      + +
    1. htmlEscape($_item->getName()) ?>

    2. + +
    + +
    +
    + diff --git a/app/design/frontend/base/default/template/reports/widget/compared/column/compared_default_list.phtml b/app/design/frontend/base/default/template/reports/widget/compared/column/compared_default_list.phtml new file mode 100644 index 0000000000..b1cee3f8b3 --- /dev/null +++ b/app/design/frontend/base/default/template/reports/widget/compared/column/compared_default_list.phtml @@ -0,0 +1,55 @@ + +getRecentlyComparedProducts()): ?> +
    +
    +
    + __('Recently Compared') ?> +
    +
    + getNameInLayout(); ?> +
      + +
    1. + <?php echo $this->htmlEscape($_product->getName()) ?> +
      +

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

      + getPriceHtml($_product, true, '-widget-compared-'.$suffix) ?> + isSaleable()): ?> + __('Add to Cart') ?> + +

      __('Out of stock') ?>

      + +
      +
    2. + +
    + +
    +
    +
    + diff --git a/app/design/frontend/base/default/template/reports/widget/compared/column/compared_images_list.phtml b/app/design/frontend/base/default/template/reports/widget/compared/column/compared_images_list.phtml new file mode 100644 index 0000000000..d7abc17470 --- /dev/null +++ b/app/design/frontend/base/default/template/reports/widget/compared/column/compared_images_list.phtml @@ -0,0 +1,46 @@ + +getRecentlyComparedProducts()): ?> +
    +
    +
    + __('Recently Compared') ?> +
    +
    + getNameInLayout(); ?> +
      + +
    1. + <?php echo $this->htmlEscape($_product->getName()) ?> +
    2. + +
    + +
    +
    +
    + diff --git a/app/design/frontend/base/default/template/reports/widget/compared/column/compared_names_list.phtml b/app/design/frontend/base/default/template/reports/widget/compared/column/compared_names_list.phtml new file mode 100644 index 0000000000..791d3ee281 --- /dev/null +++ b/app/design/frontend/base/default/template/reports/widget/compared/column/compared_names_list.phtml @@ -0,0 +1,46 @@ + +getRecentlyComparedProducts()): ?> +
    +
    +
    + __('Recently Compared') ?> +
    +
    + getNameInLayout(); ?> +
      + +
    1. +

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

      +
    2. + +
    + +
    +
    +
    + diff --git a/app/design/frontend/base/default/template/reports/widget/compared/content/compared_grid.phtml b/app/design/frontend/base/default/template/reports/widget/compared/content/compared_grid.phtml new file mode 100644 index 0000000000..b0e3284df4 --- /dev/null +++ b/app/design/frontend/base/default/template/reports/widget/compared/content/compared_grid.phtml @@ -0,0 +1,65 @@ + +getRecentlyComparedProducts()): ?> +
    +
    +

    __('Recently Compared') ?>

    +
    +
    + getColumnCount(); ?> + + + + + +
    +
    + diff --git a/app/design/frontend/base/default/template/reports/widget/compared/content/compared_list.phtml b/app/design/frontend/base/default/template/reports/widget/compared/content/compared_list.phtml new file mode 100644 index 0000000000..2027380e55 --- /dev/null +++ b/app/design/frontend/base/default/template/reports/widget/compared/content/compared_list.phtml @@ -0,0 +1,62 @@ + +getRecentlyComparedProducts()): ?> +
    +
    +

    __('Recently Compared') ?>

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

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

      + getReviewsSummaryHtml($_product, 'short') ?> + getPriceHtml($_product, true, '-widget-compared-list') ?> + isSaleable()): ?> + + +

      __('Out of stock') ?>

      + + +
      +
      +
    2. + +
    +
    +
    + diff --git a/app/design/frontend/base/default/template/reports/widget/viewed/column/viewed_default_list.phtml b/app/design/frontend/base/default/template/reports/widget/viewed/column/viewed_default_list.phtml new file mode 100644 index 0000000000..538a9d0d15 --- /dev/null +++ b/app/design/frontend/base/default/template/reports/widget/viewed/column/viewed_default_list.phtml @@ -0,0 +1,60 @@ + + +getRecentlyViewedProducts()): ?> +
    +
    +
    + __('Recently Viewed') ?> +
    +
    + getNameInLayout(); ?> +
      + +
    1. + <?php echo $this->htmlEscape($_product->getName()) ?> +
      +

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

      + getPriceHtml($_product, true, '-widget-viewed-'.$suffix) ?> + isSaleable()): ?> + __('Add to Cart') ?> + +

      __('Out of stock') ?>

      + +
      +
    2. + +
    + +
    +
    +
    + diff --git a/app/design/frontend/base/default/template/reports/widget/viewed/column/viewed_images_list.phtml b/app/design/frontend/base/default/template/reports/widget/viewed/column/viewed_images_list.phtml new file mode 100644 index 0000000000..f5a92bd2a1 --- /dev/null +++ b/app/design/frontend/base/default/template/reports/widget/viewed/column/viewed_images_list.phtml @@ -0,0 +1,51 @@ + + +getRecentlyViewedProducts()): ?> +
    +
    +
    + __('Recently Viewed') ?> +
    +
    + getNameInLayout(); ?> +
      + +
    1. + <?php echo $this->htmlEscape($_product->getName()) ?> +
    2. + +
    + +
    +
    +
    + diff --git a/app/design/frontend/base/default/template/reports/widget/viewed/column/viewed_names_list.phtml b/app/design/frontend/base/default/template/reports/widget/viewed/column/viewed_names_list.phtml new file mode 100644 index 0000000000..e3107daf00 --- /dev/null +++ b/app/design/frontend/base/default/template/reports/widget/viewed/column/viewed_names_list.phtml @@ -0,0 +1,51 @@ + + +getRecentlyViewedProducts()): ?> +
    +
    +
    + __('Recently Viewed') ?> +
    +
    + getNameInLayout(); ?> +
      + +
    1. +

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

      +
    2. + +
    + +
    +
    +
    + diff --git a/app/design/frontend/base/default/template/reports/widget/viewed/content/viewed_grid.phtml b/app/design/frontend/base/default/template/reports/widget/viewed/content/viewed_grid.phtml new file mode 100644 index 0000000000..c03e18ef39 --- /dev/null +++ b/app/design/frontend/base/default/template/reports/widget/viewed/content/viewed_grid.phtml @@ -0,0 +1,70 @@ + + +getRecentlyViewedProducts()): ?> +
    +
    +

    __('Recently Viewed') ?>

    +
    +
    + getColumnCount(); ?> + + + + + +
    +
    + diff --git a/app/design/frontend/base/default/template/reports/widget/viewed/content/viewed_list.phtml b/app/design/frontend/base/default/template/reports/widget/viewed/content/viewed_list.phtml new file mode 100644 index 0000000000..5880a15279 --- /dev/null +++ b/app/design/frontend/base/default/template/reports/widget/viewed/content/viewed_list.phtml @@ -0,0 +1,67 @@ + + +getRecentlyViewedProducts()): ?> +
    +
    +

    __('Recently Viewed') ?>

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

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

      + getReviewsSummaryHtml($_product, 'short') ?> + getPriceHtml($_product, true, '-widget-viewed-list') ?> + isSaleable()): ?> + + +

      __('Out of stock') ?>

      + + +
      +
      +
    2. + +
    +
    +
    + diff --git a/app/design/frontend/base/default/template/review/customer/list.phtml b/app/design/frontend/base/default/template/review/customer/list.phtml new file mode 100644 index 0000000000..6c89d5aae7 --- /dev/null +++ b/app/design/frontend/base/default/template/review/customer/list.phtml @@ -0,0 +1,64 @@ + +getMessagesBlock()->getGroupedHtml() ?> +
    +

    __('My Product Reviews') ?>

    +
    +getCollection() && $this->count()): ?> + getToolbarHtml() ?> + + + + + + + + getCollection() as $_review): ?> + + + + + + + + + +
    dateFormat($_review->getCreatedAt()) ?>

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

    + getSum()): ?> +
    +
    +
    + +
    htmlEscape($this->helper('review')->getDetail($_review->getDetail())) ?>__('View Details') ?>
    + + getToolbarHtml() ?> + +

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

    + + diff --git a/app/design/frontend/base/default/template/review/customer/recent.phtml b/app/design/frontend/base/default/template/review/customer/recent.phtml new file mode 100644 index 0000000000..f5cdbd248a --- /dev/null +++ b/app/design/frontend/base/default/template/review/customer/recent.phtml @@ -0,0 +1,54 @@ + +getCollection() && $this->count()): ?> + + diff --git a/app/design/frontend/base/default/template/review/customer/view.phtml b/app/design/frontend/base/default/template/review/customer/view.phtml new file mode 100644 index 0000000000..2e22d9121f --- /dev/null +++ b/app/design/frontend/base/default/template/review/customer/view.phtml @@ -0,0 +1,71 @@ + +getProductData()->getId()): ?> +
    +
    +

    __('Review Details') ?>

    +
    +
    + <?php echo $this->htmlEscape($this->getProductData()->getName()) ?> + getRating() && $this->getRating()->getSize()): ?> +

    __('Average Customer Rating:') ?>

    + getReviewsSummaryHtml($this->getProductData()) ?> + +
    +
    +

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

    + getRating() && $this->getRating()->getSize()): ?> +

    __('Your Rating:') ?>

    + + getRating() as $_rating): ?> + getPercent()): ?> + + + + + + +
    getRatingCode() ?> +
    +
    +
    +
    + +
    +
    + __('Your Review (submitted on %s):', $this->dateFormat($this->getReviewData()->getCreatedAt())) ?> +
    +
    + htmlEscape($this->getReviewData()->getDetail())) ?> +
    +
    +
    + +
    + diff --git a/app/design/frontend/base/default/template/review/form.phtml b/app/design/frontend/base/default/template/review/form.phtml new file mode 100644 index 0000000000..2e082bbecc --- /dev/null +++ b/app/design/frontend/base/default/template/review/form.phtml @@ -0,0 +1,123 @@ + +
    +
    +

    __('Write Your Own Review') ?>

    +

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

    + getRatings() && $this->getRatings()->getSize()): ?> +

    __('How do you rate this product?') ?> *

    + + + + + + + + + + + + + + + + + + + + getRatings() as $_rating): ?> + + + getOptions() as $_option): ?> + + + + + +
     __('1 star') ?>__('2 stars') ?>__('3 stars') ?>__('4 stars') ?>__('5 stars') ?>
    getRatingCode() ?>
    + + + +
      +
    • + +
      + +
      +
    • +
    • + +
      + +
      +
    • +
    • + +
      + +
      +
    • +
    +
    +
    + +
    +
    + diff --git a/app/design/frontend/base/default/template/review/helper/summary.phtml b/app/design/frontend/base/default/template/review/helper/summary.phtml new file mode 100644 index 0000000000..b52cd5fd9a --- /dev/null +++ b/app/design/frontend/base/default/template/review/helper/summary.phtml @@ -0,0 +1,42 @@ + +getReviewsCount()): ?> +
    + getRatingSummary()):?> +
    +
    +
    + + +
    +getDisplayIfEmpty()): ?> +

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

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

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

    + diff --git a/app/design/frontend/base/default/template/review/product/view/count.phtml b/app/design/frontend/base/default/template/review/product/view/count.phtml new file mode 100644 index 0000000000..5fde8c9fcc --- /dev/null +++ b/app/design/frontend/base/default/template/review/product/view/count.phtml @@ -0,0 +1,29 @@ + + + __('%s Review(s)', $count) ?> + diff --git a/app/design/frontend/base/default/template/review/product/view/list.phtml b/app/design/frontend/base/default/template/review/product/view/list.phtml new file mode 100644 index 0000000000..e9bdbc4471 --- /dev/null +++ b/app/design/frontend/base/default/template/review/product/view/list.phtml @@ -0,0 +1,66 @@ + + +getReviewsCollection()->getItems();?> +
    + +

    __('Customer Reviews') ?>

    + getChildHtml('toolbar') ?> +
    + +
    + htmlEscape($_review->getTitle()) ?> __('Review by %s', $this->htmlEscape($_review->getNickname())) ?> +
    +
    + getRatingVotes(); ?> + + + + + + + + + + + + +
    getRatingCode() ?> +
    +
    +
    +
    + + htmlEscape($_review->getDetail())) ?> + __('(Posted on %s)', $this->formatDate($_review->getCreatedAt()), 'long') ?> +
    + +
    + getChildHtml('toolbar') ?> + + getChildHtml('review_form') ?> +
    diff --git a/app/design/frontend/base/default/template/review/product/view/other.phtml b/app/design/frontend/base/default/template/review/product/view/other.phtml new file mode 100644 index 0000000000..d518dc9916 --- /dev/null +++ b/app/design/frontend/base/default/template/review/product/view/other.phtml @@ -0,0 +1,31 @@ + + + + diff --git a/app/design/frontend/base/default/template/review/view.phtml b/app/design/frontend/base/default/template/review/view.phtml new file mode 100644 index 0000000000..c2362725d1 --- /dev/null +++ b/app/design/frontend/base/default/template/review/view.phtml @@ -0,0 +1,72 @@ + +getProductData()->getId()): ?> +
    +
    +

    __('Review Details') ?>

    +
    +
    + <?php echo $this->htmlEscape($this->getProductData()->getName()) ?> + getRating() && $this->getRating()->getSize()): ?> +

    __('Average Customer Rating') ?>:

    + getReviewsSummaryHtml($this->getProductData()) ?> + +
    +
    +

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

    + getRating() && $this->getRating()->getSize()): ?> +

    __('Product Rating:') ?>

    + + getRating() as $_rating): ?> + getPercent()): ?> + + + + + + +
    __($_rating->getRatingCode()) ?> +
    +
    +
    +
    + + +
    +
    + __('Product Review (submitted on %s):', $this->dateFormat($this->getReviewData()->getCreatedAt())) ?> +
    +
    + htmlEscape($this->getReviewData()->getDetail())) ?> +
    +
    +
    + +
    + diff --git a/app/design/frontend/base/default/template/rss/list.phtml b/app/design/frontend/base/default/template/rss/list.phtml new file mode 100644 index 0000000000..5dbf48f629 --- /dev/null +++ b/app/design/frontend/base/default/template/rss/list.phtml @@ -0,0 +1,84 @@ + +
    +

    __('RSS Feeds') ?>

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

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

    + diff --git a/app/design/frontend/base/default/template/rss/nofeed.phtml b/app/design/frontend/base/default/template/rss/nofeed.phtml new file mode 100644 index 0000000000..eec882c218 --- /dev/null +++ b/app/design/frontend/base/default/template/rss/nofeed.phtml @@ -0,0 +1,27 @@ + +

    There was no RSS feed enabled.

    diff --git a/app/design/frontend/base/default/template/rss/order/details.phtml b/app/design/frontend/base/default/template/rss/order/details.phtml new file mode 100644 index 0000000000..e94fc8110f --- /dev/null +++ b/app/design/frontend/base/default/template/rss/order/details.phtml @@ -0,0 +1,101 @@ +getStore()->getName() +web site name = $_order->getStore()->getWebsite()->getName() +store name = $_order->getStore()->getGroup()->getName() +*/ +?> +getOrder() ?> +
    +__('Customer Name: %s', $_order->getCustomerFirstname()?$_order->getCustomerName():$_order->getBillingAddress()->getName()) ?>
    +__('Purchased From: %s', $_order->getStore()->getGroup()->getName()) ?>
    +
    + + + + + + + + + + +getAllItems() as $_item): $i++ ?> + > + + + + + + + + + getGiftMessageId() && $_giftMessage = $this->helper('giftmessage/message')->getGiftMessage($_order->getGiftMessageId())): ?> + + + + + + + + + getDiscountAmount() > 0): ?> + + + + + + getShippingAmount() || $_order->getShippingDescription()): ?> + + + + + + getTaxAmount() > 0): ?> + + + + + + + + + + +
    ItemQtySubtotal
    htmlEscape($_item->getName()) ?> + getGiftMessageId() && $_giftMessage = $this->helper('giftmessage/message')->getGiftMessage($_item->getGiftMessageId())): ?> +
    __('Gift Message') ?> +
    __('From:'); ?> htmlEscape($_giftMessage->getSender()) ?> +
    __('To:'); ?> htmlEscape($_giftMessage->getRecipient()) ?> +
    __('Message:'); ?>
    htmlEscape($_giftMessage->getMessage()) ?> + +
    getQtyOrdered()*1 ?>formatPrice($_item->getRowTotal()) ?>
    + __('Gift Message') ?> +
    __('From:'); ?> htmlEscape($_giftMessage->getSender()) ?> +
    __('To:'); ?> htmlEscape($_giftMessage->getRecipient()) ?> +
    __('Message:'); ?>
    htmlEscape($_giftMessage->getMessage()) ?> +
    __('Subtotal') ?>formatPrice($_order->getSubtotal()) ?>
    __('Discount '.($_order->getCouponCode()?'('.$_order->getCouponCode().')':'')) ?>formatPrice(0.00 - $_order->getDiscountAmount()) ?>
    __('Shipping & Handling') ?>formatPrice($_order->getShippingAmount()) ?>
    __('Tax') ?>formatPrice($_order->getTaxAmount()) ?>
    __('Grand Total') ?>formatPrice($_order->getGrandTotal()) ?>
    diff --git a/app/design/frontend/base/default/template/sales/order/creditmemo.phtml b/app/design/frontend/base/default/template/sales/order/creditmemo.phtml new file mode 100644 index 0000000000..0187f5f498 --- /dev/null +++ b/app/design/frontend/base/default/template/sales/order/creditmemo.phtml @@ -0,0 +1,61 @@ + +helper('giftmessage/message')->getIsMessagesAvailable('order', $this->getOrder())): ?> + + + getChildHtml('creditmemo_items') ?> + diff --git a/app/design/frontend/base/default/template/sales/order/creditmemo/items.phtml b/app/design/frontend/base/default/template/sales/order/creditmemo/items.phtml new file mode 100644 index 0000000000..90c95ed38f --- /dev/null +++ b/app/design/frontend/base/default/template/sales/order/creditmemo/items.phtml @@ -0,0 +1,67 @@ + +getOrder() ?> +
    +

    __('Print All Refunds') ?>

    + getCreditmemosCollection() as $_creditmemo): ?> + __('Print Refund') ?> +

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

    +

    __('Items Refunded') ?>

    + + + + + + + + + + + + + + + + + + + + + getTotalsHtml($_creditmemo);?> + + getAllItems(); ?> + + + getOrderItem()->getParentItem()) continue; ?> + + getItemHtml($_item) ?> + + +
    __('Product Name') ?>__('SKU') ?>__('Price') ?>__('Qty') ?>__('Subtotal') ?>__('Discount Amount') ?>__('Row Total') ?>
    + + +
    diff --git a/app/design/frontend/base/default/template/sales/order/creditmemo/items/renderer/default.phtml b/app/design/frontend/base/default/template/sales/order/creditmemo/items/renderer/default.phtml new file mode 100644 index 0000000000..78cd32f328 --- /dev/null +++ b/app/design/frontend/base/default/template/sales/order/creditmemo/items/renderer/default.phtml @@ -0,0 +1,298 @@ + +getItem() ?> +getItem()->getOrderItem()->getOrder() ?> + +

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

    + getItemOptions()): ?> +
    + +
    htmlEscape($_option['label']) ?>
    + getPrintStatus()): ?> + getFormatedOptionValue($_option) ?> + class="truncated"> + +
    +
    +
    htmlEscape($_option['label']) ?>
    +
    +
    +
    + + + +
    htmlEscape( (isset($_option['print_value']) ? $_option['print_value'] : $_option['value']) ) ?>
    + + +
    + + getDescription() ?> + helper('giftmessage/message')->getIsMessagesAvailable('order_item', $_item->getOrderItem()) && $_item->getGiftMessageId()): ?> + __('Gift Message') ?> + + + splitInjection($this->getSku()) ?> + + helper('tax')->displaySalesBothPrices() || $this->helper('tax')->displaySalesPriceExclTax()): ?> + + helper('tax')->displaySalesBothPrices()): ?> + typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> + + + __('Excl. Tax'); ?>: + typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> + + + + typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> + + + + + + typeOfDisplay($this->getItem(), array(0, 1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> + getOrder()->formatPrice($this->getItem()->getPrice()+$this->getItem()->getWeeeTaxAppliedAmount()+$this->getItem()->getWeeeTaxDisposition()); ?> + + getOrder()->formatPrice($this->getItem()->getPrice()) ?> + + + + + + getApplied($this->getItem())): ?> + + + + typeOfDisplay($this->getItem(), 2, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> + + __('Total'); ?>:
    getOrder()->formatPrice($this->getItem()->getPrice()+$this->getItem()->getWeeeTaxAppliedAmount()+$this->getItem()->getWeeeTaxDisposition()); ?>
    +
    + + +
    +
    + + helper('tax')->displaySalesBothPrices() || $this->helper('tax')->displaySalesPriceInclTax()): ?> + + helper('tax')->displaySalesBothPrices()): ?> + typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> + + + __('Incl. Tax'); ?>: + typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> + + + + helper('checkout')->getPriceInclTax($this->getItem()); ?> + typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> + + + + + + typeOfDisplay($this->getItem(), array(0, 1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> + getOrder()->formatPrice($_incl+$this->getItem()->getWeeeTaxAppliedAmount()); ?> + + getOrder()->formatPrice($_incl-$this->getItem()->getWeeeTaxDisposition()) ?> + + + + + + getApplied($this->getItem())): ?> + + + + typeOfDisplay($this->getItem(), 2, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> + + __('Total incl. tax'); ?>:
    getOrder()->formatPrice($_incl+$this->getItem()->getWeeeTaxAppliedAmount()); ?>
    +
    + + +
    + + + getQty()*1 ?> + + helper('tax')->displaySalesBothPrices() || $this->helper('tax')->displaySalesPriceExclTax()): ?> + + helper('tax')->displaySalesBothPrices()): ?> + typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> + + + __('Excl. Tax'); ?>: + typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> + + + + typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> + + + + + + typeOfDisplay($this->getItem(), array(0, 1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> + getOrder()->formatPrice($this->getItem()->getRowTotal()+$this->getItem()->getWeeeTaxAppliedRowAmount()+$this->getItem()->getWeeeTaxRowDisposition()); ?> + + getOrder()->formatPrice($this->getItem()->getRowTotal()) ?> + + + + + + getApplied($this->getItem())): ?> + + + + typeOfDisplay($this->getItem(), 2, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> + + __('Total'); ?>:
    getOrder()->formatPrice($this->getItem()->getRowTotal()+$this->getItem()->getWeeeTaxAppliedRowAmount()+$this->getItem()->getWeeeTaxRowDisposition()); ?>
    +
    + + +
    +
    + + helper('tax')->displaySalesBothPrices() || $this->helper('tax')->displaySalesPriceInclTax()): ?> + + helper('tax')->displaySalesBothPrices()): ?> + typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> + + + __('Incl. Tax'); ?>: + typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> + + + + helper('checkout')->getSubtotalInclTax($this->getItem()); ?> + typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> + + + + + typeOfDisplay($this->getItem(), array(0, 1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> + getOrder()->formatPrice($_incl+$this->getItem()->getWeeeTaxAppliedRowAmount()); ?> + + getOrder()->formatPrice($_incl-$this->getItem()->getWeeeTaxRowDisposition()) ?> + + + + + + getApplied($this->getItem())): ?> + + + + typeOfDisplay($this->getItem(), 2, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> + + __('Total incl. tax'); ?>:
    getOrder()->formatPrice($_incl+$this->getItem()->getWeeeTaxAppliedRowAmount()); ?>
    +
    + + + + + +
    + + + formatPrice(-$_item->getDiscountAmount()) ?> + + formatPrice($_item->getRowTotal()-$_item->getDiscountAmount()+$_item->getTaxAmount()+$_item->getWeeeTaxAppliedRowAmount()) ?> + + diff --git a/app/design/frontend/base/default/template/sales/order/details.phtml b/app/design/frontend/base/default/template/sales/order/details.phtml new file mode 100644 index 0000000000..c0b09a6338 --- /dev/null +++ b/app/design/frontend/base/default/template/sales/order/details.phtml @@ -0,0 +1,112 @@ + +getOrder() ?> +
    +

    __('My Orders - Details') ?>

    + +
    +

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

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

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

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

    __('Shipping Address') ?>

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

    __('Billing Address') ?>

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

    __('Shipping Method') ?>

    + getShippingMethod() ?> getShippingDescription() ?> +
    +
    +

    __('Payment Method') ?>

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

    __('Items Ordered') ?>

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

    __('My Orders') ?>

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

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

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

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

    + helper('rss/order')->isStatusNotificationAllow()): ?> + __('Subscribe to Order Status') ?> + | + + helper('sales/reorder')->canReorder($_order)) : ?> + __('Reorder') ?> + | + + __('Print Order') ?> +
    +getStatusHistoryRssUrl($_order) ?> +
    +
    __('About This Order:') ?>
    +
    + getLinks(); ?> + +
    +
    +

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

    +getIsVirtual()): ?> +
    +
    +
    +
    +

    __('Shipping Address') ?>

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

    __('Shipping Method') ?>__('Track Order') ?>*/ ?>

    +
    +
    + getShippingDescription()): ?> + getShippingDescription() ?> + +

    helper('sales')->__('No shipping information available'); ?>

    + +
    +
    +
    +
    + +
    +
    +
    +
    +

    __('Billing Address') ?>

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

    __('Payment Method') ?>

    +
    +
    + getPaymentInfoHtml() ?> +
    +
    +
    +
    diff --git a/app/design/frontend/base/default/template/sales/order/invoice.phtml b/app/design/frontend/base/default/template/sales/order/invoice.phtml new file mode 100644 index 0000000000..186adaae9f --- /dev/null +++ b/app/design/frontend/base/default/template/sales/order/invoice.phtml @@ -0,0 +1,61 @@ + +helper('giftmessage/message')->getIsMessagesAvailable('order', $this->getOrder())): ?> + + +getChildHtml('invoice_items') ?> + diff --git a/app/design/frontend/base/default/template/sales/order/invoice/items.phtml b/app/design/frontend/base/default/template/sales/order/invoice/items.phtml new file mode 100644 index 0000000000..c9fda19dfb --- /dev/null +++ b/app/design/frontend/base/default/template/sales/order/invoice/items.phtml @@ -0,0 +1,63 @@ + +getOrder() ?> +
    +

    __('Print All Invoices') ?>

    + getInvoiceCollection() as $_invoice): ?> + __('Print Invoice') ?> +

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

    +

    __('Items Invoiced') ?>

    + + + + + + + + + + + + + + + + + getInvoiceTotalsHtml($_invoice)?> + + getAllItems(); ?> + + + getOrderItem()->getParentItem()) continue; ?> + + getItemHtml($_item) ?> + + +
    __('Product Name') ?>__('SKU') ?>__('Price') ?>__('Qty Invoiced') ?>__('Subtotal') ?>
    + + +
    diff --git a/app/design/frontend/base/default/template/sales/order/invoice/items/renderer/default.phtml b/app/design/frontend/base/default/template/sales/order/invoice/items/renderer/default.phtml new file mode 100644 index 0000000000..e0f0d28427 --- /dev/null +++ b/app/design/frontend/base/default/template/sales/order/invoice/items/renderer/default.phtml @@ -0,0 +1,295 @@ + +getItem() ?> +getItem()->getOrderItem()->getOrder() ?> + +

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

    + getItemOptions()): ?> +
    + +
    htmlEscape($_option['label']) ?>
    + getPrintStatus()): ?> + getFormatedOptionValue($_option) ?> + class="truncated"> + + +
    +
    +
    htmlEscape($_option['label']) ?>
    +
    +
    +
    + + + +
    htmlEscape( (isset($_option['print_value']) ? $_option['print_value'] : $_option['value']) ) ?>
    + + +
    + + getDescription() ?> + helper('giftmessage/message')->getIsMessagesAvailable('order_item', $_item->getOrderItem()) && $_item->getGiftMessageId()): ?> + __('Gift Message') ?> + + + splitInjection($this->getSku()) ?> + + helper('tax')->displaySalesBothPrices() || $this->helper('tax')->displaySalesPriceExclTax()): ?> + + helper('tax')->displaySalesBothPrices()): ?> + typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> + + + __('Excl. Tax'); ?>: + typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> + + + + typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> + + + + + + typeOfDisplay($this->getItem(), array(0, 1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> + getOrder()->formatPrice($this->getItem()->getPrice()+$this->getItem()->getWeeeTaxAppliedAmount()+$this->getItem()->getWeeeTaxDisposition()); ?> + + getOrder()->formatPrice($this->getItem()->getPrice()) ?> + + + + + + getApplied($this->getItem())): ?> + + + + typeOfDisplay($this->getItem(), 2, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> + + __('Total'); ?>:
    getOrder()->formatPrice($this->getItem()->getPrice()+$this->getItem()->getWeeeTaxAppliedAmount()+$this->getItem()->getWeeeTaxDisposition()); ?>
    +
    + + +
    +
    + + helper('tax')->displaySalesBothPrices() || $this->helper('tax')->displaySalesPriceInclTax()): ?> + + helper('tax')->displaySalesBothPrices()): ?> + typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> + + + __('Incl. Tax'); ?>: + typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> + + + + helper('checkout')->getPriceInclTax($this->getItem()); ?> + typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> + + + + + + typeOfDisplay($this->getItem(), array(0, 1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> + getOrder()->formatPrice($_incl+$this->getItem()->getWeeeTaxAppliedAmount()); ?> + + getOrder()->formatPrice($_incl-$this->getItem()->getWeeeTaxDisposition()) ?> + + + + + + getApplied($this->getItem())): ?> + + + + typeOfDisplay($this->getItem(), 2, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> + + __('Total incl. tax'); ?>:
    getOrder()->formatPrice($_incl+$this->getItem()->getWeeeTaxAppliedAmount()); ?>
    +
    + + +
    + + + getQty()*1 ?> + + helper('tax')->displaySalesBothPrices() || $this->helper('tax')->displaySalesPriceExclTax()): ?> + + helper('tax')->displaySalesBothPrices()): ?> + typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> + + + __('Excl. Tax'); ?>: + typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> + + + + typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> + + + + + + typeOfDisplay($this->getItem(), array(0, 1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> + getOrder()->formatPrice($this->getItem()->getRowTotal()+$this->getItem()->getWeeeTaxAppliedRowAmount()+$this->getItem()->getWeeeTaxRowDisposition()); ?> + + getOrder()->formatPrice($this->getItem()->getRowTotal()) ?> + + + + + + getApplied($this->getItem())): ?> + + + + typeOfDisplay($this->getItem(), 2, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> + + __('Total'); ?>:
    getOrder()->formatPrice($this->getItem()->getRowTotal()+$this->getItem()->getWeeeTaxAppliedRowAmount()+$this->getItem()->getWeeeTaxRowDisposition()); ?>
    +
    + + +
    +
    + + helper('tax')->displaySalesBothPrices() || $this->helper('tax')->displaySalesPriceInclTax()): ?> + + helper('tax')->displaySalesBothPrices()): ?> + typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> + + + __('Incl. Tax'); ?>: + typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> + + + + helper('checkout')->getSubtotalInclTax($this->getItem()); ?> + typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> + + + + + typeOfDisplay($this->getItem(), array(0, 1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> + getOrder()->formatPrice($_incl+$this->getItem()->getWeeeTaxAppliedRowAmount()); ?> + + getOrder()->formatPrice($_incl-$this->getItem()->getWeeeTaxRowDisposition()) ?> + + + + + + getApplied($this->getItem())): ?> + + + + typeOfDisplay($this->getItem(), 2, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> + + __('Total incl. tax'); ?>:
    getOrder()->formatPrice($_incl+$this->getItem()->getWeeeTaxAppliedRowAmount()); ?>
    +
    + + + + + +
    + + + diff --git a/app/design/frontend/base/default/template/sales/order/items.phtml b/app/design/frontend/base/default/template/sales/order/items.phtml new file mode 100644 index 0000000000..6350be331b --- /dev/null +++ b/app/design/frontend/base/default/template/sales/order/items.phtml @@ -0,0 +1,69 @@ + +getOrder() ?> + + + + + + + + + + + + + + + + + getChildHtml('order_totals') ?> + + getItemsCollection(); ?> + + count(); ?> + + getParentItem()) continue; ?> + + getItemHtml($_item) ?> + helper('giftmessage/message')->getIsMessagesAvailable('order_item', $_item) && $_item->getGiftMessageId()): ?> + + helper('giftmessage/message')->getGiftMessageForEntity($_item); ?> + + + + + +
    __('Product Name') ?>__('SKU') ?>__('Price') ?>__('Qty') ?>__('Subtotal') ?>
    + diff --git a/app/design/frontend/base/default/template/sales/order/items/renderer/default.phtml b/app/design/frontend/base/default/template/sales/order/items/renderer/default.phtml new file mode 100644 index 0000000000..9dc65108ad --- /dev/null +++ b/app/design/frontend/base/default/template/sales/order/items/renderer/default.phtml @@ -0,0 +1,317 @@ + +getItem() ?> + +

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

    + getItemOptions()): ?> +
    + +
    htmlEscape($_option['label']) ?>
    + getPrintStatus()): ?> + getFormatedOptionValue($_option) ?> + class="truncated"> + + +
    +
    +
    htmlEscape($_option['label']) ?>
    +
    +
    +
    + + + +
    htmlEscape( (isset($_option['print_value']) ? $_option['print_value'] : $_option['value']) ) ?>
    + + +
    + + getDescription() ?> + helper('giftmessage/message')->getIsMessagesAvailable('order_item', $_item) && $_item->getGiftMessageId()): ?> + __('Gift Message') ?> + + + splitInjection($this->getSku()) ?> + + helper('tax')->displaySalesBothPrices() || $this->helper('tax')->displaySalesPriceExclTax()): ?> + + helper('tax')->displaySalesBothPrices()): ?> + typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> + + + __('Excl. Tax'); ?>: + typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> + + + + typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> + + + + + + typeOfDisplay($this->getItem(), array(0, 1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> + getOrder()->formatPrice($this->getItem()->getPrice()+$this->getItem()->getWeeeTaxAppliedAmount()+$this->getItem()->getWeeeTaxDisposition()); ?> + + getOrder()->formatPrice($this->getItem()->getPrice()) ?> + + + + + + getApplied($this->getItem())): ?> + + + + typeOfDisplay($this->getItem(), 2, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> + + __('Total'); ?>:
    getOrder()->formatPrice($this->getItem()->getPrice()+$this->getItem()->getWeeeTaxAppliedAmount()+$this->getItem()->getWeeeTaxDisposition()); ?>
    +
    + + +
    +
    + + helper('tax')->displaySalesBothPrices() || $this->helper('tax')->displaySalesPriceInclTax()): ?> + + helper('tax')->displaySalesBothPrices()): ?> + typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> + + + __('Incl. Tax'); ?>: + typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> + + + + helper('checkout')->getPriceInclTax($this->getItem()); ?> + typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> + + + + + + typeOfDisplay($this->getItem(), array(0, 1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> + getOrder()->formatPrice($_incl+$this->getItem()->getWeeeTaxAppliedAmount()); ?> + + getOrder()->formatPrice($_incl-$this->getItem()->getWeeeTaxDisposition()) ?> + + + + + + getApplied($this->getItem())): ?> + + + + typeOfDisplay($this->getItem(), 2, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> + + __('Total incl. tax'); ?>:
    getOrder()->formatPrice($_incl+$this->getItem()->getWeeeTaxAppliedAmount()); ?>
    +
    + + +
    + + + + + getItem()->getQtyOrdered() > 0): ?> + __('Ordered'); ?>: getItem()->getQtyOrdered()*1 ?>
    + + getItem()->getQtyShipped() > 0): ?> + __('Shipped'); ?>: getItem()->getQtyShipped()*1 ?>
    + + getItem()->getQtyCanceled() > 0): ?> + __('Canceled'); ?>: getItem()->getQtyCanceled()*1 ?>
    + + getItem()->getQtyRefunded() > 0): ?> + __('Refunded'); ?>: getItem()->getQtyRefunded()*1 ?>
    + +
    + + + helper('tax')->displaySalesBothPrices() || $this->helper('tax')->displaySalesPriceExclTax()): ?> + + helper('tax')->displaySalesBothPrices()): ?> + typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> + + + __('Excl. Tax'); ?>: + typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> + + + + typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> + + + + + + typeOfDisplay($this->getItem(), array(0, 1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> + getOrder()->formatPrice($this->getItem()->getRowTotal()+$this->getItem()->getWeeeTaxAppliedRowAmount()+$this->getItem()->getWeeeTaxRowDisposition()); ?> + + getOrder()->formatPrice($this->getItem()->getRowTotal()) ?> + + + + + + getApplied($this->getItem())): ?> + + + + typeOfDisplay($this->getItem(), 2, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> + + __('Total'); ?>:
    getOrder()->formatPrice($this->getItem()->getRowTotal()+$this->getItem()->getWeeeTaxAppliedRowAmount()+$this->getItem()->getWeeeTaxRowDisposition()); ?>
    +
    + + +
    +
    + + helper('tax')->displaySalesBothPrices() || $this->helper('tax')->displaySalesPriceInclTax()): ?> + + helper('tax')->displaySalesBothPrices()): ?> + typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> + + + __('Incl. Tax'); ?>: + typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> + + + + helper('checkout')->getSubtotalInclTax($this->getItem()); ?> + typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> + + + + + typeOfDisplay($this->getItem(), array(0, 1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> + getOrder()->formatPrice($_incl+$this->getItem()->getWeeeTaxAppliedRowAmount()); ?> + + getOrder()->formatPrice($_incl-$this->getItem()->getWeeeTaxRowDisposition()) ?> + + + + + + getApplied($this->getItem())): ?> + + + + typeOfDisplay($this->getItem(), 2, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> + + __('Total incl. tax'); ?>:
    getOrder()->formatPrice($_incl+$this->getItem()->getWeeeTaxAppliedRowAmount()); ?>
    +
    + + + + + +
    + + + + diff --git a/app/design/frontend/base/default/template/sales/order/print.phtml b/app/design/frontend/base/default/template/sales/order/print.phtml new file mode 100644 index 0000000000..e4c0b35775 --- /dev/null +++ b/app/design/frontend/base/default/template/sales/order/print.phtml @@ -0,0 +1,85 @@ + +getOrder() ?> +

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

    +

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

    +
    + getIsVirtual()): ?> +
    +

    __('Shipping Address') ?>

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

    __('Billing Address') ?>

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

    __('Shipping Method') ?>

    + getShippingDescription() ?> +
    + +
    +

    __('Payment Method') ?>

    + getPaymentInfoHtml() ?> +
    +
    +

    __('Items Ordered') ?>

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

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

    +

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

    +getCreditmemo() ?> + + + + getCreditmemosCollection() ?> + + +

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

    +
    +
    + getIsVirtual()): ?> +

    __('Shipping Address') ?>

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

    __('Billing Address') ?>

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

    __('Shipping Method') ?>

    + getShippingDescription() ?> +
    + +
    +

    __('Payment Method') ?>

    + getPaymentInfoHtml() ?> +
    +
    +

    __('Items Refunded') ?>

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

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

    +

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

    +getInvoice() ?> + + + + getInvoiceCollection() ?> + + +

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

    +
    +
    + getIsVirtual()): ?> +

    __('Shipping Address') ?>

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

    __('Billing Address') ?>

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

    __('Shipping Method') ?>

    + getShippingDescription() ?> +
    + +
    +

    __('Payment Method') ?>

    + getPaymentInfoHtml() ?> +
    +
    +

    __('Items Invoiced') ?>

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

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

    +

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

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

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

    +
    +
    +

    __('Shipping Address') ?>

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

    __('Billing Address') ?>

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

    __('Shipping Method') ?>

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

    __('Payment Method') ?>

    + getPaymentInfoHtml() ?> +
    +
    +

    __('Items Shipped') ?>

    + + + + + + + + + + + + getItemsCollection(); ?> + + + getOrderItem()->getParentItem()) continue; ?> + + getItemHtml($_item) ?> + + +
    __('Product Name') ?>__('SKU') ?>__('Qty Shipped') ?>
    + + + + diff --git a/app/design/frontend/base/default/template/sales/order/recent.phtml b/app/design/frontend/base/default/template/sales/order/recent.phtml new file mode 100644 index 0000000000..cbe1e606b5 --- /dev/null +++ b/app/design/frontend/base/default/template/sales/order/recent.phtml @@ -0,0 +1,75 @@ + + diff --git a/app/design/frontend/base/default/template/sales/order/shipment.phtml b/app/design/frontend/base/default/template/sales/order/shipment.phtml new file mode 100644 index 0000000000..fef7e584cc --- /dev/null +++ b/app/design/frontend/base/default/template/sales/order/shipment.phtml @@ -0,0 +1,61 @@ + +helper('giftmessage/message')->getIsMessagesAvailable('order', $this->getOrder())): ?> + + + getChildHtml('shipment_items') ?> + diff --git a/app/design/frontend/base/default/template/sales/order/shipment/items.phtml b/app/design/frontend/base/default/template/sales/order/shipment/items.phtml new file mode 100644 index 0000000000..40d6b5ce20 --- /dev/null +++ b/app/design/frontend/base/default/template/sales/order/shipment/items.phtml @@ -0,0 +1,90 @@ + +getOrder() ?> +
    +

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

    + getShipmentsCollection() as $_shipment): ?> + __('Print Shipment') ?> +

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

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

    __('Items Shipped') ?>

    + + + + + + + + + + + + getAllItems(); ?> + + + getOrderItem()->getParentItem()) continue; ?> + + getItemHtml($_item) ?> + + +
    __('Product Name') ?>__('SKU') ?>__('Qty Shipped') ?>
    + + +
    diff --git a/app/design/frontend/base/default/template/sales/order/shipment/items/renderer/default.phtml b/app/design/frontend/base/default/template/sales/order/shipment/items/renderer/default.phtml new file mode 100644 index 0000000000..d99438d053 --- /dev/null +++ b/app/design/frontend/base/default/template/sales/order/shipment/items/renderer/default.phtml @@ -0,0 +1,61 @@ + +getItem() ?> +getItem()->getOrderItem()->getOrder() ?> + +

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

    + getItemOptions()): ?> +
    + +
    htmlEscape($_option['label']) ?>
    + getPrintStatus()): ?> + getFormatedOptionValue($_option) ?> + class="truncated"> + + +
    +
    +
    htmlEscape($_option['label']) ?>
    +
    +
    +
    + + + +
    htmlEscape( (isset($_option['print_value']) ? $_option['print_value'] : $_option['value']) ) ?>
    + + +
    + + getDescription() ?> + helper('giftmessage/message')->getIsMessagesAvailable('order_item', $_item->getOrderItem()) && $_item->getGiftMessageId()): ?> + __('Gift Message') ?> + + + splitInjection($this->getSku()) ?> + getQty()*1 ?> + diff --git a/app/design/frontend/base/default/template/sales/order/totals.phtml b/app/design/frontend/base/default/template/sales/order/totals.phtml new file mode 100644 index 0000000000..353e916968 --- /dev/null +++ b/app/design/frontend/base/default/template/sales/order/totals.phtml @@ -0,0 +1,52 @@ + +getTotals() as $_code => $_total): ?> + getBlockName()): ?> + getChildHtml($_total->getBlockName(), false); ?> + + + getLabelProperties()?>> + getStrong()):?> + getLabel()?> + + getLabel()?> + + + getValueProperties()?>> + getStrong()):?> + formatValue($_total) ?> + + formatValue($_total) ?> + + + + + diff --git a/app/design/frontend/base/default/template/sales/order/trackinginfo.phtml b/app/design/frontend/base/default/template/sales/order/trackinginfo.phtml new file mode 100644 index 0000000000..de40eeb1e2 --- /dev/null +++ b/app/design/frontend/base/default/template/sales/order/trackinginfo.phtml @@ -0,0 +1,68 @@ + + + +trackingInfo): ?> + + trackingInfo->getCarrierTitle() ?> - trackingInfo->getTracking() ?> +
    + trackingInfo->getErrorMessage()): ?> + trackingInfo->getErrorMessage() ?> + + trackingInfo->getUrl()): ?> + Please, visit for more info: trackingInfo->getCarrierTitle() ?>
    + + + trackingInfo->getStatus()): ?> + Status: trackingInfo->getStatus() ?>
    + + + trackingInfo->getDeliverydate()): ?> + Delivery Date: trackingInfo->getDeliverydate() ?>
    + + + trackingInfo->getDeliverytime()): ?> + Delivery Time: trackingInfo->getDeliverytime() ?>
    + + + trackingInfo->getDeliverylocation()): ?> + Delivery Location: trackingInfo->getDeliverylocation() ?>
    + + + trackingInfo->getSignedby()): ?> + Signed by: trackingInfo->getSignedby() ?>
    + + + trackingInfo->getTrackSummary()): ?> + Tracking summary: trackingInfo->getTrackSummary() ?>
    + + + +
    + + +
    diff --git a/app/design/frontend/base/default/template/sales/order/view.phtml b/app/design/frontend/base/default/template/sales/order/view.phtml new file mode 100644 index 0000000000..e450a7433d --- /dev/null +++ b/app/design/frontend/base/default/template/sales/order/view.phtml @@ -0,0 +1,92 @@ + +helper('giftmessage/message')->getIsMessagesAvailable('items', $this->getOrder())): ?> + + +getOrder() ?> +
    +

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

    + + getChildHtml('order_items') ?> + + helper('giftmessage/message')->getIsMessagesAvailable('order', $_order) && $_order->getGiftMessageId()): ?> +
    +

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

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

    __('About Your Order') ?>

    +
    + +
    formatDate($_historyItem->getCreatedAtStoreDate(), 'medium', true) ?>
    +
    getComment() ?>
    + +
    +
    + +
    + diff --git a/app/design/frontend/base/default/template/sales/reorder/sidebar.phtml b/app/design/frontend/base/default/template/sales/reorder/sidebar.phtml new file mode 100644 index 0000000000..a7a92f23db --- /dev/null +++ b/app/design/frontend/base/default/template/sales/reorder/sidebar.phtml @@ -0,0 +1,76 @@ + + +getLastOrder()): ?> +
    +
    + __('My Orders') ?> +
    +
    +
    +

    __('Last ordered items') ?>

    +
      + + getItemsRandomCollection(5) as $_item): ?> +
    1. + isItemAvailableForReorder($_item)): ?> + + + + +

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

      +
    2. + +
    + +
    + +
    + + __('View All'); ?> +
    + +
    +
    +
    +getPagerHtml(); ?> + + diff --git a/app/design/frontend/base/default/template/sendfriend/send.phtml b/app/design/frontend/base/default/template/sendfriend/send.phtml new file mode 100644 index 0000000000..a8e9c3f2ad --- /dev/null +++ b/app/design/frontend/base/default/template/sendfriend/send.phtml @@ -0,0 +1,143 @@ + + + +
    + getMessagesBlock()->getGroupedHtml() ?> +
    +

    __('Email to a Friend') ?>

    +
    +
    +
    + getBlockHtml('formkey')?> +

    __('Sender:') ?>

    +
      +
    • +
      + +
      + +
      +
      +
      + +
      + +
      +
      +
    • +
    • + +
      + +
      +
    • +
    +
    +
    +

    __('Recipient:') ?>

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

    + +

    + +
    +
    + +
    diff --git a/app/design/frontend/base/default/template/shipping/tracking/ajax.phtml b/app/design/frontend/base/default/template/shipping/tracking/ajax.phtml new file mode 100644 index 0000000000..c783a3f015 --- /dev/null +++ b/app/design/frontend/base/default/template/shipping/tracking/ajax.phtml @@ -0,0 +1,26 @@ + diff --git a/app/design/frontend/base/default/template/shipping/tracking/popup.phtml b/app/design/frontend/base/default/template/shipping/tracking/popup.phtml new file mode 100644 index 0000000000..4c172021c1 --- /dev/null +++ b/app/design/frontend/base/default/template/shipping/tracking/popup.phtml @@ -0,0 +1,175 @@ + +getTrackingInfo() ?> +
    +

    __('Tracking Information'); ?>

    + +
    +0): ?> + $_result): ?> + +

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

    + + 0): ?> + + + + + + + + + + + + getCarrierTitle()): ?> + + + + + + getErrorMessage()): ?> + + + + + getTrackSummary()): ?> + + + + + getUrl()): ?> + + + + + + getStatus()): ?> + + + + + + + getDeliverydate()): ?> + + + + + + + getSignedby()): ?> + + + + + + + getDeliveryLocation()): ?> + + + + + + + getShippedDate()): ?> + + + + + + + getService()): ?> + + + + + + + getWeight()): ?> + + + + + + + + + + + + + + + +
    __('Tracking Number:'); ?>getTracking(); ?>
    __('Carrier:'); ?>getCarrierTitle(); ?>
    __('Error:'); ?>__('Tracking information is currently not available. Please ') ?>__('contact us') ?>__(' for more information or email us at '); ?>getStoreSupportEmail() ?>
    __('Info:'); ?>getTrackSummary(); ?>
    __('Track:'); ?>getUrl(); ?>
    __('Status:'); ?>getStatus(); ?>
    __('Delivered on:'); ?>formatDeliveryDateTime($track->getDeliverydate(),$track->getDeliverytime()); ?>
    __('Signed by:'); ?>getSignedby(); ?>
    __('Delivered to:'); ?>getDeliveryLocation(); ?>
    __('Shipped or billed on:'); ?>getShippedDate(); ?>
    __('Service Type:'); ?>getService(); ?>
    __('Weight:'); ?>getWeight(); ?>
    __('N/A')); ?>:
    +
    + getProgressdetail())>0): ?> + + + + + + + + + + + + + + + getProgressdetail() as $_detail): ?> + formatDeliveryDate($_detail['deliverydate']) : '') ?> + formatDeliveryTime($_detail['deliverytime'], $_detailDate) : '') ?> + + + + + + + + +
    __('Location') ?>__('Date') ?>__('Local Time') ?>__('Description') ?>
    + + + + + + + + +

    __('There is no tracking available for this shipment.'); ?>

    + + + + +
    __('There is no tracking available.'); ?>
    + +
    + +
    diff --git a/app/design/frontend/base/default/template/tag/cloud.phtml b/app/design/frontend/base/default/template/tag/cloud.phtml new file mode 100644 index 0000000000..aeae075e89 --- /dev/null +++ b/app/design/frontend/base/default/template/tag/cloud.phtml @@ -0,0 +1,38 @@ + +
    +

    __('All Tags') ?>

    +
    +getTags()) > 0 ): ?> + + +

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

    + diff --git a/app/design/frontend/base/default/template/tag/customer/recent.phtml b/app/design/frontend/base/default/template/tag/customer/recent.phtml new file mode 100644 index 0000000000..efef415c12 --- /dev/null +++ b/app/design/frontend/base/default/template/tag/customer/recent.phtml @@ -0,0 +1,53 @@ + + diff --git a/app/design/frontend/base/default/template/tag/customer/tags.phtml b/app/design/frontend/base/default/template/tag/customer/tags.phtml new file mode 100644 index 0000000000..06ecbb2557 --- /dev/null +++ b/app/design/frontend/base/default/template/tag/customer/tags.phtml @@ -0,0 +1,43 @@ + +getMessagesBlock()->getGroupedHtml() ?> +
    +

    __('My Tags') ?>

    +
    +getTags()): ?> +

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

    + + +

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

    + + diff --git a/app/design/frontend/base/default/template/tag/customer/view.phtml b/app/design/frontend/base/default/template/tag/customer/view.phtml new file mode 100644 index 0000000000..98084c26d5 --- /dev/null +++ b/app/design/frontend/base/default/template/tag/customer/view.phtml @@ -0,0 +1,82 @@ + +
    +

    __('My Tags') ?>

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

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

    +
    +getToolbarHtml() ?> + +getMyProducts()) > 0 ): ?> + + + + + + getMyProducts() as $_product): ?> + class="odd"> + + + + + + + + + + + + + +
    <?php echo $this->htmlEscape($_product->getName()) ?> +

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

    + getReviewsSummaryHtml($_product, 'short') ?> + getPriceHtml($_product) ?> + getDescription() ?> +
    + isSaleable()): ?> + + + helper('wishlist')->isAllow()) : ?> + + +
    + __("Unable to find any products tagged with '%s' in the current store", $this->htmlEscape($this->getTagInfo()->getName()) ) ?> +
    + +getToolbarHtml() ?> + diff --git a/app/design/frontend/base/default/template/tag/list.phtml b/app/design/frontend/base/default/template/tag/list.phtml new file mode 100644 index 0000000000..30a6baf03f --- /dev/null +++ b/app/design/frontend/base/default/template/tag/list.phtml @@ -0,0 +1,58 @@ + +
    +

    __('Product Tags') ?>

    + getCount() ): ?> +

    __('Other people marked this product with these tags:') ?>

    + + +
    +
    + +
    + +
    + +
    +
    +

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

    + +
    diff --git a/app/design/frontend/base/default/template/tag/popular.phtml b/app/design/frontend/base/default/template/tag/popular.phtml new file mode 100644 index 0000000000..667b2418d4 --- /dev/null +++ b/app/design/frontend/base/default/template/tag/popular.phtml @@ -0,0 +1,41 @@ + +
    +
    + __('Popular Tags'); ?> +
    +
    + + +
    +
    diff --git a/app/design/frontend/base/default/template/tax/checkout/discount.phtml b/app/design/frontend/base/default/template/tax/checkout/discount.phtml new file mode 100644 index 0000000000..4237c4aa54 --- /dev/null +++ b/app/design/frontend/base/default/template/tax/checkout/discount.phtml @@ -0,0 +1,25 @@ + +includeTax() && $this->getTotalExclTax()>=0):?> + + + helper('tax')->__('Grand Total Excl. Tax')?> + + + helper('checkout')->formatPrice($this->getTotalExclTax()) ?> + + +renderTotals('taxes', $this->getColspan()); ?> + + + helper('tax')->__('Grand Total Incl. Tax')?> + + + helper('checkout')->formatPrice($this->getTotal()->getValue()) ?> + + + + + + getTotal()->getTitle() ?> + + + helper('checkout')->formatPrice($this->getTotal()->getValue()) ?> + + + diff --git a/app/design/frontend/base/default/template/tax/checkout/shipping.phtml b/app/design/frontend/base/default/template/tax/checkout/shipping.phtml new file mode 100644 index 0000000000..c3cd6a2ddf --- /dev/null +++ b/app/design/frontend/base/default/template/tax/checkout/shipping.phtml @@ -0,0 +1,66 @@ + +displayBoth()):?> + + + getExcludeTaxLabel() ?> + + + helper('checkout')->formatPrice($this->getShippingExcludeTax()) ?> + + + + + getIncludeTaxLabel() ?> + + + helper('checkout')->formatPrice($this->getShippingIncludeTax()) ?> + + +displayIncludeTax()) : ?> + + + getTotal()->getTitle() ?> + + + helper('checkout')->formatPrice($this->getShippingIncludeTax()) ?> + + + + + + getTotal()->getTitle() ?> + + + helper('checkout')->formatPrice($this->getShippingExcludeTax()) ?> + + + diff --git a/app/design/frontend/base/default/template/tax/checkout/subtotal.phtml b/app/design/frontend/base/default/template/tax/checkout/subtotal.phtml new file mode 100644 index 0000000000..ad3a63790a --- /dev/null +++ b/app/design/frontend/base/default/template/tax/checkout/subtotal.phtml @@ -0,0 +1,57 @@ + +displayBoth()):?> + + + helper('tax')->__('Subtotal (Excl. Tax)') ?> + + + helper('checkout')->formatPrice($this->getTotal()->getValueExclTax()) ?> + + + + + helper('tax')->__('Subtotal (Incl. Tax)') ?> + + + helper('checkout')->formatPrice($this->getTotal()->getValueInclTax()) ?> + + + + + + getTotal()->getTitle() ?> + + + helper('checkout')->formatPrice($this->getTotal()->getValue()) ?> + + + diff --git a/app/design/frontend/base/default/template/tax/checkout/tax.phtml b/app/design/frontend/base/default/template/tax/checkout/tax.phtml new file mode 100644 index 0000000000..a8bc756372 --- /dev/null +++ b/app/design/frontend/base/default/template/tax/checkout/tax.phtml @@ -0,0 +1,74 @@ + +getTotal()->getValue(); + $_style = $this->getTotal()->getStyle(); +?> + +helper('tax')->displayFullSummary() && $_value!=0): ?> + + getTotal()->getFullInfo() as $info): ?> + + + + + + + + + + + + (%) + +
    + + + + helper('checkout')->formatPrice($amount); ?> + + + + + + + + +helper('tax')->displayFullSummary() && $_value!=0): ?> class="tax-total" onclick="expandDetails(this, '.tax-details-')"> + + helper('tax')->displayFullSummary()): ?> +
    getTotal()->getTitle() ?>
    + + getTotal()->getTitle() ?> + + + helper('checkout')->formatPrice($_value) ?> + diff --git a/app/design/frontend/base/default/template/tax/order/tax.phtml b/app/design/frontend/base/default/template/tax/order/tax.phtml new file mode 100644 index 0000000000..e90aa84a14 --- /dev/null +++ b/app/design/frontend/base/default/template/tax/order/tax.phtml @@ -0,0 +1,81 @@ + +getOrder(); + $_source = $this->getSource(); + $_fullInfo = $_source->getFullTaxInfo(); + global $taxIter; $taxIter++; +?> + + +displayFullSummary()): ?> + + + + + + getIsPlaneMode()):?> style="display:none;"> + getLabelProperties()?>> + + + (%) + +
    + + + getValueProperties()?> rowspan=""> + formatPrice($amount); ?> + + + + + + + + + +displayFullSummary() && $_fullInfo && !$this->getIsPlaneMode()): ?> + +displayFullSummary() && $_fullInfo && $this->getIsPlaneMode()): ?> + + + + + getLabelProperties()?>> + displayFullSummary()): ?> +
    __('Tax'); ?>
    + + __('Tax'); ?> + + + getValueProperties()?>>formatPrice($_source->getTaxAmount()) ?> + diff --git a/app/design/frontend/base/default/template/wishlist/email/items.phtml b/app/design/frontend/base/default/template/wishlist/email/items.phtml new file mode 100644 index 0000000000..4a60d2a013 --- /dev/null +++ b/app/design/frontend/base/default/template/wishlist/email/items.phtml @@ -0,0 +1,53 @@ + +getWishlistItemsCount() ?> +
    + + + getWishlistItems() as $item): $i++ ?> + + + + + + + + + + + + + +
    +

    +

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

    + hasDescription($item)): ?>

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

    +

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

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

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

    +
    + getMessagesBlock()->getGroupedHtml() ?> + hasWishlistItems()): ?> +
    +
    + + + + + + + + + + + + + getWishlistItems() as $item): ?> + + + + + + + +
    __('Product') ?>__('Comment') ?> 
    + <?php echo $this->htmlEscape($item->getName()) ?> +

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

    + getPriceHtml($item) ?> +
    getEscapedDescription($item) ?> + +
    + +
    + isSaleable()):?> +
    + +
    + +
    + +

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

    + +
    diff --git a/app/design/frontend/base/default/template/wishlist/sharing.phtml b/app/design/frontend/base/default/template/wishlist/sharing.phtml new file mode 100644 index 0000000000..ea8192a7ac --- /dev/null +++ b/app/design/frontend/base/default/template/wishlist/sharing.phtml @@ -0,0 +1,83 @@ + +
    +

    __('Share Your Wishlist') ?>

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

    __('Sharing Information') ?>

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

    __('* Required Fields') ?>

    + + +
    +
    + diff --git a/app/design/frontend/base/default/template/wishlist/sidebar.phtml b/app/design/frontend/base/default/template/wishlist/sidebar.phtml new file mode 100644 index 0000000000..b057d262a1 --- /dev/null +++ b/app/design/frontend/base/default/template/wishlist/sidebar.phtml @@ -0,0 +1,60 @@ + +helper('wishlist')->isAllow()) : ?> +
    +
    + __('My Wishlist (%d)', $this->helper('wishlist')->getItemCount()) ?> +
    +
    +

    __('Last Added Items') ?>

    + hasWishlistItems()): ?> +
      + getWishlistItems() as $_item): ?> +
    1. + <?php echo $this->htmlEscape($_item->getName()) ?> +
      + __('Remove This Item') ?> +

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

      + getPriceHtml($_item, false, '-wishlist') ?> + isSaleable()): ?> + __('Add to Cart') ?> + +
      +
    2. + +
    + + + +

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

    + +
    +
    + diff --git a/app/design/frontend/base/default/template/wishlist/view.phtml b/app/design/frontend/base/default/template/wishlist/view.phtml new file mode 100644 index 0000000000..d70ffee63c --- /dev/null +++ b/app/design/frontend/base/default/template/wishlist/view.phtml @@ -0,0 +1,114 @@ + +
    +
    + helper('wishlist')->isRssAllow() && $this->hasWishlistItems()): ?> + __('RSS Feed') ?> + +

    __('My Wishlist') ?>

    +
    + getMessagesBlock()->getGroupedHtml() ?> + hasWishlistItems()): ?> +
    +
    + getBlockHtml('formkey')?> + + + + + + + + + + + + + + + + + getWishlistItems() as $item): ?> + + + + + + + + + +
    __('Product') ?>__('Comment') ?>__('Added On') ?>__('Add to Cart') ?> 
    + <?php echo $this->htmlEscape($item->getName()) ?> +

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

    + getPriceHtml($item) ?> +
    + + + getFormatedDate($item->getAddedAt()) ?> + + isSaleable()): ?> + + +

    __('Out of stock') ?>

    + +
    + __('Remove item')?> +
    + +
    + + isSaleable()):?> + + + +
    +
    +
    + +

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

    + + + +
    diff --git a/app/design/frontend/default/blank/etc/widget.xml b/app/design/frontend/default/blank/etc/widget.xml new file mode 100644 index 0000000000..087d8a6f11 --- /dev/null +++ b/app/design/frontend/default/blank/etc/widget.xml @@ -0,0 +1,166 @@ + + + + + + + + + + left + + + + content + + + + right + + + + + + + + + + + + left + + + + content + + + + right + + + + + + + + + + + + left + + + + content + + + + right + + + + + diff --git a/app/design/frontend/default/blank/layout/amazonpayments.xml b/app/design/frontend/default/blank/layout/amazonpayments.xml deleted file mode 100755 index e1b965f99e..0000000000 --- a/app/design/frontend/default/blank/layout/amazonpayments.xml +++ /dev/null @@ -1,61 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/app/design/frontend/default/blank/layout/bundle.xml b/app/design/frontend/default/blank/layout/bundle.xml deleted file mode 100644 index a13d65efde..0000000000 --- a/app/design/frontend/default/blank/layout/bundle.xml +++ /dev/null @@ -1,297 +0,0 @@ - - - - - - - - - bundlebundle/catalog_product_price - - - - - - bundlebundle/catalog_product_price - - - - - - bundlebundle/catalog_product_price - - - - - - bundlebundle/catalog_product_price - - - - - - bundlebundle/catalog_product_price - - - - - - bundlebundle/catalog_product_price - - - - - - bundlebundle/catalog_product_price - - - - - - bundlebundle/catalog_product_price - - - - - - bundlebundle/catalog_product_price - - - - - - bundlebundle/catalog_product_price - - - - - - bundlebundle/catalog_product_price - - - - - - bundlebundle/catalog_product_price - - - - - - - - - bundlebundle/catalog_product_price - bundle4 - - - - - - - - bundlebundle/checkout_cart_item_renderer - - - - - - bundlebundle/checkout_cart_item_renderer - - - - - - - - bundlebundle/checkout_cart_item_renderer - - - bundlebundle/catalog_product_price - - - - - - - - bundlebundle/checkout_cart_item_renderer - - - - - - bundlebundle/checkout_cart_item_renderer - - - - - - bundlebundle/checkout_cart_item_renderer - - - bundlebundle/checkout_cart_item_renderer - - - - - - bundlebundle/checkout_cart_item_renderer - - - - - - - - skin_jsjs/bundle.js - - - - bundlebundle/catalog_product_price - - - - - - selectbundle/catalog_product_view_type_bundle_option_select - multibundle/catalog_product_view_type_bundle_option_multi - radiobundle/catalog_product_view_type_bundle_option_radio - checkboxbundle/catalog_product_view_type_bundle_option_checkbox - - product.info.bundle.options - - - - - - - bundlebundle/catalog_product_price - - - - - - bundlebundle/sales_order_items_renderer - - - - - - bundlebundle/sales_order_items_renderer - - - - - - bundlebundle/sales_order_items_renderer - - - - - - bundlebundle/sales_order_items_renderer - - - - - - - - bundlebundle/sales_order_items_renderer - - - - - - bundlebundle/sales_order_items_renderer - - - - - - bundlebundle/sales_order_items_renderer - - - - - - bundlebundle/sales_order_items_renderer - - - - - - - bundlebundle/sales_order_items_renderer - - - - - - bundlebundle/sales_order_items_renderer - - - - - - - bundlebundle/sales_order_items_renderer - - - - - - bundlebundle/sales_order_items_renderer - - - - diff --git a/app/design/frontend/default/blank/layout/catalog.xml b/app/design/frontend/default/blank/layout/catalog.xml deleted file mode 100644 index 7081c52bc0..0000000000 --- a/app/design/frontend/default/blank/layout/catalog.xml +++ /dev/null @@ -1,375 +0,0 @@ - - - - - - - - - - - - - - - images/media/col_left_callout.jpg - Our customer service is available 24/7. Call us at (555) 555-0123. - checkout/cart - - - - - - - - Site Map - - - - - - - - - - - - - - - - - - - product_list_toolbar - - - - - - - - - - - - - - - - - - - - product_list_toolbar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - catalog_compare_sidebar - - - - - - - - - - - - - - js_csscalendar/calendar-win2k-1.css - jscalendar/calendar.js - jscalendar/calendar-setup.js - - - - - - - - - 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 - - - - - - - - - - - - seo.sitemap.tree.pager.top - seo.sitemap.tree.pager.bottom - - - - - - - - Products - - seo.sitemap.pager.top - seo.sitemap.pager.bottom - products - - - - Categories Sitemap - - - - - - - - - - - - - - - - - - diff --git a/app/design/frontend/default/blank/layout/catalogsearch.xml b/app/design/frontend/default/blank/layout/catalogsearch.xml deleted file mode 100644 index 57f70895ef..0000000000 --- a/app/design/frontend/default/blank/layout/catalogsearch.xml +++ /dev/null @@ -1,112 +0,0 @@ - - - - - - - - - - Search Terms - Advanced Search - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - js_csscalendar/calendar-win2k-1.css - jscalendar/calendar.js - jscalendar/calendar-setup.js - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/app/design/frontend/default/blank/layout/checkout.xml b/app/design/frontend/default/blank/layout/checkout.xml deleted file mode 100644 index 6b0d9cbabd..0000000000 --- a/app/design/frontend/default/blank/layout/checkout.xml +++ /dev/null @@ -1,384 +0,0 @@ - - - - - - - - - - - - - - - - - - simplecheckout/cart_item_renderer - groupedcheckout/cart_item_renderer_grouped - configurablecheckout/cart_item_renderer_configurable - - - - - - - - - - - - - - - - - - checkout/cart.phtml - checkout/cart/noItems.phtml - - simplecheckout/cart_item_renderer - groupedcheckout/cart_item_renderer_grouped - configurablecheckout/cart_item_renderer_configurable - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - defaultcheckout/cart_item_renderer - groupedcheckout/cart_item_renderer_grouped - configurablecheckout/cart_item_renderer_configurable - - - - - - - - - - - - defaultcheckout/cart_item_renderer - groupedcheckout/cart_item_renderer_grouped - configurablecheckout/cart_item_renderer_configurable - - - defaultcheckout/cart_item_renderer - groupedcheckout/cart_item_renderer_grouped - configurablecheckout/cart_item_renderer_configurable - - - - - - - - - - - - - purchaseorder - - - - - - - - - - - - - - - defaultcheckout/cart_item_renderer - groupedcheckout/cart_item_renderer_grouped - configurablecheckout/cart_item_renderer_configurable - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - checkout-progress-wrapper - - - - - - - - - - - - - - - purchaseorder - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - purchaseorder - - - - - - - - - - - - - - - - - - - - - 1 - - - - - - - - - - - - defaultcheckout/cart_item_renderer - groupedcheckout/cart_item_renderer_grouped - configurablecheckout/cart_item_renderer_configurable - - - - - - - - - - - - - - - - - - - - - diff --git a/app/design/frontend/default/blank/layout/chronopay.xml b/app/design/frontend/default/blank/layout/chronopay.xml deleted file mode 100644 index 3e508422b3..0000000000 --- a/app/design/frontend/default/blank/layout/chronopay.xml +++ /dev/null @@ -1,42 +0,0 @@ - - - - - - - - - - - - - - diff --git a/app/design/frontend/default/blank/layout/cms.xml b/app/design/frontend/default/blank/layout/cms.xml deleted file mode 100644 index f9e0d64c75..0000000000 --- a/app/design/frontend/default/blank/layout/cms.xml +++ /dev/null @@ -1,78 +0,0 @@ - - - - - - - - - - footer_links - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/app/design/frontend/default/blank/layout/contacts.xml b/app/design/frontend/default/blank/layout/contacts.xml deleted file mode 100644 index f73bae7dad..0000000000 --- a/app/design/frontend/default/blank/layout/contacts.xml +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - contactsContact Ustrue - - - - - - - Contact Us - - - - - - diff --git a/app/design/frontend/default/blank/layout/core.xml b/app/design/frontend/default/blank/layout/core.xml deleted file mode 100644 index b991c70edf..0000000000 --- a/app/design/frontend/default/blank/layout/core.xml +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - diff --git a/app/design/frontend/default/blank/layout/customer.xml b/app/design/frontend/default/blank/layout/customer.xml deleted file mode 100644 index 7b9f91e01e..0000000000 --- a/app/design/frontend/default/blank/layout/customer.xml +++ /dev/null @@ -1,253 +0,0 @@ - - - - - - - - - - - My Account10 - - - - - - - - Log Out100 - - - - - - - - Log In100 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Password forgotten - - - - - - - - - - - - - - Send confirmation link - - - - - - - - - - Edit Account Info - - - - - - - left.permanent.callout - - - - - - - - - - - - - - accountcustomer/account/ - account_editcustomer/account/edit/ - address_bookcustomer/address/ - - - simplecheckout/cart_item_renderer - groupedcheckout/cart_item_renderer_grouped - configurablecheckout/cart_item_renderer_configurable - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/app/design/frontend/default/blank/layout/cybermut.xml b/app/design/frontend/default/blank/layout/cybermut.xml deleted file mode 100644 index c139484c6c..0000000000 --- a/app/design/frontend/default/blank/layout/cybermut.xml +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - - - - - - - - diff --git a/app/design/frontend/default/blank/layout/directory.xml b/app/design/frontend/default/blank/layout/directory.xml deleted file mode 100644 index c001bec175..0000000000 --- a/app/design/frontend/default/blank/layout/directory.xml +++ /dev/null @@ -1,73 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/app/design/frontend/default/blank/layout/downloadable.xml b/app/design/frontend/default/blank/layout/downloadable.xml deleted file mode 100644 index a74076370b..0000000000 --- a/app/design/frontend/default/blank/layout/downloadable.xml +++ /dev/null @@ -1,167 +0,0 @@ - - - - - - - downloadable_productsdownloadable/customer/products - - - - - - - - - - My Downloadable Products - - - - - - downloadabledownloadable/checkout_cart_item_renderer - - - - - - downloadabledownloadable/checkout_cart_item_renderer - - - - - - - - - - - - downloadabledownloadable/checkout_cart_item_renderer - - - - - - downloadabledownloadable/checkout_cart_item_renderer - - - - - - downloadabledownloadable/checkout_cart_item_renderer - - - - - - - - - - - - downloadabledownloadable/sales_order_item_renderer_downloadable - - - - - - downloadabledownloadable/sales_order_item_renderer_downloadable - - - - - - downloadabledownloadable/sales_order_item_renderer_downloadable - - - - - - - - downloadabledownloadable/sales_order_item_renderer_downloadable - - - - - - downloadabledownloadable/sales_order_item_renderer_downloadable - - - - - - downloadabledownloadable/sales_order_item_renderer_downloadable - - - - - - - - - - downloadabledownloadable/sales_order_email_items_order_downloadable - - - - - - downloadabledownloadable/sales_order_email_items_downloadable - - - - - - downloadabledownloadable/sales_order_email_items_downloadable - - - - - - - - - - - - product.info.downloadable.options - - - - diff --git a/app/design/frontend/default/blank/layout/eway.xml b/app/design/frontend/default/blank/layout/eway.xml deleted file mode 100644 index 8b85673a68..0000000000 --- a/app/design/frontend/default/blank/layout/eway.xml +++ /dev/null @@ -1,53 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/app/design/frontend/default/blank/layout/giftmessage.xml b/app/design/frontend/default/blank/layout/giftmessage.xml deleted file mode 100644 index ae95cd405c..0000000000 --- a/app/design/frontend/default/blank/layout/giftmessage.xml +++ /dev/null @@ -1,71 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - save - - - - - - - - - - - - remove - - - - - diff --git a/app/design/frontend/default/blank/layout/googleanalytics.xml b/app/design/frontend/default/blank/layout/googleanalytics.xml deleted file mode 100644 index 56a31fd8cf..0000000000 --- a/app/design/frontend/default/blank/layout/googleanalytics.xml +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - - - - - - - diff --git a/app/design/frontend/default/blank/layout/googlecheckout.xml b/app/design/frontend/default/blank/layout/googlecheckout.xml deleted file mode 100644 index 0d7e2952f0..0000000000 --- a/app/design/frontend/default/blank/layout/googlecheckout.xml +++ /dev/null @@ -1,53 +0,0 @@ - - - - - - - - - - - - - - - true - - - - - - - - - - - - diff --git a/app/design/frontend/default/blank/layout/googleoptimizer.xml b/app/design/frontend/default/blank/layout/googleoptimizer.xml deleted file mode 100644 index 9d842e1bb8..0000000000 --- a/app/design/frontend/default/blank/layout/googleoptimizer.xml +++ /dev/null @@ -1,153 +0,0 @@ - - - - - - - - - - control_script - - - - - tracking_script - - - - - - - - control_script - - - - - tracking_script - - - - - - - - control_script - - - - - tracking_script - - - - - - - - control_script - - - - - tracking_script - - - - - - - - control_script - - - - - tracking_script - - - - - - - - conversion_script - checkout_cart - - - - - - - - conversion_script - checkout_onepage - - - - - - - - conversion_script - checkout_onepage_success - - - - - - - - conversion_script - checkout_multishipping_success - - - - - - - - conversion_script - checkout_multishipping - - - - - - - - conversion_script - customer_account_create - - - - - diff --git a/app/design/frontend/default/blank/layout/ideal.xml b/app/design/frontend/default/blank/layout/ideal.xml deleted file mode 100644 index 2cca438eb6..0000000000 --- a/app/design/frontend/default/blank/layout/ideal.xml +++ /dev/null @@ -1,51 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - diff --git a/app/design/frontend/default/blank/layout/newsletter.xml b/app/design/frontend/default/blank/layout/newsletter.xml deleted file mode 100644 index c3993b343e..0000000000 --- a/app/design/frontend/default/blank/layout/newsletter.xml +++ /dev/null @@ -1,69 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - newsletternewsletter/manage/ - - - - - - - right.newsletter - - - - - - - - - - - diff --git a/app/design/frontend/default/blank/layout/ogone.xml b/app/design/frontend/default/blank/layout/ogone.xml deleted file mode 100644 index 1fd4e7f523..0000000000 --- a/app/design/frontend/default/blank/layout/ogone.xml +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - diff --git a/app/design/frontend/default/blank/layout/oscommerce.xml b/app/design/frontend/default/blank/layout/oscommerce.xml deleted file mode 100644 index a7bad6d113..0000000000 --- a/app/design/frontend/default/blank/layout/oscommerce.xml +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/app/design/frontend/default/blank/layout/page.xml b/app/design/frontend/default/blank/layout/page.xml deleted file mode 100644 index f9cea5b111..0000000000 --- a/app/design/frontend/default/blank/layout/page.xml +++ /dev/null @@ -1,161 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - css/reset.css - css/styles.css - css/clears.css - - skin_csscss/styles-ie.csslt IE 8 - - jslib/ds-sleight.jslt IE 7 - jsvarien/iehover-fix.jslt IE 7 - - css/print.cssmedia="print" - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - css/reset.css - css/styles.css - css/clears.css - - skin_csscss/styles-ie.csslt IE 8 - - jslib/ds-sleight.jslt IE 7 - jsvarien/iehover-fix.jslt IE 7 - - css/print.cssmedia="print" - - - - - - - - - - - - - 1 - - - - - - - - 1 - - - - - - - - 1 - - - - - - - - 1 - - - - - - - - 1 - - - - diff --git a/app/design/frontend/default/blank/layout/paybox.xml b/app/design/frontend/default/blank/layout/paybox.xml deleted file mode 100644 index 696dbc4c0e..0000000000 --- a/app/design/frontend/default/blank/layout/paybox.xml +++ /dev/null @@ -1,56 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/app/design/frontend/default/blank/layout/paypal.xml b/app/design/frontend/default/blank/layout/paypal.xml deleted file mode 100644 index 2cc7703afe..0000000000 --- a/app/design/frontend/default/blank/layout/paypal.xml +++ /dev/null @@ -1,70 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/app/design/frontend/default/blank/layout/paypaluk.xml b/app/design/frontend/default/blank/layout/paypaluk.xml deleted file mode 100644 index dd93439523..0000000000 --- a/app/design/frontend/default/blank/layout/paypaluk.xml +++ /dev/null @@ -1,70 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/app/design/frontend/default/blank/layout/poll.xml b/app/design/frontend/default/blank/layout/poll.xml deleted file mode 100644 index 8cb2b169cf..0000000000 --- a/app/design/frontend/default/blank/layout/poll.xml +++ /dev/null @@ -1,57 +0,0 @@ - - - - - - - - - - - - poll - results - - - - - - - - - - right.poll - - - - diff --git a/app/design/frontend/default/blank/layout/productalert.xml b/app/design/frontend/default/blank/layout/productalert.xml deleted file mode 100644 index 4f65579d3e..0000000000 --- a/app/design/frontend/default/blank/layout/productalert.xml +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - - - - - - - - - diff --git a/app/design/frontend/default/blank/layout/protx.xml b/app/design/frontend/default/blank/layout/protx.xml deleted file mode 100644 index aafcf2f010..0000000000 --- a/app/design/frontend/default/blank/layout/protx.xml +++ /dev/null @@ -1,43 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/app/design/frontend/default/blank/layout/reports.xml b/app/design/frontend/default/blank/layout/reports.xml deleted file mode 100644 index c6dcbef3d6..0000000000 --- a/app/design/frontend/default/blank/layout/reports.xml +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - - diff --git a/app/design/frontend/default/blank/layout/review.xml b/app/design/frontend/default/blank/layout/review.xml deleted file mode 100644 index 4ac9b749c7..0000000000 --- a/app/design/frontend/default/blank/layout/review.xml +++ /dev/null @@ -1,117 +0,0 @@ - - - - - - - - reviewsreview/customer - - - - - - - - - - - customer_account_dashboard_info1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/app/design/frontend/default/blank/layout/rss.xml b/app/design/frontend/default/blank/layout/rss.xml deleted file mode 100644 index df2c90a9e1..0000000000 --- a/app/design/frontend/default/blank/layout/rss.xml +++ /dev/null @@ -1,92 +0,0 @@ - - - - - - rssRSStrue
  • class="link-rss" - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/app/design/frontend/default/blank/layout/sales.xml b/app/design/frontend/default/blank/layout/sales.xml deleted file mode 100644 index 3864c36661..0000000000 --- a/app/design/frontend/default/blank/layout/sales.xml +++ /dev/null @@ -1,267 +0,0 @@ - - - - - - - - - - - - - - - - - - reorder - - - - - - - orderssales/order/history/ - - - - - - - - - - top - - - - - - - - - - - - - - - - - - - - - defaultsales/order_item_renderer_default - - colspan="4" class="a-right" - class="last a-right" - - - - - - - view - invoice*/*/invoice - shipment*/*/shipment - creditmemo*/*/creditmemo - - - - - - - - - - defaultsales/order_item_renderer_default - - colspan="4" class="a-right" - class="last a-right" - - - - - - - view*/*/view - invoice - shipment*/*/shipment - creditmemo*/*/creditmemo - - - - - - - - - - defaultsales/order_item_renderer_default - - - - - view*/*/view - invoice*/*/invoice - shipment - creditmemo*/*/creditmemo - - - - - - - - - - defaultsales/order_item_renderer_default - - colspan="6" align="right" style="padding:3px 9px" - align="right" style="padding:3px 9px" - - - - - - - view*/*/view - invoice*/*/invoice - shipment*/*/shipment - creditmemo - - - - - - - - - - - - - - defaultsales/order_item_renderer_default - - colspan="4" class="a-right" - class="last a-right" - - 1 - - - - - - - - - - defaultsales/order_item_renderer_default - - colspan="4" class="a-right" - class="last a-right" - - - - - - - - - - defaultsales/order_item_renderer_default - - - - - - - - defaultsales/order_item_renderer_default - - colspan="6" align="right" style="padding:3px 9px" - align="right" style="padding:3px 9px" - - - - - - - - - - defaultsales/order_email_items_order_default - - colspan="3" align="right" style="padding:3px 9px" - align="right" style="padding:3px 9px" - - 1 - - - - - - - - defaultsales/order_email_items_default - - colspan="3" align="right" style="padding:3px 9px" - align="right" style="padding:3px 9px" - - - - - - - - defaultsales/order_email_items_default - - - - - - defaultsales/order_email_items_default - - colspan="3" align="right" style="padding:3px 9px" - align="right" style="padding:3px 9px" - - - - - - diff --git a/app/design/frontend/default/blank/layout/sendfriend.xml b/app/design/frontend/default/blank/layout/sendfriend.xml deleted file mode 100644 index c63d954eb0..0000000000 --- a/app/design/frontend/default/blank/layout/sendfriend.xml +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/app/design/frontend/default/blank/layout/shipping.xml b/app/design/frontend/default/blank/layout/shipping.xml deleted file mode 100644 index bbad2c1c3c..0000000000 --- a/app/design/frontend/default/blank/layout/shipping.xml +++ /dev/null @@ -1,51 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - diff --git a/app/design/frontend/default/blank/layout/tag.xml b/app/design/frontend/default/blank/layout/tag.xml deleted file mode 100644 index 83b8b79974..0000000000 --- a/app/design/frontend/default/blank/layout/tag.xml +++ /dev/null @@ -1,128 +0,0 @@ - - - - - - - - - - - - - - - - - - - - tagstag/customer/ - - - - - - - - - customer_account_dashboard_info2 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - My Account - - - - - - - - - - My Account - - - - - - - - - - My Account - - - - - - diff --git a/app/design/frontend/default/blank/layout/wishlist.xml b/app/design/frontend/default/blank/layout/wishlist.xml deleted file mode 100644 index 7e5a334229..0000000000 --- a/app/design/frontend/default/blank/layout/wishlist.xml +++ /dev/null @@ -1,104 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - wishlistwishlist/ - - - - - - - - - wishlist - - - - - - - - - - - - - wishlist_customer_sidebar - - - - - - - - - - - wishlist_customer_sidebar - - - - - - - - - - diff --git a/app/design/frontend/default/blank/template/amazonpayments/asp/form.phtml b/app/design/frontend/default/blank/template/amazonpayments/asp/form.phtml deleted file mode 100644 index a12363eeb2..0000000000 --- a/app/design/frontend/default/blank/template/amazonpayments/asp/form.phtml +++ /dev/null @@ -1,35 +0,0 @@ - -
    - getMethodCode() ?> - -
    diff --git a/app/design/frontend/default/blank/template/amazonpayments/asp/redirect.phtml b/app/design/frontend/default/blank/template/amazonpayments/asp/redirect.phtml deleted file mode 100644 index bd25cbc3c5..0000000000 --- a/app/design/frontend/default/blank/template/amazonpayments/asp/redirect.phtml +++ /dev/null @@ -1,37 +0,0 @@ - - - - __('You will be redirected to Amazon Simple Pay in a few seconds.')); ?> -
    - getRedirectParams() as $name => $value) { ?> - - -
    - - - diff --git a/app/design/frontend/default/blank/template/amazonpayments/asp/shortcut.phtml b/app/design/frontend/default/blank/template/amazonpayments/asp/shortcut.phtml deleted file mode 100644 index cd636ef7f4..0000000000 --- a/app/design/frontend/default/blank/template/amazonpayments/asp/shortcut.phtml +++ /dev/null @@ -1,33 +0,0 @@ - - - - diff --git a/app/design/frontend/default/blank/template/amazonpayments/cba/form.phtml b/app/design/frontend/default/blank/template/amazonpayments/cba/form.phtml deleted file mode 100644 index 6c63e50050..0000000000 --- a/app/design/frontend/default/blank/template/amazonpayments/cba/form.phtml +++ /dev/null @@ -1,35 +0,0 @@ - -
    - getMethodCode() ?> - -
    diff --git a/app/design/frontend/default/blank/template/amazonpayments/cba/success.phtml b/app/design/frontend/default/blank/template/amazonpayments/cba/success.phtml deleted file mode 100644 index 7a56524295..0000000000 --- a/app/design/frontend/default/blank/template/amazonpayments/cba/success.phtml +++ /dev/null @@ -1,35 +0,0 @@ - -SUCCESS -
    -

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

    -
    -

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

    -

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

    -
    - -
    diff --git a/app/design/frontend/default/blank/template/amazonpayments/form.phtml b/app/design/frontend/default/blank/template/amazonpayments/form.phtml deleted file mode 100644 index 3a7982b355..0000000000 --- a/app/design/frontend/default/blank/template/amazonpayments/form.phtml +++ /dev/null @@ -1,30 +0,0 @@ - -getMethodCode() ?> - diff --git a/app/design/frontend/default/blank/template/amazonpayments/link.phtml b/app/design/frontend/default/blank/template/amazonpayments/link.phtml deleted file mode 100644 index 428f6afedc..0000000000 --- a/app/design/frontend/default/blank/template/amazonpayments/link.phtml +++ /dev/null @@ -1,49 +0,0 @@ - - -
  • - getIsDisabled()): ?> - getIsOneClickEnabled()): ?> - - - -
    - -
    - - <?php echo Mage::helper('amazonpayments')->__('Checkout by Amazon');?> - - -
  • 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 deleted file mode 100644 index 95ac86b366..0000000000 --- a/app/design/frontend/default/blank/template/bundle/catalog/product/list/partof.phtml +++ /dev/null @@ -1,52 +0,0 @@ - -getItemCollection()->getSize()): ?> -
    -

    __('This product is also part of bundle(s)') ?>

    - - setColumnCount(4); // uncomment this line if you want to have another number of columns ?> - resetItemsIterator() ?> - getRowCount();$_i++): ?> - - getColumnCount();$_j++): ?> - getIterableItem()): ?> - - - - - - - -
    -

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

    -

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

    - getPriceHtml($_bundle, true) ?> - getReviewsSummaryHtml($_bundle) ?> -
     
    - -
    - 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 deleted file mode 100644 index c031f41ed5..0000000000 --- a/app/design/frontend/default/blank/template/bundle/catalog/product/price.phtml +++ /dev/null @@ -1,262 +0,0 @@ - -getProduct() ?> -getPriceModel()->getPrices($_product) ?> -getId() ?> - - - -getPrice($_product, $_minimalPrice); ?> -getPrice($_product, $_minimalPrice, true); ?> - -getPriceType() == 1) { - $_weeeTaxAmount = Mage::helper('weee')->getAmount($_product); - if ($_weeeTaxAmount && Mage::helper('weee')->typeOfDisplay($_product, array(0, 1, 4))) { - $_minimalPriceTax += $_weeeTaxAmount; - $_minimalPriceInclTax += $_weeeTaxAmount; - } - if ($_weeeTaxAmount && Mage::helper('weee')->typeOfDisplay($_product, 2)) { - $_minimalPriceInclTax += $_weeeTaxAmount; - } - - if (Mage::helper('weee')->typeOfDisplay($_product, array(1,2,4))) { - $_weeeTaxAttributes = Mage::helper('weee')->getProductWeeeAttributesForDisplay($_product); - } -} -?> - -
    - getPriceView()): ?> -

    - __('As low as') ?>: - helper('tax')->displayBothPrices()): ?> - - __('Excl. Tax:') ?> - currency($_minimalPriceTax) ?> - - getPriceType() == 1 && Mage::helper('weee')->typeOfDisplay($_product, array(2, 1, 4))): ?> - ( - - typeOfDisplay($_product, array(2, 4))): ?> - getAmount()+$_weeeTaxAttribute->getTaxAmount(); ?> - - getAmount(); ?> - - - - getName(); ?>: currency($amount, true, true); ?> - - - ) - - - __('Incl. Tax:') ?> - currency($_minimalPriceInclTax) ?> - - - currency($_minimalPriceTax) ?> - getPriceType() == 1 && Mage::helper('weee')->typeOfDisplay($_product, array(2, 1, 4))): ?> - ( - - typeOfDisplay($_product, array(2, 4))): ?> - getAmount()+$_weeeTaxAttribute->getTaxAmount(); ?> - - getAmount(); ?> - - - - getName(); ?>: currency($amount, true, true); ?> - - - ) - - typeOfDisplay($_product, 2) && $_weeeTaxAmount): ?> - currency($_minimalPriceInclTax) ?> - - -

    - - $_maximalPrice): ?> -

    - __('From') ?>: - helper('tax')->displayBothPrices()): ?> - - __('Excl. Tax:') ?> - currency($_minimalPriceTax) ?> - - getPriceType() == 1 && Mage::helper('weee')->typeOfDisplay($_product, array(2, 1, 4))): ?> - ( - - typeOfDisplay($_product, array(2, 4))): ?> - getAmount()+$_weeeTaxAttribute->getTaxAmount(); ?> - - getAmount(); ?> - - - - getName(); ?>: currency($amount, true, true); ?> - - - ) - - - __('Incl. Tax:') ?> - currency($_minimalPriceInclTax) ?> - - - currency($_minimalPriceTax) ?> - getPriceType() == 1 && Mage::helper('weee')->typeOfDisplay($_product, array(2, 1, 4))): ?> - ( - - typeOfDisplay($_product, array(2, 4))): ?> - getAmount()+$_weeeTaxAttribute->getTaxAmount(); ?> - - getAmount(); ?> - - - - getName(); ?>: currency($amount, true, true); ?> - - - ) - - typeOfDisplay($_product, 2) && $_weeeTaxAmount): ?> - currency($_minimalPriceInclTax) ?> - - -

    - getPrice($_product, $_maximalPrice); ?> - getPrice($_product, $_maximalPrice, true); ?> - getPriceType() == 1) { - if ($_weeeTaxAmount && Mage::helper('weee')->typeOfDisplay($_product, array(0, 1, 4))) { - $_maximalPriceTax += $_weeeTaxAmount; - $_maximalPriceInclTax += $_weeeTaxAmount; - } - if ($_weeeTaxAmount && Mage::helper('weee')->typeOfDisplay($_product, 2)) { - $_maximalPriceInclTax += $_weeeTaxAmount; - } - } - ?> -

    - __('To') ?>: - helper('tax')->displayBothPrices()): ?> - - __('Excl. Tax:') ?> - currency($_maximalPriceTax) ?> - - getPriceType() == 1 && Mage::helper('weee')->typeOfDisplay($_product, array(2, 1, 4))): ?> - ( - - typeOfDisplay($_product, array(2, 4))): ?> - getAmount()+$_weeeTaxAttribute->getTaxAmount(); ?> - - getAmount(); ?> - - - - getName(); ?>: currency($amount, true, true); ?> - - - ) - - - __('Incl. Tax') ?> - currency($_maximalPriceInclTax) ?> - - - currency($_maximalPriceTax) ?> - getPriceType() == 1 && Mage::helper('weee')->typeOfDisplay($_product, array(2, 1, 4))): ?> - ( - - typeOfDisplay($_product, array(2, 4))): ?> - getAmount()+$_weeeTaxAttribute->getTaxAmount(); ?> - - getAmount(); ?> - - - - getName(); ?>: currency($amount, true, true); ?> - - - ) - - typeOfDisplay($_product, 2) && $_weeeTaxAmount): ?> - currency($_maximalPriceInclTax) ?> - - -

    - - helper('tax')->displayBothPrices()): ?> - - __('Excl. Tax:') ?> - currency($_minimalPriceTax) ?> - - getPriceType() == 1 && Mage::helper('weee')->typeOfDisplay($_product, array(2, 1, 4))): ?> - ( - - typeOfDisplay($_product, array(2, 4))): ?> - getAmount()+$_weeeTaxAttribute->getTaxAmount(); ?> - - getAmount(); ?> - - - - getName(); ?>: currency($amount, true, true); ?> - - - ) - - - __('Incl. Tax:') ?> - currency($_minimalPriceInclTax) ?> - - - currency($_minimalPriceTax) ?> - getPriceType() == 1 && Mage::helper('weee')->typeOfDisplay($_product, array(2, 1, 4))): ?> - ( - - typeOfDisplay($_product, array(2, 4))): ?> - getAmount()+$_weeeTaxAttribute->getTaxAmount(); ?> - - getAmount(); ?> - - - - getName(); ?>: currency($amount, true, true); ?> - - - ) - - typeOfDisplay($_product, 2) && $_weeeTaxAmount): ?> - currency($_minimalPriceInclTax) ?> - - - - -
    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 deleted file mode 100644 index 91659bc27a..0000000000 --- a/app/design/frontend/default/blank/template/bundle/catalog/product/view/price.phtml +++ /dev/null @@ -1,93 +0,0 @@ - -getProduct() ?> -getPrice($_product, $_product->getFinalPrice()); ?> -getPrice($_product, $_product->getFinalPrice(), true); ?> - -getPriceType() == 1) { - $_weeeTaxAmount = Mage::helper('weee')->getAmount($_product); - if (Mage::helper('weee')->typeOfDisplay($_product, array(1,2,4))) { - $_weeeTaxAttributes = Mage::helper('weee')->getProductWeeeAttributesForDisplay($_product); - } -} -?> - -
    -

    - helper('bundle')->__('Price as configured') ?>: - helper('tax')->displayBothPrices()): ?> - - - __('Excl. Tax:') ?> - currency($_finalPrice,true,false) ?> - - getPriceType() == 1 && Mage::helper('weee')->typeOfDisplay($_product, array(2, 1, 4))): ?> - ( - - typeOfDisplay($_product, array(2, 4))): ?> - getAmount()+$_weeeTaxAttribute->getTaxAmount(); ?> - - getAmount(); ?> - - - - getName(); ?>: currency($amount, true, true); ?> - - - ) - - - __('Incl. Tax:') ?> - currency($_finalPriceInclTax,true,false) ?> - - - - currency($_finalPrice,true,false) ?> - getPriceType() == 1 && Mage::helper('weee')->typeOfDisplay($_product, array(2, 1, 4))): ?> - ( - - typeOfDisplay($_product, array(2, 4))): ?> - getAmount()+$_weeeTaxAttribute->getTaxAmount(); ?> - - getAmount(); ?> - - - - getName(); ?>: currency($amount, true, true); ?> - - - ) - - -

    -
    -isSaleable()): ?> - - 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 deleted file mode 100644 index 7fa18492b5..0000000000 --- a/app/design/frontend/default/blank/template/bundle/catalog/product/view/tierprices.phtml +++ /dev/null @@ -1,41 +0,0 @@ - - -getProduct(); -$_tierPrices = $this->getTierPrices(); -?> - 0): ?> -
      - -
    • __('Buy %1$s with %2$s discount each', $_price['price_qty'], ''.($_price['price']*1).'%') ?>
    • - -
    - 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 deleted file mode 100644 index 399c6297a1..0000000000 --- a/app/design/frontend/default/blank/template/bundle/catalog/product/view/type/bundle.phtml +++ /dev/null @@ -1,44 +0,0 @@ - -getProduct() ?> - -isSaleable()): ?> - -

    helper('catalog')->__('Availability') ?>: helper('catalog')->__('In stock') ?>

    - -

    helper('catalog')->__('Availability') ?>: helper('catalog')->__('Out of stock') ?>

    - - -
    - getPriceHtml($_product) ?> -
    -getChildHtml('bundle_prices') ?> 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 deleted file mode 100644 index 80dbafdaae..0000000000 --- a/app/design/frontend/default/blank/template/bundle/catalog/product/view/type/bundle/option/checkbox.phtml +++ /dev/null @@ -1,48 +0,0 @@ - -getOption() ?> -getSelections() ?> -
    -decoratedIsLast){?> class="last"> -getRequired()): ?> - getSelectionQtyTitlePrice($_selections[0]) ?> - - -
      - -
    • getIsDefault() && $_selection->isSaleable())?' checked="checked" ':'' ?>isSaleable()?' disabled="disabled" ':'' ?> value="getSelectionId() ?>" /> - - getRequired()): ?> - setValidationContainer('bundle-option-'.$_option->getId().'-'.$_selection->getSelectionId(), 'bundle-option-'.$_option->getId().'-container') ?> - -
    • - -
    - - - 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 deleted file mode 100644 index 7ea586f603..0000000000 --- a/app/design/frontend/default/blank/template/bundle/catalog/product/view/type/bundle/option/multi.phtml +++ /dev/null @@ -1,46 +0,0 @@ - - -getOption() ?> -getSelections() ?> -
    -decoratedIsLast){?> class="last"> - getRequired()): ?> - getSelectionQtyTitlePrice($_selections[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 deleted file mode 100644 index fdf10eb690..0000000000 --- a/app/design/frontend/default/blank/template/bundle/catalog/product/view/type/bundle/option/radio.phtml +++ /dev/null @@ -1,72 +0,0 @@ - - -getOption() ?> -getSelections() ?> -getDefaultSelection() ?> -getRequired()) ?> -
    - - getSelectionQty()*1 ?> - getSelectionCanChangeQty() ?> - - - - - - getSelectionQty()*1 ?> - getSelectionCanChangeQty() ?> - - - id="bundle-option-getId() ?>-qty-input" class="input-text qty" type="text" name="bundle_option_qty[getId() ?>]" value="" /> - - -
    -decoratedIsLast){?> class="last"> - getRequired()): ?> - getSelectionTitlePrice($_selections[0]) ?> - - -
      - getRequired()): ?> -
    • isSalable())?'':' checked="checked" ' ?> value="" /> - -
    • - - -
    • getIsDefault() && $_selection->isSaleable())?' checked="checked" ':'' ?>isSaleable()?' disabled="disabled" ':'' ?>value="getSelectionId() ?>" /> - - getRequired()): ?> - setValidationContainer('bundle-option-'.$_option->getId().'-'.$_selection->getSelectionId(), 'bundle-option-'.$_option->getId().'-container') ?> - -
    • - -
    - - - 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 deleted file mode 100644 index 218848858f..0000000000 --- a/app/design/frontend/default/blank/template/bundle/catalog/product/view/type/bundle/option/select.phtml +++ /dev/null @@ -1,61 +0,0 @@ - - -getOption() ?> -getSelections() ?> -getRequired()) ?> -
    - getDefaultSelection()): ?> - getSelectionQty()*1 ?> - getSelectionCanChangeQty() ?> - - - - - - getSelectionQty()*1 ?> - getSelectionCanChangeQty() ?> - - - id="bundle-option-getId() ?>-qty-input" class="input-text qty" type="text" name="bundle_option_qty[getId() ?>]" value="" /> - - -
    -decoratedIsLast){?> class="last"> - - getSelectionTitlePrice($_selections[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 deleted file mode 100644 index c75aa7b4b1..0000000000 --- a/app/design/frontend/default/blank/template/bundle/catalog/product/view/type/bundle/options.phtml +++ /dev/null @@ -1,45 +0,0 @@ - - -getProduct(); -$_options = Mage::helper('core')->decorateArray($this->getOptions()); -?> -isSaleable()):?> - -
    - - getSelections()): ?> - - - getOptionHtml($_option) ?> - -
    - -

    __('No options of this product are available.') ?>

    - - 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 deleted file mode 100644 index b735113a5c..0000000000 --- a/app/design/frontend/default/blank/template/bundle/email/order/items/creditmemo/default.phtml +++ /dev/null @@ -1,168 +0,0 @@ - -getItem() ?> -getItem()->getOrder(); ?> - -getChilds($parentItem) ?> - - - - - -getItemOptions() || $parentItem->getDescription() || $this->helper('giftmessage/message')->getIsMessagesAvailable('order_item', $parentItem) && $parentItem->getGiftMessageId()): ?> - - - - - -getOrderItem()->getParentItem()): ?> - getSelectionAttributes($_item) ?> - - - -   -   -   - - - - - - getOrderItem()->getParentItem()): ?> - htmlEscape($_item->getName()) ?> - - getValueHtml($_item)?> - - getSku() ?> - - canShowPriceInfo($_item)): ?> - getQty()*1 ?> - -   - - - - canShowPriceInfo($_item)): ?> - helper('tax')->displaySalesPriceExclTax($_order->getStore()) || $this->helper('tax')->displaySalesBothPrices($_order->getStore())): ?> - helper('tax')->displaySalesBothPrices($_order->getStore())): ?> - __('Excl. Tax'); ?>: - - typeOfDisplay($_item, array(0, 1, 4), 'email', $_order->getStore())): ?> - formatPrice($_item->getRowTotal()+$_item->getWeeeTaxAppliedRowAmount()+$_item->getWeeeTaxRowDisposition()); ?> - - formatPrice($_item->getRowTotal()) ?> - - - - getApplied($_item)): ?> -
    - typeOfDisplay($_item, 1, 'email', $_order->getStore())): ?> - - getApplied($_item) as $tax): ?> - : formatPrice($tax['row_amount'],true,true); ?>
    - -
    - typeOfDisplay($_item, 2, 'email', $_order->getStore())): ?> - getApplied($_item) as $tax): ?> - : formatPrice($tax['row_amount_incl_tax'],true,true); ?>
    - - typeOfDisplay($_item, 4, 'email', $_order->getStore())): ?> - - getApplied($_item) as $tax): ?> - : formatPrice($tax['row_amount_incl_tax'],true,true); ?>
    - -
    - - - typeOfDisplay($_item, 2, 'email', $_order->getStore())): ?> -
    - __('Total'); ?>:
    formatPrice($_item->getCalculationPrice()+$_item->getWeeeTaxAppliedRowAmount()+$_item->getWeeeTaxRowDisposition()); ?>
    - - - - - - helper('tax')->displaySalesPriceInclTax($_order->getStore()) || $this->helper('tax')->displaySalesBothPrices($_order->getStore())): ?> - helper('tax')->displaySalesBothPrices($_order->getStore())): ?> -
    __('Incl. Tax'); ?>: - - helper('checkout')->getSubtotalInclTax($_item); ?> - typeOfDisplay($_item, array(0, 1, 4), 'email', $_order->getStore())): ?> - formatPrice($_incl+$_item->getWeeeTaxAppliedRowAmount()); ?> - - formatPrice($_incl-$_item->getWeeeTaxRowDisposition()) ?> - - getApplied($_item)): ?> -
    - typeOfDisplay($_item, 1, 'email', $_order->getStore())): ?> - - getApplied($_item) as $tax): ?> - : formatPrice($tax['row_amount'],true,true); ?>
    - -
    - typeOfDisplay($_item, 2, 'email', $_order->getStore())): ?> - getApplied($_item) as $tax): ?> - : formatPrice($tax['row_amount_incl_tax'],true,true); ?>
    - - typeOfDisplay($_item, 4, 'email', $_order->getStore())): ?> - - getApplied($_item) as $tax): ?> - : formatPrice($tax['row_amount_incl_tax'],true,true); ?>
    - -
    - - - typeOfDisplay($_item, 2, 'email', $_order->getStore())): ?> - __('Total incl. tax'); ?>:
    formatPrice($_incl+$_item->getWeeeTaxAppliedRowAmount()); ?>
    - - - - -   - - - - - - - - - getItemOptions()): ?> -
    - getItemOptions() as $option): ?> -
    -
    - -
    - - getDescription() ?> - -   -   -   - - 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 deleted file mode 100644 index dd1cee93c9..0000000000 --- a/app/design/frontend/default/blank/template/bundle/email/order/items/invoice/default.phtml +++ /dev/null @@ -1,169 +0,0 @@ - - -getItem() ?> -getChilds($parentItem) ?> - -getItem()->getOrder(); ?> - - - - - -getItemOptions() || $parentItem->getDescription() || $this->helper('giftmessage/message')->getIsMessagesAvailable('order_item', $parentItem) && $parentItem->getGiftMessageId()): ?> - - - - - -getOrderItem()->getParentItem()): ?> - getSelectionAttributes($_item) ?> - - - -   -   -   - - - - - - getOrderItem()->getParentItem()): ?> - htmlEscape($_item->getName()) ?> - - getValueHtml($_item)?> - - getSku() ?> - - canShowPriceInfo($_item)): ?> - getQty()*1 ?> - -   - - - - canShowPriceInfo($_item)): ?> - helper('tax')->displaySalesPriceExclTax($_order->getStore()) || $this->helper('tax')->displaySalesBothPrices($_order->getStore())): ?> - helper('tax')->displaySalesBothPrices($_order->getStore())): ?> - __('Excl. Tax'); ?>: - - typeOfDisplay($_item, array(0, 1, 4), 'email', $_order->getStore())): ?> - formatPrice($_item->getRowTotal()+$_item->getWeeeTaxAppliedRowAmount()+$_item->getWeeeTaxRowDisposition()); ?> - - formatPrice($_item->getRowTotal()) ?> - - - - getApplied($_item)): ?> -
    - typeOfDisplay($_item, 1, 'email', $_order->getStore())): ?> - - getApplied($_item) as $tax): ?> - : formatPrice($tax['row_amount'],true,true); ?>
    - -
    - typeOfDisplay($_item, 2, 'email', $_order->getStore())): ?> - getApplied($_item) as $tax): ?> - : formatPrice($tax['row_amount_incl_tax'],true,true); ?>
    - - typeOfDisplay($_item, 4, 'email', $_order->getStore())): ?> - - getApplied($_item) as $tax): ?> - : formatPrice($tax['row_amount_incl_tax'],true,true); ?>
    - -
    - - - typeOfDisplay($_item, 2, 'email', $_order->getStore())): ?> -
    - __('Total'); ?>:
    formatPrice($_item->getCalculationPrice()+$_item->getWeeeTaxAppliedRowAmount()+$_item->getWeeeTaxRowDisposition()); ?>
    - - - - - - helper('tax')->displaySalesPriceInclTax($_order->getStore()) || $this->helper('tax')->displaySalesBothPrices($_order->getStore())): ?> - helper('tax')->displaySalesBothPrices($_order->getStore())): ?> -
    __('Incl. Tax'); ?>: - - helper('checkout')->getSubtotalInclTax($_item); ?> - typeOfDisplay($_item, array(0, 1, 4), 'email', $_order->getStore())): ?> - formatPrice($_incl+$_item->getWeeeTaxAppliedRowAmount()); ?> - - formatPrice($_incl-$_item->getWeeeTaxRowDisposition()) ?> - - getApplied($_item)): ?> -
    - typeOfDisplay($_item, 1, 'email', $_order->getStore())): ?> - - getApplied($_item) as $tax): ?> - : formatPrice($tax['row_amount'],true,true); ?>
    - -
    - typeOfDisplay($_item, 2, 'email', $_order->getStore())): ?> - getApplied($_item) as $tax): ?> - : formatPrice($tax['row_amount_incl_tax'],true,true); ?>
    - - typeOfDisplay($_item, 4, 'email', $_order->getStore())): ?> - - getApplied($_item) as $tax): ?> - : formatPrice($tax['row_amount_incl_tax'],true,true); ?>
    - -
    - - - typeOfDisplay($_item, 2, 'email', $_order->getStore())): ?> - __('Total incl. tax'); ?>:
    formatPrice($_incl+$_item->getWeeeTaxAppliedRowAmount()); ?>
    - - - - -   - - - - - - - - - getItemOptions()): ?> -
    - getItemOptions() as $option): ?> -
    -
    - -
    - - getDescription() ?> - -   -   -   - - 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 deleted file mode 100644 index 5eab6fa610..0000000000 --- a/app/design/frontend/default/blank/template/bundle/email/order/items/order/default.phtml +++ /dev/null @@ -1,174 +0,0 @@ - -getItem() ?> -getOrder() ?> - -getItem() ?> -getChildrenItems()); ?> - -getItemOptions() || $_item->getDescription() || $this->helper('giftmessage/message')->getIsMessagesAvailable('order_item', $_item) && $_item->getGiftMessageId()): ?> - - - - - - - - - -getParentItem()): ?> - getSelectionAttributes($_item) ?> - - - -   -   -   - - - - - - getParentItem()): ?> - htmlEscape($_item->getName()) ?> - - getValueHtml($_item)?> - - getSku() ?> - - getParentItem()): ?> - getQtyOrdered()*1 ?> - -   - - - - getParentItem()): ?> - helper('tax')->displaySalesPriceExclTax($_order->getStore()) || $this->helper('tax')->displaySalesBothPrices($_order->getStore())): ?> - helper('tax')->displaySalesBothPrices($_order->getStore())): ?> - __('Excl. Tax'); ?>: - - typeOfDisplay($_item, array(0, 1, 4), 'email', $_order->getStore())): ?> - formatPrice($_item->getRowTotal()+$_item->getWeeeTaxAppliedRowAmount()+$_item->getWeeeTaxRowDisposition()); ?> - - formatPrice($_item->getRowTotal()) ?> - - - - getApplied($_item)): ?> -
    - typeOfDisplay($_item, 1, 'email', $_order->getStore())): ?> - - getApplied($_item) as $tax): ?> - : formatPrice($tax['row_amount'],true,true); ?>
    - -
    - typeOfDisplay($_item, 2, 'email', $_order->getStore())): ?> - getApplied($_item) as $tax): ?> - : formatPrice($tax['row_amount_incl_tax'],true,true); ?>
    - - typeOfDisplay($_item, 4, 'email', $_order->getStore())): ?> - - getApplied($_item) as $tax): ?> - : formatPrice($tax['row_amount_incl_tax'],true,true); ?>
    - -
    - - - typeOfDisplay($_item, 2, 'email', $_order->getStore())): ?> -
    - __('Total'); ?>:
    formatPrice($_item->getCalculationPrice()+$_item->getWeeeTaxAppliedRowAmount()+$_item->getWeeeTaxRowDisposition()); ?>
    - - - - - - helper('tax')->displaySalesPriceInclTax($_order->getStore()) || $this->helper('tax')->displaySalesBothPrices($_order->getStore())): ?> - helper('tax')->displaySalesBothPrices($_order->getStore())): ?> -
    __('Incl. Tax'); ?>: - - helper('checkout')->getSubtotalInclTax($_item); ?> - typeOfDisplay($_item, array(0, 1, 4), 'email', $_order->getStore())): ?> - formatPrice($_incl+$_item->getWeeeTaxAppliedRowAmount()); ?> - - formatPrice($_incl-$_item->getWeeeTaxRowDisposition()) ?> - - getApplied($_item)): ?> -
    - typeOfDisplay($_item, 1, 'email', $_order->getStore())): ?> - - getApplied($_item) as $tax): ?> - : formatPrice($tax['row_amount'],true,true); ?>
    - -
    - typeOfDisplay($_item, 2, 'email', $_order->getStore())): ?> - getApplied($_item) as $tax): ?> - : formatPrice($tax['row_amount_incl_tax'],true,true); ?>
    - - typeOfDisplay($_item, 4, 'email', $_order->getStore())): ?> - - getApplied($_item) as $tax): ?> - : formatPrice($tax['row_amount_incl_tax'],true,true); ?>
    - -
    - - - typeOfDisplay($_item, 2, 'email', $_order->getStore())): ?> - __('Total incl. tax'); ?>:
    formatPrice($_incl+$_item->getWeeeTaxAppliedRowAmount()); ?>
    - - - - -   - - - - - - - - - getItemOptions()): ?> -
    - getItemOptions() as $option): ?> -
    -
    - -
    - - getGiftMessageId() && $_giftMessage = $this->helper('giftmessage/message')->getGiftMessage($_item->getGiftMessageId())): ?> -
    __('Gift Message') ?> -
    __('From:'); ?> htmlEscape($_giftMessage->getSender()) ?> -
    __('To:'); ?> htmlEscape($_giftMessage->getRecipient()) ?> -
    __('Message:'); ?>
    htmlEscape($_giftMessage->getMessage()) ?> - - -   -   -   - - 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 deleted file mode 100644 index f058b61467..0000000000 --- a/app/design/frontend/default/blank/template/bundle/email/order/items/shipment/default.phtml +++ /dev/null @@ -1,92 +0,0 @@ - -getItem() ?> - -getOrderItem()), $parentItem->getOrderItem()->getChildrenItems()) ?> -getChilds($parentItem) ?> - - - - - -getItemOptions() || $parentItem->getDescription() || $this->helper('giftmessage/message')->getIsMessagesAvailable('order_item', $parentItem) && $parentItem->getGiftMessageId()): ?> - - - - - -getParentItem()): ?> - getSelectionAttributes($_item) ?> - - - -   -   - - - - - - getParentItem()): ?> - htmlEscape($_item->getName()) ?> - - getValueHtml($_item) ?> - - getSku() ?> - - isShipmentSeparately() && $_item->getParentItem()) || (!$this->isShipmentSeparately() && !$_item->getParentItem())): ?> - getId()])): ?> - getId()]->getQty()*1 ?> - getIsVirtual()): ?> - __('N/A') ?> - - 0 - - -   - - - - - - - - - getItemOptions()): ?> -
    - getItemOptions() as $option): ?> -
    -
    - -
    - - getDescription() ?> - -   -   - - 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 deleted file mode 100644 index 5778073524..0000000000 --- a/app/design/frontend/default/blank/template/bundle/sales/order/creditmemo/items/renderer.phtml +++ /dev/null @@ -1,328 +0,0 @@ - -getItem() ?> - -getChilds($parentItem) ?> -getItem()->getOrderItem()->getOrder() ?> - - - - - - - -getItemOptions() || $parentItem->getDescription() || $this->helper('giftmessage/message')->getIsMessagesAvailable('order_item', $parentItem) && $parentItem->getGiftMessageId()): ?> - - - - - -getOrderItem()->getParentItem()): ?> - getSelectionAttributes($_item) ?> - - -
    -   -   -   -   -   -   - - - - - id="order-item-row-getId() ?>"> - getOrderItem()->getParentItem()): ?> -
    htmlEscape($_item->getName()) ?>
    - - -
    getValueHtml($_item) ?>
    - - getSku() ?> - - canShowPriceInfo($_item)): ?> - helper('tax')->displaySalesBothPrices() || $this->helper('tax')->displaySalesPriceExclTax()): ?> - - helper('tax')->displaySalesBothPrices()): ?> - typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
    - - __('Excl. Tax'); ?>: - typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
    - - - typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
    - -
    - - - typeOfDisplay($this->getItem(), array(0, 1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> - getOrder()->formatPrice($this->getItem()->getPrice()+$this->getItem()->getWeeeTaxAppliedAmount()+$this->getItem()->getWeeeTaxDisposition()); ?> - - getOrder()->formatPrice($this->getItem()->getPrice()) ?> - - -
    - - - getApplied($this->getItem())): ?> - - - - typeOfDisplay($this->getItem(), 2, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
    - __('Total'); ?>:
    getOrder()->formatPrice($this->getItem()->getPrice()+$this->getItem()->getWeeeTaxAppliedAmount()+$this->getItem()->getWeeeTaxDisposition()); ?>
    -
    - - - -
    - - helper('tax')->displaySalesBothPrices() || $this->helper('tax')->displaySalesPriceInclTax()): ?> - - helper('tax')->displaySalesBothPrices()): ?> - typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
    - - __('Incl. Tax'); ?>: - typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
    - - - helper('checkout')->getPriceInclTax($this->getItem()); ?> - typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
    - -
    - - - typeOfDisplay($this->getItem(), array(0, 1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> - getOrder()->formatPrice($_incl+$this->getItem()->getWeeeTaxAppliedAmount()); ?> - - getOrder()->formatPrice($_incl-$this->getItem()->getWeeeTaxDisposition()) ?> - - -
    - - - getApplied($this->getItem())): ?> - - - - typeOfDisplay($this->getItem(), 2, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
    - __('Total incl. tax'); ?>:
    getOrder()->formatPrice($_incl+$this->getItem()->getWeeeTaxAppliedAmount()); ?>
    -
    - - - - - -   - - - - canShowPriceInfo($_item)): ?> - getQty()*1 ?> - -   - - - - canShowPriceInfo($_item)): ?> - helper('tax')->displaySalesBothPrices() || $this->helper('tax')->displaySalesPriceExclTax()): ?> - - helper('tax')->displaySalesBothPrices()): ?> - typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
    - - __('Excl. Tax'); ?>: - typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
    - - - typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
    - -
    - - - typeOfDisplay($this->getItem(), array(0, 1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> - getOrder()->formatPrice($this->getItem()->getRowTotal()+$this->getItem()->getWeeeTaxAppliedRowAmount()+$this->getItem()->getWeeeTaxRowDisposition()); ?> - - getOrder()->formatPrice($this->getItem()->getRowTotal()) ?> - - -
    - - - getApplied($this->getItem())): ?> - - - - typeOfDisplay($this->getItem(), 2, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
    - __('Total'); ?>:
    getOrder()->formatPrice($this->getItem()->getRowTotal()+$this->getItem()->getWeeeTaxAppliedRowAmount()+$this->getItem()->getWeeeTaxRowDisposition()); ?>
    -
    - - - -
    - - helper('tax')->displaySalesBothPrices() || $this->helper('tax')->displaySalesPriceInclTax()): ?> - - helper('tax')->displaySalesBothPrices()): ?> - typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
    - - __('Incl. Tax'); ?>: - typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
    - - getOrder()->formatPrice($this->helper('checkout')->getSubtotalInclTax($_item)); ?> -
    - - -   - - -   - - - - canShowPriceInfo($_item)): ?> - getOrder()->formatPrice(-$_item->getDiscountAmount()) ?> - -   - - - - canShowPriceInfo($_item)): ?> - getOrder()->formatPrice($_item->getRowTotal()-$_item->getDiscountAmount()+$_item->getTaxAmount()+$_item->getWeeeTaxAppliedRowAmount()) ?> - -   - - - - - - - - - getItemOptions()): ?> -
    - -
    htmlEscape($_option['label']) ?>
    - getPrintStatus()): ?> - getFormatedOptionValue($_option) ?> - class="truncated"> - - -
    -
    -
    htmlEscape($_option['label']) ?>
    -
    -
    -
    - - - -
    htmlEscape( (isset($_option['print_value']) ? $_option['print_value'] : $_option['value']) ) ?>
    - - -
    - - getDescription() ?> - helper('giftmessage/message')->getIsMessagesAvailable('order_item', $parentItem) && $parentItem->getGiftMessageId()): ?> - __('Gift Message') ?> - - -   -   -   -   -   -   - - 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 deleted file mode 100644 index 86e6acc56d..0000000000 --- a/app/design/frontend/default/blank/template/bundle/sales/order/invoice/items/renderer.phtml +++ /dev/null @@ -1,352 +0,0 @@ - -getItem() ?> -getItem()->getOrderItem()->getOrder() ?> - -getChilds($parentItem) ?> - - - - - - - -getItemOptions() || $parentItem->getDescription() || $this->helper('giftmessage/message')->getIsMessagesAvailable('order_item', $parentItem) && $parentItem->getGiftMessageId()): ?> - - - - - -getOrderItem()->getParentItem()): ?> - getSelectionAttributes($_item) ?> - - -
    -   -   -   -   - - - - - id="order-item-row-getId() ?>"> - getOrderItem()->getParentItem()): ?> -
    htmlEscape($_item->getName()) ?>
    - -
    getValueHtml($_item) ?>
    - - getSku() ?> - - canShowPriceInfo($_item)): ?> - helper('tax')->displaySalesBothPrices() || $this->helper('tax')->displaySalesPriceExclTax()): ?> - - helper('tax')->displaySalesBothPrices()): ?> - typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
    - - __('Excl. Tax'); ?>: - typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
    - - - typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
    - -
    - - - typeOfDisplay($this->getItem(), array(0, 1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> - getOrder()->formatPrice($this->getItem()->getPrice()+$this->getItem()->getWeeeTaxAppliedAmount()+$this->getItem()->getWeeeTaxDisposition()); ?> - - getOrder()->formatPrice($this->getItem()->getPrice()) ?> - - -
    - - - getApplied($this->getItem())): ?> - - - - typeOfDisplay($this->getItem(), 2, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
    - __('Total'); ?>:
    getOrder()->formatPrice($this->getItem()->getPrice()+$this->getItem()->getWeeeTaxAppliedAmount()+$this->getItem()->getWeeeTaxDisposition()); ?>
    -
    - - - -
    - - helper('tax')->displaySalesBothPrices() || $this->helper('tax')->displaySalesPriceInclTax()): ?> - - helper('tax')->displaySalesBothPrices()): ?> - typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
    - - __('Incl. Tax'); ?>: - typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
    - - - helper('checkout')->getPriceInclTax($this->getItem()); ?> - typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
    - -
    - - - typeOfDisplay($this->getItem(), array(0, 1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> - getOrder()->formatPrice($_incl+$this->getItem()->getWeeeTaxAppliedAmount()); ?> - - getOrder()->formatPrice($_incl-$this->getItem()->getWeeeTaxDisposition()) ?> - - -
    - - - getApplied($this->getItem())): ?> - - - - typeOfDisplay($this->getItem(), 2, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
    - __('Total incl. tax'); ?>:
    getOrder()->formatPrice($_incl+$this->getItem()->getWeeeTaxAppliedAmount()); ?>
    -
    - - - - - -   - - - - canShowPriceInfo($_item)): ?> - getQty()*1 ?> - -   - - - - canShowPriceInfo($_item)): ?> - helper('tax')->displaySalesBothPrices() || $this->helper('tax')->displaySalesPriceExclTax()): ?> - - helper('tax')->displaySalesBothPrices()): ?> - typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
    - - __('Excl. Tax'); ?>: - typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
    - - - typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
    - -
    - - - typeOfDisplay($this->getItem(), array(0, 1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> - getOrder()->formatPrice($this->getItem()->getRowTotal()+$this->getItem()->getWeeeTaxAppliedRowAmount()+$this->getItem()->getWeeeTaxRowDisposition()); ?> - - getOrder()->formatPrice($this->getItem()->getRowTotal()) ?> - - -
    - - - getApplied($this->getItem())): ?> - - - - typeOfDisplay($this->getItem(), 2, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
    - __('Total'); ?>:
    getOrder()->formatPrice($this->getItem()->getRowTotal()+$this->getItem()->getWeeeTaxAppliedRowAmount()+$this->getItem()->getWeeeTaxRowDisposition()); ?>
    -
    - - - -
    - - helper('tax')->displaySalesBothPrices() || $this->helper('tax')->displaySalesPriceInclTax()): ?> - - helper('tax')->displaySalesBothPrices()): ?> - typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
    - - __('Incl. Tax'); ?>: - typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
    - - - helper('checkout')->getSubtotalInclTax($this->getItem()); ?> - typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
    - -
    - - typeOfDisplay($this->getItem(), array(0, 1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> - getOrder()->formatPrice($_incl+$this->getItem()->getWeeeTaxAppliedRowAmount()); ?> - - getOrder()->formatPrice($_incl-$this->getItem()->getWeeeTaxRowDisposition()) ?> - - -
    - - - getApplied($this->getItem())): ?> - - - - typeOfDisplay($this->getItem(), 2, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
    - __('Total incl. tax'); ?>:
    getOrder()->formatPrice($_incl+$this->getItem()->getWeeeTaxAppliedRowAmount()); ?>
    -
    - - - - - - - - -   - - - - - - - - - getItemOptions()): ?> -
    - -
    htmlEscape($_option['label']) ?>
    - getPrintStatus()): ?> - getFormatedOptionValue($_option) ?> - class="truncated"> - - -
    -
    -
    htmlEscape($_option['label']) ?>
    -
    -
    -
    - - - -
    htmlEscape( (isset($_option['print_value']) ? $_option['print_value'] : $_option['value']) ) ?>
    - - -
    - - getDescription() ?> - helper('giftmessage/message')->getIsMessagesAvailable('order_item', $parentItem) && $parentItem->getGiftMessageId()): ?> - __('Gift Message') ?> - - -   -   -   -   - - 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 deleted file mode 100644 index c4a252db14..0000000000 --- a/app/design/frontend/default/blank/template/bundle/sales/order/items/renderer.phtml +++ /dev/null @@ -1,375 +0,0 @@ - -getItem() ?> -getChildrenItems()); ?> - - - - - - - -getItemOptions() || $parentItem->getDescription() || $this->helper('giftmessage/message')->getIsMessagesAvailable('order_item', $parentItem) && $parentItem->getGiftMessageId()): ?> - - - - - -getParentItem()): ?> - getSelectionAttributes($_item) ?> - - getLastRow()) echo 'class="last"'; ?>> -
    -   -   -   -   - - - - - id="order-item-row-getId() ?>"> - - getParentItem()): ?> -

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

    - -
    getValueHtml($_item)?>
    - - splitInjection($_item->getSku()) ?> - - getParentItem()): ?> - helper('tax')->displaySalesBothPrices() || $this->helper('tax')->displaySalesPriceExclTax()): ?> - - helper('tax')->displaySalesBothPrices()): ?> - typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
    - - __('Excl. Tax'); ?>: - typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
    - - - typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
    - -
    - - - typeOfDisplay($this->getItem(), array(0, 1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> - getOrder()->formatPrice($this->getItem()->getPrice()+$this->getItem()->getWeeeTaxAppliedAmount()+$this->getItem()->getWeeeTaxDisposition()); ?> - - getOrder()->formatPrice($this->getItem()->getPrice()) ?> - - -
    - - - getApplied($this->getItem())): ?> - - - - typeOfDisplay($this->getItem(), 2, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
    - __('Total'); ?>:
    getOrder()->formatPrice($this->getItem()->getPrice()+$this->getItem()->getWeeeTaxAppliedAmount()+$this->getItem()->getWeeeTaxDisposition()); ?>
    -
    - - - -
    - - helper('tax')->displaySalesBothPrices() || $this->helper('tax')->displaySalesPriceInclTax()): ?> - - helper('tax')->displaySalesBothPrices()): ?> - typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
    - - __('Incl. Tax'); ?>: - typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
    - - - helper('checkout')->getPriceInclTax($this->getItem()); ?> - typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
    - -
    - - - typeOfDisplay($this->getItem(), array(0, 1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> - getOrder()->formatPrice($_incl+$this->getItem()->getWeeeTaxAppliedAmount()); ?> - - getOrder()->formatPrice($_incl-$this->getItem()->getWeeeTaxDisposition()) ?> - - -
    - - - getApplied($this->getItem())): ?> - - - - typeOfDisplay($this->getItem(), 2, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
    - __('Total incl. tax'); ?>:
    getOrder()->formatPrice($_incl+$this->getItem()->getWeeeTaxAppliedAmount()); ?>
    -
    - - - - - -   - - - - getParentItem() && $this->isChildCalculated()) || - (!$_item->getParentItem() && !$this->isChildCalculated())): ?> - - getQtyOrdered() > 0): ?> - __('Ordered'); ?>: getQtyOrdered()*1 ?>
    - - getQtyShipped() > 0 && !$this->isShipmentSeparately()): ?> - __('Shipped'); ?>: getQtyShipped()*1 ?>
    - - getQtyCanceled() > 0): ?> - __('Canceled'); ?>: getQtyCanceled()*1 ?>
    - - getQtyRefunded() > 0): ?> - __('Refunded'); ?>: getQtyRefunded()*1 ?> - -
    - getQtyShipped() > 0 && $_item->getParentItem() && $this->isShipmentSeparately()): ?> - __('Shipped'); ?>: getQtyShipped()*1 ?> - -   - - - - getParentItem()): ?> - helper('tax')->displaySalesBothPrices() || $this->helper('tax')->displaySalesPriceExclTax()): ?> - - helper('tax')->displaySalesBothPrices()): ?> - typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
    - - __('Excl. Tax'); ?>: - typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
    - - - typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
    - -
    - - - typeOfDisplay($this->getItem(), array(0, 1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> - getOrder()->formatPrice($this->getItem()->getRowTotal()+$this->getItem()->getWeeeTaxAppliedRowAmount()+$this->getItem()->getWeeeTaxRowDisposition()); ?> - - getOrder()->formatPrice($this->getItem()->getRowTotal()) ?> - - -
    - - - getApplied($this->getItem())): ?> - - - - typeOfDisplay($this->getItem(), 2, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
    - __('Total'); ?>:
    getOrder()->formatPrice($this->getItem()->getRowTotal()+$this->getItem()->getWeeeTaxAppliedRowAmount()+$this->getItem()->getWeeeTaxRowDisposition()); ?>
    -
    - - - -
    - - helper('tax')->displaySalesBothPrices() || $this->helper('tax')->displaySalesPriceInclTax()): ?> - - helper('tax')->displaySalesBothPrices()): ?> - typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
    - - __('Incl. Tax'); ?>: - typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
    - - - helper('checkout')->getSubtotalInclTax($this->getItem()); ?> - typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
    - -
    - - typeOfDisplay($this->getItem(), array(0, 1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> - getOrder()->formatPrice($_incl+$this->getItem()->getWeeeTaxAppliedRowAmount()); ?> - - getOrder()->formatPrice($_incl-$this->getItem()->getWeeeTaxRowDisposition()) ?> - - -
    - - - getApplied($this->getItem())): ?> - - - - typeOfDisplay($this->getItem(), 2, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
    - __('Total incl. tax'); ?>:
    getOrder()->formatPrice($_incl+$this->getItem()->getWeeeTaxAppliedRowAmount()); ?>
    -
    - - - - - - - - -   - - - - - - - - - - getItemOptions()): ?> -
    - -
    htmlEscape($_option['label']) ?>
    - getPrintStatus()): ?> - getFormatedOptionValue($_option) ?> - class="truncated"> - - -
    -
    -
    htmlEscape($_option['label']) ?>
    -
    -
    -
    - - - -
    htmlEscape( (isset($_option['print_value']) ? $_option['print_value'] : $_option['value']) ) ?>
    - - -
    - - getDescription() ?> - helper('giftmessage/message')->getIsMessagesAvailable('order_item', $parentItem) && $parentItem->getGiftMessageId()): ?> - __('Gift Message') ?> - - -   -   -   -   - - 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 deleted file mode 100644 index b948e74251..0000000000 --- a/app/design/frontend/default/blank/template/bundle/sales/order/shipment/items/renderer.phtml +++ /dev/null @@ -1,111 +0,0 @@ - -getItem() ?> -getOrderItem()), $parentItem->getOrderItem()->getChildrenItems()) ?> -getChilds($parentItem) ?> - - - - - - - -getItemOptions() || $parentItem->getDescription() || $this->helper('giftmessage/message')->getIsMessagesAvailable('order_item', $parentItem) && $parentItem->getGiftMessageId()): ?> - - - - - -getParentItem()): ?> - getSelectionAttributes($_item) ?> - - -
    -   -   - - - - - id="order-item-row-getId() ?>"> - getParentItem()): ?> -
    htmlEscape($_item->getName()) ?>
    - -
    getValueHtml($_item) ?>
    - - getSku() ?> - - isShipmentSeparately() && $_item->getParentItem()) || (!$this->isShipmentSeparately() && !$_item->getParentItem())): ?> - getId()])): ?> - getId()]->getQty()*1 ?> - getIsVirtual()): ?> - __('N/A') ?> - - 0 - - -   - - - - - - - - - getItemOptions()): ?> -
    - -
    htmlEscape($_option['label']) ?>
    - getPrintStatus()): ?> - getFormatedOptionValue($_option) ?> - class="truncated"> - - -
    -
    -
    htmlEscape($_option['label']) ?>
    -
    -
    -
    - - - -
    htmlEscape( (isset($_option['print_value']) ? $_option['print_value'] : $_option['value']) ) ?>
    - - -
    - - getDescription() ?> - helper('giftmessage/message')->getIsMessagesAvailable('order_item', $parentItem) && $parentItem->getGiftMessageId()): ?> - __('Gift Message') ?> - - -   -   - - diff --git a/app/design/frontend/default/blank/template/callouts/left_col.phtml b/app/design/frontend/default/blank/template/callouts/left_col.phtml deleted file mode 100644 index 080dec4337..0000000000 --- a/app/design/frontend/default/blank/template/callouts/left_col.phtml +++ /dev/null @@ -1,39 +0,0 @@ - -
    -
    - getLinkUrl(),0,4))==='http'): ?> - - getLinkUrl()): ?> - - - <?php echo $this->__($this->getImgAlt()) ?> - getLinkUrl()): ?> - - -
    -
    diff --git a/app/design/frontend/default/blank/template/callouts/right_col.phtml b/app/design/frontend/default/blank/template/callouts/right_col.phtml deleted file mode 100644 index 4695433606..0000000000 --- a/app/design/frontend/default/blank/template/callouts/right_col.phtml +++ /dev/null @@ -1,31 +0,0 @@ - -
    -
    - <?php echo $this->__('Keep your eyes open for our special Back to School items and save A LOT!') ?> -
    -
    diff --git a/app/design/frontend/default/blank/template/catalog/category/page.phtml b/app/design/frontend/default/blank/template/catalog/category/page.phtml deleted file mode 100644 index 43f5a4bf33..0000000000 --- a/app/design/frontend/default/blank/template/catalog/category/page.phtml +++ /dev/null @@ -1,32 +0,0 @@ - -
    -

    getTitle() ?>

    -
    -
    - getContent() ?> -
    diff --git a/app/design/frontend/default/blank/template/catalog/category/view.phtml b/app/design/frontend/default/blank/template/catalog/category/view.phtml deleted file mode 100644 index 5b363a893c..0000000000 --- a/app/design/frontend/default/blank/template/catalog/category/view.phtml +++ /dev/null @@ -1,93 +0,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') ?> - -

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

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

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

    - - getCmsBlockHtml() ?> -isMixedMode()): ?> -
    - IsRssCatalogEnable() && $this->IsTopCategory()): ?> - __('Subscribe to RSS Feed') ?> - -

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

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

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

    - - IsRssCatalogEnable() && $this->IsTopCategory()): ?> - __('Subscribe to RSS Feed') ?> - - */ ?> - getCmsBlockHtml() ?> - getProductListHtml() ?> - - -
    - IsRssCatalogEnable() && $this->IsTopCategory()): ?> - __('Subscribe to RSS Feed') ?> - -

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

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

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

    - - getProductListHtml() ?> - diff --git a/app/design/frontend/default/blank/template/catalog/category/widget/link/link_block.phtml b/app/design/frontend/default/blank/template/catalog/category/widget/link/link_block.phtml deleted file mode 100644 index 3a3845da4f..0000000000 --- a/app/design/frontend/default/blank/template/catalog/category/widget/link/link_block.phtml +++ /dev/null @@ -1,27 +0,0 @@ - -getLinkAttributes() ?>>htmlEscape($this->getAnchorText()) ?> diff --git a/app/design/frontend/default/blank/template/catalog/category/widget/link/link_inline.phtml b/app/design/frontend/default/blank/template/catalog/category/widget/link/link_inline.phtml deleted file mode 100644 index 524561cffa..0000000000 --- a/app/design/frontend/default/blank/template/catalog/category/widget/link/link_inline.phtml +++ /dev/null @@ -1,27 +0,0 @@ - -getLinkAttributes() ?>>htmlEscape($this->getAnchorText()) ?> diff --git a/app/design/frontend/default/blank/template/catalog/layer/filter.phtml b/app/design/frontend/default/blank/template/catalog/layer/filter.phtml deleted file mode 100644 index 7328871fb4..0000000000 --- a/app/design/frontend/default/blank/template/catalog/layer/filter.phtml +++ /dev/null @@ -1,42 +0,0 @@ - - - -
      -getItems() as $_item): ?> -
    1. - getLabel() ?> - (getCount() ?>) -
    2. - -
    diff --git a/app/design/frontend/default/blank/template/catalog/layer/state.phtml b/app/design/frontend/default/blank/template/catalog/layer/state.phtml deleted file mode 100644 index e240da15f6..0000000000 --- a/app/design/frontend/default/blank/template/catalog/layer/state.phtml +++ /dev/null @@ -1,46 +0,0 @@ - - -getActiveFilters() ?> - -

    __('Currently Shopping by') ?>

    -
      - -
    1. - <?php echo $this->__('Remove This Item') ?> - __($_filter->getName()) ?>: getLabel() ?> -
    2. - -
    - - diff --git a/app/design/frontend/default/blank/template/catalog/layer/view.phtml b/app/design/frontend/default/blank/template/catalog/layer/view.phtml deleted file mode 100644 index aa722c8f02..0000000000 --- a/app/design/frontend/default/blank/template/catalog/layer/view.phtml +++ /dev/null @@ -1,55 +0,0 @@ - - -canShowBlock()): ?> -
    -
    -

    __('Shop by') ?>

    -
    -
    - getStateHtml() ?> - canShowOptions()): ?> -

    __('Shopping Options') ?>

    -
    - getFilters() ?> - - getItemsCount()): ?> -
    __($_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 deleted file mode 100644 index bb30920534..0000000000 --- a/app/design/frontend/default/blank/template/catalog/navigation/left.phtml +++ /dev/null @@ -1,58 +0,0 @@ - - -getCurrentChildCategories() ?> -count(); ?> - -
    -
    -

    __('Browse By') ?>

    -
    -
    -
    -
    __('Category') ?>
    -
    -
      - - getIsActive()): ?> -
    1. - isCategoryActive($_category)): ?> class="current">htmlEscape($_category->getName()) ?> (getProductCount() ?>) -
    2. - - -
    -
    -
    -
    -
    - diff --git a/app/design/frontend/default/blank/template/catalog/navigation/top.phtml b/app/design/frontend/default/blank/template/catalog/navigation/top.phtml deleted file mode 100644 index 49a502f00a..0000000000 --- a/app/design/frontend/default/blank/template/catalog/navigation/top.phtml +++ /dev/null @@ -1,40 +0,0 @@ - - -getStoreCategories()) > 0): ?> - - 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 deleted file mode 100644 index 732d4cfb10..0000000000 --- a/app/design/frontend/default/blank/template/catalog/product/compare/list.phtml +++ /dev/null @@ -1,132 +0,0 @@ - -
    -

    __('Compare Products') ?>

    - __('Print This Page') ?> -
    -getItems()->getSize() ?> - - - - getItems() as $_item): ?> - - - - - -2): ?> - - - - getItems() as $_item): ?> - - - - - - - - - - - - getItems() as $_item): ?> - - - - - - - - - getAttributes() as $_attribute): ?> - - - getItems() as $_item): ?> - - - - - - - - - - - - getItems() as $_item): ?> - - - - - - - -
     <?php echo $this->__('Remove Product') ?>
      - <?php echo $this->htmlEscape($_item->getName()) ?> -

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

    - getReviewsSummaryHtml($_item, 'short') ?> - getPriceHtml($_item, true) ?> - isSaleable()): ?> -

    - -

    __('Out of stock') ?>

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

    __('Add to Wishlist') ?>

    - -
    getStoreLabel() ?> - getAttributeCode()) { - case "price": ?> - getPriceHtml($_item, true) ?> - - <?php echo $this->htmlEscape($_item->getName()) ?> - - getProductAttributeValue($_item, $_attribute)) ?> - -
      - getPriceHtml($_item) ?> - isSaleable()): ?> -

    - -

    __('Out of stock') ?>

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

    __('Add to Wishlist') ?>

    - -
    -
    - -
    - - - - 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 deleted file mode 100644 index f23e5d82c4..0000000000 --- a/app/design/frontend/default/blank/template/catalog/product/compare/sidebar.phtml +++ /dev/null @@ -1,56 +0,0 @@ - -
    -
    - helper('catalog/product_compare')->getItemCount() > 0): ?> -

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

    - -

    __('Compare Products') ?>

    - -
    -
    - helper('catalog/product_compare')->getItemCount() > 0): ?> -
      - helper('catalog/product_compare')->getItemCollection() as $_index=>$_item): ?> -
    1. - - <?php echo $this->__('Remove This Item') ?> - htmlEscape($_item->getName()) ?> -
    2. - -
    - -
    - __('Clear All') ?> - -
    - -

    __('You have no items to compare.') ?>

    - -
    -
    diff --git a/app/design/frontend/default/blank/template/catalog/product/gallery.phtml b/app/design/frontend/default/blank/template/catalog/product/gallery.phtml deleted file mode 100644 index 83f5d59cb8..0000000000 --- a/app/design/frontend/default/blank/template/catalog/product/gallery.phtml +++ /dev/null @@ -1,63 +0,0 @@ - -getImageWidth() ?> -
    -

    __('Close Window') ?>

    - getPreviusImageUrl() || $this->getNextImageUrl()): ?> - - - htmlEscape($this->getCurrentImage()->getLabel())): ?> -

    - - width="" src="helper('catalog/image')->init($this->getProduct(), 'image', $this->getImageFile()); ?>" alt="htmlEscape($this->getCurrentImage()->getLabel()) ?>" title="htmlEscape($this->getCurrentImage()->getLabel()) ?>" id="product-gallery-image" class="image" /> - getPreviusImageUrl() || $this->getNextImageUrl()): ?> - - -

    __('Close Window') ?>

    -
    - diff --git a/app/design/frontend/default/blank/template/catalog/product/list.phtml b/app/design/frontend/default/blank/template/catalog/product/list.phtml deleted file mode 100644 index 707d54c9a1..0000000000 --- a/app/design/frontend/default/blank/template/catalog/product/list.phtml +++ /dev/null @@ -1,129 +0,0 @@ - - -getLoadedProductCollection() ?> -count()): ?> -

    __('There are no products matching the selection.') ?>

    - -
    - getToolbarHtml() ?> - - - getMode()!='grid'): ?> - -
      - -
    1. - - - <?php echo $this->htmlEscape($this->getImageLabel($_product, 'small_image')) ?> - - -
      -

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

      - getRatingSummary()): ?> - getReviewsSummaryHtml($_product) ?> - - getPriceHtml($_product, true) ?> - isSaleable()): ?> -

      - -

      __('Out of stock') ?>

      - -
      - getShortDescription()) ?> - __('Learn More') ?> -
      - -
      -
    2. - -
    - - - - - - - count() ?> - - getColumnCount(); ?> - - - - - - - - - - - - - - - -
    - - <?php echo $this->htmlEscape($this->getImageLabel($_product, 'small_image')) ?> -

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

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

    __('Out of stock') ?>

    - - -
     
    - - - getToolbarHtml() ?> -
    - 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 deleted file mode 100644 index 014972dcb8..0000000000 --- a/app/design/frontend/default/blank/template/catalog/product/list/related.phtml +++ /dev/null @@ -1,94 +0,0 @@ - -getItems()->getSize()): ?> - - - diff --git a/app/design/frontend/default/blank/template/catalog/product/list/toolbar.phtml b/app/design/frontend/default/blank/template/catalog/product/list/toolbar.phtml deleted file mode 100644 index 0699abbcf5..0000000000 --- a/app/design/frontend/default/blank/template/catalog/product/list/toolbar.phtml +++ /dev/null @@ -1,112 +0,0 @@ - - -getCollection()->getSize()): ?> -
    -

    - getLastPageNum()>1): ?> - __('Items %s to %s of %s total', $this->getFirstNum(), $this->getLastNum(), $this->getTotalNum()) ?> - - __('%s Item(s)', $this->getTotalNum()) ?> - -

    - -
    - - __('per page') ?> -
    - - getLastPageNum()>1): ?> -
    - __('Page:') ?> -
      - isFirstPage()): ?> -
    1. <?php echo $this->__('Previous') ?>
    2. - - getPages() as $_page): ?> - isPageCurrent($_page)): ?> -
    3. - -
    4. - - - isLastPage()): ?> -
    5. <?php echo $this->__('Next') ?>
    6. - -
    -
    - -
    - -isExpanded() ): ?> -
    - isEnabledViewSwitcher() ): ?> -

    - getModes(); ?> - 1): ?> - __('View as') ?>: - getModes() as $_code=>$_label): ?> - isModeActive($_code)): ?> -   - -   - - - -

    - - -
    - - - getCurrentDirection() == 'desc'): ?> - <?php echo $this->__('Set Ascending Direction') ?> - - <?php echo $this->__('Set Descending Direction') ?> - -
    -
    - - diff --git a/app/design/frontend/default/blank/template/catalog/product/list/upsell.phtml b/app/design/frontend/default/blank/template/catalog/product/list/upsell.phtml deleted file mode 100644 index 44e8be0905..0000000000 --- a/app/design/frontend/default/blank/template/catalog/product/list/upsell.phtml +++ /dev/null @@ -1,52 +0,0 @@ - -getItemCollection()->getItems())): ?> -
    -

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

    - - setColumnCount(5); // uncomment this line if you want to have another number of columns. also can be changed in layout ?> - resetItemsIterator() ?> - getRowCount();$_i++): ?> - - getColumnCount();$_j++): ?> - getIterableItem()): ?> - - - - - - - -
    - <?php echo $this->htmlEscape($_link->getName()) ?> -

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

    - getPriceHtml($_link, true) ?> - getReviewsSummaryHtml($_link) ?> -
     
    - -
    - diff --git a/app/design/frontend/default/blank/template/catalog/product/new.phtml b/app/design/frontend/default/blank/template/catalog/product/new.phtml deleted file mode 100644 index 89aec22fbd..0000000000 --- a/app/design/frontend/default/blank/template/catalog/product/new.phtml +++ /dev/null @@ -1,60 +0,0 @@ - -getProductCollection()) && $_products->getSize()): ?> -
    -

    __('New Products') ?>

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

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

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

    __('Out of stock') ?>

    - - -
     
    - diff --git a/app/design/frontend/default/blank/template/catalog/product/price.phtml b/app/design/frontend/default/blank/template/catalog/product/price.phtml deleted file mode 100644 index 4dfbcfca28..0000000000 --- a/app/design/frontend/default/blank/template/catalog/product/price.phtml +++ /dev/null @@ -1,352 +0,0 @@ - - - - -getProduct() ?> -getId() ?> - - - -helper('tax')->displayPriceIncludingTax() || $this->helper('tax')->displayBothPrices()); ?> - -getMinimalPrice() ?> -helper('tax')->getPrice($_product, $_minimalPriceValue, $simplePricesTax) ?> - -isGrouped()): ?> - getAmountForDisplay($_product); ?> - typeOfDisplay($_product, array(1,2,4))): ?> - getAmount($_product); ?> - getProductWeeeAttributesForDisplay($_product); ?> - - -
    - helper('tax')->getPrice($_product, $_product->getPrice()) ?> - helper('tax')->getPrice($_product, $_product->getPrice(), $simplePricesTax) ?> - helper('tax')->getPrice($_product, $_product->getFinalPrice()) ?> - helper('tax')->getPrice($_product, $_product->getFinalPrice(), true) ?> - getPriceDisplayType(); ?> - - helper('tax')->displayBothPrices()): ?> - typeOfDisplay($_product, 0)): // including ?> - - __('Excl. Tax:') ?> - currency($_price+$_weeeTaxAmount,true,false) ?> - - - __('Incl. Tax:') ?> - currency($_finalPriceInclTax+$_weeeTaxAmount,true,false) ?> - - typeOfDisplay($_product, 1)): // incl. + weee ?> - - __('Excl. Tax:') ?> - currency($_price+$_weeeTaxAmount,true,false) ?> - - - __('Incl. Tax:') ?> - currency($_finalPriceInclTax+$_weeeTaxAmount,true,false) ?> -
    - ( - - - getName(); ?>: currency($_weeeTaxAttribute->getAmount(), true, true); ?> - - - ) -
    - typeOfDisplay($_product, 4)): // incl. + weee ?> - - __('Excl. Tax:') ?> - currency($_price+$_weeeTaxAmount,true,false) ?> - - - __('Incl. Tax:') ?> - currency($_finalPriceInclTax+$_weeeTaxAmount,true,false) ?> -
    - ( - - - getName(); ?>: currency($_weeeTaxAttribute->getAmount()+$_weeeTaxAttribute->getTaxAmount(), true, true); ?> - - - ) -
    - typeOfDisplay($_product, 2)): // excl. + weee + final ?> - - __('Excl. Tax:') ?> - currency($_price,true,false) ?> - - - - - getName(); ?>: currency($_weeeTaxAttribute->getAmount(), true, true); ?> - - -
    - - - __('Incl. Tax:') ?> - currency($_finalPriceInclTax+$_weeeTaxAmount,true,false) ?> - - - - __('Excl. Tax:') ?> - currency($_price,true,false) ?> - - - __('Incl. Tax:') ?> - currency($_finalPriceInclTax,true,false) ?> - - - - typeOfDisplay($_product, 0)): // including ?> - currency($_price+$_weeeTaxAmount,true,true) ?> - typeOfDisplay($_product, 1)): // incl. + weee ?> - currency($_price+$_weeeTaxAmount,true,true) ?> -
    - ( - - - getName(); ?>: currency($_weeeTaxAttribute->getAmount(), true, true); ?> - - - ) - typeOfDisplay($_product, 4)): // incl. + weee ?> - currency($_price+$_weeeTaxAmount,true,true) ?> -
    - ( - - - getName(); ?>: currency($_weeeTaxAttribute->getAmount()+$_weeeTaxAttribute->getTaxAmount(), true, true); ?> - - - ) - typeOfDisplay($_product, 2)): // excl. + weee + final ?> - currency($_price,true,true) ?>
    - - - - getName(); ?>: currency($_weeeTaxAttribute->getAmount(), true, true); ?> - - -
    - - currency($_price+$_weeeTaxAmount,true,true) ?> - - currency($_price,true,true) ?> - - - - getOriginalAmount($_product); ?> - - typeOfDisplay($_product, 0)): // including ?> -

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

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

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

    - -

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

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

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

    - -

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

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

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

    - -

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

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

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

    - -

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

    - -

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

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

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

    - -

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

    - - - - - - getDisplayMinimalPrice() && $_minimalPriceValue && $_minimalPriceValue < $_product->getFinalPrice()): ?> - - - typeOfDisplay($_product, array(0, 1, 4))): ?> - - - - getUseLinkForAsLowAs()):?> - - - - - __('As low as:') ?> - currency($_minimalPriceDisplayValue,true,false) ?> - getUseLinkForAsLowAs()):?> - - - - - getDisplayMinimalPrice() && $_minimalPrice && $_minimalPrice < $_finalPrice): */ ?> -
    - -isGrouped()): */ ?> - helper('tax')->getPrice($_product, $_minimalPriceValue, $includingTax = null); - $_inclTax = $this->helper('tax')->getPrice($_product, $_minimalPriceValue, $includingTax = true); - ?> - getDisplayMinimalPrice() && $_minimalPriceValue): ?> -
    -

    - __('Starting at:') ?> - helper('tax')->displayBothPrices()): ?> - - __('Excl. Tax:') ?> - currency($_exclTax, true, false) ?> - - - __('Incl. Tax:') ?> - currency($_inclTax, true, false) ?> - - - helper('tax')->displayPriceIncludingTax()) { - $_showPrice = $_exclTax; - } - ?> - currency($_showPrice, true, false) ?> - -

    -
    - getDisplayMinimalPrice() && $_minimalPrice): */ ?> -isGrouped()): */ ?> diff --git a/app/design/frontend/default/blank/template/catalog/product/view.phtml b/app/design/frontend/default/blank/template/catalog/product/view.phtml deleted file mode 100644 index 68a81e468d..0000000000 --- a/app/design/frontend/default/blank/template/catalog/product/view.phtml +++ /dev/null @@ -1,129 +0,0 @@ - -helper('catalog/output'); - $_product = $this->getProduct(); -?> - -
    getMessagesBlock()->getGroupedHtml() ?>
    -
    -
    -
    getOptions()): ?> enctype="multipart/form-data"> -
    - - -
    - -
    - getChildHtml('media') ?> -
    - -
    -
    -

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

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

    __('Quick Overview') ?>

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

    __('Product Description') ?>

    - -
    - - getChildHtml('additional')):?> -
    -

    __('Additional Information') ?>

    - -
    - - getChildHtml('upsell_products') ?> - getChildHtml('product_additional_data') ?> -
    -
    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 deleted file mode 100644 index fa581c0e17..0000000000 --- a/app/design/frontend/default/blank/template/catalog/product/view/additional.phtml +++ /dev/null @@ -1,29 +0,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 deleted file mode 100644 index 8d1e9bc443..0000000000 --- a/app/design/frontend/default/blank/template/catalog/product/view/addto.phtml +++ /dev/null @@ -1,36 +0,0 @@ - - -getProduct() ?> - 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 deleted file mode 100644 index 3a9153f72a..0000000000 --- a/app/design/frontend/default/blank/template/catalog/product/view/addtocart.phtml +++ /dev/null @@ -1,39 +0,0 @@ - - -getProduct() ?> - -isSaleable()): ?> -
    - __('Add Items to Cart') ?> - isGrouped()): ?> - - - - -
    - 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 deleted file mode 100644 index db4aaea63b..0000000000 --- a/app/design/frontend/default/blank/template/catalog/product/view/attributes.phtml +++ /dev/null @@ -1,49 +0,0 @@ - -helper('catalog/output'); - $_product = $this->getProduct() -?> -getAdditionalData()): ?> - - - - - - - - - -
    __($_data['label']) ?>productAttribute($_product, $_data['value'], $_data['code']) ?>
    - - diff --git a/app/design/frontend/default/blank/template/catalog/product/view/description.phtml b/app/design/frontend/default/blank/template/catalog/product/view/description.phtml deleted file mode 100644 index d2e178edd2..0000000000 --- a/app/design/frontend/default/blank/template/catalog/product/view/description.phtml +++ /dev/null @@ -1,35 +0,0 @@ - -
    - helper('catalog/output')->productAttribute($this->getProduct(), nl2br($this->getProduct()->getDescription()), 'description') ?> -
    diff --git a/app/design/frontend/default/blank/template/catalog/product/view/media.phtml b/app/design/frontend/default/blank/template/catalog/product/view/media.phtml deleted file mode 100644 index 753009c8cb..0000000000 --- a/app/design/frontend/default/blank/template/catalog/product/view/media.phtml +++ /dev/null @@ -1,78 +0,0 @@ - -getProduct(); - $_helper = $this->helper('catalog/output'); -?> -getImage() != 'no_selection' && $_product->getImage()): ?> -

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

    -

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

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

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

    - -getGalleryImages()) > 0): ?> -
    -

    __('More Views') ?>

    -
      - getGalleryImages() as $_image): ?> -
    • - <?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 deleted file mode 100644 index b7023674a1..0000000000 --- a/app/design/frontend/default/blank/template/catalog/product/view/options.phtml +++ /dev/null @@ -1,176 +0,0 @@ - - -decorateArray($this->getOptions()) ?> - - -
    - - getOptionHtml($_option) ?> - -
    - diff --git a/app/design/frontend/default/blank/template/catalog/product/view/options/js.phtml b/app/design/frontend/default/blank/template/catalog/product/view/options/js.phtml deleted file mode 100644 index 2ff3685e51..0000000000 --- a/app/design/frontend/default/blank/template/catalog/product/view/options/js.phtml +++ /dev/null @@ -1,60 +0,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 deleted file mode 100644 index 01dae1bdbb..0000000000 --- a/app/design/frontend/default/blank/template/catalog/product/view/options/type/date.phtml +++ /dev/null @@ -1,70 +0,0 @@ - -getOption() ?> -getId() ?> -
    - getFormatedPrice() ?>
    -decoratedIsLast){?> class="last"> - -getType() == Mage_Catalog_Model_Product_Option::OPTION_TYPE_DATE_TIME - || $_option->getType() == Mage_Catalog_Model_Product_Option::OPTION_TYPE_DATE): ?> - - getDateHtml() ?> - - useCalendar()): ?> - - - - - -getType() == Mage_Catalog_Model_Product_Option::OPTION_TYPE_DATE_TIME - || $_option->getType() == Mage_Catalog_Model_Product_Option::OPTION_TYPE_TIME): ?> -   getTimeHtml() ?> - - -getIsRequire()): ?> - - - - 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 deleted file mode 100644 index 77b750c4e6..0000000000 --- a/app/design/frontend/default/blank/template/catalog/product/view/options/type/default.phtml +++ /dev/null @@ -1,30 +0,0 @@ - -getOption() ?> -
    - -
    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 deleted file mode 100644 index 212482316a..0000000000 --- a/app/design/frontend/default/blank/template/catalog/product/view/options/type/file.phtml +++ /dev/null @@ -1,41 +0,0 @@ - -getOption() ?> -
    - getFormatedPrice() ?>
    -decoratedIsLast){?> class="last"> - -getFileExtension()): ?> -

    __('Allowed file extensions to upload')?>: getFileExtension() ?>

    - -getImageSizeX() > 0): ?> -

    __('Maximum image width')?>: getImageSizeX() ?> __('px.')?>

    - -getImageSizeY() > 0): ?> -

    __('Maximum image height')?>: getImageSizeY() ?> __('px.')?>

    - - 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 deleted file mode 100644 index 6aef379929..0000000000 --- a/app/design/frontend/default/blank/template/catalog/product/view/options/type/select.phtml +++ /dev/null @@ -1,37 +0,0 @@ - - -getOption() ?> -
    -decoratedIsLast){?> class="last"> - getValuesHtml() ?> - getIsRequire()): ?> - getType() == Mage_Catalog_Model_Product_Option::OPTION_TYPE_RADIO || $_option->getType() == Mage_Catalog_Model_Product_Option::OPTION_TYPE_CHECKBOX): ?> - - - - 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 deleted file mode 100644 index e2f919ec72..0000000000 --- a/app/design/frontend/default/blank/template/catalog/product/view/options/type/text.phtml +++ /dev/null @@ -1,39 +0,0 @@ - -getOption() ?> -
    - getFormatedPrice() ?>
    -decoratedIsLast){?> class="last"> -getType() == Mage_Catalog_Model_Product_Option::OPTION_TYPE_FIELD): ?> - -getType() == Mage_Catalog_Model_Product_Option::OPTION_TYPE_AREA): ?> - - -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 deleted file mode 100644 index 4636addc16..0000000000 --- a/app/design/frontend/default/blank/template/catalog/product/view/options/wrapper.phtml +++ /dev/null @@ -1,33 +0,0 @@ - -
    - getChildHtml('', true, true);?> - hasRequiredOptions()):?> -

    __('* Required Fields') ?>

    - -
    - 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 deleted file mode 100644 index 5c9352e12b..0000000000 --- a/app/design/frontend/default/blank/template/catalog/product/view/options/wrapper/bottom.phtml +++ /dev/null @@ -1,29 +0,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 deleted file mode 100644 index db905ea545..0000000000 --- a/app/design/frontend/default/blank/template/catalog/product/view/price.phtml +++ /dev/null @@ -1,30 +0,0 @@ - -
    -

    __('Old Price:') ?> getPrice() ?>

    -

    getPrice() ?>

    -
    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 deleted file mode 100644 index 4c350cebdd..0000000000 --- a/app/design/frontend/default/blank/template/catalog/product/view/price_clone.phtml +++ /dev/null @@ -1,28 +0,0 @@ - -getProduct() ?> -getPriceHtml($_product, false, '_clone') ?> diff --git a/app/design/frontend/default/blank/template/catalog/product/view/tierprices.phtml b/app/design/frontend/default/blank/template/catalog/product/view/tierprices.phtml deleted file mode 100644 index 7d5cef540d..0000000000 --- a/app/design/frontend/default/blank/template/catalog/product/view/tierprices.phtml +++ /dev/null @@ -1,181 +0,0 @@ - - -getProduct(); -$_tierPrices = $this->getTierPrices(); -$_finalPriceInclTax = $this->helper('tax')->getPrice($_product, $_product->getFinalPrice(), true); - -$_weeeTaxAmount = Mage::helper('weee')->getAmountForDisplay($_product); -if (Mage::helper('weee')->typeOfDisplay($_product, array(1,2,4))) { - $_weeeTaxAttributes = Mage::helper('weee')->getProductWeeeAttributesForDisplay($_product); -} - -?> - 0): ?> -
      - getInGrouped()): ?> - getTierPrices($_product); ?> - - processTierPrices($_product, $_tierPrices); ?> - - - helper('tax')->displayBothPrices()): ?> - typeOfDisplay($_product, 0)): ?> -
    • __('Buy %1$s for %2$s (%3$s incl. tax) each', $_price['price_qty'], $_price['formated_price_incl_weee_only'], $_price['formated_price_incl_weee']) ?> - typeOfDisplay($_product, 1)): ?> -
    • __('Buy %1$s for %2$s', $_price['price_qty'], $_price['formated_price_incl_weee_only']); ?> - - ( - __('%1$s incl tax.', $_price['formated_price_incl_weee']); ?> - - - getName(); ?>: currency($_attribute->getAmount()); ?> - - ) - - __('each') ?> - typeOfDisplay($_product, 4)): ?> -
    • __('Buy %1$s for %2$s', $_price['price_qty'], $_price['formated_price_incl_weee_only']); ?> - - ( - __('%1$s incl tax.', $_price['formated_price_incl_weee']); ?> - - - getName(); ?>: currency($_attribute->getAmount()+$_attribute->getTaxAmount()); ?> - - ) - - __('each') ?> - typeOfDisplay($_product, 2)): ?> -
    • __('Buy %1$s for %2$s', $_price['price_qty'], $_price['formated_price']); ?> - - ( - - getName(); ?>: currency($_attribute->getAmount()); ?> - - __('Total incl. Tax: %1$s', $_price['formated_price_incl_weee']); ?> - ) - - __('each') ?> - -
    • __('Buy %1$s for %2$s (%3$s incl. tax) each', $_price['price_qty'], $_price['formated_price'], $_price['formated_price_incl_tax']) ?> - - - helper('tax')->displayPriceIncludingTax()): ?> - typeOfDisplay($_product, 0)): ?> -
    • __('Buy %1$s for %2$s each', $_price['price_qty'], $_price['formated_price_incl_weee']) ?> - typeOfDisplay($_product, 1)): ?> -
    • __('Buy %1$s for %2$s', $_price['price_qty'], $_price['formated_price_incl_weee']); ?> - - ( - - - getName(); ?>: currency($_attribute->getAmount()); ?> - - ) - - __('each') ?> - typeOfDisplay($_product, 4)): ?> -
    • __('Buy %1$s for %2$s', $_price['price_qty'], $_price['formated_price_incl_weee']); ?> - - ( - - - getName(); ?>: currency($_attribute->getAmount()+$_attribute->getTaxAmount()); ?> - - ) - - __('each') ?> - typeOfDisplay($_product, 2)): ?> -
    • __('Buy %1$s for %2$s', $_price['price_qty'], $_price['formated_price_incl_tax']); ?> - - ( - - getName(); ?>: currency($_attribute->getAmount()); ?> - - __('Total incl. Tax: %1$s', $_price['formated_price_incl_weee']); ?> - ) - - __('each') ?> - -
    • __('Buy %1$s for %2$s each', $_price['price_qty'], $_price['formated_price_incl_tax']) ?> - - - typeOfDisplay($_product, 0)): ?> -
    • __('Buy %1$s for %2$s each', $_price['price_qty'], $_price['formated_price_incl_weee_only']) ?> - typeOfDisplay($_product, 1)): ?> -
    • __('Buy %1$s for %2$s', $_price['price_qty'], $_price['formated_price_incl_weee_only']); ?> - - ( - - - getName(); ?>: currency($_attribute->getAmount()); ?> - - ) - - __('each') ?> - typeOfDisplay($_product, 4)): ?> -
    • __('Buy %1$s for %2$s', $_price['price_qty'], $_price['formated_price_incl_weee_only']); ?> - - ( - - - getName(); ?>: currency($_attribute->getAmount()+$_attribute->getTaxAmount()); ?> - - ) - - __('each') ?> - typeOfDisplay($_product, 2)): ?> -
    • __('Buy %1$s for %2$s', $_price['price_qty'], $_price['formated_price']); ?> - - ( - - getName(); ?>: currency($_attribute->getAmount()); ?> - - __('Total incl. Tax: %1$s', $_price['formated_price_incl_weee_only']); ?> - ) - - __('each') ?> - -
    • __('Buy %1$s for %2$s each', $_price['price_qty'], $_price['formated_price']) ?> - - - - getInGrouped()): ?> - getPrice() == $_product->getFinalPrice() && $_product->getPrice() > $_price['price']) - || ($_product->getPrice() != $_product->getFinalPrice() && $_product->getFinalPrice() > $_price['price'])): ?> - __('and') ?> __('save')?> % - - -
    • - -
    - diff --git a/app/design/frontend/default/blank/template/catalog/product/view/type/configurable.phtml b/app/design/frontend/default/blank/template/catalog/product/view/type/configurable.phtml deleted file mode 100644 index 0c8a4237cf..0000000000 --- a/app/design/frontend/default/blank/template/catalog/product/view/type/configurable.phtml +++ /dev/null @@ -1,39 +0,0 @@ - -getProduct() ?> -isSaleable()): ?> -

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

    - -

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

    - -getPriceHtml($_product) ?> 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 deleted file mode 100644 index 2a085e1384..0000000000 --- a/app/design/frontend/default/blank/template/catalog/product/view/type/grouped.phtml +++ /dev/null @@ -1,80 +0,0 @@ - -getProduct() ?> -getAssociatedProducts() ?> -isSaleable() && count($_associatedProducts)): ?> -

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

    - -

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

    - - - - - - - - - - isSaleable()): ?> - - - - - - - - - - - isSaleable()): ?> - - - - - - - - - - -
    __('Product Name') ?>__('Price') ?>__('Qty') ?>
    htmlEscape($_item->getName()) ?> - getPriceHtml($_item, true) ?> - - isSaleable()) : ?> - - -

    __('Out of stock.') ?>

    - -
    __('No options of this product are available.') ?>
    - diff --git a/app/design/frontend/default/blank/template/catalog/product/view/type/options/configurable.phtml b/app/design/frontend/default/blank/template/catalog/product/view/type/options/configurable.phtml deleted file mode 100644 index 1f2f19af8f..0000000000 --- a/app/design/frontend/default/blank/template/catalog/product/view/type/options/configurable.phtml +++ /dev/null @@ -1,46 +0,0 @@ - - -getProduct(); -$_attributes = Mage::helper('core')->decorateArray($this->getAllowAttributes()); -?> -isSaleable() && count($_attributes)):?> -
    - -
    - decoratedIsLast){?> class="last"> - - - -
    - - 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 deleted file mode 100644 index a287cf5aa7..0000000000 --- a/app/design/frontend/default/blank/template/catalog/product/view/type/simple.phtml +++ /dev/null @@ -1,40 +0,0 @@ - -getProduct() ?> - -isSaleable()): ?> -

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

    - -

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

    - -getPriceHtml($_product) ?> 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 deleted file mode 100644 index a287cf5aa7..0000000000 --- a/app/design/frontend/default/blank/template/catalog/product/view/type/virtual.phtml +++ /dev/null @@ -1,40 +0,0 @@ - -getProduct() ?> - -isSaleable()): ?> -

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

    - -

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

    - -getPriceHtml($_product) ?> diff --git a/app/design/frontend/default/blank/template/catalog/product/widget/link/link_block.phtml b/app/design/frontend/default/blank/template/catalog/product/widget/link/link_block.phtml deleted file mode 100644 index 438cc15603..0000000000 --- a/app/design/frontend/default/blank/template/catalog/product/widget/link/link_block.phtml +++ /dev/null @@ -1,27 +0,0 @@ - -getLinkAttributes() ?>>htmlEscape($this->getAnchorText()) ?> diff --git a/app/design/frontend/default/blank/template/catalog/product/widget/link/link_inline.phtml b/app/design/frontend/default/blank/template/catalog/product/widget/link/link_inline.phtml deleted file mode 100644 index 9d99409a14..0000000000 --- a/app/design/frontend/default/blank/template/catalog/product/widget/link/link_inline.phtml +++ /dev/null @@ -1,27 +0,0 @@ - -getLinkAttributes() ?>>htmlEscape($this->getAnchorText()) ?> diff --git a/app/design/frontend/default/blank/template/catalog/product/widget/new/content/new_grid.phtml b/app/design/frontend/default/blank/template/catalog/product/widget/new/content/new_grid.phtml deleted file mode 100644 index 1e0d7c73cc..0000000000 --- a/app/design/frontend/default/blank/template/catalog/product/widget/new/content/new_grid.phtml +++ /dev/null @@ -1,66 +0,0 @@ - -getProductCollection()) && $_products->getSize()): ?> -
    -
    -

    __('New Products') ?>

    -
    -
    - getItems() as $_product): ?> - - - - -
    -
    - diff --git a/app/design/frontend/default/blank/template/catalog/product/widget/new/content/new_list.phtml b/app/design/frontend/default/blank/template/catalog/product/widget/new/content/new_list.phtml deleted file mode 100644 index ef5d8baffc..0000000000 --- a/app/design/frontend/default/blank/template/catalog/product/widget/new/content/new_list.phtml +++ /dev/null @@ -1,66 +0,0 @@ - -getProductCollection()) && $_products->getSize()): ?> -
    -
    -

    __('New Products') ?>

    -
    -
    -
      - getItems() as $_product): ?> -
    1. - <?php echo $this->htmlEscape($_product->getName()) ?> -
      -
      -

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

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

      __('In stock') ?>

      - -

      __('Out of stock') ?>

      - - - -
      -
      -
    2. - -
    -
    -
    - diff --git a/app/design/frontend/default/blank/template/catalog/seo/sitemap.phtml b/app/design/frontend/default/blank/template/catalog/seo/sitemap.phtml deleted file mode 100644 index 45600e97a1..0000000000 --- a/app/design/frontend/default/blank/template/catalog/seo/sitemap.phtml +++ /dev/null @@ -1,43 +0,0 @@ - - -getCollection(); ?> -getSize()): ?> - - -

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

    - diff --git a/app/design/frontend/default/blank/template/catalog/seo/sitemap/container.phtml b/app/design/frontend/default/blank/template/catalog/seo/sitemap/container.phtml deleted file mode 100644 index 40bfd8c6d3..0000000000 --- a/app/design/frontend/default/blank/template/catalog/seo/sitemap/container.phtml +++ /dev/null @@ -1,33 +0,0 @@ - -
    -

    getTitle() ?>

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

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

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

    __('Catalog Advanced Search') ?>

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

    __('Search Settings') ?>

    -
      - getSearchableAttributes() as $_attribute): ?> - getAttributeCode() ?> -
    • -
      - getAttributeInputType($_attribute)): - case 'number': ?> -
      - - - - -
      - -
      - - - - - - (getCurrency($_attribute); ?>) -
      - - getAttributeSelectElement($_attribute) ?> - - getAttributeYesNoElement($_attribute) ?> - -
      - getDateInput($_attribute, 'from') ?> - - - getDateInput($_attribute, 'to') ?> -
      - - - -
    • - -
    - -
    - -
    -
    -
    - diff --git a/app/design/frontend/default/blank/template/catalogsearch/advanced/result.phtml b/app/design/frontend/default/blank/template/catalogsearch/advanced/result.phtml deleted file mode 100644 index 20b9bc9798..0000000000 --- a/app/design/frontend/default/blank/template/catalogsearch/advanced/result.phtml +++ /dev/null @@ -1,61 +0,0 @@ - -
    -

    __('Catalog Advanced Search') ?>

    -
    -getMessagesBlock()->getGroupedHtml() ?> -getResultCount()): ?> -

    - helper('catalogsearch') - ->__('%d item(s) were found using the following search criteria', $this->getResultCount()); ?> -

    - -

    helper('catalogsearch')->__('No items were found using the following search criteria.');?> helper('catalogsearch')->__('Modify your search'); ?>

    - - -getSearchCriterias(); ?> -
    - - -
      - -
    • htmlEscape($this->helper('catalog')->__($criteria['name'])); ?>: htmlEscape($criteria['value']); ?>
    • - -
    - - -
    -getResultCount()): ?> -

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

    - -getResultCount()): ?> - getProductListHtml() ?> - -getSearchCriterias(); ?> diff --git a/app/design/frontend/default/blank/template/catalogsearch/form.mini.phtml b/app/design/frontend/default/blank/template/catalogsearch/form.mini.phtml deleted file mode 100644 index adfc877f70..0000000000 --- a/app/design/frontend/default/blank/template/catalogsearch/form.mini.phtml +++ /dev/null @@ -1,41 +0,0 @@ - -
    - -
    diff --git a/app/design/frontend/default/blank/template/catalogsearch/result.phtml b/app/design/frontend/default/blank/template/catalogsearch/result.phtml deleted file mode 100644 index 2a78581519..0000000000 --- a/app/design/frontend/default/blank/template/catalogsearch/result.phtml +++ /dev/null @@ -1,43 +0,0 @@ - -getResultCount()): ?> -getMessagesBlock()->getGroupedHtml() ?> -
    - helper('rss/catalog')->getTagFeedUrl()): ?> - __('Subscribe to Feed') ?> - -

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

    -
    - getProductListHtml() ?> - -
    -

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

    -
    -

    - getNoResultText()) ? $this->getNoResultText() : $this->__('Your search returns no results.') ?> -

    - diff --git a/app/design/frontend/default/blank/template/catalogsearch/term.phtml b/app/design/frontend/default/blank/template/catalogsearch/term.phtml deleted file mode 100644 index 29ed0e46c0..0000000000 --- a/app/design/frontend/default/blank/template/catalogsearch/term.phtml +++ /dev/null @@ -1,38 +0,0 @@ - -
    -

    __('Popular Search Terms') ?>

    -
    -getTerms()) > 0 ): ?> - - -

    __('There are no search terms available.'); ?>

    - diff --git a/app/design/frontend/default/blank/template/checkout/cart.phtml b/app/design/frontend/default/blank/template/checkout/cart.phtml deleted file mode 100644 index 49063a78df..0000000000 --- a/app/design/frontend/default/blank/template/checkout/cart.phtml +++ /dev/null @@ -1,125 +0,0 @@ - - -
    -
    -

    __('Shopping Cart') ?>

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

    __('Discount Codes') ?>

    -
    -
    -
    - - - - getCouponCode())): ?> -   - -
    -
    - -
    diff --git a/app/design/frontend/default/blank/template/checkout/cart/crosssell.phtml b/app/design/frontend/default/blank/template/checkout/cart/crosssell.phtml deleted file mode 100644 index dd1306558d..0000000000 --- a/app/design/frontend/default/blank/template/checkout/cart/crosssell.phtml +++ /dev/null @@ -1,58 +0,0 @@ - - -getItemCount()): ?> -
    -

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

    - -
    - 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 deleted file mode 100644 index e8906d52ce..0000000000 --- a/app/design/frontend/default/blank/template/checkout/cart/item/default.phtml +++ /dev/null @@ -1,257 +0,0 @@ - -getItem()?> - - <?php echo $this->__('Remove item')?> - hasProductUrl()):?> - <?php echo $this->htmlEscape($this->getProductName()) ?> - hasProductUrl()):?> - -

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

    - getOptionList()):?> -
    - - getFormatedOptionValue($_option) ?> -
    htmlEscape($_option['label']) ?>
    - class="truncated"> - -
    -
    -
    htmlEscape($_option['label']) ?>
    -
    -
    -
    - - - -
    - - getMessages()): ?> - -

    *

    - - - - helper('wishlist')->isAllowInCart()) : ?> - - - - - helper('tax')->displayCartPriceExclTax() || $this->helper('tax')->displayCartBothPrices()): ?> - - typeOfDisplay($_item, array(1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?> -
    - -
    - - - typeOfDisplay($_item, array(0, 1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?> - helper('checkout')->formatPrice($_item->getCalculationPrice()+$_item->getWeeeTaxAppliedAmount()+$_item->getWeeeTaxDisposition()); ?> - - helper('checkout')->formatPrice($_item->getCalculationPrice()) ?> - - -
    - - - getApplied($_item)): ?> - - - - typeOfDisplay($_item, 2, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?> -
    - __('Total'); ?>:
    helper('checkout')->formatPrice($_item->getCalculationPrice()+$_item->getWeeeTaxAppliedAmount()+$_item->getWeeeTaxDisposition()); ?>
    -
    - - - - - helper('tax')->displayCartPriceInclTax() || $this->helper('tax')->displayCartBothPrices()): ?> - - helper('checkout')->getPriceInclTax($_item); ?> - typeOfDisplay($_item, array(1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?> -
    - -
    - - - typeOfDisplay($_item, array(0, 1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?> - helper('checkout')->formatPrice($_incl+$_item->getWeeeTaxAppliedAmount()); ?> - - helper('checkout')->formatPrice($_incl-$_item->getWeeeTaxDisposition()) ?> - - -
    - getApplied($_item)): ?> - - - - typeOfDisplay($_item, 2, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?> -
    - __('Total incl. tax'); ?>:
    helper('checkout')->formatPrice($_incl+$_item->getWeeeTaxAppliedAmount()); ?>
    -
    - - - - - - - - helper('tax')->displayCartPriceExclTax() || $this->helper('tax')->displayCartBothPrices()): ?> - - typeOfDisplay($_item, array(1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?> -
    - -
    - - - typeOfDisplay($_item, array(0, 1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?> - helper('checkout')->formatPrice($_item->getRowTotal()+$_item->getWeeeTaxAppliedRowAmount()+$_item->getWeeeTaxRowDisposition()); ?> - - helper('checkout')->formatPrice($_item->getRowTotal()) ?> - - -
    - getApplied($_item)): ?> - - - - typeOfDisplay($_item, 2, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?> -
    - __('Total'); ?>:
    helper('checkout')->formatPrice($_item->getRowTotal()+$_item->getWeeeTaxAppliedRowAmount()+$_item->getWeeeTaxRowDisposition()); ?>
    -
    - - - - - helper('tax')->displayCartPriceInclTax() || $this->helper('tax')->displayCartBothPrices()): ?> - - helper('checkout')->getSubtotalInclTax($_item); ?> - typeOfDisplay($_item, array(1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?> -
    - -
    - - - typeOfDisplay($_item, array(0, 1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?> - helper('checkout')->formatPrice($_incl+$_item->getWeeeTaxAppliedRowAmount()); ?> - - helper('checkout')->formatPrice($_incl-$_item->getWeeeTaxRowDisposition()) ?> - - -
    - - - getApplied($_item)): ?> - - - - typeOfDisplay($_item, 2, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?> -
    - __('Total incl. tax'); ?>:
    helper('checkout')->formatPrice($_incl+$_item->getWeeeTaxAppliedRowAmount()); ?>
    -
    - - - - - diff --git a/app/design/frontend/default/blank/template/checkout/cart/noItems.phtml b/app/design/frontend/default/blank/template/checkout/cart/noItems.phtml deleted file mode 100644 index e0b5c510c2..0000000000 --- a/app/design/frontend/default/blank/template/checkout/cart/noItems.phtml +++ /dev/null @@ -1,32 +0,0 @@ - -
    -

    __('Shopping Cart is Empty') ?>

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

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

    -

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

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

    getItemName($_item) ?>

    - getItemDescription($_item) ?> - getMessage()): ?> -

    * getMessage() ?>

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

    getItemName($_item) ?>

    - getItemDescription($_item) ?> - getMessage()): ?> -

    * getMessage() ?>

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

    __('Estimate Shipping and Tax') ?>

    -
    -
    -

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

    -
      -
    • -
      - getCountryHtmlSelect($this->getEstimateCountryId()) ?> -
    • - getStateActive()): ?> -
    • -
      - - - -
    • - - getCityActive()): ?> -
    • -
      - -
    • - -
    • -
      - -
    • -
    -
    - -
    -
    -
    - - -getEstimateRates())): ?> -
    -
    -
    - $_rates): ?> -
    getCarrierName($code) ?>
    -
    -
      - - getErrorMessage()) echo ' class="error-msg"';?>> - getErrorMessage()): ?> - getErrorMessage() ?> - - getCode()===$this->getAddressShippingMethod()) echo ' checked="checked"' ?> class="radio" /> - - - - -
    -
    - -
    -
    - -
    -
    -
    - - -
    diff --git a/app/design/frontend/default/blank/template/checkout/cart/sidebar.phtml b/app/design/frontend/default/blank/template/checkout/cart/sidebar.phtml deleted file mode 100644 index 41c1b7cc6f..0000000000 --- a/app/design/frontend/default/blank/template/checkout/cart/sidebar.phtml +++ /dev/null @@ -1,70 +0,0 @@ - -
    - getSummaryCount() ?> -
    -

    __('My Cart') ?>

    -
    -
    - 0): ?> - -

    __('There is 1 item in your cart.', $this->getUrl('checkout/cart')) ?>

    - -

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

    - -

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

    - - isPossibleOnepageCheckout()): ?> -
    - -
    - - getRecentItems() ?> - -

    __('Recently added item(s)') ?>

    -
      - - getItemHtml($_item) ?> - -
    - - -

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

    - -
    -
    diff --git a/app/design/frontend/default/blank/template/checkout/cart/sidebar/default.phtml b/app/design/frontend/default/blank/template/checkout/cart/sidebar/default.phtml deleted file mode 100644 index d20ba6d981..0000000000 --- a/app/design/frontend/default/blank/template/checkout/cart/sidebar/default.phtml +++ /dev/null @@ -1,127 +0,0 @@ - -getItem() ?> -
  • - <?php echo $this->htmlEscape($this->getProductName()) ?> -
    - <?php echo $this->__('Remove Product') ?> -

    getProductName() ?>

    - getQty() ?> x - - - - helper('tax')->displayCartPriceExclTax() || $this->helper('tax')->displayCartBothPrices()): ?> - helper('tax')->displayCartBothPrices()): ?> - __('Excl. Tax'); ?>: - - typeOfDisplay($_item, array(0, 1, 4), 'sales')): ?> - helper('checkout')->formatPrice($_item->getCalculationPrice()+$_item->getWeeeTaxAppliedAmount()+$_item->getWeeeTaxDisposition()); ?> - - helper('checkout')->formatPrice($_item->getCalculationPrice()) ?> - - getApplied($_item)): ?> -
    - typeOfDisplay($_item, 1, 'sales')): ?> - - getApplied($_item) as $tax): ?> - : formatPrice($tax['amount'],true,true); ?>
    - -
    - typeOfDisplay($_item, 2, 'sales')): ?> - getApplied($_item) as $tax): ?> - : formatPrice($tax['amount_incl_tax'],true,true); ?>
    - - typeOfDisplay($_item, 4, 'sales')): ?> - - getApplied($_item) as $tax): ?> - : formatPrice($tax['amount_incl_tax'],true,true); ?>
    - -
    - - typeOfDisplay($_item, 2, 'sales')): ?> - __('Total'); ?>:
    helper('checkout')->formatPrice($_item->getCalculationPrice()+$_item->getWeeeTaxAppliedAmount()+$_item->getWeeeTaxDisposition()); ?>
    - - - - - - - helper('tax')->displayCartPriceInclTax() || $this->helper('tax')->displayCartBothPrices()): ?> - helper('checkout')->getPriceInclTax($_item); ?> - helper('tax')->displayCartBothPrices()): ?> -
    __('Incl. Tax'); ?>: - - typeOfDisplay($_item, array(0, 1, 4), 'sales')): ?> - helper('checkout')->formatPrice($_incl+$_item->getWeeeTaxAppliedAmount()); ?> - - helper('checkout')->formatPrice($_incl-$_item->getWeeeTaxDisposition()) ?> - - getApplied($_item)): ?> -
    - typeOfDisplay($_item, 1, 'sales')): ?> - - getApplied($_item) as $tax): ?> - : formatPrice($tax['amount'],true,true); ?>
    - -
    - typeOfDisplay($_item, 2, 'sales')): ?> - getApplied($_item) as $tax): ?> - : formatPrice($tax['amount_incl_tax'],true,true); ?>
    - - typeOfDisplay($_item, 4, 'sales')): ?> - - getApplied($_item) as $tax): ?> - : formatPrice($tax['amount_incl_tax'],true,true); ?>
    - -
    - - typeOfDisplay($_item, 2, 'sales')): ?> - __('Total incl. tax'); ?>:
    helper('checkout')->formatPrice($_incl+$_item->getWeeeTaxAppliedAmount()); ?>
    - - - - getOptionList()):?> -
    -
    -
    - -
    htmlEscape($_option['label']) ?>
    -
    - - - - - -
    - -
    -
    - __('Details') ?> -
    - -
    -
  • diff --git a/app/design/frontend/default/blank/template/checkout/cart/totals.phtml b/app/design/frontend/default/blank/template/checkout/cart/totals.phtml deleted file mode 100644 index ce9f55a8a4..0000000000 --- a/app/design/frontend/default/blank/template/checkout/cart/totals.phtml +++ /dev/null @@ -1,43 +0,0 @@ - - - - - - - renderTotals('footer'); ?> - - - renderTotals(); ?> - -
    diff --git a/app/design/frontend/default/blank/template/checkout/links.phtml b/app/design/frontend/default/blank/template/checkout/links.phtml deleted file mode 100644 index 1bcb516224..0000000000 --- a/app/design/frontend/default/blank/template/checkout/links.phtml +++ /dev/null @@ -1,26 +0,0 @@ - diff --git a/app/design/frontend/default/blank/template/checkout/multishipping/address/select.phtml b/app/design/frontend/default/blank/template/checkout/multishipping/address/select.phtml deleted file mode 100644 index 395c67054d..0000000000 --- a/app/design/frontend/default/blank/template/checkout/multishipping/address/select.phtml +++ /dev/null @@ -1,58 +0,0 @@ - -
    -

    __('Change Billing Address') ?>

    - -
    -getMessagesBlock()->getGroupedHtml() ?> -
    - - getAddressCollection() as $_address): ?> -
    -
    -

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

    -
    - format('html') ?> - isAddressDefaultBilling($_address)): ?> -
    __('Default Billing') ?> - - isAddressDefaultShipping($_address)): ?> -
    __('Default Shipping') ?> - -
    -
    - -
    - -
    -
    - diff --git a/app/design/frontend/default/blank/template/checkout/multishipping/addresses.phtml b/app/design/frontend/default/blank/template/checkout/multishipping/addresses.phtml deleted file mode 100644 index f19233fd8b..0000000000 --- a/app/design/frontend/default/blank/template/checkout/multishipping/addresses.phtml +++ /dev/null @@ -1,79 +0,0 @@ - - -
    -
    -

    __('Ship to Multiple Addresses') ?>

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

    __('Please select shipping address for applicable items') ?>

    - - - - - - - - - - - - - - - - - - - - getItems() as $_index => $_item): ?> - - - - - - - - -
    __('Product') ?>__('Qty') ?>__('Send to') ?> 
    getItemHtml($_item->getQuoteItem())?>getProduct()->getIsVirtual()): echo $this->__('Shipping selection is not applicable'); else: echo $this->getAddressesHtmlSelect($_item, $_index); endif; ?><?php echo $this->__('Remove Item') ?>
    - -
    - « __('Back to Shopping Cart') ?> - -
    -
    -
    diff --git a/app/design/frontend/default/blank/template/checkout/multishipping/agreements.phtml b/app/design/frontend/default/blank/template/checkout/multishipping/agreements.phtml deleted file mode 100644 index de22cf5735..0000000000 --- a/app/design/frontend/default/blank/template/checkout/multishipping/agreements.phtml +++ /dev/null @@ -1,50 +0,0 @@ - - - -getAgreements()) return; ?> -
      -getAgreements() as $_a): ?> -
    1. -
      getContentHeight() ? ' style="height:' . $_a->getContentHeight() . '"' : '')?>> - getIsHtml()):?> - getContent() ?> - - htmlEscape($_a->getContent())) ?> - -
      -

      - - -

      -
    2. - -
    diff --git a/app/design/frontend/default/blank/template/checkout/multishipping/billing.phtml b/app/design/frontend/default/blank/template/checkout/multishipping/billing.phtml deleted file mode 100644 index 91f8393e5b..0000000000 --- a/app/design/frontend/default/blank/template/checkout/multishipping/billing.phtml +++ /dev/null @@ -1,102 +0,0 @@ - - -
    -

    __('Billing Information') ?>

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

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

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

    __('Payment Method') ?>

    - - -
    - getMethods(); - $_methodsCount = count($_methods); - ?> - getCode() ?> -
    - 1): ?> - getSelectedMethodCode()==$_code): ?> checked="checked" class="radio" /> - - - - -
    - getChildHtml('payment.method.'.$_code)) : ?> -
    - -
    - - -
    - getChildHtml('checkout_billing_items') ?> -
    -
    -
    - « __('Back to Shipping Information') ?> - -
    -
    - 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 deleted file mode 100644 index 973beb113b..0000000000 --- a/app/design/frontend/default/blank/template/checkout/multishipping/billing/items.phtml +++ /dev/null @@ -1,54 +0,0 @@ - -getQuote()->hasVirtualItems()): ?> -

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

    -
    -
    -
    -

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

    - - - - - - - - - - - getVirtualQuoteItems() as $_item): ?> - - - - - - -
    __('Product Name') ?>__('Qty') ?>
    getItemHtml($_item) ?>getQty() ?>
    - -
    -
    - diff --git a/app/design/frontend/default/blank/template/checkout/multishipping/item/default.phtml b/app/design/frontend/default/blank/template/checkout/multishipping/item/default.phtml deleted file mode 100644 index a42455dc32..0000000000 --- a/app/design/frontend/default/blank/template/checkout/multishipping/item/default.phtml +++ /dev/null @@ -1,45 +0,0 @@ - -

    getProductName() ?>

    -getOptionList()):?> -
    - - getFormatedOptionValue($_option) ?> -
    htmlEscape($_option['label']) ?>
    - class="truncated"> - -
    -
    -
    htmlEscape($_option['label']) ?>
    -
    -
    -
    - - - -
    - diff --git a/app/design/frontend/default/blank/template/checkout/multishipping/link.phtml b/app/design/frontend/default/blank/template/checkout/multishipping/link.phtml deleted file mode 100644 index 7a55a3e12f..0000000000 --- a/app/design/frontend/default/blank/template/checkout/multishipping/link.phtml +++ /dev/null @@ -1,27 +0,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 deleted file mode 100644 index 0818292212..0000000000 --- a/app/design/frontend/default/blank/template/checkout/multishipping/overview.phtml +++ /dev/null @@ -1,253 +0,0 @@ - -
    -

    __('Review Order') ?>

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

    __('Billing Information') ?>

    -
    - getBillingAddress() ?> -

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

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

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

    - - - getPaymentHtml() ?> -
    -
    -

    __('Shipping Information') ?>

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

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

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

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

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

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

    -
    -
    -
    -

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

    - helper('tax')->displayCartBothPrices() ? 2 : 1); ?> - - - - helper('tax')->displayCartBothPrices()): ?> - - - - - helper('tax')->displayCartBothPrices()): ?> - - - - - - - - - - helper('tax')->displayCartBothPrices()): ?> - - - - - - - - - - renderTotals($this->getBillinAddressTotals()); ?> - - - getVirtualItems() as $_item): ?> - - - helper('tax')->displayCartPriceExclTax() || $this->helper('tax')->displayCartBothPrices()): ?> - - - helper('tax')->displayCartPriceInclTax() || $this->helper('tax')->displayCartBothPrices()): ?> - - - - helper('tax')->displayCartPriceExclTax() || $this->helper('tax')->displayCartBothPrices()): ?> - - - helper('tax')->displayCartPriceInclTax() || $this->helper('tax')->displayCartBothPrices()): ?> - - - - - -
    __('Product Name') ?>__('Price') ?>__('Qty') ?>__('Subtotal') ?>
    helper('tax')->getIncExcTaxLabel(false) ?>helper('tax')->getIncExcTaxLabel(true) ?>helper('tax')->getIncExcTaxLabel(false) ?>helper('tax')->getIncExcTaxLabel(true) ?>
    getItemHtml($_item) ?> - helper('checkout')->formatPrice($_item->getCalculationPrice()) ?> - - helper('checkout')->formatPrice($this->helper('checkout')->getPriceInclTax($_item)) ?> - getQty()*1 ?> - helper('checkout')->formatPrice($_item->getRowTotal()) ?> - - helper('checkout')->formatPrice($this->helper('checkout')->getSubtotalInclTax($_item)) ?> -
    - -
    -
    - - - getChildHtml('agreements') ?> - -

    __('Grand Total:') ?> helper('checkout')->formatPrice($this->getTotal()) ?>

    -
    - « __('Back to Billing Information') ?> - - -
    -
    -
    - diff --git a/app/design/frontend/default/blank/template/checkout/multishipping/shipping.phtml b/app/design/frontend/default/blank/template/checkout/multishipping/shipping.phtml deleted file mode 100644 index 8c03705fe2..0000000000 --- a/app/design/frontend/default/blank/template/checkout/multishipping/shipping.phtml +++ /dev/null @@ -1,112 +0,0 @@ - - -
    -

    __('Select Shipping Method') ?>

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

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

    -
    -
    -

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

    -
    format('html') ?>
    -

    __('Shipping Method') ?>

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

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

    - -
    - $_rates): ?> -
    getCarrierName($code) ?>
    -
    -
      - -
    • - getErrorMessage()): ?> - getCarrierTitle() ?>: getErrorMessage() ?> - - getCode()===$this->getAddressShippingMethod($_address)) echo ' checked="checked"' ?> class="radio" /> - - -
    • - -
    -
    - -
    - -
    -
    - helper('giftmessage/message')->getInline('multishipping_adress_checkbox', $_address); ?> -

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

    - - - - - - - - - - - getAddressItems($_address) as $_item): ?> - - - - - - -
    __('Product Name') ?>__('Qty') ?>
    - getItemHtml($_item->getQuoteItem()) ?> - getQty() ?>
    - - helper('giftmessage/message')->getInline('multishipping_adress', $_address); ?> -
    -
    - - getChildHtml('checkout_billing_items') ?> -
    - « __('Back to Select Addresses') ?> - -
    -
    -
    diff --git a/app/design/frontend/default/blank/template/checkout/multishipping/state.phtml b/app/design/frontend/default/blank/template/checkout/multishipping/state.phtml deleted file mode 100644 index c03d4c0fa8..0000000000 --- a/app/design/frontend/default/blank/template/checkout/multishipping/state.phtml +++ /dev/null @@ -1,38 +0,0 @@ - - -
      -getSteps() as $_step): ?> - getIsActive()): ?> class="active">getLabel() ?> - -
    diff --git a/app/design/frontend/default/blank/template/checkout/multishipping/success.phtml b/app/design/frontend/default/blank/template/checkout/multishipping/success.phtml deleted file mode 100644 index dce1a14bbe..0000000000 --- a/app/design/frontend/default/blank/template/checkout/multishipping/success.phtml +++ /dev/null @@ -1,46 +0,0 @@ - -
    -

    __('Order Success') ?>

    -
    -

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

    -

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

    -getOrderIds()): ?> - - __('Your order number is ') ?> - $incrementId): ?> - - - - - - - -getChildHtml() ?> -
    - -
    diff --git a/app/design/frontend/default/blank/template/checkout/onepage.phtml b/app/design/frontend/default/blank/template/checkout/onepage.phtml deleted file mode 100644 index 59ec91a8a1..0000000000 --- a/app/design/frontend/default/blank/template/checkout/onepage.phtml +++ /dev/null @@ -1,61 +0,0 @@ - -
    -

    __('Checkout') ?>

    -
    - - - -
      -getSteps() as $_stepId => $_stepInfo): ?> -getChild($_stepId) || !$this->getChild($_stepId)->isShow()): continue; endif; $i++ ?> -
    1. -
      - -

      - -
      - -
    2. - -
    - diff --git a/app/design/frontend/default/blank/template/checkout/onepage/agreements.phtml b/app/design/frontend/default/blank/template/checkout/onepage/agreements.phtml deleted file mode 100644 index eda8253411..0000000000 --- a/app/design/frontend/default/blank/template/checkout/onepage/agreements.phtml +++ /dev/null @@ -1,52 +0,0 @@ - - - -getAgreements()) return; ?> -
    -
      -getAgreements() as $_a): ?> -
    1. -
      getContentHeight() ? ' style="height:' . $_a->getContentHeight() . '"' : '')?>> - getIsHtml()):?> - getContent() ?> - - htmlEscape($_a->getContent())) ?> - -
      -

      - - -

      -
    2. - -
    -
    diff --git a/app/design/frontend/default/blank/template/checkout/onepage/billing.phtml b/app/design/frontend/default/blank/template/checkout/onepage/billing.phtml deleted file mode 100644 index d03f76d2ba..0000000000 --- a/app/design/frontend/default/blank/template/checkout/onepage/billing.phtml +++ /dev/null @@ -1,160 +0,0 @@ - -
    -
    -
      - customerHasAddresses()): ?> -
    • -
      - getAddressesHtmlSelect('billing') ?> -
    • - -
    • customerHasAddresses()): ?> style="display:none;"> -
      - __('New Address') ?> - -
        -
      • getLayout()->createBlock('customer/widget_name')->setObject($this->getAddress()) - ->setFieldIdFormat('billing:%s')->setFieldNameFormat('billing[%s]')->toHtml() ?>
      • -
      • -
        -
        -
        - isCustomerLoggedIn()): ?> -
        -
        -
        - -
      • -

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

    __('* Required Fields') ?>

    -
    - - -
    -
    -
    - diff --git a/app/design/frontend/default/blank/template/checkout/onepage/failure.phtml b/app/design/frontend/default/blank/template/checkout/onepage/failure.phtml deleted file mode 100644 index c4a59598cf..0000000000 --- a/app/design/frontend/default/blank/template/checkout/onepage/failure.phtml +++ /dev/null @@ -1,32 +0,0 @@ - -
    -

    __('An error occurred in the process of payment') ?>

    -
    -getRealOrderId()) : ?>

    __('Order #') . $this->getRealOrderId() ?>

    -getErrorMessage()) : ?>

    -

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

    diff --git a/app/design/frontend/default/blank/template/checkout/onepage/link.phtml b/app/design/frontend/default/blank/template/checkout/onepage/link.phtml deleted file mode 100644 index bd51d0b5a9..0000000000 --- a/app/design/frontend/default/blank/template/checkout/onepage/link.phtml +++ /dev/null @@ -1,31 +0,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 deleted file mode 100644 index 782cb77781..0000000000 --- a/app/design/frontend/default/blank/template/checkout/onepage/login.phtml +++ /dev/null @@ -1,120 +0,0 @@ - -
    -
    -

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

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

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

    - -

    __('Register and save time!') ?>
    - __('Register with us for future convenience:') ?>

    -
      -
    • __('Fast and easy check out') ?>
    • -
    • __('Easy access to your order history and status') ?>
    • -
    - - getQuote()->isAllowedGuestCheckout() ): ?> -
      - getQuote()->isAllowedGuestCheckout() ): ?> -
    • - getQuote()->getCheckoutMethod()==Mage_Sales_Model_Quote::CHECKOUT_METHOD_GUEST): ?> checked="checked" class="radio" /> - -
    • - -
    • - getQuote()->getCheckoutMethod()==Mage_Sales_Model_Quote::CHECKOUT_METHOD_REGISTER || !$this->getQuote()->isAllowedGuestCheckout()): ?> checked="checked" class="radio" /> - -
    • -
    -

    __('Register and save time!') ?>
    - __('Register with us for future convenience:') ?>

    -
      -
    • __('Fast and easy check out') ?>
    • -
    • __('Easy access to your order history and status') ?>
    • -
    - - - -
    -
    -

    __('Login') ?>

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

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

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

    __('* Required Fields') ?>

    -
    -
    -
    - -
    -
    -
    -
    - -
    -
    -
    -
    - __('Forgot your password?') ?> - -
    -
    -
    diff --git a/app/design/frontend/default/blank/template/checkout/onepage/payment.phtml b/app/design/frontend/default/blank/template/checkout/onepage/payment.phtml deleted file mode 100644 index 78b2c7c53d..0000000000 --- a/app/design/frontend/default/blank/template/checkout/onepage/payment.phtml +++ /dev/null @@ -1,70 +0,0 @@ - - -
    -
    - getChildHtml('methods') ?> -
    -
    - -

    __('* Required Fields') ?>

    -
    - « __('Back') ?> - - -
    - - diff --git a/app/design/frontend/default/blank/template/checkout/onepage/payment/methods.phtml b/app/design/frontend/default/blank/template/checkout/onepage/payment/methods.phtml deleted file mode 100644 index b61f16318d..0000000000 --- a/app/design/frontend/default/blank/template/checkout/onepage/payment/methods.phtml +++ /dev/null @@ -1,51 +0,0 @@ - - -
    -getMethods() as $_method): $_code = $_method->getCode() ?> -
    - getMethods()) > 1 ): ?> - getSelectedMethodCode()==$_code): ?> checked="checked" class="radio" /> - - - - -
    - getChildHtml('payment.method.'.$_code)) : ?> -
    - -
    - - -
    - diff --git a/app/design/frontend/default/blank/template/checkout/onepage/progress.phtml b/app/design/frontend/default/blank/template/checkout/onepage/progress.phtml deleted file mode 100644 index d2dc19527f..0000000000 --- a/app/design/frontend/default/blank/template/checkout/onepage/progress.phtml +++ /dev/null @@ -1,110 +0,0 @@ - -
    -
    -

    __('Your Checkout Progress') ?>

    -
    -
    -
    - getCheckout()->getStepData('billing', 'is_show')): ?> - getCheckout()->getStepData('billing', 'complete')): ?> -
    - __('Billing Address') ?> | __('Change') ?> -
    -
    -
    getBilling()->format('html') ?>
    -
    - -
    - __('Billing Address') ?> -
    - - - - getCheckout()->getStepData('shipping', 'is_show')): ?> - getCheckout()->getStepData('shipping', 'complete')): ?> -
    - __('Shipping Address') ?> | __('Change') ?> -
    -
    -
    getShipping()->format('html') ?>
    -
    - -
    - __('Shipping Address') ?> -
    - - - - getCheckout()->getStepData('shipping_method', 'is_show')): ?> - getCheckout()->getStepData('shipping_method', 'complete')): ?> -
    - __('Shipping Method') ?> | __('Change') ?> -
    -
    - getShippingMethod()): ?> - getShippingDescription() ?> - - getShippingPriceExclTax(); ?> - getShippingPriceInclTax(); ?> - helper('tax')->displayShippingPriceIncludingTax()): ?> - - - - - helper('tax')->displayShippingBothPrices() && $_incl != $_excl): ?> - (__('Incl. Tax'); ?> ) - - - - __('Shipping method has not been selected yet') ?> - -
    - -
    - __('Shipping Method') ?> -
    - - - - getCheckout()->getStepData('payment', 'is_show')): ?> - getCheckout()->getStepData('payment', 'complete')): ?> -
    - __('Payment Method') ?> | __('Change') ?> -
    -
    - getPaymentHtml() ?> -
    - -
    - __('Payment Method') ?> -
    - - -
    -
    -
    diff --git a/app/design/frontend/default/blank/template/checkout/onepage/review.phtml b/app/design/frontend/default/blank/template/checkout/onepage/review.phtml deleted file mode 100644 index 5fe99fd5ed..0000000000 --- a/app/design/frontend/default/blank/template/checkout/onepage/review.phtml +++ /dev/null @@ -1,42 +0,0 @@ - -
    - getChildHtml('info') ?> -
    -getChildHtml('agreements') ?> -
    -

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

    - - -
    - 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 deleted file mode 100644 index e36c76a205..0000000000 --- a/app/design/frontend/default/blank/template/checkout/onepage/review/info.phtml +++ /dev/null @@ -1,65 +0,0 @@ - - - helper('tax')->displayCartBothPrices()): $colspan = $rowspan = 2; else: $colspan = $rowspan = 1; endif; ?> - - - - - helper('tax')->displayCartBothPrices()): ?> - - - - - - - - - - - helper('tax')->displayCartBothPrices()): ?> - - - - - - - - - getChildHtml('totals'); ?> - - getItems() as $_item): ?> - getItemHtml($_item)?> - - -
    __('Product Name') ?>__('Price') ?>__('Qty') ?>__('Subtotal') ?>
    helper('tax')->getIncExcTaxLabel(false) ?>helper('tax')->getIncExcTaxLabel(true) ?>helper('tax')->getIncExcTaxLabel(false) ?>helper('tax')->getIncExcTaxLabel(true) ?>
    - 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 deleted file mode 100644 index e70daa765b..0000000000 --- a/app/design/frontend/default/blank/template/checkout/onepage/review/item.phtml +++ /dev/null @@ -1,236 +0,0 @@ - -getItem()?> - -

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

    - getOptionList()):?> -
    - - getFormatedOptionValue($_option) ?> -
    htmlEscape($_option['label']) ?>
    - class="truncated"> - -
    -
    -
    htmlEscape($_option['label']) ?>
    -
    -
    -
    - - - -
    - - - helper('tax')->displayCartPriceExclTax() || $this->helper('tax')->displayCartBothPrices()): ?> - - typeOfDisplay($_item, array(1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?> -
    - -
    - - - typeOfDisplay($_item, array(0, 1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?> - helper('checkout')->formatPrice($_item->getCalculationPrice()+$_item->getWeeeTaxAppliedAmount()+$_item->getWeeeTaxDisposition()); ?> - - helper('checkout')->formatPrice($_item->getCalculationPrice()) ?> - - -
    - - - getApplied($_item)): ?> - - - - typeOfDisplay($_item, 2, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?> -
    - __('Total'); ?>:
    helper('checkout')->formatPrice($_item->getCalculationPrice()+$_item->getWeeeTaxAppliedAmount()+$_item->getWeeeTaxDisposition()); ?>
    -
    - - - - - helper('tax')->displayCartPriceInclTax() || $this->helper('tax')->displayCartBothPrices()): ?> - - helper('checkout')->getPriceInclTax($_item); ?> - typeOfDisplay($_item, array(1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?> -
    - -
    - - - typeOfDisplay($_item, array(0, 1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?> - helper('checkout')->formatPrice($_incl+$_item->getWeeeTaxAppliedAmount()); ?> - - helper('checkout')->formatPrice($_incl-$_item->getWeeeTaxDisposition()) ?> - - -
    - getApplied($_item)): ?> - - - - typeOfDisplay($_item, 2, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?> -
    - __('Total incl. tax'); ?>:
    helper('checkout')->formatPrice($_incl+$_item->getWeeeTaxAppliedAmount()); ?>
    -
    - - - - - getQty() ?> - helper('tax')->displayCartPriceExclTax() || $this->helper('tax')->displayCartBothPrices()): ?> - - typeOfDisplay($_item, array(1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?> -
    - -
    - - - typeOfDisplay($_item, array(0, 1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?> - helper('checkout')->formatPrice($_item->getRowTotal()+$_item->getWeeeTaxAppliedRowAmount()+$_item->getWeeeTaxRowDisposition()); ?> - - helper('checkout')->formatPrice($_item->getRowTotal()) ?> - - -
    - getApplied($_item)): ?> - - - - typeOfDisplay($_item, 2, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?> -
    - __('Total'); ?>:
    helper('checkout')->formatPrice($_item->getRowTotal()+$_item->getWeeeTaxAppliedRowAmount()+$_item->getWeeeTaxRowDisposition()); ?>
    -
    - - - - - helper('tax')->displayCartPriceInclTax() || $this->helper('tax')->displayCartBothPrices()): ?> - - helper('checkout')->getSubtotalInclTax($_item); ?> - typeOfDisplay($_item, array(1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?> -
    - -
    - - - typeOfDisplay($_item, array(0, 1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?> - helper('checkout')->formatPrice($_incl+$_item->getWeeeTaxAppliedRowAmount()); ?> - - helper('checkout')->formatPrice($_incl-$_item->getWeeeTaxRowDisposition()) ?> - - -
    - - - getApplied($_item)): ?> - - - - typeOfDisplay($_item, 2, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?> -
    - __('Total incl. tax'); ?>:
    helper('checkout')->formatPrice($_incl+$_item->getWeeeTaxAppliedRowAmount()); ?>
    -
    - - - - - diff --git a/app/design/frontend/default/blank/template/checkout/onepage/review/totals.phtml b/app/design/frontend/default/blank/template/checkout/onepage/review/totals.phtml deleted file mode 100644 index b59ee4c34d..0000000000 --- a/app/design/frontend/default/blank/template/checkout/onepage/review/totals.phtml +++ /dev/null @@ -1,43 +0,0 @@ - -getTotals()): ?> - - helper('tax')->displayCartBothPrices() ? 5 : 3; ?> - renderTotals(null, $_colspan); ?> - renderTotals('footer', $_colspan); ?> - needDisplayBaseGrandtotal()):?> - - - helper('sales')->__('Your credit card will be charged for') ?> - - - displayBaseGrandtotal() ?> - - - - - diff --git a/app/design/frontend/default/blank/template/checkout/onepage/shipping.phtml b/app/design/frontend/default/blank/template/checkout/onepage/shipping.phtml deleted file mode 100644 index 803501657d..0000000000 --- a/app/design/frontend/default/blank/template/checkout/onepage/shipping.phtml +++ /dev/null @@ -1,112 +0,0 @@ - -
    -
    -
      - customerHasAddresses()): ?> -
    • -
      - getAddressesHtmlSelect('shipping') ?> -
    • - -
    • customerHasAddresses()): ?> style="display:none;"> -
      - -
        -
      • getLayout()->createBlock('customer/widget_name')->setObject($this->getAddress()) - ->setFieldIdFormat('shipping:%s')->setFieldNameFormat('shipping[%s]')->setFieldParams('onchange="shipping.setSameAsBilling(false)"')->toHtml() ?>
      • -
      • -
        -
        - -
        -
        -
        - -
      • -

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

    __('* Required Fields') ?>

    -
    - « __('Back') ?> - - -
    -
    -
    - 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 deleted file mode 100644 index 46a1c023f3..0000000000 --- a/app/design/frontend/default/blank/template/checkout/onepage/shipping_method.phtml +++ /dev/null @@ -1,48 +0,0 @@ - -
    -
    -
    - getChildHtml('available') ?> -
    - -
    - getChildHtml('additional') ?> -
    -
    - « __('Back') ?> - - -
    -
    -
    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 deleted file mode 100644 index 473e2a4571..0000000000 --- a/app/design/frontend/default/blank/template/checkout/onepage/shipping_method/additional.phtml +++ /dev/null @@ -1,27 +0,0 @@ - -helper('giftmessage/message')->getInline('onepage_checkout', $this->getQuote(), $this->getDontDisplayContainer()) ?> diff --git a/app/design/frontend/default/blank/template/checkout/onepage/shipping_method/available.phtml b/app/design/frontend/default/blank/template/checkout/onepage/shipping_method/available.phtml deleted file mode 100644 index 3b7a8b68b8..0000000000 --- a/app/design/frontend/default/blank/template/checkout/onepage/shipping_method/available.phtml +++ /dev/null @@ -1,56 +0,0 @@ - -getShippingRates())): ?> -

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

    - -
    - $_rates): ?> -
    getCarrierName($code) ?>
    -
    -
      - -
    • - getErrorMessage()): ?> -
        • getErrorMessage() ?>
      - - getCode()===$this->getAddressShippingMethod()) echo ' checked="checked"' ?> class="radio" /> - - -
    • - -
    -
    - -
    - diff --git a/app/design/frontend/default/blank/template/checkout/success.phtml b/app/design/frontend/default/blank/template/checkout/success.phtml deleted file mode 100644 index deb29ae5b9..0000000000 --- a/app/design/frontend/default/blank/template/checkout/success.phtml +++ /dev/null @@ -1,46 +0,0 @@ - -
    -

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

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

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

    -canPrint()) :?> -

    __('Your order # is: %s', $this->getViewOrderUrl(), $this->getOrderId()) ?>.

    - -

    __('Your order # is: %s', $this->getOrderId()) ?>.

    - -

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

    -canPrint()) :?> -

    - __('Click here to print a copy of your order confirmation.', $this->getPrintUrl()) ?> - getChildHtml() ?> -

    - -
    - -
    diff --git a/app/design/frontend/default/blank/template/checkout/total/default.phtml b/app/design/frontend/default/blank/template/checkout/total/default.phtml deleted file mode 100644 index 142e98a9e4..0000000000 --- a/app/design/frontend/default/blank/template/checkout/total/default.phtml +++ /dev/null @@ -1,38 +0,0 @@ - - - - getRenderingArea() == $this->getTotal()->getArea()): ?> - getTotal()->getTitle() ?> - getRenderingArea() == $this->getTotal()->getArea()): ?> - - - getRenderingArea() == $this->getTotal()->getArea()): ?> - helper('checkout')->formatPrice($this->getTotal()->getValue()) ?> - getRenderingArea() == $this->getTotal()->getArea()): ?> - - diff --git a/app/design/frontend/default/blank/template/checkout/total/tax.phtml b/app/design/frontend/default/blank/template/checkout/total/tax.phtml deleted file mode 100644 index 82b9e687ae..0000000000 --- a/app/design/frontend/default/blank/template/checkout/total/tax.phtml +++ /dev/null @@ -1,68 +0,0 @@ - - -helper('tax')->displayFullSummary() && $this->getTotal()->getValue()!=0): ?> - - getTotal()->getFullInfo() as $info): ?> - - - - - - - - - - - - (%) - -
    - - - - helper('checkout')->formatPrice($amount); ?> - - - - - - - - -helper('tax')->displayFullSummary() && $this->getTotal()->getValue()!=0): ?> class="tax-total" onclick="expandDetails(this, '.tax-details-')"> - - helper('tax')->displayFullSummary()): ?> -
    getTotal()->getTitle() ?>
    - - getTotal()->getTitle() ?> - - - - helper('checkout')->formatPrice($this->getTotal()->getValue()) ?> - - diff --git a/app/design/frontend/default/blank/template/chronopay/form.phtml b/app/design/frontend/default/blank/template/chronopay/form.phtml deleted file mode 100644 index 630d8c943f..0000000000 --- a/app/design/frontend/default/blank/template/chronopay/form.phtml +++ /dev/null @@ -1,90 +0,0 @@ - - -getMethodCode() ?> - diff --git a/app/design/frontend/default/blank/template/chronopay/info.phtml b/app/design/frontend/default/blank/template/chronopay/info.phtml deleted file mode 100644 index 63a8aca5a1..0000000000 --- a/app/design/frontend/default/blank/template/chronopay/info.phtml +++ /dev/null @@ -1,34 +0,0 @@ - -getInfo()): ?> -getMethod()->getTitle() ?>
    -__('Name on the Card: %s', $this->htmlEscape($this->getInfo()->getCcOwner())) ?>
    -__('Credit Card Type: %s', $this->htmlEscape($this->getCcTypeName())) ?>
    -__('Credit Card Number: xxxx-%s', $this->htmlEscape($this->getInfo()->getCcLast4())) ?> - - - diff --git a/app/design/frontend/default/blank/template/chronopay/standard/failure.phtml b/app/design/frontend/default/blank/template/chronopay/standard/failure.phtml deleted file mode 100644 index 0940b05928..0000000000 --- a/app/design/frontend/default/blank/template/chronopay/standard/failure.phtml +++ /dev/null @@ -1,30 +0,0 @@ - -
    -

    __('Error occured') ?>

    -
    -

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

    diff --git a/app/design/frontend/default/blank/template/chronopay/standard/form.phtml b/app/design/frontend/default/blank/template/chronopay/standard/form.phtml deleted file mode 100644 index 6db17ecfd5..0000000000 --- a/app/design/frontend/default/blank/template/chronopay/standard/form.phtml +++ /dev/null @@ -1,30 +0,0 @@ - -getMethodCode() ?> - diff --git a/app/design/frontend/default/blank/template/cms/content.phtml b/app/design/frontend/default/blank/template/cms/content.phtml deleted file mode 100644 index 88f9db846d..0000000000 --- a/app/design/frontend/default/blank/template/cms/content.phtml +++ /dev/null @@ -1,27 +0,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 deleted file mode 100644 index 1d494b9135..0000000000 --- a/app/design/frontend/default/blank/template/cms/default/home.phtml +++ /dev/null @@ -1,27 +0,0 @@ - -There was no Home CMS page configured or found. 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 deleted file mode 100644 index 419832a0ab..0000000000 --- a/app/design/frontend/default/blank/template/cms/default/no-route.phtml +++ /dev/null @@ -1,27 +0,0 @@ - -There was no 404 CMS page configured or found. diff --git a/app/design/frontend/default/blank/template/cms/meta.phtml b/app/design/frontend/default/blank/template/cms/meta.phtml deleted file mode 100644 index 3766ebe46b..0000000000 --- a/app/design/frontend/default/blank/template/cms/meta.phtml +++ /dev/null @@ -1,32 +0,0 @@ - -getPageMetaKeywords()): ?> - - -getPageMetaDescription()): ?> - - diff --git a/app/design/frontend/default/blank/template/cms/widget/link/link_block.phtml b/app/design/frontend/default/blank/template/cms/widget/link/link_block.phtml deleted file mode 100644 index a169d12fc0..0000000000 --- a/app/design/frontend/default/blank/template/cms/widget/link/link_block.phtml +++ /dev/null @@ -1,27 +0,0 @@ - -getLinkAttributes() ?>>htmlEscape($this->getAnchorText()) ?> diff --git a/app/design/frontend/default/blank/template/cms/widget/link/link_inline.phtml b/app/design/frontend/default/blank/template/cms/widget/link/link_inline.phtml deleted file mode 100644 index 2aa8a3f170..0000000000 --- a/app/design/frontend/default/blank/template/cms/widget/link/link_inline.phtml +++ /dev/null @@ -1,27 +0,0 @@ - -getLinkAttributes() ?>>htmlEscape($this->getAnchorText()) ?> diff --git a/app/design/frontend/default/blank/template/cms/widget/static_block/default.phtml b/app/design/frontend/default/blank/template/cms/widget/static_block/default.phtml deleted file mode 100644 index e5d3cf676b..0000000000 --- a/app/design/frontend/default/blank/template/cms/widget/static_block/default.phtml +++ /dev/null @@ -1,27 +0,0 @@ - -
    getText(); ?>
    diff --git a/app/design/frontend/default/blank/template/cms/wrapper.phtml b/app/design/frontend/default/blank/template/cms/wrapper.phtml deleted file mode 100644 index a326d5fa46..0000000000 --- a/app/design/frontend/default/blank/template/cms/wrapper.phtml +++ /dev/null @@ -1,29 +0,0 @@ - -
    - getChildHtml(); ?> -
    diff --git a/app/design/frontend/default/blank/template/contacts/form.phtml b/app/design/frontend/default/blank/template/contacts/form.phtml deleted file mode 100644 index d055301993..0000000000 --- a/app/design/frontend/default/blank/template/contacts/form.phtml +++ /dev/null @@ -1,67 +0,0 @@ - -
    getMessagesBlock()->getGroupedHtml() ?>
    -
    -

    __('Contact Us') ?>

    -
    -
    -
    -

    __('Contact Information') ?>

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

    __('* Required Fields') ?>

    -
    - -
    -
    - diff --git a/app/design/frontend/default/blank/template/core/formkey.phtml b/app/design/frontend/default/blank/template/core/formkey.phtml deleted file mode 100644 index 6f5d5d7cba..0000000000 --- a/app/design/frontend/default/blank/template/core/formkey.phtml +++ /dev/null @@ -1,27 +0,0 @@ - - diff --git a/app/design/frontend/default/blank/template/core/link.phtml b/app/design/frontend/default/blank/template/core/link.phtml deleted file mode 100644 index b01cdca557..0000000000 --- a/app/design/frontend/default/blank/template/core/link.phtml +++ /dev/null @@ -1,27 +0,0 @@ - -getLinkAttributes() ?>>htmlEscape($this->getAnchorText()) ?> diff --git a/app/design/frontend/default/blank/template/core/messages.phtml b/app/design/frontend/default/blank/template/core/messages.phtml deleted file mode 100644 index b6c85bd94c..0000000000 --- a/app/design/frontend/default/blank/template/core/messages.phtml +++ /dev/null @@ -1,47 +0,0 @@ - -getMessages($type) ) { - if ( !$html ) { - $html .= '
      '; - } - $html .= '
    • '; - $html .= '
        '; - - foreach ( $messages as $message ) { - $html.= '
      • '; - $html.= $message->getText(); - $html.= '
      • '; - } - $html .= '
      '; - $html .= '
    • '; - } - } - if ( $html) { - $html .= '
    '; - } -?> diff --git a/app/design/frontend/default/blank/template/customer/account/dashboard.phtml b/app/design/frontend/default/blank/template/customer/account/dashboard.phtml deleted file mode 100644 index cddf3d8649..0000000000 --- a/app/design/frontend/default/blank/template/customer/account/dashboard.phtml +++ /dev/null @@ -1,39 +0,0 @@ - -
    -

    __('My Dashboard') ?>

    -
    -
    - getMessagesBlock()->getGroupedHtml() ?> - getChildHtml('hello') ?> - getChildHtml('top') ?> -

    __('Account Information') ?>

    - getChildHtml('info') ?> - getChildHtml('address') ?> - getChildHtml('info1') ?> - getChildHtml('info2') ?> -
    diff --git a/app/design/frontend/default/blank/template/customer/account/dashboard/address.phtml b/app/design/frontend/default/blank/template/customer/account/dashboard/address.phtml deleted file mode 100644 index 28fe530934..0000000000 --- a/app/design/frontend/default/blank/template/customer/account/dashboard/address.phtml +++ /dev/null @@ -1,44 +0,0 @@ - -
    -

    __('Address Book') ?>

    - __('Manage Addresses') ?> -
    -
    __('Primary Billing Address') ?>
    -
    - getPrimaryBillingAddressHtml() ?>
    - __('Edit Address') ?> -
    -
    -
    -
    __('Primary Shipping Address') ?>
    -
    - getPrimaryShippingAddressHtml() ?>
    - __('Edit Address') ?> -
    -
    -
    diff --git a/app/design/frontend/default/blank/template/customer/account/dashboard/hello.phtml b/app/design/frontend/default/blank/template/customer/account/dashboard/hello.phtml deleted file mode 100644 index 8179f3f410..0000000000 --- a/app/design/frontend/default/blank/template/customer/account/dashboard/hello.phtml +++ /dev/null @@ -1,30 +0,0 @@ - -
    -

    __('Hello, %s!', $this->htmlEscape($this->getCustomerName())) ?>

    -

    __('From your My Account Dashboard you have the ability to view a snapshot of your recent account activity and update your account information. Select a link below to view or edit information.') ?>

    -
    diff --git a/app/design/frontend/default/blank/template/customer/account/dashboard/info.phtml b/app/design/frontend/default/blank/template/customer/account/dashboard/info.phtml deleted file mode 100644 index 6b48919624..0000000000 --- a/app/design/frontend/default/blank/template/customer/account/dashboard/info.phtml +++ /dev/null @@ -1,50 +0,0 @@ - -
    -
    -

    __('Contact Information') ?>

    - __('Edit') ?> -

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

    -
    - isNewsletterEnabled() ): ?> -
    -

    __('Newsletters') ?>

    - __('Edit') ?> -

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

    -
    - -
    diff --git a/app/design/frontend/default/blank/template/customer/account/dashboard/newsletter.phtml b/app/design/frontend/default/blank/template/customer/account/dashboard/newsletter.phtml deleted file mode 100644 index 389c9d2932..0000000000 --- a/app/design/frontend/default/blank/template/customer/account/dashboard/newsletter.phtml +++ /dev/null @@ -1,31 +0,0 @@ - -
    -

    __('Newsletters') ?>

    - __('Edit Newsletters') ?> -

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

    -
    diff --git a/app/design/frontend/default/blank/template/customer/account/dashboard/sidebar.phtml b/app/design/frontend/default/blank/template/customer/account/dashboard/sidebar.phtml deleted file mode 100644 index 1bcb516224..0000000000 --- a/app/design/frontend/default/blank/template/customer/account/dashboard/sidebar.phtml +++ /dev/null @@ -1,26 +0,0 @@ - diff --git a/app/design/frontend/default/blank/template/customer/account/link/back.phtml b/app/design/frontend/default/blank/template/customer/account/link/back.phtml deleted file mode 100644 index 4c66e5a0d0..0000000000 --- a/app/design/frontend/default/blank/template/customer/account/link/back.phtml +++ /dev/null @@ -1,29 +0,0 @@ - - diff --git a/app/design/frontend/default/blank/template/customer/account/navigation.phtml b/app/design/frontend/default/blank/template/customer/account/navigation.phtml deleted file mode 100644 index 6214d9967a..0000000000 --- a/app/design/frontend/default/blank/template/customer/account/navigation.phtml +++ /dev/null @@ -1,46 +0,0 @@ - - diff --git a/app/design/frontend/default/blank/template/customer/address.phtml b/app/design/frontend/default/blank/template/customer/address.phtml deleted file mode 100644 index 41e67fff17..0000000000 --- a/app/design/frontend/default/blank/template/customer/address.phtml +++ /dev/null @@ -1,94 +0,0 @@ - -
    -

    Address Book

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

    Primary

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

    - __('Edit Address') ?> -

    -
    -

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

    -
    -

    __('Additional Address Entries') ?>

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

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

    -
    -

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

    -
    -
    -
    - « __('Back') ?> - -
    - diff --git a/app/design/frontend/default/blank/template/customer/address/book.phtml b/app/design/frontend/default/blank/template/customer/address/book.phtml deleted file mode 100644 index da524fd2a9..0000000000 --- a/app/design/frontend/default/blank/template/customer/address/book.phtml +++ /dev/null @@ -1,117 +0,0 @@ - - -
    -

    __('Address Book') ?>

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

    __('Default Addresses') ?>

    -
      - getCustomer()->getDefaultBilling()): ?> -
    1. -

      __('Default Billing Address') ?>

      -
      - getAddressHtml(Mage::getSingleton('customer/session')->getCustomer()->getAddressById($_pAddsses)) ?>
      - __('Change Billing Address') ?>
      -
    2. - getCustomer()->getDefaultShipping()): ?> -
    3. -

      __('Default Billing Address') ?>

      -
      - getAddressHtml(Mage::getSingleton('customer/session')->getCustomer()->getAddressById($_pAddsses)) ?>
      - __('Change Billing Address') ?> -
      -
    4. - -
    5. -

      __('Default Billing Address') ?>

      - __('You have no default billing address in your address book.') ?>
    6. - - getCustomer()->getDefaultShipping()): ?> -
    7. -

      __('Default Shipping Address') ?>

      -
      - getAddressHtml(Mage::getSingleton('customer/session')->getCustomer()->getAddressById($_pAddsses)) ?>
      - __('Change Shipping Address') ?> -
      -
    8. - getCustomer()->getDefaultBilling()): ?> -
    9. -

      __('Default Shipping Address') ?>

      -
      - getAddressHtml(Mage::getSingleton('customer/session')->getCustomer()->getAddressById($_pAddsses)) ?>
      - __('Change Shipping Address') ?> -
      -
    10. - -
    11. -

      __('Default Shipping Address') ?>

      __('You have no default shipping address in your address book.') ?> -
    12. - -
    -
    -
    -

    __('Additional Address Entries') ?>

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

    getTitle() ?>

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

    __('Contact Information') ?>

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

    __('Address') ?>

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

    __('* Required Fields') ?>

    -
    - « __('Back') ?> - -
    -
    - diff --git a/app/design/frontend/default/blank/template/customer/balance.phtml b/app/design/frontend/default/blank/template/customer/balance.phtml deleted file mode 100644 index d26dbb94f2..0000000000 --- a/app/design/frontend/default/blank/template/customer/balance.phtml +++ /dev/null @@ -1,31 +0,0 @@ - -getMessagesBlock()->getGroupedHtml() ?> -__('Your account balance is: %s', $customer->getStoreBalance()) ?> - diff --git a/app/design/frontend/default/blank/template/customer/form/address.phtml b/app/design/frontend/default/blank/template/customer/form/address.phtml deleted file mode 100644 index d4cad823d4..0000000000 --- a/app/design/frontend/default/blank/template/customer/form/address.phtml +++ /dev/null @@ -1,123 +0,0 @@ - - - -
    -

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

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

    __('Personal Information') ?>

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

    __('Address') ?>

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

    __('* Required Fields') ?>

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

    __('* Required Fields') ?>

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

    __('Send confirmation link') ?>

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

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

    -
      -
    • -

      -
    • -
    -
    -

    __('* Required Fields') ?>

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

    __('Edit Account Information') ?>

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

    __('Account Information') ?>

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

    __('Change Password') ?>

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

    __('* Required Fields') ?>

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

    __('Forgot Your Password?') ?>

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

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

    -
      -
    • -
      -
      - -
      -
    • -
    -

    __('* Required Fields') ?>

    -
    - « __('Back to Login') ?> - -
    -
    -
    - diff --git a/app/design/frontend/default/blank/template/customer/form/login.phtml b/app/design/frontend/default/blank/template/customer/form/login.phtml deleted file mode 100644 index 2cf9f0ae96..0000000000 --- a/app/design/frontend/default/blank/template/customer/form/login.phtml +++ /dev/null @@ -1,83 +0,0 @@ - - - diff --git a/app/design/frontend/default/blank/template/customer/form/mini.login.phtml b/app/design/frontend/default/blank/template/customer/form/mini.login.phtml deleted file mode 100644 index 4cb171e1fe..0000000000 --- a/app/design/frontend/default/blank/template/customer/form/mini.login.phtml +++ /dev/null @@ -1,33 +0,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 deleted file mode 100644 index b4fb00a21c..0000000000 --- a/app/design/frontend/default/blank/template/customer/form/newsletter.phtml +++ /dev/null @@ -1,47 +0,0 @@ - -
    -

    __('Newsletter Subscription') ?>

    -
    -getMessagesBlock()->getGroupedHtml() ?> -
    -
    - getBlockHtml('formkey')?> -
      -
    • getIsSubscribed()): ?> checked="checked" class="checkbox" />
    • -
    -
    - « __('Back') ?> - -
    -
    -
    - diff --git a/app/design/frontend/default/blank/template/customer/form/register.phtml b/app/design/frontend/default/blank/template/customer/form/register.phtml deleted file mode 100644 index 92d7c032ec..0000000000 --- a/app/design/frontend/default/blank/template/customer/form/register.phtml +++ /dev/null @@ -1,158 +0,0 @@ - - - diff --git a/app/design/frontend/default/blank/template/customer/logout.phtml b/app/design/frontend/default/blank/template/customer/logout.phtml deleted file mode 100644 index 4e97f63dc0..0000000000 --- a/app/design/frontend/default/blank/template/customer/logout.phtml +++ /dev/null @@ -1,35 +0,0 @@ - -
    -

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

    -
    -

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

    - diff --git a/app/design/frontend/default/blank/template/customer/order/view.phtml b/app/design/frontend/default/blank/template/customer/order/view.phtml deleted file mode 100644 index 1acd7fa565..0000000000 --- a/app/design/frontend/default/blank/template/customer/order/view.phtml +++ /dev/null @@ -1,85 +0,0 @@ - -
    -

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

    -
    -
    -
    -

    __('Billing Information') ?>

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

    __('Payment Method') ?>

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

    __('Shipping Information') ?>

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

    __('Shipping Method') ?>

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

    __('My Orders') ?>

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

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

    - - diff --git a/app/design/frontend/default/blank/template/customer/widget/dob.phtml b/app/design/frontend/default/blank/template/customer/widget/dob.phtml deleted file mode 100644 index cc2edce1e1..0000000000 --- a/app/design/frontend/default/blank/template/customer/widget/dob.phtml +++ /dev/null @@ -1,92 +0,0 @@ -getLayout()->createBlock('customer/widget_dob') - ->setDate($this->getCustomer()->getDob()) - ->toHtml() ?> - -For checkout/onepage/billing.phtml: - -getLayout()->createBlock('customer/widget_dob') - ->setDate($this->getCustomer()->getDob()) - ->setFieldIdFormat('billing:%s') - ->setFieldNameFormat('billing[%s]') - ->toHtml() ?> - -NOTE: Regarding styles - if we leave it this way, we'll move it to boxes.css - Alternatively we could calculate widths automatically using block input parameters. -*/ - -/** - * @see Mage_Customer_Block_Widget_Dob - */ -?> -
    - - -setDateInput('d', - '
    - getFieldParams() . ' /> - -
    ' - ); - - $this->setDateInput('m', - '
    - getFieldParams() . ' /> - -
    ' - ); - - $this->setDateInput('y', - '
    - getFieldParams() . ' /> - -
    ' - ); -?> -getSortedDateInputs() ?> - - - - -
    - diff --git a/app/design/frontend/default/blank/template/customer/widget/gender.phtml b/app/design/frontend/default/blank/template/customer/widget/gender.phtml deleted file mode 100644 index f19b316fb1..0000000000 --- a/app/design/frontend/default/blank/template/customer/widget/gender.phtml +++ /dev/null @@ -1,34 +0,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 deleted file mode 100644 index 4c4e769cbc..0000000000 --- a/app/design/frontend/default/blank/template/customer/widget/name.phtml +++ /dev/null @@ -1,113 +0,0 @@ -getLayout()->createBlock('customer/widget_name') - ->setObject($this->getAddress()) - ->toHtml() ?> - -For checkout/onepage/shipping.phtml: - -getLayout()->createBlock('customer/widget_name') - ->setObject($this->getAddress()) - ->setFieldIdFormat('shipping:%s') - ->setFieldNameFormat('shipping[%s]') - ->setFieldParams('onchange="shipping.setSameAsBilling(false);"') - ->toHtml() ?> -*/ -?> - -
    -showPrefix()): ?> -
    - -
    - getPrefixOptions()===false): ?> - getFieldParams() ?> /> - - - -
    - - -
    - -
    - getFieldParams() ?> /> -
    - -showMiddlename()): ?> -
    - -
    - getFieldParams() ?> /> -
    - - -
    - -
    - getFieldParams() ?> /> -
    - -showSuffix()): ?> -
    - -
    - getSuffixOptions()===false): ?> - getFieldParams() ?> /> - - - -
    - -
    diff --git a/app/design/frontend/default/blank/template/customer/widget/taxvat.phtml b/app/design/frontend/default/blank/template/customer/widget/taxvat.phtml deleted file mode 100644 index 856ed90f58..0000000000 --- a/app/design/frontend/default/blank/template/customer/widget/taxvat.phtml +++ /dev/null @@ -1,33 +0,0 @@ - -
    - - getFieldParams() ?> /> -
    diff --git a/app/design/frontend/default/blank/template/customer/wishlist.phtml b/app/design/frontend/default/blank/template/customer/wishlist.phtml deleted file mode 100644 index b7f8d6eb83..0000000000 --- a/app/design/frontend/default/blank/template/customer/wishlist.phtml +++ /dev/null @@ -1,67 +0,0 @@ - -
    -

    __('Wishlist') ?>

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

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

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

    __('Error occured') ?>

    -
    -

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

    diff --git a/app/design/frontend/default/blank/template/cybermut/form.phtml b/app/design/frontend/default/blank/template/cybermut/form.phtml deleted file mode 100644 index 69c434d92c..0000000000 --- a/app/design/frontend/default/blank/template/cybermut/form.phtml +++ /dev/null @@ -1,30 +0,0 @@ - -getMethodCode() ?> - diff --git a/app/design/frontend/default/blank/template/cybersource/form.phtml b/app/design/frontend/default/blank/template/cybersource/form.phtml deleted file mode 100644 index f2401ddf62..0000000000 --- a/app/design/frontend/default/blank/template/cybersource/form.phtml +++ /dev/null @@ -1,186 +0,0 @@ - -getMethodCode() ?> - - - diff --git a/app/design/frontend/default/blank/template/cybersource/info.phtml b/app/design/frontend/default/blank/template/cybersource/info.phtml deleted file mode 100644 index bfcde9c03a..0000000000 --- a/app/design/frontend/default/blank/template/cybersource/info.phtml +++ /dev/null @@ -1,38 +0,0 @@ - -getInfo()): ?> -getMethod()->getTitle() ?>
    - -__('Credit Card Type: %s', $this->getCcTypeName()) ?>
    -__('Credit Card Number: xxxx-%s', $this->getInfo()->getCcLast4()) ?>
    -getInfo()->getCcSsIssue()): ?> -__("Switch/Solo/Maestro(UK Domestic) card issue number: %s", $this->getInfo()->getCcSsIssue()) ?>
    - -getInfo()->getCcSsStartYear()): ?> -__('Switch/Solo/Maestro(UK Domestic) card start Date: %s/%s', $this->getCcStartMonth(), $this->getInfo()->getCcSsStartYear()) ?> - - diff --git a/app/design/frontend/default/blank/template/directory/currency.phtml b/app/design/frontend/default/blank/template/directory/currency.phtml deleted file mode 100644 index 313b21b3f8..0000000000 --- a/app/design/frontend/default/blank/template/directory/currency.phtml +++ /dev/null @@ -1,58 +0,0 @@ - - -getCurrencyCount()>1): ?> -
    -
    -

    __('Select Your Currency') ?>

    -
    -
    - -
    -
    - - diff --git a/app/design/frontend/default/blank/template/directory/currency/switch.phtml b/app/design/frontend/default/blank/template/directory/currency/switch.phtml deleted file mode 100644 index bc69b09104..0000000000 --- a/app/design/frontend/default/blank/template/directory/currency/switch.phtml +++ /dev/null @@ -1,31 +0,0 @@ - -
    -

    __('Currency') ?>

    -
    -

    __('Your current currency is: %s', $currency->getCode()) ?>

    -

    __('Continue »') ?>

    diff --git a/app/design/frontend/default/blank/template/downloadable/catalog/product/links.phtml b/app/design/frontend/default/blank/template/downloadable/catalog/product/links.phtml deleted file mode 100644 index 96885becd4..0000000000 --- a/app/design/frontend/default/blank/template/downloadable/catalog/product/links.phtml +++ /dev/null @@ -1,115 +0,0 @@ - -getLinksPurchasedSeparately() ?> -getProduct()->isSaleable() && $this->hasLinks()):?> -
    - getLinks(); ?> - getLinkSelectionRequired(); ?> -
    - decoratedIsLast){?> class="last"> - - - - - - -
    - - diff --git a/app/design/frontend/default/blank/template/downloadable/catalog/product/samples.phtml b/app/design/frontend/default/blank/template/downloadable/catalog/product/samples.phtml deleted file mode 100644 index 1c1c08f150..0000000000 --- a/app/design/frontend/default/blank/template/downloadable/catalog/product/samples.phtml +++ /dev/null @@ -1,45 +0,0 @@ - - -hasSamples()): ?> -
    -
    getSamplesTitle() ?>
    - getSamples() ?> - -
    - getIsOpenInNewWindow()?'onclick="this.target=\'_blank\'"':''; ?>>getTitle() ?> -
    - -
    - diff --git a/app/design/frontend/default/blank/template/downloadable/catalog/product/type.phtml b/app/design/frontend/default/blank/template/downloadable/catalog/product/type.phtml deleted file mode 100644 index 81ca22d5d9..0000000000 --- a/app/design/frontend/default/blank/template/downloadable/catalog/product/type.phtml +++ /dev/null @@ -1,41 +0,0 @@ - -getProduct() ?> - -isSaleable()): ?> -

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

    - -

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

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

    getProductName() ?>

    - getOptionList()):?> -
    - - getFormatedOptionValue($_option) ?> -
    htmlEscape($_option['label']) ?>
    - class="truncated"> - -
    -
    -
    htmlEscape($_option['label']) ?>
    -
    -
    -
    - - - -
    - - - getLinks()): ?> -
    -
    getLinksTitle() ?>
    - -
    getTitle() ?>
    - -
    - - - - getMessages()): ?> - -
    - * -
    - - - - helper('wishlist')->isAllowInCart()) : ?> - - - - - helper('tax')->displayCartPriceExclTax() || $this->helper('tax')->displayCartBothPrices()): ?> - - helper('checkout')->formatPrice($_item->getCalculationPrice()) ?> - - - helper('tax')->displayCartPriceInclTax() || $this->helper('tax')->displayCartBothPrices()): ?> - - helper('checkout')->formatPrice($this->helper('checkout')->getPriceInclTax($_item)); ?> - - - - - - helper('tax')->displayCartPriceExclTax() || $this->helper('tax')->displayCartBothPrices()): ?> - - helper('checkout')->formatPrice($_item->getRowTotal()) ?> - - - helper('tax')->displayCartPriceInclTax() || $this->helper('tax')->displayCartBothPrices()): ?> - - helper('checkout')->formatPrice($this->helper('checkout')->getSubtotalInclTax($_item)); ?> - - - diff --git a/app/design/frontend/default/blank/template/downloadable/checkout/multishipping/item/downloadable.phtml b/app/design/frontend/default/blank/template/downloadable/checkout/multishipping/item/downloadable.phtml deleted file mode 100644 index 2bb510e49d..0000000000 --- a/app/design/frontend/default/blank/template/downloadable/checkout/multishipping/item/downloadable.phtml +++ /dev/null @@ -1,57 +0,0 @@ - -

    getProductName() ?>

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

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

    - - getOptionList()):?> -
    - - getFormatedOptionValue($_option) ?> -
    htmlEscape($_option['label']) ?>
    - class="truncated"> - -
    -
    -
    htmlEscape($_option['label']) ?>
    -
    -
    -
    - - - -
    - - getLinks()): ?> -
    -
    getLinksTitle() ?>
    - -
    getTitle() ?>
    - -
    - - - - helper('tax')->displayCartPriceExclTax() || $this->helper('tax')->displayCartBothPrices()): ?> - helper('checkout')->formatPrice($_item->getCalculationPrice()) ?> - - helper('tax')->displayCartPriceInclTax() || $this->helper('tax')->displayCartBothPrices()): ?> - helper('checkout')->formatPrice($this->helper('checkout')->getPriceInclTax($_item)); ?> - - getQty() ?> - helper('tax')->displayCartPriceExclTax() || $this->helper('tax')->displayCartBothPrices()): ?> - helper('checkout')->formatPrice($_item->getRowTotal()) ?> - - helper('tax')->displayCartPriceInclTax() || $this->helper('tax')->displayCartBothPrices()): ?> - helper('checkout')->formatPrice($this->helper('checkout')->getSubtotalInclTax($_item)); ?> - - diff --git a/app/design/frontend/default/blank/template/downloadable/checkout/success.phtml b/app/design/frontend/default/blank/template/downloadable/checkout/success.phtml deleted file mode 100644 index fce2d41485..0000000000 --- a/app/design/frontend/default/blank/template/downloadable/checkout/success.phtml +++ /dev/null @@ -1,29 +0,0 @@ - -getOrderHasDownloadable()): ?> -__('Go to My Downloadable Products', $this->getDownloadableProductsUrl()) ?> - diff --git a/app/design/frontend/default/blank/template/downloadable/customer/products/list.phtml b/app/design/frontend/default/blank/template/downloadable/customer/products/list.phtml deleted file mode 100644 index ed1fa2ea27..0000000000 --- a/app/design/frontend/default/blank/template/downloadable/customer/products/list.phtml +++ /dev/null @@ -1,74 +0,0 @@ - - -getMessagesBlock()->getGroupedHtml() ?> -getItems(); ?> -
    -

    __('My Downloadable Products') ?>

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

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

    - -getChildHtml('pager'); ?> - diff --git a/app/design/frontend/default/blank/template/downloadable/email/order/items/creditmemo/downloadable.phtml b/app/design/frontend/default/blank/template/downloadable/email/order/items/creditmemo/downloadable.phtml deleted file mode 100644 index 018f8c7f49..0000000000 --- a/app/design/frontend/default/blank/template/downloadable/email/order/items/creditmemo/downloadable.phtml +++ /dev/null @@ -1,128 +0,0 @@ - -getItem() ?> -getItem()->getOrder(); ?> - - - htmlEscape($_item->getName()) ?> - getItemOptions()): ?> -
    - getItemOptions() as $option): ?> -
    -
    - -
    - - getLinks()->getPurchasedItems()): ?> -
    -
    getLinksTitle() ?>
    - -
    getLinkTitle() ?>
    - -
    - - getDescription() ?> - - getSku($_item) ?> - getQty()*1 ?> - - helper('tax')->displayCartPriceExclTax($_order->getStore()) || $this->helper('tax')->displayCartBothPrices($_order->getStore())): ?> - helper('tax')->displayCartBothPrices($_order->getStore())): ?> - __('Excl. Tax'); ?>: - - typeOfDisplay($_item, array(0, 1, 4), 'email', $_order->getStore())): ?> - formatPrice($_item->getRowTotal()+$_item->getWeeeTaxAppliedRowAmount()+$_item->getWeeeTaxRowDisposition()); ?> - - formatPrice($_item->getRowTotal()) ?> - - - - getApplied($_item)): ?> -
    - typeOfDisplay($_item, 1, 'email', $_order->getStore())): ?> - - getApplied($_item) as $tax): ?> - : formatPrice($tax['row_amount'],true,true); ?>
    - -
    - typeOfDisplay($_item, 2, 'email', $_order->getStore())): ?> - getApplied($_item) as $tax): ?> - : formatPrice($tax['row_amount_incl_tax'],true,true); ?>
    - - typeOfDisplay($_item, 4, 'email', $_order->getStore())): ?> - - getApplied($_item) as $tax): ?> - : formatPrice($tax['row_amount_incl_tax'],true,true); ?>
    - -
    - - - typeOfDisplay($_item, 2, 'email', $_order->getStore())): ?> -
    - __('Total'); ?>:
    formatPrice($_item->getCalculationPrice()+$_item->getWeeeTaxAppliedRowAmount()+$_item->getWeeeTaxRowDisposition()); ?>
    - - - - - - helper('tax')->displayCartPriceInclTax($_order->getStore()) || $this->helper('tax')->displayCartBothPrices($_order->getStore())): ?> - helper('tax')->displayCartBothPrices($_order->getStore())): ?> -
    __('Incl. Tax'); ?>: - - helper('checkout')->getSubtotalInclTax($_item); ?> - typeOfDisplay($_item, array(0, 1, 4), 'email', $_order->getStore())): ?> - formatPrice($_incl+$_item->getWeeeTaxAppliedRowAmount()); ?> - - formatPrice($_incl-$_item->getWeeeTaxRowDisposition()) ?> - - getApplied($_item)): ?> -
    - typeOfDisplay($_item, 1, 'email', $_order->getStore())): ?> - - getApplied($_item) as $tax): ?> - : formatPrice($tax['row_amount'],true,true); ?>
    - -
    - typeOfDisplay($_item, 2, 'email', $_order->getStore())): ?> - getApplied($_item) as $tax): ?> - : formatPrice($tax['row_amount_incl_tax'],true,true); ?>
    - - typeOfDisplay($_item, 4, 'email', $_order->getStore())): ?> - - getApplied($_item) as $tax): ?> - : formatPrice($tax['row_amount_incl_tax'],true,true); ?>
    - -
    - - - typeOfDisplay($_item, 2, 'email', $_order->getStore())): ?> - __('Total incl. tax'); ?>:
    formatPrice($_incl+$_item->getWeeeTaxAppliedRowAmount()); ?>
    - - - - - diff --git a/app/design/frontend/default/blank/template/downloadable/email/order/items/invoice/downloadable.phtml b/app/design/frontend/default/blank/template/downloadable/email/order/items/invoice/downloadable.phtml deleted file mode 100644 index 259119fe80..0000000000 --- a/app/design/frontend/default/blank/template/downloadable/email/order/items/invoice/downloadable.phtml +++ /dev/null @@ -1,131 +0,0 @@ - -getItem() ?> -getItem()->getOrder(); ?> - - - htmlEscape($_item->getName()) ?> - getItemOptions()): ?> -
    - getItemOptions() as $option): ?> -
    -
    - -
    - - getLinks()->getPurchasedItems()): ?> -
    -
    getLinksTitle() ?>
    - -
    - getLinkTitle() ?>  - (__('download') ?>) -
    - -
    - - getDescription() ?> - - getSku($_item) ?> - getQty()*1 ?> - - helper('tax')->displayCartPriceExclTax($_order->getStore()) || $this->helper('tax')->displayCartBothPrices($_order->getStore())): ?> - helper('tax')->displayCartBothPrices($_order->getStore())): ?> - __('Excl. Tax'); ?>: - - typeOfDisplay($_item, array(0, 1, 4), 'email', $_order->getStore())): ?> - formatPrice($_item->getRowTotal()+$_item->getWeeeTaxAppliedRowAmount()+$_item->getWeeeTaxRowDisposition()); ?> - - formatPrice($_item->getRowTotal()) ?> - - - - getApplied($_item)): ?> -
    - typeOfDisplay($_item, 1, 'email', $_order->getStore())): ?> - - getApplied($_item) as $tax): ?> - : formatPrice($tax['row_amount'],true,true); ?>
    - -
    - typeOfDisplay($_item, 2, 'email', $_order->getStore())): ?> - getApplied($_item) as $tax): ?> - : formatPrice($tax['row_amount_incl_tax'],true,true); ?>
    - - typeOfDisplay($_item, 4, 'email', $_order->getStore())): ?> - - getApplied($_item) as $tax): ?> - : formatPrice($tax['row_amount_incl_tax'],true,true); ?>
    - -
    - - - typeOfDisplay($_item, 2, 'email', $_order->getStore())): ?> -
    - __('Total'); ?>:
    formatPrice($_item->getCalculationPrice()+$_item->getWeeeTaxAppliedRowAmount()+$_item->getWeeeTaxRowDisposition()); ?>
    - - - - - - helper('tax')->displayCartPriceInclTax($_order->getStore()) || $this->helper('tax')->displayCartBothPrices($_order->getStore())): ?> - helper('tax')->displayCartBothPrices($_order->getStore())): ?> -
    __('Incl. Tax'); ?>: - - helper('checkout')->getSubtotalInclTax($_item); ?> - typeOfDisplay($_item, array(0, 1, 4), 'email', $_order->getStore())): ?> - formatPrice($_incl+$_item->getWeeeTaxAppliedRowAmount()); ?> - - formatPrice($_incl-$_item->getWeeeTaxRowDisposition()) ?> - - getApplied($_item)): ?> -
    - typeOfDisplay($_item, 1, 'email', $_order->getStore())): ?> - - getApplied($_item) as $tax): ?> - : formatPrice($tax['row_amount'],true,true); ?>
    - -
    - typeOfDisplay($_item, 2, 'email', $_order->getStore())): ?> - getApplied($_item) as $tax): ?> - : formatPrice($tax['row_amount_incl_tax'],true,true); ?>
    - - typeOfDisplay($_item, 4, 'email', $_order->getStore())): ?> - - getApplied($_item) as $tax): ?> - : formatPrice($tax['row_amount_incl_tax'],true,true); ?>
    - -
    - - - typeOfDisplay($_item, 2, 'email', $_order->getStore())): ?> - __('Total incl. tax'); ?>:
    formatPrice($_incl+$_item->getWeeeTaxAppliedRowAmount()); ?>
    - - - - - diff --git a/app/design/frontend/default/blank/template/downloadable/email/order/items/order/downloadable.phtml b/app/design/frontend/default/blank/template/downloadable/email/order/items/order/downloadable.phtml deleted file mode 100644 index 2ea49a4fef..0000000000 --- a/app/design/frontend/default/blank/template/downloadable/email/order/items/order/downloadable.phtml +++ /dev/null @@ -1,137 +0,0 @@ - -getItem() ?> -getItem()->getOrder() ?> - - - htmlEscape($_item->getName()) ?> - getItemOptions()): ?> -
    - getItemOptions() as $option): ?> -
    -
    - -
    - - getLinks()->getPurchasedItems()): ?> -
    -
    getLinksTitle() ?>
    - -
    - getLinkTitle() ?>  - (__('download') ?>) -
    - -
    - - getDescription() ?> - getGiftMessageId() && $_giftMessage = $this->helper('giftmessage/message')->getGiftMessage($_item->getGiftMessageId())): ?> -
    __('Gift Message') ?> -
    __('From:'); ?> htmlEscape($_giftMessage->getSender()) ?> -
    __('To:'); ?> htmlEscape($_giftMessage->getRecipient()) ?> -
    __('Message:'); ?>
    htmlEscape($_giftMessage->getMessage()) ?> - - - getSku($_item) ?> - getQtyOrdered()*1 ?> - - helper('tax')->displayCartPriceExclTax($_order->getStore()) || $this->helper('tax')->displayCartBothPrices($_order->getStore())): ?> - helper('tax')->displayCartBothPrices($_order->getStore())): ?> - __('Excl. Tax'); ?>: - - typeOfDisplay($_item, array(0, 1, 4), 'email', $_order->getStore())): ?> - formatPrice($_item->getRowTotal()+$_item->getWeeeTaxAppliedRowAmount()+$_item->getWeeeTaxRowDisposition()); ?> - - formatPrice($_item->getRowTotal()) ?> - - - - getApplied($_item)): ?> -
    - typeOfDisplay($_item, 1, 'email', $_order->getStore())): ?> - - getApplied($_item) as $tax): ?> - : formatPrice($tax['row_amount'],true,true); ?>
    - -
    - typeOfDisplay($_item, 2, 'email', $_order->getStore())): ?> - getApplied($_item) as $tax): ?> - : formatPrice($tax['row_amount_incl_tax'],true,true); ?>
    - - typeOfDisplay($_item, 4, 'email', $_order->getStore())): ?> - - getApplied($_item) as $tax): ?> - : formatPrice($tax['row_amount_incl_tax'],true,true); ?>
    - -
    - - - typeOfDisplay($_item, 2, 'email', $_order->getStore())): ?> -
    - __('Total'); ?>:
    formatPrice($_item->getCalculationPrice()+$_item->getWeeeTaxAppliedRowAmount()+$_item->getWeeeTaxRowDisposition()); ?>
    - - - - - - helper('tax')->displayCartPriceInclTax($_order->getStore()) || $this->helper('tax')->displayCartBothPrices($_order->getStore())): ?> - helper('tax')->displayCartBothPrices($_order->getStore())): ?> -
    __('Incl. Tax'); ?>: - - helper('checkout')->getSubtotalInclTax($_item); ?> - typeOfDisplay($_item, array(0, 1, 4), 'email', $_order->getStore())): ?> - formatPrice($_incl+$_item->getWeeeTaxAppliedRowAmount()); ?> - - formatPrice($_incl-$_item->getWeeeTaxRowDisposition()) ?> - - getApplied($_item)): ?> -
    - typeOfDisplay($_item, 1, 'email', $_order->getStore())): ?> - - getApplied($_item) as $tax): ?> - : formatPrice($tax['row_amount'],true,true); ?>
    - -
    - typeOfDisplay($_item, 2, 'email', $_order->getStore())): ?> - getApplied($_item) as $tax): ?> - : formatPrice($tax['row_amount_incl_tax'],true,true); ?>
    - - typeOfDisplay($_item, 4, 'email', $_order->getStore())): ?> - - getApplied($_item) as $tax): ?> - : formatPrice($tax['row_amount_incl_tax'],true,true); ?>
    - -
    - - - typeOfDisplay($_item, 2, 'email', $_order->getStore())): ?> - __('Total incl. tax'); ?>:
    formatPrice($_incl+$_item->getWeeeTaxAppliedRowAmount()); ?>
    - - - - - diff --git a/app/design/frontend/default/blank/template/downloadable/sales/order/creditmemo/items/renderer/downloadable.phtml b/app/design/frontend/default/blank/template/downloadable/sales/order/creditmemo/items/renderer/downloadable.phtml deleted file mode 100644 index 646fc0bbf4..0000000000 --- a/app/design/frontend/default/blank/template/downloadable/sales/order/creditmemo/items/renderer/downloadable.phtml +++ /dev/null @@ -1,112 +0,0 @@ - -getItem() ?> -getItem()->getOrderItem()->getOrder() ?> - -
    htmlEscape($_item->getName()) ?>
    - getItemOptions()): ?> -
    - -
    htmlEscape($_option['label']) ?>
    - getPrintStatus()): ?> - getFormatedOptionValue($_option) ?> - class="truncated"> - -
    -
    -
    htmlEscape($_option['label']) ?>
    -
    -
    -
    - - - -
    htmlEscape( (isset($_option['print_value']) ? $_option['print_value'] : $_option['value']) ) ?>
    - - -
    - - - - getLinks()): ?> -
    -
    getLinksTitle() ?>
    - getPurchasedItems() as $link): ?> -
    getLinkTitle() ?>
    - -
    - - - - getDescription() ?> - helper('giftmessage/message')->getIsMessagesAvailable('order_item', $_item->getOrderItem()) && $_item->getGiftMessageId()): ?> -
    __('Gift Message') ?> - - - splitInjection($this->getSku()) ?> - - helper('tax')->displayCartBothPrices() || $this->helper('tax')->displayCartPriceExclTax()): ?> - - helper('tax')->displayCartBothPrices()): ?> - __('Excl. Tax'); ?>: - - formatPrice($_item->getPrice()) ?> - - - helper('tax')->displayCartBothPrices() || $this->helper('tax')->displayCartPriceInclTax()): ?> - - helper('tax')->displayCartBothPrices()): ?> - __('Incl. Tax'); ?>: - - formatPrice($this->helper('checkout')->getPriceInclTax($_item)); ?> - - - - getQty()*1 ?> - - helper('tax')->displayCartBothPrices() || $this->helper('tax')->displayCartPriceExclTax()): ?> - - helper('tax')->displayCartBothPrices()): ?> - __('Excl. Tax'); ?>: - - formatPrice($_item->getRowTotal()) ?> - - - helper('tax')->displayCartBothPrices() || $this->helper('tax')->displayCartPriceInclTax()): ?> - - helper('tax')->displayCartBothPrices()): ?> - __('Incl. Tax'); ?>: - - formatPrice($this->helper('checkout')->getSubtotalInclTax($_item)); ?> - - - - formatPrice(-$_item->getDiscountAmount()) ?> - - formatPrice($_item->getRowTotal()-$_item->getDiscountAmount()+$_item->getTaxAmount()) ?> - - diff --git a/app/design/frontend/default/blank/template/downloadable/sales/order/invoice/items/renderer/downloadable.phtml b/app/design/frontend/default/blank/template/downloadable/sales/order/invoice/items/renderer/downloadable.phtml deleted file mode 100644 index 97c2032469..0000000000 --- a/app/design/frontend/default/blank/template/downloadable/sales/order/invoice/items/renderer/downloadable.phtml +++ /dev/null @@ -1,109 +0,0 @@ - -getItem() ?> -getItem()->getOrderItem()->getOrder() ?> - -
    htmlEscape($_item->getName()) ?>
    - getItemOptions()): ?> -
    - -
    htmlEscape($_option['label']) ?>
    - getPrintStatus()): ?> - getFormatedOptionValue($_option) ?> - class="truncated"> - - -
    -
    -
    htmlEscape($_option['label']) ?>
    -
    -
    -
    - - - -
    htmlEscape( (isset($_option['print_value']) ? $_option['print_value'] : $_option['value']) ) ?>
    - - -
    - - - - getLinks()): ?> -
    -
    getLinksTitle() ?>
    - getPurchasedItems() as $link): ?> -
    getLinkTitle() ?>
    - -
    - - - - getDescription() ?> - helper('giftmessage/message')->getIsMessagesAvailable('order_item', $_item->getOrderItem()) && $_item->getGiftMessageId()): ?> -
    __('Gift Message') ?> - - - splitInjection($this->getSku()) ?> - - helper('tax')->displayCartBothPrices() || $this->helper('tax')->displayCartPriceExclTax()): ?> - - helper('tax')->displayCartBothPrices()): ?> - __('Excl. Tax'); ?>: - - formatPrice($_item->getPrice()) ?> - - - helper('tax')->displayCartBothPrices() || $this->helper('tax')->displayCartPriceInclTax()): ?> - - helper('tax')->displayCartBothPrices()): ?> - __('Incl. Tax'); ?>: - - formatPrice($this->helper('checkout')->getPriceInclTax($_item)); ?> - - - - getQty()*1 ?> - - helper('tax')->displayCartBothPrices() || $this->helper('tax')->displayCartPriceExclTax()): ?> - - helper('tax')->displayCartBothPrices()): ?> - __('Excl. Tax'); ?>: - - formatPrice($_item->getRowTotal()) ?> - - - helper('tax')->displayCartBothPrices() || $this->helper('tax')->displayCartPriceInclTax()): ?> - - helper('tax')->displayCartBothPrices()): ?> - __('Incl. Tax'); ?>: - - formatPrice($this->helper('checkout')->getSubtotalInclTax($_item)); ?> - - - - diff --git a/app/design/frontend/default/blank/template/downloadable/sales/order/items/renderer/downloadable.phtml b/app/design/frontend/default/blank/template/downloadable/sales/order/items/renderer/downloadable.phtml deleted file mode 100644 index 6436771809..0000000000 --- a/app/design/frontend/default/blank/template/downloadable/sales/order/items/renderer/downloadable.phtml +++ /dev/null @@ -1,131 +0,0 @@ - -getItem() ?> - -

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

    - getItemOptions()): ?> -
    - -
    htmlEscape($_option['label']) ?>
    - getPrintStatus()): ?> - getFormatedOptionValue($_option) ?> - class="truncated"> - - -
    -
    -
    htmlEscape($_option['label']) ?>
    -
    -
    -
    - - - -
    htmlEscape( (isset($_option['print_value']) ? $_option['print_value'] : $_option['value']) ) ?>
    - - -
    - - - - getLinks()): ?> -
    -
    getLinksTitle() ?>
    - getPurchasedItems() as $link): ?> -
    getLinkTitle() ?>
    - -
    - - - - getDescription() ?> - helper('giftmessage/message')->getIsMessagesAvailable('order_item', $_item) && $_item->getGiftMessageId()): ?> -
    __('Gift Message') ?> - - - splitInjection($this->getSku()) ?> - - helper('tax')->displayCartBothPrices() || $this->helper('tax')->displayCartPriceExclTax()): ?> - - helper('tax')->displayCartBothPrices()): ?> - __('Excl. Tax'); ?>: - - getOrder()->formatPrice($this->getItem()->getPrice()) ?> - - - helper('tax')->displayCartBothPrices() || $this->helper('tax')->displayCartPriceInclTax()): ?> - - helper('tax')->displayCartBothPrices()): ?> - __('Incl. Tax'); ?>: - - getOrder()->formatPrice($this->helper('checkout')->getPriceInclTax($this->getItem())); ?> - - - - - - getItem()->getQtyOrdered() > 0): ?> - __('Ordered'); ?>: getItem()->getQtyOrdered()*1 ?>
    - - getItem()->getQtyShipped() > 0): ?> - __('Shipped'); ?>: getItem()->getQtyShipped()*1 ?>
    - - getItem()->getQtyCanceled() > 0): ?> - __('Canceled'); ?>: getItem()->getQtyCanceled()*1 ?>
    - - getItem()->getQtyRefunded() > 0): ?> - __('Refunded'); ?>: getItem()->getQtyRefunded()*1 ?>
    - -
    - - - helper('tax')->displayCartBothPrices() || $this->helper('tax')->displayCartPriceExclTax()): ?> - - helper('tax')->displayCartBothPrices()): ?> - __('Excl. Tax'); ?>: - - getOrder()->formatPrice($this->getItem()->getRowTotal()) ?> - - - helper('tax')->displayCartBothPrices() || $this->helper('tax')->displayCartPriceInclTax()): ?> - - helper('tax')->displayCartBothPrices()): ?> - __('Incl. Tax'); ?>: - - getOrder()->formatPrice($this->helper('checkout')->getSubtotalInclTax($this->getItem())); ?> - - - - - diff --git a/app/design/frontend/default/blank/template/email/order/creditmemo/items.phtml b/app/design/frontend/default/blank/template/email/order/creditmemo/items.phtml deleted file mode 100644 index 96b7640d8f..0000000000 --- a/app/design/frontend/default/blank/template/email/order/creditmemo/items.phtml +++ /dev/null @@ -1,51 +0,0 @@ - -getCreditmemo() ?> -getOrder() ?> - - - - - - - - - - - - getAllItems() as $_item): ?> - getOrderItem()->getParentItem()) continue; else $i++; ?> - > - getItemHtml($_item) ?> - - - - - getChildHtml('creditmemo_totals');?> - -
    __('Item') ?>__('Sku') ?>__('Qty') ?>__('Subtotal') ?>
    - diff --git a/app/design/frontend/default/blank/template/email/order/invoice/items.phtml b/app/design/frontend/default/blank/template/email/order/invoice/items.phtml deleted file mode 100644 index f6c0ab22fe..0000000000 --- a/app/design/frontend/default/blank/template/email/order/invoice/items.phtml +++ /dev/null @@ -1,51 +0,0 @@ - -getInvoice() ?> -getOrder() ?> - - - - - - - - - - - - getAllItems() as $_item): ?> - getOrderItem()->getParentItem()) continue; else $i++; ?> - > - getItemHtml($_item) ?> - - - - - getChildHtml('invoice_totals')?> - -
    __('Item') ?>__('Sku') ?>__('Qty') ?>__('Subtotal') ?>
    - diff --git a/app/design/frontend/default/blank/template/email/order/items.phtml b/app/design/frontend/default/blank/template/email/order/items.phtml deleted file mode 100644 index 72116d490e..0000000000 --- a/app/design/frontend/default/blank/template/email/order/items.phtml +++ /dev/null @@ -1,59 +0,0 @@ - -getOrder() ?> - - - - - - - - - - - getAllItems() as $_item): ?> - getParentItem()) continue; else $i++; ?> - > - getItemHtml($_item) ?> - - - - - getGiftMessageId() && $_giftMessage = $this->helper('giftmessage/message')->getGiftMessage($_order->getGiftMessageId())): ?> - - - - - getChildHtml('order_totals') ?> - - -
    __('Item') ?>__('Sku') ?>__('Qty') ?>__('Subtotal') ?>
    - __('Gift Message') ?> -
    __('From:'); ?> htmlEscape($_giftMessage->getSender()) ?> -
    __('To:'); ?> htmlEscape($_giftMessage->getRecipient()) ?> -
    __('Message:'); ?>
    htmlEscape($_giftMessage->getMessage()) ?> -
    diff --git a/app/design/frontend/default/blank/template/email/order/items/creditmemo/default.phtml b/app/design/frontend/default/blank/template/email/order/items/creditmemo/default.phtml deleted file mode 100644 index 4c24ba4384..0000000000 --- a/app/design/frontend/default/blank/template/email/order/items/creditmemo/default.phtml +++ /dev/null @@ -1,120 +0,0 @@ - -getItem() ?> -getItem()->getOrder(); ?> - - - htmlEscape($_item->getName()) ?> - getItemOptions()): ?> -
    - getItemOptions() as $option): ?> -
    -
    - -
    - - getDescription() ?> - - getSku($_item) ?> - getQty()*1 ?> - - helper('tax')->displaySalesPriceExclTax($_order->getStore()) || $this->helper('tax')->displaySalesBothPrices($_order->getStore())): ?> - helper('tax')->displaySalesBothPrices($_order->getStore())): ?> - __('Excl. Tax'); ?>: - - typeOfDisplay($_item, array(0, 1, 4), 'email', $_order->getStore())): ?> - formatPrice($_item->getRowTotal()+$_item->getWeeeTaxAppliedRowAmount()+$_item->getWeeeTaxRowDisposition()); ?> - - formatPrice($_item->getRowTotal()) ?> - - - - getApplied($_item)): ?> -
    - typeOfDisplay($_item, 1, 'email', $_order->getStore())): ?> - - getApplied($_item) as $tax): ?> - : formatPrice($tax['row_amount'],true,true); ?>
    - -
    - typeOfDisplay($_item, 2, 'email', $_order->getStore())): ?> - getApplied($_item) as $tax): ?> - : formatPrice($tax['row_amount_incl_tax'],true,true); ?>
    - - typeOfDisplay($_item, 4, 'email', $_order->getStore())): ?> - - getApplied($_item) as $tax): ?> - : formatPrice($tax['row_amount_incl_tax'],true,true); ?>
    - -
    - - - typeOfDisplay($_item, 2, 'email', $_order->getStore())): ?> -
    - __('Total'); ?>:
    formatPrice($_item->getCalculationPrice()+$_item->getWeeeTaxAppliedRowAmount()+$_item->getWeeeTaxRowDisposition()); ?>
    - - - - - - helper('tax')->displaySalesPriceInclTax($_order->getStore()) || $this->helper('tax')->displaySalesBothPrices($_order->getStore())): ?> - helper('tax')->displaySalesBothPrices($_order->getStore())): ?> -
    __('Incl. Tax'); ?>: - - helper('checkout')->getSubtotalInclTax($_item); ?> - typeOfDisplay($_item, array(0, 1, 4), 'email', $_order->getStore())): ?> - formatPrice($_incl+$_item->getWeeeTaxAppliedRowAmount()); ?> - - formatPrice($_incl-$_item->getWeeeTaxRowDisposition()) ?> - - getApplied($_item)): ?> -
    - typeOfDisplay($_item, 1, 'email', $_order->getStore())): ?> - - getApplied($_item) as $tax): ?> - : formatPrice($tax['row_amount'],true,true); ?>
    - -
    - typeOfDisplay($_item, 2, 'email', $_order->getStore())): ?> - getApplied($_item) as $tax): ?> - : formatPrice($tax['row_amount_incl_tax'],true,true); ?>
    - - typeOfDisplay($_item, 4, 'email', $_order->getStore())): ?> - - getApplied($_item) as $tax): ?> - : formatPrice($tax['row_amount_incl_tax'],true,true); ?>
    - -
    - - - typeOfDisplay($_item, 2, 'email', $_order->getStore())): ?> - __('Total incl. tax'); ?>:
    formatPrice($_incl+$_item->getWeeeTaxAppliedRowAmount()); ?>
    - - - - - diff --git a/app/design/frontend/default/blank/template/email/order/items/invoice/default.phtml b/app/design/frontend/default/blank/template/email/order/items/invoice/default.phtml deleted file mode 100644 index 4c24ba4384..0000000000 --- a/app/design/frontend/default/blank/template/email/order/items/invoice/default.phtml +++ /dev/null @@ -1,120 +0,0 @@ - -getItem() ?> -getItem()->getOrder(); ?> - - - htmlEscape($_item->getName()) ?> - getItemOptions()): ?> -
    - getItemOptions() as $option): ?> -
    -
    - -
    - - getDescription() ?> - - getSku($_item) ?> - getQty()*1 ?> - - helper('tax')->displaySalesPriceExclTax($_order->getStore()) || $this->helper('tax')->displaySalesBothPrices($_order->getStore())): ?> - helper('tax')->displaySalesBothPrices($_order->getStore())): ?> - __('Excl. Tax'); ?>: - - typeOfDisplay($_item, array(0, 1, 4), 'email', $_order->getStore())): ?> - formatPrice($_item->getRowTotal()+$_item->getWeeeTaxAppliedRowAmount()+$_item->getWeeeTaxRowDisposition()); ?> - - formatPrice($_item->getRowTotal()) ?> - - - - getApplied($_item)): ?> -
    - typeOfDisplay($_item, 1, 'email', $_order->getStore())): ?> - - getApplied($_item) as $tax): ?> - : formatPrice($tax['row_amount'],true,true); ?>
    - -
    - typeOfDisplay($_item, 2, 'email', $_order->getStore())): ?> - getApplied($_item) as $tax): ?> - : formatPrice($tax['row_amount_incl_tax'],true,true); ?>
    - - typeOfDisplay($_item, 4, 'email', $_order->getStore())): ?> - - getApplied($_item) as $tax): ?> - : formatPrice($tax['row_amount_incl_tax'],true,true); ?>
    - -
    - - - typeOfDisplay($_item, 2, 'email', $_order->getStore())): ?> -
    - __('Total'); ?>:
    formatPrice($_item->getCalculationPrice()+$_item->getWeeeTaxAppliedRowAmount()+$_item->getWeeeTaxRowDisposition()); ?>
    - - - - - - helper('tax')->displaySalesPriceInclTax($_order->getStore()) || $this->helper('tax')->displaySalesBothPrices($_order->getStore())): ?> - helper('tax')->displaySalesBothPrices($_order->getStore())): ?> -
    __('Incl. Tax'); ?>: - - helper('checkout')->getSubtotalInclTax($_item); ?> - typeOfDisplay($_item, array(0, 1, 4), 'email', $_order->getStore())): ?> - formatPrice($_incl+$_item->getWeeeTaxAppliedRowAmount()); ?> - - formatPrice($_incl-$_item->getWeeeTaxRowDisposition()) ?> - - getApplied($_item)): ?> -
    - typeOfDisplay($_item, 1, 'email', $_order->getStore())): ?> - - getApplied($_item) as $tax): ?> - : formatPrice($tax['row_amount'],true,true); ?>
    - -
    - typeOfDisplay($_item, 2, 'email', $_order->getStore())): ?> - getApplied($_item) as $tax): ?> - : formatPrice($tax['row_amount_incl_tax'],true,true); ?>
    - - typeOfDisplay($_item, 4, 'email', $_order->getStore())): ?> - - getApplied($_item) as $tax): ?> - : formatPrice($tax['row_amount_incl_tax'],true,true); ?>
    - -
    - - - typeOfDisplay($_item, 2, 'email', $_order->getStore())): ?> - __('Total incl. tax'); ?>:
    formatPrice($_incl+$_item->getWeeeTaxAppliedRowAmount()); ?>
    - - - - - diff --git a/app/design/frontend/default/blank/template/email/order/items/order/default.phtml b/app/design/frontend/default/blank/template/email/order/items/order/default.phtml deleted file mode 100644 index fbb8bf4bb2..0000000000 --- a/app/design/frontend/default/blank/template/email/order/items/order/default.phtml +++ /dev/null @@ -1,126 +0,0 @@ - -getItem() ?> -getItem()->getOrder() ?> - - - htmlEscape($_item->getName()) ?> - getItemOptions()): ?> -
    - getItemOptions() as $option): ?> -
    -
    - -
    - - getDescription() ?> - getGiftMessageId() && $_giftMessage = $this->helper('giftmessage/message')->getGiftMessage($_item->getGiftMessageId())): ?> -
    __('Gift Message') ?> -
    __('From:'); ?> htmlEscape($_giftMessage->getSender()) ?> -
    __('To:'); ?> htmlEscape($_giftMessage->getRecipient()) ?> -
    __('Message:'); ?>
    htmlEscape($_giftMessage->getMessage()) ?> - - - getSku($_item) ?> - getQtyOrdered()*1 ?> - - helper('tax')->displaySalesPriceExclTax($_order->getStore()) || $this->helper('tax')->displaySalesBothPrices($_order->getStore())): ?> - helper('tax')->displaySalesBothPrices($_order->getStore())): ?> - __('Excl. Tax'); ?>: - - typeOfDisplay($_item, array(0, 1, 4), 'email', $_order->getStore())): ?> - formatPrice($_item->getRowTotal()+$_item->getWeeeTaxAppliedRowAmount()+$_item->getWeeeTaxRowDisposition()); ?> - - formatPrice($_item->getRowTotal()) ?> - - - - getApplied($_item)): ?> -
    - typeOfDisplay($_item, 1, 'email', $_order->getStore())): ?> - - getApplied($_item) as $tax): ?> - : formatPrice($tax['row_amount'],true,true); ?>
    - -
    - typeOfDisplay($_item, 2, 'email', $_order->getStore())): ?> - getApplied($_item) as $tax): ?> - : formatPrice($tax['row_amount_incl_tax'],true,true); ?>
    - - typeOfDisplay($_item, 4, 'email', $_order->getStore())): ?> - - getApplied($_item) as $tax): ?> - : formatPrice($tax['row_amount_incl_tax'],true,true); ?>
    - -
    - - - typeOfDisplay($_item, 2, 'email', $_order->getStore())): ?> -
    - __('Total'); ?>:
    formatPrice($_item->getCalculationPrice()+$_item->getWeeeTaxAppliedRowAmount()+$_item->getWeeeTaxRowDisposition()); ?>
    - - - - - - helper('tax')->displaySalesPriceInclTax($_order->getStore()) || $this->helper('tax')->displaySalesBothPrices($_order->getStore())): ?> - helper('tax')->displaySalesBothPrices($_order->getStore())): ?> -
    __('Incl. Tax'); ?>: - - helper('checkout')->getSubtotalInclTax($_item); ?> - typeOfDisplay($_item, array(0, 1, 4), 'email', $_order->getStore())): ?> - formatPrice($_incl+$_item->getWeeeTaxAppliedRowAmount()); ?> - - formatPrice($_incl-$_item->getWeeeTaxRowDisposition()) ?> - - getApplied($_item)): ?> -
    - typeOfDisplay($_item, 1, 'email', $_order->getStore())): ?> - - getApplied($_item) as $tax): ?> - : formatPrice($tax['row_amount'],true,true); ?>
    - -
    - typeOfDisplay($_item, 2, 'email', $_order->getStore())): ?> - getApplied($_item) as $tax): ?> - : formatPrice($tax['row_amount_incl_tax'],true,true); ?>
    - - typeOfDisplay($_item, 4, 'email', $_order->getStore())): ?> - - getApplied($_item) as $tax): ?> - : formatPrice($tax['row_amount_incl_tax'],true,true); ?>
    - -
    - - - typeOfDisplay($_item, 2, 'email', $_order->getStore())): ?> - __('Total incl. tax'); ?>:
    formatPrice($_incl+$_item->getWeeeTaxAppliedRowAmount()); ?>
    - - - - - diff --git a/app/design/frontend/default/blank/template/email/order/items/shipment/default.phtml b/app/design/frontend/default/blank/template/email/order/items/shipment/default.phtml deleted file mode 100644 index 03d42d3316..0000000000 --- a/app/design/frontend/default/blank/template/email/order/items/shipment/default.phtml +++ /dev/null @@ -1,43 +0,0 @@ - -getItem() ?> - - - htmlEscape($_item->getName()) ?> - getItemOptions()): ?> -
    - getItemOptions() as $option): ?> -
    -
    - -
    - - getDescription() ?> - - getSku($_item) ?> - getQty()*1 ?> - diff --git a/app/design/frontend/default/blank/template/email/order/shipment/items.phtml b/app/design/frontend/default/blank/template/email/order/shipment/items.phtml deleted file mode 100644 index 74c4f9b423..0000000000 --- a/app/design/frontend/default/blank/template/email/order/shipment/items.phtml +++ /dev/null @@ -1,47 +0,0 @@ - -getShipment() ?> -getOrder() ?> - - - - - - - - - - - getAllItems() as $_item): ?> - getOrderItem()->getParentItem()) continue; else $i++; ?> - > - getItemHtml($_item) ?> - - - -
    __('Item') ?>__('Sku') ?>__('Qty') ?>
    - diff --git a/app/design/frontend/default/blank/template/email/order/shipment/track.phtml b/app/design/frontend/default/blank/template/email/order/shipment/track.phtml deleted file mode 100644 index 047f9317b2..0000000000 --- a/app/design/frontend/default/blank/template/email/order/shipment/track.phtml +++ /dev/null @@ -1,46 +0,0 @@ - -getShipment() ?> -getOrder() ?> -getAllTracks()): ?> - - - - - - - - - getAllTracks() as $_item): $i++ ?> - > - - - - - -
    __('Shipped By') ?>__('Tracking Number') ?>
    getTitle() ?>getNumber() ?>
    - diff --git a/app/design/frontend/default/blank/template/email/productalert/price.phtml b/app/design/frontend/default/blank/template/email/productalert/price.phtml deleted file mode 100644 index 3cf9757efc..0000000000 --- a/app/design/frontend/default/blank/template/email/productalert/price.phtml +++ /dev/null @@ -1,50 +0,0 @@ - -getProducts()): ?> -

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

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

    - -

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

    -

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

    -
    -

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

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

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

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

    - -

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

    -

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

    -
    -

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

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

    __('Error occured') ?>

    -
    -

    getErrorMessage() ?>.

    -

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

    diff --git a/app/design/frontend/default/blank/template/eway/secure/form.phtml b/app/design/frontend/default/blank/template/eway/secure/form.phtml deleted file mode 100644 index 705195baaa..0000000000 --- a/app/design/frontend/default/blank/template/eway/secure/form.phtml +++ /dev/null @@ -1,30 +0,0 @@ - -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 deleted file mode 100644 index 58fbdff54f..0000000000 --- a/app/design/frontend/default/blank/template/eway/shared/failure.phtml +++ /dev/null @@ -1,31 +0,0 @@ - -
    -

    __('Error occured') ?>

    -
    -

    getErrorMessage() ?>.

    -

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

    diff --git a/app/design/frontend/default/blank/template/eway/shared/form.phtml b/app/design/frontend/default/blank/template/eway/shared/form.phtml deleted file mode 100644 index cfad046fad..0000000000 --- a/app/design/frontend/default/blank/template/eway/shared/form.phtml +++ /dev/null @@ -1,30 +0,0 @@ - -getMethodCode() ?> - diff --git a/app/design/frontend/default/blank/template/flo2cash/form.phtml b/app/design/frontend/default/blank/template/flo2cash/form.phtml deleted file mode 100644 index ec7dce103f..0000000000 --- a/app/design/frontend/default/blank/template/flo2cash/form.phtml +++ /dev/null @@ -1,90 +0,0 @@ - - -getMethodCode() ?> - diff --git a/app/design/frontend/default/blank/template/flo2cash/info.phtml b/app/design/frontend/default/blank/template/flo2cash/info.phtml deleted file mode 100644 index 102896662a..0000000000 --- a/app/design/frontend/default/blank/template/flo2cash/info.phtml +++ /dev/null @@ -1,34 +0,0 @@ - -getInfo()): ?> -getMethod()->getTitle() ?>
    - __('Name on the Card: %s', $this->htmlEscape($this->getInfo()->getCcOwner())) ?>
    - __('Credit Card Type: %s', $this->htmlEscape($this->getCcTypeName())) ?>
    - __('Credit Card Number: xxxx-%s', $this->htmlEscape($this->getInfo()->getCcLast4())) ?> - - - diff --git a/app/design/frontend/default/blank/template/giftmessage/form.phtml b/app/design/frontend/default/blank/template/giftmessage/form.phtml deleted file mode 100644 index dd33e28ab9..0000000000 --- a/app/design/frontend/default/blank/template/giftmessage/form.phtml +++ /dev/null @@ -1,85 +0,0 @@ - - -getSaveMode()): ?> -
    -

    __('Gift Message') ?>

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

    __('* Required Fields') ?>

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

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

    -

    - -

    - -

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

    -

    - -

    - - diff --git a/app/design/frontend/default/blank/template/giftmessage/helper.phtml b/app/design/frontend/default/blank/template/giftmessage/helper.phtml deleted file mode 100644 index 5a242cb668..0000000000 --- a/app/design/frontend/default/blank/template/giftmessage/helper.phtml +++ /dev/null @@ -1,80 +0,0 @@ - -getScriptIncluded() && $this->getCanDisplayContainer()): ?> - -setScriptIncluded(true); ?> - -getCanDisplayContainer()): ?> -
    - -getType()): ?> - - - - - - hasGiftMessage()): ?> - __('Edit Gift Message') ?> - - __('Add Gift Message') ?> - - - - - - hasGiftMessage()): ?> - __('Edit Gift Message') ?> - - __('Add Gift Message') ?> - - - - - - - -getCanDisplayContainer()): ?> -
    - - diff --git a/app/design/frontend/default/blank/template/giftmessage/inline.phtml b/app/design/frontend/default/blank/template/giftmessage/inline.phtml deleted file mode 100644 index c84188276d..0000000000 --- a/app/design/frontend/default/blank/template/giftmessage/inline.phtml +++ /dev/null @@ -1,275 +0,0 @@ - -getDontDisplayContainer()): ?> - - -getType()): ?> - -
    -

    __('Do you have any gift items in your order?'); ?>

    -

    - getItemsHasMesssages() || $this->getEntityHasMessage()): ?> checked="checked" class="checkbox" /> - -

    -
    -
    -
    - isMessagesAvailable('quote', $this->getEntity())): ?> -

    __('Enter a gift message for entire order.'); ?>

    -

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

    -
    - -
      -
    • -
      -
      - -
      -
      -
      - -
      -
    • -
    • -
      - -
    • -
    - -
    - - isItemsAvailable()): ?> -

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

    -

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

    -
      - getItems() as $_index=>$_item): ?> - getProduct() ?> -
    1. -

      __('Item %d of %d', $_index+1, $this->countItems()) ?>

      -
      -

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

      -
      htmlEscape($_product->getName()) ?>
      -
      -
      - -
        -
      • -
        -
        - -
        -
        -
        - -
        -
      • -
      • - -
        - -
      • -
      - -
      -
    2. - -
    - -
    -
    - - - - - - -
    -

    __('Gift Messages'); ?>

    -

    - getItemsHasMesssages() || $this->getEntityHasMessage()): ?> checked="checked" class="checkbox" /> - -

    -
    -
    -
    - isMessagesAvailable('quote', $this->getEntity())): ?> -
    __('Enter a gift message for this address.'); ?>
    -

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

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

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

    -
      - getItems() as $_index=>$_item): ?> - getProduct() ?> -
    1. -

      __('Item %d of %d', $_index+1, $this->countItems()) ?>

      -
      -

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

      -
      htmlEscape($_product->getName()) ?>
      -
      -
      - - -
        -
      • -
        -
        - -
        -
        -
        - -
        -
      • -
      • -
        - -
      • -
      - -
      -
    2. - -
    - -
    -
    - - - diff --git a/app/design/frontend/default/blank/template/googlecheckout/form.phtml b/app/design/frontend/default/blank/template/googlecheckout/form.phtml deleted file mode 100644 index e88309f6b7..0000000000 --- a/app/design/frontend/default/blank/template/googlecheckout/form.phtml +++ /dev/null @@ -1,30 +0,0 @@ - -getMethodCode() ?> - diff --git a/app/design/frontend/default/blank/template/googlecheckout/link.phtml b/app/design/frontend/default/blank/template/googlecheckout/link.phtml deleted file mode 100644 index 1046e6d7b4..0000000000 --- a/app/design/frontend/default/blank/template/googlecheckout/link.phtml +++ /dev/null @@ -1,38 +0,0 @@ - -
  • - getIsDisabled()): ?> - <?php echo Mage::helper('googlecheckout')->__('Fast checkout through Google');?> - -
    getIsActiveAanalytics()):?> onsubmit="setUrchinInputCode(pageTracker)"> -
    - - -
    -
    - -
  • diff --git a/app/design/frontend/default/blank/template/ideal/advanced/failure.phtml b/app/design/frontend/default/blank/template/ideal/advanced/failure.phtml deleted file mode 100644 index 216ba45785..0000000000 --- a/app/design/frontend/default/blank/template/ideal/advanced/failure.phtml +++ /dev/null @@ -1,31 +0,0 @@ - -
    -

    __('Error occured') ?>

    -
    -

    getErrorMessage() ?>

    -

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

    diff --git a/app/design/frontend/default/blank/template/ideal/advanced/form.phtml b/app/design/frontend/default/blank/template/ideal/advanced/form.phtml deleted file mode 100755 index 2552f0984f..0000000000 --- a/app/design/frontend/default/blank/template/ideal/advanced/form.phtml +++ /dev/null @@ -1,42 +0,0 @@ - -getMethodCode() ?> -getIssuerList()):?> - - diff --git a/app/design/frontend/default/blank/template/ideal/advanced/info.phtml b/app/design/frontend/default/blank/template/ideal/advanced/info.phtml deleted file mode 100644 index 081e6c50f1..0000000000 --- a/app/design/frontend/default/blank/template/ideal/advanced/info.phtml +++ /dev/null @@ -1,33 +0,0 @@ - -getInfo()): ?> -getMethod()->getTitle() ?> -
    - __('Issuer'). ': ' . $this->getIssuerTitle() ?> - - - diff --git a/app/design/frontend/default/blank/template/ideal/basic/failure.phtml b/app/design/frontend/default/blank/template/ideal/basic/failure.phtml deleted file mode 100644 index 216ba45785..0000000000 --- a/app/design/frontend/default/blank/template/ideal/basic/failure.phtml +++ /dev/null @@ -1,31 +0,0 @@ - -
    -

    __('Error occured') ?>

    -
    -

    getErrorMessage() ?>

    -

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

    diff --git a/app/design/frontend/default/blank/template/ideal/basic/form.phtml b/app/design/frontend/default/blank/template/ideal/basic/form.phtml deleted file mode 100755 index e1651d552b..0000000000 --- a/app/design/frontend/default/blank/template/ideal/basic/form.phtml +++ /dev/null @@ -1,30 +0,0 @@ - -getMethodCode() ?> - diff --git a/app/design/frontend/default/blank/template/newsletter/subscribe.phtml b/app/design/frontend/default/blank/template/newsletter/subscribe.phtml deleted file mode 100644 index 1eff7d885e..0000000000 --- a/app/design/frontend/default/blank/template/newsletter/subscribe.phtml +++ /dev/null @@ -1,54 +0,0 @@ - -
    -
    -

    __('Newsletter') ?>

    -
    -
    -
    - __('Newsletter') ?> - getErrorMessage() ): ?> -

    - - getSuccessMessage() ): ?> -

    - - */ ?> - -
    - -
    - -
    -
    - -
    diff --git a/app/design/frontend/default/blank/template/ogone/form.phtml b/app/design/frontend/default/blank/template/ogone/form.phtml deleted file mode 100644 index f590d5ab2e..0000000000 --- a/app/design/frontend/default/blank/template/ogone/form.phtml +++ /dev/null @@ -1,35 +0,0 @@ - - -
    - getMethodCode() ?> - -
    diff --git a/app/design/frontend/default/blank/template/ogone/info.phtml b/app/design/frontend/default/blank/template/ogone/info.phtml deleted file mode 100644 index c64505a1f1..0000000000 --- a/app/design/frontend/default/blank/template/ogone/info.phtml +++ /dev/null @@ -1,27 +0,0 @@ - -

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

    diff --git a/app/design/frontend/default/blank/template/ogone/paypage.phtml b/app/design/frontend/default/blank/template/ogone/paypage.phtml deleted file mode 100644 index 3af1778da7..0000000000 --- a/app/design/frontend/default/blank/template/ogone/paypage.phtml +++ /dev/null @@ -1,28 +0,0 @@ - - -$$$PAYMENT ZONE$$$ diff --git a/app/design/frontend/default/blank/template/ogone/placeform.phtml b/app/design/frontend/default/blank/template/ogone/placeform.phtml deleted file mode 100644 index 587da356af..0000000000 --- a/app/design/frontend/default/blank/template/ogone/placeform.phtml +++ /dev/null @@ -1,42 +0,0 @@ - - -__('Please, wait a moment. This page will transfer you data to ogone payment in few seconds.'); ?> -
    -getFormData())): ?> - getFormData() as $name => $value) { ?> - - - -
    - - diff --git a/app/design/frontend/default/blank/template/oscommerce/order/list.phtml b/app/design/frontend/default/blank/template/oscommerce/order/list.phtml deleted file mode 100644 index 216765a209..0000000000 --- a/app/design/frontend/default/blank/template/oscommerce/order/list.phtml +++ /dev/null @@ -1,56 +0,0 @@ - -getOsCommerceOrders(); ?> - -
    -

    __('My Previous Orders') ?>

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

    __('Order') ?> #

    -
    -

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

    - -
    -
    -

    __('Shipping Address') ?>

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

    __('Shipping Method') ?>

    - -
    - -
    - - -
    -
    -

    __('Billing Address') ?>

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

    Payment Method

    - -
    -
    - -

    __('Items Ordered') ?>

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

    __('About Your Order') ?>

    -
    - -
    formatDate($_historyItem['date_added'], 'medium', true) ?> |
    -
    - -
    - - diff --git a/app/design/frontend/default/blank/template/page/1column.phtml b/app/design/frontend/default/blank/template/page/1column.phtml deleted file mode 100644 index e1f58c7bf3..0000000000 --- a/app/design/frontend/default/blank/template/page/1column.phtml +++ /dev/null @@ -1,55 +0,0 @@ - - - - - -getChildHtml('head') ?> - -getBodyClass()?' class="'.$this->getBodyClass().'"':'' ?>> -
    - getChildHtml('global_notices') ?> -
    - getChildHtml('header') ?> -
    - getChildHtml('breadcrumbs') ?> -
    - getChildHtml('global_messages') ?> - getChildHtml('content') ?> -
    -
    - getChildHtml('footer') ?> - getChildHtml('before_body_end') ?> -
    -
    -getAbsoluteFooter() ?> - - diff --git a/app/design/frontend/default/blank/template/page/2columns-left.phtml b/app/design/frontend/default/blank/template/page/2columns-left.phtml deleted file mode 100644 index a467c01af2..0000000000 --- a/app/design/frontend/default/blank/template/page/2columns-left.phtml +++ /dev/null @@ -1,56 +0,0 @@ - - - - - -getChildHtml('head') ?> - -getBodyClass()?' class="'.$this->getBodyClass().'"':'' ?>> -
    - getChildHtml('global_notices') ?> -
    - getChildHtml('header') ?> -
    - getChildHtml('breadcrumbs') ?> - -
    - getChildHtml('global_messages') ?> - getChildHtml('content') ?> -
    -
    - getChildHtml('footer') ?> - getChildHtml('before_body_end') ?> -
    -
    -getAbsoluteFooter() ?> - - diff --git a/app/design/frontend/default/blank/template/page/2columns-right.phtml b/app/design/frontend/default/blank/template/page/2columns-right.phtml deleted file mode 100644 index 0b53ad37d4..0000000000 --- a/app/design/frontend/default/blank/template/page/2columns-right.phtml +++ /dev/null @@ -1,56 +0,0 @@ - - - - - -getChildHtml('head') ?> - -getBodyClass()?' class="'.$this->getBodyClass().'"':'' ?>> -
    - getChildHtml('global_notices') ?> -
    - getChildHtml('header') ?> -
    - getChildHtml('breadcrumbs') ?> - -
    - getChildHtml('global_messages') ?> - getChildHtml('content') ?> -
    -
    - getChildHtml('footer') ?> - getChildHtml('before_body_end') ?> -
    -
    -getAbsoluteFooter() ?> - - diff --git a/app/design/frontend/default/blank/template/page/3columns.phtml b/app/design/frontend/default/blank/template/page/3columns.phtml deleted file mode 100644 index 962b3bc369..0000000000 --- a/app/design/frontend/default/blank/template/page/3columns.phtml +++ /dev/null @@ -1,57 +0,0 @@ - - - - - -getChildHtml('head') ?> - -getBodyClass()?' class="'.$this->getBodyClass().'"':'' ?>> -
    - getChildHtml('global_notices') ?> -
    - getChildHtml('header') ?> -
    - getChildHtml('breadcrumbs') ?> - - -
    - getChildHtml('global_messages') ?> - getChildHtml('content') ?> -
    -
    - getChildHtml('footer') ?> - getChildHtml('before_body_end') ?> -
    -
    -getAbsoluteFooter() ?> - - diff --git a/app/design/frontend/default/blank/template/page/html/breadcrumbs.phtml b/app/design/frontend/default/blank/template/page/html/breadcrumbs.phtml deleted file mode 100644 index 06aac491d7..0000000000 --- a/app/design/frontend/default/blank/template/page/html/breadcrumbs.phtml +++ /dev/null @@ -1,47 +0,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 deleted file mode 100644 index 70be68d550..0000000000 --- a/app/design/frontend/default/blank/template/page/html/footer.phtml +++ /dev/null @@ -1,31 +0,0 @@ - - diff --git a/app/design/frontend/default/blank/template/page/html/head.phtml b/app/design/frontend/default/blank/template/page/html/head.phtml deleted file mode 100644 index cc70812b4c..0000000000 --- a/app/design/frontend/default/blank/template/page/html/head.phtml +++ /dev/null @@ -1,43 +0,0 @@ - -<?php echo $this->getTitle() ?> - - - - - - - -getCssJsHtml() ?> -getChildHtml() ?> -helper('core/js')->getTranslatorScript() ?> -getIncludes() ?> diff --git a/app/design/frontend/default/blank/template/page/html/header.phtml b/app/design/frontend/default/blank/template/page/html/header.phtml deleted file mode 100644 index 63841c120f..0000000000 --- a/app/design/frontend/default/blank/template/page/html/header.phtml +++ /dev/null @@ -1,36 +0,0 @@ - -
    -
    -

    getLogoAlt() ?>

    -

    getWelcome()?>

    - getChildHtml('topLinks') ?> - getChildHtml('topSearch') ?> - getChildHtml('store_language') ?> -
    - getChildHtml('topMenu') ?> -
    diff --git a/app/design/frontend/default/blank/template/page/html/notices.phtml b/app/design/frontend/default/blank/template/page/html/notices.phtml deleted file mode 100644 index 0b0984b893..0000000000 --- a/app/design/frontend/default/blank/template/page/html/notices.phtml +++ /dev/null @@ -1,44 +0,0 @@ - - -displayNoscriptNotice()): ?> - - -displayDemoNotice()): ?> -

    __('This is a demo store. Any orders placed through this store will not be honored or fulfilled.') ?>

    - diff --git a/app/design/frontend/default/blank/template/page/html/pager.phtml b/app/design/frontend/default/blank/template/page/html/pager.phtml deleted file mode 100644 index 83db9bfa7c..0000000000 --- a/app/design/frontend/default/blank/template/page/html/pager.phtml +++ /dev/null @@ -1,78 +0,0 @@ - - -getCollection()->getSize()): ?> -
    -

    - getLastPageNum()>1): ?> - __('Items %s to %s of %s total', $this->getFirstNum(), $this->getLastNum(), $this->getTotalNum()) ?> - - __('%s Item(s)', $this->getTotalNum()) ?> - -

    - - getShowPerPage()): ?> -
    - - __('per page') ?> -
    - - - getLastPageNum()>1): ?> -
    - __('Page:') ?> -
      - isFirstPage()): ?> -
    1. <?php echo $this->__('Previous Page') ?>
    2. - - getPages() as $_page): ?> - isPageCurrent($_page)): ?> -
    3. - -
    4. - - - isLastPage()): ?> -
    5. <?php echo $this->__('Next Page') ?>
    6. - -
    -
    - -
    - diff --git a/app/design/frontend/default/blank/template/page/html/top.links.phtml b/app/design/frontend/default/blank/template/page/html/top.links.phtml deleted file mode 100644 index c7916738bc..0000000000 --- a/app/design/frontend/default/blank/template/page/html/top.links.phtml +++ /dev/null @@ -1,34 +0,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 deleted file mode 100644 index 74685bb0f7..0000000000 --- a/app/design/frontend/default/blank/template/page/html/wrapper.phtml +++ /dev/null @@ -1,46 +0,0 @@ - - - * some-custom-identificator - * - * - * span - * class="custom-class" - * - * - * - */ -?> -hasTag() ? $this->getTag() : "div" ?> -< id="getId()?>" getParams()?>> -getChildHtml()?> -> diff --git a/app/design/frontend/default/blank/template/page/js/calendar.phtml b/app/design/frontend/default/blank/template/page/js/calendar.phtml deleted file mode 100644 index 5e17155878..0000000000 --- a/app/design/frontend/default/blank/template/page/js/calendar.phtml +++ /dev/null @@ -1,94 +0,0 @@ - - - - diff --git a/app/design/frontend/default/blank/template/page/one-column.phtml b/app/design/frontend/default/blank/template/page/one-column.phtml deleted file mode 100644 index fc4c448eed..0000000000 --- a/app/design/frontend/default/blank/template/page/one-column.phtml +++ /dev/null @@ -1,42 +0,0 @@ - - - - - - getChildHtml('head') ?> - - - getChildHtml('content') ?> - getChildHtml('before_body_end') ?> - getAbsoluteFooter() ?> - - diff --git a/app/design/frontend/default/blank/template/page/popup.phtml b/app/design/frontend/default/blank/template/page/popup.phtml deleted file mode 100644 index 2c23394be4..0000000000 --- a/app/design/frontend/default/blank/template/page/popup.phtml +++ /dev/null @@ -1,44 +0,0 @@ - - - - - -getChildHtml('head') ?> - - -
    - getChildHtml('content') ?> - getChildHtml('before_body_end') ?> -
    -getAbsoluteFooter() ?> - - diff --git a/app/design/frontend/default/blank/template/page/print.phtml b/app/design/frontend/default/blank/template/page/print.phtml deleted file mode 100644 index fa7f2ce31a..0000000000 --- a/app/design/frontend/default/blank/template/page/print.phtml +++ /dev/null @@ -1,52 +0,0 @@ - - - - - -getChildHtml('head') ?> - - -
    - - getChildHtml('content') ?> -
    - -
    - getAbsoluteFooter() ?> -
    - - diff --git a/app/design/frontend/default/blank/template/page/redirect.phtml b/app/design/frontend/default/blank/template/page/redirect.phtml deleted file mode 100644 index b01c2df4b0..0000000000 --- a/app/design/frontend/default/blank/template/page/redirect.phtml +++ /dev/null @@ -1,36 +0,0 @@ - -
    -

    __('Redirecting...') ?>

    -
    -getMessage()): ?> -

    getMessage() ?>

    - -getRedirectOutput() ?> -isHtmlFormRedirect()): ?> -

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

    - diff --git a/app/design/frontend/default/blank/template/page/switch/flags.phtml b/app/design/frontend/default/blank/template/page/switch/flags.phtml deleted file mode 100644 index 7a45a4d8c5..0000000000 --- a/app/design/frontend/default/blank/template/page/switch/flags.phtml +++ /dev/null @@ -1,38 +0,0 @@ - -getStores())>1): ?> -
    - - -
    - diff --git a/app/design/frontend/default/blank/template/page/switch/languages.phtml b/app/design/frontend/default/blank/template/page/switch/languages.phtml deleted file mode 100644 index 725d2e3c95..0000000000 --- a/app/design/frontend/default/blank/template/page/switch/languages.phtml +++ /dev/null @@ -1,44 +0,0 @@ - - -getStores())>1): ?> -
    - - -
    - diff --git a/app/design/frontend/default/blank/template/page/switch/stores.phtml b/app/design/frontend/default/blank/template/page/switch/stores.phtml deleted file mode 100644 index 2e23a50193..0000000000 --- a/app/design/frontend/default/blank/template/page/switch/stores.phtml +++ /dev/null @@ -1,47 +0,0 @@ - - -getGroups())>1): ?> -
    - - -
    - diff --git a/app/design/frontend/default/blank/template/page/template/container.phtml b/app/design/frontend/default/blank/template/page/template/container.phtml deleted file mode 100644 index 2db33d11fc..0000000000 --- a/app/design/frontend/default/blank/template/page/template/container.phtml +++ /dev/null @@ -1,35 +0,0 @@ - - -
    -

    getTitle() ?>

    -
    -getChildHtml() ?> diff --git a/app/design/frontend/default/blank/template/page/template/links.phtml b/app/design/frontend/default/blank/template/page/template/links.phtml deleted file mode 100644 index 4562a99036..0000000000 --- a/app/design/frontend/default/blank/template/page/template/links.phtml +++ /dev/null @@ -1,39 +0,0 @@ - - -getLinks(); ?> -0): ?> - - diff --git a/app/design/frontend/default/blank/template/paybox/direct/form.phtml b/app/design/frontend/default/blank/template/paybox/direct/form.phtml deleted file mode 100644 index d67dbffd70..0000000000 --- a/app/design/frontend/default/blank/template/paybox/direct/form.phtml +++ /dev/null @@ -1,92 +0,0 @@ - - - -getMethodCode() ?> - diff --git a/app/design/frontend/default/blank/template/paybox/direct/info.phtml b/app/design/frontend/default/blank/template/paybox/direct/info.phtml deleted file mode 100644 index 71af8ac361..0000000000 --- a/app/design/frontend/default/blank/template/paybox/direct/info.phtml +++ /dev/null @@ -1,34 +0,0 @@ - -getInfo()): ?> - getMethod()->getTitle() ?>
    - __('Name on the Card: %s', $this->htmlEscape($this->getInfo()->getCcOwner())) ?>
    - __('Credit Card Type: %s', $this->htmlEscape($this->getCcTypeName())) ?>
    - __('Credit Card Number: xxxx-%s', $this->htmlEscape($this->getInfo()->getCcLast4())) ?> - - - diff --git a/app/design/frontend/default/blank/template/paybox/system/error.phtml b/app/design/frontend/default/blank/template/paybox/system/error.phtml deleted file mode 100644 index 58fbdff54f..0000000000 --- a/app/design/frontend/default/blank/template/paybox/system/error.phtml +++ /dev/null @@ -1,31 +0,0 @@ - -
    -

    __('Error occured') ?>

    -
    -

    getErrorMessage() ?>.

    -

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

    diff --git a/app/design/frontend/default/blank/template/paybox/system/form.phtml b/app/design/frontend/default/blank/template/paybox/system/form.phtml deleted file mode 100644 index 62fa510df8..0000000000 --- a/app/design/frontend/default/blank/template/paybox/system/form.phtml +++ /dev/null @@ -1,30 +0,0 @@ - -getMethodCode() ?> - diff --git a/app/design/frontend/default/blank/template/payment/form/cc.phtml b/app/design/frontend/default/blank/template/payment/form/cc.phtml deleted file mode 100644 index aacc789345..0000000000 --- a/app/design/frontend/default/blank/template/payment/form/cc.phtml +++ /dev/null @@ -1,84 +0,0 @@ - -getMethodCode() ?> - diff --git a/app/design/frontend/default/blank/template/payment/form/ccsave.phtml b/app/design/frontend/default/blank/template/payment/form/ccsave.phtml deleted file mode 100644 index 45c4b6a700..0000000000 --- a/app/design/frontend/default/blank/template/payment/form/ccsave.phtml +++ /dev/null @@ -1,83 +0,0 @@ - -getMethodCode() ?> - diff --git a/app/design/frontend/default/blank/template/payment/form/checkmo.phtml b/app/design/frontend/default/blank/template/payment/form/checkmo.phtml deleted file mode 100644 index 3358a4c46c..0000000000 --- a/app/design/frontend/default/blank/template/payment/form/checkmo.phtml +++ /dev/null @@ -1,43 +0,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 deleted file mode 100644 index bab143374c..0000000000 --- a/app/design/frontend/default/blank/template/payment/form/purchaseorder.phtml +++ /dev/null @@ -1,34 +0,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 deleted file mode 100644 index 084ba550c3..0000000000 --- a/app/design/frontend/default/blank/template/payment/info/cc.phtml +++ /dev/null @@ -1,33 +0,0 @@ - -getInfo()): ?> - - __('Credit Card Type: %s', $this->htmlEscape($this->getCcTypeName())) ?>
    - __('Credit Card Number: xxxx-%s', $this->htmlEscape($this->getInfo()->getCcLast4())) ?> - - - diff --git a/app/design/frontend/default/blank/template/payment/info/ccsave.phtml b/app/design/frontend/default/blank/template/payment/info/ccsave.phtml deleted file mode 100644 index c903036d2b..0000000000 --- a/app/design/frontend/default/blank/template/payment/info/ccsave.phtml +++ /dev/null @@ -1,29 +0,0 @@ - -__('Name on the Card: %s', $this->htmlEscape($this->getInfo()->getCcOwner())) ?>
    -__('Credit Card Type: %s', $this->htmlEscape($this->getCcTypeName())) ?>
    -__('Credit Card Number: xxxx-%s', $this->htmlEscape($this->getInfo()->getCcLast4())) ?> diff --git a/app/design/frontend/default/blank/template/payment/info/checkmo.phtml b/app/design/frontend/default/blank/template/payment/info/checkmo.phtml deleted file mode 100644 index 24bfabd502..0000000000 --- a/app/design/frontend/default/blank/template/payment/info/checkmo.phtml +++ /dev/null @@ -1,38 +0,0 @@ - -

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

    diff --git a/app/design/frontend/default/blank/template/payment/info/default.phtml b/app/design/frontend/default/blank/template/payment/info/default.phtml deleted file mode 100644 index c64505a1f1..0000000000 --- a/app/design/frontend/default/blank/template/payment/info/default.phtml +++ /dev/null @@ -1,27 +0,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 deleted file mode 100644 index 826f7c53f0..0000000000 --- a/app/design/frontend/default/blank/template/payment/info/purchaseorder.phtml +++ /dev/null @@ -1,28 +0,0 @@ - -

    getMethod()->getTitle() ?>

    -

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

    diff --git a/app/design/frontend/default/blank/template/paypal/express/form.phtml b/app/design/frontend/default/blank/template/paypal/express/form.phtml deleted file mode 100644 index 42016360e4..0000000000 --- a/app/design/frontend/default/blank/template/paypal/express/form.phtml +++ /dev/null @@ -1,30 +0,0 @@ - -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 deleted file mode 100644 index 594c6b3304..0000000000 --- a/app/design/frontend/default/blank/template/paypal/express/info.phtml +++ /dev/null @@ -1,28 +0,0 @@ - -

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

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

    __('Review Order') ?>

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

    __('Shipping Information') ?>

    -
    -
    -

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

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

    __('Shipping Method') ?>

    - isVirtual()): ?> - __('No shipping method required.') ?> - - getShippingRates())): ?> -

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

    - - -
    - -

    - -

    -
    - - - - -
    -
    - -
    - -

    __('Billing Information') ?>

    -

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

    -

    __('PayPal Account') ?>

    -
    getBillingAddress()->getEmail() ?>
    - -

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

    - -
    - getChildHtml('details') ?> -
    - - -
    - -
    -
    - - - - -
    -
    - diff --git a/app/design/frontend/default/blank/template/paypal/express/review/details.phtml b/app/design/frontend/default/blank/template/paypal/express/review/details.phtml deleted file mode 100644 index b9f2a013c2..0000000000 --- a/app/design/frontend/default/blank/template/paypal/express/review/details.phtml +++ /dev/null @@ -1,62 +0,0 @@ - - - - - - - - - - - - - - - - getTotals() as $_total): ?> - - - - - - - - getItems() as $_item): ?> - getParentItem()) continue ?> - - - - - - - - -
    __('Product Name') ?>__('Price') ?>__('Qty') ?>__('Subtotal') ?>
    getTitle() ?>helper('checkout')->formatPrice($_total->getValue()) ?>
    - getProduct()->getName() ?> - getProduct()->getDescription() ?> - helper('checkout')->formatPrice($_item->getCalculationPrice()); ?>getQty() ?>helper('checkout')->formatPrice($_item->getRowTotal()); ?>
    diff --git a/app/design/frontend/default/blank/template/paypal/link.phtml b/app/design/frontend/default/blank/template/paypal/link.phtml deleted file mode 100644 index 99f9e351cb..0000000000 --- a/app/design/frontend/default/blank/template/paypal/link.phtml +++ /dev/null @@ -1,29 +0,0 @@ - -
  • - <?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 deleted file mode 100644 index 9225b55185..0000000000 --- a/app/design/frontend/default/blank/template/paypal/standard/form.phtml +++ /dev/null @@ -1,30 +0,0 @@ - -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 deleted file mode 100644 index 60bae82e06..0000000000 --- a/app/design/frontend/default/blank/template/paypaluk/direct/form.phtml +++ /dev/null @@ -1,124 +0,0 @@ - - -getMethodCode() ?> -hasSsCardType()): ?> -
  • -
    -
    -
      -
    • -
      -
    • -
    • -
      -
      - -
      -
      - -
      -
    • -
    • -
    -
    - - -
  • - diff --git a/app/design/frontend/default/blank/template/paypaluk/direct/info.phtml b/app/design/frontend/default/blank/template/paypaluk/direct/info.phtml deleted file mode 100644 index 3506b19ac1..0000000000 --- a/app/design/frontend/default/blank/template/paypaluk/direct/info.phtml +++ /dev/null @@ -1,37 +0,0 @@ - -getInfo()): ?> - - __('Credit Card Type: %s', $this->getCcTypeName()) ?>
    - __('Credit Card Number: xxxx-%s', $this->getInfo()->getCcLast4()) ?>
    - getInfo()->getCcSsIssue()): ?> - __("Switch/Solo card issue number: %s", $this->getInfo()->getCcSsIssue()) ?>
    - - getInfo()->getCcSsStartYear()): ?> - __('Switch/Solo card start Date: %s/%s', $this->getCcStartMonth(), $this->getInfo()->getCcSsStartYear()) ?> - - diff --git a/app/design/frontend/default/blank/template/paypaluk/express/form.phtml b/app/design/frontend/default/blank/template/paypaluk/express/form.phtml deleted file mode 100644 index 3fbc92e1b4..0000000000 --- a/app/design/frontend/default/blank/template/paypaluk/express/form.phtml +++ /dev/null @@ -1,30 +0,0 @@ - -getMethodCode() ?> - diff --git a/app/design/frontend/default/blank/template/paypaluk/express/info.phtml b/app/design/frontend/default/blank/template/paypaluk/express/info.phtml deleted file mode 100644 index 594c6b3304..0000000000 --- a/app/design/frontend/default/blank/template/paypaluk/express/info.phtml +++ /dev/null @@ -1,28 +0,0 @@ - -

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

    diff --git a/app/design/frontend/default/blank/template/paypaluk/express/review.phtml b/app/design/frontend/default/blank/template/paypaluk/express/review.phtml deleted file mode 100644 index ccceea2edd..0000000000 --- a/app/design/frontend/default/blank/template/paypaluk/express/review.phtml +++ /dev/null @@ -1,145 +0,0 @@ - -
    -

    __('Review Order') ?>

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

    __('Shipping Information') ?>

    -
    -
    -

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

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

    __('Shipping Method') ?>

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

    -
    - - - -
    -
    -
    - -
    -

    __('Billing Information') ?>

    -

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

    -

    __('PayPal Uk Account') ?>

    - getBillingAddress()->getEmail() ?> -
    - -

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

    - - -
    - getChildHtml('details') ?> -
    - -
    -
    - - -
    -
    - diff --git a/app/design/frontend/default/blank/template/paypaluk/express/review/details.phtml b/app/design/frontend/default/blank/template/paypaluk/express/review/details.phtml deleted file mode 100644 index ee6f64cdc4..0000000000 --- a/app/design/frontend/default/blank/template/paypaluk/express/review/details.phtml +++ /dev/null @@ -1,62 +0,0 @@ - - - - - - - - - - - - - - - - getItems() as $_item): ?> - getParentItem()) continue ?> - - - - - - - - - - getTotals() as $_total): ?> - - - - - - -
    __('Product Name') ?>__('Price') ?>__('Qty') ?>__('Subtotal') ?>
    - getProduct()->getName() ?> - getProduct()->getDescription() ?> - helper('checkout')->formatPrice($_item->getCalculationPrice()); ?>getQty() ?>helper('checkout')->formatPrice($_item->getRowTotal()); ?>
    getTitle() ?>helper('checkout')->formatPrice($_total->getValue()) ?>
    diff --git a/app/design/frontend/default/blank/template/paypaluk/link.phtml b/app/design/frontend/default/blank/template/paypaluk/link.phtml deleted file mode 100644 index 33ce799e4c..0000000000 --- a/app/design/frontend/default/blank/template/paypaluk/link.phtml +++ /dev/null @@ -1,29 +0,0 @@ - -
  • - <?php echo Mage::helper('paypalUk')->__('Paypal UK Checkout');?> -
  • diff --git a/app/design/frontend/default/blank/template/poll/active.phtml b/app/design/frontend/default/blank/template/poll/active.phtml deleted file mode 100644 index c8fe389401..0000000000 --- a/app/design/frontend/default/blank/template/poll/active.phtml +++ /dev/null @@ -1,66 +0,0 @@ - - - -
    -
    -

    __('Community Poll') ?>

    -
    -
    -
    - __('Community Poll') ?> -

    getPollTitle(); ?>

    - -
      - -
    1. - - -
    2. - -
    - -
    - -
    -
    -
    -
    - diff --git a/app/design/frontend/default/blank/template/poll/result.phtml b/app/design/frontend/default/blank/template/poll/result.phtml deleted file mode 100644 index ca239b5a82..0000000000 --- a/app/design/frontend/default/blank/template/poll/result.phtml +++ /dev/null @@ -1,46 +0,0 @@ - - -
    -
    -

    __('Community Poll') ?>

    -
    -
    -

    getPollTitle(); ?>

    - -
      - -
    1. - getAnswerTitle() ?>: - getVotesCount() ?> (getPercent() ?>%) -
    2. - -
    - -
    -
    - diff --git a/app/design/frontend/default/blank/template/productalert/price.phtml b/app/design/frontend/default/blank/template/productalert/price.phtml deleted file mode 100644 index 597f607dcd..0000000000 --- a/app/design/frontend/default/blank/template/productalert/price.phtml +++ /dev/null @@ -1,29 +0,0 @@ - -isShow()): ?> -

    __('Sign up for price alert'); ?>

    - diff --git a/app/design/frontend/default/blank/template/productalert/stock.phtml b/app/design/frontend/default/blank/template/productalert/stock.phtml deleted file mode 100644 index c03007c2df..0000000000 --- a/app/design/frontend/default/blank/template/productalert/stock.phtml +++ /dev/null @@ -1,29 +0,0 @@ - -isShow()): ?> -

    __('Sign up to get notified when this product is back in stock'); ?>

    - diff --git a/app/design/frontend/default/blank/template/protx/standard/failure.phtml b/app/design/frontend/default/blank/template/protx/standard/failure.phtml deleted file mode 100644 index 58fbdff54f..0000000000 --- a/app/design/frontend/default/blank/template/protx/standard/failure.phtml +++ /dev/null @@ -1,31 +0,0 @@ - -
    -

    __('Error occured') ?>

    -
    -

    getErrorMessage() ?>.

    -

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

    diff --git a/app/design/frontend/default/blank/template/protx/standard/form.phtml b/app/design/frontend/default/blank/template/protx/standard/form.phtml deleted file mode 100644 index cda7e81940..0000000000 --- a/app/design/frontend/default/blank/template/protx/standard/form.phtml +++ /dev/null @@ -1,30 +0,0 @@ - -getMethodCode() ?> - diff --git a/app/design/frontend/default/blank/template/rating/detailed.phtml b/app/design/frontend/default/blank/template/rating/detailed.phtml deleted file mode 100644 index 27ad8627ad..0000000000 --- a/app/design/frontend/default/blank/template/rating/detailed.phtml +++ /dev/null @@ -1,46 +0,0 @@ - -getSize()): ?> - - - - - - getSummary()): ?> - - - - - - - -
    __($_rating->getRatingCode()) ?> -
    -
    -
    -
    - diff --git a/app/design/frontend/default/blank/template/rating/empty.phtml b/app/design/frontend/default/blank/template/rating/empty.phtml deleted file mode 100644 index 4bf9388cea..0000000000 --- a/app/design/frontend/default/blank/template/rating/empty.phtml +++ /dev/null @@ -1,29 +0,0 @@ - - diff --git a/app/design/frontend/default/blank/template/reports/home_product_compared.phtml b/app/design/frontend/default/blank/template/reports/home_product_compared.phtml deleted file mode 100644 index e59ddeec64..0000000000 --- a/app/design/frontend/default/blank/template/reports/home_product_compared.phtml +++ /dev/null @@ -1,61 +0,0 @@ - -getRecentlyComparedProducts()): ?> -
    -

    __('Your Recently Compared') ?>

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

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

    - getReviewsSummaryHtml($_product, 'short') ?> - getPriceHtml($_product, true, '-home-compared') ?> - isSaleable()): ?> - - -

    __('Out of stock') ?>

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

    __('Your Recently Viewed') ?>

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

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

    - getReviewsSummaryHtml($_product, 'short') ?> - getPriceHtml($_product, true, '-home-viewed') ?> - isSaleable()): ?> - - -

    __('Out of stock') ?>

    - - -
     
    - diff --git a/app/design/frontend/default/blank/template/reports/product_compared.phtml b/app/design/frontend/default/blank/template/reports/product_compared.phtml deleted file mode 100644 index 6a682a707c..0000000000 --- a/app/design/frontend/default/blank/template/reports/product_compared.phtml +++ /dev/null @@ -1,42 +0,0 @@ - -getRecentlyComparedProducts()): ?> -
    -
    -

    __('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 deleted file mode 100644 index 8ab86ba6f1..0000000000 --- a/app/design/frontend/default/blank/template/reports/product_viewed.phtml +++ /dev/null @@ -1,42 +0,0 @@ - -getRecentlyViewedProducts()): ?> -
    -
    -

    __('Recently Viewed Products') ?>

    -
    -
    -
      - -
    1. htmlEscape($_item->getName()) ?>
    2. - -
    - -
    -
    - diff --git a/app/design/frontend/default/blank/template/reports/widget/compared/content/compared_grid.phtml b/app/design/frontend/default/blank/template/reports/widget/compared/content/compared_grid.phtml deleted file mode 100644 index ac827ac189..0000000000 --- a/app/design/frontend/default/blank/template/reports/widget/compared/content/compared_grid.phtml +++ /dev/null @@ -1,69 +0,0 @@ - -getRecentlyComparedProducts()): ?> -
    -
    -

    __('Your Recently Compared') ?>

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

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

      - getReviewsSummaryHtml($_product, 'short') ?> - getPriceHtml($_product, true, '-widget-compared-grid') ?> -
      - isSaleable()): ?> - - - getIsSalable()): ?> -

      __('In stock') ?>

      - -

      __('Out of stock') ?>

      - - - -
      -
    • - -
    - - -
    -
    - diff --git a/app/design/frontend/default/blank/template/reports/widget/compared/content/compared_list.phtml b/app/design/frontend/default/blank/template/reports/widget/compared/content/compared_list.phtml deleted file mode 100644 index c5cbc0a4b8..0000000000 --- a/app/design/frontend/default/blank/template/reports/widget/compared/content/compared_list.phtml +++ /dev/null @@ -1,66 +0,0 @@ - -getRecentlyComparedProducts()): ?> -
    -
    -

    __('Your Recently Compared') ?>

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

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

      - getReviewsSummaryHtml($_product, 'short') ?> - getPriceHtml($_product, true, '-widget-compared-list') ?> - isSaleable()): ?> - - - getIsSalable()): ?> -

      __('In stock') ?>

      - -

      __('Out of stock') ?>

      - - - -
      -
      -
    2. - -
    -
    -
    - diff --git a/app/design/frontend/default/blank/template/reports/widget/viewed/content/viewed_grid.phtml b/app/design/frontend/default/blank/template/reports/widget/viewed/content/viewed_grid.phtml deleted file mode 100644 index 4c08cab9ed..0000000000 --- a/app/design/frontend/default/blank/template/reports/widget/viewed/content/viewed_grid.phtml +++ /dev/null @@ -1,74 +0,0 @@ - - -getRecentlyViewedProducts()): ?> -
    -
    -

    __('Your Recently Viewed') ?>

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

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

      - getReviewsSummaryHtml($_product, 'short') ?> - getPriceHtml($_product, true, '-widget-viewed-grid') ?> -
      - isSaleable()): ?> - - - getIsSalable()): ?> -

      __('In stock') ?>

      - -

      __('Out of stock') ?>

      - - - -
      -
    • - -
    - - -
    -
    - diff --git a/app/design/frontend/default/blank/template/reports/widget/viewed/content/viewed_list.phtml b/app/design/frontend/default/blank/template/reports/widget/viewed/content/viewed_list.phtml deleted file mode 100644 index 52108d3c23..0000000000 --- a/app/design/frontend/default/blank/template/reports/widget/viewed/content/viewed_list.phtml +++ /dev/null @@ -1,71 +0,0 @@ - - -getRecentlyViewedProducts()): ?> -
    -
    -

    __('Your Recently Viewed') ?>

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

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

      - getReviewsSummaryHtml($_product, 'short') ?> - getPriceHtml($_product, true, '-widget-viewed-list') ?> - isSaleable()): ?> - - - getIsSalable()): ?> -

      __('In stock') ?>

      - -

      __('Out of stock') ?>

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

    __('My Product Reviews') ?>

    -
    -getCollection() && $this->count()): ?> - getToolbarHtml() ?> - - - - - - - - getCollection() as $_review): ?> - - - - - - - - - -
    dateFormat($_review->getCreatedAt()) ?>

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

    - getSum()): ?> -
    -
    -
    - -
    htmlEscape($this->helper('review')->getDetail($_review->getDetail())) ?>__('View Details') ?>
    - - getToolbarHtml() ?> - -

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

    - - diff --git a/app/design/frontend/default/blank/template/review/customer/recent.phtml b/app/design/frontend/default/blank/template/review/customer/recent.phtml deleted file mode 100644 index a67aeb3ec8..0000000000 --- a/app/design/frontend/default/blank/template/review/customer/recent.phtml +++ /dev/null @@ -1,50 +0,0 @@ - -getCollection() && $this->count()): ?> -
    -
    -

    __('My Recent Reviews') ?>

    - __('View All Reviews') ?> -
    -
      - - getCollection() as $_review): ?> -
    1. - -

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

      - getSum()): ?> -

      __('Rating:') ?>

      -
      -
      -
      - -
    2. - -
    - -
    - diff --git a/app/design/frontend/default/blank/template/review/customer/view.phtml b/app/design/frontend/default/blank/template/review/customer/view.phtml deleted file mode 100644 index 0f2900cecb..0000000000 --- a/app/design/frontend/default/blank/template/review/customer/view.phtml +++ /dev/null @@ -1,64 +0,0 @@ - -getProductData()->getId()): ?> -
    -
    -

    __('Review Details') ?>

    -
    -
    - <?php echo $this->htmlEscape($this->getProductData()->getName()) ?> - getRating() && $this->getRating()->getSize()): ?> -

    __('Average Customer Rating:') ?>

    - getReviewsSummaryHtml($this->getProductData()) ?> - -
    -
    -

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

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

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

    -
    - -
    - diff --git a/app/design/frontend/default/blank/template/review/form.phtml b/app/design/frontend/default/blank/template/review/form.phtml deleted file mode 100644 index 9b615ca586..0000000000 --- a/app/design/frontend/default/blank/template/review/form.phtml +++ /dev/null @@ -1,117 +0,0 @@ - -
    -
    -

    __('Write Your Own Review') ?>

    -

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

    - getRatings() && $this->getRatings()->getSize()): ?> -
    __('How do you rate this product?') ?> *
    - - - - - - - - - - - - - - - - - - - - getRatings() as $_rating): ?> - - - getOptions() as $_option): ?> - - - - - -
     __('1 star') ?>__('2 stars') ?>__('3 stars') ?>__('4 stars') ?>__('5 stars') ?>
    getRatingCode() ?>
    - - - -
      -
    • -
      - -
    • -
    • -
      - -
    • -
    • -
      - -
    • -
    -
    - -
    -
    -
    - diff --git a/app/design/frontend/default/blank/template/review/helper/summary.phtml b/app/design/frontend/default/blank/template/review/helper/summary.phtml deleted file mode 100644 index 6d585f4bb2..0000000000 --- a/app/design/frontend/default/blank/template/review/helper/summary.phtml +++ /dev/null @@ -1,42 +0,0 @@ - -getReviewsCount()): ?> -
    - getRatingSummary()):?> -
    -
    -
    - - -
    -getDisplayIfEmpty()): ?> -

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

    - 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 deleted file mode 100644 index 7cbceb9619..0000000000 --- a/app/design/frontend/default/blank/template/review/helper/summary_short.phtml +++ /dev/null @@ -1,40 +0,0 @@ - -getReviewsCount()): ?> -
    - getRatingSummary()):?> -
    -
    -
    - (getReviewsCount() ?>) - - __('%d Review(s)', $this->getReviewsCount()) ?> - -
    -getDisplayIfEmpty()): ?> -

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

    - diff --git a/app/design/frontend/default/blank/template/review/product/view/count.phtml b/app/design/frontend/default/blank/template/review/product/view/count.phtml deleted file mode 100644 index bc02fbb1b4..0000000000 --- a/app/design/frontend/default/blank/template/review/product/view/count.phtml +++ /dev/null @@ -1,29 +0,0 @@ - - - __('%s Review(s)', $count) ?> - 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 deleted file mode 100644 index 6867efbb20..0000000000 --- a/app/design/frontend/default/blank/template/review/product/view/list.phtml +++ /dev/null @@ -1,63 +0,0 @@ - - -getReviewsCollection()->getItems();?> - -
    -

    __('Customer Reviews') ?>

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

    htmlEscape($_review->getDetail())) ?>

    -

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

    -
    - -
    - getChildHtml('toolbar') ?> -
    - -getChildHtml('review_form') ?> 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 deleted file mode 100644 index 04fc8a446c..0000000000 --- a/app/design/frontend/default/blank/template/review/product/view/other.phtml +++ /dev/null @@ -1,31 +0,0 @@ - - - - diff --git a/app/design/frontend/default/blank/template/review/view.phtml b/app/design/frontend/default/blank/template/review/view.phtml deleted file mode 100644 index 6ce7e665cc..0000000000 --- a/app/design/frontend/default/blank/template/review/view.phtml +++ /dev/null @@ -1,63 +0,0 @@ - -getProductData()->getId()): ?> -
    -
    -

    __('Review Details') ?>

    -
    -
    - <?php echo $this->htmlEscape($this->getProductData()->getName()) ?> - getRating() && $this->getRating()->getSize()): ?> -

    __('Average Customer Rating') ?>:

    - getReviewsSummaryHtml($this->getProductData()) ?> - -
    -
    -

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

    - getRating() && $this->getRating()->getSize()): ?> -

    __('Product Rating:') ?>

    -
    - getRating() as $_rating): ?> - getPercent()): ?> -
    __($_rating->getRatingCode()) ?>
    -
    -
    -
    -
    -
    - - -
    - -

    __('Product Review (submitted on %s):', $this->dateFormat($this->getReviewData()->getCreatedAt())) ?>

    -

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

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

    __('RSS Feeds') ?>

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

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

    - diff --git a/app/design/frontend/default/blank/template/rss/nofeed.phtml b/app/design/frontend/default/blank/template/rss/nofeed.phtml deleted file mode 100644 index 873ce100d3..0000000000 --- a/app/design/frontend/default/blank/template/rss/nofeed.phtml +++ /dev/null @@ -1,27 +0,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 deleted file mode 100644 index 5c78df0d9e..0000000000 --- a/app/design/frontend/default/blank/template/rss/order/details.phtml +++ /dev/null @@ -1,101 +0,0 @@ -getStore()->getName() -web site name = $_order->getStore()->getWebsite()->getName() -store name = $_order->getStore()->getGroup()->getName() -*/ -?> -getOrder() ?> -
    -__('Customer Name: %s', $_order->getCustomerFirstname()?$_order->getCustomerName():$_order->getBillingAddress()->getName()) ?>
    -__('Purchased From: %s', $_order->getStore()->getGroup()->getName()) ?>
    -
    - - - - - - - - - - -getAllItems() as $_item): $i++ ?> - > - - - - - - - - - getGiftMessageId() && $_giftMessage = $this->helper('giftmessage/message')->getGiftMessage($_order->getGiftMessageId())): ?> - - - - - - - - - getDiscountAmount() > 0): ?> - - - - - - getShippingAmount() || $_order->getShippingDescription()): ?> - - - - - - getTaxAmount() > 0): ?> - - - - - - - - - - -
    ItemQtySubtotal
    htmlEscape($_item->getName()) ?> - getGiftMessageId() && $_giftMessage = $this->helper('giftmessage/message')->getGiftMessage($_item->getGiftMessageId())): ?> -
    __('Gift Message') ?> -
    __('From:'); ?> htmlEscape($_giftMessage->getSender()) ?> -
    __('To:'); ?> htmlEscape($_giftMessage->getRecipient()) ?> -
    __('Message:'); ?>
    htmlEscape($_giftMessage->getMessage()) ?> - -
    getQtyOrdered()*1 ?>formatPrice($_item->getRowTotal()) ?>
    - __('Gift Message') ?> -
    __('From:'); ?> htmlEscape($_giftMessage->getSender()) ?> -
    __('To:'); ?> htmlEscape($_giftMessage->getRecipient()) ?> -
    __('Message:'); ?>
    htmlEscape($_giftMessage->getMessage()) ?> -
    __('Subtotal') ?>formatPrice($_order->getSubtotal()) ?>
    __('Discount '.($_order->getCouponCode()?'('.$_order->getCouponCode().')':'')) ?>formatPrice(0.00 - $_order->getDiscountAmount()) ?>
    __('Shipping & Handling') ?>formatPrice($_order->getShippingAmount()) ?>
    __('Tax') ?>formatPrice($_order->getTaxAmount()) ?>
    __('Grand Total') ?>formatPrice($_order->getGrandTotal()) ?>
    diff --git a/app/design/frontend/default/blank/template/sales/order/creditmemo.phtml b/app/design/frontend/default/blank/template/sales/order/creditmemo.phtml deleted file mode 100644 index e4711d0a05..0000000000 --- a/app/design/frontend/default/blank/template/sales/order/creditmemo.phtml +++ /dev/null @@ -1,61 +0,0 @@ - -helper('giftmessage/message')->getIsMessagesAvailable('order', $this->getOrder())): ?> - - - getChildHtml('creditmemo_items') ?> - 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 deleted file mode 100644 index 5632a5adcc..0000000000 --- a/app/design/frontend/default/blank/template/sales/order/creditmemo/items.phtml +++ /dev/null @@ -1,65 +0,0 @@ - -getOrder() ?> -

    __('Print All Refunds') ?>

    -getCreditmemosCollection() as $_creditmemo): ?> -__('Print Refund') ?> -

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

    -

    __('Items Refunded') ?>

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

    __('My Orders - Details') ?>

    - -
    -

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

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

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

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

    __('Shipping Address') ?>

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

    __('Billing Address') ?>

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

    __('Shipping Method') ?>

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

    __('Payment Method') ?>

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

    __('Items Ordered') ?>

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

    __('My Orders') ?>

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

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

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

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

    - helper('rss/order')->isStatusNotificationAllow()): ?> - __('Subscribe to Order Status') ?> - | - - helper('sales/reorder')->canReorder($_order)) : ?> - __('Reorder') ?> - | - - __('Print Order') ?> -
    -getStatusHistoryRssUrl($_order) ?> -
    -
    __('About This Order:') ?>
    -
    - getLinks(); ?> - -
    -
    -

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

    -getIsVirtual()): ?> -
    -
    -

    __('Shipping Address') ?>

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

    __('Shipping Method') ?>__('Track Order') ?>*/ ?>

    - getShippingDescription()): ?> - getShippingDescription() ?> - - helper('sales')->__('No shipping information available'); ?> - -
    -
    - -
    -
    -

    __('Billing Address') ?>

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

    __('Payment Method') ?>

    - getPaymentInfoHtml() ?> -
    -
    diff --git a/app/design/frontend/default/blank/template/sales/order/invoice.phtml b/app/design/frontend/default/blank/template/sales/order/invoice.phtml deleted file mode 100644 index 27021a7933..0000000000 --- a/app/design/frontend/default/blank/template/sales/order/invoice.phtml +++ /dev/null @@ -1,61 +0,0 @@ - -helper('giftmessage/message')->getIsMessagesAvailable('order', $this->getOrder())): ?> - - -getChildHtml('invoice_items') ?> - 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 deleted file mode 100644 index 5ec299944e..0000000000 --- a/app/design/frontend/default/blank/template/sales/order/invoice/items.phtml +++ /dev/null @@ -1,61 +0,0 @@ - -getOrder() ?> -

    __('Print All Invoices') ?>

    -getInvoiceCollection() as $_invoice): ?> -__('Print Invoice') ?> -

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

    -

    __('Items Invoiced') ?>

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

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

    - getItemOptions()): ?> -
    - -
    htmlEscape($_option['label']) ?>
    - getPrintStatus()): ?> - getFormatedOptionValue($_option) ?> - class="truncated"> - - -
    -
    -
    htmlEscape($_option['label']) ?>
    -
    -
    -
    - - - -
    htmlEscape( (isset($_option['print_value']) ? $_option['print_value'] : $_option['value']) ) ?>
    - - -
    - - getDescription() ?> - helper('giftmessage/message')->getIsMessagesAvailable('order_item', $_item) && $_item->getGiftMessageId()): ?> - __('Gift Message') ?> - - - splitInjection($this->getSku()) ?> - - helper('tax')->displaySalesBothPrices() || $this->helper('tax')->displaySalesPriceExclTax()): ?> - - helper('tax')->displaySalesBothPrices()): ?> - typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
    - - __('Excl. Tax'); ?>: - typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
    - - - typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
    - -
    - - - typeOfDisplay($this->getItem(), array(0, 1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> - getOrder()->formatPrice($this->getItem()->getPrice()+$this->getItem()->getWeeeTaxAppliedAmount()+$this->getItem()->getWeeeTaxDisposition()); ?> - - getOrder()->formatPrice($this->getItem()->getPrice()) ?> - - -
    - - - getApplied($this->getItem())): ?> - - - - typeOfDisplay($this->getItem(), 2, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
    - __('Total'); ?>:
    getOrder()->formatPrice($this->getItem()->getPrice()+$this->getItem()->getWeeeTaxAppliedAmount()+$this->getItem()->getWeeeTaxDisposition()); ?>
    -
    - - - -
    - - helper('tax')->displaySalesBothPrices() || $this->helper('tax')->displaySalesPriceInclTax()): ?> - - helper('tax')->displaySalesBothPrices()): ?> - typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
    - - __('Incl. Tax'); ?>: - typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
    - - - helper('checkout')->getPriceInclTax($this->getItem()); ?> - typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
    - -
    - - - typeOfDisplay($this->getItem(), array(0, 1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> - getOrder()->formatPrice($_incl+$this->getItem()->getWeeeTaxAppliedAmount()); ?> - - getOrder()->formatPrice($_incl-$this->getItem()->getWeeeTaxDisposition()) ?> - - -
    - - - getApplied($this->getItem())): ?> - - - - typeOfDisplay($this->getItem(), 2, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
    - __('Total incl. tax'); ?>:
    getOrder()->formatPrice($_incl+$this->getItem()->getWeeeTaxAppliedAmount()); ?>
    -
    - - - - - - - - getItem()->getQtyOrdered() > 0): ?> - __('Ordered'); ?>: getItem()->getQtyOrdered()*1 ?>
    - - getItem()->getQtyShipped() > 0): ?> - __('Shipped'); ?>: getItem()->getQtyShipped()*1 ?>
    - - getItem()->getQtyCanceled() > 0): ?> - __('Canceled'); ?>: getItem()->getQtyCanceled()*1 ?>
    - - getItem()->getQtyRefunded() > 0): ?> - __('Refunded'); ?>: getItem()->getQtyRefunded()*1 ?>
    - -
    - - - helper('tax')->displaySalesBothPrices() || $this->helper('tax')->displaySalesPriceExclTax()): ?> - - helper('tax')->displaySalesBothPrices()): ?> - typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
    - - __('Excl. Tax'); ?>: - typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
    - - - typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
    - -
    - - - typeOfDisplay($this->getItem(), array(0, 1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> - getOrder()->formatPrice($this->getItem()->getRowTotal()+$this->getItem()->getWeeeTaxAppliedRowAmount()+$this->getItem()->getWeeeTaxRowDisposition()); ?> - - getOrder()->formatPrice($this->getItem()->getRowTotal()) ?> - - -
    - - - getApplied($this->getItem())): ?> - - - - typeOfDisplay($this->getItem(), 2, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
    - __('Total'); ?>:
    getOrder()->formatPrice($this->getItem()->getRowTotal()+$this->getItem()->getWeeeTaxAppliedRowAmount()+$this->getItem()->getWeeeTaxRowDisposition()); ?>
    -
    - - - -
    - - helper('tax')->displaySalesBothPrices() || $this->helper('tax')->displaySalesPriceInclTax()): ?> - - helper('tax')->displaySalesBothPrices()): ?> - typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
    - - __('Incl. Tax'); ?>: - typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
    - - - helper('checkout')->getSubtotalInclTax($this->getItem()); ?> - typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
    - -
    - - typeOfDisplay($this->getItem(), array(0, 1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> - getOrder()->formatPrice($_incl+$this->getItem()->getWeeeTaxAppliedRowAmount()); ?> - - getOrder()->formatPrice($_incl-$this->getItem()->getWeeeTaxRowDisposition()) ?> - - -
    - - - getApplied($this->getItem())): ?> - - - - typeOfDisplay($this->getItem(), 2, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
    - __('Total incl. tax'); ?>:
    getOrder()->formatPrice($_incl+$this->getItem()->getWeeeTaxAppliedRowAmount()); ?>
    -
    - - - - - - - - - - diff --git a/app/design/frontend/default/blank/template/sales/order/print.phtml b/app/design/frontend/default/blank/template/sales/order/print.phtml deleted file mode 100644 index 85df4ae5a7..0000000000 --- a/app/design/frontend/default/blank/template/sales/order/print.phtml +++ /dev/null @@ -1,85 +0,0 @@ - -getOrder() ?> -

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

    -

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

    -
    - getIsVirtual()): ?> -
    -

    __('Shipping Address') ?>

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

    __('Billing Address') ?>

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

    __('Shipping Method') ?>

    - getShippingDescription() ?> -
    - -
    -

    __('Payment Method') ?>

    - getPaymentInfoHtml() ?> -
    -
    -

    __('Items Ordered') ?>

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

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

    -

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

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

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

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

    __('Shipping Address') ?>

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

    __('Billing Address') ?>

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

    __('Shipping Method') ?>

    - getShippingDescription() ?> -
    - -
    -

    __('Payment Method') ?>

    - getPaymentInfoHtml() ?> -
    -
    -
    -

    __('Items Refunded') ?>

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

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

    -

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

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

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

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

    __('Shipping Address') ?>

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

    __('Billing Address') ?>

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

    __('Shipping Method') ?>

    - getShippingDescription() ?> -
    - -
    -

    __('Payment Method') ?>

    - getPaymentInfoHtml() ?> -
    -
    -
    -

    __('Items Invoiced') ?>

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

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

    -

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

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

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

    -
    -
    -
    -

    __('Shipping Address') ?>

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

    __('Billing Address') ?>

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

    __('Shipping Method') ?>

    - getShippingDescription() ?> -
    -
    -

    __('Payment Method') ?>

    - getPaymentInfoHtml() ?> -
    -
    -
    -

    __('Items Shipped') ?>

    - - - - - - - - - - - - getItemsCollection(); ?> - - - getOrderItem()->getParentItem()) continue; ?> - - getItemHtml($_item) ?> - - -
    __('Product Name') ?>__('SKU') ?>__('Qty Shipped') ?>
    - - - - diff --git a/app/design/frontend/default/blank/template/sales/order/recent.phtml b/app/design/frontend/default/blank/template/sales/order/recent.phtml deleted file mode 100644 index 060dccb952..0000000000 --- a/app/design/frontend/default/blank/template/sales/order/recent.phtml +++ /dev/null @@ -1,75 +0,0 @@ - -
    -getOrders(); ?> -
    -

    __('Recent Orders') ?>

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

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

    - -
    diff --git a/app/design/frontend/default/blank/template/sales/order/shipment.phtml b/app/design/frontend/default/blank/template/sales/order/shipment.phtml deleted file mode 100644 index d09a1a14d4..0000000000 --- a/app/design/frontend/default/blank/template/sales/order/shipment.phtml +++ /dev/null @@ -1,61 +0,0 @@ - -helper('giftmessage/message')->getIsMessagesAvailable('order', $this->getOrder())): ?> - - - getChildHtml('shipment_items') ?> - 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 deleted file mode 100644 index 0ccded0f25..0000000000 --- a/app/design/frontend/default/blank/template/sales/order/shipment/items.phtml +++ /dev/null @@ -1,86 +0,0 @@ - -getOrder() ?> -

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

    -getShipmentsCollection() as $_shipment): ?> -__('Print Shipment') ?> -

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

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

    __('Items Shipped') ?>

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

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

    - -getChildHtml('order_items') ?> - -helper('giftmessage/message')->getIsMessagesAvailable('order', $_order) && $_order->getGiftMessageId()): ?> -

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

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

    __('About Your Order') ?>

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

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

    -
    -
    -

    __('Last ordered items') ?>

    -
    -
    -
      - - getItemsRandomCollection(5) as $_item): ?> - getProduct() && is_null($_item->getParentItem())): ?> -
    1. - getIsSalableItem($_item)): ?> - - - - - htmlEscape($_item->getName()) ?> -
    2. - - -
    - -
    - -
    - -
    - -
    -
    -
    -
    -getPagerHtml(); ?> - - diff --git a/app/design/frontend/default/blank/template/sendfriend/send.phtml b/app/design/frontend/default/blank/template/sendfriend/send.phtml deleted file mode 100644 index c7200e4d5a..0000000000 --- a/app/design/frontend/default/blank/template/sendfriend/send.phtml +++ /dev/null @@ -1,129 +0,0 @@ - - - -getMessagesBlock()->getGroupedHtml() ?> -
    -

    __('Email to a Friend') ?>

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

    __('Sender:') ?>

    -
      -
    • -
      -
      - -
      -
      -
      -
      -
    • -
    • - *
      - -
    • -
    -
    -
    -

    __('Recipient:') ?>

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

    - -

    - -
    -
    -
    - diff --git a/app/design/frontend/default/blank/template/shipping/tracking/ajax.phtml b/app/design/frontend/default/blank/template/shipping/tracking/ajax.phtml deleted file mode 100644 index 1bcb516224..0000000000 --- a/app/design/frontend/default/blank/template/shipping/tracking/ajax.phtml +++ /dev/null @@ -1,26 +0,0 @@ - diff --git a/app/design/frontend/default/blank/template/shipping/tracking/popup.phtml b/app/design/frontend/default/blank/template/shipping/tracking/popup.phtml deleted file mode 100644 index a00e746b9e..0000000000 --- a/app/design/frontend/default/blank/template/shipping/tracking/popup.phtml +++ /dev/null @@ -1,167 +0,0 @@ - -getTrackingInfo() ?> -
    - -
    -0): ?> - $_result): ?> - -

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

    - - 0): ?> - - - - - - - - - getCarrierTitle()): ?> - - - - - - getErrorMessage()): ?> - - - - - getTrackSummary()): ?> - - - - - getUrl()): ?> - - - - - - getStatus()): ?> - - - - - - - getDeliverydate()): ?> - - - - - - - getSignedby()): ?> - - - - - - - getDeliveryLocation()): ?> - - - - - - - getShippedDate()): ?> - - - - - - - getService()): ?> - - - - - - - getWeight()): ?> - - - - - - - - - - - - - - - -
    __('Tracking Number:'); ?>getTracking(); ?>
    __('Carrier:'); ?>getCarrierTitle(); ?>
    __('Error:'); ?>__('Tracking information is currently not available. Please ') ?>__('contact us') ?>__(' for more information or email us at '); ?>getStoreSupportEmail() ?>
    __('Info:'); ?>getTrackSummary(); ?>
    __('Track:'); ?>getUrl(); ?>
    __('Status:'); ?>getStatus(); ?>
    __('Delivered on:'); ?>formatDeliveryDateTime($track->getDeliverydate(),$track->getDeliverytime()); ?>
    __('Signed by:'); ?>getSignedby(); ?>
    __('Delivered to:'); ?>getDeliveryLocation(); ?>
    __('Shipped or billed on:'); ?>getShippedDate(); ?>
    __('Service Type:'); ?>getService(); ?>
    __('Weight:'); ?>getWeight(); ?>
    __('N/A')); ?>:
    - getProgressdetail())>0): ?> -
    - - - - - - - - - - getProgressdetail() as $_detail): ?> - formatDeliveryDate($_detail['deliverydate']) : '') ?> - formatDeliveryTime($_detail['deliverytime'], $_detailDate) : '') ?> - - - - - - - -
    __('Location') ?>__('Date') ?>__('Local Time') ?>__('Description') ?>
    - - - - - - - - -

    __('There is no tracking available for this shipment.'); ?>

    - - - - -
    __('There is no tracking available.'); ?>
    - -
    - -
    diff --git a/app/design/frontend/default/blank/template/tag/cloud.phtml b/app/design/frontend/default/blank/template/tag/cloud.phtml deleted file mode 100644 index 325d5cf31d..0000000000 --- a/app/design/frontend/default/blank/template/tag/cloud.phtml +++ /dev/null @@ -1,38 +0,0 @@ - -
    -

    __('All Tags') ?>

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

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

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

    __('Edit Tag') ?>

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

    __('Tag Information') ?>

    -

    -
    -
    - « __('Back to view Tag') ?> - -
    -
    - diff --git a/app/design/frontend/default/blank/template/tag/customer/recent.phtml b/app/design/frontend/default/blank/template/tag/customer/recent.phtml deleted file mode 100644 index 5fb009a623..0000000000 --- a/app/design/frontend/default/blank/template/tag/customer/recent.phtml +++ /dev/null @@ -1,49 +0,0 @@ - -
    -
    -

    __('My Recent Tags') ?>

    - __('View All Tags') ?> -
    -
      - - getCollection()->getItems() as $_item ): ?> -
    1. - -
      -

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

      -

      __('Tags:') ?>

      - - getProductTags() as $_tag ): ?> - htmlEscape($_tag->getName()) ?>getProductTags()->getItems())): ?>, - -
      -
    2. - -
    - -
    diff --git a/app/design/frontend/default/blank/template/tag/customer/tags.phtml b/app/design/frontend/default/blank/template/tag/customer/tags.phtml deleted file mode 100644 index e8fb14c5b9..0000000000 --- a/app/design/frontend/default/blank/template/tag/customer/tags.phtml +++ /dev/null @@ -1,43 +0,0 @@ - -getMessagesBlock()->getGroupedHtml() ?> -
    -

    __('My Tags') ?>

    -
    -getTags()): ?> -

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

    - - -

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

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

    __('My Tags') ?>

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

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

    -getToolbarHtml() ?> - -getMyProducts()) > 0 ): ?> - - - - - - getMyProducts() as $_product): ?> - class="odd"> - - - - - - - - - - - -
    <?php echo $this->htmlEscape($_product->getName()) ?> -

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

    - getReviewsSummaryHtml($_product, 'short') ?> - getPriceHtml($_product) ?> - getDescription() ?> -
    - isSaleable()): ?> - - - helper('wishlist')->isAllow()) : ?> -

    __('Add to Wishlist') ?>

    - -

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

    - -getToolbarHtml() ?> - diff --git a/app/design/frontend/default/blank/template/tag/list.phtml b/app/design/frontend/default/blank/template/tag/list.phtml deleted file mode 100644 index b7bbda258f..0000000000 --- a/app/design/frontend/default/blank/template/tag/list.phtml +++ /dev/null @@ -1,58 +0,0 @@ - -
    -

    __('Product Tags') ?>

    - getCount() ): ?> -

    __('Other people marked this product with these tags:') ?>

    - - -
    -
    - -
    - -
    - -
    -

    __("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 deleted file mode 100644 index 663de6d92b..0000000000 --- a/app/design/frontend/default/blank/template/tag/mytags.phtml +++ /dev/null @@ -1,75 +0,0 @@ - - - -getItems() as $tag) { /* $tag = $tag->getData();*/ ?> - - getTagname(); ?> - - e - d - - - diff --git a/app/design/frontend/default/blank/template/tag/popular.phtml b/app/design/frontend/default/blank/template/tag/popular.phtml deleted file mode 100644 index 89323a3776..0000000000 --- a/app/design/frontend/default/blank/template/tag/popular.phtml +++ /dev/null @@ -1,41 +0,0 @@ - -
    -
    -

    __('Popular Tags'); ?>

    -
    -
    - - -
    -
    diff --git a/app/design/frontend/default/blank/template/tag/product/result.phtml b/app/design/frontend/default/blank/template/tag/product/result.phtml deleted file mode 100644 index beeecfacad..0000000000 --- a/app/design/frontend/default/blank/template/tag/product/result.phtml +++ /dev/null @@ -1,65 +0,0 @@ - -getTagInfo()->getName() ): ?> -
    -

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

    -
    - -getListHtml() ?> - - getCount() > 0 ): ?> - - - - - - getProducts() as $_product): ?> - class="odd"> - - - - - - - - - - - -
    -

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

    - getPriceHtml($_product) ?> - getReviewsSummaryHtml($_product, 'short') ?> -

    getDescription() ?>

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

    __('Add to Wishlist') ?>

    - -

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

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

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

    -
    -
      - -
    • -

      -

      - - - -

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

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

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

    -

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

    - hasDescription($item)): ?>

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

    -

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

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

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

    -
    -getMessagesBlock()->getGroupedHtml() ?> -hasWishlistItems()): ?> -
    - - - - - - - - - - - - - getWishlistItems() as $item): ?> - - - - - - - -
    __('Product') ?>__('Comment') ?> 
    - - <?php echo $this->htmlEscape($item->getName()) ?> - -

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

    - getPriceHtml($item) ?> -
    getEscapedDescription($item) ?> - isSaleable()): ?> - __('Add to Cart') ?> -
    - __('Add to Wishlist') ?> -
    - - isSaleable()):?> -
    - -
    - -
    - -

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

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

    __('Share Your Wishlist') ?>

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

    __('Sharing Information') ?>

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

    __('* Required Fields') ?>

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

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

    -
    -
    -

    __('Last Added Items') ?>

    - hasWishlistItems()): ?> -
      - getWishlistItems() as $_item): ?> -
    1. - <?php echo $this->htmlEscape($_item->getName()) ?> -
      - <?php echo $this->__('Remove Item') ?> -

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

      - getPriceHtml($_item) ?> - isSaleable()): ?> - __('Add to Cart') ?> - -
      -
    2. - -
    - - -

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

    - - -
    -
    - diff --git a/app/design/frontend/default/blank/template/wishlist/view.phtml b/app/design/frontend/default/blank/template/wishlist/view.phtml deleted file mode 100644 index fea5b19468..0000000000 --- a/app/design/frontend/default/blank/template/wishlist/view.phtml +++ /dev/null @@ -1,111 +0,0 @@ - -getMessagesBlock()->getGroupedHtml() ?> -
    - helper('wishlist')->isRssAllow() && $this->hasWishlistItems()): ?> - __('RSS Feed') ?> - -

    __('My Wishlist') ?>

    -
    - -hasWishlistItems()): ?> -
    -
    - getBlockHtml('formkey')?> - - - - - - - - - - - - - - - - - getWishlistItems() as $item): ?> - - - - - - - - - -
    __('Product') ?>__('Comment') ?>__('Added On') ?>__('Add to Cart') ?> 
    - <?php echo $this->htmlEscape($item->getName()) ?> -

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

    - getPriceHtml($item) ?> -
    - - - getFormatedDate($item->getAddedAt()) ?> - - isSaleable()): ?> - - - - <?php echo $this->__('Remove Item') ?> -
    - -
    - - isSaleable()):?> -     - - -
    -
    -
    - -

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

    - - - diff --git a/app/design/frontend/default/default/etc/widget.xml b/app/design/frontend/default/default/etc/widget.xml new file mode 100644 index 0000000000..087d8a6f11 --- /dev/null +++ b/app/design/frontend/default/default/etc/widget.xml @@ -0,0 +1,166 @@ + + + + + + + + + + left + + + + content + + + + right + + + + + + + + + + + + left + + + + content + + + + right + + + + + + + + + + + + left + + + + content + + + + right + + + + + diff --git a/app/design/frontend/default/default/layout/amazonpayments.xml b/app/design/frontend/default/default/layout/amazonpayments.xml deleted file mode 100644 index 7507eb2e28..0000000000 --- a/app/design/frontend/default/default/layout/amazonpayments.xml +++ /dev/null @@ -1,61 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/app/design/frontend/default/default/layout/bundle.xml b/app/design/frontend/default/default/layout/bundle.xml deleted file mode 100644 index 6f2dfb7736..0000000000 --- a/app/design/frontend/default/default/layout/bundle.xml +++ /dev/null @@ -1,297 +0,0 @@ - - - - - - - - - bundlebundle/catalog_product_price - - - - - - bundlebundle/catalog_product_price - - - - - - bundlebundle/catalog_product_price - - - - - - bundlebundle/catalog_product_price - - - - - - bundlebundle/catalog_product_price - - - - - - bundlebundle/catalog_product_price - - - - - - bundlebundle/catalog_product_price - - - - - - bundlebundle/catalog_product_price - - - - - - bundlebundle/catalog_product_price - - - - - - bundlebundle/catalog_product_price - - - - - - bundlebundle/catalog_product_price - - - - - - bundlebundle/catalog_product_price - - - - - - - - - bundlebundle/catalog_product_price - bundle4 - - - - - - - - bundlebundle/checkout_cart_item_renderer - - - - - - bundlebundle/checkout_cart_item_renderer - - - - - - - - bundlebundle/checkout_cart_item_renderer - - - bundlebundle/catalog_product_price - - - - - - - - bundlebundle/checkout_cart_item_renderer - - - - - - bundlebundle/checkout_cart_item_renderer - - - - - - bundlebundle/checkout_cart_item_renderer - - - bundlebundle/checkout_cart_item_renderer - - - - - - bundlebundle/checkout_cart_item_renderer - - - - - - - - skin_jsjs/bundle.js - - - - bundlebundle/catalog_product_price - - - - - - selectbundle/catalog_product_view_type_bundle_option_select - multibundle/catalog_product_view_type_bundle_option_multi - radiobundle/catalog_product_view_type_bundle_option_radio - checkboxbundle/catalog_product_view_type_bundle_option_checkbox - - product.info.bundle.options - - - - - - - bundlebundle/catalog_product_price - - - - - - bundlebundle/sales_order_items_renderer - - - - - - bundlebundle/sales_order_items_renderer - - - - - - bundlebundle/sales_order_items_renderer - - - - - - bundlebundle/sales_order_items_renderer - - - - - - - - bundlebundle/sales_order_items_renderer - - - - - - bundlebundle/sales_order_items_renderer - - - - - - bundlebundle/sales_order_items_renderer - - - - - - bundlebundle/sales_order_items_renderer - - - - - - - bundlebundle/sales_order_items_renderer - - - - - - bundlebundle/sales_order_items_renderer - - - - - - - bundlebundle/sales_order_items_renderer - - - - - - bundlebundle/sales_order_items_renderer - - - - diff --git a/app/design/frontend/default/default/layout/catalog.xml b/app/design/frontend/default/default/layout/catalog.xml deleted file mode 100644 index 2a7719c341..0000000000 --- a/app/design/frontend/default/default/layout/catalog.xml +++ /dev/null @@ -1,379 +0,0 @@ - - - - - - - - - - - - - - - images/media/col_left_callout.jpg - Our customer service is available 24/7. Call us at (555) 555-0123. - checkout/cart - - - - - - - - Site Map - - - - - - - - - - - - - - - - - - - product_list_toolbar - - - - - - - - - - - - - - - - - - - - product_list_toolbar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - catalog.compare.sidebar - - - - - - - - - - - - - - js_csscalendar/calendar-win2k-1.css - jscalendar/calendar.js - jscalendar/calendar-setup.js - - - - - - - - - - - 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 - - - - - - - - - - - - seo.sitemap.tree.pager.top - seo.sitemap.tree.pager.bottom - - - - - - - - Products - - seo.sitemap.pager.top - seo.sitemap.pager.bottom - products - - - - Categories Sitemap - - - - - - - - - - - - - - - - - - diff --git a/app/design/frontend/default/default/layout/catalogsearch.xml b/app/design/frontend/default/default/layout/catalogsearch.xml deleted file mode 100644 index 36d61a8696..0000000000 --- a/app/design/frontend/default/default/layout/catalogsearch.xml +++ /dev/null @@ -1,120 +0,0 @@ - - - - - - - - - - - - - Search Terms - - - - - Advanced Search - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - js_csscalendar/calendar-win2k-1.css - jscalendar/calendar.js - jscalendar/calendar-setup.js - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/app/design/frontend/default/default/layout/checkout.xml b/app/design/frontend/default/default/layout/checkout.xml deleted file mode 100644 index 9a2508e393..0000000000 --- a/app/design/frontend/default/default/layout/checkout.xml +++ /dev/null @@ -1,384 +0,0 @@ - - - - - - - - - - - - - - - - - - simplecheckout/cart_item_renderer - groupedcheckout/cart_item_renderer_grouped - configurablecheckout/cart_item_renderer_configurable - - - - - - - - - - - - - - - - - - checkout/cart.phtml - checkout/cart/noItems.phtml - - simplecheckout/cart_item_renderer - groupedcheckout/cart_item_renderer_grouped - configurablecheckout/cart_item_renderer_configurable - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - defaultcheckout/cart_item_renderer - groupedcheckout/cart_item_renderer_grouped - configurablecheckout/cart_item_renderer_configurable - - - - - - - - - - - - defaultcheckout/cart_item_renderer - groupedcheckout/cart_item_renderer_grouped - configurablecheckout/cart_item_renderer_configurable - - - defaultcheckout/cart_item_renderer - groupedcheckout/cart_item_renderer_grouped - configurablecheckout/cart_item_renderer_configurable - - - - - - - - - - - - - purchaseorder - - - - - - - - - - - - - - - defaultcheckout/cart_item_renderer - groupedcheckout/cart_item_renderer_grouped - configurablecheckout/cart_item_renderer_configurable - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - checkout-progress-wrapper - - - - - - - - - - - - - - - purchaseorder - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - purchaseorder - - - - - - - - - - - - - - - - - - - - - 1 - - - - - - - - - - - - defaultcheckout/cart_item_renderer - groupedcheckout/cart_item_renderer_grouped - configurablecheckout/cart_item_renderer_configurable - - - - - - - - - - - - - - - - - - - - - diff --git a/app/design/frontend/default/default/layout/chronopay.xml b/app/design/frontend/default/default/layout/chronopay.xml deleted file mode 100644 index 5856261187..0000000000 --- a/app/design/frontend/default/default/layout/chronopay.xml +++ /dev/null @@ -1,42 +0,0 @@ - - - - - - - - - - - - - - diff --git a/app/design/frontend/default/default/layout/cms.xml b/app/design/frontend/default/default/layout/cms.xml deleted file mode 100644 index a27047027f..0000000000 --- a/app/design/frontend/default/default/layout/cms.xml +++ /dev/null @@ -1,76 +0,0 @@ - - - - - - - - - - footer_links - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/app/design/frontend/default/default/layout/contacts.xml b/app/design/frontend/default/default/layout/contacts.xml deleted file mode 100644 index 2c026b0b82..0000000000 --- a/app/design/frontend/default/default/layout/contacts.xml +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - contactsContact Ustrue - - - - - - - Contact Us - - - - - - diff --git a/app/design/frontend/default/default/layout/core.xml b/app/design/frontend/default/default/layout/core.xml deleted file mode 100644 index b9fe727305..0000000000 --- a/app/design/frontend/default/default/layout/core.xml +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - diff --git a/app/design/frontend/default/default/layout/customer.xml b/app/design/frontend/default/default/layout/customer.xml deleted file mode 100644 index 674d767e20..0000000000 --- a/app/design/frontend/default/default/layout/customer.xml +++ /dev/null @@ -1,252 +0,0 @@ - - - - - - - - - - - My Account10 - - - - - - - - Log Out100 - - - - - - - - Log In100 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Password forgotten - - - - - - - - - - - - - - Send confirmation link - - - - - - - - - - Edit Account Info - - - - - - - left.permanent.callout - - - - - - - - - - - - - - accountcustomer/account/ - account_editcustomer/account/edit/ - address_bookcustomer/address/ - - - simplecheckout/cart_item_renderer - groupedcheckout/cart_item_renderer_grouped - configurablecheckout/cart_item_renderer_configurable - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/app/design/frontend/default/default/layout/cybermut.xml b/app/design/frontend/default/default/layout/cybermut.xml deleted file mode 100644 index 6aa6757118..0000000000 --- a/app/design/frontend/default/default/layout/cybermut.xml +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - - - - - - - - diff --git a/app/design/frontend/default/default/layout/directory.xml b/app/design/frontend/default/default/layout/directory.xml deleted file mode 100644 index 211fe29eac..0000000000 --- a/app/design/frontend/default/default/layout/directory.xml +++ /dev/null @@ -1,74 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/app/design/frontend/default/default/layout/downloadable.xml b/app/design/frontend/default/default/layout/downloadable.xml deleted file mode 100644 index 0f98439f54..0000000000 --- a/app/design/frontend/default/default/layout/downloadable.xml +++ /dev/null @@ -1,167 +0,0 @@ - - - - - - - downloadable_productsdownloadable/customer/products - - - - - - - - - - My Downloadable Products - - - - - - downloadabledownloadable/checkout_cart_item_renderer - - - - - - downloadabledownloadable/checkout_cart_item_renderer - - - - - - - - - - - - downloadabledownloadable/checkout_cart_item_renderer - - - - - - downloadabledownloadable/checkout_cart_item_renderer - - - - - - downloadabledownloadable/checkout_cart_item_renderer - - - - - - - - - - - - downloadabledownloadable/sales_order_item_renderer_downloadable - - - - - - downloadabledownloadable/sales_order_item_renderer_downloadable - - - - - - downloadabledownloadable/sales_order_item_renderer_downloadable - - - - - - - - downloadabledownloadable/sales_order_item_renderer_downloadable - - - - - - downloadabledownloadable/sales_order_item_renderer_downloadable - - - - - - downloadabledownloadable/sales_order_item_renderer_downloadable - - - - - - - - - - downloadabledownloadable/sales_order_email_items_order_downloadable - - - - - - downloadabledownloadable/sales_order_email_items_downloadable - - - - - - downloadabledownloadable/sales_order_email_items_downloadable - - - - - - - - - - - - product.info.downloadable.options - - - - diff --git a/app/design/frontend/default/default/layout/eway.xml b/app/design/frontend/default/default/layout/eway.xml deleted file mode 100644 index 9105eb6f26..0000000000 --- a/app/design/frontend/default/default/layout/eway.xml +++ /dev/null @@ -1,53 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/app/design/frontend/default/default/layout/giftmessage.xml b/app/design/frontend/default/default/layout/giftmessage.xml deleted file mode 100644 index 00a1360432..0000000000 --- a/app/design/frontend/default/default/layout/giftmessage.xml +++ /dev/null @@ -1,71 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - save - - - - - - - - - - - - remove - - - - - diff --git a/app/design/frontend/default/default/layout/googleanalytics.xml b/app/design/frontend/default/default/layout/googleanalytics.xml deleted file mode 100644 index 4076951ede..0000000000 --- a/app/design/frontend/default/default/layout/googleanalytics.xml +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - - - - - - - diff --git a/app/design/frontend/default/default/layout/googlecheckout.xml b/app/design/frontend/default/default/layout/googlecheckout.xml deleted file mode 100644 index 43d4accff1..0000000000 --- a/app/design/frontend/default/default/layout/googlecheckout.xml +++ /dev/null @@ -1,53 +0,0 @@ - - - - - - - - - - - - - - - true - - - - - - - - - - - - diff --git a/app/design/frontend/default/default/layout/googleoptimizer.xml b/app/design/frontend/default/default/layout/googleoptimizer.xml deleted file mode 100644 index 124f5293c1..0000000000 --- a/app/design/frontend/default/default/layout/googleoptimizer.xml +++ /dev/null @@ -1,153 +0,0 @@ - - - - - - - - - - control_script - - - - - tracking_script - - - - - - - - control_script - - - - - tracking_script - - - - - - - - control_script - - - - - tracking_script - - - - - - - - control_script - - - - - tracking_script - - - - - - - - control_script - - - - - tracking_script - - - - - - - - conversion_script - checkout_cart - - - - - - - - conversion_script - checkout_onepage - - - - - - - - conversion_script - checkout_onepage_success - - - - - - - - conversion_script - checkout_multishipping_success - - - - - - - - conversion_script - checkout_multishipping - - - - - - - - conversion_script - customer_account_create - - - - - diff --git a/app/design/frontend/default/default/layout/ideal.xml b/app/design/frontend/default/default/layout/ideal.xml deleted file mode 100644 index e6b08ea1e3..0000000000 --- a/app/design/frontend/default/default/layout/ideal.xml +++ /dev/null @@ -1,51 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - diff --git a/app/design/frontend/default/default/layout/newsletter.xml b/app/design/frontend/default/default/layout/newsletter.xml deleted file mode 100644 index 7babe0ecce..0000000000 --- a/app/design/frontend/default/default/layout/newsletter.xml +++ /dev/null @@ -1,69 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - newsletternewsletter/manage/ - - - - - - - right.newsletter - - - - - - - - - - - diff --git a/app/design/frontend/default/default/layout/ogone.xml b/app/design/frontend/default/default/layout/ogone.xml deleted file mode 100644 index 04c102fa8f..0000000000 --- a/app/design/frontend/default/default/layout/ogone.xml +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - diff --git a/app/design/frontend/default/default/layout/oscommerce.xml b/app/design/frontend/default/default/layout/oscommerce.xml deleted file mode 100644 index 82d177c02d..0000000000 --- a/app/design/frontend/default/default/layout/oscommerce.xml +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/app/design/frontend/default/default/layout/page.xml b/app/design/frontend/default/default/layout/page.xml deleted file mode 100644 index b5e7fd3232..0000000000 --- a/app/design/frontend/default/default/layout/page.xml +++ /dev/null @@ -1,163 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - css/reset.css - css/boxes.css - css/menu.css - css/clears.css - - skin_csscss/iestyles.csslt IE 8 - skin_csscss/ie7minus.csslt IE 7 - - jslib/ds-sleight.jslt IE 7 - jsvarien/iehover-fix.jslt IE 7 - - css/print.cssmedia="print" - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - css/reset.css - css/boxes.css - css/menu.css - css/clears.css - - skin_csscss/iestyles.csslt IE 8 - skin_csscss/ie7minus.csslt IE 7 - - jslib/ds-sleight.jslt IE 7 - jsvarien/iehover-fix.jslt IE 7 - - css/print.cssmedia="print" - - - - - - - - - - - - - 1 - - - - - - - - 1 - - - - - - - - 1 - - - - - - - - 1 - - - - - - - - 1 - - - diff --git a/app/design/frontend/default/default/layout/paybox.xml b/app/design/frontend/default/default/layout/paybox.xml deleted file mode 100644 index e5d30b1b40..0000000000 --- a/app/design/frontend/default/default/layout/paybox.xml +++ /dev/null @@ -1,56 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/app/design/frontend/default/default/layout/paypal.xml b/app/design/frontend/default/default/layout/paypal.xml deleted file mode 100644 index 0ad18c7aef..0000000000 --- a/app/design/frontend/default/default/layout/paypal.xml +++ /dev/null @@ -1,70 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/app/design/frontend/default/default/layout/paypaluk.xml b/app/design/frontend/default/default/layout/paypaluk.xml deleted file mode 100644 index eb00e36a86..0000000000 --- a/app/design/frontend/default/default/layout/paypaluk.xml +++ /dev/null @@ -1,70 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/app/design/frontend/default/default/layout/poll.xml b/app/design/frontend/default/default/layout/poll.xml deleted file mode 100644 index fbf6cfc456..0000000000 --- a/app/design/frontend/default/default/layout/poll.xml +++ /dev/null @@ -1,57 +0,0 @@ - - - - - - - - - - - - poll - results - - - - - - - - - - right.poll - - - - diff --git a/app/design/frontend/default/default/layout/productalert.xml b/app/design/frontend/default/default/layout/productalert.xml deleted file mode 100644 index ab70f70bd2..0000000000 --- a/app/design/frontend/default/default/layout/productalert.xml +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - - - - - - - - - diff --git a/app/design/frontend/default/default/layout/protx.xml b/app/design/frontend/default/default/layout/protx.xml deleted file mode 100644 index 3602c974da..0000000000 --- a/app/design/frontend/default/default/layout/protx.xml +++ /dev/null @@ -1,43 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/app/design/frontend/default/default/layout/reports.xml b/app/design/frontend/default/default/layout/reports.xml deleted file mode 100644 index b47d0cf144..0000000000 --- a/app/design/frontend/default/default/layout/reports.xml +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - - diff --git a/app/design/frontend/default/default/layout/review.xml b/app/design/frontend/default/default/layout/review.xml deleted file mode 100644 index 80efbb929a..0000000000 --- a/app/design/frontend/default/default/layout/review.xml +++ /dev/null @@ -1,117 +0,0 @@ - - - - - - - - reviewsreview/customer - - - - - - - - - - - customer_account_dashboard_info1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/app/design/frontend/default/default/layout/rss.xml b/app/design/frontend/default/default/layout/rss.xml deleted file mode 100644 index c98545dce9..0000000000 --- a/app/design/frontend/default/default/layout/rss.xml +++ /dev/null @@ -1,92 +0,0 @@ - - - - - - rssRSS testingtrue
  • class="link-feed" - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/app/design/frontend/default/default/layout/sales.xml b/app/design/frontend/default/default/layout/sales.xml deleted file mode 100644 index 615b916743..0000000000 --- a/app/design/frontend/default/default/layout/sales.xml +++ /dev/null @@ -1,276 +0,0 @@ - - - - - - - - - - - - - - - - - - reorder - - - - - - - orderssales/order/history/ - - - - - - - - - - top - - - - - - - - - - - - - - - - - - - - - defaultsales/order_item_renderer_default - groupedsales/order_item_renderer_grouped - - colspan="4" class="a-right" - class="last a-right" - - - - - - - view - invoice*/*/invoice - shipment*/*/shipment - creditmemo*/*/creditmemo - - - - - - - - - - defaultsales/order_item_renderer_default - groupedsales/order_item_renderer_grouped - - colspan="4" class="a-right" - class="last a-right" - - - - - - - view*/*/view - invoice - shipment*/*/shipment - creditmemo*/*/creditmemo - - - - - - - - - - defaultsales/order_item_renderer_default - - - - - view*/*/view - invoice*/*/invoice - shipment - creditmemo*/*/creditmemo - - - - - - - - - - defaultsales/order_item_renderer_default - groupedsales/order_item_renderer_grouped - - colspan="6" align="right" style="padding:3px 9px" - align="right" style="padding:3px 9px" - - - - - - - view*/*/view - invoice*/*/invoice - shipment*/*/shipment - creditmemo - - - - - - - - - - - - - - defaultsales/order_item_renderer_default - groupedsales/order_item_renderer_grouped - - colspan="4" class="a-right" - class="last a-right" - - 1 - - - - - - - - - - defaultsales/order_item_renderer_default - groupedsales/order_item_renderer_grouped - - colspan="4" class="a-right" - class="last a-right" - - - - - - - - - - defaultsales/order_item_renderer_default - - - - - - - - defaultsales/order_item_renderer_default - groupedsales/order_item_renderer_grouped - - colspan="6" align="right" style="padding:3px 9px" - align="right" style="padding:3px 9px" - - - - - - - - - - defaultsales/order_email_items_order_default - groupedsales/order_email_items_order_grouped - - colspan="3" align="right" style="padding:3px 9px" - align="right" style="padding:3px 9px" - - 1 - - - - - - - - defaultsales/order_email_items_default - groupedsales/order_email_items_order_grouped - - colspan="3" align="right" style="padding:3px 9px" - align="right" style="padding:3px 9px" - - - - - - - - defaultsales/order_email_items_default - - - - - - defaultsales/order_email_items_default - groupedsales/order_email_items_order_grouped - - colspan="3" align="right" style="padding:3px 9px" - align="right" style="padding:3px 9px" - - - - - - diff --git a/app/design/frontend/default/default/layout/sendfriend.xml b/app/design/frontend/default/default/layout/sendfriend.xml deleted file mode 100644 index 9c8f5e930b..0000000000 --- a/app/design/frontend/default/default/layout/sendfriend.xml +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/app/design/frontend/default/default/layout/shipping.xml b/app/design/frontend/default/default/layout/shipping.xml deleted file mode 100644 index 92c8118c1f..0000000000 --- a/app/design/frontend/default/default/layout/shipping.xml +++ /dev/null @@ -1,51 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - diff --git a/app/design/frontend/default/default/layout/tag.xml b/app/design/frontend/default/default/layout/tag.xml deleted file mode 100644 index e8273f35b8..0000000000 --- a/app/design/frontend/default/default/layout/tag.xml +++ /dev/null @@ -1,130 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - tagstag/customer/ - - - - - - - - - customer_account_dashboard_info2 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - My Account - - - - - - - - - - My Account - - - - - - - - - - My Account - - - - - - diff --git a/app/design/frontend/default/default/layout/wishlist.xml b/app/design/frontend/default/default/layout/wishlist.xml deleted file mode 100644 index e56202348e..0000000000 --- a/app/design/frontend/default/default/layout/wishlist.xml +++ /dev/null @@ -1,104 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - wishlistwishlist/ - - - - - - - - - wishlist - - - - - - - - - - - - - wishlist_customer_sidebar - - - - - - - - - - - wishlist_customer_sidebar - - - - - - - - - - diff --git a/app/design/frontend/default/default/template/amazonpayments/asp/form.phtml b/app/design/frontend/default/default/template/amazonpayments/asp/form.phtml deleted file mode 100644 index b1b1c4c0a8..0000000000 --- a/app/design/frontend/default/default/template/amazonpayments/asp/form.phtml +++ /dev/null @@ -1,35 +0,0 @@ - -
    - getMethodCode() ?> - -
    diff --git a/app/design/frontend/default/default/template/amazonpayments/asp/redirect.phtml b/app/design/frontend/default/default/template/amazonpayments/asp/redirect.phtml deleted file mode 100644 index e9b6dcb7b8..0000000000 --- a/app/design/frontend/default/default/template/amazonpayments/asp/redirect.phtml +++ /dev/null @@ -1,37 +0,0 @@ - - - - getRedirectMessage()); ?> -
    - getRedirectParams() as $name => $value) { ?> - - -
    - - - diff --git a/app/design/frontend/default/default/template/amazonpayments/asp/shortcut.phtml b/app/design/frontend/default/default/template/amazonpayments/asp/shortcut.phtml deleted file mode 100644 index 14a7ea236f..0000000000 --- a/app/design/frontend/default/default/template/amazonpayments/asp/shortcut.phtml +++ /dev/null @@ -1,33 +0,0 @@ - - - - diff --git a/app/design/frontend/default/default/template/amazonpayments/cba/form.phtml b/app/design/frontend/default/default/template/amazonpayments/cba/form.phtml deleted file mode 100644 index a3f914aa51..0000000000 --- a/app/design/frontend/default/default/template/amazonpayments/cba/form.phtml +++ /dev/null @@ -1,35 +0,0 @@ - -
    - getMethodCode() ?> - -
    diff --git a/app/design/frontend/default/default/template/amazonpayments/cba/success.phtml b/app/design/frontend/default/default/template/amazonpayments/cba/success.phtml deleted file mode 100644 index ef0afd5f15..0000000000 --- a/app/design/frontend/default/default/template/amazonpayments/cba/success.phtml +++ /dev/null @@ -1,35 +0,0 @@ - -SUCCESS -
    -

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

    -
    -

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

    -

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

    -
    - -
    diff --git a/app/design/frontend/default/default/template/amazonpayments/form.phtml b/app/design/frontend/default/default/template/amazonpayments/form.phtml deleted file mode 100644 index a82b2f28a6..0000000000 --- a/app/design/frontend/default/default/template/amazonpayments/form.phtml +++ /dev/null @@ -1,34 +0,0 @@ - -
    - getMethodCode() ?> - -
    \ No newline at end of file diff --git a/app/design/frontend/default/default/template/amazonpayments/link.phtml b/app/design/frontend/default/default/template/amazonpayments/link.phtml deleted file mode 100644 index 16fa4c57ae..0000000000 --- a/app/design/frontend/default/default/template/amazonpayments/link.phtml +++ /dev/null @@ -1,49 +0,0 @@ - - -
  • - getIsDisabled()): ?> - getIsOneClickEnabled()): ?> - - - -
    - -
    - - <?php echo Mage::helper('amazonpayments')->__('Checkout by Amazon');?> - - -
  • 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 deleted file mode 100644 index 746e24ce09..0000000000 --- a/app/design/frontend/default/default/template/bundle/catalog/product/list/partof.phtml +++ /dev/null @@ -1,52 +0,0 @@ - -getItemCollection()->getSize()): ?> -
    -

    __('This product is also part of bundle(s)') ?>

    - - setColumnCount(4); // uncomment this line if you want to have another number of columns ?> - resetItemsIterator() ?> - getRowCount();$_i++): ?> - - getColumnCount();$_j++): ?> - getIterableItem()): ?> - - - - - - - -
    -

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

    -
    htmlEscape($_bundle->getName()) ?>
    - getPriceHtml($_bundle, true) ?> - getReviewsSummaryHtml($_bundle) ?> -
     
    - -
    - 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 deleted file mode 100644 index 0eed28b769..0000000000 --- a/app/design/frontend/default/default/template/bundle/catalog/product/price.phtml +++ /dev/null @@ -1,263 +0,0 @@ - - -getProduct() ?> -getPriceModel()->getPrices($_product) ?> -getId() ?> - - - -getPrice($_product, $_minimalPrice); ?> -getPrice($_product, $_minimalPrice, true); ?> - -getPriceType() == 1) { - $_weeeTaxAmount = Mage::helper('weee')->getAmount($_product); - if ($_weeeTaxAmount && Mage::helper('weee')->typeOfDisplay($_product, array(0, 1, 4))) { - $_minimalPriceTax += $_weeeTaxAmount; - $_minimalPriceInclTax += $_weeeTaxAmount; - } - if ($_weeeTaxAmount && Mage::helper('weee')->typeOfDisplay($_product, 2)) { - $_minimalPriceInclTax += $_weeeTaxAmount; - } - - if (Mage::helper('weee')->typeOfDisplay($_product, array(1,2,4))) { - $_weeeTaxAttributes = Mage::helper('weee')->getProductWeeeAttributesForDisplay($_product); - } -} -?> - -
    - getPriceView()): ?> -

    - __('As low as') ?>: - helper('tax')->displayBothPrices()): ?> - - __('Excl. Tax:') ?> - currency($_minimalPriceTax) ?> - - getPriceType() == 1 && Mage::helper('weee')->typeOfDisplay($_product, array(2, 1, 4))): ?> - ( - - typeOfDisplay($_product, array(2, 4))): ?> - getAmount()+$_weeeTaxAttribute->getTaxAmount(); ?> - - getAmount(); ?> - - - - getName(); ?>: currency($amount, true, true); ?> - - - ) - - - __('Incl. Tax:') ?> - currency($_minimalPriceInclTax) ?> - - - currency($_minimalPriceTax) ?> - getPriceType() == 1 && Mage::helper('weee')->typeOfDisplay($_product, array(2, 1, 4))): ?> - ( - - typeOfDisplay($_product, array(2, 4))): ?> - getAmount()+$_weeeTaxAttribute->getTaxAmount(); ?> - - getAmount(); ?> - - - - getName(); ?>: currency($amount, true, true); ?> - - - ) - - typeOfDisplay($_product, 2) && $_weeeTaxAmount): ?> - currency($_minimalPriceInclTax) ?> - - -

    - - $_maximalPrice): ?> -

    - __('From') ?>: - helper('tax')->displayBothPrices()): ?> - - __('Excl. Tax:') ?> - currency($_minimalPriceTax) ?> - - getPriceType() == 1 && Mage::helper('weee')->typeOfDisplay($_product, array(2, 1, 4))): ?> - ( - - typeOfDisplay($_product, array(2, 4))): ?> - getAmount()+$_weeeTaxAttribute->getTaxAmount(); ?> - - getAmount(); ?> - - - - getName(); ?>: currency($amount, true, true); ?> - - - ) - - - __('Incl. Tax:') ?> - currency($_minimalPriceInclTax) ?> - - - currency($_minimalPriceTax) ?> - getPriceType() == 1 && Mage::helper('weee')->typeOfDisplay($_product, array(2, 1, 4))): ?> - ( - - typeOfDisplay($_product, array(2, 4))): ?> - getAmount()+$_weeeTaxAttribute->getTaxAmount(); ?> - - getAmount(); ?> - - - - getName(); ?>: currency($amount, true, true); ?> - - - ) - - typeOfDisplay($_product, 2) && $_weeeTaxAmount): ?> - currency($_minimalPriceInclTax) ?> - - -

    - getPrice($_product, $_maximalPrice); ?> - getPrice($_product, $_maximalPrice, true); ?> - getPriceType() == 1) { - if ($_weeeTaxAmount && Mage::helper('weee')->typeOfDisplay($_product, array(0, 1, 4))) { - $_maximalPriceTax += $_weeeTaxAmount; - $_maximalPriceInclTax += $_weeeTaxAmount; - } - if ($_weeeTaxAmount && Mage::helper('weee')->typeOfDisplay($_product, 2)) { - $_maximalPriceInclTax += $_weeeTaxAmount; - } - } - ?> -

    - __('To') ?>: - helper('tax')->displayBothPrices()): ?> - - __('Excl. Tax:') ?> - currency($_maximalPriceTax) ?> - - getPriceType() == 1 && Mage::helper('weee')->typeOfDisplay($_product, array(2, 1, 4))): ?> - ( - - typeOfDisplay($_product, array(2, 4))): ?> - getAmount()+$_weeeTaxAttribute->getTaxAmount(); ?> - - getAmount(); ?> - - - - getName(); ?>: currency($amount, true, true); ?> - - - ) - - - __('Incl. Tax') ?> - currency($_maximalPriceInclTax) ?> - - - currency($_maximalPriceTax) ?> - getPriceType() == 1 && Mage::helper('weee')->typeOfDisplay($_product, array(2, 1, 4))): ?> - ( - - typeOfDisplay($_product, array(2, 4))): ?> - getAmount()+$_weeeTaxAttribute->getTaxAmount(); ?> - - getAmount(); ?> - - - - getName(); ?>: currency($amount, true, true); ?> - - - ) - - typeOfDisplay($_product, 2) && $_weeeTaxAmount): ?> - currency($_maximalPriceInclTax) ?> - - -

    - - helper('tax')->displayBothPrices()): ?> - - __('Excl. Tax:') ?> - currency($_minimalPriceTax) ?> - - getPriceType() == 1 && Mage::helper('weee')->typeOfDisplay($_product, array(2, 1, 4))): ?> - ( - - typeOfDisplay($_product, array(2, 4))): ?> - getAmount()+$_weeeTaxAttribute->getTaxAmount(); ?> - - getAmount(); ?> - - - - getName(); ?>: currency($amount, true, true); ?> - - - ) - - - __('Incl. Tax:') ?> - currency($_minimalPriceInclTax) ?> - - - currency($_minimalPriceTax) ?> - getPriceType() == 1 && Mage::helper('weee')->typeOfDisplay($_product, array(2, 1, 4))): ?> - ( - - typeOfDisplay($_product, array(2, 4))): ?> - getAmount()+$_weeeTaxAttribute->getTaxAmount(); ?> - - getAmount(); ?> - - - - getName(); ?>: currency($amount, true, true); ?> - - - ) - - typeOfDisplay($_product, 2) && $_weeeTaxAmount): ?> - currency($_minimalPriceInclTax) ?> - - - - -
    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 deleted file mode 100644 index 34f9cfe426..0000000000 --- a/app/design/frontend/default/default/template/bundle/catalog/product/view/price.phtml +++ /dev/null @@ -1,93 +0,0 @@ - -getProduct() ?> -getPrice($_product, $_product->getFinalPrice()); ?> -getPrice($_product, $_product->getFinalPrice(), true); ?> - -getPriceType() == 1) { - $_weeeTaxAmount = Mage::helper('weee')->getAmount($_product); - if (Mage::helper('weee')->typeOfDisplay($_product, array(1,2,4))) { - $_weeeTaxAttributes = Mage::helper('weee')->getProductWeeeAttributesForDisplay($_product); - } -} -?> - -
    -

    - helper('bundle')->__('Price as configured') ?>: - helper('tax')->displayBothPrices()): ?> - - - __('Excl. Tax:') ?> - currency($_finalPrice,true,false) ?> - - getPriceType() == 1 && Mage::helper('weee')->typeOfDisplay($_product, array(2, 1, 4))): ?> - ( - - typeOfDisplay($_product, array(2, 4))): ?> - getAmount()+$_weeeTaxAttribute->getTaxAmount(); ?> - - getAmount(); ?> - - - - getName(); ?>: currency($amount, true, true); ?> - - - ) - - - __('Incl. Tax:') ?> - currency($_finalPriceInclTax,true,false) ?> - - - - currency($_finalPrice,true,false) ?> - getPriceType() == 1 && Mage::helper('weee')->typeOfDisplay($_product, array(2, 1, 4))): ?> - ( - - typeOfDisplay($_product, array(2, 4))): ?> - getAmount()+$_weeeTaxAttribute->getTaxAmount(); ?> - - getAmount(); ?> - - - - getName(); ?>: currency($amount, true, true); ?> - - - ) - - -

    -
    -isSaleable()): ?> - - 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 deleted file mode 100644 index 1f3036e2bf..0000000000 --- a/app/design/frontend/default/default/template/bundle/catalog/product/view/tierprices.phtml +++ /dev/null @@ -1,41 +0,0 @@ - - -getProduct(); -$_tierPrices = $this->getTierPrices(); -?> - 0): ?> -
      - -
    • __('Buy %1$s with %2$s discount each', $_price['price_qty'], ''.($_price['price']*1).'%') ?>
    • - -
    - 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 deleted file mode 100644 index 62c92c2b98..0000000000 --- a/app/design/frontend/default/default/template/bundle/catalog/product/view/type/bundle.phtml +++ /dev/null @@ -1,42 +0,0 @@ - -getProduct() ?> - -isSaleable()): ?> - -

    helper('catalog')->__('Availability') ?>: helper('catalog')->__('In stock.') ?>

    - -

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

    - - -
    - getPriceHtml($_product) ?> -
    -getChildHtml('bundle_prices') ?> 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 deleted file mode 100644 index ed750649f3..0000000000 --- a/app/design/frontend/default/default/template/bundle/catalog/product/view/type/bundle/option/checkbox.phtml +++ /dev/null @@ -1,49 +0,0 @@ - - -getOption() ?> -getSelections() ?> -
    -decoratedIsLast){?> class="last"> -getRequired()): ?> - getSelectionQtyTitlePrice($_selections[0]) ?> - - -
      - -
    • getIsDefault() && $_selection->isSaleable())?' checked="checked" ':'' ?>isSaleable()?' disabled="disabled" ':'' ?> value="getSelectionId() ?>" /> - - getRequired()): ?> - setValidationContainer('bundle-option-'.$_option->getId().'-'.$_selection->getSelectionId(), 'bundle-option-'.$_option->getId().'-container') ?> - -
    • - -
    - - - 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 deleted file mode 100644 index 79315ff8c6..0000000000 --- a/app/design/frontend/default/default/template/bundle/catalog/product/view/type/bundle/option/multi.phtml +++ /dev/null @@ -1,46 +0,0 @@ - - -getOption() ?> -getSelections() ?> -
    -decoratedIsLast){?> class="last"> - getRequired()): ?> - getSelectionQtyTitlePrice($_selections[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 deleted file mode 100644 index 299107c64e..0000000000 --- a/app/design/frontend/default/default/template/bundle/catalog/product/view/type/bundle/option/radio.phtml +++ /dev/null @@ -1,72 +0,0 @@ - - -getOption() ?> -getSelections() ?> -getDefaultSelection() ?> -getRequired()) ?> -
    - - - getSelectionQty()*1 ?> - getSelectionCanChangeQty() ?> - - - - - - getSelectionQty()*1 ?> - getSelectionCanChangeQty() ?> - - - id="bundle-option-getId() ?>-qty-input" class="input-text qty" type="text" name="bundle_option_qty[getId() ?>]" value="" /> - -
    -decoratedIsLast){?> class="last"> - getRequired()): ?> - getSelectionTitlePrice($_selections[0]) ?> - - -
      - getRequired()): ?> -
    • isSalable())?'':' checked="checked" ' ?> value="" /> - -
    • - - -
    • getIsDefault() && $_selection->isSaleable())?' checked="checked" ':'' ?>isSaleable()?' disabled="disabled" ':'' ?> value="getSelectionId() ?>" /> - - getRequired()): ?> - setValidationContainer('bundle-option-'.$_option->getId().'-'.$_selection->getSelectionId(), 'bundle-option-'.$_option->getId().'-container') ?> - -
    • - -
    - - - 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 deleted file mode 100644 index 1f509224ef..0000000000 --- a/app/design/frontend/default/default/template/bundle/catalog/product/view/type/bundle/option/select.phtml +++ /dev/null @@ -1,61 +0,0 @@ - - -getOption() ?> -getSelections() ?> -getRequired()) ?> -
    - - getDefaultSelection()): ?> - getSelectionQty()*1 ?> - getSelectionCanChangeQty() ?> - - - - - - getSelectionQty()*1 ?> - getSelectionCanChangeQty() ?> - - - id="bundle-option-getId() ?>-qty-input" class="input-text qty" type="text" name="bundle_option_qty[getId() ?>]" value="" /> - -
    -decoratedIsLast){?> class="last"> - - getSelectionTitlePrice($_selections[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 deleted file mode 100644 index 4cb44e5b79..0000000000 --- a/app/design/frontend/default/default/template/bundle/catalog/product/view/type/bundle/options.phtml +++ /dev/null @@ -1,45 +0,0 @@ - - -getProduct(); -$_options = Mage::helper('core')->decorateArray($this->getOptions()); -?> -isSaleable()):?> - -
    - - getSelections()): ?> - - - getOptionHtml($_option) ?> - -
    - -

    __('No options of this product are available.') ?>

    - - 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 deleted file mode 100644 index 30b93638a5..0000000000 --- a/app/design/frontend/default/default/template/bundle/email/order/items/creditmemo/default.phtml +++ /dev/null @@ -1,168 +0,0 @@ - -getItem() ?> -getItem()->getOrder(); ?> - -getChilds($parentItem) ?> - - - - - -getItemOptions() || $parentItem->getDescription() || $this->helper('giftmessage/message')->getIsMessagesAvailable('order_item', $parentItem) && $parentItem->getGiftMessageId()): ?> - - - - - -getOrderItem()->getParentItem()): ?> - getSelectionAttributes($_item) ?> - - - -   -   -   - - - - - - getOrderItem()->getParentItem()): ?> - htmlEscape($_item->getName()) ?> - - getValueHtml($_item)?> - - getSku() ?> - - canShowPriceInfo($_item)): ?> - getQty()*1 ?> - -   - - - - canShowPriceInfo($_item)): ?> - helper('tax')->displaySalesPriceExclTax($_order->getStore()) || $this->helper('tax')->displaySalesBothPrices($_order->getStore())): ?> - helper('tax')->displaySalesBothPrices($_order->getStore())): ?> - __('Excl. Tax'); ?>: - - typeOfDisplay($_item, array(0, 1, 4), 'email', $_order->getStore())): ?> - formatPrice($_item->getRowTotal()+$_item->getWeeeTaxAppliedRowAmount()+$_item->getWeeeTaxRowDisposition()); ?> - - formatPrice($_item->getRowTotal()) ?> - - - - getApplied($_item)): ?> -
    - typeOfDisplay($_item, 1, 'email', $_order->getStore())): ?> - - getApplied($_item) as $tax): ?> - : formatPrice($tax['row_amount'],true,true); ?>
    - -
    - typeOfDisplay($_item, 2, 'email', $_order->getStore())): ?> - getApplied($_item) as $tax): ?> - : formatPrice($tax['row_amount_incl_tax'],true,true); ?>
    - - typeOfDisplay($_item, 4, 'email', $_order->getStore())): ?> - - getApplied($_item) as $tax): ?> - : formatPrice($tax['row_amount_incl_tax'],true,true); ?>
    - -
    - - - typeOfDisplay($_item, 2, 'email', $_order->getStore())): ?> -
    - __('Total'); ?>:
    formatPrice($_item->getCalculationPrice()+$_item->getWeeeTaxAppliedRowAmount()+$_item->getWeeeTaxRowDisposition()); ?>
    - - - - - - helper('tax')->displaySalesPriceInclTax($_order->getStore()) || $this->helper('tax')->displaySalesBothPrices($_order->getStore())): ?> - helper('tax')->displaySalesBothPrices($_order->getStore())): ?> -
    __('Incl. Tax'); ?>: - - helper('checkout')->getSubtotalInclTax($_item); ?> - typeOfDisplay($_item, array(0, 1, 4), 'email', $_order->getStore())): ?> - formatPrice($_incl+$_item->getWeeeTaxAppliedRowAmount()); ?> - - formatPrice($_incl-$_item->getWeeeTaxRowDisposition()) ?> - - getApplied($_item)): ?> -
    - typeOfDisplay($_item, 1, 'email', $_order->getStore())): ?> - - getApplied($_item) as $tax): ?> - : formatPrice($tax['row_amount'],true,true); ?>
    - -
    - typeOfDisplay($_item, 2, 'email', $_order->getStore())): ?> - getApplied($_item) as $tax): ?> - : formatPrice($tax['row_amount_incl_tax'],true,true); ?>
    - - typeOfDisplay($_item, 4, 'email', $_order->getStore())): ?> - - getApplied($_item) as $tax): ?> - : formatPrice($tax['row_amount_incl_tax'],true,true); ?>
    - -
    - - - typeOfDisplay($_item, 2, 'email', $_order->getStore())): ?> - __('Total incl. tax'); ?>:
    formatPrice($_incl+$_item->getWeeeTaxAppliedRowAmount()); ?>
    - - - - -   - - - - - - - - - getItemOptions()): ?> -
    - getItemOptions() as $option): ?> -
    -
    - -
    - - getDescription() ?> - -   -   -   - - 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 deleted file mode 100644 index 07bf39c55b..0000000000 --- a/app/design/frontend/default/default/template/bundle/email/order/items/invoice/default.phtml +++ /dev/null @@ -1,169 +0,0 @@ - - -getItem() ?> -getChilds($parentItem) ?> - -getItem()->getOrder(); ?> - - - - - -getItemOptions() || $parentItem->getDescription() || $this->helper('giftmessage/message')->getIsMessagesAvailable('order_item', $parentItem) && $parentItem->getGiftMessageId()): ?> - - - - - -getOrderItem()->getParentItem()): ?> - getSelectionAttributes($_item) ?> - - - -   -   -   - - - - - - getOrderItem()->getParentItem()): ?> - htmlEscape($_item->getName()) ?> - - getValueHtml($_item)?> - - getSku() ?> - - canShowPriceInfo($_item)): ?> - getQty()*1 ?> - -   - - - - canShowPriceInfo($_item)): ?> - helper('tax')->displaySalesPriceExclTax($_order->getStore()) || $this->helper('tax')->displaySalesBothPrices($_order->getStore())): ?> - helper('tax')->displaySalesBothPrices($_order->getStore())): ?> - __('Excl. Tax'); ?>: - - typeOfDisplay($_item, array(0, 1, 4), 'email', $_order->getStore())): ?> - formatPrice($_item->getRowTotal()+$_item->getWeeeTaxAppliedRowAmount()+$_item->getWeeeTaxRowDisposition()); ?> - - formatPrice($_item->getRowTotal()) ?> - - - - getApplied($_item)): ?> -
    - typeOfDisplay($_item, 1, 'email', $_order->getStore())): ?> - - getApplied($_item) as $tax): ?> - : formatPrice($tax['row_amount'],true,true); ?>
    - -
    - typeOfDisplay($_item, 2, 'email', $_order->getStore())): ?> - getApplied($_item) as $tax): ?> - : formatPrice($tax['row_amount_incl_tax'],true,true); ?>
    - - typeOfDisplay($_item, 4, 'email', $_order->getStore())): ?> - - getApplied($_item) as $tax): ?> - : formatPrice($tax['row_amount_incl_tax'],true,true); ?>
    - -
    - - - typeOfDisplay($_item, 2, 'email', $_order->getStore())): ?> -
    - __('Total'); ?>:
    formatPrice($_item->getCalculationPrice()+$_item->getWeeeTaxAppliedRowAmount()+$_item->getWeeeTaxRowDisposition()); ?>
    - - - - - - helper('tax')->displaySalesPriceInclTax($_order->getStore()) || $this->helper('tax')->displaySalesBothPrices($_order->getStore())): ?> - helper('tax')->displaySalesBothPrices($_order->getStore())): ?> -
    __('Incl. Tax'); ?>: - - helper('checkout')->getSubtotalInclTax($_item); ?> - typeOfDisplay($_item, array(0, 1, 4), 'email', $_order->getStore())): ?> - formatPrice($_incl+$_item->getWeeeTaxAppliedRowAmount()); ?> - - formatPrice($_incl-$_item->getWeeeTaxRowDisposition()) ?> - - getApplied($_item)): ?> -
    - typeOfDisplay($_item, 1, 'email', $_order->getStore())): ?> - - getApplied($_item) as $tax): ?> - : formatPrice($tax['row_amount'],true,true); ?>
    - -
    - typeOfDisplay($_item, 2, 'email', $_order->getStore())): ?> - getApplied($_item) as $tax): ?> - : formatPrice($tax['row_amount_incl_tax'],true,true); ?>
    - - typeOfDisplay($_item, 4, 'email', $_order->getStore())): ?> - - getApplied($_item) as $tax): ?> - : formatPrice($tax['row_amount_incl_tax'],true,true); ?>
    - -
    - - - typeOfDisplay($_item, 2, 'email', $_order->getStore())): ?> - __('Total incl. tax'); ?>:
    formatPrice($_incl+$_item->getWeeeTaxAppliedRowAmount()); ?>
    - - - - -   - - - - - - - - - getItemOptions()): ?> -
    - getItemOptions() as $option): ?> -
    -
    - -
    - - getDescription() ?> - -   -   -   - - 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 deleted file mode 100644 index 87f527ce2b..0000000000 --- a/app/design/frontend/default/default/template/bundle/email/order/items/order/default.phtml +++ /dev/null @@ -1,174 +0,0 @@ - -getItem() ?> -getOrder() ?> - -getItem() ?> -getChildrenItems()); ?> - -getItemOptions() || $_item->getDescription() || $this->helper('giftmessage/message')->getIsMessagesAvailable('order_item', $_item) && $_item->getGiftMessageId()): ?> - - - - - - - - - -getParentItem()): ?> - getSelectionAttributes($_item) ?> - - - -   -   -   - - - - - - getParentItem()): ?> - htmlEscape($_item->getName()) ?> - - getValueHtml($_item)?> - - getSku() ?> - - getParentItem()): ?> - getQtyOrdered()*1 ?> - -   - - - - getParentItem()): ?> - helper('tax')->displaySalesPriceExclTax($_order->getStore()) || $this->helper('tax')->displaySalesBothPrices($_order->getStore())): ?> - helper('tax')->displaySalesBothPrices($_order->getStore())): ?> - __('Excl. Tax'); ?>: - - typeOfDisplay($_item, array(0, 1, 4), 'email', $_order->getStore())): ?> - formatPrice($_item->getRowTotal()+$_item->getWeeeTaxAppliedRowAmount()+$_item->getWeeeTaxRowDisposition()); ?> - - formatPrice($_item->getRowTotal()) ?> - - - - getApplied($_item)): ?> -
    - typeOfDisplay($_item, 1, 'email', $_order->getStore())): ?> - - getApplied($_item) as $tax): ?> - : formatPrice($tax['row_amount'],true,true); ?>
    - -
    - typeOfDisplay($_item, 2, 'email', $_order->getStore())): ?> - getApplied($_item) as $tax): ?> - : formatPrice($tax['row_amount_incl_tax'],true,true); ?>
    - - typeOfDisplay($_item, 4, 'email', $_order->getStore())): ?> - - getApplied($_item) as $tax): ?> - : formatPrice($tax['row_amount_incl_tax'],true,true); ?>
    - -
    - - - typeOfDisplay($_item, 2, 'email', $_order->getStore())): ?> -
    - __('Total'); ?>:
    formatPrice($_item->getCalculationPrice()+$_item->getWeeeTaxAppliedRowAmount()+$_item->getWeeeTaxRowDisposition()); ?>
    - - - - - - helper('tax')->displaySalesPriceInclTax($_order->getStore()) || $this->helper('tax')->displaySalesBothPrices($_order->getStore())): ?> - helper('tax')->displaySalesBothPrices($_order->getStore())): ?> -
    __('Incl. Tax'); ?>: - - helper('checkout')->getSubtotalInclTax($_item); ?> - typeOfDisplay($_item, array(0, 1, 4), 'email', $_order->getStore())): ?> - formatPrice($_incl+$_item->getWeeeTaxAppliedRowAmount()); ?> - - formatPrice($_incl-$_item->getWeeeTaxRowDisposition()) ?> - - getApplied($_item)): ?> -
    - typeOfDisplay($_item, 1, 'email', $_order->getStore())): ?> - - getApplied($_item) as $tax): ?> - : formatPrice($tax['row_amount'],true,true); ?>
    - -
    - typeOfDisplay($_item, 2, 'email', $_order->getStore())): ?> - getApplied($_item) as $tax): ?> - : formatPrice($tax['row_amount_incl_tax'],true,true); ?>
    - - typeOfDisplay($_item, 4, 'email', $_order->getStore())): ?> - - getApplied($_item) as $tax): ?> - : formatPrice($tax['row_amount_incl_tax'],true,true); ?>
    - -
    - - - typeOfDisplay($_item, 2, 'email', $_order->getStore())): ?> - __('Total incl. tax'); ?>:
    formatPrice($_incl+$_item->getWeeeTaxAppliedRowAmount()); ?>
    - - - - -   - - - - - - - - - getItemOptions()): ?> -
    - getItemOptions() as $option): ?> -
    -
    - -
    - - getGiftMessageId() && $_giftMessage = $this->helper('giftmessage/message')->getGiftMessage($_item->getGiftMessageId())): ?> -
    __('Gift Message') ?> -
    __('From:'); ?> htmlEscape($_giftMessage->getSender()) ?> -
    __('To:'); ?> htmlEscape($_giftMessage->getRecipient()) ?> -
    __('Message:'); ?>
    htmlEscape($_giftMessage->getMessage()) ?> - - -   -   -   - - 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 deleted file mode 100644 index 528927c457..0000000000 --- a/app/design/frontend/default/default/template/bundle/email/order/items/shipment/default.phtml +++ /dev/null @@ -1,92 +0,0 @@ - -getItem() ?> - -getOrderItem()), $parentItem->getOrderItem()->getChildrenItems()) ?> -getChilds($parentItem) ?> - - - - - -getItemOptions() || $parentItem->getDescription() || $this->helper('giftmessage/message')->getIsMessagesAvailable('order_item', $parentItem) && $parentItem->getGiftMessageId()): ?> - - - - - -getParentItem()): ?> - getSelectionAttributes($_item) ?> - - - -   -   - - - - - - getParentItem()): ?> - htmlEscape($_item->getName()) ?> - - getValueHtml($_item) ?> - - getSku() ?> - - isShipmentSeparately() && $_item->getParentItem()) || (!$this->isShipmentSeparately() && !$_item->getParentItem())): ?> - getId()])): ?> - getId()]->getQty()*1 ?> - getIsVirtual()): ?> - __('N/A') ?> - - 0 - - -   - - - - - - - - - getItemOptions()): ?> -
    - getItemOptions() as $option): ?> -
    -
    - -
    - - getDescription() ?> - -   -   - - 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 deleted file mode 100644 index 0af8b5ee1e..0000000000 --- a/app/design/frontend/default/default/template/bundle/sales/order/creditmemo/items/renderer.phtml +++ /dev/null @@ -1,330 +0,0 @@ - -getItem() ?> - -getChilds($parentItem) ?> -getItem()->getOrderItem()->getOrder() ?> - - - - - - - -getItemOptions() || $parentItem->getDescription() || $this->helper('giftmessage/message')->getIsMessagesAvailable('order_item', $parentItem) && $parentItem->getGiftMessageId()): ?> - - - - - -getOrderItem()->getParentItem()): ?> - getSelectionAttributes($_item) ?> - - -
    -   -   -   -   -   -   - - - - - id="order-item-row-getId() ?>"> - getOrderItem()->getParentItem()): ?> -
    htmlEscape($_item->getName()) ?>
    - - -
    getValueHtml($_item) ?>
    - - getSku() ?> - - canShowPriceInfo($_item)): ?> - helper('tax')->displaySalesBothPrices() || $this->helper('tax')->displaySalesPriceExclTax()): ?> - - helper('tax')->displaySalesBothPrices()): ?> - typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
    - - __('Excl. Tax'); ?>: - typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
    - - - typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
    - -
    - - - typeOfDisplay($this->getItem(), array(0, 1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> - getOrder()->formatPrice($this->getItem()->getPrice()+$this->getItem()->getWeeeTaxAppliedAmount()+$this->getItem()->getWeeeTaxDisposition()); ?> - - getOrder()->formatPrice($this->getItem()->getPrice()) ?> - - -
    - - - getApplied($this->getItem())): ?> - - - - typeOfDisplay($this->getItem(), 2, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
    - __('Total'); ?>:
    getOrder()->formatPrice($this->getItem()->getPrice()+$this->getItem()->getWeeeTaxAppliedAmount()+$this->getItem()->getWeeeTaxDisposition()); ?>
    -
    - - - -
    - - helper('tax')->displaySalesBothPrices() || $this->helper('tax')->displaySalesPriceInclTax()): ?> - - helper('tax')->displaySalesBothPrices()): ?> - typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
    - - __('Incl. Tax'); ?>: - typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
    - - - helper('checkout')->getPriceInclTax($this->getItem()); ?> - typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
    - -
    - - - typeOfDisplay($this->getItem(), array(0, 1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> - getOrder()->formatPrice($_incl+$this->getItem()->getWeeeTaxAppliedAmount()); ?> - - getOrder()->formatPrice($_incl-$this->getItem()->getWeeeTaxDisposition()) ?> - - -
    - - - getApplied($this->getItem())): ?> - - - - typeOfDisplay($this->getItem(), 2, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
    - __('Total incl. tax'); ?>:
    getOrder()->formatPrice($_incl+$this->getItem()->getWeeeTaxAppliedAmount()); ?>
    -
    - - - - - -   - - - - canShowPriceInfo($_item)): ?> - getQty()*1 ?> - -   - - - - canShowPriceInfo($_item)): ?> - helper('tax')->displaySalesBothPrices() || $this->helper('tax')->displaySalesPriceExclTax()): ?> - - helper('tax')->displaySalesBothPrices()): ?> - typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
    - - __('Excl. Tax'); ?>: - typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
    - - - typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
    - -
    - - - typeOfDisplay($this->getItem(), array(0, 1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> - getOrder()->formatPrice($this->getItem()->getRowTotal()+$this->getItem()->getWeeeTaxAppliedRowAmount()+$this->getItem()->getWeeeTaxRowDisposition()); ?> - - getOrder()->formatPrice($this->getItem()->getRowTotal()) ?> - - -
    - - - getApplied($this->getItem())): ?> - - - - typeOfDisplay($this->getItem(), 2, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
    - __('Total'); ?>:
    getOrder()->formatPrice($this->getItem()->getRowTotal()+$this->getItem()->getWeeeTaxAppliedRowAmount()+$this->getItem()->getWeeeTaxRowDisposition()); ?>
    -
    - - - -
    - - - helper('tax')->displaySalesBothPrices() || $this->helper('tax')->displaySalesPriceInclTax()): ?> - - helper('tax')->displaySalesBothPrices()): ?> - typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
    - - __('Incl. Tax'); ?>: - typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
    - - getOrder()->formatPrice($this->helper('checkout')->getSubtotalInclTax($_item)); ?> -
    - - -   - - -   - - - - canShowPriceInfo($_item)): ?> - getOrder()->formatPrice(-$_item->getDiscountAmount()) ?> - -   - - - - canShowPriceInfo($_item)): ?> - getOrder()->formatPrice($_item->getRowTotal()-$_item->getDiscountAmount()+$_item->getTaxAmount()+$_item->getWeeeTaxAppliedRowAmount()) ?> - -   - - - - - - - - - getItemOptions()): ?> -
    - -
    htmlEscape($_option['label']) ?>
    - getPrintStatus()): ?> - getFormatedOptionValue($_option) ?> - class="truncated"> - - -
    -
    -
    htmlEscape($_option['label']) ?>
    -
    -
    -
    - - - -
    htmlEscape( (isset($_option['print_value']) ? $_option['print_value'] : $_option['value']) ) ?>
    - - -
    - - getDescription() ?> - helper('giftmessage/message')->getIsMessagesAvailable('order_item', $parentItem) && $parentItem->getGiftMessageId()): ?> -
    - __('Gift Message') ?> - - -   -   -   -   -   -   - - 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 deleted file mode 100644 index 6fcc0e9682..0000000000 --- a/app/design/frontend/default/default/template/bundle/sales/order/invoice/items/renderer.phtml +++ /dev/null @@ -1,353 +0,0 @@ - -getItem() ?> -getItem()->getOrderItem()->getOrder() ?> - -getChilds($parentItem) ?> - - - - - - - -getItemOptions() || $parentItem->getDescription() || $this->helper('giftmessage/message')->getIsMessagesAvailable('order_item', $parentItem) && $parentItem->getGiftMessageId()): ?> - - - - - -getOrderItem()->getParentItem()): ?> - getSelectionAttributes($_item) ?> - - -
    -   -   -   -   - - - - - id="order-item-row-getId() ?>"> - getOrderItem()->getParentItem()): ?> -
    htmlEscape($_item->getName()) ?>
    - -
    getValueHtml($_item) ?>
    - - getSku() ?> - - canShowPriceInfo($_item)): ?> - helper('tax')->displaySalesBothPrices() || $this->helper('tax')->displaySalesPriceExclTax()): ?> - - helper('tax')->displaySalesBothPrices()): ?> - typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
    - - __('Excl. Tax'); ?>: - typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
    - - - typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
    - -
    - - - typeOfDisplay($this->getItem(), array(0, 1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> - getOrder()->formatPrice($this->getItem()->getPrice()+$this->getItem()->getWeeeTaxAppliedAmount()+$this->getItem()->getWeeeTaxDisposition()); ?> - - getOrder()->formatPrice($this->getItem()->getPrice()) ?> - - -
    - - - getApplied($this->getItem())): ?> - - - - typeOfDisplay($this->getItem(), 2, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
    - __('Total'); ?>:
    getOrder()->formatPrice($this->getItem()->getPrice()+$this->getItem()->getWeeeTaxAppliedAmount()+$this->getItem()->getWeeeTaxDisposition()); ?>
    -
    - - - -
    - - helper('tax')->displaySalesBothPrices() || $this->helper('tax')->displaySalesPriceInclTax()): ?> - - helper('tax')->displaySalesBothPrices()): ?> - typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
    - - __('Incl. Tax'); ?>: - typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
    - - - helper('checkout')->getPriceInclTax($this->getItem()); ?> - typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
    - -
    - - - typeOfDisplay($this->getItem(), array(0, 1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> - getOrder()->formatPrice($_incl+$this->getItem()->getWeeeTaxAppliedAmount()); ?> - - getOrder()->formatPrice($_incl-$this->getItem()->getWeeeTaxDisposition()) ?> - - -
    - - - getApplied($this->getItem())): ?> - - - - typeOfDisplay($this->getItem(), 2, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
    - __('Total incl. tax'); ?>:
    getOrder()->formatPrice($_incl+$this->getItem()->getWeeeTaxAppliedAmount()); ?>
    -
    - - - - - -   - - - - canShowPriceInfo($_item)): ?> - getQty()*1 ?> - -   - - - - canShowPriceInfo($_item)): ?> - helper('tax')->displaySalesBothPrices() || $this->helper('tax')->displaySalesPriceExclTax()): ?> - - helper('tax')->displaySalesBothPrices()): ?> - typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
    - - __('Excl. Tax'); ?>: - typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
    - - - typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
    - -
    - - - typeOfDisplay($this->getItem(), array(0, 1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> - getOrder()->formatPrice($this->getItem()->getRowTotal()+$this->getItem()->getWeeeTaxAppliedRowAmount()+$this->getItem()->getWeeeTaxRowDisposition()); ?> - - getOrder()->formatPrice($this->getItem()->getRowTotal()) ?> - - -
    - - - getApplied($this->getItem())): ?> - - - - typeOfDisplay($this->getItem(), 2, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
    - __('Total'); ?>:
    getOrder()->formatPrice($this->getItem()->getRowTotal()+$this->getItem()->getWeeeTaxAppliedRowAmount()+$this->getItem()->getWeeeTaxRowDisposition()); ?>
    -
    - - - -
    - - helper('tax')->displaySalesBothPrices() || $this->helper('tax')->displaySalesPriceInclTax()): ?> - - helper('tax')->displaySalesBothPrices()): ?> - typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
    - - __('Incl. Tax'); ?>: - typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
    - - - helper('checkout')->getSubtotalInclTax($this->getItem()); ?> - typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
    - -
    - - typeOfDisplay($this->getItem(), array(0, 1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> - getOrder()->formatPrice($_incl+$this->getItem()->getWeeeTaxAppliedRowAmount()); ?> - - getOrder()->formatPrice($_incl-$this->getItem()->getWeeeTaxRowDisposition()) ?> - - -
    - - - getApplied($this->getItem())): ?> - - - - typeOfDisplay($this->getItem(), 2, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
    - __('Total incl. tax'); ?>:
    getOrder()->formatPrice($_incl+$this->getItem()->getWeeeTaxAppliedRowAmount()); ?>
    -
    - - - - - - - - -   - - - - - - - - - getItemOptions()): ?> -
    - -
    htmlEscape($_option['label']) ?>
    - getPrintStatus()): ?> - getFormatedOptionValue($_option) ?> - class="truncated"> - - -
    -
    -
    htmlEscape($_option['label']) ?>
    -
    -
    -
    - - - -
    htmlEscape( (isset($_option['print_value']) ? $_option['print_value'] : $_option['value']) ) ?>
    - - -
    - - getDescription() ?> - helper('giftmessage/message')->getIsMessagesAvailable('order_item', $parentItem) && $parentItem->getGiftMessageId()): ?> -
    - __('Gift Message') ?> - - -   -   -   -   - - 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 deleted file mode 100644 index 7bce41bc8a..0000000000 --- a/app/design/frontend/default/default/template/bundle/sales/order/items/renderer.phtml +++ /dev/null @@ -1,376 +0,0 @@ - -getItem() ?> -getChildrenItems()); ?> - - - - - - - -getItemOptions() || $parentItem->getDescription() || $this->helper('giftmessage/message')->getIsMessagesAvailable('order_item', $parentItem) && $parentItem->getGiftMessageId()): ?> - - - - - -getParentItem()): ?> - getSelectionAttributes($_item) ?> - - getLastRow()) echo 'class="last"'; ?>> -
    -   -   -   -   - - - - - id="order-item-row-getId() ?>"> - - getParentItem()): ?> -
    htmlEscape($_item->getName()) ?>
    - -
    getValueHtml($_item)?>
    - - splitInjection($_item->getSku()) ?> - - getParentItem()): ?> - helper('tax')->displaySalesBothPrices() || $this->helper('tax')->displaySalesPriceExclTax()): ?> - - helper('tax')->displaySalesBothPrices()): ?> - typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
    - - __('Excl. Tax'); ?>: - typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
    - - - typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
    - -
    - - - typeOfDisplay($this->getItem(), array(0, 1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> - getOrder()->formatPrice($this->getItem()->getPrice()+$this->getItem()->getWeeeTaxAppliedAmount()+$this->getItem()->getWeeeTaxDisposition()); ?> - - getOrder()->formatPrice($this->getItem()->getPrice()) ?> - - -
    - - - getApplied($this->getItem())): ?> - - - - typeOfDisplay($this->getItem(), 2, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
    - __('Total'); ?>:
    getOrder()->formatPrice($this->getItem()->getPrice()+$this->getItem()->getWeeeTaxAppliedAmount()+$this->getItem()->getWeeeTaxDisposition()); ?>
    -
    - - - -
    - - helper('tax')->displaySalesBothPrices() || $this->helper('tax')->displaySalesPriceInclTax()): ?> - - helper('tax')->displaySalesBothPrices()): ?> - typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
    - - __('Incl. Tax'); ?>: - typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
    - - - helper('checkout')->getPriceInclTax($this->getItem()); ?> - typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
    - -
    - - - typeOfDisplay($this->getItem(), array(0, 1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> - getOrder()->formatPrice($_incl+$this->getItem()->getWeeeTaxAppliedAmount()); ?> - - getOrder()->formatPrice($_incl-$this->getItem()->getWeeeTaxDisposition()) ?> - - -
    - - - getApplied($this->getItem())): ?> - - - - typeOfDisplay($this->getItem(), 2, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
    - __('Total incl. tax'); ?>:
    getOrder()->formatPrice($_incl+$this->getItem()->getWeeeTaxAppliedAmount()); ?>
    -
    - - - - - -   - - - - getParentItem() && $this->isChildCalculated()) || - (!$_item->getParentItem() && !$this->isChildCalculated())): ?> - - getQtyOrdered() > 0): ?> - __('Ordered'); ?>: getQtyOrdered()*1 ?>
    - - getQtyShipped() > 0 && !$this->isShipmentSeparately()): ?> - __('Shipped'); ?>: getQtyShipped()*1 ?>
    - - getQtyCanceled() > 0): ?> - __('Canceled'); ?>: getQtyCanceled()*1 ?>
    - - getQtyRefunded() > 0): ?> - __('Refunded'); ?>: getQtyRefunded()*1 ?> - -
    - getQtyShipped() > 0 && $_item->getParentItem() && $this->isShipmentSeparately()): ?> - __('Shipped'); ?>: getQtyShipped()*1 ?> - -   - - - - getParentItem()): ?> - helper('tax')->displaySalesBothPrices() || $this->helper('tax')->displaySalesPriceExclTax()): ?> - - helper('tax')->displaySalesBothPrices()): ?> - typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
    - - __('Excl. Tax'); ?>: - typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
    - - - typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
    - -
    - - - typeOfDisplay($this->getItem(), array(0, 1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> - getOrder()->formatPrice($this->getItem()->getRowTotal()+$this->getItem()->getWeeeTaxAppliedRowAmount()+$this->getItem()->getWeeeTaxRowDisposition()); ?> - - getOrder()->formatPrice($this->getItem()->getRowTotal()) ?> - - -
    - - - getApplied($this->getItem())): ?> - - - - typeOfDisplay($this->getItem(), 2, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
    - __('Total'); ?>:
    getOrder()->formatPrice($this->getItem()->getRowTotal()+$this->getItem()->getWeeeTaxAppliedRowAmount()+$this->getItem()->getWeeeTaxRowDisposition()); ?>
    -
    - - - -
    - - helper('tax')->displaySalesBothPrices() || $this->helper('tax')->displaySalesPriceInclTax()): ?> - - helper('tax')->displaySalesBothPrices()): ?> - typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
    - - __('Incl. Tax'); ?>: - typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
    - - - helper('checkout')->getSubtotalInclTax($this->getItem()); ?> - typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
    - -
    - - typeOfDisplay($this->getItem(), array(0, 1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> - getOrder()->formatPrice($_incl+$this->getItem()->getWeeeTaxAppliedRowAmount()); ?> - - getOrder()->formatPrice($_incl-$this->getItem()->getWeeeTaxRowDisposition()) ?> - - -
    - - - getApplied($this->getItem())): ?> - - - - typeOfDisplay($this->getItem(), 2, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
    - __('Total incl. tax'); ?>:
    getOrder()->formatPrice($_incl+$this->getItem()->getWeeeTaxAppliedRowAmount()); ?>
    -
    - - - - - - - - -   - - - - - - - - - - getItemOptions()): ?> -
    - -
    htmlEscape($_option['label']) ?>
    - getPrintStatus()): ?> - getFormatedOptionValue($_option) ?> - class="truncated"> - - -
    -
    -
    htmlEscape($_option['label']) ?>
    -
    -
    -
    - - - -
    htmlEscape( (isset($_option['print_value']) ? $_option['print_value'] : $_option['value']) ) ?>
    - - -
    - - getDescription() ?> - helper('giftmessage/message')->getIsMessagesAvailable('order_item', $parentItem) && $parentItem->getGiftMessageId()): ?> -
    - __('Gift Message') ?> - - -   -   -   -   - - 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 deleted file mode 100644 index 2b43cd4343..0000000000 --- a/app/design/frontend/default/default/template/bundle/sales/order/shipment/items/renderer.phtml +++ /dev/null @@ -1,112 +0,0 @@ - -getItem() ?> -getOrderItem()), $parentItem->getOrderItem()->getChildrenItems()) ?> -getChilds($parentItem) ?> - - - - - - - -getItemOptions() || $parentItem->getDescription() || $this->helper('giftmessage/message')->getIsMessagesAvailable('order_item', $parentItem) && $parentItem->getGiftMessageId()): ?> - - - - - -getParentItem()): ?> - getSelectionAttributes($_item) ?> - - -
    -   -   - - - - - id="order-item-row-getId() ?>"> - getParentItem()): ?> -
    htmlEscape($_item->getName()) ?>
    - -
    getValueHtml($_item) ?>
    - - getSku() ?> - - isShipmentSeparately() && $_item->getParentItem()) || (!$this->isShipmentSeparately() && !$_item->getParentItem())): ?> - getId()])): ?> - getId()]->getQty()*1 ?> - getIsVirtual()): ?> - __('N/A') ?> - - 0 - - -   - - - - - - - - - getItemOptions()): ?> -
    - -
    htmlEscape($_option['label']) ?>
    - getPrintStatus()): ?> - getFormatedOptionValue($_option) ?> - class="truncated"> - - -
    -
    -
    htmlEscape($_option['label']) ?>
    -
    -
    -
    - - - -
    htmlEscape( (isset($_option['print_value']) ? $_option['print_value'] : $_option['value']) ) ?>
    - - -
    - - getDescription() ?> - helper('giftmessage/message')->getIsMessagesAvailable('order_item', $parentItem) && $parentItem->getGiftMessageId()): ?> -
    - __('Gift Message') ?> - - -   -   - - diff --git a/app/design/frontend/default/default/template/callouts/left_col.phtml b/app/design/frontend/default/default/template/callouts/left_col.phtml deleted file mode 100644 index 3e0f55fba5..0000000000 --- a/app/design/frontend/default/default/template/callouts/left_col.phtml +++ /dev/null @@ -1,38 +0,0 @@ - - -
    - getLinkUrl(),0,4))==='http'): ?> - - getLinkUrl()): ?> - - - <?php echo $this->__($this->getImgAlt()) ?> - getLinkUrl()): ?> - - -
    diff --git a/app/design/frontend/default/default/template/callouts/right_col.phtml b/app/design/frontend/default/default/template/callouts/right_col.phtml deleted file mode 100644 index bb39bf5e75..0000000000 --- a/app/design/frontend/default/default/template/callouts/right_col.phtml +++ /dev/null @@ -1,30 +0,0 @@ - - -
    - <?php echo $this->__('Keep your eyes open for our special Back to School items and save A LOT!') ?> -
    diff --git a/app/design/frontend/default/default/template/catalog/category/page.phtml b/app/design/frontend/default/default/template/catalog/category/page.phtml deleted file mode 100644 index d59c4de4d7..0000000000 --- a/app/design/frontend/default/default/template/catalog/category/page.phtml +++ /dev/null @@ -1,32 +0,0 @@ - -
    -

    getTitle() ?>

    -
    -
    - getContent() ?> -
    diff --git a/app/design/frontend/default/default/template/catalog/category/view.phtml b/app/design/frontend/default/default/template/catalog/category/view.phtml deleted file mode 100644 index 3ed8320936..0000000000 --- a/app/design/frontend/default/default/template/catalog/category/view.phtml +++ /dev/null @@ -1,93 +0,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') ?> - -

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

    -
    - -

    - - getDescription()): ?> -

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

    - - getCmsBlockHtml() ?> -isMixedMode()): ?> -
    - IsRssCatalogEnable() && $this->IsTopCategory()): ?> - __('Subscribe to RSS Feed') ?> - -

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

    -
    - -

    - - getDescription()): ?> -

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

    - -IsRssCatalogEnable() && $this->IsTopCategory()): ?> - __('Subscribe to RSS Feed') ?> - -*/ ?> - getCmsBlockHtml() ?> - getProductListHtml() ?> - - -
    - IsRssCatalogEnable() && $this->IsTopCategory()): ?> - __('Subscribe to RSS Feed') ?> - -

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

    -
    - -

    - - getDescription()): ?> -

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

    - - getProductListHtml() ?> - diff --git a/app/design/frontend/default/default/template/catalog/category/widget/link/link_block.phtml b/app/design/frontend/default/default/template/catalog/category/widget/link/link_block.phtml deleted file mode 100644 index baf72cbcbd..0000000000 --- a/app/design/frontend/default/default/template/catalog/category/widget/link/link_block.phtml +++ /dev/null @@ -1,27 +0,0 @@ - -getLinkAttributes() ?>>htmlEscape($this->getAnchorText()) ?> diff --git a/app/design/frontend/default/default/template/catalog/category/widget/link/link_inline.phtml b/app/design/frontend/default/default/template/catalog/category/widget/link/link_inline.phtml deleted file mode 100644 index d9ec437a4b..0000000000 --- a/app/design/frontend/default/default/template/catalog/category/widget/link/link_inline.phtml +++ /dev/null @@ -1,27 +0,0 @@ - -getLinkAttributes() ?>>htmlEscape($this->getAnchorText()) ?> diff --git a/app/design/frontend/default/default/template/catalog/layer/filter.phtml b/app/design/frontend/default/default/template/catalog/layer/filter.phtml deleted file mode 100644 index 8d51a9a72e..0000000000 --- a/app/design/frontend/default/default/template/catalog/layer/filter.phtml +++ /dev/null @@ -1,45 +0,0 @@ - - - -
      -getItems() as $_item): ?> -
    1. - getCount() > 0): ?> - getLabel() ?> - getLabel() ?> - - (getCount() ?>) -
    2. - -
    diff --git a/app/design/frontend/default/default/template/catalog/layer/state.phtml b/app/design/frontend/default/default/template/catalog/layer/state.phtml deleted file mode 100644 index 56511d1f51..0000000000 --- a/app/design/frontend/default/default/template/catalog/layer/state.phtml +++ /dev/null @@ -1,46 +0,0 @@ - - -getActiveFilters() ?> - -

    __('Currently Shopping by') ?>

    -
      - -
    1. - <?php echo $this->__('Remove This Item') ?> - __($_filter->getName()) ?>: getLabel() ?> -
    2. - -
    - - diff --git a/app/design/frontend/default/default/template/catalog/layer/view.phtml b/app/design/frontend/default/default/template/catalog/layer/view.phtml deleted file mode 100644 index 1b3dec0f61..0000000000 --- a/app/design/frontend/default/default/template/catalog/layer/view.phtml +++ /dev/null @@ -1,62 +0,0 @@ - - -canShowBlock()): ?> -
    -
    -

    __('Shop by') ?>

    -
    - -
    - getStateHtml() ?> - canShowOptions()): ?> -
    -

    __('Shopping Options') ?>

    -
    - getFilters() ?> - - getItemsCount()): ?> -
    __($_filter->getName()) ?>
    -
    - getHtml() ?> -
    - - -
    - -
    - -
    -
    - - diff --git a/app/design/frontend/default/default/template/catalog/navigation/left.phtml b/app/design/frontend/default/default/template/catalog/navigation/left.phtml deleted file mode 100644 index ee36cc680b..0000000000 --- a/app/design/frontend/default/default/template/catalog/navigation/left.phtml +++ /dev/null @@ -1,61 +0,0 @@ - - -getCurrentChildCategories() ?> -count(); ?> - -
    -
    -

    __('Browse By') ?>

    -
    -
    -
    -
    -
    __('Category') ?>
    -
    -
      - - getIsActive()): ?> -
    1. - isCategoryActive($_category)): ?> class="active">htmlEscape($_category->getName()) ?> (getProductCount() ?>) -
    2. - - -
    -
    -
    -
    -
    -
    - - diff --git a/app/design/frontend/default/default/template/catalog/navigation/top.phtml b/app/design/frontend/default/default/template/catalog/navigation/top.phtml deleted file mode 100644 index 3589af3b12..0000000000 --- a/app/design/frontend/default/default/template/catalog/navigation/top.phtml +++ /dev/null @@ -1,46 +0,0 @@ - - -
    -
    -

    __('Category Navigation:') ?>

    - getStoreCategories()) > 0): ?> - - -
    - getChildHtml('topLeftLinks') ?> -
    diff --git a/app/design/frontend/default/default/template/catalog/product/compare/list.phtml b/app/design/frontend/default/default/template/catalog/product/compare/list.phtml deleted file mode 100644 index c955e40188..0000000000 --- a/app/design/frontend/default/default/template/catalog/product/compare/list.phtml +++ /dev/null @@ -1,130 +0,0 @@ - -
    -

    __('Compare Products') ?>

    - __('Print This Page') ?> -
    -getItems()->getSize() ?> - -
    - -2): ?> - - - - getItems() as $_item): ?> - - - - - - - - - - - - getItems() as $_item): ?> - - - - - - - - - getAttributes() as $_attribute): ?> - - - getItems() as $_item): ?> - - - - - - - - - - - - getItems() as $_item): ?> - - - - - - - -
     <?php echo $this->__('Remove Product') ?>
      - <?php echo $this->htmlEscape($_item->getName()) ?> -
    htmlEscape($_item->getName()) ?>
    - getReviewsSummaryHtml($_item, 'short') ?> - getPriceHtml($_item, true) ?> - isSaleable()): ?> -
    - -
    __('Out of stock') ?>
    - - helper('wishlist')->isAllow()) : ?> - __('Add to Wishlist') ?> - -
    getStoreLabel() ?> - getAttributeCode()) { - case "price": ?> - getPriceHtml($_item, true) ?> - - <?php echo $this->htmlEscape($_item->getName()) ?> - getProductAttributeValue($_item, $_attribute),0,10); - break; - default: ?> - getProductAttributeValue($_item, $_attribute)) ?> - -
      - getPriceHtml($_item, true) ?> - isSaleable()): ?> -
    - -
    __('Out of stock') ?>
    - - helper('wishlist')->isAllow()) : ?> - __('Add to Wishlist') ?> - -
    -
    - -
    -
    - - - - 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 deleted file mode 100644 index d45ad85c80..0000000000 --- a/app/design/frontend/default/default/template/catalog/product/compare/sidebar.phtml +++ /dev/null @@ -1,54 +0,0 @@ - -
    -
    - helper('catalog/product_compare')->getItemCount()>0): ?> -

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

    - -

    __('Compare Products') ?>

    - -
    - helper('catalog/product_compare')->getItemCount() > 0): ?> -
      - helper('catalog/product_compare')->getItemCollection() as $_index=>$_item): ?> -
    1. - - <?php echo Mage::helper('catalog')->__('Remove This Item') ?> - htmlEscape($_item->getName()) ?> -
    2. - -
    - -
    - __('Clear All') ?> - -
    - -

    __('You have no items to compare.') ?>

    - -
    diff --git a/app/design/frontend/default/default/template/catalog/product/gallery.phtml b/app/design/frontend/default/default/template/catalog/product/gallery.phtml deleted file mode 100644 index bbcd9c0fca..0000000000 --- a/app/design/frontend/default/default/template/catalog/product/gallery.phtml +++ /dev/null @@ -1,57 +0,0 @@ - -getImageWidth() ?> -
    - -
    - getPreviusImageUrl()): ?> - « __('Prev') ?> - - getNextImageUrl()): ?> - __('Next') ?> » - -
    -
    htmlEscape($this->getCurrentImage()->getLabel()) ?>
    - width="" src="helper('catalog/image')->init($this->getProduct(), 'image', $this->getImageFile()); ?>" alt="htmlEscape($this->getCurrentImage()->getLabel()) ?>" title="htmlEscape($this->getCurrentImage()->getLabel()) ?>" id="product-gallery-image" style="display:block;" /> -
    - getPreviusImageUrl()): ?> - « __('Prev') ?> - - getNextImageUrl()): ?> - __('Next') ?> » - -
    - -
    - diff --git a/app/design/frontend/default/default/template/catalog/product/list.phtml b/app/design/frontend/default/default/template/catalog/product/list.phtml deleted file mode 100644 index 0737cf1a05..0000000000 --- a/app/design/frontend/default/default/template/catalog/product/list.phtml +++ /dev/null @@ -1,129 +0,0 @@ - - -getLoadedProductCollection() ?> -count()): ?> -
    - __('There are no products matching the selection.') ?> -
    - - -getToolbarHtml() ?> - -getMode()!='grid'): ?> - -
    - -
    - -
    - - <?php echo $this->htmlEscape($this->getImageLabel($_product, 'small_image')) ?> - -
    - - -
    -
    htmlEscape($_product->getName())?>
    - getRatingSummary()): ?> - getReviewsSummaryHtml($_product) ?> - - getPriceHtml($_product, true) ?> - isSaleable()): ?> - - -
    __('Out of stock') ?>
    - -
    -
    - getShortDescription()) ?> - __('Learn More') ?> -
    -

    - helper('wishlist')->isAllow()) : ?> - __('Add to Wishlist') ?> - - getAddToCompareUrl($_product)): ?> - | - __('Add to Compare') ?> - -

    -
    -
    - -
    - - - - -
    -count() ?> - getColumnCount(); ?> - - -
      - -
    1. -

      - - <?php echo $this->htmlEscape($this->getImageLabel($_product, 'small_image')) ?> - -

      -
      htmlEscape($_product->getName()) ?>
      - getRatingSummary()): ?> - getReviewsSummaryHtml($_product, 'short') ?> - - getPriceHtml($_product, true) ?> - isSaleable()): ?> - - -
      __('Out of stock') ?>
      - -

      - helper('wishlist')->isAllow()) : ?> - __('Add to Wishlist') ?> - - getAddToCompareUrl($_product)): ?>
      - __('Add to Compare') ?> - -

      -
    2. - -
    - - - -
    - -getToolbarHtml() ?> - diff --git a/app/design/frontend/default/default/template/catalog/product/list/related.phtml b/app/design/frontend/default/default/template/catalog/product/list/related.phtml deleted file mode 100644 index 83e4df0ca6..0000000000 --- a/app/design/frontend/default/default/template/catalog/product/list/related.phtml +++ /dev/null @@ -1,97 +0,0 @@ - -getItems()->getSize()): ?> - - - 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 deleted file mode 100644 index 73714add13..0000000000 --- a/app/design/frontend/default/default/template/catalog/product/list/toolbar.phtml +++ /dev/null @@ -1,110 +0,0 @@ - - -getCollection()->getSize()): ?> - - - - getLastPageNum()>1): ?> - - - - -
    - getLastPageNum()>1): ?> - __('Items %s to %s of %s total', $this->getFirstNum(), $this->getLastNum(), $this->getTotalNum()) ?> - - __('%s Item(s)', $this->getTotalNum()) ?> - - - __('Page:') ?> -
      - isFirstPage()): ?> -
    1. <?php echo $this->__('Previous') ?>
    2. - - getPages() as $_page): ?> - isPageCurrent($_page)): ?> -
    3. - -
    4. - - - isLastPage()): ?> -
    5. <?php echo $this->__('Next') ?>
    6. - -
    -
    - __('Show') ?> __('per page') ?> -
    - isExpanded() ): ?> - - - isEnabledViewSwitcher() ): ?> - - - - -
    - getModes(); ?> - 1): ?> - __('View as') ?>: - getModes() as $_code=>$_label): ?> - isModeActive($_code)): ?> -   - -   - - - - - __('Sort by') ?> - getCurrentDirection() == 'desc'): ?> - <?php echo $this->__('Set Ascending Direction') ?> - - <?php echo $this->__('Set Descending Direction') ?> - -
    - - diff --git a/app/design/frontend/default/default/template/catalog/product/list/upsell.phtml b/app/design/frontend/default/default/template/catalog/product/list/upsell.phtml deleted file mode 100644 index 79dff6090b..0000000000 --- a/app/design/frontend/default/default/template/catalog/product/list/upsell.phtml +++ /dev/null @@ -1,52 +0,0 @@ - -getItemCollection()->getItems())): ?> -
    -

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

    - - setColumnCount(4); // uncomment this line if you want to have another number of columns. also can be changed in layout ?> - resetItemsIterator() ?> - getRowCount();$_i++): ?> - - getColumnCount();$_j++): ?> - getIterableItem()): ?> - - - - - - - -
    -

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

    -
    htmlEscape($_link->getName()) ?>
    - getPriceHtml($_link, true) ?> - getReviewsSummaryHtml($_link) ?> -
     
    - -
    - diff --git a/app/design/frontend/default/default/template/catalog/product/new.phtml b/app/design/frontend/default/default/template/catalog/product/new.phtml deleted file mode 100644 index dda9f0917f..0000000000 --- a/app/design/frontend/default/default/template/catalog/product/new.phtml +++ /dev/null @@ -1,63 +0,0 @@ - -getProductCollection()) && $_products->getSize()): ?> -
    -

    __('New Products') ?>

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

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

    - getReviewsSummaryHtml($_product, 'short') ?> - getPriceHtml($_product, true, '-new') ?> - isSaleable()): ?> - - -
    __('Out of stock') ?>
    - -
    -

    - helper('wishlist')->isAllow()) : ?> - __('Add to Wishlist') ?> - - getAddToCompareUrl($_product)): ?>
    - __('Add to Compare') ?> - -

    -
     
    -
    - diff --git a/app/design/frontend/default/default/template/catalog/product/price.phtml b/app/design/frontend/default/default/template/catalog/product/price.phtml deleted file mode 100644 index 3645df916a..0000000000 --- a/app/design/frontend/default/default/template/catalog/product/price.phtml +++ /dev/null @@ -1,426 +0,0 @@ - - - -helper('core'); - $_weeeHelper = $this->helper('weee'); - $_taxHelper = $this->helper('tax'); - /* @var $_coreHelper Mage_Core_Helper_Data */ - /* @var $_weeeHelper Mage_Weee_Helper_Data */ - /* @var $_taxHelper Mage_Tax_Helper_Data */ - - $_product = $this->getProduct(); - $_id = $_product->getId(); - $_weeeSeparator = ''; - $_simplePricesTax = ($_taxHelper->displayPriceIncludingTax() || $_taxHelper->displayBothPrices()); - $_minimalPriceValue = $_product->getMinimalPrice(); - $_minimalPrice = $_taxHelper->getPrice($_product, $_minimalPriceValue, $_simplePricesTax); -?> - -isGrouped()): ?> - getAmountForDisplay($_product); ?> - typeOfDisplay($_product, array(1,2,4))): ?> - getAmount($_product); ?> - getProductWeeeAttributesForDisplay($_product); ?> - - -
    - getPrice($_product, $_product->getPrice()) ?> - getPrice($_product, $_product->getPrice(), $_simplePricesTax) ?> - getPrice($_product, $_product->getFinalPrice()) ?> - getPrice($_product, $_product->getFinalPrice(), true) ?> - getPriceDisplayType(); ?> - - displayBothPrices()): ?> - typeOfDisplay($_product, 0)): // including ?> - - __('Excl. Tax:') ?> - - currency($_price+$_weeeTaxAmount,true,false) ?> - - - - __('Incl. Tax:') ?> - - currency($_finalPriceInclTax+$_weeeTaxAmount,true,false) ?> - - - typeOfDisplay($_product, 1)): // incl. + weee ?> - - __('Excl. Tax:') ?> - - currency($_price+$_weeeTaxAmount,true,false) ?> - - - - __('Incl. Tax:') ?> - - currency($_finalPriceInclTax+$_weeeTaxAmount,true,false) ?> - -
    - ( - - - getName(); ?>: - currency($_weeeTaxAttribute->getAmount(), true, true); ?> - - - ) -
    - typeOfDisplay($_product, 4)): // incl. + weee ?> - - __('Excl. Tax:') ?> - - currency($_price+$_weeeTaxAmount,true,false) ?> - - - - __('Incl. Tax:') ?> - - currency($_finalPriceInclTax+$_weeeTaxAmount,true,false) ?> - -
    - ( - - - getName(); ?>: currency($_weeeTaxAttribute->getAmount()+$_weeeTaxAttribute->getTaxAmount(), true, true); ?> - - - ) -
    - typeOfDisplay($_product, 2)): // excl. + weee + final ?> - - __('Excl. Tax:') ?> - - currency($_price,true,false) ?> - - - - - - getName(); ?>: currency($_weeeTaxAttribute->getAmount(), true, true); ?> - - -
    - - - __('Incl. Tax:') ?> - - currency($_finalPriceInclTax+$_weeeTaxAmount,true,false) ?> - - - - - __('Excl. Tax:') ?> - - currency($_price,true,false) ?> - - - - __('Incl. Tax:') ?> - - currency($_finalPriceInclTax,true,false) ?> - - - - - typeOfDisplay($_product, 0)): // including ?> - - currency($_price+$_weeeTaxAmount,true,true) ?> - - typeOfDisplay($_product, 1)): // incl. + weee ?> - - currency($_price+$_weeeTaxAmount,true,true) ?> - -
    - ( - - - getName(); ?>: currency($_weeeTaxAttribute->getAmount(), true, true); ?> - - - ) - typeOfDisplay($_product, 4)): // incl. + weee ?> - - currency($_price+$_weeeTaxAmount,true,true) ?> - -
    - ( - - - getName(); ?>: currency($_weeeTaxAttribute->getAmount()+$_weeeTaxAttribute->getTaxAmount(), true, true); ?> - - - ) - typeOfDisplay($_product, 2)): // excl. + weee + final ?> - currency($_price,true,true) ?>
    - - - - getName(); ?>: currency($_weeeTaxAttribute->getAmount(), true, true); ?> - - -
    - - - currency($_price+$_weeeTaxAmount,true,true) ?> - - - - currency($_price,true,true) ?> - - - - - getOriginalAmount($_product); ?> - - typeOfDisplay($_product, 0)): // including ?> -

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

    - - displayBothPrices()): ?> -

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

    - -

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

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

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

    - -

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

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

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

    - -

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

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

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

    - -

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

    - -

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

    - - displayBothPrices()): ?> -

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

    - -

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

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

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

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

    __('Quick Overview') ?>

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

    __('Product Description') ?>

    -
    - -
    - - getChildHtml('additional')):?> -
    -
    -

    __('Additional Information') ?>

    -
    - -
    - - getChildHtml('upsell_products') ?> - getChildHtml('product_additional_data') ?> -
    -
    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 deleted file mode 100644 index 8f07260e03..0000000000 --- a/app/design/frontend/default/default/template/catalog/product/view/additional.phtml +++ /dev/null @@ -1,31 +0,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 deleted file mode 100644 index 372c49a9c2..0000000000 --- a/app/design/frontend/default/default/template/catalog/product/view/addto.phtml +++ /dev/null @@ -1,37 +0,0 @@ - - -getProduct() ?> - - 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 deleted file mode 100644 index aa149aac01..0000000000 --- a/app/design/frontend/default/default/template/catalog/product/view/addtocart.phtml +++ /dev/null @@ -1,39 +0,0 @@ - - -getProduct() ?> - -isSaleable()): ?> -
    - __('Add Items to Cart') ?> - isGrouped()): ?> - - - - -
    - 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 deleted file mode 100644 index 4091e1ef6c..0000000000 --- a/app/design/frontend/default/default/template/catalog/product/view/attributes.phtml +++ /dev/null @@ -1,49 +0,0 @@ - -helper('catalog/output'); - $_product = $this->getProduct() -?> -getAdditionalData()): ?> -
    - - - - - - - -
    htmlEscape($this->__($_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 deleted file mode 100644 index d8961cd929..0000000000 --- a/app/design/frontend/default/default/template/catalog/product/view/description.phtml +++ /dev/null @@ -1,35 +0,0 @@ - -
    -helper('catalog/output')->productAttribute($this->getProduct(), nl2br($this->getProduct()->getDescription()), 'description') ?> -
    diff --git a/app/design/frontend/default/default/template/catalog/product/view/media.phtml b/app/design/frontend/default/default/template/catalog/product/view/media.phtml deleted file mode 100644 index fcabf30ef4..0000000000 --- a/app/design/frontend/default/default/template/catalog/product/view/media.phtml +++ /dev/null @@ -1,77 +0,0 @@ - - -getProduct(); - $_helper = $this->helper('catalog/output'); -?> - -getImage() != 'no_selection' && $_product->getImage()): ?> -

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

    -

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

    - -
    - <?php echo $this->__('Zoom Out') ?> -
    -
    -
    - <?php echo $this->__('Zoom In') ?> -
    - - - helper('catalog/image')->init($_product, 'image')->resize(265).'" alt="'.$this->htmlEscape($_product->getImageLabel()).'" />'; - echo $_helper->productAttribute($_product, $_img, 'image') - ?> - -getGalleryImages()) > 0): ?> -
    -

    __('More Views') ?>

    -
      - getGalleryImages() as $_image): ?> -
    • - <?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 deleted file mode 100644 index a6f2a693c1..0000000000 --- a/app/design/frontend/default/default/template/catalog/product/view/options.phtml +++ /dev/null @@ -1,176 +0,0 @@ - - -decorateArray($this->getOptions()) ?> - - -
    - - getOptionHtml($_option) ?> - -
    - diff --git a/app/design/frontend/default/default/template/catalog/product/view/options/js.phtml b/app/design/frontend/default/default/template/catalog/product/view/options/js.phtml deleted file mode 100644 index 2ff3685e51..0000000000 --- a/app/design/frontend/default/default/template/catalog/product/view/options/js.phtml +++ /dev/null @@ -1,60 +0,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 deleted file mode 100644 index a44f6e0337..0000000000 --- a/app/design/frontend/default/default/template/catalog/product/view/options/type/date.phtml +++ /dev/null @@ -1,70 +0,0 @@ - -getOption() ?> -getId() ?> -
    - getFormatedPrice() ?>
    -decoratedIsLast){?> class="last"> - -getType() == Mage_Catalog_Model_Product_Option::OPTION_TYPE_DATE_TIME - || $_option->getType() == Mage_Catalog_Model_Product_Option::OPTION_TYPE_DATE): ?> - - getDateHtml() ?> - - useCalendar()): ?> - - - - - -getType() == Mage_Catalog_Model_Product_Option::OPTION_TYPE_DATE_TIME - || $_option->getType() == Mage_Catalog_Model_Product_Option::OPTION_TYPE_TIME): ?> -   getTimeHtml() ?> - - -getIsRequire()): ?> - - - - diff --git a/app/design/frontend/default/default/template/catalog/product/view/options/type/default.phtml b/app/design/frontend/default/default/template/catalog/product/view/options/type/default.phtml deleted file mode 100644 index d19c4038ec..0000000000 --- a/app/design/frontend/default/default/template/catalog/product/view/options/type/default.phtml +++ /dev/null @@ -1,28 +0,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 deleted file mode 100644 index aa3c8d102e..0000000000 --- a/app/design/frontend/default/default/template/catalog/product/view/options/type/file.phtml +++ /dev/null @@ -1,41 +0,0 @@ - -getOption() ?> -
    - getFormatedPrice() ?>
    -decoratedIsLast){?> class="last"> - -getFileExtension()): ?> -

    __('Allowed file extensions to upload')?>: getFileExtension() ?>

    - -getImageSizeX() > 0): ?> -

    __('Maximum image width')?>: getImageSizeX() ?> __('px.')?>

    - -getImageSizeY() > 0): ?> -

    __('Maximum image height')?>: getImageSizeY() ?> __('px.')?>

    - - 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 deleted file mode 100644 index 5deeb15b66..0000000000 --- a/app/design/frontend/default/default/template/catalog/product/view/options/type/select.phtml +++ /dev/null @@ -1,37 +0,0 @@ - - -getOption() ?> -
    -decoratedIsLast){?> class="last"> - getValuesHtml() ?> - getIsRequire()): ?> - getType() == Mage_Catalog_Model_Product_Option::OPTION_TYPE_RADIO || $_option->getType() == Mage_Catalog_Model_Product_Option::OPTION_TYPE_CHECKBOX): ?> - - - - 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 deleted file mode 100644 index 4500562812..0000000000 --- a/app/design/frontend/default/default/template/catalog/product/view/options/type/text.phtml +++ /dev/null @@ -1,39 +0,0 @@ - -getOption() ?> -
    - getFormatedPrice() ?>
    -decoratedIsLast){?> class="last"> -getType() == Mage_Catalog_Model_Product_Option::OPTION_TYPE_FIELD): ?> - -getType() == Mage_Catalog_Model_Product_Option::OPTION_TYPE_AREA): ?> - - -getMaxCharacters()): ?> -

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

    - - 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 deleted file mode 100644 index 9c6b0dac5d..0000000000 --- a/app/design/frontend/default/default/template/catalog/product/view/options/wrapper.phtml +++ /dev/null @@ -1,34 +0,0 @@ - - -
    - getChildHtml('', true, true);?> - hasRequiredOptions()):?> -

    __('* Required Fields') ?>

    - -
    - 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 deleted file mode 100644 index 48bbd74429..0000000000 --- a/app/design/frontend/default/default/template/catalog/product/view/options/wrapper/bottom.phtml +++ /dev/null @@ -1,30 +0,0 @@ - - -
    - getChildHtml('', true, true);?> -
    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 deleted file mode 100644 index 416f677646..0000000000 --- a/app/design/frontend/default/default/template/catalog/product/view/price.phtml +++ /dev/null @@ -1,30 +0,0 @@ - -
    - __('Old Price:') ?> getPrice() ?>
    - getPrice() ?> -
    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 deleted file mode 100644 index 9f08adc7db..0000000000 --- a/app/design/frontend/default/default/template/catalog/product/view/price_clone.phtml +++ /dev/null @@ -1,28 +0,0 @@ - -getProduct() ?> -getPriceHtml($_product, false, '_clone') ?> diff --git a/app/design/frontend/default/default/template/catalog/product/view/tierprices.phtml b/app/design/frontend/default/default/template/catalog/product/view/tierprices.phtml deleted file mode 100644 index c85e39d6c4..0000000000 --- a/app/design/frontend/default/default/template/catalog/product/view/tierprices.phtml +++ /dev/null @@ -1,181 +0,0 @@ - - -getProduct(); -$_tierPrices = $this->getTierPrices(); -$_finalPriceInclTax = $this->helper('tax')->getPrice($_product, $_product->getFinalPrice(), true); - -$_weeeTaxAmount = Mage::helper('weee')->getAmountForDisplay($_product); -if (Mage::helper('weee')->typeOfDisplay($_product, array(1,2,4))) { - $_weeeTaxAttributes = Mage::helper('weee')->getProductWeeeAttributesForDisplay($_product); -} - -?> - 0): ?> -
      - getInGrouped()): ?> - getTierPrices($_product); ?> - - processTierPrices($_product, $_tierPrices); ?> - - - helper('tax')->displayBothPrices()): ?> - typeOfDisplay($_product, 0)): ?> -
    • __('Buy %1$s for %2$s (%3$s incl. tax) each', $_price['price_qty'], $_price['formated_price_incl_weee_only'], $_price['formated_price_incl_weee']) ?> - typeOfDisplay($_product, 1)): ?> -
    • __('Buy %1$s for %2$s', $_price['price_qty'], $_price['formated_price_incl_weee_only']); ?> - - ( - __('%1$s incl tax.', $_price['formated_price_incl_weee']); ?> - - - getName(); ?>: currency($_attribute->getAmount()); ?> - - ) - - __('each') ?> - typeOfDisplay($_product, 4)): ?> -
    • __('Buy %1$s for %2$s', $_price['price_qty'], $_price['formated_price_incl_weee_only']); ?> - - ( - __('%1$s incl tax.', $_price['formated_price_incl_weee']); ?> - - - getName(); ?>: currency($_attribute->getAmount()+$_attribute->getTaxAmount()); ?> - - ) - - __('each') ?> - typeOfDisplay($_product, 2)): ?> -
    • __('Buy %1$s for %2$s', $_price['price_qty'], $_price['formated_price']); ?> - - ( - - getName(); ?>: currency($_attribute->getAmount()); ?> - - __('Total incl. Tax: %1$s', $_price['formated_price_incl_weee']); ?> - ) - - __('each') ?> - -
    • __('Buy %1$s for %2$s (%3$s incl. tax) each', $_price['price_qty'], $_price['formated_price'], $_price['formated_price_incl_tax']) ?> - - - helper('tax')->displayPriceIncludingTax()): ?> - typeOfDisplay($_product, 0)): ?> -
    • __('Buy %1$s for %2$s each', $_price['price_qty'], $_price['formated_price_incl_weee']) ?> - typeOfDisplay($_product, 1)): ?> -
    • __('Buy %1$s for %2$s', $_price['price_qty'], $_price['formated_price_incl_weee']); ?> - - ( - - - getName(); ?>: currency($_attribute->getAmount()); ?> - - ) - - __('each') ?> - typeOfDisplay($_product, 4)): ?> -
    • __('Buy %1$s for %2$s', $_price['price_qty'], $_price['formated_price_incl_weee']); ?> - - ( - - - getName(); ?>: currency($_attribute->getAmount()+$_attribute->getTaxAmount()); ?> - - ) - - __('each') ?> - typeOfDisplay($_product, 2)): ?> -
    • __('Buy %1$s for %2$s', $_price['price_qty'], $_price['formated_price_incl_tax']); ?> - - ( - - getName(); ?>: currency($_attribute->getAmount()); ?> - - __('Total incl. Tax: %1$s', $_price['formated_price_incl_weee']); ?> - ) - - __('each') ?> - -
    • __('Buy %1$s for %2$s each', $_price['price_qty'], $_price['formated_price_incl_tax']) ?> - - - typeOfDisplay($_product, 0)): ?> -
    • __('Buy %1$s for %2$s each', $_price['price_qty'], $_price['formated_price_incl_weee_only']) ?> - typeOfDisplay($_product, 1)): ?> -
    • __('Buy %1$s for %2$s', $_price['price_qty'], $_price['formated_price_incl_weee_only']); ?> - - ( - - - getName(); ?>: currency($_attribute->getAmount()); ?> - - ) - - __('each') ?> - typeOfDisplay($_product, 4)): ?> -
    • __('Buy %1$s for %2$s', $_price['price_qty'], $_price['formated_price_incl_weee_only']); ?> - - ( - - - getName(); ?>: currency($_attribute->getAmount()+$_attribute->getTaxAmount()); ?> - - ) - - __('each') ?> - typeOfDisplay($_product, 2)): ?> -
    • __('Buy %1$s for %2$s', $_price['price_qty'], $_price['formated_price']); ?> - - ( - - getName(); ?>: currency($_attribute->getAmount()); ?> - - __('Total incl. Tax: %1$s', $_price['formated_price_incl_weee_only']); ?> - ) - - __('each') ?> - -
    • __('Buy %1$s for %2$s each', $_price['price_qty'], $_price['formated_price']) ?> - - - - getInGrouped()): ?> - getPrice() == $_product->getFinalPrice() && $_product->getPrice() > $_price['price']) - || ($_product->getPrice() != $_product->getFinalPrice() && $_product->getFinalPrice() > $_price['price'])): ?> - __('and') ?> __('save')?> % - - -
    • - -
    - diff --git a/app/design/frontend/default/default/template/catalog/product/view/type/configurable.phtml b/app/design/frontend/default/default/template/catalog/product/view/type/configurable.phtml deleted file mode 100644 index 1514d5e39e..0000000000 --- a/app/design/frontend/default/default/template/catalog/product/view/type/configurable.phtml +++ /dev/null @@ -1,41 +0,0 @@ - -getProduct() ?> -isSaleable()): ?> -

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

    - -

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

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

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

    - -

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

    - - - - - - - - - - isSaleable()): ?> - - - - - - - - helper('tax')->getPrice($_item, $_item->getFinalPrice(), true) ?> - - - - isSaleable()): ?> - - - - - - - - - - -
    __('Product Name') ?>__('Price') ?>__('Qty') ?>
    htmlEscape($_item->getName()) ?> - getPriceHtml($_item, true) ?> - getTierPriceHtml($_item) ?> - - isSaleable()) : ?> - - - __('Out of stock.') ?> - -
    __('No options of this product are available.') ?>
    - 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 deleted file mode 100644 index 9c0c06201b..0000000000 --- a/app/design/frontend/default/default/template/catalog/product/view/type/options/configurable.phtml +++ /dev/null @@ -1,46 +0,0 @@ - - -getProduct(); -$_attributes = Mage::helper('core')->decorateArray($this->getAllowAttributes()); -?> -isSaleable() && count($_attributes)):?> -
    - -
    - decoratedIsLast){?> class="last"> - - - -
    - - 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 deleted file mode 100644 index 3cadb453db..0000000000 --- a/app/design/frontend/default/default/template/catalog/product/view/type/simple.phtml +++ /dev/null @@ -1,41 +0,0 @@ - -getProduct() ?> - -isSaleable()): ?> -

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

    - -

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

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

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

    - -

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

    - - -getPriceHtml($_product) ?> diff --git a/app/design/frontend/default/default/template/catalog/product/widget/link/link_block.phtml b/app/design/frontend/default/default/template/catalog/product/widget/link/link_block.phtml deleted file mode 100644 index a03148c877..0000000000 --- a/app/design/frontend/default/default/template/catalog/product/widget/link/link_block.phtml +++ /dev/null @@ -1,27 +0,0 @@ - -getLinkAttributes() ?>>htmlEscape($this->getAnchorText()) ?> diff --git a/app/design/frontend/default/default/template/catalog/product/widget/link/link_inline.phtml b/app/design/frontend/default/default/template/catalog/product/widget/link/link_inline.phtml deleted file mode 100644 index f6bbfde201..0000000000 --- a/app/design/frontend/default/default/template/catalog/product/widget/link/link_inline.phtml +++ /dev/null @@ -1,27 +0,0 @@ - -getLinkAttributes() ?>>htmlEscape($this->getAnchorText()) ?> diff --git a/app/design/frontend/default/default/template/catalog/product/widget/new/content/new_grid.phtml b/app/design/frontend/default/default/template/catalog/product/widget/new/content/new_grid.phtml deleted file mode 100644 index c23202c30e..0000000000 --- a/app/design/frontend/default/default/template/catalog/product/widget/new/content/new_grid.phtml +++ /dev/null @@ -1,66 +0,0 @@ - -getProductCollection()) && $_products->getSize()): ?> -
    -
    -

    __('New Products') ?>

    -
    -
    - getItems() as $_product): ?> - - - - -
    -
    - diff --git a/app/design/frontend/default/default/template/catalog/product/widget/new/content/new_list.phtml b/app/design/frontend/default/default/template/catalog/product/widget/new/content/new_list.phtml deleted file mode 100644 index 9952e8c64a..0000000000 --- a/app/design/frontend/default/default/template/catalog/product/widget/new/content/new_list.phtml +++ /dev/null @@ -1,66 +0,0 @@ - -getProductCollection()) && $_products->getSize()): ?> -
    -
    -

    __('New Products') ?>

    -
    -
    -
      - getItems() as $_product): ?> -
    1. - <?php echo $this->htmlEscape($_product->getName()) ?> -
      -
      -

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

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

      __('In stock') ?>

      - -

      __('Out of stock') ?>

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

    getTitle() ?>

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

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

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

    __('Catalog Advanced Search') ?>

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

    __('Catalog Advanced Search') ?>

    -
    -getMessagesBlock()->getGroupedHtml() ?> -getResultCount()): ?> -
    - helper('catalogsearch') - ->__('%d item(s) were found using the following search criteria', $this->getResultCount()); ?> -
    - -
    helper('catalogsearch')->__('No items were found using the following search criteria.');?> helper('catalogsearch')->__('Modify your search'); ?>
    - - -getSearchCriterias(); ?> -
    - - -
      - -
    • htmlEscape($this->helper('catalog')->__($criteria['name'])); ?>: htmlEscape($criteria['value']); ?>
    • - -
    - - - - getResultCount()): ?> -
    - helper('catalogsearch')->__("Don't see what you're looking for?"); ?> - helper('catalogsearch')->__('Modify your search'); ?> -
    - -
    -getResultCount()): ?> - getProductListHtml() ?> - -getSearchCriterias(); ?> diff --git a/app/design/frontend/default/default/template/catalogsearch/form.mini.phtml b/app/design/frontend/default/default/template/catalogsearch/form.mini.phtml deleted file mode 100644 index b2e4641024..0000000000 --- a/app/design/frontend/default/default/template/catalogsearch/form.mini.phtml +++ /dev/null @@ -1,42 +0,0 @@ - -
    -
    - __('Search Site') ?> - -
    -
    diff --git a/app/design/frontend/default/default/template/catalogsearch/result.phtml b/app/design/frontend/default/default/template/catalogsearch/result.phtml deleted file mode 100644 index 362c5976b8..0000000000 --- a/app/design/frontend/default/default/template/catalogsearch/result.phtml +++ /dev/null @@ -1,55 +0,0 @@ - -getResultCount()): ?> -getMessagesBlock()->getGroupedHtml() ?> -
    - helper('rss/catalog')->getTagFeedUrl()): ?> - __('Subscribe to Feed') ?> - -

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

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

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

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

    __('Popular Search Terms') ?>

    -
    -getTerms()) > 0 ): ?> -
    -
    - -
    -
    - -
    - __('There are no search terms available.'); ?> -
    - diff --git a/app/design/frontend/default/default/template/checkout/cart.phtml b/app/design/frontend/default/default/template/checkout/cart.phtml deleted file mode 100644 index d505893a1d..0000000000 --- a/app/design/frontend/default/default/template/checkout/cart.phtml +++ /dev/null @@ -1,125 +0,0 @@ - - -
    -

    __('Shopping Cart') ?>

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

    __('Discount Codes') ?>

    -

    __('Enter your coupon code if you have one.') ?>

    - - getCouponCode())): ?> -
    -
     
    - -
    -   - -
    -
    -
    - -
    diff --git a/app/design/frontend/default/default/template/checkout/cart/crosssell.phtml b/app/design/frontend/default/default/template/checkout/cart/crosssell.phtml deleted file mode 100644 index 1071d2f971..0000000000 --- a/app/design/frontend/default/default/template/checkout/cart/crosssell.phtml +++ /dev/null @@ -1,56 +0,0 @@ - - -getItemCount()): ?> -
    -

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

    - -
    - 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 deleted file mode 100644 index 11a1e886aa..0000000000 --- a/app/design/frontend/default/default/template/checkout/cart/item/default.phtml +++ /dev/null @@ -1,262 +0,0 @@ - -getItem()?> - - <?php echo $this->__('Remove item')?> - hasProductUrl()):?> - <?php echo $this->htmlEscape($this->getProductName()) ?> - hasProductUrl()):?> - -

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

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

    __('Shopping Cart is Empty') ?>

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

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

    -

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

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

    getItemName($_item) ?>

    - getItemDescription($_item) ?> - getMessage()): ?> -
    - * getMessage() ?> -
    - - - helper('wishlist')->isAllowInCart()) : ?> - - - - - helper('tax')->displayCartPriceExclTax() || $this->helper('tax')->displayCartBothPrices()): ?> - - helper('checkout')->formatPrice($_item->getCalculationPrice()) ?> - - - helper('tax')->displayCartPriceInclTax() || $this->helper('tax')->displayCartBothPrices()): ?> - - helper('checkout')->formatPrice($_item->getCalculationPrice()+$_item->getTaxAmount()/$_item->getQty()) ?> - - - - - - helper('tax')->displayCartPriceExclTax() || $this->helper('tax')->displayCartBothPrices()): ?> - - helper('checkout')->formatPrice($_item->getRowTotal()) ?> - - - helper('tax')->displayCartPriceInclTax() || $this->helper('tax')->displayCartBothPrices()): ?> - - helper('checkout')->formatPrice($_item->getRowTotal()+$_item->getTaxAmount()) ?> - - - 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 deleted file mode 100644 index d3411e5f53..0000000000 --- a/app/design/frontend/default/default/template/checkout/cart/render/simple.phtml +++ /dev/null @@ -1,69 +0,0 @@ - -getItem() ?> - - Remove item - <?php echo $this->htmlEscape($this->getItemName($_item)) ?> - - -

    getItemName($_item) ?>

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

    __('Estimate Shipping and Tax') ?>

    -
    -

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

    -


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

    - getStateActive()): ?> -

    -
    - - - -

    - - getCityActive()): ?> -


    - -

    - -


    -

    -

    -
    - - -getEstimateRates())): ?> -
    -
    -
    - $_rates): ?> -
    getCarrierName($code) ?>
    -
    -
      - -
    • - getErrorMessage()): ?> - getErrorMessage() ?> - - getCode()===$this->getAddressShippingMethod()) echo ' checked="checked"' ?> /> - - -
    • - -
    -
    - -
    -
    - -
    -
    - - - -
    diff --git a/app/design/frontend/default/default/template/checkout/cart/sidebar.phtml b/app/design/frontend/default/default/template/checkout/cart/sidebar.phtml deleted file mode 100644 index f37a1c1d2d..0000000000 --- a/app/design/frontend/default/default/template/checkout/cart/sidebar.phtml +++ /dev/null @@ -1,73 +0,0 @@ - -
    -
    - getSummaryCount() ?> -

    __('My Cart') ?>

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

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

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

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

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

    __('Change Billing Address') ?>

    - -
    -getMessagesBlock()->getGroupedHtml() ?> -
    - -getAddressCollection() as $_address): ?> -
    -
    -
    -

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

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

    - -

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

    __('Ship to Multiple Addresses') ?>

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

      -   - -

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

    __('Billing Information') ?>

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

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

    -
    -
    -
    -
    -
    -
    __('Items') ?>|__('Edit Items') ?>
    -
    - - - - - - - - - - - getVirtualQuoteItems() as $_item): ?> - - - - - - -
    __('Product Name') ?>__('Qty') ?>
    getItemHtml($_item) ?>getQty() ?>
    - -
    -
    -
    - diff --git a/app/design/frontend/default/default/template/checkout/multishipping/item/default.phtml b/app/design/frontend/default/default/template/checkout/multishipping/item/default.phtml deleted file mode 100644 index 52042ef4f8..0000000000 --- a/app/design/frontend/default/default/template/checkout/multishipping/item/default.phtml +++ /dev/null @@ -1,47 +0,0 @@ - -

    getProductName() ?>

    - -getOptionList()):?> -
    - - getFormatedOptionValue($_option) ?> -
    htmlEscape($_option['label']) ?>
    - class="truncated"> - -
    -
    -
    htmlEscape($_option['label']) ?>
    -
    -
    -
    - - - -
    - - diff --git a/app/design/frontend/default/default/template/checkout/multishipping/link.phtml b/app/design/frontend/default/default/template/checkout/multishipping/link.phtml deleted file mode 100644 index 4bc70e8d3f..0000000000 --- a/app/design/frontend/default/default/template/checkout/multishipping/link.phtml +++ /dev/null @@ -1,27 +0,0 @@ - -
  • __('Checkout with Multiple Addresses');?>
  • diff --git a/app/design/frontend/default/default/template/checkout/multishipping/overview.phtml b/app/design/frontend/default/default/template/checkout/multishipping/overview.phtml deleted file mode 100644 index 30a383d029..0000000000 --- a/app/design/frontend/default/default/template/checkout/multishipping/overview.phtml +++ /dev/null @@ -1,295 +0,0 @@ - -
    -

    __('Review Order') ?>

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

    __('Billing Information') ?>

    -
    -
    -
    - getBillingAddress() ?> -
    -

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

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

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

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

    __('Shipping Information') ?>

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

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

    -
    -
    -

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

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

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

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

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

    - -
    -
    -
    -

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

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

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

    -
    -
    -
    -
    -
    -

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

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

    __('Select Shipping Method') ?>

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

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

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

    __('Order Success') ?>

    -
    -
    -

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

    -

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

    - getOrderIds()): ?> - - __('Your order number is ') ?> - $incrementId): ?> - - - - - - - - getChildHtml() ?> -
    -
    - -
    diff --git a/app/design/frontend/default/default/template/checkout/onepage.phtml b/app/design/frontend/default/default/template/checkout/onepage.phtml deleted file mode 100644 index 34cbd43c59..0000000000 --- a/app/design/frontend/default/default/template/checkout/onepage.phtml +++ /dev/null @@ -1,59 +0,0 @@ - - - - - -
      -getSteps() as $_stepId => $_stepInfo): ?> -getChild($_stepId) || !$this->getChild($_stepId)->isShow()): continue; endif; $i++ ?> -
    1. - - -
    2. - -
    - - diff --git a/app/design/frontend/default/default/template/checkout/onepage/agreements.phtml b/app/design/frontend/default/default/template/checkout/onepage/agreements.phtml deleted file mode 100644 index b05c8ab438..0000000000 --- a/app/design/frontend/default/default/template/checkout/onepage/agreements.phtml +++ /dev/null @@ -1,52 +0,0 @@ - - - -getAgreements()) return; ?> -
    -
      -getAgreements() as $_a): ?> -
    1. -
      getContentHeight() ? ' style="height:' . $_a->getContentHeight() . '"' : '')?>> - getIsHtml()):?> - getContent() ?> - - htmlEscape($_a->getContent())) ?> - -
      -

      -   - -

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

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

    -
    • getAddressesHtmlSelect('billing') ?>

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

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

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

    - -

    - -
    -
    -
    -

    __('* Required Fields') ?>

    -
    - - -
    -
    - - diff --git a/app/design/frontend/default/default/template/checkout/onepage/failure.phtml b/app/design/frontend/default/default/template/checkout/onepage/failure.phtml deleted file mode 100644 index 188162b044..0000000000 --- a/app/design/frontend/default/default/template/checkout/onepage/failure.phtml +++ /dev/null @@ -1,33 +0,0 @@ - -
    -

    __('An error occurred in the process of payment') ?>

    -
    -getRealOrderId()) : ?>

    __('Order #') . $this->getRealOrderId() ?>

    -getErrorMessage()) : ?>

    - -

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

    diff --git a/app/design/frontend/default/default/template/checkout/onepage/link.phtml b/app/design/frontend/default/default/template/checkout/onepage/link.phtml deleted file mode 100644 index 8e0e12ea23..0000000000 --- a/app/design/frontend/default/default/template/checkout/onepage/link.phtml +++ /dev/null @@ -1,35 +0,0 @@ - -isPossibleOnepageCheckout()):?> -
  • -isDisabled()):?> - <?php echo Mage::helper('checkout')->__('Proceed to Checkout');?> - - <?php echo Mage::helper('checkout')->__('Proceed to Checkout');?> - -
  • - diff --git a/app/design/frontend/default/default/template/checkout/onepage/login.phtml b/app/design/frontend/default/default/template/checkout/onepage/login.phtml deleted file mode 100644 index 750a012749..0000000000 --- a/app/design/frontend/default/default/template/checkout/onepage/login.phtml +++ /dev/null @@ -1,121 +0,0 @@ - -
    -
    -

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

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

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

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

    __('Login') ?>

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

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

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

     

    - -
    -
    -
    -
    -

    __('* Required Fields') ?>

    - __('Forgot your password?') ?> - -
    -
    -
    - - diff --git a/app/design/frontend/default/default/template/checkout/onepage/payment.phtml b/app/design/frontend/default/default/template/checkout/onepage/payment.phtml deleted file mode 100644 index fcae982ed6..0000000000 --- a/app/design/frontend/default/default/template/checkout/onepage/payment.phtml +++ /dev/null @@ -1,77 +0,0 @@ - - -
    - getChildHtml('methods') ?> - -
    -
    -

    __('* Required Fields') ?>

    -
    - __('Back') ?> - - -
    -
    - - - diff --git a/app/design/frontend/default/default/template/checkout/onepage/payment/methods.phtml b/app/design/frontend/default/default/template/checkout/onepage/payment/methods.phtml deleted file mode 100644 index a2efd5cfad..0000000000 --- a/app/design/frontend/default/default/template/checkout/onepage/payment/methods.phtml +++ /dev/null @@ -1,53 +0,0 @@ - - -
    -
    - getMethods() as $_method): $_code = $_method->getCode() ?> -
    - getMethods()) > 1 ): ?> - getSelectedMethodCode()==$_code): ?> checked="checked" /> - - - - -
    - getChildHtml('payment.method.'.$_code)): ?> -
    - -
    - - -
    -
    - diff --git a/app/design/frontend/default/default/template/checkout/onepage/progress.phtml b/app/design/frontend/default/default/template/checkout/onepage/progress.phtml deleted file mode 100644 index 90bae11792..0000000000 --- a/app/design/frontend/default/default/template/checkout/onepage/progress.phtml +++ /dev/null @@ -1,106 +0,0 @@ - -
    -

    __('Your Checkout Progress') ?>

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

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

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

      __('Billing Address') ?>

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

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

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

      __('Shipping Address') ?>

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

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

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

      __('Shipping Method') ?>

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

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

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

      __('Payment Method') ?>

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

    __('Forgot an Item?') ?> __('Edit Your Cart') ?>

    -

    - - - - - -

    -
    - diff --git a/app/design/frontend/default/default/template/checkout/onepage/review/info.phtml b/app/design/frontend/default/default/template/checkout/onepage/review/info.phtml deleted file mode 100644 index 8b7a0939e1..0000000000 --- a/app/design/frontend/default/default/template/checkout/onepage/review/info.phtml +++ /dev/null @@ -1,57 +0,0 @@ - - - helper('tax')->displayCartBothPrices()): $colspan = $rowspan = 2; else: $colspan = $rowspan = 1; endif; ?> - - - - - - - - helper('tax')->displayCartBothPrices()):?> - - - - - - - - - getChildHtml('totals'); ?> - - getItems() as $_item): ?> - getItemHtml($_item)?> - - -
    __('Product Name') ?>__('Price') ?>__('Qty') ?>__('Subtotal') ?>
    __('Excl. Tax'); ?>__('Incl. Tax'); ?>__('Excl. Tax'); ?>__('Incl. Tax'); ?>
    - diff --git a/app/design/frontend/default/default/template/checkout/onepage/review/item.phtml b/app/design/frontend/default/default/template/checkout/onepage/review/item.phtml deleted file mode 100644 index 6dbd7fcb8d..0000000000 --- a/app/design/frontend/default/default/template/checkout/onepage/review/item.phtml +++ /dev/null @@ -1,238 +0,0 @@ - -getItem()?> - -

    htmlEscape($this->getProductName()) ?>

    - - getOptionList()):?> -
    - - getFormatedOptionValue($_option) ?> -
    htmlEscape($_option['label']) ?>
    - class="truncated"> - -
    -
    -
    htmlEscape($_option['label']) ?>
    -
    -
    -
    - - - -
    - - - - helper('tax')->displayCartPriceExclTax() || $this->helper('tax')->displayCartBothPrices()): ?> - - typeOfDisplay($_item, array(1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?> -
    - -
    - - - typeOfDisplay($_item, array(0, 1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?> - helper('checkout')->formatPrice($_item->getCalculationPrice()+$_item->getWeeeTaxAppliedAmount()+$_item->getWeeeTaxDisposition()); ?> - - helper('checkout')->formatPrice($_item->getCalculationPrice()) ?> - - -
    - - - getApplied($_item)): ?> - - - - typeOfDisplay($_item, 2, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?> -
    - __('Total'); ?>:
    helper('checkout')->formatPrice($_item->getCalculationPrice()+$_item->getWeeeTaxAppliedAmount()+$_item->getWeeeTaxDisposition()); ?>
    -
    - - - - - helper('tax')->displayCartPriceInclTax() || $this->helper('tax')->displayCartBothPrices()): ?> - - helper('checkout')->getPriceInclTax($_item); ?> - typeOfDisplay($_item, array(1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?> -
    - -
    - - - typeOfDisplay($_item, array(0, 1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?> - helper('checkout')->formatPrice($_incl+$_item->getWeeeTaxAppliedAmount()); ?> - - helper('checkout')->formatPrice($_incl-$_item->getWeeeTaxDisposition()) ?> - - -
    - getApplied($_item)): ?> - - - - typeOfDisplay($_item, 2, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?> -
    - __('Total incl. tax'); ?>:
    helper('checkout')->formatPrice($_incl+$_item->getWeeeTaxAppliedAmount()); ?>
    -
    - - - - - getQty() ?> - helper('tax')->displayCartPriceExclTax() || $this->helper('tax')->displayCartBothPrices()): ?> - - typeOfDisplay($_item, array(1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?> -
    - -
    - - - typeOfDisplay($_item, array(0, 1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?> - helper('checkout')->formatPrice($_item->getRowTotal()+$_item->getWeeeTaxAppliedRowAmount()+$_item->getWeeeTaxRowDisposition()); ?> - - helper('checkout')->formatPrice($_item->getRowTotal()) ?> - - -
    - getApplied($_item)): ?> - - - - typeOfDisplay($_item, 2, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?> -
    - __('Total'); ?>:
    helper('checkout')->formatPrice($_item->getRowTotal()+$_item->getWeeeTaxAppliedRowAmount()+$_item->getWeeeTaxRowDisposition()); ?>
    -
    - - - - - helper('tax')->displayCartPriceInclTax() || $this->helper('tax')->displayCartBothPrices()): ?> - - helper('checkout')->getSubtotalInclTax($_item); ?> - typeOfDisplay($_item, array(1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?> -
    - -
    - - - typeOfDisplay($_item, array(0, 1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?> - helper('checkout')->formatPrice($_incl+$_item->getWeeeTaxAppliedRowAmount()); ?> - - helper('checkout')->formatPrice($_incl-$_item->getWeeeTaxRowDisposition()) ?> - - -
    - - - getApplied($_item)): ?> - - - - typeOfDisplay($_item, 2, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?> -
    - __('Total incl. tax'); ?>:
    helper('checkout')->formatPrice($_incl+$_item->getWeeeTaxAppliedRowAmount()); ?>
    -
    - - - - - diff --git a/app/design/frontend/default/default/template/checkout/onepage/review/totals.phtml b/app/design/frontend/default/default/template/checkout/onepage/review/totals.phtml deleted file mode 100644 index db6a0ed741..0000000000 --- a/app/design/frontend/default/default/template/checkout/onepage/review/totals.phtml +++ /dev/null @@ -1,44 +0,0 @@ - -getTotals()): ?> - - helper('tax')->displayCartBothPrices() ? 5 : 3; ?> - - renderTotals(null, $_colspan); ?> - renderTotals('footer', $_colspan); ?> - needDisplayBaseGrandtotal()):?> - - - helper('sales')->__('Your credit card will be charged for') ?> - - - displayBaseGrandtotal() ?> - - - - - diff --git a/app/design/frontend/default/default/template/checkout/onepage/shipping.phtml b/app/design/frontend/default/default/template/checkout/onepage/shipping.phtml deleted file mode 100644 index 86adcf2674..0000000000 --- a/app/design/frontend/default/default/template/checkout/onepage/shipping.phtml +++ /dev/null @@ -1,108 +0,0 @@ - -
    -customerHasAddresses()): ?> -

    __('Select a shipping address from your address book or enter a new address.') ?>

    -

    getAddressesHtmlSelect('shipping') ?>

    - - -
    customerHasAddresses()): ?>style="display:none"> - -
      -
    • getLayout()->createBlock('customer/widget_name')->setObject($this->getAddress()) - ->setFieldIdFormat('shipping:%s')->setFieldNameFormat('shipping[%s]')->setFieldParams('onchange="shipping.setSameAsBilling(false)"')->toHtml() ?>
    • -
    • -
      -
      - -
      -
      -
      - -
    • -

    • -
    • -helper('customer/address')->getStreetLines(); $_i<=$_n; $_i++): ?> -
    • - -
    • -
      -
      -
      -
      - - -
    • -
    • -
      -
      -
      -
      - getCountryHtmlSelect('shipping') ?> -
    • -
    • -
      -
      -
      -
      -
    • - isCustomerLoggedIn() && $this->customerHasAddresses()):?> -
    • getAddress()->getSaveInAddressBook()):?> checked="checked" />
    • - -
    • - -
    -
    -

    getAddress()->getSameAsBilling()): ?>checked="checked" onclick="shipping.setSameAsBilling(this.checked)" />  

    -
    -
    -

    __('* Required Fields') ?>

    -
    - __('Back') ?> - - -
    -
    - - 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 deleted file mode 100644 index ea897d347b..0000000000 --- a/app/design/frontend/default/default/template/checkout/onepage/shipping_method.phtml +++ /dev/null @@ -1,50 +0,0 @@ - -
    -
    -
    - getChildHtml('available') ?> -
    -
    - -
    -getChildHtml('additional') ?> -
    -
    -
    -
    -
    - __('Back') ?> - - -
    -
    -
    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 deleted file mode 100644 index 8671fe5868..0000000000 --- a/app/design/frontend/default/default/template/checkout/onepage/shipping_method/additional.phtml +++ /dev/null @@ -1,27 +0,0 @@ - -helper('giftmessage/message')->getInline('onepage_checkout', $this->getQuote(), $this->getDontDisplayContainer()) ?> diff --git a/app/design/frontend/default/default/template/checkout/onepage/shipping_method/available.phtml b/app/design/frontend/default/default/template/checkout/onepage/shipping_method/available.phtml deleted file mode 100644 index 4b874bcded..0000000000 --- a/app/design/frontend/default/default/template/checkout/onepage/shipping_method/available.phtml +++ /dev/null @@ -1,59 +0,0 @@ - -getShippingRates())): ?> - __('Sorry, no quotes are available for this order at this time.') ?> - -
    - $_rates): ?> -
    getCarrierName($code) ?>
    -
    -
      - -
    • - getErrorMessage()): ?> -
        • getErrorMessage() ?>
      - - getCode()===$this->getAddressShippingMethod()) echo ' checked="checked"' ?> /> - - -
    • - -
    -
    - -
    - diff --git a/app/design/frontend/default/default/template/checkout/success.phtml b/app/design/frontend/default/default/template/checkout/success.phtml deleted file mode 100644 index da4f47afeb..0000000000 --- a/app/design/frontend/default/default/template/checkout/success.phtml +++ /dev/null @@ -1,48 +0,0 @@ - - -
    -

    __('Your order has been received') ?>

    -
    -getMessagesBlock()->getGroupedHtml() ?> -

    __('Thank you for your purchase!') ?>

    -

    - canPrint()) :?> - __('Your order # is: %s', $this->getViewOrderUrl(), $this->getOrderId()) ?>.
    - - __('Your order # is: %s', $this->getOrderId()) ?>.
    - - - __('You will receive an order confirmation email with details of your order and a link to track its progress.') ?>
    - canPrint()) :?> - __('Click here to print a copy of your order confirmation.', $this->getPrintUrl()) ?> - - getChildHtml() ?> -

    -
    - -
    diff --git a/app/design/frontend/default/default/template/checkout/total/default.phtml b/app/design/frontend/default/default/template/checkout/total/default.phtml deleted file mode 100644 index a2c2d2dd2f..0000000000 --- a/app/design/frontend/default/default/template/checkout/total/default.phtml +++ /dev/null @@ -1,38 +0,0 @@ - - - - getRenderingArea() == $this->getTotal()->getArea()): ?> - getTotal()->getTitle() ?> - getRenderingArea() == $this->getTotal()->getArea()): ?> - - - getRenderingArea() == $this->getTotal()->getArea()): ?> - helper('checkout')->formatPrice($this->getTotal()->getValue()) ?> - getRenderingArea() == $this->getTotal()->getArea()): ?> - - diff --git a/app/design/frontend/default/default/template/checkout/total/tax.phtml b/app/design/frontend/default/default/template/checkout/total/tax.phtml deleted file mode 100644 index b56589f6f8..0000000000 --- a/app/design/frontend/default/default/template/checkout/total/tax.phtml +++ /dev/null @@ -1,76 +0,0 @@ - - - -helper('tax')->displayFullSummary() && $this->getTotal()->getValue()!=0): ?> - - getTotal()->getFullInfo() as $info): ?> - - - - - - - - - - - - (%) - -
    - - - - helper('checkout')->formatPrice($amount); ?> - - - - - - - - -helper('tax')->displayFullSummary() && $this->getTotal()->getValue()!=0): ?> class="tax-total" onclick="expandDetails(this, '.tax-details-')"> - - helper('tax')->displayFullSummary()): ?> -
    getTotal()->getTitle() ?>
    - - getTotal()->getTitle() ?> - - - helper('checkout')->formatPrice($this->getTotal()->getValue()) ?> - diff --git a/app/design/frontend/default/default/template/chronopay/form.phtml b/app/design/frontend/default/default/template/chronopay/form.phtml deleted file mode 100644 index 182992f277..0000000000 --- a/app/design/frontend/default/default/template/chronopay/form.phtml +++ /dev/null @@ -1,89 +0,0 @@ - - -
    - getMethodCode() ?> - -
    diff --git a/app/design/frontend/default/default/template/chronopay/info.phtml b/app/design/frontend/default/default/template/chronopay/info.phtml deleted file mode 100644 index 9e578ab14e..0000000000 --- a/app/design/frontend/default/default/template/chronopay/info.phtml +++ /dev/null @@ -1,34 +0,0 @@ - -getInfo()): ?> -getMethod()->getTitle() ?>
    -__('Name on the Card: %s', $this->htmlEscape($this->getInfo()->getCcOwner())) ?>
    -__('Credit Card Type: %s', $this->htmlEscape($this->getCcTypeName())) ?>
    -__('Credit Card Number: xxxx-%s', $this->htmlEscape($this->getInfo()->getCcLast4())) ?> - - - diff --git a/app/design/frontend/default/default/template/chronopay/standard/failure.phtml b/app/design/frontend/default/default/template/chronopay/standard/failure.phtml deleted file mode 100644 index c4d2348507..0000000000 --- a/app/design/frontend/default/default/template/chronopay/standard/failure.phtml +++ /dev/null @@ -1,30 +0,0 @@ - -
    -

    __('Error occured') ?>

    -
    -

    __('There was an error occurred during paying process.') ?>

    diff --git a/app/design/frontend/default/default/template/chronopay/standard/form.phtml b/app/design/frontend/default/default/template/chronopay/standard/form.phtml deleted file mode 100644 index e6b19edea7..0000000000 --- a/app/design/frontend/default/default/template/chronopay/standard/form.phtml +++ /dev/null @@ -1,34 +0,0 @@ - -
    - getMethodCode() ?> - -
    diff --git a/app/design/frontend/default/default/template/cms/content.phtml b/app/design/frontend/default/default/template/cms/content.phtml deleted file mode 100644 index b88c1a29bd..0000000000 --- a/app/design/frontend/default/default/template/cms/content.phtml +++ /dev/null @@ -1,27 +0,0 @@ - -getPageContent(); ?> diff --git a/app/design/frontend/default/default/template/cms/default/home.phtml b/app/design/frontend/default/default/template/cms/default/home.phtml deleted file mode 100644 index 50dbc44aea..0000000000 --- a/app/design/frontend/default/default/template/cms/default/home.phtml +++ /dev/null @@ -1 +0,0 @@ -There was no Home CMS page configured or found. diff --git a/app/design/frontend/default/default/template/cms/default/no-route.phtml b/app/design/frontend/default/default/template/cms/default/no-route.phtml deleted file mode 100644 index 4c3851aec1..0000000000 --- a/app/design/frontend/default/default/template/cms/default/no-route.phtml +++ /dev/null @@ -1 +0,0 @@ -There was no 404 CMS page configured or found. diff --git a/app/design/frontend/default/default/template/cms/meta.phtml b/app/design/frontend/default/default/template/cms/meta.phtml deleted file mode 100644 index bd3635fa04..0000000000 --- a/app/design/frontend/default/default/template/cms/meta.phtml +++ /dev/null @@ -1,32 +0,0 @@ - -getPageMetaKeywords()): ?> - - -getPageMetaDescription()): ?> - - diff --git a/app/design/frontend/default/default/template/cms/widget/link/link_block.phtml b/app/design/frontend/default/default/template/cms/widget/link/link_block.phtml deleted file mode 100644 index 61af302b99..0000000000 --- a/app/design/frontend/default/default/template/cms/widget/link/link_block.phtml +++ /dev/null @@ -1,27 +0,0 @@ - -getLinkAttributes() ?>>htmlEscape($this->getAnchorText()) ?> diff --git a/app/design/frontend/default/default/template/cms/widget/link/link_inline.phtml b/app/design/frontend/default/default/template/cms/widget/link/link_inline.phtml deleted file mode 100644 index febec05ea3..0000000000 --- a/app/design/frontend/default/default/template/cms/widget/link/link_inline.phtml +++ /dev/null @@ -1,27 +0,0 @@ - -getLinkAttributes() ?>>htmlEscape($this->getAnchorText()) ?> diff --git a/app/design/frontend/default/default/template/cms/widget/static_block/default.phtml b/app/design/frontend/default/default/template/cms/widget/static_block/default.phtml deleted file mode 100644 index a6b4ca0ce8..0000000000 --- a/app/design/frontend/default/default/template/cms/widget/static_block/default.phtml +++ /dev/null @@ -1,27 +0,0 @@ - -
    getText(); ?>
    diff --git a/app/design/frontend/default/default/template/contacts/form.phtml b/app/design/frontend/default/default/template/contacts/form.phtml deleted file mode 100644 index df91c36da6..0000000000 --- a/app/design/frontend/default/default/template/contacts/form.phtml +++ /dev/null @@ -1,69 +0,0 @@ - -
    getMessagesBlock()->getGroupedHtml() ?>
    -
    -

    __('Contact Us') ?>

    -
    -
    -
    -

    __('Contact Information') ?>

    -
      -
    • -
      -
      - -
      - -
      -
      - -
      - -
      - -
      -
      - -
      - -
      - -
      -
      - -
      -
    • -
    -
    -
    -

    __('* Required Fields') ?>

    - -
    -
    - diff --git a/app/design/frontend/default/default/template/core/formkey.phtml b/app/design/frontend/default/default/template/core/formkey.phtml deleted file mode 100644 index b4add88425..0000000000 --- a/app/design/frontend/default/default/template/core/formkey.phtml +++ /dev/null @@ -1,27 +0,0 @@ - - diff --git a/app/design/frontend/default/default/template/core/link.phtml b/app/design/frontend/default/default/template/core/link.phtml deleted file mode 100644 index debac0f749..0000000000 --- a/app/design/frontend/default/default/template/core/link.phtml +++ /dev/null @@ -1,27 +0,0 @@ - -getLinkAttributes() ?>>htmlEscape($this->getAnchorText()) ?> diff --git a/app/design/frontend/default/default/template/core/messages.phtml b/app/design/frontend/default/default/template/core/messages.phtml deleted file mode 100644 index a5cacbc08d..0000000000 --- a/app/design/frontend/default/default/template/core/messages.phtml +++ /dev/null @@ -1,47 +0,0 @@ - -getMessages($type) ) { - if ( !$html ) { - $html .= '
      '; - } - $html .= '
    • '; - $html .= '
        '; - - foreach ( $messages as $message ) { - $html.= '
      • '; - $html.= $message->getText(); - $html.= '
      • '; - } - $html .= '
      '; - $html .= '
    • '; - } - } - if ( $html) { - $html .= '
    '; - } - ?> diff --git a/app/design/frontend/default/default/template/customer/account/dashboard.phtml b/app/design/frontend/default/default/template/customer/account/dashboard.phtml deleted file mode 100644 index 3da9c7cb2c..0000000000 --- a/app/design/frontend/default/default/template/customer/account/dashboard.phtml +++ /dev/null @@ -1,42 +0,0 @@ - -
    -

    __('My Dashboard') ?>

    -
    -getMessagesBlock()->getGroupedHtml() ?> -getChildHtml('hello') ?> -getChildHtml('top') ?> - - -getChildHtml('info1') ?> -getChildHtml('info2') ?> diff --git a/app/design/frontend/default/default/template/customer/account/dashboard/address.phtml b/app/design/frontend/default/default/template/customer/account/dashboard/address.phtml deleted file mode 100644 index 0bf2563890..0000000000 --- a/app/design/frontend/default/default/template/customer/account/dashboard/address.phtml +++ /dev/null @@ -1,46 +0,0 @@ - -
    -
    __('Address Book') ?>
    - __('Manage Addresses') ?> -
    -
    -
    -
    __('Primary Billing Address') ?>
    -
    - getPrimaryBillingAddressHtml() ?>
    - __('Edit Address') ?> -
    -
    -
    -
    __('Primary Shipping Address') ?>
    -
    - getPrimaryShippingAddressHtml() ?>
    - __('Edit Address') ?> -
    -
    -

    diff --git a/app/design/frontend/default/default/template/customer/account/dashboard/hello.phtml b/app/design/frontend/default/default/template/customer/account/dashboard/hello.phtml deleted file mode 100644 index 4d8cec6d19..0000000000 --- a/app/design/frontend/default/default/template/customer/account/dashboard/hello.phtml +++ /dev/null @@ -1,29 +0,0 @@ - -
    -

    __('Hello, %s!', $this->htmlEscape($this->getCustomerName())) ?>
    -__('From your My Account Dashboard you have the ability to view a snapshot of your recent account activity and update your account information. Select a link below to view or edit information.') ?>

    diff --git a/app/design/frontend/default/default/template/customer/account/dashboard/info.phtml b/app/design/frontend/default/default/template/customer/account/dashboard/info.phtml deleted file mode 100644 index 0a12347920..0000000000 --- a/app/design/frontend/default/default/template/customer/account/dashboard/info.phtml +++ /dev/null @@ -1,55 +0,0 @@ - -
    -
    -
    -
    __('Contact Information') ?>
    - __('Edit') ?> -
    -

    - htmlEscape($this->getCustomer()->getName()) ?>
    - htmlEscape($this->getCustomer()->getEmail()) ?>
    - __('Change Password') ?> -

    -
    - isNewsletterEnabled() ): ?> -
    -
    -
    __('Newsletters') ?>
    - __('Edit') ?> -
    -

    - getIsSubscribed() ): ?> - __("You are currently subscribed to 'General Subscription'.") ?> - - __('You are currently not subscribed to any newsletter.') ?> - -

    -
    - -
    -
    diff --git a/app/design/frontend/default/default/template/customer/account/dashboard/newsletter.phtml b/app/design/frontend/default/default/template/customer/account/dashboard/newsletter.phtml deleted file mode 100644 index cef31ae125..0000000000 --- a/app/design/frontend/default/default/template/customer/account/dashboard/newsletter.phtml +++ /dev/null @@ -1,33 +0,0 @@ - -
    -
    -
    __('Newsletters') ?>
    - __('Edit Newsletters') ?> -
    -

    __('You are currently subscribed to our newsletter.') ?>

    -
    diff --git a/app/design/frontend/default/default/template/customer/account/dashboard/sidebar.phtml b/app/design/frontend/default/default/template/customer/account/dashboard/sidebar.phtml deleted file mode 100644 index 03becf2287..0000000000 --- a/app/design/frontend/default/default/template/customer/account/dashboard/sidebar.phtml +++ /dev/null @@ -1,26 +0,0 @@ - diff --git a/app/design/frontend/default/default/template/customer/account/link/back.phtml b/app/design/frontend/default/default/template/customer/account/link/back.phtml deleted file mode 100644 index 6508d61dec..0000000000 --- a/app/design/frontend/default/default/template/customer/account/link/back.phtml +++ /dev/null @@ -1,29 +0,0 @@ - - diff --git a/app/design/frontend/default/default/template/customer/account/navigation.phtml b/app/design/frontend/default/default/template/customer/account/navigation.phtml deleted file mode 100644 index 5ae0efb0c8..0000000000 --- a/app/design/frontend/default/default/template/customer/account/navigation.phtml +++ /dev/null @@ -1,44 +0,0 @@ - - diff --git a/app/design/frontend/default/default/template/customer/address.phtml b/app/design/frontend/default/default/template/customer/address.phtml deleted file mode 100644 index f179b4f1e4..0000000000 --- a/app/design/frontend/default/default/template/customer/address.phtml +++ /dev/null @@ -1,92 +0,0 @@ - -

    Address Book

    -getMessagesBlock()->getGroupedHtml() ?> - - - - - -

    Primary

    - - - - - - - - - - - - -
    -
    - format('html') ?> -
    -

    - __('Edit Address') ?> -

    -
    -

    __('You have no primary entries in your address book.') ?>

    -
    -

    __('Additional Address Entries') ?>

    - - - - - - - - - - - - -
    -
    - format('html') ?> -
    -

    - __('Edit Address') ?> | __('Delete Address') ?> -

    -
    -

    __('You have no additional entries in your address book.') ?>

    -
    -
    - - diff --git a/app/design/frontend/default/default/template/customer/address/book.phtml b/app/design/frontend/default/default/template/customer/address/book.phtml deleted file mode 100644 index d6356dfb24..0000000000 --- a/app/design/frontend/default/default/template/customer/address/book.phtml +++ /dev/null @@ -1,116 +0,0 @@ - - -
    -

    __('Address Book') ?>

    - -
    -getMessagesBlock()->getGroupedHtml() ?> -
    -
    -

    __('Default Addresses') ?>

    -
      - getCustomer()->getDefaultBilling()): ?> -
    1. -
      __('Default Billing Address') ?>
      -
      - getAddressHtml(Mage::getSingleton('customer/session')->getCustomer()->getAddressById($_pAddsses)) ?>
      - __('Change Billing Address') ?>
      -
    2. - getCustomer()->getDefaultShipping()): ?> -
    3. -
      __('Default Billing Address') ?>
      -
      - getAddressHtml(Mage::getSingleton('customer/session')->getCustomer()->getAddressById($_pAddsses)) ?>
      - __('Change Billing Address') ?> -
      -
    4. - -
    5. -
      __('Default Billing Address') ?>
      - __('You have no default billing address in your address book.') ?>
    6. - - getCustomer()->getDefaultShipping()): ?> -
    7. -
      __('Default Shipping Address') ?>
      -
      - getAddressHtml(Mage::getSingleton('customer/session')->getCustomer()->getAddressById($_pAddsses)) ?>
      - __('Change Shipping Address') ?> -
      -
    8. - getCustomer()->getDefaultBilling()): ?> -
    9. -
      __('Default Shipping Address') ?>
      - getAddressHtml(Mage::getSingleton('customer/session')->getCustomer()->getAddressById($_pAddsses)) ?>
      - __('Change Shipping Address') ?> -
      -
    10. - -
    11. -
      __('Default Shipping Address') ?>
      __('You have no default shipping address in your address book.') ?> -
    12. - -
    -
    -
    -

    __('Additional Address Entries') ?>

    -
      - getAdditionalAddresses()): ?> - -
    1. -
      - getAddressHtml($_address) ?>
      - __('Edit Address') ?> - | - __('Delete Address') ?> -
      -
    2. - - -
    3. __('You have no additional address entries in your address book.') ?>
    4. - -
    -
    -
    - - diff --git a/app/design/frontend/default/default/template/customer/address/edit.phtml b/app/design/frontend/default/default/template/customer/address/edit.phtml deleted file mode 100644 index 330bb535b5..0000000000 --- a/app/design/frontend/default/default/template/customer/address/edit.phtml +++ /dev/null @@ -1,135 +0,0 @@ - - -getTitle()): ?> -
    -

    getTitle() ?>

    -
    - -getMessagesBlock()->getGroupedHtml() ?> -
    -
    - getBlockHtml('formkey')?> - - -

    __('Contact Information') ?>

    -
      -
    • - getLayout()->createBlock('customer/widget_name')->setObject($this->getAddress()->getFirstname() ? $this->getAddress() : $this->getCustomer())->toHtml() ?> -
    • -
    • -
      - -
    • -
    • -
      -
      - -
      -
      -
      - -
      -
    • -
    -
    -
    -

    __('Address') ?>

    -
      -
    • -
      - -
    • -helper('customer/address')->getStreetLines(); $_i<=$_n; $_i++): ?> -
    • - -
    • - -
    • -
      -
      - -
      -
      -
      - - - -
      -
    • -
    • -
      -
      - -
      -
      -
      - getCountryHtmlSelect() ?> -
      -
    • -
    • - isDefaultBilling()): ?> - __('Default Billing Address') ?> - canSetAsDefaultBilling()): ?> -   - - - - -
    • -
    • - isDefaultShipping()): ?> - __('Default Shipping Address') ?> - canSetAsDefaultShipping()): ?> -   - - - - -
    • -
    -
    -
    -

    __('* Required Fields') ?>

    - « __('Back') ?> - -
    -
    - diff --git a/app/design/frontend/default/default/template/customer/balance.phtml b/app/design/frontend/default/default/template/customer/balance.phtml deleted file mode 100644 index 59edac430f..0000000000 --- a/app/design/frontend/default/default/template/customer/balance.phtml +++ /dev/null @@ -1,31 +0,0 @@ - - getMessagesBlock()->getGroupedHtml() ?> - __('Your account balance is: %s', $customer->getStoreBalance()) ?> - diff --git a/app/design/frontend/default/default/template/customer/dashboard.phtml b/app/design/frontend/default/default/template/customer/dashboard.phtml deleted file mode 100644 index c4662cadaf..0000000000 --- a/app/design/frontend/default/default/template/customer/dashboard.phtml +++ /dev/null @@ -1,84 +0,0 @@ - -getMessagesBlock()->getGroupedHtml() ?> -
    -

    __('Personal Information') ?>

    -

    - getCustomer()->toString('{{firstname}} {{lastname}}
    {{email}}') ?> -
    - __('Edit Personal Information') ?> -

    -

    - getSubscriptionText() ?> -

    __('Edit Newsletter Subscription') ?>

    -
    -
    -

    __('Addresses') ?>

    -getPrimaryAddresses()): ?> - -
    - format('html') ?> -
    __('Edit Address') ?> -
    - - -__('Go to Address Book') ?> -
    -
    -
    -

    __('Last 5 Orders') ?>

    -

    - __('Order List...') ?>
    - __('View Order List') ?> -

    -
    - -
    -

    __('Personal Information') ?>

    -
    - -helper('wishlist')->isAllow()) : ?> -
    -

    __('My Wishlist') ?>

    -
    - - -
    -

    __('My Reviews') ?>

    -
    - -
    -

    __('My Tags') ?>

    -
    - -
    -

    __('Last Viewed Items') ?>

    -
    - -
    -

    __('Shopping Cart') ?>

    -
    diff --git a/app/design/frontend/default/default/template/customer/form/address.phtml b/app/design/frontend/default/default/template/customer/form/address.phtml deleted file mode 100644 index 91189b4647..0000000000 --- a/app/design/frontend/default/default/template/customer/form/address.phtml +++ /dev/null @@ -1,121 +0,0 @@ - - - -
    -

    getAddressId()): ?>__('Edit Address Entry') ?>__('New Address Entry') ?>

    -getMessagesBlock()->getGroupedHtml() ?> -
    -
    - - -

    __('Personal Information') ?>

    -
      -
    • - getLayout()->createBlock('customer/widget_name')->setObject($data)->toHtml() ?> -
    • -
    • -
      -
      - -
      -
    • -
    -
    -
    -

    __('Address') ?>

    -
      -
    • -
      - -
    • -helper('customer/address')->getStreetLines(); $_i<=$_n; $_i++): ?> -
    • - -
    • - -
    • -
      -
      - -
      -
      -
      - - - -
      -
    • -
    • -
      -
      - -
      -
      -
      - -
      -
    • -
    • -
      -
      -
      -
      -
      - -
      -
    • - $type): ?> -
    • - isPrimary($type['address_type_id'])): ?> - __("This is My Primary %s Address", ucfirst($type['name'])) ?> - -   - - -
    • - -
    -
    -
    -

    __('* Required Fields') ?>

    - « __('Back') ?> - -
    -
    - diff --git a/app/design/frontend/default/default/template/customer/form/changepassword.phtml b/app/design/frontend/default/default/template/customer/form/changepassword.phtml deleted file mode 100644 index 0d10aef7e6..0000000000 --- a/app/design/frontend/default/default/template/customer/form/changepassword.phtml +++ /dev/null @@ -1,58 +0,0 @@ - - getMessagesBlock()->getGroupedHtml() ?> -
    -
    - __('Change Account Password') ?> -
      -
    • -
      -
      - -
      -
    • -
    • -
      -
      - -
      -
      -
      - -
      -
    • -
    -
    -
    -

    __('* Required Fields') ?>

    - « __('Back') ?> - -
    -
    - diff --git a/app/design/frontend/default/default/template/customer/form/confirmation.phtml b/app/design/frontend/default/default/template/customer/form/confirmation.phtml deleted file mode 100644 index 3c18fb19b4..0000000000 --- a/app/design/frontend/default/default/template/customer/form/confirmation.phtml +++ /dev/null @@ -1,51 +0,0 @@ - -
    -

    __('Send confirmation link') ?>

    -
    - getMessagesBlock()->getGroupedHtml() ?> -
    -
    - __('Retrieve your confirmation link here') ?> -

    __('Please enter your email below and we\'ll send you confirmation link for it.') ?>

    -
      -
    • -

      -
    • -
    -
    -

    __('* Required Fields') ?>

    - « __('Back to Login') ?> - -
    -
    -
    - diff --git a/app/design/frontend/default/default/template/customer/form/edit.phtml b/app/design/frontend/default/default/template/customer/form/edit.phtml deleted file mode 100644 index 16215c176d..0000000000 --- a/app/design/frontend/default/default/template/customer/form/edit.phtml +++ /dev/null @@ -1,108 +0,0 @@ - -
    -

    __('Edit Account Information') ?>

    -
    -getMessagesBlock()->getGroupedHtml() ?> -
    -
    - getBlockHtml('formkey')?> -

    __('Account Information') ?>

    -
      -
    • - getLayout()->createBlock('customer/widget_name')->setObject($this->getCustomer())->toHtml() ?>
    • -
    • -
      -
      - -
      -
    • -getLayout()->createBlock('customer/widget_dob') ?> -isEnabled()): ?> -
    • setDate($this->getCustomer()->getDob())->toHtml() ?>
    • - -getLayout()->createBlock('customer/widget_taxvat') ?> -isEnabled()): ?> -
    • setTaxvat($this->getCustomer()->getTaxvat())->toHtml() ?>
    • - -getLayout()->createBlock('customer/widget_gender') ?> -isEnabled()): ?> -
    • setGender($this->getCustomer()->getGender())->toHtml() ?>
    • - -
    -
    -

    getCustomer()->getChangePassword()==1): ?> checked="checked" /> -

    - -
    - « __('Back') ?> -

    __('* Required Fields') ?>

    - -
    -
    - diff --git a/app/design/frontend/default/default/template/customer/form/forgotpassword.phtml b/app/design/frontend/default/default/template/customer/form/forgotpassword.phtml deleted file mode 100644 index f2e2357494..0000000000 --- a/app/design/frontend/default/default/template/customer/form/forgotpassword.phtml +++ /dev/null @@ -1,54 +0,0 @@ - -
    -

    __('Forgot Your Password?') ?>

    -
    - getMessagesBlock()->getGroupedHtml() ?> -
    -
    - __('Retrieve your password here') ?> -

    __('Please enter your email below and we\'ll send you a new password.') ?>

    -
      -
    • -
      -
      - -
      -
    • -
    -
    -

    __('* Required Fields') ?>

    - « __('Back to Login') ?> - -
    -
    -
    - diff --git a/app/design/frontend/default/default/template/customer/form/login.phtml b/app/design/frontend/default/default/template/customer/form/login.phtml deleted file mode 100644 index 8ffbefe5e8..0000000000 --- a/app/design/frontend/default/default/template/customer/form/login.phtml +++ /dev/null @@ -1,75 +0,0 @@ - - - -
    -

    __('Log in or Create an Account') ?>

    -
    -getMessagesBlock()->getGroupedHtml() ?> -
    - -
    - diff --git a/app/design/frontend/default/default/template/customer/form/mini.login.phtml b/app/design/frontend/default/default/template/customer/form/mini.login.phtml deleted file mode 100644 index 35ef755e6d..0000000000 --- a/app/design/frontend/default/default/template/customer/form/mini.login.phtml +++ /dev/null @@ -1,33 +0,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 deleted file mode 100644 index a5954aa4bf..0000000000 --- a/app/design/frontend/default/default/template/customer/form/mini.newsletter.phtml +++ /dev/null @@ -1,42 +0,0 @@ - - diff --git a/app/design/frontend/default/default/template/customer/form/newsletter.phtml b/app/design/frontend/default/default/template/customer/form/newsletter.phtml deleted file mode 100644 index 5dceaf254b..0000000000 --- a/app/design/frontend/default/default/template/customer/form/newsletter.phtml +++ /dev/null @@ -1,45 +0,0 @@ - -getMessagesBlock()->getGroupedHtml() ?> -
    -

    __('Newsletter Subscription') ?>

    -
    -
    -
    - getBlockHtml('formkey')?> -

    getIsSubscribed()): ?> checked="checked" />

    -
    -
    - « __('Back') ?> - -
    -
    - diff --git a/app/design/frontend/default/default/template/customer/form/register.phtml b/app/design/frontend/default/default/template/customer/form/register.phtml deleted file mode 100644 index 8991c88907..0000000000 --- a/app/design/frontend/default/default/template/customer/form/register.phtml +++ /dev/null @@ -1,156 +0,0 @@ - - -
    -

    __('Create an Account') ?>

    -
    -getMessagesBlock()->getGroupedHtml() ?> -
    -
    - - -

    __('Personal Information') ?>

    -
      -
    • - getLayout()->createBlock('customer/widget_name')->setObject($this->getFormData())->toHtml() ?> -
    • -
    • -
      -
      - -
      -
    • - isNewsletterEnabled()): ?> -
    • - getFormData()->getIsSubscribed()): ?> checked="checked" /> - -
    • - -getLayout()->createBlock('customer/widget_dob') ?> -isEnabled()): ?> -
    • setDate($this->getFormData()->getDob())->toHtml() ?>
    • - -getLayout()->createBlock('customer/widget_taxvat') ?> -isEnabled()): ?> -
    • setTaxvat($this->getFormData()->getTaxvat())->toHtml() ?>
    • - -getLayout()->createBlock('customer/widget_gender') ?> -isEnabled()): ?> -
    • setGender($this->getFormData()->getGender())->toHtml() ?>
    • - -
    -
    -getShowAddressFields()): ?> - -
    -

    __('Address Information') ?>

    -
      -
    • -
      -
      - -
      -
      -
      - -
      -
    • -
    • -
      - -
    • -helper('customer/address')->getStreetLines(); $_i<=$_n; $_i++): ?> -
    • - - -
    • -
    • -
      -
      - -
      -
      -
      - - - -
      -
    • -
    • -
      -
      - -
      -
      -
      - getCountryHtmlSelect() ?> -
      -
    • -
    -
    - - - -
    -

    __('Login Information') ?>

    -
      -
    • -
      -
      - -
      -
      -
      - -
      -
    • -
    -
    -
    -

    __('* Required Fields') ?>

    - « __('Back') ?> - -
    -
    - diff --git a/app/design/frontend/default/default/template/customer/logout.phtml b/app/design/frontend/default/default/template/customer/logout.phtml deleted file mode 100644 index f8ea5b240c..0000000000 --- a/app/design/frontend/default/default/template/customer/logout.phtml +++ /dev/null @@ -1,33 +0,0 @@ - -
    -

    __("You're now Logged Out") ?>

    -
    -

    __('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 deleted file mode 100644 index 4c48905dac..0000000000 --- a/app/design/frontend/default/default/template/customer/order/view.phtml +++ /dev/null @@ -1,84 +0,0 @@ - -
    -

    __('Order #%s (%s)', $order->getOrderId(), $order->getStatus()) ?>

    -
    -
    -
    -

    __('Billing Information') ?>

    -
    - getAddressByType('billing')->format('html') ?> -
    -
    -
    -

    __('Payment Method') ?>

    - getChildHtml('payment') ?> -
    -
    -
    -
    -

    __('Shipping Information') ?>

    -
    - getAddressByType('shipping')->format('html') ?> -
    -
    -

    __('Shipping Method') ?>

    - getShippingDescription() ?> -
    -
    - getEntitiesByType('item') ?> - - - - - - - - - - - - - - - - - - - - - - - - -
    __('Items Order') ?>__('Qty') ?>__('Price') ?>__('Ext. Price') ?>
    - __('Grand Total: %s', $order->getGrandTotal()) ?> -
    htmlEscape($_item->getName()) ?>getQty() ?>getPrice() ?>getRowTotal() ?>
    - - diff --git a/app/design/frontend/default/default/template/customer/orders.phtml b/app/design/frontend/default/default/template/customer/orders.phtml deleted file mode 100644 index ef8eba78c4..0000000000 --- a/app/design/frontend/default/default/template/customer/orders.phtml +++ /dev/null @@ -1,63 +0,0 @@ - - -
    -

    __('My Orders') ?>

    -
    - -getSize()): ?> - - - - - - - - - - - - - - - - - - - - - - - -
    __('Order #') ?>__('Date') ?>__('Total') ?>__('Status') ?>__('Details') ?>
    getRealOrderId() ?> getCreatedAt())) ?> getGrandTotal() ?> getStatus() ?> __('View Order') ?> 
    - - -

    __('You have placed no orders yet.') ?>

    - - diff --git a/app/design/frontend/default/default/template/customer/widget/dob.phtml b/app/design/frontend/default/default/template/customer/widget/dob.phtml deleted file mode 100644 index 9f51eef2fe..0000000000 --- a/app/design/frontend/default/default/template/customer/widget/dob.phtml +++ /dev/null @@ -1,92 +0,0 @@ -getLayout()->createBlock('customer/widget_dob') - ->setDate($this->getCustomer()->getDob()) - ->toHtml() ?> - -For checkout/onepage/billing.phtml: - -getLayout()->createBlock('customer/widget_dob') - ->setDate($this->getCustomer()->getDob()) - ->setFieldIdFormat('billing:%s') - ->setFieldNameFormat('billing[%s]') - ->toHtml() ?> - -NOTE: Regarding styles - if we leave it this way, we'll move it to boxes.css - Alternatively we could calculate widths automatically using block input parameters. -*/ - -/** - * @see Mage_Customer_Block_Widget_Dob - */ -?> -
    - - -setDateInput('d', - '
    - getFieldParams() . ' /> - -
    ' - ); - - $this->setDateInput('m', - '
    - getFieldParams() . ' /> - -
    ' - ); - - $this->setDateInput('y', - '
    - getFieldParams() . ' /> - -
    ' - ); -?> -getSortedDateInputs() ?> - - - - -
    - diff --git a/app/design/frontend/default/default/template/customer/widget/gender.phtml b/app/design/frontend/default/default/template/customer/widget/gender.phtml deleted file mode 100644 index 4ad8217a82..0000000000 --- a/app/design/frontend/default/default/template/customer/widget/gender.phtml +++ /dev/null @@ -1,34 +0,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 deleted file mode 100644 index 9d5eb41acd..0000000000 --- a/app/design/frontend/default/default/template/customer/widget/name.phtml +++ /dev/null @@ -1,157 +0,0 @@ -getLayout()->createBlock('customer/widget_name') - ->setObject($this->getAddress()) - ->toHtml() ?> - -For checkout/onepage/shipping.phtml: - -getLayout()->createBlock('customer/widget_name') - ->setObject($this->getAddress()) - ->setFieldIdFormat('shipping:%s') - ->setFieldNameFormat('shipping[%s]') - ->setFieldParams('onchange="shipping.setSameAsBilling(false);"') - ->toHtml() ?> -*/ -?> -
    -showPrefix()): ?> -
    - -
    - getPrefixOptions()===false): ?> - getFieldParams() ?> /> - - - -
    - - -
    - -
    - getFieldParams() ?> /> -
    - -showMiddlename()): ?> -
    - -
    - getFieldParams() ?> /> -
    - - -
    - -
    - getFieldParams() ?> /> -
    - -showSuffix()): ?> -
    - -
    - getSuffixOptions()===false): ?> - getFieldParams() ?> /> - - - -
    - - -
    diff --git a/app/design/frontend/default/default/template/customer/widget/taxvat.phtml b/app/design/frontend/default/default/template/customer/widget/taxvat.phtml deleted file mode 100644 index 20b6f480dc..0000000000 --- a/app/design/frontend/default/default/template/customer/widget/taxvat.phtml +++ /dev/null @@ -1,40 +0,0 @@ - - -
    - -
    - getFieldParams() ?> /> -
    diff --git a/app/design/frontend/default/default/template/customer/wishlist.phtml b/app/design/frontend/default/default/template/customer/wishlist.phtml deleted file mode 100644 index 4afee19abd..0000000000 --- a/app/design/frontend/default/default/template/customer/wishlist.phtml +++ /dev/null @@ -1,60 +0,0 @@ - - -

    __('Wishlist') ?>

    -getSize()): ?> -
    - - - - - - - - - - - - - - - -
    __('Product') ?>__('Status') ?>__('To Cart') ?>__('Remove') ?>
    - - htmlEscape($item->getProduct()->getName()) ?> - getStatus() ?>
    - -
    - -

    __('You have placed no products yet.') ?>

    - - diff --git a/app/design/frontend/default/default/template/cybermut/error.phtml b/app/design/frontend/default/default/template/cybermut/error.phtml deleted file mode 100644 index c4d2348507..0000000000 --- a/app/design/frontend/default/default/template/cybermut/error.phtml +++ /dev/null @@ -1,30 +0,0 @@ - -
    -

    __('Error occured') ?>

    -
    -

    __('There was an error occurred during paying process.') ?>

    diff --git a/app/design/frontend/default/default/template/cybermut/form.phtml b/app/design/frontend/default/default/template/cybermut/form.phtml deleted file mode 100644 index e9d87b1117..0000000000 --- a/app/design/frontend/default/default/template/cybermut/form.phtml +++ /dev/null @@ -1,34 +0,0 @@ - -
    - getMethodCode() ?> - -
    diff --git a/app/design/frontend/default/default/template/cybersource/form.phtml b/app/design/frontend/default/default/template/cybersource/form.phtml deleted file mode 100644 index 6f70488bec..0000000000 --- a/app/design/frontend/default/default/template/cybersource/form.phtml +++ /dev/null @@ -1,194 +0,0 @@ - -
    - getMethodCode() ?> - - -
    - diff --git a/app/design/frontend/default/default/template/cybersource/info.phtml b/app/design/frontend/default/default/template/cybersource/info.phtml deleted file mode 100644 index 360ba5ff91..0000000000 --- a/app/design/frontend/default/default/template/cybersource/info.phtml +++ /dev/null @@ -1,38 +0,0 @@ - -getInfo()): ?> -getMethod()->getTitle() ?>
    - -__('Credit Card Type: %s', $this->getCcTypeName()) ?>
    -__('Credit Card Number: xxxx-%s', $this->getInfo()->getCcLast4()) ?> -getInfo()->getCcSsIssue()): ?> -__("Switch/Solo/Maestro(UK Domestic) card issue number: %s", $this->getInfo()->getCcSsIssue()) ?>
    - -getInfo()->getCcSsStartYear()): ?> -__('Switch/Solo/Maestro(UK Domestic) card start Date: %s/%s', $this->getCcStartMonth(), $this->getInfo()->getCcSsStartYear()) ?> - - diff --git a/app/design/frontend/default/default/template/directory/currency.phtml b/app/design/frontend/default/default/template/directory/currency.phtml deleted file mode 100644 index fe850607ce..0000000000 --- a/app/design/frontend/default/default/template/directory/currency.phtml +++ /dev/null @@ -1,56 +0,0 @@ - - -getCurrencyCount()>1): ?> -
    -
    -

    __('Select Your Currency') ?>

    -
    - -
    - - diff --git a/app/design/frontend/default/default/template/directory/currency/switch.phtml b/app/design/frontend/default/default/template/directory/currency/switch.phtml deleted file mode 100644 index 2253df1b25..0000000000 --- a/app/design/frontend/default/default/template/directory/currency/switch.phtml +++ /dev/null @@ -1,31 +0,0 @@ - -

    __('Currency') ?>

    -__('Your current currency is: %s', $currency->getCode()) ?> - diff --git a/app/design/frontend/default/default/template/downloadable/catalog/product/links.phtml b/app/design/frontend/default/default/template/downloadable/catalog/product/links.phtml deleted file mode 100644 index 4fcab6172e..0000000000 --- a/app/design/frontend/default/default/template/downloadable/catalog/product/links.phtml +++ /dev/null @@ -1,114 +0,0 @@ - -getLinksPurchasedSeparately() ?> -getProduct()->isSaleable() && $this->hasLinks()):?> -
    - getLinks(); ?> - getLinkSelectionRequired(); ?> -
    - decoratedIsLast){?> class="last"> - - - - - - -
    - - diff --git a/app/design/frontend/default/default/template/downloadable/catalog/product/samples.phtml b/app/design/frontend/default/default/template/downloadable/catalog/product/samples.phtml deleted file mode 100644 index b6c9b083e5..0000000000 --- a/app/design/frontend/default/default/template/downloadable/catalog/product/samples.phtml +++ /dev/null @@ -1,45 +0,0 @@ - - -hasSamples()): ?> -
    -
    getSamplesTitle() ?>
    - getSamples() ?> - -
    - getIsOpenInNewWindow()?'onclick="this.target=\'_blank\'"':''; ?>>getTitle() ?> -
    - -
    - diff --git a/app/design/frontend/default/default/template/downloadable/catalog/product/type.phtml b/app/design/frontend/default/default/template/downloadable/catalog/product/type.phtml deleted file mode 100644 index 10d294b387..0000000000 --- a/app/design/frontend/default/default/template/downloadable/catalog/product/type.phtml +++ /dev/null @@ -1,45 +0,0 @@ - - -getProduct() ?> - -isSaleable()): ?> -

    __('Availability: In stock.') ?>

    - -

    __('Availability: Out of stock.') ?>

    - - -getPriceHtml($_product) ?> - -getChildHtml('samples') ?> diff --git a/app/design/frontend/default/default/template/downloadable/checkout/cart/item/default.phtml b/app/design/frontend/default/default/template/downloadable/checkout/cart/item/default.phtml deleted file mode 100644 index 0e100947d3..0000000000 --- a/app/design/frontend/default/default/template/downloadable/checkout/cart/item/default.phtml +++ /dev/null @@ -1,267 +0,0 @@ - -getItem()?> - - <?php $this->__('Remove item')?> - <?php echo $this->htmlEscape($this->getProductName()) ?> - -

    getProductName() ?>

    - - getOptionList()):?> -
    - - getFormatedOptionValue($_option) ?> -
    htmlEscape($_option['label']) ?>
    - class="truncated"> - -
    -
    -
    htmlEscape($_option['label']) ?>
    -
    -
    -
    - - - -
    - - - - - getLinks()): ?> -
    -
    getLinksTitle() ?>
    - -
    getTitle() ?>
    - -
    - - - - getMessages()): ?> - -
    - * -
    - - - - helper('wishlist')->isAllowInCart()) : ?> - - - - - helper('tax')->displayCartPriceExclTax() || $this->helper('tax')->displayCartBothPrices()): ?> - - typeOfDisplay($_item, array(1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?> -
    - -
    - - - typeOfDisplay($_item, array(0, 1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?> - helper('checkout')->formatPrice($_item->getCalculationPrice()+$_item->getWeeeTaxAppliedAmount()+$_item->getWeeeTaxDisposition()); ?> - - helper('checkout')->formatPrice($_item->getCalculationPrice()) ?> - - -
    - - - getApplied($_item)): ?> - - - - typeOfDisplay($_item, 2, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?> -
    - __('Total'); ?>:
    helper('checkout')->formatPrice($_item->getCalculationPrice()+$_item->getWeeeTaxAppliedAmount()+$_item->getWeeeTaxDisposition()); ?>
    -
    - - - - - helper('tax')->displayCartPriceInclTax() || $this->helper('tax')->displayCartBothPrices()): ?> - - helper('checkout')->getPriceInclTax($_item); ?> - typeOfDisplay($_item, array(1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?> -
    - -
    - - - typeOfDisplay($_item, array(0, 1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?> - helper('checkout')->formatPrice($_incl+$_item->getWeeeTaxAppliedAmount()); ?> - - helper('checkout')->formatPrice($_incl-$_item->getWeeeTaxDisposition()) ?> - - -
    - getApplied($_item)): ?> - - - - typeOfDisplay($_item, 2, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?> -
    - __('Total incl. tax'); ?>:
    helper('checkout')->formatPrice($_incl+$_item->getWeeeTaxAppliedAmount()); ?>
    -
    - - - - - - - - helper('tax')->displayCartPriceExclTax() || $this->helper('tax')->displayCartBothPrices()): ?> - - typeOfDisplay($_item, array(1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?> -
    - -
    - - - typeOfDisplay($_item, array(0, 1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?> - helper('checkout')->formatPrice($_item->getRowTotal()+$_item->getWeeeTaxAppliedRowAmount()+$_item->getWeeeTaxRowDisposition()); ?> - - helper('checkout')->formatPrice($_item->getRowTotal()) ?> - - -
    - getApplied($_item)): ?> - - - - typeOfDisplay($_item, 2, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?> -
    - __('Total'); ?>:
    helper('checkout')->formatPrice($_item->getRowTotal()+$_item->getWeeeTaxAppliedRowAmount()+$_item->getWeeeTaxRowDisposition()); ?>
    -
    - - - - - helper('tax')->displayCartPriceInclTax() || $this->helper('tax')->displayCartBothPrices()): ?> - - helper('checkout')->getSubtotalInclTax($_item); ?> - typeOfDisplay($_item, array(1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?> -
    - -
    - - - typeOfDisplay($_item, array(0, 1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?> - helper('checkout')->formatPrice($_incl+$_item->getWeeeTaxAppliedRowAmount()); ?> - - helper('checkout')->formatPrice($_incl-$_item->getWeeeTaxRowDisposition()) ?> - - -
    - - - getApplied($_item)): ?> - - - - typeOfDisplay($_item, 2, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?> -
    - __('Total incl. tax'); ?>:
    helper('checkout')->formatPrice($_incl+$_item->getWeeeTaxAppliedRowAmount()); ?>
    -
    - - - - - diff --git a/app/design/frontend/default/default/template/downloadable/checkout/multishipping/item/downloadable.phtml b/app/design/frontend/default/default/template/downloadable/checkout/multishipping/item/downloadable.phtml deleted file mode 100644 index 4a704e3b19..0000000000 --- a/app/design/frontend/default/default/template/downloadable/checkout/multishipping/item/downloadable.phtml +++ /dev/null @@ -1,57 +0,0 @@ - -

    getProductName() ?>

    - -getOptionList()):?> -
    - - getFormatedOptionValue($_option) ?> -
    htmlEscape($_option['label']) ?>
    - class="truncated"> - -
    -
    -
    htmlEscape($_option['label']) ?>
    -
    -
    -
    - - - -
    - - - - getLinks()): ?> -
    -
    getLinksTitle() ?>
    - -
    getTitle() ?>
    - -
    - - diff --git a/app/design/frontend/default/default/template/downloadable/checkout/onepage/review/item.phtml b/app/design/frontend/default/default/template/downloadable/checkout/onepage/review/item.phtml deleted file mode 100644 index 3a4dc75970..0000000000 --- a/app/design/frontend/default/default/template/downloadable/checkout/onepage/review/item.phtml +++ /dev/null @@ -1,248 +0,0 @@ - -getItem()?> - -

    htmlEscape($this->getProductName()) ?>

    - - getOptionList()):?> -
    - - getFormatedOptionValue($_option) ?> -
    htmlEscape($_option['label']) ?>
    - class="truncated"> - -
    -
    -
    htmlEscape($_option['label']) ?>
    -
    -
    -
    - - - -
    - - - - getLinks()): ?> -
    -
    getLinksTitle() ?>
    - -
    getTitle() ?>
    - -
    - - - - helper('tax')->displayCartPriceExclTax() || $this->helper('tax')->displayCartBothPrices()): ?> - - typeOfDisplay($_item, array(1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?> -
    - -
    - - - typeOfDisplay($_item, array(0, 1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?> - helper('checkout')->formatPrice($_item->getCalculationPrice()+$_item->getWeeeTaxAppliedAmount()+$_item->getWeeeTaxDisposition()); ?> - - helper('checkout')->formatPrice($_item->getCalculationPrice()) ?> - - -
    - - - getApplied($_item)): ?> - - - - typeOfDisplay($_item, 2, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?> -
    - __('Total'); ?>:
    helper('checkout')->formatPrice($_item->getCalculationPrice()+$_item->getWeeeTaxAppliedAmount()+$_item->getWeeeTaxDisposition()); ?>
    -
    - - - - - helper('tax')->displayCartPriceInclTax() || $this->helper('tax')->displayCartBothPrices()): ?> - - helper('checkout')->getPriceInclTax($_item); ?> - typeOfDisplay($_item, array(1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?> -
    - -
    - - - typeOfDisplay($_item, array(0, 1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?> - helper('checkout')->formatPrice($_incl+$_item->getWeeeTaxAppliedAmount()); ?> - - helper('checkout')->formatPrice($_incl-$_item->getWeeeTaxDisposition()) ?> - - -
    - getApplied($_item)): ?> - - - - typeOfDisplay($_item, 2, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?> -
    - __('Total incl. tax'); ?>:
    helper('checkout')->formatPrice($_incl+$_item->getWeeeTaxAppliedAmount()); ?>
    -
    - - - - - getQty() ?> - helper('tax')->displayCartPriceExclTax() || $this->helper('tax')->displayCartBothPrices()): ?> - - typeOfDisplay($_item, array(1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?> -
    - -
    - - - typeOfDisplay($_item, array(0, 1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?> - helper('checkout')->formatPrice($_item->getRowTotal()+$_item->getWeeeTaxAppliedRowAmount()+$_item->getWeeeTaxRowDisposition()); ?> - - helper('checkout')->formatPrice($_item->getRowTotal()) ?> - - -
    - getApplied($_item)): ?> - - - - typeOfDisplay($_item, 2, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?> -
    - __('Total'); ?>:
    helper('checkout')->formatPrice($_item->getRowTotal()+$_item->getWeeeTaxAppliedRowAmount()+$_item->getWeeeTaxRowDisposition()); ?>
    -
    - - - - - helper('tax')->displayCartPriceInclTax() || $this->helper('tax')->displayCartBothPrices()): ?> - - helper('checkout')->getSubtotalInclTax($_item); ?> - typeOfDisplay($_item, array(1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?> -
    - -
    - - - typeOfDisplay($_item, array(0, 1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?> - helper('checkout')->formatPrice($_incl+$_item->getWeeeTaxAppliedRowAmount()); ?> - - helper('checkout')->formatPrice($_incl-$_item->getWeeeTaxRowDisposition()) ?> - - -
    - - - getApplied($_item)): ?> - - - - typeOfDisplay($_item, 2, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?> -
    - __('Total incl. tax'); ?>:
    helper('checkout')->formatPrice($_incl+$_item->getWeeeTaxAppliedRowAmount()); ?>
    -
    - - - - - diff --git a/app/design/frontend/default/default/template/downloadable/checkout/success.phtml b/app/design/frontend/default/default/template/downloadable/checkout/success.phtml deleted file mode 100644 index 8427f52c81..0000000000 --- a/app/design/frontend/default/default/template/downloadable/checkout/success.phtml +++ /dev/null @@ -1,29 +0,0 @@ - -getOrderHasDownloadable()): ?> -__('Go to My Downloadable Products', $this->getDownloadableProductsUrl()) ?> - diff --git a/app/design/frontend/default/default/template/downloadable/customer/products/list.phtml b/app/design/frontend/default/default/template/downloadable/customer/products/list.phtml deleted file mode 100644 index ff7508c830..0000000000 --- a/app/design/frontend/default/default/template/downloadable/customer/products/list.phtml +++ /dev/null @@ -1,69 +0,0 @@ - - -getMessagesBlock()->getGroupedHtml() ?> -getItems(); ?> -
    -

    __('My Downloadable Products') ?>

    -
    -getChildHtml('pager'); ?> - - - - - - - - - - - - - - - - - - - - - - - -
    __('Order #') ?>__('Date') ?>__('Title') ?>__('Status') ?>__('Remaining Downloads') ?>
    getPurchased()->getOrderIncrementId() ?>formatDate($_item->getPurchased()->getCreatedAt()) ?>getPurchased()->getProductName() ?> - getIsOpenInNewWindow()?'onclick="this.target=\'_blank\'"':''; ?>>getLinkTitle() ?>getStatus()) ?>getRemainingDownloads($_item) ?>
    - - -

    __('You have not purchased any downloadable products yet.'); ?>

    - -getChildHtml('pager'); ?> - diff --git a/app/design/frontend/default/default/template/downloadable/email/order/items/creditmemo/downloadable.phtml b/app/design/frontend/default/default/template/downloadable/email/order/items/creditmemo/downloadable.phtml deleted file mode 100644 index e2262514d6..0000000000 --- a/app/design/frontend/default/default/template/downloadable/email/order/items/creditmemo/downloadable.phtml +++ /dev/null @@ -1,128 +0,0 @@ - -getItem() ?> -getItem()->getOrder(); ?> - - - htmlEscape($_item->getName()) ?> - getItemOptions()): ?> -
    - getItemOptions() as $option): ?> -
    -
    - -
    - - getLinks()->getPurchasedItems()): ?> -
    -
    getLinksTitle() ?>
    - -
    getLinkTitle() ?>
    - -
    - - getDescription() ?> - - getSku($_item) ?> - getQty()*1 ?> - - helper('tax')->displayCartPriceExclTax($_order->getStore()) || $this->helper('tax')->displayCartBothPrices($_order->getStore())): ?> - helper('tax')->displayCartBothPrices($_order->getStore())): ?> - __('Excl. Tax'); ?>: - - typeOfDisplay($_item, array(0, 1, 4), 'email', $_order->getStore())): ?> - formatPrice($_item->getRowTotal()+$_item->getWeeeTaxAppliedRowAmount()+$_item->getWeeeTaxRowDisposition()); ?> - - formatPrice($_item->getRowTotal()) ?> - - - - getApplied($_item)): ?> -
    - typeOfDisplay($_item, 1, 'email', $_order->getStore())): ?> - - getApplied($_item) as $tax): ?> - : formatPrice($tax['row_amount'],true,true); ?>
    - -
    - typeOfDisplay($_item, 2, 'email', $_order->getStore())): ?> - getApplied($_item) as $tax): ?> - : formatPrice($tax['row_amount_incl_tax'],true,true); ?>
    - - typeOfDisplay($_item, 4, 'email', $_order->getStore())): ?> - - getApplied($_item) as $tax): ?> - : formatPrice($tax['row_amount_incl_tax'],true,true); ?>
    - -
    - - - typeOfDisplay($_item, 2, 'email', $_order->getStore())): ?> -
    - __('Total'); ?>:
    formatPrice($_item->getCalculationPrice()+$_item->getWeeeTaxAppliedRowAmount()+$_item->getWeeeTaxRowDisposition()); ?>
    - - - - - - helper('tax')->displayCartPriceInclTax($_order->getStore()) || $this->helper('tax')->displayCartBothPrices($_order->getStore())): ?> - helper('tax')->displayCartBothPrices($_order->getStore())): ?> -
    __('Incl. Tax'); ?>: - - helper('checkout')->getSubtotalInclTax($_item); ?> - typeOfDisplay($_item, array(0, 1, 4), 'email', $_order->getStore())): ?> - formatPrice($_incl+$_item->getWeeeTaxAppliedRowAmount()); ?> - - formatPrice($_incl-$_item->getWeeeTaxRowDisposition()) ?> - - getApplied($_item)): ?> -
    - typeOfDisplay($_item, 1, 'email', $_order->getStore())): ?> - - getApplied($_item) as $tax): ?> - : formatPrice($tax['row_amount'],true,true); ?>
    - -
    - typeOfDisplay($_item, 2, 'email', $_order->getStore())): ?> - getApplied($_item) as $tax): ?> - : formatPrice($tax['row_amount_incl_tax'],true,true); ?>
    - - typeOfDisplay($_item, 4, 'email', $_order->getStore())): ?> - - getApplied($_item) as $tax): ?> - : formatPrice($tax['row_amount_incl_tax'],true,true); ?>
    - -
    - - - typeOfDisplay($_item, 2, 'email', $_order->getStore())): ?> - __('Total incl. tax'); ?>:
    formatPrice($_incl+$_item->getWeeeTaxAppliedRowAmount()); ?>
    - - - - - diff --git a/app/design/frontend/default/default/template/downloadable/email/order/items/invoice/downloadable.phtml b/app/design/frontend/default/default/template/downloadable/email/order/items/invoice/downloadable.phtml deleted file mode 100644 index 4522a8a776..0000000000 --- a/app/design/frontend/default/default/template/downloadable/email/order/items/invoice/downloadable.phtml +++ /dev/null @@ -1,131 +0,0 @@ - -getItem() ?> -getItem()->getOrder(); ?> - - - htmlEscape($_item->getName()) ?> - getItemOptions()): ?> -
    - getItemOptions() as $option): ?> -
    -
    - -
    - - getLinks()->getPurchasedItems()): ?> -
    -
    getLinksTitle() ?>
    - -
    - getLinkTitle() ?>  - (__('download') ?>) -
    - -
    - - getDescription() ?> - - getSku($_item) ?> - getQty()*1 ?> - - helper('tax')->displayCartPriceExclTax($_order->getStore()) || $this->helper('tax')->displayCartBothPrices($_order->getStore())): ?> - helper('tax')->displayCartBothPrices($_order->getStore())): ?> - __('Excl. Tax'); ?>: - - typeOfDisplay($_item, array(0, 1, 4), 'email', $_order->getStore())): ?> - formatPrice($_item->getRowTotal()+$_item->getWeeeTaxAppliedRowAmount()+$_item->getWeeeTaxRowDisposition()); ?> - - formatPrice($_item->getRowTotal()) ?> - - - - getApplied($_item)): ?> -
    - typeOfDisplay($_item, 1, 'email', $_order->getStore())): ?> - - getApplied($_item) as $tax): ?> - : formatPrice($tax['row_amount'],true,true); ?>
    - -
    - typeOfDisplay($_item, 2, 'email', $_order->getStore())): ?> - getApplied($_item) as $tax): ?> - : formatPrice($tax['row_amount_incl_tax'],true,true); ?>
    - - typeOfDisplay($_item, 4, 'email', $_order->getStore())): ?> - - getApplied($_item) as $tax): ?> - : formatPrice($tax['row_amount_incl_tax'],true,true); ?>
    - -
    - - - typeOfDisplay($_item, 2, 'email', $_order->getStore())): ?> -
    - __('Total'); ?>:
    formatPrice($_item->getCalculationPrice()+$_item->getWeeeTaxAppliedRowAmount()+$_item->getWeeeTaxRowDisposition()); ?>
    - - - - - - helper('tax')->displayCartPriceInclTax($_order->getStore()) || $this->helper('tax')->displayCartBothPrices($_order->getStore())): ?> - helper('tax')->displayCartBothPrices($_order->getStore())): ?> -
    __('Incl. Tax'); ?>: - - helper('checkout')->getSubtotalInclTax($_item); ?> - typeOfDisplay($_item, array(0, 1, 4), 'email', $_order->getStore())): ?> - formatPrice($_incl+$_item->getWeeeTaxAppliedRowAmount()); ?> - - formatPrice($_incl-$_item->getWeeeTaxRowDisposition()) ?> - - getApplied($_item)): ?> -
    - typeOfDisplay($_item, 1, 'email', $_order->getStore())): ?> - - getApplied($_item) as $tax): ?> - : formatPrice($tax['row_amount'],true,true); ?>
    - -
    - typeOfDisplay($_item, 2, 'email', $_order->getStore())): ?> - getApplied($_item) as $tax): ?> - : formatPrice($tax['row_amount_incl_tax'],true,true); ?>
    - - typeOfDisplay($_item, 4, 'email', $_order->getStore())): ?> - - getApplied($_item) as $tax): ?> - : formatPrice($tax['row_amount_incl_tax'],true,true); ?>
    - -
    - - - typeOfDisplay($_item, 2, 'email', $_order->getStore())): ?> - __('Total incl. tax'); ?>:
    formatPrice($_incl+$_item->getWeeeTaxAppliedRowAmount()); ?>
    - - - - - diff --git a/app/design/frontend/default/default/template/downloadable/email/order/items/order/downloadable.phtml b/app/design/frontend/default/default/template/downloadable/email/order/items/order/downloadable.phtml deleted file mode 100644 index 1d89dbf0ec..0000000000 --- a/app/design/frontend/default/default/template/downloadable/email/order/items/order/downloadable.phtml +++ /dev/null @@ -1,137 +0,0 @@ - -getItem() ?> -getItem()->getOrder() ?> - - - htmlEscape($_item->getName()) ?> - getItemOptions()): ?> -
    - getItemOptions() as $option): ?> -
    -
    - -
    - - getLinks()->getPurchasedItems()): ?> -
    -
    getLinksTitle() ?>
    - -
    - getLinkTitle() ?>  - (__('download') ?>) -
    - -
    - - getDescription() ?> - getGiftMessageId() && $_giftMessage = $this->helper('giftmessage/message')->getGiftMessage($_item->getGiftMessageId())): ?> -
    __('Gift Message') ?> -
    __('From:'); ?> htmlEscape($_giftMessage->getSender()) ?> -
    __('To:'); ?> htmlEscape($_giftMessage->getRecipient()) ?> -
    __('Message:'); ?>
    htmlEscape($_giftMessage->getMessage()) ?> - - - getSku($_item) ?> - getQtyOrdered()*1 ?> - - helper('tax')->displayCartPriceExclTax($_order->getStore()) || $this->helper('tax')->displayCartBothPrices($_order->getStore())): ?> - helper('tax')->displayCartBothPrices($_order->getStore())): ?> - __('Excl. Tax'); ?>: - - typeOfDisplay($_item, array(0, 1, 4), 'email', $_order->getStore())): ?> - formatPrice($_item->getRowTotal()+$_item->getWeeeTaxAppliedRowAmount()+$_item->getWeeeTaxRowDisposition()); ?> - - formatPrice($_item->getRowTotal()) ?> - - - - getApplied($_item)): ?> -
    - typeOfDisplay($_item, 1, 'email', $_order->getStore())): ?> - - getApplied($_item) as $tax): ?> - : formatPrice($tax['row_amount'],true,true); ?>
    - -
    - typeOfDisplay($_item, 2, 'email', $_order->getStore())): ?> - getApplied($_item) as $tax): ?> - : formatPrice($tax['row_amount_incl_tax'],true,true); ?>
    - - typeOfDisplay($_item, 4, 'email', $_order->getStore())): ?> - - getApplied($_item) as $tax): ?> - : formatPrice($tax['row_amount_incl_tax'],true,true); ?>
    - -
    - - - typeOfDisplay($_item, 2, 'email', $_order->getStore())): ?> -
    - __('Total'); ?>:
    formatPrice($_item->getCalculationPrice()+$_item->getWeeeTaxAppliedRowAmount()+$_item->getWeeeTaxRowDisposition()); ?>
    - - - - - - helper('tax')->displayCartPriceInclTax($_order->getStore()) || $this->helper('tax')->displayCartBothPrices($_order->getStore())): ?> - helper('tax')->displayCartBothPrices($_order->getStore())): ?> -
    __('Incl. Tax'); ?>: - - helper('checkout')->getSubtotalInclTax($_item); ?> - typeOfDisplay($_item, array(0, 1, 4), 'email', $_order->getStore())): ?> - formatPrice($_incl+$_item->getWeeeTaxAppliedRowAmount()); ?> - - formatPrice($_incl-$_item->getWeeeTaxRowDisposition()) ?> - - getApplied($_item)): ?> -
    - typeOfDisplay($_item, 1, 'email', $_order->getStore())): ?> - - getApplied($_item) as $tax): ?> - : formatPrice($tax['row_amount'],true,true); ?>
    - -
    - typeOfDisplay($_item, 2, 'email', $_order->getStore())): ?> - getApplied($_item) as $tax): ?> - : formatPrice($tax['row_amount_incl_tax'],true,true); ?>
    - - typeOfDisplay($_item, 4, 'email', $_order->getStore())): ?> - - getApplied($_item) as $tax): ?> - : formatPrice($tax['row_amount_incl_tax'],true,true); ?>
    - -
    - - - typeOfDisplay($_item, 2, 'email', $_order->getStore())): ?> - __('Total incl. tax'); ?>:
    formatPrice($_incl+$_item->getWeeeTaxAppliedRowAmount()); ?>
    - - - - - diff --git a/app/design/frontend/default/default/template/downloadable/sales/order/creditmemo/items/renderer/downloadable.phtml b/app/design/frontend/default/default/template/downloadable/sales/order/creditmemo/items/renderer/downloadable.phtml deleted file mode 100644 index d82c5258f7..0000000000 --- a/app/design/frontend/default/default/template/downloadable/sales/order/creditmemo/items/renderer/downloadable.phtml +++ /dev/null @@ -1,308 +0,0 @@ - -getItem() ?> -getItem()->getOrderItem()->getOrder() ?> - -
    htmlEscape($_item->getName()) ?>
    - getItemOptions()): ?> -
    - -
    htmlEscape($_option['label']) ?>
    - getPrintStatus()): ?> - getFormatedOptionValue($_option) ?> - class="truncated"> - -
    -
    -
    htmlEscape($_option['label']) ?>
    -
    -
    -
    - - - -
    htmlEscape( (isset($_option['print_value']) ? $_option['print_value'] : $_option['value']) ) ?>
    - - -
    - - - getLinks()): ?> -
    -
    getLinksTitle() ?>
    - getPurchasedItems() as $link): ?> -
    getLinkTitle() ?>
    - -
    - - - getDescription() ?> - helper('giftmessage/message')->getIsMessagesAvailable('order_item', $_item->getOrderItem()) && $_item->getGiftMessageId()): ?> -
    __('Gift Message') ?> - - - splitInjection($this->getSku()) ?> - - helper('tax')->displayCartBothPrices() || $this->helper('tax')->displayCartPriceExclTax()): ?> - - helper('tax')->displayCartBothPrices()): ?> - typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
    - - __('Excl. Tax'); ?>: - typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
    - - - typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
    - -
    - - - typeOfDisplay($this->getItem(), array(0, 1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> - getOrder()->formatPrice($this->getItem()->getPrice()+$this->getItem()->getWeeeTaxAppliedAmount()+$this->getItem()->getWeeeTaxDisposition()); ?> - - getOrder()->formatPrice($this->getItem()->getPrice()) ?> - - -
    - - - getApplied($this->getItem())): ?> - - - - typeOfDisplay($this->getItem(), 2, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
    - __('Total'); ?>:
    getOrder()->formatPrice($this->getItem()->getPrice()+$this->getItem()->getWeeeTaxAppliedAmount()+$this->getItem()->getWeeeTaxDisposition()); ?>
    -
    - - - -
    - - helper('tax')->displayCartBothPrices() || $this->helper('tax')->displayCartPriceInclTax()): ?> - - helper('tax')->displayCartBothPrices()): ?> - typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
    - - __('Incl. Tax'); ?>: - typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
    - - - helper('checkout')->getPriceInclTax($this->getItem()); ?> - typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
    - -
    - - - typeOfDisplay($this->getItem(), array(0, 1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> - getOrder()->formatPrice($_incl+$this->getItem()->getWeeeTaxAppliedAmount()); ?> - - getOrder()->formatPrice($_incl-$this->getItem()->getWeeeTaxDisposition()) ?> - - -
    - - - getApplied($this->getItem())): ?> - - - - typeOfDisplay($this->getItem(), 2, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
    - __('Total incl. tax'); ?>:
    getOrder()->formatPrice($_incl+$this->getItem()->getWeeeTaxAppliedAmount()); ?>
    -
    - - - - - - getQty()*1 ?> - - helper('tax')->displayCartBothPrices() || $this->helper('tax')->displayCartPriceExclTax()): ?> - - helper('tax')->displayCartBothPrices()): ?> - typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
    - - __('Excl. Tax'); ?>: - typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
    - - - typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
    - -
    - - - typeOfDisplay($this->getItem(), array(0, 1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> - getOrder()->formatPrice($this->getItem()->getRowTotal()+$this->getItem()->getWeeeTaxAppliedRowAmount()+$this->getItem()->getWeeeTaxRowDisposition()); ?> - - getOrder()->formatPrice($this->getItem()->getRowTotal()) ?> - - -
    - - - getApplied($this->getItem())): ?> - - - - typeOfDisplay($this->getItem(), 2, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
    - __('Total'); ?>:
    getOrder()->formatPrice($this->getItem()->getRowTotal()+$this->getItem()->getWeeeTaxAppliedRowAmount()+$this->getItem()->getWeeeTaxRowDisposition()); ?>
    -
    - - - -
    - - helper('tax')->displayCartBothPrices() || $this->helper('tax')->displayCartPriceInclTax()): ?> - - helper('tax')->displayCartBothPrices()): ?> - typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
    - - __('Incl. Tax'); ?>: - typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
    - - - helper('checkout')->getSubtotalInclTax($this->getItem()); ?> - typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
    - -
    - - typeOfDisplay($this->getItem(), array(0, 1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> - getOrder()->formatPrice($_incl+$this->getItem()->getWeeeTaxAppliedRowAmount()); ?> - - getOrder()->formatPrice($_incl-$this->getItem()->getWeeeTaxRowDisposition()) ?> - - -
    - - - getApplied($this->getItem())): ?> - - - - typeOfDisplay($this->getItem(), 2, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
    - __('Total incl. tax'); ?>:
    getOrder()->formatPrice($_incl+$this->getItem()->getWeeeTaxAppliedRowAmount()); ?>
    -
    - - - - - - - - - formatPrice(-$_item->getDiscountAmount()) ?> - - formatPrice($_item->getRowTotal()-$_item->getDiscountAmount()+$_item->getTaxAmount()+$_item->getWeeeTaxAppliedRowAmount()) ?> - - diff --git a/app/design/frontend/default/default/template/downloadable/sales/order/invoice/items/renderer/downloadable.phtml b/app/design/frontend/default/default/template/downloadable/sales/order/invoice/items/renderer/downloadable.phtml deleted file mode 100644 index 0019e8bbc3..0000000000 --- a/app/design/frontend/default/default/template/downloadable/sales/order/invoice/items/renderer/downloadable.phtml +++ /dev/null @@ -1,305 +0,0 @@ - -getItem() ?> -getItem()->getOrderItem()->getOrder() ?> - -
    htmlEscape($_item->getName()) ?>
    - getItemOptions()): ?> -
    - -
    htmlEscape($_option['label']) ?>
    - getPrintStatus()): ?> - getFormatedOptionValue($_option) ?> - class="truncated"> - - -
    -
    -
    htmlEscape($_option['label']) ?>
    -
    -
    -
    - - - -
    htmlEscape( (isset($_option['print_value']) ? $_option['print_value'] : $_option['value']) ) ?>
    - - -
    - - - getLinks()): ?> -
    -
    getLinksTitle() ?>
    - getPurchasedItems() as $link): ?> -
    getLinkTitle() ?>
    - -
    - - - getDescription() ?> - helper('giftmessage/message')->getIsMessagesAvailable('order_item', $_item->getOrderItem()) && $_item->getGiftMessageId()): ?> -
    __('Gift Message') ?> - - - splitInjection($this->getSku()) ?> - - helper('tax')->displayCartBothPrices() || $this->helper('tax')->displayCartPriceExclTax()): ?> - - helper('tax')->displayCartBothPrices()): ?> - typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
    - - __('Excl. Tax'); ?>: - typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
    - - - typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
    - -
    - - - typeOfDisplay($this->getItem(), array(0, 1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> - getOrder()->formatPrice($this->getItem()->getPrice()+$this->getItem()->getWeeeTaxAppliedAmount()+$this->getItem()->getWeeeTaxDisposition()); ?> - - getOrder()->formatPrice($this->getItem()->getPrice()) ?> - - -
    - - - getApplied($this->getItem())): ?> - - - - typeOfDisplay($this->getItem(), 2, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
    - __('Total'); ?>:
    getOrder()->formatPrice($this->getItem()->getPrice()+$this->getItem()->getWeeeTaxAppliedAmount()+$this->getItem()->getWeeeTaxDisposition()); ?>
    -
    - - - -
    - - helper('tax')->displayCartBothPrices() || $this->helper('tax')->displayCartPriceInclTax()): ?> - - helper('tax')->displayCartBothPrices()): ?> - typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
    - - __('Incl. Tax'); ?>: - typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
    - - - helper('checkout')->getPriceInclTax($this->getItem()); ?> - typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
    - -
    - - - typeOfDisplay($this->getItem(), array(0, 1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> - getOrder()->formatPrice($_incl+$this->getItem()->getWeeeTaxAppliedAmount()); ?> - - getOrder()->formatPrice($_incl-$this->getItem()->getWeeeTaxDisposition()) ?> - - -
    - - - getApplied($this->getItem())): ?> - - - - typeOfDisplay($this->getItem(), 2, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
    - __('Total incl. tax'); ?>:
    getOrder()->formatPrice($_incl+$this->getItem()->getWeeeTaxAppliedAmount()); ?>
    -
    - - - - - - getQty()*1 ?> - - helper('tax')->displayCartBothPrices() || $this->helper('tax')->displayCartPriceExclTax()): ?> - - helper('tax')->displayCartBothPrices()): ?> - typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
    - - __('Excl. Tax'); ?>: - typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
    - - - typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
    - -
    - - - typeOfDisplay($this->getItem(), array(0, 1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> - getOrder()->formatPrice($this->getItem()->getRowTotal()+$this->getItem()->getWeeeTaxAppliedRowAmount()+$this->getItem()->getWeeeTaxRowDisposition()); ?> - - getOrder()->formatPrice($this->getItem()->getRowTotal()) ?> - - -
    - - - getApplied($this->getItem())): ?> - - - - typeOfDisplay($this->getItem(), 2, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
    - __('Total'); ?>:
    getOrder()->formatPrice($this->getItem()->getRowTotal()+$this->getItem()->getWeeeTaxAppliedRowAmount()+$this->getItem()->getWeeeTaxRowDisposition()); ?>
    -
    - - - -
    - - helper('tax')->displayCartBothPrices() || $this->helper('tax')->displayCartPriceInclTax()): ?> - - helper('tax')->displayCartBothPrices()): ?> - typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
    - - __('Incl. Tax'); ?>: - typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
    - - - helper('checkout')->getSubtotalInclTax($this->getItem()); ?> - typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
    - -
    - - typeOfDisplay($this->getItem(), array(0, 1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> - getOrder()->formatPrice($_incl+$this->getItem()->getWeeeTaxAppliedRowAmount()); ?> - - getOrder()->formatPrice($_incl-$this->getItem()->getWeeeTaxRowDisposition()) ?> - - -
    - - - getApplied($this->getItem())): ?> - - - - typeOfDisplay($this->getItem(), 2, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
    - __('Total incl. tax'); ?>:
    getOrder()->formatPrice($_incl+$this->getItem()->getWeeeTaxAppliedRowAmount()); ?>
    -
    - - - - - - - - - diff --git a/app/design/frontend/default/default/template/downloadable/sales/order/items/renderer/downloadable.phtml b/app/design/frontend/default/default/template/downloadable/sales/order/items/renderer/downloadable.phtml deleted file mode 100644 index 428ab6fbbb..0000000000 --- a/app/design/frontend/default/default/template/downloadable/sales/order/items/renderer/downloadable.phtml +++ /dev/null @@ -1,327 +0,0 @@ - -getItem() ?> - -
    htmlEscape($_item->getName()) ?>
    - getItemOptions()): ?> -
    - -
    htmlEscape($_option['label']) ?>
    - getPrintStatus()): ?> - getFormatedOptionValue($_option) ?> - class="truncated"> - - -
    -
    -
    htmlEscape($_option['label']) ?>
    -
    -
    -
    - - - -
    htmlEscape( (isset($_option['print_value']) ? $_option['print_value'] : $_option['value']) ) ?>
    - - -
    - - - getLinks()): ?> -
    -
    getLinksTitle() ?>
    - getPurchasedItems() as $link): ?> -
    getLinkTitle() ?>
    - -
    - - - getDescription() ?> - helper('giftmessage/message')->getIsMessagesAvailable('order_item', $_item) && $_item->getGiftMessageId()): ?> -
    __('Gift Message') ?> - - - splitInjection($this->getSku()) ?> - - helper('tax')->displayCartBothPrices() || $this->helper('tax')->displayCartPriceExclTax()): ?> - - helper('tax')->displayCartBothPrices()): ?> - typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
    - - __('Excl. Tax'); ?>: - typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
    - - - typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
    - -
    - - - typeOfDisplay($this->getItem(), array(0, 1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> - getOrder()->formatPrice($this->getItem()->getPrice()+$this->getItem()->getWeeeTaxAppliedAmount()+$this->getItem()->getWeeeTaxDisposition()); ?> - - getOrder()->formatPrice($this->getItem()->getPrice()) ?> - - -
    - - - getApplied($this->getItem())): ?> - - - - typeOfDisplay($this->getItem(), 2, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
    - __('Total'); ?>:
    getOrder()->formatPrice($this->getItem()->getPrice()+$this->getItem()->getWeeeTaxAppliedAmount()+$this->getItem()->getWeeeTaxDisposition()); ?>
    -
    - - - -
    - - helper('tax')->displayCartBothPrices() || $this->helper('tax')->displayCartPriceInclTax()): ?> - - helper('tax')->displayCartBothPrices()): ?> - typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
    - - __('Incl. Tax'); ?>: - typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
    - - - helper('checkout')->getPriceInclTax($this->getItem()); ?> - typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
    - -
    - - - typeOfDisplay($this->getItem(), array(0, 1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> - getOrder()->formatPrice($_incl+$this->getItem()->getWeeeTaxAppliedAmount()); ?> - - getOrder()->formatPrice($_incl-$this->getItem()->getWeeeTaxDisposition()) ?> - - -
    - - - getApplied($this->getItem())): ?> - - - - typeOfDisplay($this->getItem(), 2, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
    - __('Total incl. tax'); ?>:
    getOrder()->formatPrice($_incl+$this->getItem()->getWeeeTaxAppliedAmount()); ?>
    -
    - - - - - - - - getItem()->getQtyOrdered() > 0): ?> - __('Ordered'); ?>: getItem()->getQtyOrdered()*1 ?>
    - - getItem()->getQtyShipped() > 0): ?> - __('Shipped'); ?>: getItem()->getQtyShipped()*1 ?>
    - - getItem()->getQtyCanceled() > 0): ?> - __('Canceled'); ?>: getItem()->getQtyCanceled()*1 ?>
    - - getItem()->getQtyRefunded() > 0): ?> - __('Refunded'); ?>: getItem()->getQtyRefunded()*1 ?>
    - -
    - - - helper('tax')->displayCartBothPrices() || $this->helper('tax')->displayCartPriceExclTax()): ?> - - helper('tax')->displayCartBothPrices()): ?> - typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
    - - __('Excl. Tax'); ?>: - typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
    - - - typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
    - -
    - - - typeOfDisplay($this->getItem(), array(0, 1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> - getOrder()->formatPrice($this->getItem()->getRowTotal()+$this->getItem()->getWeeeTaxAppliedRowAmount()+$this->getItem()->getWeeeTaxRowDisposition()); ?> - - getOrder()->formatPrice($this->getItem()->getRowTotal()) ?> - - -
    - - - getApplied($this->getItem())): ?> - - - - typeOfDisplay($this->getItem(), 2, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
    - __('Total'); ?>:
    getOrder()->formatPrice($this->getItem()->getRowTotal()+$this->getItem()->getWeeeTaxAppliedRowAmount()+$this->getItem()->getWeeeTaxRowDisposition()); ?>
    -
    - - - -
    - - helper('tax')->displayCartBothPrices() || $this->helper('tax')->displayCartPriceInclTax()): ?> - - helper('tax')->displayCartBothPrices()): ?> - typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
    - - __('Incl. Tax'); ?>: - typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
    - - - helper('checkout')->getSubtotalInclTax($this->getItem()); ?> - typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
    - -
    - - typeOfDisplay($this->getItem(), array(0, 1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> - getOrder()->formatPrice($_incl+$this->getItem()->getWeeeTaxAppliedRowAmount()); ?> - - getOrder()->formatPrice($_incl-$this->getItem()->getWeeeTaxRowDisposition()) ?> - - -
    - - - getApplied($this->getItem())): ?> - - - - typeOfDisplay($this->getItem(), 2, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
    - __('Total incl. tax'); ?>:
    getOrder()->formatPrice($_incl+$this->getItem()->getWeeeTaxAppliedRowAmount()); ?>
    -
    - - - - - - - - - - diff --git a/app/design/frontend/default/default/template/email/order/creditmemo/items.phtml b/app/design/frontend/default/default/template/email/order/creditmemo/items.phtml deleted file mode 100644 index e2c4c3da50..0000000000 --- a/app/design/frontend/default/default/template/email/order/creditmemo/items.phtml +++ /dev/null @@ -1,51 +0,0 @@ - -getCreditmemo() ?> -getOrder() ?> - - - - - - - - - - - - getAllItems() as $_item): ?> - getOrderItem()->getParentItem()) continue; else $i++; ?> - > - getItemHtml($_item) ?> - - - - - getChildHtml('creditmemo_totals');?> - -
    __('Item') ?>__('Sku') ?>__('Qty') ?>__('Subtotal') ?>
    - diff --git a/app/design/frontend/default/default/template/email/order/invoice/items.phtml b/app/design/frontend/default/default/template/email/order/invoice/items.phtml deleted file mode 100644 index a30e2bbbb5..0000000000 --- a/app/design/frontend/default/default/template/email/order/invoice/items.phtml +++ /dev/null @@ -1,51 +0,0 @@ - -getInvoice() ?> -getOrder() ?> - - - - - - - - - - - - getAllItems() as $_item): ?> - getOrderItem()->getParentItem()) continue; else $i++; ?> - > - getItemHtml($_item) ?> - - - - - getChildHtml('invoice_totals')?> - -
    __('Item') ?>__('Sku') ?>__('Qty') ?>__('Subtotal') ?>
    - diff --git a/app/design/frontend/default/default/template/email/order/items.phtml b/app/design/frontend/default/default/template/email/order/items.phtml deleted file mode 100644 index 6390cad08a..0000000000 --- a/app/design/frontend/default/default/template/email/order/items.phtml +++ /dev/null @@ -1,58 +0,0 @@ - -getOrder() ?> - - - - - - - - - - - getAllItems() as $_item): ?> - getParentItem()) continue; else $i++; ?> - > - getItemHtml($_item) ?> - - - - - getGiftMessageId() && $_giftMessage = $this->helper('giftmessage/message')->getGiftMessage($_order->getGiftMessageId())): ?> - - - - - getChildHtml('order_totals') ?> - -
    __('Item') ?>__('Sku') ?>__('Qty') ?>__('Subtotal') ?>
    - __('Gift Message for this Order') ?> -
    __('From:'); ?> htmlEscape($_giftMessage->getSender()) ?> -
    __('To:'); ?> htmlEscape($_giftMessage->getRecipient()) ?> -
    __('Message:'); ?>
    htmlEscape($_giftMessage->getMessage()) ?> -
    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 deleted file mode 100644 index 1ba8bf17ea..0000000000 --- a/app/design/frontend/default/default/template/email/order/items/creditmemo/default.phtml +++ /dev/null @@ -1,120 +0,0 @@ - -getItem() ?> -getItem()->getOrder(); ?> - - - htmlEscape($_item->getName()) ?> - getItemOptions()): ?> -
    - getItemOptions() as $option): ?> -
    -
    - -
    - - getDescription() ?> - - getSku($_item) ?> - getQty()*1 ?> - - helper('tax')->displaySalesPriceExclTax($_order->getStore()) || $this->helper('tax')->displaySalesBothPrices($_order->getStore())): ?> - helper('tax')->displaySalesBothPrices($_order->getStore())): ?> - __('Excl. Tax'); ?>: - - typeOfDisplay($_item, array(0, 1, 4), 'email', $_order->getStore())): ?> - formatPrice($_item->getRowTotal()+$_item->getWeeeTaxAppliedRowAmount()+$_item->getWeeeTaxRowDisposition()); ?> - - formatPrice($_item->getRowTotal()) ?> - - - - getApplied($_item)): ?> -
    - typeOfDisplay($_item, 1, 'email', $_order->getStore())): ?> - - getApplied($_item) as $tax): ?> - : formatPrice($tax['row_amount'],true,true); ?>
    - -
    - typeOfDisplay($_item, 2, 'email', $_order->getStore())): ?> - getApplied($_item) as $tax): ?> - : formatPrice($tax['row_amount_incl_tax'],true,true); ?>
    - - typeOfDisplay($_item, 4, 'email', $_order->getStore())): ?> - - getApplied($_item) as $tax): ?> - : formatPrice($tax['row_amount_incl_tax'],true,true); ?>
    - -
    - - - typeOfDisplay($_item, 2, 'email', $_order->getStore())): ?> -
    - __('Total'); ?>:
    formatPrice($_item->getCalculationPrice()+$_item->getWeeeTaxAppliedRowAmount()+$_item->getWeeeTaxRowDisposition()); ?>
    - - - - - - helper('tax')->displaySalesPriceInclTax($_order->getStore()) || $this->helper('tax')->displaySalesBothPrices($_order->getStore())): ?> - helper('tax')->displaySalesBothPrices($_order->getStore())): ?> -
    __('Incl. Tax'); ?>: - - helper('checkout')->getSubtotalInclTax($_item); ?> - typeOfDisplay($_item, array(0, 1, 4), 'email', $_order->getStore())): ?> - formatPrice($_incl+$_item->getWeeeTaxAppliedRowAmount()); ?> - - formatPrice($_incl-$_item->getWeeeTaxRowDisposition()) ?> - - getApplied($_item)): ?> -
    - typeOfDisplay($_item, 1, 'email', $_order->getStore())): ?> - - getApplied($_item) as $tax): ?> - : formatPrice($tax['row_amount'],true,true); ?>
    - -
    - typeOfDisplay($_item, 2, 'email', $_order->getStore())): ?> - getApplied($_item) as $tax): ?> - : formatPrice($tax['row_amount_incl_tax'],true,true); ?>
    - - typeOfDisplay($_item, 4, 'email', $_order->getStore())): ?> - - getApplied($_item) as $tax): ?> - : formatPrice($tax['row_amount_incl_tax'],true,true); ?>
    - -
    - - - typeOfDisplay($_item, 2, 'email', $_order->getStore())): ?> - __('Total incl. tax'); ?>:
    formatPrice($_incl+$_item->getWeeeTaxAppliedRowAmount()); ?>
    - - - - - diff --git a/app/design/frontend/default/default/template/email/order/items/invoice/default.phtml b/app/design/frontend/default/default/template/email/order/items/invoice/default.phtml deleted file mode 100644 index 1ba8bf17ea..0000000000 --- a/app/design/frontend/default/default/template/email/order/items/invoice/default.phtml +++ /dev/null @@ -1,120 +0,0 @@ - -getItem() ?> -getItem()->getOrder(); ?> - - - htmlEscape($_item->getName()) ?> - getItemOptions()): ?> -
    - getItemOptions() as $option): ?> -
    -
    - -
    - - getDescription() ?> - - getSku($_item) ?> - getQty()*1 ?> - - helper('tax')->displaySalesPriceExclTax($_order->getStore()) || $this->helper('tax')->displaySalesBothPrices($_order->getStore())): ?> - helper('tax')->displaySalesBothPrices($_order->getStore())): ?> - __('Excl. Tax'); ?>: - - typeOfDisplay($_item, array(0, 1, 4), 'email', $_order->getStore())): ?> - formatPrice($_item->getRowTotal()+$_item->getWeeeTaxAppliedRowAmount()+$_item->getWeeeTaxRowDisposition()); ?> - - formatPrice($_item->getRowTotal()) ?> - - - - getApplied($_item)): ?> -
    - typeOfDisplay($_item, 1, 'email', $_order->getStore())): ?> - - getApplied($_item) as $tax): ?> - : formatPrice($tax['row_amount'],true,true); ?>
    - -
    - typeOfDisplay($_item, 2, 'email', $_order->getStore())): ?> - getApplied($_item) as $tax): ?> - : formatPrice($tax['row_amount_incl_tax'],true,true); ?>
    - - typeOfDisplay($_item, 4, 'email', $_order->getStore())): ?> - - getApplied($_item) as $tax): ?> - : formatPrice($tax['row_amount_incl_tax'],true,true); ?>
    - -
    - - - typeOfDisplay($_item, 2, 'email', $_order->getStore())): ?> -
    - __('Total'); ?>:
    formatPrice($_item->getCalculationPrice()+$_item->getWeeeTaxAppliedRowAmount()+$_item->getWeeeTaxRowDisposition()); ?>
    - - - - - - helper('tax')->displaySalesPriceInclTax($_order->getStore()) || $this->helper('tax')->displaySalesBothPrices($_order->getStore())): ?> - helper('tax')->displaySalesBothPrices($_order->getStore())): ?> -
    __('Incl. Tax'); ?>: - - helper('checkout')->getSubtotalInclTax($_item); ?> - typeOfDisplay($_item, array(0, 1, 4), 'email', $_order->getStore())): ?> - formatPrice($_incl+$_item->getWeeeTaxAppliedRowAmount()); ?> - - formatPrice($_incl-$_item->getWeeeTaxRowDisposition()) ?> - - getApplied($_item)): ?> -
    - typeOfDisplay($_item, 1, 'email', $_order->getStore())): ?> - - getApplied($_item) as $tax): ?> - : formatPrice($tax['row_amount'],true,true); ?>
    - -
    - typeOfDisplay($_item, 2, 'email', $_order->getStore())): ?> - getApplied($_item) as $tax): ?> - : formatPrice($tax['row_amount_incl_tax'],true,true); ?>
    - - typeOfDisplay($_item, 4, 'email', $_order->getStore())): ?> - - getApplied($_item) as $tax): ?> - : formatPrice($tax['row_amount_incl_tax'],true,true); ?>
    - -
    - - - typeOfDisplay($_item, 2, 'email', $_order->getStore())): ?> - __('Total incl. tax'); ?>:
    formatPrice($_incl+$_item->getWeeeTaxAppliedRowAmount()); ?>
    - - - - - diff --git a/app/design/frontend/default/default/template/email/order/items/order/default.phtml b/app/design/frontend/default/default/template/email/order/items/order/default.phtml deleted file mode 100644 index 155e97ad92..0000000000 --- a/app/design/frontend/default/default/template/email/order/items/order/default.phtml +++ /dev/null @@ -1,126 +0,0 @@ - -getItem() ?> -getItem()->getOrder() ?> - - - htmlEscape($_item->getName()) ?> - getItemOptions()): ?> -
    - getItemOptions() as $option): ?> -
    -
    - -
    - - getDescription() ?> - getGiftMessageId() && $_giftMessage = $this->helper('giftmessage/message')->getGiftMessage($_item->getGiftMessageId())): ?> -
    __('Gift Message') ?> -
    __('From:'); ?> htmlEscape($_giftMessage->getSender()) ?> -
    __('To:'); ?> htmlEscape($_giftMessage->getRecipient()) ?> -
    __('Message:'); ?>
    htmlEscape($_giftMessage->getMessage()) ?> - - - getSku($_item) ?> - getQtyOrdered()*1 ?> - - helper('tax')->displaySalesPriceExclTax($_order->getStore()) || $this->helper('tax')->displaySalesBothPrices($_order->getStore())): ?> - helper('tax')->displaySalesBothPrices($_order->getStore())): ?> - __('Excl. Tax'); ?>: - - typeOfDisplay($_item, array(0, 1, 4), 'email', $_order->getStore())): ?> - formatPrice($_item->getRowTotal()+$_item->getWeeeTaxAppliedRowAmount()+$_item->getWeeeTaxRowDisposition()); ?> - - formatPrice($_item->getRowTotal()) ?> - - - - getApplied($_item)): ?> -
    - typeOfDisplay($_item, 1, 'email', $_order->getStore())): ?> - - getApplied($_item) as $tax): ?> - : formatPrice($tax['row_amount'],true,true); ?>
    - -
    - typeOfDisplay($_item, 2, 'email', $_order->getStore())): ?> - getApplied($_item) as $tax): ?> - : formatPrice($tax['row_amount_incl_tax'],true,true); ?>
    - - typeOfDisplay($_item, 4, 'email', $_order->getStore())): ?> - - getApplied($_item) as $tax): ?> - : formatPrice($tax['row_amount_incl_tax'],true,true); ?>
    - -
    - - - typeOfDisplay($_item, 2, 'email', $_order->getStore())): ?> -
    - __('Total'); ?>:
    formatPrice($_item->getCalculationPrice()+$_item->getWeeeTaxAppliedRowAmount()+$_item->getWeeeTaxRowDisposition()); ?>
    - - - - - - helper('tax')->displaySalesPriceInclTax($_order->getStore()) || $this->helper('tax')->displaySalesBothPrices($_order->getStore())): ?> - helper('tax')->displaySalesBothPrices($_order->getStore())): ?> -
    __('Incl. Tax'); ?>: - - helper('checkout')->getSubtotalInclTax($_item); ?> - typeOfDisplay($_item, array(0, 1, 4), 'email', $_order->getStore())): ?> - formatPrice($_incl+$_item->getWeeeTaxAppliedRowAmount()); ?> - - formatPrice($_incl-$_item->getWeeeTaxRowDisposition()) ?> - - getApplied($_item)): ?> -
    - typeOfDisplay($_item, 1, 'email', $_order->getStore())): ?> - - getApplied($_item) as $tax): ?> - : formatPrice($tax['row_amount'],true,true); ?>
    - -
    - typeOfDisplay($_item, 2, 'email', $_order->getStore())): ?> - getApplied($_item) as $tax): ?> - : formatPrice($tax['row_amount_incl_tax'],true,true); ?>
    - - typeOfDisplay($_item, 4, 'email', $_order->getStore())): ?> - - getApplied($_item) as $tax): ?> - : formatPrice($tax['row_amount_incl_tax'],true,true); ?>
    - -
    - - - typeOfDisplay($_item, 2, 'email', $_order->getStore())): ?> - __('Total incl. tax'); ?>:
    formatPrice($_incl+$_item->getWeeeTaxAppliedRowAmount()); ?>
    - - - - - diff --git a/app/design/frontend/default/default/template/email/order/items/shipment/default.phtml b/app/design/frontend/default/default/template/email/order/items/shipment/default.phtml deleted file mode 100644 index 17f5210aca..0000000000 --- a/app/design/frontend/default/default/template/email/order/items/shipment/default.phtml +++ /dev/null @@ -1,43 +0,0 @@ - -getItem() ?> - - - htmlEscape($_item->getName()) ?> - getItemOptions()): ?> -
    - getItemOptions() as $option): ?> -
    -
    - -
    - - getDescription() ?> - - getSku($_item) ?> - getQty()*1 ?> - 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 deleted file mode 100644 index e6fca5fe1a..0000000000 --- a/app/design/frontend/default/default/template/email/order/shipment/items.phtml +++ /dev/null @@ -1,47 +0,0 @@ - -getShipment() ?> -getOrder() ?> - - - - - - - - - - - getAllItems() as $_item): ?> - getOrderItem()->getParentItem()) continue; else $i++; ?> - > - getItemHtml($_item) ?> - - - -
    __('Item') ?>__('Sku') ?>__('Qty') ?>
    - diff --git a/app/design/frontend/default/default/template/email/order/shipment/track.phtml b/app/design/frontend/default/default/template/email/order/shipment/track.phtml deleted file mode 100644 index 6a5cede93a..0000000000 --- a/app/design/frontend/default/default/template/email/order/shipment/track.phtml +++ /dev/null @@ -1,46 +0,0 @@ - -getShipment() ?> -getOrder() ?> -getAllTracks()): ?> - - - - - - - - - getAllTracks() as $_item): $i++ ?> - > - - - - - -
    __('Shipped By') ?>__('Tracking Number') ?>
    getTitle() ?>getNumber() ?>
    - diff --git a/app/design/frontend/default/default/template/email/productalert/price.phtml b/app/design/frontend/default/default/template/email/productalert/price.phtml deleted file mode 100644 index 8c13b9e6b7..0000000000 --- a/app/design/frontend/default/default/template/email/productalert/price.phtml +++ /dev/null @@ -1,50 +0,0 @@ - -getProducts()): ?> -

    __('You are receiving this notification because you subscribed to receive alerts when the prices for the following products changed:') ?>

    - - - - - - - -
    - - getShortDescription()): ?> -

    - -

    getPrice() != $_product->getFinalPrice()): ?> - __('Regular Price:') ?> formatPrice($_product->getPrice()) ?>
    - __('Special price:') ?> formatPrice($_product->getFinalPrice()) ?> - - __('Price:') ?> formatPrice($_product->getPrice()) ?> -

    -

    __('Click here not to receive alerts for this product') ?>

    -
    -

    __('Unsubscribe from all price alerts') ?>

    - diff --git a/app/design/frontend/default/default/template/email/productalert/stock.phtml b/app/design/frontend/default/default/template/email/productalert/stock.phtml deleted file mode 100644 index c6e46e08b9..0000000000 --- a/app/design/frontend/default/default/template/email/productalert/stock.phtml +++ /dev/null @@ -1,50 +0,0 @@ - -getProducts()): ?> -

    __('You are receiving this notification because you subscribed to receive alerts when the following products are back in stock:') ?>

    - - - - - - - -
    - - getShortDescription()): ?> -

    - -

    getPrice() != $_product->getFinalPrice()): ?> - __('Regular Price:') ?> formatPrice($_product->getPrice()) ?>
    - __('Special price:') ?> formatPrice($_product->getFinalPrice()) ?> - - __('Price:') ?> formatPrice($_product->getPrice()) ?> -

    -

    __('Click here not to receive alerts for this product') ?>

    -
    -

    __('Unsubscribe from all stock alerts') ?>

    - diff --git a/app/design/frontend/default/default/template/eway/form.phtml b/app/design/frontend/default/default/template/eway/form.phtml deleted file mode 100644 index 770c28aabb..0000000000 --- a/app/design/frontend/default/default/template/eway/form.phtml +++ /dev/null @@ -1,92 +0,0 @@ - - -
    - getMethodCode() ?> - -
    diff --git a/app/design/frontend/default/default/template/eway/info.phtml b/app/design/frontend/default/default/template/eway/info.phtml deleted file mode 100644 index b3141442e0..0000000000 --- a/app/design/frontend/default/default/template/eway/info.phtml +++ /dev/null @@ -1,33 +0,0 @@ - -getInfo()): ?> -__('Name on the Card: %s', $this->htmlEscape($this->getInfo()->getCcOwner())) ?>
    -__('Credit Card Type: %s', $this->htmlEscape($this->getCcTypeName())) ?>
    -__('Credit Card Number: xxxx-%s', $this->htmlEscape($this->getInfo()->getCcLast4())) ?> - - - diff --git a/app/design/frontend/default/default/template/eway/secure/failure.phtml b/app/design/frontend/default/default/template/eway/secure/failure.phtml deleted file mode 100644 index ee679a5b0a..0000000000 --- a/app/design/frontend/default/default/template/eway/secure/failure.phtml +++ /dev/null @@ -1,31 +0,0 @@ - -
    -

    __('Error occured') ?>

    -
    -

    getErrorMessage() ?>.

    -

    __('Please continue shopping.', $this->getContinueShoppingUrl()) ?>

    diff --git a/app/design/frontend/default/default/template/eway/secure/form.phtml b/app/design/frontend/default/default/template/eway/secure/form.phtml deleted file mode 100644 index 26a4fa2002..0000000000 --- a/app/design/frontend/default/default/template/eway/secure/form.phtml +++ /dev/null @@ -1,34 +0,0 @@ - -
    - getMethodCode() ?> - -
    diff --git a/app/design/frontend/default/default/template/eway/shared/failure.phtml b/app/design/frontend/default/default/template/eway/shared/failure.phtml deleted file mode 100644 index ee679a5b0a..0000000000 --- a/app/design/frontend/default/default/template/eway/shared/failure.phtml +++ /dev/null @@ -1,31 +0,0 @@ - -
    -

    __('Error occured') ?>

    -
    -

    getErrorMessage() ?>.

    -

    __('Please continue shopping.', $this->getContinueShoppingUrl()) ?>

    diff --git a/app/design/frontend/default/default/template/eway/shared/form.phtml b/app/design/frontend/default/default/template/eway/shared/form.phtml deleted file mode 100644 index 47e5d677c7..0000000000 --- a/app/design/frontend/default/default/template/eway/shared/form.phtml +++ /dev/null @@ -1,34 +0,0 @@ - -
    - getMethodCode() ?> - -
    diff --git a/app/design/frontend/default/default/template/flo2cash/form.phtml b/app/design/frontend/default/default/template/flo2cash/form.phtml deleted file mode 100644 index e6a4ae8bc1..0000000000 --- a/app/design/frontend/default/default/template/flo2cash/form.phtml +++ /dev/null @@ -1,89 +0,0 @@ - - -
    - getMethodCode() ?> - -
    diff --git a/app/design/frontend/default/default/template/flo2cash/info.phtml b/app/design/frontend/default/default/template/flo2cash/info.phtml deleted file mode 100644 index 9e578ab14e..0000000000 --- a/app/design/frontend/default/default/template/flo2cash/info.phtml +++ /dev/null @@ -1,34 +0,0 @@ - -getInfo()): ?> -getMethod()->getTitle() ?>
    -__('Name on the Card: %s', $this->htmlEscape($this->getInfo()->getCcOwner())) ?>
    -__('Credit Card Type: %s', $this->htmlEscape($this->getCcTypeName())) ?>
    -__('Credit Card Number: xxxx-%s', $this->htmlEscape($this->getInfo()->getCcLast4())) ?> - - - diff --git a/app/design/frontend/default/default/template/giftmessage/form.phtml b/app/design/frontend/default/default/template/giftmessage/form.phtml deleted file mode 100644 index 1a869d8b2c..0000000000 --- a/app/design/frontend/default/default/template/giftmessage/form.phtml +++ /dev/null @@ -1,81 +0,0 @@ - - -getSaveMode()): ?> -
    -

    __('Gift Message') ?>

    -
    -
    -
      -
    • -
      -
      - -
      -
    • -
    • -
      -
      - -
      -
    • -
    • -
      -
      - -
      -
    • -
    -
    -

    __('* Required Fields') ?>

    -   - - getMessage()->getGiftMessageId()): ?> - - -
    -
    -getSaveMode()=='save'): ?> -

    __('Your gift message has been successfully saved') ?>

    -
    - -

    __('Your gift message has been successfully removed') ?>

    -
    - - diff --git a/app/design/frontend/default/default/template/giftmessage/helper.phtml b/app/design/frontend/default/default/template/giftmessage/helper.phtml deleted file mode 100644 index 78ced9ded1..0000000000 --- a/app/design/frontend/default/default/template/giftmessage/helper.phtml +++ /dev/null @@ -1,80 +0,0 @@ - -getScriptIncluded() && $this->getCanDisplayContainer()): ?> - -setScriptIncluded(true); ?> - -getCanDisplayContainer()): ?> -
    - -getType()): ?> - - - - - - hasGiftMessage()): ?> - __('Edit Gift Message') ?> - - __('Add Gift Message') ?> - - - - - - hasGiftMessage()): ?> - __('Edit Gift Message') ?> - - __('Add Gift Message') ?> - - - - - - - -getCanDisplayContainer()): ?> -
    - - diff --git a/app/design/frontend/default/default/template/giftmessage/inline.phtml b/app/design/frontend/default/default/template/giftmessage/inline.phtml deleted file mode 100644 index 023eee900e..0000000000 --- a/app/design/frontend/default/default/template/giftmessage/inline.phtml +++ /dev/null @@ -1,268 +0,0 @@ - -getDontDisplayContainer()): ?> - - -
    -getType()): ?> - -
    - __('Do you have any gift items in your order?'); ?> -
    -
    - getItemsHasMesssages() || $this->getEntityHasMessage()): ?>checked="checked" /> - -
    -
    -
    -
    -
    - isMessagesAvailable('quote', $this->getEntity())): ?> - __('Enter a gift message for entire order.'); ?> -

    __('You can leave a box blank if you don\'t wish to add a gift message for whole order.') ?>

    -
    - -
      -
    • -
      -
      - -
      -
      -
      - -
      -
    • -
    • - -
      - -
    • -
    - -
    - - isItemsAvailable()): ?> - __('Enter a gift message for each item in your order.'); ?>
    -

    __('You can leave a box blank if you don\'t wish to add a gift message for the item.') ?>

    - getItems() as $_index=>$_item): ?> - getProduct() ?> -
    - <?php echo $this->htmlEscape($_product->getName()) ?>
    - __('Item %d of %d', $_index+1, $this->countItems()) ?> -
    -
    -
    htmlEscape($_product->getName()) ?>
    -
    - -
      -
    • -
      -
      - -
      -
      -
      - -
      -
    • -
    • - -
      - -
    • -
    - -
    -
    -
    - - -
    -
    - - - - - - -
    -
    - __('Gift Messages'); ?> -
    -
    - getItemsHasMesssages() || $this->getEntityHasMessage()): ?>checked="checked" /> - -
    -
    -
    -
    - isMessagesAvailable('quote', $this->getEntity())): ?> - __('Enter a gift message for this address.'); ?> -

    __('You can leave a box blank if you don\'t wish to add a gift message for this address.') ?>

    -
    - -
      -
    • -
      -
      - -
      -
      -
      - -
      -
    • -
    • - -
      - -
    • -
    - -
    - - isItemsAvailable()): ?> - __('Enter a gift message for each item in your order.'); ?>
    -

    __('You can leave a box blank if you don\'t wish to add a gift message for the item.') ?>

    - getItems() as $_index=>$_item): ?> - getProduct() ?> -
    - <?php echo $this->htmlEscape($_product->getName()) ?>
    - __('Item %d of %d', $_index+1, $this->countItems()) ?> -
    -
    -
    htmlEscape($_product->getName()) ?>
    -
    - - -
      -
    • -
      -
      - -
      -
      -
      - -
      -
    • -
    • - -
      - -
    • -
    - -
    -
    -
    - - -
    - - - -
    diff --git a/app/design/frontend/default/default/template/googlecheckout/form.phtml b/app/design/frontend/default/default/template/googlecheckout/form.phtml deleted file mode 100644 index 7c333d08fc..0000000000 --- a/app/design/frontend/default/default/template/googlecheckout/form.phtml +++ /dev/null @@ -1,34 +0,0 @@ - -
    - getMethodCode() ?> - -
    diff --git a/app/design/frontend/default/default/template/googlecheckout/link.phtml b/app/design/frontend/default/default/template/googlecheckout/link.phtml deleted file mode 100644 index 157e87c1c8..0000000000 --- a/app/design/frontend/default/default/template/googlecheckout/link.phtml +++ /dev/null @@ -1,42 +0,0 @@ - -
  • - getIsDisabled()): ?> - <?php echo Mage::helper('googlecheckout')->__('Fast checkout through Google');?> - -
    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 deleted file mode 100644 index f0b8aa33e4..0000000000 --- a/app/design/frontend/default/default/template/ideal/advanced/failure.phtml +++ /dev/null @@ -1,31 +0,0 @@ - -
    -

    __('Error occured') ?>

    -
    -

    getErrorMessage() ?>

    -

    __('Please continue shopping.', $this->getContinueShoppingUrl()) ?>

    diff --git a/app/design/frontend/default/default/template/ideal/advanced/form.phtml b/app/design/frontend/default/default/template/ideal/advanced/form.phtml deleted file mode 100755 index b3c7710eef..0000000000 --- a/app/design/frontend/default/default/template/ideal/advanced/form.phtml +++ /dev/null @@ -1,44 +0,0 @@ - -getMethodCode() ?> -getIssuerList()):?> -
    - -
    - diff --git a/app/design/frontend/default/default/template/ideal/advanced/info.phtml b/app/design/frontend/default/default/template/ideal/advanced/info.phtml deleted file mode 100644 index 664a8d6c7b..0000000000 --- a/app/design/frontend/default/default/template/ideal/advanced/info.phtml +++ /dev/null @@ -1,33 +0,0 @@ - -getInfo()): ?> -getMethod()->getTitle() ?> -
    -__('Issuer'). ': ' . $this->getIssuerTitle() ?> - - - diff --git a/app/design/frontend/default/default/template/ideal/basic/failure.phtml b/app/design/frontend/default/default/template/ideal/basic/failure.phtml deleted file mode 100644 index f0b8aa33e4..0000000000 --- a/app/design/frontend/default/default/template/ideal/basic/failure.phtml +++ /dev/null @@ -1,31 +0,0 @@ - -
    -

    __('Error occured') ?>

    -
    -

    getErrorMessage() ?>

    -

    __('Please continue shopping.', $this->getContinueShoppingUrl()) ?>

    diff --git a/app/design/frontend/default/default/template/ideal/basic/form.phtml b/app/design/frontend/default/default/template/ideal/basic/form.phtml deleted file mode 100755 index 3fc2e5be7c..0000000000 --- a/app/design/frontend/default/default/template/ideal/basic/form.phtml +++ /dev/null @@ -1,34 +0,0 @@ - -
    - getMethodCode() ?> - -
    diff --git a/app/design/frontend/default/default/template/newsletter/subscribe.phtml b/app/design/frontend/default/default/template/newsletter/subscribe.phtml deleted file mode 100644 index 6b1fbc682d..0000000000 --- a/app/design/frontend/default/default/template/newsletter/subscribe.phtml +++ /dev/null @@ -1,52 +0,0 @@ - -
    -
    -

    __('Newsletter') ?>

    -
    -
    -
    - __('Newsletter') ?> - - - - -
    -
    - -
    diff --git a/app/design/frontend/default/default/template/ogone/form.phtml b/app/design/frontend/default/default/template/ogone/form.phtml deleted file mode 100644 index 351ec79916..0000000000 --- a/app/design/frontend/default/default/template/ogone/form.phtml +++ /dev/null @@ -1,35 +0,0 @@ - - -
    - getMethodCode() ?> - -
    diff --git a/app/design/frontend/default/default/template/ogone/info.phtml b/app/design/frontend/default/default/template/ogone/info.phtml deleted file mode 100644 index 3b1c09df58..0000000000 --- a/app/design/frontend/default/default/template/ogone/info.phtml +++ /dev/null @@ -1,27 +0,0 @@ - -

    htmlEscape($this->getMethod()->getTitle()) ?>

    diff --git a/app/design/frontend/default/default/template/ogone/paypage.phtml b/app/design/frontend/default/default/template/ogone/paypage.phtml deleted file mode 100644 index 5c38183b3d..0000000000 --- a/app/design/frontend/default/default/template/ogone/paypage.phtml +++ /dev/null @@ -1,28 +0,0 @@ - - -$$$PAYMENT ZONE$$$ diff --git a/app/design/frontend/default/default/template/ogone/placeform.phtml b/app/design/frontend/default/default/template/ogone/placeform.phtml deleted file mode 100644 index bdb71e952e..0000000000 --- a/app/design/frontend/default/default/template/ogone/placeform.phtml +++ /dev/null @@ -1,42 +0,0 @@ - - -__('Please, wait a moment. This page will transfer you data to ogone payment in few seconds.'); ?> -
    -getFormData())): ?> - getFormData() as $name => $value) { ?> - - - -
    - - diff --git a/app/design/frontend/default/default/template/oscommerce/order/list.phtml b/app/design/frontend/default/default/template/oscommerce/order/list.phtml deleted file mode 100644 index a865476b59..0000000000 --- a/app/design/frontend/default/default/template/oscommerce/order/list.phtml +++ /dev/null @@ -1,56 +0,0 @@ - -getOsCommerceOrders(); ?> - -
    -

    __('My Previous Orders') ?>

    -
    - - - - - - - - - - - - - - - - - - - - - - -
    __('Order #') ?>__('Date') ?>__('Ship to') ?>__('Order Total') ?> 
    formatDate($_oscOrder['date_purchased'], 'medium', true) ?>htmlEscape($_oscOrder['delivery_street_address']) ?>__('View Order') ?> -
    - diff --git a/app/design/frontend/default/default/template/oscommerce/order/view.phtml b/app/design/frontend/default/default/template/oscommerce/order/view.phtml deleted file mode 100644 index 9d4d082c1f..0000000000 --- a/app/design/frontend/default/default/template/oscommerce/order/view.phtml +++ /dev/null @@ -1,139 +0,0 @@ - -getOrder() ?> - - - -
    -

    __('Order') ?> #

    -
    -

    __('Order Date:')?> formatDate($_order['date_purchased'], 'medium', false) ?>

    - -
    -
    -

    __('Shipping Address') ?>

    -
    -
    -
    - -
    -
    -T: - -
    -
    - - -
    -

    __('Shipping Method') ?>

    - -
    - -
    - - -
    -
    -

    __('Billing Address') ?>

    -
    -
    -
    - -
    -
    -T: - -
    -
    -
    -

    Payment Method

    - -
    -
    - -

    __('Items Ordered') ?>

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    __('Product Name') ?>__('SKU') ?>__('Price') ?>__('Qty Ordered') ?>__('Subtotal') ?>
    - - -
     
    -

    __('About Your Order') ?>

    -
    -
    - -
    formatDate($_historyItem['date_added'], 'medium', true) ?> |
    -
    - -
    -
    - - - diff --git a/app/design/frontend/default/default/template/page/1column.phtml b/app/design/frontend/default/default/template/page/1column.phtml deleted file mode 100644 index 16fc2978f7..0000000000 --- a/app/design/frontend/default/default/template/page/1column.phtml +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - getChildHtml('head') ?> - -getBodyClass()?'class="'.$this->getBodyClass().'"':'' ?>> -
    - getChildHtml('global_notices') ?> - -
    - 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 deleted file mode 100644 index 36731ca23d..0000000000 --- a/app/design/frontend/default/default/template/page/2columns-left.phtml +++ /dev/null @@ -1,79 +0,0 @@ - - - - - - getChildHtml('head') ?> - -getBodyClass()?'class="'.$this->getBodyClass().'"':'' ?>> -
    - getChildHtml('global_notices') ?> - -
    - getChildHtml('header') ?> -
    - - - -
    -
    - getChildHtml('breadcrumbs') ?> - -
    - getChildHtml('left') ?>  -
    -
    - - getChildHtml('global_messages') ?> - - - getChildHtml('content') ?> - -
    -
    - -
    - - - - - - -getChildHtml('before_body_end') ?> -
    -getAbsoluteFooter() ?> - - diff --git a/app/design/frontend/default/default/template/page/2columns-right.phtml b/app/design/frontend/default/default/template/page/2columns-right.phtml deleted file mode 100644 index 42e12e12a1..0000000000 --- a/app/design/frontend/default/default/template/page/2columns-right.phtml +++ /dev/null @@ -1,83 +0,0 @@ - - - - - getChildHtml('head') ?> - -getBodyClass()?'class="'.$this->getBodyClass().'"':'' ?>> -
    - getChildHtml('global_notices') ?> - -
    - getChildHtml('header') ?> -
    - - - -
    -
    -getChildHtml('breadcrumbs') ?> - -
    - - getChildHtml('global_messages') ?> - - - - getChildHtml('content') ?>  - -
    - - - -
    - getChildHtml('right') ?>  -
    - - -
    -
    - - - - - - -getChildHtml('before_body_end') ?> -
    -getAbsoluteFooter() ?> - - diff --git a/app/design/frontend/default/default/template/page/3columns.phtml b/app/design/frontend/default/default/template/page/3columns.phtml deleted file mode 100644 index e55c829fc4..0000000000 --- a/app/design/frontend/default/default/template/page/3columns.phtml +++ /dev/null @@ -1,89 +0,0 @@ - - - - - - getChildHtml('head') ?> - -getBodyClass()?'class="'.$this->getBodyClass().'"':'' ?>> -
    - getChildHtml('global_notices') ?> - -
    - getChildHtml('header') ?> -
    - - - -
    -
    - getChildHtml('breadcrumbs') ?> - -
    - getChildHtml('left') ?>  -
    - - - -
    - - getChildHtml('global_messages') ?> - - - - 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 deleted file mode 100644 index 5869b1413b..0000000000 --- a/app/design/frontend/default/default/template/page/dashboard.phtml +++ /dev/null @@ -1,83 +0,0 @@ - - - - - - getChildHtml('head') ?> - -getBodyClass()?'class="'.$this->getBodyClass().'"':'' ?>> -
    - getChildHtml('global_notices') ?> - -
    - 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 deleted file mode 100644 index ea3e3ad3ec..0000000000 --- a/app/design/frontend/default/default/template/page/html/breadcrumbs.phtml +++ /dev/null @@ -1,45 +0,0 @@ - - -

    __("You're currently on:") ?>

    - - diff --git a/app/design/frontend/default/default/template/page/html/footer.phtml b/app/design/frontend/default/default/template/page/html/footer.phtml deleted file mode 100644 index 14240f6e82..0000000000 --- a/app/design/frontend/default/default/template/page/html/footer.phtml +++ /dev/null @@ -1,35 +0,0 @@ - -
    - getChildHtml() ?> -
    -

    -__('Help Us to Keep Magento Healthy') ?> - __('Report All Bugs') ?> __('(ver. %s)', Mage::getVersion()) ?>
    - -getCopyright() ?>

    diff --git a/app/design/frontend/default/default/template/page/html/head.phtml b/app/design/frontend/default/default/template/page/html/head.phtml deleted file mode 100644 index b32081b6c3..0000000000 --- a/app/design/frontend/default/default/template/page/html/head.phtml +++ /dev/null @@ -1,43 +0,0 @@ - -<?php echo $this->getTitle() ?> - - - - -getChildHtml() ?> - - - -getCssJsHtml() ?> -helper('core/js')->getTranslatorScript() ?> -getIncludes() ?> diff --git a/app/design/frontend/default/default/template/page/html/header.phtml b/app/design/frontend/default/default/template/page/html/header.phtml deleted file mode 100644 index 5720222c04..0000000000 --- a/app/design/frontend/default/default/template/page/html/header.phtml +++ /dev/null @@ -1,42 +0,0 @@ - - -
    -
    -

    <?php echo $this->getLogoAlt() ?>

    -

    __('Skip to Main Content') ?> »

    - getChildHtml('topSearch') ?> -
    - getWelcome() ?>
    -
    - getChildHtml('topLinks') ?> -
    - getChildHtml('store_language') ?> -
    -
    -
    -getChildHtml('topMenu') ?> diff --git a/app/design/frontend/default/default/template/page/html/notices.phtml b/app/design/frontend/default/default/template/page/html/notices.phtml deleted file mode 100644 index dc73fb1458..0000000000 --- a/app/design/frontend/default/default/template/page/html/notices.phtml +++ /dev/null @@ -1,44 +0,0 @@ - - -displayNoscriptNotice()): ?> - - -displayDemoNotice()): ?> -

    __('This is a demo store. Any orders placed through this store will not be honored or fulfilled.') ?>

    - diff --git a/app/design/frontend/default/default/template/page/html/pager.phtml b/app/design/frontend/default/default/template/page/html/pager.phtml deleted file mode 100644 index f299cec350..0000000000 --- a/app/design/frontend/default/default/template/page/html/pager.phtml +++ /dev/null @@ -1,77 +0,0 @@ - - -getCollection()->getSize()): ?> - - - - getLastPageNum()>1): ?> - - - getShowPerPage()): ?> - - - -
    - getLastPageNum()>1): ?> - __('Items %s to %s of %s total', $this->getFirstNum(), $this->getLastNum(), $this->getTotalNum()) ?> - - __('%s Item(s)', $this->getTotalNum()) ?> - - - __('Page:') ?> -
      - isFirstPage()): ?> -
    1. <?php echo $this->__('Previous Page') ?>
    2. - - getPages() as $_page): ?> - isPageCurrent($_page)): ?> -
    3. - -
    4. - - - isLastPage()): ?> -
    5. <?php echo $this->__('Next Page') ?>
    6. - -
    -
    - __('Show') ?> __('per page') ?> -
    - diff --git a/app/design/frontend/default/default/template/page/html/top.links.phtml b/app/design/frontend/default/default/template/page/html/top.links.phtml deleted file mode 100644 index dfb1bff150..0000000000 --- a/app/design/frontend/default/default/template/page/html/top.links.phtml +++ /dev/null @@ -1,34 +0,0 @@ - - -
      - getChildHtml() ?> - - class="first last " > > - -
    - diff --git a/app/design/frontend/default/default/template/page/html/wrapper.phtml b/app/design/frontend/default/default/template/page/html/wrapper.phtml deleted file mode 100644 index d3e75c9dc0..0000000000 --- a/app/design/frontend/default/default/template/page/html/wrapper.phtml +++ /dev/null @@ -1,45 +0,0 @@ - - * some-custom-identificator - * - * - * span - * class="custom-class" - * - * - * - */ -?> -hasTag() ? $this->getTag() : "div" ?> -< id="getId()?>" getParams()?>> -getChildHtml()?> -> diff --git a/app/design/frontend/default/default/template/page/js/calendar.phtml b/app/design/frontend/default/default/template/page/js/calendar.phtml deleted file mode 100644 index 95f2961759..0000000000 --- a/app/design/frontend/default/default/template/page/js/calendar.phtml +++ /dev/null @@ -1,94 +0,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 deleted file mode 100644 index 78ada90967..0000000000 --- a/app/design/frontend/default/default/template/page/one-column.phtml +++ /dev/null @@ -1,42 +0,0 @@ - - - - - -getChildHtml('head') ?> - - - getChildHtml('content') ?> - getChildHtml('before_body_end') ?> - getAbsoluteFooter() ?> - - diff --git a/app/design/frontend/default/default/template/page/print.phtml b/app/design/frontend/default/default/template/page/print.phtml deleted file mode 100644 index 72d3b37082..0000000000 --- a/app/design/frontend/default/default/template/page/print.phtml +++ /dev/null @@ -1,52 +0,0 @@ - - - - - -getChildHtml('head') ?> - - -
    - - getChildHtml('content') ?> -
    - -
    - getAbsoluteFooter() ?> -
    - - diff --git a/app/design/frontend/default/default/template/page/redirect.phtml b/app/design/frontend/default/default/template/page/redirect.phtml deleted file mode 100644 index 8b7550cd45..0000000000 --- a/app/design/frontend/default/default/template/page/redirect.phtml +++ /dev/null @@ -1,39 +0,0 @@ - -
    -

    __('Redirecting...') ?>

    -
    - -getMessage()): ?> -

    getMessage() ?>

    - - -getRedirectOutput() ?> - -isHtmlFormRedirect()): ?> -

    __('Click here if nothing has happened', $this->getTargetURL()) ?>

    - diff --git a/app/design/frontend/default/default/template/page/switch/flags.phtml b/app/design/frontend/default/default/template/page/switch/flags.phtml deleted file mode 100644 index 4945225f0b..0000000000 --- a/app/design/frontend/default/default/template/page/switch/flags.phtml +++ /dev/null @@ -1,38 +0,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 deleted file mode 100644 index f9bbe5f443..0000000000 --- a/app/design/frontend/default/default/template/page/switch/languages.phtml +++ /dev/null @@ -1,45 +0,0 @@ - - -getStores())>1): ?> -
    - - -
    - diff --git a/app/design/frontend/default/default/template/page/switch/stores.phtml b/app/design/frontend/default/default/template/page/switch/stores.phtml deleted file mode 100644 index 37daeb3439..0000000000 --- a/app/design/frontend/default/default/template/page/switch/stores.phtml +++ /dev/null @@ -1,48 +0,0 @@ - - -getGroups())>1): ?> -
    - - -
    - diff --git a/app/design/frontend/default/default/template/page/template/container.phtml b/app/design/frontend/default/default/template/page/template/container.phtml deleted file mode 100644 index 059285645f..0000000000 --- a/app/design/frontend/default/default/template/page/template/container.phtml +++ /dev/null @@ -1,35 +0,0 @@ - - -
    -

    getTitle() ?>

    -
    -getChildHtml() ?> diff --git a/app/design/frontend/default/default/template/page/template/links.phtml b/app/design/frontend/default/default/template/page/template/links.phtml deleted file mode 100644 index 8b698eeb88..0000000000 --- a/app/design/frontend/default/default/template/page/template/links.phtml +++ /dev/null @@ -1,41 +0,0 @@ - - -getLinks(); ?> -0): ?> -
    - getName()): ?> id="getName() ?>"> - -
  • getIsFirst()): ?> class="first"getIsLast()): ?> class="last"getLiParams() ?>>getBeforeText() ?>getAParams() ?>>getLabel() ?>getAfterText() ?>
  • - - -
    - diff --git a/app/design/frontend/default/default/template/paybox/direct/form.phtml b/app/design/frontend/default/default/template/paybox/direct/form.phtml deleted file mode 100644 index 784dadf702..0000000000 --- a/app/design/frontend/default/default/template/paybox/direct/form.phtml +++ /dev/null @@ -1,90 +0,0 @@ - - -
    - getMethodCode() ?> - -
    diff --git a/app/design/frontend/default/default/template/paybox/direct/info.phtml b/app/design/frontend/default/default/template/paybox/direct/info.phtml deleted file mode 100644 index 9e578ab14e..0000000000 --- a/app/design/frontend/default/default/template/paybox/direct/info.phtml +++ /dev/null @@ -1,34 +0,0 @@ - -getInfo()): ?> -getMethod()->getTitle() ?>
    -__('Name on the Card: %s', $this->htmlEscape($this->getInfo()->getCcOwner())) ?>
    -__('Credit Card Type: %s', $this->htmlEscape($this->getCcTypeName())) ?>
    -__('Credit Card Number: xxxx-%s', $this->htmlEscape($this->getInfo()->getCcLast4())) ?> - - - diff --git a/app/design/frontend/default/default/template/paybox/system/error.phtml b/app/design/frontend/default/default/template/paybox/system/error.phtml deleted file mode 100644 index ee679a5b0a..0000000000 --- a/app/design/frontend/default/default/template/paybox/system/error.phtml +++ /dev/null @@ -1,31 +0,0 @@ - -
    -

    __('Error occured') ?>

    -
    -

    getErrorMessage() ?>.

    -

    __('Please continue shopping.', $this->getContinueShoppingUrl()) ?>

    diff --git a/app/design/frontend/default/default/template/paybox/system/form.phtml b/app/design/frontend/default/default/template/paybox/system/form.phtml deleted file mode 100644 index 5b6db88462..0000000000 --- a/app/design/frontend/default/default/template/paybox/system/form.phtml +++ /dev/null @@ -1,34 +0,0 @@ - -
    - getMethodCode() ?> - -
    diff --git a/app/design/frontend/default/default/template/payment/form/cc.phtml b/app/design/frontend/default/default/template/payment/form/cc.phtml deleted file mode 100644 index 5c50853e9b..0000000000 --- a/app/design/frontend/default/default/template/payment/form/cc.phtml +++ /dev/null @@ -1,87 +0,0 @@ - -
    - getMethodCode() ?> - -
    diff --git a/app/design/frontend/default/default/template/payment/form/ccsave.phtml b/app/design/frontend/default/default/template/payment/form/ccsave.phtml deleted file mode 100644 index 2a475e1ab4..0000000000 --- a/app/design/frontend/default/default/template/payment/form/ccsave.phtml +++ /dev/null @@ -1,86 +0,0 @@ - -
    - getMethodCode() ?> - -
    diff --git a/app/design/frontend/default/default/template/payment/form/checkmo.phtml b/app/design/frontend/default/default/template/payment/form/checkmo.phtml deleted file mode 100644 index 6565d03121..0000000000 --- a/app/design/frontend/default/default/template/payment/form/checkmo.phtml +++ /dev/null @@ -1,43 +0,0 @@ - -getMethod()->getMailingAddress() || $this->getMethod()->getPayableTo()): ?> - - diff --git a/app/design/frontend/default/default/template/payment/form/purchaseorder.phtml b/app/design/frontend/default/default/template/payment/form/purchaseorder.phtml deleted file mode 100644 index f399601483..0000000000 --- a/app/design/frontend/default/default/template/payment/form/purchaseorder.phtml +++ /dev/null @@ -1,36 +0,0 @@ - -
    - -
    diff --git a/app/design/frontend/default/default/template/payment/info/cc.phtml b/app/design/frontend/default/default/template/payment/info/cc.phtml deleted file mode 100644 index 463c0ab411..0000000000 --- a/app/design/frontend/default/default/template/payment/info/cc.phtml +++ /dev/null @@ -1,33 +0,0 @@ - -getInfo()): ?> - -__('Credit Card Type: %s', $this->htmlEscape($this->getCcTypeName())) ?>
    -__('Credit Card Number: xxxx-%s', $this->htmlEscape($this->getInfo()->getCcLast4())) ?> - - - diff --git a/app/design/frontend/default/default/template/payment/info/ccsave.phtml b/app/design/frontend/default/default/template/payment/info/ccsave.phtml deleted file mode 100644 index 6de41ae2b7..0000000000 --- a/app/design/frontend/default/default/template/payment/info/ccsave.phtml +++ /dev/null @@ -1,29 +0,0 @@ - -__('Name on the Card: %s', $this->htmlEscape($this->getInfo()->getCcOwner())) ?>
    -__('Credit Card Type: %s', $this->htmlEscape($this->getCcTypeName())) ?>
    -__('Credit Card Number: xxxx-%s', $this->htmlEscape($this->getInfo()->getCcLast4())) ?> diff --git a/app/design/frontend/default/default/template/payment/info/checkmo.phtml b/app/design/frontend/default/default/template/payment/info/checkmo.phtml deleted file mode 100644 index de2dc3b1c4..0000000000 --- a/app/design/frontend/default/default/template/payment/info/checkmo.phtml +++ /dev/null @@ -1,38 +0,0 @@ - -

    getMethod()->getTitle() ?> -getInfo()->getAdditionalData()): ?> - getPayableTo()): ?>
    __('Make Check payable to: %s', $this->htmlEscape($this->getPayableTo())) ?> - getMailingAddress()): ?> -
    __('Send Check to:') ?> -
    - - htmlEscape($this->getMailingAddress())) ?> - - - -

    diff --git a/app/design/frontend/default/default/template/payment/info/default.phtml b/app/design/frontend/default/default/template/payment/info/default.phtml deleted file mode 100644 index 3b1c09df58..0000000000 --- a/app/design/frontend/default/default/template/payment/info/default.phtml +++ /dev/null @@ -1,27 +0,0 @@ - -

    htmlEscape($this->getMethod()->getTitle()) ?>

    diff --git a/app/design/frontend/default/default/template/payment/info/purchaseorder.phtml b/app/design/frontend/default/default/template/payment/info/purchaseorder.phtml deleted file mode 100644 index c89e83f0ac..0000000000 --- a/app/design/frontend/default/default/template/payment/info/purchaseorder.phtml +++ /dev/null @@ -1,29 +0,0 @@ - -

    getMethod()->getTitle() ?>

    -

    __('Purchase Order Number') ?>: htmlEscape($this->getInfo()->getPoNumber()) ?>

    - diff --git a/app/design/frontend/default/default/template/paypal/express/form.phtml b/app/design/frontend/default/default/template/paypal/express/form.phtml deleted file mode 100644 index d25d128e0f..0000000000 --- a/app/design/frontend/default/default/template/paypal/express/form.phtml +++ /dev/null @@ -1,34 +0,0 @@ - -
    - getMethodCode() ?> - -
    diff --git a/app/design/frontend/default/default/template/paypal/express/info.phtml b/app/design/frontend/default/default/template/paypal/express/info.phtml deleted file mode 100644 index 94e8d85865..0000000000 --- a/app/design/frontend/default/default/template/paypal/express/info.phtml +++ /dev/null @@ -1,28 +0,0 @@ - -

    getMethod()->getTitle() ?>
    -__('PayPal Email') ?>: getEmail() ?>

    diff --git a/app/design/frontend/default/default/template/paypal/express/review.phtml b/app/design/frontend/default/default/template/paypal/express/review.phtml deleted file mode 100644 index f55e6233c3..0000000000 --- a/app/design/frontend/default/default/template/paypal/express/review.phtml +++ /dev/null @@ -1,169 +0,0 @@ - -
    -

    __('Review Order') ?>

    -
    -getMessagesBlock()->getGroupedHtml() ?> -
    - -
    -

    __('Shipping Information') ?>

    -
    -
    -
    -
    -

    __('Shipping Address') ?> | __('Change Shipping Address') ?>

    -
    -
    - getShippingAddress()->getFormated(true) ?> -
    -
    -
    -
    -

    __('Shipping Method') ?>

    -
    - isVirtual()): ?> - __('No shipping method required.') ?> - - getShippingRates())): ?> - __('Sorry, no quotes are available for this order at this time.') ?> - - -
    - -

    - -
    - - - -
    -
    -
    - -
    -

    __('Billing Information') ?>

    -
    - -
    -
    -

    __('Payment Method') ?> | __('Change Payment Method') ?>

    -
    - __('PayPal Account') ?>
    - getBillingAddress()->getEmail() ?> - -
    -
    - -
    -

    __('Items in Your Shopping Cart') ?> | __('Edit Shopping Cart') ?>

    -
    - -
    - getChildHtml('details') ?> -
    - - -
    - -
    -

    - - - - -

    -
    - -
    - -
    - diff --git a/app/design/frontend/default/default/template/paypal/express/review/details.phtml b/app/design/frontend/default/default/template/paypal/express/review/details.phtml deleted file mode 100644 index 10566ce937..0000000000 --- a/app/design/frontend/default/default/template/paypal/express/review/details.phtml +++ /dev/null @@ -1,62 +0,0 @@ - - - - - - - - - - - - - - - - getTotals() as $_total): ?> - - - - - - - - getItems() as $_item): ?> - getParentItem()) continue ?> - - - - - - - - -
    __('Product Name') ?>__('Price') ?>__('Qty') ?>__('Subtotal') ?>
    getTitle() ?>helper('checkout')->formatPrice($_total->getValue()) ?>
    - getProduct()->getName() ?> - getProduct()->getDescription() ?> - helper('checkout')->formatPrice($_item->getCalculationPrice()); ?>getQty() ?>helper('checkout')->formatPrice($_item->getRowTotal()); ?>
    diff --git a/app/design/frontend/default/default/template/paypal/link.phtml b/app/design/frontend/default/default/template/paypal/link.phtml deleted file mode 100644 index f1899a67f9..0000000000 --- a/app/design/frontend/default/default/template/paypal/link.phtml +++ /dev/null @@ -1,27 +0,0 @@ - -
  • <?php echo Mage::helper('paypal')->__('Paypal Checkout');?>
  • diff --git a/app/design/frontend/default/default/template/paypal/standard/form.phtml b/app/design/frontend/default/default/template/paypal/standard/form.phtml deleted file mode 100644 index c8d58da12a..0000000000 --- a/app/design/frontend/default/default/template/paypal/standard/form.phtml +++ /dev/null @@ -1,34 +0,0 @@ - -
    - getMethodCode() ?> - -
    diff --git a/app/design/frontend/default/default/template/paypaluk/direct/form.phtml b/app/design/frontend/default/default/template/paypaluk/direct/form.phtml deleted file mode 100644 index 275f3fbc11..0000000000 --- a/app/design/frontend/default/default/template/paypaluk/direct/form.phtml +++ /dev/null @@ -1,125 +0,0 @@ - - -getMethodCode() ?> -hasSsCardType()): ?> -
  • -
    -
    -
      -
    • -
      -
    • -
    • -
      -
      - -
      -
      - -
      -
    • -
    • -
    -
    - - -
  • - - diff --git a/app/design/frontend/default/default/template/paypaluk/direct/info.phtml b/app/design/frontend/default/default/template/paypaluk/direct/info.phtml deleted file mode 100644 index 7e89be41d3..0000000000 --- a/app/design/frontend/default/default/template/paypaluk/direct/info.phtml +++ /dev/null @@ -1,37 +0,0 @@ - -getInfo()): ?> - -__('Credit Card Type: %s', $this->getCcTypeName()) ?>
    -__('Credit Card Number: xxxx-%s', $this->getInfo()->getCcLast4()) ?>
    -getInfo()->getCcSsIssue()): ?> -__("Switch/Solo card issue number: %s", $this->getInfo()->getCcSsIssue()) ?>
    - -getInfo()->getCcSsStartYear()): ?> -__('Switch/Solo card start Date: %s/%s', $this->getCcStartMonth(), $this->getInfo()->getCcSsStartYear()) ?> - - diff --git a/app/design/frontend/default/default/template/paypaluk/express/form.phtml b/app/design/frontend/default/default/template/paypaluk/express/form.phtml deleted file mode 100644 index 6c001c84f0..0000000000 --- a/app/design/frontend/default/default/template/paypaluk/express/form.phtml +++ /dev/null @@ -1,34 +0,0 @@ - -
    - getMethodCode() ?> - -
    diff --git a/app/design/frontend/default/default/template/paypaluk/express/info.phtml b/app/design/frontend/default/default/template/paypaluk/express/info.phtml deleted file mode 100644 index f42a502617..0000000000 --- a/app/design/frontend/default/default/template/paypaluk/express/info.phtml +++ /dev/null @@ -1,28 +0,0 @@ - -

    getMethod()->getTitle() ?>
    -__('PayPal Email') ?>: getEmail() ?>

    diff --git a/app/design/frontend/default/default/template/paypaluk/express/review.phtml b/app/design/frontend/default/default/template/paypaluk/express/review.phtml deleted file mode 100644 index 68115a9541..0000000000 --- a/app/design/frontend/default/default/template/paypaluk/express/review.phtml +++ /dev/null @@ -1,172 +0,0 @@ - -
    -

    __('Review Order') ?>

    -
    -getMessagesBlock()->getGroupedHtml() ?> -
    - -
    -

    __('Shipping Information') ?>

    -
    -
    -
    -
    -

    __('Shipping Address') ?> | __('Change Shipping Address') ?>

    -
    -
    - getShippingAddress()->getFormated(true) ?> -
    -
    -
    -
    -

    __('Shipping Method') ?>

    -
    - isVirtual()): ?> - __('No shipping method required.') ?> - - getShippingRates())): ?> - __('Sorry, no quotes are available for this order at this time.') ?> - - -
    - -

    - -
    - - - - -
    -
    -
    - -
    -

    __('Billing Information') ?>

    -
    - -
    -
    -

    __('Payment Method') ?> | __('Change Payment Method') ?>

    -
    - __('PayPal Uk Account') ?>
    - getBillingAddress()->getEmail() ?> - -
    -
    - -
    -

    __('Items in Your Shopping Cart') ?> | __('Edit Shopping Cart') ?>

    -
    - -
    - getChildHtml('details') ?> -
    - - -
    - -
    -

    - - - - -

    -
    - -
    - -
    - - diff --git a/app/design/frontend/default/default/template/paypaluk/express/review/details.phtml b/app/design/frontend/default/default/template/paypaluk/express/review/details.phtml deleted file mode 100644 index 3b09202585..0000000000 --- a/app/design/frontend/default/default/template/paypaluk/express/review/details.phtml +++ /dev/null @@ -1,62 +0,0 @@ - - - - - - - - - - - - - - - - getItems() as $_item): ?> - getParentItem()) continue ?> - - - - - - - - - - getTotals() as $_total): ?> - - - - - - -
    __('Product Name') ?>__('Price') ?>__('Qty') ?>__('Subtotal') ?>
    - getProduct()->getName() ?> - getProduct()->getDescription() ?> - helper('checkout')->formatPrice($_item->getCalculationPrice()); ?>getQty() ?>helper('checkout')->formatPrice($_item->getRowTotal()); ?>
    getTitle() ?>helper('checkout')->formatPrice($_total->getValue()) ?>
    diff --git a/app/design/frontend/default/default/template/paypaluk/link.phtml b/app/design/frontend/default/default/template/paypaluk/link.phtml deleted file mode 100644 index 6bd1d1b490..0000000000 --- a/app/design/frontend/default/default/template/paypaluk/link.phtml +++ /dev/null @@ -1,27 +0,0 @@ - -
  • <?php echo Mage::helper('paypalUk')->__('Paypal UK Checkout');?>
  • diff --git a/app/design/frontend/default/default/template/poll/active.phtml b/app/design/frontend/default/default/template/poll/active.phtml deleted file mode 100644 index 9781bf7e88..0000000000 --- a/app/design/frontend/default/default/template/poll/active.phtml +++ /dev/null @@ -1,68 +0,0 @@ - - - - - -
    -
    -

    __('Community Poll') ?>

    -
    -
    -
    -
    getPollTitle(); ?>
    - - - - - - - - - - -
     
    - -
    -
    -
    -
    - diff --git a/app/design/frontend/default/default/template/poll/result.phtml b/app/design/frontend/default/default/template/poll/result.phtml deleted file mode 100644 index 424b5d248c..0000000000 --- a/app/design/frontend/default/default/template/poll/result.phtml +++ /dev/null @@ -1,50 +0,0 @@ - - -
    -
    -

    __('Community Poll') ?>

    -
    -
    -
    getPollTitle(); ?>
    - - - - - - - - - - -
    getAnswerTitle() ?>getVotesCount() ?> (getPercent() ?>%)
    - -
    -
    - - - diff --git a/app/design/frontend/default/default/template/productalert/price.phtml b/app/design/frontend/default/default/template/productalert/price.phtml deleted file mode 100644 index 5b124efe13..0000000000 --- a/app/design/frontend/default/default/template/productalert/price.phtml +++ /dev/null @@ -1,29 +0,0 @@ - -isShow()): ?> - - diff --git a/app/design/frontend/default/default/template/productalert/stock.phtml b/app/design/frontend/default/default/template/productalert/stock.phtml deleted file mode 100644 index 95c0edec9c..0000000000 --- a/app/design/frontend/default/default/template/productalert/stock.phtml +++ /dev/null @@ -1,29 +0,0 @@ - -isShow()): ?> - - diff --git a/app/design/frontend/default/default/template/protx/standard/failure.phtml b/app/design/frontend/default/default/template/protx/standard/failure.phtml deleted file mode 100644 index ee679a5b0a..0000000000 --- a/app/design/frontend/default/default/template/protx/standard/failure.phtml +++ /dev/null @@ -1,31 +0,0 @@ - -
    -

    __('Error occured') ?>

    -
    -

    getErrorMessage() ?>.

    -

    __('Please continue shopping.', $this->getContinueShoppingUrl()) ?>

    diff --git a/app/design/frontend/default/default/template/protx/standard/form.phtml b/app/design/frontend/default/default/template/protx/standard/form.phtml deleted file mode 100644 index 6bf720a1cb..0000000000 --- a/app/design/frontend/default/default/template/protx/standard/form.phtml +++ /dev/null @@ -1,34 +0,0 @@ - -
    - getMethodCode() ?> - -
    diff --git a/app/design/frontend/default/default/template/rating/detailed.phtml b/app/design/frontend/default/default/template/rating/detailed.phtml deleted file mode 100644 index 02b55ce238..0000000000 --- a/app/design/frontend/default/default/template/rating/detailed.phtml +++ /dev/null @@ -1,44 +0,0 @@ - -getSize()): ?> - - - - getSummary()): ?> - - - - - - - -
    __($_rating->getRatingCode()) ?> -
    -
    -
    -
    - diff --git a/app/design/frontend/default/default/template/rating/empty.phtml b/app/design/frontend/default/default/template/rating/empty.phtml deleted file mode 100644 index 39cfd42f86..0000000000 --- a/app/design/frontend/default/default/template/rating/empty.phtml +++ /dev/null @@ -1,27 +0,0 @@ - -

    __('Be the first to review this product') ?>

    diff --git a/app/design/frontend/default/default/template/reports/home_product_compared.phtml b/app/design/frontend/default/default/template/reports/home_product_compared.phtml deleted file mode 100644 index 592df01c8a..0000000000 --- a/app/design/frontend/default/default/template/reports/home_product_compared.phtml +++ /dev/null @@ -1,66 +0,0 @@ - -getRecentlyComparedProducts()): ?> -
    -

    __('Your Recently Compared') ?>

    - - - - 5): continue; endif; ?> - - - - - - -
    -
    - - <?php echo $this->htmlEscape($_product->getName()) ?> - -
    -

    htmlEscape($_product->getName()) ?>

    - getReviewsSummaryHtml($_product, 'short') ?> - getPriceHtml($_product, true, '-home-compared') ?> - isSaleable()): ?> - - -
    __('Out of stock') ?>
    - -
    -

    - helper('wishlist')->isAllow()) : ?> - __('Add to Wishlist') ?> - - getAddToCompareUrl($_product)): ?>
    - __('Add to Compare') ?> - -

    -
     
    -
    - diff --git a/app/design/frontend/default/default/template/reports/home_product_viewed.phtml b/app/design/frontend/default/default/template/reports/home_product_viewed.phtml deleted file mode 100644 index 57a4afa2d2..0000000000 --- a/app/design/frontend/default/default/template/reports/home_product_viewed.phtml +++ /dev/null @@ -1,72 +0,0 @@ - - -getRecentlyViewedProducts()): ?> -
    -

    __('Your Recently Viewed') ?>

    - - - - 5): continue; endif; ?> - - - - - - - -
    -
    - - <?php echo $this->htmlEscape($_product->getName()) ?> - -
    -

    htmlEscape($_product->getName()) ?>

    - getReviewsSummaryHtml($_product, 'short') ?> - getPriceHtml($_product, true, '-home-viewed') ?> - isSaleable()): ?> - - -
    __('Out of stock') ?>
    - -
    -

    - helper('wishlist')->isAllow()) : ?> - __('Add to Wishlist') ?> - - getAddToCompareUrl($_product)): ?>
    - __('Add to Compare') ?> - -

    -
     
    -
    - diff --git a/app/design/frontend/default/default/template/reports/product_compared.phtml b/app/design/frontend/default/default/template/reports/product_compared.phtml deleted file mode 100644 index ae4ef86a47..0000000000 --- a/app/design/frontend/default/default/template/reports/product_compared.phtml +++ /dev/null @@ -1,42 +0,0 @@ - -getRecentlyComparedProducts()): ?> -
    -
    -

    __('Recently Compared Products') ?>

    -
    - - -
    - diff --git a/app/design/frontend/default/default/template/reports/product_viewed.phtml b/app/design/frontend/default/default/template/reports/product_viewed.phtml deleted file mode 100644 index 5d722276c9..0000000000 --- a/app/design/frontend/default/default/template/reports/product_viewed.phtml +++ /dev/null @@ -1,40 +0,0 @@ - -getRecentlyViewedProducts()): ?> -
    -
    -

    __('Recently Viewed Products') ?>

    -
    -
      - -
    1. htmlEscape($_item->getName()) ?>
    2. - -
    - -
    - diff --git a/app/design/frontend/default/default/template/reports/widget/compared/content/compared_grid.phtml b/app/design/frontend/default/default/template/reports/widget/compared/content/compared_grid.phtml deleted file mode 100644 index f22333a88d..0000000000 --- a/app/design/frontend/default/default/template/reports/widget/compared/content/compared_grid.phtml +++ /dev/null @@ -1,69 +0,0 @@ - -getRecentlyComparedProducts()): ?> -
    -
    -

    __('Your Recently Compared') ?>

    -
    -
    - getColumnCount(); ?> - - -
      - -
    • - <?php echo $this->htmlEscape($_product->getName()) ?> -

      htmlEscape($_product->getName()) ?>

      - getReviewsSummaryHtml($_product, 'short') ?> - getPriceHtml($_product, true, '-widget-compared-grid') ?> -
      - isSaleable()): ?> - - - getIsSalable()): ?> -

      __('In stock') ?>

      - -

      __('Out of stock') ?>

      - - - -
      -
    • - -
    - - -
    -
    - diff --git a/app/design/frontend/default/default/template/reports/widget/compared/content/compared_list.phtml b/app/design/frontend/default/default/template/reports/widget/compared/content/compared_list.phtml deleted file mode 100644 index 9a86a7dfbe..0000000000 --- a/app/design/frontend/default/default/template/reports/widget/compared/content/compared_list.phtml +++ /dev/null @@ -1,66 +0,0 @@ - -getRecentlyComparedProducts()): ?> -
    -
    -

    __('Your Recently Compared') ?>

    -
    -
    -
      - -
    1. - <?php echo $this->htmlEscape($_product->getName()) ?> -
      -
      -

      htmlEscape($_product->getName()) ?>

      - getReviewsSummaryHtml($_product, 'short') ?> - getPriceHtml($_product, true, '-widget-compared-list') ?> - isSaleable()): ?> - - - getIsSalable()): ?> -

      __('In stock') ?>

      - -

      __('Out of stock') ?>

      - - - -
      -
      -
    2. - -
    -
    -
    - diff --git a/app/design/frontend/default/default/template/reports/widget/viewed/content/viewed_grid.phtml b/app/design/frontend/default/default/template/reports/widget/viewed/content/viewed_grid.phtml deleted file mode 100644 index 246f209b8a..0000000000 --- a/app/design/frontend/default/default/template/reports/widget/viewed/content/viewed_grid.phtml +++ /dev/null @@ -1,74 +0,0 @@ - - -getRecentlyViewedProducts()): ?> -
    -
    -

    __('Your Recently Viewed') ?>

    -
    -
    - getColumnCount(); ?> - - -
      - -
    • - <?php echo $this->htmlEscape($_product->getName()) ?> -

      htmlEscape($_product->getName()) ?>

      - getReviewsSummaryHtml($_product, 'short') ?> - getPriceHtml($_product, true, '-widget-viewed-grid') ?> -
      - isSaleable()): ?> - - - getIsSalable()): ?> -

      __('In stock') ?>

      - -

      __('Out of stock') ?>

      - - - -
      -
    • - -
    - - -
    -
    - diff --git a/app/design/frontend/default/default/template/reports/widget/viewed/content/viewed_list.phtml b/app/design/frontend/default/default/template/reports/widget/viewed/content/viewed_list.phtml deleted file mode 100644 index dbe8e84ea3..0000000000 --- a/app/design/frontend/default/default/template/reports/widget/viewed/content/viewed_list.phtml +++ /dev/null @@ -1,71 +0,0 @@ - - -getRecentlyViewedProducts()): ?> -
    -
    -

    __('Your Recently Viewed') ?>

    -
    -
    -
      - -
    1. - <?php echo $this->htmlEscape($_product->getName()) ?> -
      -
      -

      htmlEscape($_product->getName()) ?>

      - getReviewsSummaryHtml($_product, 'short') ?> - getPriceHtml($_product, true, '-widget-viewed-list') ?> - isSaleable()): ?> - - - getIsSalable()): ?> -

      __('In stock') ?>

      - -

      __('Out of stock') ?>

      - - - -
      -
      -
    2. - -
    -
    -
    - diff --git a/app/design/frontend/default/default/template/review/customer/list.phtml b/app/design/frontend/default/default/template/review/customer/list.phtml deleted file mode 100644 index 78f7e96dcf..0000000000 --- a/app/design/frontend/default/default/template/review/customer/list.phtml +++ /dev/null @@ -1,64 +0,0 @@ - -getMessagesBlock()->getGroupedHtml() ?> -
    -

    __('My Product Reviews') ?>

    -
    -getCollection() && $this->count()): ?> - getToolbarHtml() ?> - - - - - - - - getCollection() as $_review): ?> - - - - - - - - - -
    dateFormat($_review->getCreatedAt()) ?>htmlEscape($_review->getName()) ?> - getSum()): ?> -
    -
    -
    - -
    htmlEscape($this->helper('review')->getDetail($_review->getDetail())) ?>__('View Details') ?>
    - - getToolbarHtml() ?> - -

    __('You have submitted no reviews.') ?>

    - - diff --git a/app/design/frontend/default/default/template/review/customer/recent.phtml b/app/design/frontend/default/default/template/review/customer/recent.phtml deleted file mode 100644 index 0a4612ebd2..0000000000 --- a/app/design/frontend/default/default/template/review/customer/recent.phtml +++ /dev/null @@ -1,53 +0,0 @@ - -getCollection() && $this->count()): ?> - - diff --git a/app/design/frontend/default/default/template/review/customer/view.phtml b/app/design/frontend/default/default/template/review/customer/view.phtml deleted file mode 100644 index fd5a4c759c..0000000000 --- a/app/design/frontend/default/default/template/review/customer/view.phtml +++ /dev/null @@ -1,64 +0,0 @@ - -getProductData()->getId()): ?> -
    -

    __('Review Details') ?>

    -
    - -
    -
    -

    <?php echo $this->htmlEscape($this->getProductData()->getName()) ?>

    - getRating() && $this->getRating()->getSize()): ?> - __('Average Customer Rating:') ?> - getReviewsSummaryHtml($this->getProductData()) ?> - -
    -
    -

    htmlEscape($this->getProductData()->getName()) ?>

    - getRating() && $this->getRating()->getSize()): ?> - __('Your Rating:') ?> - - getRating() as $_rating): ?> - getPercent()): ?> - - - - - - -
    getRatingCode() ?>
    -
    -
    - - __('Your Review (submitted on %s):', $this->dateFormat($this->getReviewData()->getCreatedAt())) ?> -
    -

    htmlEscape($this->getReviewData()->getDetail())) ?>

    -
    -
    - -
    - diff --git a/app/design/frontend/default/default/template/review/form.phtml b/app/design/frontend/default/default/template/review/form.phtml deleted file mode 100644 index 788d709599..0000000000 --- a/app/design/frontend/default/default/template/review/form.phtml +++ /dev/null @@ -1,123 +0,0 @@ - -
    -

    __('Write Your Own Review') ?>

    -
    -

    __("You're reviewing: %s", $this->htmlEscape($this->getProductInfo()->getName())) ?>

    -
    -
    - getRatings() && $this->getRatings()->getSize()): ?> -
    - __('How do you rate this product?') ?>*
    - - - - - - - - - - - - - - - getRatings() as $_rating): ?> - - - - getOptions() as $_option): ?> - - class="last" style="width:60px;"> - - - - - - -
     __('1 star') ?>__('2 stars') ?>__('3 stars') ?>__('4 stars') ?>__('5 stars') ?>
    getRatingCode() ?>
    - - -
    - - -
    -
    - -
    - -
    -
    - -
    - -
    -
    - -
    - -
    - -
    -
    -
    - diff --git a/app/design/frontend/default/default/template/review/helper/summary.phtml b/app/design/frontend/default/default/template/review/helper/summary.phtml deleted file mode 100644 index 6f0fb66765..0000000000 --- a/app/design/frontend/default/default/template/review/helper/summary.phtml +++ /dev/null @@ -1,45 +0,0 @@ - - -getReviewsCount()): ?> - - - -getDisplayIfEmpty()): ?> - -

    __('Be the first to review this product') ?>

    - - diff --git a/app/design/frontend/default/default/template/review/helper/summary_short.phtml b/app/design/frontend/default/default/template/review/helper/summary_short.phtml deleted file mode 100644 index 68df9c507e..0000000000 --- a/app/design/frontend/default/default/template/review/helper/summary_short.phtml +++ /dev/null @@ -1,45 +0,0 @@ - - -getReviewsCount()): ?> - -
    - getRatingSummary()):?> -
    -
    -
    - (getReviewsCount() ?>) - - __('%d Review(s)', $this->getReviewsCount()) ?> - -
    - -getDisplayIfEmpty()): ?> - -

    __('Be the first to review this product') ?>

    - - diff --git a/app/design/frontend/default/default/template/review/product/view/count.phtml b/app/design/frontend/default/default/template/review/product/view/count.phtml deleted file mode 100644 index e033158404..0000000000 --- a/app/design/frontend/default/default/template/review/product/view/count.phtml +++ /dev/null @@ -1,29 +0,0 @@ - - -__('%s Review(s)', $count) ?> - diff --git a/app/design/frontend/default/default/template/review/product/view/list.phtml b/app/design/frontend/default/default/template/review/product/view/list.phtml deleted file mode 100644 index d51031d727..0000000000 --- a/app/design/frontend/default/default/template/review/product/view/list.phtml +++ /dev/null @@ -1,66 +0,0 @@ - - -getReviewsCollection()->getItems();?> - -
    -
    -

    __('Customer Reviews') ?>

    -
    - - getChildHtml('toolbar') ?> - -
      - -
    1. - htmlEscape($_review->getTitle()) ?> __('Review by %s', $this->htmlEscape($_review->getNickname())) ?> - - - getRatingVotes() as $_vote): ?> - - - - - - -
      getRatingCode() ?> -
      -
      -
      -
      -

      htmlEscape($_review->getDetail())) ?> __('(Posted on %s)', $this->formatDate($_review->getCreatedAt()), 'long') ?>

      -
    2. - -
    - - getChildHtml('toolbar') ?> -
    - - -
    - -getChildHtml('review_form') ?> diff --git a/app/design/frontend/default/default/template/review/product/view/other.phtml b/app/design/frontend/default/default/template/review/product/view/other.phtml deleted file mode 100644 index 0a04e512a7..0000000000 --- a/app/design/frontend/default/default/template/review/product/view/other.phtml +++ /dev/null @@ -1,29 +0,0 @@ - - - -

    « __('Back to Main Product Info') ?>

    diff --git a/app/design/frontend/default/default/template/review/view.phtml b/app/design/frontend/default/default/template/review/view.phtml deleted file mode 100644 index 7a2f6a0fe0..0000000000 --- a/app/design/frontend/default/default/template/review/view.phtml +++ /dev/null @@ -1,61 +0,0 @@ - -getProductData()->getId()): ?> -
    -

    __('Review Details') ?>

    -
    -
    -
    -

    <?php echo $this->htmlEscape($this->getProductData()->getName()) ?>

    - getRating() && $this->getRating()->getSize()): ?> - __('Average Customer Rating') ?>: - getReviewsSummaryHtml($this->getProductData()) ?> - -
    -
    -

    htmlEscape($this->getProductData()->getName()) ?>

    - getRating() && $this->getRating()->getSize()): ?> - __('Product Rating:') ?> - getRating() as $_rating): ?> - getPercent()): ?> -
    - __($_rating->getRatingCode()) ?> -
    -
    -
    -
    - - - -
    - __('Product Review (submitted on %s):', $this->dateFormat($this->getReviewData()->getCreatedAt())) ?> -
    -

    htmlEscape($this->getReviewData()->getDetail())) ?>

    -
    -
    -
    - diff --git a/app/design/frontend/default/default/template/rss/list.phtml b/app/design/frontend/default/default/template/rss/list.phtml deleted file mode 100644 index 22a7c7066d..0000000000 --- a/app/design/frontend/default/default/template/rss/list.phtml +++ /dev/null @@ -1,63 +0,0 @@ - -
    -

    __('RSS Feeds') ?>

    -
    -getRssCatalogFeeds(); - $_misc = $this->getRssMiscFeeds(); -?> - - - - - - - - - - - -
    __('Miscellaneous Feeds') ?>
    getLabel() ?>__('Get Feed'); ?>
    - -
    - - - - - - - - - - -
    __('Category Feeds') ?>
    getLabel() ?>__('Get Feed'); ?>
    - - - -

    __('There are no Rss Feeds'); ?>

    - diff --git a/app/design/frontend/default/default/template/rss/nofeed.phtml b/app/design/frontend/default/default/template/rss/nofeed.phtml deleted file mode 100644 index 02bf5d89bc..0000000000 --- a/app/design/frontend/default/default/template/rss/nofeed.phtml +++ /dev/null @@ -1 +0,0 @@ -There was no RSS feed enabled. diff --git a/app/design/frontend/default/default/template/rss/order/details.phtml b/app/design/frontend/default/default/template/rss/order/details.phtml deleted file mode 100644 index 834be06a4f..0000000000 --- a/app/design/frontend/default/default/template/rss/order/details.phtml +++ /dev/null @@ -1,102 +0,0 @@ -getStore()->getName() -web site name = $_order->getStore()->getWebsite()->getName() -store name = $_order->getStore()->getGroup()->getName() -*/ -?> -getOrder() ?> -
    -__('Customer Name: %s', $_order->getCustomerFirstname()?$_order->getCustomerName():$_order->getBillingAddress()->getName()) ?>
    -__('Purchased From: %s', $_order->getStore()->getGroup()->getName()) ?>
    -
    - - - - - - - - - - -getAllItems() as $_item): $i++ ?> - > - - - - - - - - - getGiftMessageId() && $_giftMessage = $this->helper('giftmessage/message')->getGiftMessage($_order->getGiftMessageId())): ?> - - - - - - - - - getDiscountAmount() > 0): ?> - - - - - - getShippingAmount() || $_order->getShippingDescription()): ?> - - - - - - getTaxAmount() > 0): ?> - - - - - - - - - - - -
    ItemQtySubtotal
    htmlEscape($_item->getName()) ?> - getGiftMessageId() && $_giftMessage = $this->helper('giftmessage/message')->getGiftMessage($_item->getGiftMessageId())): ?> -
    __('Gift Message') ?> -
    __('From:'); ?> htmlEscape($_giftMessage->getSender()) ?> -
    __('To:'); ?> htmlEscape($_giftMessage->getRecipient()) ?> -
    __('Message:'); ?>
    htmlEscape($_giftMessage->getMessage()) ?> - -
    getQtyOrdered()*1 ?>formatPrice($_item->getRowTotal()) ?>
    - __('Gift Message') ?> -
    __('From:'); ?> htmlEscape($_giftMessage->getSender()) ?> -
    __('To:'); ?> htmlEscape($_giftMessage->getRecipient()) ?> -
    __('Message:'); ?>
    htmlEscape($_giftMessage->getMessage()) ?> -
    __('Subtotal') ?>formatPrice($_order->getSubtotal()) ?>
    __('Discount '.($_order->getCouponCode()?'('.$_order->getCouponCode().')':'')) ?>formatPrice(0.00 - $_order->getDiscountAmount()) ?>
    __('Shipping & Handling') ?>formatPrice($_order->getShippingAmount()) ?>
    __('Tax') ?>formatPrice($_order->getTaxAmount()) ?>
    __('Grand Total') ?>formatPrice($_order->getGrandTotal()) ?>
    diff --git a/app/design/frontend/default/default/template/sales/order/creditmemo.phtml b/app/design/frontend/default/default/template/sales/order/creditmemo.phtml deleted file mode 100644 index 161389b0c4..0000000000 --- a/app/design/frontend/default/default/template/sales/order/creditmemo.phtml +++ /dev/null @@ -1,63 +0,0 @@ - -helper('giftmessage/message')->getIsMessagesAvailable('order', $this->getOrder())): ?> - - - getChildHtml('creditmemo_items') ?> - diff --git a/app/design/frontend/default/default/template/sales/order/creditmemo/items.phtml b/app/design/frontend/default/default/template/sales/order/creditmemo/items.phtml deleted file mode 100644 index ab5e07df5c..0000000000 --- a/app/design/frontend/default/default/template/sales/order/creditmemo/items.phtml +++ /dev/null @@ -1,68 +0,0 @@ - -getOrder() ?> -__('Print All Refunds') ?> -getCreditmemosCollection() as $_creditmemo): ?> -
    -
    -

    __('Refund #') ?>getIncrementId(); ?>

    - __('Print Refund') ?> -
    -

    __('Items Refunded') ?>

    - - - - - - - - - - - - - - - - - - - - - getTotalsHtml($_creditmemo);?> - - getAllItems(); ?> - - - getOrderItem()->getParentItem()) continue; ?> - - getItemHtml($_item) ?> - - -
    __('Product Name') ?>__('SKU') ?>__('Price') ?>__('Qty') ?>__('Subtotal') ?>__('Discount Amount') ?>__('Row Total') ?>
    - - diff --git a/app/design/frontend/default/default/template/sales/order/creditmemo/items/renderer/default.phtml b/app/design/frontend/default/default/template/sales/order/creditmemo/items/renderer/default.phtml deleted file mode 100644 index f6953a5681..0000000000 --- a/app/design/frontend/default/default/template/sales/order/creditmemo/items/renderer/default.phtml +++ /dev/null @@ -1,298 +0,0 @@ - -getItem() ?> -getItem()->getOrderItem()->getOrder() ?> - -
    htmlEscape($_item->getName()) ?>
    - getItemOptions()): ?> -
    - -
    htmlEscape($_option['label']) ?>
    - getPrintStatus()): ?> - getFormatedOptionValue($_option) ?> - class="truncated"> - -
    -
    -
    htmlEscape($_option['label']) ?>
    -
    -
    -
    - - - -
    htmlEscape( (isset($_option['print_value']) ? $_option['print_value'] : $_option['value']) ) ?>
    - - -
    - - getDescription() ?> - helper('giftmessage/message')->getIsMessagesAvailable('order_item', $_item->getOrderItem()) && $_item->getGiftMessageId()): ?> -
    __('Gift Message') ?> - - - splitInjection($this->getSku()) ?> - - helper('tax')->displaySalesBothPrices() || $this->helper('tax')->displaySalesPriceExclTax()): ?> - - helper('tax')->displaySalesBothPrices()): ?> - typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
    - - __('Excl. Tax'); ?>: - typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
    - - - typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
    - -
    - - - typeOfDisplay($this->getItem(), array(0, 1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> - getOrder()->formatPrice($this->getItem()->getPrice()+$this->getItem()->getWeeeTaxAppliedAmount()+$this->getItem()->getWeeeTaxDisposition()); ?> - - getOrder()->formatPrice($this->getItem()->getPrice()) ?> - - -
    - - - getApplied($this->getItem())): ?> - - - - typeOfDisplay($this->getItem(), 2, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
    - __('Total'); ?>:
    getOrder()->formatPrice($this->getItem()->getPrice()+$this->getItem()->getWeeeTaxAppliedAmount()+$this->getItem()->getWeeeTaxDisposition()); ?>
    -
    - - - -
    - - helper('tax')->displaySalesBothPrices() || $this->helper('tax')->displaySalesPriceInclTax()): ?> - - helper('tax')->displaySalesBothPrices()): ?> - typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
    - - __('Incl. Tax'); ?>: - typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
    - - - helper('checkout')->getPriceInclTax($this->getItem()); ?> - typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
    - -
    - - - typeOfDisplay($this->getItem(), array(0, 1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> - getOrder()->formatPrice($_incl+$this->getItem()->getWeeeTaxAppliedAmount()); ?> - - getOrder()->formatPrice($_incl-$this->getItem()->getWeeeTaxDisposition()) ?> - - -
    - - - getApplied($this->getItem())): ?> - - - - typeOfDisplay($this->getItem(), 2, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
    - __('Total incl. tax'); ?>:
    getOrder()->formatPrice($_incl+$this->getItem()->getWeeeTaxAppliedAmount()); ?>
    -
    - - - - - - getQty()*1 ?> - - helper('tax')->displaySalesBothPrices() || $this->helper('tax')->displaySalesPriceExclTax()): ?> - - helper('tax')->displaySalesBothPrices()): ?> - typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
    - - __('Excl. Tax'); ?>: - typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
    - - - typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
    - -
    - - - typeOfDisplay($this->getItem(), array(0, 1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> - getOrder()->formatPrice($this->getItem()->getRowTotal()+$this->getItem()->getWeeeTaxAppliedRowAmount()+$this->getItem()->getWeeeTaxRowDisposition()); ?> - - getOrder()->formatPrice($this->getItem()->getRowTotal()) ?> - - -
    - - - getApplied($this->getItem())): ?> - - - - typeOfDisplay($this->getItem(), 2, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
    - __('Total'); ?>:
    getOrder()->formatPrice($this->getItem()->getRowTotal()+$this->getItem()->getWeeeTaxAppliedRowAmount()+$this->getItem()->getWeeeTaxRowDisposition()); ?>
    -
    - - - -
    - - helper('tax')->displaySalesBothPrices() || $this->helper('tax')->displaySalesPriceInclTax()): ?> - - helper('tax')->displaySalesBothPrices()): ?> - typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
    - - __('Incl. Tax'); ?>: - typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
    - - - helper('checkout')->getSubtotalInclTax($this->getItem()); ?> - typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
    - -
    - - typeOfDisplay($this->getItem(), array(0, 1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> - getOrder()->formatPrice($_incl+$this->getItem()->getWeeeTaxAppliedRowAmount()); ?> - - getOrder()->formatPrice($_incl-$this->getItem()->getWeeeTaxRowDisposition()) ?> - - -
    - - - getApplied($this->getItem())): ?> - - - - typeOfDisplay($this->getItem(), 2, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
    - __('Total incl. tax'); ?>:
    getOrder()->formatPrice($_incl+$this->getItem()->getWeeeTaxAppliedRowAmount()); ?>
    -
    - - - - - - - - - formatPrice(-$_item->getDiscountAmount()) ?> - - formatPrice($_item->getRowTotal()-$_item->getDiscountAmount()+$_item->getTaxAmount()+$_item->getWeeeTaxAppliedRowAmount()) ?> - - diff --git a/app/design/frontend/default/default/template/sales/order/details.phtml b/app/design/frontend/default/default/template/sales/order/details.phtml deleted file mode 100644 index c1b0cec75a..0000000000 --- a/app/design/frontend/default/default/template/sales/order/details.phtml +++ /dev/null @@ -1,107 +0,0 @@ - -getOrder() ?> -
    -

    __('My Orders - Details') ?>

    - -
    -

    __('Order #%s', $_order->getRealOrderId()) ?>

    -getInvoices() as $_invoice): ?> -
    -
    -

    __('Invoice #%s', $_invoice->getIncrementId()) ?>

    - __('Print Invoice') ?> -
    -
    -
    -

    __('Shipping Address') ?>

    - getShippingAddress() ?> -
    getFirstname() ?> getLastname() ?>
    - getCompany() ?>
    - getStreet() ?>
    - getCity() ?>, getRegion() ?> getPostcode() ?>
    - T | getTelephone(); - if ($_shipping->getFax()): ?>
    F | getFax() ?>
    -
    -
    -

    __('Billing Address') ?>

    - getbillingAddress() ?> -
    getFirstname() ?> getLastname() ?>
    - getCompany() ?>
    - getStreet() ?>
    - getCity() ?>, getRegion() ?> getPostcode() ?>
    - T | getTelephone(); - if ($_billing->getFax()): ?>
    F | getFax() ?>
    -
    -
    -
    -
    -
    -

    __('Shipping Method') ?>

    - getShippingMethod() ?> getShippingDescription() ?> -
    -
    -

    __('Payment Method') ?>

    - getPayment() ?> - getMethod() ?>: getCcType() ?> xxxxgetCcLast4() ?> -
    -
    -
    -

    __('Items Ordered') ?>

    - - - - - - - - - - - - getItemsCollection(); ?> - count(); ?> - - - $_count ? ' class="last"' : '') ?>> - - - - - - - - - - - - - - -
    __('Product Name') ?>__('Price') ?>__('Qty Ordered') ?>__('Qty Shipped') ?>__('Subtotal') ?>
    getProductName() ?>formatPrice($_item->getPrice()*1) ?>getQty()*1 ?>getQty()*1 ?>formatPrice($_item->getRowTotal()*1) ?>
    __('Order Subtotal') ?>formatPrice($_invoice->getSubtotal()) ?>
    -
    - diff --git a/app/design/frontend/default/default/template/sales/order/history.phtml b/app/design/frontend/default/default/template/sales/order/history.phtml deleted file mode 100644 index c208de6d87..0000000000 --- a/app/design/frontend/default/default/template/sales/order/history.phtml +++ /dev/null @@ -1,71 +0,0 @@ - -getMessagesBlock()->getGroupedHtml() ?> -getOrders(); ?> -
    -

    __('My Orders') ?>

    -
    -getPagerHtml(); ?> -getSize()): ?> - - - - - - - - - - - - - - - - - - - - - - - - -
    __('Order #') ?>__('Date') ?>__('Ship to') ?>__('Order Total') ?>__('Order Status') ?> 
    getRealOrderId() ?>formatDate($_order->getCreatedAtStoreDate()) ?>getShippingAddress() ? $this->htmlEscape($_order->getShippingAddress()->getName()) : ' ' ?>formatPrice($_order->getGrandTotal()) ?>getStatusLabel() ?>__('View Order') ?> - |__('Track Order') ?> */ ?> - helper('sales/reorder')->canReorder($_order)) : ?> - | __('Reorder') ?> - -
    - -getPagerHtml(); ?> - -

    __('You have placed no orders.'); ?>

    - - - - diff --git a/app/design/frontend/default/default/template/sales/order/info.phtml b/app/design/frontend/default/default/template/sales/order/info.phtml deleted file mode 100644 index 13170936fd..0000000000 --- a/app/design/frontend/default/default/template/sales/order/info.phtml +++ /dev/null @@ -1,85 +0,0 @@ - -getOrder() ?> -getMessagesBlock()->getGroupedHtml() ?> -
    -

    __('Order #%s - %s', $_order->getRealOrderId(), $_order->getStatusLabel()) ?>

    - helper('rss/order')->isStatusNotificationAllow()): ?> - __('Subscribe to Order Status') ?> - | - - helper('sales/reorder')->canReorder($_order)) : ?> - __('Reorder') ?> - | - - __('Print Order') ?> -
    -getStatusHistoryRssUrl($_order) ?> -
    -
    -__('About This Order:') ?> -
      - getLinks(); ?> - - getUrl()): ?> -
    • getLabel() ?>
    • - -
    • getLabel() ?>
    • - - -
    -
    -
    - - -

    __('Order Date: %s', $this->formatDate($_order->getCreatedAtStoreDate(), 'long')) ?>

    -getIsVirtual()): ?> -
    -
    -

    __('Shipping Address') ?>

    -
    getShippingAddress()->format('html') ?>
    -
    -
    -

    __('Shipping Method') ?>__('Track Order') ?>*/ ?>

    - getShippingDescription()): ?> - getShippingDescription() ?> - - helper('sales')->__('No shipping information available'); ?> - -
    -
    - -
    -
    -

    __('Billing Address') ?>

    -
    getBillingAddress()->format('html') ?>
    -
    -
    -

    __('Payment Method') ?>

    - getPaymentInfoHtml() ?> -
    -
    diff --git a/app/design/frontend/default/default/template/sales/order/invoice.phtml b/app/design/frontend/default/default/template/sales/order/invoice.phtml deleted file mode 100644 index b3d807ea2c..0000000000 --- a/app/design/frontend/default/default/template/sales/order/invoice.phtml +++ /dev/null @@ -1,63 +0,0 @@ - -helper('giftmessage/message')->getIsMessagesAvailable('order', $this->getOrder())): ?> - - - getChildHtml('invoice_items') ?> - diff --git a/app/design/frontend/default/default/template/sales/order/invoice/items.phtml b/app/design/frontend/default/default/template/sales/order/invoice/items.phtml deleted file mode 100644 index f359085d8c..0000000000 --- a/app/design/frontend/default/default/template/sales/order/invoice/items.phtml +++ /dev/null @@ -1,64 +0,0 @@ - -getOrder() ?> -__('Print All Invoices') ?> -getInvoiceCollection() as $_invoice): ?> -
    -
    -

    __('Invoice #') ?>getIncrementId(); ?>

    - __('Print Invoice') ?> -
    -

    __('Items Invoiced') ?>

    - - - - - - - - - - - - - - - - - getInvoiceTotalsHtml($_invoice)?> - - getAllItems(); ?> - - - getOrderItem()->getParentItem()) continue; ?> - - getItemHtml($_item) ?> - - -
    __('Product Name') ?>__('SKU') ?>__('Price') ?>__('Qty Invoiced') ?>__('Subtotal') ?>
    - - diff --git a/app/design/frontend/default/default/template/sales/order/invoice/items/renderer/default.phtml b/app/design/frontend/default/default/template/sales/order/invoice/items/renderer/default.phtml deleted file mode 100644 index df86818499..0000000000 --- a/app/design/frontend/default/default/template/sales/order/invoice/items/renderer/default.phtml +++ /dev/null @@ -1,295 +0,0 @@ - -getItem() ?> -getItem()->getOrderItem()->getOrder() ?> - -
    htmlEscape($_item->getName()) ?>
    - getItemOptions()): ?> -
    - -
    htmlEscape($_option['label']) ?>
    - getPrintStatus()): ?> - getFormatedOptionValue($_option) ?> - class="truncated"> - - -
    -
    -
    htmlEscape($_option['label']) ?>
    -
    -
    -
    - - - -
    htmlEscape( (isset($_option['print_value']) ? $_option['print_value'] : $_option['value']) ) ?>
    - - -
    - - getDescription() ?> - helper('giftmessage/message')->getIsMessagesAvailable('order_item', $_item->getOrderItem()) && $_item->getGiftMessageId()): ?> -
    __('Gift Message') ?> - - - splitInjection($this->getSku()) ?> - - helper('tax')->displaySalesBothPrices() || $this->helper('tax')->displaySalesPriceExclTax()): ?> - - helper('tax')->displaySalesBothPrices()): ?> - typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
    - - __('Excl. Tax'); ?>: - typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
    - - - typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
    - -
    - - - typeOfDisplay($this->getItem(), array(0, 1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> - getOrder()->formatPrice($this->getItem()->getPrice()+$this->getItem()->getWeeeTaxAppliedAmount()+$this->getItem()->getWeeeTaxDisposition()); ?> - - getOrder()->formatPrice($this->getItem()->getPrice()) ?> - - -
    - - - getApplied($this->getItem())): ?> - - - - typeOfDisplay($this->getItem(), 2, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
    - __('Total'); ?>:
    getOrder()->formatPrice($this->getItem()->getPrice()+$this->getItem()->getWeeeTaxAppliedAmount()+$this->getItem()->getWeeeTaxDisposition()); ?>
    -
    - - - -
    - - helper('tax')->displaySalesBothPrices() || $this->helper('tax')->displaySalesPriceInclTax()): ?> - - helper('tax')->displaySalesBothPrices()): ?> - typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
    - - __('Incl. Tax'); ?>: - typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
    - - - helper('checkout')->getPriceInclTax($this->getItem()); ?> - typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
    - -
    - - - typeOfDisplay($this->getItem(), array(0, 1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> - getOrder()->formatPrice($_incl+$this->getItem()->getWeeeTaxAppliedAmount()); ?> - - getOrder()->formatPrice($_incl-$this->getItem()->getWeeeTaxDisposition()) ?> - - -
    - - - getApplied($this->getItem())): ?> - - - - typeOfDisplay($this->getItem(), 2, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
    - __('Total incl. tax'); ?>:
    getOrder()->formatPrice($_incl+$this->getItem()->getWeeeTaxAppliedAmount()); ?>
    -
    - - - - - - getQty()*1 ?> - - helper('tax')->displaySalesBothPrices() || $this->helper('tax')->displaySalesPriceExclTax()): ?> - - helper('tax')->displaySalesBothPrices()): ?> - typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
    - - __('Excl. Tax'); ?>: - typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
    - - - typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
    - -
    - - - typeOfDisplay($this->getItem(), array(0, 1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> - getOrder()->formatPrice($this->getItem()->getRowTotal()+$this->getItem()->getWeeeTaxAppliedRowAmount()+$this->getItem()->getWeeeTaxRowDisposition()); ?> - - getOrder()->formatPrice($this->getItem()->getRowTotal()) ?> - - -
    - - - getApplied($this->getItem())): ?> - - - - typeOfDisplay($this->getItem(), 2, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
    - __('Total'); ?>:
    getOrder()->formatPrice($this->getItem()->getRowTotal()+$this->getItem()->getWeeeTaxAppliedRowAmount()+$this->getItem()->getWeeeTaxRowDisposition()); ?>
    -
    - - - -
    - - helper('tax')->displaySalesBothPrices() || $this->helper('tax')->displaySalesPriceInclTax()): ?> - - helper('tax')->displaySalesBothPrices()): ?> - typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
    - - __('Incl. Tax'); ?>: - typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
    - - - helper('checkout')->getSubtotalInclTax($this->getItem()); ?> - typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
    - -
    - - typeOfDisplay($this->getItem(), array(0, 1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> - getOrder()->formatPrice($_incl+$this->getItem()->getWeeeTaxAppliedRowAmount()); ?> - - getOrder()->formatPrice($_incl-$this->getItem()->getWeeeTaxRowDisposition()) ?> - - -
    - - - getApplied($this->getItem())): ?> - - - - typeOfDisplay($this->getItem(), 2, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
    - __('Total incl. tax'); ?>:
    getOrder()->formatPrice($_incl+$this->getItem()->getWeeeTaxAppliedRowAmount()); ?>
    -
    - - - - - - - - - diff --git a/app/design/frontend/default/default/template/sales/order/items.phtml b/app/design/frontend/default/default/template/sales/order/items.phtml deleted file mode 100644 index 24f62782ac..0000000000 --- a/app/design/frontend/default/default/template/sales/order/items.phtml +++ /dev/null @@ -1,70 +0,0 @@ - -getOrder() ?> - - - - - - - - - - - - - - - - - - getChildHtml('order_totals') ?> - - getItemsCollection(); ?> - - count(); ?> - - getParentItem()) continue; ?> - - getItemHtml($_item) ?> - helper('giftmessage/message')->getIsMessagesAvailable('order_item', $_item) && $_item->getGiftMessageId()): ?> - - helper('giftmessage/message')->getGiftMessageForEntity($_item); ?> - - - - - -
    __('Product Name') ?>__('SKU') ?>__('Price') ?>__('Qty') ?>__('Subtotal') ?>
    - diff --git a/app/design/frontend/default/default/template/sales/order/items/renderer/default.phtml b/app/design/frontend/default/default/template/sales/order/items/renderer/default.phtml deleted file mode 100644 index e217a7bfbc..0000000000 --- a/app/design/frontend/default/default/template/sales/order/items/renderer/default.phtml +++ /dev/null @@ -1,309 +0,0 @@ - -getItem() ?> - -
    htmlEscape($_item->getName()) ?>
    - getItemOptions()): ?> -
    - -
    htmlEscape($_option['label']) ?>
    - getPrintStatus()): ?> - getFormatedOptionValue($_option) ?> - class="truncated"> - - -
    -
    -
    htmlEscape($_option['label']) ?>
    -
    -
    -
    - - - -
    htmlEscape( (isset($_option['print_value']) ? $_option['print_value'] : $_option['value']) ) ?>
    - - -
    - - getDescription() ?> - helper('giftmessage/message')->getIsMessagesAvailable('order_item', $_item) && $_item->getGiftMessageId()): ?> -
    __('Gift Message') ?> - - - splitInjection($this->getSku()) ?> - - helper('tax')->displaySalesBothPrices() || $this->helper('tax')->displaySalesPriceExclTax()): ?> - - helper('tax')->displaySalesBothPrices()): ?> - typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
    - - __('Excl. Tax'); ?>: - typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
    - - - typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
    - -
    - - - typeOfDisplay($this->getItem(), array(0, 1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> - getOrder()->formatPrice($this->getItem()->getPrice()+$this->getItem()->getWeeeTaxAppliedAmount()+$this->getItem()->getWeeeTaxDisposition()); ?> - - getOrder()->formatPrice($this->getItem()->getPrice()) ?> - - -
    - - - getApplied($this->getItem())): ?> - - - - typeOfDisplay($this->getItem(), 2, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
    - __('Total'); ?>:
    getOrder()->formatPrice($this->getItem()->getPrice()+$this->getItem()->getWeeeTaxAppliedAmount()+$this->getItem()->getWeeeTaxDisposition()); ?>
    -
    - - - -
    - - helper('tax')->displaySalesBothPrices() || $this->helper('tax')->displaySalesPriceInclTax()): ?> - - helper('tax')->displaySalesBothPrices()): ?> - typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
    - - __('Incl. Tax'); ?>: - typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
    - - - helper('checkout')->getPriceInclTax($this->getItem()); ?> - typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
    - -
    - - - typeOfDisplay($this->getItem(), array(0, 1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> - getOrder()->formatPrice($_incl+$this->getItem()->getWeeeTaxAppliedAmount()); ?> - - getOrder()->formatPrice($_incl-$this->getItem()->getWeeeTaxDisposition()) ?> - - -
    - - - getApplied($this->getItem())): ?> - - - - typeOfDisplay($this->getItem(), 2, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
    - __('Total incl. tax'); ?>:
    getOrder()->formatPrice($_incl+$this->getItem()->getWeeeTaxAppliedAmount()); ?>
    -
    - - - - - - - - getItem()->getQtyOrdered() > 0): ?> - __('Ordered'); ?>: getItem()->getQtyOrdered()*1 ?>
    - - getItem()->getQtyShipped() > 0): ?> - __('Shipped'); ?>: getItem()->getQtyShipped()*1 ?>
    - - getItem()->getQtyCanceled() > 0): ?> - __('Canceled'); ?>: getItem()->getQtyCanceled()*1 ?>
    - - getItem()->getQtyRefunded() > 0): ?> - __('Refunded'); ?>: getItem()->getQtyRefunded()*1 ?>
    - -
    - - - helper('tax')->displaySalesBothPrices() || $this->helper('tax')->displaySalesPriceExclTax()): ?> - - helper('tax')->displaySalesBothPrices()): ?> - typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
    - - __('Excl. Tax'); ?>: - typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
    - - - typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
    - -
    - - - typeOfDisplay($this->getItem(), array(0, 1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> - getOrder()->formatPrice($this->getItem()->getRowTotal()+$this->getItem()->getWeeeTaxAppliedRowAmount()+$this->getItem()->getWeeeTaxRowDisposition()); ?> - - getOrder()->formatPrice($this->getItem()->getRowTotal()) ?> - - -
    - - - getApplied($this->getItem())): ?> - - - - typeOfDisplay($this->getItem(), 2, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
    - __('Total'); ?>:
    getOrder()->formatPrice($this->getItem()->getRowTotal()+$this->getItem()->getWeeeTaxAppliedRowAmount()+$this->getItem()->getWeeeTaxRowDisposition()); ?>
    -
    - - - -
    - - helper('tax')->displaySalesBothPrices() || $this->helper('tax')->displaySalesPriceInclTax()): ?> - - helper('tax')->displaySalesBothPrices()): ?> - typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
    - - __('Incl. Tax'); ?>: - typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
    - - - helper('checkout')->getSubtotalInclTax($this->getItem()); ?> - typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
    - -
    - - typeOfDisplay($this->getItem(), array(0, 1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> - getOrder()->formatPrice($_incl+$this->getItem()->getWeeeTaxAppliedRowAmount()); ?> - - getOrder()->formatPrice($_incl-$this->getItem()->getWeeeTaxRowDisposition()) ?> - - -
    - - - getApplied($this->getItem())): ?> - - - - typeOfDisplay($this->getItem(), 2, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
    - __('Total incl. tax'); ?>:
    getOrder()->formatPrice($_incl+$this->getItem()->getWeeeTaxAppliedRowAmount()); ?>
    -
    - - - - - - - - - diff --git a/app/design/frontend/default/default/template/sales/order/print.phtml b/app/design/frontend/default/default/template/sales/order/print.phtml deleted file mode 100644 index cfbe88104d..0000000000 --- a/app/design/frontend/default/default/template/sales/order/print.phtml +++ /dev/null @@ -1,88 +0,0 @@ - -getOrder() ?> -

    __('Order #%s', $_order->getRealOrderId()) ?>

    -

    __('Order Date: %s', $this->formatDate($_order->getCreatedAtStoreDate(), 'long')) ?>

    -
    -
    - getIsVirtual()): ?> -
    -

    __('Shipping Address') ?>

    -
    getShippingAddress()->format('html') ?>
    -
    -
    - -
    - -

    __('Billing Address') ?>

    -
    getBillingAddress()->format('html') ?>
    -
    -getIsVirtual()): ?> -
    -
    -
    -
    -

    __('Shipping Method') ?>

    - getShippingDescription() ?> -
    - -
    -

    __('Payment Method') ?>

    - getPaymentInfoHtml() ?> -
    -
    -
    -

    __('Items Ordered') ?>

    - - - - - - - - - - - - - - - - - getChildHtml('order_totals') ?> - - getItemsCollection(); ?> - count(); ?> - - getParentItem()) continue; ?> - - getItemHtml($_item) ?> - - -
    __('Product Name') ?>__('SKU') ?>__('Price') ?>__('Qty') ?>__('Subtotal') ?>
    - - diff --git a/app/design/frontend/default/default/template/sales/order/print/creditmemo.phtml b/app/design/frontend/default/default/template/sales/order/print/creditmemo.phtml deleted file mode 100644 index 6adb74a955..0000000000 --- a/app/design/frontend/default/default/template/sales/order/print/creditmemo.phtml +++ /dev/null @@ -1,108 +0,0 @@ - -getOrder() ?> - -

    __('Order #%s', $_order->getRealOrderId()) ?>

    -

    __('Order Date: %s', $this->formatDate($_order->getCreatedAtStoreDate(), 'long')) ?>

    -getCreditmemo() ?> - - - - getCreditmemosCollection() ?> - - -
    -
    -

    __('Refund #%s', $_creditmemo->getIncrementId()) ?>

    - -
    -
    -
    - getIsVirtual()): ?> -

    __('Shipping Address') ?>

    - getShippingAddress() ?> -
    format('html') ?>
    -
    -
    - -

    __('Billing Address') ?>

    - getbillingAddress() ?> -
    getBillingAddress()->format('html') ?>
    -
    - getIsVirtual()): ?> -
    -
    -
    -
    -

    __('Shipping Method') ?>

    - getShippingDescription() ?> -
    - -
    -

    __('Payment Method') ?>

    - getPaymentInfoHtml() ?> -
    -
    -
    -

    __('Items Refunded') ?>

    - - - - - - - - - - - - - - - - - - - - - getTotalsHtml($_creditmemo);?> - - getAllItems(); ?> - - - getOrderItem()->getParentItem()) continue; ?> - - getItemHtml($_item) ?> - - -
    __('Product Name') ?>__('SKU') ?>__('Price') ?>__('Qty') ?>__('Subtotal') ?>__('Discount Amount') ?>__('Row Total') ?>
    - - - diff --git a/app/design/frontend/default/default/template/sales/order/print/invoice.phtml b/app/design/frontend/default/default/template/sales/order/print/invoice.phtml deleted file mode 100644 index bc98ce895a..0000000000 --- a/app/design/frontend/default/default/template/sales/order/print/invoice.phtml +++ /dev/null @@ -1,104 +0,0 @@ - -getOrder() ?> - -

    __('Order #%s', $_order->getRealOrderId()) ?>

    -

    __('Order Date: %s', $this->formatDate($_order->getCreatedAtStoreDate(), 'long')) ?>

    -getInvoice() ?> - - - - getInvoiceCollection() ?> - - -
    -
    -

    __('Invoice #%s', $_invoice->getIncrementId()) ?>

    - -
    -
    -
    - getIsVirtual()): ?> -

    __('Shipping Address') ?>

    - getShippingAddress() ?> -
    format('html') ?>
    -
    -
    - -

    __('Billing Address') ?>

    - getbillingAddress() ?> -
    getBillingAddress()->format('html') ?>
    -
    - getIsVirtual()): ?> -
    -
    -
    -
    -

    __('Shipping Method') ?>

    - getShippingDescription() ?> -
    - -
    -

    __('Payment Method') ?>

    - getPaymentInfoHtml() ?> -
    -
    -
    -

    __('Items Invoiced') ?>

    - - - - - - - - - - - - - - - - - getInvoiceTotalsHtml($_invoice)?> - - getItemsCollection(); ?> - count(); ?> - - - getOrderItem()->getParentItem()) continue; ?> - getItemHtml($_item) ?> - - -
    __('Product Name') ?>__('SKU') ?>__('Price') ?>__('Qty Invoiced') ?>__('Subtotal') ?>
    - - - diff --git a/app/design/frontend/default/default/template/sales/order/print/shipment.phtml b/app/design/frontend/default/default/template/sales/order/print/shipment.phtml deleted file mode 100644 index fbdc78e78e..0000000000 --- a/app/design/frontend/default/default/template/sales/order/print/shipment.phtml +++ /dev/null @@ -1,95 +0,0 @@ - -getOrder() ?> - -

    __('Order #%s', $_order->getRealOrderId()) ?>

    -

    __('Order Date: %s', $this->formatDate($_order->getCreatedAtStoreDate(), 'long')) ?>

    -getIsVirtual()): ?> -getShipment() ?> - - - - getShipmentsCollection() ?> - - - -
    -
    -

    __('Shipment #%s', $_shipment->getIncrementId()) ?>

    -
    -
    -
    -

    __('Shipping Address') ?>

    - getShippingAddress() ?> -
    format('html') ?>
    -
    -
    -

    __('Billing Address') ?>

    - getbillingAddress() ?> -
    getBillingAddress()->format('html') ?>
    -
    -
    -
    -
    -
    -

    __('Shipping Method') ?>

    - getShippingDescription() ?> -
    -
    -

    __('Payment Method') ?>

    - getPaymentInfoHtml() ?> -
    -
    -
    -

    __('Items Shipped') ?>

    - - - - - - - - - - - - getItemsCollection(); ?> - - - getOrderItem()->getParentItem()) continue; ?> - - getItemHtml($_item) ?> - - -
    __('Product Name') ?>__('SKU') ?>__('Qty Shipped') ?>
    - - - - diff --git a/app/design/frontend/default/default/template/sales/order/recent.phtml b/app/design/frontend/default/default/template/sales/order/recent.phtml deleted file mode 100644 index 48a548f4ff..0000000000 --- a/app/design/frontend/default/default/template/sales/order/recent.phtml +++ /dev/null @@ -1,67 +0,0 @@ - - diff --git a/app/design/frontend/default/default/template/sales/order/shipment.phtml b/app/design/frontend/default/default/template/sales/order/shipment.phtml deleted file mode 100644 index 5145dd6115..0000000000 --- a/app/design/frontend/default/default/template/sales/order/shipment.phtml +++ /dev/null @@ -1,63 +0,0 @@ - -helper('giftmessage/message')->getIsMessagesAvailable('order', $this->getOrder())): ?> - - - getChildHtml('shipment_items') ?> - diff --git a/app/design/frontend/default/default/template/sales/order/shipment/items.phtml b/app/design/frontend/default/default/template/sales/order/shipment/items.phtml deleted file mode 100644 index 27acc4cf28..0000000000 --- a/app/design/frontend/default/default/template/sales/order/shipment/items.phtml +++ /dev/null @@ -1,90 +0,0 @@ - -getOrder() ?> -getTracksCollection()->count()) : ?> - - -__('Print All Shipments') ?> -
    -getShipmentsCollection() as $_shipment): ?> -
    -
    -

    __('Shipment #') ?>getIncrementId(); ?>

    - __('Print Shipment') ?> -
    -getTracksCollection(); ?> -count()): ?> - - - - - - - - -
    - __('Track this shipment') ?> -
    __('Tracking Number(s)') ?>:  - count(); - foreach($tracks as $track): ?> - isCustom()): ?> - getNumber() ?> - - getNumber() ?> - - , - -
    - -

    __('Items Shipped') ?>

    - - - - - - - - - - - - getAllItems(); ?> - - - getOrderItem()->getParentItem()) continue; ?> - - getItemHtml($_item) ?> - - -
    __('Product Name') ?>__('SKU') ?>__('Qty Shipped') ?>
    - - diff --git a/app/design/frontend/default/default/template/sales/order/shipment/items/renderer/default.phtml b/app/design/frontend/default/default/template/sales/order/shipment/items/renderer/default.phtml deleted file mode 100644 index 7dd2bc235b..0000000000 --- a/app/design/frontend/default/default/template/sales/order/shipment/items/renderer/default.phtml +++ /dev/null @@ -1,61 +0,0 @@ - -getItem() ?> -getItem()->getOrderItem()->getOrder() ?> - -
    htmlEscape($_item->getName()) ?>
    - getItemOptions()): ?> -
    - -
    htmlEscape($_option['label']) ?>
    - getPrintStatus()): ?> - getFormatedOptionValue($_option) ?> - class="truncated"> - - -
    -
    -
    htmlEscape($_option['label']) ?>
    -
    -
    -
    - - - -
    htmlEscape( (isset($_option['print_value']) ? $_option['print_value'] : $_option['value']) ) ?>
    - - -
    - - getDescription() ?> - helper('giftmessage/message')->getIsMessagesAvailable('order_item', $_item->getOrderItem()) && $_item->getGiftMessageId()): ?> -
    __('Gift Message') ?> - - - splitInjection($this->getSku()) ?> - getQty()*1 ?> - diff --git a/app/design/frontend/default/default/template/sales/order/totals.phtml b/app/design/frontend/default/default/template/sales/order/totals.phtml deleted file mode 100644 index 613943cd47..0000000000 --- a/app/design/frontend/default/default/template/sales/order/totals.phtml +++ /dev/null @@ -1,52 +0,0 @@ - -getTotals() as $_code => $_total): ?> - getBlockName()): ?> - getChildHtml($_total->getBlockName(), false); ?> - - - getLabelProperties()?>> - getStrong()):?> - getLabel()?> - - getLabel()?> - - - getValueProperties()?>> - getStrong()):?> - formatValue($_total) ?> - - formatValue($_total) ?> - - - - - diff --git a/app/design/frontend/default/default/template/sales/order/trackinginfo.phtml b/app/design/frontend/default/default/template/sales/order/trackinginfo.phtml deleted file mode 100644 index e51f3b354f..0000000000 --- a/app/design/frontend/default/default/template/sales/order/trackinginfo.phtml +++ /dev/null @@ -1,68 +0,0 @@ - - - -trackingInfo): ?> - - trackingInfo->getCarrierTitle() ?> - trackingInfo->getTracking() ?> -
    - trackingInfo->getErrorMessage()): ?> - trackingInfo->getErrorMessage() ?> - - trackingInfo->getUrl()): ?> - Please, visit for more info: trackingInfo->getCarrierTitle() ?>
    - - - trackingInfo->getStatus()): ?> - Status: trackingInfo->getStatus() ?>
    - - - trackingInfo->getDeliverydate()): ?> - Delivery Date: trackingInfo->getDeliverydate() ?>
    - - - trackingInfo->getDeliverytime()): ?> - Delivery Time: trackingInfo->getDeliverytime() ?>
    - - - trackingInfo->getDeliverylocation()): ?> - Delivery Location: trackingInfo->getDeliverylocation() ?>
    - - - trackingInfo->getSignedby()): ?> - Signed by: trackingInfo->getSignedby() ?>
    - - - trackingInfo->getTrackSummary()): ?> - Tracking summary: trackingInfo->getTrackSummary() ?>
    - - - -
    - - -
    diff --git a/app/design/frontend/default/default/template/sales/order/view.phtml b/app/design/frontend/default/default/template/sales/order/view.phtml deleted file mode 100644 index dc99d0b51a..0000000000 --- a/app/design/frontend/default/default/template/sales/order/view.phtml +++ /dev/null @@ -1,98 +0,0 @@ - -helper('giftmessage/message')->getIsMessagesAvailable('items', $this->getOrder())): ?> - - -getOrder() ?> -

    __('Items Ordered') ?> -getTracksCollection()->count()) : ?> - | __('Track your order') ?> - -

    - -getChildHtml('order_items') ?> - -helper('giftmessage/message')->getIsMessagesAvailable('order', $_order) && $_order->getGiftMessageId()): ?> -
    - helper('giftmessage/message')->getGiftMessageForEntity($_order); ?> - __('Gift Message for this Order') ?> -
      -
    • - htmlEscape($_giftMessage->getSender()) ?> -
    • -
    • - htmlEscape($_giftMessage->getRecipient()) ?> -
    • -
    • helper('giftmessage/message')->getEscapedGiftMessage($_order) ?>
    • -
    -
    - -getOrder()->getVisibleStatusHistory() ?> - -
    -

    __('About Your Order') ?>

    -
    -
    - -
    formatDate($_historyItem->getCreatedAtStoreDate(), 'medium', true) ?>
    -
    getComment() ?>
    - -
    -
    - - - diff --git a/app/design/frontend/default/default/template/sales/reorder/sidebar.phtml b/app/design/frontend/default/default/template/sales/reorder/sidebar.phtml deleted file mode 100644 index 4e183760da..0000000000 --- a/app/design/frontend/default/default/template/sales/reorder/sidebar.phtml +++ /dev/null @@ -1,79 +0,0 @@ - - -getLastOrder()): ?> -
    -
    -
    -

    __('My Orders') ?>  -  

    - __('View All') ?>

    -
    __('Last ordered items') ?>
    -
    -
      - - getItemsRandomCollection(5) as $_item): ?> - getProduct() && is_null($_item->getParentItem())): ?> -
    1. -
      - getProduct()->getStockItem()->getIsInStock()): ?> - - - - -
      - -
    2. - - -
    - -
    - - -
    -
    -
    - -
    -
    -getPagerHtml(); ?> - - diff --git a/app/design/frontend/default/default/template/sendfriend/send.phtml b/app/design/frontend/default/default/template/sendfriend/send.phtml deleted file mode 100644 index f0a57ee90c..0000000000 --- a/app/design/frontend/default/default/template/sendfriend/send.phtml +++ /dev/null @@ -1,144 +0,0 @@ - - - -getMessagesBlock()->getGroupedHtml() ?> - -
    -

    __('Email to a Friend') ?>

    -
    -
    -getBlockHtml('formkey')?> - -
    - diff --git a/app/design/frontend/default/default/template/shipping/tracking/ajax.phtml b/app/design/frontend/default/default/template/shipping/tracking/ajax.phtml deleted file mode 100644 index 8b13789179..0000000000 --- a/app/design/frontend/default/default/template/shipping/tracking/ajax.phtml +++ /dev/null @@ -1 +0,0 @@ - diff --git a/app/design/frontend/default/default/template/shipping/tracking/popup.phtml b/app/design/frontend/default/default/template/shipping/tracking/popup.phtml deleted file mode 100644 index 3c15ac94fc..0000000000 --- a/app/design/frontend/default/default/template/shipping/tracking/popup.phtml +++ /dev/null @@ -1,172 +0,0 @@ - -getTrackingInfo() ?> -
    -
    - -
    -0): ?> - $_result): ?> - -
    __('Shipment #').$shipid; ?>
    - - 0): ?> - - - - - - - - - getCarrierTitle()): ?> - - - - - - getErrorMessage()): ?> - - - - - getTrackSummary()): ?> - - - - - getUrl()): ?> - - - - - - getStatus()): ?> - - - - - - - getDeliverydate()): ?> - - - - - - - getSignedby()): ?> - - - - - - - getDeliveryLocation()): ?> - - - - - - - getShippedDate()): ?> - - - - - - - getService()): ?> - - - - - - - getWeight()): ?> - - - - - - - - - - - - - - - -
    __('Tracking Number:'); ?>getTracking(); ?>
    __('Carrier:'); ?>getCarrierTitle(); ?>
    __('Error:'); ?>__('Tracking information is currently not available. Please ')."".$this->__('contact us').''.$this->__(' for more information or email us at '); ?>getStoreSupportEmail() ?>
    __('Info:'); ?>getTrackSummary(); ?>
    __('Track:'); ?>getUrl(); ?>
    __('Status:'); ?>getStatus(); ?>
    __('Delivered on:'); ?>formatDeliveryDateTime($track->getDeliverydate(),$track->getDeliverytime()); ?>
    __('Signed by:'); ?>getSignedby(); ?>
    __('Delivered to:'); ?>getDeliveryLocation(); ?>
    __('Shipped or billed on:'); ?>getShippedDate(); ?>
    __('Service Type:'); ?>getService(); ?>
    __('Weight:'); ?>getWeight(); ?>
    __('N/A')); ?>:
    - - getProgressdetail())>0): ?> -
    - - - - - - - - - - getProgressdetail() as $_detail): ?> - formatDeliveryDate($_detail['deliverydate']) : '') ?> - formatDeliveryTime($_detail['deliverytime'], $_detailDate) : '') ?> - - - - - - - -
    __('Location') ?>__('Date') ?>__('Local Time') ?>__('Description') ?>
    - - - - -
    - - - - - -
    __('There is no tracking available for this shipment.'); ?>
    - - - - -
    __('There is no tracking available.'); ?>
    - -
    -
    - -
    diff --git a/app/design/frontend/default/default/template/tag/cloud.phtml b/app/design/frontend/default/default/template/tag/cloud.phtml deleted file mode 100644 index 1a6e858c7e..0000000000 --- a/app/design/frontend/default/default/template/tag/cloud.phtml +++ /dev/null @@ -1,42 +0,0 @@ - -
    -

    __('All Tags') ?>

    -
    -
    -
    - getTags()) > 0 ): ?> - - -

    __("Tags Aren't Available") ?>

    - -
    -
    diff --git a/app/design/frontend/default/default/template/tag/customer/edit.phtml b/app/design/frontend/default/default/template/tag/customer/edit.phtml deleted file mode 100644 index 969dc1e51c..0000000000 --- a/app/design/frontend/default/default/template/tag/customer/edit.phtml +++ /dev/null @@ -1,49 +0,0 @@ - -
    -

    __('Edit Tag') ?>

    -
    -getMessagesBlock()->getGroupedHtml() ?> -
    -
    -

    __('Tag Information') ?>

    -
      -
    • -
      - -
      -
    • -
    -
    -
    - « __('Back to view Tag') ?> - -
    -
    - diff --git a/app/design/frontend/default/default/template/tag/customer/recent.phtml b/app/design/frontend/default/default/template/tag/customer/recent.phtml deleted file mode 100644 index 2182159e0e..0000000000 --- a/app/design/frontend/default/default/template/tag/customer/recent.phtml +++ /dev/null @@ -1,48 +0,0 @@ - - diff --git a/app/design/frontend/default/default/template/tag/customer/tags.phtml b/app/design/frontend/default/default/template/tag/customer/tags.phtml deleted file mode 100644 index 2f7257778d..0000000000 --- a/app/design/frontend/default/default/template/tag/customer/tags.phtml +++ /dev/null @@ -1,49 +0,0 @@ - -getMessagesBlock()->getGroupedHtml() ?> - -
    -

    __('My Tags') ?>

    -
    - -getTags()): ?> -

    __('Click on a tag to view your corresponding products.') ?>

    -
    -
    - -
    -
    - -

    __('You have not tagged any products yet.') ?>

    - - diff --git a/app/design/frontend/default/default/template/tag/customer/view.phtml b/app/design/frontend/default/default/template/tag/customer/view.phtml deleted file mode 100644 index 89ee9ba6cb..0000000000 --- a/app/design/frontend/default/default/template/tag/customer/view.phtml +++ /dev/null @@ -1,75 +0,0 @@ - - diff --git a/app/design/frontend/default/default/template/tag/list.phtml b/app/design/frontend/default/default/template/tag/list.phtml deleted file mode 100644 index dd783da075..0000000000 --- a/app/design/frontend/default/default/template/tag/list.phtml +++ /dev/null @@ -1,59 +0,0 @@ - -
    -

    __('Product Tags') ?>

    -
    - getCount() ): ?> -
    __('Other people marked this product with these tags:') ?>
    - - -
    __('Add Your Tags:') ?>
    -
    -
    -
    - -
    -
    -
    - -
    - __("Use spaces to separate tags. Use single quotes (') for phrases.") ?> -
    diff --git a/app/design/frontend/default/default/template/tag/mytags.phtml b/app/design/frontend/default/default/template/tag/mytags.phtml deleted file mode 100644 index 4b4429c105..0000000000 --- a/app/design/frontend/default/default/template/tag/mytags.phtml +++ /dev/null @@ -1,75 +0,0 @@ - - - -getItems() as $tag) { /* $tag = $tag->getData();*/ ?> - - - getTagname(); ?> - - - e - d - - - diff --git a/app/design/frontend/default/default/template/tag/popular.phtml b/app/design/frontend/default/default/template/tag/popular.phtml deleted file mode 100644 index e0669d5ce0..0000000000 --- a/app/design/frontend/default/default/template/tag/popular.phtml +++ /dev/null @@ -1,41 +0,0 @@ - -
    -
    -

    __('Popular Tags'); ?>

    -
    -
    - -
    - -
    diff --git a/app/design/frontend/default/default/template/tag/product/result.phtml b/app/design/frontend/default/default/template/tag/product/result.phtml deleted file mode 100644 index 7d0a742c31..0000000000 --- a/app/design/frontend/default/default/template/tag/product/result.phtml +++ /dev/null @@ -1,66 +0,0 @@ - -getTagInfo()->getName() ): ?> -
    -

    __("Products tagged with '%s'", $this->htmlEscape($this->getTagInfo()->getName())) ?>

    -
    - -getListHtml() ?> - - getCount() > 0 ): ?> - - - - - - getProducts() as $_product): ?> - class="odd"> - - - - - - - - - - - -
    - -
    htmlEscape($_product->getName()) ?>
    - getPriceHtml($_product) ?> - getReviewsSummaryHtml($_product, 'short') ?> -

    getDescription() ?>

    -
    - - helper('wishlist')->isAllow()) : ?> -
    __('Add to Wishlist') ?> - -

    __("Unable to find any products tagged with '%s' in the current store", $this->htmlEscape($this->getTagInfo()->getName()) ) ?>

    - -getListHtml() ?> diff --git a/app/design/frontend/default/default/template/tag/result.phtml b/app/design/frontend/default/default/template/tag/result.phtml deleted file mode 100644 index c4aaabefd7..0000000000 --- a/app/design/frontend/default/default/template/tag/result.phtml +++ /dev/null @@ -1,42 +0,0 @@ - -

    __("Search Results for '%s' (RSS)", $query, '/taggedproducts/xml/?tag='.$query) ?>

    -
      - - -
    • -

      -

      - - - - - -

      -
    • - -
    diff --git a/app/design/frontend/default/default/template/tag/search.phtml b/app/design/frontend/default/default/template/tag/search.phtml deleted file mode 100644 index 7e1fba6fae..0000000000 --- a/app/design/frontend/default/default/template/tag/search.phtml +++ /dev/null @@ -1,42 +0,0 @@ - -
    -

    __("Products tagged with '%s' (RSS)", $query, '/tag/index/xml?tag='.$query) ?>

    -
    - -
      - -
    1. - - Tags: - - - -
    2. - -
    - diff --git a/app/design/frontend/default/default/template/tax/checkout/discount.phtml b/app/design/frontend/default/default/template/tax/checkout/discount.phtml deleted file mode 100644 index 33f00e9e5f..0000000000 --- a/app/design/frontend/default/default/template/tax/checkout/discount.phtml +++ /dev/null @@ -1,25 +0,0 @@ - -includeTax() && $this->getTotalExclTax()>=0):?> - - - helper('tax')->__('Grand Total Excl. Tax')?> - - - helper('checkout')->formatPrice($this->getTotalExclTax()) ?> - - -renderTotals('taxes', $this->getColspan()); ?> - - - helper('tax')->__('Grand Total Incl. Tax')?> - - - helper('checkout')->formatPrice($this->getTotal()->getValue()) ?> - - - - - - getTotal()->getTitle() ?> - - - helper('checkout')->formatPrice($this->getTotal()->getValue()) ?> - - - diff --git a/app/design/frontend/default/default/template/tax/checkout/shipping.phtml b/app/design/frontend/default/default/template/tax/checkout/shipping.phtml deleted file mode 100644 index 9bd9421c9a..0000000000 --- a/app/design/frontend/default/default/template/tax/checkout/shipping.phtml +++ /dev/null @@ -1,66 +0,0 @@ - -displayBoth()):?> - - - getExcludeTaxLabel() ?> - - - helper('checkout')->formatPrice($this->getShippingExcludeTax()) ?> - - - - - getIncludeTaxLabel() ?> - - - helper('checkout')->formatPrice($this->getShippingIncludeTax()) ?> - - -displayIncludeTax()) : ?> - - - getTotal()->getTitle() ?> - - - helper('checkout')->formatPrice($this->getShippingIncludeTax()) ?> - - - - - - getTotal()->getTitle() ?> - - - helper('checkout')->formatPrice($this->getShippingExcludeTax()) ?> - - - diff --git a/app/design/frontend/default/default/template/tax/checkout/subtotal.phtml b/app/design/frontend/default/default/template/tax/checkout/subtotal.phtml deleted file mode 100644 index ea5026e490..0000000000 --- a/app/design/frontend/default/default/template/tax/checkout/subtotal.phtml +++ /dev/null @@ -1,57 +0,0 @@ - -displayBoth()):?> - - - helper('tax')->__('Subtotal (Excl. Tax)') ?> - - - helper('checkout')->formatPrice($this->getTotal()->getValueExclTax()) ?> - - - - - helper('tax')->__('Subtotal (Incl. Tax)') ?> - - - helper('checkout')->formatPrice($this->getTotal()->getValueInclTax()) ?> - - - - - - getTotal()->getTitle() ?> - - - helper('checkout')->formatPrice($this->getTotal()->getValue()) ?> - - - diff --git a/app/design/frontend/default/default/template/tax/checkout/tax.phtml b/app/design/frontend/default/default/template/tax/checkout/tax.phtml deleted file mode 100644 index cfc0a69751..0000000000 --- a/app/design/frontend/default/default/template/tax/checkout/tax.phtml +++ /dev/null @@ -1,74 +0,0 @@ - -getTotal()->getValue(); - $_style = $this->getTotal()->getStyle(); -?> - -helper('tax')->displayFullSummary() && $_value!=0): ?> - - getTotal()->getFullInfo() as $info): ?> - - - - - - - - - - - - (%) - -
    - - - - helper('checkout')->formatPrice($amount); ?> - - - - - - - - -helper('tax')->displayFullSummary() && $_value!=0): ?> class="tax-total" onclick="expandDetails(this, '.tax-details-')"> - - helper('tax')->displayFullSummary()): ?> -
    getTotal()->getTitle() ?>
    - - getTotal()->getTitle() ?> - - - helper('checkout')->formatPrice($_value) ?> - diff --git a/app/design/frontend/default/default/template/tax/order/tax.phtml b/app/design/frontend/default/default/template/tax/order/tax.phtml deleted file mode 100644 index e9d50ec8db..0000000000 --- a/app/design/frontend/default/default/template/tax/order/tax.phtml +++ /dev/null @@ -1,81 +0,0 @@ - -getOrder(); - $_source = $this->getSource(); - $_fullInfo = $_source->getFullTaxInfo(); - global $taxIter; $taxIter++; -?> - - -displayFullSummary()): ?> - - - - - - getIsPlaneMode()):?> style="display:none;"> - getLabelProperties()?>> - - - (%) - -
    - - - getValueProperties()?> rowspan=""> - formatPrice($amount); ?> - - - - - - - - - -displayFullSummary() && $_fullInfo && !$this->getIsPlaneMode()): ?> - -displayFullSummary() && $_fullInfo && $this->getIsPlaneMode()): ?> - - - - - getLabelProperties()?>> - displayFullSummary()): ?> -
    __('Tax'); ?>
    - - __('Tax'); ?> - - - getValueProperties()?>>formatPrice($_source->getTaxAmount()) ?> - diff --git a/app/design/frontend/default/default/template/wishlist/email/items.phtml b/app/design/frontend/default/default/template/wishlist/email/items.phtml deleted file mode 100644 index 91fbc64bfd..0000000000 --- a/app/design/frontend/default/default/template/wishlist/email/items.phtml +++ /dev/null @@ -1,54 +0,0 @@ - -getWishlistItemsCount() ?> -
    - - - getWishlistItems() as $item): $i++ ?> - - - - - - - - - - - - - -
    -

    -

    htmlEscape($item->getName()) ?>

    - hasDescription($item)): ?>

    __('Comment') ?>:
    getEscapedDescription($item) ?>

    -

    __('View Product') ?> - getIsSalable()):?>| __('Add to Cart') ?> -

     
    -
    diff --git a/app/design/frontend/default/default/template/wishlist/email/rss.phtml b/app/design/frontend/default/default/template/wishlist/email/rss.phtml deleted file mode 100644 index 2a1b927bad..0000000000 --- a/app/design/frontend/default/default/template/wishlist/email/rss.phtml +++ /dev/null @@ -1,31 +0,0 @@ - -
    -__("RSS link to %s's wishlist",$this->helper('wishlist')->getCustomerName()) ?> -
    -helper('wishlist')->getRssUrl(); ?> -
    diff --git a/app/design/frontend/default/default/template/wishlist/shared.phtml b/app/design/frontend/default/default/template/wishlist/shared.phtml deleted file mode 100644 index 2754f6bb11..0000000000 --- a/app/design/frontend/default/default/template/wishlist/shared.phtml +++ /dev/null @@ -1,77 +0,0 @@ - -
    -

    htmlEscape($this->getHeader()) ?>

    -
    -getMessagesBlock()->getGroupedHtml() ?> -hasWishlistItems()): ?> -
    - - - - - - - - - - - - - getWishlistItems() as $item): ?> - - - - - - - -
    __('Product') ?>__('Comment') ?> 
    -
    - - <?php echo $this->htmlEscape($item->getName()) ?> - -
    - - getPriceHtml($item) ?> -
    getEscapedDescription($item) ?> - isSaleable()): ?> - __('Add to Cart') ?>
    - - __('Add to Wishlist') ?> -
    - - isSaleable()):?> -
    -   -
    - -
    - -

    __('Wishlist is empty now.') ?>

    - diff --git a/app/design/frontend/default/default/template/wishlist/sharing.phtml b/app/design/frontend/default/default/template/wishlist/sharing.phtml deleted file mode 100644 index f8a7d6a069..0000000000 --- a/app/design/frontend/default/default/template/wishlist/sharing.phtml +++ /dev/null @@ -1,80 +0,0 @@ - -
    -

    __('Share Your Wishlist') ?>

    -
    -getMessagesBlock()->getGroupedHtml() ?> -
    -getBlockHtml('formkey')?> -
    -

    __('Sharing Information') ?>

    -
      -
    • -
      - -
    • -
    • -
      - -
    • - helper('wishlist')->isRssAllow()): ?> -
    • - - -
    • - -
    -
    -
    -

    __('* Required Fields') ?>

    - « __('Back')?> - -
    -
    - diff --git a/app/design/frontend/default/default/template/wishlist/sidebar.phtml b/app/design/frontend/default/default/template/wishlist/sidebar.phtml deleted file mode 100644 index 11cfcddf94..0000000000 --- a/app/design/frontend/default/default/template/wishlist/sidebar.phtml +++ /dev/null @@ -1,65 +0,0 @@ - -helper('wishlist')->isAllow()) : ?> -
    -
    -

    __('My Wishlist - %d Item(s)', - $this->helper('wishlist')->getListUrl(), - $this->helper('wishlist')->getItemCount() - ) ?>

    -
    __('Last Added Items') ?>
    -
    - hasWishlistItems()): ?> -
      - getWishlistItems() as $_item): ?> -
    1. -
      - - <?php echo $this->htmlEscape($_item->getName()) ?> - -
      -
      - - <?php echo $this->__('Remove Item') ?> - - htmlEscape($_item->getName()) ?> - getPriceHtml($_item) ?> - isSaleable()): ?> - __('Add to Cart') ?> - -
      -
    2. - -
    - - -

    __('You have no items in your wishlist.') ?>

    - - -
    - diff --git a/app/design/frontend/default/default/template/wishlist/view.phtml b/app/design/frontend/default/default/template/wishlist/view.phtml deleted file mode 100644 index 9895d9628c..0000000000 --- a/app/design/frontend/default/default/template/wishlist/view.phtml +++ /dev/null @@ -1,105 +0,0 @@ - -getMessagesBlock()->getGroupedHtml() ?> -
    - helper('wishlist')->isRssAllow() && $this->hasWishlistItems()): ?> - __('RSS Feed') ?> - -

    __('My Wishlist') ?>

    -
    - -hasWishlistItems()): ?> -
    - getBlockHtml('formkey')?> - - - - - - - - - - - - - - - getWishlistItems() as $item): ?> - - - - - - - - -
    __('Product') ?>__('Comment') ?>__('Added On') ?> 
    -
    <?php echo $this->htmlEscape($item->getName()) ?>
    - - getPriceHtml($item) ?> -
    - - - getFormatedDate($item->getAddedAt()) ?> - - isSaleable()): ?> - __('Add to Cart') ?>
    - - __('Remove Item') ?> -
    - -
    -   - isSaleable()):?> -   - - -
    -
    - -

    __('You have no items in your wishlist.') ?>

    - - - diff --git a/app/design/frontend/default/iphone/etc/widget.xml b/app/design/frontend/default/iphone/etc/widget.xml new file mode 100644 index 0000000000..087d8a6f11 --- /dev/null +++ b/app/design/frontend/default/iphone/etc/widget.xml @@ -0,0 +1,166 @@ + + + + + + + + + + left + + + + content + + + + right + + + + + + + + + + + + left + + + + content + + + + right + + + + + + + + + + + + left + + + + content + + + + right + + + + + diff --git a/app/design/frontend/default/iphone/layout/bundle.xml b/app/design/frontend/default/iphone/layout/bundle.xml index 21a34c6d1c..ef92ab3b81 100644 --- a/app/design/frontend/default/iphone/layout/bundle.xml +++ b/app/design/frontend/default/iphone/layout/bundle.xml @@ -84,6 +84,9 @@ Adding custom product price block bundlebundle/catalog_product_price + + bundlebundle/catalog_product_price + diff --git a/app/design/frontend/default/iphone/layout/catalog.xml b/app/design/frontend/default/iphone/layout/catalog.xml index e6618a8592..b90623ad3f 100644 --- a/app/design/frontend/default/iphone/layout/catalog.xml +++ b/app/design/frontend/default/iphone/layout/catalog.xml @@ -62,7 +62,7 @@ Default layout, loads most of the pages Site Map - + @@ -78,6 +78,7 @@ Category default layout + diff --git a/app/design/frontend/default/iphone/template/ogone/placeform.phtml b/app/design/frontend/default/iphone/template/ogone/placeform.phtml index 712a263bf1..529c170873 100644 --- a/app/design/frontend/default/iphone/template/ogone/placeform.phtml +++ b/app/design/frontend/default/iphone/template/ogone/placeform.phtml @@ -25,7 +25,7 @@ */ ?> -__('Please, wait a moment. This page will transfer you data to ogone payment in few seconds.'); ?> +__('Please, wait a moment. This page will transfer your data to Ogone payment gateway in a few seconds.'); ?>
    getFormData())): ?> getFormData() as $name => $value) { ?> diff --git a/app/design/frontend/default/iphone/template/page/html/pager.phtml b/app/design/frontend/default/iphone/template/page/html/pager.phtml index 6cd0485e62..b550321266 100644 --- a/app/design/frontend/default/iphone/template/page/html/pager.phtml +++ b/app/design/frontend/default/iphone/template/page/html/pager.phtml @@ -24,7 +24,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> -getCollection()->getSize()): ?> + getShowAmounts()): ?> + + getLastPageNum()>1): ?> + getShowPerPage()): ?> @@ -87,7 +87,7 @@ function giftMessageToogle(giftMessageIdentifier) isCustom()): ?> getNumber() ?> - getNumber() ?> + getNumber() ?>, getOrder() ?>

    __('Items Ordered') ?> getTracksCollection()->count()) : ?> - | __('Track your order') ?> + | __('Track your order') ?>

    diff --git a/app/design/frontend/default/iphone/template/sales/reorder/sidebar.phtml b/app/design/frontend/default/iphone/template/sales/reorder/sidebar.phtml index 8d8ed08fdd..cb2d9e235e 100644 --- a/app/design/frontend/default/iphone/template/sales/reorder/sidebar.phtml +++ b/app/design/frontend/default/iphone/template/sales/reorder/sidebar.phtml @@ -31,10 +31,7 @@ * @see Mage_Sales_Block_Reorder_Sidebar */ ?> - - getLastOrder()): ?> -
    @@ -42,16 +39,13 @@ __('View All'); ?>

    __('Last ordered items') ?>
    -
      - - - getRandomItemCollection($_order) as $_item): ?> - getIsShowItem($_item)): ?> +
        + + getItemsRandomCollection(5) as $_item): ?>
      1. -
        - getProduct()->getStockItem()->getIsInStock()): ?> - + isItemAvailableForReorder($_item)): ?> +
        @@ -59,7 +53,6 @@ getItemProductName($_item) ?>
    - @@ -70,11 +63,9 @@ getPagerHtml(); ?> - diff --git a/app/design/frontend/default/iphone/template/sendfriend/send.phtml b/app/design/frontend/default/iphone/template/sendfriend/send.phtml index cecb57e875..a79bae8602 100644 --- a/app/design/frontend/default/iphone/template/sendfriend/send.phtml +++ b/app/design/frontend/default/iphone/template/sendfriend/send.phtml @@ -127,7 +127,7 @@
    - +
    diff --git a/app/design/frontend/default/iphone/template/wishlist/sidebar.phtml b/app/design/frontend/default/iphone/template/wishlist/sidebar.phtml index ff6944c7bc..85fcef4ae8 100644 --- a/app/design/frontend/default/iphone/template/wishlist/sidebar.phtml +++ b/app/design/frontend/default/iphone/template/wishlist/sidebar.phtml @@ -48,7 +48,7 @@ <?php echo $this->__('Remove Item') ?>htmlEscape($_item->getName()) ?> - helper('catalog/product')->getPriceHtml($_item) ?> + helper('catalog/product')->getPriceHtml($_item, false, '-wishlist') ?> isSaleable()): ?> __('Add to Cart') ?> diff --git a/app/design/frontend/default/modern/etc/widget.xml b/app/design/frontend/default/modern/etc/widget.xml new file mode 100644 index 0000000000..087d8a6f11 --- /dev/null +++ b/app/design/frontend/default/modern/etc/widget.xml @@ -0,0 +1,166 @@ + + + + + + + + + + left + + + + content + + + + right + + + + + + + + + + + + left + + + + content + + + + right + + + + + + + + + + + + left + + + + content + + + + right + + + + + diff --git a/app/design/frontend/default/modern/layout/bundle.xml b/app/design/frontend/default/modern/layout/bundle.xml index a0611e7da8..583c7a8a9d 100644 --- a/app/design/frontend/default/modern/layout/bundle.xml +++ b/app/design/frontend/default/modern/layout/bundle.xml @@ -73,7 +73,7 @@ Adding custom product price block bundlebundle/catalog_product_price - + bundlebundle/catalog_product_price @@ -84,6 +84,9 @@ Adding custom product price block bundlebundle/catalog_product_price + + bundlebundle/catalog_product_price + @@ -186,7 +189,8 @@ Onepage Checkout Review Page Additional block for bundle product type --> - + + skin_jsjs/bundle.js @@ -294,4 +298,22 @@ Emails + + + + bundlebundle/catalog_product_price + + + + + bundlebundle/catalog_product_price + + + + + bundlebundle/catalog_product_price + + diff --git a/app/design/frontend/default/modern/layout/catalog.xml b/app/design/frontend/default/modern/layout/catalog.xml index 81e236e813..1c10516775 100644 --- a/app/design/frontend/default/modern/layout/catalog.xml +++ b/app/design/frontend/default/modern/layout/catalog.xml @@ -64,6 +64,7 @@ Default layout, loads most of the pages Site Map + @@ -71,7 +72,8 @@ Default layout, loads most of the pages Category default layout --> - + + @@ -82,6 +84,7 @@ Category default layout + - + + @@ -118,6 +122,7 @@ Category layered navigation layout + @@ -150,7 +156,8 @@ Category layered navigation layout Compare products page --> - + + @@ -175,7 +182,8 @@ Compare products page Product view --> - + + @@ -189,7 +197,9 @@ Product view - + + + @@ -202,7 +212,8 @@ Product view - + + textcatalog/product_view_options_type_text @@ -212,7 +223,8 @@ Product view - + + product.tierprices product.info.addtocart @@ -246,12 +258,14 @@ Product view - + + - + + @@ -259,24 +273,25 @@ Additional block dependant on product type - + + - + - + + - - - + + @@ -293,7 +308,8 @@ Product send to friend Product additional images gallery popup --> - + + @@ -307,7 +323,8 @@ Product additional images gallery popup SEO Site Map --> - + + @@ -321,7 +338,8 @@ SEO Site Map - + + Categories @@ -336,7 +354,8 @@ SEO Site Map - + + @@ -350,7 +369,8 @@ SEO Site Map - + + Products @@ -370,7 +390,8 @@ SEO Site Map Catalog search terms block --> - + + diff --git a/app/design/frontend/default/modern/layout/catalogsearch.xml b/app/design/frontend/default/modern/layout/catalogsearch.xml index 139d5ce656..0bbd2f5602 100644 --- a/app/design/frontend/default/modern/layout/catalogsearch.xml +++ b/app/design/frontend/default/modern/layout/catalogsearch.xml @@ -38,7 +38,8 @@ - + + @@ -59,7 +60,8 @@ - + + @@ -96,7 +98,8 @@ Advanced search results - + + diff --git a/app/design/frontend/default/modern/layout/checkout.xml b/app/design/frontend/default/modern/layout/checkout.xml index 6d5dcae9a7..c5cb6d89b2 100644 --- a/app/design/frontend/default/modern/layout/checkout.xml +++ b/app/design/frontend/default/modern/layout/checkout.xml @@ -54,7 +54,8 @@ Default layout, loads most of the pages - + + @@ -69,11 +70,13 @@ Default layout, loads most of the pages groupedcheckout/cart_item_renderer_grouped configurablecheckout/cart_item_renderer_configurable - + + - + + @@ -92,7 +95,8 @@ Multi address shipping checkout main layout, will be rendered on all checkout pages --> - + + @@ -116,7 +120,8 @@ will be rendered on all checkout pages Multi address shipping checkout selection of address per item page --> - + + @@ -124,7 +129,8 @@ Multi address shipping checkout selection of address per item page - + + @@ -133,17 +139,20 @@ Multi address shipping checkout selection of address per item page - + + - + + - + + @@ -153,12 +162,14 @@ Multi address shipping checkout selection of address per item page - + + - + + @@ -168,7 +179,8 @@ Multi address shipping checkout selection of address per item page Multi address shipping checkout address page --> - + + @@ -184,7 +196,8 @@ Multi address shipping checkout address page Multi address shipping checkout shipping information --> - + + @@ -206,7 +219,8 @@ Multi address shipping checkout shipping information Multi address shipping checkout billing information --> - + + @@ -227,7 +241,8 @@ Multi address shipping checkout billing information Multi address shipping checkout overview --> - + + @@ -248,7 +263,8 @@ Multi address shipping checkout overview Multi address shipping checkout success --> - + + @@ -260,7 +276,8 @@ Multi address shipping checkout success One page checkout main layout --> - + + @@ -358,7 +375,8 @@ One page checkout order review block - + + @@ -366,7 +384,8 @@ One page checkout order review block - + + diff --git a/app/design/frontend/default/modern/layout/cms.xml b/app/design/frontend/default/modern/layout/cms.xml index 46fac815c5..1e4e1b0315 100644 --- a/app/design/frontend/default/modern/layout/cms.xml +++ b/app/design/frontend/default/modern/layout/cms.xml @@ -42,12 +42,18 @@ Default layout, loads most of the pages - + + + + + + + @@ -59,6 +65,10 @@ Default layout, loads most of the pages + + + + diff --git a/app/design/frontend/default/modern/layout/contacts.xml b/app/design/frontend/default/modern/layout/contacts.xml index c50b15437d..679b41753b 100644 --- a/app/design/frontend/default/modern/layout/contacts.xml +++ b/app/design/frontend/default/modern/layout/contacts.xml @@ -32,7 +32,8 @@ - + + Contact Us diff --git a/app/design/frontend/default/modern/layout/customer.xml b/app/design/frontend/default/modern/layout/customer.xml index f6c1d98d26..26dfaa6bec 100644 --- a/app/design/frontend/default/modern/layout/customer.xml +++ b/app/design/frontend/default/modern/layout/customer.xml @@ -79,7 +79,8 @@ Load this update on every page when customer is logged out Layout for customer login page --> - + + @@ -94,7 +95,8 @@ Layout for customer login page Layout for customer log out page --> - + + @@ -109,7 +111,8 @@ Layout for customer log out page New customer registration --> - + + @@ -124,7 +127,8 @@ New customer registration - + + @@ -149,7 +153,8 @@ New customer registration - + + Edit Account Info @@ -163,7 +168,8 @@ New customer registration Customer account pages, rendered for all tabs in dashboard --> - + + @@ -186,7 +192,8 @@ Customer account pages, rendered for all tabs in dashboard Customer account home dashboard layout --> - + + @@ -210,7 +217,8 @@ Customer account home dashboard layout Customer account address book --> - + + @@ -222,7 +230,8 @@ Customer account address book Customer account address edit page --> - + + diff --git a/app/design/frontend/default/modern/layout/downloadable.xml b/app/design/frontend/default/modern/layout/downloadable.xml index 095b0d4743..dfa1d6ec01 100644 --- a/app/design/frontend/default/modern/layout/downloadable.xml +++ b/app/design/frontend/default/modern/layout/downloadable.xml @@ -34,7 +34,8 @@ - + + @@ -152,7 +153,8 @@ Emails - + + diff --git a/app/design/frontend/default/modern/layout/giftmessage.xml b/app/design/frontend/default/modern/layout/giftmessage.xml index 1dbdc32759..cc8dde9468 100644 --- a/app/design/frontend/default/modern/layout/giftmessage.xml +++ b/app/design/frontend/default/modern/layout/giftmessage.xml @@ -31,7 +31,8 @@ - + + @@ -43,7 +44,8 @@ Gift message add/edit form - + + @@ -57,7 +59,8 @@ Gift message save result - + + diff --git a/app/design/frontend/default/modern/layout/newsletter.xml b/app/design/frontend/default/modern/layout/newsletter.xml index ae6c40077d..7639b8f6c2 100644 --- a/app/design/frontend/default/modern/layout/newsletter.xml +++ b/app/design/frontend/default/modern/layout/newsletter.xml @@ -55,7 +55,8 @@ Customer account pages, rendered for all tabs in dashboard - + + diff --git a/app/design/frontend/default/modern/layout/ogone.xml b/app/design/frontend/default/modern/layout/ogone.xml index 1e6e9e4faf..74998592cd 100644 --- a/app/design/frontend/default/modern/layout/ogone.xml +++ b/app/design/frontend/default/modern/layout/ogone.xml @@ -29,6 +29,18 @@ + + + + + + + + + + + + diff --git a/app/design/frontend/default/modern/layout/page.xml b/app/design/frontend/default/modern/layout/page.xml index 23d30fcbec..ef3d45a9eb 100644 --- a/app/design/frontend/default/modern/layout/page.xml +++ b/app/design/frontend/default/modern/layout/page.xml @@ -30,7 +30,8 @@ Default layout, loads most of the pages --> - + + @@ -66,20 +67,33 @@ Default layout, loads most of the pages + + + - + + + - + + + + + + + - + + + @@ -92,7 +106,8 @@ Default layout, loads most of the pages - + + @@ -116,13 +131,16 @@ Default layout, loads most of the pages css/print.cssmedia="print" - + + + - - + + + @@ -130,7 +148,8 @@ Default layout, loads most of the pages - + + @@ -138,7 +157,8 @@ Default layout, loads most of the pages - + + @@ -146,7 +166,8 @@ Default layout, loads most of the pages - + + @@ -154,7 +175,8 @@ Default layout, loads most of the pages - + + diff --git a/app/design/frontend/default/modern/layout/paypal.xml b/app/design/frontend/default/modern/layout/paypal.xml deleted file mode 100644 index 933c34fb12..0000000000 --- a/app/design/frontend/default/modern/layout/paypal.xml +++ /dev/null @@ -1,69 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/app/design/frontend/default/modern/layout/paypaluk.xml b/app/design/frontend/default/modern/layout/paypaluk.xml deleted file mode 100644 index 1f7c880f7b..0000000000 --- a/app/design/frontend/default/modern/layout/paypaluk.xml +++ /dev/null @@ -1,69 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/app/design/frontend/default/modern/layout/review.xml b/app/design/frontend/default/modern/layout/review.xml index c284991dbe..cea19ed863 100644 --- a/app/design/frontend/default/modern/layout/review.xml +++ b/app/design/frontend/default/modern/layout/review.xml @@ -66,8 +66,8 @@ Product reviews page (?) Product reviews page --> - - + + @@ -92,7 +92,8 @@ Product reviews page - + + @@ -101,14 +102,16 @@ Product reviews page - + + - + + diff --git a/app/design/frontend/default/modern/layout/rss.xml b/app/design/frontend/default/modern/layout/rss.xml index a05d53ab4d..43e2ee3bc1 100644 --- a/app/design/frontend/default/modern/layout/rss.xml +++ b/app/design/frontend/default/modern/layout/rss.xml @@ -34,7 +34,8 @@ - + + diff --git a/app/design/frontend/default/modern/layout/sales.xml b/app/design/frontend/default/modern/layout/sales.xml index 8b78afbc6c..1a507b05f7 100644 --- a/app/design/frontend/default/modern/layout/sales.xml +++ b/app/design/frontend/default/modern/layout/sales.xml @@ -68,7 +68,8 @@ Customer account home dashboard layout - + + @@ -77,13 +78,15 @@ Customer account home dashboard layout - + + defaultsales/order_item_renderer_default + groupedsales/order_item_renderer_grouped colspan="4" class="a-right" class="last a-right" @@ -100,13 +103,15 @@ Customer account home dashboard layout - + + defaultsales/order_item_renderer_default + groupedsales/order_item_renderer_grouped colspan="4" class="a-right" class="last a-right" @@ -123,7 +128,8 @@ Customer account home dashboard layout - + + @@ -141,13 +147,15 @@ Customer account home dashboard layout - + + defaultsales/order_item_renderer_default + groupedsales/order_item_renderer_grouped colspan="6" align="right" style="padding:3px 9px" align="right" style="padding:3px 9px" @@ -171,10 +179,12 @@ Customer account home dashboard layout - + + defaultsales/order_item_renderer_default + groupedsales/order_item_renderer_grouped colspan="4" class="a-right" class="last a-right" @@ -186,10 +196,12 @@ Customer account home dashboard layout - + + defaultsales/order_item_renderer_default + groupedsales/order_item_renderer_grouped colspan="4" class="a-right" class="last a-right" @@ -199,7 +211,8 @@ Customer account home dashboard layout - + + defaultsales/order_item_renderer_default @@ -211,6 +224,7 @@ Customer account home dashboard layout defaultsales/order_item_renderer_default + groupedsales/order_item_renderer_grouped colspan="6" align="right" style="padding:3px 9px" align="right" style="padding:3px 9px" @@ -226,6 +240,7 @@ Email layouts section defaultsales/order_email_items_order_default + groupedsales/order_email_items_order_grouped colspan="3" align="right" style="padding:3px 9px" align="right" style="padding:3px 9px" @@ -239,6 +254,7 @@ Email layouts section defaultsales/order_email_items_default + groupedsales/order_email_items_order_grouped colspan="3" align="right" style="padding:3px 9px" align="right" style="padding:3px 9px" @@ -256,6 +272,7 @@ Email layouts section defaultsales/order_email_items_default + groupedsales/order_email_items_order_grouped colspan="3" align="right" style="padding:3px 9px" align="right" style="padding:3px 9px" diff --git a/app/design/frontend/default/modern/layout/sendfriend.xml b/app/design/frontend/default/modern/layout/sendfriend.xml index c333730301..2af55304e2 100644 --- a/app/design/frontend/default/modern/layout/sendfriend.xml +++ b/app/design/frontend/default/modern/layout/sendfriend.xml @@ -26,7 +26,8 @@ */ --> - + + diff --git a/app/design/frontend/default/modern/layout/shipping.xml b/app/design/frontend/default/modern/layout/shipping.xml index d109d8e08c..c8520fcdc8 100644 --- a/app/design/frontend/default/modern/layout/shipping.xml +++ b/app/design/frontend/default/modern/layout/shipping.xml @@ -36,7 +36,8 @@ - + + diff --git a/app/design/frontend/default/modern/layout/tag.xml b/app/design/frontend/default/modern/layout/tag.xml index 9c7cb6ecdb..e7261ac238 100644 --- a/app/design/frontend/default/modern/layout/tag.xml +++ b/app/design/frontend/default/modern/layout/tag.xml @@ -79,7 +79,8 @@ Customer account home dashboard layout All tags page --> - + + @@ -89,7 +90,8 @@ All tags page - + + @@ -101,7 +103,8 @@ All tags page - + + My Account @@ -111,7 +114,8 @@ All tags page - + + My Account diff --git a/app/design/frontend/default/modern/layout/wishlist.xml b/app/design/frontend/default/modern/layout/wishlist.xml index 1b6b7a8b43..d801a1c857 100644 --- a/app/design/frontend/default/modern/layout/wishlist.xml +++ b/app/design/frontend/default/modern/layout/wishlist.xml @@ -69,7 +69,8 @@ Customer account home dashboard layout Wishlist pages --> - + + @@ -80,7 +81,8 @@ Wishlist pages - + + @@ -91,7 +93,8 @@ Wishlist pages - + + diff --git a/app/design/frontend/default/modern/template/amazonpayments/asp/form.phtml b/app/design/frontend/default/modern/template/amazonpayments/asp/form.phtml index 23856aa01d..fdbed836cf 100644 --- a/app/design/frontend/default/modern/template/amazonpayments/asp/form.phtml +++ b/app/design/frontend/default/modern/template/amazonpayments/asp/form.phtml @@ -29,7 +29,7 @@ $_code=$this->getMethodCode() ?> diff --git a/app/design/frontend/default/modern/template/amazonpayments/asp/redirect.phtml b/app/design/frontend/default/modern/template/amazonpayments/asp/redirect.phtml index 08fab1a2eb..ff6eca296e 100644 --- a/app/design/frontend/default/modern/template/amazonpayments/asp/redirect.phtml +++ b/app/design/frontend/default/modern/template/amazonpayments/asp/redirect.phtml @@ -26,7 +26,7 @@ ?> - __('You will be redirected to Amazon Simple Pay in a few seconds.')); ?> + getRedirectMessage()); ?>
    getRedirectParams() as $name => $value) { ?> diff --git a/app/design/frontend/default/modern/template/catalog/category/widget/link/link_block.phtml b/app/design/frontend/default/modern/template/catalog/category/widget/link/link_block.phtml deleted file mode 100644 index 021c7484e4..0000000000 --- a/app/design/frontend/default/modern/template/catalog/category/widget/link/link_block.phtml +++ /dev/null @@ -1,27 +0,0 @@ - -getLinkAttributes() ?>>htmlEscape($this->getAnchorText()) ?> diff --git a/app/design/frontend/default/modern/template/catalog/category/widget/link/link_inline.phtml b/app/design/frontend/default/modern/template/catalog/category/widget/link/link_inline.phtml deleted file mode 100644 index 5783e4b23d..0000000000 --- a/app/design/frontend/default/modern/template/catalog/category/widget/link/link_inline.phtml +++ /dev/null @@ -1,27 +0,0 @@ - -getLinkAttributes() ?>>htmlEscape($this->getAnchorText()) ?> diff --git a/app/design/frontend/default/modern/template/catalog/layer/filter.phtml b/app/design/frontend/default/modern/template/catalog/layer/filter.phtml index 57b5fa1c30..5a041521ca 100644 --- a/app/design/frontend/default/modern/template/catalog/layer/filter.phtml +++ b/app/design/frontend/default/modern/template/catalog/layer/filter.phtml @@ -35,7 +35,10 @@
      getItems() as $_item): ?>
    1. + getCount() > 0): ?> getLabel() ?> + getLabel() ?> + (getCount() ?>)
    2. diff --git a/app/design/frontend/default/modern/template/catalog/product/list/related.phtml b/app/design/frontend/default/modern/template/catalog/product/list/related.phtml index b38d5f79a1..9fa6e21d49 100644 --- a/app/design/frontend/default/modern/template/catalog/product/list/related.phtml +++ b/app/design/frontend/default/modern/template/catalog/product/list/related.phtml @@ -47,7 +47,7 @@
      htmlEscape($_item->getName()) ?> - getPriceHtml($_item, true) ?> + getPriceHtml($_item, true, '-related') ?> helper('wishlist')->isAllow()) : ?> __('Add to Wishlist') ?> diff --git a/app/design/frontend/default/modern/template/catalog/product/list/toolbar.phtml b/app/design/frontend/default/modern/template/catalog/product/list/toolbar.phtml index 6863305dc8..985d6e4c0b 100644 --- a/app/design/frontend/default/modern/template/catalog/product/list/toolbar.phtml +++ b/app/design/frontend/default/modern/template/catalog/product/list/toolbar.phtml @@ -41,28 +41,9 @@ __('%s Item(s)', $this->getTotalNum()) ?> - getLastPageNum()>1): ?> + getPagerHtml()): ?>
    diff --git a/app/design/frontend/default/modern/template/catalog/product/widget/link/link_block.phtml b/app/design/frontend/default/modern/template/catalog/product/widget/link/link_block.phtml deleted file mode 100644 index 2a7a05e2b0..0000000000 --- a/app/design/frontend/default/modern/template/catalog/product/widget/link/link_block.phtml +++ /dev/null @@ -1,27 +0,0 @@ - -getLinkAttributes() ?>>htmlEscape($this->getAnchorText()) ?> diff --git a/app/design/frontend/default/modern/template/catalog/product/widget/link/link_inline.phtml b/app/design/frontend/default/modern/template/catalog/product/widget/link/link_inline.phtml deleted file mode 100644 index abd6014ea9..0000000000 --- a/app/design/frontend/default/modern/template/catalog/product/widget/link/link_inline.phtml +++ /dev/null @@ -1,27 +0,0 @@ - -getLinkAttributes() ?>>htmlEscape($this->getAnchorText()) ?> diff --git a/app/design/frontend/default/modern/template/catalog/product/widget/new/content/new_grid.phtml b/app/design/frontend/default/modern/template/catalog/product/widget/new/content/new_grid.phtml deleted file mode 100644 index adf34a2a3e..0000000000 --- a/app/design/frontend/default/modern/template/catalog/product/widget/new/content/new_grid.phtml +++ /dev/null @@ -1,66 +0,0 @@ - -getProductCollection()) && $_products->getSize()): ?> -
    -
    -

    __('New Products') ?>

    -
    -
    - getItems() as $_product): ?> - - - - -
    -
    - diff --git a/app/design/frontend/default/modern/template/catalog/product/widget/new/content/new_list.phtml b/app/design/frontend/default/modern/template/catalog/product/widget/new/content/new_list.phtml deleted file mode 100644 index 8e692f3207..0000000000 --- a/app/design/frontend/default/modern/template/catalog/product/widget/new/content/new_list.phtml +++ /dev/null @@ -1,66 +0,0 @@ - -getProductCollection()) && $_products->getSize()): ?> -
    -
    -

    __('New Products') ?>

    -
    -
    -
      - getItems() as $_product): ?> -
    1. - <?php echo $this->htmlEscape($_product->getName()) ?> -
      -
      -

      htmlEscape($_product->getName()) ?>

      - getReviewsSummaryHtml($_product, 'short') ?> - getPriceHtml($_product, true, '-widget-new-list') ?> - isSaleable()): ?> - - - getIsInStock()): ?> -

      __('In stock') ?>

      - -

      __('Out of stock') ?>

      - - - -
      -
      -
    2. - -
    -
    -
    - diff --git a/app/design/frontend/default/modern/template/checkout/cart/sidebar/default.phtml b/app/design/frontend/default/modern/template/checkout/cart/sidebar/default.phtml index e5a6835cc5..1aca59e8b4 100644 --- a/app/design/frontend/default/modern/template/checkout/cart/sidebar/default.phtml +++ b/app/design/frontend/default/modern/template/checkout/cart/sidebar/default.phtml @@ -31,7 +31,7 @@
    <?php echo $this->__('Remove Product') ?> - getProductName() ?>
    + htmlEscape($this->getProductName()) ?>
    getQty() ?> x diff --git a/app/design/frontend/default/modern/template/checkout/onepage/billing.phtml b/app/design/frontend/default/modern/template/checkout/onepage/billing.phtml index c53f75b425..a5b551a5e6 100644 --- a/app/design/frontend/default/modern/template/checkout/onepage/billing.phtml +++ b/app/design/frontend/default/modern/template/checkout/onepage/billing.phtml @@ -102,7 +102,7 @@

    -
    + isCustomerLoggedIn() && $this->customerHasAddresses()):?>
  • getAddress()->getSaveInAddressBook()):?> checked="checked" />
  • diff --git a/app/design/frontend/default/modern/template/checkout/onepage/login.phtml b/app/design/frontend/default/modern/template/checkout/onepage/login.phtml index e097487952..893db40348 100644 --- a/app/design/frontend/default/modern/template/checkout/onepage/login.phtml +++ b/app/design/frontend/default/modern/template/checkout/onepage/login.phtml @@ -42,12 +42,12 @@
      getQuote()->isAllowedGuestCheckout() ): ?>
    • - getQuote()->getCheckoutMethod()==Mage_Sales_Model_Quote::CHECKOUT_METHOD_GUEST): ?> checked="checked"/> + getQuote()->getCheckoutMethod()==Mage_Checkout_Model_Type_Onepage::METHOD_GUEST): ?> checked="checked"/>
    • - getQuote()->getCheckoutMethod()==Mage_Sales_Model_Quote::CHECKOUT_METHOD_REGISTER || !$this->getQuote()->isAllowedGuestCheckout()): ?> checked="checked"/> + getQuote()->getCheckoutMethod()==Mage_Checkout_Model_Type_Onepage::METHOD_REGISTER || !$this->getQuote()->isAllowedGuestCheckout()): ?> checked="checked"/>
    diff --git a/app/design/frontend/default/modern/template/cms/content_heading.phtml b/app/design/frontend/default/modern/template/cms/content_heading.phtml new file mode 100644 index 0000000000..e550bbc588 --- /dev/null +++ b/app/design/frontend/default/modern/template/cms/content_heading.phtml @@ -0,0 +1,27 @@ + +

    getContentHeading(); ?>

    diff --git a/app/design/frontend/default/modern/template/cms/widget/link/link_block.phtml b/app/design/frontend/default/modern/template/cms/widget/link/link_block.phtml deleted file mode 100644 index bb9803d4d6..0000000000 --- a/app/design/frontend/default/modern/template/cms/widget/link/link_block.phtml +++ /dev/null @@ -1,27 +0,0 @@ - -getLinkAttributes() ?>>htmlEscape($this->getAnchorText()) ?> diff --git a/app/design/frontend/default/modern/template/cms/widget/link/link_inline.phtml b/app/design/frontend/default/modern/template/cms/widget/link/link_inline.phtml deleted file mode 100644 index 66e8e0be5b..0000000000 --- a/app/design/frontend/default/modern/template/cms/widget/link/link_inline.phtml +++ /dev/null @@ -1,27 +0,0 @@ - -getLinkAttributes() ?>>htmlEscape($this->getAnchorText()) ?> diff --git a/app/design/frontend/default/modern/template/cms/widget/static_block/default.phtml b/app/design/frontend/default/modern/template/cms/widget/static_block/default.phtml deleted file mode 100644 index 6c86ead5ca..0000000000 --- a/app/design/frontend/default/modern/template/cms/widget/static_block/default.phtml +++ /dev/null @@ -1,27 +0,0 @@ - -
    getText(); ?>
    diff --git a/app/design/frontend/default/modern/template/contacts/form.phtml b/app/design/frontend/default/modern/template/contacts/form.phtml index 4ca16bb729..ee9c09b7f5 100644 --- a/app/design/frontend/default/modern/template/contacts/form.phtml +++ b/app/design/frontend/default/modern/template/contacts/form.phtml @@ -67,6 +67,7 @@

    __('* Required Fields') ?>

    +
    diff --git a/app/design/frontend/default/modern/template/customer/account/dashboard/address.phtml b/app/design/frontend/default/modern/template/customer/account/dashboard/address.phtml index 20fd02a0c8..cc1d48e24b 100644 --- a/app/design/frontend/default/modern/template/customer/account/dashboard/address.phtml +++ b/app/design/frontend/default/modern/template/customer/account/dashboard/address.phtml @@ -31,14 +31,14 @@
    -
    __('Primary Billing Address') ?>
    +
    __('Default Billing Address') ?>
    getPrimaryBillingAddressHtml() ?>
    __('Edit Address') ?>
    -
    __('Primary Shipping Address') ?>
    +
    __('Default Shipping Address') ?>
    getPrimaryShippingAddressHtml() ?>
    __('Edit Address') ?> diff --git a/app/design/frontend/default/modern/template/customer/address.phtml b/app/design/frontend/default/modern/template/customer/address.phtml index 55035dc6c1..01c3824d08 100644 --- a/app/design/frontend/default/modern/template/customer/address.phtml +++ b/app/design/frontend/default/modern/template/customer/address.phtml @@ -28,7 +28,7 @@ getMessagesBlock()->getGroupedHtml() ?>
    - getLastPageNum()>1): ?> - __('Items %s to %s of %s total', $this->getFirstNum(), $this->getLastNum(), $this->getTotalNum()) ?> - - __('%s Item(s)', $this->getTotalNum()) ?> - + getLastPageNum()>1): ?> + __('Items %s to %s of %s total', $this->getFirstNum(), $this->getLastNum(), $this->getTotalNum()) ?> + + __('%s Item(s)', $this->getTotalNum()) ?> + __('Page:') ?>
      isFirstPage()): ?>
    1. - <?php echo $this->__('Previous Page') ?> +
    2. - - getPages() as $_page): ?> + + + canShowFirst()): ?> +
    3. 1
    4. + + + canShowPreviousJump()): ?> +
    5. ...
    6. + + + getFramePages() as $_page): ?> isPageCurrent($_page)): ?> -
    7. +
    8. - - + + + + + canShowNextJump()): ?> +
    9. ...
    10. + + + canShowLast()): ?> +
    11. getLastPageNum() ?>
    12. + + isLastPage()): ?>
    13. - <?php echo $this->__('Next Page') ?> +
    14. - +
    __('Show') ?> @@ -50,12 +54,21 @@ + getTotals()): ?> - getTotals() as $_total): ?> + helper('tax')->displayCartBothPrices() ? 5 : 3; ?> + renderTotals(null, $_colspan); ?> + renderTotals('footer', $_colspan); ?> + needDisplayBaseGrandtotal()):?> - - + + - + +
    getTitle() ?>helper('checkout')->formatPrice($_total->getValue()) ?> + helper('sales')->__('Your credit card will be charged for') ?> + + displayBaseGrandtotal() ?> +
    diff --git a/app/design/frontend/default/iphone/template/paypaluk/express/review/details.phtml b/app/design/frontend/default/iphone/template/paypaluk/express/review/details.phtml index a7e03611bf..95dd56f40e 100644 --- a/app/design/frontend/default/iphone/template/paypaluk/express/review/details.phtml +++ b/app/design/frontend/default/iphone/template/paypaluk/express/review/details.phtml @@ -23,6 +23,10 @@ * @copyright Copyright (c) 2009 Irubin Consulting Inc. DBA Varien (http://www.varien.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ + +/** + * @see Mage_PaypalUk_Block_Express_Review_Details + */ ?> @@ -50,12 +54,21 @@ + getTotals()): ?> - getTotals() as $_total): ?> + helper('tax')->displayCartBothPrices() ? 5 : 3; ?> + renderTotals(null, $_colspan); ?> + renderTotals('footer', $_colspan); ?> + needDisplayBaseGrandtotal()):?> - - + + - + +
    getTitle() ?>helper('checkout')->formatPrice($_total->getValue()) ?> + helper('sales')->__('Your credit card will be charged for') ?> + + displayBaseGrandtotal() ?> +
    diff --git a/app/design/frontend/default/iphone/template/reports/widget/compared/content/compared_grid.phtml b/app/design/frontend/default/iphone/template/reports/widget/compared/content/compared_grid.phtml deleted file mode 100644 index 1d91e3b276..0000000000 --- a/app/design/frontend/default/iphone/template/reports/widget/compared/content/compared_grid.phtml +++ /dev/null @@ -1,69 +0,0 @@ - -getRecentlyComparedProducts()): ?> -
    -
    -

    __('Your Recently Compared') ?>

    -
    -
    - getColumnCount(); ?> - - -
      - -
    • - <?php echo $this->htmlEscape($_product->getName()) ?> -

      htmlEscape($_product->getName()) ?>

      - getReviewsSummaryHtml($_product, 'short') ?> - getPriceHtml($_product, true, '-widget-compared-grid') ?> -
      - isSaleable()): ?> - - - getIsSalable()): ?> -

      __('In stock') ?>

      - -

      __('Out of stock') ?>

      - - - -
      -
    • - -
    - - -
    -
    - diff --git a/app/design/frontend/default/iphone/template/reports/widget/compared/content/compared_list.phtml b/app/design/frontend/default/iphone/template/reports/widget/compared/content/compared_list.phtml deleted file mode 100644 index ad16a8ae6d..0000000000 --- a/app/design/frontend/default/iphone/template/reports/widget/compared/content/compared_list.phtml +++ /dev/null @@ -1,66 +0,0 @@ - -getRecentlyComparedProducts()): ?> -
    -
    -

    __('Your Recently Compared') ?>

    -
    -
    -
      - -
    1. - <?php echo $this->htmlEscape($_product->getName()) ?> -
      -
      -

      htmlEscape($_product->getName()) ?>

      - getReviewsSummaryHtml($_product, 'short') ?> - getPriceHtml($_product, true, '-widget-compared-list') ?> - isSaleable()): ?> - - - getIsSalable()): ?> -

      __('In stock') ?>

      - -

      __('Out of stock') ?>

      - - - -
      -
      -
    2. - -
    -
    -
    - diff --git a/app/design/frontend/default/iphone/template/reports/widget/viewed/content/viewed_grid.phtml b/app/design/frontend/default/iphone/template/reports/widget/viewed/content/viewed_grid.phtml deleted file mode 100644 index 78978e7947..0000000000 --- a/app/design/frontend/default/iphone/template/reports/widget/viewed/content/viewed_grid.phtml +++ /dev/null @@ -1,74 +0,0 @@ - - -getRecentlyViewedProducts()): ?> -
    -
    -

    __('Your Recently Viewed') ?>

    -
    -
    - getColumnCount(); ?> - - -
      - -
    • - <?php echo $this->htmlEscape($_product->getName()) ?> -

      htmlEscape($_product->getName()) ?>

      - getReviewsSummaryHtml($_product, 'short') ?> - getPriceHtml($_product, true, '-widget-viewed-grid') ?> -
      - isSaleable()): ?> - - - getIsSalable()): ?> -

      __('In stock') ?>

      - -

      __('Out of stock') ?>

      - - - -
      -
    • - -
    - - -
    -
    - diff --git a/app/design/frontend/default/iphone/template/reports/widget/viewed/content/viewed_list.phtml b/app/design/frontend/default/iphone/template/reports/widget/viewed/content/viewed_list.phtml deleted file mode 100644 index 4f8ba265dc..0000000000 --- a/app/design/frontend/default/iphone/template/reports/widget/viewed/content/viewed_list.phtml +++ /dev/null @@ -1,71 +0,0 @@ - - -getRecentlyViewedProducts()): ?> -
    -
    -

    __('Your Recently Viewed') ?>

    -
    -
    -
      - -
    1. - <?php echo $this->htmlEscape($_product->getName()) ?> -
      -
      -

      htmlEscape($_product->getName()) ?>

      - getReviewsSummaryHtml($_product, 'short') ?> - getPriceHtml($_product, true, '-widget-viewed-list') ?> - isSaleable()): ?> - - - getIsSalable()): ?> -

      __('In stock') ?>

      - -

      __('Out of stock') ?>

      - - - -
      -
      -
    2. - -
    -
    -
    - diff --git a/app/design/frontend/default/iphone/template/rss/list.phtml b/app/design/frontend/default/iphone/template/rss/list.phtml index 0f4f23be34..c7e2e37e66 100644 --- a/app/design/frontend/default/iphone/template/rss/list.phtml +++ b/app/design/frontend/default/iphone/template/rss/list.phtml @@ -33,7 +33,7 @@ $_misc = $this->getRssMiscFeeds(); ?> - + diff --git a/app/design/frontend/default/iphone/template/sales/order/print/shipment.phtml b/app/design/frontend/default/iphone/template/sales/order/print/shipment.phtml index f365b36eb0..d9cb52a5b8 100644 --- a/app/design/frontend/default/iphone/template/sales/order/print/shipment.phtml +++ b/app/design/frontend/default/iphone/template/sales/order/print/shipment.phtml @@ -59,6 +59,26 @@

    __('Shipping Method') ?>

    getShippingDescription() ?> + getTracksCollection()) > 0): ?> +
    Miscellaneous Feeds
    __('Miscellaneous Feeds') ?>
    + + + + + + + + + + getTracksCollection() as $track): ?> + + + + + + +
    __('Title')?>__('Number')?>
    getTitle() ?>getNumber() ?>
    +

    __('Payment Method') ?>

    diff --git a/app/design/frontend/default/iphone/template/sales/order/shipment.phtml b/app/design/frontend/default/iphone/template/sales/order/shipment.phtml index 7fd316a8bf..d8f6c6fed5 100644 --- a/app/design/frontend/default/iphone/template/sales/order/shipment.phtml +++ b/app/design/frontend/default/iphone/template/sales/order/shipment.phtml @@ -58,7 +58,7 @@ function giftMessageToogle(giftMessageIdentifier) getOrder() ?> getTracksCollection()->count()) : ?> __('Print All Shipments') ?> @@ -74,7 +74,7 @@ function giftMessageToogle(giftMessageIdentifier) count()): ?>
    - __('Track this shipment') ?> + __('Track this shipment') ?>
    - __('Page:') ?> -
      - isFirstPage()): ?> -
    1. - <?php echo $this->__('Previous') ?> -
    2. - - getPages() as $_page): ?> - isPageCurrent($_page)): ?> -
    3. - -
    4. - - - isLastPage()): ?> -
    5. - <?php echo $this->__('Next') ?> -
    6. - -
    +
    @@ -95,7 +76,7 @@ - __('Sort by') ?>: + __('Sort by') ?>: getAvailableOrders() as $_key=>$_order): ?> isOrderCurrent($_key)): ?> class="active">getAvailableOrders())):?>| diff --git a/app/design/frontend/default/modern/template/catalog/product/list/toolbar/pager.phtml b/app/design/frontend/default/modern/template/catalog/product/list/toolbar/pager.phtml new file mode 100644 index 0000000000..a34faaef01 --- /dev/null +++ b/app/design/frontend/default/modern/template/catalog/product/list/toolbar/pager.phtml @@ -0,0 +1,68 @@ + + + +
      +isFirstPage()): ?> +
    1. + + +canShowFirst()): ?> +
    2. 1
    3. + + +canShowPreviousJump()): ?> +
    4. ...
    5. + + +getFramePages() as $_page): ?> + isPageCurrent($_page)): ?> +
    6. + +
    7. + + + + +canShowNextJump()): ?> +
    8. ...
    9. + + +canShowLast()): ?> +
    10. getLastPageNum() ?>
    11. + + +isLastPage()): ?> +
    12. + +
    diff --git a/app/design/frontend/default/modern/template/catalog/product/list/upsell.phtml b/app/design/frontend/default/modern/template/catalog/product/list/upsell.phtml index fae54f908c..9a733deb7f 100644 --- a/app/design/frontend/default/modern/template/catalog/product/list/upsell.phtml +++ b/app/design/frontend/default/modern/template/catalog/product/list/upsell.phtml @@ -37,7 +37,7 @@

    <?php echo $this->htmlEscape($_link->getName()) ?>

    htmlEscape($_link->getName()) ?>
    - getPriceHtml($_link, true) ?> + getPriceHtml($_link, true, '-upsell') ?> getReviewsSummaryHtml($_link) ?>
    -

    Primary

    +

    Default

    @@ -46,7 +46,7 @@ diff --git a/app/design/frontend/default/modern/template/customer/form/address.phtml b/app/design/frontend/default/modern/template/customer/form/address.phtml index 3ec11a3063..83b445c2db 100644 --- a/app/design/frontend/default/modern/template/customer/form/address.phtml +++ b/app/design/frontend/default/modern/template/customer/form/address.phtml @@ -99,10 +99,10 @@ $type): ?>
  • isPrimary($type['address_type_id'])): ?> - __("This is My Primary %s Address", ucfirst($type['name'])) ?> + __("This is My Default %s Address", ucfirst($type['name'])) ?>   - +
  • diff --git a/app/design/frontend/default/modern/template/ogone/placeform.phtml b/app/design/frontend/default/modern/template/ogone/placeform.phtml index d58b31e598..511075858b 100644 --- a/app/design/frontend/default/modern/template/ogone/placeform.phtml +++ b/app/design/frontend/default/modern/template/ogone/placeform.phtml @@ -25,7 +25,7 @@ */ ?> -__('Please, wait a moment. This page will transfer you data to ogone payment in few seconds.'); ?> +__('Please, wait a moment. This page will transfer your data to Ogone payment gateway in a few seconds.'); ?>getFormData())): ?> getFormData() as $name => $value) { ?> diff --git a/app/design/frontend/default/modern/template/page/1column.phtml b/app/design/frontend/default/modern/template/page/1column.phtml index 3932cb529f..eeeb8796a6 100644 --- a/app/design/frontend/default/modern/template/page/1column.phtml +++ b/app/design/frontend/default/modern/template/page/1column.phtml @@ -60,6 +60,9 @@ getChildHtml('content') ?> + getChildHtml('footer_before')): ?> + + diff --git a/app/design/frontend/default/modern/template/page/2columns-left.phtml b/app/design/frontend/default/modern/template/page/2columns-left.phtml index b372614ed2..c03b376367 100644 --- a/app/design/frontend/default/modern/template/page/2columns-left.phtml +++ b/app/design/frontend/default/modern/template/page/2columns-left.phtml @@ -67,6 +67,9 @@ + getChildHtml('footer_before')): ?> + + diff --git a/app/design/frontend/default/modern/template/page/2columns-right.phtml b/app/design/frontend/default/modern/template/page/2columns-right.phtml index 4965654b45..d5ac4f97af 100644 --- a/app/design/frontend/default/modern/template/page/2columns-right.phtml +++ b/app/design/frontend/default/modern/template/page/2columns-right.phtml @@ -66,6 +66,9 @@ + getChildHtml('footer_before')): ?> + + diff --git a/app/design/frontend/default/modern/template/page/3columns.phtml b/app/design/frontend/default/modern/template/page/3columns.phtml index 730a98e75a..7ea4b35ed0 100644 --- a/app/design/frontend/default/modern/template/page/3columns.phtml +++ b/app/design/frontend/default/modern/template/page/3columns.phtml @@ -66,6 +66,9 @@ + getChildHtml('footer_before')): ?> + + diff --git a/app/design/frontend/default/modern/template/page/html/pager.phtml b/app/design/frontend/default/modern/template/page/html/pager.phtml index 23b70d0087..43a440b9b6 100644 --- a/app/design/frontend/default/modern/template/page/html/pager.phtml +++ b/app/design/frontend/default/modern/template/page/html/pager.phtml @@ -24,7 +24,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> -getCollection()->getSize()): ?>
    -

    __('You have no primary entries in your address book.') ?>

    +

    __('You have no default entries in your address book.') ?>

    + getShowAmounts()): ?> + + getLastPageNum()>1): ?> + getShowPerPage()): ?>
    - getLastPageNum()>1): ?> - __('Items %s to %s of %s total', $this->getFirstNum(), $this->getLastNum(), $this->getTotalNum()) ?> - - __('%s Item(s)', $this->getTotalNum()) ?> - + getLastPageNum()>1): ?> + __('Items %s to %s of %s total', $this->getFirstNum(), $this->getLastNum(), $this->getTotalNum()) ?> + + __('%s Item(s)', $this->getTotalNum()) ?> + __('Page:') ?>
      isFirstPage()): ?>
    1. - <?php echo $this->__('Previous Page') ?> +
    2. - - getPages() as $_page): ?> + + + canShowFirst()): ?> +
    3. 1
    4. + + + canShowPreviousJump()): ?> +
    5. ...
    6. + + + getFramePages() as $_page): ?> isPageCurrent($_page)): ?> -
    7. +
    8. - - + + + + + canShowNextJump()): ?> +
    9. ...
    10. + + + canShowLast()): ?> +
    11. getLastPageNum() ?>
    12. + + isLastPage()): ?>
    13. - <?php echo $this->__('Next Page') ?> +
    14. - +
    __('Show') ?> @@ -37,14 +41,23 @@ + getTotals()): ?> - getTotals() as $_total): ?> + helper('tax')->displayCartBothPrices() ? 5 : 3; ?> + renderTotals(null, $_colspan); ?> + renderTotals('footer', $_colspan); ?> + needDisplayBaseGrandtotal()):?> - - + + - + + getItems() as $_item): ?> getParentItem()) continue ?> diff --git a/app/design/frontend/default/modern/template/paypal/link.phtml b/app/design/frontend/default/modern/template/paypal/link.phtml deleted file mode 100644 index 959963af59..0000000000 --- a/app/design/frontend/default/modern/template/paypal/link.phtml +++ /dev/null @@ -1,27 +0,0 @@ - -
  • <?php echo Mage::helper('paypal')->__('Paypal Checkout');?>
  • diff --git a/app/design/frontend/default/modern/template/paypal/standard/form.phtml b/app/design/frontend/default/modern/template/paypal/standard/form.phtml deleted file mode 100644 index b0d0c06ca3..0000000000 --- a/app/design/frontend/default/modern/template/paypal/standard/form.phtml +++ /dev/null @@ -1,34 +0,0 @@ - -
    - getMethodCode() ?> - -
    diff --git a/app/design/frontend/default/modern/template/paypaluk/direct/form.phtml b/app/design/frontend/default/modern/template/paypaluk/direct/form.phtml deleted file mode 100644 index e60acabe7b..0000000000 --- a/app/design/frontend/default/modern/template/paypaluk/direct/form.phtml +++ /dev/null @@ -1,126 +0,0 @@ - - -getMethodCode() ?> -hasSsCardType()): ?> -
  • -
    -
    -
      -
    • -
      - -
    • -
    • -
      -
      - -
      -
      - -
      -
    • -
    • -
    -
    - - - -
  • - diff --git a/app/design/frontend/default/modern/template/paypaluk/direct/info.phtml b/app/design/frontend/default/modern/template/paypaluk/direct/info.phtml deleted file mode 100644 index ff626cec97..0000000000 --- a/app/design/frontend/default/modern/template/paypaluk/direct/info.phtml +++ /dev/null @@ -1,37 +0,0 @@ - -getInfo()): ?> - -__('Credit Card Type: %s', $this->getCcTypeName()) ?>
    -__('Credit Card Number: xxxx-%s', $this->getInfo()->getCcLast4()) ?>
    -getInfo()->getCcSsIssue()): ?> -__("Switch/Solo card issue number: %s", $this->getInfo()->getCcSsIssue()) ?>
    - -getInfo()->getCcSsStartYear()): ?> -__('Switch/Solo card start Date: %s/%s', $this->getCcStartMonth(), $this->getInfo()->getCcSsStartYear()) ?> - - diff --git a/app/design/frontend/default/modern/template/paypaluk/express/form.phtml b/app/design/frontend/default/modern/template/paypaluk/express/form.phtml deleted file mode 100644 index b6c0a7190a..0000000000 --- a/app/design/frontend/default/modern/template/paypaluk/express/form.phtml +++ /dev/null @@ -1,34 +0,0 @@ - -
    - getMethodCode() ?> - -
    diff --git a/app/design/frontend/default/modern/template/paypaluk/express/review/details.phtml b/app/design/frontend/default/modern/template/paypaluk/express/review/details.phtml index 6723d48d13..0696f8c993 100644 --- a/app/design/frontend/default/modern/template/paypaluk/express/review/details.phtml +++ b/app/design/frontend/default/modern/template/paypaluk/express/review/details.phtml @@ -23,6 +23,10 @@ * @copyright Copyright (c) 2009 Irubin Consulting Inc. DBA Varien (http://www.varien.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ + +/** + * @see Mage_PaypalUk_Block_Express_Review_Details + */ ?>
    __('Subtotal') ?>
    getTitle() ?>helper('checkout')->formatPrice($_total->getValue()) ?> + helper('sales')->__('Your credit card will be charged for') ?> + + displayBaseGrandtotal() ?> +
    @@ -51,12 +55,21 @@ + getTotals()): ?> - getTotals() as $_total): ?> + helper('tax')->displayCartBothPrices() ? 5 : 3; ?> + renderTotals(null, $_colspan); ?> + renderTotals('footer', $_colspan); ?> + needDisplayBaseGrandtotal()):?> - - + + - + +
    getTitle() ?>helper('checkout')->formatPrice($_total->getValue()) ?> + helper('sales')->__('Your credit card will be charged for') ?> + + displayBaseGrandtotal() ?> +
    diff --git a/app/design/frontend/default/modern/template/paypaluk/link.phtml b/app/design/frontend/default/modern/template/paypaluk/link.phtml deleted file mode 100644 index e31f9fc46b..0000000000 --- a/app/design/frontend/default/modern/template/paypaluk/link.phtml +++ /dev/null @@ -1,27 +0,0 @@ - -
  • <?php echo Mage::helper('paypalUk')->__('Paypal UK Checkout');?>
  • diff --git a/app/design/frontend/default/modern/template/reports/widget/compared/content/compared_grid.phtml b/app/design/frontend/default/modern/template/reports/widget/compared/content/compared_grid.phtml deleted file mode 100644 index 7c97533612..0000000000 --- a/app/design/frontend/default/modern/template/reports/widget/compared/content/compared_grid.phtml +++ /dev/null @@ -1,69 +0,0 @@ - -getRecentlyComparedProducts()): ?> -
    -
    -

    __('Your Recently Compared') ?>

    -
    -
    - getColumnCount(); ?> - - -
      - -
    • - <?php echo $this->htmlEscape($_product->getName()) ?> -

      htmlEscape($_product->getName()) ?>

      - getReviewsSummaryHtml($_product, 'short') ?> - getPriceHtml($_product, true, '-widget-compared-grid') ?> -
      - isSaleable()): ?> - - - getIsSalable()): ?> -

      __('In stock') ?>

      - -

      __('Out of stock') ?>

      - - - -
      -
    • - -
    - - -
    -
    - diff --git a/app/design/frontend/default/modern/template/reports/widget/compared/content/compared_list.phtml b/app/design/frontend/default/modern/template/reports/widget/compared/content/compared_list.phtml deleted file mode 100644 index 7ed9dd1c8a..0000000000 --- a/app/design/frontend/default/modern/template/reports/widget/compared/content/compared_list.phtml +++ /dev/null @@ -1,66 +0,0 @@ - -getRecentlyComparedProducts()): ?> -
    -
    -

    __('Your Recently Compared') ?>

    -
    -
    -
      - -
    1. - <?php echo $this->htmlEscape($_product->getName()) ?> -
      -
      -

      htmlEscape($_product->getName()) ?>

      - getReviewsSummaryHtml($_product, 'short') ?> - getPriceHtml($_product, true, '-widget-compared-list') ?> - isSaleable()): ?> - - - getIsSalable()): ?> -

      __('In stock') ?>

      - -

      __('Out of stock') ?>

      - - - -
      -
      -
    2. - -
    -
    -
    - diff --git a/app/design/frontend/default/modern/template/reports/widget/viewed/content/viewed_grid.phtml b/app/design/frontend/default/modern/template/reports/widget/viewed/content/viewed_grid.phtml deleted file mode 100644 index 36d2f2f33f..0000000000 --- a/app/design/frontend/default/modern/template/reports/widget/viewed/content/viewed_grid.phtml +++ /dev/null @@ -1,74 +0,0 @@ - - -getRecentlyViewedProducts()): ?> -
    -
    -

    __('Your Recently Viewed') ?>

    -
    -
    - getColumnCount(); ?> - - -
      - -
    • - <?php echo $this->htmlEscape($_product->getName()) ?> -

      htmlEscape($_product->getName()) ?>

      - getReviewsSummaryHtml($_product, 'short') ?> - getPriceHtml($_product, true, '-widget-viewed-grid') ?> -
      - isSaleable()): ?> - - - getIsSalable()): ?> -

      __('In stock') ?>

      - -

      __('Out of stock') ?>

      - - - -
      -
    • - -
    - - -
    -
    - diff --git a/app/design/frontend/default/modern/template/reports/widget/viewed/content/viewed_list.phtml b/app/design/frontend/default/modern/template/reports/widget/viewed/content/viewed_list.phtml deleted file mode 100644 index 7710515f6d..0000000000 --- a/app/design/frontend/default/modern/template/reports/widget/viewed/content/viewed_list.phtml +++ /dev/null @@ -1,71 +0,0 @@ - - -getRecentlyViewedProducts()): ?> -
    -
    -

    __('Your Recently Viewed') ?>

    -
    -
    -
      - -
    1. - <?php echo $this->htmlEscape($_product->getName()) ?> -
      -
      -

      htmlEscape($_product->getName()) ?>

      - getReviewsSummaryHtml($_product, 'short') ?> - getPriceHtml($_product, true, '-widget-viewed-list') ?> - isSaleable()): ?> - - - getIsSalable()): ?> -

      __('In stock') ?>

      - -

      __('Out of stock') ?>

      - - - -
      -
      -
    2. - -
    -
    -
    - diff --git a/app/design/frontend/default/modern/template/rss/list.phtml b/app/design/frontend/default/modern/template/rss/list.phtml index 4156b1854f..e029f22672 100644 --- a/app/design/frontend/default/modern/template/rss/list.phtml +++ b/app/design/frontend/default/modern/template/rss/list.phtml @@ -33,7 +33,7 @@ $_misc = $this->getRssMiscFeeds(); ?> - + diff --git a/app/design/frontend/default/modern/template/sales/order/print/shipment.phtml b/app/design/frontend/default/modern/template/sales/order/print/shipment.phtml index fee3044398..2f4274f58c 100644 --- a/app/design/frontend/default/modern/template/sales/order/print/shipment.phtml +++ b/app/design/frontend/default/modern/template/sales/order/print/shipment.phtml @@ -60,6 +60,26 @@

    __('Shipping Method') ?>

    getShippingDescription() ?> + getTracksCollection()) > 0): ?> +
    Miscellaneous Feeds
    __('Miscellaneous Feeds') ?>
    + + + + + + + + + + getTracksCollection() as $track): ?> + + + + + + +
    __('Title')?>__('Number')?>
    getTitle() ?>getNumber() ?>
    +

    __('Payment Method') ?>

    diff --git a/app/design/frontend/default/modern/template/sales/order/shipment/items.phtml b/app/design/frontend/default/modern/template/sales/order/shipment/items.phtml index e125ee140f..ccbd08a672 100644 --- a/app/design/frontend/default/modern/template/sales/order/shipment/items.phtml +++ b/app/design/frontend/default/modern/template/sales/order/shipment/items.phtml @@ -27,7 +27,7 @@ getOrder() ?>

    getTracksCollection()->count()) : ?> - __('Track all shipments') ?> | + __('Track all shipments') ?> | __('Print All Shipments') ?>

    @@ -41,7 +41,7 @@ @@ -54,7 +54,7 @@ isCustom()): ?> getNumber() ?> - getNumber() ?> + getNumber() ?>, getTracksCollection()->count()) : ?> | -__('Track your order') ?> +__('Track your order') ?> diff --git a/app/design/frontend/default/modern/template/sales/reorder/sidebar.phtml b/app/design/frontend/default/modern/template/sales/reorder/sidebar.phtml index 0b91ffd8b5..3da15b5a00 100644 --- a/app/design/frontend/default/modern/template/sales/reorder/sidebar.phtml +++ b/app/design/frontend/default/modern/template/sales/reorder/sidebar.phtml @@ -43,24 +43,22 @@
      getItemsRandomCollection(5) as $_item): ?> - getProduct() && is_null($_item->getParentItem())): ?> -
    1. -
      - getProduct()->getStockItem()->getIsInStock()): ?> - - - - -
      - -
    2. +
    3. +
      + isItemAvailableForReorder($_item)): ?> + + + +
      + +
    diff --git a/app/design/frontend/default/modern/template/sendfriend/send.phtml b/app/design/frontend/default/modern/template/sendfriend/send.phtml index 2b4222a86d..f105cb0512 100644 --- a/app/design/frontend/default/modern/template/sendfriend/send.phtml +++ b/app/design/frontend/default/modern/template/sendfriend/send.phtml @@ -121,7 +121,7 @@
    - + canSend()):?> disabled="disabled"/>
    '; if($this->isEnabled()) @@ -80,6 +81,12 @@ function closeEditorPopup(name) { 'firebug_warning_anchor' => $this->translate('Hide'), )); + $translatedString = array( + 'Insert Image...' => $this->translate('Insert Image...'), + 'Insert Media...' => $this->translate('Insert Media...'), + 'Insert File...' => $this->translate('Insert File...') + ); + $jsSetupObject = 'wysiwyg' . $this->getHtmlId(); $html = $this->_getButtonsHtml() @@ -89,22 +96,19 @@ function closeEditorPopup(name) { '; $html = $this->_wrapIntoContainer($html); @@ -141,7 +145,7 @@ protected function _getButtonsHtml() { $buttonsHtml = '
    '; if ($this->isEnabled()) { - $buttonsHtml .= $this->_getPluginButtonsHtml(false) . $this->_getToggleButtonHtml(); + $buttonsHtml .= $this->_getToggleButtonHtml() . $this->_getPluginButtonsHtml($this->isHidden()); } else { $buttonsHtml .= $this->_getPluginButtonsHtml(true); } @@ -177,26 +181,93 @@ protected function _getPluginButtonsHtml($visible = true) $buttonsHtml = ''; // Button to widget insertion window - $winUrl = $this->getConfig('widget_window_no_wysiwyg_url'); $buttonsHtml .= $this->_getButtonHtml(array( 'title' => $this->translate('Insert Widget...'), - 'onclick' => "openEditorPopup('" . $winUrl . "', 'widget_window" . $this->getHtmlId() . "', 'width=1024,height=800,scrollbars=yes')", + 'onclick' => "widgetTools.openDialog('" . $this->getConfig('widget_window_url') . "widget_target_id/" . $this->getHtmlId() . "')", 'class' => 'add-widget plugin', 'style' => $visible ? '' : 'display:none', )); // Button to media images insertion window - $winUrl = $this->getConfig('files_browser_window_url'); $buttonsHtml .= $this->_getButtonHtml(array( 'title' => $this->translate('Insert Image...'), - 'onclick' => "openEditorPopup('" . $winUrl . "', 'browser_window" . $this->getHtmlId() . "', 'width=1024,height=800')", + 'onclick' => "MediabrowserUtility.openDialog('" . $this->getConfig('files_browser_window_url') . "target_element_id/" . $this->getHtmlId() . "/')", 'class' => 'add-image plugin', 'style' => $visible ? '' : 'display:none', )); + foreach ($this->getConfig('plugins') as $plugin) { + if (isset($plugin['options']) && $this->_checkPluginButtonOptions($plugin['options'])) { + $buttonOptions = $this->_prepareButtonOptions($plugin['options']); + if (!$visible) { + $configStyle = ''; + if (isset($buttonOptions['style'])) { + $configStyle = $buttonOptions['style']; + } + $buttonOptions = array_merge($buttonOptions, array('style' => 'display:none;' . $configStyle)); + } + $buttonsHtml .= $this->_getButtonHtml($buttonOptions); + } + } + return $buttonsHtml; } + /** + * Prepare button options array to create button html + * + * @param array $options + * @return array + */ + protected function _prepareButtonOptions($options) + { + $buttonOptions = array(); + $buttonOptions['class'] = 'plugin'; + foreach ($options as $name => $value) { + $buttonOptions[$name] = $value; + } + $buttonOptions = $this->_prepareOptions($buttonOptions); + return $buttonOptions; + } + + /** + * Check if plugin button options have required values + * + * @param array $pluginOptions + * @return boolean + */ + protected function _checkPluginButtonOptions($pluginOptions) + { + if (!isset($pluginOptions['title'])) { + return false; + } + return true; + } + + /** + * Convert options by replacing template constructions ( like {{var_name}} ) + * with data from this element object + * + * @param array $options + * @return array + */ + protected function _prepareOptions($options) + { + $preparedOptions = array(); + foreach ($options as $name => $value) { + if (is_array($value) && isset($value['search']) && isset($value['subject'])) { + $subject = $value['subject']; + foreach ($value['search'] as $part) { + $subject = str_replace('{{'.$part.'}}', $this->getDataUsingMethod($part), $subject); + } + $preparedOptions[$name] = $subject; + } else { + $preparedOptions[$name] = $value; + } + } + return $preparedOptions; + } + /** * Return custom button HTML * @@ -229,9 +300,10 @@ protected function _wrapIntoContainer($html) if (!$this->getConfig('use_container')) { return $html; } + $html = '
    getConfig('no_display') ? ' style="display:none;"' : '').'>' - . $html - . '
    '; + . $html + . '
    '; return $html; } diff --git a/lib/Varien/Data/Form/Element/Multiselect.php b/lib/Varien/Data/Form/Element/Multiselect.php index 6b408ed095..cf4345e469 100644 --- a/lib/Varien/Data/Form/Element/Multiselect.php +++ b/lib/Varien/Data/Form/Element/Multiselect.php @@ -86,7 +86,7 @@ public function getElementHtml() public function getHtmlAttributes() { - return array('title', 'class', 'style', 'onclick', 'onchange', 'disabled', 'size'); + return array('title', 'class', 'style', 'onclick', 'onchange', 'disabled', 'size', 'tabindex'); } public function getDefaultHtml() diff --git a/lib/Varien/Data/Form/Element/Select.php b/lib/Varien/Data/Form/Element/Select.php index 60508a20a0..0fe947889a 100644 --- a/lib/Varien/Data/Form/Element/Select.php +++ b/lib/Varien/Data/Form/Element/Select.php @@ -118,6 +118,6 @@ protected function _prepareOptions() public function getHtmlAttributes() { - return array('title', 'class', 'style', 'onclick', 'onchange', 'disabled', 'readonly'); + return array('title', 'class', 'style', 'onclick', 'onchange', 'disabled', 'readonly', 'tabindex'); } } \ No newline at end of file diff --git a/lib/Varien/Data/Form/Element/Text.php b/lib/Varien/Data/Form/Element/Text.php index 9b1c6556b9..e538e70e1b 100644 --- a/lib/Varien/Data/Form/Element/Text.php +++ b/lib/Varien/Data/Form/Element/Text.php @@ -48,6 +48,6 @@ public function getHtml() public function getHtmlAttributes() { - return array('type', 'title', 'class', 'style', 'onclick', 'onchange', 'disabled', 'readonly', 'maxlength'); + return array('type', 'title', 'class', 'style', 'onclick', 'onchange', 'disabled', 'readonly', 'maxlength', 'tabindex'); } } diff --git a/lib/Varien/Data/Form/Element/Textarea.php b/lib/Varien/Data/Form/Element/Textarea.php index c610ca9d47..5f376d8971 100644 --- a/lib/Varien/Data/Form/Element/Textarea.php +++ b/lib/Varien/Data/Form/Element/Textarea.php @@ -44,7 +44,7 @@ public function __construct($attributes=array()) public function getHtmlAttributes() { - return array('title', 'class', 'style', 'onclick', 'onchange', 'rows', 'cols', 'readonly', 'disabled', 'onkeyup'); + return array('title', 'class', 'style', 'onclick', 'onchange', 'rows', 'cols', 'readonly', 'disabled', 'onkeyup', 'tabindex'); } public function getElementHtml() diff --git a/lib/Varien/Db/Adapter/Pdo/Mysql.php b/lib/Varien/Db/Adapter/Pdo/Mysql.php index 847687ffbe..cc37fc226d 100644 --- a/lib/Varien/Db/Adapter/Pdo/Mysql.php +++ b/lib/Varien/Db/Adapter/Pdo/Mysql.php @@ -159,6 +159,16 @@ public function rollback() return $this; } + /** + * Get adapter transaction level state. Return 0 if all transactions are complete + * + * @return int + */ + public function getTransactionLevel() + { + return $this->_transactionLevel; + } + /** * Convert date to DB format * @@ -1218,44 +1228,71 @@ public function changeTableEngine($tableName, $engine, $schemaName = null) * Inserts a table row with specified data. * * @param mixed $table The table to insert data into. - * @param array $bind Column-value pairs. + * @param array $data Column-value pairs or array of column-value pairs. * @param arrat $fields update fields pairs or values * @return int The number of affected rows. */ - public function insertOnDuplicate($table, array $bind, array $fields = array()) + public function insertOnDuplicate($table, array $data, array $fields = array()) { // extract and quote col names from the array keys - $cols = array(); - $vals = array(); - foreach ($bind as $col => $val) { - $cols[] = $this->quoteIdentifier($col, true); - if ($val instanceof Zend_Db_Expr) { - $vals[] = $val->__toString(); - unset($bind[$col]); - } else { - $vals[] = '?'; + $row = reset($data); // get first elemnt from data array + $bind = array(); // SQL bind array + $cols = array(); + $values = array(); + + if (is_array($row)) { // Array of column-value pairs + $cols = array_keys($row); + foreach ($data as $row) { + $line = array(); + if (array_diff($cols, array_keys($row))) { + throw new Varien_Exception('Invalid data for insert'); + } + foreach ($row as $val) { + if ($val instanceof Zend_Db_Expr) { + $line[] = $val->__toString(); + } else { + $line[] = '?'; + $bind[] = $val; + } + } + $values[] = sprintf('(%s)', join(',', $line)); } + unset($row); + } else { // Column-value pairs + $cols = array_keys($data); + $line = array(); + foreach ($data as $val) { + if ($val instanceof Zend_Db_Expr) { + $line[] = $val->__toString(); + } else { + $line[] = '?'; + $bind[] = $val; + } + } + $values[] = sprintf('(%s)', join(',', $line)); } $updateFields = array(); if (empty($fields)) { - $fields = array_keys($bind); + $fields = $cols; } + + // quote column names + $cols = array_map(array($this, 'quoteIdentifier'), $cols); + + // prepare ON DUPLICATE KEY conditions foreach ($fields as $k => $v) { $field = $value = null; if (!is_numeric($k)) { $field = $this->quoteIdentifier($k); if ($v instanceof Zend_Db_Expr) { $value = $v->__toString(); - } - else if (is_string($v)) { + } else if (is_string($v)) { $value = 'VALUES('.$this->quoteIdentifier($v).')'; - } - else if (is_numeric($v)) { + } else if (is_numeric($v)) { $value = $this->quoteInto('?', $v); } - } - else if (is_string($v)) { + } else if (is_string($v)) { $field = $this->quoteIdentifier($v); $value = 'VALUES('.$field.')'; } @@ -1269,10 +1306,10 @@ public function insertOnDuplicate($table, array $bind, array $fields = array()) $sql = "INSERT INTO " . $this->quoteIdentifier($table, true) . ' (' . implode(', ', $cols) . ') ' - . 'VALUES (' . implode(', ', $vals) . ')'; - if ($updateFields) { - $sql .= " ON DUPLICATE KEY UPDATE " . join(', ', $updateFields); - } + . 'VALUES ' . implode(', ', $values); + if ($updateFields) { + $sql .= " ON DUPLICATE KEY UPDATE " . join(', ', $updateFields); + } // execute the statement and return the number of affected rows $stmt = $this->query($sql, array_values($bind)); @@ -1297,8 +1334,6 @@ public function insertMultiple($table, array $data) // validate data array $cols = array_keys($row); - $vals = array(); - $bind = array(); $insertArray = array(); foreach ($data as $row) { $line = array(); @@ -1356,7 +1391,7 @@ public function insertArray($table, array $columns, array $data) } // build the statement - array_map(array($this, 'quoteIdentifier'), $columns); + $columns = array_map(array($this, 'quoteIdentifier'), $columns); $sql = sprintf("INSERT INTO %s (%s) VALUES%s", $this->quoteIdentifier($table, true), implode(',', $columns), implode(', ', $vals)); diff --git a/lib/Varien/Image/Adapter/Gd.php b/lib/Varien/Image/Adapter/Gd.php deleted file mode 100644 index 6152800138..0000000000 --- a/lib/Varien/Image/Adapter/Gd.php +++ /dev/null @@ -1,25 +0,0 @@ -_fileName : $destination; if( isset($destination) && isset($newName) ) { - $fileName = $destination . "/" . $fileName; + $fileName = $destination . "/" . $newName; } elseif( isset($destination) && !isset($newName) ) { $info = pathinfo($destination); $fileName = $destination; @@ -77,11 +77,11 @@ public function save($destination=null, $newName=null) if ($isAlpha) { $this->_fillBackgroundColor($this->_imageHandler); } - + $functionParameters = array(); $functionParameters[] = $this->_imageHandler; $functionParameters[] = $fileName; - + // set quality param for JPG file type if (!is_null($this->quality()) && $this->_fileType == IMAGETYPE_JPEG) { diff --git a/lib/Varien/Image/Adapter/Imagemagic.php b/lib/Varien/Image/Adapter/Imagemagic.php deleted file mode 100644 index 6152800138..0000000000 --- a/lib/Varien/Image/Adapter/Imagemagic.php +++ /dev/null @@ -1,25 +0,0 @@ -_streamHandler, $str); } + /** + * Format line as CSV and write to file pointer + * + * @param array $row + * @param string $delimiter + * @param string $enclosure + * @return bool|int + */ + public function streamWriteCsv(array $row, $delimiter = ',', $enclosure = '"') + { + if (!$this->_streamHandler) { + return false; + } + return @fputcsv($this->_streamHandler, $row, $delimiter, $enclosure); + } + /** * Close an open file pointer * Set chmod on a file diff --git a/lib/Varien/Simplexml/Element.php b/lib/Varien/Simplexml/Element.php index d03d402b88..88e1d065ee 100644 --- a/lib/Varien/Simplexml/Element.php +++ b/lib/Varien/Simplexml/Element.php @@ -298,9 +298,9 @@ public function innerXml($level=0) * @param string * @return string */ - public function xmlentities($value='') + public function xmlentities($value = null) { - if (empty($value)) { + if (is_null($value)) { $value = $this; } $value = (string)$value; diff --git a/lib/Zend/Application/Bootstrap/BootstrapAbstract.php b/lib/Zend/Application/Bootstrap/BootstrapAbstract.php index 6b2f966753..0190fe1540 100644 --- a/lib/Zend/Application/Bootstrap/BootstrapAbstract.php +++ b/lib/Zend/Application/Bootstrap/BootstrapAbstract.php @@ -17,7 +17,7 @@ * @subpackage Bootstrap * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @version $Id: BootstrapAbstract.php 17825 2009-08-26 12:50:42Z matthew $ + * @version $Id: BootstrapAbstract.php 18455 2009-10-01 17:49:38Z doctorrock83 $ */ /** @@ -661,7 +661,7 @@ protected function _executeResource($resource) $method = $classResources[$resourceName]; $return = $this->$method(); unset($this->_started[$resourceName]); - $this->_markRun($resource); + $this->_markRun($resourceName); if (null !== $return) { $this->getContainer()->{$resourceName} = $return; diff --git a/lib/Zend/CodeGenerator/Php/Class.php b/lib/Zend/CodeGenerator/Php/Class.php index d2ff16b1bd..99f7f715d9 100644 --- a/lib/Zend/CodeGenerator/Php/Class.php +++ b/lib/Zend/CodeGenerator/Php/Class.php @@ -17,7 +17,7 @@ * @subpackage PHP * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @version $Id: Class.php 17994 2009-09-06 10:16:53Z beberlei $ + * @version $Id: Class.php 18398 2009-09-24 20:50:09Z beberlei $ */ /** @@ -111,13 +111,18 @@ public static function fromReflection(Zend_Reflection_Class $reflectionClass) if ($parentClass = $reflectionClass->getParentClass()) { $class->setExtendedClass($parentClass->getName()); - $interfaces = array_diff($parentClass->getInterfaces(), $reflectionClass->getInterfaces()); + $interfaces = array_diff($reflectionClass->getInterfaces(), $parentClass->getInterfaces()); } else { $interfaces = $reflectionClass->getInterfaces(); } - $class->setImplementedInterfaces($interfaces); + $interfaceNames = array(); + foreach($interfaces AS $interface) { + $interfaceNames[] = $interface->getName(); + } + $class->setImplementedInterfaces($interfaceNames); + $properties = array(); foreach ($reflectionClass->getProperties() as $reflectionProperty) { if ($reflectionProperty->getDeclaringClass()->getName() == $class->getName()) { diff --git a/lib/Zend/CodeGenerator/Php/Property/DefaultValue.php b/lib/Zend/CodeGenerator/Php/Property/DefaultValue.php index 498ac46913..f8bbf3501d 100644 --- a/lib/Zend/CodeGenerator/Php/Property/DefaultValue.php +++ b/lib/Zend/CodeGenerator/Php/Property/DefaultValue.php @@ -17,7 +17,7 @@ * @subpackage PHP * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @version $Id: DefaultValue.php 16971 2009-07-22 18:05:45Z mikaelkael $ + * @version $Id: DefaultValue.php 18394 2009-09-24 20:08:51Z beberlei $ */ /** @@ -78,9 +78,11 @@ class Zend_CodeGenerator_Php_Property_DefaultValue extends Zend_CodeGenerator_Ph */ protected function _init() { - $reflect = new ReflectionClass(get_class($this)); - self::$_constants = $reflect->getConstants(); - unset($reflect); + if(count(self::$_constants) == 0) { + $reflect = new ReflectionClass(get_class($this)); + self::$_constants = $reflect->getConstants(); + unset($reflect); + } } /** @@ -221,8 +223,6 @@ public function _getAutoDeterminedType($value) default: return self::TYPE_OTHER; } - - return self::TYPE_OTHER; } /** @@ -263,15 +263,21 @@ public function generate() $output = ''; switch ($type) { + case self::TYPE_BOOLEAN: + case self::TYPE_BOOL: + $output .= ( $value ? 'true' : 'false' ); + break; case self::TYPE_STRING: - $output .= "'" . $value . "'"; + $output .= "'" . addcslashes($value, "'") . "'"; + break; + case self::TYPE_NULL: + $output .= 'null'; break; case self::TYPE_NUMBER: case self::TYPE_INTEGER: case self::TYPE_INT: case self::TYPE_FLOAT: case self::TYPE_DOUBLE: - case self::TYPE_NULL: case self::TYPE_CONSTANT: $output .= $value; break; @@ -292,7 +298,7 @@ public function generate() $outputParts[] = $partV; $noKeyIndex++; } else { - $outputParts[] = (is_int($n) ? $n : "'" . $n . "'") . ' => ' . $partV; + $outputParts[] = (is_int($n) ? $n : "'" . addcslashes($n, "'") . "'") . ' => ' . $partV; } } @@ -304,7 +310,10 @@ public function generate() break; case self::TYPE_OTHER: default: - throw new Exception('I dont know this type'); + #require_once "Zend/CodeGenerator/Php/Exception.php"; + throw new Zend_CodeGenerator_Php_Exception( + "Type '".get_class($value)."' is unknown or cannot be used as property default value." + ); } $output .= ';'; diff --git a/lib/Zend/Db/Adapter/Oracle.php b/lib/Zend/Db/Adapter/Oracle.php index a3b10132e6..1609b4c27e 100644 --- a/lib/Zend/Db/Adapter/Oracle.php +++ b/lib/Zend/Db/Adapter/Oracle.php @@ -17,7 +17,7 @@ * @subpackage Adapter * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @version $Id: Oracle.php 16920 2009-07-21 13:32:28Z ralph $ + * @version $Id: Oracle.php 18415 2009-09-25 17:46:24Z mikaelkael $ */ /** @@ -81,7 +81,7 @@ class Zend_Db_Adapter_Oracle extends Zend_Db_Adapter_Abstract /** * @var integer */ - protected $_execute_mode = OCI_COMMIT_ON_SUCCESS; + protected $_execute_mode = null; /** * Default class name for a DB statement. @@ -119,6 +119,8 @@ protected function _connect() throw new Zend_Db_Adapter_Oracle_Exception('The OCI8 extension is required for this adapter but the extension is not loaded'); } + $this->_setExecuteMode(OCI_COMMIT_ON_SUCCESS); + $connectionFuncName = ($this->_config['persistent'] == true) ? 'oci_pconnect' : 'oci_connect'; $this->_connection = @$connectionFuncName( diff --git a/lib/Zend/Db/Select.php b/lib/Zend/Db/Select.php index bc76948c48..110d3fd89b 100644 --- a/lib/Zend/Db/Select.php +++ b/lib/Zend/Db/Select.php @@ -17,7 +17,7 @@ * @subpackage Select * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @version $Id: Select.php 18296 2009-09-18 22:43:17Z beberlei $ + * @version $Id: Select.php 18511 2009-10-12 14:33:35Z ralph $ */ @@ -227,7 +227,7 @@ public function distinct($flag = true) */ public function from($name, $cols = '*', $schema = null) { - return $this->joinInner($name, null, $cols, $schema); + return $this->_join(self::FROM, $name, null, $cols, $schema); } /** @@ -741,7 +741,7 @@ public function getAdapter() */ protected function _join($type, $name, $cond, $cols, $schema = null) { - if (!in_array($type, self::$_joinTypes)) { + if (!in_array($type, self::$_joinTypes) && $type != self::FROM) { /** * @see Zend_Db_Select_Exception */ @@ -786,6 +786,7 @@ protected function _join($type, $name, $cond, $cols, $schema = null) list($schema, $tableName) = explode('.', $tableName); } + $lastFromCorrelationName = null; if (!empty($correlationName)) { if (array_key_exists($correlationName, $this->_parts[self::FROM])) { /** @@ -795,16 +796,39 @@ protected function _join($type, $name, $cond, $cols, $schema = null) throw new Zend_Db_Select_Exception("You cannot define a correlation name '$correlationName' more than once"); } + if ($type == self::FROM) { + // append this from after the last from joinType + $tmpFromParts = $this->_parts[self::FROM]; + $this->_parts[self::FROM] = array(); + // move all the froms onto the stack + while ($tmpFromParts) { + $currentCorrelationName = key($tmpFromParts); + if ($tmpFromParts[$currentCorrelationName]['joinType'] != self::FROM) { + break; + } + $lastFromCorrelationName = $currentCorrelationName; + $this->_parts[self::FROM][$currentCorrelationName] = array_shift($tmpFromParts); + } + } else { + $tmpFromParts = array(); + } $this->_parts[self::FROM][$correlationName] = array( 'joinType' => $type, 'schema' => $schema, 'tableName' => $tableName, 'joinCondition' => $cond - ); + ); + while ($tmpFromParts) { + $currentCorrelationName = key($tmpFromParts); + $this->_parts[self::FROM][$currentCorrelationName] = array_shift($tmpFromParts); + } } // add to the columns from this joined table - $this->_tableCols($correlationName, $cols); + if ($type == self::FROM && $lastFromCorrelationName == null) { + $lastFromCorrelationName = true; + } + $this->_tableCols($correlationName, $cols, $lastFromCorrelationName); return $this; } @@ -878,9 +902,10 @@ private function _uniqueCorrelation($name) * @param string $tbl The table/join the columns come from. * @param array|string $cols The list of columns; preferably as * an array, but possibly as a string containing one column. + * @param bool|string True if it should be prepended, a correlation name if it should be inserted * @return void */ - protected function _tableCols($correlationName, $cols) + protected function _tableCols($correlationName, $cols, $afterCorrelationName = null) { if (!is_array($cols)) { $cols = array($cols); @@ -890,6 +915,8 @@ protected function _tableCols($correlationName, $cols) $correlationName = ''; } + $columnValues = array(); + foreach (array_filter($cols) as $alias => $col) { $currentCorrelationName = $correlationName; if (is_string($col)) { @@ -906,7 +933,38 @@ protected function _tableCols($correlationName, $cols) $col = $m[2]; } } - $this->_parts[self::COLUMNS][] = array($currentCorrelationName, $col, is_string($alias) ? $alias : null); + $columnValues[] = array($currentCorrelationName, $col, is_string($alias) ? $alias : null); + } + + if ($columnValues) { + + // should we attempt to prepend or insert these values? + if ($afterCorrelationName === true || is_string($afterCorrelationName)) { + $tmpColumns = $this->_parts[self::COLUMNS]; + $this->_parts[self::COLUMNS] = array(); + } else { + $tmpColumns = array(); + } + + // find the correlation name to insert after + if (is_string($afterCorrelationName)) { + while ($tmpColumns) { + $this->_parts[self::COLUMNS][] = $currentColumn = array_shift($tmpColumns); + if ($currentColumn[0] == $afterCorrelationName) { + break; + } + } + } + + // apply current values to current stack + foreach ($columnValues as $columnValue) { + array_push($this->_parts[self::COLUMNS], $columnValue); + } + + // finish ensuring that all previous values are applied (if they exist) + while ($tmpColumns) { + array_push($this->_parts[self::COLUMNS], array_shift($tmpColumns)); + } } } @@ -1045,9 +1103,11 @@ protected function _renderFrom($sql) foreach ($this->_parts[self::FROM] as $correlationName => $table) { $tmp = ''; + $joinType = ($table['joinType'] == self::FROM) ? self::INNER_JOIN : $table['joinType']; + // Add join clause (if applicable) if (! empty($from)) { - $tmp .= ' ' . strtoupper($table['joinType']) . ' '; + $tmp .= ' ' . strtoupper($joinType) . ' '; } $tmp .= $this->_getQuotedSchema($table['schema']); diff --git a/lib/Zend/Locale/Format.php b/lib/Zend/Locale/Format.php index 1896869e5e..36d2c141a0 100644 --- a/lib/Zend/Locale/Format.php +++ b/lib/Zend/Locale/Format.php @@ -16,7 +16,7 @@ * @package Zend_Locale * @subpackage Format * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com) - * @version $Id: Format.php 17080 2009-07-25 21:14:29Z thomas $ + * @version $Id: Format.php 18526 2009-10-12 19:01:49Z matthew $ * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -319,6 +319,9 @@ public static function toNumber($value, array $options = array()) } } else { // seperate negative format pattern when available + // @todo: The below conditional is a repeat of logic in the + // previous conditional; it should be refactored to a protected + // method to prevent code duplication. if (iconv_strpos($format, ';') !== false) { if (call_user_func(Zend_Locale_Math::$comp, $value, 0, $options['precision']) < 0) { $tmpformat = iconv_substr($format, iconv_strpos($format, ';') + 1); @@ -335,6 +338,9 @@ public static function toNumber($value, array $options = array()) if (strpos($format, '.')) { if (is_numeric($options['precision'])) { $value = Zend_Locale_Math::round($value, $options['precision']); + // Need to "floatalize" the number; when precision > 4 + // and bcmath disabled, round() returns scientific notation + $value = self::_floatalize($value); } else { if (substr($format, iconv_strpos($format, '.') + 1, 3) == '###') { $options['precision'] = null; @@ -347,6 +353,9 @@ public static function toNumber($value, array $options = array()) } } else { $value = Zend_Locale_Math::round($value, 0); + // Need to "floatalize" the number; when precision > 4 + // and bcmath disabled, round() returns scientific notation + $value = self::_floatalize($value); $options['precision'] = 0; } $value = Zend_Locale_Math::normalize($value); diff --git a/lib/Zend/Mail/Protocol/Imap.php b/lib/Zend/Mail/Protocol/Imap.php index eb06fc1454..7cef66273c 100644 --- a/lib/Zend/Mail/Protocol/Imap.php +++ b/lib/Zend/Mail/Protocol/Imap.php @@ -11,13 +11,13 @@ * If you did not receive a copy of the license and are unable to * obtain it through the world-wide-web, please send an email * to license@zend.com so we can send you a copy immediately. - * + * * @category Zend * @package Zend_Mail * @subpackage Protocol * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @version $Id: Imap.php 16219 2009-06-21 19:45:39Z thomas $ + * @version $Id: Imap.php 18499 2009-10-08 22:24:02Z yoshida@zend.co.jp $ */ @@ -34,7 +34,7 @@ class Zend_Mail_Protocol_Imap * Default timeout in seconds for initiating session */ const TIMEOUT_CONNECTION = 30; - + /** * socket to imap server * @var resource|null @@ -195,8 +195,8 @@ protected function _decodeLine($line) "foo" baz {3}bar ("f\\\"oo" bar) would be returned as: array('foo', 'baz', 'bar', array('f\\\"oo', 'bar')); - - // TODO: add handling of '[' and ']' to parser for easier handling of response text + + // TODO: add handling of '[' and ']' to parser for easier handling of response text */ // replace any trailling including spaces with a single space $line = rtrim($line) . ' '; @@ -241,8 +241,8 @@ protected function _decodeLine($line) // only count braces if more than one $braces -= strlen($token) + 1; // only add if token had more than just closing braces - if ($token) { - $tokens[] = $token; + if (rtrim($token) != '') { + $tokens[] = rtrim($token); } $token = $tokens; $tokens = array_pop($stack); @@ -824,7 +824,7 @@ public function search(array $params) if (!$response) { return $response; } - + foreach ($response as $ids) { if ($ids[0] == 'SEARCH') { array_shift($ids); diff --git a/lib/Zend/Queue/Adapter/Db.php b/lib/Zend/Queue/Adapter/Db.php index b3a93a4af3..c554f2e955 100644 --- a/lib/Zend/Queue/Adapter/Db.php +++ b/lib/Zend/Queue/Adapter/Db.php @@ -17,7 +17,7 @@ * @subpackage Adapter * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @version $Id: Db.php 17217 2009-07-28 02:02:37Z matthew $ + * @version $Id: Db.php 18384 2009-09-23 10:50:12Z yoshida@zend.co.jp $ */ /** @@ -173,7 +173,7 @@ public function create($name, $timeout = null) $queue->timeout = ($timeout === null) ? self::CREATE_TIMEOUT_DEFAULT : (int)$timeout; try { - if ($id = $queue->save()) { + if ($queue->save()) { return true; } } catch (Exception $e) { @@ -349,7 +349,7 @@ public function receive($maxMessages = null, $timeout = null, Zend_Queue $queue $db->beginTransaction(); $query = $db->select(); - if ($this->_config['options'][Zend_Db_Select::FOR_UPDATE]) { + if ($this->_options['options'][Zend_Db_Select::FOR_UPDATE]) { // turn on forUpdate $query->forUpdate(); } diff --git a/lib/Zend/Search/Lucene/Document/Html.php b/lib/Zend/Search/Lucene/Document/Html.php index 23cfbb7001..f6e2c67373 100644 --- a/lib/Zend/Search/Lucene/Document/Html.php +++ b/lib/Zend/Search/Lucene/Document/Html.php @@ -17,7 +17,7 @@ * @subpackage Document * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @version $Id: Html.php 16971 2009-07-22 18:05:45Z mikaelkael $ + * @version $Id: Html.php 18488 2009-10-05 17:11:33Z alexander $ */ @@ -90,11 +90,11 @@ private function __construct($data, $isFile, $storeContent, $defaultEncoding = ' if ($this->_doc->encoding === null) { // Document encoding is not recognized - /** @todo improve HTML vs HTML fragment recognition */ - if (preg_match('//i', $htmlData, $matches, PREG_OFFSET_CAPTURE)) { - // It's an HTML document - // Add additional HEAD section and recognize document - $htmlTagOffset = $matches[0][1] + strlen($matches[0][1]); + /** @todo improve HTML vs HTML fragment recognition */ + if (preg_match('//i', $htmlData, $matches, PREG_OFFSET_CAPTURE)) { + // It's an HTML document + // Add additional HEAD section and recognize document + $htmlTagOffset = $matches[0][1] + strlen($matches[0][0]); @$this->_doc->loadHTML(iconv($defaultEncoding, 'UTF-8//IGNORE', substr($htmlData, 0, $htmlTagOffset)) . '' diff --git a/lib/Zend/Service/Twitter.php b/lib/Zend/Service/Twitter.php index 3e83636749..1f6a1baab1 100644 --- a/lib/Zend/Service/Twitter.php +++ b/lib/Zend/Service/Twitter.php @@ -1,4 +1,4 @@ -setLocalHttpClient(clone self::getHttpClient()); - if (is_array($username) && is_null($password)) { - if (isset($username['username']) && isset($username['password'])) { - $this->setUsername($username['username']); - $this->setPassword($username['password']); - } elseif (isset($username[0]) && isset($username[1])) { - $this->setUsername($username[0]); - $this->setPassword($username[1]); - } - } else { - $this->setUsername($username); - $this->setPassword($password); - } - $this->setUri('http://twitter.com'); - $this->_localHttpClient->setHeaders('Accept-Charset', 'ISO-8859-1,utf-8'); + */ + public function __construct($username, $password = null) + { + $this->setLocalHttpClient(clone self::getHttpClient()); + if (is_array($username) && is_null($password)) { + if (isset($username['username']) && isset($username['password'])) { + $this->setUsername($username['username']); + $this->setPassword($username['password']); + } elseif (isset($username[0]) && isset($username[1])) { + $this->setUsername($username[0]); + $this->setPassword($username[1]); + } + } else { + $this->setUsername($username); + $this->setPassword($password); + } + $this->setUri('http://twitter.com'); + $this->_localHttpClient->setHeaders('Accept-Charset', 'ISO-8859-1,utf-8'); } /** @@ -129,65 +130,71 @@ public function setLocalHttpClient(Zend_Http_Client $client) public function getLocalHttpClient() { return $this->_localHttpClient; - } + } + /** * Retrieve username * * @return string - */ - public function getUsername () - { - return $this->_username; - } + */ + public function getUsername() + { + return $this->_username; + } + /** * Set username * * @param string $value * @return Zend_Service_Twitter - */ - public function setUsername ($value) - { - $this->_username = $value; - $this->_authInitialized = false; - return $this; - } + */ + public function setUsername($value) + { + $this->_username = $value; + $this->_authInitialized = false; + return $this; + } + /** * Retrieve password * * @return string - */ - public function getPassword () - { - return $this->_password; - } + */ + public function getPassword() + { + return $this->_password; + } + /** * Set password * * @param string $value * @return Zend_Service_Twitter - */ - public function setPassword ($value) - { - $this->_password = $value; - $this->_authInitialized = false; - return $this; - } + */ + public function setPassword($value) + { + $this->_password = $value; + $this->_authInitialized = false; + return $this; + } + /** * Proxy service methods * * @param string $type * @return Zend_Service_Twitter * @throws Zend_Service_Twitter_Exception if method is not in method types list - */ - public function __get ($type) - { - if (! in_array($type, $this->_methodTypes)) { - include_once 'Zend/Service/Twitter/Exception.php'; - throw new Zend_Service_Twitter_Exception('Invalid method type "' . $type . '"'); - } - $this->_methodType = $type; - return $this; - } + */ + public function __get($type) + { + if (!in_array($type, $this->_methodTypes)) { + include_once 'Zend/Service/Twitter/Exception.php'; + throw new Zend_Service_Twitter_Exception('Invalid method type "' . $type . '"'); + } + $this->_methodType = $type; + return $this; + } + /** * Method overloading * @@ -195,69 +202,74 @@ public function __get ($type) * @param array $params * @return mixed * @throws Zend_Service_Twitter_Exception if unable to find method - */ - public function __call ($method, $params) - { - if (empty($this->_methodType)) { - include_once 'Zend/Service/Twitter/Exception.php'; - throw new Zend_Service_Twitter_Exception('Invalid method "' . $method . '"'); - } - $test = $this->_methodType . ucfirst($method); - if (! method_exists($this, $test)) { - include_once 'Zend/Service/Twitter/Exception.php'; - throw new Zend_Service_Twitter_Exception('Invalid method "' . $test . '"'); - } - return call_user_func_array(array($this , $test), $params); - } + */ + public function __call($method, $params) + { + if (empty($this->_methodType)) { + include_once 'Zend/Service/Twitter/Exception.php'; + throw new Zend_Service_Twitter_Exception('Invalid method "' . $method . '"'); + } + $test = $this->_methodType . ucfirst($method); + if (!method_exists($this, $test)) { + include_once 'Zend/Service/Twitter/Exception.php'; + throw new Zend_Service_Twitter_Exception('Invalid method "' . $test . '"'); + } + + return call_user_func_array(array($this, $test), $params); + } + /** * Initialize HTTP authentication * * @return void - */ - protected function _init () - { - $client = $this->_localHttpClient; - $client->resetParameters(); - if (null == $this->_cookieJar) { - $client->setCookieJar(); - $this->_cookieJar = $client->getCookieJar(); - } else { - $client->setCookieJar($this->_cookieJar); - } - if (! $this->_authInitialized) { - $client->setAuth($this->getUsername(), $this->getPassword()); - $this->_authInitialized = true; - } - } + */ + protected function _init() + { + $client = $this->_localHttpClient; + $client->resetParameters(); + if (null == $this->_cookieJar) { + $client->setCookieJar(); + $this->_cookieJar = $client->getCookieJar(); + } else { + $client->setCookieJar($this->_cookieJar); + } + if (!$this->_authInitialized) { + $client->setAuth($this->getUsername(), $this->getPassword()); + $this->_authInitialized = true; + } + } + /** * Set date header * * @param int|string $value * @deprecated Not supported by Twitter since April 08, 2009 * @return void - */ - protected function _setDate ($value) - { - if (is_int($value)) { - $date = date($this->_dateFormat, $value); - } else { - $date = date($this->_dateFormat, strtotime($value)); - } - $this->_localHttpClient->setHeaders('If-Modified-Since', $date); - } + */ + protected function _setDate($value) + { + if (is_int($value)) { + $date = date($this->_dateFormat, $value); + } else { + $date = date($this->_dateFormat, strtotime($value)); + } + $this->_localHttpClient->setHeaders('If-Modified-Since', $date); + } + /** * Public Timeline status * * @throws Zend_Http_Client_Exception if HTTP request fails or times out * @return Zend_Rest_Client_Result - */ - public function statusPublicTimeline () - { - $this->_init(); - $path = '/statuses/public_timeline.xml'; - $response = $this->_get($path); - return new Zend_Rest_Client_Result($response->getBody()); - } + */ + public function statusPublicTimeline() + { + $this->_init(); + $path = '/statuses/public_timeline.xml'; + $response = $this->_get($path); + return new Zend_Rest_Client_Result($response->getBody()); + } + /** * Friend Timeline Status * @@ -270,37 +282,38 @@ public function statusPublicTimeline () * @param array $params * @throws Zend_Http_Client_Exception if HTTP request fails or times out * @return void - */ - public function statusFriendsTimeline (array $params = array()) - { - $this->_init(); - $path = '/statuses/friends_timeline'; - $_params = array(); - foreach ($params as $key => $value) { - switch (strtolower($key)) { - case 'count': - $count = (int) $value; - if (0 >= $count) { - $count = 1; - } elseif (200 < $count) { - $count = 200; - } - $_params['count'] = (int) $count; - break; - case 'since_id': - $_params['since_id'] = $this->_validInteger($value); - break; - case 'page': - $_params['page'] = (int) $value; - break; - default: - break; - } - } - $path .= '.xml'; - $response = $this->_get($path, $_params); - return new Zend_Rest_Client_Result($response->getBody()); - } + */ + public function statusFriendsTimeline(array $params = array()) + { + $this->_init(); + $path = '/statuses/friends_timeline'; + $_params = array(); + foreach ($params as $key => $value) { + switch (strtolower($key)) { + case 'count': + $count = (int) $value; + if (0 >= $count) { + $count = 1; + } elseif (200 < $count) { + $count = 200; + } + $_params['count'] = (int) $count; + break; + case 'since_id': + $_params['since_id'] = $this->_validInteger($value); + break; + case 'page': + $_params['page'] = (int) $value; + break; + default: + break; + } + } + $path .= '.xml'; + $response = $this->_get($path, $_params); + return new Zend_Rest_Client_Result($response->getBody()); + } + /** * User Timeline status * @@ -315,28 +328,28 @@ public function statusFriendsTimeline (array $params = array()) * * @throws Zend_Http_Client_Exception if HTTP request fails or times out * @return Zend_Rest_Client_Result - */ - public function statusUserTimeline (array $params = array()) - { - $this->_init(); - $path = '/statuses/user_timeline'; - $_params = array(); - foreach ($params as $key => $value) { - switch (strtolower($key)) { - case 'id': - $path .= '/' . $this->_validInteger($value); - break; - case 'page': - $_params['page'] = (int) $value; - break; - case 'count': - $count = (int) $value; - if (0 >= $count) { - $count = 1; - } elseif (200 < $count) { - $count = 200; - } - $_params['count'] = $count; + */ + public function statusUserTimeline(array $params = array()) + { + $this->_init(); + $path = '/statuses/user_timeline'; + $_params = array(); + foreach ($params as $key => $value) { + switch (strtolower($key)) { + case 'id': + $path .= '/' . $value; + break; + case 'page': + $_params['page'] = (int) $value; + break; + case 'count': + $count = (int) $value; + if (0 >= $count) { + $count = 1; + } elseif (200 < $count) { + $count = 200; + } + $_params['count'] = $count; break; case 'user_id': $_params['user_id'] = $this->_validInteger($value); @@ -344,34 +357,36 @@ public function statusUserTimeline (array $params = array()) case 'screen_name': $_params['screen_name'] = $this->_validateScreenName($value); break; - case 'since_id': - $_params['since_id'] = $this->_validInteger($value); + case 'since_id': + $_params['since_id'] = $this->_validInteger($value); break; case 'max_id': $_params['max_id'] = $this->_validInteger($value); - break; - default: - break; - } - } - $path .= '.xml'; - $response = $this->_get($path, $_params); - return new Zend_Rest_Client_Result($response->getBody()); - } + break; + default: + break; + } + } + $path .= '.xml'; + $response = $this->_get($path, $_params); + return new Zend_Rest_Client_Result($response->getBody()); + } + /** * Show a single status * * @param int $id Id of status to show * @throws Zend_Http_Client_Exception if HTTP request fails or times out * @return Zend_Rest_Client_Result - */ - public function statusShow ($id) - { - $this->_init(); - $path = '/statuses/show/' . $this->_validInteger($id) . '.xml'; - $response = $this->_get($path); - return new Zend_Rest_Client_Result($response->getBody()); - } + */ + public function statusShow($id) + { + $this->_init(); + $path = '/statuses/show/' . $this->_validInteger($id) . '.xml'; + $response = $this->_get($path); + return new Zend_Rest_Client_Result($response->getBody()); + } + /** * Update user's current status * @@ -380,27 +395,28 @@ public function statusShow ($id) * @return Zend_Rest_Client_Result * @throws Zend_Http_Client_Exception if HTTP request fails or times out * @throws Zend_Service_Twitter_Exception if message is too short or too long - */ - public function statusUpdate ($status, $in_reply_to_status_id = null) - { - $this->_init(); - $path = '/statuses/update.xml'; - $len = iconv_strlen(htmlspecialchars($status, ENT_QUOTES, 'UTF-8'), 'UTF-8'); - if ($len > self::STATUS_MAX_CHARACTERS) { - include_once 'Zend/Service/Twitter/Exception.php'; - throw new Zend_Service_Twitter_Exception('Status must be no more than '. self::STATUS_MAX_CHARACTERS .' characters in length'); - } elseif (0 == $len) { - include_once 'Zend/Service/Twitter/Exception.php'; - throw new Zend_Service_Twitter_Exception('Status must contain at least one character'); - } - $data = array('status' => $status); - if (is_numeric($in_reply_to_status_id) && ! empty($in_reply_to_status_id)) { - $data['in_reply_to_status_id'] = $in_reply_to_status_id; - } + */ + public function statusUpdate($status, $in_reply_to_status_id = null) + { + $this->_init(); + $path = '/statuses/update.xml'; + $len = iconv_strlen(htmlspecialchars($status, ENT_QUOTES, 'UTF-8'), 'UTF-8'); + if ($len > self::STATUS_MAX_CHARACTERS) { + include_once 'Zend/Service/Twitter/Exception.php'; + throw new Zend_Service_Twitter_Exception('Status must be no more than ' . self::STATUS_MAX_CHARACTERS . ' characters in length'); + } elseif (0 == $len) { + include_once 'Zend/Service/Twitter/Exception.php'; + throw new Zend_Service_Twitter_Exception('Status must contain at least one character'); + } + $data = array('status' => $status); + if (is_numeric($in_reply_to_status_id) && !empty($in_reply_to_status_id)) { + $data['in_reply_to_status_id'] = $in_reply_to_status_id; + } //$this->status = $status; - $response = $this->_post($path, $data); - return new Zend_Rest_Client_Result($response->getBody()); - } + $response = $this->_post($path, $data); + return new Zend_Rest_Client_Result($response->getBody()); + } + /** * Get status replies * @@ -410,113 +426,121 @@ public function statusUpdate ($status, $in_reply_to_status_id = null) * * @throws Zend_Http_Client_Exception if HTTP request fails or times out * @return Zend_Rest_Client_Result - */ - public function statusReplies (array $params = array()) - { - $this->_init(); - $path = '/statuses/replies.xml'; - $_params = array(); - foreach ($params as $key => $value) { - switch (strtolower($key)) { - case 'since_id': - $_params['since_id'] = $this->_validInteger($value); - break; - case 'page': - $_params['page'] = (int) $value; - break; - default: - break; - } - } - $response = $this->_get($path, $_params); - return new Zend_Rest_Client_Result($response->getBody()); - } + */ + public function statusReplies(array $params = array()) + { + $this->_init(); + $path = '/statuses/replies.xml'; + $_params = array(); + foreach ($params as $key => $value) { + switch (strtolower($key)) { + case 'since_id': + $_params['since_id'] = $this->_validInteger($value); + break; + case 'page': + $_params['page'] = (int) $value; + break; + default: + break; + } + } + $response = $this->_get($path, $_params); + return new Zend_Rest_Client_Result($response->getBody()); + } + /** * Destroy a status message * * @param int $id ID of status to destroy * @throws Zend_Http_Client_Exception if HTTP request fails or times out * @return Zend_Rest_Client_Result - */ - public function statusDestroy ($id) - { - $this->_init(); - $path = '/statuses/destroy/' . $this->_validInteger($id) . '.xml'; - $response = $this->_post($path); - return new Zend_Rest_Client_Result($response->getBody()); - } + */ + public function statusDestroy($id) + { + $this->_init(); + $path = '/statuses/destroy/' . $this->_validInteger($id) . '.xml'; + $response = $this->_post($path); + return new Zend_Rest_Client_Result($response->getBody()); + } + /** * User friends * * @param int|string $id Id or username of user for whom to fetch friends * @throws Zend_Http_Client_Exception if HTTP request fails or times out * @return Zend_Rest_Client_Result - */ - public function userFriends (array $params = array()) - { - $this->_init(); - $path = '/statuses/friends'; - $_params = array(); - foreach ($params as $key => $value) { - switch (strtolower($key)) { - case 'id': - $path .= '/' . $this->_validInteger($value); - break; - case 'page': - $_params['page'] = (int) $value; - break; - default: - break; - } - } - $path .= '.xml'; - $response = $this->_get($path, $_params); - return new Zend_Rest_Client_Result($response->getBody()); - } + */ + public function userFriends(array $params = array()) + { + $this->_init(); + $path = '/statuses/friends'; + $_params = array(); + + foreach ($params as $key => $value) { + switch (strtolower($key)) { + case 'id': + $path .= '/' . $value; + break; + case 'page': + $_params['page'] = (int) $value; + break; + default: + break; + } + } + $path .= '.xml'; + + $response = $this->_get($path, $_params); + return new Zend_Rest_Client_Result($response->getBody()); + } + /** * User Followers * * @param bool $lite If true, prevents inline inclusion of current status for followers; defaults to false * @throws Zend_Http_Client_Exception if HTTP request fails or times out * @return Zend_Rest_Client_Result - */ - public function userFollowers ($lite = false) - { - $this->_init(); - $path = '/statuses/followers.xml'; - if ($lite) { - $this->lite = 'true'; - } - $response = $this->_get($path); - return new Zend_Rest_Client_Result($response->getBody()); - } + */ + public function userFollowers($lite = false) + { + $this->_init(); + $path = '/statuses/followers.xml'; + if ($lite) { + $this->lite = 'true'; + } + $response = $this->_get($path); + return new Zend_Rest_Client_Result($response->getBody()); + } + /** * Get featured users * * @throws Zend_Http_Client_Exception if HTTP request fails or times out * @return Zend_Rest_Client_Result - */ - public function userFeatured () - { - $this->_init(); - $path = '/statuses/featured.xml'; - $response = $this->_get($path); - return new Zend_Rest_Client_Result($response->getBody()); - } + */ + public function userFeatured() + { + $this->_init(); + $path = '/statuses/featured.xml'; + $response = $this->_get($path); + return new Zend_Rest_Client_Result($response->getBody()); + } + /** * Show extended information on a user * * @param int|string $id User ID or name * @throws Zend_Http_Client_Exception if HTTP request fails or times out * @return Zend_Rest_Client_Result - */ - public function userShow ($id) - { - $this->_init(); - $path = '/users/show/' . $this->_validInteger($id) . '.xml'; - $response = $this->_get($path); - return new Zend_Rest_Client_Result($response->getBody()); - } + */ + public function userShow($id) + { + $this->_init(); + $path = '/users/show/' . $id . '.xml'; + $response = $this->_get($path); + return new Zend_Rest_Client_Result($response->getBody()); + } + /** * Retrieve direct messages for the current user * @@ -527,27 +551,28 @@ public function userShow ($id) * @param array $params * @throws Zend_Http_Client_Exception if HTTP request fails or times out * @return Zend_Rest_Client_Result - */ - public function directMessageMessages (array $params = array()) - { - $this->_init(); - $path = '/direct_messages.xml'; - $_params = array(); - foreach ($params as $key => $value) { - switch (strtolower($key)) { - case 'since_id': - $_params['since_id'] = $this->_validInteger($value); - break; - case 'page': - $_params['page'] = (int) $value; - break; - default: - break; - } - } - $response = $this->_get($path, $_params); - return new Zend_Rest_Client_Result($response->getBody()); - } + */ + public function directMessageMessages(array $params = array()) + { + $this->_init(); + $path = '/direct_messages.xml'; + $_params = array(); + foreach ($params as $key => $value) { + switch (strtolower($key)) { + case 'since_id': + $_params['since_id'] = $this->_validInteger($value); + break; + case 'page': + $_params['page'] = (int) $value; + break; + default: + break; + } + } + $response = $this->_get($path, $_params); + return new Zend_Rest_Client_Result($response->getBody()); + } + /** * Retrieve list of direct messages sent by current user * @@ -558,27 +583,28 @@ public function directMessageMessages (array $params = array()) * @param array $params * @throws Zend_Http_Client_Exception if HTTP request fails or times out * @return Zend_Rest_Client_Result - */ - public function directMessageSent (array $params = array()) - { - $this->_init(); - $path = '/direct_messages/sent.xml'; - $_params = array(); - foreach ($params as $key => $value) { - switch (strtolower($key)) { - case 'since_id': - $_params['since_id'] = $this->_validInteger($value); - break; - case 'page': - $_params['page'] = (int) $value; - break; - default: - break; - } - } - $response = $this->_get($path, $_params); - return new Zend_Rest_Client_Result($response->getBody()); - } + */ + public function directMessageSent(array $params = array()) + { + $this->_init(); + $path = '/direct_messages/sent.xml'; + $_params = array(); + foreach ($params as $key => $value) { + switch (strtolower($key)) { + case 'since_id': + $_params['since_id'] = $this->_validInteger($value); + break; + case 'page': + $_params['page'] = (int) $value; + break; + default: + break; + } + } + $response = $this->_get($path, $_params); + return new Zend_Rest_Client_Result($response->getBody()); + } + /** * Send a direct message to a user * @@ -587,114 +613,122 @@ public function directMessageSent (array $params = array()) * @return Zend_Rest_Client_Result * @throws Zend_Service_Twitter_Exception if message is too short or too long * @throws Zend_Http_Client_Exception if HTTP request fails or times out - */ - public function directMessageNew ($user, $text) - { - $this->_init(); - $path = '/direct_messages/new.xml'; - $len = iconv_strlen($text, 'UTF-8'); - if (0 == $len) { - throw new Zend_Service_Twitter_Exception('Direct message must contain at least one character'); - } elseif (140 < $len) { - throw new Zend_Service_Twitter_Exception('Direct message must contain no more than 140 characters'); - } - $data = array('user' => $user , 'text' => $text); - $response = $this->_post($path, $data); - return new Zend_Rest_Client_Result($response->getBody()); - } + */ + public function directMessageNew($user, $text) + { + $this->_init(); + $path = '/direct_messages/new.xml'; + $len = iconv_strlen($text, 'UTF-8'); + if (0 == $len) { + throw new Zend_Service_Twitter_Exception('Direct message must contain at least one character'); + } elseif (140 < $len) { + throw new Zend_Service_Twitter_Exception('Direct message must contain no more than 140 characters'); + } + $data = array('user' => $user, 'text' => $text); + $response = $this->_post($path, $data); + return new Zend_Rest_Client_Result($response->getBody()); + } + /** * Destroy a direct message * * @param int $id ID of message to destroy * @throws Zend_Http_Client_Exception if HTTP request fails or times out * @return Zend_Rest_Client_Result - */ - public function directMessageDestroy ($id) - { - $this->_init(); - $path = '/direct_messages/destroy/' . $this->_validInteger($id) . '.xml'; - $response = $this->_post($path); - return new Zend_Rest_Client_Result($response->getBody()); - } + */ + public function directMessageDestroy($id) + { + $this->_init(); + $path = '/direct_messages/destroy/' . $this->_validInteger($id) . '.xml'; + $response = $this->_post($path); + return new Zend_Rest_Client_Result($response->getBody()); + } + /** * Create friendship * * @param int|string $id User ID or name of new friend * @throws Zend_Http_Client_Exception if HTTP request fails or times out * @return Zend_Rest_Client_Result - */ - public function friendshipCreate ($id) - { - $this->_init(); - $path = '/friendships/create/' . $this->_validInteger($id) . '.xml'; - $response = $this->_post($path); - return new Zend_Rest_Client_Result($response->getBody()); - } + */ + public function friendshipCreate($id) + { + $this->_init(); + $path = '/friendships/create/' . $id . '.xml'; + $response = $this->_post($path); + return new Zend_Rest_Client_Result($response->getBody()); + } + /** * Destroy friendship * * @param int|string $id User ID or name of friend to remove * @throws Zend_Http_Client_Exception if HTTP request fails or times out * @return Zend_Rest_Client_Result - */ - public function friendshipDestroy ($id) - { - $this->_init(); - $path = '/friendships/destroy/' . $this->_validInteger($id) . '.xml'; - $response = $this->_post($path); - return new Zend_Rest_Client_Result($response->getBody()); - } + */ + public function friendshipDestroy($id) + { + $this->_init(); + $path = '/friendships/destroy/' . $id . '.xml'; + $response = $this->_post($path); + return new Zend_Rest_Client_Result($response->getBody()); + } + /** * Friendship exists * * @param int|string $id User ID or name of friend to see if they are your friend * @throws Zend_Http_Client_Exception if HTTP request fails or times out * @return Zend_Rest_Client_result - */ - public function friendshipExists ($id) - { - $this->_init(); - $path = '/friendships/exists.xml'; - $data = array('user_a' => $this->getUsername() , 'user_b' => $this->_validInteger($id)); - $response = $this->_get($path, $data); - return new Zend_Rest_Client_Result($response->getBody()); - } + */ + public function friendshipExists($id) + { + $this->_init(); + $path = '/friendships/exists.xml'; + $data = array('user_a' => $this->getUsername(), 'user_b' => $id); + $response = $this->_get($path, $data); + return new Zend_Rest_Client_Result($response->getBody()); + } + /** * Verify Account Credentials * @throws Zend_Http_Client_Exception if HTTP request fails or times out * * @return Zend_Rest_Client_Result - */ - public function accountVerifyCredentials () - { - $this->_init(); - $response = $this->_get('/account/verify_credentials.xml'); - return new Zend_Rest_Client_Result($response->getBody()); - } + */ + public function accountVerifyCredentials() + { + $this->_init(); + $response = $this->_get('/account/verify_credentials.xml'); + return new Zend_Rest_Client_Result($response->getBody()); + } + /** * End current session * * @throws Zend_Http_Client_Exception if HTTP request fails or times out * @return true - */ - public function accountEndSession () - { - $this->_init(); - $this->_get('/account/end_session'); - return true; - } + */ + public function accountEndSession() + { + $this->_init(); + $this->_get('/account/end_session'); + return true; + } + /** * Returns the number of api requests you have left per hour. * * @throws Zend_Http_Client_Exception if HTTP request fails or times out * @return Zend_Rest_Client_Result - */ - public function accountRateLimitStatus () - { - $this->_init(); - $response = $this->_get('/account/rate_limit_status.xml'); - return new Zend_Rest_Client_Result($response->getBody()); - } + */ + public function accountRateLimitStatus() + { + $this->_init(); + $response = $this->_get('/account/rate_limit_status.xml'); + return new Zend_Rest_Client_Result($response->getBody()); + } + /** * Fetch favorites * @@ -705,68 +739,144 @@ public function accountRateLimitStatus () * @param array $params * @throws Zend_Http_Client_Exception if HTTP request fails or times out * @return Zend_Rest_Client_Result - */ - public function favoriteFavorites (array $params = array()) - { - $this->_init(); - $path = '/favorites'; - $_params = array(); - foreach ($params as $key => $value) { - switch (strtolower($key)) { - case 'id': - $path .= '/' . $this->_validInteger($value); - break; - case 'page': - $_params['page'] = (int) $value; - break; - default: - break; - } - } - $path .= '.xml'; - $response = $this->_get($path, $_params); - return new Zend_Rest_Client_Result($response->getBody()); - } + */ + public function favoriteFavorites(array $params = array()) + { + $this->_init(); + $path = '/favorites'; + $_params = array(); + foreach ($params as $key => $value) { + switch (strtolower($key)) { + case 'id': + $path .= '/' . $this->_validInteger($value); + break; + case 'page': + $_params['page'] = (int) $value; + break; + default: + break; + } + } + $path .= '.xml'; + $response = $this->_get($path, $_params); + return new Zend_Rest_Client_Result($response->getBody()); + } + /** * Mark a status as a favorite * * @param int $id Status ID you want to mark as a favorite * @throws Zend_Http_Client_Exception if HTTP request fails or times out * @return Zend_Rest_Client_Result - */ - public function favoriteCreate ($id) - { - $this->_init(); - $path = '/favorites/create/' . $this->_validInteger($id) . '.xml'; - $response = $this->_post($path); - return new Zend_Rest_Client_Result($response->getBody()); - } + */ + public function favoriteCreate($id) + { + $this->_init(); + $path = '/favorites/create/' . $this->_validInteger($id) . '.xml'; + $response = $this->_post($path); + return new Zend_Rest_Client_Result($response->getBody()); + } + /** * Remove a favorite * * @param int $id Status ID you want to de-list as a favorite * @throws Zend_Http_Client_Exception if HTTP request fails or times out * @return Zend_Rest_Client_Result - */ - public function favoriteDestroy ($id) - { - $this->_init(); - $path = '/favorites/destroy/' . $this->_validInteger($id) . '.xml'; - $response = $this->_post($path); - return new Zend_Rest_Client_Result($response->getBody()); - } + */ + public function favoriteDestroy($id) + { + $this->_init(); + $path = '/favorites/destroy/' . $this->_validInteger($id) . '.xml'; + $response = $this->_post($path); + return new Zend_Rest_Client_Result($response->getBody()); + } + + /** + * Blocks the user specified in the ID parameter as the authenticating user. + * Destroys a friendship to the blocked user if it exists. + * + * @param integer|string $id The ID or screen name of a user to block. + * @return Zend_Rest_Client_Result + */ + public function blockCreate($id) + { + $this->_init(); + $path = '/blocks/create/' . $id . '.xml'; + $response = $this->_post($path); + return new Zend_Rest_Client_Result($response->getBody()); + } + + /** + * Un-blocks the user specified in the ID parameter for the authenticating user + * + * @param integer|string $id The ID or screen_name of the user to un-block. + * @return Zend_Rest_Client_Result + */ + public function blockDestroy($id) + { + $this->_init(); + $path = '/blocks/destroy/' . $id . '.xml'; + $response = $this->_post($path); + return new Zend_Rest_Client_Result($response->getBody()); + } + + /** + * Returns if the authenticating user is blocking a target user. + * + * @param string|integer $id The ID or screen_name of the potentially blocked user. + * @param boolean $returnResult Instead of returning a boolean return the rest response from twitter + * @return Boolean|Zend_Rest_Client_Result + */ + public function blockExists($id, $returnResult = false) + { + $this->_init(); + $path = '/blocks/exists/' . $id . '.xml'; + $response = $this->_get($path); + + $cr = new Zend_Rest_Client_Result($response->getBody()); + + if ($returnResult === true) + return $cr; + + if (!empty($cr->request)) { + return false; + } + + return true; + } + + /** + * Returns an array of user objects that the authenticating user is blocking + * + * @param integer $page Optional. Specifies the page number of the results beginning at 1. A single page contains 20 ids. + * @param boolean $returnUserIds Optional. Returns only the userid's instead of the whole user object + * @return Zend_Rest_Client_Result + */ + public function blockBlocking($page = 1, $returnUserIds = false) + { + $this->_init(); + $path = '/blocks/blocking'; + if ($returnUserIds === true) { + $path .= '/ids'; + } + $path .= '.xml'; + $response = $this->_get($path, array('page' => $page)); + return new Zend_Rest_Client_Result($response->getBody()); + } + /** * Protected function to validate that the integer is valid or return a 0 * @param $int * @throws Zend_Http_Client_Exception if HTTP request fails or times out * @return integer - */ - protected function _validInteger ($int) - { - if (preg_match("/(\d+)/", $int)) { - return $int; - } - return 0; + */ + protected function _validInteger($int) + { + if (preg_match("/(\d+)/", $int)) { + return $int; + } + return 0; } /** @@ -780,9 +890,7 @@ protected function _validateScreenName($name) { if (!preg_match('/^[a-zA-Z0-9_]{0,20}$/', $name)) { #require_once 'Zend/Service/Twitter/Exception.php'; - throw new Zend_Service_Twitter_Exception('Screen name, "' - . $name . '" should only contain alphanumeric characters and' - . ' underscores, and not exceed 15 characters.'); + throw new Zend_Service_Twitter_Exception('Screen name, "' . $name . '" should only contain alphanumeric characters and' . ' underscores, and not exceed 15 characters.'); } return $name; } @@ -801,15 +909,15 @@ protected function _prepare($path) #require_once 'Zend/Rest/Client/Exception.php'; throw new Zend_Rest_Client_Exception('URI object must be set before performing call'); } - + $uri = $this->_uri->getUri(); - - if ($path[0] != '/' && $uri[strlen($uri)-1] != '/') { + + if ($path[0] != '/' && $uri[strlen($uri) - 1] != '/') { $path = '/' . $path; } - + $this->_uri->setPath($path); - + /** * Get the HTTP client and configure it for the endpoint URI. Do this each time * because the Zend_Http_Client instance is shared among all Zend_Service_Abstract subclasses. @@ -867,5 +975,5 @@ protected function _performPost($method, $data = null) } return $client->request($method); } - + } diff --git a/lib/Zend/Test/DbAdapter.php b/lib/Zend/Test/DbAdapter.php index 4b4e4a1a8e..82790a1ddd 100644 --- a/lib/Zend/Test/DbAdapter.php +++ b/lib/Zend/Test/DbAdapter.php @@ -17,7 +17,7 @@ * @subpackage PHPUnit * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @version $Id: DbAdapter.php 17853 2009-08-27 21:05:21Z beberlei $ + * @version $Id: DbAdapter.php 18391 2009-09-24 18:11:51Z beberlei $ */ /** @@ -30,6 +30,11 @@ */ #require_once "Zend/Test/DbStatement.php"; +/** + * @see Zend_Db_Profiler + */ +#require_once 'Zend/Db/Profiler.php'; + /** * Testing Database Adapter which acts as a stack for SQL Results * @@ -72,7 +77,9 @@ class Zend_Test_DbAdapter extends Zend_Db_Adapter_Abstract */ public function __construct() { - $this->setProfiler(false); + $profiler = new Zend_Db_Profiler(); + $profiler->setEnabled(true); + $this->setProfiler($profiler); } /** @@ -215,11 +222,20 @@ public function closeConnection() */ public function prepare($sql) { + $queryId = $this->getProfiler()->queryStart($sql); + if(count($this->_statementStack)) { - return array_pop($this->_statementStack); + $stmt = array_pop($this->_statementStack); } else { - return new Zend_Test_DbStatement(); + $stmt = new Zend_Test_DbStatement(); + } + + if($this->getProfiler()->getEnabled() == true) { + $qp = $this->getProfiler()->getQueryProfile($queryId); + $stmt->setQueryProfile($qp); } + + return $stmt; } /** diff --git a/lib/Zend/Test/DbStatement.php b/lib/Zend/Test/DbStatement.php index f48fb9f703..a924876fc8 100644 --- a/lib/Zend/Test/DbStatement.php +++ b/lib/Zend/Test/DbStatement.php @@ -17,7 +17,7 @@ * @subpackage PHPUnit * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @version $Id: DbStatement.php 16911 2009-07-21 11:54:03Z matthew $ + * @version $Id: DbStatement.php 18391 2009-09-24 18:11:51Z beberlei $ */ #require_once "Zend/Db/Statement/Interface.php"; @@ -48,6 +48,11 @@ class Zend_Test_DbStatement implements Zend_Db_Statement_Interface */ protected $_rowCount = 0; + /** + * @var Zend_Db_Profiler_Query + */ + protected $_queryProfile = null; + /** * Create a Select statement which returns the given array of rows. * @@ -109,6 +114,14 @@ static protected function _createRowCountStatement($affectedRows) return $stmt; } + /** + * @param Zend_Db_Profiler_Query $qp + */ + public function setQueryProfile(Zend_Db_Profiler_Query $qp) + { + $this->_queryProfile = $qp; + } + /** * @param int $rowCount */ @@ -156,6 +169,9 @@ public function bindColumn($column, &$param, $type = null) */ public function bindParam($parameter, &$variable, $type = null, $length = null, $options = null) { + if($this->_queryProfile !== null) { + $this->_queryProfile->bindParam($parameter, $variable); + } return true; } @@ -229,6 +245,10 @@ public function errorInfo() */ public function execute(array $params = array()) { + if($this->_queryProfile !== null) { + $this->_queryProfile->bindParams($params); + $this->_queryProfile->end(); + } return true; } diff --git a/lib/Zend/Test/PHPUnit/Db/Operation/Truncate.php b/lib/Zend/Test/PHPUnit/Db/Operation/Truncate.php index 8b4f1e137e..489560e35f 100644 --- a/lib/Zend/Test/PHPUnit/Db/Operation/Truncate.php +++ b/lib/Zend/Test/PHPUnit/Db/Operation/Truncate.php @@ -17,7 +17,7 @@ * @subpackage PHPUnit * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @version $Id: Truncate.php 16607 2009-07-09 21:51:46Z beberlei $ + * @version $Id: Truncate.php 18470 2009-10-03 10:10:54Z beberlei $ */ #require_once "PHPUnit/Extensions/Database/Operation/IDatabaseOperation.php"; @@ -58,10 +58,10 @@ public function execute(PHPUnit_Extensions_Database_DB_IDatabaseConnection $conn throw new Zend_Test_PHPUnit_Db_Exception("Not a valid Zend_Test_PHPUnit_Db_Connection instance, ".get_class($connection)." given!"); } - foreach ($dataSet as $table) { + foreach ($dataSet->getReverseIterator() AS $table) { try { $tableName = $table->getTableMetaData()->getTableName(); - $this->truncate($connection->getConnection(), $tableName); + $this->_truncate($connection->getConnection(), $tableName); } catch (Exception $e) { throw new PHPUnit_Extensions_Database_Operation_Exception('TRUNCATE', 'TRUNCATE '.$tableName.'', array(), $table, $e->getMessage()); } @@ -75,7 +75,7 @@ public function execute(PHPUnit_Extensions_Database_DB_IDatabaseConnection $conn * @param string $tableName * @return void */ - private function truncate(Zend_Db_Adapter_Abstract $db, $tableName) + protected function _truncate(Zend_Db_Adapter_Abstract $db, $tableName) { $tableName = $db->quoteIdentifier($tableName); if($db instanceof Zend_Db_Adapter_Pdo_Sqlite) { @@ -89,10 +89,26 @@ private function truncate(Zend_Db_Adapter_Abstract $db, $tableName) } else { $db->query('IMPORT FROM /dev/null OF DEL REPLACE INTO '.$tableName); } - } else if($db instanceof Zend_Db_Adapter_Pdo_Mssql) { + } else if($this->_isMssqlOrOracle($db)) { $db->query('TRUNCATE TABLE '.$tableName); } else { $db->query('TRUNCATE '.$tableName); } } + + /** + * Detect if an adapter is for Mssql or Oracle Databases. + * + * @param Zend_Db_Adapter_Abstract $db + * @return bool + */ + private function _isMssqlOrOracle($db) + { + return ( + $db instanceof Zend_Db_Adapter_Pdo_Mssql || + $db instanceof Zend_Db_Adapter_Sqlsrv || + $db instanceof Zend_Db_Adapter_Pdo_Oci || + $db instanceof Zend_Db_Adapter_Oracle + ); + } } \ No newline at end of file diff --git a/lib/Zend/Validate/File/MimeType.php b/lib/Zend/Validate/File/MimeType.php index 6e9dfb7642..d728abe570 100644 --- a/lib/Zend/Validate/File/MimeType.php +++ b/lib/Zend/Validate/File/MimeType.php @@ -16,7 +16,7 @@ * @package Zend_Validate * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @version $Id: MimeType.php 18148 2009-09-16 19:27:43Z thomas $ + * @version $Id: MimeType.php 18513 2009-10-12 16:17:35Z matthew $ */ /** @@ -79,6 +79,22 @@ class Zend_Validate_File_MimeType extends Zend_Validate_Abstract */ protected $_magicfile; + /** + * If no $_ENV['MAGIC'] is set, try and autodiscover it based on common locations + * @var array + */ + protected $_magicFiles = array( + '/usr/share/misc/magic', + '/usr/share/misc/magic.mime', + '/usr/share/misc/magic.mgc', + '/usr/share/mime/magic', + '/usr/share/mime/magic.mime', + '/usr/share/mime/magic.mgc', + '/usr/share/file/magic', + '/usr/share/file/magic.mime', + '/usr/share/file/magic.mgc', + ); + /** * Option to allow header check * @@ -123,6 +139,14 @@ public function __construct($mimetype) */ public function getMagicFile() { + if (null === $this->_magicfile && empty($_ENV['MAGIC'])) { + foreach ($this->_magicFiles as $file) { + if (file_exists($file)) { + $this->setMagicFile($file); + break; + } + } + } return $this->_magicfile; } diff --git a/lib/Zend/Version.php b/lib/Zend/Version.php index ddde5d6eb1..125e228aa6 100644 --- a/lib/Zend/Version.php +++ b/lib/Zend/Version.php @@ -16,7 +16,7 @@ * @package Zend_Version * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @version $Id: Version.php 18374 2009-09-22 19:35:47Z matthew $ + * @version $Id: Version.php 18516 2009-10-12 16:42:32Z matthew $ */ /** @@ -32,7 +32,7 @@ final class Zend_Version /** * Zend Framework version identification - see compareVersion() */ - const VERSION = '1.9.3PL1'; + const VERSION = '1.9.4'; /** * Compare the specified Zend Framework version string $version @@ -46,6 +46,8 @@ final class Zend_Version */ public static function compareVersion($version) { - return version_compare($version, self::VERSION); + $version = strtolower($version); + $version = preg_replace('/(\d)pr(\d?)/', '$1a$2', $version); + return version_compare($version, strtolower(self::VERSION)); } } diff --git a/lib/Zend/XmlRpc/Request/Http.php b/lib/Zend/XmlRpc/Request/Http.php index 8d83221747..7fc731c258 100644 --- a/lib/Zend/XmlRpc/Request/Http.php +++ b/lib/Zend/XmlRpc/Request/Http.php @@ -34,7 +34,7 @@ * @package Zend_XmlRpc * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @version $Id: Http.php 16208 2009-06-21 19:19:26Z thomas $ + * @version $Id: Http.php 18443 2009-09-30 13:35:47Z lars $ */ class Zend_XmlRpc_Request_Http extends Zend_XmlRpc_Request { @@ -61,18 +61,13 @@ class Zend_XmlRpc_Request_Http extends Zend_XmlRpc_Request */ public function __construct() { - $fh = fopen('php://input', 'r'); - if (!$fh) { - $this->_fault = new Zend_XmlRpc_Server_Exception(630); + $xml = @file_get_contents('php://input'); + if (!$xml) { + #require_once 'Zend/XmlRpc/Fault.php'; + $this->_fault = new Zend_XmlRpc_Fault(630); return; } - $xml = ''; - while (!feof($fh)) { - $xml .= fgets($fh); - } - fclose($fh); - $this->_xml = $xml; $this->loadXml($xml); diff --git a/lib/Zend/XmlRpc/Server/System.php b/lib/Zend/XmlRpc/Server/System.php index a6281d4220..a541565ea5 100644 --- a/lib/Zend/XmlRpc/Server/System.php +++ b/lib/Zend/XmlRpc/Server/System.php @@ -17,7 +17,7 @@ * @subpackage Server * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @version $Id: System.php 17803 2009-08-24 21:22:58Z matthew $ + * @version $Id: System.php 18443 2009-09-30 13:35:47Z lars $ */ /** @@ -38,8 +38,8 @@ class Zend_XmlRpc_Server_System /** * Constructor - * - * @param Zend_XmlRpc_Server $server + * + * @param Zend_XmlRpc_Server $server * @return void */ public function __construct(Zend_XmlRpc_Server $server) diff --git a/lib/Zend/XmlRpc/Value.php b/lib/Zend/XmlRpc/Value.php index 2a60a24399..65ca4ae5f9 100644 --- a/lib/Zend/XmlRpc/Value.php +++ b/lib/Zend/XmlRpc/Value.php @@ -17,7 +17,7 @@ * @subpackage Value * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @version $Id: Value.php 18139 2009-09-16 14:46:02Z yoshida@zend.co.jp $ + * @version $Id: Value.php 18443 2009-09-30 13:35:47Z lars $ */ /** @@ -73,16 +73,19 @@ abstract class Zend_XmlRpc_Value /** * All the XML-RPC native types */ - const XMLRPC_TYPE_I4 = 'i4'; - const XMLRPC_TYPE_INTEGER = 'int'; - const XMLRPC_TYPE_DOUBLE = 'double'; - const XMLRPC_TYPE_BOOLEAN = 'boolean'; - const XMLRPC_TYPE_STRING = 'string'; - const XMLRPC_TYPE_DATETIME = 'dateTime.iso8601'; - const XMLRPC_TYPE_BASE64 = 'base64'; - const XMLRPC_TYPE_ARRAY = 'array'; - const XMLRPC_TYPE_STRUCT = 'struct'; - const XMLRPC_TYPE_NIL = 'nil'; + const XMLRPC_TYPE_I4 = 'i4'; + const XMLRPC_TYPE_INTEGER = 'int'; + const XMLRPC_TYPE_I8 = 'i8'; + const XMLRPC_TYPE_APACHEI8 = 'ex:i8'; + const XMLRPC_TYPE_DOUBLE = 'double'; + const XMLRPC_TYPE_BOOLEAN = 'boolean'; + const XMLRPC_TYPE_STRING = 'string'; + const XMLRPC_TYPE_DATETIME = 'dateTime.iso8601'; + const XMLRPC_TYPE_BASE64 = 'base64'; + const XMLRPC_TYPE_ARRAY = 'array'; + const XMLRPC_TYPE_STRUCT = 'struct'; + const XMLRPC_TYPE_NIL = 'nil'; + const XMLRPC_TYPE_APACHENIL = 'ex:nil'; /** @@ -127,6 +130,10 @@ public function getAsDOM() return $this->_as_dom; } + /** + * @param DOMDocument $dom + * @return mixed + */ protected function _stripXmlDeclaration(DOMDocument $dom) { return preg_replace('/<\?xml version="1.0"( encoding="[^\"]*")?\?>\n/u', '', $dom->saveXML()); @@ -165,6 +172,12 @@ public static function getXmlRpcValue($value, $type = self::AUTO_DETECT_TYPE) #require_once 'Zend/XmlRpc/Value/Integer.php'; return new Zend_XmlRpc_Value_Integer($value); + case self::XMLRPC_TYPE_I8: + // fall through to the next case + case self::XMLRPC_TYPE_APACHEI8: + #require_once 'Zend/XmlRpc/Value/BigInteger.php'; + return new Zend_XmlRpc_Value_BigInteger($value); + case self::XMLRPC_TYPE_DOUBLE: #require_once 'Zend/XmlRpc/Value/Double.php'; return new Zend_XmlRpc_Value_Double($value); @@ -182,6 +195,8 @@ public static function getXmlRpcValue($value, $type = self::AUTO_DETECT_TYPE) return new Zend_XmlRpc_Value_Base64($value); case self::XMLRPC_TYPE_NIL: + // fall through to the next case + case self::XMLRPC_TYPE_APACHENIL: #require_once 'Zend/XmlRpc/Value/Nil.php'; return new Zend_XmlRpc_Value_Nil(); @@ -240,6 +255,10 @@ private static function _phpVarToNativeXmlRpc($value) #require_once 'Zend/XmlRpc/Value/Integer.php'; return new Zend_XmlRpc_Value_Integer($value); + case 'i8': + #require_once 'Zend/XmlRpc/Value/BigInteger.php'; + return new Zend_XmlRpc_Value_BigInteger($value); + case 'double': #require_once 'Zend/XmlRpc/Value/Double.php'; return new Zend_XmlRpc_Value_Double($value); @@ -276,7 +295,7 @@ private static function _xmlStringToNativeXmlRpc($xml) { if (!$xml instanceof SimpleXMLElement) { try { - $xml = @new SimpleXMLElement($xml); + $xml = new SimpleXMLElement($xml); } catch (Exception $e) { // The given string is not a valid XML #require_once 'Zend/XmlRpc/Value/Exception.php'; @@ -284,8 +303,22 @@ private static function _xmlStringToNativeXmlRpc($xml) } } - // Get the key (tag name) and value from the simple xml object and convert the value to an XML-RPC native value + $type = null; + $value = null; list($type, $value) = each($xml); + + if (!$type and $value === null) { + $namespaces = array('ex' => 'http://ws.apache.org/xmlrpc/namespaces/extensions'); + foreach ($namespaces as $namespaceName => $namespaceUri) { + $namespaceXml = $xml->children($namespaceUri); + list($type, $value) = each($namespaceXml); + if ($type !== null) { + $type = $namespaceName . ':' . $type; + break; + } + } + } + if (!$type) { // If no type was specified, the default is string $type = self::XMLRPC_TYPE_STRING; } @@ -296,31 +329,40 @@ private static function _xmlStringToNativeXmlRpc($xml) // Fall through to the next case case self::XMLRPC_TYPE_INTEGER: #require_once 'Zend/XmlRpc/Value/Integer.php'; - $xmlrpc_val = new Zend_XmlRpc_Value_Integer($value); + $xmlrpcValue = new Zend_XmlRpc_Value_Integer($value); + break; + case self::XMLRPC_TYPE_APACHEI8: + // Fall through to the next case + case self::XMLRPC_TYPE_I8: + #require_once 'Zend/XmlRpc/Value/BigInteger.php'; + $xmlrpcValue = new Zend_XmlRpc_Value_BigInteger($value); break; case self::XMLRPC_TYPE_DOUBLE: #require_once 'Zend/XmlRpc/Value/Double.php'; - $xmlrpc_val = new Zend_XmlRpc_Value_Double($value); + $xmlrpcValue = new Zend_XmlRpc_Value_Double($value); break; case self::XMLRPC_TYPE_BOOLEAN: #require_once 'Zend/XmlRpc/Value/Boolean.php'; - $xmlrpc_val = new Zend_XmlRpc_Value_Boolean($value); + $xmlrpcValue = new Zend_XmlRpc_Value_Boolean($value); break; case self::XMLRPC_TYPE_STRING: #require_once 'Zend/XmlRpc/Value/String.php'; - $xmlrpc_val = new Zend_XmlRpc_Value_String($value); + $xmlrpcValue = new Zend_XmlRpc_Value_String($value); break; case self::XMLRPC_TYPE_DATETIME: // The value should already be in a iso8601 format #require_once 'Zend/XmlRpc/Value/DateTime.php'; - $xmlrpc_val = new Zend_XmlRpc_Value_DateTime($value); + $xmlrpcValue = new Zend_XmlRpc_Value_DateTime($value); break; case self::XMLRPC_TYPE_BASE64: // The value should already be base64 encoded #require_once 'Zend/XmlRpc/Value/Base64.php'; - $xmlrpc_val = new Zend_XmlRpc_Value_Base64($value ,true); + $xmlrpcValue = new Zend_XmlRpc_Value_Base64($value, true); break; - case self::XMLRPC_TYPE_NIL: // The value should always be NULL + case self::XMLRPC_TYPE_NIL: + // Fall through to the next case + case self::XMLRPC_TYPE_APACHENIL: + // The value should always be NULL #require_once 'Zend/XmlRpc/Value/Nil.php'; - $xmlrpc_val = new Zend_XmlRpc_Value_Nil(); + $xmlrpcValue = new Zend_XmlRpc_Value_Nil(); break; case self::XMLRPC_TYPE_ARRAY: // PHP 5.2.4 introduced a regression in how empty($xml->value) @@ -344,7 +386,7 @@ private static function _xmlStringToNativeXmlRpc($xml) $values[] = self::_xmlStringToNativeXmlRpc($element); } #require_once 'Zend/XmlRpc/Value/Array.php'; - $xmlrpc_val = new Zend_XmlRpc_Value_Array($values); + $xmlrpcValue = new Zend_XmlRpc_Value_Array($values); break; case self::XMLRPC_TYPE_STRUCT: $values = array(); @@ -360,19 +402,22 @@ private static function _xmlStringToNativeXmlRpc($xml) $values[(string)$member->name] = self::_xmlStringToNativeXmlRpc($member->value); } #require_once 'Zend/XmlRpc/Value/Struct.php'; - $xmlrpc_val = new Zend_XmlRpc_Value_Struct($values); + $xmlrpcValue = new Zend_XmlRpc_Value_Struct($values); break; default: #require_once 'Zend/XmlRpc/Value/Exception.php'; throw new Zend_XmlRpc_Value_Exception('Value type \''. $type .'\' parsed from the XML string is not a known XML-RPC native type'); break; } - $xmlrpc_val->_setXML($xml->asXML()); + $xmlrpcValue->_setXML($xml->asXML()); - return $xmlrpc_val; + return $xmlrpcValue; } - + /** + * @param $xml + * @return void + */ private function _setXML($xml) { $this->_as_xml = $xml; diff --git a/lib/Zend/XmlRpc/Value/Base64.php b/lib/Zend/XmlRpc/Value/Base64.php index dd3649615d..1f5b7515fe 100644 --- a/lib/Zend/XmlRpc/Value/Base64.php +++ b/lib/Zend/XmlRpc/Value/Base64.php @@ -17,7 +17,7 @@ * @subpackage Value * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @version $Id: Base64.php 16208 2009-06-21 19:19:26Z thomas $ + * @version $Id: Base64.php 18443 2009-09-30 13:35:47Z lars $ */ @@ -68,7 +68,7 @@ public function getValue() /** * Return the XML code representing the base64-encoded value - * + * * @return string */ public function saveXML() diff --git a/lib/Zend/XmlRpc/Value/BigInteger.php b/lib/Zend/XmlRpc/Value/BigInteger.php new file mode 100644 index 0000000000..28c7d96809 --- /dev/null +++ b/lib/Zend/XmlRpc/Value/BigInteger.php @@ -0,0 +1,65 @@ +_integer = new Zend_Crypt_Math_BigInteger(); + $this->_value = $this->_integer->init($this->_value); + + $this->_type = self::XMLRPC_TYPE_I8; + } + + /** + * Return bigint value object + * + * @return Zend_Crypt_Math_BigInteger + */ + public function getValue() + { + return $this->_integer; + } +} diff --git a/lib/Zend/XmlRpc/Value/Integer.php b/lib/Zend/XmlRpc/Value/Integer.php index c628d545b7..94a61c9549 100644 --- a/lib/Zend/XmlRpc/Value/Integer.php +++ b/lib/Zend/XmlRpc/Value/Integer.php @@ -17,7 +17,7 @@ * @subpackage Value * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @version $Id: Integer.php 17759 2009-08-22 21:26:21Z lars $ + * @version $Id: Integer.php 18443 2009-09-30 13:35:47Z lars $ */ @@ -62,6 +62,4 @@ public function getValue() { return $this->_value; } - } - diff --git a/lib/Zend/XmlRpc/Value/Scalar.php b/lib/Zend/XmlRpc/Value/Scalar.php index 16c4cfcff3..c65036bea6 100644 --- a/lib/Zend/XmlRpc/Value/Scalar.php +++ b/lib/Zend/XmlRpc/Value/Scalar.php @@ -17,7 +17,7 @@ * @subpackage Value * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @version $Id: Scalar.php 16208 2009-06-21 19:19:26Z thomas $ + * @version $Id: Scalar.php 18443 2009-09-30 13:35:47Z lars $ */ @@ -57,4 +57,3 @@ public function saveXML() return $this->_as_xml; } } - diff --git a/shell/abstract.php b/shell/abstract.php new file mode 100644 index 0000000000..760c5a7f5a --- /dev/null +++ b/shell/abstract.php @@ -0,0 +1,170 @@ + + */ +abstract class Mage_Shell_Abstract +{ + /** + * Is include Mage and initialize application + * + * @var bool + */ + protected $_includeMage = true; + + /** + * Initialize application with code (store, website code) + * + * @var string + */ + protected $_appCode = 'admin'; + + /** + * Initialize application code type (store, website, store_group) + * + * @var string + */ + protected $_appType = 'store'; + + /** + * Input arguments + * + * @var array + */ + protected $_args = array(); + + /** + * Initialize application and parse input parameters + * + */ + public function __construct() + { + if ($this->_includeMage) { + require_once '../app/Mage.php'; + Mage::app($this->_appCode, $this->_appType); + } + + $this->_parseArgs(); + $this->_construct(); + $this->_validate(); + $this->_showHelp(); + } + + /** + * Parse input arguments + * + * @return Mage_Shell_Abstract + */ + protected function _parseArgs() + { + $current = null; + foreach ($_SERVER['argv'] as $arg) { + $match = array(); + if (preg_match('#^--([\w\d_-]{1,})$#', $arg, $match) || preg_match('#^-([\w\d_]{1,})$#', $arg, $match)) { + $current = $match[1]; + $this->_args[$current] = true; + } else { + if ($current) { + $this->_args[$current] = $arg; + } else if (preg_match('#^([\w\d_]{1,})$#', $arg, $match)) { + $this->_args[$match[1]] = true; + } + } + } + return $this; + } + + /** + * Additional initialize instruction + * + * @return Mage_Shell_Abstract + */ + protected function _construct() + { + return $this; + } + + /** + * Validate arguments + * + */ + protected function _validate() + { + if (isset($_SERVER['REQUEST_METHOD'])) { + die('This script cannot be run from Browser. This is the shell script.'); + } + } + + /** + * Run script + * + */ + abstract public function run(); + + /** + * Check is show usage help + * + */ + protected function _showHelp() + { + if (isset($this->_args['h']) || isset($this->_args['help'])) { + die($this->usageHelp()); + } + } + + /** + * Retrieve Usage Help Message + * + */ + public function usageHelp() + { + return <<_args[$name])) { + return $this->_args[$name]; + } + return false; + } +} diff --git a/shell/compiler.php b/shell/compiler.php new file mode 100644 index 0000000000..2bc846efdb --- /dev/null +++ b/shell/compiler.php @@ -0,0 +1,132 @@ + + */ +class Mage_Shell_Compiler extends Mage_Shell_Abstract +{ + /** + * Compiler process object + * + * @var Mage_Compiler_Model_Process + */ + protected $_compiler; + + /** + * Get compiler process object + * + * @return Mage_Compiler_Model_Process + */ + protected function _getCompiler() + { + if ($this->_compiler === null) { + $this->_compiler = Mage::getModel('compiler/process'); + } + return $this->_compiler; + } + + /** + * Run script + * + */ + public function run() + { + if (isset($this->_args['disable'])) { + $this->_getCompiler()->registerIncludePath(false); + echo "Compiler include path disabled\n"; + } else if (isset($this->_args['enable'])) { + if ($this->_getCompiler()->getCompiledFilesCount() == 0) { + die("Compilation State: Not Compiled\nPlease run with option compile\n"); + } + + $this->_getCompiler()->registerIncludePath(); + echo "Compiler include path enabled\n"; + } else if (isset($this->_args['compile'])) { + try { + $this->_getCompiler()->run(); + echo "Compilation successfully finished\n"; + } catch (Mage_Core_Exception $e) { + echo $e->getMessage() . "\n"; + } catch (Exception $e) { + echo "Compilation unknown error:\n\n"; + echo $e . "\n"; + } + } else if (isset($this->_args['clear'])) { + try { + $this->_getCompiler()->clear(); + echo "Compilation successfully cleared\n"; + } catch (Mage_Core_Exception $e) { + echo $e->getMessage() . "\n"; + } catch (Exception $e) { + echo "Compilation unknown error:\n\n"; + echo $e . "\n"; + } + } else if (isset($this->_args['state']) || isset($this->_args['fullstate'])) { + $compiler = $this->_getCompiler(); + $compilerConfig = '../includes/config.php'; + if (file_exists($compilerConfig)) { + include $compilerConfig; + } + $status = defined('COMPILER_INCLUDE_PATH') ? 'Enabled' : 'Disabled'; + $state = $compiler->getCollectedFilesCount() > 0 ? 'Compiled' : 'Not Compiled'; + echo "Compiler Status: " . $status . "\n"; + echo "Compilation State: " . $state . "\n"; + echo "Collected Files Count: " . $compiler->getCollectedFilesCount() . "\n"; + echo "Compiled Scopes Count: " . $compiler->getCompiledFilesCount() . "\n"; + } else { + echo $this->usageHelp(); + } + } + + /** + * Retrieve Usage Help Message + * + */ + public function usageHelp() + { + return <<run(); diff --git a/shell/indexer.php b/shell/indexer.php new file mode 100644 index 0000000000..c9185395c3 --- /dev/null +++ b/shell/indexer.php @@ -0,0 +1,198 @@ + + */ +class Mage_Shell_Compiler extends Mage_Shell_Abstract +{ + /** + * Get Indexer instance + * + * @return Mage_Index_Model_Indexer + */ + protected function _getIndexer() + { + return Mage::getSingleton('index/indexer'); + } + + /** + * Parse string with indexers and return array of indexer instances + * + * @param string $string + * @return array + */ + protected function _parseIndexerString($string) + { + $processes = array(); + if ($string == 'all') { + $collection = $this->_getIndexer()->getProcessesCollection(); + foreach ($collection as $process) { + $processes[] = $process; + } + } else if (!empty($string)) { + $codes = explode(',', $string); + foreach ($codes as $code) { + $process = $this->_getIndexer()->getProcessByCode(trim($code)); + if (!$process) { + echo 'Warning: Unknown indexer with code ' . trim($code) . "\n"; + } else { + $processes[] = $process; + } + } + } + return $processes; + } + + /** + * Run script + * + */ + public function run() + { + if ($this->getArg('info')) { + $processes = $this->_parseIndexerString('all'); + foreach ($processes as $process) { + /* @var $process Mage_Index_Model_Process */ + echo sprintf('%-30s', $process->getIndexerCode()); + echo $process->getIndexer()->getName() . "\n"; + } + } else if ($this->getArg('status') || $this->getArg('mode')) { + if ($this->getArg('status')) { + $processes = $this->_parseIndexerString($this->getArg('status')); + } else { + $processes = $this->_parseIndexerString($this->getArg('mode')); + } + foreach ($processes as $process) { + /* @var $process Mage_Index_Model_Process */ + $status = 'unknown'; + if ($this->getArg('status')) { + switch ($process->getStatus()) { + case Mage_Index_Model_Process::STATUS_PENDING: + $status = 'Pending'; + break; + case Mage_Index_Model_Process::STATUS_REQUIRE_REINDEX: + $status = 'Require Reindex'; + break; + + case Mage_Index_Model_Process::STATUS_RUNNING: + $status = 'Running'; + break; + + default: + $status = 'Ready'; + break; + } + } else { + switch ($process->getMode()) { + case Mage_Index_Model_Process::MODE_REAL_TIME: + $status = 'Update on Save'; + break; + case Mage_Index_Model_Process::MODE_MANUAL: + $status = 'Manual Update'; + break; + } + } + echo sprintf('%-30s ', $process->getIndexer()->getName() . ':') . $status ."\n"; + + } + } else if ($this->getArg('mode-realtime') || $this->getArg('mode-manual')) { + if ($this->getArg('mode-realtime')) { + $mode = Mage_Index_Model_Process::MODE_REAL_TIME; + $processes = $this->_parseIndexerString($this->getArg('mode-realtime')); + } else { + $mode = Mage_Index_Model_Process::MODE_MANUAL; + $processes = $this->_parseIndexerString($this->getArg('mode-manual')); + } + foreach ($processes as $process) { + /* @var $process Mage_Index_Model_Process */ + try { + $process->setMode($mode)->save(); + echo $process->getIndexer()->getName() . " index was successfully changed index mode\n"; + } catch (Mage_Core_Exception $e) { + echo $e->getMessage() . "\n"; + } catch (Exception $e) { + echo $process->getIndexer()->getName() . " index process unknown error:\n"; + echo $e . "\n"; + } + } + } else if ($this->getArg('reindex') || $this->getArg('reindexall')) { + if ($this->getArg('reindex')) { + $processes = $this->_parseIndexerString($this->getArg('reindex')); + } else { + $processes = $this->_parseIndexerString('all'); + } + + foreach ($processes as $process) { + /* @var $process Mage_Index_Model_Process */ + try { + $process->reindexEverything(); + echo $process->getIndexer()->getName() . " index was rebuilt successfully\n"; + } catch (Mage_Core_Exception $e) { + echo $e->getMessage() . "\n"; + } catch (Exception $e) { + echo $process->getIndexer()->getName() . " index process unknown error:\n"; + echo $e . "\n"; + } + } + + } else { + echo $this->usageHelp(); + } + } + + /** + * Retrieve Usage Help Message + * + */ + public function usageHelp() + { + return << Show Indexer(s) Status + --mode Show Indexer(s) Index Mode + --mode-realtime Set index mode type "Update on Save" + --mode-manual Set index mode type "Manual Update" + --reindex Reindex Data + info Show allowed indexers + reindexall Reindex Data by all indexers + help This help + + Comma separated indexer codes or value "all" for all indexers + +USAGE; + } +} + +$shell = new Mage_Shell_Compiler(); +$shell->run(); diff --git a/shell/log.php b/shell/log.php new file mode 100644 index 0000000000..97d00a14ad --- /dev/null +++ b/shell/log.php @@ -0,0 +1,191 @@ + + */ +class Mage_Shell_Log extends Mage_Shell_Abstract +{ + /** + * Log instance + * + * @var Mage_Log_Model_Log + */ + protected $_log; + + /** + * Retrieve Log instance + * + * @return Mage_Log_Model_Log + */ + protected function _getLog() + { + if (is_null($this->_log)) { + $this->_log = Mage::getModel('log/log'); + } + return $this->_log; + } + + /** + * Convert count to human view + * + * @param int $number + * @return string + */ + protected function _humanCount($number) + { + if ($number < 1000) { + return $number; + } else if ($number >= 1000 && $number < 1000000) { + return sprintf('%.2fK', $number / 1000); + } else if ($number >= 1000000 && $number < 1000000000) { + return sprintf('%.2fM', $number / 1000000); + } else { + return sprintf('%.2fB', $number / 1000000000); + } + } + + /** + * Convert size to human view + * + * @param int $number + * @return string + */ + protected function _humanSize($number) + { + if ($number < 1000) { + return sprintf('%d b', $number); + } else if ($number >= 1000 && $number < 1000000) { + return sprintf('%.2fKb', $number / 1000); + } else if ($number >= 1000000 && $number < 1000000000) { + return sprintf('%.2fMb', $number / 1000000); + } else { + return sprintf('%.2fGb', $number / 1000000000); + } + } + + /** + * Run script + * + */ + public function run() + { + if ($this->getArg('clean')) { + $days = $this->getArg('days'); + if ($days > 0) { + Mage::app()->getStore()->setConfig(Mage_Log_Model_Log::XML_LOG_CLEAN_DAYS, $days); + } + $this->_getLog()->clean(); + echo "Log cleaned\n"; + } else if ($this->getArg('status')) { + $resource = $this->_getLog()->getResource(); + $adapter = $resource->getReadConnection(); + // log tables + $tables = array( + $resource->getTable('log/customer'), + $resource->getTable('log/visitor'), + $resource->getTable('log/visitor_info'), + $resource->getTable('log/url_table'), + $resource->getTable('log/url_info_table'), + $resource->getTable('log/quote_table'), + + $resource->getTable('reports/viewed_product_index'), + $resource->getTable('reports/compared_product_index'), + $resource->getTable('reports/event'), + + $resource->getTable('catalog/compare_item'), + ); + + $rows = 0; + $dataLengh = 0; + $indexLength = 0; + + $line = '-----------------------------------+------------+------------+------------+' . "\n"; + echo $line; + echo sprintf('%-35s|', 'Table Name'); + echo sprintf(' %-11s|', 'Rows'); + echo sprintf(' %-11s|', 'Data Size'); + echo sprintf(' %-11s|', 'Index Size'); + echo "\n"; + echo $line; + + foreach ($tables as $table) { + $query = $adapter->quoteInto('SHOW TABLE STATUS LIKE ?', $table); + $status = $adapter->fetchRow($query); + if (!$status) { + continue; + } + + $rows += $status['Rows']; + $dataLengh += $status['Data_length']; + $indexLength += $status['Index_length']; + + echo sprintf('%-35s|', $table); + echo sprintf(' %-11s|', $this->_humanCount($status['Rows'])); + echo sprintf(' %-11s|', $this->_humanSize($status['Data_length'])); + echo sprintf(' %-11s|', $this->_humanSize($status['Index_length'])); + echo "\n"; + } + + echo $line; + echo sprintf('%-35s|', 'Total'); + echo sprintf(' %-11s|', $this->_humanCount($rows)); + echo sprintf(' %-11s|', $this->_humanSize($dataLengh)); + echo sprintf(' %-11s|', $this->_humanSize($indexLength)); + echo "\n"; + echo $line; + } else { + echo $this->usageHelp(); + } + } + + /** + * Retrieve Usage Help Message + * + */ + public function usageHelp() + { + return << Save log, days. (Minimum 1 day, if defined - ignoring system value) + status Display statistics per log tables + help This help + +USAGE; + } +} + +$shell = new Mage_Shell_Log(); +$shell->run(); diff --git a/skin/adminhtml/default/default/boxes.css b/skin/adminhtml/default/default/boxes.css index a0988b2282..50d4d7eb4e 100644 --- a/skin/adminhtml/default/default/boxes.css +++ b/skin/adminhtml/default/default/boxes.css @@ -345,6 +345,7 @@ select optgroup { font-style:normal; } select optgroup option { padding-left:10px; } select optgroup option.even { background:#f6f6f6; } /* Zebra even-row */ select.multiselect option { padding:3px 4px; border-bottom:1px solid #ddd; } +.checkboxes li { margin:0 0 5px !important; } .field-100 { background-color:#fff; border-width:1px; border-style:solid; border-color:#aaa #c8c8c8 #c8c8c8 #aaa; padding:2px; } .field-100 textarea, .field-100 input.input-text { float:left; width:100% !important; border:0 !important; padding:0 !important; } @@ -367,6 +368,7 @@ select.multiselect option { padding:3px 4px; border-bottom:1px solid #ddd; .form-list td.use-default { padding-left:15px; } .form-list td.note { background:url(images/note_cell_bg.gif) 6px 10px no-repeat !important; padding-left:18px; } .form-list td.scope-label { padding-left:5px; color:#6f8992; font-size:.9em; } +.form-list p.note { margin:0; padding:0 0 0 13px; background:url(images/note_bg.gif) 1px 6px no-repeat; font-size:11px; } .columns .form-list { width:auto; } .columns .form-list td.value { width:280px; padding-right:5px !important; } @@ -375,6 +377,7 @@ select.multiselect option { padding:3px 4px; border-bottom:1px solid #ddd; .fieldset-wide .form-list { width:100% !important; } .fieldset-wide .form-list td.value { width:auto !important; } +.fieldset-wide .form-list td.value input.input-text, .fieldset-wide .form-list td.value textarea { width:98% !important; } .multi-input { margin-bottom:8px; } /* Example: Address fields with 2 input lines */ @@ -424,14 +427,14 @@ button.cancel span, button.delete span { background-image:url(images/cancel_btn_icon.gif); } button.add span { background-image:url(images/add_btn_icon.gif); } button.save span { background-image:url(images/save_btn_icon.gif); } -button.show-hide span { background-image:url(images/btn_show-hide_icon.gif); padding-left:24px; } -button.add-image span { background-image:url(images/btn_add-image_icon.gif); padding-left:24px; } -button.add-widget span { background-image:url(images/btn_add-widget_icon.gif); } +button.show-hide span { background-image:url(images/btn_show-hide_icon.gif); padding-left:26px; } +button.add-image span { background-image:url(images/btn_add-image_icon.gif); } +button.add-widget span { background-image:url(images/btn_add-widget_icon2.gif); padding-left:24px; } button.btn-chooser { display:block; margin:0 0 10px; } button.disabled, button.disabled:hover, -button.disabled:active { border-color:#777 #505050 #505050 #777; background:#919191 url(images/btn_bg-disabled.gif) 0 0 repeat-x; color:#fff; cursor:default; opacity:.8; -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=20)"; } +button.disabled:active { border-color:#777 #505050 #505050 #777; background:#919191 url(images/btn_bg-disabled.gif) 0 0 repeat-x; color:#fff; cursor:default; opacity:.8; -ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=20)"; } button.add.disabled span { background-image:url(images/add_btn_icon-disabled.gif); } button.icon-btn { width:32px !important; } @@ -1166,7 +1169,20 @@ ul.super-product-attributes { padding-left:15px; } /* CMS *******************************************************************************/ -table.mceLayout { width:100% !important; } +/*table.mceLayout { width:100% !important; }*/ + +/* CMS Widgets Instance */ +.options-box .option-box { border:1px solid #cddddd; padding:1em; background:#e7efef; margin:1.5em 0; } +.options-box .option-title { padding:0 0 10px; border-bottom:1px solid #cddddd; } +.options-box .option-title button { float:right; } +.options-box .option-title label {font-weight:bold; line-height:21px; padding-right:1em; float:left; } +.options-box .option-title select { float:left; width:260px; vertical-align:middle; } +.options-box .option-header { margin:5px 0 0; width:100%; border:0; background:#e7efef; border-bottom:1em solid #e7efef; } +.options-box .option-header .input-text, +.options-box .option-header select { width:95%; } +.options-box .option-header th { padding:2px; } +.options-box .option-header td { padding:5px 2px; } +.options-box .option-header .tree { margin:5px 0 0; } /*****************************************/ diff --git a/skin/adminhtml/default/default/images/btn_add-widget_icon2.gif b/skin/adminhtml/default/default/images/btn_add-widget_icon2.gif new file mode 100644 index 0000000000..75055bb714 Binary files /dev/null and b/skin/adminhtml/default/default/images/btn_add-widget_icon2.gif differ diff --git a/skin/adminhtml/default/default/images/btn_show-hide_icon.gif b/skin/adminhtml/default/default/images/btn_show-hide_icon.gif new file mode 100644 index 0000000000..6670833a41 Binary files /dev/null and b/skin/adminhtml/default/default/images/btn_show-hide_icon.gif differ diff --git a/skin/adminhtml/default/default/images/note_bg.gif b/skin/adminhtml/default/default/images/note_bg.gif new file mode 100644 index 0000000000..9b2d91ad9c Binary files /dev/null and b/skin/adminhtml/default/default/images/note_bg.gif differ diff --git a/skin/adminhtml/default/default/images/placeholder/thumbnail.jpg b/skin/adminhtml/default/default/images/placeholder/thumbnail.jpg new file mode 100644 index 0000000000..4537aa80b3 Binary files /dev/null and b/skin/adminhtml/default/default/images/placeholder/thumbnail.jpg differ diff --git a/skin/adminhtml/default/default/images/widget/default.gif b/skin/adminhtml/default/default/images/widget/default.gif index a4ff5a5565..9ba2251e0d 100644 Binary files a/skin/adminhtml/default/default/images/widget/default.gif and b/skin/adminhtml/default/default/images/widget/default.gif differ diff --git a/skin/adminhtml/default/default/js/centinel.js b/skin/adminhtml/default/default/js/centinel.js new file mode 100644 index 0000000000..f426bd0da7 --- /dev/null +++ b/skin/adminhtml/default/default/js/centinel.js @@ -0,0 +1,118 @@ +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Academic Free License (AFL 3.0) + * that is bundled with this package in the file LICENSE_AFL.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/afl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @category design + * @package default_default + * @copyright Copyright (c) 2009 Irubin Consulting Inc. DBA Varien (http://www.varien.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ +var CentinelValidate = Class.create(); +CentinelValidate.prototype = { + initialize: function(iframe, editForm, lookupUrl){ + this.iframe = iframe; + this.closeButton = iframe + '_close_btn'; + this.payment = payment; + this.lookupUrl = lookupUrl; + this.paymentForm = editForm; + this.nextStepContent = null; + }, + + /** + * Send request to centiel Api, get iframe proper src url. + * + */ + centinelLookUp: function(form) + { + this.paymentForm = form; + var params = Form.serialize(this.paymentForm); + params = params + '&admin_store=true&customer_id=' + order.customerId; + new Ajax.Request(this.lookupUrl, { + parameters: params, + method: 'post', + evalScript: true, + onComplete: function(transport) { + var response = transport.responseText.evalJSON(); + if (response.iframeUrl) { + try{ + this.show(); + $(this.iframe).src = response.iframeUrl; + } catch(e) { + this.nextStep(); + } + } else { + this.nextStep(); + } + }.bind(this) + }); + }, + + setPaymentForm: function(form) + { + this.paymentForm = form; + return true; + }, + + /** + * Load payment next step + * @return + */ + nextStep: function() + { + $(this.paymentForm).submit(); + }, + + /** + * Process success Iframe action, close iframe, load payment next step + * + */ + processSuccessIframe: function (){ + this.close(); + this.nextStep(); + }, + + /** + * Fail process iframe, close iframe alert 3d secure validation error + * + * @param errorMsg string + */ + processFailIframe: function processFailIframe(errorMsg) { + this.close(); + alert(errorMsg); + }, + + /** + * Close iframe + * + */ + close: function() + { + $(this.iframe).hide(); + $(this.closeButton).hide(); + }, + + /** + * show iframe content + * + */ + show: function() + { + $(this.iframe).show(); + $(this.closeButton).show(); + } +} \ No newline at end of file diff --git a/skin/frontend/base/default/css/widgets.css b/skin/frontend/base/default/css/widgets.css new file mode 100644 index 0000000000..33ba54403f --- /dev/null +++ b/skin/frontend/base/default/css/widgets.css @@ -0,0 +1,95 @@ +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Academic Free License (AFL 3.0) + * that is bundled with this package in the file LICENSE_AFL.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/afl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @category design + * @package base_default + * @copyright Copyright (c) 2009 Irubin Consulting Inc. DBA Varien (http://www.varien.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ + +/* Widgets =============================================================================== */ +.widget { display:inline; } +.widget .widget-title { clear:both; padding:15px 0 0; margin:0 0 7px; } +.widget .widget-title h2 { font-size:15px; font-weight:bold; color:#e25203; } + +.widget .mini-products-images-list .product-image { display:block; width:76px; height:76px; border:1px solid #a9a9a9; margin:0 auto; } +.widget .mini-products-images-list li.item { float:left; width:77px; height:77px; } + +/* Widget: Catalog New Proructs List */ +.widget-new-products { display:block; } +.col-main .widget-new-products { margin:7px 0; } +.widget-new-products .products-grid .product-image, +.widget-new-products .products-list .product-image { width:85px; height:85px; } +.widget-new-products .products-list .product-shop { margin-left:100px; } +.sidebar .widget-new-products .block { font-size:11px; line-height:1.25; } +.sidebar .widget-new-products .block-title strong { background:url(../images/widgets/i_widget-new.gif) 0 1px no-repeat; padding-left:21px; color:#dc5033; } + +/* Widget: Recently Viewed Proructs */ +.widget-viewed { display:block; } +.col-main .widget-viewed { margin:7px 0; } +.widget-viewed .products-grid .product-image, +.widget-viewed .products-list .product-image { width:85px; height:85px; } +.widget-viewed .products-list .product-shop { margin-left:100px; } +.sidebar .widget-viewed .block { font-size:11px; line-height:1.25; } +.sidebar .widget-viewed .block-title strong { background:url(../images/widgets/i_block-list.gif) 0 0 no-repeat; padding-left:21px; } + +/* Widget: Recently Compared Proructs */ +.widget-compared { display:block;} +.col-main .widget-compared { margin:7px 0; } +.widget-compared .products-grid .product-image, +.widget-compared .products-list .product-image { width:85px; height:85px; } +.widget-compared .products-list .product-shop { margin-left:100px; } +.sidebar .widget-compared .block { font-size:11px; line-height:1.25; } +.sidebar .widget-compared .block-title strong { background:url(../images/widgets/i_block-list.gif) 0 0 no-repeat; padding-left:21px; } + +/* Widget: CMS Static Block */ +.widget-static-block {} + +/* Widgets: Links Common Styles */ +.top-container .widget a { font-size:11px; padding:0 0 0 7px; color:#ebbc58; } + +.bottom-container .widget a { padding:0 3px; } + +/* Widget: Catalog Product Link */ +.widget-product-link-inline { display:inline; } + +.col-main .widget-product-link { display:block; text-align:right; margin:7px 0; } +.col-main .widget-product-link a { background:url(../images/widgets//i_widget-link.gif) 100% 4px no-repeat; padding-right:15px; } + +.sidebar .widget-product-link { display:block; margin:0 0 15px; padding:0 10px; } +.sidebar .widget-product-link a { background:url(../images/widgets//i_widget-link.gif) 100% 4px no-repeat; padding:0 15px 0 0; } + +/* Widget: Catalog Category Link */ +.widget-category-link-inline { display:inline; } + +.col-main .widget-category-link { display:block; text-align:right; margin:7px 0; } +.col-main .widget-category-link a { background:url(../images/widgets//i_widget-link.gif) 100% 4px no-repeat; padding-right:15px; } + +.sidebar .widget-category-link { display:block; margin:0 0 15px; padding:0 10px; } +.sidebar .widget-category-link a { background:url(../images/widgets//i_widget-link.gif) 100% 4px no-repeat; padding:0 15px 0 0; } + +/* Widget: CMS Page Link */ +.widget-cms-link-inline { display:inline; } + +.col-main .widget-cms-link { display:block; text-align:right; margin:7px 0; } +.col-main .widget-cms-link a { background:url(../images/widgets//i_widget-link.gif) 100% 4px no-repeat; padding-right:15px; } + +.sidebar .widget-cms-link { display:block; margin:0 0 15px; padding:0 10px; } +.sidebar .widget-cms-link a { background:url(../images/widgets//i_widget-link.gif) 100% 4px no-repeat; padding:0 15px 0 0; } +/* ======================================================================================= */ diff --git a/skin/frontend/base/default/favicon.ico b/skin/frontend/base/default/favicon.ico new file mode 100644 index 0000000000..1cb7c77137 Binary files /dev/null and b/skin/frontend/base/default/favicon.ico differ diff --git a/skin/frontend/base/default/images/calendar.gif b/skin/frontend/base/default/images/calendar.gif new file mode 100644 index 0000000000..d0235c7e02 Binary files /dev/null and b/skin/frontend/base/default/images/calendar.gif differ diff --git a/skin/frontend/base/default/images/catalog/product/placeholder/image.jpg b/skin/frontend/base/default/images/catalog/product/placeholder/image.jpg new file mode 100644 index 0000000000..b8baef2dfe Binary files /dev/null and b/skin/frontend/base/default/images/catalog/product/placeholder/image.jpg differ diff --git a/skin/frontend/base/default/images/catalog/product/placeholder/small_image.jpg b/skin/frontend/base/default/images/catalog/product/placeholder/small_image.jpg new file mode 100644 index 0000000000..b8611cfdab Binary files /dev/null and b/skin/frontend/base/default/images/catalog/product/placeholder/small_image.jpg differ diff --git a/skin/frontend/base/default/images/catalog/product/placeholder/thumbnail.jpg b/skin/frontend/base/default/images/catalog/product/placeholder/thumbnail.jpg new file mode 100644 index 0000000000..b8fc9043f6 Binary files /dev/null and b/skin/frontend/base/default/images/catalog/product/placeholder/thumbnail.jpg differ diff --git a/skin/frontend/default/default/images/cookies/firefox.png b/skin/frontend/base/default/images/cookies/firefox.png similarity index 100% rename from skin/frontend/default/default/images/cookies/firefox.png rename to skin/frontend/base/default/images/cookies/firefox.png diff --git a/skin/frontend/default/default/images/cookies/ie6-1.gif b/skin/frontend/base/default/images/cookies/ie6-1.gif similarity index 100% rename from skin/frontend/default/default/images/cookies/ie6-1.gif rename to skin/frontend/base/default/images/cookies/ie6-1.gif diff --git a/skin/frontend/default/default/images/cookies/ie6-2.gif b/skin/frontend/base/default/images/cookies/ie6-2.gif similarity index 100% rename from skin/frontend/default/default/images/cookies/ie6-2.gif rename to skin/frontend/base/default/images/cookies/ie6-2.gif diff --git a/skin/frontend/default/default/images/cookies/ie7-1.gif b/skin/frontend/base/default/images/cookies/ie7-1.gif similarity index 100% rename from skin/frontend/default/default/images/cookies/ie7-1.gif rename to skin/frontend/base/default/images/cookies/ie7-1.gif diff --git a/skin/frontend/default/default/images/cookies/ie7-2.gif b/skin/frontend/base/default/images/cookies/ie7-2.gif similarity index 100% rename from skin/frontend/default/default/images/cookies/ie7-2.gif rename to skin/frontend/base/default/images/cookies/ie7-2.gif diff --git a/skin/frontend/default/default/images/cookies/ie7-3.gif b/skin/frontend/base/default/images/cookies/ie7-3.gif similarity index 100% rename from skin/frontend/default/default/images/cookies/ie7-3.gif rename to skin/frontend/base/default/images/cookies/ie7-3.gif diff --git a/skin/frontend/default/default/images/cookies/ie7-4.gif b/skin/frontend/base/default/images/cookies/ie7-4.gif similarity index 100% rename from skin/frontend/default/default/images/cookies/ie7-4.gif rename to skin/frontend/base/default/images/cookies/ie7-4.gif diff --git a/skin/frontend/default/default/images/cookies/ie7-5.gif b/skin/frontend/base/default/images/cookies/ie7-5.gif similarity index 100% rename from skin/frontend/default/default/images/cookies/ie7-5.gif rename to skin/frontend/base/default/images/cookies/ie7-5.gif diff --git a/skin/frontend/default/default/images/cookies/ie7-6.gif b/skin/frontend/base/default/images/cookies/ie7-6.gif similarity index 100% rename from skin/frontend/default/default/images/cookies/ie7-6.gif rename to skin/frontend/base/default/images/cookies/ie7-6.gif diff --git a/skin/frontend/default/default/images/cookies/opera.png b/skin/frontend/base/default/images/cookies/opera.png similarity index 100% rename from skin/frontend/default/default/images/cookies/opera.png rename to skin/frontend/base/default/images/cookies/opera.png diff --git a/skin/frontend/base/default/images/fam_book_open.png b/skin/frontend/base/default/images/fam_book_open.png new file mode 100644 index 0000000000..7d863f9497 Binary files /dev/null and b/skin/frontend/base/default/images/fam_book_open.png differ diff --git a/skin/frontend/base/default/images/moneybookers/banner_120_de.png b/skin/frontend/base/default/images/moneybookers/banner_120_de.png new file mode 100644 index 0000000000..857453dc9b Binary files /dev/null and b/skin/frontend/base/default/images/moneybookers/banner_120_de.png differ diff --git a/skin/frontend/base/default/images/moneybookers/banner_120_fr.png b/skin/frontend/base/default/images/moneybookers/banner_120_fr.png new file mode 100644 index 0000000000..319c805e15 Binary files /dev/null and b/skin/frontend/base/default/images/moneybookers/banner_120_fr.png differ diff --git a/skin/frontend/base/default/images/moneybookers/banner_120_int.png b/skin/frontend/base/default/images/moneybookers/banner_120_int.png new file mode 100644 index 0000000000..daed5ab222 Binary files /dev/null and b/skin/frontend/base/default/images/moneybookers/banner_120_int.png differ diff --git a/skin/frontend/base/default/images/moneybookers/banner_120_pl.png b/skin/frontend/base/default/images/moneybookers/banner_120_pl.png new file mode 100644 index 0000000000..86e324c9bf Binary files /dev/null and b/skin/frontend/base/default/images/moneybookers/banner_120_pl.png differ diff --git a/skin/frontend/base/default/images/moneybookers/banner_120_sp.png b/skin/frontend/base/default/images/moneybookers/banner_120_sp.png new file mode 100644 index 0000000000..712f850ed3 Binary files /dev/null and b/skin/frontend/base/default/images/moneybookers/banner_120_sp.png differ diff --git a/skin/frontend/base/default/images/moneybookers/moneybookers_acc.png b/skin/frontend/base/default/images/moneybookers/moneybookers_acc.png new file mode 100644 index 0000000000..a507ff62a3 Binary files /dev/null and b/skin/frontend/base/default/images/moneybookers/moneybookers_acc.png differ diff --git a/skin/frontend/base/default/images/moneybookers/moneybookers_csi.gif b/skin/frontend/base/default/images/moneybookers/moneybookers_csi.gif new file mode 100644 index 0000000000..ea5c7aff05 Binary files /dev/null and b/skin/frontend/base/default/images/moneybookers/moneybookers_csi.gif differ diff --git a/skin/frontend/base/default/images/moneybookers/moneybookers_did.gif b/skin/frontend/base/default/images/moneybookers/moneybookers_did.gif new file mode 100644 index 0000000000..a6ae269c5f Binary files /dev/null and b/skin/frontend/base/default/images/moneybookers/moneybookers_did.gif differ diff --git a/skin/frontend/base/default/images/moneybookers/moneybookers_dnk.gif b/skin/frontend/base/default/images/moneybookers/moneybookers_dnk.gif new file mode 100644 index 0000000000..bb6e266c3a Binary files /dev/null and b/skin/frontend/base/default/images/moneybookers/moneybookers_dnk.gif differ diff --git a/skin/frontend/base/default/images/moneybookers/moneybookers_ebt.gif b/skin/frontend/base/default/images/moneybookers/moneybookers_ebt.gif new file mode 100644 index 0000000000..1d78ad8caa Binary files /dev/null and b/skin/frontend/base/default/images/moneybookers/moneybookers_ebt.gif differ diff --git a/skin/frontend/base/default/images/moneybookers/moneybookers_ent.gif b/skin/frontend/base/default/images/moneybookers/moneybookers_ent.gif new file mode 100644 index 0000000000..33189f3a78 Binary files /dev/null and b/skin/frontend/base/default/images/moneybookers/moneybookers_ent.gif differ diff --git a/skin/frontend/base/default/images/moneybookers/moneybookers_gcb.gif b/skin/frontend/base/default/images/moneybookers/moneybookers_gcb.gif new file mode 100644 index 0000000000..bc4d1eb496 Binary files /dev/null and b/skin/frontend/base/default/images/moneybookers/moneybookers_gcb.gif differ diff --git a/skin/frontend/base/default/images/moneybookers/moneybookers_gir.gif b/skin/frontend/base/default/images/moneybookers/moneybookers_gir.gif new file mode 100644 index 0000000000..970dc87275 Binary files /dev/null and b/skin/frontend/base/default/images/moneybookers/moneybookers_gir.gif differ diff --git a/skin/frontend/base/default/images/moneybookers/moneybookers_idl.gif b/skin/frontend/base/default/images/moneybookers/moneybookers_idl.gif new file mode 100644 index 0000000000..3471d0e1c1 Binary files /dev/null and b/skin/frontend/base/default/images/moneybookers/moneybookers_idl.gif differ diff --git a/skin/frontend/base/default/images/moneybookers/moneybookers_lsr.gif b/skin/frontend/base/default/images/moneybookers/moneybookers_lsr.gif new file mode 100644 index 0000000000..84040e989d Binary files /dev/null and b/skin/frontend/base/default/images/moneybookers/moneybookers_lsr.gif differ diff --git a/skin/frontend/base/default/images/moneybookers/moneybookers_npy.gif b/skin/frontend/base/default/images/moneybookers/moneybookers_npy.gif new file mode 100644 index 0000000000..302814de56 Binary files /dev/null and b/skin/frontend/base/default/images/moneybookers/moneybookers_npy.gif differ diff --git a/skin/frontend/base/default/images/moneybookers/moneybookers_pli.gif b/skin/frontend/base/default/images/moneybookers/moneybookers_pli.gif new file mode 100644 index 0000000000..2a91e2a980 Binary files /dev/null and b/skin/frontend/base/default/images/moneybookers/moneybookers_pli.gif differ diff --git a/skin/frontend/base/default/images/moneybookers/moneybookers_psp.gif b/skin/frontend/base/default/images/moneybookers/moneybookers_psp.gif new file mode 100644 index 0000000000..9e489c6a42 Binary files /dev/null and b/skin/frontend/base/default/images/moneybookers/moneybookers_psp.gif differ diff --git a/skin/frontend/base/default/images/moneybookers/moneybookers_pwy.gif b/skin/frontend/base/default/images/moneybookers/moneybookers_pwy.gif new file mode 100644 index 0000000000..69eaa0d2a9 Binary files /dev/null and b/skin/frontend/base/default/images/moneybookers/moneybookers_pwy.gif differ diff --git a/skin/frontend/base/default/images/moneybookers/moneybookers_sft.gif b/skin/frontend/base/default/images/moneybookers/moneybookers_sft.gif new file mode 100644 index 0000000000..e91da1995c Binary files /dev/null and b/skin/frontend/base/default/images/moneybookers/moneybookers_sft.gif differ diff --git a/skin/frontend/base/default/images/moneybookers/moneybookers_so2.gif b/skin/frontend/base/default/images/moneybookers/moneybookers_so2.gif new file mode 100644 index 0000000000..1d78ad8caa Binary files /dev/null and b/skin/frontend/base/default/images/moneybookers/moneybookers_so2.gif differ diff --git a/skin/frontend/base/default/images/moneybookers/moneybookers_wlt.gif b/skin/frontend/base/default/images/moneybookers/moneybookers_wlt.gif new file mode 100644 index 0000000000..97213408b8 Binary files /dev/null and b/skin/frontend/base/default/images/moneybookers/moneybookers_wlt.gif differ diff --git a/skin/frontend/default/blue/images/icon_table.gif b/skin/frontend/base/default/images/widgets/i_block-list.gif similarity index 100% rename from skin/frontend/default/blue/images/icon_table.gif rename to skin/frontend/base/default/images/widgets/i_block-list.gif diff --git a/skin/frontend/base/default/images/widgets/i_widget-link.gif b/skin/frontend/base/default/images/widgets/i_widget-link.gif new file mode 100644 index 0000000000..16fc968deb Binary files /dev/null and b/skin/frontend/base/default/images/widgets/i_widget-link.gif differ diff --git a/skin/frontend/base/default/images/widgets/i_widget-new.gif b/skin/frontend/base/default/images/widgets/i_widget-new.gif new file mode 100644 index 0000000000..fe0b27df8d Binary files /dev/null and b/skin/frontend/base/default/images/widgets/i_widget-new.gif differ diff --git a/skin/frontend/base/default/js/bundle.js b/skin/frontend/base/default/js/bundle.js new file mode 100644 index 0000000000..32777a6187 --- /dev/null +++ b/skin/frontend/base/default/js/bundle.js @@ -0,0 +1,191 @@ +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Academic Free License (AFL 3.0) + * that is bundled with this package in the file LICENSE_AFL.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/afl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @category design + * @package base_default + * @copyright Copyright (c) 2009 Irubin Consulting Inc. DBA Varien (http://www.varien.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ +if(typeof Product=='undefined') { + var Product = {}; +} +/**************************** BUNDLE PRODUCT **************************/ +Product.Bundle = Class.create(); +Product.Bundle.prototype = { + initialize: function(config){ + this.config = config; + this.reloadPrice(); + }, + changeSelection: function(selection){ + parts = selection.id.split('-'); + if (this.config['options'][parts[2]].isMulti) { + selected = new Array(); + if (selection.tagName == 'SELECT') { + for (var i = 0; i < selection.options.length; i++) { + if (selection.options[i].selected && selection.options[i].value != '') { + selected.push(selection.options[i].value); + } + } + } else if (selection.tagName == 'INPUT') { + selector = parts[0]+'-'+parts[1]+'-'+parts[2]; + selections = $$('.'+selector); + for (var i = 0; i < selections.length; i++) { + if (selections[i].checked && selections[i].value != '') { + selected.push(selections[i].value); + } + } + } + this.config.selected[parts[2]] = selected; + } else { + if (selection.value != '') { + this.config.selected[parts[2]] = new Array(selection.value); + } else { + this.config.selected[parts[2]] = new Array(); + } + this.populateQty(parts[2], selection.value); + } + this.reloadPrice(); + + }, + + reloadPrice: function() { + var calculatedPrice = 0; + var dispositionPrice = 0; + for (var option in this.config.selected) { + if (this.config.options[option]) { + for (var i=0; i < this.config.selected[option].length; i++) { + var prices = this.selectionPrice(option, this.config.selected[option][i]); + calculatedPrice += Number(prices[0]); + dispositionPrice += Number(prices[1]); + } + } + } + + if (this.config.specialPrice) { + var newPrice = (calculatedPrice*this.config.specialPrice)/100; + calculatedPrice = Math.min(newPrice, calculatedPrice); + } + + optionsPrice.changePrice('bundle', calculatedPrice); + optionsPrice.changePrice('nontaxable', dispositionPrice); + optionsPrice.reload(); + + return calculatedPrice; + }, + + selectionPrice: function(optionId, selectionId) { + if (selectionId == '' || selectionId == 'none') { + return 0; + } + + if (this.config.options[optionId].selections[selectionId].customQty == 1 && !this.config['options'][optionId].isMulti) { + if ($('bundle-option-' + optionId + '-qty-input')) { + qty = $('bundle-option-' + optionId + '-qty-input').value; + } else { + qty = 1; + } + } else { + qty = this.config.options[optionId].selections[selectionId].qty; + } + + if (this.config.priceType == '0') { + price = this.config.options[optionId].selections[selectionId].price; + tierPrice = this.config.options[optionId].selections[selectionId].tierPrice; + + for (var i=0; i < tierPrice.length; i++) { + if (Number(tierPrice[i].price_qty) <= qty && Number(tierPrice[i].price) <= price) { + price = tierPrice[i].price; + } + } + } else { + selection = this.config.options[optionId].selections[selectionId]; + if (selection.priceType == '0') { + price = selection.priceValue; + } else { + price = (this.config.basePrice*selection.priceValue)/100; + } + } + //price += this.config.options[optionId].selections[selectionId].plusDisposition; + //price -= this.config.options[optionId].selections[selectionId].minusDisposition; + //return price*qty; + var disposition = this.config.options[optionId].selections[selectionId].plusDisposition + + this.config.options[optionId].selections[selectionId].minusDisposition; + + var result = new Array(price*qty, disposition*qty); + return result; + }, + + populateQty: function(optionId, selectionId){ + if (selectionId == '' || selectionId == 'none') { + this.showQtyInput(optionId, '0', false); + return; + } + if (this.config.options[optionId].selections[selectionId].customQty == 1) { + this.showQtyInput(optionId, this.config.options[optionId].selections[selectionId].qty, true); + } else { + this.showQtyInput(optionId, this.config.options[optionId].selections[selectionId].qty, false); + } + }, + + showQtyInput: function(optionId, value, canEdit) { + elem = $('bundle-option-' + optionId + '-qty-input'); + elem.value = value; + elem.disabled = !canEdit; + if (canEdit) { + elem.removeClassName('qty-disabled'); + } else { + elem.addClassName('qty-disabled'); + } + }, + + changeOptionQty: function (element, event) { + var checkQty = true; + if (typeof(event) != 'undefined') { + if (event.keyCode == 8 || event.keyCode == 46) { + checkQty = false; + } + } + if (checkQty && (Number(element.value) == 0 || isNaN(Number(element.value)))) { + element.value = 1; + } + parts = element.id.split('-'); + optionId = parts[2]; + if (!this.config['options'][optionId].isMulti) { + selectionId = this.config.selected[optionId][0]; + this.config.options[optionId].selections[selectionId].qty = element.value*1; + this.reloadPrice(); + } + }, + + validationCallback: function (elmId, result){ + if (typeof elmId == 'undefined') { + return; + } + var container = $(elmId).up('ul.options-list'); + if (typeof container != 'undefined') { + if (result == 'failed') { + container.removeClassName('validation-passed'); + container.addClassName('validation-failed'); + } else { + container.removeClassName('validation-failed'); + container.addClassName('validation-passed'); + } + } + } +} diff --git a/skin/frontend/base/default/js/centinel.js b/skin/frontend/base/default/js/centinel.js new file mode 100644 index 0000000000..68fd205d57 --- /dev/null +++ b/skin/frontend/base/default/js/centinel.js @@ -0,0 +1,125 @@ +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Academic Free License (AFL 3.0) + * that is bundled with this package in the file LICENSE_AFL.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/afl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @category design + * @package base_default + * @copyright Copyright (c) 2009 Irubin Consulting Inc. DBA Varien (http://www.varien.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ +var CentinelValidate = Class.create(); +CentinelValidate.prototype = { + initialize: function(iframe, payment, lookupUrl){ + this.iframe = iframe; + this.payment = payment; + this.lookupUrl = lookupUrl; + if (payment) { + this.paymentForm = payment.form; + this.paymentSaveUrl = payment.saveUrl; + } else { + this.paymentForm = null; + this.paymentSaveUrl = null; + } + + this.nextStepContent = null; + }, + + /** + * Send data to save it in quote, get next step content + * @return + */ + paymentProcess: function() + { + try { + checkout.setLoadWaiting('payment'); + } catch(e) {} + var params = Form.serialize(this.paymentForm); + new Ajax.Request(this.paymentSaveUrl, { + parameters: params, + method: 'post', + evalScript: true, + onComplete: function(transport) { + payment.nextStepContent = transport; + this.centinelLookUp(); + }.bind(this) + }); + }, + + /** + * Send request to centiel Api, get iframe proper src url. + * + */ + centinelLookUp: function(payForm) + { + if (payForm) { + this.paymentForm = payForm; + } + var params = Form.serialize(this.paymentForm); + new Ajax.Request(this.lookupUrl, { + parameters: params, + method: 'post', + evalScript: true, + onComplete: function(transport) { + var response = transport.responseText.evalJSON(); + if (response.iframeUrl) { + $(this.iframe).src = response.iframeUrl; + $(this.iframe).show(); + try { + checkout.setLoadWaiting(false); + } catch (e) {} + } else { + this.nextStep(); + } + }.bind(this) + }); + }, + + /** + * Load payment next step + * @return + */ + nextStep: function() + { + if (this.payment) { + this.payment.nextStep(payment.nextStepContent); + } else { + if (this.paymentForm) { + this.paymentForm.submit(); + } + } + }, + + /** + * Process success Iframe action, close iframe, load payment next step + * + */ + processSuccessIframe: function (){ + $(this.iframe).hide(); + this.nextStep(); + }, + + /** + * Fail process iframe, close iframe alert 3d secure validation error + * + * @param errorMsg string + */ + processFailIframe: function processFailIframe(errorMsg) { + $(this.iframe).hide(); + alert(errorMsg); + } +} diff --git a/skin/frontend/base/default/js/giftmessage.js b/skin/frontend/base/default/js/giftmessage.js new file mode 100644 index 0000000000..7ea5271296 --- /dev/null +++ b/skin/frontend/base/default/js/giftmessage.js @@ -0,0 +1,129 @@ +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Academic Free License (AFL 3.0) + * that is bundled with this package in the file LICENSE_AFL.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/afl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @category design + * @package base_default + * @copyright Copyright (c) 2009 Irubin Consulting Inc. DBA Varien (http://www.varien.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ +var GiftMessage = Class.create(); + +GiftMessage.prototype = { + uniqueId: 0, + initialize: function (buttonId) { + GiftMessageStack.addObject(this); + this.buttonId = buttonId; + this.initListeners(); + }, + editGiftMessage: function (evt) { + var popUpUrl = this.url + '?uniqueId=' + this.uniqueId; + this.popUp = window.open(popUpUrl, 'giftMessage', 'width=350,height=400,resizable=yes,scrollbars=yes'); + this.popUp.focus(); + Event.stop(evt); + }, + initListeners: function () { + var items = $(this.buttonId).getElementsByClassName('listen-for-click'); + items.each(function(item) { + Event.observe(item, 'click', this.editGiftMessage.bindAsEventListener(this)); + item.controller = this; + }.bind(this)); + }, + reloadContainer: function (url) { + new Ajax.Updater(this.buttonId, url, {onComplete:this.initListeners.bind(this)}); + }, + initWindow: function (windowObject) { + this.windowObj = windowObject; + } +}; + +var GiftMessageStack = { + _stack: [], + _nextUniqueId: 0, + addObject: function(giftMessageObject) { + giftMessageObject.uniqueId = this.uniqueId(); + this._stack.push(giftMessageObject); + return this; + }, + uniqueId: function() { + return 'objectStack' + (this._nextUniqueId++); + }, + getObjectById: function(id) { + var giftMessageObject = false; + this._stack.each(function(item){ + if(item.uniqueId == id) { + giftMessageObject = item; + } + }); + return giftMessageObject; + } +}; + +var GiftMessageWindow = Class.create(); +GiftMessageWindow.prototype = { + initialize: function(uniqueId, formId, removeUrl) { + this.uniqueId = uniqueId; + this.removeUrl = removeUrl; + if(window.opener) { + this.parentObject = window.opener.GiftMessageStack.getObjectById(this.uniqueId); + this.parentObject.initWindow(this); + } + if(formId) { + this.form = new VarienForm(formId, true); + this.formElement = $(formId); + this.initListeners(); + } + }, + initListeners: function() { + removeButtons = this.formElement.getElementsByClassName('listen-remove'); + removeButtons.each(function(item){ + Event.observe(item, 'click', this.remove.bindAsEventListener(this)); + }.bind(this)); + + cancelButtons = this.formElement.getElementsByClassName('listen-cancel'); + cancelButtons.each(function(item){ + Event.observe(item, 'click', this.cancel.bindAsEventListener(this)); + }.bind(this)); + }, + cancel: function(evt) { + Event.stop(evt); + window.opener.focus(); + window.close(); + }, + close: function() { + window.opener.focus(); + window.close(); + }, + remove: function(evt) { + Event.stop(evt); + if(this.confirmMessage && !window.confirm(this.confirmMessage)) { + return; + } + window.location.href = this.removeUrl; + }, + updateParent: function (url, buttonUrl) { + if(this.parentObject) { + this.parentObject.url = url + this.parentObject.reloadContainer(buttonUrl); + } + setTimeout(function(){ + window.opener.focus(); + window.close(); + }, 3000); + } +}; diff --git a/skin/frontend/base/default/js/ie6.js b/skin/frontend/base/default/js/ie6.js new file mode 100644 index 0000000000..e61831f835 --- /dev/null +++ b/skin/frontend/base/default/js/ie6.js @@ -0,0 +1,64 @@ +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Academic Free License (AFL 3.0) + * that is bundled with this package in the file LICENSE_AFL.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/afl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @category design + * @package base_default + * @copyright Copyright (c) 2009 Irubin Consulting Inc. DBA Varien (http://www.varien.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ +function toggleMenu(el, over) +{ + if (Element.childElements(el)) { + var uL = Element.childElements(el)[1]; + var iS = true; + } + if (over) { + Element.addClassName(el, 'over'); + + if(iS){ uL.addClassName('shown-sub')}; + } + else { + Element.removeClassName(el, 'over'); + if(iS){ uL.removeClassName('shown-sub')}; + } +} + +ieHover = function() { + var items, iframe; + items = $$('#nav ul', '.truncated_full_value .item-options', '.tool-tip'); + $$('#checkout-step-payment', '.tool-tip').each(function(el) { + el.show(); + el.setStyle({'visibility':'hidden'}) + }) + for (var j=0; j ul { left:0; } -#nav li.over > ul li.over > ul { left:100px; } -#nav li.over ul ul { left:-10000px; } - -#nav ul li a { background:#ecf3f6; } -#nav ul li a:hover { background-color:#d5e4eb; } -#nav ul li a, -#nav ul li a:hover { color:#2f2f2f !important; } -#nav ul span, #nav ul li.last li span { padding:3px 15px 4px 15px;} - -/************ 3RD+ LEVEL ************/ -#nav ul ul { top:5px; } diff --git a/skin/frontend/default/blue/css/print.css b/skin/frontend/default/blue/css/print.css deleted file mode 100644 index e5408b7b62..0000000000 --- a/skin/frontend/default/blue/css/print.css +++ /dev/null @@ -1,95 +0,0 @@ -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Academic Free License (AFL 3.0) - * that is bundled with this package in the file LICENSE_AFL.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/afl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @category design - * @package default_default - * @copyright Copyright (c) 2009 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) - */ - -* { background:none !important; } - -/* Resets */ -* { min-height:0 !important;text-align:left !important; } -body { background:#fff; font-size:9pt; margin:15px; } -a, a:hover { color:#2976C9 !important; } -th, td { color:#2f2f2f !important; } -td { border-color:#ccc !important; } -hr{ visibility:visible; height:1px; margin:20px 0; } - - -/* Common Elements */ -.button-set { display:none; } -.col3-set *, .col4-set * { float:none !important; width:auto !important; } -.form-button { display:none; } -.head { text-align:left; } -.head *, .page-head *, .page-head-alt * { display:block !important; float:none; } - -.pager, .view-by { display:none; } -.actions { display:none !important; } -.content, .box { padding:5px 0 5px 0 !important; } - - -/* Layout */ -#nav { display:none; } -.header { border:0; } -.header-top-container { border:0; } -h1#logo, .this-is-a-demo, .quick-access { float:none; } -h1#logo { margin:0; } -.quick-access { float:none; display:none; } -.side-col { float:none !important; } -.side-col .box { display:none; } -.col-main { width:auto !important; float:none !important; margin:0 !important; } -.footer-container { border:0; } -.footer { margin-top:2em; border-top:1px solid #ccc; } -.footer .informational { display:none; border:0; } - - -/* Shop Elements */ -.count { color:#2f2f2f !important; } -.ratings, .rating-box { display:none !important; } -.step-count { display:inline !important; } -.base-mini .head * { padding:0; } - -/* Shop Pages */ -#track1 { display:none; } -ul.more-views { margin-bottom:10px; } -ul.more-views * { display:inline !important; } -.product-info { float:none !important; width:auto !important;} -.add-to-box { display:none; } -.checkout-progress { padding:0; margin:10px 0 !important;} -.checkout-progress * { display:inline !important; padding:0 !important; padding-right:10px !important; } -.listing-type-list .listing-item { padding:10px 0 10px 0; border-top:1px dashed #ddd; } -.one-page-checkout .active .step-count { color:#2f2f2f; } -.login-box td { border-bottom:0; } -.shipment-count { color:#2f2f2f; } -.grand-total { background:none !important; color:#2f2f2f; } -p.grand-total { padding-right:0; } -.account-side{ border:0; width:auto !important;} -.account-side .box { display:block !important; } -.account-box .head h4 { background:none; padding-left:0; } -.account-box .product-images { width:auto; } -.account-box .product-details { margin:0; } -table.data-table {width:90% !important;} -body.page-popup .data-table td, body.page-popup .data-table th { border-right:1px solid #D9DDE3 !important; border-bottom:1px solid #D9DDE3 !important; } -body.page-popup .data-table th.last, body.page-popup .data-table td.last { border-right:0 !important; } -body.page-popup .data-table tfoot td { border-bottom:none !important; } -body.page-popup .data-table td, body.page-popup .data-table th { border-color:#bbb; } -.page-popup h1#logo { display:block; margin-bottom:10px; } -.a-right {text-align: right !important;} diff --git a/skin/frontend/default/blue/css/reset.css b/skin/frontend/default/blue/css/reset.css deleted file mode 100644 index 15b109e6b7..0000000000 --- a/skin/frontend/default/blue/css/reset.css +++ /dev/null @@ -1,79 +0,0 @@ -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Academic Free License (AFL 3.0) - * that is bundled with this package in the file LICENSE_AFL.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/afl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @category design - * @package default_default - * @copyright Copyright (c) 2009 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) - */ -/******************************************/ -/***********[ Mage_CSS_A Reset ]***********/ -/******************************************/ - -* { margin:0; padding:0; } - - -html,body { height:100%; } - -body { background:#4c697b url(../images/bkg_body.gif) 0 0 repeat-x; /*background:#496778 url(../images/body_bg.gif) 50% 0 repeat-y;*/ color:#2f2f2f; font:12px/1.5 Arial, Helvetica, sans-serif; text-align:center; min-height:100%; } - -img { border:0; } - -a { color:#1e7ec8; text-decoration:underline; } -a:hover { color:#1e7ec8; text-decoration:underline; } -:focus { outline:0; } - -/* Heading */ -h1, h2, h3, h4, h5, h6, .head { margin-bottom:.4em; line-height:1.3em; color:#0A263C; } -h1 { font-size:2em; line-height:1.17; } -h2 { font-size:1.5em; } -h3 { font-size:1.35em; } -h4 { font-size:1.05em; } -h5 { font-size:1.05em; } -h6 { font-size:.95em; } - -/* Table */ -th { padding:0; text-align:left; vertical-align:top; } -td {padding:0; vertical-align:top;} - -/* Paragraph */ -p {} -address { font-style:normal; margin-bottom:.5em; } -cite { font-style:normal; font-size:10px; } -q:before, -q:after{ content:''; } - -/* Form */ -form { display:inline; } -fieldset { border:none; } -legend { display:none; } -label { color:#666; font-weight:bold; } -input, textarea, select, button { vertical-align:middle; } - -/* Lists */ -dt { display:block; font-weight:bold; } -ul,ol { list-style:none; } - -/* Size */ -small { font-size:.92em; } -big { font-size:1.1em; } - -hr { height:0; margin:8px 0; overflow:hidden; visibility:hidden; } -.nowrap { white-space:nowrap; } -.bold { font-weight:bold; } diff --git a/skin/frontend/default/blue/css/styles-ie.css b/skin/frontend/default/blue/css/styles-ie.css new file mode 100644 index 0000000000..38d088c068 --- /dev/null +++ b/skin/frontend/default/blue/css/styles-ie.css @@ -0,0 +1,142 @@ +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Academic Free License (AFL 3.0) + * that is bundled with this package in the file LICENSE_AFL.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/afl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @category design + * @package default_default + * @copyright Copyright (c) 2009 Irubin Consulting Inc. DBA Varien (http://www.varien.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ + +/* IE 6 only */ +* html .wrapper { height:100%; } +* html .validation-advice { height:13px; } +* html .error-msg, +* html .success-msg, +* html .note-msg, +* html .notice-msg { _height:24px; } +* html .main { height:400px; } +* html .account-login .content { height:240px; } +.block li.item, +.block-poll li, +.opc li.section { vertical-align:top; } + +/* Doubled Margin Fixes */ +.product-view .product-img-box .more-views li, +.product-view .box-tags .form-add .input-box, +.sp-methods select.month { display:inline; } + +/********** < Navigation styles */ +#nav li, +#nav li a { zoom:1; } +#nav li { vertical-align:top; } +/* Show Menu */ +#nav li.over ul.shown-sub { left:0; } +#nav li.over li ul.shown-sub { left:100px; } +/********** < Navigation styles */ + +input.radio { width:13px; height:13px; } +input.checkbox { width:13px; height:13px; } +button.button { height:21px; } +button.button span { position:relative; } +button.btn-checkout { height:38px; } +.form-list label { position:relative; z-index:0; } +.form-list label.required em { position:absolute; top:0; right:-8px; } +.form-list select { margin-bottom:1px; } + +table { face-color:expression(runtimeStyle.scrollbarFaceColor = '#fff', cellSpacing = 0); } + +.product-view .product-img-box .zoom.disabled { filter:alpha(opacity=30); } + +.gift-messages-form { position:relative; zoom:1; } + +.product-view .box-tags .product-tags li, +.footer li { padding:0 4px 0 7px; } + +/* Clearer */ +.clearer { display:block; clear:both; font-size:0; line-height:0; height:0; overflow:hidden; } + +/* Clears and hasLayout fixes */ +.header-container, +.header-container .top-container, +.header, +.header .quick-access, +#nav, +.main, +.footer, +.footer-container .bottom-container, +.col-main, +.col2-set, +.col3-set, +.col4-set, +.messages li, +.search-autocomplete li, +.block, +.block .block-content, +.block .actions, +.block li.item, +.block-poll li, +.block-poll .label, +.block-layered-nav .currently li, +.block-account .block-content li a, +.mini-products-list .product-details, +.page-title, +.rss-title h1, +.products-grid, +.products-list li.item, +.box-account .box-head, +.dashboard .box .box-title, +.box-reviews li.item, +.box-tags li.item, +.pager, +.sorter, +.ratings, +.add-to-box, +.add-to-cart, +.product-essential, +.product-collateral, +.product-view .product-img-box .more-views ul, +.product-view .box-tags .form-add, +.product-options .options-list li, +.product-options-bottom, +.truncated, +.truncated .truncated_full_value, +.product-review, +.cart, +.cart-collaterals, +.cart .crosssell li.item, +.cart .discount, +.opc .step-title, +.opc .step, +.multiple-checkout, +.sp-methods, +.checkout-progress, +.multiple-checkout .place-order, +.form-list li, +.form-list .field, +.group-select li, +.buttons-set, +.page-print .print-head, +.cart-tax-total, +.advanced-search-summary, +.advanced-search-summary p, +.gift-messages-form .item, +.send-friend .form-list li p { zoom:1; } + +/* Hover Fix */ +iframe.hover-fix { position:absolute; left:-1px; top:-1px; z-index:-1; background:transparent; filter:progid:DXImageTransform.Microsoft.Alpha(style=0,opacity=0); } diff --git a/skin/frontend/default/blue/css/styles.css b/skin/frontend/default/blue/css/styles.css new file mode 100644 index 0000000000..a8d3a7d305 --- /dev/null +++ b/skin/frontend/default/blue/css/styles.css @@ -0,0 +1,1556 @@ +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Academic Free License (AFL 3.0) + * that is bundled with this package in the file LICENSE_AFL.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/afl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @category design + * @package default_default + * @copyright Copyright (c) 2009 Irubin Consulting Inc. DBA Varien (http://www.varien.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ + +/* Reset ================================================================================= */ +* { margin:0; padding:0; } + +html,body { height:100%; } +body { background:#4c697b url(../images/bkg_body.gif) 0 0 repeat-x; font:12px/1.55 Arial, Helvetica, sans-serif; color:#2f2f2f; text-align:center; } + +img { border:0; vertical-align:top; } + +a { color:#1e7ec8; text-decoration:underline; } +a:hover { text-decoration:none; } +:focus { outline: 0; } + +/* Headings */ +h1,h2,h3, +h4,h5,h6 { margin:0 0 5px; line-height:1.35; color:#0a263c; } +h1 { font-size:20px; font-weight:normal; } +h2 { font-size:18px; font-weight:normal; } +h3 { font-size:16px; font-weight:bold; } +h4 { font-size:14px; font-weight:bold; } +h5 { font-size:12px; font-weight:bold; } +h6 { font-size:11px; font-weight:bold; } + +/* Forms */ +form { display:inline; } +fieldset { border:0; } +legend { display:none; } + +/* Table */ +table { border:0; /*border-collapse:collapse;*/ border-spacing:0; empty-cells:show; font-size:100%; } +caption,th,td { vertical-align:top; text-align:left; font-weight:normal; } + +/* Content */ +p { margin:0 0 10px; } +strong { font-weight:bold; } +address { font-style:normal; line-height:1.35; } +cite { font-style:normal; } +q, +blockquote { quotes:none; } +q:before, +q:after { content:''; } +small,big { font-size:1em; } +sup { font-size:1em; vertical-align:top; } + +/* Lists */ +ul,ol { list-style:none; } + +/* Tools */ +.hidden { display:block !important; border:0 !important; margin:0 !important; padding:0 !important; font-size:0 !important; line-height:0 !important; width:0 !important; height:0 !important; overflow:hidden !important; } +.nobr { white-space:nowrap !important; } +.wrap { white-space:normal !important; } +.a-left { text-align:left !important; } +.a-center { text-align:center !important; } +.a-right { text-align:right !important; } +.v-top { vertical-align:top; } +.v-middle { vertical-align:middle; } +.f-left, +.left { float:left !important; } +.f-right, +.right { float:right !important; } +.f-none { float:none !important; } +.f-fix { float:left; width:100%; } +.no-display { display:none; } +.no-margin { margin:0 !important; } +.no-padding { padding:0 !important; } +.no-bg { background:none !important; } +/* ======================================================================================= */ + + +/* Layout ================================================================================ */ +.wrapper { min-height:100%; background:url(../images/bkg_body2.gif) 0 100% repeat-x; } +.page { width:970px; margin:0 auto; min-height:100%; text-align:left; } +.page-print { background:#fff; padding:25px 30px; text-align:left; } +.page-empty { background:#fff; padding:20px; text-align:left; } +.page-popup { background:#fff; padding:25px 30px; text-align:left; } +.main-container { width:950px; padding:0 10px; background:url(../images/bkg_shadow.png) 50% 0 repeat-y; } +.main { width:900px; margin:0 auto; min-height:400px; padding:25px 25px 80px; background:#fffffe url(../images/bkg_main2.gif) 0 0 no-repeat; text-align:left; } + +/* Base Columns */ +.col-left { float:left; width:195px; padding:0 0 1px; } +.col-main { float:left; width:685px; padding:0 0 1px; } +.col-right { float:right; width:195px; padding:0 0 1px; } + +/* 1 Column Layout */ +.col1-layout .col-main { float:none; width:auto; } + +/* 2 Columns Layout */ +.col2-left-layout .col-main { float:right; } +.col2-right-layout .col-main {} + +/* 3 Columns Layout */ +.col3-layout .col-main { width:475px; margin-left:17px; } + +/* Content Columns */ +.col2-set .col-1 { float:left; width:48.5%; } +.col2-set .col-2 { float:right; width:48.5%; } +.col2-set .col-narrow { width:32%; } +.col2-set .col-wide { width:65%; } + +.col3-set .col-1 { float:left; width:32%; } +.col3-set .col-2 { float:left; width:32%; margin-left:2%; } +.col3-set .col-3 { float:right; width:32%; } + +.col4-set .col-1 { float:left; width:23.5%; } +.col4-set .col-2 { float:left; width:23.5%; margin:0 2%; } +.col4-set .col-3 { float:left; width:23.5%; } +.col4-set .col-4 { float:right; width:23.5%; } +/* ======================================================================================= */ + + +/* Global Styles ========================================================================= */ +/* Form Elements */ +input,select,textarea,button { font:12px/15px Arial, Helvetica, sans-serif; vertical-align:middle; color:#2f2f2f; } +input.input-text,select,textarea { background:#fff; border:1px solid #b6b6b6; } +input.input-text,textarea { padding:2px; } +select { padding:1px; } +select option { padding-right:10px; } +select.multiselect option { border-bottom:1px solid #b6b6b6; padding:2px 5px; } +select.multiselect option:last-child { border-bottom:0; } +textarea { overflow:auto; } +input.radio { margin-right:3px; } +input.checkbox { margin-right:3px; } +input.qty { width:2.5em !important; } +button.button::-moz-focus-inner { padding:0; border:0; } /* FF Fix */ +button.button { -webkit-border-fit:lines; } /* <- Safari & Google Chrome Fix */ +button.button { overflow:visible; width:auto; border:0; padding:0; margin:0; background:transparent; cursor:pointer; } +button.button span { display:block; height:19px; border:1px solid #406a83; background:#91c1cb url(../images/bkg_button.gif) 0 100% repeat-x; padding:0 8px; font:bold 12px/19px arial, helvetica, sans-serif; text-align:center; white-space:nowrap; color:#fff; } +button.button span span { border:0; padding:0; } +button.disabled span { border-color:#999; background:#ccc; color:#eee;} + +button.btn-checkout span { height:36px; border-color:#2d813b; background:#345d1d url(../images/btn_checkout.gif) 0 0 repeat-x; padding:0 27px; font:bold 14px/36px arial, helvetica, sans-serif; color:#fff; } + +p.control input.checkbox, +p.control input.radio { margin-right:6px; } +/* Form Highlight */ +input.input-text:focus,select:focus,textarea:focus { background-color:#fafaec; } +/*.highlight { background:#efefef; }*/ + +/* Form lists */ +/* Grouped fields */ +/*.form-list { width:535px; margin:0 auto; overflow:hidden; }*/ +.form-list li { margin:0 0 8px; } +.form-list label { float:left; color:#667; font-weight:bold; position:relative; z-index:0; } +.form-list label.required {} +.form-list label.required em { float:right; font-style:normal; color:#eb340a; position:absolute; top:0; right:-8px; } +.form-list li.control label { float:none; } +.form-list li.control input.radio, +.form-list li.control input.checkbox { margin-right:6px; } +/*.form-list li.fields { margin-right:-15px; }*/ +.form-list .input-box { display:block; clear:both; width:260px; } +.form-list .field { float:left; width:275px; } +.form-list input.input-text { width:254px; } +.form-list textarea { width:254px; height:10em; } +.form-list select { width:260px; } +.form-list li.wide .input-box { width:535px; } +.form-list li.wide input.input-text { width:529px; } +.form-list li.wide textarea { width:529px; } +.form-list li.wide select { width:535px; } +.form-list li.additional-row { border-top:1px solid #ccc; margin-top:10px; padding-top:7px; } +.form-list li.additional-row .btn-remove { float:right; margin:5px 0 0; } +.form-list .input-range input.input-text { width:74px; } +/* Customer */ +.form-list .customer-name-prefix .input-box, +.form-list .customer-name-suffix .input-box, +.form-list .customer-name-prefix-suffix .input-box, +.form-list .customer-name-prefix-middlename .input-box, +.form-list .customer-name-middlename-suffix .input-box, +.form-list .customer-name-prefix-middlename-suffix .input-box { width:auto; } + +.form-list .name-prefix { width:65px; } +.form-list .name-prefix select { width:55px; } +.form-list .name-prefix input.input-text { width:49px; } + +.form-list .name-suffix { width:65px; } +.form-list .name-suffix select { width:55px; } +.form-list .name-suffix input.input-text { width:49px; } + +.form-list .name-middlename { width:70px; } +.form-list .name-middlename input.input-text { width:49px; } + +.form-list .customer-name-prefix-middlename-suffix .name-firstname, +.form-list .customer-name-prefix-middlename .name-firstname { width:140px; } +.form-list .customer-name-prefix-middlename-suffix .name-firstname input.input-text, +.form-list .customer-name-prefix-middlename .name-firstname input.input-text { width:124px; } +.form-list .customer-name-prefix-middlename-suffix .name-lastname { width:205px; } +.form-list .customer-name-prefix-middlename-suffix .name-lastname input.input-text { width:189px; } + +.form-list .customer-name-prefix-suffix .name-firstname { width:210px; } +.form-list .customer-name-prefix-suffix .name-lastname { width:205px; } +.form-list .customer-name-prefix-suffix .name-firstname input.input-text, +.form-list .customer-name-prefix-suffix .name-lastname input.input-text { width:189px; } + +.form-list .customer-name-prefix-suffix .name-firstname { width:210px; } +.form-list .customer-name-prefix-suffix .name-lastname { width:205px; } +.form-list .customer-name-prefix-suffix .name-firstname input.input-text, +.form-list .customer-name-prefix-suffix .name-lastname input.input-text { width:189px; } + +.form-list .customer-name-prefix .name-firstname, +.form-list .customer-name-middlename .name-firstname { width:210px; } + +.form-list .customer-name-suffix .name-lastname, +.form-list .customer-name-middlename .name-firstname, +.form-list .customer-name-middlename-suffix .name-firstname, +.form-list .customer-name-middlename-suffix .name-lastname { width:205px; } + +.form-list .customer-name-prefix .name-firstname input.input-text, +.form-list .customer-name-suffix .name-lastname input.input-text, +.form-list .customer-name-middlename .name-firstname input.input-text, +.form-list .customer-name-middlename-suffix .name-firstname input.input-text, +.form-list .customer-name-middlename-suffix .name-lastname input.input-text { width:189px; } + +.form-list .customer-dob .dob-month, +.form-list .customer-dob .dob-day, +.form-list .customer-dob .dob-year { float:left; width:85px; } +.form-list .customer-dob input.input-text { display:block; width:74px; } +.form-list .customer-dob label { font-size:10px; font-weight:normal; color:#888; } +.form-list .customer-dob .dob-day, +.form-list .customer-dob .dob-month { width:60px; } +.form-list .customer-dob .dob-day input.input-text, +.form-list .customer-dob .dob-month input.input-text { width:46px; } +.form-list .customer-dob .dob-year { width:140px; } +.form-list .customer-dob .dob-year input.input-text { width:134px; } + +/* Independent fields */ +/*.form-list li { margin:0 0 8px; } +.form-list li.fields { margin:0; } +.form-list .field { display:block; margin:0 0 8px; } +.form-list li.control {} +.form-list label { float:left; width:150px; padding:2px 10px 0 0; text-align:right; } +.form-list label.required { font-weight:bold; } +.form-list label.required em { font-variant:normal; color:#f00; margin-right:3px; } +.form-list .input-box { float:left; width:260px; } +.form-list input.input-text, +.form-list textarea { width:254px; } +.form-list select { width:260px; } +.form-list li.additional-row { border-top:1px solid #ddd; margin-top:10px; } +.form-list li.additional-row .btn-remove { float:right; margin:5px 5px 0 0; } +.form-list .input-range input.input-text { width:96px; }*/ +/* Customer */ +/*.form-list .customer-dob .dob-month, +.form-list .customer-dob .dob-day, +.form-list .customer-dob .dob-year { float:left; width:85px; } +.form-list .customer-dob input.input-text { display:block; width:74px; } +.form-list .customer-dob label { font-size:11px; font-weight:normal; color:#777; text-align:left; } +.form-list .customer-dob .dob-day, +.form-list .customer-dob .dob-month { width:60px; } +.form-list .customer-dob .dob-day input.input-text, +.form-list .customer-dob .dob-month input.input-text { width:46px; } +.form-list .customer-dob .dob-year { width:140px; } +.form-list .customer-dob .dob-year input.input-text { width:134px; }*/ + +.buttons-set { clear:both; margin:4em 0 0; padding:8px 0 0; border-top:1px solid #e4e4e4; text-align:right; } +.buttons-set p.required { margin:0 0 10px; } +.buttons-set .back-link { float:left; margin:0; } +.buttons-set button.button { float:right; margin-right:5px; } + +.fieldset { border:1px solid #bbafa0; background:#fbfaf6; padding:22px 25px 12px 33px; margin:28px 0; } +.fieldset .legend { float:left; font-weight:bold; font-size:13px; border:1px solid #f19900; background:#f9f3e3; color:#e76200; margin:-33px 0 0 -10px; padding:0 8px; position:relative; } + +/* Form Validation */ +.validation-advice { clear:both; min-height:13px; margin:3px 0 0; padding-left:17px; font-size:11px; font-weight:bold; line-height:13px; background:url(../images/validation_advice_bg.gif) 2px 0 no-repeat; color:#eb340a; } +.validation-failed { border:1px dashed #eb340a !important; background:#faebe7 !important; } +.validation-passed {} +p.required { font-size:11px; text-align:right; color:#EB340A; } +/* Expiration date and CVV number validation fix */ +.v-fix { float:left; } +.v-fix .validation-advice { display:block; width:12em; margin-right:-12em; position:relative; } + +/* Global Messages */ +.success { color:#3d6611; font-weight:bold; } +.error { color:#df280a; font-weight:bold; } +.notice { color:#e26703; } + +.messages, +.messages ul { list-style:none !important; margin:0 !important; padding:0 !important; } +.messages { width:100%; overflow:hidden; } +.messages li { margin:0 0 10px !important; } +.messages li li { margin:0 0 3px !important; } +.error-msg, +.success-msg, +.note-msg, +.notice-msg { border-style:solid !important; border-width:1px !important; background-position:10px 9px !important; background-repeat:no-repeat !important; min-height:24px !important; padding:8px 8px 8px 32px !important; font-size:11px !important; font-weight:bold !important; } +.error-msg { border-color:#f16048; background-color:#faebe7; background-image:url(../images/i_msg-error.gif); color:#df280a; } +.success-msg { border-color:#446423; background-color:#eff5ea; background-image:url(../images/i_msg-success.gif); color:#3d6611; } +.note-msg, +.notice-msg { border-color:#fcd344; background-color:#fafaec; background-image:url(../images/i_msg-note.gif); color:#3d6611; } + +/* BreadCrumbs */ +.breadcrumbs { font-size:11px; line-height:1.25; margin:0 0 13px; } +.breadcrumbs li { display:inline; } +.breadcrumbs li strong { font-weight:bold; } + +/* Page Heading */ +.page-title { width:100%; overflow:hidden; border-bottom:1px solid #ccc; margin:0 0 25px; } +.page-title h1 { margin:0; color:#0a263c; } +.page-title .separator { margin:0 3px; } +.page-title .link-rss { float:right; margin:7px 0 0; } +.title-buttons { text-align:right; } +.title-buttons h1, +.title-buttons h2, +.title-buttons h3, +.title-buttons h4, +.title-buttons h5, +.title-buttons h6 { float:left; } + +.subtitle { clear:both; padding:15px 0 0; font-size:15px; font-weight:bold; margin:0 0 6px; color:#2f2f2f; } + +/* Pager */ +.pager { font-size:11px; background:#fff url(../images/bkg_toolbar.gif) 0 100% repeat-x; padding:4px 8px; border-top:1px solid #e2e2e2; text-align:center; } +.pager .amount { float:left; margin:0; } +.pager .limiter { float:right; } +.pager .limiter label { vertical-align:middle; } +.pager .limiter select { padding:0; margin:0 0 1px; vertical-align:middle; } +.pager .pages { margin:0 140px; } +.pager .pages ol { display:inline; } +.pager .pages li { display:inline; margin:0 2px; } +.pager .pages .current {} + +/* Sorter */ +.sorter { font-size:11px; background:#fff url(../images/bkg_toolbar.gif) 0 100% repeat-x; padding:3px 8px; border-top:1px solid #e2e2e2; } +.sorter .view-mode { float:left; margin:0; } +.sorter .sort-by { float:right; padding-right:36px; } +.sorter .sort-by label { vertical-align:middle; } +.sorter .sort-by select { padding:0; margin:0 0 1px; vertical-align:middle; } +.sorter .link-feed {} + +/* Toolbar */ +.toolbar {} +.toolbar .pager { padding:3px 8px; border-bottom:1px solid #fff; } +.toolbar .sorter { border-bottom:1px solid #fff; } +.toolbar-bottom {} + +/* Data Table */ +/* Data Table */ +.data-table { width:100%; border:1px solid #bebcb7; } +.data-table tr { background:#fff; } +.data-table .odd { background:#f8f7f5 } +.data-table .even { background:#eeeded !important; } +.data-table td.last, +.data-table th.last { border-right:0; } +.data-table tr.last th, +.data-table tr.last td { border-bottom:0 !important; } +.data-table th { padding:3px 8px; font-weight:bold; } +.data-table td { padding:3px 8px; } + +.data-table thead th { font-weight:bold; border-right:1px solid #c2d3e0; padding:2px 8px; color:#0a263c; white-space:nowrap; } +.data-table thead th.wrap { white-space:normal; } +.data-table thead th a, +.data-table thead th a:hover { color:#fff; } +.data-table thead th { background:url(../images/bkg_th.gif) repeat-x 0 100% #d9e5ee; } + +.data-table tfoot { border-bottom:1px solid #d9dde3; } +.data-table tfoot tr.first { background:url(../images/bkg_tfoot.gif) 0 0 repeat-x; } +.data-table tfoot tr { background-color:#dee5e8 !important; } +.data-table tfoot td { padding-top:1px; padding-bottom:1px; border-bottom:0; border-right:1px solid #d9dde3; } +.data-table tfoot strong { font-size:16px; } + +.data-table tbody th, +.data-table tbody td { border-bottom:1px solid #d9dde3; border-right:1px solid #d9dde3; } +/* Bundle products tables */ +.data-table tbody.odd tr { background:#f8f7f5 !important; } +.data-table tbody.even tr { background:#f6f6f6 !important; } +.data-table tbody.odd tr td, +.data-table tbody.even tr td { border-bottom:0; } +.data-table tbody.odd tr.border td, +.data-table tbody.even tr.border td { border-bottom:1px solid #d9dde3; } + +.data-table tbody td .option-label { font-weight:bold; font-style:italic; } +.data-table tbody td .option-value { padding-left:10px; } + +/* Tax Details Row */ +tr.tax-total { cursor:pointer; } +tr.tax-total td {} +tr.tax-total .tax-collapse { float:right; text-align:right; padding-left:20px; background:url(../images/bkg_collapse.gif) 0 4px no-repeat; cursor:pointer; } +tr.show-details .tax-collapse { background-position:0 -53px; } +tr.show-details td {} +tr.tax-details td { background-color:#f6f6f6; } +tr.tax-details-first td {} + +/* Shopping cart tax info */ +.cart-tax-info, +.cart-tax-info .cart-price { padding-right:20px; } +.cart-tax-total { display:block; padding-right:20px; background:url(../images/bkg_collapse.gif) 100% 4px no-repeat; cursor:pointer; } +.cart-tax-total-expanded { background-position:100% -52px; } + +/* Class: std - styles for admin-controlled content */ +/*.std ul, +.std ol, +.std dl, +.std p, +.std address, +.std blockquote { margin:0 0 1em; padding:0; } +.std ul { list-style:disc outside; padding-left:1.5em; } +.std ol { list-style:decimal outside; padding-left:1.5em; } +.std ul ul { list-style-type:circle; } +.std ul ul, +.std ol ol, +.std ul ol, +.std ol ul { margin:.5em 0; } +.std dt { font-weight:bold; } +.std dd { padding:0 0 0 1.5em; } +.std blockquote { font-style:italic; padding:0 0 0 1.5em; } +.std address { font-style:normal; } +.std b, +.std strong { font-weight:bold; } +.std i, +.std em { font-style:italic; }*/ + +/* Misc */ +.links li { display:inline; } +.links li.first { padding-left:0 !important; } +.links li.last { background:none !important; padding-right:0 !important; } + +.link-cart { color:#dc6809 !important; font-weight:bold; } +.link-wishlist { color:#dc6809 !important; font-weight:bold; } +.link-reorder { font-weight:bold; color:#dc6809 !important; } +.link-compare { font-weight:bold; } +.link-print { /*background:url(../images/i_print.gif) 0 2px no-repeat; padding:2px 0 2px 25px;*/ font-weight:bold; color:#dc6809; } +.link-rss { background:url(../images/i_rss.gif) 0 2px no-repeat; padding-left:18px; line-height:14px; white-space:nowrap; } +.btn-remove { display:block; width:11px; height:11px; font-size:0; line-height:0; background:url(../images/btn_remove.gif) 0 0 no-repeat; text-indent:-999em; overflow:hidden; } +.btn-remove2 { display:block; width:16px; height:16px; font-size:0; line-height:0; background:url(../images/btn_trash.gif) 0 0 no-repeat; text-indent:-999em; overflow:hidden; } + +.separator { margin:0 3px; } + +.divider { clear:both; display:block; font-size:0; line-height:0; height:1px; margin:10px 0; background:url(../images/bkg_divider1.gif) 0 50% repeat-x; text-indent:-999em; overflow:hidden; } + +/* Noscript Notice */ +.noscript { border:1px solid #ddd; border-width:0 0 1px; background:#ffff90; font-size:12px; line-height:1.25; text-align:center; color:#2f2f2f; } +.noscript .noscript-inner { width:950px; margin:0 auto; padding:12px 0 12px; background:url(../images/i_notice.gif) 20px 50% no-repeat; } +.noscript p { margin:0; } + +/* Demo Notice */ +.demo-notice { margin:0; padding:6px 10px; background:#d75f07; font-size:12px; line-height:1.15; text-align:center; color:#fff; } +/* ======================================================================================= */ + + +/* Header ================================================================================ */ +.logo { float:left; } +.header-container { width:950px; padding:0 10px; background:url(../images/bkg_shadow.png) 50% 0 repeat; } +.header { margin:0 auto; padding:10px; text-align:right; border-top:5px solid #0d2131; border-bottom:1px solid #415966; background:url(../images/bkg_header.jpg) 0 0 no-repeat; position:relative; z-index:10; } +.header .logo { float:left; margin:3px 0 10px 12px; text-decoration:none !important; } +.header .logo strong { position:absolute; top:-999em; left:-999em; width:0; height:0; font-size:0; line-height:0; text-indent:-999em; overflow:hidden; } +.header h1.logo { margin:0; } +.header .quick-access { float:right; width:600px; padding:28px 10px 0 0; } +.header .welcome-msg { margin:0; color:#fff; text-align:right; } +.header .form-search { position:absolute; top:0; right:29px; width:300px; height:30px; background:url(../images/bkg_form-search.gif) 0 0 no-repeat; padding:1px 15px 0 16px; } +.header .form-search label { float:left; width:24px; height:21px; text-align:left; text-indent:-999em; overflow:hidden; } +.header .form-search input.input-text { float:left; border-color:#5c7989; width:209px; margin-right:4px; } +.header .form-search button.button { float:left; } +.header .form-search button.button span { border:0; height:21px; background:url(../images/btn_search.gif) 0 0 no-repeat; padding:0 0 0 3px; font:bold 11px/21px Tahoma, Verdana, Arial, sans-serif; } +.header .form-search button.button span span { background-position:100% 0; padding:0 6px 0 3px; } +.header .form-search .search-autocomplete { z-index:999; left:40px !important; top:22px !important; } +.header .form-search .search-autocomplete ul { border:1px solid #5c7989; background-color:#f9f5f0; } +.header .form-search .search-autocomplete li { text-align:left; border-bottom:1px solid #f4eee7; padding:2px 8px 1px 8px; cursor:pointer; } +.header .form-search .search-autocomplete li .amount { float:right; font-weight:bold; } +.header .form-search .search-autocomplete li.odd { background-color:#fffefb; } +.header .form-search .search-autocomplete li.selected { background-color:#f7e8dd; } +.header .form-language { clear:both; padding:5px 0 0; text-align:right; } +.header .form-language label { font-weight:bold; padding-right:5px; color:#a7c6dd; vertical-align:middle; } +.header .form-language select { padding:0; } +.header .form-language select.flags option { background-position:4px 50%; background-repeat:no-repeat; padding-left:25px; } +.header .links { float:right; margin:0 0 6px; } +.header .links li { float:left; font-size:11px; background:url(../images/bkg_pipe1.gif) 100% 60% no-repeat; padding:0 8px 0 7px; } +.header .links a { color:#ebbc58; } +.header-container .top-container { clear:both; padding:5px 10px 0 12px; } + +/********** < Navigation */ +.nav-container { width:950px; padding:0 10px; background:url(../images/bkg_shadow.png) 50% 0 repeat-y; } +#nav { padding:0 16px; background:#0a263d; font-size:13px; } + +/* ALL Levels */ /* Style consistent throughout all nav levels */ +#nav li { position:relative; text-align:left; } +#nav li.over { z-index:999; } +#nav a, +#nav a:hover { display:block; line-height:1.3em; text-decoration:none; } +#nav span { display:block; cursor:pointer; white-space:nowrap; } +#nav li ul span {white-space:normal; } +#nav ul li.parent a { background:url(../images/bkg_nav2.gif) 100% 100% no-repeat; } +#nav ul li.parent li a { background-image:none; } + +/* 0 Level */ +#nav li { float:left; } +#nav li.active a { color:#d96708; } +#nav a { float:left; padding:5px 12px 6px 8px; color:#a7c6dd; font-weight:bold; } +#nav li.over a, +#nav a:hover { color:#d96708; } + +/* 1st Level */ +#nav ul li, +#nav ul li.active { float:none; margin:0; padding-bottom:1px; background:#ecf3f6 url(../images/bkg_nav1.gif) 0 100% repeat-x; } +/*#nav ul li.over { background:#d5e4eb url(../images/bkg_nav1.gif) repeat-x 0 100%; }*/ +#nav ul li.last { background:#ecf3f6; padding-bottom:0; } + +#nav ul a, +#nav ul a:hover { float:none; padding:0; background:none; } +#nav ul li a { font-weight:normal !important; } + +/* 2nd Level */ +#nav ul { position:absolute; width:15em; top:27px; left:-10000px; border:1px solid #899ba5; } + +/* Show menu */ +#nav li.over > ul { left:0; } +#nav li.over > ul li.over > ul { left:100px; } +#nav li.over ul ul { left:-10000px; } + +#nav ul li a { background:#ecf3f6; } +#nav ul li a:hover { background:#d5e4eb; } +#nav ul li a, +#nav ul li a:hover { color:#2f2f2f !important; } +#nav ul span, #nav ul li.last li span { padding:3px 15px 4px 15px; } + +/* 3rd+ Level */ +#nav ul ul { top:5px; } +/********** Navigation > */ +/* ======================================================================================= */ + + +/* Sidebar =============================================================================== */ +.block { border:1px solid #c4c1bc; margin:0 0 15px; } +.block .block-title { background:url(../images/bkg_block-title.gif) 0 0 repeat-x; border-bottom:1px solid #ddd; padding:2px 9px; } +.block .block-title strong { display:block; font:bold 12px/16px Arial, Helvetica, sans-serif; min-height:16px; padding:1px 0 1px; text-transform:uppercase; color:#2f2f2f; } +.block .block-title strong span {} +.block .block-title a { text-decoration:none !important; } +.block .block-subtitle { margin:0; padding:5px 9px; font-size:1em; font-weight:bold; color:#0a263c; } +.block .block-content { background:#e7f1f4; } +.block .block-content li.item { padding:7px 9px; } +.block .btn-remove { float:right; margin:1px 0 2px 5px; } +.block .actions { background:#dee5e8 url(../images/bkg_block-actions.gif) 0 0 repeat-x; padding:6px 9px; text-align:right; } +.block .actions a { float:left; } +.block .actions button.button { float:right; } +.block .empty { margin:0; padding:5px 9px; } + +.block li.odd { background-color:#f4f3f3; } +.block li.even { background-color:#fafafa; } + +/* Mini Blocks */ +.block-cart, +.block-wishlist, +.block-subscribe, +.block-compare, +.block-reorder, +.block-poll, +.block-viewed, +.block-compared, +.block-related, +.block-tags, +.block-login { font-size:11px; line-height:1.25; } +.block-cart .block-title strong, +.block-wishlist .block-title strong, +.block-subscribe .block-title strong, +.block-compare .block-title strong, +.block-reorder .block-title strong, +.block-poll .block-title strong, +.block-viewed .block-title strong, +.block-compared .block-title strong, +.block-related .block-title strong, +.block-tags .block-title strong, +.block-login .block-title strong { background-position:0 0; background-repeat:no-repeat; padding-left:21px; } + +/* Mini Products List */ +.mini-products-list .product-image { float:left; width:50px; border:1px solid #a9a9a9; } +.mini-products-list .product-details { margin-left:60px; } + +/* Block: Account */ +.block-account { border-color:#bbb; } +.block-account .block-title { background:#fc9d36 url(../images/bkg_block-title-account.gif) 0 100% repeat-x; border:0; padding:3px 10px; } +.block-account .block-title strong { font-size:13px; color:#fff; } +.block-account .block-content { background:#fbfaf6; padding:7px 10px 7px; } +.block-account .block-content li a { display:block; border-bottom:1px solid #ddd; padding:3px 0; color:#5f5d5c; text-decoration:none !important; } +.block-account .block-content li a:hover { color:#ea7900; } +.block-account .block-content li.last a { border-bottom:0; } +.block-account .block-content li.current { border-bottom:1px solid #ddd; padding:3px 0; color:#ea7900; } +.block-account .block-content li.current.last { border-bottom:0; } + +/* Block: Currency Switcher */ +.block-currency { border:0; background:url(../images/bkg_block-currency.gif) 0 0 no-repeat; padding:7px 12px 10px; height:51px; } +.block-currency .block-title { background:none; border:0; padding:0; margin:0 0 5px; } +.block-currency .block-title strong { font:bold 13px/21px Arial, Helvetica, sans-serif; background:url(../images/i_block-currency.gif) 0 50% no-repeat; padding:0 0 0 21px; text-transform:none; color:#fff; } +.block-currency .block-content { background:none; padding:0; } +.block-currency .block-content select { width:100%; padding:0; } + +/* Block: Layered Navigation */ +.block-layered-nav { border:0; } +.block-layered-nav .block-title { border:0; padding:0; height:24px; background:url(../images/bkg_block-layered-title.gif) 0 0 no-repeat; text-indent:-999em; overflow:hidden; } +.block-layered-nav .block-subtitle { line-height:1.35; background:#d5e8ff url(../images/bkg_block-layered1.gif) 0 50% repeat; padding:3px 9px; border:1px solid #b9ccdd; border-width:1px 0; text-transform:uppercase; color:#1f5070; } +.block-layered-nav .block-content { border:1px solid #a0b3c3; background:#e7f1f4; } +.block-layered-nav dt { background:url(../images/bkg_block-layered-dt.gif) 9px 11px no-repeat; padding:7px 10px 0 28px; font-weight:bold; text-transform:uppercase; } +.block-layered-nav dd { padding:0 12px 12px; background:url(../images/bkg_block-layered-dd.gif) 0 100% repeat-x; } +.block-layered-nav dd.last { background:none; } +.block-layered-nav .currently li { background:#f00 url(../images/bkg_block-layered-li.gif) 0 100% repeat-x; padding:4px 6px 4px 10px; } +.block-layered-nav .currently .label { font-weight:bold; padding-left:18px; background:url(../images/bkg_block-layered-label.gif) 0 3px no-repeat; text-transform:uppercase; } +.block-layered-nav .currently .btn-remove { margin:3px 0 0; } +.block-layered-nav .actions { font-size:11px; padding:4px 9px; background:#cad6e4; border:1px solid #dee5e8; border-width:1px 0; text-align:right; } +.block-layered-nav .actions a { float:none; } + +/* Block: Cart */ +.block-cart .block-title { /*border-bottom:0;*/ } +.block-cart .block-title strong { background-image:url(../images/i_block-cart.gif); } +.block-cart .summary { background:#fff; padding:2px 8px 8px; margin:-1px 0 0; position:relative; z-index:1; } +.block-cart .amount { margin:0; } +.block-cart .amount a { font-weight:bold; } +.block-cart .subtotal { margin:5px 0 0; padding:2px 0; background:#fbebd9; text-align:center; } +.block-cart .subtotal .price { font-weight:bold; } +.block-cart .actions { border-bottom:1px solid #c2c2c2; } + +/* Block: Wishlist */ +.block-wishlist .block-title strong { background-image:url(../images/i_block-wishlist.gif); } +.block-wishlist .actions { text-align:right; } +.block-wishlist .actions a { float:none; } + +/* Block: Related */ +.block-related .block-title strong { background-image:url(../images/i_block-related.gif); background-position:0 1px; } +.block-related input.checkbox { float:left; } +.block-related .product { margin-left:20px; } + +/* Block: Compare Products */ +.block-compare .block-title strong { background-image:url(../images/i_block-list.gif); background-position:0 1px; } +.page-popup .link-print { background:url(../images/i_print.gif) 0 2px no-repeat; padding:2px 0 2px 25px; font-weight:bold; color:#1e7ec8; } +.compare-table { border:0; } +.compare-table thead tr.first th, +.compare-table thead tr.first td { border:0; background:none; padding:0; font-size:0; line-height:0; } +.compare-table .btn-remove { float:right; background-image:url(../images/btn_remove2.gif); width:72px; height:15px; } +.compare-table tbody th { background:#d9e5ee url(../images/bkg_th-v.gif) 100% 0 repeat-y; } +.compare-table tbody th, +.compare-table tbody td { padding:10px; border:0; border-top:1px solid #ccc; border-left:1px solid #ccc; } +.compare-table tbody td.last { border-right:1px solid #ccc; } +.compare-table tbody tr.last th, +.compare-table tbody tr.last td { border-bottom:1px solid #ccc !important; } +.compare-table tr.add-to-row td { background:#fffada; text-align:center; } +.compare-table tr.first td { text-align:center; } +.compare-table tr.first td .product-name { font-size:13px; font-weight:bold; margin:0 0 5px; color:#203548; } +.compare-table tr.first td .product-name a { color:#203548; } +.compare-table tr.first td .ratings { width:69px; margin:0 auto; } +.compare-table tr.first td p, +.compare-table tr.add-to-row td p { margin:0; } + +/* Block: Recently Viewed */ +.block-viewed .block-title strong { background-image:url(../images/i_block-viewed.gif); } + +/* Block: Recently Compared */ +.block-compared .block-title strong { background-image:url(../images/i_block-list.gif); background-position:0 1px; } + +/* Block: Poll */ +.block-poll .block-title strong { background-image:url(../images/i_block-poll.gif); } +.block-poll .block-subtitle { font-size:12px; } +.block-poll label { color:#777; font-weight:bold; } +.block-poll input.radio { float:left; margin:1px -18px 0 0; } +.block-poll .label { display:block; margin-left:18px; } +.block-poll li { padding:3px 9px; } +.block-poll .answer { font-weight:bold; } +.block-poll .votes { float:right; margin-left:10px; } + +/* Block: Tags */ +.block-tags .block-title strong { background-image:url(../images/i_block-tags.gif); } +.block-tags .block-content ul { font-size:12px; padding:10px; } +.block-tags .block-content li { display:inline; padding-right:4px; } +.block-tags .block-content a { color:#1b2d3b; } +.block-tags .actions { text-align:right; } +.block-tags .actions a { float:none; } + +/* Block: Subscribe */ +.block-subscribe .block-content { padding:5px 10px; } +.block-subscribe .block-title strong { background-image:url(../images/i_block-subscribe.gif); } +.block-subscribe label { font-weight:bold; color:#667; } +.block-subscribe input.input-text { display:block; width:167px; margin:3px 0; } +.block-subscribe .actions { background:none; padding:0; margin:3px 0 0; text-align:left; } +.block-subscribe .actions button.button { float:none; } + +/* Block: Reorder */ +.block-reorder .block-title strong { background-image:url(../images/i_block-list.gif); } +.block-reorder input.checkbox { float:left; margin:2px -20px 0 0; } +.block-reorder .product-name { margin-left:20px; } +.block-reorder .validation-advice { margin:3px 9px 7px; } + +/* Block: Banner */ +.block-banner { border:0; } +.block-banner .block-content { padding:0; text-align:center; } + +/* Block: Login */ +.block-login .block-title strong { background-image:url(../images/i_ma-info.gif); } +.block-login .block-content { padding:5px 10px; } +.block-login label { font-weight:bold; color:#667; } +.block-login input.input-text { display:block; width:167px; margin:3px 0; } +.block-login .actions { background:none; padding:0; margin:3px 0 0; } +/* ======================================================================================= */ + + +/* Category Page ========================================================================= */ +.category-title { border:0; margin:0 0 7px; } +.category-image { margin:0 0 10px; text-align:center; } +.category-image img {} +.category-description { margin:0 0 10px; } +.category-products {} + +/* View Type: Grid */ +.products-grid { border-bottom:1px solid #d9ddd3; background:url(../images/bkg_grid.gif) 0 0 repeat; position:relative; } +.products-grid.last { border-bottom:0; } +.products-grid li.item { float:left; width:138px; padding:12px 10px 80px; } +.products-grid .product-image { display:block; width:135px; height:135px; margin:0 0 10px; } +.products-grid .product-name { /*min-height:2.7em;*/ margin:0 0 5px; font-weight:bold; font-size:13px; color:#203548; } +.products-grid .product-name a { color:#203548; } +.products-grid .price-box { margin:5px 0; } +.products-grid .availability { line-height:21px; } +.products-grid .actions { position:absolute; bottom:12px; } +.col2-left-layout .products-grid, +.col2-right-layout .products-grid { width:632px; margin:0 auto; } +.col1-layout .products-grid { width:790px; margin:0 auto; } + +/* View Type: List */ +.products-list li.item { border-bottom:1px solid #d9ddd3; padding:12px 10px; } +.products-list li.item.last { border-bottom:0; } +.products-list .product-image { float:left; width:135px; } +.products-list .product-shop { margin-left:150px; } +.products-list .product-image { display:block; width:135px; height:135px; margin:0 0 10px; } +.products-list .product-name { margin:0 0 5px; font-weight:bold; font-size:13px; color:#203548; } +.products-list .product-name a { color:#203548; } +.products-list .price-box { float:left; margin:3px 13px 5px 0; } +.products-list .availability { float:left; margin:3px 0 0; } +.products-list .desc { clear:both; padding:6px 0 0; margin:0 0 15px; line-height:1.35; } +.products-list .desc .link-more { font-size:11px; } +.products-list .add-to-links { clear:both; } +.products-list .add-to-links li { display:inline; } +.products-list .add-to-links .separator { display:inline; margin:0 2px; } +/* ======================================================================================= */ + + +/* Product View ========================================================================== */ +/* Rating */ +.no-rating { margin:0; } + +.ratings { font-size:11px; line-height:1.25; margin:7px 0; } +.ratings strong { float:left; margin:1px 3px 0 0; } +.ratings .rating-links { margin:0; } +.ratings .rating-links .separator { margin:0 2px; } +.ratings dt {} +.ratings dd {} +.rating-box { width:69px; height:13px; font-size:0; line-height:0; background:url(../images/bkg_rating.gif) 0 0 repeat-x; text-indent:-999em; overflow:hidden; } +.rating-box .rating { float:left; height:13px; background:url(../images/bkg_rating.gif) 0 100% repeat-x; } +.ratings .rating-box { float:left; margin-right:3px; } +.ratings .amount {} + +.ratings-table th, +.ratings-table td { font-size:11px; line-height:1.15; padding:3px 0; } +.ratings-table th { font-weight:bold; padding-right:8px; } + +/* Availability */ +.availability { margin:0; } +.availability span { font-weight:bold; } +.availability.in-stock span {} +.availability.out-of-stock span { color:#d83820; } +.product-view .product-shop .availability { font-size:11px; } +.product-view .product-shop .availability span { font-weight:normal; } + +/* Email to a Friend */ +.email-friend { margin:0; } + +/* Alerts */ +.alert-price { margin:0; font-size:11px; } +.alert-stock { margin:0; font-size:11px; } + +/********** < Product Prices */ +.price { white-space:nowrap !important; } + +.price-box { margin:5px 0; } +.price-box .price { font-weight:bold; color:#339933; } + +/* Regular price */ +.regular-price {} +.regular-price .price { font-weight:bold; font-size:13px; } +.block .regular-price, +.block .regular-price .price { color:#2f2f2f; } + +/* Old price */ +.old-price { margin:0; } +.old-price .price-label { white-space:nowrap; color:#999; } +.old-price .price { font-weight:bold; text-decoration:line-through; } + +/* Special price */ +.special-price { margin:0; padding:3px 0; } +.special-price .price-label { font-size:13px; font-weight:bold; white-space:nowrap; color:#cd5033; } +.special-price .price { font-size:13px; font-weight:bold; } + +/* Minimal price (as low as) */ +.minimal-price { margin:0; } +.minimal-price .price-label { font-weight:bold; white-space:nowrap; } + +.minimal-price-link { display:block; } +.minimal-price-link .label {color:#1e7ec8;} +.minimal-price-link .price { font-weight:normal; color:#1e7ec8; } + +/* Excluding tax */ +.price-excluding-tax { display:block; color:#999; } +.price-excluding-tax .label { white-space:nowrap; color:#999; } +.price-excluding-tax .price { font-size:13px; font-weight:normal; } + +/* Including tax */ +.price-including-tax { display:block; color:#999; } +.price-including-tax .label { white-space:nowrap; color:#999; } +.price-including-tax .price { font-size:13px; font-weight:bold; } + +/* Excl tax (for order tables) */ +.price-excl-tax { display:block; } +.price-excl-tax .label { display:block; white-space:nowrap; } +.price-excl-tax .price { display:block; } + +/* Incl tax (for order tables) */ +.price-incl-tax { display:block; } +.price-incl-tax .label { display:block; white-space:nowrap; } +.price-incl-tax .price { display:block; font-weight:bold; } + +/* Price range */ +.price-from { margin:0; } +.price-from .price-label { font-weight:bold; white-space:nowrap; } + +.price-to { margin:0; } +.price-to .price-label { font-weight:bold; white-space:nowrap; } + +/* Price notice next to the options */ +.price-notice { padding-left:10px; color:#999; } +.price-notice .price { font-weight:bold; color:#2f2f2f; } + +.price-as-configured { margin:0; } +.price-as-configured .price-label { font-weight:bold; white-space:nowrap; } + +.price-box-bundle { padding:0 0 10px 0; } +.price-box-bundle .price-box { margin:0 !important; padding:0 !important; } +.price-box-bundle .price { color:#555; } + +.tier-prices-grouped li { padding:2px 0; color:#e26703; } +.tier-prices-grouped li .price { font-weight:bold; } +/********** Product Prices > */ + +/* Tier Prices */ +.tier-prices { margin:10px 0; padding:10px; background-color:#f4f7f7; border:1px solid #dadddd; } +.tier-prices li { line-height:1.4; background:url(../images/i_tier.gif) no-repeat 0 3px; padding:2px 0 2px 10px; color:#424242; } +.tier-prices .benefit { font-style:italic; font-weight:bold; color:#2f2f2f; } +.tier-prices .price { font-weight:bold; color:#2f2f2f; } + +/* Add to Links */ +.add-to-links { font-size:11px; margin:5px 0 0; } +.add-to-links .separator { display:none; } + +/* Add to Cart */ +.add-to-cart label { float:left; margin-right:5px; font-weight:bold; color:#667; } +.add-to-cart .qty { float:left; margin-right:5px; } +.add-to-cart button.button { float:left; } + +/* Add to Links + Add to Cart */ +.add-to-box { margin:10px 0; } +.add-to-box .add-to-cart { float:left; } +.add-to-box .or { float:left; font-weight:bold; margin:0 7px; color:#667; } +.add-to-box .add-to-links { float:left; margin:0; font-size:12px !important; line-height:1.25 !important; text-align:left !important; } +.add-to-box .add-to-links li { display:block !important; } +.add-to-box .add-to-links li .separator { display:none !important; } + +.product-view { border:1px solid #c4c6c8; } + +.product-essential { padding:25px; background:#fff url(../images/bkg_product-view.gif) 100% 0 no-repeat; } +.product-essential h2 { font:bold 13px/1.35 Arial, Helvetica, sans-serif; } + +.product-collateral { background:#f5fcfd url(../images/bkg_product_collateral.gif) 0 0 repeat-x; padding:25px; } +.product-collateral h2 { font-weight:bold; font-size:15px; color:#68a81e; border-bottom:1px solid #e5dcc3; padding:0 0 1px; margin:0 0 15px; } +.product-collateral .box-collateral { margin:0 0 25px; } + +/* Product Images */ +.product-view .product-img-box { float:left; width:267px; } +.product-view .product-img-box .product-image { margin:0 0 13px; } +.product-view .product-img-box .product-image-zoom { position:relative; width:265px; height:265px; overflow:hidden; z-index:9; } +.product-view .product-img-box .product-image-zoom img { position:absolute; left:0; top:0; cursor:move; } +.product-view .product-img-box .zoom-notice { font-size:11px; text-align:center; } +.product-view .product-img-box .zoom { position:relative; z-index:9; height:18px; margin:0 auto 13px; padding:0 28px; background:url(../images/slider_bg.gif) 50% 50% no-repeat; cursor:pointer; } +.product-view .product-img-box .zoom.disabled { -moz-opacity:.3; -webkit-opacity:.3; -ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=30)";/*IE8*/ opacity:.3; } +.product-view .product-img-box .zoom #track { position:relative; height:18px; } +.product-view .product-img-box .zoom #handle { position:absolute; left:0; top:-1px; width:9px; height:22px; background:url(../images/magnifier_handle.gif) 0 0 no-repeat; } +.product-view .product-img-box .zoom .btn-zoom-out { position:absolute; left:2px; top:0; } +.product-view .product-img-box .zoom .btn-zoom-in { position:absolute; right:2px; top:0; } +.product-view .product-img-box .more-views h2 { font-size:11px; border-bottom:1px solid #ccc; margin:0 0 8px; text-transform:uppercase; } +.product-view .product-img-box .more-views ul { margin-left:-9px } +.product-view .product-img-box .more-views li { float:left; margin:0 0 8px 9px; } +.product-view .product-img-box .more-views li a { float:left; width:56px; height:56px; border:2px solid #ddd; overflow:hidden; } +/* To turn on floating images preview please remove comments and set image size 120x120px in \template\catalog\product\view\media.phtml */ +/*.product-view .product-img-box .more-views li a { position:relative; } +.product-view .product-img-box .more-views li a img { margin:-32px 0 0 -32px; } +.product-view .product-img-box .more-views li a:hover { border:2px solid #ddd; overflow:visible; z-index:999; } +.product-view .product-img-box .more-views li a:hover img { border:2px solid #ddd; margin:0; position:absolute; top:-34px; left:-34px; }*/ + +.product-image-popup { margin:0 auto; } +.product-image-popup .nav { font-weight:bold; text-align:center; } +.product-image-popup .image { display:block; margin:10px 0; } +.product-image-popup .image-label { font-size:13px; font-weight:bold; margin:0 0 10px; color:#2f2f2f; } + +/* Product Shop */ +.product-view .product-shop { float:right; width:330px; } +.product-view .product-shop .product-name { margin:0 0 5px; } +.product-view .product-shop .product-name h1 { margin:0; font:bold 15px/1.35 Arial, Helvetica, sans-serif; } +.product-view .product-shop .availability { margin:10px 0; } +.product-view .product-shop .short-description { margin:10px 0; background:url(../images/bkg_divider1.gif) 0 0 repeat-x; padding:10px 0 0; } +.product-view .product-shop .price-box { margin:10px 0; } +.product-view .product-shop .add-to-links { margin:0; } +.product-view .product-shop .add-to-links { font-size:12px; text-align:right; } +.product-view .product-shop .add-to-links li, +.product-view .product-shop .add-to-links li .separator { display:inline; } +.product-view .product-shop .add-to-links a { color:#1E7EC8 !important; font-weight:normal !important; } + +/* Product Options */ +.product-options { margin:20px 0 0; padding:10px 15px 20px; background-color:#f5fcfd; border:1px solid #e4e4e4; } +.product-options dt { padding:10px 0 0; font-weight:normal; } +.product-options dt label { font-weight:bold; color:#2f2f2f; } +.product-options dt span.required { color:#eb340a; } +.product-options dt .qty-holder { float:right; margin-right:15px; } +.product-options dt .qty-holder label { vertical-align:middle; } +.product-options dt .qty-disabled { background:none; border:0; padding:3px; color:#2f2f2f; } +.product-options dd { padding:5px 10px 15px; margin:0 0 5px; border-bottom:1px solid #e4e4e4; } +.product-options dl.last dd.last { border-bottom:0; padding-bottom:5px; margin-bottom:0; } +.product-options dd input.input-text { width:98%; } +.product-options dd textarea { width:98%; height:8em; } +.product-options dd select { width:99%; } +.product-options dd .multiselect option { border-bottom:1px dotted #d9e5ee; padding:2px 4px; } +.product-options ul.options-list { margin-right:5px; } +.product-options ul.options-list li { line-height:1.5; padding:2px 0; } +.product-options ul.options-list input.radio { float:left; margin-top:3px; } +.product-options ul.options-list input.checkbox { float:left; margin-top:3px; } +.product-options ul.options-list .label { display:block; margin-left:18px; } +.product-options ul.options-list label { font-weight:normal; } +.product-options ul.validation-failed { padding:0 7px; } +.product-options p.note { margin:0; font-size:11px; } +.product-options p.required { margin-bottom:0; padding:15px 0 0; } + +.product-options-bottom { background-color:#fafaec; padding:15px 20px; border:1px solid #e4e4e4; border-top:0; } +.product-options-bottom .tier-prices { margin:0; padding:0 0 10px; border:0; background:0; } +.product-options-bottom .tier-prices li { background:0; padding:2px 0; color:#e26703; } +.product-options-bottom .tier-prices .price, +.product-options-bottom .tier-prices .benefit { color:#e26703; } +.product-options-bottom .price-box { float:left; margin:0; padding:0; } +.product-options-bottom .price-label { float:left; padding-right:5px; } +.product-options-bottom .price-tax { float:left; } +.product-options-bottom .add-to-cart { float:right; } +.product-shop .product-options-bottom .price-box { float:none; } +.product-shop .product-options-bottom .price-label { float:none; padding-right:0; } +.product-shop .product-options-bottom .price-tax { float:none; } +.product-shop .product-options-bottom .add-to-cart-box { clear:both; float:left; padding-top:12px; } + +/* Grouped Product */ +.product-view .grouped-items-table .price-box { margin:0; padding:0; } + +/* Block: Description */ +.product-view .box-description {} + +/* Block: Additional */ +.product-view .box-additional .data-table th, +.product-view .box-additional .data-table td { line-height:1.25; } + +/* block: upsell */ +.product-view .box-up-sell h2 { border-bottom:0; padding:0; margin:0 0 8px; } +.product-view .box-up-sell .products-grid { width:100%; border:1px solid #e5dcc3; } +.product-view .box-up-sell .products-grid td { width:25%; background:#fafaec; border-right:1px solid #e5dcc3; border-bottom:1px solid #e5dcc3; padding:15px 10px 12px; line-height:1.6em; } +.product-view .box-up-sell .products-grid tr.last td { border-bottom:0; } +.product-view .box-up-sell .products-grid td.last { border-right:0; } +.product-view .box-up-sell .products-grid td img { border:1px solid #e5dcc3; } +.product-view .box-up-sell .products-grid .product-image { text-align:center; } +.product-view .box-up-sell .products-grid td.empty { border-right:0; background:#fafaec; } +.product-view .box-up-sell .products-grid .ratings .rating-box { float:none; display:block; margin:0 0 3px; } + +/* Block: Tags */ +.product-view .box-tags { margin:0; } +.product-view .box-tags h3 { font-size:13px; } +.product-view .box-tags .product-tags { display:block; margin:0 0 15px; } +.product-view .box-tags .product-tags li { display:inline; background:url(../images/bkg_pipe3.gif) 100% 4px no-repeat; padding:0 7px 0 4px; } +.product-view .box-tags .product-tags li.first { padding-left:0; } +.product-view .box-tags .product-tags li.last { background:none; padding-right:0; } +.product-view .box-tags .form-add label { display:block; font-size:13px; font-weight:bold; margin:0 0 5px; color:#0a263c;} +.product-view .box-tags .form-add .input-box { float:left; width:305px; margin:0 5px 0 0; background:url(../images/i_tag_add.gif) 0 2px no-repeat; padding:0 0 0 23px; } +.product-view .box-tags .form-add input.input-text { width:299px; } +.product-view .box-tags .note { margin:3px 0 0; padding:0 0 0 23px; font-size:11px; } + +/* Block: Reviews */ +.product-view .box-reviews dl { margin:15px 0; } +.product-view .box-reviews dt a, +.product-view .box-reviews dt span { font-weight:bold; } +.product-view .box-reviews dd { margin:0 0 15px; } +.product-view .box-reviews dd small { font-style:italic; } +.product-view .box-reviews .form-add { margin:15px 0 0; } +.product-view .box-reviews .form-add h3 { font-size:13px; font-weight:normal; } +.product-view .box-reviews .form-add h3 span { font-weight:bold; } +.product-view .box-reviews .form-add h4 { font-size:12px; } +.product-view .box-reviews .form-add .data-table td { text-align:center; } +.product-view .box-reviews .form-add .form-list { margin:15px 0 0; } +.product-view .box-reviews .form-add .form-list .input-box { width:360px; } +.product-view .box-reviews .form-add .form-list input.input-text, +.product-view .box-reviews .form-add .form-list textarea { width:354px; } + +/* Send a Friend */ +.send-friend .form-list { width:615px; overflow:hidden; } +.send-friend .form-list li { margin-right:-15px; } +.send-friend .form-list li p { margin:0 15px 0 0; } +.send-friend .form-list .field { width:315px; } +.send-friend .form-list .input-box { width:300px; } +.send-friend .form-list input.input-text, +.send-friend .form-list textarea { width:294px; } +.send-friend .form-list li.wide .input-box { width:612px; } +.send-friend .form-list li.wide textarea { width:609px; } +.send-friend .buttons-set .limit { float:right; margin:0 7px 0 0; font-size:11px; line-height:21px; } +/* ======================================================================================= */ + + +/* Content Styles ================================================================= */ +.product-name { margin:0; font-size:1em; font-weight:normal; } +.product-name a { color:#1e7ec8; } + +/* Product Tags */ +.tags-list { display:block; font-size:13px; border:1px solid #c1c4bc; background:#f8f7f5; padding:10px; } +.tags-list li { display:inline !important; margin:0 4px 0 0; } +.tags-list li a { color:#1b2d3b; } + +/* Advanced Search */ +.advanced-search .form-list label { width:160px; padding-right:10px; } +.advanced-search .form-list .input-box, +.advanced-search .form-list .input-range { float:left; clear:none; } +.advanced-search-amount { margin:0 0 10px; } +.advanced-search-summary { margin:10px 0; border:1px solid #e9d7c9; background:#fff6f1; padding:10px; } +.advanced-search-summary ul { float:left; width:49%; } +.advanced-search-summary strong { color:#E17C24; padding-left:15px; background:url(../images/i_search_criteria.gif) 0 3px no-repeat; } +.advanced-search-summary p { clear:both; font-weight:bold; margin:0; } + +/* CMS Home Page */ +.cms-home .subtitle, +.cms-index-index .subtitle {} + +/* Sitemap */ +.page-sitemap .links { text-align:right; margin:0 8px -22px 0; position:relative; } +.page-sitemap .links a { text-decoration:none; } +.page-sitemap .links a:hover { text-decoration:underline; } +.page-sitemap .sitemap { margin:12px; } +.page-sitemap .sitemap a { color:#1b2d3b; } +.page-sitemap .sitemap li { margin:3px 0; } +.page-sitemap .sitemap li.level-0 { margin:10px 0 0; font-weight:bold; } +.page-sitemap .sitemap li.level-0 a { color:#1e7ec8; } + +/* RSS */ +.rss-title h1 { background:url(../images/i_rss-big.png) 0 4px no-repeat; padding-left:27px; } +.rss-table .link-rss { display:block; line-height:1.55; background-position:0 4px; } +/* ======================================================================================= */ + + +/* Shopping Cart ========================================================================= */ +.cart .page-title { border-bottom:0; margin:0 0 12px; } +.cart .page-title h1 { margin:10px 0 0; } + +/* Checkout Types */ +.cart .page-title .checkout-types li { margin:0 0 5px; } +.cart button.btn-checkout.disabled span { border-color:#ccc; background-color:#c2c2bf; background-position:0 100%; color:#b8baba; } + +/* Shopping Cart Table */ +.cart-table th { padding:2px 10px; } +.cart-table td { padding:10px; } +.cart-table .product-name { font-weight:bold; margin:0 0 5px; color:#2f2f2f; } +.cart-table .item-msg { margin:5px 0; font-size:11px; font-weight:bold; color:#df280a; } +.cart-table tfoot td { padding:5px 10px; } +.cart-table .btn-continue { float:left; } + +/* Shopping Cart Collateral boxes */ +.cart .cart-collaterals { padding:25px 0 0; } +.cart .cart-collaterals .col2-set { float:left; width:605px; } +.cart .cart-collaterals .col2-set .col-2 { width:294px; } + +.cart .crosssell { border:1px solid #cec3b6; background:#fafaec; padding:12px 15px; } +.cart .crosssell h2 { font-size:13px; font-weight:bold; } +.cart .crosssell .product-image { float:left; width:75px; height:75px; border:1px solid #d0cdc9; } +.cart .crosssell .product-details { margin-left:90px; } +.cart .crosssell .product-name { font-weight:bold; } +.cart .crosssell li.item { margin:12px 0; } +.cart .crosssell .link-compare { font-weight:normal; } + +/* Discount Codes & Estimate Shipping and Tax Boxes */ +.cart .discount, +.cart .shipping { border:1px solid #d0cbc1; background:#fff url(../images/bkg_block-title.gif) 0 0 repeat-x; padding:12px 15px; margin:0 0 18px; } +.cart .discount h2, +.cart .shipping h2 { background-position:0 0; background-repeat:no-repeat; font:bold 13px/16px Arial, Helvetica, sans-serif; padding:0 0 0 21px; color:#e26703; text-transform:uppercase; } +.cart .discount .buttons-set, +.cart .shipping .buttons-set { margin:10px 0 0; border:0; padding:0; text-align:left; } +.cart .discount .buttons-set button.button, +.cart .shipping .buttons-set button.button { float:none; } + +.cart .discount h2 { background-image:url(../images/i_discount.gif); } +.cart .discount .input-box { margin:8px 0 0; width:260px; } +.cart .discount input.input-text { width:254px; } + +.cart .shipping h2 { background-image:url(../images/i_shipping.gif); } +.cart .shipping .sp-methods { margin:10px 0 0; padding:5px 0 0; background:url(../images/bkg_divider1.gif) 0 0 repeat-x; } + +/* Shopping Cart Totals */ +.cart .totals { float:right; width:258px; background:#dee5e8; border:1px solid #bebcb7; } +.cart .totals table { width:100%; margin:7px 0; } +.cart .totals td { padding:0 15px; } +.cart .totals tr.last td {} +.cart .totals tfoot td { padding-top:10px; font-size:15px; border:none !important; } +.cart .totals .checkout-types { font-size:13px; padding:8px 15px 15px; text-align:right; } +.cart .totals .checkout-types li { clear:both; margin:10px 0; } + +/* Options Tool Tip */ +.item-options dt { font-weight:bold; font-style:italic; } +.item-options dd { padding-left:10px; margin:0 0 6px; } +.truncated { cursor:help; } +.truncated a.dots { cursor:help; } +.truncated a.details { cursor:help; } +.truncated .truncated_full_value { position:relative; z-index:999; } +.truncated .truncated_full_value dl { position:absolute; top:-99999em; left:-99999em; z-index:999; width:250px; padding:8px; border:1px solid #ddd; background-color:#f6f6f6; } +.truncated .show dl { top:-20px; left:50%; } +.col-left .truncated .show dl { left:15px; top:7px; } +.col-right .truncated .show dl { left:-240px; top:7px; } +/* ======================================================================================= */ + + +/* Checkout ============================================================================== */ +/********** < Common Checkout Styles */ +/* Shipping and Payment methods */ +.sp-methods { margin:0 0 8px; } +.sp-methods dt { margin:5px 0; font-weight:bold; } +.sp-methods dd { margin:0 0 13px; } +.sp-methods dd li { margin:5px 0; } +.sp-methods label { font-weight:bold; color:#667; } +.sp-methods .price { font-weight:bold; } +.sp-methods .form-list { padding-left:20px; } +.sp-methods .form-list li { margin:0 0 8px; } +.sp-methods select.month { width:154px; margin-right:10px; } +.sp-methods select.year { width:96px; } +.sp-methods input.cvv { width:3em !important; } + +.please-wait { float:right; } +.please-wait img { vertical-align:middle; } +.cvv-what-is-this { font-size:11px; cursor:help; margin-left:10px; } + +/* Tooltip */ +.tool-tip { border:1px solid #7BA7C9; background:#EAF6FF; padding:15px 20px; position:absolute; z-index:9999; } +.tool-tip .btn-close { margin:-9px -14px 0; text-align:right; } +.tool-tip .tool-tip-content { padding:5px; } + +/* Gift Messages */ +.gift-messages h3 { font-size:12px; font-weight:bold; color:#e87403; } +.gift-messages p.control { color:#8e8d8b; } +.gift-messages-form { position:relative; } +.gift-messages-form label { float:none !important; position:static !important; } +.gift-messages-form h4 { font-size:12px; font-weight:bold; color:#e87403; } +.gift-messages-form .whole-order { margin:0 0 25px; } +.gift-messages-form .item { margin:0 0 10px; } +.gift-messages-form .item .product-img-box { float:left; width:75px; } +.gift-messages-form .item .product-image { margin:0 0 7px; } +.gift-messages-form .item .number { margin:0; font-weight:bold; text-align:center; color:#8a8987; } +.gift-messages-form .item .details { margin-left:90px; } +.gift-messages-form .item .details .product-name { font-size:13px; font-weight:bold; margin:0 0 10px; } +.gift-messages-form .item .details .form-list .field { width:255px; } +.gift-messages-form .item .details .form-list .input-box { width:240px; } +.gift-messages-form .item .details .form-list input.input-text { width:234px; } +.gift-messages-form .item .details .form-list li.wide .input-box { width:500px; } +.gift-messages-form .item .details .form-list li.wide textarea { width:494px; } + +.gift-message-link { font-size:11px; background:url(../images/bkg_collapse-gm.gif) 100% 6px no-repeat; padding-right:7px; } +.gift-message-link.expanded { background-position:100% -40px; } +.gift-message-row { background:#f2efe9; } +.gift-message-row .btn-close { float:right; width:16px; height:16px; background:url(../images/btn_gm-close.gif) 0 0 no-repeat; font-size:0; line-height:0; text-indent:-999em; overflow:hidden; } + +/* Checkout Agreements */ +.checkout-agreements li { margin:30px 0; } +.checkout-agreements .agreement-content { overflow:auto; height:12em; padding:10px; background-color:#fbfaf6; border:1px solid #bbb6a5; } +.checkout-agreements .agree { margin:0; padding:10px 0 10px 11px; } +.checkout-agreements .agree input.checkbox { margin-right:6px; } +.checkout-agreements .agree label { font-weight:bold; color:#667; } + +.opc .checkout-agreements { border:1px solid #d9dde3; border-width:0 1px; padding:5px 30px; } +.opc .checkout-agreements li { margin:20px 0 0; } +.opc .checkout-agreements .agreement-content { background-color:#fff; border-color:#e4e4e4; padding:5px; } +.opc .checkout-agreements .agree { padding-left:6px; } +/********** Common Checkout Styles > */ + +/* One Page Checkout */ +.block-progress { border:0; margin:0; } +.block-progress .block-title { background:none; border:0; padding:0; margin:0 0 5px; } +.block-progress .block-title strong { font-size:13px; color:#0a263c; } +.block-progress .block-content { background:none; } +.block-progress dt { font-size:13px; font-weight:bold; line-height:1.35; background:#eee; border:1px solid #a3aeb3; margin:0 0 6px; padding:2px 8px; color:#999; } +.block-progress dd { background:#eee; border:1px solid #a3aeb3; border-top:0; padding:8px 13px; margin:0 0 6px; } +.block-progress dt.complete { margin:0; background:#d0dce1; color:#5e8ab4; } +.block-progress dd.complete {} +.block-progress p { margin:0; } + +.opc .buttons-set { margin-top:0; padding-top:2em; } +.opc .buttons-set .back-link small { display:none; } +.opc .buttons-set .back-link a { background:url(../images/i_arrow-top.gif) 0 50% no-repeat; padding-left:16px; } +.opc .buttons-set.disabled button.button { display:none; } +.opc .buttons-set .please-wait { height:21px; line-height:21px; } +.opc .ul { list-style:disc outside; padding-left:18px; } + +.opc { position:relative; } +.opc li.section {} + +.opc .step-title { border-width:0 1px; border-style:solid; border-color:#fff #d9dde3 #d9dde3; background:#eee url(../images/bkg_opc-title-off.gif) 0 100% repeat-x; padding:4px 8px 6px; text-align:right; } +.opc .step-title .number { float:left; background:#fff; border:1px solid #fff; padding:0 4px; margin:0 5px 0 0; font:bold 11px/14px arial, helvetica, sans-serif; color:#999; } +.opc .step-title h2 { float:left; margin:0; font:bold 13px/16px arial, helvetica, sans-serif; color:#999; } +.opc .step-title a { display:none; float:right; font-size:11px; line-height:16px; } + +.opc .allow .step-title { background:#d0dce1; border:1px solid #a3aeb3; border-bottom:0; color:#a4b3b9; cursor:pointer; } +.opc .allow .step-title .number { background:#dbe6eb; border-color:#dbe6eb; color:#a4b3b9; } +.opc .allow .step-title h2 { color:#a4b3b9; } +/*.opc .allow .step-title a { display:block; }*/ + +.opc .active .step-title { background:#f9f3e3; border:1px solid #bbafa0; padding-bottom:5px; color:#f18200; cursor:default; } +.opc .active .step-title .number { background:#f18200; border-color:#f19900; color:#fff; } +.opc .active .step-title h2 { color:#f18200; } +/*.opc .active .step-title a { display:none; }*/ + +.opc .step { border:1px solid #bbafa0; border-top:0; background:#fbfaf6 url(../images/bkg_checkout.gif) 0 0 repeat-x; padding:15px 30px; position:relative; } +.opc .step .tool-tip { right:30px; } + +#opc-login .buttons-set { border-top:0; } +#opc-login h3 { font-size:13px; border-bottom:1px solid #e4e4e4; padding-bottom:2px; text-transform:uppercase; } +#opc-login h4 { font-size:1em; font-weight:bold; margin:0; color:#2f2f2f; } + +#opc-shipping_method .buttons-set { border-top:0; } +.opc .gift-messages-form { margin:0 -30px; background:#f6f1eb; border:1px solid #e9e4de; border-width:1px 0; padding:22px 24px 22px 30px; } +.opc .gift-messages-form .inner-box { padding:5px; height:260px; overflow:auto; } + +#opc-review .step { border:0; padding:0; } +#opc-review .product-name { font-weight:bold; color:#0a263c; } +#opc-review .item-options { margin:5px 0 0; } +#opc-review .buttons-set { padding:20px 30px; border:1px solid #d9dde3; border-width:0 1px 1px; } +#opc-review .buttons-set p { margin:0; line-height:40px; } +#opc-review .buttons-set .please-wait { height:40px; line-height:40px; } + +/* Multiple Addresses Checkout */ +.checkout-progress { padding:0 90px; margin:0 0 20px; } +.checkout-progress li { float:left; width:19%; margin:0 3px 0 0; border-top:10px solid #999; padding:2px 0 0; font-weight:bold; text-align:center; color:#abb5ba; } +.checkout-progress li.active { border-top-color:#e96200; color:#e96200; } + +.multiple-checkout h2 { font-size:13px; font-weight:bold; margin:0 0 10px; } +.multiple-checkout h3, +.multiple-checkout h4 { font-size:13px; font-weight:bold; color:#E26703; } +.multiple-checkout h2 a, +.multiple-checkout h3 a, +.multiple-checkout h4 a { font-weight:normal; } +.multiple-checkout .data-table .product-name { font-size:1em !important; font-weight:bold !important; } +.multiple-checkout .data-table .product-name a { font-weight:bold !important; } +.multiple-checkout .data-table .item-options { margin:5px 0 0; } + +.multiple-checkout .gift-messages { margin:15px 0 0; } + +.multiple-checkout .tool-tip { top:50%; margin-top:-120px; right:20px; } + +.multiple-checkout .col2-set, +.multiple-checkout .col3-set { background:#fbfaf6 url(../images/bkg_checkout.gif) 0 0 repeat-x; border:1px solid #bbb6a5; margin:0 0 25px; padding:20px; } +.multiple-checkout .col2-set h2.legend { margin:-20px -20px 15px; padding:5px 10px; background:#f9f3e3; border-bottom:1px solid #bbafa0; position:relative; } +.multiple-checkout .col2-set h3.legend { margin:0 0 10px; color:#0a263c; } +.multiple-checkout .col2-set .divider { margin:0 -20px; padding:25px 0; position:relative; } +.multiple-checkout .box { margin:0 0 15px; } +.multiple-checkout .box h2 { color:#e26703; } + +.multiple-checkout .place-order .please-wait { float:right; padding:27px 7px 0 0; } +.multiple-checkout .place-order .grand-total { float:right; height:71px; font-size:1.5em; padding:0 0 0 21px; background:url(../images/bkg_grand-total.gif) 0 0 no-repeat; overflow:hidden; } +.multiple-checkout .place-order .grand-total .inner { float:left; height:57px; padding:14px 21px 0 0; background:url(../images/bkg_grand-total.gif) 100% 0 no-repeat; } +.multiple-checkout .place-order .grand-total .inner div { display:inline; } +.multiple-checkout .place-order .grand-total big { display:inline; margin-right:12px; } +.multiple-checkout .place-order .grand-total .price { color:#E26703; } +.multiple-checkout .place-order .grand-total button.button span { font-size:16px; } +.multiple-checkout .place-order .grand-total button.button span span { padding:0 45px 0 36px; } + +/* Step 1 */ +#multiship-addresses-table td { padding:10px; } +#multiship-addresses-table tfoot td { padding:5px 10px; } + +/* Step 2 */ +.multiple-checkout .gift-messages-form .item .details .form-list { width:100%; overflow:hidden; } +.multiple-checkout .gift-messages-form .item .details .form-list li { margin-right:-15px; } +.multiple-checkout .gift-messages-form .item .details .form-list .field { width:230px; } +.multiple-checkout .gift-messages-form .item .details .form-list .input-box { width:215px; } +.multiple-checkout .gift-messages-form .item .details .form-list input.input-text { width:209px; } +.multiple-checkout .gift-messages-form .item .details .form-list li.wide .input-box { width:445px; } +.multiple-checkout .gift-messages-form .item .details .form-list li.wide textarea { width:439px; } +.checkout-multishipping-shipping .box-sp-methods { border:1px solid #d9d2be; background:#f9f3e3; padding:13px; position:relative; } +.checkout-multishipping-shipping .box-sp-methods .pointer { position:absolute; top:-20px; right:-40px; width:178px; height:41px; background:url(../images/bkg_sp-methods.gif) 0 0 no-repeat; overflow:hidden; } + +/* Step 3 */ +.checkout-multishipping-billing .multiple-checkout { position:relative; } +/* ======================================================================================= */ + + +/* Account Login/Create Pages ============================================================ */ +.account-login .content { min-height:240px; padding:14px 21px; background:#faf7ee url(../images/bkg_login-box.gif) 0 0 repeat-x; border:1px solid #bbb6a5; border-bottom:0; } +.account-login .content h2 { font-weight:bold; font-size:13px; margin:0 0 14px; padding:0 0 5px 23px; border-bottom:1px solid #ddd; background-position:0 1px; background-repeat:no-repeat; text-transform:uppercase; color:#e76200; } +.account-login .new-users h2 { background-image:url(../images/i_page1.gif)} +.account-login .registered-users h2 { background-image:url(../images/i_page2.gif); } +.account-login .buttons-set { border:1px solid #bbb6a5; border-top:0; margin:0; padding:8px 13px; background:#dee5e8 url(../images/bkg_buttons-set1.gif) 0 0 repeat-x; } + +.account-create {} +/* Account Login/Create Pages ============================================================ */ + + +/* My Account ============================================================================= */ +.my-account .title-buttons .link-rss { float:none; margin:0; } + +/********** < Dashboard */ +.dashboard .welcome-msg { margin:0 8em 1.5em 0; } +.dashboard .welcome-msg p { margin:0; } +.dashboard .col2-set { margin:0 0 15px; } + +/* General Box */ +.box-account { background:#fff url(../images/bkg_account_box.gif) 0 0 repeat-x; border:1px solid #ccc; border-color:#ccc #999 #999 #ccc; padding:15px; margin: 0 0 20px; } +.box-account .box-head { border-bottom:1px solid #d9dde3; margin:0 0 10px; text-align:right; } +.box-account .box-head h2 { float:left; margin:0; font-size:13px; font-weight:bold; text-transform:uppercase; background-position:0 0; background-repeat:no-repeat; padding-left:21px; color:#e65505; } + +.dashboard .box .box-title { background:url(../images/bkg_divider1.gif) 0 100% repeat-x; padding:0 0 2px; margin:0 0 8px; text-align:right; } +.dashboard .box .box-title h3, +.dashboard .box .box-title h4 { float:left; font-size:13px; font-weight:bold; margin:0; } + +/* Block: Recent Orders */ +.dashboard .box-recent .box-head h2 { background-image:url(../images/i_folder-table.gif); } + +/* Block: Account Information */ +.dashboard .box-info .box-head h2 { background-image:url(../images/i_ma-info.gif); } +.dashboard .box-info h4 { font-size:11px; font-weight:bold; text-transform:uppercase; } + +/* Block: Reviews */ +.dashboard .box-reviews .box-head h2 { background-image:url(../images/i_ma-reviews.gif); } +.dashboard .box-reviews .number { float:left; font-size:10px; font-weight:bold; line-height:1; color:#fff; margin:3px -20px 0 0; padding:2px 3px; background:#0a263c; } +.dashboard .box-reviews .details { margin-left:20px; } +.dashboard .box-reviews li.item { margin:0 0 7px; } +.dashboard .box-reviews li.item.last { margin:0; } +.dashboard .box-reviews .ratings { margin:7px 0 0; } + +/* Block: Tags */ +.dashboard .box-tags .box-head h2 { background-image:url(../images/i_ma-tags.gif); } +.dashboard .box-tags .number { float:left; font-size:10px; font-weight:bold; line-height:1; color:#fff; margin:3px -20px 0 0; padding:2px 3px; background:#0a263c; } +.dashboard .box-tags .details { margin-left:20px; } +.dashboard .box-tags li.item { margin:0 0 7px; } +.dashboard .box-tags li.item.last { margin:0; } +.dashboard .box-tags .tags strong, +.dashboard .box-tags .tags ul, +.dashboard .box-tags .tags ul li { display:inline; } +/********** Dashboard > */ + +/* Address Book */ +.addresses-list h2 { font-weight:bold; font-size:13px; color:#e26703; text-transform:uppercase; } +.addresses-list h3 { font-weight:bold; font-size:13px; } +.addresses-list address { margin:0 0 3px; } +.addresses-list p { margin:0; } +.addresses-list a { font-weight:bold; } +.addresses-list .link-remove { color:#646464; } +.addresses-list .separator { margin:0 3px; } +.addresses-list li.item { background:#fff url(../images/bkg_account_box.gif) 0 0 repeat-x; border:1px solid #ccc; padding:10px 13px; margin:0 0 10px; } +.addresses-list li.empty { background:none; border:0; padding:0; } +.addresses-list li.empty p { font-weight:bold; } +.addresses-list-additional li.item { background:none; border:0; padding:0; } + +/* Order View */ +.order-info { background:#dee5e8; border:1px solid #d0cbc1; padding:4px 8px; margin:0 0 8px; } +.order-info dt, +.order-info dd, +.order-info ul, +.order-info li { display:inline; } +.order-info .current { font-weight:bold; } +.order-info li { margin:0 3px; } + +.order-date { margin:10px 0; } + +.order-info-box { background:#fff url(../images/bkg_block-title.gif) 0 0 repeat-x; border:1px solid #d0cbc1; padding:12px 15px; margin:0 0 15px; } +.order-info-box h2 { font-weight:bold; font-size:13px; } + +.order-items h2, +.order-items h3 { font-weight:bold; font-size:13px; } +.order-items .product-name { font-size:1em !important; font-weight:bold !important; } +.order-items .link-print { float:right; color:#1e7ec8; font-weight:normal; } +.order-items p .link-print { float:none; } + +.order-gift-message { margin:15px 0; } +.gift-message dt strong { color:#667; } +.gift-message dd { margin:5px 0 0; font-size:13px; } + +.order-about { margin:15px 0; } +.order-about dt { font-weight:bold; } +.order-about dd { font-size:13px; margin:0 0 7px; } + +.tracking-table { margin:0 0 15px; } +.tracking-table th { font-weight:bold; white-space:nowrap; } +.tracking-table th, +.tracking-table td { padding:1px 5px 0 0; } + +.tracking-table-popup { width:100%; } +.tracking-table-popup th { font-weight:bold; white-space:nowrap; } +.tracking-table-popup th, +.tracking-table-popup td { padding:1px 8px; } + +/* Order Print Pages */ +.page-print .print-head { margin:0 0 15px; } +.page-print .print-head .logo { float:left; } +.page-print .print-head address { float:left; margin-left:15px; } +.page-print h1 { font-size:16px; font-weight:bold; } +.page-print h2, +.page-print h3 { font-size:13px; font-weight:bold; } +.page-print h2.h2 { font-size:16px; font-weight:bold; } +.page-print .order-date { background:url(../images/bkg_divider1.gif) 0 100% repeat-x; padding:0 0 10px; margin:0 0 10px; } +.page-print .col2-set { margin:0 0 10px; } +/* Price Rewrites */ +.page-print .gift-message-link { display:none; } +.page-print .price-excl-tax, +.page-print .price-incl-tax { display:block; white-space:nowrap; } +.page-print .cart-price, +.page-print .price-excl-tax .label, +.page-print .price-incl-tax .label, +.page-print .price-excl-tax .price, +.page-print .price-incl-tax .price { display:inline; } + +/* My Wishlist */ +.my-wishlist .data-table td { padding:10px; } +.my-wishlist .product-image { display:block; width:113px; height:113px; margin:0 0 5px; } +.my-wishlist textarea { display:block; width:97%; height:109px; } +.my-wishlist .buttons-set { margin-top:2em; } +.my-wishlist .buttons-set button.button { float:none; } +.my-wishlist .buttons-set .btn-add span, +#wishlist-table .add-to-links { white-space:nowrap; } + +/* My Tags */ +.my-tag-edit { float:left; margin:0 0 10px; } +.my-tag-edit .btn-remove { float:right; margin:5px 0 0 5px; } +#my-tags-table { clear:both; } +#my-tags-table td { padding:10px; } +#my-tags-table .add-to-links { white-space:nowrap; } + +/* My Reviews */ +#my-reviews-table td { padding:10px; } + +.product-review .product-img-box { float:left; width:140px; } +.product-review .product-img-box .product-image { display:block; width:125px; height:125px; } +.product-review .product-img-box .label { font-size:11px; margin:0 0 3px; } +.product-review .product-img-box .ratings .rating-box { float:none; display:block; margin:0 0 3px; } +.product-review .product-details { margin-left:150px; } +.product-review .product-name { font-size:16px; font-weight:bold; margin:0 0 10px; } +.product-review h3 { font-size:12px; margin:0 0 3px; color:#2f2f2f; } +.product-review .ratings-table { margin:0 0 10px; } +.product-review dt { font-weight:bold; } +.product-review dd { font-size:13px; margin:5px 0 0; } +/* ======================================================================================= */ + + +/* Footer ================================================================================ */ +.footer-container { background:url(../images/bkg_shadow-bottom.png) 0 0 no-repeat; text-align:center; } +.footer { width:930px; margin:0 auto; padding:20px 10px; } +.footer .store-switcher { display:inline; margin:0 5px 0 0; color:#fff; } +.footer .store-switcher label { font-weight:bold; vertical-align:middle; } +.footer .store-switcher select { padding:0; vertical-align:middle; } +.footer a { color:#fff; text-decoration:none; } +.footer a:hover { text-decoration:underline; } +.footer .bugs { margin:13px 0 0; color:#ecf3f6; } +.footer .bugs a { color:#ecf3f6; text-decoration:underline; } +.footer .bugs a:hover { text-decoration:none; } +.footer address { margin:0 0 20px; color:#ecf3f6; } +.footer address a { color:#ecf3f6; text-decoration:underline; } +.footer address a:hover { text-decoration:none; } +.footer ul { display:inline; } +.footer ul.links { display:block; } +.footer li { display:inline; background:url(../images/bkg_pipe2.gif) 100% 60% no-repeat; padding:0 7px 0 4px; } +.footer li.last { background:none !important; padding-right:0 !important; } +.footer-container .bottom-container { margin:0 0 5px; } +/* ======================================================================================= */ + +/* Sample Data============================================================================ */ +.home-callout { margin-bottom:12px; } +.home-callout img { display:block } +/*.home-spot { float:left; width:470px; margin-left:20px; }*/ +.best-selling h3 { margin:12px 0 6px 0; color:#e25203; font-size:1.2em; } +.best-selling table { border-top:1px solid #ccc; } +.best-selling tr.odd { background:#eee url(../images/best_selling_tr_odd_bg.gif) 0 100% repeat-x; } +.best-selling tr.even { background:#fff url(../images/best_selling_tr_even_bg.gif) 0 100% repeat-x; } +.best-selling td { width:50%; border-bottom:1px solid #ccc; padding:8px 10px 8px 8px; font-size:11px; } +.best-selling .product-img { float:left; border:2px solid #dcdcdc; } +.best-selling .product-description { margin-left:107px; line-height:1.3em; } +.best-selling a.product-name, +.home-spot .best-selling a.product-name:hover { color:#203548; } +/* ======================================================================================= */ + + +/* Clears ================================================================================ */ +.clearer:after, +.header-container:after, +.header-container .top-container:after, +.header:after, +.header .quick-access:after, +#nav:after, +.main:after, +.footer:after, +.footer-container .bottom-container:after, +.col-main:after, +.col2-set:after, +.col3-set:after, +.col4-set:after, +.search-autocomplete li:after, +.block .block-content:after, +.block .actions:after, +.block li.item:after, +.block-poll li:after, +.block-layered-nav .currently li:after, +.page-title:after, +.products-grid:after, +.products-list li.item:after, +.box-account .box-head:after, +.dashboard .box .box-title:after, +.box-reviews li.item:after, +.box-tags li.item:after, +.pager:after, +.sorter:after, +.ratings:after, +.add-to-box:after, +.add-to-cart:after, +.product-essential:after, +.product-collateral:after, +.product-view .product-img-box .more-views ul:after, +.product-view .box-tags .form-add:after, +.product-options .options-list li:after, +.product-options-bottom:after, +.product-review:after, +.cart:after, +.cart-collaterals:after, +.cart .crosssell li.item:after, +.opc .step-title:after, +.checkout-progress:after, +.multiple-checkout .place-order:after, +.group-select li:after, +.form-list li:after, +.form-list .field:after, +.buttons-set:after, +.page-print .print-head:after, +.advanced-search-summary:after, +.gift-messages-form .item:after, +.send-friend .form-list li p:after { display:block; content:"."; clear:both; font-size:0; line-height:0; height:0; overflow:hidden; } +/* ======================================================================================= */ diff --git a/skin/frontend/default/blue/images/account_nav_link_bg.gif b/skin/frontend/default/blue/images/account_nav_link_bg.gif deleted file mode 100644 index d62d300c02..0000000000 Binary files a/skin/frontend/default/blue/images/account_nav_link_bg.gif and /dev/null differ diff --git a/skin/frontend/default/blue/images/account_nav_on_bg.gif b/skin/frontend/default/blue/images/account_nav_on_bg.gif deleted file mode 100644 index f1b10112bd..0000000000 Binary files a/skin/frontend/default/blue/images/account_nav_on_bg.gif and /dev/null differ diff --git a/skin/frontend/default/blue/images/att_group_label_bg.gif b/skin/frontend/default/blue/images/att_group_label_bg.gif deleted file mode 100644 index 61d8e4a7f6..0000000000 Binary files a/skin/frontend/default/blue/images/att_group_label_bg.gif and /dev/null differ diff --git a/skin/frontend/default/blue/images/att_group_last_row_bg.gif b/skin/frontend/default/blue/images/att_group_last_row_bg.gif deleted file mode 100644 index 60243345a5..0000000000 Binary files a/skin/frontend/default/blue/images/att_group_last_row_bg.gif and /dev/null differ diff --git a/skin/frontend/default/blue/images/att_group_last_row_lab_bg.gif b/skin/frontend/default/blue/images/att_group_last_row_lab_bg.gif deleted file mode 100644 index 0eefdde02a..0000000000 Binary files a/skin/frontend/default/blue/images/att_group_last_row_lab_bg.gif and /dev/null differ diff --git a/skin/frontend/default/blue/images/att_group_last_row_odd_bg.gif b/skin/frontend/default/blue/images/att_group_last_row_odd_bg.gif deleted file mode 100644 index a25ab5ac5a..0000000000 Binary files a/skin/frontend/default/blue/images/att_group_last_row_odd_bg.gif and /dev/null differ diff --git a/skin/frontend/default/blue/images/attribute_set_toggler_bg.gif b/skin/frontend/default/blue/images/attribute_set_toggler_bg.gif deleted file mode 100644 index fbd1249368..0000000000 Binary files a/skin/frontend/default/blue/images/attribute_set_toggler_bg.gif and /dev/null differ diff --git a/skin/frontend/default/blue/images/base_mini_tabs_bg.gif b/skin/frontend/default/blue/images/base_mini_tabs_bg.gif deleted file mode 100644 index 19e03c65fe..0000000000 Binary files a/skin/frontend/default/blue/images/base_mini_tabs_bg.gif and /dev/null differ diff --git a/skin/frontend/default/blue/images/basebox_head_bg.gif b/skin/frontend/default/blue/images/basebox_head_bg.gif deleted file mode 100644 index b41987d8d4..0000000000 Binary files a/skin/frontend/default/blue/images/basebox_head_bg.gif and /dev/null differ diff --git a/skin/frontend/default/blue/images/bg_tierico.gif b/skin/frontend/default/blue/images/bg_tierico.gif deleted file mode 100644 index 5e987b41cf..0000000000 Binary files a/skin/frontend/default/blue/images/bg_tierico.gif and /dev/null differ diff --git a/skin/frontend/default/blue/images/account_box_bg.gif b/skin/frontend/default/blue/images/bkg_account_box.gif similarity index 100% rename from skin/frontend/default/blue/images/account_box_bg.gif rename to skin/frontend/default/blue/images/bkg_account_box.gif diff --git a/skin/frontend/default/blue/images/base_mini_actions_bg.gif b/skin/frontend/default/blue/images/bkg_block-actions.gif similarity index 100% rename from skin/frontend/default/blue/images/base_mini_actions_bg.gif rename to skin/frontend/default/blue/images/bkg_block-actions.gif diff --git a/skin/frontend/default/blue/images/currency_switcher_bg.gif b/skin/frontend/default/blue/images/bkg_block-currency.gif similarity index 100% rename from skin/frontend/default/blue/images/currency_switcher_bg.gif rename to skin/frontend/default/blue/images/bkg_block-currency.gif diff --git a/skin/frontend/default/blue/images/narrow_by_dd_bg.gif b/skin/frontend/default/blue/images/bkg_block-layered-dd.gif similarity index 100% rename from skin/frontend/default/blue/images/narrow_by_dd_bg.gif rename to skin/frontend/default/blue/images/bkg_block-layered-dd.gif diff --git a/skin/frontend/default/blue/images/narrow_by_set.gif b/skin/frontend/default/blue/images/bkg_block-layered-dt.gif similarity index 100% rename from skin/frontend/default/blue/images/narrow_by_set.gif rename to skin/frontend/default/blue/images/bkg_block-layered-dt.gif diff --git a/skin/frontend/default/blue/images/narrow_by_li_by.gif b/skin/frontend/default/blue/images/bkg_block-layered-label.gif similarity index 100% rename from skin/frontend/default/blue/images/narrow_by_li_by.gif rename to skin/frontend/default/blue/images/bkg_block-layered-label.gif diff --git a/skin/frontend/default/blue/images/narrow_category_bg.gif b/skin/frontend/default/blue/images/bkg_block-layered-li.gif similarity index 100% rename from skin/frontend/default/blue/images/narrow_category_bg.gif rename to skin/frontend/default/blue/images/bkg_block-layered-li.gif diff --git a/skin/frontend/default/blue/images/bkg_block-layered-title.gif b/skin/frontend/default/blue/images/bkg_block-layered-title.gif new file mode 100644 index 0000000000..bf007e10bc Binary files /dev/null and b/skin/frontend/default/blue/images/bkg_block-layered-title.gif differ diff --git a/skin/frontend/default/blue/images/layered_nav_narrowed_category_heading.gif b/skin/frontend/default/blue/images/bkg_block-layered1.gif similarity index 100% rename from skin/frontend/default/blue/images/layered_nav_narrowed_category_heading.gif rename to skin/frontend/default/blue/images/bkg_block-layered1.gif diff --git a/skin/frontend/default/blue/images/account_nav_head_bg.gif b/skin/frontend/default/blue/images/bkg_block-title-account.gif similarity index 100% rename from skin/frontend/default/blue/images/account_nav_head_bg.gif rename to skin/frontend/default/blue/images/bkg_block-title-account.gif diff --git a/skin/frontend/default/blue/images/base_mini_head_bg.gif b/skin/frontend/default/blue/images/bkg_block-title.gif similarity index 100% rename from skin/frontend/default/blue/images/base_mini_head_bg.gif rename to skin/frontend/default/blue/images/bkg_block-title.gif diff --git a/skin/frontend/default/blue/images/bkg_btn.gif b/skin/frontend/default/blue/images/bkg_button.gif similarity index 100% rename from skin/frontend/default/blue/images/bkg_btn.gif rename to skin/frontend/default/blue/images/bkg_button.gif diff --git a/skin/frontend/default/blue/images/login_box_form_buttons_bg.gif b/skin/frontend/default/blue/images/bkg_buttons-set1.gif similarity index 100% rename from skin/frontend/default/blue/images/login_box_form_buttons_bg.gif rename to skin/frontend/default/blue/images/bkg_buttons-set1.gif diff --git a/skin/frontend/default/blue/images/multi_address_box_bg.gif b/skin/frontend/default/blue/images/bkg_checkout.gif similarity index 100% rename from skin/frontend/default/blue/images/multi_address_box_bg.gif rename to skin/frontend/default/blue/images/bkg_checkout.gif diff --git a/skin/frontend/default/blue/images/bkg_collapse-gm.gif b/skin/frontend/default/blue/images/bkg_collapse-gm.gif new file mode 100644 index 0000000000..6e626e9543 Binary files /dev/null and b/skin/frontend/default/blue/images/bkg_collapse-gm.gif differ diff --git a/skin/frontend/default/blue/images/bg_collapse.gif b/skin/frontend/default/blue/images/bkg_collapse.gif similarity index 100% rename from skin/frontend/default/blue/images/bg_collapse.gif rename to skin/frontend/default/blue/images/bkg_collapse.gif diff --git a/skin/frontend/default/blue/images/dotted_divider.gif b/skin/frontend/default/blue/images/bkg_divider1.gif similarity index 100% rename from skin/frontend/default/blue/images/dotted_divider.gif rename to skin/frontend/default/blue/images/bkg_divider1.gif diff --git a/skin/frontend/default/blue/images/mini_search_bg.gif b/skin/frontend/default/blue/images/bkg_form-search.gif similarity index 100% rename from skin/frontend/default/blue/images/mini_search_bg.gif rename to skin/frontend/default/blue/images/bkg_form-search.gif diff --git a/skin/frontend/default/blue/images/bkg_grand-total.gif b/skin/frontend/default/blue/images/bkg_grand-total.gif new file mode 100644 index 0000000000..9143c44c66 Binary files /dev/null and b/skin/frontend/default/blue/images/bkg_grand-total.gif differ diff --git a/skin/frontend/default/blue/images/bkg_grid.gif b/skin/frontend/default/blue/images/bkg_grid.gif new file mode 100644 index 0000000000..decda510da Binary files /dev/null and b/skin/frontend/default/blue/images/bkg_grid.gif differ diff --git a/skin/frontend/default/blue/images/header_top_container_bg2.jpg b/skin/frontend/default/blue/images/bkg_header.jpg similarity index 100% rename from skin/frontend/default/blue/images/header_top_container_bg2.jpg rename to skin/frontend/default/blue/images/bkg_header.jpg diff --git a/skin/frontend/default/blue/images/login_box_bg.gif b/skin/frontend/default/blue/images/bkg_login-box.gif similarity index 100% rename from skin/frontend/default/blue/images/login_box_bg.gif rename to skin/frontend/default/blue/images/bkg_login-box.gif diff --git a/skin/frontend/default/blue/images/main_container_bg.gif b/skin/frontend/default/blue/images/bkg_main1.gif similarity index 100% rename from skin/frontend/default/blue/images/main_container_bg.gif rename to skin/frontend/default/blue/images/bkg_main1.gif diff --git a/skin/frontend/default/default/images/main_bg.gif b/skin/frontend/default/blue/images/bkg_main2.gif similarity index 100% rename from skin/frontend/default/default/images/main_bg.gif rename to skin/frontend/default/blue/images/bkg_main2.gif diff --git a/skin/frontend/default/blue/images/nav_bg.jpg b/skin/frontend/default/blue/images/bkg_nav0.jpg similarity index 100% rename from skin/frontend/default/blue/images/nav_bg.jpg rename to skin/frontend/default/blue/images/bkg_nav0.jpg diff --git a/skin/frontend/default/blue/images/nav_divider.gif b/skin/frontend/default/blue/images/bkg_nav1.gif similarity index 100% rename from skin/frontend/default/blue/images/nav_divider.gif rename to skin/frontend/default/blue/images/bkg_nav1.gif diff --git a/skin/frontend/default/blue/images/i_nav-parent.gif b/skin/frontend/default/blue/images/bkg_nav2.gif similarity index 100% rename from skin/frontend/default/blue/images/i_nav-parent.gif rename to skin/frontend/default/blue/images/bkg_nav2.gif diff --git a/skin/frontend/default/blue/images/opc_off_head_bg.gif b/skin/frontend/default/blue/images/bkg_opc-title-off.gif similarity index 100% rename from skin/frontend/default/blue/images/opc_off_head_bg.gif rename to skin/frontend/default/blue/images/bkg_opc-title-off.gif diff --git a/skin/frontend/default/blue/images/shop_access_pipe.gif b/skin/frontend/default/blue/images/bkg_pipe1.gif similarity index 100% rename from skin/frontend/default/blue/images/shop_access_pipe.gif rename to skin/frontend/default/blue/images/bkg_pipe1.gif diff --git a/skin/frontend/default/blue/images/footer_info_separator.gif b/skin/frontend/default/blue/images/bkg_pipe2.gif similarity index 100% rename from skin/frontend/default/blue/images/footer_info_separator.gif rename to skin/frontend/default/blue/images/bkg_pipe2.gif diff --git a/skin/frontend/default/blue/images/separator.gif b/skin/frontend/default/blue/images/bkg_pipe3.gif similarity index 100% rename from skin/frontend/default/blue/images/separator.gif rename to skin/frontend/default/blue/images/bkg_pipe3.gif diff --git a/skin/frontend/default/blue/images/product_essential_bg.gif b/skin/frontend/default/blue/images/bkg_product-view.gif similarity index 100% rename from skin/frontend/default/blue/images/product_essential_bg.gif rename to skin/frontend/default/blue/images/bkg_product-view.gif diff --git a/skin/frontend/default/blue/images/product_collateral_bg.gif b/skin/frontend/default/blue/images/bkg_product_collateral.gif similarity index 100% rename from skin/frontend/default/blue/images/product_collateral_bg.gif rename to skin/frontend/default/blue/images/bkg_product_collateral.gif diff --git a/skin/frontend/default/blue/images/bkg_products-grid1.gif b/skin/frontend/default/blue/images/bkg_products-grid1.gif deleted file mode 100644 index 2dac581156..0000000000 Binary files a/skin/frontend/default/blue/images/bkg_products-grid1.gif and /dev/null differ diff --git a/skin/frontend/default/blue/images/bkg_products-grid2.gif b/skin/frontend/default/blue/images/bkg_products-grid2.gif deleted file mode 100644 index 1d55b7a001..0000000000 Binary files a/skin/frontend/default/blue/images/bkg_products-grid2.gif and /dev/null differ diff --git a/skin/frontend/default/blue/images/bkg_products-grid3.gif b/skin/frontend/default/blue/images/bkg_products-grid3.gif deleted file mode 100644 index 5093303a47..0000000000 Binary files a/skin/frontend/default/blue/images/bkg_products-grid3.gif and /dev/null differ diff --git a/skin/frontend/default/blue/images/bkg_rating.gif b/skin/frontend/default/blue/images/bkg_rating.gif new file mode 100644 index 0000000000..fcebdc71af Binary files /dev/null and b/skin/frontend/default/blue/images/bkg_rating.gif differ diff --git a/skin/frontend/default/blue/images/shipping_method_pointer.gif b/skin/frontend/default/blue/images/bkg_sp-methods.gif similarity index 100% rename from skin/frontend/default/blue/images/shipping_method_pointer.gif rename to skin/frontend/default/blue/images/bkg_sp-methods.gif diff --git a/skin/frontend/default/default/images/base_mini_actions_bg.gif b/skin/frontend/default/blue/images/bkg_tfoot.gif similarity index 100% rename from skin/frontend/default/default/images/base_mini_actions_bg.gif rename to skin/frontend/default/blue/images/bkg_tfoot.gif diff --git a/skin/frontend/default/blue/images/comparison_table_label_bg.gif b/skin/frontend/default/blue/images/bkg_th-v.gif similarity index 100% rename from skin/frontend/default/blue/images/comparison_table_label_bg.gif rename to skin/frontend/default/blue/images/bkg_th-v.gif diff --git a/skin/frontend/default/blue/images/data_table_th_bg.gif b/skin/frontend/default/blue/images/bkg_th.gif similarity index 100% rename from skin/frontend/default/blue/images/data_table_th_bg.gif rename to skin/frontend/default/blue/images/bkg_th.gif diff --git a/skin/frontend/default/blue/images/bkg_toolbar.gif b/skin/frontend/default/blue/images/bkg_toolbar.gif new file mode 100644 index 0000000000..79b2c83792 Binary files /dev/null and b/skin/frontend/default/blue/images/bkg_toolbar.gif differ diff --git a/skin/frontend/default/blue/images/btn_checkout.gif b/skin/frontend/default/blue/images/btn_checkout.gif new file mode 100644 index 0000000000..49f2441c65 Binary files /dev/null and b/skin/frontend/default/blue/images/btn_checkout.gif differ diff --git a/skin/frontend/default/blue/images/gift-message-close.gif b/skin/frontend/default/blue/images/btn_gm-close.gif similarity index 100% rename from skin/frontend/default/blue/images/gift-message-close.gif rename to skin/frontend/default/blue/images/btn_gm-close.gif diff --git a/skin/frontend/default/blue/images/btn_mini_search.gif b/skin/frontend/default/blue/images/btn_mini_search.gif deleted file mode 100644 index be00a022f7..0000000000 Binary files a/skin/frontend/default/blue/images/btn_mini_search.gif and /dev/null differ diff --git a/skin/frontend/default/blue/images/btn_place_order.gif b/skin/frontend/default/blue/images/btn_place_order.gif index 181b4ff0b2..c2b805f7ce 100644 Binary files a/skin/frontend/default/blue/images/btn_place_order.gif and b/skin/frontend/default/blue/images/btn_place_order.gif differ diff --git a/skin/frontend/default/blue/images/btn_proceed_to_checkout.gif b/skin/frontend/default/blue/images/btn_proceed_to_checkout.gif index b65875915d..70fbef32d3 100644 Binary files a/skin/frontend/default/blue/images/btn_proceed_to_checkout.gif and b/skin/frontend/default/blue/images/btn_proceed_to_checkout.gif differ diff --git a/skin/frontend/default/blue/images/btn_proceed_to_checkout.png b/skin/frontend/default/blue/images/btn_proceed_to_checkout.png deleted file mode 100644 index 458740415b..0000000000 Binary files a/skin/frontend/default/blue/images/btn_proceed_to_checkout.png and /dev/null differ diff --git a/skin/frontend/default/blue/images/btn_proceed_to_checkout_bg.gif b/skin/frontend/default/blue/images/btn_proceed_to_checkout_bg.gif deleted file mode 100644 index c4384678d6..0000000000 Binary files a/skin/frontend/default/blue/images/btn_proceed_to_checkout_bg.gif and /dev/null differ diff --git a/skin/frontend/default/blue/images/btn_proceed_to_checkout_rad.gif b/skin/frontend/default/blue/images/btn_proceed_to_checkout_rad.gif deleted file mode 100644 index 1264a1489a..0000000000 Binary files a/skin/frontend/default/blue/images/btn_proceed_to_checkout_rad.gif and /dev/null differ diff --git a/skin/frontend/default/blue/images/list_remove_btn.gif b/skin/frontend/default/blue/images/btn_remove.gif similarity index 100% rename from skin/frontend/default/blue/images/list_remove_btn.gif rename to skin/frontend/default/blue/images/btn_remove.gif diff --git a/skin/frontend/default/blue/images/chart_remove.gif b/skin/frontend/default/blue/images/btn_remove2.gif similarity index 100% rename from skin/frontend/default/blue/images/chart_remove.gif rename to skin/frontend/default/blue/images/btn_remove2.gif diff --git a/skin/frontend/default/blue/images/btn_search.gif b/skin/frontend/default/blue/images/btn_search.gif new file mode 100644 index 0000000000..d1e994cac0 Binary files /dev/null and b/skin/frontend/default/blue/images/btn_search.gif differ diff --git a/skin/frontend/default/blue/images/cart_out_of_stock_bg.gif b/skin/frontend/default/blue/images/cart_out_of_stock_bg.gif deleted file mode 100644 index 369d4830ee..0000000000 Binary files a/skin/frontend/default/blue/images/cart_out_of_stock_bg.gif and /dev/null differ diff --git a/skin/frontend/default/blue/images/checkout_progress_active_bg.gif b/skin/frontend/default/blue/images/checkout_progress_active_bg.gif deleted file mode 100644 index 5fa640592b..0000000000 Binary files a/skin/frontend/default/blue/images/checkout_progress_active_bg.gif and /dev/null differ diff --git a/skin/frontend/default/blue/images/checkout_progress_bg.gif b/skin/frontend/default/blue/images/checkout_progress_bg.gif deleted file mode 100644 index 0b0927369a..0000000000 Binary files a/skin/frontend/default/blue/images/checkout_progress_bg.gif and /dev/null differ diff --git a/skin/frontend/default/blue/images/checkout_progress_corner.gif b/skin/frontend/default/blue/images/checkout_progress_corner.gif deleted file mode 100644 index ce791acd67..0000000000 Binary files a/skin/frontend/default/blue/images/checkout_progress_corner.gif and /dev/null differ diff --git a/skin/frontend/default/blue/images/compare_products_bg.gif b/skin/frontend/default/blue/images/compare_products_bg.gif deleted file mode 100644 index 3e55cf863b..0000000000 Binary files a/skin/frontend/default/blue/images/compare_products_bg.gif and /dev/null differ diff --git a/skin/frontend/default/blue/images/customer_reviews_pager_bg.gif b/skin/frontend/default/blue/images/customer_reviews_pager_bg.gif deleted file mode 100644 index abc8977ad2..0000000000 Binary files a/skin/frontend/default/blue/images/customer_reviews_pager_bg.gif and /dev/null differ diff --git a/skin/frontend/default/blue/images/fam_world.png b/skin/frontend/default/blue/images/fam_world.png deleted file mode 100644 index 68f21d3011..0000000000 Binary files a/skin/frontend/default/blue/images/fam_world.png and /dev/null differ diff --git a/skin/frontend/default/blue/images/footer_bg.gif b/skin/frontend/default/blue/images/footer_bg.gif deleted file mode 100644 index 5c40b5aaa5..0000000000 Binary files a/skin/frontend/default/blue/images/footer_bg.gif and /dev/null differ diff --git a/skin/frontend/default/blue/images/footer_container_bg.gif b/skin/frontend/default/blue/images/footer_container_bg.gif deleted file mode 100644 index d280dcad8a..0000000000 Binary files a/skin/frontend/default/blue/images/footer_container_bg.gif and /dev/null differ diff --git a/skin/frontend/default/blue/images/footer_informational_bg.gif b/skin/frontend/default/blue/images/footer_informational_bg.gif deleted file mode 100644 index a4161dad92..0000000000 Binary files a/skin/frontend/default/blue/images/footer_informational_bg.gif and /dev/null differ diff --git a/skin/frontend/default/blue/images/footer_left.gif b/skin/frontend/default/blue/images/footer_left.gif deleted file mode 100644 index 2019017a9e..0000000000 Binary files a/skin/frontend/default/blue/images/footer_left.gif and /dev/null differ diff --git a/skin/frontend/default/blue/images/footer_legality_bg.gif b/skin/frontend/default/blue/images/footer_legality_bg.gif deleted file mode 100644 index 2c1cc68d0a..0000000000 Binary files a/skin/frontend/default/blue/images/footer_legality_bg.gif and /dev/null differ diff --git a/skin/frontend/default/blue/images/footer_right.gif b/skin/frontend/default/blue/images/footer_right.gif deleted file mode 100644 index 665f8099f8..0000000000 Binary files a/skin/frontend/default/blue/images/footer_right.gif and /dev/null differ diff --git a/skin/frontend/default/blue/images/form_button.gif b/skin/frontend/default/blue/images/form_button.gif deleted file mode 100644 index a00515b600..0000000000 Binary files a/skin/frontend/default/blue/images/form_button.gif and /dev/null differ diff --git a/skin/frontend/default/blue/images/form_button_alt.gif b/skin/frontend/default/blue/images/form_button_alt.gif deleted file mode 100644 index 890f9a559d..0000000000 Binary files a/skin/frontend/default/blue/images/form_button_alt.gif and /dev/null differ diff --git a/skin/frontend/default/blue/images/gift-message-collapse.gif b/skin/frontend/default/blue/images/gift-message-collapse.gif deleted file mode 100644 index 36a7cb5b1a..0000000000 Binary files a/skin/frontend/default/blue/images/gift-message-collapse.gif and /dev/null differ diff --git a/skin/frontend/default/blue/images/gift-message-expand.gif b/skin/frontend/default/blue/images/gift-message-expand.gif deleted file mode 100644 index 0fc38ce784..0000000000 Binary files a/skin/frontend/default/blue/images/gift-message-expand.gif and /dev/null differ diff --git a/skin/frontend/default/blue/images/head_browse_by.gif b/skin/frontend/default/blue/images/head_browse_by.gif deleted file mode 100644 index d8c875d4d6..0000000000 Binary files a/skin/frontend/default/blue/images/head_browse_by.gif and /dev/null differ diff --git a/skin/frontend/default/blue/images/head_my_account.gif b/skin/frontend/default/blue/images/head_my_account.gif deleted file mode 100644 index 84ab4f865f..0000000000 Binary files a/skin/frontend/default/blue/images/head_my_account.gif and /dev/null differ diff --git a/skin/frontend/default/blue/images/header_bg.gif b/skin/frontend/default/blue/images/header_bg.gif deleted file mode 100644 index 5ec714c9c9..0000000000 Binary files a/skin/frontend/default/blue/images/header_bg.gif and /dev/null differ diff --git a/skin/frontend/default/blue/images/header_nav_bg.gif b/skin/frontend/default/blue/images/header_nav_bg.gif deleted file mode 100644 index 479af3cfce..0000000000 Binary files a/skin/frontend/default/blue/images/header_nav_bg.gif and /dev/null differ diff --git a/skin/frontend/default/blue/images/header_top_bg.jpg b/skin/frontend/default/blue/images/header_top_bg.jpg deleted file mode 100644 index 6375f3ffdd..0000000000 Binary files a/skin/frontend/default/blue/images/header_top_bg.jpg and /dev/null differ diff --git a/skin/frontend/default/blue/images/header_top_container_bg.jpg b/skin/frontend/default/blue/images/header_top_container_bg.jpg deleted file mode 100644 index bc6a4f7a96..0000000000 Binary files a/skin/frontend/default/blue/images/header_top_container_bg.jpg and /dev/null differ diff --git a/skin/frontend/default/blue/images/icon_opc_back.gif b/skin/frontend/default/blue/images/i_arrow-top.gif similarity index 100% rename from skin/frontend/default/blue/images/icon_opc_back.gif rename to skin/frontend/default/blue/images/i_arrow-top.gif diff --git a/skin/frontend/default/blue/images/sort_asc_arrow.gif b/skin/frontend/default/blue/images/i_asc_arrow.gif similarity index 100% rename from skin/frontend/default/blue/images/sort_asc_arrow.gif rename to skin/frontend/default/blue/images/i_asc_arrow.gif diff --git a/skin/frontend/default/blue/images/icon_basket.gif b/skin/frontend/default/blue/images/i_block-cart.gif similarity index 100% rename from skin/frontend/default/blue/images/icon_basket.gif rename to skin/frontend/default/blue/images/i_block-cart.gif diff --git a/skin/frontend/default/blue/images/icon_world.gif b/skin/frontend/default/blue/images/i_block-currency.gif similarity index 100% rename from skin/frontend/default/blue/images/icon_world.gif rename to skin/frontend/default/blue/images/i_block-currency.gif diff --git a/skin/frontend/default/default/images/icon_table.gif b/skin/frontend/default/blue/images/i_block-list.gif similarity index 100% rename from skin/frontend/default/default/images/icon_table.gif rename to skin/frontend/default/blue/images/i_block-list.gif diff --git a/skin/frontend/default/blue/images/icon_group.gif b/skin/frontend/default/blue/images/i_block-poll.gif similarity index 100% rename from skin/frontend/default/blue/images/icon_group.gif rename to skin/frontend/default/blue/images/i_block-poll.gif diff --git a/skin/frontend/default/blue/images/icon_clip.gif b/skin/frontend/default/blue/images/i_block-related.gif similarity index 100% rename from skin/frontend/default/blue/images/icon_clip.gif rename to skin/frontend/default/blue/images/i_block-related.gif diff --git a/skin/frontend/default/blue/images/icon_newspaper.gif b/skin/frontend/default/blue/images/i_block-subscribe.gif similarity index 100% rename from skin/frontend/default/blue/images/icon_newspaper.gif rename to skin/frontend/default/blue/images/i_block-subscribe.gif diff --git a/skin/frontend/default/blue/images/icon_tag_green.gif b/skin/frontend/default/blue/images/i_block-tags.gif similarity index 100% rename from skin/frontend/default/blue/images/icon_tag_green.gif rename to skin/frontend/default/blue/images/i_block-tags.gif diff --git a/skin/frontend/default/default/images/icon_tag_green.gif b/skin/frontend/default/blue/images/i_block-viewed.gif similarity index 100% rename from skin/frontend/default/default/images/icon_tag_green.gif rename to skin/frontend/default/blue/images/i_block-viewed.gif diff --git a/skin/frontend/default/blue/images/icon_bell.gif b/skin/frontend/default/blue/images/i_block-wishlist.gif similarity index 100% rename from skin/frontend/default/blue/images/icon_bell.gif rename to skin/frontend/default/blue/images/i_block-wishlist.gif diff --git a/skin/frontend/default/blue/images/sort_desc_arrow.gif b/skin/frontend/default/blue/images/i_desc_arrow.gif similarity index 100% rename from skin/frontend/default/blue/images/sort_desc_arrow.gif rename to skin/frontend/default/blue/images/i_desc_arrow.gif diff --git a/skin/frontend/default/blue/images/icon_asterick.gif b/skin/frontend/default/blue/images/i_discount.gif similarity index 100% rename from skin/frontend/default/blue/images/icon_asterick.gif rename to skin/frontend/default/blue/images/i_discount.gif diff --git a/skin/frontend/default/blue/images/icon_folder_table.gif b/skin/frontend/default/blue/images/i_folder-table.gif similarity index 100% rename from skin/frontend/default/blue/images/icon_folder_table.gif rename to skin/frontend/default/blue/images/i_folder-table.gif diff --git a/skin/frontend/default/blue/images/icon_ma_info.gif b/skin/frontend/default/blue/images/i_ma-info.gif similarity index 100% rename from skin/frontend/default/blue/images/icon_ma_info.gif rename to skin/frontend/default/blue/images/i_ma-info.gif diff --git a/skin/frontend/default/blue/images/icon_ma_reviews.gif b/skin/frontend/default/blue/images/i_ma-reviews.gif similarity index 100% rename from skin/frontend/default/blue/images/icon_ma_reviews.gif rename to skin/frontend/default/blue/images/i_ma-reviews.gif diff --git a/skin/frontend/default/blue/images/icon_ma_tags.gif b/skin/frontend/default/blue/images/i_ma-tags.gif similarity index 100% rename from skin/frontend/default/blue/images/icon_ma_tags.gif rename to skin/frontend/default/blue/images/i_ma-tags.gif diff --git a/skin/frontend/default/blue/images/error_msg_icon.gif b/skin/frontend/default/blue/images/i_msg-error.gif similarity index 100% rename from skin/frontend/default/blue/images/error_msg_icon.gif rename to skin/frontend/default/blue/images/i_msg-error.gif diff --git a/skin/frontend/default/blue/images/note_msg_icon.gif b/skin/frontend/default/blue/images/i_msg-note.gif similarity index 100% rename from skin/frontend/default/blue/images/note_msg_icon.gif rename to skin/frontend/default/blue/images/i_msg-note.gif diff --git a/skin/frontend/default/blue/images/success_msg_icon.gif b/skin/frontend/default/blue/images/i_msg-success.gif similarity index 100% rename from skin/frontend/default/blue/images/success_msg_icon.gif rename to skin/frontend/default/blue/images/i_msg-success.gif diff --git a/skin/frontend/default/blue/images/icon_page_white.gif b/skin/frontend/default/blue/images/i_page1.gif similarity index 100% rename from skin/frontend/default/blue/images/icon_page_white.gif rename to skin/frontend/default/blue/images/i_page1.gif diff --git a/skin/frontend/default/blue/images/icon_page_white_text.gif b/skin/frontend/default/blue/images/i_page2.gif similarity index 100% rename from skin/frontend/default/blue/images/icon_page_white_text.gif rename to skin/frontend/default/blue/images/i_page2.gif diff --git a/skin/frontend/default/blue/images/pager_arrow_right.gif b/skin/frontend/default/blue/images/i_pager-next.gif similarity index 100% rename from skin/frontend/default/blue/images/pager_arrow_right.gif rename to skin/frontend/default/blue/images/i_pager-next.gif diff --git a/skin/frontend/default/blue/images/pager_arrow_left.gif b/skin/frontend/default/blue/images/i_pager-prev.gif similarity index 100% rename from skin/frontend/default/blue/images/pager_arrow_left.gif rename to skin/frontend/default/blue/images/i_pager-prev.gif diff --git a/skin/frontend/default/default/images/icon_printer.gif b/skin/frontend/default/blue/images/i_print.gif similarity index 100% rename from skin/frontend/default/default/images/icon_printer.gif rename to skin/frontend/default/blue/images/i_print.gif diff --git a/skin/frontend/default/blue/images/icon_big_rss.png b/skin/frontend/default/blue/images/i_rss-big.png similarity index 100% rename from skin/frontend/default/blue/images/icon_big_rss.png rename to skin/frontend/default/blue/images/i_rss-big.png diff --git a/skin/frontend/default/blue/images/icon_rss.gif b/skin/frontend/default/blue/images/i_rss.gif similarity index 100% rename from skin/frontend/default/blue/images/icon_rss.gif rename to skin/frontend/default/blue/images/i_rss.gif diff --git a/skin/frontend/default/blue/images/search_criteria.gif b/skin/frontend/default/blue/images/i_search_criteria.gif similarity index 100% rename from skin/frontend/default/blue/images/search_criteria.gif rename to skin/frontend/default/blue/images/i_search_criteria.gif diff --git a/skin/frontend/default/blue/images/icon_lorry.gif b/skin/frontend/default/blue/images/i_shipping.gif similarity index 100% rename from skin/frontend/default/blue/images/icon_lorry.gif rename to skin/frontend/default/blue/images/i_shipping.gif diff --git a/skin/frontend/default/blue/images/icon_tag_add.gif b/skin/frontend/default/blue/images/i_tag_add.gif similarity index 100% rename from skin/frontend/default/blue/images/icon_tag_add.gif rename to skin/frontend/default/blue/images/i_tag_add.gif diff --git a/skin/frontend/default/blue/images/bg_tierico1.gif b/skin/frontend/default/blue/images/i_tier.gif similarity index 100% rename from skin/frontend/default/blue/images/bg_tierico1.gif rename to skin/frontend/default/blue/images/i_tier.gif diff --git a/skin/frontend/default/blue/images/listing_type_grid.gif b/skin/frontend/default/blue/images/i_type_grid.gif similarity index 100% rename from skin/frontend/default/blue/images/listing_type_grid.gif rename to skin/frontend/default/blue/images/i_type_grid.gif diff --git a/skin/frontend/default/blue/images/listing_type_list.gif b/skin/frontend/default/blue/images/i_type_list.gif similarity index 100% rename from skin/frontend/default/blue/images/listing_type_list.gif rename to skin/frontend/default/blue/images/i_type_list.gif diff --git a/skin/frontend/default/blue/images/icon_add_to_compare.gif b/skin/frontend/default/blue/images/icon_add_to_compare.gif deleted file mode 100644 index d90129f51c..0000000000 Binary files a/skin/frontend/default/blue/images/icon_add_to_compare.gif and /dev/null differ diff --git a/skin/frontend/default/blue/images/icon_cart_item_remove.gif b/skin/frontend/default/blue/images/icon_cart_item_remove.gif deleted file mode 100644 index b94f8ab12f..0000000000 Binary files a/skin/frontend/default/blue/images/icon_cart_item_remove.gif and /dev/null differ diff --git a/skin/frontend/default/blue/images/icon_currency_switcher.gif b/skin/frontend/default/blue/images/icon_currency_switcher.gif deleted file mode 100644 index 9841b29af4..0000000000 Binary files a/skin/frontend/default/blue/images/icon_currency_switcher.gif and /dev/null differ diff --git a/skin/frontend/default/blue/images/icon_daily_poll.gif b/skin/frontend/default/blue/images/icon_daily_poll.gif deleted file mode 100644 index 25208fcfc1..0000000000 Binary files a/skin/frontend/default/blue/images/icon_daily_poll.gif and /dev/null differ diff --git a/skin/frontend/default/blue/images/icon_feed.png b/skin/frontend/default/blue/images/icon_feed.png deleted file mode 100644 index c20804da93..0000000000 Binary files a/skin/frontend/default/blue/images/icon_feed.png and /dev/null differ diff --git a/skin/frontend/default/blue/images/icon_lock.gif b/skin/frontend/default/blue/images/icon_lock.gif deleted file mode 100644 index 167bf75b8b..0000000000 Binary files a/skin/frontend/default/blue/images/icon_lock.gif and /dev/null differ diff --git a/skin/frontend/default/blue/images/icon_mini_cart_heading_bg.gif b/skin/frontend/default/blue/images/icon_mini_cart_heading_bg.gif deleted file mode 100644 index e627bab654..0000000000 Binary files a/skin/frontend/default/blue/images/icon_mini_cart_heading_bg.gif and /dev/null differ diff --git a/skin/frontend/default/blue/images/icon_picture.gif b/skin/frontend/default/blue/images/icon_picture.gif deleted file mode 100644 index 889fa84fb2..0000000000 Binary files a/skin/frontend/default/blue/images/icon_picture.gif and /dev/null differ diff --git a/skin/frontend/default/blue/images/icon_special_price.gif b/skin/frontend/default/blue/images/icon_special_price.gif deleted file mode 100644 index 708d8704b6..0000000000 Binary files a/skin/frontend/default/blue/images/icon_special_price.gif and /dev/null differ diff --git a/skin/frontend/default/blue/images/layered_nav_head_bg.gif b/skin/frontend/default/blue/images/layered_nav_head_bg.gif deleted file mode 100644 index 25c4583611..0000000000 Binary files a/skin/frontend/default/blue/images/layered_nav_head_bg.gif and /dev/null differ diff --git a/skin/frontend/default/blue/images/layered_navigation_head.gif b/skin/frontend/default/blue/images/layered_navigation_head.gif deleted file mode 100644 index 5821b60bf0..0000000000 Binary files a/skin/frontend/default/blue/images/layered_navigation_head.gif and /dev/null differ diff --git a/skin/frontend/default/blue/images/main_bg.gif b/skin/frontend/default/blue/images/main_bg.gif deleted file mode 100644 index 79fbba6b43..0000000000 Binary files a/skin/frontend/default/blue/images/main_bg.gif and /dev/null differ diff --git a/skin/frontend/default/blue/images/mini_cart_head_bg.gif b/skin/frontend/default/blue/images/mini_cart_head_bg.gif deleted file mode 100644 index 35152906e8..0000000000 Binary files a/skin/frontend/default/blue/images/mini_cart_head_bg.gif and /dev/null differ diff --git a/skin/frontend/default/blue/images/mini_product_tags_head_bg.gif b/skin/frontend/default/blue/images/mini_product_tags_head_bg.gif deleted file mode 100644 index ae6b958e56..0000000000 Binary files a/skin/frontend/default/blue/images/mini_product_tags_head_bg.gif and /dev/null differ diff --git a/skin/frontend/default/blue/images/mini_search_magnifier.gif b/skin/frontend/default/blue/images/mini_search_magnifier.gif deleted file mode 100644 index b9879718de..0000000000 Binary files a/skin/frontend/default/blue/images/mini_search_magnifier.gif and /dev/null differ diff --git a/skin/frontend/default/blue/images/narrow_by_bg.gif b/skin/frontend/default/blue/images/narrow_by_bg.gif deleted file mode 100644 index a4aa101de8..0000000000 Binary files a/skin/frontend/default/blue/images/narrow_by_bg.gif and /dev/null differ diff --git a/skin/frontend/default/blue/images/nav_li_bg.gif b/skin/frontend/default/blue/images/nav_li_bg.gif deleted file mode 100644 index 4fbd32f63d..0000000000 Binary files a/skin/frontend/default/blue/images/nav_li_bg.gif and /dev/null differ diff --git a/skin/frontend/default/blue/images/nav_link_bg.gif b/skin/frontend/default/blue/images/nav_link_bg.gif deleted file mode 100644 index 826f8cec43..0000000000 Binary files a/skin/frontend/default/blue/images/nav_link_bg.gif and /dev/null differ diff --git a/skin/frontend/default/blue/images/nav_link_over_bg.gif b/skin/frontend/default/blue/images/nav_link_over_bg.gif deleted file mode 100644 index 672d398748..0000000000 Binary files a/skin/frontend/default/blue/images/nav_link_over_bg.gif and /dev/null differ diff --git a/skin/frontend/default/blue/images/nav_ul_a.gif b/skin/frontend/default/blue/images/nav_ul_a.gif deleted file mode 100644 index 8963d7ce20..0000000000 Binary files a/skin/frontend/default/blue/images/nav_ul_a.gif and /dev/null differ diff --git a/skin/frontend/default/blue/images/nav_ul_a_bg.gif b/skin/frontend/default/blue/images/nav_ul_a_bg.gif deleted file mode 100644 index 7ecabf1384..0000000000 Binary files a/skin/frontend/default/blue/images/nav_ul_a_bg.gif and /dev/null differ diff --git a/skin/frontend/default/blue/images/nav_ul_a_over.gif b/skin/frontend/default/blue/images/nav_ul_a_over.gif deleted file mode 100644 index 7d97f952cd..0000000000 Binary files a/skin/frontend/default/blue/images/nav_ul_a_over.gif and /dev/null differ diff --git a/skin/frontend/default/blue/images/no_image.jpg b/skin/frontend/default/blue/images/no_image.jpg deleted file mode 100644 index 0a4c6d3690..0000000000 Binary files a/skin/frontend/default/blue/images/no_image.jpg and /dev/null differ diff --git a/skin/frontend/default/blue/images/ol_count_bg.gif b/skin/frontend/default/blue/images/ol_count_bg.gif deleted file mode 100644 index 09ebddfaa0..0000000000 Binary files a/skin/frontend/default/blue/images/ol_count_bg.gif and /dev/null differ diff --git a/skin/frontend/default/blue/images/opc_on_box_bg.gif b/skin/frontend/default/blue/images/opc_on_box_bg.gif deleted file mode 100644 index 355fe125ba..0000000000 Binary files a/skin/frontend/default/blue/images/opc_on_box_bg.gif and /dev/null differ diff --git a/skin/frontend/default/blue/images/pager_bg.gif b/skin/frontend/default/blue/images/pager_bg.gif deleted file mode 100644 index 0a7dad348f..0000000000 Binary files a/skin/frontend/default/blue/images/pager_bg.gif and /dev/null differ diff --git a/skin/frontend/default/blue/images/ph.gif b/skin/frontend/default/blue/images/ph.gif deleted file mode 100644 index da70aafb44..0000000000 Binary files a/skin/frontend/default/blue/images/ph.gif and /dev/null differ diff --git a/skin/frontend/default/blue/images/ph_callout_monitor.jpg b/skin/frontend/default/blue/images/ph_callout_monitor.jpg deleted file mode 100644 index 662490f8e1..0000000000 Binary files a/skin/frontend/default/blue/images/ph_callout_monitor.jpg and /dev/null differ diff --git a/skin/frontend/default/blue/images/ph_category_landing.jpg b/skin/frontend/default/blue/images/ph_category_landing.jpg deleted file mode 100644 index 7710d3b267..0000000000 Binary files a/skin/frontend/default/blue/images/ph_category_landing.jpg and /dev/null differ diff --git a/skin/frontend/default/blue/images/ph_product_thumb.jpg b/skin/frontend/default/blue/images/ph_product_thumb.jpg deleted file mode 100644 index b367b4c9ea..0000000000 Binary files a/skin/frontend/default/blue/images/ph_product_thumb.jpg and /dev/null differ diff --git a/skin/frontend/default/blue/images/ph_product_thumb2.jpg b/skin/frontend/default/blue/images/ph_product_thumb2.jpg deleted file mode 100644 index 3ead0c1d0e..0000000000 Binary files a/skin/frontend/default/blue/images/ph_product_thumb2.jpg and /dev/null differ diff --git a/skin/frontend/default/blue/images/ph_product_thumb3.jpg b/skin/frontend/default/blue/images/ph_product_thumb3.jpg deleted file mode 100644 index ba9d9eebf9..0000000000 Binary files a/skin/frontend/default/blue/images/ph_product_thumb3.jpg and /dev/null differ diff --git a/skin/frontend/default/blue/images/pipe.gif b/skin/frontend/default/blue/images/pipe.gif deleted file mode 100644 index 27eb48bdbe..0000000000 Binary files a/skin/frontend/default/blue/images/pipe.gif and /dev/null differ diff --git a/skin/frontend/default/blue/images/place_order_bg.gif b/skin/frontend/default/blue/images/place_order_bg.gif deleted file mode 100644 index dcbaa70193..0000000000 Binary files a/skin/frontend/default/blue/images/place_order_bg.gif and /dev/null differ diff --git a/skin/frontend/default/blue/images/place_order_container_bg.gif b/skin/frontend/default/blue/images/place_order_container_bg.gif deleted file mode 100644 index 9b1964ba71..0000000000 Binary files a/skin/frontend/default/blue/images/place_order_container_bg.gif and /dev/null differ diff --git a/skin/frontend/default/blue/images/point-con.gif b/skin/frontend/default/blue/images/point-con.gif deleted file mode 100644 index 7fa3db4a92..0000000000 Binary files a/skin/frontend/default/blue/images/point-con.gif and /dev/null differ diff --git a/skin/frontend/default/blue/images/product_info_box_bg.gif b/skin/frontend/default/blue/images/product_info_box_bg.gif deleted file mode 100644 index e0465f3c2a..0000000000 Binary files a/skin/frontend/default/blue/images/product_info_box_bg.gif and /dev/null differ diff --git a/skin/frontend/default/blue/images/product_rating_blank_star.gif b/skin/frontend/default/blue/images/product_rating_blank_star.gif deleted file mode 100644 index 72d763388e..0000000000 Binary files a/skin/frontend/default/blue/images/product_rating_blank_star.gif and /dev/null differ diff --git a/skin/frontend/default/blue/images/product_rating_full_star.gif b/skin/frontend/default/blue/images/product_rating_full_star.gif deleted file mode 100644 index fa8f276fd8..0000000000 Binary files a/skin/frontend/default/blue/images/product_rating_full_star.gif and /dev/null differ diff --git a/skin/frontend/default/blue/images/saved_head_bg.gif b/skin/frontend/default/blue/images/saved_head_bg.gif deleted file mode 100644 index 6e119135f6..0000000000 Binary files a/skin/frontend/default/blue/images/saved_head_bg.gif and /dev/null differ diff --git a/skin/frontend/default/blue/images/search_form_button.gif b/skin/frontend/default/blue/images/search_form_button.gif deleted file mode 100644 index 59a54f671a..0000000000 Binary files a/skin/frontend/default/blue/images/search_form_button.gif and /dev/null differ diff --git a/skin/frontend/default/blue/images/shop_by_bg.gif b/skin/frontend/default/blue/images/shop_by_bg.gif deleted file mode 100644 index ef619c4da6..0000000000 Binary files a/skin/frontend/default/blue/images/shop_by_bg.gif and /dev/null differ diff --git a/skin/frontend/default/blue/images/table_label_bg.gif b/skin/frontend/default/blue/images/table_label_bg.gif deleted file mode 100644 index 75bda8d331..0000000000 Binary files a/skin/frontend/default/blue/images/table_label_bg.gif and /dev/null differ diff --git a/skin/frontend/default/blue/images/table_label_right_bg.gif b/skin/frontend/default/blue/images/table_label_right_bg.gif deleted file mode 100644 index a7e08b6d3b..0000000000 Binary files a/skin/frontend/default/blue/images/table_label_right_bg.gif and /dev/null differ diff --git a/skin/frontend/default/blue/images/this_is_a_demo.gif b/skin/frontend/default/blue/images/this_is_a_demo.gif deleted file mode 100644 index 9e2618f9f8..0000000000 Binary files a/skin/frontend/default/blue/images/this_is_a_demo.gif and /dev/null differ diff --git a/skin/frontend/default/blue/js/bundle.js b/skin/frontend/default/blue/js/bundle.js deleted file mode 100644 index c69ad52f0c..0000000000 --- a/skin/frontend/default/blue/js/bundle.js +++ /dev/null @@ -1,182 +0,0 @@ -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Academic Free License (AFL 3.0) - * that is bundled with this package in the file LICENSE_AFL.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/afl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @category design - * @package default_default - * @copyright Copyright (c) 2009 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) - */ -if(typeof Product=='undefined') { - var Product = {}; -} -/**************************** BUNDLE PRODUCT **************************/ -Product.Bundle = Class.create(); -Product.Bundle.prototype = { - initialize: function(config){ - this.config = config; - this.reloadPrice(); - }, - changeSelection: function(selection){ - parts = selection.id.split('-'); - if (this.config['options'][parts[2]].isMulti) { - selected = new Array(); - if (selection.tagName == 'SELECT') { - for (var i = 0; i < selection.options.length; i++) { - if (selection.options[i].selected && selection.options[i].value != '') { - selected.push(selection.options[i].value); - } - } - } else if (selection.tagName == 'INPUT') { - selector = parts[0]+'-'+parts[1]+'-'+parts[2]; - selections = $$('.'+selector); - for (var i = 0; i < selections.length; i++) { - if (selections[i].checked && selections[i].value != '') { - selected.push(selections[i].value); - } - } - } - this.config.selected[parts[2]] = selected; - } else { - if (selection.value != '') { - this.config.selected[parts[2]] = new Array(selection.value); - } else { - this.config.selected[parts[2]] = new Array(); - } - this.populateQty(parts[2], selection.value); - } - this.reloadPrice(); - - }, - - reloadPrice: function() { - var calculatedPrice = 0; - for (var option in this.config.selected) { - if (this.config.options[option]) { - for (var i=0; i < this.config.selected[option].length; i++) { - calculatedPrice += Number(this.selectionPrice(option, this.config.selected[option][i])); - } - } - } - - if (this.config.specialPrice) { - var newPrice = (calculatedPrice*this.config.specialPrice)/100; - calculatedPrice = Math.min(newPrice, calculatedPrice); - } - - optionsPrice.changePrice('bundle', calculatedPrice); - optionsPrice.reload(); - - return calculatedPrice; - }, - - selectionPrice: function(optionId, selectionId) { - if (selectionId == '' || selectionId == 'none') { - return 0; - } - - if (this.config.options[optionId].selections[selectionId].customQty == 1 && !this.config['options'][optionId].isMulti) { - if ($('bundle-option-' + optionId + '-qty-input')) { - qty = $('bundle-option-' + optionId + '-qty-input').value; - } else { - qty = 1; - } - } else { - qty = this.config.options[optionId].selections[selectionId].qty; - } - - if (this.config.priceType == '0') { - price = this.config.options[optionId].selections[selectionId].price; - tierPrice = this.config.options[optionId].selections[selectionId].tierPrice; - - for (var i=0; i < tierPrice.length; i++) { - if (Number(tierPrice[i].price_qty) <= qty && Number(tierPrice[i].price) <= price) { - price = tierPrice[i].price; - } - } - } else { - selection = this.config.options[optionId].selections[selectionId]; - if (selection.priceType == '0') { - price = selection.priceValue; - } else { - price = (this.config.basePrice*selection.priceValue)/100; - } - } - price += this.config.options[optionId].selections[selectionId].plusDisposition; - price -= this.config.options[optionId].selections[selectionId].minusDisposition; - return price*qty; - }, - - populateQty: function(optionId, selectionId){ - if (selectionId == '' || selectionId == 'none') { - this.showQtyInput(optionId, '0', false); - return; - } - if (this.config.options[optionId].selections[selectionId].customQty == 1) { - this.showQtyInput(optionId, this.config.options[optionId].selections[selectionId].qty, true); - } else { - this.showQtyInput(optionId, this.config.options[optionId].selections[selectionId].qty, false); - } - }, - - showQtyInput: function(optionId, value, canEdit) { - elem = $('bundle-option-' + optionId + '-qty-input'); - elem.value = value; - elem.disabled = !canEdit; - if (canEdit) { - elem.removeClassName('qty-disabled'); - } else { - elem.addClassName('qty-disabled'); - } - }, - - changeOptionQty: function (element, event) { - var checkQty = true; - if (typeof(event) != 'undefined') { - if (event.keyCode == 8 || event.keyCode == 46) { - checkQty = false; - } - } - if (checkQty && (Number(element.value) == 0 || isNaN(Number(element.value)))) { - element.value = 1; - } - parts = element.id.split('-'); - optionId = parts[2]; - if (!this.config['options'][optionId].isMulti) { - selectionId = this.config.selected[optionId][0]; - this.config.options[optionId].selections[selectionId].qty = element.value*1; - this.reloadPrice(); - } - }, - - validationCallback: function (elmId, result){ - if (typeof elmId == 'undefined') { - return; - } - var container = $(elmId).up('ul.options-list'); - if (typeof container != 'undefined') { - if (result == 'failed') { - container.removeClassName('validation-passed'); - container.addClassName('validation-failed'); - } else { - container.removeClassName('validation-failed'); - container.addClassName('validation-passed'); - } - } - } -} diff --git a/skin/frontend/default/blue/js/giftmessage.js b/skin/frontend/default/blue/js/giftmessage.js deleted file mode 100644 index b2541c1ac6..0000000000 --- a/skin/frontend/default/blue/js/giftmessage.js +++ /dev/null @@ -1,130 +0,0 @@ -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Academic Free License (AFL 3.0) - * that is bundled with this package in the file LICENSE_AFL.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/afl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @category design - * @package default_default - * @copyright Copyright (c) 2009 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) - */ - -var GiftMessage = Class.create(); - -GiftMessage.prototype = { - uniqueId: 0, - initialize: function (buttonId) { - GiftMessageStack.addObject(this); - this.buttonId = buttonId; - this.initListeners(); - }, - editGiftMessage: function (evt) { - var popUpUrl = this.url + '?uniqueId=' + this.uniqueId; - this.popUp = window.open(popUpUrl, 'giftMessage', 'width=350,height=400,resizable=yes,scrollbars=yes'); - this.popUp.focus(); - Event.stop(evt); - }, - initListeners: function () { - var items = $(this.buttonId).getElementsByClassName('listen-for-click'); - items.each(function(item) { - Event.observe(item, 'click', this.editGiftMessage.bindAsEventListener(this)); - item.controller = this; - }.bind(this)); - }, - reloadContainer: function (url) { - new Ajax.Updater(this.buttonId, url, {onComplete:this.initListeners.bind(this)}); - }, - initWindow: function (windowObject) { - this.windowObj = windowObject; - } -}; - -var GiftMessageStack = { - _stack: [], - _nextUniqueId: 0, - addObject: function(giftMessageObject) { - giftMessageObject.uniqueId = this.uniqueId(); - this._stack.push(giftMessageObject); - return this; - }, - uniqueId: function() { - return 'objectStack' + (this._nextUniqueId++); - }, - getObjectById: function(id) { - var giftMessageObject = false; - this._stack.each(function(item){ - if(item.uniqueId == id) { - giftMessageObject = item; - } - }); - return giftMessageObject; - } -}; - -var GiftMessageWindow = Class.create(); -GiftMessageWindow.prototype = { - initialize: function(uniqueId, formId, removeUrl) { - this.uniqueId = uniqueId; - this.removeUrl = removeUrl; - if(window.opener) { - this.parentObject = window.opener.GiftMessageStack.getObjectById(this.uniqueId); - this.parentObject.initWindow(this); - } - if(formId) { - this.form = new VarienForm(formId, true); - this.formElement = $(formId); - this.initListeners(); - } - }, - initListeners: function() { - removeButtons = this.formElement.getElementsByClassName('listen-remove'); - removeButtons.each(function(item){ - Event.observe(item, 'click', this.remove.bindAsEventListener(this)); - }.bind(this)); - - cancelButtons = this.formElement.getElementsByClassName('listen-cancel'); - cancelButtons.each(function(item){ - Event.observe(item, 'click', this.cancel.bindAsEventListener(this)); - }.bind(this)); - }, - cancel: function(evt) { - Event.stop(evt); - window.opener.focus(); - window.close(); - }, - close: function() { - window.opener.focus(); - window.close(); - }, - remove: function(evt) { - Event.stop(evt); - if(this.confirmMessage && !window.confirm(this.confirmMessage)) { - return; - } - window.location.href = this.removeUrl; - }, - updateParent: function (url, buttonUrl) { - if(this.parentObject) { - this.parentObject.url = url - this.parentObject.reloadContainer(buttonUrl); - } - setTimeout(function(){ - window.opener.focus(); - window.close(); - }, 3000); - } -}; diff --git a/skin/frontend/default/blue/js/opcheckout.js b/skin/frontend/default/blue/js/opcheckout.js deleted file mode 100644 index 2afb1be0a9..0000000000 --- a/skin/frontend/default/blue/js/opcheckout.js +++ /dev/null @@ -1,796 +0,0 @@ -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Academic Free License (AFL 3.0) - * that is bundled with this package in the file LICENSE_AFL.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/afl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @category design - * @package default_default - * @copyright Copyright (c) 2009 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) - */ - -var Checkout = Class.create(); -Checkout.prototype = { - initialize: function(accordion, urls){ - this.accordion = accordion; - this.progressUrl = urls.progress; - this.reviewUrl = urls.review; - this.saveMethodUrl = urls.saveMethod; - this.failureUrl = urls.failure; - this.billingForm = false; - this.shippingForm= false; - this.syncBillingShipping = false; - this.method = ''; - this.payment = ''; - this.loadWaiting = false; - this.steps = ['login', 'billing', 'shipping', 'shipping_method', 'payment', 'review']; - - //this.onSetMethod = this.nextStep.bindAsEventListener(this); - - this.accordion.disallowAccessToNextSections = true; - }, - - ajaxFailure: function(){ - location.href = this.failureUrl; - }, - - reloadProgressBlock: function(){ - var updater = new Ajax.Updater('checkout-progress-wrapper', this.progressUrl, {method: 'get', onFailure: this.ajaxFailure.bind(this)}); - }, - - reloadReviewBlock: function(){ - var updater = new Ajax.Updater('checkout-review-load', this.reviewUrl, {method: 'get', onFailure: this.ajaxFailure.bind(this)}); - }, - - _disableEnableAll: function(element, isDisabled) { - var descendants = element.descendants(); - for (var k in descendants) { - descendants[k].disabled = isDisabled; - } - element.disabled = isDisabled; - }, - - setLoadWaiting: function(step, keepDisabled) { - if (step) { - if (this.loadWaiting) { - this.setLoadWaiting(false); - } - var container = $(step+'-buttons-container'); - container.setStyle({opacity:.5}); - this._disableEnableAll(container, true); - Element.show(step+'-please-wait'); - } else { - if (this.loadWaiting) { - var container = $(this.loadWaiting+'-buttons-container'); - var isDisabled = (keepDisabled ? true : false); - if (!isDisabled) { - container.setStyle({opacity:1}); - } - this._disableEnableAll(container, isDisabled); - Element.hide(this.loadWaiting+'-please-wait'); - } - } - this.loadWaiting = step; - }, - - gotoSection: function(section) - { - section = $('opc-'+section); - section.addClassName('allow'); - this.accordion.openSection(section); - }, - - setMethod: function(){ - if ($('login:guest') && $('login:guest').checked) { - this.method = 'guest'; - var request = new Ajax.Request( - this.saveMethodUrl, - {method: 'post', onFailure: this.ajaxFailure.bind(this), parameters: {method:'guest'}} - ); - Element.hide('register-customer-password'); - this.gotoSection('billing'); - } - else if($('login:register') && ($('login:register').checked || $('login:register').type == 'hidden')) { - this.method = 'register'; - var request = new Ajax.Request( - this.saveMethodUrl, - {method: 'post', onFailure: this.ajaxFailure.bind(this), parameters: {method:'register'}} - ); - Element.show('register-customer-password'); - this.gotoSection('billing'); - } - else{ - alert(Translator.translate('Please choose to register or to checkout as a guest')); - return false; - } - }, - - setBilling: function() { - if (($('billing:use_for_shipping_yes')) && ($('billing:use_for_shipping_yes').checked)) { - shipping.syncWithBilling(); - $('opc-shipping').addClassName('allow'); - this.gotoSection('shipping_method'); - } else if (($('billing:use_for_shipping_no')) && ($('billing:use_for_shipping_no').checked)) { - $('shipping:same_as_billing').checked = false; - this.gotoSection('shipping'); - } else { - $('shipping:same_as_billing').checked = true; - this.gotoSection('shipping'); - } - - // this refreshes the checkout progress column - this.reloadProgressBlock(); - -// if ($('billing:use_for_shipping') && $('billing:use_for_shipping').checked){ -// shipping.syncWithBilling(); -// //this.setShipping(); -// //shipping.save(); -// $('opc-shipping').addClassName('allow'); -// this.gotoSection('shipping_method'); -// } else { -// $('shipping:same_as_billing').checked = false; -// this.gotoSection('shipping'); -// } -// this.reloadProgressBlock(); -// //this.accordion.openNextSection(true); - }, - - setShipping: function() { - this.reloadProgressBlock(); - //this.nextStep(); - this.gotoSection('shipping_method'); - //this.accordion.openNextSection(true); - }, - - setShippingMethod: function() { - this.reloadProgressBlock(); - //this.nextStep(); - this.gotoSection('payment'); - //this.accordion.openNextSection(true); - }, - - setPayment: function() { - this.reloadProgressBlock(); - //this.nextStep(); - this.gotoSection('review'); - //this.accordion.openNextSection(true); - }, - - setReview: function() { - this.reloadProgressBlock(); - //this.nextStep(); - //this.accordion.openNextSection(true); - }, - - back: function(){ - if (this.loadWaiting) return; - this.accordion.openPrevSection(true); - }, - - setStepResponse: function(response){ - if (response.update_section) { - $('checkout-'+response.update_section.name+'-load').update(response.update_section.html); - } - if (response.allow_sections) { - response.allow_sections.each(function(e){ - $('opc-'+e).addClassName('allow'); - }); - } - - if(response.duplicateBillingInfo) - { - shipping.setSameAsBilling(true); - } - - if (response.goto_section) { - this.reloadProgressBlock(); - this.gotoSection(response.goto_section); - return true; - } - if (response.redirect) { - location.href = response.redirect; - return true; - } - return false; - } -} - -// billing -var Billing = Class.create(); -Billing.prototype = { - initialize: function(form, addressUrl, saveUrl){ - this.form = form; - if ($(this.form)) { - $(this.form).observe('submit', function(event){this.save();Event.stop(event);}.bind(this)); - } - this.addressUrl = addressUrl; - this.saveUrl = saveUrl; - this.onAddressLoad = this.fillForm.bindAsEventListener(this); - this.onSave = this.nextStep.bindAsEventListener(this); - this.onComplete = this.resetLoadWaiting.bindAsEventListener(this); - }, - - setAddress: function(addressId){ - if (addressId) { - request = new Ajax.Request( - this.addressUrl+addressId, - {method:'get', onSuccess: this.onAddressLoad, onFailure: checkout.ajaxFailure.bind(checkout)} - ); - } - else { - this.fillForm(false); - } - }, - - newAddress: function(isNew){ - if (isNew) { - this.resetSelectedAddress(); - Element.show('billing-new-address-form'); - } else { - Element.hide('billing-new-address-form'); - } - }, - - resetSelectedAddress: function(){ - var selectElement = $('billing-address-select') - if (selectElement) { - selectElement.value=''; - } - }, - - fillForm: function(transport){ - var elementValues = {}; - if (transport && transport.responseText){ - try{ - elementValues = eval('(' + transport.responseText + ')'); - } - catch (e) { - elementValues = {}; - } - } - else{ - this.resetSelectedAddress(); - } - arrElements = Form.getElements(this.form); - for (var elemIndex in arrElements) { - if (arrElements[elemIndex].id) { - var fieldName = arrElements[elemIndex].id.replace(/^billing:/, ''); - arrElements[elemIndex].value = elementValues[fieldName] ? elementValues[fieldName] : ''; - if (fieldName == 'country_id' && billingForm){ - billingForm.elementChildLoad(arrElements[elemIndex]); - } - } - } - }, - - setUseForShipping: function(flag) { - $('shipping:same_as_billing').checked = flag; - }, - - save: function(){ - if (checkout.loadWaiting!=false) return; - - var validator = new Validation(this.form); - if (validator.validate()) { - if (checkout.method=='register' && $('billing:customer_password').value != $('billing:confirm_password').value) { - alert(Translator.translate('Error: Passwords do not match')); - return; - } - checkout.setLoadWaiting('billing'); - -// if ($('billing:use_for_shipping') && $('billing:use_for_shipping').checked) { -// $('billing:use_for_shipping').value=1; -// } - - var request = new Ajax.Request( - this.saveUrl, - { - method: 'post', - onComplete: this.onComplete, - onSuccess: this.onSave, - onFailure: checkout.ajaxFailure.bind(checkout), - parameters: Form.serialize(this.form) - } - ); - } - }, - - resetLoadWaiting: function(transport){ - checkout.setLoadWaiting(false); - }, - - /** - This method recieves the AJAX response on success. - There are 3 options: error, redirect or html with shipping options. - */ - nextStep: function(transport){ - if (transport && transport.responseText){ - try{ - response = eval('(' + transport.responseText + ')'); - } - catch (e) { - response = {}; - } - } - - if (response.error){ - if ((typeof response.message) == 'string') { - alert(response.message); - } else { - if (window.billingRegionUpdater) { - billingRegionUpdater.update(); - } - - alert(response.message.join("\n")); - } - - return false; - } - - checkout.setStepResponse(response); - - // DELETE - //alert('error: ' + response.error + ' / redirect: ' + response.redirect + ' / shipping_methods_html: ' + response.shipping_methods_html); - // This moves the accordion panels of one page checkout and updates the checkout progress - //checkout.setBilling(); - } -} - -// shipping -var Shipping = Class.create(); -Shipping.prototype = { - initialize: function(form, addressUrl, saveUrl, methodsUrl){ - this.form = form; - if ($(this.form)) { - $(this.form).observe('submit', function(event){this.save();Event.stop(event);}.bind(this)); - } - this.addressUrl = addressUrl; - this.saveUrl = saveUrl; - this.methodsUrl = methodsUrl; - this.onAddressLoad = this.fillForm.bindAsEventListener(this); - this.onSave = this.nextStep.bindAsEventListener(this); - this.onComplete = this.resetLoadWaiting.bindAsEventListener(this); - }, - - setAddress: function(addressId){ - if (addressId) { - request = new Ajax.Request( - this.addressUrl+addressId, - {method:'get', onSuccess: this.onAddressLoad, onFailure: checkout.ajaxFailure.bind(checkout)} - ); - } - else { - this.fillForm(false); - } - }, - - newAddress: function(isNew){ - if (isNew) { - this.resetSelectedAddress(); - Element.show('shipping-new-address-form'); - } else { - Element.hide('shipping-new-address-form'); - } - shipping.setSameAsBilling(false); - }, - - resetSelectedAddress: function(){ - var selectElement = $('shipping-address-select') - if (selectElement) { - selectElement.value=''; - } - }, - - fillForm: function(transport){ - var elementValues = {}; - if (transport && transport.responseText){ - try{ - elementValues = eval('(' + transport.responseText + ')'); - } - catch (e) { - elementValues = {}; - } - } - else{ - this.resetSelectedAddress(); - } - arrElements = Form.getElements(this.form); - for (var elemIndex in arrElements) { - if (arrElements[elemIndex].id) { - var fieldName = arrElements[elemIndex].id.replace(/^shipping:/, ''); - arrElements[elemIndex].value = elementValues[fieldName] ? elementValues[fieldName] : ''; - if (fieldName == 'country_id' && shippingForm){ - shippingForm.elementChildLoad(arrElements[elemIndex]); - } - } - } - }, - - setSameAsBilling: function(flag) { - $('shipping:same_as_billing').checked = flag; -// #5599. Also it hangs up, if the flag is not false -// $('billing:use_for_shipping_yes').checked = flag; - if (flag) { - this.syncWithBilling(); - } - }, - - syncWithBilling: function () { - $('billing-address-select') && this.newAddress(!$('billing-address-select').value); - $('shipping:same_as_billing').checked = true; - if (!$('billing-address-select') || !$('billing-address-select').value) { - arrElements = Form.getElements(this.form); - for (var elemIndex in arrElements) { - if (arrElements[elemIndex].id) { - var sourceField = $(arrElements[elemIndex].id.replace(/^shipping:/, 'billing:')); - if (sourceField){ - arrElements[elemIndex].value = sourceField.value; - } - } - } - //$('shipping:country_id').value = $('billing:country_id').value; - shippingRegionUpdater.update(); - $('shipping:region_id').value = $('billing:region_id').value; - $('shipping:region').value = $('billing:region').value; - //shippingForm.elementChildLoad($('shipping:country_id'), this.setRegionValue.bind(this)); - } else { - $('shipping-address-select').value = $('billing-address-select').value; - } - }, - - setRegionValue: function(){ - $('shipping:region').value = $('billing:region').value; - }, - - save: function(){ - if (checkout.loadWaiting!=false) return; - var validator = new Validation(this.form); - if (validator.validate()) { - checkout.setLoadWaiting('shipping'); - var request = new Ajax.Request( - this.saveUrl, - { - method:'post', - onComplete: this.onComplete, - onSuccess: this.onSave, - onFailure: checkout.ajaxFailure.bind(checkout), - parameters: Form.serialize(this.form) - } - ); - } - }, - - resetLoadWaiting: function(transport){ - checkout.setLoadWaiting(false); - }, - - nextStep: function(transport){ - if (transport && transport.responseText){ - try{ - response = eval('(' + transport.responseText + ')'); - } - catch (e) { - response = {}; - } - } - if (response.error){ - if ((typeof response.message) == 'string') { - alert(response.message); - } else { - if (window.shippingRegionUpdater) { - shippingRegionUpdater.update(); - } - alert(response.message.join("\n")); - } - - return false; - } - - checkout.setStepResponse(response); - - /* - var updater = new Ajax.Updater( - 'checkout-shipping-method-load', - this.methodsUrl, - {method:'get', onSuccess: checkout.setShipping.bind(checkout)} - ); - */ - //checkout.setShipping(); - } -} - -// shipping method -var ShippingMethod = Class.create(); -ShippingMethod.prototype = { - initialize: function(form, saveUrl){ - this.form = form; - if ($(this.form)) { - $(this.form).observe('submit', function(event){this.save();Event.stop(event);}.bind(this)); - } - this.saveUrl = saveUrl; - this.validator = new Validation(this.form); - this.onSave = this.nextStep.bindAsEventListener(this); - this.onComplete = this.resetLoadWaiting.bindAsEventListener(this); - }, - - validate: function() { - var methods = document.getElementsByName('shipping_method'); - if (methods.length==0) { - alert(Translator.translate('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.')); - return false; - } - - if(!this.validator.validate()) { - return false; - } - - for (var i=0; i ul { left:0; } -#nav li.over > ul li.over > ul { left:100px; } -#nav li.over ul ul { left:-10000px; } - -#nav ul li a { background:#ecf3f6; } -#nav ul li a:hover { background:#d5e4eb; } -#nav ul li a, -#nav ul li a:hover { color:#2f2f2f !important; } -#nav ul span, #nav ul li.last li span { padding:3px 15px 4px 15px;} - -/************ 3RD+ LEVEL ************/ -#nav ul ul { top:5px; } diff --git a/skin/frontend/default/default/css/print.css b/skin/frontend/default/default/css/print.css index e5408b7b62..99c4ca5209 100644 --- a/skin/frontend/default/default/css/print.css +++ b/skin/frontend/default/default/css/print.css @@ -22,74 +22,15 @@ * @copyright Copyright (c) 2009 Irubin Consulting Inc. DBA Varien (http://www.varien.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ - -* { background:none !important; } - -/* Resets */ -* { min-height:0 !important;text-align:left !important; } -body { background:#fff; font-size:9pt; margin:15px; } -a, a:hover { color:#2976C9 !important; } -th, td { color:#2f2f2f !important; } -td { border-color:#ccc !important; } -hr{ visibility:visible; height:1px; margin:20px 0; } - - -/* Common Elements */ -.button-set { display:none; } -.col3-set *, .col4-set * { float:none !important; width:auto !important; } -.form-button { display:none; } -.head { text-align:left; } -.head *, .page-head *, .page-head-alt * { display:block !important; float:none; } - -.pager, .view-by { display:none; } -.actions { display:none !important; } -.content, .box { padding:5px 0 5px 0 !important; } - - -/* Layout */ -#nav { display:none; } -.header { border:0; } -.header-top-container { border:0; } -h1#logo, .this-is-a-demo, .quick-access { float:none; } -h1#logo { margin:0; } -.quick-access { float:none; display:none; } -.side-col { float:none !important; } -.side-col .box { display:none; } -.col-main { width:auto !important; float:none !important; margin:0 !important; } -.footer-container { border:0; } -.footer { margin-top:2em; border-top:1px solid #ccc; } -.footer .informational { display:none; border:0; } - - -/* Shop Elements */ -.count { color:#2f2f2f !important; } -.ratings, .rating-box { display:none !important; } -.step-count { display:inline !important; } -.base-mini .head * { padding:0; } - -/* Shop Pages */ -#track1 { display:none; } -ul.more-views { margin-bottom:10px; } -ul.more-views * { display:inline !important; } -.product-info { float:none !important; width:auto !important;} -.add-to-box { display:none; } -.checkout-progress { padding:0; margin:10px 0 !important;} -.checkout-progress * { display:inline !important; padding:0 !important; padding-right:10px !important; } -.listing-type-list .listing-item { padding:10px 0 10px 0; border-top:1px dashed #ddd; } -.one-page-checkout .active .step-count { color:#2f2f2f; } -.login-box td { border-bottom:0; } -.shipment-count { color:#2f2f2f; } -.grand-total { background:none !important; color:#2f2f2f; } -p.grand-total { padding-right:0; } -.account-side{ border:0; width:auto !important;} -.account-side .box { display:block !important; } -.account-box .head h4 { background:none; padding-left:0; } -.account-box .product-images { width:auto; } -.account-box .product-details { margin:0; } -table.data-table {width:90% !important;} -body.page-popup .data-table td, body.page-popup .data-table th { border-right:1px solid #D9DDE3 !important; border-bottom:1px solid #D9DDE3 !important; } -body.page-popup .data-table th.last, body.page-popup .data-table td.last { border-right:0 !important; } -body.page-popup .data-table tfoot td { border-bottom:none !important; } -body.page-popup .data-table td, body.page-popup .data-table th { border-color:#bbb; } -.page-popup h1#logo { display:block; margin-bottom:10px; } -.a-right {text-align: right !important;} +* { background:none !important; text-align:left !important; } +body { background:#fff !important; font-size:9pt !important; margin:15px !important; } +a { color:#2976c9 !important; } +th,td { color:#2f2f2f !important; border-color:#ccc !important; } + +.header-container, +.nav-container, +.footer-container, +.pager, +.toolbar, +.actions, +.buttons-set { display:none !important; } diff --git a/skin/frontend/default/default/css/reset.css b/skin/frontend/default/default/css/reset.css deleted file mode 100644 index 3764560735..0000000000 --- a/skin/frontend/default/default/css/reset.css +++ /dev/null @@ -1,75 +0,0 @@ -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Academic Free License (AFL 3.0) - * that is bundled with this package in the file LICENSE_AFL.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/afl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @category design - * @package default_default - * @copyright Copyright (c) 2009 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) - */ -/******************************************/ -/***********[ Mage_CSS_A Reset ]***********/ -/******************************************/ - -* { margin:0; padding:0; } - -body { background:#496778 url(../images/body_bg.gif) 50% 0 repeat-y; color:#2f2f2f; font:12px/1.55em arial, helvetica, sans-serif; text-align:center; } - -a { color:#1e7ec8; text-decoration:underline; } -a:hover { color:#1e7ec8; text-decoration:underline; } -a img { border:0;} -:focus { outline:0; } - -/* Heading */ -h1, h2, h3, h4, h5, h6, .head { margin-bottom:.4em; line-height:1.3em; color:#0A263C; } -h1 { font-size:2em; line-height:1.17; } -h2 { font-size:1.5em; } -h3 { font-size:1.35em; } -h4 { font-size:1.05em; } -h5 { font-size:1.05em; } -h6 { font-size:.95em; } - -/* Table */ -th { padding:0; text-align:left; vertical-align:top; } -td {padding:0;vertical-align:top;} - -/* Paragraph */ -p { margin-bottom:.8em; } -address { margin-bottom:.4em; } -address { font-style:normal; line-height:1.4em;} -cite { font-style:normal; font-size:10px;} -q:before, q:after{content:'';} - -/* Form */ -form { display:inline;} -fieldset { border:none; } -legend {display:none;} -label { color:#666; /*font-size:.95em;*/ font-weight:bold; } -input, select, button { vertical-align:middle; } - -/* Lists */ -dt { display:block; font-weight:bold; } -ul,ol { list-style:none; } - -/* Size */ -small { font-size:.92em; } -big { font-size:1.1em; } - -hr { height:0; margin:8px 0; overflow:hidden; visibility:hidden; } -.nowrap { white-space:nowrap; } -.bold { font-weight:bold; } diff --git a/skin/frontend/default/default/css/styles-ie.css b/skin/frontend/default/default/css/styles-ie.css new file mode 100644 index 0000000000..d129459bbb --- /dev/null +++ b/skin/frontend/default/default/css/styles-ie.css @@ -0,0 +1,141 @@ +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Academic Free License (AFL 3.0) + * that is bundled with this package in the file LICENSE_AFL.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/afl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @category design + * @package default_default + * @copyright Copyright (c) 2009 Irubin Consulting Inc. DBA Varien (http://www.varien.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ + +/* IE 6 only */ +* html .validation-advice { height:13px; } +* html .error-msg, +* html .success-msg, +* html .note-msg, +* html .notice-msg { _height:24px; } +* html .main { height:400px; } +* html .account-login .content { height:240px; } +.block li.item, +.block-poll li, +.opc li.section { vertical-align:top; } + +/* Doubled Margin Fixes */ +.product-view .product-img-box .more-views li, +.product-view .box-tags .form-add .input-box, +.sp-methods select.month { display:inline; } + +/********** < Navigation styles */ +#nav li, +#nav li a { zoom:1; } +#nav li { vertical-align:top; } +/* Show Menu */ +#nav li.over ul.shown-sub { left:0; } +#nav li.over li ul.shown-sub { left:100px; } +/********** < Navigation styles */ + +input.radio { width:13px; height:13px; } +input.checkbox { width:13px; height:13px; } +button.button { height:21px; } +button.button span { position:relative; } +button.btn-checkout { height:40px; } +.form-list label { position:relative; z-index:0; } +.form-list label.required em { position:absolute; top:0; right:-8px; } +.form-list select { margin-bottom:1px; } + +table { face-color:expression(runtimeStyle.scrollbarFaceColor = '#fff', cellSpacing = 0); } + +.product-view .product-img-box .zoom.disabled { filter:alpha(opacity=30); } + +.gift-messages-form { position:relative; zoom:1; } + +.product-view .box-tags .product-tags li, +.footer li { padding:0 4px 0 7px; } + +/* Clearer */ +.clearer { display:block; clear:both; font-size:0; line-height:0; height:0; overflow:hidden; } + +/* Clears and hasLayout fixes */ +.header-container, +.header-container .top-container, +.header, +.header .quick-access, +#nav, +.main, +.footer, +.footer-container .bottom-container, +.col-main, +.col2-set, +.col3-set, +.col4-set, +.messages li, +.search-autocomplete li, +.block, +.block .block-content, +.block .actions, +.block li.item, +.block-poll li, +.block-poll .label, +.block-layered-nav .currently li, +.block-account .block-content li a, +.mini-products-list .product-details, +.page-title, +.rss-title h1, +.products-grid, +.products-list li.item, +.box-account .box-head, +.dashboard .box .box-title, +.box-reviews li.item, +.box-tags li.item, +.pager, +.sorter, +.ratings, +.add-to-box, +.add-to-cart, +.product-essential, +.product-collateral, +.product-view .product-img-box .more-views ul, +.product-view .box-tags .form-add, +.product-options .options-list li, +.product-options-bottom, +.truncated, +.truncated .truncated_full_value, +.product-review, +.cart, +.cart-collaterals, +.cart .crosssell li.item, +.cart .discount, +.opc .step-title, +.opc .step, +.multiple-checkout, +.sp-methods, +.checkout-progress, +.multiple-checkout .place-order, +.form-list li, +.form-list .field, +.group-select li, +.buttons-set, +.page-print .print-head, +.cart-tax-total, +.advanced-search-summary, +.advanced-search-summary p, +.gift-messages-form .item, +.send-friend .form-list li p { zoom:1; } + +/* Hover Fix */ +iframe.hover-fix { position:absolute; left:-1px; top:-1px; z-index:-1; background:transparent; filter:progid:DXImageTransform.Microsoft.Alpha(style=0,opacity=0); } diff --git a/skin/frontend/default/default/css/styles.css b/skin/frontend/default/default/css/styles.css new file mode 100644 index 0000000000..fccdf820ab --- /dev/null +++ b/skin/frontend/default/default/css/styles.css @@ -0,0 +1,1572 @@ +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Academic Free License (AFL 3.0) + * that is bundled with this package in the file LICENSE_AFL.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/afl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @category design + * @package default_default + * @copyright Copyright (c) 2009 Irubin Consulting Inc. DBA Varien (http://www.varien.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ + +/* Reset ================================================================================= */ +* { margin:0; padding:0; } + +body { background:#496778 url(../images/bkg_body.gif) 50% 0 repeat-y; font:12px/1.55 Arial, Helvetica, sans-serif; color:#2f2f2f; text-align:center; } + +img { border:0; vertical-align:top; } + +a { color:#1e7ec8; text-decoration:underline; } +a:hover { text-decoration:none; } +:focus { outline: 0; } + +/* Headings */ +h1,h2,h3, +h4,h5,h6 { margin:0 0 5px; line-height:1.35; color:#0a263c; } +h1 { font-size:20px; font-weight:normal; } +h2 { font-size:18px; font-weight:normal; } +h3 { font-size:16px; font-weight:bold; } +h4 { font-size:14px; font-weight:bold; } +h5 { font-size:12px; font-weight:bold; } +h6 { font-size:11px; font-weight:bold; } + +/* Forms */ +form { display:inline; } +fieldset { border:0; } +legend { display:none; } + +/* Table */ +table { border:0; /*border-collapse:collapse;*/ border-spacing:0; empty-cells:show; font-size:100%; } +caption,th,td { vertical-align:top; text-align:left; font-weight:normal; } + +/* Content */ +p { margin:0 0 10px; } +strong { font-weight:bold; } +address { font-style:normal; line-height:1.35; } +cite { font-style:normal; } +q, +blockquote { quotes:none; } +q:before, +q:after { content:''; } +small,big { font-size:1em; } +sup { font-size:1em; vertical-align:top; } + +/* Lists */ +ul,ol { list-style:none; } + +/* Tools */ +.hidden { display:block !important; border:0 !important; margin:0 !important; padding:0 !important; font-size:0 !important; line-height:0 !important; width:0 !important; height:0 !important; overflow:hidden !important; } +.nobr { white-space:nowrap !important; } +.wrap { white-space:normal !important; } +.a-left { text-align:left !important; } +.a-center { text-align:center !important; } +.a-right { text-align:right !important; } +.v-top { vertical-align:top; } +.v-middle { vertical-align:middle; } +.f-left, +.left { float:left !important; } +.f-right, +.right { float:right !important; } +.f-none { float:none !important; } +.f-fix { float:left; width:100%; } +.no-display { display:none; } +.no-margin { margin:0 !important; } +.no-padding { padding:0 !important; } +.no-bg { background:none !important; } +/* ======================================================================================= */ + + +/* Layout ================================================================================ */ +.wrapper { min-width:954px; } +.page {} +.page-print { background:#fff; padding:25px 30px; text-align:left; } +.page-empty { background:#fff; padding:20px; text-align:left; } +.page-popup { background:#fff; padding:25px 30px; text-align:left; } +.main-container { background:#fbfaf6 url(../images/bkg_main1.gif) 50% 0 no-repeat; } +.main { width:900px; margin:0 auto; min-height:400px; padding:25px 25px 80px; background:#fffffe url(../images/bkg_main2.gif) 0 0 no-repeat; text-align:left; } + +/* Base Columns */ +.col-left { float:left; width:195px; padding:0 0 1px; } +.col-main { float:left; width:685px; padding:0 0 1px; } +.col-right { float:right; width:195px; padding:0 0 1px; } + +/* 1 Column Layout */ +.col1-layout .col-main { float:none; width:auto; } + +/* 2 Columns Layout */ +.col2-left-layout .col-main { float:right; } +.col2-right-layout .col-main {} + +/* 3 Columns Layout */ +.col3-layout .col-main { width:475px; margin-left:17px; } + +/* Content Columns */ +.col2-set .col-1 { float:left; width:48.5%; } +.col2-set .col-2 { float:right; width:48.5%; } +.col2-set .col-narrow { width:32%; } +.col2-set .col-wide { width:65%; } + +.col3-set .col-1 { float:left; width:32%; } +.col3-set .col-2 { float:left; width:32%; margin-left:2%; } +.col3-set .col-3 { float:right; width:32%; } + +.col4-set .col-1 { float:left; width:23.5%; } +.col4-set .col-2 { float:left; width:23.5%; margin:0 2%; } +.col4-set .col-3 { float:left; width:23.5%; } +.col4-set .col-4 { float:right; width:23.5%; } +/* ======================================================================================= */ + + +/* Global Styles ========================================================================= */ +/* Form Elements */ +input,select,textarea,button { font:12px/15px Arial, Helvetica, sans-serif; vertical-align:middle; color:#2f2f2f; } +input.input-text,select,textarea { background:#fff; border:1px solid #b6b6b6; } +input.input-text,textarea { padding:2px; } +select { padding:1px; } +select option { padding-right:10px; } +select.multiselect option { border-bottom:1px solid #b6b6b6; padding:2px 5px; } +select.multiselect option:last-child { border-bottom:0; } +textarea { overflow:auto; } +input.radio { margin-right:3px; } +input.checkbox { margin-right:3px; } +input.qty { width:2.5em !important; } +button.button::-moz-focus-inner { padding:0; border:0; } /* FF Fix */ +button.button { -webkit-border-fit:lines; } /* <- Safari & Google Chrome Fix */ +button.button { overflow:visible; width:auto; border:0; padding:0; margin:0; background:transparent; cursor:pointer; } +button.button span { display:block; height:19px; border:1px solid #de5400; background:#f18200; padding:0 8px; font:bold 12px/19px Arial, Helvetica, sans-serif; text-align:center; white-space:nowrap; color:#fff; } +button.button span span { border:0; padding:0; } +button.disabled span { border-color:#999; background:#ccc; color:#eee;} + +button.btn-checkout span { height:40px; border:0; background:url(../images/btn_checkout.gif) 0 0 no-repeat; padding:0 0 0 9px; font:bold 15px/40px Arial, Helvetica, sans-serif; color:#fff; } +button.btn-checkout span span { background-position:100% 0; padding:0 25px 0 16px; } + +p.control input.checkbox, +p.control input.radio { margin-right:6px; } +/* Form Highlight */ +input.input-text:focus,select:focus,textarea:focus { background-color:#edf7fd; } +/*.highlight { background:#efefef; }*/ + +/* Form lists */ +/* Grouped fields */ +/*.form-list { width:535px; margin:0 auto; overflow:hidden; }*/ +.form-list li { margin:0 0 8px; } +.form-list label { float:left; color:#667; font-weight:bold; position:relative; z-index:0; } +.form-list label.required {} +.form-list label.required em { float:right; font-style:normal; color:#eb340a; position:absolute; top:0; right:-8px; } +.form-list li.control label { float:none; } +.form-list li.control input.radio, +.form-list li.control input.checkbox { margin-right:6px; } +/*.form-list li.fields { margin-right:-15px; }*/ +.form-list .input-box { display:block; clear:both; width:260px; } +.form-list .field { float:left; width:275px; } +.form-list input.input-text { width:254px; } +.form-list textarea { width:254px; height:10em; } +.form-list select { width:260px; } +.form-list li.wide .input-box { width:535px; } +.form-list li.wide input.input-text { width:529px; } +.form-list li.wide textarea { width:529px; } +.form-list li.wide select { width:535px; } +.form-list li.additional-row { border-top:1px solid #ccc; margin-top:10px; padding-top:7px; } +.form-list li.additional-row .btn-remove { float:right; margin:5px 0 0; } +.form-list .input-range input.input-text { width:74px; } +/* Customer */ +.form-list .customer-name-prefix .input-box, +.form-list .customer-name-suffix .input-box, +.form-list .customer-name-prefix-suffix .input-box, +.form-list .customer-name-prefix-middlename .input-box, +.form-list .customer-name-middlename-suffix .input-box, +.form-list .customer-name-prefix-middlename-suffix .input-box { width:auto; } + +.form-list .name-prefix { width:65px; } +.form-list .name-prefix select { width:55px; } +.form-list .name-prefix input.input-text { width:49px; } + +.form-list .name-suffix { width:65px; } +.form-list .name-suffix select { width:55px; } +.form-list .name-suffix input.input-text { width:49px; } + +.form-list .name-middlename { width:70px; } +.form-list .name-middlename input.input-text { width:49px; } + +.form-list .customer-name-prefix-middlename-suffix .name-firstname, +.form-list .customer-name-prefix-middlename .name-firstname { width:140px; } +.form-list .customer-name-prefix-middlename-suffix .name-firstname input.input-text, +.form-list .customer-name-prefix-middlename .name-firstname input.input-text { width:124px; } +.form-list .customer-name-prefix-middlename-suffix .name-lastname { width:205px; } +.form-list .customer-name-prefix-middlename-suffix .name-lastname input.input-text { width:189px; } + +.form-list .customer-name-prefix-suffix .name-firstname { width:210px; } +.form-list .customer-name-prefix-suffix .name-lastname { width:205px; } +.form-list .customer-name-prefix-suffix .name-firstname input.input-text, +.form-list .customer-name-prefix-suffix .name-lastname input.input-text { width:189px; } + +.form-list .customer-name-prefix-suffix .name-firstname { width:210px; } +.form-list .customer-name-prefix-suffix .name-lastname { width:205px; } +.form-list .customer-name-prefix-suffix .name-firstname input.input-text, +.form-list .customer-name-prefix-suffix .name-lastname input.input-text { width:189px; } + +.form-list .customer-name-prefix .name-firstname, +.form-list .customer-name-middlename .name-firstname { width:210px; } + +.form-list .customer-name-suffix .name-lastname, +.form-list .customer-name-middlename .name-firstname, +.form-list .customer-name-middlename-suffix .name-firstname, +.form-list .customer-name-middlename-suffix .name-lastname { width:205px; } + +.form-list .customer-name-prefix .name-firstname input.input-text, +.form-list .customer-name-suffix .name-lastname input.input-text, +.form-list .customer-name-middlename .name-firstname input.input-text, +.form-list .customer-name-middlename-suffix .name-firstname input.input-text, +.form-list .customer-name-middlename-suffix .name-lastname input.input-text { width:189px; } + +.form-list .customer-dob .dob-month, +.form-list .customer-dob .dob-day, +.form-list .customer-dob .dob-year { float:left; width:85px; } +.form-list .customer-dob input.input-text { display:block; width:74px; } +.form-list .customer-dob label { font-size:10px; font-weight:normal; color:#888; } +.form-list .customer-dob .dob-day, +.form-list .customer-dob .dob-month { width:60px; } +.form-list .customer-dob .dob-day input.input-text, +.form-list .customer-dob .dob-month input.input-text { width:46px; } +.form-list .customer-dob .dob-year { width:140px; } +.form-list .customer-dob .dob-year input.input-text { width:134px; } + +/* Independent fields */ +/*.form-list li { margin:0 0 8px; } +.form-list li.fields { margin:0; } +.form-list .field { display:block; margin:0 0 8px; } +.form-list li.control {} +.form-list label { float:left; width:150px; padding:2px 10px 0 0; text-align:right; } +.form-list label.required { font-weight:bold; } +.form-list label.required em { font-variant:normal; color:#f00; margin-right:3px; } +.form-list .input-box { float:left; width:260px; } +.form-list input.input-text, +.form-list textarea { width:254px; } +.form-list select { width:260px; } +.form-list li.additional-row { border-top:1px solid #ddd; margin-top:10px; } +.form-list li.additional-row .btn-remove { float:right; margin:5px 5px 0 0; } +.form-list .input-range input.input-text { width:96px; }*/ +/* Customer */ +/*.form-list .customer-dob .dob-month, +.form-list .customer-dob .dob-day, +.form-list .customer-dob .dob-year { float:left; width:85px; } +.form-list .customer-dob input.input-text { display:block; width:74px; } +.form-list .customer-dob label { font-size:11px; font-weight:normal; color:#777; text-align:left; } +.form-list .customer-dob .dob-day, +.form-list .customer-dob .dob-month { width:60px; } +.form-list .customer-dob .dob-day input.input-text, +.form-list .customer-dob .dob-month input.input-text { width:46px; } +.form-list .customer-dob .dob-year { width:140px; } +.form-list .customer-dob .dob-year input.input-text { width:134px; }*/ + +.buttons-set { clear:both; margin:4em 0 0; padding:8px 0 0; border-top:1px solid #e4e4e4; text-align:right; } +.buttons-set p.required { margin:0 0 10px; } +.buttons-set .back-link { float:left; margin:0; } +.buttons-set button.button { float:right; margin-right:5px; } + +.fieldset { border:1px solid #bbafa0; background:#fbfaf6; padding:22px 25px 12px 33px; margin:28px 0; } +.fieldset .legend { float:left; font-weight:bold; font-size:13px; border:1px solid #f19900; background:#f9f3e3; color:#e76200; margin:-33px 0 0 -10px; padding:0 8px; position:relative; } + +/* Form Validation */ +.validation-advice { clear:both; min-height:13px; margin:3px 0 0; padding-left:17px; font-size:11px; font-weight:bold; line-height:13px; background:url(../images/validation_advice_bg.gif) 2px 0 no-repeat; color:#eb340a; } +.validation-failed { border:1px dashed #eb340a !important; background:#faebe7 !important; } +.validation-passed {} +p.required { font-size:11px; text-align:right; color:#EB340A; } +/* Expiration date and CVV number validation fix */ +.v-fix { float:left; } +.v-fix .validation-advice { display:block; width:12em; margin-right:-12em; position:relative; } + +/* Global Messages */ +.success { color:#3d6611; font-weight:bold; } +.error { color:#df280a; font-weight:bold; } +.notice { color:#e26703; } + +.messages, +.messages ul { list-style:none !important; margin:0 !important; padding:0 !important; } +.messages { width:100%; overflow:hidden; } +.messages li { margin:0 0 10px !important; } +.messages li li { margin:0 0 3px !important; } +.error-msg, +.success-msg, +.note-msg, +.notice-msg { border-style:solid !important; border-width:1px !important; background-position:10px 9px !important; background-repeat:no-repeat !important; min-height:24px !important; padding:8px 8px 8px 32px !important; font-size:11px !important; font-weight:bold !important; } +.error-msg { border-color:#f16048; background-color:#faebe7; background-image:url(../images/i_msg-error.gif); color:#df280a; } +.success-msg { border-color:#446423; background-color:#eff5ea; background-image:url(../images/i_msg-success.gif); color:#3d6611; } +.note-msg, +.notice-msg { border-color:#fcd344; background-color:#fafaec; background-image:url(../images/i_msg-note.gif); color:#3d6611; } + +/* BreadCrumbs */ +.breadcrumbs { font-size:11px; line-height:1.25; margin:0 0 13px; } +.breadcrumbs li { display:inline; } +.breadcrumbs li strong { font-weight:bold; } + +/* Page Heading */ +.page-title { width:100%; overflow:hidden; border-bottom:1px solid #ccc; margin:0 0 25px; } +.page-title h1 { margin:0; color:#0a263c; } +.page-title .separator { margin:0 3px; } +.page-title .link-rss { float:right; margin:7px 0 0; } +.title-buttons { text-align:right; } +.title-buttons h1, +.title-buttons h2, +.title-buttons h3, +.title-buttons h4, +.title-buttons h5, +.title-buttons h6 { float:left; } + +.subtitle { clear:both; padding:15px 0 0; font-size:15px; font-weight:bold; margin:0 0 6px; color:#e25203; } + +/* Pager */ +.pager { font-size:11px; background:#fff url(../images/bkg_toolbar.gif) 0 100% repeat-x; padding:4px 8px; border-top:1px solid #e2e2e2; text-align:center; } +.pager .amount { float:left; margin:0; } +.pager .limiter { float:right; } +.pager .limiter label { vertical-align:middle; } +.pager .limiter select { padding:0; margin:0 0 1px; vertical-align:middle; } +.pager .pages { margin:0 140px; } +.pager .pages ol { display:inline; } +.pager .pages li { display:inline; margin:0 2px; } +.pager .pages .current {} + +/* Sorter */ +.sorter { font-size:11px; background:#fff url(../images/bkg_toolbar.gif) 0 100% repeat-x; padding:3px 8px; border-top:1px solid #e2e2e2; } +.sorter .view-mode { float:left; margin:0; } +.sorter .sort-by { float:right; padding-right:36px; } +.sorter .sort-by label { vertical-align:middle; } +.sorter .sort-by select { padding:0; margin:0 0 1px; vertical-align:middle; } +.sorter .link-feed {} + +/* Toolbar */ +.toolbar {} +.toolbar .pager { padding:3px 8px; border-bottom:1px solid #fff; } +.toolbar .sorter { border-bottom:1px solid #fff; } +.toolbar-bottom {} + +/* Data Table */ +/* Data Table */ +.data-table { width:100%; border:1px solid #bebcb7; } +.data-table .odd { background:#f8f7f5 } +.data-table .even { background:#eeeded; } +/*.data-table tr.odd:hover, +.data-table tr.even:hover { background:#ebf1f6; }*/ +.data-table td.last, +.data-table th.last { border-right:0; } +.data-table tr.last th, +.data-table tr.last td { border-bottom:0 !important; } +.data-table th { padding:3px 8px; font-weight:bold; } +.data-table td { padding:3px 8px; } + +.data-table thead th { font-weight:bold; border-right:1px solid #c2d3e0; padding:2px 8px; color:#0a263c; white-space:nowrap; vertical-align:middle; } +.data-table thead th.wrap { white-space:normal; } +.data-table thead th a, +.data-table thead th a:hover { color:#fff; } +.data-table thead th { background:url(../images/bkg_th.gif) repeat-x 0 100% #d9e5ee; } +.data-table thead th .tax-flag { font-size:11px; white-space:nowrap; } + +.data-table tfoot { border-bottom:1px solid #d9dde3; } +.data-table tfoot tr.first { background:url(../images/bkg_tfoot.gif) 0 0 repeat-x; } +.data-table tfoot tr { background-color:#dee5e8 !important; } +.data-table tfoot td { padding-top:1px; padding-bottom:1px; border-bottom:0; border-right:1px solid #d9dde3; } +.data-table tfoot strong { font-size:16px; } + +.data-table tbody th, +.data-table tbody td { border-bottom:1px solid #d9dde3; border-right:1px solid #d9dde3; } +/* Bundle products tables */ +.data-table tbody.odd tr { background:#f8f7f5 !important; } +.data-table tbody.even tr { background:#f6f6f6 !important; } +.data-table tbody.odd tr td, +.data-table tbody.even tr td { border-bottom:0; } +.data-table tbody.odd tr.border td, +.data-table tbody.even tr.border td { border-bottom:1px solid #d9dde3; } + +.data-table tbody td .option-label { font-weight:bold; font-style:italic; } +.data-table tbody td .option-value { padding-left:10px; } + +/* Tax Details Row */ +tr.tax-total { cursor:pointer; } +tr.tax-total td {} +tr.tax-total .tax-collapse { float:right; text-align:right; padding-left:20px; background:url(../images/bkg_collapse.gif) 0 5px no-repeat; cursor:pointer; } +tr.show-details .tax-collapse { background-position:0 -52px; } +tr.show-details td {} +tr.tax-details td { font-size:11px; background-color:#dae1e4; color:#626465; } +tr.tax-details-first td { border-top:1px solid #d2d8db; } + +/* Shopping cart tax info */ +.cart-tax-info { display:block; } +.cart-tax-info, +.cart-tax-info .cart-price { padding-right:20px; } +.cart-tax-total { display:block; padding-right:20px; background:url(../images/bkg_collapse.gif) 100% 5px no-repeat; cursor:pointer; } +.cart-tax-info .price, +.cart-tax-total .price { display:inline !important; font-weight:normal !important; } +.cart-tax-total-expanded { background-position:100% -52px; } + +/* Class: std - styles for admin-controlled content */ +/*.std ul, +.std ol, +.std dl, +.std p, +.std address, +.std blockquote { margin:0 0 1em; padding:0; } +.std ul { list-style:disc outside; padding-left:1.5em; } +.std ol { list-style:decimal outside; padding-left:1.5em; } +.std ul ul { list-style-type:circle; } +.std ul ul, +.std ol ol, +.std ul ol, +.std ol ul { margin:.5em 0; } +.std dt { font-weight:bold; } +.std dd { padding:0 0 0 1.5em; } +.std blockquote { font-style:italic; padding:0 0 0 1.5em; } +.std address { font-style:normal; } +.std b, +.std strong { font-weight:bold; } +.std i, +.std em { font-style:italic; }*/ + +/* Misc */ +.links li { display:inline; } +.links li.first { padding-left:0 !important; } +.links li.last { background:none !important; padding-right:0 !important; } + +.link-cart { color:#dc6809 !important; font-weight:bold; } +.link-wishlist { color:#dc6809 !important; font-weight:bold; } +.link-reorder { font-weight:bold; color:#dc6809 !important; } +.link-compare { font-weight:bold; } +.link-print { /*background:url(../images/i_print.gif) 0 2px no-repeat; padding:2px 0 2px 25px;*/ font-weight:bold; color:#dc6809; } +.link-rss { background:url(../images/i_rss.gif) 0 2px no-repeat; padding-left:18px; line-height:14px; white-space:nowrap; } +.btn-remove { display:block; width:11px; height:11px; font-size:0; line-height:0; background:url(../images/btn_remove.gif) 0 0 no-repeat; text-indent:-999em; overflow:hidden; } +.btn-remove2 { display:block; width:16px; height:16px; font-size:0; line-height:0; background:url(../images/btn_trash.gif) 0 0 no-repeat; text-indent:-999em; overflow:hidden; } + +.separator { margin:0 3px; } + +.divider { clear:both; display:block; font-size:0; line-height:0; height:1px; margin:10px 0; background:url(../images/bkg_divider1.gif) 0 50% repeat-x; text-indent:-999em; overflow:hidden; } + +/* Noscript Notice */ +.noscript { border:1px solid #ddd; border-width:0 0 1px; background:#ffff90; font-size:12px; line-height:1.25; text-align:center; color:#2f2f2f; } +.noscript .noscript-inner { width:950px; margin:0 auto; padding:12px 0 12px; background:url(../images/i_notice.gif) 20px 50% no-repeat; } +.noscript p { margin:0; } + +/* Demo Notice */ +.demo-notice { margin:0; padding:6px 10px; background:#d75f07; font-size:12px; line-height:1.15; text-align:center; color:#fff; } +/* ======================================================================================= */ + + +/* Header ================================================================================ */ +.logo { float:left; } +.header-container { border-top:5px solid #0d2131; border-bottom:1px solid #415966; background:url(../images/bkg_header.jpg) 50% 0 repeat; } +.header { width:930px; margin:0 auto; padding:10px; text-align:right; position:relative; z-index:10; } +.header .logo { float:left; margin:3px 0 10px 12px; text-decoration:none !important; } +.header .logo strong { position:absolute; top:-999em; left:-999em; width:0; height:0; font-size:0; line-height:0; text-indent:-999em; overflow:hidden; } +.header h1.logo { margin:0; } +.header .quick-access { float:right; width:600px; padding:28px 10px 0 0; } +.header .welcome-msg { margin:0; color:#fff; text-align:right; } +.header .form-search { position:absolute; top:0; right:29px; width:300px; height:30px; background:url(../images/bkg_form-search.gif) 0 0 no-repeat; padding:1px 15px 0 16px; } +.header .form-search label { float:left; width:24px; height:21px; text-align:left; text-indent:-999em; overflow:hidden; } +.header .form-search input.input-text { float:left; border-color:#5c7989; width:209px; margin-right:4px; } +.header .form-search button.button { float:left; } +.header .form-search button.button span { border:0; height:21px; background:url(../images/btn_search.gif) 0 0 no-repeat; padding:0 0 0 3px; font:bold 11px/21px Tahoma, Verdana, Arial, sans-serif; } +.header .form-search button.button span span { background-position:100% 0; padding:0 6px 0 3px; } +.header .form-search .search-autocomplete { z-index:999; left:40px !important; top:22px !important; } +.header .form-search .search-autocomplete ul { border:1px solid #5c7989; background-color:#f9f5f0; } +.header .form-search .search-autocomplete li { text-align:left; border-bottom:1px solid #f4eee7; padding:2px 8px 1px 8px; cursor:pointer; } +.header .form-search .search-autocomplete li .amount { float:right; font-weight:bold; } +.header .form-search .search-autocomplete li.odd { background-color:#fffefb; } +.header .form-search .search-autocomplete li.selected { background-color:#f7e8dd; } +.header .form-language { clear:both; padding:5px 0 0; text-align:right; } +.header .form-language label { font-weight:bold; padding-right:5px; color:#a7c6dd; vertical-align:middle; } +.header .form-language select { padding:0; } +.header .form-language select.flags option { background-position:4px 50%; background-repeat:no-repeat; padding-left:25px; } +.header .links { float:right; margin:0 0 6px; } +.header .links li { float:left; font-size:11px; background:url(../images/bkg_pipe1.gif) 100% 60% no-repeat; padding:0 8px 0 7px; } +.header .links a { color:#ebbc58; } +.header-container .top-container { clear:both; padding:5px 10px 0 12px; text-align:right; } + +/********** < Navigation */ +.nav-container { background:#0a263d url(../images/bkg_nav0.jpg) 50% 0 repeat-y; } +#nav { width:918px; margin:0 auto; padding:0 16px; font-size:13px; } + +/* ALL Levels */ /* Style consistent throughout all nav levels */ +#nav li { position:relative; text-align:left; } +#nav li.over { z-index:999; } +#nav a, +#nav a:hover { display:block; line-height:1.3em; text-decoration:none; } +#nav span { display:block; cursor:pointer; white-space:nowrap; } +#nav li ul span {white-space:normal; } + +/* 0 Level */ +#nav li { float:left; } +#nav li.active a { color:#d96708; } +#nav a { float:left; padding:5px 12px 6px 8px; color:#a7c6dd; font-weight:bold; } +#nav li.over a, +#nav a:hover { color:#d96708; } + +/* 1st Level */ +#nav ul li, +#nav ul li.active { float:none; margin:0; padding-bottom:1px; background:#ecf3f6 url(../images/bkg_nav1.gif) 0 100% repeat-x; } +/*#nav ul li.over { background:#d5e4eb url(../images/bkg_nav1.gif) repeat-x 0 100%; }*/ +#nav ul li.last { background:#ecf3f6; padding-bottom:0; } + +#nav ul a, +#nav ul a:hover { float:none; padding:0; background:none; } +#nav ul li a { font-weight:normal !important; } + +/* 2nd Level */ +#nav ul { position:absolute; width:15em; top:27px; left:-10000px; border:1px solid #899ba5; } + +/* Show menu */ +#nav li.over > ul { left:0; } +#nav li.over > ul li.over > ul { left:100px; } +#nav li.over ul ul { left:-10000px; } + +#nav ul li a { background:#ecf3f6; } +#nav ul li a:hover { background:#d5e4eb; } +#nav ul li a, +#nav ul li a:hover { color:#2f2f2f !important; } +#nav ul span, #nav ul li.last li span { padding:3px 15px 4px 15px; } + +/* 3rd+ Level */ +#nav ul ul { top:5px; } +/********** Navigation > */ +/* ======================================================================================= */ + + +/* Sidebar =============================================================================== */ +.block { border:1px solid #c4c1bc; margin:0 0 15px; } +.block .block-title { background:url(../images/bkg_block-title.gif) 0 0 repeat-x; border-bottom:1px solid #ddd; padding:2px 9px; } +.block .block-title strong { display:block; font:bold 12px/16px Arial, Helvetica, sans-serif; min-height:16px; padding:1px 0 1px; text-transform:uppercase; color:#e26703; } +.block .block-title strong span {} +.block .block-title a { text-decoration:none !important; } +.block .block-subtitle { margin:0; padding:5px 9px; font-size:1em; font-weight:bold; color:#0a263c; } +.block .block-content { background:#f8f7f5; } +.block .block-content li.item { padding:7px 9px; } +.block .btn-remove { float:right; margin:1px 0 2px 5px; } +.block .actions { background:#dee5e8 url(../images/bkg_block-actions.gif) 0 0 repeat-x; padding:6px 9px; text-align:right; } +.block .actions a { float:left; } +.block .actions button.button { float:right; } +.block .empty { margin:0; padding:5px 9px; } + +.block li.odd { background-color:#f4f3f3; } +.block li.even { background-color:#fafafa; } + +/* Mini Blocks */ +.block-cart, +.block-wishlist, +.block-subscribe, +.block-compare, +.block-reorder, +.block-poll, +.block-viewed, +.block-compared, +.block-related, +.block-tags, +.block-login { font-size:11px; line-height:1.25; } +.block-cart .block-title strong, +.block-wishlist .block-title strong, +.block-subscribe .block-title strong, +.block-compare .block-title strong, +.block-reorder .block-title strong, +.block-poll .block-title strong, +.block-viewed .block-title strong, +.block-compared .block-title strong, +.block-related .block-title strong, +.block-tags .block-title strong, +.block-login .block-title strong { background-position:0 0; background-repeat:no-repeat; padding-left:21px; } + +/* Mini Products List */ +.mini-products-list .product-image { float:left; width:50px; border:1px solid #a9a9a9; } +.mini-products-list .product-details { margin-left:60px; } + +/* Block: Account */ +.block-account { border-color:#bbb; } +.block-account .block-title { background:#fc9d36 url(../images/bkg_block-title-account.gif) 0 100% repeat-x; border:0; padding:3px 10px; } +.block-account .block-title strong { font-size:13px; color:#fff; } +.block-account .block-content { background:#fbfaf6; padding:7px 10px 7px; } +.block-account .block-content li a { display:block; border-bottom:1px solid #ddd; padding:3px 0; color:#5f5d5c; text-decoration:none !important; } +.block-account .block-content li a:hover { color:#ea7900; } +.block-account .block-content li.last a { border-bottom:0; } +.block-account .block-content li.current { border-bottom:1px solid #ddd; padding:3px 0; color:#ea7900; } +.block-account .block-content li.current.last { border-bottom:0; } + +/* Block: Currency Switcher */ +.block-currency { border:0; background:url(../images/bkg_block-currency.gif) 0 0 no-repeat; padding:7px 12px 10px; height:51px; } +.block-currency .block-title { background:none; border:0; padding:0; margin:0 0 5px; } +.block-currency .block-title strong { font:bold 13px/21px Arial, Helvetica, sans-serif; background:url(../images/i_block-currency.gif) 0 50% no-repeat; padding:0 0 0 21px; text-transform:none; color:#fff; } +.block-currency .block-content { background:none; padding:0; } +.block-currency .block-content select { width:100%; padding:0; } + +/* Block: Layered Navigation */ +.block-layered-nav { border:0; } +.block-layered-nav .block-title { border:0; padding:0; height:24px; background:url(../images/bkg_block-layered-title.gif) 0 0 no-repeat; text-indent:-999em; overflow:hidden; } +.block-layered-nav .block-subtitle { line-height:1.35; background:#d5e8ff url(../images/bkg_block-layered1.gif) 0 50% repeat; padding:3px 9px; border:1px solid #b9ccdd; border-width:1px 0; text-transform:uppercase; color:#1f5070; } +.block-layered-nav .block-content { border:1px solid #a0b3c3; background:#e7f1f4; } +.block-layered-nav dt { background:url(../images/bkg_block-layered-dt.gif) 9px 11px no-repeat; padding:7px 10px 0 28px; font-weight:bold; text-transform:uppercase; } +.block-layered-nav dd { padding:0 12px 12px; background:url(../images/bkg_block-layered-dd.gif) 0 100% repeat-x; } +.block-layered-nav dd.last { background:none; } +.block-layered-nav .currently li { background:#f00 url(../images/bkg_block-layered-li.gif) 0 100% repeat-x; padding:4px 6px 4px 10px; } +.block-layered-nav .currently .label { font-weight:bold; padding-left:18px; background:url(../images/bkg_block-layered-label.gif) 0 3px no-repeat; text-transform:uppercase; } +.block-layered-nav .currently .btn-remove { margin:3px 0 0; } +.block-layered-nav .actions { font-size:11px; padding:4px 9px; background:#cad6e4; border:1px solid #dee5e8; border-width:1px 0; text-align:right; } +.block-layered-nav .actions a { float:none; } + +/* Block: Cart */ +.block-cart .block-title { /*border-bottom:0;*/ } +.block-cart .block-title strong { background-image:url(../images/i_block-cart.gif); } +.block-cart .summary { background:#fff; padding:2px 8px 8px; margin:-1px 0 0; position:relative; z-index:1; } +.block-cart .amount { margin:0; } +.block-cart .amount a { font-weight:bold; } +.block-cart .subtotal { margin:5px 0 0; padding:2px 0; background:#fbebd9; text-align:center; } +.block-cart .subtotal .price { font-weight:bold; } +.block-cart .actions { border-bottom:1px solid #c2c2c2; } + +/* Block: Wishlist */ +.block-wishlist .block-title strong { background-image:url(../images/i_block-wishlist.gif); } +.block-wishlist .actions { text-align:right; } +.block-wishlist .actions a { float:none; } + +/* Block: Related */ +.block-related .block-title strong { background-image:url(../images/i_block-related.gif); background-position:0 1px; } +.block-related input.checkbox { float:left; } +.block-related .product { margin-left:20px; } + +/* Block: Compare Products */ +.block-compare .block-title strong { background-image:url(../images/i_block-list.gif); background-position:0 1px; } +.block-compare button.button span { border-color:#406a83; background:#618499; } +.page-popup .link-print { background:url(../images/i_print.gif) 0 2px no-repeat; padding:2px 0 2px 25px; font-weight:bold; color:#1e7ec8; } +.compare-table { border:0; } +.compare-table thead tr.first th, +.compare-table thead tr.first td { border:0; background:none; padding:0; font-size:0; line-height:0; } +.compare-table .btn-remove { float:right; background-image:url(../images/btn_remove2.gif); width:72px; height:15px; } +.compare-table tbody th { background:#d9e5ee url(../images/bkg_th-v.gif) 100% 0 repeat-y; } +.compare-table tbody th, +.compare-table tbody td { padding:10px; border:0; border-top:1px solid #ccc; border-left:1px solid #ccc; } +.compare-table tbody td.last { border-right:1px solid #ccc; } +.compare-table tbody tr.last th, +.compare-table tbody tr.last td { border-bottom:1px solid #ccc !important; } +.compare-table tr.add-to-row td { background:#fffada; text-align:center; } +.compare-table tr.first td { text-align:center; } +.compare-table tr.first td .product-name { font-size:13px; font-weight:bold; margin:0 0 5px; color:#203548; } +.compare-table tr.first td .product-name a { color:#203548; } +.compare-table tr.first td .ratings { width:69px; margin:0 auto; } +.compare-table tr.first td p, +.compare-table tr.add-to-row td p { margin:0; } + +/* Block: Recently Viewed */ +.block-viewed .block-title strong { background-image:url(../images/i_block-viewed.gif); } + +/* Block: Recently Compared */ +.block-compared .block-title strong { background-image:url(../images/i_block-list.gif); background-position:0 1px; } + +/* Block: Poll */ +.block-poll .block-title strong { background-image:url(../images/i_block-poll.gif); } +.block-poll .block-subtitle { font-size:12px; } +.block-poll label { color:#777; font-weight:bold; } +.block-poll input.radio { float:left; margin:1px -18px 0 0; } +.block-poll .label { display:block; margin-left:18px; } +.block-poll li { padding:3px 9px; } +.block-poll .actions { margin:5px 0 0; } +.block-poll button.button span { border-color:#406a83; background:#618499; } +.block-poll .answer { font-weight:bold; } +.block-poll .votes { float:right; margin-left:10px; } + +/* Block: Tags */ +.block-tags .block-title strong { background-image:url(../images/i_block-tags.gif); } +.block-tags .block-content ul { font-size:12px; padding:10px; } +.block-tags .block-content li { display:inline; padding-right:4px; } +.block-tags .block-content a { color:#1b2d3b; } +.block-tags .actions { text-align:right; } +.block-tags .actions a { float:none; } + +/* Block: Subscribe */ +.block-subscribe .block-content { padding:5px 10px; } +.block-subscribe .block-title strong { background-image:url(../images/i_block-subscribe.gif); } +.block-subscribe label { font-weight:bold; color:#667; } +.block-subscribe input.input-text { display:block; width:167px; margin:3px 0; } +.block-subscribe .actions { background:none; padding:0; margin:3px 0 0; text-align:left; } +.block-subscribe .actions button.button { float:none; } +.block-subscribe .actions button.button span { border-color:#406a83; background:#618499; } + +/* Block: Reorder */ +.block-reorder .block-title strong { background-image:url(../images/i_block-list.gif); } +.block-reorder input.checkbox { float:left; margin:2px -20px 0 0; } +.block-reorder .product-name { margin-left:20px; } +.block-reorder .validation-advice { margin:3px 9px 7px; } + +/* Block: Banner */ +.block-banner { border:0; } +.block-banner .block-content { padding:0; text-align:center; } + +/* Block: Login */ +.block-login .block-title strong { background-image:url(../images/i_ma-info.gif); } +.block-login .block-content { padding:5px 10px; } +.block-login label { font-weight:bold; color:#667; } +.block-login input.input-text { display:block; width:167px; margin:3px 0; } +.block-login .actions { background:none; padding:0; margin:3px 0 0; } +.block-login .actions button.button span { border-color:#406a83; background:#618499; } +/* ======================================================================================= */ + + +/* Category Page ========================================================================= */ +.category-title { border:0; margin:0 0 7px; } +.category-image { margin:0 0 10px; text-align:center; } +.category-image img {} +.category-description { margin:0 0 10px; } +.category-products {} + +/* View Type: Grid */ +.products-grid { border-bottom:1px solid #d9ddd3; background:url(../images/bkg_grid.gif) 0 0 repeat; position:relative; } +.products-grid.last { border-bottom:0; } +.products-grid li.item { float:left; width:138px; padding:12px 10px 80px; } +.products-grid .product-image { display:block; width:135px; height:135px; margin:0 0 10px; } +.products-grid .product-name { /*min-height:2.7em;*/ margin:0 0 5px; font-weight:bold; font-size:13px; color:#203548; } +.products-grid .product-name a { color:#203548; } +.products-grid .price-box { margin:5px 0; } +.products-grid .availability { line-height:21px; } +.products-grid .actions { position:absolute; bottom:12px; } +.col2-left-layout .products-grid, +.col2-right-layout .products-grid { width:632px; margin:0 auto; } +.col1-layout .products-grid { width:790px; margin:0 auto; } + +/* View Type: List */ +.products-list li.item { border-bottom:1px solid #d9ddd3; padding:12px 10px; } +.products-list li.item.last { border-bottom:0; } +.products-list .product-image { float:left; width:135px; } +.products-list .product-shop { margin-left:150px; } +.products-list .product-image { display:block; width:135px; height:135px; margin:0 0 10px; } +.products-list .product-name { margin:0 0 5px; font-weight:bold; font-size:13px; color:#203548; } +.products-list .product-name a { color:#203548; } +.products-list .price-box { float:left; margin:3px 13px 5px 0; } +.products-list .availability { float:left; margin:3px 0 0; } +.products-list .desc { clear:both; padding:6px 0 0; margin:0 0 15px; line-height:1.35; } +.products-list .desc .link-more { font-size:11px; } +.products-list .add-to-links { clear:both; } +.products-list .add-to-links li { display:inline; } +.products-list .add-to-links .separator { display:inline; margin:0 2px; } +/* ======================================================================================= */ + + +/* Product View ========================================================================== */ +/* Rating */ +.no-rating { margin:0; } + +.ratings { font-size:11px; line-height:1.25; margin:7px 0; } +.ratings strong { float:left; margin:1px 3px 0 0; } +.ratings .rating-links { margin:0; } +.ratings .rating-links .separator { margin:0 2px; } +.ratings dt {} +.ratings dd {} +.rating-box { width:69px; height:13px; font-size:0; line-height:0; background:url(../images/bkg_rating.gif) 0 0 repeat-x; text-indent:-999em; overflow:hidden; } +.rating-box .rating { float:left; height:13px; background:url(../images/bkg_rating.gif) 0 100% repeat-x; } +.ratings .rating-box { float:left; margin-right:3px; } +.ratings .amount {} + +.ratings-table th, +.ratings-table td { font-size:11px; line-height:1.15; padding:3px 0; } +.ratings-table th { font-weight:bold; padding-right:8px; } + +/* Availability */ +.availability { margin:0; } +.availability span { font-weight:bold; } +.availability.in-stock span {} +.availability.out-of-stock span { color:#d83820; } +.product-view .product-shop .availability { font-size:11px; } +.product-view .product-shop .availability span { font-weight:normal; } + +/* Email to a Friend */ +.email-friend { margin:0; } + +/* Alerts */ +.alert-price { margin:0; font-size:11px; } +.alert-stock { margin:0; font-size:11px; } + +/********** < Product Prices */ +.price { white-space:nowrap !important; } + +.price-box { margin:5px 0; } +.price-box .price { font-weight:bold; color:#c76200; } + +/* Regular price */ +.regular-price { color:#c76200; } +.regular-price .price { font-weight:bold; font-size:13px; color:#c76200; } +.block .regular-price, +.block .regular-price .price { color:#2f2f2f; } + +/* Old price */ +.old-price { margin:0; } +.old-price .price-label { white-space:nowrap; color:#999; } +.old-price .price { font-weight:bold; color:#c76200; text-decoration:line-through; } + +/* Special price */ +.special-price { margin:0; padding:3px 0; } +.special-price .price-label { font-size:13px; font-weight:bold; white-space:nowrap; color:#cd5033; } +.special-price .price { font-size:13px; font-weight:bold; color:#c76200; } + +/* Minimal price (as low as) */ +.minimal-price { margin:0; } +.minimal-price .price-label { font-weight:bold; white-space:nowrap; } + +.minimal-price-link { display:block; } +.minimal-price-link .label {color:#1e7ec8;} +.minimal-price-link .price { font-weight:normal; color:#1e7ec8; } + +/* Excluding tax */ +.price-excluding-tax { display:block; color:#999; } +.price-excluding-tax .label { white-space:nowrap; color:#999; } +.price-excluding-tax .price { font-size:13px; font-weight:normal; color:#c76200; } + +/* Including tax */ +.price-including-tax { display:block; color:#999; } +.price-including-tax .label { white-space:nowrap; color:#999; } +.price-including-tax .price { font-size:13px; font-weight:bold; color:#c76200; } + +.weee { display:block; font-size:11px; color:#444; } +.weee .price { font-size:11px; font-weight:normal; } + +/* Excl tax (for order tables) */ +.price-excl-tax { display:block; } +.price-excl-tax .label { display:block; white-space:nowrap; } +.price-excl-tax .price { display:block; } + +/* Incl tax (for order tables) */ +.price-incl-tax { display:block; } +.price-incl-tax .label { display:block; white-space:nowrap; } +.price-incl-tax .price { display:block; font-weight:bold; } + +/* Price range */ +.price-from { margin:0; } +.price-from .price-label { font-weight:bold; white-space:nowrap; } + +.price-to { margin:0; } +.price-to .price-label { font-weight:bold; white-space:nowrap; } + +/* Price notice next to the options */ +.price-notice { padding-left:10px; color:#999; } +.price-notice .price { font-weight:bold; color:#2f2f2f; } + +.price-as-configured { margin:0; } +.price-as-configured .price-label { font-weight:bold; white-space:nowrap; } + +.price-box-bundle { padding:0 0 10px 0; } +.price-box-bundle .price-box { margin:0 !important; padding:0 !important; } +.price-box-bundle .price { color:#555; } + +.tier-prices-grouped li { padding:2px 0; color:#e26703; } +.tier-prices-grouped li .price { font-weight:bold; } +/********** Product Prices > */ + +/* Tier Prices */ +.tier-prices { margin:10px 0; padding:10px; background-color:#f4f7f7; border:1px solid #dadddd; } +.tier-prices li { line-height:1.4; background:url(../images/i_tier.gif) no-repeat 0 3px; padding:2px 0 2px 10px; color:#424242; } +.tier-prices .benefit { font-style:italic; font-weight:bold; color:#2f2f2f; } +.tier-prices .price { font-weight:bold; color:#2f2f2f; } + +/* Add to Links */ +.add-to-links { font-size:11px; margin:5px 0 0; } +.add-to-links .separator { display:none; } + +/* Add to Cart */ +.add-to-cart label { float:left; margin-right:5px; font-weight:bold; color:#667; } +.add-to-cart .qty { float:left; margin-right:5px; } +.add-to-cart button.button { float:left; } + +/* Add to Links + Add to Cart */ +.add-to-box { margin:10px 0; } +.add-to-box .add-to-cart { float:left; } +.add-to-box .or { float:left; font-weight:bold; margin:0 7px; color:#667; } +.add-to-box .add-to-links { float:left; margin:0; font-size:12px !important; line-height:1.25 !important; text-align:left !important; } +.add-to-box .add-to-links li { display:block !important; } +.add-to-box .add-to-links li .separator { display:none !important; } + +.product-view { border:1px solid #c4c6c8; } + +.product-essential { padding:25px; background:#fff url(../images/bkg_product-view.gif) 100% 0 no-repeat; } +.product-essential h2 { font:bold 13px/1.35 Arial, Helvetica, sans-serif; } + +.product-collateral { background:#faf7ee url(../images/bkg_product_collateral.gif) 0 0 repeat-x; padding:25px; } +.product-collateral h2 { font-weight:bold; font-size:15px; color:#e26703; border-bottom:1px solid #e5dcc3; padding:0 0 1px; margin:0 0 15px; } +.product-collateral .box-collateral { margin:0 0 25px; } + +/* Product Images */ +.product-view .product-img-box { float:left; width:267px; } +.product-view .product-img-box .product-image { margin:0 0 13px; } +.product-view .product-img-box .product-image-zoom { position:relative; width:265px; height:265px; overflow:hidden; z-index:9; } +.product-view .product-img-box .product-image-zoom img { position:absolute; left:0; top:0; cursor:move; } +.product-view .product-img-box .zoom-notice { font-size:11px; text-align:center; } +.product-view .product-img-box .zoom { position:relative; z-index:9; height:18px; margin:0 auto 13px; padding:0 28px; background:url(../images/slider_bg.gif) 50% 50% no-repeat; cursor:pointer; } +.product-view .product-img-box .zoom.disabled { -moz-opacity:.3; -webkit-opacity:.3; -ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=30)";/*IE8*/ opacity:.3; } +.product-view .product-img-box .zoom #track { position:relative; height:18px; } +.product-view .product-img-box .zoom #handle { position:absolute; left:0; top:-1px; width:9px; height:22px; background:url(../images/magnifier_handle.gif) 0 0 no-repeat; } +.product-view .product-img-box .zoom .btn-zoom-out { position:absolute; left:2px; top:0; } +.product-view .product-img-box .zoom .btn-zoom-in { position:absolute; right:2px; top:0; } +.product-view .product-img-box .more-views h2 { font-size:11px; border-bottom:1px solid #ccc; margin:0 0 8px; text-transform:uppercase; } +.product-view .product-img-box .more-views ul { margin-left:-9px } +.product-view .product-img-box .more-views li { float:left; margin:0 0 8px 9px; } +.product-view .product-img-box .more-views li a { float:left; width:56px; height:56px; border:2px solid #ddd; overflow:hidden; } + +.product-image-popup { margin:0 auto; } +.product-image-popup .nav { font-weight:bold; text-align:center; } +.product-image-popup .image { display:block; margin:10px 0; } +.product-image-popup .image-label { font-size:13px; font-weight:bold; margin:0 0 10px; color:#2f2f2f; } + +/* Product Shop */ +.product-view .product-shop { float:right; width:330px; } +.product-view .product-shop .product-name { margin:0 0 5px; } +.product-view .product-shop .product-name h1 { margin:0; font:bold 15px/1.35 Arial, Helvetica, sans-serif; } +.product-view .product-shop .availability { margin:10px 0; } +.product-view .product-shop .short-description { margin:10px 0; background:url(../images/bkg_divider1.gif) 0 0 repeat-x; padding:10px 0 0; } +.product-view .product-shop .price-box { margin:10px 0; } +.product-view .product-shop .add-to-links { margin:0; } +.product-view .product-shop .add-to-links { font-size:12px; text-align:right; } +.product-view .product-shop .add-to-links li, +.product-view .product-shop .add-to-links li .separator { display:inline; } +.product-view .product-shop .add-to-links a { color:#1E7EC8 !important; font-weight:normal !important; } + +/* Product Options */ +.product-options { margin:20px 0 0; padding:10px 15px 20px; background-color:#f6f6f6; border:1px solid #e4e4e4; } +.product-options dt { padding:10px 0 0; font-weight:normal; } +.product-options dt label { font-weight:bold; color:#2f2f2f; } +.product-options dt span.required { color:#eb340a; } +.product-options dt .qty-holder { float:right; margin-right:15px; } +.product-options dt .qty-holder label { vertical-align:middle; } +.product-options dt .qty-disabled { background:none; border:0; padding:3px; color:#2f2f2f; } +.product-options dd { padding:5px 10px 15px; margin:0 0 5px; border-bottom:1px solid #e4e4e4; } +.product-options dl.last dd.last { border-bottom:0; padding-bottom:5px; margin-bottom:0; } +.product-options dd input.input-text { width:98%; } +.product-options dd textarea { width:98%; height:8em; } +.product-options dd select { width:99%; } +.product-options dd .multiselect option { border-bottom:1px dotted #d9e5ee; padding:2px 4px; } +.product-options ul.options-list { margin-right:5px; } +.product-options ul.options-list li { line-height:1.5; padding:2px 0; } +.product-options ul.options-list input.radio { float:left; margin-top:3px; } +.product-options ul.options-list input.checkbox { float:left; margin-top:3px; } +.product-options ul.options-list .label { display:block; margin-left:18px; } +.product-options ul.options-list label { font-weight:normal; } +.product-options ul.validation-failed { padding:0 7px; } +.product-options p.note { margin:0; font-size:11px; } +.product-options p.required { margin-bottom:0; padding:15px 0 0; } + +.product-options-bottom { background-color:#fffada; padding:15px 20px; border:1px solid #e4e4e4; border-top:0; } +.product-options-bottom .tier-prices { margin:0; padding:0 0 10px; border:0; background:0; } +.product-options-bottom .tier-prices li { background:0; padding:2px 0; color:#e26703; } +.product-options-bottom .tier-prices .price, +.product-options-bottom .tier-prices .benefit { color:#e26703; } +.product-options-bottom .price-box { float:left; margin:0; padding:0; } +.product-options-bottom .price-label { float:left; padding-right:5px; } +.product-options-bottom .price-tax { float:left; } +.product-options-bottom .add-to-cart { float:right; } +.product-shop .product-options-bottom .price-box { float:none; margin:0 0 5px; } +.product-shop .product-options-bottom .price-label { float:none; padding-right:0; } +.product-shop .product-options-bottom .price-tax { float:none; } +.product-shop .product-options-bottom .add-to-cart-box { clear:both; float:left; padding-top:12px; } + +/* Grouped Product */ +.product-view .grouped-items-table .price-box { margin:0; padding:0; } + +/* Block: Description */ +.product-view .box-description {} + +/* Block: Additional */ +.product-view .box-additional .data-table th, +.product-view .box-additional .data-table td { line-height:1.25; } + +/* block: upsell */ +.product-view .box-up-sell h2 { border-bottom:0; padding:0; margin:0 0 8px; } +.product-view .box-up-sell .products-grid { width:100%; border:1px solid #e5dcc3; } +.product-view .box-up-sell .products-grid td { width:25%; background:#f6f2e7; border-right:1px solid #e5dcc3; border-bottom:1px solid #e5dcc3; padding:15px 10px 12px; line-height:1.6em; } +.product-view .box-up-sell .products-grid tr.last td { border-bottom:0; } +.product-view .box-up-sell .products-grid td.last { border-right:0; } +.product-view .box-up-sell .products-grid td img { border:1px solid #e5dcc3; } +.product-view .box-up-sell .products-grid .product-image { text-align:center; } +.product-view .box-up-sell .products-grid td.empty { border-right:0; background:#f1ecdb; } +.product-view .box-up-sell .products-grid .ratings .rating-box { float:none; display:block; margin:0 0 3px; } + +/* Block: Tags */ +.product-view .box-tags { margin:0; } +.product-view .box-tags h3 { font-size:13px; } +.product-view .box-tags .product-tags { display:block; margin:0 0 15px; } +.product-view .box-tags .product-tags li { display:inline; background:url(../images/bkg_pipe3.gif) 100% 4px no-repeat; padding:0 7px 0 4px; } +.product-view .box-tags .product-tags li.first { padding-left:0; } +.product-view .box-tags .product-tags li.last { background:none; padding-right:0; } +.product-view .box-tags .form-add label { display:block; font-size:13px; font-weight:bold; margin:0 0 5px; color:#0a263c;} +.product-view .box-tags .form-add .input-box { float:left; width:305px; margin:0 5px 0 0; background:url(../images/i_tag_add.gif) 0 2px no-repeat; padding:0 0 0 23px; } +.product-view .box-tags .form-add input.input-text { width:299px; } +.product-view .box-tags .form-add button.button span { border-color:#406a83; background:#618499; } +.product-view .box-tags .note { margin:3px 0 0; padding:0 0 0 23px; font-size:11px; } + +/* Block: Reviews */ +.product-view .box-reviews dl { margin:15px 0; } +.product-view .box-reviews dt a, +.product-view .box-reviews dt span { font-weight:bold; } +.product-view .box-reviews dd { margin:0 0 15px; } +.product-view .box-reviews dd small { font-style:italic; } +.product-view .box-reviews .form-add { margin:15px 0 0; } +.product-view .box-reviews .form-add h3 { font-size:13px; font-weight:normal; } +.product-view .box-reviews .form-add h3 span { font-weight:bold; } +.product-view .box-reviews .form-add h4 { font-size:12px; } +.product-view .box-reviews .form-add .data-table td { text-align:center; } +.product-view .box-reviews .form-add .form-list { margin:15px 0 0; } +.product-view .box-reviews .form-add .form-list .input-box { width:360px; } +.product-view .box-reviews .form-add .form-list input.input-text, +.product-view .box-reviews .form-add .form-list textarea { width:354px; } + +/* Send a Friend */ +.send-friend .form-list { width:615px; overflow:hidden; } +.send-friend .form-list li { margin-right:-15px; } +.send-friend .form-list li p { margin:0 15px 0 0; } +.send-friend .form-list .field { width:315px; } +.send-friend .form-list .input-box { width:300px; } +.send-friend .form-list input.input-text, +.send-friend .form-list textarea { width:294px; } +.send-friend .form-list li.wide .input-box { width:612px; } +.send-friend .form-list li.wide textarea { width:609px; } +.send-friend .buttons-set .limit { float:right; margin:0 7px 0 0; font-size:11px; line-height:21px; } +/* ======================================================================================= */ + + +/* Content Styles ================================================================= */ +.product-name { margin:0; font-size:1em; font-weight:normal; } +.product-name a { color:#1e7ec8; } + +/* Product Tags */ +.tags-list { display:block; font-size:13px; border:1px solid #c1c4bc; background:#f8f7f5; padding:10px; } +.tags-list li { display:inline !important; margin:0 4px 0 0; } +.tags-list li a { color:#1b2d3b; } + +/* Advanced Search */ +.advanced-search .form-list label { width:160px; padding-right:10px; } +.advanced-search .form-list .input-box, +.advanced-search .form-list .input-range { float:left; clear:none; } +.advanced-search-amount { margin:0 0 10px; } +.advanced-search-summary { margin:10px 0; border:1px solid #e9d7c9; background:#fff6f1; padding:10px; } +.advanced-search-summary ul { float:left; width:49%; } +.advanced-search-summary strong { color:#E17C24; padding-left:15px; background:url(../images/i_search_criteria.gif) 0 3px no-repeat; } +.advanced-search-summary p { clear:both; font-weight:bold; margin:0; } + +/* CMS Home Page */ +.cms-home .subtitle, +.cms-index-index .subtitle {} + +/* Sitemap */ +.page-sitemap .links { text-align:right; margin:0 8px -22px 0; position:relative; } +.page-sitemap .links a { text-decoration:none; } +.page-sitemap .links a:hover { text-decoration:underline; } +.page-sitemap .sitemap { margin:12px; } +.page-sitemap .sitemap a { color:#1b2d3b; } +.page-sitemap .sitemap li { margin:3px 0; } +.page-sitemap .sitemap li.level-0 { margin:10px 0 0; font-weight:bold; } +.page-sitemap .sitemap li.level-0 a { color:#1e7ec8; } + +/* RSS */ +.rss-title h1 { background:url(../images/i_rss-big.png) 0 4px no-repeat; padding-left:27px; } +.rss-table .link-rss { display:block; line-height:1.55; background-position:0 4px; } +/* ======================================================================================= */ + + +/* Shopping Cart ========================================================================= */ +.cart .page-title { border-bottom:0; margin:0 0 12px; } +.cart .page-title h1 { margin:10px 0 0; } + +/* Checkout Types */ +.cart .page-title .checkout-types li { margin:0 0 5px; } +.cart button.btn-checkout.disabled span { background-position:0 100%; color:#b8baba; } +.cart button.btn-checkout.disabled span span { background-position:100% 100%; } + +/* Shopping Cart Table */ +.cart-table th { padding:2px 10px; } +.cart-table td { padding:10px; } +.cart-table .product-name { font-weight:bold; margin:0 0 5px; color:#2f2f2f; } +.cart-table .item-msg { margin:5px 0; font-size:11px; font-weight:bold; color:#df280a; } +.cart-table tfoot td { padding:5px 10px; } +.cart-table .btn-continue { float:left; } +.cart-table .btn-continue span, +.cart-table .btn-update span { border-color:#406a83; background:#618499; } + +/* Shopping Cart Collateral boxes */ +.cart .cart-collaterals { padding:25px 0 0; } +.cart .cart-collaterals .col2-set { float:left; width:605px; } +.cart .cart-collaterals .col2-set .col-2 { width:294px; } + +.cart .crosssell { border:1px solid #cec3b6; background:#fafaec; padding:12px 15px; } +.cart .crosssell h2 { font-size:13px; font-weight:bold; } +.cart .crosssell .product-image { float:left; width:75px; height:75px; border:1px solid #d0cdc9; } +.cart .crosssell .product-details { margin-left:90px; } +.cart .crosssell .product-name { font-weight:bold; } +.cart .crosssell li.item { margin:12px 0; } +.cart .crosssell .link-compare { font-weight:normal; } + +/* Discount Codes & Estimate Shipping and Tax Boxes */ +.cart .discount, +.cart .shipping { border:1px solid #d0cbc1; background:#fff url(../images/bkg_block-title.gif) 0 0 repeat-x; padding:12px 15px; margin:0 0 18px; } +.cart .discount h2, +.cart .shipping h2 { background-position:0 0; background-repeat:no-repeat; font:bold 13px/16px Arial, Helvetica, sans-serif; padding:0 0 0 21px; color:#e26703; text-transform:uppercase; } +.cart .discount button span, +.cart .shipping button span { border-color:#406a83; background:#618499; } +.cart .discount .buttons-set, +.cart .shipping .buttons-set { margin:10px 0 0; border:0; padding:0; text-align:left; } +.cart .discount .buttons-set button.button, +.cart .shipping .buttons-set button.button { float:none; } + +.cart .discount h2 { background-image:url(../images/i_discount.gif); } +.cart .discount .input-box { margin:8px 0 0; width:260px; } +.cart .discount input.input-text { width:254px; } + +.cart .shipping h2 { background-image:url(../images/i_shipping.gif); } +.cart .shipping .sp-methods { margin:10px 0 0; padding:5px 0 0; background:url(../images/bkg_divider1.gif) 0 0 repeat-x; } + +/* Shopping Cart Totals */ +.cart .totals { float:right; width:268px; background:#dee5e8; border:1px solid #bebcb7; } +.cart .totals table { width:100%; margin:7px 0; } +.cart .totals td { padding:1px 15px 1px 7px; } +.cart .totals tr.last td {} +.cart .totals tfoot td { padding-top:5px; padding-bottom:5px; } +.cart .totals tfoot td strong { font-size:15px; } +.cart .totals .checkout-types { font-size:13px; padding:8px 15px 15px; text-align:right; } +.cart .totals .checkout-types li { clear:both; margin:10px 0; } + +/* Options Tool Tip */ +.item-options dt { font-weight:bold; font-style:italic; } +.item-options dd { padding-left:10px; margin:0 0 6px; } +.truncated { cursor:help; } +.truncated a.dots { cursor:help; } +.truncated a.details { cursor:help; } +.truncated .truncated_full_value { position:relative; z-index:999; } +.truncated .truncated_full_value dl { position:absolute; top:-99999em; left:-99999em; z-index:999; width:250px; padding:8px; border:1px solid #ddd; background-color:#f6f6f6; } +.truncated .show dl { top:-20px; left:50%; } +.col-left .truncated .show dl { left:15px; top:7px; } +.col-right .truncated .show dl { left:-240px; top:7px; } +/* ======================================================================================= */ + + +/* Checkout ============================================================================== */ +/********** < Common Checkout Styles */ +/* Shipping and Payment methods */ +.sp-methods { margin:0 0 8px; } +.sp-methods dt { margin:5px 0; font-weight:bold; } +.sp-methods dd { margin:0 0 13px; } +.sp-methods dd li { margin:5px 0; } +.sp-methods label { font-weight:bold; color:#667; } +.sp-methods .price { font-weight:bold; } +.sp-methods .form-list { padding-left:20px; } +.sp-methods .form-list li { margin:0 0 8px; } +.sp-methods select.month { width:154px; margin-right:10px; } +.sp-methods select.year { width:96px; } +.sp-methods input.cvv { width:3em !important; } + +.please-wait { float:right; } +.please-wait img { vertical-align:middle; } +.cvv-what-is-this { font-size:11px; cursor:help; margin-left:10px; } + +/* Tooltip */ +.tool-tip { border:1px solid #7BA7C9; background:#EAF6FF; padding:15px 20px; position:absolute; z-index:9999; } +.tool-tip .btn-close { margin:-9px -14px 0; text-align:right; } +.tool-tip .tool-tip-content { padding:5px; } + +/* Gift Messages */ +.gift-messages h3 { font-size:12px; font-weight:bold; color:#e87403; } +.gift-messages p.control { color:#8e8d8b; } +.gift-messages-form { position:relative; } +.gift-messages-form label { float:none !important; position:static !important; } +.gift-messages-form h4 { font-size:12px; font-weight:bold; color:#e87403; } +.gift-messages-form .whole-order { margin:0 0 25px; } +.gift-messages-form .item { margin:0 0 10px; } +.gift-messages-form .item .product-img-box { float:left; width:75px; } +.gift-messages-form .item .product-image { margin:0 0 7px; } +.gift-messages-form .item .number { margin:0; font-weight:bold; text-align:center; color:#8a8987; } +.gift-messages-form .item .details { margin-left:90px; } +.gift-messages-form .item .details .product-name { font-size:13px; font-weight:bold; margin:0 0 10px; } +.gift-messages-form .item .details .form-list .field { width:255px; } +.gift-messages-form .item .details .form-list .input-box { width:240px; } +.gift-messages-form .item .details .form-list input.input-text { width:234px; } +.gift-messages-form .item .details .form-list li.wide .input-box { width:500px; } +.gift-messages-form .item .details .form-list li.wide textarea { width:494px; } + +.gift-message-link { font-size:11px; background:url(../images/bkg_collapse-gm.gif) 100% 6px no-repeat; padding-right:7px; } +.gift-message-link.expanded { background-position:100% -40px; } +.gift-message-row { background:#f2efe9; } +.gift-message-row .btn-close { float:right; width:16px; height:16px; background:url(../images/btn_gm-close.gif) 0 0 no-repeat; font-size:0; line-height:0; text-indent:-999em; overflow:hidden; } + +/* Checkout Agreements */ +.checkout-agreements li { margin:30px 0; } +.checkout-agreements .agreement-content { overflow:auto; height:12em; padding:10px; background-color:#fbfaf6; border:1px solid #bbb6a5; } +.checkout-agreements .agree { margin:0; padding:10px 0 10px 11px; } +.checkout-agreements .agree input.checkbox { margin-right:6px; } +.checkout-agreements .agree label { font-weight:bold; color:#667; } + +.opc .checkout-agreements { border:1px solid #d9dde3; border-width:0 1px; padding:5px 30px; } +.opc .checkout-agreements li { margin:20px 0 0; } +.opc .checkout-agreements .agreement-content { background-color:#fff; border-color:#e4e4e4; padding:5px; } +.opc .checkout-agreements .agree { padding-left:6px; } +/********** Common Checkout Styles > */ + +/* One Page Checkout */ +.block-progress { border:0; margin:0; } +.block-progress .block-title { background:none; border:0; padding:0; margin:0 0 5px; } +.block-progress .block-title strong { font-size:13px; color:#0a263c; } +.block-progress .block-content { background:none; } +.block-progress dt { font-size:13px; font-weight:bold; line-height:1.35; background:#eee; border:1px solid #a3aeb3; margin:0 0 6px; padding:2px 8px; color:#999; } +.block-progress dd { background:#eee; border:1px solid #a3aeb3; border-top:0; padding:8px 13px; margin:0 0 6px; } +.block-progress dt.complete { margin:0; background:#d0dce1; color:#5e8ab4; } +.block-progress dd.complete {} +.block-progress p { margin:0; } + +.opc .buttons-set { margin-top:0; padding-top:2em; } +.opc .buttons-set .back-link small { display:none; } +.opc .buttons-set .back-link a { background:url(../images/i_arrow-top.gif) 0 50% no-repeat; padding-left:16px; } +.opc .buttons-set.disabled button.button { display:none; } +.opc .buttons-set .please-wait { height:21px; line-height:21px; } +.opc .ul { list-style:disc outside; padding-left:18px; } + +.opc { position:relative; } +.opc li.section {} + +.opc .step-title { border-width:0 1px; border-style:solid; border-color:#fff #d9dde3 #d9dde3; background:#eee url(../images/bkg_opc-title-off.gif) 0 100% repeat-x; padding:4px 8px 6px; text-align:right; } +.opc .step-title .number { float:left; background:#fff; border:1px solid #fff; padding:0 4px; margin:0 5px 0 0; font:bold 11px/14px arial, helvetica, sans-serif; color:#999; } +.opc .step-title h2 { float:left; margin:0; font:bold 13px/16px arial, helvetica, sans-serif; color:#999; } +.opc .step-title a { display:none; float:right; font-size:11px; line-height:16px; } + +.opc .allow .step-title { background:#d0dce1; border:1px solid #a3aeb3; border-bottom:0; color:#a4b3b9; cursor:pointer; } +.opc .allow .step-title .number { background:#dbe6eb; border-color:#dbe6eb; color:#a4b3b9; } +.opc .allow .step-title h2 { color:#a4b3b9; } +/*.opc .allow .step-title a { display:block; }*/ + +.opc .active .step-title { background:#f9f3e3; border:1px solid #bbafa0; padding-bottom:5px; color:#f18200; cursor:default; } +.opc .active .step-title .number { background:#f18200; border-color:#f19900; color:#fff; } +.opc .active .step-title h2 { color:#f18200; } +/*.opc .active .step-title a { display:none; }*/ + +.opc .step { border:1px solid #bbafa0; border-top:0; background:#fbfaf6 url(../images/bkg_checkout.gif) 0 0 repeat-x; padding:15px 30px; position:relative; } +.opc .step .tool-tip { right:30px; } + +#opc-login .buttons-set { border-top:0; } +#opc-login h3 { font-size:13px; border-bottom:1px solid #e4e4e4; padding-bottom:2px; text-transform:uppercase; } +#opc-login h4 { font-size:1em; font-weight:bold; margin:0; color:#2f2f2f; } + +#opc-shipping_method .buttons-set { border-top:0; } +.opc .gift-messages-form { margin:0 -30px; background:#f6f1eb; border:1px solid #e9e4de; border-width:1px 0; padding:22px 24px 22px 30px; } +.opc .gift-messages-form .inner-box { padding:5px; height:260px; overflow:auto; } + +#opc-review .step { border:0; padding:0; } +#opc-review .product-name { font-weight:bold; color:#0a263c; } +#opc-review .item-options { margin:5px 0 0; } +#opc-review .buttons-set { padding:20px 30px; border:1px solid #d9dde3; border-width:0 1px 1px; } +#opc-review .buttons-set p { margin:0; line-height:40px; } +#opc-review .buttons-set .please-wait { height:40px; line-height:40px; } + +/* Multiple Addresses Checkout */ +.checkout-progress { padding:0 90px; margin:0 0 20px; } +.checkout-progress li { float:left; width:19%; margin:0 3px 0 0; border-top:10px solid #999; padding:2px 0 0; font-weight:bold; text-align:center; color:#abb5ba; } +.checkout-progress li.active { border-top-color:#e96200; color:#e96200; } + +.multiple-checkout h2 { font-size:13px; font-weight:bold; margin:0 0 10px; } +.multiple-checkout h3, +.multiple-checkout h4 { font-size:13px; font-weight:bold; color:#E26703; } +.multiple-checkout h2 a, +.multiple-checkout h3 a, +.multiple-checkout h4 a { font-weight:normal; } +.multiple-checkout .data-table .product-name { font-size:1em !important; font-weight:bold !important; } +.multiple-checkout .data-table .product-name a { font-weight:bold !important; } +.multiple-checkout .data-table .item-options { margin:5px 0 0; } + +.multiple-checkout .gift-messages { margin:15px 0 0; } + +.multiple-checkout .tool-tip { top:50%; margin-top:-120px; right:20px; } + +.multiple-checkout .col2-set, +.multiple-checkout .col3-set { background:#fbfaf6 url(../images/bkg_checkout.gif) 0 0 repeat-x; border:1px solid #bbb6a5; margin:0 0 25px; padding:20px; } +.multiple-checkout .col2-set h2.legend { margin:-20px -20px 15px; padding:5px 10px; background:#f9f3e3; border-bottom:1px solid #bbafa0; position:relative; } +.multiple-checkout .col2-set h3.legend { margin:0 0 10px; color:#0a263c; } +.multiple-checkout .col2-set .divider { margin:0 -20px; padding:25px 0; position:relative; } +.multiple-checkout .box { margin:0 0 15px; } +.multiple-checkout .box h2 { color:#e26703; } + +.multiple-checkout .place-order .please-wait { float:right; padding:27px 7px 0 0; } +.multiple-checkout .place-order .grand-total { float:right; height:71px; font-size:1.5em; padding:0 0 0 21px; background:url(../images/bkg_grand-total.gif) 0 0 no-repeat; overflow:hidden; } +.multiple-checkout .place-order .grand-total .inner { float:left; height:57px; padding:14px 21px 0 0; background:url(../images/bkg_grand-total.gif) 100% 0 no-repeat; } +.multiple-checkout .place-order .grand-total .inner div { display:inline; } +.multiple-checkout .place-order .grand-total big { display:inline; margin-right:12px; } +.multiple-checkout .place-order .grand-total .price { color:#E26703; } +.multiple-checkout .place-order .grand-total button.button span { font-size:16px; } +.multiple-checkout .place-order .grand-total button.button span span { padding:0 45px 0 36px; } + +/* Step 1 */ +.multiple-checkout .title-buttons button.button span { border-color:#406a83; background:#618499; } +#multiship-addresses-table td { padding:10px; } +#multiship-addresses-table tfoot td { padding:5px 10px; } +#multiship-addresses-table tfoot button.button span { border-color:#406a83; background:#618499; } + +/* Step 2 */ +.multiple-checkout .gift-messages-form .item .details .form-list { width:100%; overflow:hidden; } +.multiple-checkout .gift-messages-form .item .details .form-list li { margin-right:-15px; } +.multiple-checkout .gift-messages-form .item .details .form-list .field { width:230px; } +.multiple-checkout .gift-messages-form .item .details .form-list .input-box { width:215px; } +.multiple-checkout .gift-messages-form .item .details .form-list input.input-text { width:209px; } +.multiple-checkout .gift-messages-form .item .details .form-list li.wide .input-box { width:445px; } +.multiple-checkout .gift-messages-form .item .details .form-list li.wide textarea { width:439px; } +.checkout-multishipping-shipping .box-sp-methods { border:1px solid #d9d2be; background:#f9f3e3; padding:13px; position:relative; } +.checkout-multishipping-shipping .box-sp-methods .pointer { position:absolute; top:-20px; right:-40px; width:178px; height:41px; background:url(../images/bkg_sp-methods.gif) 0 0 no-repeat; overflow:hidden; } + +/* Step 3 */ +.checkout-multishipping-billing .multiple-checkout { position:relative; } +/* ======================================================================================= */ + + +/* Account Login/Create Pages ============================================================ */ +.account-login .content { min-height:240px; padding:14px 21px; background:#faf7ee url(../images/bkg_login-box.gif) 0 0 repeat-x; border:1px solid #bbb6a5; border-bottom:0; } +.account-login .content h2 { font-weight:bold; font-size:13px; margin:0 0 14px; padding:0 0 5px 23px; border-bottom:1px solid #ddd; background-position:0 1px; background-repeat:no-repeat; text-transform:uppercase; color:#e76200; } +.account-login .new-users h2 { background-image:url(../images/i_page1.gif)} +.account-login .registered-users h2 { background-image:url(../images/i_page2.gif); } +.account-login .buttons-set { border:1px solid #bbb6a5; border-top:0; margin:0; padding:8px 13px; background:#dee5e8 url(../images/bkg_buttons-set1.gif) 0 0 repeat-x; } + +.account-create {} +/* Account Login/Create Pages ============================================================ */ + + +/* My Account ============================================================================= */ +.my-account .title-buttons .link-rss { float:none; margin:0; } + +/********** < Dashboard */ +.dashboard .welcome-msg { margin:0 8em 1.5em 0; } +.dashboard .welcome-msg p { margin:0; } +.dashboard .col2-set { margin:0 0 15px; } + +/* General Box */ +.box-account { background:#fff url(../images/bkg_account_box.gif) 0 0 repeat-x; border:1px solid #ccc; border-color:#ccc #999 #999 #ccc; padding:15px; margin: 0 0 20px; } +.box-account .box-head { border-bottom:1px solid #d9dde3; margin:0 0 10px; text-align:right; } +.box-account .box-head h2 { float:left; margin:0; font-size:13px; font-weight:bold; text-transform:uppercase; background-position:0 0; background-repeat:no-repeat; padding-left:21px; color:#e65505; } + +.dashboard .box .box-title { background:url(../images/bkg_divider1.gif) 0 100% repeat-x; padding:0 0 2px; margin:0 0 8px; text-align:right; } +.dashboard .box .box-title h3, +.dashboard .box .box-title h4 { float:left; font-size:13px; font-weight:bold; margin:0; } + +/* Block: Recent Orders */ +.dashboard .box-recent .box-head h2 { background-image:url(../images/i_folder-table.gif); } + +/* Block: Account Information */ +.dashboard .box-info .box-head h2 { background-image:url(../images/i_ma-info.gif); } +.dashboard .box-info h4 { font-size:11px; font-weight:bold; text-transform:uppercase; } + +/* Block: Reviews */ +.dashboard .box-reviews .box-head h2 { background-image:url(../images/i_ma-reviews.gif); } +.dashboard .box-reviews .number { float:left; font-size:10px; font-weight:bold; line-height:1; color:#fff; margin:3px -20px 0 0; padding:2px 3px; background:#0a263c; } +.dashboard .box-reviews .details { margin-left:20px; } +.dashboard .box-reviews li.item { margin:0 0 7px; } +.dashboard .box-reviews li.item.last { margin:0; } +.dashboard .box-reviews .ratings { margin:7px 0 0; } + +/* Block: Tags */ +.dashboard .box-tags .box-head h2 { background-image:url(../images/i_ma-tags.gif); } +.dashboard .box-tags .number { float:left; font-size:10px; font-weight:bold; line-height:1; color:#fff; margin:3px -20px 0 0; padding:2px 3px; background:#0a263c; } +.dashboard .box-tags .details { margin-left:20px; } +.dashboard .box-tags li.item { margin:0 0 7px; } +.dashboard .box-tags li.item.last { margin:0; } +.dashboard .box-tags .tags strong, +.dashboard .box-tags .tags ul, +.dashboard .box-tags .tags ul li { display:inline; } +/********** Dashboard > */ + +/* Address Book */ +.addresses-list h2 { font-weight:bold; font-size:13px; color:#e26703; text-transform:uppercase; } +.addresses-list h3 { font-weight:bold; font-size:13px; } +.addresses-list address { margin:0 0 3px; } +.addresses-list p { margin:0; } +.addresses-list a { font-weight:bold; } +.addresses-list .link-remove { color:#646464; } +.addresses-list .separator { margin:0 3px; } +.addresses-list li.item { background:#fff url(../images/bkg_account_box.gif) 0 0 repeat-x; border:1px solid #ccc; padding:10px 13px; margin:0 0 10px; } +.addresses-list li.empty { background:none; border:0; padding:0; } +.addresses-list li.empty p { font-weight:bold; } +.addresses-list-additional li.item { background:none; border:0; padding:0; } + +/* Order View */ +.order-info { background:#dee5e8; border:1px solid #d0cbc1; padding:4px 8px; margin:0 0 8px; } +.order-info dt, +.order-info dd, +.order-info ul, +.order-info li { display:inline; } +.order-info .current { font-weight:bold; } +.order-info li { margin:0 3px; } + +.order-date { margin:10px 0; } + +.order-info-box { background:#fff url(../images/bkg_block-title.gif) 0 0 repeat-x; border:1px solid #d0cbc1; padding:12px 15px; margin:0 0 15px; } +.order-info-box h2 { font-weight:bold; font-size:13px; } + +.order-items h2, +.order-items h3 { font-weight:bold; font-size:13px; } +.order-items .product-name { font-size:1em !important; font-weight:bold !important; } +.order-items .link-print { float:right; color:#1e7ec8; font-weight:normal; } +.order-items p .link-print { float:none; } + +.order-gift-message { margin:15px 0; } +.gift-message dt strong { color:#667; } +.gift-message dd { margin:5px 0 0; font-size:13px; } + +.order-about { margin:15px 0; } +.order-about dt { font-weight:bold; } +.order-about dd { font-size:13px; margin:0 0 7px; } + +.tracking-table { margin:0 0 15px; } +.tracking-table th { font-weight:bold; white-space:nowrap; } +.tracking-table th, +.tracking-table td { padding:1px 5px 0 0; } + +.tracking-table-popup { width:100%; } +.tracking-table-popup th { font-weight:bold; white-space:nowrap; } +.tracking-table-popup th, +.tracking-table-popup td { padding:1px 8px; } + +/* Order Print Pages */ +.page-print .print-head { margin:0 0 15px; } +.page-print .print-head .logo { float:left; } +.page-print .print-head address { float:left; margin-left:15px; } +.page-print h1 { font-size:16px; font-weight:bold; } +.page-print h2, +.page-print h3 { font-size:13px; font-weight:bold; } +.page-print h2.h2 { font-size:16px; font-weight:bold; } +.page-print .order-date { background:url(../images/bkg_divider1.gif) 0 100% repeat-x; padding:0 0 10px; margin:0 0 10px; } +.page-print .col2-set { margin:0 0 10px; } +/* Price Rewrites */ +.page-print .gift-message-link { display:none; } +.page-print .price-excl-tax, +.page-print .price-incl-tax { display:block; white-space:nowrap; } +.page-print .cart-price, +.page-print .price-excl-tax .label, +.page-print .price-incl-tax .label, +.page-print .price-excl-tax .price, +.page-print .price-incl-tax .price { display:inline; } + +/* My Wishlist */ +.my-wishlist .data-table td { padding:10px; } +.my-wishlist .product-image { display:block; width:113px; height:113px; margin:0 0 5px; } +.my-wishlist textarea { display:block; width:97%; height:109px; } +.my-wishlist .buttons-set { margin-top:2em; } +.my-wishlist .buttons-set button.button { float:none; } +.my-wishlist .buttons-set .btn-add span, +.my-wishlist .buttons-set .btn-share span { border-color:#406a83; background:#618499; } +#wishlist-table .add-to-links { white-space:nowrap; } + +/* My Tags */ +.my-tag-edit { float:left; margin:0 0 10px; } +.my-tag-edit .btn-remove { float:right; margin:5px 0 0 5px; } +#my-tags-table { clear:both; } +#my-tags-table td { padding:10px; } +#my-tags-table .add-to-links { white-space:nowrap; } + +/* My Reviews */ +#my-reviews-table td { padding:10px; } + +.product-review .product-img-box { float:left; width:140px; } +.product-review .product-img-box .product-image { display:block; width:125px; height:125px; } +.product-review .product-img-box .label { font-size:11px; margin:0 0 3px; } +.product-review .product-img-box .ratings .rating-box { float:none; display:block; margin:0 0 3px; } +.product-review .product-details { margin-left:150px; } +.product-review .product-name { font-size:16px; font-weight:bold; margin:0 0 10px; } +.product-review h3 { font-size:12px; margin:0 0 3px; color:#2f2f2f; } +.product-review .ratings-table { margin:0 0 10px; } +.product-review dt { font-weight:bold; } +.product-review dd { font-size:13px; margin:5px 0 0; } +/* ======================================================================================= */ + + +/* Footer ================================================================================ */ +.footer-container { border-top:15px solid #b6d1e2; } +.footer { width:930px; margin:0 auto; padding:10px 10px 50px; } +.footer .store-switcher { display:inline; margin:0 5px 0 0; color:#fff; } +.footer .store-switcher label { font-weight:bold; vertical-align:middle; } +.footer .store-switcher select { padding:0; vertical-align:middle; } +.footer a { color:#fff; text-decoration:none; } +.footer a:hover { text-decoration:underline; } +.footer .bugs { margin:13px 0 0; color:#ecf3f6; } +.footer .bugs a { color:#ecf3f6; text-decoration:underline; } +.footer .bugs a:hover { text-decoration:none; } +.footer address { margin:0 0 20px; color:#ecf3f6; } +.footer address a { color:#ecf3f6; text-decoration:underline; } +.footer address a:hover { text-decoration:none; } +.footer ul { display:inline; } +.footer ul.links { display:block; } +.footer li { display:inline; background:url(../images/bkg_pipe2.gif) 100% 60% no-repeat; padding:0 7px 0 4px; } +.footer li.last { background:none !important; padding-right:0 !important; } +.footer-container .bottom-container { margin:0 0 5px; } +/* ======================================================================================= */ + +/* Sample Data============================================================================ */ +.home-callout { margin-bottom:12px; } +.home-callout img { display:block } +/*.home-spot { float:left; width:470px; margin-left:20px; }*/ +.best-selling h3 { margin:12px 0 6px 0; color:#e25203; font-size:1.2em; } +.best-selling table { border-top:1px solid #ccc; } +.best-selling tr.odd { background:#eee url(../images/best_selling_tr_odd_bg.gif) 0 100% repeat-x; } +.best-selling tr.even { background:#fff url(../images/best_selling_tr_even_bg.gif) 0 100% repeat-x; } +.best-selling td { width:50%; border-bottom:1px solid #ccc; padding:8px 10px 8px 8px; font-size:11px; } +.best-selling .product-img { float:left; border:2px solid #dcdcdc; } +.best-selling .product-description { margin-left:107px; line-height:1.3em; } +.best-selling a.product-name, +.home-spot .best-selling a.product-name:hover { color:#203548; } +/* ======================================================================================= */ + + +/* Clears ================================================================================ */ +.clearer:after, +.header-container:after, +.header-container .top-container:after, +.header:after, +.header .quick-access:after, +#nav:after, +.main:after, +.footer:after, +.footer-container .bottom-container:after, +.col-main:after, +.col2-set:after, +.col3-set:after, +.col4-set:after, +.search-autocomplete li:after, +.block .block-content:after, +.block .actions:after, +.block li.item:after, +.block-poll li:after, +.block-layered-nav .currently li:after, +.page-title:after, +.products-grid:after, +.products-list li.item:after, +.box-account .box-head:after, +.dashboard .box .box-title:after, +.box-reviews li.item:after, +.box-tags li.item:after, +.pager:after, +.sorter:after, +.ratings:after, +.add-to-box:after, +.add-to-cart:after, +.product-essential:after, +.product-collateral:after, +.product-view .product-img-box .more-views ul:after, +.product-view .box-tags .form-add:after, +.product-options .options-list li:after, +.product-options-bottom:after, +.product-review:after, +.cart:after, +.cart-collaterals:after, +.cart .crosssell li.item:after, +.opc .step-title:after, +.checkout-progress:after, +.multiple-checkout .place-order:after, +.group-select li:after, +.form-list li:after, +.form-list .field:after, +.buttons-set:after, +.page-print .print-head:after, +.advanced-search-summary:after, +.gift-messages-form .item:after, +.send-friend .form-list li p:after { display:block; content:"."; clear:both; font-size:0; line-height:0; height:0; overflow:hidden; } +/* ======================================================================================= */ diff --git a/skin/frontend/default/default/images/account_nav_link_bg.gif b/skin/frontend/default/default/images/account_nav_link_bg.gif deleted file mode 100644 index d62d300c02..0000000000 Binary files a/skin/frontend/default/default/images/account_nav_link_bg.gif and /dev/null differ diff --git a/skin/frontend/default/default/images/account_nav_on_bg.gif b/skin/frontend/default/default/images/account_nav_on_bg.gif deleted file mode 100644 index f1b10112bd..0000000000 Binary files a/skin/frontend/default/default/images/account_nav_on_bg.gif and /dev/null differ diff --git a/skin/frontend/default/default/images/att_group_label_bg.gif b/skin/frontend/default/default/images/att_group_label_bg.gif deleted file mode 100644 index 61d8e4a7f6..0000000000 Binary files a/skin/frontend/default/default/images/att_group_label_bg.gif and /dev/null differ diff --git a/skin/frontend/default/default/images/att_group_last_row_bg.gif b/skin/frontend/default/default/images/att_group_last_row_bg.gif deleted file mode 100644 index 60243345a5..0000000000 Binary files a/skin/frontend/default/default/images/att_group_last_row_bg.gif and /dev/null differ diff --git a/skin/frontend/default/default/images/att_group_last_row_lab_bg.gif b/skin/frontend/default/default/images/att_group_last_row_lab_bg.gif deleted file mode 100644 index 0eefdde02a..0000000000 Binary files a/skin/frontend/default/default/images/att_group_last_row_lab_bg.gif and /dev/null differ diff --git a/skin/frontend/default/default/images/att_group_last_row_odd_bg.gif b/skin/frontend/default/default/images/att_group_last_row_odd_bg.gif deleted file mode 100644 index a25ab5ac5a..0000000000 Binary files a/skin/frontend/default/default/images/att_group_last_row_odd_bg.gif and /dev/null differ diff --git a/skin/frontend/default/default/images/attribute_set_toggler_bg.gif b/skin/frontend/default/default/images/attribute_set_toggler_bg.gif deleted file mode 100644 index fbd1249368..0000000000 Binary files a/skin/frontend/default/default/images/attribute_set_toggler_bg.gif and /dev/null differ diff --git a/skin/frontend/default/default/images/base_mini_tabs_bg.gif b/skin/frontend/default/default/images/base_mini_tabs_bg.gif deleted file mode 100644 index 19e03c65fe..0000000000 Binary files a/skin/frontend/default/default/images/base_mini_tabs_bg.gif and /dev/null differ diff --git a/skin/frontend/default/default/images/basebox_head_bg.gif b/skin/frontend/default/default/images/basebox_head_bg.gif deleted file mode 100644 index b41987d8d4..0000000000 Binary files a/skin/frontend/default/default/images/basebox_head_bg.gif and /dev/null differ diff --git a/skin/frontend/default/default/images/bg_tierico.gif b/skin/frontend/default/default/images/bg_tierico.gif deleted file mode 100644 index 5e987b41cf..0000000000 Binary files a/skin/frontend/default/default/images/bg_tierico.gif and /dev/null differ diff --git a/skin/frontend/default/default/images/account_box_bg.gif b/skin/frontend/default/default/images/bkg_account_box.gif similarity index 100% rename from skin/frontend/default/default/images/account_box_bg.gif rename to skin/frontend/default/default/images/bkg_account_box.gif diff --git a/skin/frontend/default/default/images/bkg_block-actions.gif b/skin/frontend/default/default/images/bkg_block-actions.gif new file mode 100644 index 0000000000..8670b13b6e Binary files /dev/null and b/skin/frontend/default/default/images/bkg_block-actions.gif differ diff --git a/skin/frontend/default/default/images/currency_switcher_bg.gif b/skin/frontend/default/default/images/bkg_block-currency.gif similarity index 100% rename from skin/frontend/default/default/images/currency_switcher_bg.gif rename to skin/frontend/default/default/images/bkg_block-currency.gif diff --git a/skin/frontend/default/default/images/narrow_by_dd_bg.gif b/skin/frontend/default/default/images/bkg_block-layered-dd.gif similarity index 100% rename from skin/frontend/default/default/images/narrow_by_dd_bg.gif rename to skin/frontend/default/default/images/bkg_block-layered-dd.gif diff --git a/skin/frontend/default/default/images/narrow_by_set.gif b/skin/frontend/default/default/images/bkg_block-layered-dt.gif similarity index 100% rename from skin/frontend/default/default/images/narrow_by_set.gif rename to skin/frontend/default/default/images/bkg_block-layered-dt.gif diff --git a/skin/frontend/default/default/images/narrow_by_li_by.gif b/skin/frontend/default/default/images/bkg_block-layered-label.gif similarity index 100% rename from skin/frontend/default/default/images/narrow_by_li_by.gif rename to skin/frontend/default/default/images/bkg_block-layered-label.gif diff --git a/skin/frontend/default/default/images/narrow_category_bg.gif b/skin/frontend/default/default/images/bkg_block-layered-li.gif similarity index 100% rename from skin/frontend/default/default/images/narrow_category_bg.gif rename to skin/frontend/default/default/images/bkg_block-layered-li.gif diff --git a/skin/frontend/default/default/images/bkg_block-layered-title.gif b/skin/frontend/default/default/images/bkg_block-layered-title.gif new file mode 100644 index 0000000000..bf007e10bc Binary files /dev/null and b/skin/frontend/default/default/images/bkg_block-layered-title.gif differ diff --git a/skin/frontend/default/blue/images/mini_cart_actions_bg.gif b/skin/frontend/default/default/images/bkg_block-layered1.gif similarity index 100% rename from skin/frontend/default/blue/images/mini_cart_actions_bg.gif rename to skin/frontend/default/default/images/bkg_block-layered1.gif diff --git a/skin/frontend/default/default/images/account_nav_head_bg.gif b/skin/frontend/default/default/images/bkg_block-title-account.gif similarity index 100% rename from skin/frontend/default/default/images/account_nav_head_bg.gif rename to skin/frontend/default/default/images/bkg_block-title-account.gif diff --git a/skin/frontend/default/default/images/base_mini_head_bg.gif b/skin/frontend/default/default/images/bkg_block-title.gif similarity index 100% rename from skin/frontend/default/default/images/base_mini_head_bg.gif rename to skin/frontend/default/default/images/bkg_block-title.gif diff --git a/skin/frontend/default/blue/images/body_bg.gif b/skin/frontend/default/default/images/bkg_body.gif similarity index 100% rename from skin/frontend/default/blue/images/body_bg.gif rename to skin/frontend/default/default/images/bkg_body.gif diff --git a/skin/frontend/default/default/images/login_box_form_buttons_bg.gif b/skin/frontend/default/default/images/bkg_buttons-set1.gif similarity index 100% rename from skin/frontend/default/default/images/login_box_form_buttons_bg.gif rename to skin/frontend/default/default/images/bkg_buttons-set1.gif diff --git a/skin/frontend/default/default/images/multi_address_box_bg.gif b/skin/frontend/default/default/images/bkg_checkout.gif similarity index 100% rename from skin/frontend/default/default/images/multi_address_box_bg.gif rename to skin/frontend/default/default/images/bkg_checkout.gif diff --git a/skin/frontend/default/default/images/bkg_collapse-gm.gif b/skin/frontend/default/default/images/bkg_collapse-gm.gif new file mode 100644 index 0000000000..6e626e9543 Binary files /dev/null and b/skin/frontend/default/default/images/bkg_collapse-gm.gif differ diff --git a/skin/frontend/default/default/images/bg_collapse.gif b/skin/frontend/default/default/images/bkg_collapse.gif similarity index 100% rename from skin/frontend/default/default/images/bg_collapse.gif rename to skin/frontend/default/default/images/bkg_collapse.gif diff --git a/skin/frontend/default/default/images/dotted_divider.gif b/skin/frontend/default/default/images/bkg_divider1.gif similarity index 100% rename from skin/frontend/default/default/images/dotted_divider.gif rename to skin/frontend/default/default/images/bkg_divider1.gif diff --git a/skin/frontend/default/default/images/mini_search_bg.gif b/skin/frontend/default/default/images/bkg_form-search.gif similarity index 100% rename from skin/frontend/default/default/images/mini_search_bg.gif rename to skin/frontend/default/default/images/bkg_form-search.gif diff --git a/skin/frontend/default/default/images/bkg_grand-total.gif b/skin/frontend/default/default/images/bkg_grand-total.gif new file mode 100644 index 0000000000..9143c44c66 Binary files /dev/null and b/skin/frontend/default/default/images/bkg_grand-total.gif differ diff --git a/skin/frontend/default/default/images/bkg_grid.gif b/skin/frontend/default/default/images/bkg_grid.gif new file mode 100644 index 0000000000..decda510da Binary files /dev/null and b/skin/frontend/default/default/images/bkg_grid.gif differ diff --git a/skin/frontend/default/default/images/header_top_container_bg.jpg b/skin/frontend/default/default/images/bkg_header.jpg similarity index 100% rename from skin/frontend/default/default/images/header_top_container_bg.jpg rename to skin/frontend/default/default/images/bkg_header.jpg diff --git a/skin/frontend/default/default/images/login_box_bg.gif b/skin/frontend/default/default/images/bkg_login-box.gif similarity index 100% rename from skin/frontend/default/default/images/login_box_bg.gif rename to skin/frontend/default/default/images/bkg_login-box.gif diff --git a/skin/frontend/default/default/images/main_container_bg.gif b/skin/frontend/default/default/images/bkg_main1.gif similarity index 100% rename from skin/frontend/default/default/images/main_container_bg.gif rename to skin/frontend/default/default/images/bkg_main1.gif diff --git a/skin/frontend/default/default/images/bkg_main2.gif b/skin/frontend/default/default/images/bkg_main2.gif new file mode 100644 index 0000000000..5a358b5e10 Binary files /dev/null and b/skin/frontend/default/default/images/bkg_main2.gif differ diff --git a/skin/frontend/default/default/images/nav_bg.jpg b/skin/frontend/default/default/images/bkg_nav0.jpg similarity index 100% rename from skin/frontend/default/default/images/nav_bg.jpg rename to skin/frontend/default/default/images/bkg_nav0.jpg diff --git a/skin/frontend/default/default/images/nav_divider.gif b/skin/frontend/default/default/images/bkg_nav1.gif similarity index 100% rename from skin/frontend/default/default/images/nav_divider.gif rename to skin/frontend/default/default/images/bkg_nav1.gif diff --git a/skin/frontend/default/default/images/opc_off_head_bg.gif b/skin/frontend/default/default/images/bkg_opc-title-off.gif similarity index 100% rename from skin/frontend/default/default/images/opc_off_head_bg.gif rename to skin/frontend/default/default/images/bkg_opc-title-off.gif diff --git a/skin/frontend/default/default/images/shop_access_pipe.gif b/skin/frontend/default/default/images/bkg_pipe1.gif similarity index 100% rename from skin/frontend/default/default/images/shop_access_pipe.gif rename to skin/frontend/default/default/images/bkg_pipe1.gif diff --git a/skin/frontend/default/default/images/footer_info_separator.gif b/skin/frontend/default/default/images/bkg_pipe2.gif similarity index 100% rename from skin/frontend/default/default/images/footer_info_separator.gif rename to skin/frontend/default/default/images/bkg_pipe2.gif diff --git a/skin/frontend/default/default/images/separator.gif b/skin/frontend/default/default/images/bkg_pipe3.gif similarity index 100% rename from skin/frontend/default/default/images/separator.gif rename to skin/frontend/default/default/images/bkg_pipe3.gif diff --git a/skin/frontend/default/default/images/product_essential_bg.gif b/skin/frontend/default/default/images/bkg_product-view.gif similarity index 100% rename from skin/frontend/default/default/images/product_essential_bg.gif rename to skin/frontend/default/default/images/bkg_product-view.gif diff --git a/skin/frontend/default/default/images/product_collateral_bg.gif b/skin/frontend/default/default/images/bkg_product_collateral.gif similarity index 100% rename from skin/frontend/default/default/images/product_collateral_bg.gif rename to skin/frontend/default/default/images/bkg_product_collateral.gif diff --git a/skin/frontend/default/default/images/bkg_products-grid1.gif b/skin/frontend/default/default/images/bkg_products-grid1.gif deleted file mode 100644 index 2dac581156..0000000000 Binary files a/skin/frontend/default/default/images/bkg_products-grid1.gif and /dev/null differ diff --git a/skin/frontend/default/default/images/bkg_products-grid2.gif b/skin/frontend/default/default/images/bkg_products-grid2.gif deleted file mode 100644 index 1d55b7a001..0000000000 Binary files a/skin/frontend/default/default/images/bkg_products-grid2.gif and /dev/null differ diff --git a/skin/frontend/default/default/images/bkg_products-grid3.gif b/skin/frontend/default/default/images/bkg_products-grid3.gif deleted file mode 100644 index 5093303a47..0000000000 Binary files a/skin/frontend/default/default/images/bkg_products-grid3.gif and /dev/null differ diff --git a/skin/frontend/default/default/images/bkg_rating.gif b/skin/frontend/default/default/images/bkg_rating.gif new file mode 100644 index 0000000000..fcebdc71af Binary files /dev/null and b/skin/frontend/default/default/images/bkg_rating.gif differ diff --git a/skin/frontend/default/default/images/shipping_method_pointer.gif b/skin/frontend/default/default/images/bkg_sp-methods.gif similarity index 100% rename from skin/frontend/default/default/images/shipping_method_pointer.gif rename to skin/frontend/default/default/images/bkg_sp-methods.gif diff --git a/skin/frontend/default/default/images/bkg_tfoot.gif b/skin/frontend/default/default/images/bkg_tfoot.gif new file mode 100644 index 0000000000..8670b13b6e Binary files /dev/null and b/skin/frontend/default/default/images/bkg_tfoot.gif differ diff --git a/skin/frontend/default/default/images/comparison_table_label_bg.gif b/skin/frontend/default/default/images/bkg_th-v.gif similarity index 100% rename from skin/frontend/default/default/images/comparison_table_label_bg.gif rename to skin/frontend/default/default/images/bkg_th-v.gif diff --git a/skin/frontend/default/default/images/data_table_th_bg.gif b/skin/frontend/default/default/images/bkg_th.gif similarity index 100% rename from skin/frontend/default/default/images/data_table_th_bg.gif rename to skin/frontend/default/default/images/bkg_th.gif diff --git a/skin/frontend/default/default/images/bkg_toolbar.gif b/skin/frontend/default/default/images/bkg_toolbar.gif new file mode 100644 index 0000000000..79b2c83792 Binary files /dev/null and b/skin/frontend/default/default/images/bkg_toolbar.gif differ diff --git a/skin/frontend/default/default/images/body_bg.gif b/skin/frontend/default/default/images/body_bg.gif deleted file mode 100644 index c5c6902182..0000000000 Binary files a/skin/frontend/default/default/images/body_bg.gif and /dev/null differ diff --git a/skin/frontend/default/default/images/btn_checkout.gif b/skin/frontend/default/default/images/btn_checkout.gif new file mode 100644 index 0000000000..1b6485e2da Binary files /dev/null and b/skin/frontend/default/default/images/btn_checkout.gif differ diff --git a/skin/frontend/default/default/images/gift-message-close.gif b/skin/frontend/default/default/images/btn_gm-close.gif similarity index 100% rename from skin/frontend/default/default/images/gift-message-close.gif rename to skin/frontend/default/default/images/btn_gm-close.gif diff --git a/skin/frontend/default/default/images/btn_mini_search.gif b/skin/frontend/default/default/images/btn_mini_search.gif deleted file mode 100644 index be00a022f7..0000000000 Binary files a/skin/frontend/default/default/images/btn_mini_search.gif and /dev/null differ diff --git a/skin/frontend/default/default/images/btn_proceed_to_checkout.png b/skin/frontend/default/default/images/btn_proceed_to_checkout.png deleted file mode 100644 index 458740415b..0000000000 Binary files a/skin/frontend/default/default/images/btn_proceed_to_checkout.png and /dev/null differ diff --git a/skin/frontend/default/default/images/btn_proceed_to_checkout_bg.gif b/skin/frontend/default/default/images/btn_proceed_to_checkout_bg.gif deleted file mode 100644 index c4384678d6..0000000000 Binary files a/skin/frontend/default/default/images/btn_proceed_to_checkout_bg.gif and /dev/null differ diff --git a/skin/frontend/default/default/images/btn_proceed_to_checkout_rad.gif b/skin/frontend/default/default/images/btn_proceed_to_checkout_rad.gif deleted file mode 100644 index 1264a1489a..0000000000 Binary files a/skin/frontend/default/default/images/btn_proceed_to_checkout_rad.gif and /dev/null differ diff --git a/skin/frontend/default/default/images/list_remove_btn.gif b/skin/frontend/default/default/images/btn_remove.gif similarity index 100% rename from skin/frontend/default/default/images/list_remove_btn.gif rename to skin/frontend/default/default/images/btn_remove.gif diff --git a/skin/frontend/default/default/images/chart_remove.gif b/skin/frontend/default/default/images/btn_remove2.gif similarity index 100% rename from skin/frontend/default/default/images/chart_remove.gif rename to skin/frontend/default/default/images/btn_remove2.gif diff --git a/skin/frontend/default/default/images/btn_search.gif b/skin/frontend/default/default/images/btn_search.gif new file mode 100644 index 0000000000..d1e994cac0 Binary files /dev/null and b/skin/frontend/default/default/images/btn_search.gif differ diff --git a/skin/frontend/default/default/images/cart_out_of_stock_bg.gif b/skin/frontend/default/default/images/cart_out_of_stock_bg.gif deleted file mode 100644 index 369d4830ee..0000000000 Binary files a/skin/frontend/default/default/images/cart_out_of_stock_bg.gif and /dev/null differ diff --git a/skin/frontend/default/default/images/checkout_progress_active_bg.gif b/skin/frontend/default/default/images/checkout_progress_active_bg.gif deleted file mode 100644 index 5fa640592b..0000000000 Binary files a/skin/frontend/default/default/images/checkout_progress_active_bg.gif and /dev/null differ diff --git a/skin/frontend/default/default/images/checkout_progress_bg.gif b/skin/frontend/default/default/images/checkout_progress_bg.gif deleted file mode 100644 index 0b0927369a..0000000000 Binary files a/skin/frontend/default/default/images/checkout_progress_bg.gif and /dev/null differ diff --git a/skin/frontend/default/default/images/checkout_progress_corner.gif b/skin/frontend/default/default/images/checkout_progress_corner.gif deleted file mode 100644 index ce791acd67..0000000000 Binary files a/skin/frontend/default/default/images/checkout_progress_corner.gif and /dev/null differ diff --git a/skin/frontend/default/default/images/compare_products_bg.gif b/skin/frontend/default/default/images/compare_products_bg.gif deleted file mode 100644 index 3e55cf863b..0000000000 Binary files a/skin/frontend/default/default/images/compare_products_bg.gif and /dev/null differ diff --git a/skin/frontend/default/default/images/customer_reviews_pager_bg.gif b/skin/frontend/default/default/images/customer_reviews_pager_bg.gif deleted file mode 100644 index abc8977ad2..0000000000 Binary files a/skin/frontend/default/default/images/customer_reviews_pager_bg.gif and /dev/null differ diff --git a/skin/frontend/default/default/images/fam_world.png b/skin/frontend/default/default/images/fam_world.png deleted file mode 100644 index 68f21d3011..0000000000 Binary files a/skin/frontend/default/default/images/fam_world.png and /dev/null differ diff --git a/skin/frontend/default/default/images/footer_bg.gif b/skin/frontend/default/default/images/footer_bg.gif deleted file mode 100644 index 5c40b5aaa5..0000000000 Binary files a/skin/frontend/default/default/images/footer_bg.gif and /dev/null differ diff --git a/skin/frontend/default/default/images/footer_container_bg.gif b/skin/frontend/default/default/images/footer_container_bg.gif deleted file mode 100644 index d280dcad8a..0000000000 Binary files a/skin/frontend/default/default/images/footer_container_bg.gif and /dev/null differ diff --git a/skin/frontend/default/default/images/footer_informational_bg.gif b/skin/frontend/default/default/images/footer_informational_bg.gif deleted file mode 100644 index a4161dad92..0000000000 Binary files a/skin/frontend/default/default/images/footer_informational_bg.gif and /dev/null differ diff --git a/skin/frontend/default/default/images/footer_left.gif b/skin/frontend/default/default/images/footer_left.gif deleted file mode 100644 index 2019017a9e..0000000000 Binary files a/skin/frontend/default/default/images/footer_left.gif and /dev/null differ diff --git a/skin/frontend/default/default/images/footer_legality_bg.gif b/skin/frontend/default/default/images/footer_legality_bg.gif deleted file mode 100644 index 2c1cc68d0a..0000000000 Binary files a/skin/frontend/default/default/images/footer_legality_bg.gif and /dev/null differ diff --git a/skin/frontend/default/default/images/footer_right.gif b/skin/frontend/default/default/images/footer_right.gif deleted file mode 100644 index 665f8099f8..0000000000 Binary files a/skin/frontend/default/default/images/footer_right.gif and /dev/null differ diff --git a/skin/frontend/default/default/images/form_button.gif b/skin/frontend/default/default/images/form_button.gif deleted file mode 100644 index a00515b600..0000000000 Binary files a/skin/frontend/default/default/images/form_button.gif and /dev/null differ diff --git a/skin/frontend/default/default/images/form_button_alt.gif b/skin/frontend/default/default/images/form_button_alt.gif deleted file mode 100644 index 890f9a559d..0000000000 Binary files a/skin/frontend/default/default/images/form_button_alt.gif and /dev/null differ diff --git a/skin/frontend/default/default/images/gift-message-collapse.gif b/skin/frontend/default/default/images/gift-message-collapse.gif deleted file mode 100644 index 36a7cb5b1a..0000000000 Binary files a/skin/frontend/default/default/images/gift-message-collapse.gif and /dev/null differ diff --git a/skin/frontend/default/default/images/gift-message-expand.gif b/skin/frontend/default/default/images/gift-message-expand.gif deleted file mode 100644 index 0fc38ce784..0000000000 Binary files a/skin/frontend/default/default/images/gift-message-expand.gif and /dev/null differ diff --git a/skin/frontend/default/default/images/head_browse_by.gif b/skin/frontend/default/default/images/head_browse_by.gif deleted file mode 100644 index d8c875d4d6..0000000000 Binary files a/skin/frontend/default/default/images/head_browse_by.gif and /dev/null differ diff --git a/skin/frontend/default/default/images/head_my_account.gif b/skin/frontend/default/default/images/head_my_account.gif deleted file mode 100644 index 84ab4f865f..0000000000 Binary files a/skin/frontend/default/default/images/head_my_account.gif and /dev/null differ diff --git a/skin/frontend/default/default/images/header_bg.gif b/skin/frontend/default/default/images/header_bg.gif deleted file mode 100644 index 5ec714c9c9..0000000000 Binary files a/skin/frontend/default/default/images/header_bg.gif and /dev/null differ diff --git a/skin/frontend/default/default/images/header_nav_bg.gif b/skin/frontend/default/default/images/header_nav_bg.gif deleted file mode 100644 index 479af3cfce..0000000000 Binary files a/skin/frontend/default/default/images/header_nav_bg.gif and /dev/null differ diff --git a/skin/frontend/default/default/images/header_top_bg.jpg b/skin/frontend/default/default/images/header_top_bg.jpg deleted file mode 100644 index 6375f3ffdd..0000000000 Binary files a/skin/frontend/default/default/images/header_top_bg.jpg and /dev/null differ diff --git a/skin/frontend/default/default/images/icon_opc_back.gif b/skin/frontend/default/default/images/i_arrow-top.gif similarity index 100% rename from skin/frontend/default/default/images/icon_opc_back.gif rename to skin/frontend/default/default/images/i_arrow-top.gif diff --git a/skin/frontend/default/default/images/sort_asc_arrow.gif b/skin/frontend/default/default/images/i_asc_arrow.gif similarity index 100% rename from skin/frontend/default/default/images/sort_asc_arrow.gif rename to skin/frontend/default/default/images/i_asc_arrow.gif diff --git a/skin/frontend/default/default/images/icon_basket.gif b/skin/frontend/default/default/images/i_block-cart.gif similarity index 100% rename from skin/frontend/default/default/images/icon_basket.gif rename to skin/frontend/default/default/images/i_block-cart.gif diff --git a/skin/frontend/default/default/images/icon_world.gif b/skin/frontend/default/default/images/i_block-currency.gif similarity index 100% rename from skin/frontend/default/default/images/icon_world.gif rename to skin/frontend/default/default/images/i_block-currency.gif diff --git a/skin/frontend/default/default/images/i_block-list.gif b/skin/frontend/default/default/images/i_block-list.gif new file mode 100644 index 0000000000..df990aba02 Binary files /dev/null and b/skin/frontend/default/default/images/i_block-list.gif differ diff --git a/skin/frontend/default/default/images/icon_group.gif b/skin/frontend/default/default/images/i_block-poll.gif similarity index 100% rename from skin/frontend/default/default/images/icon_group.gif rename to skin/frontend/default/default/images/i_block-poll.gif diff --git a/skin/frontend/default/default/images/icon_clip.gif b/skin/frontend/default/default/images/i_block-related.gif similarity index 100% rename from skin/frontend/default/default/images/icon_clip.gif rename to skin/frontend/default/default/images/i_block-related.gif diff --git a/skin/frontend/default/default/images/icon_newspaper.gif b/skin/frontend/default/default/images/i_block-subscribe.gif similarity index 100% rename from skin/frontend/default/default/images/icon_newspaper.gif rename to skin/frontend/default/default/images/i_block-subscribe.gif diff --git a/skin/frontend/default/default/images/i_block-tags.gif b/skin/frontend/default/default/images/i_block-tags.gif new file mode 100644 index 0000000000..567598542c Binary files /dev/null and b/skin/frontend/default/default/images/i_block-tags.gif differ diff --git a/skin/frontend/default/default/images/i_block-viewed.gif b/skin/frontend/default/default/images/i_block-viewed.gif new file mode 100644 index 0000000000..567598542c Binary files /dev/null and b/skin/frontend/default/default/images/i_block-viewed.gif differ diff --git a/skin/frontend/default/default/images/icon_bell.gif b/skin/frontend/default/default/images/i_block-wishlist.gif similarity index 100% rename from skin/frontend/default/default/images/icon_bell.gif rename to skin/frontend/default/default/images/i_block-wishlist.gif diff --git a/skin/frontend/default/default/images/sort_desc_arrow.gif b/skin/frontend/default/default/images/i_desc_arrow.gif similarity index 100% rename from skin/frontend/default/default/images/sort_desc_arrow.gif rename to skin/frontend/default/default/images/i_desc_arrow.gif diff --git a/skin/frontend/default/default/images/icon_asterick.gif b/skin/frontend/default/default/images/i_discount.gif similarity index 100% rename from skin/frontend/default/default/images/icon_asterick.gif rename to skin/frontend/default/default/images/i_discount.gif diff --git a/skin/frontend/default/default/images/icon_folder_table.gif b/skin/frontend/default/default/images/i_folder-table.gif similarity index 100% rename from skin/frontend/default/default/images/icon_folder_table.gif rename to skin/frontend/default/default/images/i_folder-table.gif diff --git a/skin/frontend/default/default/images/icon_ma_info.gif b/skin/frontend/default/default/images/i_ma-info.gif similarity index 100% rename from skin/frontend/default/default/images/icon_ma_info.gif rename to skin/frontend/default/default/images/i_ma-info.gif diff --git a/skin/frontend/default/default/images/icon_ma_reviews.gif b/skin/frontend/default/default/images/i_ma-reviews.gif similarity index 100% rename from skin/frontend/default/default/images/icon_ma_reviews.gif rename to skin/frontend/default/default/images/i_ma-reviews.gif diff --git a/skin/frontend/default/default/images/icon_ma_tags.gif b/skin/frontend/default/default/images/i_ma-tags.gif similarity index 100% rename from skin/frontend/default/default/images/icon_ma_tags.gif rename to skin/frontend/default/default/images/i_ma-tags.gif diff --git a/skin/frontend/default/default/images/error_msg_icon.gif b/skin/frontend/default/default/images/i_msg-error.gif similarity index 100% rename from skin/frontend/default/default/images/error_msg_icon.gif rename to skin/frontend/default/default/images/i_msg-error.gif diff --git a/skin/frontend/default/default/images/note_msg_icon.gif b/skin/frontend/default/default/images/i_msg-note.gif similarity index 100% rename from skin/frontend/default/default/images/note_msg_icon.gif rename to skin/frontend/default/default/images/i_msg-note.gif diff --git a/skin/frontend/default/default/images/success_msg_icon.gif b/skin/frontend/default/default/images/i_msg-success.gif similarity index 100% rename from skin/frontend/default/default/images/success_msg_icon.gif rename to skin/frontend/default/default/images/i_msg-success.gif diff --git a/skin/frontend/default/default/images/icon_page_white.gif b/skin/frontend/default/default/images/i_page1.gif similarity index 100% rename from skin/frontend/default/default/images/icon_page_white.gif rename to skin/frontend/default/default/images/i_page1.gif diff --git a/skin/frontend/default/default/images/icon_page_white_text.gif b/skin/frontend/default/default/images/i_page2.gif similarity index 100% rename from skin/frontend/default/default/images/icon_page_white_text.gif rename to skin/frontend/default/default/images/i_page2.gif diff --git a/skin/frontend/default/default/images/pager_arrow_right.gif b/skin/frontend/default/default/images/i_pager-next.gif similarity index 100% rename from skin/frontend/default/default/images/pager_arrow_right.gif rename to skin/frontend/default/default/images/i_pager-next.gif diff --git a/skin/frontend/default/default/images/pager_arrow_left.gif b/skin/frontend/default/default/images/i_pager-prev.gif similarity index 100% rename from skin/frontend/default/default/images/pager_arrow_left.gif rename to skin/frontend/default/default/images/i_pager-prev.gif diff --git a/skin/frontend/default/default/images/i_print.gif b/skin/frontend/default/default/images/i_print.gif new file mode 100644 index 0000000000..3287517702 Binary files /dev/null and b/skin/frontend/default/default/images/i_print.gif differ diff --git a/skin/frontend/default/default/images/icon_big_rss.png b/skin/frontend/default/default/images/i_rss-big.png similarity index 100% rename from skin/frontend/default/default/images/icon_big_rss.png rename to skin/frontend/default/default/images/i_rss-big.png diff --git a/skin/frontend/default/default/images/icon_rss.gif b/skin/frontend/default/default/images/i_rss.gif similarity index 100% rename from skin/frontend/default/default/images/icon_rss.gif rename to skin/frontend/default/default/images/i_rss.gif diff --git a/skin/frontend/default/default/images/search_criteria.gif b/skin/frontend/default/default/images/i_search_criteria.gif similarity index 100% rename from skin/frontend/default/default/images/search_criteria.gif rename to skin/frontend/default/default/images/i_search_criteria.gif diff --git a/skin/frontend/default/default/images/icon_lorry.gif b/skin/frontend/default/default/images/i_shipping.gif similarity index 100% rename from skin/frontend/default/default/images/icon_lorry.gif rename to skin/frontend/default/default/images/i_shipping.gif diff --git a/skin/frontend/default/default/images/icon_tag_add.gif b/skin/frontend/default/default/images/i_tag_add.gif similarity index 100% rename from skin/frontend/default/default/images/icon_tag_add.gif rename to skin/frontend/default/default/images/i_tag_add.gif diff --git a/skin/frontend/default/default/images/bg_tierico1.gif b/skin/frontend/default/default/images/i_tier.gif similarity index 100% rename from skin/frontend/default/default/images/bg_tierico1.gif rename to skin/frontend/default/default/images/i_tier.gif diff --git a/skin/frontend/default/default/images/listing_type_grid.gif b/skin/frontend/default/default/images/i_type_grid.gif similarity index 100% rename from skin/frontend/default/default/images/listing_type_grid.gif rename to skin/frontend/default/default/images/i_type_grid.gif diff --git a/skin/frontend/default/default/images/listing_type_list.gif b/skin/frontend/default/default/images/i_type_list.gif similarity index 100% rename from skin/frontend/default/default/images/listing_type_list.gif rename to skin/frontend/default/default/images/i_type_list.gif diff --git a/skin/frontend/default/default/images/icon_add_to_compare.gif b/skin/frontend/default/default/images/icon_add_to_compare.gif deleted file mode 100644 index d90129f51c..0000000000 Binary files a/skin/frontend/default/default/images/icon_add_to_compare.gif and /dev/null differ diff --git a/skin/frontend/default/default/images/icon_cart_item_remove.gif b/skin/frontend/default/default/images/icon_cart_item_remove.gif deleted file mode 100644 index b94f8ab12f..0000000000 Binary files a/skin/frontend/default/default/images/icon_cart_item_remove.gif and /dev/null differ diff --git a/skin/frontend/default/default/images/icon_currency_switcher.gif b/skin/frontend/default/default/images/icon_currency_switcher.gif deleted file mode 100644 index 9841b29af4..0000000000 Binary files a/skin/frontend/default/default/images/icon_currency_switcher.gif and /dev/null differ diff --git a/skin/frontend/default/default/images/icon_daily_poll.gif b/skin/frontend/default/default/images/icon_daily_poll.gif deleted file mode 100644 index 25208fcfc1..0000000000 Binary files a/skin/frontend/default/default/images/icon_daily_poll.gif and /dev/null differ diff --git a/skin/frontend/default/default/images/icon_feed.png b/skin/frontend/default/default/images/icon_feed.png deleted file mode 100644 index c20804da93..0000000000 Binary files a/skin/frontend/default/default/images/icon_feed.png and /dev/null differ diff --git a/skin/frontend/default/default/images/icon_lock.gif b/skin/frontend/default/default/images/icon_lock.gif deleted file mode 100644 index 167bf75b8b..0000000000 Binary files a/skin/frontend/default/default/images/icon_lock.gif and /dev/null differ diff --git a/skin/frontend/default/default/images/icon_mini_cart_heading_bg.gif b/skin/frontend/default/default/images/icon_mini_cart_heading_bg.gif deleted file mode 100644 index e627bab654..0000000000 Binary files a/skin/frontend/default/default/images/icon_mini_cart_heading_bg.gif and /dev/null differ diff --git a/skin/frontend/default/default/images/icon_picture.gif b/skin/frontend/default/default/images/icon_picture.gif deleted file mode 100644 index 889fa84fb2..0000000000 Binary files a/skin/frontend/default/default/images/icon_picture.gif and /dev/null differ diff --git a/skin/frontend/default/default/images/icon_special_price.gif b/skin/frontend/default/default/images/icon_special_price.gif deleted file mode 100644 index 708d8704b6..0000000000 Binary files a/skin/frontend/default/default/images/icon_special_price.gif and /dev/null differ diff --git a/skin/frontend/default/default/images/layered_nav_head_bg.gif b/skin/frontend/default/default/images/layered_nav_head_bg.gif deleted file mode 100644 index 25c4583611..0000000000 Binary files a/skin/frontend/default/default/images/layered_nav_head_bg.gif and /dev/null differ diff --git a/skin/frontend/default/default/images/layered_nav_narrowed_category_heading.gif b/skin/frontend/default/default/images/layered_nav_narrowed_category_heading.gif deleted file mode 100644 index f13567889d..0000000000 Binary files a/skin/frontend/default/default/images/layered_nav_narrowed_category_heading.gif and /dev/null differ diff --git a/skin/frontend/default/default/images/layered_navigation_head.gif b/skin/frontend/default/default/images/layered_navigation_head.gif deleted file mode 100644 index 5821b60bf0..0000000000 Binary files a/skin/frontend/default/default/images/layered_navigation_head.gif and /dev/null differ diff --git a/skin/frontend/default/default/images/mini_cart_actions_bg.gif b/skin/frontend/default/default/images/mini_cart_actions_bg.gif deleted file mode 100644 index f13567889d..0000000000 Binary files a/skin/frontend/default/default/images/mini_cart_actions_bg.gif and /dev/null differ diff --git a/skin/frontend/default/default/images/mini_cart_head_bg.gif b/skin/frontend/default/default/images/mini_cart_head_bg.gif deleted file mode 100644 index 35152906e8..0000000000 Binary files a/skin/frontend/default/default/images/mini_cart_head_bg.gif and /dev/null differ diff --git a/skin/frontend/default/default/images/mini_product_tags_head_bg.gif b/skin/frontend/default/default/images/mini_product_tags_head_bg.gif deleted file mode 100644 index ae6b958e56..0000000000 Binary files a/skin/frontend/default/default/images/mini_product_tags_head_bg.gif and /dev/null differ diff --git a/skin/frontend/default/default/images/mini_search_magnifier.gif b/skin/frontend/default/default/images/mini_search_magnifier.gif deleted file mode 100644 index b9879718de..0000000000 Binary files a/skin/frontend/default/default/images/mini_search_magnifier.gif and /dev/null differ diff --git a/skin/frontend/default/default/images/narrow_by_bg.gif b/skin/frontend/default/default/images/narrow_by_bg.gif deleted file mode 100644 index a4aa101de8..0000000000 Binary files a/skin/frontend/default/default/images/narrow_by_bg.gif and /dev/null differ diff --git a/skin/frontend/default/default/images/nav_li_bg.gif b/skin/frontend/default/default/images/nav_li_bg.gif deleted file mode 100644 index 4fbd32f63d..0000000000 Binary files a/skin/frontend/default/default/images/nav_li_bg.gif and /dev/null differ diff --git a/skin/frontend/default/default/images/nav_link_bg.gif b/skin/frontend/default/default/images/nav_link_bg.gif deleted file mode 100644 index 826f8cec43..0000000000 Binary files a/skin/frontend/default/default/images/nav_link_bg.gif and /dev/null differ diff --git a/skin/frontend/default/default/images/nav_link_over_bg.gif b/skin/frontend/default/default/images/nav_link_over_bg.gif deleted file mode 100644 index 672d398748..0000000000 Binary files a/skin/frontend/default/default/images/nav_link_over_bg.gif and /dev/null differ diff --git a/skin/frontend/default/default/images/nav_ul_a.gif b/skin/frontend/default/default/images/nav_ul_a.gif deleted file mode 100644 index 8963d7ce20..0000000000 Binary files a/skin/frontend/default/default/images/nav_ul_a.gif and /dev/null differ diff --git a/skin/frontend/default/default/images/nav_ul_a_bg.gif b/skin/frontend/default/default/images/nav_ul_a_bg.gif deleted file mode 100644 index 7ecabf1384..0000000000 Binary files a/skin/frontend/default/default/images/nav_ul_a_bg.gif and /dev/null differ diff --git a/skin/frontend/default/default/images/nav_ul_a_over.gif b/skin/frontend/default/default/images/nav_ul_a_over.gif deleted file mode 100644 index 7d97f952cd..0000000000 Binary files a/skin/frontend/default/default/images/nav_ul_a_over.gif and /dev/null differ diff --git a/skin/frontend/default/default/images/no_image.jpg b/skin/frontend/default/default/images/no_image.jpg deleted file mode 100644 index 0a4c6d3690..0000000000 Binary files a/skin/frontend/default/default/images/no_image.jpg and /dev/null differ diff --git a/skin/frontend/default/default/images/ol_count_bg.gif b/skin/frontend/default/default/images/ol_count_bg.gif deleted file mode 100644 index 09ebddfaa0..0000000000 Binary files a/skin/frontend/default/default/images/ol_count_bg.gif and /dev/null differ diff --git a/skin/frontend/default/default/images/opc_on_box_bg.gif b/skin/frontend/default/default/images/opc_on_box_bg.gif deleted file mode 100644 index 355fe125ba..0000000000 Binary files a/skin/frontend/default/default/images/opc_on_box_bg.gif and /dev/null differ diff --git a/skin/frontend/default/default/images/pager_bg.gif b/skin/frontend/default/default/images/pager_bg.gif deleted file mode 100644 index 0a7dad348f..0000000000 Binary files a/skin/frontend/default/default/images/pager_bg.gif and /dev/null differ diff --git a/skin/frontend/default/default/images/ph.gif b/skin/frontend/default/default/images/ph.gif deleted file mode 100644 index da70aafb44..0000000000 Binary files a/skin/frontend/default/default/images/ph.gif and /dev/null differ diff --git a/skin/frontend/default/default/images/ph_callout_monitor.jpg b/skin/frontend/default/default/images/ph_callout_monitor.jpg deleted file mode 100644 index 662490f8e1..0000000000 Binary files a/skin/frontend/default/default/images/ph_callout_monitor.jpg and /dev/null differ diff --git a/skin/frontend/default/default/images/ph_category_landing.jpg b/skin/frontend/default/default/images/ph_category_landing.jpg deleted file mode 100644 index 7710d3b267..0000000000 Binary files a/skin/frontend/default/default/images/ph_category_landing.jpg and /dev/null differ diff --git a/skin/frontend/default/default/images/ph_product_thumb.jpg b/skin/frontend/default/default/images/ph_product_thumb.jpg deleted file mode 100644 index b367b4c9ea..0000000000 Binary files a/skin/frontend/default/default/images/ph_product_thumb.jpg and /dev/null differ diff --git a/skin/frontend/default/default/images/ph_product_thumb2.jpg b/skin/frontend/default/default/images/ph_product_thumb2.jpg deleted file mode 100644 index 3ead0c1d0e..0000000000 Binary files a/skin/frontend/default/default/images/ph_product_thumb2.jpg and /dev/null differ diff --git a/skin/frontend/default/default/images/ph_product_thumb3.jpg b/skin/frontend/default/default/images/ph_product_thumb3.jpg deleted file mode 100644 index ba9d9eebf9..0000000000 Binary files a/skin/frontend/default/default/images/ph_product_thumb3.jpg and /dev/null differ diff --git a/skin/frontend/default/default/images/pipe.gif b/skin/frontend/default/default/images/pipe.gif deleted file mode 100644 index 27eb48bdbe..0000000000 Binary files a/skin/frontend/default/default/images/pipe.gif and /dev/null differ diff --git a/skin/frontend/default/default/images/place_order_bg.gif b/skin/frontend/default/default/images/place_order_bg.gif deleted file mode 100644 index dcbaa70193..0000000000 Binary files a/skin/frontend/default/default/images/place_order_bg.gif and /dev/null differ diff --git a/skin/frontend/default/default/images/place_order_container_bg.gif b/skin/frontend/default/default/images/place_order_container_bg.gif deleted file mode 100644 index 9b1964ba71..0000000000 Binary files a/skin/frontend/default/default/images/place_order_container_bg.gif and /dev/null differ diff --git a/skin/frontend/default/default/images/point-con.gif b/skin/frontend/default/default/images/point-con.gif deleted file mode 100644 index 7fa3db4a92..0000000000 Binary files a/skin/frontend/default/default/images/point-con.gif and /dev/null differ diff --git a/skin/frontend/default/default/images/product_info_box_bg.gif b/skin/frontend/default/default/images/product_info_box_bg.gif deleted file mode 100644 index e0465f3c2a..0000000000 Binary files a/skin/frontend/default/default/images/product_info_box_bg.gif and /dev/null differ diff --git a/skin/frontend/default/default/images/product_rating_blank_star.gif b/skin/frontend/default/default/images/product_rating_blank_star.gif deleted file mode 100644 index 72d763388e..0000000000 Binary files a/skin/frontend/default/default/images/product_rating_blank_star.gif and /dev/null differ diff --git a/skin/frontend/default/default/images/product_rating_full_star.gif b/skin/frontend/default/default/images/product_rating_full_star.gif deleted file mode 100644 index ab252f8890..0000000000 Binary files a/skin/frontend/default/default/images/product_rating_full_star.gif and /dev/null differ diff --git a/skin/frontend/default/default/images/saved_head_bg.gif b/skin/frontend/default/default/images/saved_head_bg.gif deleted file mode 100644 index 6e119135f6..0000000000 Binary files a/skin/frontend/default/default/images/saved_head_bg.gif and /dev/null differ diff --git a/skin/frontend/default/default/images/search_form_button.gif b/skin/frontend/default/default/images/search_form_button.gif deleted file mode 100644 index 59a54f671a..0000000000 Binary files a/skin/frontend/default/default/images/search_form_button.gif and /dev/null differ diff --git a/skin/frontend/default/default/images/shop_by_bg.gif b/skin/frontend/default/default/images/shop_by_bg.gif deleted file mode 100644 index ef619c4da6..0000000000 Binary files a/skin/frontend/default/default/images/shop_by_bg.gif and /dev/null differ diff --git a/skin/frontend/default/default/images/table_label_bg.gif b/skin/frontend/default/default/images/table_label_bg.gif deleted file mode 100644 index 75bda8d331..0000000000 Binary files a/skin/frontend/default/default/images/table_label_bg.gif and /dev/null differ diff --git a/skin/frontend/default/default/images/table_label_right_bg.gif b/skin/frontend/default/default/images/table_label_right_bg.gif deleted file mode 100644 index a7e08b6d3b..0000000000 Binary files a/skin/frontend/default/default/images/table_label_right_bg.gif and /dev/null differ diff --git a/skin/frontend/default/default/images/this_is_a_demo.gif b/skin/frontend/default/default/images/this_is_a_demo.gif deleted file mode 100644 index 9e2618f9f8..0000000000 Binary files a/skin/frontend/default/default/images/this_is_a_demo.gif and /dev/null differ diff --git a/skin/frontend/default/default/js/bundle.js b/skin/frontend/default/default/js/bundle.js deleted file mode 100644 index acba9481b8..0000000000 --- a/skin/frontend/default/default/js/bundle.js +++ /dev/null @@ -1,191 +0,0 @@ -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Academic Free License (AFL 3.0) - * that is bundled with this package in the file LICENSE_AFL.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/afl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @category design - * @package default_default - * @copyright Copyright (c) 2009 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) - */ -if(typeof Product=='undefined') { - var Product = {}; -} -/**************************** BUNDLE PRODUCT **************************/ -Product.Bundle = Class.create(); -Product.Bundle.prototype = { - initialize: function(config){ - this.config = config; - this.reloadPrice(); - }, - changeSelection: function(selection){ - parts = selection.id.split('-'); - if (this.config['options'][parts[2]].isMulti) { - selected = new Array(); - if (selection.tagName == 'SELECT') { - for (var i = 0; i < selection.options.length; i++) { - if (selection.options[i].selected && selection.options[i].value != '') { - selected.push(selection.options[i].value); - } - } - } else if (selection.tagName == 'INPUT') { - selector = parts[0]+'-'+parts[1]+'-'+parts[2]; - selections = $$('.'+selector); - for (var i = 0; i < selections.length; i++) { - if (selections[i].checked && selections[i].value != '') { - selected.push(selections[i].value); - } - } - } - this.config.selected[parts[2]] = selected; - } else { - if (selection.value != '') { - this.config.selected[parts[2]] = new Array(selection.value); - } else { - this.config.selected[parts[2]] = new Array(); - } - this.populateQty(parts[2], selection.value); - } - this.reloadPrice(); - - }, - - reloadPrice: function() { - var calculatedPrice = 0; - var dispositionPrice = 0; - for (var option in this.config.selected) { - if (this.config.options[option]) { - for (var i=0; i < this.config.selected[option].length; i++) { - var prices = this.selectionPrice(option, this.config.selected[option][i]); - calculatedPrice += Number(prices[0]); - dispositionPrice += Number(prices[1]); - } - } - } - - if (this.config.specialPrice) { - var newPrice = (calculatedPrice*this.config.specialPrice)/100; - calculatedPrice = Math.min(newPrice, calculatedPrice); - } - - optionsPrice.changePrice('bundle', calculatedPrice); - optionsPrice.changePrice('nontaxable', dispositionPrice); - optionsPrice.reload(); - - return calculatedPrice; - }, - - selectionPrice: function(optionId, selectionId) { - if (selectionId == '' || selectionId == 'none') { - return 0; - } - - if (this.config.options[optionId].selections[selectionId].customQty == 1 && !this.config['options'][optionId].isMulti) { - if ($('bundle-option-' + optionId + '-qty-input')) { - qty = $('bundle-option-' + optionId + '-qty-input').value; - } else { - qty = 1; - } - } else { - qty = this.config.options[optionId].selections[selectionId].qty; - } - - if (this.config.priceType == '0') { - price = this.config.options[optionId].selections[selectionId].price; - tierPrice = this.config.options[optionId].selections[selectionId].tierPrice; - - for (var i=0; i < tierPrice.length; i++) { - if (Number(tierPrice[i].price_qty) <= qty && Number(tierPrice[i].price) <= price) { - price = tierPrice[i].price; - } - } - } else { - selection = this.config.options[optionId].selections[selectionId]; - if (selection.priceType == '0') { - price = selection.priceValue; - } else { - price = (this.config.basePrice*selection.priceValue)/100; - } - } - //price += this.config.options[optionId].selections[selectionId].plusDisposition; - //price -= this.config.options[optionId].selections[selectionId].minusDisposition; - //return price*qty; - var disposition = this.config.options[optionId].selections[selectionId].plusDisposition + - this.config.options[optionId].selections[selectionId].minusDisposition; - - var result = new Array(price*qty, disposition*qty); - return result; - }, - - populateQty: function(optionId, selectionId){ - if (selectionId == '' || selectionId == 'none') { - this.showQtyInput(optionId, '0', false); - return; - } - if (this.config.options[optionId].selections[selectionId].customQty == 1) { - this.showQtyInput(optionId, this.config.options[optionId].selections[selectionId].qty, true); - } else { - this.showQtyInput(optionId, this.config.options[optionId].selections[selectionId].qty, false); - } - }, - - showQtyInput: function(optionId, value, canEdit) { - elem = $('bundle-option-' + optionId + '-qty-input'); - elem.value = value; - elem.disabled = !canEdit; - if (canEdit) { - elem.removeClassName('qty-disabled'); - } else { - elem.addClassName('qty-disabled'); - } - }, - - changeOptionQty: function (element, event) { - var checkQty = true; - if (typeof(event) != 'undefined') { - if (event.keyCode == 8 || event.keyCode == 46) { - checkQty = false; - } - } - if (checkQty && (Number(element.value) == 0 || isNaN(Number(element.value)))) { - element.value = 1; - } - parts = element.id.split('-'); - optionId = parts[2]; - if (!this.config['options'][optionId].isMulti) { - selectionId = this.config.selected[optionId][0]; - this.config.options[optionId].selections[selectionId].qty = element.value*1; - this.reloadPrice(); - } - }, - - validationCallback: function (elmId, result){ - if (typeof elmId == 'undefined') { - return; - } - var container = $(elmId).up('ul.options-list'); - if (typeof container != 'undefined') { - if (result == 'failed') { - container.removeClassName('validation-passed'); - container.addClassName('validation-failed'); - } else { - container.removeClassName('validation-failed'); - container.addClassName('validation-passed'); - } - } - } -} diff --git a/skin/frontend/default/default/js/giftmessage.js b/skin/frontend/default/default/js/giftmessage.js deleted file mode 100644 index b2541c1ac6..0000000000 --- a/skin/frontend/default/default/js/giftmessage.js +++ /dev/null @@ -1,130 +0,0 @@ -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Academic Free License (AFL 3.0) - * that is bundled with this package in the file LICENSE_AFL.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/afl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @category design - * @package default_default - * @copyright Copyright (c) 2009 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) - */ - -var GiftMessage = Class.create(); - -GiftMessage.prototype = { - uniqueId: 0, - initialize: function (buttonId) { - GiftMessageStack.addObject(this); - this.buttonId = buttonId; - this.initListeners(); - }, - editGiftMessage: function (evt) { - var popUpUrl = this.url + '?uniqueId=' + this.uniqueId; - this.popUp = window.open(popUpUrl, 'giftMessage', 'width=350,height=400,resizable=yes,scrollbars=yes'); - this.popUp.focus(); - Event.stop(evt); - }, - initListeners: function () { - var items = $(this.buttonId).getElementsByClassName('listen-for-click'); - items.each(function(item) { - Event.observe(item, 'click', this.editGiftMessage.bindAsEventListener(this)); - item.controller = this; - }.bind(this)); - }, - reloadContainer: function (url) { - new Ajax.Updater(this.buttonId, url, {onComplete:this.initListeners.bind(this)}); - }, - initWindow: function (windowObject) { - this.windowObj = windowObject; - } -}; - -var GiftMessageStack = { - _stack: [], - _nextUniqueId: 0, - addObject: function(giftMessageObject) { - giftMessageObject.uniqueId = this.uniqueId(); - this._stack.push(giftMessageObject); - return this; - }, - uniqueId: function() { - return 'objectStack' + (this._nextUniqueId++); - }, - getObjectById: function(id) { - var giftMessageObject = false; - this._stack.each(function(item){ - if(item.uniqueId == id) { - giftMessageObject = item; - } - }); - return giftMessageObject; - } -}; - -var GiftMessageWindow = Class.create(); -GiftMessageWindow.prototype = { - initialize: function(uniqueId, formId, removeUrl) { - this.uniqueId = uniqueId; - this.removeUrl = removeUrl; - if(window.opener) { - this.parentObject = window.opener.GiftMessageStack.getObjectById(this.uniqueId); - this.parentObject.initWindow(this); - } - if(formId) { - this.form = new VarienForm(formId, true); - this.formElement = $(formId); - this.initListeners(); - } - }, - initListeners: function() { - removeButtons = this.formElement.getElementsByClassName('listen-remove'); - removeButtons.each(function(item){ - Event.observe(item, 'click', this.remove.bindAsEventListener(this)); - }.bind(this)); - - cancelButtons = this.formElement.getElementsByClassName('listen-cancel'); - cancelButtons.each(function(item){ - Event.observe(item, 'click', this.cancel.bindAsEventListener(this)); - }.bind(this)); - }, - cancel: function(evt) { - Event.stop(evt); - window.opener.focus(); - window.close(); - }, - close: function() { - window.opener.focus(); - window.close(); - }, - remove: function(evt) { - Event.stop(evt); - if(this.confirmMessage && !window.confirm(this.confirmMessage)) { - return; - } - window.location.href = this.removeUrl; - }, - updateParent: function (url, buttonUrl) { - if(this.parentObject) { - this.parentObject.url = url - this.parentObject.reloadContainer(buttonUrl); - } - setTimeout(function(){ - window.opener.focus(); - window.close(); - }, 3000); - } -}; diff --git a/skin/frontend/default/default/js/opcheckout.js b/skin/frontend/default/default/js/opcheckout.js deleted file mode 100644 index 2441bcb2e0..0000000000 --- a/skin/frontend/default/default/js/opcheckout.js +++ /dev/null @@ -1,796 +0,0 @@ -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Academic Free License (AFL 3.0) - * that is bundled with this package in the file LICENSE_AFL.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/afl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @category design - * @package default_default - * @copyright Copyright (c) 2009 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) - */ - -var Checkout = Class.create(); -Checkout.prototype = { - initialize: function(accordion, urls){ - this.accordion = accordion; - this.progressUrl = urls.progress; - this.reviewUrl = urls.review; - this.saveMethodUrl = urls.saveMethod; - this.failureUrl = urls.failure; - this.billingForm = false; - this.shippingForm= false; - this.syncBillingShipping = false; - this.method = ''; - this.payment = ''; - this.loadWaiting = false; - this.steps = ['login', 'billing', 'shipping', 'shipping_method', 'payment', 'review']; - - //this.onSetMethod = this.nextStep.bindAsEventListener(this); - - this.accordion.disallowAccessToNextSections = true; - }, - - ajaxFailure: function(){ - location.href = this.failureUrl; - }, - - reloadProgressBlock: function(){ - var updater = new Ajax.Updater('checkout-progress-wrapper', this.progressUrl, {method: 'get', onFailure: this.ajaxFailure.bind(this)}); - }, - - reloadReviewBlock: function(){ - var updater = new Ajax.Updater('checkout-review-load', this.reviewUrl, {method: 'get', onFailure: this.ajaxFailure.bind(this)}); - }, - - _disableEnableAll: function(element, isDisabled) { - var descendants = element.descendants(); - for (var k in descendants) { - descendants[k].disabled = isDisabled; - } - element.disabled = isDisabled; - }, - - setLoadWaiting: function(step, keepDisabled) { - if (step) { - if (this.loadWaiting) { - this.setLoadWaiting(false); - } - var container = $(step+'-buttons-container'); - container.setStyle({opacity:.5}); - this._disableEnableAll(container, true); - Element.show(step+'-please-wait'); - } else { - if (this.loadWaiting) { - var container = $(this.loadWaiting+'-buttons-container'); - var isDisabled = (keepDisabled ? true : false); - if (!isDisabled) { - container.setStyle({opacity:1}); - } - this._disableEnableAll(container, isDisabled); - Element.hide(this.loadWaiting+'-please-wait'); - } - } - this.loadWaiting = step; - }, - - gotoSection: function(section) - { - section = $('opc-'+section); - section.addClassName('allow'); - this.accordion.openSection(section); - }, - - setMethod: function(){ - if ($('login:guest') && $('login:guest').checked) { - this.method = 'guest'; - var request = new Ajax.Request( - this.saveMethodUrl, - {method: 'post', onFailure: this.ajaxFailure.bind(this), parameters: {method:'guest'}} - ); - Element.hide('register-customer-password'); - this.gotoSection('billing'); - } - else if($('login:register') && ($('login:register').checked || $('login:register').type == 'hidden')) { - this.method = 'register'; - var request = new Ajax.Request( - this.saveMethodUrl, - {method: 'post', onFailure: this.ajaxFailure.bind(this), parameters: {method:'register'}} - ); - Element.show('register-customer-password'); - this.gotoSection('billing'); - } - else{ - alert(Translator.translate('Please choose to register or to checkout as a guest')); - return false; - } - }, - - setBilling: function() { - if (($('billing:use_for_shipping_yes')) && ($('billing:use_for_shipping_yes').checked)) { - shipping.syncWithBilling(); - $('opc-shipping').addClassName('allow'); - this.gotoSection('shipping_method'); - } else if (($('billing:use_for_shipping_no')) && ($('billing:use_for_shipping_no').checked)) { - $('shipping:same_as_billing').checked = false; - this.gotoSection('shipping'); - } else { - $('shipping:same_as_billing').checked = true; - this.gotoSection('shipping'); - } - - // this refreshes the checkout progress column - this.reloadProgressBlock(); - -// if ($('billing:use_for_shipping') && $('billing:use_for_shipping').checked){ -// shipping.syncWithBilling(); -// //this.setShipping(); -// //shipping.save(); -// $('opc-shipping').addClassName('allow'); -// this.gotoSection('shipping_method'); -// } else { -// $('shipping:same_as_billing').checked = false; -// this.gotoSection('shipping'); -// } -// this.reloadProgressBlock(); -// //this.accordion.openNextSection(true); - }, - - setShipping: function() { - this.reloadProgressBlock(); - //this.nextStep(); - this.gotoSection('shipping_method'); - //this.accordion.openNextSection(true); - }, - - setShippingMethod: function() { - this.reloadProgressBlock(); - //this.nextStep(); - this.gotoSection('payment'); - //this.accordion.openNextSection(true); - }, - - setPayment: function() { - this.reloadProgressBlock(); - //this.nextStep(); - this.gotoSection('review'); - //this.accordion.openNextSection(true); - }, - - setReview: function() { - this.reloadProgressBlock(); - //this.nextStep(); - //this.accordion.openNextSection(true); - }, - - back: function(){ - if (this.loadWaiting) return; - this.accordion.openPrevSection(true); - }, - - setStepResponse: function(response){ - if (response.update_section) { - $('checkout-'+response.update_section.name+'-load').update(response.update_section.html); - } - if (response.allow_sections) { - response.allow_sections.each(function(e){ - $('opc-'+e).addClassName('allow'); - }); - } - - if(response.duplicateBillingInfo) - { - shipping.setSameAsBilling(true); - } - - if (response.goto_section) { - this.reloadProgressBlock(); - this.gotoSection(response.goto_section); - return true; - } - if (response.redirect) { - location.href = response.redirect; - return true; - } - return false; - } -} - -// billing -var Billing = Class.create(); -Billing.prototype = { - initialize: function(form, addressUrl, saveUrl){ - this.form = form; - if ($(this.form)) { - $(this.form).observe('submit', function(event){this.save();Event.stop(event);}.bind(this)); - } - this.addressUrl = addressUrl; - this.saveUrl = saveUrl; - this.onAddressLoad = this.fillForm.bindAsEventListener(this); - this.onSave = this.nextStep.bindAsEventListener(this); - this.onComplete = this.resetLoadWaiting.bindAsEventListener(this); - }, - - setAddress: function(addressId){ - if (addressId) { - request = new Ajax.Request( - this.addressUrl+addressId, - {method:'get', onSuccess: this.onAddressLoad, onFailure: checkout.ajaxFailure.bind(checkout)} - ); - } - else { - this.fillForm(false); - } - }, - - newAddress: function(isNew){ - if (isNew) { - this.resetSelectedAddress(); - Element.show('billing-new-address-form'); - } else { - Element.hide('billing-new-address-form'); - } - }, - - resetSelectedAddress: function(){ - var selectElement = $('billing-address-select') - if (selectElement) { - selectElement.value=''; - } - }, - - fillForm: function(transport){ - var elementValues = {}; - if (transport && transport.responseText){ - try{ - elementValues = eval('(' + transport.responseText + ')'); - } - catch (e) { - elementValues = {}; - } - } - else{ - this.resetSelectedAddress(); - } - arrElements = Form.getElements(this.form); - for (var elemIndex in arrElements) { - if (arrElements[elemIndex].id) { - var fieldName = arrElements[elemIndex].id.replace(/^billing:/, ''); - arrElements[elemIndex].value = elementValues[fieldName] ? elementValues[fieldName] : ''; - if (fieldName == 'country_id' && billingForm){ - billingForm.elementChildLoad(arrElements[elemIndex]); - } - } - } - }, - - setUseForShipping: function(flag) { - $('shipping:same_as_billing').checked = flag; - }, - - save: function(){ - if (checkout.loadWaiting!=false) return; - - var validator = new Validation(this.form); - if (validator.validate()) { - if (checkout.method=='register' && $('billing:customer_password').value != $('billing:confirm_password').value) { - alert(Translator.translate('Error: Passwords do not match')); - return; - } - checkout.setLoadWaiting('billing'); - -// if ($('billing:use_for_shipping') && $('billing:use_for_shipping').checked) { -// $('billing:use_for_shipping').value=1; -// } - - var request = new Ajax.Request( - this.saveUrl, - { - method: 'post', - onComplete: this.onComplete, - onSuccess: this.onSave, - onFailure: checkout.ajaxFailure.bind(checkout), - parameters: Form.serialize(this.form) - } - ); - } - }, - - resetLoadWaiting: function(transport){ - checkout.setLoadWaiting(false); - }, - - /** - This method recieves the AJAX response on success. - There are 3 options: error, redirect or html with shipping options. - */ - nextStep: function(transport){ - if (transport && transport.responseText){ - try{ - response = eval('(' + transport.responseText + ')'); - } - catch (e) { - response = {}; - } - } - - if (response.error){ - if ((typeof response.message) == 'string') { - alert(response.message); - } else { - if (window.billingRegionUpdater) { - billingRegionUpdater.update(); - } - - alert(response.message.join("\n")); - } - - return false; - } - - checkout.setStepResponse(response); - - // DELETE - //alert('error: ' + response.error + ' / redirect: ' + response.redirect + ' / shipping_methods_html: ' + response.shipping_methods_html); - // This moves the accordion panels of one page checkout and updates the checkout progress - //checkout.setBilling(); - } -} - -// shipping -var Shipping = Class.create(); -Shipping.prototype = { - initialize: function(form, addressUrl, saveUrl, methodsUrl){ - this.form = form; - if ($(this.form)) { - $(this.form).observe('submit', function(event){this.save();Event.stop(event);}.bind(this)); - } - this.addressUrl = addressUrl; - this.saveUrl = saveUrl; - this.methodsUrl = methodsUrl; - this.onAddressLoad = this.fillForm.bindAsEventListener(this); - this.onSave = this.nextStep.bindAsEventListener(this); - this.onComplete = this.resetLoadWaiting.bindAsEventListener(this); - }, - - setAddress: function(addressId){ - if (addressId) { - request = new Ajax.Request( - this.addressUrl+addressId, - {method:'get', onSuccess: this.onAddressLoad, onFailure: checkout.ajaxFailure.bind(checkout)} - ); - } - else { - this.fillForm(false); - } - }, - - newAddress: function(isNew){ - if (isNew) { - this.resetSelectedAddress(); - Element.show('shipping-new-address-form'); - } else { - Element.hide('shipping-new-address-form'); - } - shipping.setSameAsBilling(false); - }, - - resetSelectedAddress: function(){ - var selectElement = $('shipping-address-select') - if (selectElement) { - selectElement.value=''; - } - }, - - fillForm: function(transport){ - var elementValues = {}; - if (transport && transport.responseText){ - try{ - elementValues = eval('(' + transport.responseText + ')'); - } - catch (e) { - elementValues = {}; - } - } - else{ - this.resetSelectedAddress(); - } - arrElements = Form.getElements(this.form); - for (var elemIndex in arrElements) { - if (arrElements[elemIndex].id) { - var fieldName = arrElements[elemIndex].id.replace(/^shipping:/, ''); - arrElements[elemIndex].value = elementValues[fieldName] ? elementValues[fieldName] : ''; - if (fieldName == 'country_id' && shippingForm){ - shippingForm.elementChildLoad(arrElements[elemIndex]); - } - } - } - }, - - setSameAsBilling: function(flag) { - $('shipping:same_as_billing').checked = flag; -// #5599. Also it hangs up, if the flag is not false -// $('billing:use_for_shipping_yes').checked = flag; - if (flag) { - this.syncWithBilling(); - } - }, - - syncWithBilling: function () { - $('billing-address-select') && this.newAddress(!$('billing-address-select').value); - $('shipping:same_as_billing').checked = true; - if (!$('billing-address-select') || !$('billing-address-select').value) { - arrElements = Form.getElements(this.form); - for (var elemIndex in arrElements) { - if (arrElements[elemIndex].id) { - var sourceField = $(arrElements[elemIndex].id.replace(/^shipping:/, 'billing:')); - if (sourceField){ - arrElements[elemIndex].value = sourceField.value; - } - } - } - //$('shipping:country_id').value = $('billing:country_id').value; - shippingRegionUpdater.update(); - $('shipping:region_id').value = $('billing:region_id').value; - $('shipping:region').value = $('billing:region').value; - //shippingForm.elementChildLoad($('shipping:country_id'), this.setRegionValue.bind(this)); - } else { - $('shipping-address-select').value = $('billing-address-select').value; - } - }, - - setRegionValue: function(){ - $('shipping:region').value = $('billing:region').value; - }, - - save: function(){ - if (checkout.loadWaiting!=false) return; - var validator = new Validation(this.form); - if (validator.validate()) { - checkout.setLoadWaiting('shipping'); - var request = new Ajax.Request( - this.saveUrl, - { - method:'post', - onComplete: this.onComplete, - onSuccess: this.onSave, - onFailure: checkout.ajaxFailure.bind(checkout), - parameters: Form.serialize(this.form) - } - ); - } - }, - - resetLoadWaiting: function(transport){ - checkout.setLoadWaiting(false); - }, - - nextStep: function(transport){ - if (transport && transport.responseText){ - try{ - response = eval('(' + transport.responseText + ')'); - } - catch (e) { - response = {}; - } - } - if (response.error){ - if ((typeof response.message) == 'string') { - alert(response.message); - } else { - if (window.shippingRegionUpdater) { - shippingRegionUpdater.update(); - } - alert(response.message.join("\n")); - } - - return false; - } - - checkout.setStepResponse(response); - - /* - var updater = new Ajax.Updater( - 'checkout-shipping-method-load', - this.methodsUrl, - {method:'get', onSuccess: checkout.setShipping.bind(checkout)} - ); - */ - //checkout.setShipping(); - } -} - -// shipping method -var ShippingMethod = Class.create(); -ShippingMethod.prototype = { - initialize: function(form, saveUrl){ - this.form = form; - if ($(this.form)) { - $(this.form).observe('submit', function(event){this.save();Event.stop(event);}.bind(this)); - } - this.saveUrl = saveUrl; - this.validator = new Validation(this.form); - this.onSave = this.nextStep.bindAsEventListener(this); - this.onComplete = this.resetLoadWaiting.bindAsEventListener(this); - }, - - validate: function() { - var methods = document.getElementsByName('shipping_method'); - if (methods.length==0) { - alert(Translator.translate('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.')); - return false; - } - - if(!this.validator.validate()) { - return false; - } - - for (var i=0; i
    - __('Track this shipment') ?> + __('Track this shipment') ?>