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