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
e410b6d4
Commit
e410b6d4
authored
Mar 28, 2023
by
dhn
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
测试
parent
4549614d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
16 deletions
+11
-16
app/code/Magento/Catalog/view/frontend/templates/product/view/options/wrapper.phtml
+0
-16
app/design/frontend/Joshine/breeze/Magento_Swatches/web/js/swatch-renderer.js
+11
-0
No files found.
app/code/Magento/Catalog/view/frontend/templates/product/view/options/wrapper.phtml
View file @
e410b6d4
...
...
@@ -17,18 +17,3 @@ if ($block->hasRequiredOptions()) {
<?=
$block
->
getChildHtml
(
''
,
true
)
?>
</div>
</div>
<script>
require
([
'jquery'
],
function
(
$
)
{
window
.
onload
=
function
(){
if
(
$
(
'.swatch-attribute .swatch-option'
))
{
var
swatchObj
=
$
(
'.swatch-attribute'
);
for
(
var
i
=
0
;
i
<
swatchObj
.
length
;
i
++
)
{
$
(
swatchObj
[
i
]).
find
(
'.swatch-option:first'
).
trigger
(
'click'
);
}
}
}
});
</script>
\ No newline at end of file
app/design/frontend/Joshine/breeze/Magento_Swatches/web/js/swatch-renderer.js
View file @
e410b6d4
...
...
@@ -333,6 +333,17 @@ define([
}
else
{
console
.
log
(
'SwatchRenderer: No input data received'
);
}
window
.
onload
=
function
(){
if
(
$
(
'.swatch-attribute .swatch-option'
))
{
var
swatchObj
=
$
(
'.swatch-attribute'
);
for
(
var
i
=
0
;
i
<
swatchObj
.
length
;
i
++
)
{
$
(
swatchObj
[
i
]).
find
(
'.swatch-option:first'
).
trigger
(
'click'
);
}
}
}
},
/**
...
...
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