From b68bd322f27f68c29e0eed7cfb714b2829525382 Mon Sep 17 00:00:00 2001 From: ADDISON Date: Fri, 23 Apr 2021 23:18:05 +0300 Subject: [PATCH 1/4] Update agreements.phtml By PR #1480 which is merged in OM the content field is no longer required. If it is not filled in an empty container will be visible in frontend. This PR comes to solve this issue. --- .../template/checkout/onepage/agreements.phtml | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/app/design/frontend/base/default/template/checkout/onepage/agreements.phtml b/app/design/frontend/base/default/template/checkout/onepage/agreements.phtml index 3f755700c6f..630e53aa7ba 100644 --- a/app/design/frontend/base/default/template/checkout/onepage/agreements.phtml +++ b/app/design/frontend/base/default/template/checkout/onepage/agreements.phtml @@ -35,13 +35,15 @@
    getAgreements() as $_a): ?>
  1. -
    getContentHeight() ? ' style="height:' . $_a->getContentHeight() . '"' : '')?>> - getIsHtml()):?> - getContent() ?> - - escapeHtml($_a->getContent())) ?> - -
    + getContent()):?> +
    getContentHeight() ? ' style="height:' . $_a->getContentHeight() . '"' : '')?>> + getIsHtml()):?> + getContent() ?> + + escapeHtml($_a->getContent())) ?> + +
    +

    From 0d4e7846fdec647ee6efd465bb7acb1a95327cff Mon Sep 17 00:00:00 2001 From: ADDISON Date: Fri, 23 Apr 2021 23:18:53 +0300 Subject: [PATCH 2/4] Uppercase format in Sales menu - Terms and conditions This commit will change in Backend -> Sales menu a link name from "Terms and conditions" to "Terms and Conditions". It is not necessary to add the text in /app/locale/en_US/Mage_Checkout.csv because it already exists. I chose to keep the old version too. --- app/code/core/Mage/Checkout/etc/adminhtml.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/core/Mage/Checkout/etc/adminhtml.xml b/app/code/core/Mage/Checkout/etc/adminhtml.xml index ed0ea458ca7..41e611a75dd 100644 --- a/app/code/core/Mage/Checkout/etc/adminhtml.xml +++ b/app/code/core/Mage/Checkout/etc/adminhtml.xml @@ -31,7 +31,7 @@ 100 - Terms and conditions + Terms and Conditions adminhtml/checkout_agreement/ From 8fbb4eeb125dc06acf73b4634d7decaabc6d16d6 Mon Sep 17 00:00:00 2001 From: ADDISON Date: Fri, 23 Apr 2021 23:36:36 +0300 Subject: [PATCH 3/4] Wrong attributes order in comparison window This PR fixes the issue #1289. --- .../Resource/Product/Compare/Item/Collection.php | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/app/code/core/Mage/Catalog/Model/Resource/Product/Compare/Item/Collection.php b/app/code/core/Mage/Catalog/Model/Resource/Product/Compare/Item/Collection.php index c06080bb800..67c3414e454 100644 --- a/app/code/core/Mage/Catalog/Model/Resource/Product/Compare/Item/Collection.php +++ b/app/code/core/Mage/Catalog/Model/Resource/Product/Compare/Item/Collection.php @@ -225,8 +225,6 @@ public function getComparableAttributes() $this->_comparableAttributes = array(); $setIds = $this->_getAttributeSetIds(); if ($setIds) { - $attributeIds = $this->_getAttributeIdsBySetIds($setIds); - $select = $this->getConnection()->select() ->from(array('main_table' => $this->getTable('eav/attribute'))) ->join( @@ -236,13 +234,18 @@ public function getComparableAttributes() ->joinLeft( array('al' => $this->getTable('eav/attribute_label')), 'al.attribute_id = main_table.attribute_id AND al.store_id = ' . (int) $this->getStoreId(), - array('store_label' => $this->getConnection()->getCheckSql('al.value IS NULL', 'main_table.frontend_label', 'al.value')) + array('store_label' => new Zend_Db_Expr('IFNULL(al.value, main_table.frontend_label)')) + ) + ->joinLeft( + array('ai' => $this->getTable('eav/entity_attribute')), + 'ai.attribute_id = main_table.attribute_id' ) ->where('additional_table.is_comparable=?', 1) - ->where('main_table.attribute_id IN(?)', $attributeIds); + ->where('ai.attribute_set_id IN(?)', $setIds) + ->order(array('ai.attribute_group_id ASC', 'ai.sort_order ASC')); $attributesData = $this->getConnection()->fetchAll($select); if ($attributesData) { - $entityType = Mage_Catalog_Model_Product::ENTITY; + $entityType = 'catalog_product'; Mage::getSingleton('eav/config') ->importAttributesData($entityType, $attributesData); foreach ($attributesData as $data) { From 7866fe38f4691ade16213e2f8cfeb36e580e0d02 Mon Sep 17 00:00:00 2001 From: ADDISON Date: Sat, 24 Apr 2021 09:41:40 +0300 Subject: [PATCH 4/4] Update Collection.php --- .../Catalog/Model/Resource/Product/Compare/Item/Collection.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/core/Mage/Catalog/Model/Resource/Product/Compare/Item/Collection.php b/app/code/core/Mage/Catalog/Model/Resource/Product/Compare/Item/Collection.php index 67c3414e454..b3920a56c88 100644 --- a/app/code/core/Mage/Catalog/Model/Resource/Product/Compare/Item/Collection.php +++ b/app/code/core/Mage/Catalog/Model/Resource/Product/Compare/Item/Collection.php @@ -245,7 +245,7 @@ public function getComparableAttributes() ->order(array('ai.attribute_group_id ASC', 'ai.sort_order ASC')); $attributesData = $this->getConnection()->fetchAll($select); if ($attributesData) { - $entityType = 'catalog_product'; + $entityType = Mage_Catalog_Model_Product::ENTITY; Mage::getSingleton('eav/config') ->importAttributesData($entityType, $attributesData); foreach ($attributesData as $data) {