Commit 633987ca by 王东红

Merge branch 'master' of http://47.99.244.21:9999/root/joshine

parents be3bb977 be2586fd
<?xml version="1.0"?>
<!--
/**
* @author JaJuMa GmbH <info@jajuma.de>
* @copyright Copyright (c) 2020 JaJuMa GmbH <https://www.jajuma.de>. All rights reserved.
* @license http://opensource.org/licenses/mit-license.php MIT License
*/
-->
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<head>
<css src="css/smartphoto.min.css" rel="stylesheet" type="text/css" />
</head>
</page>
var config = {
map: {
'*': {
smartphoto: 'Magento_Catalog/js/smartphoto.min'
paths : {
'smartphoto': 'Magento_Catalog/js/smartphoto.min'
},
shim : {
'smartphoto' : {
deps: ['jquery']
}
}
}
};
......@@ -173,3 +173,72 @@
}
</style>
</div>
<style>
.joshine-desction{
width:100%;
}
.joshine-desction .desction-left{
width: 90%;
flot: left;
font-size: small;
font-weight: bolder;
color: #000;
}
.joshine-desction .desction-right{
width: 10%;
float: right;
text-align: end;
font-size: larger;
color: #000;
font-weight: 600;
}
.joshine-desction .desction-info{
padding: 10px;
margin: 10px;
font-size: small;
}
</style>
<?php
$short_description = $this->helper(Magento\Catalog\Helper\Output::class)->productAttribute(
$block->getShortDescription(),
$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='{
"accordion":{
"active": [1, 2],
"collapsible": true,
"openedState": "active",
"multipleCollapsible": true
}}'>
<div data-role="collapsible">
<div data-role="trigger">
<a class="desction-left info-desc" href="#">Description</a>
<a class="desction-right info-desc" href="#">+</a>
</div>
</div>
<div data-role="content">
<div class="desction-info">
<?php echo $short_description."<br />".$description;?>
</div>
</div>
</div>
</div>
<script>
require([
'jquery'
], function ($) {
$(".info-desc").click(function () {
$(".desction-right").html("-");
})
});
</script>
......@@ -42,12 +42,27 @@
margin-top: -20px;
margin-bottom: 10px;
}
#wishlist{
display: none;
}
}
@media (min-width: 780px) {
#wishlist{
width: 10%;
float: left;
padding: 3px;
display: block;
}
.product-addto-links{
display: none;
}
}
</style>
<?php $_product = $block->getProduct(); ?>
<?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">
......@@ -91,5 +106,11 @@
max-width: 100%;
font-weight: 600;
}
</style>
<script>
require([
'jquery'
], function ($) {
$("#wishlist").html($(".product-addto-links > div:first").html());
});
</script>
......@@ -45,84 +45,21 @@ if ($_attributeType && $_attributeType == 'text') {
}
?>
<style>
.joshine-desction{
width:100%;
}
.joshine-desction .desction-left{
width: 90%;
flot: left;
font-size: small;
font-weight: bolder;
color: #000;
}
.joshine-desction .desction-right{
width: 10%;
float: right;
text-align: end;
font-size: larger;
color: #000;
font-weight: 600;
}
.joshine-desction .desction-info{
padding: 10px;
margin: 10px;
font-size: small;
}
</style>
<?php if ($_attributeValue) :?>
<?php
//print_r($_attributeAddAttribute);
?>
<div class="product attribute <?= $block->escapeHtmlAttr($_className) ?>">
<?php if ($renderLabel) :?>
<strong class="type"><?= $block->escapeHtml($_attributeLabel) ?></strong>
<?php endif; ?>
<div class="value" <?= /* @noEscape */ $_attributeAddAttribute ?>>
<!--商品描述部分-->
<?php if($_attributeAddAttribute == 'itemprop="description"'): ?>
<div class="joshine-desction">
<div id="accordion" data-mage-init='{
"accordion":{
"active": [1, 2],
"collapsible": true,
"openedState": "active",
"multipleCollapsible": true
}}'>
<div data-role="collapsible">
<div data-role="trigger">
<a class="desction-left info-desc" href="#">Description</a>
<a class="desction-right info-desc" href="#">+</a>
</div>
</div>
<div data-role="content">
<div class="desction-info">
<?= /* @noEscape */ $_attributeValue ?>
<?= /* @noEscape */ $this->helper(Magento\Catalog\Helper\Output::class)->productAttribute(
$block->getProduct(),
$block->getProduct()->getDescription(),
'description'
) ?>
</div>
</div>
</div>
</div>
<?php else:?>
<?php if($_attributeAddAttribute != 'itemprop="description"'): ?>
<?= /* @noEscape */ $_attributeValue ?>
<?php endif; ?>
</div>
</div>
<?php endif; ?>
<script>
require([
'jquery'
], function ($) {
$(".info-desc").click(function () {
$(".desction-right").html("-");
})
});
</script>
......
......@@ -34,9 +34,6 @@ $thumbSizes = $responsiveImageHelper->getSizes('product_page_image_small');
}
}
@media (max-width: 768px){
.breeze-gallery .thumbnails,.breeze-gallery .prev, .breeze-gallery .next {
display:none;
}
.main-image-wrapper > img{
display:none;
}
......@@ -52,6 +49,12 @@ $thumbSizes = $responsiveImageHelper->getSizes('product_page_image_small');
margin-left:2px;
height: auto;
}
.main-image-wrapper .mobile-pic > a > img{
max-width: 80%;
}
.breeze-gallery .thumbnails,.breeze-gallery .prev, .breeze-gallery .next{
display:none;
}
}
</style>
......@@ -190,8 +193,11 @@ $thumbSizes = $responsiveImageHelper->getSizes('product_page_image_small');
</style>
<script>
require([
'jquery','smartphoto'
'jquery'
], function ($) {
$(".thumbnails > a").removeClass("active");
$(".thumbnails > a:first").addClass("active");
$(".thumbnails > a").mouseover(function (s) {
var main_img = $(this).attr("name");
$(".main-image").attr("src",main_img);
......@@ -226,7 +232,6 @@ $thumbSizes = $responsiveImageHelper->getSizes('product_page_image_small');
}
$(".main-image").attr("src",sd);
});
$(".js-smartPhoto").SmartPhoto();
});
</script>
......@@ -1842,6 +1842,10 @@ background-color: #000;
display: block !important;
}
//产品色块选中错位处理
#product-options-wrapper .swatch-option.image:hover{
border: none;
}
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