1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192 |
- <?php
- /**
- * Copyright © Magento, Inc. All rights reserved.
- * See COPYING.txt for license details.
- */
- // @codingStandardsIgnoreFile
- /** @var \Magento\Wishlist\Block\Share\Wishlist $block */
- ?>
- <?php if ($block->hasWishlistItems()): ?>
- <form class="form shared wishlist" action="<?= $block->escapeUrl($block->getUrl('wishlist/index/update')) ?>" method="post">
- <div class="wishlist table-wrapper">
- <table class="table data wishlist" id="wishlist-table">
- <caption class="table-caption"><?= $block->escapeHtml(__('Wish List')) ?></caption>
- <thead>
- <tr>
- <th class="col product" scope="col"><?= $block->escapeHtml(__('Product')) ?></th>
- <th class="col comment" scope="col"><?= $block->escapeHtml(__('Comment')) ?></th>
- <th class="col actions" scope="col"><?= $block->escapeHtml(__('Add to Cart')) ?></th>
- </tr>
- </thead>
- <tbody>
- <?php foreach ($block->getWishlistItems() as $item): ?>
- <?php
- $product = $item->getProduct();
- $isVisibleProduct = $product->isVisibleInSiteVisibility();
- ?>
- <tr>
- <td data-th="<?= $block->escapeHtmlAttr(__('Product')) ?>" class="col product">
- <a class="product photo" href="<?= $block->escapeUrl($block->getProductUrl($item)) ?>" title="<?= $block->escapeHtmlAttr($product->getName()) ?>">
- <?= $block->getImage($product, 'customer_shared_wishlist')->toHtml() ?>
- </a>
- <strong class="product name">
- <a href="<?= $block->escapeUrl($block->getProductUrl($item)) ?>">
- <?= $block->escapeHtml($product->getName()) ?>
- </a>
- </strong>
- <?php
- echo $block->getProductPriceHtml(
- $product,
- 'wishlist_configured_price',
- \Magento\Framework\Pricing\Render::ZONE_ITEM_LIST,
- ['item' => $item]
- );
- ?>
- <?= $block->getDetailsHtml($item) ?>
- </td>
- <td data-th="<?= $block->escapeHtmlAttr(__('Comment')) ?>" class="col comment"><?= /* @noEscape */ $block->getEscapedDescription($item) ?></td>
- <td data-th="<?= $block->escapeHtmlAttr(__('Add to Cart')) ?>" class="col actions" data-role="add-to-links">
- <?php if ($product->isSaleable()): ?>
- <?php if ($isVisibleProduct): ?>
- <button type="button"
- title="<?= $block->escapeHtmlAttr(__('Add to Cart')) ?>"
- data-post='<?= /* @noEscape */ $block->getSharedItemAddToCartUrl($item) ?>'
- class="action tocart">
- <span><?= $block->escapeHtml(__('Add to Cart')) ?></span>
- </button>
- <?php endif ?>
- <?php endif; ?>
- <a href="#" data-post='<?= /* @noEscape */ $block->getAddToWishlistParams($item) ?>' onclick="location.assign(this.href); return false;" class="action towishlist" data-action="add-to-wishlist">
- <span><?= $block->escapeHtml(__('Add to Wish List')) ?></span>
- </a>
- </td>
- </tr>
- <?php endforeach ?>
- </tbody>
- </table>
- </div>
- <div class="actions-toolbar">
- <?php if ($block->isSaleable()):?>
- <div class="primary">
- <button type="button"
- title="<?= $block->escapeHtmlAttr(__('Add All to Cart')) ?>"
- data-post='<?= $block->escapeUrl($block->getSharedAddAllToCartUrl()) ?>'
- class="action tocart primary">
- <span><?= $block->escapeHtml(__('Add All to Cart')) ?></span>
- </button>
- </div>
- <?php endif;?>
- <div class="secondary">
- <a href="<?= $block->escapeUrl($block->getBackUrl()) ?>" class="action back">
- <span><?= $block->escapeHtml(__('Back')) ?></span>
- </a>
- </div>
- </div>
- </form>
- <?php else: ?>
- <div class="message info empty"><div><?= $block->escapeHtml(__('Wish List is empty now.')) ?></div></div>
- <?php endif ?>
|