Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
J
joshine
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
joshine
Commits
2d9276ee
Commit
2d9276ee
authored
Mar 15, 2023
by
lmf
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'developer' into production
parents
4fbb26cd
91947fa2
Show whitespace changes
Inline
Side-by-side
Showing
25 changed files
with
968 additions
and
60 deletions
+968
-60
.gitignore
+0
-18
app/code/Joshine/Banner/view/frontend/templates/index.phtml
+6
-0
app/code/Joshine/Banner/view/frontend/web/js/banner.js
+3
-0
app/code/Joshine/Review/Block/Components/Pager.php
+1
-1
app/code/Joshine/Review/Block/Images.php
+1
-1
app/code/Joshine/Review/Data/Form/Element/Image.php
+19
-0
app/code/Joshine/Review/Model/Repository/ImagesRepository.php
+140
-0
app/code/Joshine/Review/Plugin/Review/Block/Adminhtml/Edit/Form.php
+115
-0
app/code/Joshine/Review/Plugin/Review/Controller/Adminhtml/Product/Review/Save.php
+43
-0
app/code/Joshine/Review/etc/adminhtml/di.xml
+17
-0
app/code/Joshine/Review/view/adminhtml/templates/images.phtml
+68
-0
app/code/Joshine/Review/view/frontend/templates/product/view/list.phtml
+369
-3
app/code/Joshine/Review/view/frontend/web/css/_review.css
+2
-1
app/code/Magento/Checkout/view/frontend/web/js/view/summary/shipping.js
+31
-1
app/code/Magento/Tax/view/frontend/web/js/view/checkout/summary/shipping.js
+8
-0
app/code/Magento/Tax/view/frontend/web/template/checkout/cart/totals/shipping.html
+28
-13
app/code/Magento/Tax/view/frontend/web/template/checkout/summary/shipping.html
+34
-13
app/code/Sparsh/FreeShippingBar/view/frontend/templates/free_shipping_bar.phtml
+10
-2
app/code/Sparsh/QuickView/view/frontend/templates/initialize.phtml
+3
-2
app/design/frontend/Joshine/breeze/Magento_Catalog/templates/product/price/final_price.phtml
+2
-2
app/design/frontend/Joshine/breeze/Magento_Checkout/layout/checkout_cart_index.xml
+1
-1
app/design/frontend/Joshine/breeze/Magento_ConfigurableProduct/templates/product/price/final_price.phtml
+2
-2
app/design/frontend/Joshine/breeze/web/css/_custom.less
+65
-0
lib/web/images/loader-1.gif
+0
-0
lib/web/images/loader-2.gif
+0
-0
No files found.
.gitignore
deleted
100644 → 0
View file @
4fbb26cd
/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
app/code/Joshine/Banner/view/frontend/templates/index.phtml
View file @
2d9276ee
...
...
@@ -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
app/code/Joshine/Banner/view/frontend/web/js/banner.js
View file @
2d9276ee
...
...
@@ -150,6 +150,7 @@ define(['jquery'],function ($){
}
}
if
(
this
.
_obj
.
autoPlay
){
if
(
this
.
_obj
.
img
.
length
>
1
){
this
.
_obj
.
t
=
setInterval
(()
=>
{
this
.
_obj
.
rightClick
();
},
this
.
_obj
.
delayTime
);
...
...
@@ -162,5 +163,6 @@ define(['jquery'],function ($){
})
}
}
}
});
\ No newline at end of file
app/code/Joshine/Review/Block/Components/Pager.php
View file @
2d9276ee
...
...
@@ -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
*/
...
...
app/code/Joshine/Review/Block/Images.php
View file @
2d9276ee
...
...
@@ -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
);
}
/**
...
...
app/code/Joshine/Review/Data/Form/Element/Image.php
0 → 100644
View file @
2d9276ee
<?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
;
}
}
app/code/Joshine/Review/Model/Repository/ImagesRepository.php
0 → 100644
View file @
2d9276ee
<?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
;
}
}
app/code/Joshine/Review/Plugin/Review/Block/Adminhtml/Edit/Form.php
0 → 100644
View file @
2d9276ee
<?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'
]);
}
}
app/code/Joshine/Review/Plugin/Review/Controller/Adminhtml/Product/Review/Save.php
0 → 100644
View file @
2d9276ee
<?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
);
}
}
}
}
app/code/Joshine/Review/etc/adminhtml/di.xml
0 → 100644
View file @
2d9276ee
<?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>
app/code/Joshine/Review/view/adminhtml/templates/images.phtml
0 → 100644
View file @
2d9276ee
<?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
;
?>
app/code/Joshine/Review/view/frontend/templates/product/view/list.phtml
View file @
2d9276ee
...
...
@@ -291,7 +291,7 @@ $imagesBlock = $helper->getReviewImagesBlock(15, $block->getProductId());
.j-modal
.j-modal-dialog
{
position
:
relative
;
width
:
530px
;
margin
:
30px
auto
;
margin
:
7rem
auto
;
}
.j-modal
.j-modal-content
{
...
...
@@ -472,6 +472,137 @@ $imagesBlock = $helper->getReviewImagesBlock(15, $block->getProductId());
overflow
:
hidden
;
border
:
1px
solid
#efefef
;
}
.joshine-mobile-image-box
{
position
:
fixed
;
top
:
0
;
right
:
0
;
bottom
:
0
;
left
:
0
;
height
:
100%
;
z-index
:
1000
;
background
:
rgba
(
0
,
0
,
0
);
}
.joshine-mobile-image-box
.scroll-wrapper
{
transition-duration
:
0ms
;
transform
:
translate3d
(
0px
,
0px
,
0px
);
position
:
relative
;
width
:
100%
;
height
:
100%
;
z-index
:
1
;
display
:
-webkit-box
;
display
:
flex
;
-webkit-transition-property
:
-webkit-transform
;
transition-property
:
transform
,
-webkit-transform
;
-webkit-box-sizing
:
content-box
;
box-sizing
:
content-box
;
}
.joshine-mobile-image-box
.scroll-wrapper
.scroll-wrapper-item
{
flex-shrink
:
0
;
width
:
100%
;
height
:
100%
;
position
:
relative
;
-webkit-transition-property
:
-webkit-transform
;
transition-property
:
-webkit-transform
;
transition-property
:
transform
;
transition-property
:
transform
,
-webkit-transform
;
display
:
-webkit-box
;
display
:
flex
;
display
:
-ms-flexbox
;
-webkit-box-align
:
center
;
align-items
:
center
;
-webkit-box-pack
:
center
;
justify-content
:
center
;
}
.joshine-mobile-image-box
.scroll-wrapper-item
img
{
width
:
100%
;
max-height
:
100%
;
}
.joshine-mobile-image-box-bottom
{
padding
:
.7em
;
position
:
absolute
;
height
:
9rem
;
left
:
0
;
color
:
#fff
;
bottom
:
0
;
width
:
100%
;
overflow
:
hidden
;
z-index
:
1
;
font-size
:
1rem
;
line-height
:
1.2rem
;
background
:
-webkit-gradient
(
linear
,
left
top
,
left
bottom
,
from
(
#0000003
b
),
to
(
rgba
(
0
,
0
,
0
,
.1
)));
background
:
linear-gradient
(
180deg
,
#0000003
b
,
rgb
(
0
0
.1
));
}
.joshine-mobile-image-wrapper
{
position
:
fixed
;
top
:
0
;
right
:
0
;
bottom
:
0
;
left
:
0
;
display
:
-webkit-box
;
display
:
-webkit-flex
;
display
:
-ms-flexbox
;
display
:
flex
;
-webkit-align-items
:
center
;
-webkit-box-align
:
center
;
-ms-flex-align
:
center
;
align-items
:
center
;
-webkit-box-pack
:
center
;
-webkit-justify-content
:
center
;
-ms-flex-pack
:
center
;
justify-content
:
center
;
}
.joshine-mobile-image-box-container
{
margin-left
:
auto
;
margin-right
:
auto
;
position
:
relative
;
overflow
:
hidden
;
list-style
:
none
;
padding
:
0
;
z-index
:
1
;
height
:
100%
;
}
.joshine-mobile-image-box-content
{
color
:
#fff
;
height
:
100%
;
overflow
:
auto
;
margin-bottom
:
0.32rem
;
}
.image-box-content-title
{
margin-bottom
:
.3rem
;
line-height
:
.8rem
;
color
:
hsla
(
0
,
0%
,
100%
,
.8
);
}
.joshine-mobile-image-box
.close
{
color
:
white
;
position
:
absolute
;
right
:
1rem
;
top
:
1rem
;
color
:
#000
;
-webkit-text-stroke
:
0.02rem
#fff
;
font-weight
:
400
;
}
.joshine-mobile-image-box
.close
svg
{
width
:
2.5rem
;
height
:
2.5rem
;
}
.joshine-review-pic-item
{
cursor
:
pointer
;
}
.review-box-size
{
font-size
:
.7rem
;
}
.review-box-content
{
font-size
:
.9rem
;
}
.review-box-title
{
font-size
:
.8rem
;
}
</style>
<div
class=
"joshine-model-warp joshine-hidden"
>
...
...
@@ -480,7 +611,9 @@ $imagesBlock = $helper->getReviewImagesBlock(15, $block->getProductId());
<div
class=
"j-modal-dialog"
>
<div
class=
"j-modal-content"
>
<div
class=
"j-modal-header"
>
<span
class=
"joshine-close"
>
x
</span>
<span
class=
"joshine-close"
>
<svg
t=
"1678760827915"
class=
"icon"
viewBox=
"0 0 1024 1024"
version=
"1.1"
xmlns=
"http://www.w3.org/2000/svg"
p-id=
"2762"
width=
"200"
height=
"200"
><path
d=
"M579.888 512l190.064-190.064a48 48 0 0 0-67.888-67.872L512 444.112 321.936 254.064a48 48 0 1 0-67.872 67.872L444.112 512 254.064 702.064a48 48 0 1 0 67.872 67.872L512 579.888l190.064 190.064a48 48 0 0 0 67.872-67.888L579.888 512z"
fill=
"#dbdbdb"
p-id=
"2763"
data-spm-anchor-id=
"a313x.7781069.0.i3"
class=
"selected"
></path></svg>
</span>
</div>
<div
class=
"j-modal-body"
>
<div
class=
"modal-reviews-details row"
>
...
...
@@ -531,6 +664,31 @@ $imagesBlock = $helper->getReviewImagesBlock(15, $block->getProductId());
</div>
</div>
<div
class=
"joshine-mobile-image-box joshine-hidden"
>
<div
class=
"joshine-mobile-image-box-container"
>
<div
class=
"joshine-mobile-image-wrapper"
>
<div
class=
"scroll-wrapper"
>
</div>
</div>
<div
class=
"joshine-mobile-image-box-bottom"
>
<div
class=
"joshine-mobile-image-box-content"
>
<div
class=
"image-box-content-title"
>
<input
type=
"hidden"
id=
"review-box-id"
>
<p
class=
"review-box-title"
></p>
<span
class=
"review-box-size"
></span>
</div>
<span
class=
"review-box-content"
></span>
</div>
</div>
<div
class=
"joshine-mobile-image-box-top"
>
</div>
<div
class=
"close"
>
<svg
t=
"1678760827915"
class=
"icon"
viewBox=
"0 0 1024 1024"
version=
"1.1"
xmlns=
"http://www.w3.org/2000/svg"
p-id=
"2762"
width=
"200"
height=
"200"
><path
d=
"M579.888 512l190.064-190.064a48 48 0 0 0-67.888-67.872L512 444.112 321.936 254.064a48 48 0 1 0-67.872 67.872L444.112 512 254.064 702.064a48 48 0 1 0 67.872 67.872L512 579.888l190.064 190.064a48 48 0 0 0 67.872-67.888L579.888 512z"
fill=
"#dbdbdb"
p-id=
"2763"
data-spm-anchor-id=
"a313x.7781069.0.i3"
class=
"selected"
></path></svg>
</div>
</div>
</div>
<script
type=
"text/javascript"
>
require
([
'jquery'
,
'ko'
...
...
@@ -689,7 +847,6 @@ $imagesBlock = $helper->getReviewImagesBlock(15, $block->getProductId());
$
(
'.image-full-wrapper'
).
html
(
html
);
}
});
$
(
".joshine-close"
).
on
(
'click'
,
function
()
{
...
...
@@ -784,5 +941,213 @@ $imagesBlock = $helper->getReviewImagesBlock(15, $block->getProductId());
return
review
;
}
var
$galleryElement
=
document
.
querySelector
(
".joshine-mobile-image-wrapper .scroll-wrapper"
);
let
distanceScrollOne
=
$
(
window
).
width
();
//照片切换阈值
let
threshold
=
{
time
:
400
,
distance
:
parseInt
(
distanceScrollOne
/
2
)
};
let
start
=
{};
let
scrollIdx
=
0
;
let
maxScrollIdx
=
1
;
let
current
=
getTranslateXY
(
$galleryElement
);
$galleryElement
.
addEventListener
(
'pointerdown'
,
galleryStartHandler
,
false
);
// 阻止移动端默认行为
$galleryElement
.
addEventListener
(
'touchstart'
,
evt
=>
{
evt
.
preventDefault
();
},
false
);
$
(
".joshine-review-container-mobile .joshine-review-pic-item"
).
on
(
'click'
,
function
(
evt
){
var
reviewId
=
$
(
this
).
data
(
'reviews-id'
);
var
productId
=
$
(
this
).
data
(
'product-id'
);
var
image_id
=
$
(
this
).
data
(
'image-id'
);
var
formKey
=
$
.
mage
.
cookies
.
get
(
'form_key'
);
var
data
=
'review_id='
+
reviewId
+
'&form_key='
+
formKey
+
'&product_id='
+
productId
;
$
.
ajax
({
url
:
'/joshine_review/ajax/reviewinfo'
,
data
:
data
,
type
:
'GET'
,
dataType
:
'json'
,
success
:
function
(
response
)
{
reviewList
=
response
.
data
;
displayScrollItem
(
response
);
$
(
".joshine-mobile-image-box"
).
removeClass
(
'joshine-hidden'
);
}
});
function
displayScrollItem
(
response
)
{
var
html
=
''
;
var
image_index
=
0
;
var
data
=
response
.
data
;
for
(
let
i
=
0
;
i
<
data
.
length
;
i
++
)
{
for
(
let
j
=
0
;
j
<
data
[
i
].
images
.
full
.
length
;
j
++
)
{
html
+=
`
<div class="scroll-wrapper-item" data-review-id="
${
data
[
i
].
review_id
}
" data-img-index="
${
image_index
}
" data-image-id="
${
data
[
i
].
images
.
full
[
j
].
image_id
}
">
<img src="
${
data
[
i
].
images
.
full
[
j
].
url
}
" alt="">
</div>
`
;
image_index
++
;
}
}
maxScrollIdx
=
image_index
-
1
;
$
(
".joshine-mobile-image-wrapper .scroll-wrapper"
).
html
(
html
);
let
idx
=
findGoScrollIdx
(
image_id
);
goScrollMove
(
idx
);
}
function
findGoScrollIdx
(
image_id
)
{
let
res
=
0
;
$
(
".scroll-wrapper-item"
).
each
(
function
(
index
,
ele
)
{
if
(
$
(
ele
).
data
(
'image-id'
)
==
image_id
)
{
res
=
$
(
ele
).
data
(
'img-index'
);
}
});
return
res
;
}
});
$
(
".joshine-mobile-image-box .close"
).
on
(
'click'
,
function
(
evt
){
$
(
".joshine-mobile-image-box"
).
addClass
(
'joshine-hidden'
);
});
function
galleryStartHandler
(
evt
)
{
evt
.
preventDefault
();
start
.
time
=
new
Date
().
getTime
();
start
.
x
=
evt
.
pageX
;
document
.
addEventListener
(
'pointermove'
,
galleryChangeHandler
,
false
);
document
.
addEventListener
(
'pointerup'
,
galleryEndHandler
,
false
);
document
.
addEventListener
(
'pointercancel'
,
galleryEndHandler
,
false
);
}
function
galleryChangeHandler
(
evt
)
{
evt
.
preventDefault
();
$galleryElement
.
style
.
transition
=
'transform 0s ease 0s'
;
let
deltaAbs
=
Math
.
abs
(
getScrollDelta
(
evt
).
x
);
let
direct
=
getScrollDirection
(
getScrollDelta
(
evt
));
if
(
direct
==
"left"
)
{
var
deltaX
=
current
.
translateX
-
deltaAbs
;
}
else
{
var
deltaX
=
current
.
translateX
-
0
+
deltaAbs
;
}
$galleryElement
.
style
.
transform
=
`translate3d(
${
deltaX
}
px, 0px, 0px)`
;
}
function
galleryEndHandler
(
evt
)
{
evt
.
preventDefault
();
let
delta
=
getScrollDelta
(
evt
);
//达到划过阈值
if
(
shouldScroll
(
delta
))
{
goScroll
(
delta
);
return
;
}
rollBackScroll
(
delta
);
}
function
shouldScroll
(
delta
)
{
let
direction
=
getScrollDirection
(
delta
);
if
(
direction
==
'left'
&&
scrollIdx
==
maxScrollIdx
)
{
return
false
;
}
if
(
direction
==
'right'
&&
scrollIdx
==
0
)
{
return
false
;
}
//1.如果过半,直接滑过
if
(
Math
.
abs
(
delta
.
x
)
>
threshold
.
distance
)
{
return
true
;
}
//2.未过半,500ms内滑过1/4,也滑过
if
(
delta
.
time
<
threshold
.
time
&&
Math
.
abs
(
delta
.
x
)
>
parseInt
(
threshold
.
distance
/
4
))
{
return
true
;
}
return
false
;
}
//获取滑动方向
function
getScrollDirection
(
delta
)
{
if
(
delta
.
x
>
0
)
{
return
'right'
;
}
return
'left'
;
}
function
getScrollDelta
(
evt
)
{
let
delta
=
{};
delta
.
time
=
new
Date
().
getTime
()
-
start
.
time
;
delta
.
x
=
evt
.
pageX
-
start
.
x
;
return
delta
;
}
function
rollBackScroll
(
delta
)
{
let
$scroll
=
document
.
querySelector
(
".scroll-wrapper"
);
let
distance
=
distanceScrollOne
*
scrollIdx
;
$scroll
.
style
.
transition
=
'transform .2s ease 0s'
;
$scroll
.
style
.
transform
=
`translate3d(-
${
distance
}
px, 0px, 0px)`
;
}
function
goScroll
(
delta
)
{
let
$scroll
=
document
.
querySelector
(
".scroll-wrapper"
);
$scroll
.
style
.
transition
=
'transform .5s ease 0s'
;
let
direction
=
getScrollDirection
(
delta
);
//右话滑向后
if
(
direction
==
'left'
)
{
scrollIdx
++
;
}
else
{
scrollIdx
--
;
}
let
distance
=
distanceScrollOne
*
scrollIdx
;
$scroll
.
style
.
transform
=
`translate3d(-
${
distance
}
px, 0px, 0px)`
;
current
.
translateX
=
-
distance
;
dealReviewContent
(
scrollIdx
);
}
function
goScrollMove
(
idx
)
{
scrollIdx
=
idx
;
let
distance
=
distanceScrollOne
*
scrollIdx
;
$galleryElement
.
style
.
transform
=
`translate3d(-
${
distance
}
px, 0px, 0px)`
;
current
.
translateX
=
-
distance
;
dealReviewContent
(
scrollIdx
);
}
function
getTranslateXY
(
element
)
{
const
style
=
window
.
getComputedStyle
(
element
)
const
matrix
=
new
DOMMatrixReadOnly
(
style
.
transform
)
return
{
translateX
:
matrix
.
m41
,
translateY
:
matrix
.
m42
}
}
function
dealReviewContent
(
idx
)
{
var
shouldReviewId
;
$
(
".scroll-wrapper-item"
).
each
(
function
(
index
,
ele
)
{
if
(
$
(
ele
).
data
(
'img-index'
)
==
idx
)
{
shouldReviewId
=
$
(
ele
).
data
(
'review-id'
);
}
});
let
curReviewId
=
$
(
'#modal-current-review-id'
).
data
(
"review-id"
);
if
(
shouldReviewId
!=
curReviewId
)
{
let
review
=
findReviewById
(
shouldReviewId
);
$
(
".review-box-title"
).
html
(
review
.
title
);
let
fits_text
=
fitsTranslate
(
review
.
size_fits
);
$
(
".review-box-size"
).
html
(
"Size Fits:"
+
fits_text
);
$
(
".review-box-content"
).
html
(
review
.
detail
);
$
(
"#review-box-id"
).
val
(
review
.
review_id
);
}
}
});
</script>
\ No newline at end of file
app/code/Joshine/Review/view/frontend/web/css/_review.css
View file @
2d9276ee
...
...
@@ -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
{
...
...
app/code/Magento/Checkout/view/frontend/web/js/view/summary/shipping.js
View file @
2d9276ee
...
...
@@ -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.
*
...
...
app/code/Magento/Tax/view/frontend/web/js/view/checkout/summary/shipping.js
View file @
2d9276ee
...
...
@@ -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 {*}
...
...
app/code/Magento/Tax/view/frontend/web/template/checkout/cart/totals/shipping.html
View file @
2d9276ee
...
...
@@ -5,8 +5,8 @@
*/
-->
<!-- ko if: isCalculated() && quoteIsVirtual == 0 -->
<!-- ko if: isBothPricesDisplayed() -->
<tr
class=
"totals shipping excl"
>
<!-- 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() -->
...
...
@@ -18,8 +18,8 @@
<span
class=
"price"
data-bind=
"text: getExcludingValue(), attr: {'data-th': excludingTaxMessage}"
></span>
</td>
</tr>
<tr
class=
"totals shipping incl"
>
</tr>
<tr
class=
"totals shipping incl"
>
<th
class=
"mark"
scope=
"row"
>
<span
class=
"label"
data-bind=
"text: title + ' ' + includingTaxMessage"
></span>
<!-- ko if: haveToShowCoupon() -->
...
...
@@ -31,10 +31,10 @@
<span
class=
"price"
data-bind=
"text: getIncludingValue(), attr: {'data-th': title + ' ' + excludingTaxMessage}"
></span>
</td>
</tr>
<!-- /ko -->
<!-- ko if: isIncludingDisplayed() -->
<tr
class=
"totals shipping incl"
>
</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() -->
...
...
@@ -46,10 +46,10 @@
<span
class=
"price"
data-bind=
"text: getIncludingValue(), attr: {'data-th': title}"
></span>
</td>
</tr>
<!-- /ko -->
<!-- ko if: isExcludingDisplayed() -->
<tr
class=
"totals shipping excl"
>
</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() -->
...
...
@@ -61,6 +61,21 @@
<span
class=
"price"
data-bind=
"text: getValue(), attr: {'data-th': title}"
></span>
</td>
</tr>
</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 -->
app/code/Magento/Tax/view/frontend/web/template/checkout/summary/shipping.html
View file @
2d9276ee
...
...
@@ -5,8 +5,8 @@
*/
-->
<!-- ko if: quoteIsVirtual == 0 -->
<!-- ko if: isBothPricesDisplayed() -->
<tr
class=
"totals shipping excl"
>
<!-- 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() -->
...
...
@@ -24,8 +24,8 @@
data-bind=
"text: getExcludingValue(), attr: {'data-th': excludingTaxMessage}"
></span>
<!-- /ko -->
</td>
</tr>
<tr
class=
"totals shipping incl"
>
</tr>
<tr
class=
"totals shipping incl"
>
<th
class=
"mark"
scope=
"row"
>
<span
class=
"label"
data-bind=
"text: title + ' ' + includingTaxMessage"
></span>
<!-- ko if: haveToShowCoupon() -->
...
...
@@ -43,10 +43,10 @@
data-bind=
"text: getIncludingValue(), attr: {'data-th': title + ' ' + excludingTaxMessage}"
></span>
<!-- /ko -->
</td>
</tr>
<!-- /ko -->
<!-- ko if: isIncludingDisplayed() -->
<tr
class=
"totals shipping incl"
>
</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() -->
...
...
@@ -64,10 +64,10 @@
data-bind=
"text: getIncludingValue(), attr: {'data-th': title}"
></span>
<!-- /ko -->
</td>
</tr>
<!-- /ko -->
<!-- ko if: isExcludingDisplayed() -->
<tr
class=
"totals shipping excl"
>
</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() -->
...
...
@@ -85,6 +85,27 @@
data-bind=
"text: getValue(), attr: {'data-th': title}"
></span>
<!-- /ko -->
</td>
</tr>
</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 -->
app/code/Sparsh/FreeShippingBar/view/frontend/templates/free_shipping_bar.phtml
View file @
2d9276ee
...
...
@@ -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
;
...
...
app/code/Sparsh/QuickView/view/frontend/templates/initialize.phtml
View file @
2d9276ee
...
...
@@ -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>
app/design/frontend/Joshine/breeze/Magento_Catalog/templates/product/price/final_price.phtml
View file @
2d9276ee
...
...
@@ -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 :?>
...
...
app/design/frontend/Joshine/breeze/Magento_Checkout/layout/checkout_cart_index.xml
View file @
2d9276ee
...
...
@@ -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>
...
...
app/design/frontend/Joshine/breeze/Magento_ConfigurableProduct/templates/product/price/final_price.phtml
View file @
2d9276ee
...
...
@@ -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
())
:
?>
...
...
app/design/frontend/Joshine/breeze/web/css/_custom.less
View file @
2d9276ee
...
...
@@ -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";
...
...
lib/web/images/loader-1.gif
View file @
2d9276ee
16.9 KB
|
W:
|
H:
325 KB
|
W:
|
H:
2-up
Swipe
Onion skin
lib/web/images/loader-2.gif
View file @
2d9276ee
1.99 KB
|
W:
|
H:
325 KB
|
W:
|
H:
2-up
Swipe
Onion skin
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment