Commit bc92aceb by 王东红

fix

parent e1cf35ff
......@@ -23,7 +23,14 @@ class Toolbar
{
$this->_collection->getSelect()->order('e.created_at DESC');
}
elseif ($currentOrder == 'best_seller')
{
$subject->getCollection()->getSelect()->joinLeft(
'sales_order_item',
'e.entity_id = sales_order_item.product_id',
array('qty_ordered'=>'(select sum(soi.qty_ordered) from sales_order_item soi where soi.product_id = e.entity_id)'))->distinct(true)
->order('qty_ordered desc');
}
}
return $result;
}
......
......@@ -6,6 +6,7 @@ class Config
{
public function afterGetAttributeUsedForSortByArray(\Magento\Catalog\Model\Config $catalogConfig, $options)
{
$options['best_seller'] = __('Best Seller');
$options['new_arrivals'] = __('New Arrivals');
$options['low_to_high'] = __('Price Low To High');
$options['high_to_low'] = __('Price High To Low');
......
......@@ -66,6 +66,7 @@ $_helper = $block->getData('outputHelper');
<?= $productImage->toHtml() ?>
</a>
<div class="product details product-item-details">
<?= $block->getProductDetailsHtml($_product) ?>
<?php $_productNameStripped = $block->stripTags($_product->getName(), null, true); ?>
<strong class="product name product-item-name">
<a class="product-item-link"
......@@ -76,7 +77,7 @@ $_helper = $block->getData('outputHelper');
<?= $block->getReviewsSummaryHtml($_product, $templateType) ?>
<?= /* @noEscape */ $block->getProductPrice($_product) ?>
<?= $block->getProductDetailsHtml($_product) ?>
<div class="product-item-inner">
<div class="product actions product-item-actions">
......@@ -102,12 +103,12 @@ $_helper = $block->getData('outputHelper');
/* @noEscape */ $postParams['data'][Action::PARAM_NAME_URL_ENCODED]
?>">
<?= $block->getBlockHtml('formkey') ?>
<button type="submit"
title="<?= $escaper->escapeHtmlAttr(__('Add to Cart')) ?>"
class="action tocart primary"
disabled>
<span><?= $escaper->escapeHtml(__('Add to Cart')) ?></span>
</button>
<!-- <button type="submit"-->
<!-- title="--><?//= $escaper->escapeHtmlAttr(__('Add to Cart')) ?><!--"-->
<!-- class="action tocart primary"-->
<!-- disabled>-->
<!-- <span>--><?//= $escaper->escapeHtml(__('Add to Cart')) ?><!--</span>-->
<!-- </button>-->
</form>
<?php else:?>
<?php if ($_product->isAvailable()):?>
......@@ -124,11 +125,11 @@ $_helper = $block->getData('outputHelper');
$position,
'product-item-info_' . $_product->getId() . ' div.actions-primary'
) : '' ?>
<div data-role="add-to-links" class="actions-secondary">
<?php if ($addToBlock = $block->getChildBlock('addto')): ?>
<?= $addToBlock->setProduct($_product)->getChildHtml() ?>
<?php endif; ?>
</div>
<!-- <div data-role="add-to-links" class="actions-secondary">-->
<!-- --><?php //if ($addToBlock = $block->getChildBlock('addto')): ?>
<!-- --><?//= $addToBlock->setProduct($_product)->getChildHtml() ?>
<!-- --><?php //endif; ?>
<!-- </div>-->
<?= strpos($pos, $viewMode . '-secondary') ?
/* @noEscape */ $secureRenderer->renderStyleAsTag(
$position,
......
......@@ -19,4 +19,15 @@
.products .product-item-photo img,#product-options-wrapper .swatch-option.image{
margin: 0;
}
.products-grid .product-item .product.name a{
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
cursor: pointer;
width: 100%;
display: inline-block;
color: #222222;
margin-top: 5px;
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment