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
aadbc26d
Commit
aadbc26d
authored
Dec 10, 2022
by
lmf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改bug
parent
18ae46c8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
89 additions
and
70 deletions
+89
-70
app/design/frontend/Joshine/breeze/Magento_Catalog/templates/product/list.phtml
+89
-70
No files found.
app/design/frontend/Joshine/breeze/Magento_Catalog/templates/product/list.phtml
View file @
aadbc26d
...
...
@@ -51,7 +51,6 @@ $sort_by = key_exists("sort_by",$_REQUEST) ? $_REQUEST["sort_by"] : false;
<?php
/** @var $_product \Magento\Catalog\Model\Product */
?>
<?php
foreach
(
$_productCollection
as
$_product
)
:
?>
<?php
if
(
$sort_by
&&
$sort_by
==
$_product
->
getUrlKey
())
:
?>
<li
class=
"item product product-item"
>
<div
class=
"product-item-info"
id=
"product-item-info_
<?=
/* @noEscape */
$_product
->
getId
()
?>
"
...
...
@@ -199,9 +198,23 @@ $sort_by = key_exists("sort_by",$_REQUEST) ? $_REQUEST["sort_by"] : false;
<
a
href
=
"<?=
$escaper->escapeUrl
(
$_product->getProductUrl
()) ?>"
class
="
product
photo
product
-
item
-
photo
"
tabindex="
-
1
">
<?=
$productImage->toHtml
() ?>
<span class="
image0
image
-
switch
">
<span class="
product
-
image
-
container
product
-
image
-
container
-<?=
/* @noEscape */
$_product
->
getId
()
?>
" style="width: 440px;">
<span
class=
"product-image-wrapper"
style=
"padding-bottom: 125%;"
>
<?=
$productImage
->
toHtml
()
?>
</span>
</span>
</span>
<span
class=
"image1 image-switch"
>
<span
class=
"product-image-container product-image-container-
<?=
/* @noEscape */
$_product
->
getId
()
?>
"
style=
"width: 440px;"
>
<span
class=
"product-image-wrapper"
style=
"padding-bottom: 125%;"
>
<?=
$productImage
->
toHtml
()
?>
</span>
</span>
</span>
</a>
<div
class=
"product details product-item-details"
>
<?=
$block
->
getProductDetailsHtml
(
$_product
)
?>
<?php
$_productNameStripped
=
$block
->
stripTags
(
$_product
->
getName
(),
null
,
true
);
?>
<strong
class=
"product name product-item-name"
>
<a
class=
"product-item-link"
...
...
@@ -209,84 +222,90 @@ $sort_by = key_exists("sort_by",$_REQUEST) ? $_REQUEST["sort_by"] : false;
<?=
/* @noEscape */
$_helper
->
productAttribute
(
$_product
,
$_product
->
getName
(),
'name'
)
?>
</a>
</strong>
<?=
$block
->
getReviewsSummaryHtml
(
$_product
,
$templateType
)
?>
<?=
/* @noEscape */
$block
->
getProductPrice
(
$_product
)
?>
<!-- -->
<?
//= $block->getReviewsSummaryHtml($_product, $templateType) ?>
<?=
$block
->
getProductDetailsHtml
(
$_product
)
?>
<
div
class
="
price_wish
">
<?= /* @noEscape */
$block->getProductPrice
(
$_product
) ?>
<div
class=
"product-item-inner"
>
<div
class=
"product actions product-item-actions"
>
<div
class=
"actions-primary"
>
<?php
if
(
$_product
->
isSaleable
())
:?>
<?
php
$postParams
=
$block
->
getAddToCartPostParams
(
$_product
);
?>
<form
data-role=
"tocart-form"
data-product-sku=
"
<?=
$escaper
->
escapeHtml
(
$_product
->
getSku
())
?>
"
action=
"
<?=
$escaper
->
escapeUrl
(
$postParams
[
'action'
])
?>
"
method=
"post"
>
<?php
$options
=
$block
->
getData
(
'viewModel'
)
->
getOptionsData
(
$_product
);
?>
<?php
foreach
(
$options
as
$optionItem
)
:
?>
<div class="
product
-
item
-
inner
">
<div class="
product
actions
product
-
item
-
actions
">
<div class="
actions
-
primary
">
<?php if (
$_product->isSaleable
()):?>
<?php
$postParams
=
$block->getAddToCartPostParams
(
$_product
); ?>
<form data-role="
tocart
-
form
"
data-product-sku="
<?=
$escaper
->
escapeHtml
(
$_product
->
getSku
())
?>
"
action="
<?=
$escaper
->
escapeUrl
(
$postParams
[
'action'
])
?>
"
method="post">
<?php
$optionsData
=
$block
->
getData
(
'viewModel'
)
->
getOptionsData
(
$_product
);
?>
<?php
foreach
(
$optionsData
as
$optionItem
)
:
?>
<input
type=
"hidden"
name=
"
<?=
$escaper
->
escapeHtml
(
$optionItem
[
'name'
])
?>
"
value=
"
<?=
$escaper
->
escapeHtml
(
$optionItem
[
'value'
])
?>
"
>
<?php
endforeach
;
?>
<input
type=
"hidden"
name=
"
<?=
$escaper
->
escapeHtml
(
$optionItem
[
'name'
])
?>
"
value=
"
<?=
$escaper
->
escapeHtml
(
$optionItem
[
'value'
])
?>
"
>
<?php
endforeach
;
?>
<input
type=
"hidden"
name=
"product"
value=
"
<?=
/* @noEscape */
$postParams
[
'data'
][
'product'
]
?>
"
>
<input
type=
"hidden"
name=
"
<?=
/* @noEscape */
Action
::
PARAM_NAME_URL_ENCODED
?>
"
value=
"
<?=
/* @noEscape */
$postParams
[
'data'
][
Action
::
PARAM_NAME_URL_ENCODED
]
?>
"
>
<?=
$block
->
getBlockHtml
(
'formkey'
)
?>
<button
type=
"submit"
title=
"
<?=
$escaper
->
escapeHtmlAttr
(
__
(
'Add to Cart'
))
?>
"
class=
"action tocart primary"
disabled
>
<span>
<?=
$escaper
->
escapeHtml
(
__
(
'Add to Cart'
))
?>
</span>
</button>
</form>
<?php
else
:?>
<?
php
if
(
$_product
->
isAvailable
())
:?>
<
div
class
="
stock
available
">
<span><?=
$escaper->escapeHtml
(__('In stock')) ?></span></div>
name=
"product"
value=
"
<?=
/* @noEscape */
$postParams
[
'data'
][
'product'
]
?>
"
>
<input
type=
"hidden"
name=
"
<?=
/* @noEscape */
Action
::
PARAM_NAME_URL_ENCODED
?>
"
value=
"
<?=
/* @noEscape */
$postParams
[
'data'
][
Action
::
PARAM_NAME_URL_ENCODED
]
?>
"
>
<?=
$block
->
getBlockHtml
(
'formkey'
)
?>
<!-- <button type="submit"-->
<!-- title="-->
<?
//= $escaper->escapeHtmlAttr(__('Add to Cart')) ?><!--"-->
<!--
class
="
action
tocart
primary
"-->
<!-- disabled>-->
<!-- <span>--><?//=
$escaper->escapeHtml
(__('Add to Cart')) ?><!--</span>-->
<!-- </button>-->
</form>
<?php else:?>
<div class="
stock
unavailable
">
<span><?=
$escaper->escapeHtml
(__('Out of stock')) ?></span></div>
<?php if (
$_product->isAvailable
()):?>
<div class="
stock
available
">
<span><?=
$escaper->escapeHtml
(__('In stock')) ?></span></div>
<?php else:?>
<div class="
stock
unavailable
">
<span><?=
$escaper->escapeHtml
(__('Out of stock')) ?></span></div>
<?php endif; ?>
<?php endif; ?>
<?php endif; ?>
</div>
<?= (
$pos
&& strpos(
$pos
,
$viewMode
. '-primary')) ?
/* @noEscape */
$secureRenderer->renderStyleAsTag
(
$position
,
'product-item-info_' .
$_product->getId
() . ' div.actions-primary'
) : '' ?>
<div data-role="
add
-
to
-
links
" class="
actions
-
secondary
">
<?php if (
$addToBlock
=
$block->getChildBlock
('addto')): ?>
<?=
$addToBlock->setProduct
(
$_product
)->getChildHtml() ?>
<?php endif; ?>
</div>
<!-- <div id="
quickview
---><?//=
/* @noEscape */
$_product
->
getId
()
?>
<!--" class="btn-quickview">-->
<!-- <a class="ninja-quickview" data-quickview-url="/quickview/catalog_product/view/id/-->
<?
//= /* @noEscape */ $_product->getId() ?><!--" href="javascript:void(0);" >-->
<!--
<
span
>
kkkkkkk
</
span
>-->
<!--
</
a
>-->
<!--
</
div
>-->
<?=
strpos
(
$pos
,
$viewMode
.
'-primary'
)
?
/* @noEscape */
$secureRenderer
->
renderStyleAsTag
(
$position
,
'product-item-info_'
.
$_product
->
getId
()
.
' div.actions-primary'
)
:
''
?>
<div
data-role=
"add-to-links"
class=
"actions-secondary"
>
<?php
if
(
$addToBlock
=
$block
->
getChildBlock
(
'addto'
))
:
?>
<?=
$addToBlock
->
setProduct
(
$_product
)
->
getChildHtml
()
?>
<?php
endif
;
?>
</div>
<?=
strpos
(
$pos
,
$viewMode
.
'-secondary'
)
?
/* @noEscape */
$secureRenderer
->
renderStyleAsTag
(
$position
,
'product-item-info_'
.
$_product
->
getId
()
.
' div.actions-secondary'
)
:
''
?>
</div>
<?= (
$pos
&& strpos(
$pos
,
$viewMode
. '-secondary')) ?
/* @noEscape */
$secureRenderer->renderStyleAsTag
(
$position
,
'product-item-info_' .
$_product->getId
() . ' div.actions-secondary'
) : '' ?>
<?php
if
(
$showDescription
)
:
?>
<div
class=
"product description product-item-description"
>
<?=
/* @noEscape */
$_helper
->
productAttribute
(
$_product
,
$_product
->
getShortDescription
(),
'short_description'
)
?>
<a
href=
"
<?=
$escaper
->
escapeUrl
(
$_product
->
getProductUrl
())
?>
"
title=
"
<?=
/* @noEscape */
$_productNameStripped
?>
"
class=
"action more"
>
<?=
$escaper
->
escapeHtml
(
__
(
'Learn More'
))
?>
</a>
</div>
<?php
endif
;
?>
</div>
<?php if (
$showDescription
): ?>
<div class="
product
description
product
-
item
-
description
">
<?= /* @noEscape */
$_helper->productAttribute
(
$_product
,
$_product->getShortDescription
(),
'short_description'
) ?>
<a href="
<?=
$escaper
->
escapeUrl
(
$_product
->
getProductUrl
())
?>
"
title="
<?=
/* @noEscape */
$_productNameStripped
?>
"
class="action more">
<?=
$escaper
->
escapeHtml
(
__
(
'Learn More'
))
?>
</a>
</div>
<?php
endif
;
?>
</div>
</div>
</div>
<?=
(
$pos
&&
strpos
(
$pos
,
$viewMode
.
'-actions'
)
)
?
<?=
strpos
(
$pos
,
$viewMode
.
'-actions'
)
?
/* @noEscape */
$secureRenderer
->
renderStyleAsTag
(
$position
,
'product-item-info_'
.
$_product
->
getId
()
.
' div.product-item-actions'
...
...
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