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
7f5b6fa4
Commit
7f5b6fa4
authored
Mar 15, 2023
by
wd
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改促销标签位置和统一样式位置
parent
9b7a8ae0
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
41 additions
and
74 deletions
+41
-74
app/design/frontend/Joshine/breeze/Magento_Catalog/templates/product/price/final_price.phtml
+0
-37
app/design/frontend/Joshine/breeze/Magento_ConfigurableProduct/templates/product/price/final_price.phtml
+0
-37
app/design/frontend/Joshine/breeze/web/css/_custom.less
+41
-0
No files found.
app/design/frontend/Joshine/breeze/Magento_Catalog/templates/product/price/final_price.phtml
View file @
7f5b6fa4
...
@@ -41,45 +41,8 @@ $schema = ($block->getZone() == 'item_view') ? true : false;
...
@@ -41,45 +41,8 @@ $schema = ($block->getZone() == 'item_view') ? true : false;
$seller
= number_format((1 - number_format(
$finalPriceModel->getAmount
()->getValue() /
$priceModel->getAmount
()->getValue(),2)) *100,0) ?>
$seller
= number_format((1 - number_format(
$finalPriceModel->getAmount
()->getValue() /
$priceModel->getAmount
()->getValue(),2)) *100,0) ?>
<?php if (!
$block->isProductList
()) :?>
<?php if (!
$block->isProductList
()) :?>
<span class="
product
-
info
-
promotion
-
span
">- <?=
$seller
?>%</span>
<span class="
product
-
info
-
promotion
-
span
">- <?=
$seller
?>%</span>
<style>
.product-info-promotion-span{
background-color: #ee0000;
height: 20px;
color: #ffffff;
font-size: 16px;
font-weight: 600;
margin-left: 10px;
padding: 2px 12px;
}
@media (max-width: 768px) {
.product-info-promotion-span{
font-size: 12px;
font-weight: bold;
}
}
</style>
<?php else :?>
<?php else :?>
<span class="
product
-
list
-
promotion
-
span
">- <?=
$seller
?>%</span>
<span class="
product
-
list
-
promotion
-
span
">- <?=
$seller
?>%</span>
<style>
.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-list-promotion-span{
font-size: 12px;
font-weight: bold;
}
}
</style>
<?php endif; ?>
<?php endif; ?>
<?php else :?>
<?php else :?>
...
...
app/design/frontend/Joshine/breeze/Magento_ConfigurableProduct/templates/product/price/final_price.phtml
View file @
7f5b6fa4
...
@@ -36,25 +36,6 @@ $schema = ($block->getZone() == 'item_view') ? true : false;
...
@@ -36,25 +36,6 @@ $schema = ($block->getZone() == 'item_view') ? true : false;
<?php
<?php
$seller
=
number_format
((
1
-
number_format
(
$finalPriceModel
->
getAmount
()
->
getValue
()
/
$priceModel
->
getAmount
()
->
getValue
(),
2
))
*
100
,
0
)
?>
$seller
=
number_format
((
1
-
number_format
(
$finalPriceModel
->
getAmount
()
->
getValue
()
/
$priceModel
->
getAmount
()
->
getValue
(),
2
))
*
100
,
0
)
?>
<span
class=
"product-list-promotion-span"
>
-
<?=
$seller
?>
%
</span>
<span
class=
"product-list-promotion-span"
>
-
<?=
$seller
?>
%
</span>
<style>
.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-list-promotion-span
{
font-size
:
12px
;
font-weight
:
bold
;
}
}
</style>
<?php
endif
;
?>
<?php
endif
;
?>
...
@@ -71,24 +52,6 @@ $schema = ($block->getZone() == 'item_view') ? true : false;
...
@@ -71,24 +52,6 @@ $schema = ($block->getZone() == 'item_view') ? true : false;
<?php
<?php
$seller
=
number_format
((
1
-
number_format
(
$finalPriceModel
->
getAmount
()
->
getValue
()
/
$priceModel
->
getAmount
()
->
getValue
(),
2
))
*
100
,
0
)
?>
$seller
=
number_format
((
1
-
number_format
(
$finalPriceModel
->
getAmount
()
->
getValue
()
/
$priceModel
->
getAmount
()
->
getValue
(),
2
))
*
100
,
0
)
?>
<span
class=
"product-info-promotion-span"
>
-
<?=
$seller
?>
%
</span>
<span
class=
"product-info-promotion-span"
>
-
<?=
$seller
?>
%
</span>
<style>
.product-info-promotion-span
{
background-color
:
#ee0000
;
height
:
20px
;
color
:
#ffffff
;
font-size
:
16px
;
font-weight
:
600
;
margin-left
:
10px
;
padding
:
2px
12px
;
}
@media
(
max-width
:
768px
)
{
.product-info-promotion-span
{
font-size
:
12px
;
font-weight
:
bold
;
}
}
</style>
<?php
endif
;
?>
<?php
endif
;
?>
<?php
if
(
$block
->
showMinimalPrice
())
:
?>
<?php
if
(
$block
->
showMinimalPrice
())
:
?>
...
...
app/design/frontend/Joshine/breeze/web/css/_custom.less
View file @
7f5b6fa4
...
@@ -2902,6 +2902,47 @@ strong#block-related-heading,strong#block-upsell-heading{ font-weight: 600; colo
...
@@ -2902,6 +2902,47 @@ strong#block-related-heading,strong#block-upsell-heading{ font-weight: 600; colo
z-index: 10;
z-index: 10;
display: none;
display: none;
}
}
.product-info-promotion-span{
background-color: #ee0000;
position: absolute;
left: 15px;
top: 15px;
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工具类*/
/*导入Joshine工具类*/
@import "./_joshine_col";
@import "./_joshine_col";
@import "./_joshine_utils";
@import "./_joshine_utils";
...
...
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