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
c4e1bd31
Commit
c4e1bd31
authored
Oct 13, 2022
by
lmf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化首页2个产品模块改为block
parent
3e9bdbc2
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
73 additions
and
69 deletions
+73
-69
app/design/frontend/Joshine/breeze/Magento_Cms/templates/default/flashsaleproduct.phtml
+29
-0
app/design/frontend/Joshine/breeze/Magento_Cms/templates/default/home.phtml
+5
-69
app/design/frontend/Joshine/breeze/Magento_Cms/templates/default/homenewproduct.phtml
+38
-0
app/design/frontend/Joshine/breeze/Magento_Newsletter/templates/subscribe.phtml
+1
-0
No files found.
app/design/frontend/Joshine/breeze/Magento_Cms/templates/default/flashsaleproduct.phtml
0 → 100644
View file @
c4e1bd31
<?php
if
(
!
$id
=
$block
->
getProductIds
()){
return
;
}
$ids
=
explode
(
','
,
$id
);
$templateType
=
\Magento\Catalog\Block\Product\ReviewRendererInterface
::
SHORT_VIEW
;
$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
;
?>
\ No newline at end of file
app/design/frontend/Joshine/breeze/Magento_Cms/templates/default/home.phtml
View file @
c4e1bd31
...
@@ -23,7 +23,6 @@
...
@@ -23,7 +23,6 @@
}
}
}
}
</style>
</style>
<div
class=
"banner1"
></div>
<div
class=
"banner1"
></div>
<script>
<script>
require
([
require
([
...
@@ -196,7 +195,6 @@
...
@@ -196,7 +195,6 @@
if
(
isMobile
())
{
if
(
isMobile
())
{
img_arr
=
[
"/media/wysiwyg/2_M_1_.jpg"
,
"/media/wysiwyg/1_M_1_.jpg"
];
img_arr
=
[
"/media/wysiwyg/2_M_1_.jpg"
,
"/media/wysiwyg/1_M_1_.jpg"
];
}
}
$
(
".banner1"
).
banner
({
$
(
".banner1"
).
banner
({
img
:
img_arr
,
img
:
img_arr
,
href
:
[
"/hotsale.html"
,
"/newarrivals.html"
],
href
:
[
"/hotsale.html"
,
"/newarrivals.html"
],
...
@@ -227,70 +225,7 @@
...
@@ -227,70 +225,7 @@
return
mobile_flag
;
return
mobile_flag
;
}
}
</script>
</script>
<div
class=
"categories_tab"
>
<?php
echo
$block
->
getLayout
()
->
createBlock
(
'Magento\Cms\Block\Block'
)
->
setBlockId
(
'home_top_category_thumnail'
)
->
toHtml
();
?>
<p
class=
"shopbycate-title"
>
Shop By Cateogry
</p>
<?php
echo
$block
->
getLayout
()
->
createBlock
(
'Magento\Cms\Block\Block'
)
->
setBlockId
(
'home_new_arrivals'
)
->
toHtml
();
?>
<div
class=
"shopcatewpt"
>
<?php
echo
$block
->
getLayout
()
->
createBlock
(
'Magento\Cms\Block\Block'
)
->
setBlockId
(
'flashsaleproduct'
)
->
toHtml
();
?>
<div
class=
"shop-by-cata"
>
<?php
echo
$block
->
getLayout
()
->
createBlock
(
'Magento\Cms\Block\Block'
)
->
setBlockId
(
'home_category_thumnail'
)
->
toHtml
();
?>
<a
href=
"/bodysuits/strap-control-shorts.html"
><img
src=
"/media/wysiwyg/shopbycategory/1-strap.png"
alt=
""
/></a>
\ No newline at end of file
</div>
<div
class=
"shop-by-cata"
>
<a
href=
"/bodysuits/underbust-bodysuits.html"
><img
src=
"/media/wysiwyg/shopbycategory/2-underbust.png"
alt=
""
/></a>
</div>
<div
class=
"shop-by-cata"
>
<a
href=
"/bodysuits/overbust-bodysuits.html"
><img
src=
"/media/wysiwyg/shopbycategory/3-overbust.png"
alt=
""
/></a>
</div>
<div
class=
"shop-by-cata"
>
<a
href=
"/bodysuits/sleeved-underbust-bodysuits.html"
><img
src=
"/media/wysiwyg/shopbycategory/4-sleeved.png"
alt=
""
/></a>
</div>
<div
class=
"shop-by-cata"
>
<a
href=
"/bodysuits/full-body-shaper.html"
><img
src=
"/media/wysiwyg/shopbycategory/5-fullbody.jpg"
alt=
""
/></a>
</div>
<div
class=
"shop-by-cata"
>
<a
href=
"/bodysuits/thongs-bodysuits.html"
><img
src=
"/media/wysiwyg/shopbycategory/6-thongs.png"
alt=
""
/></a>
</div>
<div
class=
"shop-by-cata"
>
<a
href=
"/control-panties.html"
><img
src=
"/media/wysiwyg/shopbycategory/7-buttlifter.png"
alt=
""
/></a>
</div>
<div
class=
"shop-by-cata"
>
<a
href=
"/corsets-waist-trainer.html"
><img
src=
"/media/wysiwyg/shopbycategory/8-waisttrainer.png"
alt=
""
/></a>
</div>
</div>
</div>
<?php
echo
$block
->
getLayout
()
->
createBlock
(
'Magento\Cms\Block\Block'
)
->
setBlockId
(
'home_category_thumnail'
)
->
toHtml
();
?>
<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>
</span>
<p><a
href=
"/size-guide"
>
Size Inclusive
</a></p></div>
</div>
</div>
</div>
</div>
app/design/frontend/Joshine/breeze/Magento_Cms/templates/default/homenewproduct.phtml
0 → 100644
View file @
c4e1bd31
<?php
$ids
=
array
();
if
(
$id
=
$block
->
getProductIds
()){
$ids
=
explode
(
','
,
$id
);
}
$templateType
=
\Magento\Catalog\Block\Product\ReviewRendererInterface
::
SHORT_VIEW
;
$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'
);
if
(
empty
(
$ids
)){
$connection
=
$objectManager
->
get
(
'Magento\Framework\App\ResourceConnection'
)
->
getConnection
();
$sql
=
"Select entity_id FROM `catalog_product_entity` WHERE type_id = 'configurable' ORDER BY entity_id DESC limit 6"
;
$catalog_ids
=
$connection
->
fetchAll
(
$sql
);
if
(
$catalog_ids
){
foreach
(
$catalog_ids
as
$id
){
$ids
[]
=
$id
[
'entity_id'
];
}
}
}
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
;
?>
app/design/frontend/Joshine/breeze/Magento_Newsletter/templates/subscribe.phtml
View file @
c4e1bd31
...
@@ -142,6 +142,7 @@
...
@@ -142,6 +142,7 @@
.actions
.subscribe
{
.actions
.subscribe
{
margin-left
:
-16px
;
margin-left
:
-16px
;
width
:
30%
;
width
:
30%
;
font-size
:
16px
;
}
}
.newsletter-list
>
span
{
.newsletter-list
>
span
{
text-transform
:
uppercase
;
text-transform
:
uppercase
;
...
...
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