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
92ef4810
Commit
92ef4810
authored
Oct 14, 2022
by
lmf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化点击色块更换主图和索璐图
parent
b36441fc
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
0 deletions
+29
-0
app/design/frontend/Joshine/breeze/Magento_Swatches/web/js/catalog-add-to-cart.js
+29
-0
app/design/frontend/Joshine/breeze/Magento_Swatches/web/js/swatch-renderer.js
+0
-0
No files found.
app/design/frontend/Joshine/breeze/Magento_Swatches/web/js/catalog-add-to-cart.js
0 → 100644
View file @
92ef4810
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
require
([
'jquery'
],
function
(
$
)
{
'use strict'
;
/**
* Add selected swatch attributes to redirect url
*
* @see Magento_Catalog/js/catalog-add-to-cart
*/
$
(
'body'
).
on
(
'catalogCategoryAddToCartRedirect'
,
function
(
event
,
data
)
{
$
(
data
.
form
).
find
(
'[name*="super"]'
).
each
(
function
(
index
,
item
)
{
var
$item
=
$
(
item
),
attr
;
if
(
$item
.
attr
(
'data-attr-name'
))
{
attr
=
$item
.
attr
(
'data-attr-name'
);
}
else
{
attr
=
$item
.
parent
().
attr
(
'attribute-code'
);
}
data
.
redirectParameters
.
push
(
attr
+
'='
+
$item
.
val
());
});
});
});
app/design/frontend/Joshine/breeze/Magento_Swatches/web/js/swatch-renderer.js
0 → 100644
View file @
92ef4810
This diff is collapsed.
Click to expand it.
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