Commit 3af0b984 by lmf

优化商品详情描述位置 购物车旁边心选按钮位置 首页增加新品图

parent 633987ca
......@@ -199,6 +199,10 @@
margin: 10px;
font-size: small;
}
.joshine-desction #description{
max-height: 540px;
overflow: auto;
}
</style>
<?php
$short_description = $this->helper(Magento\Catalog\Helper\Output::class)->productAttribute(
......@@ -206,11 +210,6 @@ $short_description = $this->helper(Magento\Catalog\Helper\Output::class)->produc
$block->getProduct()->getShortDescription(),
'short_description'
);
$description = $this->helper(Magento\Catalog\Helper\Output::class)->productAttribute(
$block->getProduct(),
$block->getProduct()->getDescription(),
'description'
);
?>
<div class="joshine-desction">
<div id="accordion" data-mage-init='{
......@@ -226,9 +225,9 @@ $description = $this->helper(Magento\Catalog\Helper\Output::class)->productAttri
<a class="desction-right info-desc" href="#">+</a>
</div>
</div>
<div data-role="content">
<div data-role="content" id="description">
<div class="desction-info">
<?php echo $short_description."<br />".$description;?>
<?php echo $short_description;?>
</div>
</div>
</div>
......@@ -238,7 +237,12 @@ $description = $this->helper(Magento\Catalog\Helper\Output::class)->productAttri
'jquery'
], function ($) {
$(".info-desc").click(function () {
var number = $(".desction-right").html();
if (number == "+"){
$(".desction-right").html("-");
}else{
$(".desction-right").html("+");
}
})
});
</script>
......@@ -62,7 +62,7 @@
<?php $buttonTitle = __('ADD TO CART'); ?>
<?php if ($_product->isSaleable()) :?>
<div class="box-tocart">
<div id="wishlist"></div>
<div class="fieldset">
<?php if ($block->shouldRenderQuantity()) :?>
<div class="field qty">
......@@ -89,6 +89,7 @@
</button>
<?= $block->getChildHtml('', true) ?>
</div>
<div id="wishlist"></div>
</div>
</div>
<?php endif; ?>
......
......@@ -197,6 +197,8 @@ $thumbSizes = $responsiveImageHelper->getSizes('product_page_image_small');
], function ($) {
$(".thumbnails > a").removeClass("active");
$(".thumbnails > a:first").addClass("active");
var main_img = $(".thumbnails > a:first").attr("name");
$(".main-image").attr("src",main_img);
$(".thumbnails > a").mouseover(function (s) {
var main_img = $(this).attr("name");
......
......@@ -70,7 +70,7 @@ $image = 'new_products_content_widget_grid';
<ol class="product-items <?= /* @noEscape */ $type ?>">
<?php
$templateType = \Magento\Catalog\Block\Product\ReviewRendererInterface::SHORT_VIEW;
$news_ids = explode(',',"1315,1178,1125,1002");
$news_ids = explode(',',"2246,2243,2199,1178,1125,1002");
//$news_ids = explode(',',"1,2");
$objectManager = \Magento\Framework\App\ObjectManager::getInstance();
......
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