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
b2e9c26b
Commit
b2e9c26b
authored
May 17, 2023
by
halweg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
no message
parent
978cd70b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
6 deletions
+14
-6
app/design/frontend/Joshine/breeze/Magento_Catalog/templates/product/view/addtocart.phtml
+14
-6
No files found.
app/design/frontend/Joshine/breeze/Magento_Catalog/templates/product/view/addtocart.phtml
View file @
b2e9c26b
...
...
@@ -301,19 +301,27 @@
if
(
$
(
this
).
hasClass
(
'-active'
))
{
return
;
}
var
currentType
=
$
(
'.chart-size-switch-item.-active'
).
data
(
'size-type'
);
$
(
this
).
addClass
(
'-active'
).
siblings
().
removeClass
(
'-active'
);
var
type
=
$
(
this
).
data
(
'size-type'
);
var
percent
=
2.54
;
if
(
currentType
==
type
)
{
return
;
}
$
.
each
(
$
(
".size-item"
),
function
(
x
)
{
var
current
=
$
(
this
).
data
(
'size-item-
cm
'
);
if
(
type
==
'inc
'
)
{
var
data
=
(
current
/
percent
-
0
).
toFixed
(
2
);
var
current
=
$
(
this
).
data
(
'size-item-
inc
'
);
if
(
currentType
==
'inc'
&&
type
==
'cm
'
)
{
var
data
=
(
current
*
percent
-
0
).
toFixed
(
2
);
}
else
{
var
data
=
$
(
this
).
data
(
'size-item-
cm
'
);
var
data
=
$
(
this
).
data
(
'size-item-
inc
'
);
}
$
(
this
).
html
(
data
);
});
});
$
(
document
).
ready
(
function
()
{
$
(
'.chart-size-switch-item-cm'
).
click
();
});
});
</script>
<li
class=
"lis"
style=
"display: none;"
>
...
...
@@ -330,8 +338,8 @@
<div
id=
"chart-details"
>
<div
class=
"chart-size-switch "
>
<input
type=
"hidden"
value=
""
>
<span
class=
"chart-size-switch-item chart-size-switch-item-cm"
data-size-type=
"cm"
>
<?=
__
(
'cm'
);
?>
</span>
<span
data-size-type=
"inc"
class=
"chart-size-switch-item -active"
>
<?=
__
(
'Inch'
);
?>
</span>
<span
class=
"chart-size-switch-item "
data-size-type=
"cm"
>
<?=
__
(
'cm'
);
?>
</span>
</div>
<!--全局table已被污染,请使用div模拟表格-->
<div
class=
"table"
id=
"fme_sizechart_table"
style=
"display: table;"
>
...
...
@@ -354,7 +362,7 @@
?>
<div
style=
"display: table-row"
class=
"tr"
>
<?php
foreach
(
$body
as
$key2
=>
$item
)
:
?>
<div
style=
"display: table-cell"
class=
"td
<?php
if
(
$key2
!=
0
)
{
echo
'size-item'
;
}
?>
"
data-size-item-
cm
=
"
<?=
$item
?>
"
>
<?=
$item
?>
</div>
<div
style=
"display: table-cell"
class=
"td
<?php
if
(
$key2
!=
0
)
{
echo
'size-item'
;
}
?>
"
data-size-item-
inc
=
"
<?=
$item
?>
"
>
<?=
$item
?>
</div>
<?php
endforeach
;
?>
</div>
<?php
endforeach
;
?>
...
...
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