%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /var/www/cwg/wp-content/themes/cwg/woocommerce/
Upload File :
Create Path :
Current File : //var/www/cwg/wp-content/themes/cwg/woocommerce/wishlist-manage-mobile.php

<?php
/**
 * Wishlist manage template - Modern layout
 *
 * @author  Your Inspiration Themes
 * @package YITH WooCommerce Wishlist
 * @version 3.0.0
 */

/**
 * Template variables:
 *
 * @var $page_title            string Page title
 * @var $wishlist_items                array Array of items to show for current pagE
 * @var $template_part         string Template part currently being loaded (manage)
 * @var $user_wishlists        YITH_WCWL_Wishlist[] Array of user wishlists
 * @var $show_number_of_items  bool Whether to show number of items or not
 * @var $show_date_of_creation bool Whether to show date of creation or not
 * @var $show_download_as_pdf  bool Whether to show download button or not
 * @var $show_rename_wishlist  bool Whether to show rename button or not
 * @var $show_delete_wishlist  bool Whether to show delete button or not
 */

if ( ! defined( 'YITH_WCWL' ) ) {
	exit;
} // Exit if accessed directly
?>

<div class="shop_table cart wishlist_table wishlist_manage_table responsive mobile" cellspacing="0">
	<div class="flex flex-row flex-wrap justify-between mb-7">
		<?php
		if ( ! empty( $user_wishlists ) ) :
			foreach ( $user_wishlists as $wishlist ) :
				?>
				<a href="<?php echo esc_url( $wishlist->get_url() ); ?>" data-wishlist-id="<?php echo $wishlist->get_id(); ?>" class="w-[47%] mb-5">
					<div class="item-wrapper ">
						<div class="item-details ">
							<?php if (  $wishlist->count_items() === 0 ) : ?>
								<div class="h-[180px] w-[180px] flex flex-col items-center justify-center bg-grey-light">
									<div class="font-light text-xs">Add pieces</div>
									<div class="font-light text-xs">to your project</div>
								</div>
							<?php endif; ?>
							<?php if($wishlist->count_items() >= 1) :
								$wishlist_items = YITH_WCWL_Wishlist_Factory::get_wishlist_items(
									array(
										'product_id' => false,
										'user_id' => false,
										'session_id' => false,
										'wishlist_id' => $wishlist['ID'],
									));
									$i = 0;
									$wishlistLength = count($wishlist_items);
									if($wishlistLength <= 3):
											$product = $wishlist_items[0]->get_product();
											if ( $product && $product->exists()) : ?>
												<div class="h-[180px] w-[180px]">
													<?php echo $product->get_image();?>
												</div>
											<?php endif; ?>
									<?php endif; ?>

									<?php if($wishlistLength >= 4):
										$imgList = array_slice($wishlist_items, 0, 4);?>
										<div class="flex flex-row flex-wrap w-[180px] H-[180px]"> 
											<?php foreach ( $imgList as $item ) :
												$product = $item->get_product();
												if ( $product && $product->exists() ) : ?>
													<div class="h-[90px] w-[90px]">
														<?php echo $product->get_image();?>
													</div>
												<?php endif; ?>
											<?php endforeach; ?>
										</div>
									<?php endif; ?>
								<?php endif; ?>

								<div class="font-medium text-[11px] uppercase mt-2.5 max-w-[180px]" >
								<h3>
									<div class="wishlist-anchor whitespace-nowrap overflow-ellipsis overflow-hidden"><?php echo esc_html( $wishlist->get_formatted_name() ); ?></div>
								</h3>

								<?php if ( $show_rename_wishlist ) : ?>
									<a class="show-title-form">
										<?php echo apply_filters( 'yith_wcwl_edit_title_icon', '<i class="fa fa-pencil"></i>' ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
									</a>
								<?php endif; ?>
							</div>

							<?php if ( $show_rename_wishlist ) : ?>
								<div class="hidden-title-form">
									<input type="text" value="<?php echo esc_attr( $wishlist->get_formatted_name() ); ?>" name="wishlist_options[<?php echo esc_attr( $wishlist->get_id() ); ?>][wishlist_name]" />
									<div class="edit-title-buttons">
										<a href="#" class="hide-title-form">
											<?php echo apply_filters( 'yith_wcwl_cancel_wishlist_title_icon', '<i class="fa fa-remove"></i>' ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
										</a>
										<a href="#" class="save-title-form">
											<?php echo apply_filters( 'yith_wcwl_save_wishlist_title_icon', '<i class="fa fa-check"></i>' ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
										</a>
									</div>
								</div>
							<?php endif; ?>

							<div class="item-details-table">
								<?php if ( $wishlist->count_items() >= 1 ) : ?>
									<div class="wishlist-item-count">
										<div class="font-light text-[11px] text-grey-textLight"><?php echo $wishlist->count_items();?> <?= $wishlist->count_items() === 1 ? "PIECE" : "PIECES"; ?> </div>
									</div>
								<?php endif; ?>
								<?php if ( $wishlist->count_items() === 0 ) : ?>
									<div class="wishlist-item-count">
										<div class="font-light text-[11px] text-grey-textLight">0 PIECE</div>
									</div>
								<?php endif; ?>
								<!-- Bouton delete wishlist
								<?php //if ( $show_delete_wishlist || $show_download_as_pdf ) : ?>
									<tr>
										<td class="value" colspan="2">
											<?php if ( $show_download_as_pdf ) : ?>
												<a class="wishlist-download" href="<?php echo esc_url( $wishlist->get_download_url() ); ?>">
													<i class="fa fa-download"></i>
												</a>
											<?php //endif; ?>

											<?php //if ( $show_delete_wishlist ) : ?>
											<?php // endif; ?>
										</td>
									</tr>
								<?php endif; ?>
								-->
							</div>
						</div>
					</div>
				</a>

			<?php
		endforeach;
	else :
		?>
		<div class="wishlist-empty text-sm font-light">
			You don't have any project yet.
		</div>
		<?php
	endif;
	?>
	</div>
</div>

Zerion Mini Shell 1.0