Commit 3af0b984 by lmf

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

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