default.php
56 lines
| 1 | |
| 2 | |
| 3 | <table class="table table-bordered shopengine-wishlist"> |
| 4 | <thead> |
| 5 | <tr> |
| 6 | <th><?php echo esc_html__('Products', 'shopengine') ?></th> |
| 7 | <th><?php echo esc_html__('Unit Price', 'shopengine') ?></th> |
| 8 | <th><?php echo esc_html__('Stock Status', 'shopengine') ?></th> |
| 9 | <th><?php echo esc_html__('Action', 'shopengine') ?></th> |
| 10 | </tr> |
| 11 | </thead> |
| 12 | <tbody> |
| 13 | <?php |
| 14 | |
| 15 | if(is_array($list)): |
| 16 | foreach($list as $key => $product_id) { |
| 17 | |
| 18 | $product = wc_get_product($product_id); |
| 19 | |
| 20 | if(empty($product)) continue; |
| 21 | |
| 22 | ?> |
| 23 | <tr> |
| 24 | <td> |
| 25 | <span class="shopengine-wishlist-product-image"> |
| 26 | <img src="<?php echo wp_get_attachment_url($product->get_image_id()); ?>" width="100"/> |
| 27 | </span> |
| 28 | <p class="wishlist-product-name"> |
| 29 | <a target="_blank" href="<?php echo $product->get_permalink() ?>"> |
| 30 | <?php echo esc_html($product->get_name()) ?> |
| 31 | </a> |
| 32 | </p> |
| 33 | </td> |
| 34 | |
| 35 | <td> |
| 36 | <?php echo \ShopEngine\Utils\Helper::render($product->get_price_html()); ?> |
| 37 | </td> |
| 38 | |
| 39 | <td> |
| 40 | <?php echo $product->get_stock_status(); ?> |
| 41 | </td> |
| 42 | |
| 43 | <td> |
| 44 | <span class="shopengine-remove-action remove-badge remove-from-wishlist" data-pid="<?php echo absint($product_id) ?>">X</span> |
| 45 | </td> |
| 46 | </tr> |
| 47 | <?php |
| 48 | } |
| 49 | endif; |
| 50 | ?> |
| 51 | |
| 52 | </tbody> |
| 53 | </table> |
| 54 | |
| 55 | <?php |
| 56 |