PluginProbe ʕ •ᴥ•ʔ
YITH WooCommerce Wishlist / 3.0.17
YITH WooCommerce Wishlist v3.0.17
4.16.0 trunk 2.1.0 2.1.1 2.1.2 2.2.0 2.2.1 2.2.10 2.2.11 2.2.12 2.2.13 2.2.14 2.2.15 2.2.16 2.2.17 2.2.2 2.2.3 2.2.4 2.2.5 2.2.6 2.2.7 2.2.8 2.2.9 3.0.0 3.0.1 3.0.10 3.0.11 3.0.12 3.0.13 3.0.14 3.0.15 3.0.16 3.0.17 3.0.18 3.0.19 3.0.2 3.0.20 3.0.21 3.0.22 3.0.23 3.0.25 3.0.3 3.0.4 3.0.5 3.0.6 3.0.7 3.0.8 3.0.9 3.1.0 3.1.1 3.10.0 3.11.0 3.12.0 3.13.0 3.14.0 3.15.0 3.16.0 3.17.0 3.18.0 3.19.0 3.2.0 3.20.0 3.21.0 3.22.0 3.23.0 3.24.0 3.25.0 3.26.0 3.27.0 3.28.0 3.29.0 3.3.0 3.30.0 3.31.0 3.32.0 3.33.0 3.34.0 3.35.0 3.36.0 3.37.0 3.38.0 3.4.0 3.5.0 3.6.0 3.7.0 3.8.0 3.9.0 4.0.0 4.0.1 4.1.0 4.10.0 4.10.1 4.10.2 4.11.0 4.12.0 4.13.0 4.14.0 4.15.0 4.2.0 4.3.0 4.4.0 4.5.0 4.6.0 4.7.0 4.8.0 4.9.0
yith-woocommerce-wishlist / templates / wishlist-view-mobile.php
yith-woocommerce-wishlist / templates Last commit date
admin 6 years ago add-to-wishlist-added.php 5 years ago add-to-wishlist-browse.php 5 years ago add-to-wishlist-button.php 5 years ago add-to-wishlist-remove.php 5 years ago add-to-wishlist.php 5 years ago share.php 5 years ago wishlist-view-footer-mobile.php 6 years ago wishlist-view-footer.php 6 years ago wishlist-view-header.php 5 years ago wishlist-view-mobile.php 6 years ago wishlist-view.php 6 years ago wishlist.php 6 years ago
wishlist-view-mobile.php
256 lines
1 <?php
2 /**
3 * Wishlist page template - Standard Layout
4 *
5 * @author Your Inspiration Themes
6 * @package YITH WooCommerce Wishlist
7 * @version 3.0.11
8 */
9
10 /**
11 * Template variables:
12 *
13 * @var $wishlist \YITH_WCWL_Wishlist Current wishlist
14 * @var $wishlist_items array Array of items to show for current page
15 * @var $wishlist_token string Current wishlist token
16 * @var $wishlist_id int Current wishlist id
17 * @var $users_wishlists array Array of current user wishlists
18 * @var $current_page int Current page
19 * @var $page_links array Array of page links
20 * @var $is_user_owner bool Whether current user is wishlist owner
21 * @var $show_price bool Whether to show price column
22 * @var $show_dateadded bool Whether to show item date of addition
23 * @var $show_stock_status bool Whether to show product stock status
24 * @var $show_add_to_cart bool Whether to show Add to Cart button
25 * @var $show_remove_product bool Whether to show Remove button
26 * @var $show_price_variations bool Whether to show price variation over time
27 * @var $show_variation bool Whether to show variation attributes when possible
28 * @var $show_cb bool Whether to show checkbox column
29 * @var $show_quantity bool Whether to show input quantity or not
30 * @var $show_ask_estimate_button bool Whether to show Ask an Estimate form
31 * @var $show_last_column bool Whether to show last column (calculated basing on previous flags)
32 * @var $move_to_another_wishlist bool Whether to show Move to another wishlist select
33 * @var $move_to_another_wishlist_type string Whether to show a select or a popup for wishlist change
34 * @var $additional_info bool Whether to show Additional info textarea in Ask an estimate form
35 * @var $price_excl_tax bool Whether to show price excluding taxes
36 * @var $enable_drag_n_drop bool Whether to enable drag n drop feature
37 * @var $repeat_remove_button bool Whether to repeat remove button in last column
38 * @var $available_multi_wishlist bool Whether multi wishlist is enabled and available
39 * @var $no_interactions bool
40 */
41
42 if ( ! defined( 'YITH_WCWL' ) ) {
43 exit;
44 } // Exit if accessed directly
45 ?>
46
47 <!-- WISHLIST MOBILE -->
48 <ul class="shop_table cart wishlist_table wishlist_view responsive mobile <?php echo $show_cb ? 'with-checkbox' : ''; ?>" data-pagination="<?php echo esc_attr( $pagination ); ?>" data-per-page="<?php echo esc_attr( $per_page ); ?>" data-page="<?php echo esc_attr( $current_page ); ?>" data-id="<?php echo esc_attr( $wishlist_id ); ?>" data-token="<?php echo esc_attr( $wishlist_token ); ?>">
49 <?php
50 if ( $wishlist && $wishlist->has_items() ) :
51 foreach ( $wishlist_items as $item ) :
52 /**
53 * @var $item \YITH_WCWL_Wishlist_Item
54 */
55 global $product;
56
57 $product = $item->get_product();
58 $availability = $product->get_availability();
59 $stock_status = isset( $availability['class'] ) ? $availability['class'] : false;
60
61 if ( $product && $product->exists() ) :
62 ?>
63 <li id="yith-wcwl-row-<?php echo esc_attr( $item->get_product_id() ); ?>" data-row-id="<?php echo esc_attr( $item->get_product_id() ); ?>">
64 <?php if ( $show_cb ) : ?>
65 <div class="product-checkbox">
66 <input type="checkbox" value="yes" name="items[<?php echo esc_attr( $item->get_product_id() ); ?>][cb]"/>
67 </div>
68 <?php endif ?>
69
70 <div class="item-wrapper">
71 <div class="product-thumbnail">
72 <a href="<?php echo esc_url( get_permalink( apply_filters( 'woocommerce_in_cart_product', $item->get_product_id() ) ) ); ?>">
73 <?php echo $product->get_image(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
74 </a>
75 </div>
76
77 <div class="item-details">
78 <div class="product-name">
79 <h3>
80 <a href="<?php echo esc_url( get_permalink( apply_filters( 'woocommerce_in_cart_product', $item->get_product_id() ) ) ); ?>">
81 <?php echo esc_html( apply_filters( 'woocommerce_in_cartproduct_obj_title', $product->get_title(), $product ) ); ?>
82 </a>
83 </h3>
84 <?php do_action( 'yith_wcwl_table_after_product_name', $item ); ?>
85 </div>
86
87 <?php if ( $show_variation || $show_dateadded || $show_price ): ?>
88 <table class="item-details-table">
89
90 <?php if ( $show_variation && $product->is_type( 'variation' ) ): ?>
91 <?php
92 /**
93 * @var $product \WC_Product_Variation
94 */
95 $attributes = $product->get_attributes();
96
97 if ( ! empty( $attributes ) ):
98 foreach ( $attributes as $name => $value ):
99 if ( ! taxonomy_exists( $name ) ) {
100 continue;
101 }
102
103 $term = get_term_by( 'slug', $value, $name );
104
105 if ( ! is_wp_error( $term ) && ! empty( $term->name ) ) {
106 $value = $term->name;
107 }
108 ?>
109 <tr>
110 <td class="label">
111 <?php echo esc_attr( wc_attribute_label( $name, $product ) ); ?>:
112 </td>
113 <td class="value">
114 <?php echo esc_attr( rawurldecode( $value ) ); ?>
115 </td>
116 </tr>
117 <?php
118 endforeach;
119 endif;
120 ?>
121 <?php endif; ?>
122
123 <?php if ( $show_dateadded && $item->get_date_added() ): ?>
124 <tr>
125 <td class="label">
126 <?php esc_html_e( 'Added on:', 'yith-woocommerce-wishlist' ); ?>
127 </td>
128 <td class="value">
129 <?php echo esc_html( $item->get_date_added_formatted() ); ?>
130 </td>
131 </tr>
132 <?php endif; ?>
133
134 <?php if ( $show_price || $show_price_variations ) : ?>
135 <tr>
136 <td class="label">
137 <?php esc_html_e( 'Price:', 'yith-woocommerce-wishlist' ); ?>
138 </td>
139 <td class="value">
140 <?php
141 if ( $show_price ) {
142 echo $item->get_formatted_product_price(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
143 }
144
145 if ( $show_price_variations ) {
146 echo $item->get_price_variation(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
147 }
148 ?>
149 </td>
150 </tr>
151 <?php endif ?>
152
153 </table>
154 <?php endif; ?>
155 </div>
156 </div>
157
158 <div class="additional-info-wrapper">
159 <?php if ( $show_quantity || $show_stock_status ): ?>
160 <table class="additional-info">
161 <?php if ( $show_quantity ) : ?>
162 <tr>
163 <td class="label">
164 <?php esc_html_e( 'Quantity:', 'yith-woocommerce-wishlist' ); ?>
165 </td>
166 <td class="value">
167 <?php if ( ! $no_interactions && $wishlist->current_user_can( 'update_quantity' ) ): ?>
168 <input type="number" min="1" step="1" name="items[<?php echo esc_attr( $item->get_product_id() ); ?>][quantity]" value="<?php echo esc_attr( $item->get_quantity() ); ?>"/>
169 <?php else: ?>
170 <?php echo esc_html( $item->get_quantity() ); ?>
171 <?php endif; ?>
172 </td>
173 </tr>
174 <?php endif; ?>
175
176 <?php if ( $show_stock_status ) : ?>
177 <tr>
178 <td class="label">
179 <?php esc_html_e( 'Stock:', 'yith-woocommerce-wishlist' ) ?>
180 </td>
181 <td class="value">
182 <?php echo $stock_status === 'out-of-stock' ? '<span class="wishlist-out-of-stock">' . esc_html__( 'Out of stock', 'yith-woocommerce-wishlist' ) . '</span>' : '<span class="wishlist-in-stock">' . esc_html__( 'In Stock', 'yith-woocommerce-wishlist' ) . '</span>'; ?>
183 </td>
184 </tr>
185 <?php endif ?>
186 </table>
187 <?php endif; ?>
188
189 <!-- Add to cart button -->
190 <?php if ( $show_add_to_cart && isset( $stock_status ) && $stock_status != 'out-of-stock' ): ?>
191 <div class="product-add-to-cart">
192 <?php woocommerce_template_loop_add_to_cart( array( 'quantity' => $show_quantity ? $item->get_quantity() : 1 ) ); ?>
193 </div>
194 <?php endif ?>
195
196 <!-- Change wishlist -->
197 <?php if ( $move_to_another_wishlist && $available_multi_wishlist && count( $users_wishlists ) > 1 ): ?>
198 <div class="move-to-another-wishlist">
199 <?php if ( 'select' == $move_to_another_wishlist_type ): ?>
200 <select class="change-wishlist selectBox">
201 <option value=""><?php esc_html_e( 'Move', 'yith-woocommerce-wishlist' ); ?></option>
202 <?php
203 foreach ( $users_wishlists as $wl ):
204 /**
205 * @var $wl \YITH_WCWL_Wishlist
206 */
207 if ( $wl->get_token() === $wishlist_token ) {
208 continue;
209 }
210 ?>
211 <option value="<?php echo esc_attr( $wl->get_token() ); ?>">
212 <?php echo esc_html( sprintf( '%s - %s', $wl->get_formatted_name(), $wl->get_formatted_privacy() ) ); ?>
213 </option>
214 <?php
215 endforeach;
216 ?>
217 </select>
218 <?php else: ?>
219 <a href="#move_to_another_wishlist" class="move-to-another-wishlist-button" data-rel="prettyPhoto[move_to_another_wishlist]">
220 <?php echo esc_html( apply_filters( 'yith_wcwl_move_to_another_list_label', __( 'Move to another list &rsaquo;', 'yith-woocommerce-wishlist' ) ) ); ?>
221 </a>
222 <?php endif; ?>
223 </div>
224 <?php endif; ?>
225
226 <?php if ( $show_remove_product || $repeat_remove_button ): ?>
227 <div class="product-remove">
228 <a href="<?php echo esc_url( add_query_arg( 'remove_from_wishlist', $item->get_product_id() ) ); ?>" class="remove_from_wishlist" title="<?php echo esc_html( apply_filters( 'yith_wcwl_remove_product_wishlist_message_title', __( 'Remove this product', 'yith-woocommerce-wishlist' ) ) ); ?>"><i class="fa fa-trash"></i></a>
229 </div>
230 <?php endif; ?>
231 </div>
232 </li>
233 <?php
234 endif;
235 endforeach;
236 else: ?>
237 <p class="wishlist-empty">
238 <?php echo esc_html( apply_filters( 'yith_wcwl_no_product_to_remove_message', __( 'No products added to the wishlist', 'yith-woocommerce-wishlist' ) ) ); ?>
239 </p>
240 <?php
241 endif;
242
243 if ( ! empty( $page_links ) ) : ?>
244 <p class="pagination-row">
245 <?php echo $page_links; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
246 </p>
247 <?php endif ?>
248
249 </ul>
250
251 <?php if ( ! empty( $page_links ) ) :
252 ?>
253 <nav class="wishlist-pagination">
254 <?php echo $page_links; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
255 </nav>
256 <?php endif ?>