Skip to content

Fixes for #1564 and #1289 #1568

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
May 16, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand All @@ -236,10 +234,15 @@ 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;
Expand Down
2 changes: 1 addition & 1 deletion app/code/core/Mage/Checkout/etc/adminhtml.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
<children>
<checkoutagreement translate="title" module="checkout">
<sort_order>100</sort_order>
<title>Terms and conditions</title>
<title>Terms and Conditions</title>
<action>adminhtml/checkout_agreement/</action>
</checkoutagreement>
</children>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,15 @@
<ol class="checkout-agreements">
<?php foreach ($this->getAgreements() as $_a): ?>
<li>
<div class="agreement-content"<?php echo ($_a->getContentHeight() ? ' style="height:' . $_a->getContentHeight() . '"' : '')?>>
<?php if ($_a->getIsHtml()):?>
<?php echo $_a->getContent() ?>
<?php else: ?>
<?php echo nl2br($this->escapeHtml($_a->getContent())) ?>
<?php endif ?>
</div>
<?php if ($_a->getContent()):?>
<div class="agreement-content"<?php echo ($_a->getContentHeight() ? ' style="height:' . $_a->getContentHeight() . '"' : '')?>>
<?php if ($_a->getIsHtml()):?>
<?php echo $_a->getContent() ?>
<?php else: ?>
<?php echo nl2br($this->escapeHtml($_a->getContent())) ?>
<?php endif ?>
</div>
<?php endif; ?>
<p class="agree">
<input type="checkbox" id="agreement-<?php echo $_a->getId()?>" name="agreement[<?php echo $_a->getId()?>]" value="1" title="<?php echo $this->escapeHtml($_a->getCheckboxText()) ?>" class="checkbox" /><label for="agreement-<?php echo $_a->getId()?>"><?php echo $_a->getIsHtml() ? $_a->getCheckboxText() : $this->escapeHtml($_a->getCheckboxText()) ?></label>
</p>
Expand Down