Commit aadbc26d by lmf

修改bug

parent 18ae46c8
...@@ -51,7 +51,6 @@ $sort_by = key_exists("sort_by",$_REQUEST) ? $_REQUEST["sort_by"] : false; ...@@ -51,7 +51,6 @@ $sort_by = key_exists("sort_by",$_REQUEST) ? $_REQUEST["sort_by"] : false;
<?php /** @var $_product \Magento\Catalog\Model\Product */ ?> <?php /** @var $_product \Magento\Catalog\Model\Product */ ?>
<?php foreach ($_productCollection as $_product): ?> <?php foreach ($_productCollection as $_product): ?>
<?php if ($sort_by && $sort_by == $_product->getUrlKey()): ?> <?php if ($sort_by && $sort_by == $_product->getUrlKey()): ?>
<li class="item product product-item"> <li class="item product product-item">
<div class="product-item-info" <div class="product-item-info"
id="product-item-info_<?= /* @noEscape */ $_product->getId() ?>" id="product-item-info_<?= /* @noEscape */ $_product->getId() ?>"
...@@ -199,9 +198,23 @@ $sort_by = key_exists("sort_by",$_REQUEST) ? $_REQUEST["sort_by"] : false; ...@@ -199,9 +198,23 @@ $sort_by = key_exists("sort_by",$_REQUEST) ? $_REQUEST["sort_by"] : false;
<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">
<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() ?> <?= $productImage->toHtml() ?>
</span>
</span>
</span>
</a> </a>
<div class="product details product-item-details"> <div class="product details product-item-details">
<?= $block->getProductDetailsHtml($_product) ?>
<?php $_productNameStripped = $block->stripTags($_product->getName(), null, true); ?> <?php $_productNameStripped = $block->stripTags($_product->getName(), null, true); ?>
<strong class="product name product-item-name"> <strong class="product name product-item-name">
<a class="product-item-link" <a class="product-item-link"
...@@ -209,10 +222,10 @@ $sort_by = key_exists("sort_by",$_REQUEST) ? $_REQUEST["sort_by"] : false; ...@@ -209,10 +222,10 @@ $sort_by = key_exists("sort_by",$_REQUEST) ? $_REQUEST["sort_by"] : false;
<?=/* @noEscape */ $_helper->productAttribute($_product, $_product->getName(), 'name')?> <?=/* @noEscape */ $_helper->productAttribute($_product, $_product->getName(), 'name')?>
</a> </a>
</strong> </strong>
<?= $block->getReviewsSummaryHtml($_product, $templateType) ?> <!-- --><?//= $block->getReviewsSummaryHtml($_product, $templateType) ?>
<?= /* @noEscape */ $block->getProductPrice($_product) ?>
<?= $block->getProductDetailsHtml($_product) ?> <div class="price_wish">
<?= /* @noEscape */ $block->getProductPrice($_product) ?>
<div class="product-item-inner"> <div class="product-item-inner">
<div class="product actions product-item-actions"> <div class="product actions product-item-actions">
...@@ -223,8 +236,8 @@ $sort_by = key_exists("sort_by",$_REQUEST) ? $_REQUEST["sort_by"] : false; ...@@ -223,8 +236,8 @@ $sort_by = key_exists("sort_by",$_REQUEST) ? $_REQUEST["sort_by"] : false;
data-product-sku="<?= $escaper->escapeHtml($_product->getSku()) ?>" data-product-sku="<?= $escaper->escapeHtml($_product->getSku()) ?>"
action="<?= $escaper->escapeUrl($postParams['action']) ?>" action="<?= $escaper->escapeUrl($postParams['action']) ?>"
method="post"> method="post">
<?php $options = $block->getData('viewModel')->getOptionsData($_product); ?> <?php $optionsData = $block->getData('viewModel')->getOptionsData($_product); ?>
<?php foreach ($options as $optionItem): ?> <?php foreach ($optionsData as $optionItem): ?>
<input type="hidden" <input type="hidden"
name="<?= $escaper->escapeHtml($optionItem['name']) ?>" name="<?= $escaper->escapeHtml($optionItem['name']) ?>"
value="<?= $escaper->escapeHtml($optionItem['value']) ?>"> value="<?= $escaper->escapeHtml($optionItem['value']) ?>">
...@@ -238,12 +251,12 @@ $sort_by = key_exists("sort_by",$_REQUEST) ? $_REQUEST["sort_by"] : false; ...@@ -238,12 +251,12 @@ $sort_by = key_exists("sort_by",$_REQUEST) ? $_REQUEST["sort_by"] : false;
/* @noEscape */ $postParams['data'][Action::PARAM_NAME_URL_ENCODED] /* @noEscape */ $postParams['data'][Action::PARAM_NAME_URL_ENCODED]
?>"> ?>">
<?= $block->getBlockHtml('formkey') ?> <?= $block->getBlockHtml('formkey') ?>
<button type="submit" <!-- <button type="submit"-->
title="<?= $escaper->escapeHtmlAttr(__('Add to Cart')) ?>" <!-- title="--><?//= $escaper->escapeHtmlAttr(__('Add to Cart')) ?><!--"-->
class="action tocart primary" <!-- class="action tocart primary"-->
disabled> <!-- disabled>-->
<span><?= $escaper->escapeHtml(__('Add to Cart')) ?></span> <!-- <span>--><?//= $escaper->escapeHtml(__('Add to Cart')) ?><!--</span>-->
</button> <!-- </button>-->
</form> </form>
<?php else:?> <?php else:?>
<?php if ($_product->isAvailable()):?> <?php if ($_product->isAvailable()):?>
...@@ -255,7 +268,12 @@ $sort_by = key_exists("sort_by",$_REQUEST) ? $_REQUEST["sort_by"] : false; ...@@ -255,7 +268,12 @@ $sort_by = key_exists("sort_by",$_REQUEST) ? $_REQUEST["sort_by"] : false;
<?php endif; ?> <?php endif; ?>
<?php endif; ?> <?php endif; ?>
</div> </div>
<?= ($pos && strpos($pos, $viewMode . '-primary')) ? <!-- <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( /* @noEscape */ $secureRenderer->renderStyleAsTag(
$position, $position,
'product-item-info_' . $_product->getId() . ' div.actions-primary' 'product-item-info_' . $_product->getId() . ' div.actions-primary'
...@@ -265,7 +283,7 @@ $sort_by = key_exists("sort_by",$_REQUEST) ? $_REQUEST["sort_by"] : false; ...@@ -265,7 +283,7 @@ $sort_by = key_exists("sort_by",$_REQUEST) ? $_REQUEST["sort_by"] : false;
<?= $addToBlock->setProduct($_product)->getChildHtml() ?> <?= $addToBlock->setProduct($_product)->getChildHtml() ?>
<?php endif; ?> <?php endif; ?>
</div> </div>
<?= ($pos && strpos($pos, $viewMode . '-secondary')) ? <?= strpos($pos, $viewMode . '-secondary') ?
/* @noEscape */ $secureRenderer->renderStyleAsTag( /* @noEscape */ $secureRenderer->renderStyleAsTag(
$position, $position,
'product-item-info_' . $_product->getId() . ' div.actions-secondary' 'product-item-info_' . $_product->getId() . ' div.actions-secondary'
...@@ -286,7 +304,8 @@ $sort_by = key_exists("sort_by",$_REQUEST) ? $_REQUEST["sort_by"] : false; ...@@ -286,7 +304,8 @@ $sort_by = key_exists("sort_by",$_REQUEST) ? $_REQUEST["sort_by"] : false;
</div> </div>
</div> </div>
</div> </div>
<?= ($pos && strpos($pos, $viewMode . '-actions')) ? </div>
<?= strpos($pos, $viewMode . '-actions') ?
/* @noEscape */ $secureRenderer->renderStyleAsTag( /* @noEscape */ $secureRenderer->renderStyleAsTag(
$position, $position,
'product-item-info_' . $_product->getId() . ' div.product-item-actions' 'product-item-info_' . $_product->getId() . ' div.product-item-actions'
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment