Commit cd8c9f7c by lmf

优化最新产品模块样式恢复

parent e5f69e85
......@@ -67,12 +67,12 @@ if ($exist = ($block->getProductCollection() && $block->getProductCollection()->
<div class="actions-primary">
<?php if ($_item->isSaleable()) :?>
<?php if (!$_item->getTypeInstance()->isPossibleBuyFromList($_item)) :?>
<a class="action tocart primary"
<button class="action tocart primary"
data-mage-init='{"redirectUrl":{"url":"<?= $block->escapeUrl($block->getAddToCartUrl($_item)) ?>"}}'
type="button"
title="<?= $block->escapeHtmlAttr(__('Add to Cart')) ?>">
<span><?= $block->escapeHtml(__('Add Cart')) ?></span>
</a>
</button>
<?php else :?>
<?php
$postDataHelper = $this->helper(Magento\Framework\Data\Helper\PostHelper::class);
......@@ -81,12 +81,12 @@ if ($exist = ($block->getProductCollection() && $block->getProductCollection()->
['product' => (int) $_item->getEntityId()]
)
?>
<a class="action tocart primary"
<button class="action tocart primary"
data-post='<?= /* @noEscape */ $postData ?>'
type="button"
title="<?= $block->escapeHtmlAttr(__('Add to Cart')) ?>">
<span><?= $block->escapeHtml(__('Add Cart')) ?></span>
</a>
</button>
<?php endif; ?>
<?php else :?>
<?php if ($_item->isAvailable()) :?>
......@@ -143,6 +143,9 @@ if ($exist = ($block->getProductCollection() && $block->getProductCollection()->
text-align: center;
font-size: x-large;
}
.actions-secondary a{
color: #000;
}
.product-item-name .product-item-link{
text-overflow: ellipsis;
white-space: nowrap;
......
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