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
ee81fdb7
Commit
ee81fdb7
authored
May 11, 2023
by
liumengfei
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'developer' into production
parents
3e017a0c
f7a155b4
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
43 additions
and
33 deletions
+43
-33
app/code/Joshine/Category/Block/Html/Topmenu.php
+34
-14
app/code/Joshine/Category/Model/Category/Attribute/Source/Columns.php
+6
-0
app/design/frontend/Joshine/breeze/Magento_Catalog/templates/product/list.phtml
+2
-9
app/design/frontend/Joshine/breeze/Magento_Catalog/templates/product/view/gallery.phtml
+1
-1
app/design/frontend/Joshine/breeze/Magento_Theme/templates/html/header/logo.phtml
+0
-9
No files found.
app/code/Joshine/Category/Block/Html/Topmenu.php
View file @
ee81fdb7
...
@@ -199,19 +199,17 @@ class Topmenu extends JoshineMenu
...
@@ -199,19 +199,17 @@ class Topmenu extends JoshineMenu
$colStops
=
$this
->
_columnBrake
(
$child
->
getChildren
(),
$limit
);
$colStops
=
$this
->
_columnBrake
(
$child
->
getChildren
(),
$limit
);
}
}
$sumMenuColumnsTotal
=
$child
->
getSubmenuColumnsTotal
();
$columns
=
$sumMenuColumnsTotal
??
"11"
;
if
(
intval
(
$columns
)
>=
12
)
{
$columns
=
"11"
;
}
if
(
$childLevel
==
0
)
{
if
(
$childLevel
==
0
)
{
$leftMargin
=
$child
->
getChildLeftMargin
();
$leftMarginClass
=
$this
->
getMarginClass
(
$child
->
getChildLeftMargin
());
if
(
$leftMargin
!=
"0"
&&
empty
(
$leftMargin
))
{
$sumMenuColumnsTotal
=
$child
->
getSubmenuColumnsTotal
();
$leftMargin
=
"1"
;
$columns
=
$sumMenuColumnsTotal
??
"11"
;
if
(
intval
(
$columns
)
>=
12
)
{
$columns
=
"11"
;
}
}
$colClass
=
$this
->
getColClass
(
$columns
);
$html
=
"<div class=
\"
level
{
$childLevel
}
{
$childrenWrapClass
}
\"
>"
;
$html
=
"<div class=
\"
level
{
$childLevel
}
{
$childrenWrapClass
}
\"
>"
;
$html
.=
"<div class=
\"
row
\"
>
$html
.=
"<div class=
\"
row
\"
>
<ul class=
\"
subchildmenu
joshine-col-lg-push-
{
$leftMargin
}
mega-columns joshine-clearfix joshine-col-lg-
{
$columns
}
{
$child
->
getMenuImage
()
}
\"
>
<ul class=
\"
subchildmenu
$leftMarginClass
mega-columns joshine-clearfix
$colClass
{
$child
->
getMenuImage
()
}
\"
>
{
$this
->
_getHtml
(
$child
,
$childrenWrapClass
,
$limit
,
$colStops
)
}
{
$this
->
_getHtml
(
$child
,
$childrenWrapClass
,
$limit
,
$colStops
)
}
</ul>"
;
</ul>"
;
$html
.=
$this
->
appendImage
(
$child
);
$html
.=
$this
->
appendImage
(
$child
);
...
@@ -224,6 +222,30 @@ class Topmenu extends JoshineMenu
...
@@ -224,6 +222,30 @@ class Topmenu extends JoshineMenu
return
$html
;
return
$html
;
}
}
private
function
getMarginClass
(
$col
)
{
$colInt
=
intval
(
$col
);
if
(
$colInt
>
0
)
{
return
"joshine-col-lg-push-
{
$colInt
}
"
;
}
if
(
$colInt
<
0
)
{
$colInt
=
abs
(
$colInt
);
return
"joshine-col-lg-pull-
{
$colInt
}
"
;
}
return
"joshine-col-lg-push-1"
;
}
private
function
getColClass
(
$col
)
{
$colInt
=
intval
(
$col
);
if
(
$colInt
<=
0
)
{
return
""
;
}
return
"joshine-col-lg-
{
$colInt
}
"
;
}
private
function
appendImage
(
$child
)
private
function
appendImage
(
$child
)
{
{
$html
=
""
;
$html
=
""
;
...
@@ -232,15 +254,13 @@ class Topmenu extends JoshineMenu
...
@@ -232,15 +254,13 @@ class Topmenu extends JoshineMenu
}
}
if
(
$child
->
getMenuImage
())
{
if
(
$child
->
getMenuImage
())
{
$imageLeftMargin
=
$child
->
getImageLeftMargin
();
$marginClass
=
$this
->
getMarginClass
(
intval
(
$child
->
getImageLeftMargin
()));
if
(
empty
(
$imageLeftMargin
))
{
$imageLeftMargin
=
"0"
;
}
$imageWidth
=
$child
->
getImageWidth
();
$imageWidth
=
$child
->
getImageWidth
();
if
(
empty
(
$imageWidth
))
{
if
(
empty
(
$imageWidth
))
{
$imageWidth
=
"3"
;
$imageWidth
=
"3"
;
}
}
$html
.=
"<div class=
\"
pull-right joshine-col-lg-
{
$imageWidth
}
joshine-col-lg-push-
{
$imageLeftMargin
}
joshine-hidden-xs joshine-hidden-sm joshine-hidden-md
\"
>"
;
$colClass
=
$this
->
getColClass
(
$imageWidth
);
$html
.=
"<div class=
\"
$colClass
$marginClass
joshine-hidden-xs joshine-hidden-sm joshine-hidden-md
\"
>"
;
$html
.=
"<img src='
{
$child
->
getMenuImage
()
}
'/>"
;
$html
.=
"<img src='
{
$child
->
getMenuImage
()
}
'/>"
;
$html
.=
"</div>"
;
$html
.=
"</div>"
;
}
}
...
...
app/code/Joshine/Category/Model/Category/Attribute/Source/Columns.php
View file @
ee81fdb7
...
@@ -40,6 +40,12 @@ class Columns extends \Magento\Eav\Model\Entity\Attribute\Source\AbstractSource
...
@@ -40,6 +40,12 @@ class Columns extends \Magento\Eav\Model\Entity\Attribute\Source\AbstractSource
[
'value'
=>
'10'
,
'label'
=>
'10-columns'
],
[
'value'
=>
'10'
,
'label'
=>
'10-columns'
],
[
'value'
=>
'11'
,
'label'
=>
'11-columns'
],
[
'value'
=>
'11'
,
'label'
=>
'11-columns'
],
[
'value'
=>
'12'
,
'label'
=>
'12-columns'
],
[
'value'
=>
'12'
,
'label'
=>
'12-columns'
],
[
'value'
=>
'-1'
,
'label'
=>
'-1-left'
],
[
'value'
=>
'-2'
,
'label'
=>
'-2-left'
],
[
'value'
=>
'-3'
,
'label'
=>
'-3-left'
],
[
'value'
=>
'-4'
,
'label'
=>
'-4-left'
],
[
'value'
=>
'-5'
,
'label'
=>
'-5-left'
],
[
'value'
=>
'-6'
,
'label'
=>
'-6-left'
],
];
];
}
}
return
$this
->
_optionsData
;
return
$this
->
_optionsData
;
...
...
app/design/frontend/Joshine/breeze/Magento_Catalog/templates/product/list.phtml
View file @
ee81fdb7
...
@@ -96,7 +96,6 @@ $_helper = $block->getData('outputHelper');
...
@@ -96,7 +96,6 @@ $_helper = $block->getData('outputHelper');
data-container=
"product-
<?=
/* @noEscape */
$viewMode
?>
"
>
data-container=
"product-
<?=
/* @noEscape */
$viewMode
?>
"
>
<?php
<?php
$productImage
=
$block
->
getImage
(
$_product
,
$imageDisplayArea
);
$productImage
=
$block
->
getImage
(
$_product
,
$imageDisplayArea
);
$baseImageUrl
=
$productImage
->
getImageUrl
();
$baseImageUrl
=
$productImage
->
getImageUrl
();
$allImage
=
$_product
->
getMediaGalleryImages
()
->
getItems
();
$allImage
=
$_product
->
getMediaGalleryImages
()
->
getItems
();
$hoverImg
=
''
;
$hoverImg
=
''
;
...
@@ -106,21 +105,15 @@ $_helper = $block->getData('outputHelper');
...
@@ -106,21 +105,15 @@ $_helper = $block->getData('outputHelper');
break
;
break
;
}
}
}
}
if
(
$pos
!=
null
)
{
if
(
$pos
!=
null
)
{
$position
=
'left:'
.
$productImage
->
getWidth
()
.
'px;'
$position
=
'left:'
.
$productImage
->
getWidth
()
.
'px;'
.
'top:'
.
$productImage
->
getHeight
()
.
'px;'
;
.
'top:'
.
$productImage
->
getHeight
()
.
'px;'
;
}
}
?>
?>
<?php
// Product Image ?>
<?php
// Product Image ?>
<
a
href
=
"<?=
$escaper->escapeUrl
(
$_product->getProductUrl
()) ?>"
<
a
href
=
"<?=
$escaper->escapeUrl
(
$_product->getProductUrl
()) ?>"
class
="
product
photo
product
-
item
-
photo
"
class
="
product
photo
product
-
item
-
photo
"
tabindex="
-
1
">
tabindex="
-
1
">
<?php
<?=
$productImage->toHtml
() ?>
$productImageRaw
=
$imageHelper->init
(
$_product
,
$imageDisplayArea
)->setImageFile(
$productImage->getFile
())->resize(
$productImage->getWidth
(),
$productImage->getHeight
())->getUrl();
?>
<img class="
product
-
image
-
photo
" style="
background
-
color
:
#F0F0F0;" src="<?= $productImageRaw ?>" loading="lazy" width="<?= $productImage->getWidth() ?>px" height="<?= $productImage->getHeight() ?>px" />
<?php if (
$hoverImg
): ?>
<?php if (
$hoverImg
): ?>
<img class="
hoverImg
" width="
<?=
$productImage
->
getWidth
()
?>
px" height="
<?=
$productImage
->
getHeight
()
?>
px" src="
<?=
$hoverImg
?>
" loading="lazy" />
<img class="
hoverImg
" width="
<?=
$productImage
->
getWidth
()
?>
px" height="
<?=
$productImage
->
getHeight
()
?>
px" src="
<?=
$hoverImg
?>
" loading="lazy" />
<?php
endif
;
?>
<?php
endif
;
?>
...
...
app/design/frontend/Joshine/breeze/Magento_Catalog/templates/product/view/gallery.phtml
View file @
ee81fdb7
...
@@ -35,7 +35,7 @@ $mainImageData = $mainImage ?
...
@@ -35,7 +35,7 @@ $mainImageData = $mainImage ?
<img
<img
alt=
"main product photo"
alt=
"main product photo"
class=
"gallery-placeholder__image"
class=
"gallery-placeholder__image"
data-
src=
="
<?=
/* @noEscape */
$mainImageData
?>
"
src=
="
<?=
/* @noEscape */
$mainImageData
?>
"
/>
/>
</div>
</div>
...
...
app/design/frontend/Joshine/breeze/Magento_Theme/templates/html/header/logo.phtml
View file @
ee81fdb7
...
@@ -30,13 +30,4 @@ $logoHeight = $logoSizeResolver !== null && $logoSizeResolver->getHeight()
...
@@ -30,13 +30,4 @@ $logoHeight = $logoSizeResolver !== null && $logoSizeResolver->getHeight()
alt=
"
<?=
$block
->
escapeHtmlAttr
(
$block
->
getLogoAlt
())
?>
"
alt=
"
<?=
$block
->
escapeHtmlAttr
(
$block
->
getLogoAlt
())
?>
"
<?=
$logoWidth
?
'width="'
.
$block
->
escapeHtmlAttr
(
$logoWidth
)
.
'"'
:
''
?>
<?=
$logoWidth
?
'width="'
.
$block
->
escapeHtmlAttr
(
$logoWidth
)
.
'"'
:
''
?>
<?=
$logoHeight
?
'height="'
.
$block
->
escapeHtmlAttr
(
$logoHeight
)
.
'"'
:
''
?>
/>
<?=
$logoHeight
?
'height="'
.
$block
->
escapeHtmlAttr
(
$logoHeight
)
.
'"'
:
''
?>
/>
<?php
if
(
$block
->
getRequest
()
->
getModuleName
()
==
"checkout"
)
{
?>
<span
class=
"secure-span"
>
<span
class=
"cut-span"
>
/
</span>
<img
class=
"logo-secure"
src=
"/media/wysiwyg/logo-secure.png"
/>
<span
class=
"cut-font"
>
<?=
__
(
'SECURE CHECKOUT'
)
?>
</span>
</span>
<?php
}
?>
</a>
</a>
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