Commit 2d9276ee by lmf

Merge branch 'developer' into production

parents 4fbb26cd 91947fa2
/app/etc/config.php
/.gitignore
cache
composer_home
log
page_cache
view_preprocessed
static
errors
media
opt
/app/etc/env.php
generated
var
.idea
/.php_cs.cache
/app/design/frontend/Joshine/breeze/Magento_Theme/templates/root.phtml
/pub/feed
......@@ -59,6 +59,11 @@ require(['jquery','banner'],function ($){
$('#left').css({'top':buttonTop,'line-height': 0});
$('#right').css({'top':buttonTop,'line-height': 0});
if (img_arr.length <= 1){
$('.banner1 .list').hide();
$('#left').hide();
$('#right').hide();
}
}
});
</script>
\ No newline at end of file
......@@ -150,16 +150,18 @@ define(['jquery'],function ($){
}
}
if (this._obj.autoPlay){
this._obj.t=setInterval(()=>{
this._obj.rightClick();
},this._obj.delayTime);
this.hover(function () {
clearInterval(that._obj.t)
},function () {
that._obj.t=setInterval(()=>{
that._obj.rightClick();
},that._obj.delayTime);
})
if (this._obj.img.length > 1){
this._obj.t=setInterval(()=>{
this._obj.rightClick();
},this._obj.delayTime);
this.hover(function () {
clearInterval(that._obj.t)
},function () {
that._obj.t=setInterval(()=>{
that._obj.rightClick();
},that._obj.delayTime);
})
}
}
}
......
......@@ -8,7 +8,7 @@ use Magento\Framework\View\Element\Template;
class Pager extends \Magento\Theme\Block\Html\Pager
{
const DEFAULT_PAGE_SIZE = 3;
const DEFAULT_PAGE_SIZE = 5;
/**
* @var string
*/
......
......@@ -108,7 +108,7 @@ class Images extends \Magento\Framework\View\Element\Template
*/
public function getResizedImagePath($item): string
{
return $this->imageHelper->resize($item->getPath(), self::REVIEW_COVER_WIDTH * 2);
return $this->imageHelper->resize($item->getPath(), self::REVIEW_COVER_WIDTH);
}
/**
......
<?php
namespace Joshine\Review\Data\Form\Element;
/**
* Class Image - add multiple file upload
*/
class Image extends \Magento\Framework\Data\Form\Element\Image
{
/**
* @return string
*/
public function getElementHtml()
{
$html = parent::getElementHtml();
$html = str_replace('type="file"', 'type="file" multiple accept="image/*" ', $html);
return $html;
}
}
<?php
namespace Joshine\Review\Model\Repository;
use Joshine\Review\Block\Images;
use Magento\Framework\Api\SearchCriteriaInterface;
use Magento\Framework\Exception\NoSuchEntityException;
use Magento\Framework\Exception\CouldNotDeleteException;
use Magento\Framework\Exception\CouldNotSaveException;
use Joshine\Review\Model\ResourceModel;
use Joshine\Review\Model\ImagesFactory;
use Magento\Framework\Api\Search\FilterGroup;
use Magento\Ui\Api\Data\BookmarkSearchResultsInterfaceFactory;
use Magento\Framework\Api\SortOrder;
use Magento\Framework\Api\SearchCriteriaBuilder;
use Magento\Framework\App\Filesystem\DirectoryList;
use Joshine\Review\Helper\ImageHelper;
class ImagesRepository
{
/**
* @var array
*/
private $images = [];
/**
* @var ResourceModel\Images
*/
private $imagesResource;
/**
* @var ImagesFactory
*/
private $imagesFactory;
/**
* @var ResourceModel\Images\CollectionFactory
*/
private $imagesCollectionFactory;
/**
* @var \Magento\Framework\Filesystem\Io\File
*/
private $ioFile;
/**
* @var null|string
*/
private $folderPath = null;
/**
* @var \Magento\Framework\Filesystem
*/
private $filesystem;
public function __construct(
\Joshine\Review\Model\ResourceModel\Images $imagesResource,
\Joshine\Review\Model\ImagesFactory $imagesFactory,
\Joshine\Review\Model\ResourceModel\Images\CollectionFactory $imagesCollectionFactory,
\Magento\Framework\Filesystem $filesystem,
\Magento\Framework\Filesystem\Io\File $ioFile
) {
$this->imagesResource = $imagesResource;
$this->imagesFactory = $imagesFactory;
$this->imagesCollectionFactory = $imagesCollectionFactory;
$this->ioFile = $ioFile;
$this->filesystem = $filesystem;
}
/**
* {@inheritdoc}
*/
public function get($imageId)
{
if (!isset($this->images[$imageId])) {
/** @var \Joshine\Review\Model\Images $image */
$image = $this->imagesFactory->create();
$this->imagesResource->load($image, $imageId);
if (!$image->getImageId()) {
throw new NoSuchEntityException(__('Rule with specified ID "%1" not found.', $imageId));
}
$this->images[$imageId] = $image;
}
return $this->images[$imageId];
}
/**
* @return string
*/
private function getFolderPath()
{
if ($this->folderPath === null) {
$this->folderPath = $this->filesystem->getDirectoryRead(
DirectoryList::MEDIA
)->getAbsolutePath(
ImageHelper::IMAGE_PATH
);
}
return $this->folderPath;
}
/**
* {@inheritdoc}
*/
public function delete( $image)
{
try {
$this->ioFile->rm($this->getFolderPath() . $image->getPath());
$this->ioFile->rm(
$this->getFolderPath() . 'resized/' . Images::REVIEW_COVER_WIDTH
);
$this->imagesResource->delete($image);
unset($this->images[$image->getId()]);
} catch (\Exception $e) {
if ($image->getImageId()) {
throw new CouldNotDeleteException(
__('Unable to remove image with ID %1. Error: %2', [$image->getImageId(), $e->getMessage()])
);
}
throw new CouldNotDeleteException(__('Unable to remove image. Error: %1', $e->getMessage()));
}
return true;
}
/**
* {@inheritdoc}
*/
public function deleteById($imageId)
{
$model = $this->get($imageId);
$this->delete($model);
return true;
}
}
<?php
namespace Joshine\Review\Plugin\Review\Block\Adminhtml\Edit;
use Joshine\Review\Helper\BlockHelper as BlockHelper;
use Joshine\Review\Model\Repository\VoteRepository;
use Magento\Backend\Block\Widget\Form\Generic as MagentoForm;
class Form
{
/**
* @var \Magento\Framework\Registry
*/
private $registry;
/**
* @var VoteRepository
*/
private $voteRepository;
/**
* @var BlockHelper
*/
private $blockHelper;
/**
* @var \Magento\Framework\DataObjectFactory
*/
private $dataObjectFactory;
public function __construct(
BlockHelper $blockHelper,
\Magento\Framework\Registry $registry,
VoteRepository $voteRepository,
\Magento\Framework\DataObjectFactory $dataObjectFactory
) {
$this->registry = $registry;
$this->voteRepository = $voteRepository;
$this->blockHelper = $blockHelper;
$this->dataObjectFactory = $dataObjectFactory;
}
/**
* @param MagentoForm $subject
* @param \Magento\Framework\Data\Form $form
* @return array
*/
public function beforeSetForm(
MagentoForm $subject,
\Magento\Framework\Data\Form $form
) {
$fieldset = $form->getElement('review_details') ?: $form->getElement('add_review_form');
$review = $this->registry->registry('review_data') ?: $this->dataObjectFactory->create();
$fieldset->addField(
'size_fits',
'select',
[
'label' =>__('Size Fits'),
'required' => false,
'values' => [
['value' => 0, 'label'=> __('---select---')],
['value' => 1, 'label'=> __('Small')],
['value' => 2, 'label'=> __('True to Size')],
['value' => 3, 'label'=> __('Large')],
] ,
'name' => 'size_fits',
'value' => (int)$review->getData('size_fits')
]
);
$form->setData('enctype', 'multipart/form-data');
$imageHtml = trim($this->blockHelper->getReviewImagesHtml($review->getId(), 8575));
$addImageTitle = __('Customer Images');
if ($imageHtml) {
$fieldset->addField(
'added_images',
'note',
[
'label' => __('Customer Images'),
'required' => false,
'name' => 'added_images',
'after_element_html' => $imageHtml
]
);
$addImageTitle = '';
}
$fieldset->addField(
'review_images',
\Joshine\Review\Data\Form\Element\Image::class,
[
'label' => $addImageTitle,
'name' => 'review_images[]',
'before_element_html' => __('Add new images')
]
);
return [$form];
}
/**
* @param $review
* @return \Magento\Framework\Phrase
*/
private function getReviewHelpfulness($review)
{
$vote = $this->voteRepository->getVotesCount($review->getId());
return __('%1 people found this helpful; %2 found this unhelpful.', $vote['plus'], $vote['minus']);
}
}
<?php
namespace Joshine\Review\Plugin\Review\Controller\Adminhtml\Product\Review;
use Magento\Review\Controller\Adminhtml\Product\Save as MagentoReview;
class Save
{
private $imagesRepository;
public function __construct(
\Joshine\Review\Model\Repository\ImagesRepository $imagesRepository
) {
$this->imagesRepository = $imagesRepository;
}
/**
* @param MagentoReview $subject
* @param $result
* @return mixed
*/
public function afterExecute(
MagentoReview $subject,
$result
) {
$this->removeImages($subject);
return $result;
}
/**
* @param MagentoReview $subject
*/
private function removeImages(MagentoReview $subject)
{
$images = $subject->getRequest()->getParam('review_remove_image', []);
if (is_array($images)) {
foreach ($images as $id => $image) {
$this->imagesRepository->deleteById($id);
}
}
}
}
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
<type name="Magento\Review\Block\Adminhtml\Edit\Form">
<plugin name="Joshine_Review::add-answer-field"
type="Joshine\Review\Plugin\Review\Block\Adminhtml\Edit\Form"/>
</type>
<type name="Magento\Review\Block\Adminhtml\Add\Form">
<plugin name="Joshine_Review::add-module-fields"
type="Joshine\Review\Plugin\Review\Block\Adminhtml\Edit\Form"/>
</type>
<type name="Magento\Review\Controller\Adminhtml\Product\Save">
<plugin name="Joshine_Review::add-module-fields::remove-image"
type="Joshine\Review\Plugin\Review\Controller\Adminhtml\Product\Review\Save"/>
</type>
</config>
<?php
/** @var \Joshine\Review\Block\Images $block */
$collection = $block->getCollection();
// phpcs:ignoreFile
?>
<style>
.review-images {
display: flex;
flex-wrap: wrap;
}
.review-slider-item {
position: relative;
flex-shrink: 0;
width: 150px;
height: 150px;
line-height: 150px;
overflow: hidden;
margin-right: 5px;
margin-bottom: 0.2em;
vertical-align: middle;
border: 1px solid #9E9E9E;
}
.review-slider-item img {
width: 100%;
height: 100%;
object-fit: cover;
}
.review-remove-image {
line-height: normal;
position: absolute;
top: .3rem;
left: .3rem;
color: white;
font-weight: lighter;
padding: .3em;
background-color:rgba(0,0,0,0.5);
}
</style>
<?php if ($collection->getSize()) : ?>
<div id="review-id-<?= $block->escapeHtmlAttr($block->getReviewId()); ?>"
class="review-images">
<?php foreach ($collection as $item) : ?>
<div class="review-slider-item" data-review-js="slider-item">
<a href="<?= $block->getFullImagePath($item); ?>" target="_blank" class="review-image-link" data-review-js="review-image">
<img class="review-image"
src="<?= /* @noEscape */ $block->getResizedImagePath($item);?>"
title="<?= $block->escapeHtml(__('Review image')); ?>"
alt="<?= $block->escapeHtml(__('Review image')); ?>"
/>
</a>
<label class="review-remove-image" title="<?= $block->escapeHtml(__('Remove image')); ?>">
<input class="review-checkbox"
value="1"
type="checkbox"
name="review_remove_image[<?= /* @noEscape */ (int)$item->getId();?>]"
style="margin-top: 0;"
>
<?= $block->escapeHtml(__('Remove'));?>
</label>
</div>
<?php endforeach; ?>
</div>
<?php endif;?>
......@@ -85,7 +85,6 @@
width: calc(100% - 288px);
display: -webkit-box;
display: flex;
padding-right: 150px;
}
.joshine-review-container .joshine-review-list-item .joshine-review-detail {
padding-right: 40px;
......@@ -94,6 +93,7 @@
.joshine-review-container .joshine-review-list-item .joshine-review-pics {
width: 50%;
display: flex;
flex-wrap: wrap;
}
.joshine-review-container .joshine-review-list-item .joshine-review-pic-item {
position: relative;
......@@ -103,6 +103,7 @@
line-height: 108px;
overflow: hidden;
margin-right: 5px;
margin-bottom: .2em;
}
.joshine-review-container .joshine-review-list-item .joshine-review-des-title {
......
......@@ -43,6 +43,9 @@ define([
shippingMethod['carrier_title'] + shippingMethodTitle :
shippingMethod['carrier_title'];
},
getShippingSaveMethodTitle: function () {
return ' Save';
},
/**
* @return {*|Boolean}
......@@ -53,7 +56,7 @@ define([
/**
* @return {*}
*/
getValue: function () {
var price;
......@@ -65,6 +68,33 @@ define([
return this.getFormattedPrice(price);
},
*/
getValue: function () {
var price;
if (!this.isCalculated()) {
return this.notCalculatedMessage;
}
price = this.totals()['shipping_amount'];
if(price == 0)
{
return this.getFormattedPrice(6.99);
}
return this.getFormattedPrice(price);
},
getSaveValue: function () {
var price;
if (!this.isCalculated()) {
return this.notCalculatedMessage;
}
price = this.totals()['shipping_amount'];
if(price == 0)
{
return '-'+this.getFormattedPrice(6.99);
}
},
/**
* If is set coupon code, but there wasn't displayed discount view.
*
......
......@@ -49,6 +49,14 @@ define([
isCalculated: function () {
return this.totals() && this.isFullMode() && quote.shippingMethod() != null;
},
isSaveShowed: function () {
var price = this.totals()['shipping_amount'];
if(price)
{
return false;
}
return true;
},
/**
* @return {*}
......
......@@ -5,62 +5,77 @@
*/
-->
<!-- ko if: isCalculated() && quoteIsVirtual == 0 -->
<!-- ko if: isBothPricesDisplayed() -->
<tr class="totals shipping excl">
<th class="mark" scope="row">
<span class="label" data-bind="text: title + ' ' + excludingTaxMessage"></span>
<!-- ko if: haveToShowCoupon() -->
<span class="label description" data-bind="text: getCouponDescription()"></span>
<!-- /ko -->
<span class="value" data-bind="text: getShippingMethodTitle()"></span>
</th>
<td class="amount">
<!-- ko if: isBothPricesDisplayed() -->
<tr class="totals shipping excl">
<th class="mark" scope="row">
<span class="label" data-bind="text: title + ' ' + excludingTaxMessage"></span>
<!-- ko if: haveToShowCoupon() -->
<span class="label description" data-bind="text: getCouponDescription()"></span>
<!-- /ko -->
<span class="value" data-bind="text: getShippingMethodTitle()"></span>
</th>
<td class="amount">
<span class="price"
data-bind="text: getExcludingValue(), attr: {'data-th': excludingTaxMessage}"></span>
</td>
</tr>
<tr class="totals shipping incl">
<th class="mark" scope="row">
<span class="label" data-bind="text: title + ' ' + includingTaxMessage"></span>
<!-- ko if: haveToShowCoupon() -->
<span class="label description" data-bind="text: getCouponDescription()"></span>
<!-- /ko -->
<span class="value" data-bind="text: getShippingMethodTitle()"></span>
</th>
<td class="amount">
</td>
</tr>
<tr class="totals shipping incl">
<th class="mark" scope="row">
<span class="label" data-bind="text: title + ' ' + includingTaxMessage"></span>
<!-- ko if: haveToShowCoupon() -->
<span class="label description" data-bind="text: getCouponDescription()"></span>
<!-- /ko -->
<span class="value" data-bind="text: getShippingMethodTitle()"></span>
</th>
<td class="amount">
<span class="price"
data-bind="text: getIncludingValue(), attr: {'data-th': title + ' ' + excludingTaxMessage}"></span>
</td>
</tr>
<!-- /ko -->
<!-- ko if: isIncludingDisplayed() -->
<tr class="totals shipping incl">
<th class="mark" scope="row">
<span class="label" data-bind="i18n: title"></span>
<!-- ko if: haveToShowCoupon() -->
<span class="label description" data-bind="text: getCouponDescription()"></span>
<!-- /ko -->
<span class="value" data-bind="text: getShippingMethodTitle()"></span>
</th>
<td class="amount">
</td>
</tr>
<!-- /ko -->
<!-- ko if: isIncludingDisplayed() -->
<tr class="totals shipping incl">
<th class="mark" scope="row">
<span class="label" data-bind="i18n: title"></span>
<!-- ko if: haveToShowCoupon() -->
<span class="label description" data-bind="text: getCouponDescription()"></span>
<!-- /ko -->
<span class="value" data-bind="text: getShippingMethodTitle()"></span>
</th>
<td class="amount">
<span class="price"
data-bind="text: getIncludingValue(), attr: {'data-th': title}"></span>
</td>
</tr>
<!-- /ko -->
<!-- ko if: isExcludingDisplayed() -->
<tr class="totals shipping excl">
<th class="mark" scope="row">
<span class="label" data-bind="i18n: title"></span>
<!-- ko if: haveToShowCoupon() -->
<span class="label description" data-bind="text: getCouponDescription()"></span>
<!-- /ko -->
<span class="value" data-bind="text: getShippingMethodTitle()"></span>
</th>
<td class="amount">
</td>
</tr>
<!-- /ko -->
<!-- ko if: isExcludingDisplayed() -->
<tr class="totals shipping excl">
<th class="mark" scope="row">
<span class="label" data-bind="i18n: title"></span>
<!-- ko if: haveToShowCoupon() -->
<span class="label description" data-bind="text: getCouponDescription()"></span>
<!-- /ko -->
<span class="value" data-bind="text: getShippingMethodTitle()"></span>
</th>
<td class="amount">
<span class="price"
data-bind="text: getValue(), attr: {'data-th': title}"></span>
</td>
</tr>
<!-- /ko -->
</td>
</tr>
<!-- /ko -->
<!-- ko if: isExcludingDisplayed() && isSaveShowed()-->
<tr class="totals shipping excl shipping-save">
<th class="mark" scope="row">
<span class="label" data-bind="i18n: title"></span>
<!-- ko if: haveToShowCoupon() -->
<span class="label description" data-bind="text: getCouponDescription()"></span>
<!-- /ko -->
<span class="value" data-bind="text: getShippingSaveMethodTitle()"></span>
</th>
<td class="amount">
<span class="price"
data-bind="text: getSaveValue(), attr: {'data-th': title}"></span>
</td>
</tr>
<!-- /ko -->
<!-- /ko -->
......@@ -5,86 +5,107 @@
*/
-->
<!-- ko if: quoteIsVirtual == 0 -->
<!-- ko if: isBothPricesDisplayed() -->
<tr class="totals shipping excl">
<th class="mark" scope="row">
<span class="label" data-bind="text: title+ ' ' + excludingTaxMessage"></span>
<!-- ko if: haveToShowCoupon() -->
<span class="label description" data-bind="text: getCouponDescription()"></span>
<!-- /ko -->
<span class="value" data-bind="text: getShippingMethodTitle()"></span>
</th>
<td class="amount">
<!-- ko if: isCalculated() -->
<span class="price"
data-bind="text: getExcludingValue(), attr: {'data-th': excludingTaxMessage}"></span>
<!-- /ko -->
<!-- ko ifnot: isCalculated() -->
<span class="not-calculated"
data-bind="text: getExcludingValue(), attr: {'data-th': excludingTaxMessage}"></span>
<!-- /ko -->
</td>
</tr>
<tr class="totals shipping incl">
<th class="mark" scope="row">
<span class="label" data-bind="text: title + ' ' + includingTaxMessage"></span>
<!-- ko if: haveToShowCoupon() -->
<span class="label description" data-bind="text: getCouponDescription()"></span>
<!-- /ko -->
<span class="value" data-bind="text: getShippingMethodTitle()"></span>
</th>
<td class="amount">
<!-- ko if: isCalculated() -->
<span class="price"
data-bind="text: getIncludingValue(), attr: {'data-th': title + ' ' + excludingTaxMessage}"></span>
<!-- /ko -->
<!-- ko ifnot: isCalculated() -->
<span class="not-calculated"
data-bind="text: getIncludingValue(), attr: {'data-th': title + ' ' + excludingTaxMessage}"></span>
<!-- /ko -->
</td>
</tr>
<!-- /ko -->
<!-- ko if: isIncludingDisplayed() -->
<tr class="totals shipping incl">
<th class="mark" scope="row">
<span class="label" data-bind="i18n: title"></span>
<!-- ko if: haveToShowCoupon() -->
<span class="label description" data-bind="text: getCouponDescription()"></span>
<!-- /ko -->
<span class="value" data-bind="text: getShippingMethodTitle()"></span>
</th>
<td class="amount">
<!-- ko if: isCalculated() -->
<span class="price"
data-bind="text: getIncludingValue(), attr: {'data-th': title}"></span>
<!-- /ko -->
<!-- ko ifnot: isCalculated() -->
<span class="not-calculated"
data-bind="text: getIncludingValue(), attr: {'data-th': title}"></span>
<!-- /ko -->
</td>
</tr>
<!-- /ko -->
<!-- ko if: isExcludingDisplayed() -->
<tr class="totals shipping excl">
<th class="mark" scope="row">
<span class="label" data-bind="i18n: title"></span>
<!-- ko if: haveToShowCoupon() -->
<span class="label description" data-bind="text: getCouponDescription()"></span>
<!-- /ko -->
<span class="value" data-bind="text: getShippingMethodTitle()"></span>
</th>
<td class="amount">
<!-- ko if: isCalculated() -->
<span class="price"
data-bind="text: getValue(), attr: {'data-th': title}"></span>
<!-- /ko -->
<!-- ko ifnot: isCalculated() -->
<span class="not-calculated"
data-bind="text: getValue(), attr: {'data-th': title}"></span>
<!-- /ko -->
</td>
</tr>
<!-- /ko -->
<!-- ko if: isBothPricesDisplayed() -->
<tr class="totals shipping excl">
<th class="mark" scope="row">
<span class="label" data-bind="text: title+ ' ' + excludingTaxMessage"></span>
<!-- ko if: haveToShowCoupon() -->
<span class="label description" data-bind="text: getCouponDescription()"></span>
<!-- /ko -->
<span class="value" data-bind="text: getShippingMethodTitle()"></span>
</th>
<td class="amount">
<!-- ko if: isCalculated() -->
<span class="price"
data-bind="text: getExcludingValue(), attr: {'data-th': excludingTaxMessage}"></span>
<!-- /ko -->
<!-- ko ifnot: isCalculated() -->
<span class="not-calculated"
data-bind="text: getExcludingValue(), attr: {'data-th': excludingTaxMessage}"></span>
<!-- /ko -->
</td>
</tr>
<tr class="totals shipping incl">
<th class="mark" scope="row">
<span class="label" data-bind="text: title + ' ' + includingTaxMessage"></span>
<!-- ko if: haveToShowCoupon() -->
<span class="label description" data-bind="text: getCouponDescription()"></span>
<!-- /ko -->
<span class="value" data-bind="text: getShippingMethodTitle()"></span>
</th>
<td class="amount">
<!-- ko if: isCalculated() -->
<span class="price"
data-bind="text: getIncludingValue(), attr: {'data-th': title + ' ' + excludingTaxMessage}"></span>
<!-- /ko -->
<!-- ko ifnot: isCalculated() -->
<span class="not-calculated"
data-bind="text: getIncludingValue(), attr: {'data-th': title + ' ' + excludingTaxMessage}"></span>
<!-- /ko -->
</td>
</tr>
<!-- /ko -->
<!-- ko if: isIncludingDisplayed() -->
<tr class="totals shipping incl">
<th class="mark" scope="row">
<span class="label" data-bind="i18n: title"></span>
<!-- ko if: haveToShowCoupon() -->
<span class="label description" data-bind="text: getCouponDescription()"></span>
<!-- /ko -->
<span class="value" data-bind="text: getShippingMethodTitle()"></span>
</th>
<td class="amount">
<!-- ko if: isCalculated() -->
<span class="price"
data-bind="text: getIncludingValue(), attr: {'data-th': title}"></span>
<!-- /ko -->
<!-- ko ifnot: isCalculated() -->
<span class="not-calculated"
data-bind="text: getIncludingValue(), attr: {'data-th': title}"></span>
<!-- /ko -->
</td>
</tr>
<!-- /ko -->
<!-- ko if: isExcludingDisplayed() -->
<tr class="totals shipping excl">
<th class="mark" scope="row">
<span class="label" data-bind="i18n: title"></span>
<!-- ko if: haveToShowCoupon() -->
<span class="label description" data-bind="text: getCouponDescription()"></span>
<!-- /ko -->
<span class="value" data-bind="text: getShippingMethodTitle()"></span>
</th>
<td class="amount">
<!-- ko if: isCalculated() -->
<span class="price"
data-bind="text: getValue(), attr: {'data-th': title}"></span>
<!-- /ko -->
<!-- ko ifnot: isCalculated() -->
<span class="not-calculated"
data-bind="text: getValue(), attr: {'data-th': title}"></span>
<!-- /ko -->
</td>
</tr>
<!-- /ko -->
<!-- ko if: isExcludingDisplayed() && isSaveShowed() -->
<tr class="totals shipping excl shipping-save">
<th class="mark" scope="row">
<span class="label" data-bind="i18n: title"></span>
<!-- ko if: haveToShowCoupon() -->
<span class="label description" data-bind="text: getCouponDescription()"></span>
<!-- /ko -->
<span class="value" data-bind="text: getShippingSaveMethodTitle()"></span>
</th>
<td class="amount">
<!-- ko if: isCalculated() -->
<span class="price"
data-bind="text: getSaveValue(), attr: {'data-th': title}"></span>
<!-- /ko -->
<!-- ko ifnot: isCalculated() -->
<span class="not-calculated"
data-bind="text: getSaveValue(), attr: {'data-th': title}"></span>
<!-- /ko -->
</td>
</tr>
<!-- /ko -->
<!-- /ko -->
......@@ -28,7 +28,11 @@ endif;
.sparsh-free-shipping-bar-goal-message{
width: 100%;
height: 60px;
background-image: url("<?= $block->getImgUrl($barData['background_img']) ?>");
<?php
if ($barData['background_img']){
echo 'background-image: url("' . $block->getImgUrl($barData['background_img']) .'");';
}
?>
line-height: 60px;
background-size: 100% 100%!important;
background-repeat: no-repeat;
......@@ -36,7 +40,11 @@ endif;
@media (max-width: 768px) {
.sparsh-free-shipping-bar-goal-message{
background-image: url("<?= $block->getImgUrl($barData['background_img_phone']) ?>");
<?php
if ($barData['background_img_phone']){
echo 'background-image: url("' . $block->getImgUrl($barData['background_img_phone']) .'");';
}
?>
width: 100%;
height: 40px;
line-height: 40px;
......
......@@ -16,6 +16,7 @@ if ($isActive == 1): ?>
</script>
<?php endif; ?>
<script>
var sparsh_mfp_wrap = document.getElementsByClassName('sparsh-mfp-wrap');
sparsh_mfp_wrap[0].removeAttribute("style");
require(['jquery'],function ($){
$('.sparsh-mfp-wrap').attr('style','');
});
</script>
......@@ -40,9 +40,9 @@ $schema = ($block->getZone() == 'item_view') ? true : false;
<?php
$seller = number_format((1 - number_format($finalPriceModel->getAmount()->getValue() / $priceModel->getAmount()->getValue(),2)) *100,0) ?>
<?php if (!$block->isProductList()) :?>
<span style="background-color: #ee0000;height: 20px;color: #ffffff;font-size: 16px;font-weight: 600;margin-left: 10px;padding: 2px;">SAVE <?=$seller?>%</span>
<span class="product-info-promotion-span">- <?=$seller?>%</span>
<?php else :?>
<span style="position: absolute;left: 15px;top: 15px;z-index: 1;color: #ffffff;background-color: #ee0000;font-size: 16px;font-weight: 600;">SAVE <?=$seller?>%</span>
<span class="product-list-promotion-span">- <?=$seller?>%</span>
<?php endif; ?>
<?php else :?>
......
......@@ -19,7 +19,7 @@
<referenceBlock name="header.account" remove="true" />
<referenceBlock name="header.wishlist" remove="true" />
<referenceBlock name="minicart" remove="true" />
<referenceBlock name="checkout.cart.crosssell" remove="true"/>
<referenceContainer name="header.container">
<block class="Magento\Cms\Block\Block" name="cart.payment.top">
<arguments>
......
......@@ -35,7 +35,7 @@ $schema = ($block->getZone() == 'item_view') ? true : false;
</span>
<?php
$seller = number_format((1 - number_format($finalPriceModel->getAmount()->getValue() / $priceModel->getAmount()->getValue(),2)) *100,0) ?>
<span style="position: absolute;left: 15px;top: 15px;z-index: 1;color: #ffffff;background-color: #ee0000;font-size: 16px;font-weight: 600;">SAVE <?=$seller?>%</span>
<span class="product-list-promotion-span">- <?=$seller?>%</span>
<?php endif; ?>
......@@ -51,7 +51,7 @@ $schema = ($block->getZone() == 'item_view') ? true : false;
</span>
<?php
$seller = number_format((1 - number_format($finalPriceModel->getAmount()->getValue() / $priceModel->getAmount()->getValue(),2)) *100,0) ?>
<span style="background-color: #ee0000;height: 20px;color: #ffffff;font-size: 16px;font-weight: 600;margin-left: 10px;padding: 2px;">SAVE <?=$seller?>%</span>
<span class="product-info-promotion-span">- <?=$seller?>%</span>
<?php endif; ?>
<?php if ($block->showMinimalPrice()) : ?>
......
......@@ -704,6 +704,9 @@ p.shopbycate-title {
text-align: center;
margin: 10px;
}
.loading-mask .loader img {
display: block!important;
}
.select-element.section-before-footer.clearfix span img {max-height: 100%;width: auto;}
.baozhang_before_footer{width: 16.5%;float: left;}
......@@ -723,6 +726,9 @@ p.shopbycate-title {
.checkout-cart-index .new-qty .input-text{
text-align: center;
}
.checkout-cart-index .shipping-save .amount,.checkout-index-index .shipping-save .amount{
color: #ff373c;
}
.checkout-cart-index .qty-change{
font-size: 18px;
font-weight: bold;
......@@ -851,6 +857,15 @@ p.shopbycate-title {
.block-minicart .subtotal {
margin-right: 1rem;
}
.loading-mask .loader {
width: auto;
height: auto;
position: absolute;
border: none;
animation-play-state: paused;
top: 45%;
left: 45%;
}
}
.checkout-cart-index .cart-container .cart-summary {
gap: 0px;
......@@ -865,6 +880,12 @@ p.shopbycate-title {
.checkout-index-index .header.content,.checkout-cart-index .header.content{
padding: 15px 0px 10px;
}
.loading-mask .loader {
width: auto;
height: auto;
border: none;
animation-play-state: paused;
}
}
.checkout-index-index .details-qty,.checkout-cart-index .details-qty{
display: block;
......@@ -2902,6 +2923,50 @@ strong#block-related-heading,strong#block-upsell-heading{ font-weight: 600; colo
z-index: 10;
display: none;
}
.block .product-info-promotion-span{
position: absolute;
left: 1px;
top: 12px;
}
.product-info-promotion-span{
background-color: #ee0000;
height: 20px;
color: #ffffff;
font-size: 16px;
font-weight: 600;
margin-left: 10px;
padding: 2px 12px;
line-height: 18px;
}
.product-list-promotion-span{
position: absolute;
left: 15px;
top: 15px;
z-index: 1;
color: #ffffff;
background-color: #ee0000;
font-size: 16px;
font-weight: 600;
padding: 0 10px;
}
@media (max-width: 768px) {
.product-info-promotion-span{
font-size: 12px;
font-weight: bold;
}
.product-list-promotion-span{
font-size: 12px;
font-weight: bold;
}
}
/*导入Joshine工具类*/
@import "./_joshine_col";
@import "./_joshine_utils";
......

16.9 KB | W: | H:

325 KB | W: | H:

lib/web/images/loader-1.gif
lib/web/images/loader-1.gif
lib/web/images/loader-1.gif
lib/web/images/loader-1.gif
  • 2-up
  • Swipe
  • Onion skin

1.99 KB | W: | H:

325 KB | W: | H:

lib/web/images/loader-2.gif
lib/web/images/loader-2.gif
lib/web/images/loader-2.gif
lib/web/images/loader-2.gif
  • 2-up
  • Swipe
  • Onion skin
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