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
c19ea246
Commit
c19ea246
authored
Feb 24, 2023
by
wd
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
瀑布流加载后调用添加快速加入购物车按钮
parent
84a0ff77
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
1 deletions
+6
-1
app/code/Magetop/InfiniteScroll/view/frontend/templates/infinitescroll.phtml
+2
-1
app/design/frontend/Joshine/breeze/Magento_Catalog/templates/product/list.phtml
+4
-0
No files found.
app/code/Magetop/InfiniteScroll/view/frontend/templates/infinitescroll.phtml
View file @
c19ea246
...
@@ -19,7 +19,7 @@ if ($loadingImage) {
...
@@ -19,7 +19,7 @@ if ($loadingImage) {
}
}
?>
?>
<script
type=
"text/javascript"
>
<script
type=
"text/javascript"
>
require
([
'jquery'
,
'
magetop/infinitescroll'
],
function
(
$
)
{
require
([
'jquery'
,
'
quickView'
,
'magetop/infinitescroll'
],
function
(
$
,
quickView
)
{
"use strict"
;
"use strict"
;
$
(
document
).
ready
(
function
()
{
$
(
document
).
ready
(
function
()
{
$
(
'body'
).
addClass
(
'infinitescroll'
);
$
(
'body'
).
addClass
(
'infinitescroll'
);
...
@@ -48,6 +48,7 @@ if ($loadingImage) {
...
@@ -48,6 +48,7 @@ if ($loadingImage) {
window
.
ias
.
on
(
'rendered'
,
function
(
items
){
window
.
ias
.
on
(
'rendered'
,
function
(
items
){
$
(
'body'
).
trigger
(
'contentUpdated'
);
$
(
'body'
).
trigger
(
'contentUpdated'
);
$
(
"form[data-role='tocart-form']"
).
catalogAddToCart
();
$
(
"form[data-role='tocart-form']"
).
catalogAddToCart
();
quickView
();
});
});
});
});
});
});
...
...
app/design/frontend/Joshine/breeze/Magento_Catalog/templates/product/list.phtml
View file @
c19ea246
...
@@ -45,6 +45,9 @@ $_helper = $block->getData('outputHelper');
...
@@ -45,6 +45,9 @@ $_helper = $block->getData('outputHelper');
$pos
=
$block
->
getPositioned
();
$pos
=
$block
->
getPositioned
();
?>
?>
<style>
<style>
.mode-list
{
display
:
none
;
}
.hoverImg
{
.hoverImg
{
display
:
block
;
display
:
block
;
position
:
absolute
;
position
:
absolute
;
...
@@ -72,6 +75,7 @@ $_helper = $block->getData('outputHelper');
...
@@ -72,6 +75,7 @@ $_helper = $block->getData('outputHelper');
$baseImageUrl
=
$productImage
->
getImageUrl
();
$baseImageUrl
=
$productImage
->
getImageUrl
();
$allImage
=
$_product
->
getMediaGalleryImages
()
->
getItems
();
$allImage
=
$_product
->
getMediaGalleryImages
()
->
getItems
();
$haverImg
=
''
;
foreach
(
$allImage
as
$img
){
foreach
(
$allImage
as
$img
){
if
(
basename
(
$baseImageUrl
)
!=
basename
(
$img
->
getUrl
())){
if
(
basename
(
$baseImageUrl
)
!=
basename
(
$img
->
getUrl
())){
$haverImg
=
$img
->
getUrl
();
$haverImg
=
$img
->
getUrl
();
...
...
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