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
8c3e9e42
Commit
8c3e9e42
authored
Sep 16, 2022
by
lmf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
首页增加热销产品模块
parent
8ff4bf08
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
139 additions
and
24 deletions
+139
-24
app/design/frontend/Joshine/breeze/Magento_Cms/templates/default/home.phtml
+133
-23
app/design/frontend/Joshine/breeze/web/css/_custom.less
+6
-1
No files found.
app/design/frontend/Joshine/breeze/Magento_Cms/templates/default/home.phtml
View file @
8c3e9e42
...
...
@@ -56,6 +56,122 @@
</div>
</div>
<div
class=
"flash_sale"
>
<a
href=
"https://www.joshine.com/flashsale-0422?product_list_order=price_low"
><p
class=
"flashsale-title"
>
⚡FLASH SALE⚡
</p>
</a>
<div
class=
"flash-sale-wpt row"
style=
"background: linear-gradient(to right, #ffffff, #ffffff);"
>
<div
class=
"flash-sale-inner"
>
<?php
$templateType
=
\Magento\Catalog\Block\Product\ReviewRendererInterface
::
SHORT_VIEW
;
$ids
=
explode
(
','
,
"1,45,63,6,8,10"
);
$objectManager
=
\Magento\Framework\App\ObjectManager
::
getInstance
();
$pr
=
$objectManager
->
create
(
'Magento\Catalog\Model\ProductRepository'
);
$blocklist
=
$objectManager
->
get
(
'\Magento\Catalog\Block\Product\ListProduct'
);
$imageHelper
=
$objectManager
->
get
(
'Magento\Catalog\Helper\Image'
);
foreach
(
$ids
as
$pid
)
:
$product
=
$pr
->
getById
(
$pid
);
if
(
!
$product
)
continue
;
$productImage
=
$imageHelper
->
init
(
$product
,
'category_page_list'
)
->
getUrl
();
?>
<div
class=
"flash-sale-item"
>
<a
href=
"
<?php
echo
$product
->
getProductUrl
()
?>
"
>
<img
src=
"
<?php
echo
$productImage
;
?>
"
/></a>
<div
class=
"flash-sale-info"
>
<a
class=
"product-name"
href=
"
<?php
echo
$product
->
getProductUrl
()
?>
"
>
<?php
echo
$product
->
getName
();
?>
</a>
<?=
$blocklist
->
getReviewsSummaryHtml
(
$product
,
$templateType
)
?>
<?=
/* @noEscape */
$blocklist
->
getProductPrice
(
$product
)
?>
</div>
</div>
<?php
endforeach
;
?>
</div>
<div
class=
"view-more-flashsale"
><a
href=
"https://www.joshine.com/flashsale-0422?product_list_order=price_low"
>
View More
</a></div>
</div>
<style>
.flash_sale
{
max-width
:
fit-content
;
width
:
100%
;
}
p
.flashsale-title
{
background
:
#fff
;
font-size
:
24px
;
font-weight
:
bold
;
color
:
#000000
;
margin
:
0px
;
padding
:
40px
;
text-align
:
center
;
}
.view-more-flashsale
{
clear
:
both
;
width
:
100%
;
text-align
:
center
;
display
:
block
;
float
:
left
;
margin-bottom
:
20px
;
padding
:
30px
;
}
.view-more-flashsale
a
{
padding
:
10px
20px
;
background
:
#000000
;
color
:
#fff
;
font-weight
:
bold
;
width
:
120px
;
margin
:
0
auto
;
}
.flash-sale-wpt
{
padding
:
10px
;
}
.flash-sale-inner
{
width
:
100%
;
margin
:
0
auto
;}
.flash-sale-item
{
margin-bottom
:
0px
;
padding
:
2px
;
float
:
left
;
width
:
16.66%
;
}
.flash-sale-info
{
background
:
#fff
;
padding
:
10px
;
color
:
#000
;
height
:
90px
;
}
.flash-sale-info
.special-price
{
font-size
:
larger
;
font-weight
:
600
;
}
.flash-sale-info
.price
{
font-size
:
larger
;
font-weight
:
600
;
}
.flash-sale-info
.product-name
{
text-overflow
:
ellipsis
;
white-space
:
nowrap
;
overflow
:
hidden
;
cursor
:
pointer
;
width
:
100%
;
display
:
inline-block
;
color
:
#222222
;
}
.flash-sale-inner
.product-reviews-summary.short
{
padding
:
0
;
margin
:
0
;
}
@media
(
max-width
:
789px
){
.flash-sale-inner
{
width
:
100%
;}
.flash-sale-wpt
{
padding
:
30px
10px
;
}
.flash-sale-info
.product-reviews-summary
.reviews-actions
{
display
:
none
;
}
.flash-sale-item
{
width
:
50%
;
}
}
</style>
</div>
<div
class=
"top-content-home"
>
<div
class=
"banner-4-cate"
>
<a
href=
"https://www.joshine.com/shapewear"
><img
src=
"/media/wysiwyg/BDS.jpg"
alt=
""
/></a>
...
...
@@ -71,39 +187,33 @@
</div>
</div>
<div
class=
"select-element section-before-footer clearfix"
>
<div
class=
"container-before-footer clearfix"
>
<div
data-content-type=
"html"
data-appearance=
"default"
data-element=
"main"
data-decoded=
"true"
><div
class=
"row"
>
<div
class=
"baozhang_before_footer"
>
<span>
<picture><img
src=
"/media/wysiwyg/freeshipping.png"
alt=
""
></picture>
</span>
<p>
<a
href=
"/shipping-policy"
>
Free Shipping $69+
</a></p>
</div>
<div
class=
"baozhang_before_footer"
><span>
<picture>
<img
src=
"/media/wysiwyg/15-dayreturns.png"
alt=
""
>
</picture>
</span>
<p>
<a
href=
"/return-exchange-policy"
>
15-Days Returns
</a></p></div
>
<div
class=
"baozhang_before_footer"
><span>
<
picture>
<img
src=
"/media/wysiwyg/365-daywarranty.png"
alt=
""
>
</picture
>
</span>
<p>
<a
href=
"/365-days-warranty"
>
365-Days Warranty
</a></p></div
>
<div
class=
"baozhang_before_footer"
><span>
<picture
>
<img
src=
"/media/wysiwyg/secureshopping.png"
alt=
""
>
</
picture>
</span>
<p><a
href=
"/security-privacy-policy"
>
Secure Shopping
</a></p></div>
<div
class=
"baozhang_before_footer"
>
<span>
<picture>
<img
src=
"/media/wysiwyg/impeccablequality
.png"
alt=
""
>
</picture>
</span>
<p>
<a
href=
"/about-our-products"
>
Impeccable Quality
</a></p>
</div>
<div
class=
"baozhang_before_footer"
><span>
<picture
>
<img
src=
"/media/wysiwyg/size.png"
alt=
""
>
</picture
>
<img
src=
"/media/wysiwyg/15-dayreturns.png"
alt=
""
>
</picture>
</span>
<p>
<a
href=
"/return-exchange-policy"
>
15-Days Returns
</a></p></div>
<div
class=
"baozhang_before_footer"
><span>
<picture
>
<img
src=
"/media/wysiwyg/365-daywarranty.png"
alt=
""
>
</
picture>
</span>
<p>
<a
href=
"/365-days-warranty"
>
365-Days Warranty
</a></p></div
>
<div
class=
"baozhang_before_footer"
><span>
<picture>
<img
src=
"/media/wysiwyg/secureshopping.png"
alt=
""
>
</picture
>
</span>
<p><a
href=
"/security-privacy-policy"
>
Secure Shopping
</a></p></div
>
<div
class=
"baozhang_before_footer"
>
<span>
<
picture>
<img
src=
"/media/wysiwyg/impeccablequality.png"
alt=
""
>
</picture>
</span>
<p>
<a
href=
"/about-our-products"
>
Impeccable Quality
</a></p></div>
<div
class=
"baozhang_before_footer"
><span>
<picture>
<img
src=
"/media/wysiwyg/size
.png"
alt=
""
>
</picture>
</span>
<p><a
href=
"/size-guide"
>
Size Inclusive
</a></p></div>
</div>
</div>
</div
>
</div
>
</span>
<p><a
href=
"/size-guide"
>
Size Inclusive
</a></p></div>
</div>
</div>
</div>
</div>
app/design/frontend/Joshine/breeze/web/css/_custom.less
View file @
8c3e9e42
...
...
@@ -201,7 +201,7 @@
margin: 0;
}
footer{
margin-top:
20
px;
margin-top:
18
px;
background: #000;
color: #fff;
padding: 10px ;
...
...
@@ -625,6 +625,9 @@ ul {
.box-moblie{
display: block;
}
.categories_tab {
height: 330px;
}
}
.categories_tab {
...
...
@@ -632,6 +635,7 @@ ul {
margin: 30px 0 ;
padding: 50px;
width: 100%;
height: 500px;
}
.section-element.shop_by_categories .container {
padding-bottom: 15px;
...
...
@@ -646,6 +650,7 @@ ul {
width: 80%;
margin: 0 auto;
text-align:center;
height: 200px;
}
p.shopbycate-title {
background: #fff;
...
...
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