Commit 9c46f684 by 王东红

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

parents 0dcb2312 ffbfbc83
<?xml version="1.0"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
<referenceContainer name="sidebar.main">
<block class="Magento\Catalog\Block\Navigation" name="catalog.leftnav" before="-" template="Magento_Catalog::navigation/left.phtml"/>
</referenceContainer>
</body>
</page>
<?xml version="1.0"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body/>
</page>
<?xml version="1.0"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="1column" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
<referenceBlock name="page.main.title">
<action method="setPageTitle">
<argument translate="true" name="page_title" xsi:type="string">Compare Products</argument>
</action>
</referenceBlock>
<referenceContainer name="content">
<block class="Magento\Catalog\Block\Product\Compare\ListCompare" name="catalog.compare.list" template="Magento_Catalog::product/compare/list.phtml" cacheable="false"/>
</referenceContainer>
</body>
</page>
<?xml version="1.0"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
<referenceContainer name="product.info.type">
<block class="Magento\Catalog\Block\Product\View\Type\Virtual" name="product.info.virtual" as="product_type_data" template="Magento_Catalog::product/view/type/default.phtml"/>
<container name="product.info.virtual.extra" after="product.info.virtual" as="product_type_data_extra" label="Product Extra Info"/>
</referenceContainer>
</body>
</page>
<?xml version="1.0"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
<referenceBlock name="checkout.cart.item.renderers">
<block class="Magento\Checkout\Block\Cart\Item\Renderer" name="checkout.cart.item.renderers.virtual" as="virtual" template="Magento_Checkout::cart/item/default.phtml">
<block class="Magento\Checkout\Block\Cart\Item\Renderer\Actions" name="checkout.cart.item.renderers.virtual.actions" as="actions">
<block class="Magento\Checkout\Block\Cart\Item\Renderer\Actions\Edit" name="checkout.cart.item.renderers.virtual.actions.edit" template="Magento_Checkout::cart/item/renderer/actions/edit.phtml"/>
<block class="Magento\Checkout\Block\Cart\Item\Renderer\Actions\Remove" name="checkout.cart.item.renderers.virtual.actions.remove" template="Magento_Checkout::cart/item/renderer/actions/remove.phtml"/>
</block>
</block>
</referenceBlock>
</body>
</page>
......@@ -10,31 +10,6 @@
<?= $block->getChildHtml() ?>
</div>
<style>
*{ margin: 0;padding: 0;list-style: none}
.mask{background-color:rgba(0,0,0,0.2); width:100%; height:100%;position:fixed;top:0;left:0;z-index: 999;
display: flex;
align-items: center;
justify-content: center;}
.prompt_box{
background: #ffffff;
border-radius: 6px;
position: fixed;
overflow: hidden;
height: auto;
padding: 10px;
}
.prompt_box .prompt_title{height:20px;line-height:20px;padding-left:20px;position: relative;}
.prompt_box .prompt_title h3{font-size:16px;color: #333333; margin-top:0;}
.prompt_box .prompt_cancel{width:24px;height:24px;background: url("img/cancel.png") no-repeat;position: absolute;right:0;top:0;}
.prompt_box .prompt_cont{position: relative;}
.prompt_box .prompt_cont .prompt_text{line-height:140px;padding-left:100px;}
.prompt_box .prompt_cont .prompt_sure{position: absolute;right:20px;bottom:34px;
width:50px;height: 26px;background:#1a9ebf;border-radius:5px;color:#ffffff;
font-size: 14px;line-height:26px;text-align: center;}
.hide{display:none;}
.show{display:block;}
@media (max-width: 780px){
.product-social-links .product-addto-links{
display: none;
......@@ -64,26 +39,37 @@
height: 55px;
}
</style>
<div class="mask hide">
<div class="prompt_box">
<div class="prompt_title product-intro-prompt_cancel">
<span class="prompt_cancel">X</span>
</div>
<div class="prompt_cont f1" style="display: none">
<?php echo $block->getLayout()->createBlock('Magento\Cms\Block\Block')->setBlockId('product-intro-fast-delivery')->toHtml();?>
</div>
<div class="prompt_cont f2" style="display: none">
<?php echo $block->getLayout()->createBlock('Magento\Cms\Block\Block')->setBlockId('product-intro-free-return')->toHtml();?>
</div>
<div class="prompt_cont f3" style="display: none">
<?php echo $block->getLayout()->createBlock('Magento\Cms\Block\Block')->setBlockId('product-intro-size-chart')->toHtml();?>
</div>
<div data-bind="mageInit: {
'Magento_Ui/js/modal/modal':{
'type': 'popup',
'title': '',
'trigger': '[data-trigger=trigger-freeshipping]',
'responsive': true,
'buttons' : []
}}">
<div class="content">
<?php echo $block->getLayout()->createBlock('Magento\Cms\Block\Block')->setBlockId('product-intro-fast-delivery')->toHtml();?>
</div>
</div>
<div data-bind="mageInit: {
'Magento_Ui/js/modal/modal':{
'type': 'popup',
'title': '',
'trigger': '[data-trigger=trigger-freeshipping-more]',
'responsive': true,
'buttons' : []
}}">
<div class="content">
<?php echo $block->getLayout()->createBlock('Magento\Cms\Block\Block')->setBlockId('product-intro-free-return')->toHtml();?>
</div>
</div>
<div style="width: 100%" class="product-view-freeshipping">
<div class="product-intro__freeshipping product-intro__bg-none">
<div class="product-intro__freeshipping-abt action" data-trigger="trigger-shipping">
<div class="product-intro__freeshipping-icon shipping "><i class="svgicon svgicon-gd-shipping"></i> <p>Fast Delivery</p> <span class="svgicon svgicon-gd-more-grey product-intro__freeshipping-more" id="product-intro__freeshipping-more"></span>
<div class="product-intro__freeshipping-abt action" >
<div class="product-intro__freeshipping-icon shipping " data-trigger="trigger-shipping"><i class="svgicon svgicon-gd-shipping"></i> <p>Fast Delivery</p> <span class="svgicon svgicon-gd-more-grey product-intro__freeshipping-more" data-trigger="trigger-freeshipping"></span>
</div>
<div class="free-wrapper">
......@@ -92,7 +78,7 @@
<div class="product-intro__freeshipping-item full-line paddingTop-0 paddingBottom-0 action" data-trigger="trigger2">
<div class="product-intro__freeshipping-icon">
<i class="svgicon svgicon-gd-freereturn"></i><p>Free Return &amp; Exchange</p> <span class="svgicon svgicon-gd-more-grey product-intro__freeshipping-more" id="product-intro__freeshipping-more-2" ></span> </div> <div class="product-intro__freeshipping-desc">
<i class="svgicon svgicon-gd-freereturn"></i><p>Free Return &amp; Exchange</p> <span class="svgicon svgicon-gd-more-grey product-intro__freeshipping-more" data-trigger="trigger-freeshipping-more" ></span> </div> <div class="product-intro__freeshipping-desc">
Learn More
</div>
</div>
......
......@@ -6,7 +6,20 @@
/** @var $block \Magento\Catalog\Block\Product\View */
?>
<div id="product-intro__freeshipping-more-3" >
<div data-bind="mageInit: {
'Magento_Ui/js/modal/modal':{
'type': 'popup',
'title': '',
'trigger': '[data-trigger=trigger]',
'responsive': true,
'buttons' : []
}}">
<div class="content">
<?php echo $block->getLayout()->createBlock('Magento\Cms\Block\Block')->setBlockId('product-intro-size-chart')->toHtml();?>
</div>
</div>
<div id="product-intro__freeshipping-more-3" data-trigger="trigger">
<a href="javascript:void(0);">Size Guide</a></span></div>
<style>
#product-intro__freeshipping-more-3{
......
<?php
$images = $block->getGalleryImages()->getItems();
$mainImage = current(array_filter($images, function ($img) use ($block) {
return $block->isMainImage($img);
}));
if (!empty($images) && empty($mainImage)) {
$mainImage = $block->getGalleryImages()->getFirstItem();
}
$helper = $block->getData('imageHelper');
$mainImageUrl = $mainImage ?
$mainImage->getData('medium_image_url') :
$helper->getDefaultPlaceholderUrl('image');
$width = (int) $block->getImageAttribute('product_page_image_medium', 'width');
$height = (int) $block->getImageAttribute('product_page_image_medium', 'height');
$height = $height ?: $width;
$thumbWidth = 50;
$thumbHeight = 66;
$thumbHeight = $thumbHeight ?: $thumbWidth;
$navType = $block->getGalleryOptions()->getVar('gallery/nav');
$responsiveImageHelper = $this->helper(\Swissup\Breeze\Helper\Image::class);
$srcset = $responsiveImageHelper->getSrcset($block->getProduct(), 'product_page_image_medium');
$sizes = $responsiveImageHelper->getSizes('product_page_image_medium');
$thumbSizes = $responsiveImageHelper->getSizes('product_page_image_small');
?>
<div class="breeze-gallery <?= $block->getGalleryOptions()->getVar('gallery/navdir') ?>">
<div class="stage <?= $mainImage && $mainImage->getVideoUrl() ? 'video' : '' ?>"
data-gallery-role="gallery-placeholder">
<div class="main-image-wrapper">
<img alt="<?= $mainImage ? $mainImage->getLabel() : '' ?>"
class="main-image"
src="<?= $mainImageUrl ?>"
width="<?= $width ?>"
height="<?= $height ?>"
<?php if ($srcset) : ?>
srcset="<?= $srcset ?>"
sizes="<?= $sizes ?>"
<?php endif ?>
/>
</div>
<?php if (count($images) > 1) : ?>
<a href="javasrcpit:void(0);" class="prev" tabindex="-1">
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 19l-7-7 7-7" />
</svg>
</a>
<a href="javasrcpit:void(0);" class="next" tabindex="-1">
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 5l7 7-7 7" />
</svg>
</a>
<?php endif ?>
<div class="controls">
<a href="#" class="zoom zoom-in">
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2">
<path stroke-linecap="round" stroke-linejoin="round" d="M12 4v16m8-8H4" />
</svg>
</a>
<a href="#" class="zoom zoom-out">
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2">
<path stroke-linecap="round" stroke-linejoin="round" d="M20 12H4" />
</svg>
</a>
</div>
<a href="#" class="close">
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12" />
</svg>
</a>
</div>
<div class="thumbnails <?php echo $navType ? '' : 'hidden' ?>">
<?php if (count($images) > 1) : // empty parent wrapper may be used at configurable product page ?>
<?php foreach ($images as $image) : ?>
<?php
$classes = array_filter([
'item',
$block->isMainImage($image) ? 'active' : '',
$image->getVideoUrl() ? 'video' : ''
]);
$srcset = $responsiveImageHelper->getSrcset($image, 'product_page_image_small');
?>
<a class="<?= implode(' ', $classes) ?>" href="javasrcpit:void(0);" name="<?= $image->getLargeImageUrl() ?>" title="<?= $image->getLabel() ?: __('View Image') ?>">
<img loading="lazy" alt="<?= $image->getLabel() ?>"
src="<?= $image->getSmallImageUrl() ?>"
<?php if ($srcset) : ?>
srcset="<?= $srcset ?>"
sizes="<?= $thumbSizes ?>"
<?php endif ?>
width="<?= $thumbWidth ?>"
height="<?= $thumbHeight ?>"
/>
</a>
<?php endforeach ?>
<?php endif ?>
</div>
</div>
<script type="text/x-magento-init">
{
"[data-gallery-role=gallery-placeholder]": {
"mage/gallery/gallery": {
"data": <?= /* @noEscape */ $block->getGalleryImagesJson() ?>,
"options": <?= /* @noEscape */ $block->getGalleryOptions()->getOptionsJson() ?>
}
}
}
</script>
<script type="text/x-magento-template" id="gallery-thumbnail">
<a class="<%- classes %>" href="javasrcpit:void(0);" name="<%- full %>">
<img loading="lazy" alt="<%- caption %>"
src="<%- thumb %>"
srcset="<%- srcset ? srcset.small : '' %>"
sizes="<?= $thumbSizes ?>"
width="<?= $thumbWidth ?>"
height="<?= $thumbHeight ?>"
/>
</a>
</script>
<style>
.breeze-gallery .prev, .breeze-gallery .next{
width: 40px;
height: 40px;
border-radius: 50%;
background-color: #fff;
}
</style>
<script>
require([
'jquery'
], function ($) {
$(".thumbnails > a").mouseover(function (s) {
var main_img = $(this).attr("name");
$(".main-image").attr("src",main_img);
$(".thumbnails > a").removeClass("active");
$(this).addClass("active");
});
$("a.next ").on('click',function () {
var s = $(".thumbnails").find("a.active");
$(".thumbnails > a").removeClass("active");
s.next().addClass("active");
var sd = $(".thumbnails > .item.active").attr('name');
if (typeof(sd) == "undefined"){
var sd = $(".thumbnails > .item.active").attr('name');
$(".thumbnails > a").removeClass("active");
$(".thumbnails > a:first").addClass("active");
sd = $(".thumbnails > a:first").attr('name');
}
$(".main-image").attr("src",sd);
});
$("a.prev ").on('click',function () {
var s = $(".thumbnails").find("a.active");
$(".thumbnails > a").removeClass("active");
s.prev().addClass("active");
var sd = $(".thumbnails > .item.active").attr('name');
if (typeof(sd) == "undefined"){
var sd = $(".thumbnails > .item.active").attr('name');
$(".thumbnails > a").removeClass("active");
$(".thumbnails > a:last").addClass("active");
sd = $(".thumbnails > a:last").attr('name');
}
$(".main-image").attr("src",sd);
});
});
</script>
......@@ -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(',',"366,244,188,193");
$news_ids = explode(',',"1315,1178,1125,1002");
//$news_ids = explode(',',"1,2");
$objectManager = \Magento\Framework\App\ObjectManager::getInstance();
......@@ -213,7 +213,7 @@ $image = 'new_products_content_widget_grid';
<div class="flash-sale-inner">
<?php
$templateType = \Magento\Catalog\Block\Product\ReviewRendererInterface::SHORT_VIEW;
$ids = explode(',',"133,138,148,158,167,172");
$ids = explode(',',"896,726,611,507,167,172");
//$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