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
580a88da
Commit
580a88da
authored
May 17, 2023
by
liumengfei
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'developer' of
http://47.99.244.21:9999/root/joshine
into developer
parents
fdb26b00
52f451f1
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
26 additions
and
20 deletions
+26
-20
app/code/Magepow/Sizechart/Block/Adminhtml/Sizechart/Edit/Tab/Main.php
+4
-4
app/code/Magepow/Sizechart/Block/Product/Sizechart.php
+3
-2
app/code/Magepow/Sizechart/view/adminhtml/layout/magepow_sizechart_sizechart_index.xml
+0
-1
app/code/Magepow/Sizechart/view/adminhtml/templates/columnLabel.phtml
+1
-1
app/design/frontend/Joshine/breeze/Magento_Catalog/templates/product/view/addtocart.phtml
+4
-5
app/design/frontend/Joshine/breeze/Magento_Swatches/web/js/swatch-renderer.js
+13
-6
app/design/frontend/Joshine/breeze/web/css/_custom.less
+1
-1
No files found.
app/code/Magepow/Sizechart/Block/Adminhtml/Sizechart/Edit/Tab/Main.php
View file @
580a88da
...
...
@@ -146,7 +146,7 @@ class Main extends Generic implements TabInterface
'chart_table'
,
[
'name'
=>
'chart_table'
,
'label'
=>
__
(
'Chart Table'
),
'label'
=>
__
(
'Chart Table
(英尺)
'
),
'id'
=>
'chart_table'
,
'title'
=>
__
(
'Chart Table'
),
'required'
=>
false
,
...
...
@@ -155,14 +155,14 @@ class Main extends Generic implements TabInterface
$fieldset
->
addField
(
'type_display'
,
'
select
'
,
'
hidden
'
,
[
'name'
=>
'type_display'
,
'label'
=>
__
(
'Type Display'
),
'id'
=>
'type_display'
,
'title'
=>
__
(
'Type Display'
),
'value
s'
=>
$this
->
_typeDisplay
->
getOptionArray
()
,
'required'
=>
tru
e
,
'value
'
=>
1
,
'required'
=>
fals
e
,
]
);
...
...
app/code/Magepow/Sizechart/Block/Product/Sizechart.php
View file @
580a88da
...
...
@@ -132,8 +132,8 @@ class Sizechart extends \Magento\Catalog\Block\Product\AbstractProduct
$chartTableArray
=
[];
if
(
$sizeChart
!=
null
)
{
$chartTable
=
$sizeChart
->
getData
(
'custom_size'
);
$chartTableArray
=
json_encode
(
$chartTable
,
true
)
;
$chartTableArray
=
$chartTable
;
}
return
$chartTableArray
;
return
json_encode
([],
true
)
;
}
}
\ No newline at end of file
app/code/Magepow/Sizechart/view/adminhtml/layout/magepow_sizechart_sizechart_index.xml
View file @
580a88da
<page
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation=
"../../../../../../../lib/internal/Magento/Framework/View/Layout/etc/page_configuration.xsd"
>
<update
handle=
"styles"
/>
<body>
<referenceContainer
name=
"content"
>
<uiComponent
name=
"magepow_sizechart_sizechart_listing"
/>
...
...
app/code/Magepow/Sizechart/view/adminhtml/templates/columnLabel.phtml
View file @
580a88da
...
...
@@ -5,7 +5,7 @@
?>
<div
class=
"admin__control
-wysiwig
"
id=
"content_single_field"
>
<div
class=
"admin__control"
id=
"content_single_field"
>
<input
id=
"content"
name=
"column_label"
data-ui-id=
"adminhtml-sizechart-edit-tab-main-0-fieldset-element-text-name"
value=
"
<?=
$block
->
getCustomSizeData
()[
'column_label'
]
??
''
?>
"
title=
"Name"
class=
"required_entry input-text admin__control-text required-entry _required"
type=
"text"
aria-required=
"true"
>
...
...
app/design/frontend/Joshine/breeze/Magento_Catalog/templates/product/view/addtocart.phtml
View file @
580a88da
...
...
@@ -113,7 +113,6 @@
#fme_sizechart_table_th
{
background
:
#111
;
border
:
1px
solid
#111
;
font-size
:
16px
;
padding
:
8px
0
;
color
:
#fff
;
font-weight
:
600
!important
;
...
...
@@ -128,7 +127,8 @@
}
#fme_sizechart_table
.th
,
.table
.td
{
padding
:
.5rem
!important
;
font-size
:
.9rem
;
padding
:
.33rem
!important
;
text-align
:
center
;
}
...
...
@@ -185,7 +185,6 @@
display
:
inline-block
;
padding
:
0
0.9rem
;
line-height
:
1.99rem
;
font-size
:
1.15rem
;
height
:
2rem
;
border
:
1px
solid
#f3f3f3
;
color
:
#666
;
...
...
@@ -301,7 +300,6 @@
var
percent
=
2.54
;
$
.
each
(
$
(
".size-item"
),
function
(
x
)
{
var
current
=
$
(
this
).
data
(
'size-item-cm'
);
console
.
log
(
current
);
if
(
type
==
'inc'
)
{
var
data
=
(
current
/
percent
-
0
).
toFixed
(
2
);
}
else
{
...
...
@@ -325,7 +323,8 @@
<div
id=
"chart-details"
>
<div
class=
"chart-size-switch "
>
<input
type=
"hidden"
value=
""
>
<span
class=
"chart-size-switch-item -active"
data-size-type=
"cm"
>
<?=
__
(
'cm'
);
?>
</span><span
data-size-type=
"inc"
class=
"chart-size-switch-item"
>
<?=
__
(
'Inch'
);
?>
</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;"
>
...
...
app/design/frontend/Joshine/breeze/Magento_Swatches/web/js/swatch-renderer.js
View file @
580a88da
...
...
@@ -398,6 +398,9 @@ define([
_getSizeChartData
:
function
(
item
,
value
)
{
var
chartData
=
this
.
options
.
sizeChartData
;
if
(
chartData
.
length
==
0
)
{
return
''
;
}
chartData
=
JSON
.
parse
(
chartData
);
var
len
=
chartData
.
length
var
currentItem
=
[];
...
...
@@ -419,12 +422,12 @@ define([
for
(
let
i
=
0
;
i
<
labelLen
;
i
++
)
{
if
(
i
==
0
)
{
label
+=
currentItem
[
i
]
+
"
: "
;
label
+=
currentItem
[
i
]
+
" : "
;
continue
;
}
label
+=
option
[
i
]
+
currentItem
[
i
]
+
"(cm)
"
;
label
+=
option
[
i
]
+
' '
+
currentItem
[
i
]
+
"(inc)
"
;
if
(
i
<
labelLen
-
1
)
{
label
+=
",
"
;
label
+=
", "
;
}
}
...
...
@@ -600,9 +603,13 @@ define([
}
if
(
item
.
id
==
137
)
{
// Create new control
var
sizeContent
=
'<div class="swatch-attribute-selected-option-size-content" style="display:block;">'
+
'<div>'
+
$
.
mage
.
__
(
"Product Size Describe"
)
+
'</div>'
+
'<span class="'
+
classes
.
attributeSelectedOptionLabelClass
+
'">'
+
that
.
_getSizeChartData
(
item
,
optionConfig
[
137
][
item
.
options
[
0
].
id
].
value
)
+
'</span></div>'
;
var
sizeContentText
=
that
.
_getSizeChartData
(
item
,
optionConfig
[
137
][
item
.
options
[
0
].
id
].
value
);
var
sizeContent
=
''
;
if
(
sizeContentText
.
length
>
0
)
{
sizeContent
+=
'<div class="swatch-attribute-selected-option-size-content" style="display:block;">'
;
sizeContent
+=
'<span class="'
+
classes
.
attributeSelectedOptionLabelClass
+
'">'
+
that
.
_getSizeChartData
(
item
,
optionConfig
[
137
][
item
.
options
[
0
].
id
].
value
)
+
'</span>'
;
sizeContent
+=
"</div>"
;
}
container
.
append
(
'<div class="'
+
classes
.
attributeClass
+
' '
+
item
.
code
+
'" '
+
...
...
app/design/frontend/Joshine/breeze/web/css/_custom.less
View file @
580a88da
...
...
@@ -2704,7 +2704,7 @@ button.action.submit.primary {
}
.swatch-attribute.size .swatch-attribute-selected-option{
font-size: .8rem;
font-size: .8
5
rem;
}
.swatch-attribute-selected-option-size-content{
...
...
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