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
25af418b
Commit
25af418b
authored
Nov 10, 2022
by
lmf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化手机版评论列表和展示统计
增加客户评论尺码大小字段
parent
ccd03a51
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
71 additions
and
14 deletions
+71
-14
app/code/Amasty/AdvancedReview/view/frontend/templates/sizefits.phtml
+3
-2
app/code/Amasty/AdvancedReview/view/frontend/web/js/amReview.js
+1
-0
app/design/frontend/Joshine/breeze/Magento_Review/templates/form.phtml
+35
-0
app/design/frontend/Joshine/breeze/web/css/_custom.less
+32
-12
No files found.
app/code/Amasty/AdvancedReview/view/frontend/templates/sizefits.phtml
View file @
25af418b
...
...
@@ -14,7 +14,7 @@
$t
=
[
1
=>
__
(
'Small'
)
,
2
=>
__
(
'True to Size'
)
,
3
=>
__
(
'Large'
)
]
;
?>
<div
class=
"amreview-summary-details amreview-summary-details-fit pages"
>
<div
class=
"amreview-summary-details amreview-summary-details-fit pages"
data-amreview-js=
"summary-details-fit"
>
<p>
Did the item fit well?
</p>
<?php
foreach
(
$block
->
getDetailedSummary
()
as
$key
=>
$detail
)
:
?>
<a
class=
"amreview-label"
rel=
"nofollow"
>
...
...
@@ -29,7 +29,8 @@ $t = [ 1 => __('Small') , 2 => __('True to Size') ,3 => __('Large')
</div>
<style>
.amreview-summary-details-fit.amreview-summary-details.pages
p
.amreview-stars
{
width
:
80px
;
width
:
100px
;
font-size
:
14px
;
}
input
.amrev-input
{
box-shadow
:
none
;
margin
:
0
;
...
...
app/code/Amasty/AdvancedReview/view/frontend/web/js/amReview.js
View file @
25af418b
...
...
@@ -40,6 +40,7 @@ define([
$
(
'[data-amreview-js="show-more"]'
).
on
(
'click'
,
function
()
{
$
(
'[data-amreview-js="percent"]'
).
toggle
();
$
(
'[data-amreview-js="summary-details"]'
).
toggle
();
$
(
'[data-amreview-js="summary-details-fit"]'
).
toggle
();
});
// Fix problem with slick init
...
...
app/design/frontend/Joshine/breeze/Magento_Review/templates/form.phtml
View file @
25af418b
...
...
@@ -7,6 +7,18 @@
/** @var \Magento\Review\Block\Form $block */
//phpcs:disable Generic.Files.LineLength
?>
<style>
.field.size-fits
.field.choice
{
clear
:
both
;
display
:
inline-block
;
padding
:
0
5px
;
line-height
:
30px
;
margin-right
:
20px
;
}
.field.size-fits
.field.choice
input
{
margin-right
:
5px
;
}
</style>
<div
class=
"block review-add"
>
<div
class=
"block-title"
><strong>
<?=
$block
->
escapeHtml
(
__
(
'Write Your Own Review'
))
?>
</strong></div>
<div
class=
"block-content"
>
...
...
@@ -59,6 +71,29 @@
<input
type=
"text"
name=
"nickname"
id=
"nickname_field"
class=
"input-text"
data-validate=
"{required:true}"
data-bind=
"value: nickname()"
/>
</div>
</div>
<div
class=
"field size-fits"
>
<label
class=
"label"
>
<?php
echo
'Size Fits'
?>
:
</label>
<div
class=
"options-list"
>
<div
class=
"field choice"
>
<input
type=
"radio"
class=
"radio"
id=
"size-fits-1"
data-validate=
"{'validate-one-required-by-name':true}"
name=
"size_fits"
value=
"1"
>
<label
class=
"label"
for=
"size-fits-1"
>
Small
</label>
</div>
<div
class=
"field choice"
>
<input
type=
"radio"
class=
"radio"
id=
"size-fits-2"
data-validate=
"{'validate-one-required-by-name':true}"
name=
"size_fits"
value=
"2"
>
<label
class=
"label"
for=
"size-fits-2"
>
True to Size
</label>
</div>
<div
class=
"field choice"
>
<input
type=
"radio"
class=
"radio"
id=
"size-fits-3"
data-validate=
"{'validate-one-required-by-name':true}"
name=
"size_fits"
value=
"3"
>
<label
class=
"label"
for=
"size-fits-3"
>
Large
</label>
</div>
</div>
</div>
<div
class=
"field review-field-summary required"
>
<label
for=
"summary_field"
class=
"label"
><span>
<?=
$block
->
escapeHtml
(
__
(
'Summary'
))
?>
</span></label>
<div
class=
"control"
>
...
...
app/design/frontend/Joshine/breeze/web/css/_custom.less
View file @
25af418b
...
...
@@ -1812,9 +1812,6 @@ button.action.submit.primary {
//详情页mobile修改
@media (max-width: 1024px){
.product-info-stock-sku{
display: none;
}
.product-info-wrapper .page-title span.base {
font-size: medium;
float: left;
...
...
@@ -1854,7 +1851,7 @@ button.action.submit.primary {
.product-reviews-summary {
justify-content: flex-end;
margin-top: -
20px
;
margin-top: -
8%
;
}
#product-intro__freeshipping-more-3{
...
...
@@ -1953,14 +1950,6 @@ font-weight: bold;
margin-left: 10px;
margin-right: 15px;
}
//显示评论统计
.amreview-summary-details.pages{
display: none !important;
}
.amreview-summary-details.amreview-summary-details-fit.pages {
display: block !important;
}
.amrev-toolbar-container.-all .amrev-sorting {
border-left: none;
...
...
@@ -1997,6 +1986,10 @@ background-color: #000;
.amreview-description-wrap{
width: 75%;
}
.amreview-summary-details .amreview-label .amreview-bar{
margin: 0px;
width: 50px;
}
.amreview-author-details .amreview-recommended{
font-size: 12px;
width: 100px;
...
...
@@ -2277,6 +2270,15 @@ tr.grand.totals {
}
@media(max-width: 1024px) {
.amreview-review-wrapper.review-item{
padding: 0px;
}
.amreview-author-details{
margin:0px;
}
.amreview-description{
margin-top:0px;
}
.cart-container .cart.table .product-item-name{
font-size: 10px;
height: 60px;
...
...
@@ -2291,6 +2293,14 @@ tr.grand.totals {
margin-top: -10%;
}
.amreview-summary-details.amreview-summary-details-fit.pages {
display: block;
width: 50%;
float: right;
margin-top: -30%;
font-size: 10px;
}
.cart-container .checkout-methods-items li:first-child {
background: #ffa800;
position: fixed;
...
...
@@ -2339,6 +2349,16 @@ tr.grand.totals {
margin-left: 10%;
}
.product-reviews-summary{
float: right;
margin-left: 70%;
margin-top: -5%;
}
.amreview-text.review-details{
width: 100%;
}
}
.cart-container .checkout-methods-items li:first-child{
...
...
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