Commit be2586fd by lmf

优化详情心愿单布局

parent 61a0c438
<?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>
......@@ -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>
......@@ -193,8 +193,11 @@ $thumbSizes = $responsiveImageHelper->getSizes('product_page_image_small');
</style>
<script>
require([
'jquery','Magento_Catalog/js/smartphoto.min'
'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);
......@@ -230,7 +233,5 @@ $thumbSizes = $responsiveImageHelper->getSizes('product_page_image_small');
$(".main-image").attr("src",sd);
});
});
</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