PluginProbe ʕ •ᴥ•ʔ
Essential Addons for Elementor – Popular Elementor Templates & Widgets / 6.0.10
Essential Addons for Elementor – Popular Elementor Templates & Widgets v6.0.10
6.6.9 6.6.8 6.6.7 6.6.6 6.6.5 6.6.4 6.6.3 5.7.3 5.7.4 5.8.0 5.8.1 5.8.10 5.8.11 5.8.12 5.8.13 5.8.14 5.8.15 5.8.16 5.8.18 5.8.2 5.8.3 5.8.4 5.8.5 5.8.6 5.8.7 5.8.8 5.8.9 5.9.0 5.9.1 5.9.10 5.9.11 5.9.12 5.9.13 5.9.14 5.9.15 5.9.16 5.9.17 5.9.18 5.9.19 5.9.2 5.9.20 5.9.21 5.9.22 5.9.23 5.9.24 5.9.25 5.9.26 5.9.27 5.9.3 5.9.4 5.9.5 5.9.6 5.9.7 5.9.8 5.9.9 6.0.0 6.0.1 6.0.10 6.0.11 6.0.12 6.0.13 6.0.14 6.0.15 6.0.2 6.0.3 6.0.4 6.0.5 6.0.6 6.0.7 6.0.8 6.0.9 6.1.0 6.1.1 6.1.10 6.1.11 trunk 6.1.12 1.0.0 6.1.13 1.0.1 6.1.14 1.1.0 6.1.15 2.0 6.1.17 2.1 6.1.18 2.10.0 6.1.19 2.10.1 6.1.2 2.10.2 6.1.20 2.10.3 6.1.3 2.10.4 6.1.4 2.10.5 6.1.5 2.2.0 6.1.6 2.2.1 6.1.7 2.2.2 6.1.8 2.2.3 6.1.9 2.2.4 6.2.0 2.2.5 6.2.1 2.3.0 6.2.2 2.3.1 6.2.3 2.4.0 6.2.4 2.4.1 6.3.0 2.4.2 6.3.1 2.4.3 6.3.2 2.5.0 6.3.3 2.6.0 6.4.0 2.7.0 6.5.0 2.7.1 6.5.1 2.7.10 6.5.10 2.7.11 6.5.11 2.7.2 6.5.12 2.7.3 6.5.13 2.7.4 6.5.2 2.7.5 6.5.3 2.7.6 6.5.4 2.7.7 6.5.5 2.7.8 6.5.6 2.7.9 6.5.7 2.8.0 6.5.8 2.8.1 6.5.9 2.8.2 6.6.0 2.8.3 6.6.1 2.8.4 6.6.2 2.8.5 2.8.6 2.8.7 2.9.0 2.9.1 2.9.2 2.9.3 2.9.4 2.9.5 2.9.6 2.9.7 2.9.8 2.9.9 3.0.0 3.0.1 3.0.2 3.0.3 3.0.4 3.0.5 3.1.0 3.1.1 3.1.2 3.1.3 3.1.4 3.1.4.1 3.1.5 3.2.0 3.3.0 3.3.1 3.3.2 3.3.3 3.4.0 3.5.0 3.5.1 3.5.2 3.6.0 3.6.1 3.6.2 3.7.0 3.7.1 3.7.2 3.8.0 3.8.1 3.8.2 3.8.3 3.8.4 3.8.5 3.9.0 3.9.1 3.9.2 3.9.3 3.9.4 4.0.0 4.0.1 4.0.2 4.0.3 4.0.4 4.1.0 4.1.1 4.1.2 4.2.0 4.2.1 4.2.2 4.2.3 4.2.4 4.3.0 4.3.1 4.3.2 4.3.3 4.3.4 4.3.5 4.3.6 4.3.7 4.3.8 4.3.9 4.4.0 4.4.1 4.5.0 4.5.1 4.5.2 4.5.3 4.5.4 4.5.5 4.6.0 4.6.1 4.6.2 4.6.3 4.6.4 4.6.5 4.6.6 4.7.0 4.7.1 4.7.2 4.7.3 4.7.4 4.7.5 4.8.0 4.8.1 4.8.2 4.8.3 4.8.4 4.9.0 4.9.1 4.9.2 4.9.3 4.9.4 4.9.5 4.9.6 4.9.7 5.0.0 5.0.1 5.0.10 5.0.11 5.0.12 5.0.13 5.0.2 5.0.3 5.0.4 5.0.5 5.0.6 5.0.7 5.0.8 5.0.9 5.1.0 5.1.1 5.1.2 5.1.3 5.1.4 5.1.5 5.1.6 5.1.7 5.1.8 5.1.9 5.2.0 5.2.1 5.2.2 5.2.3 5.2.4 5.3.0 5.3.1 5.3.2 5.4.6 5.5.5 5.6.5 5.7.2
essential-addons-for-elementor-lite / includes / Template / Woo-Product-List / preset-2.php
essential-addons-for-elementor-lite / includes / Template / Woo-Product-List Last commit date
preset-1.php 1 year ago preset-2.php 1 year ago preset-3.php 1 year ago
preset-2.php
165 lines
1 <?php
2 /**
3 * Template Name: Preset 2
4 */
5
6 use Essential_Addons_Elementor\Classes\Helper;
7 use Essential_Addons_Elementor\Elements\Woo_Product_List;
8
9 if ( ! defined( 'ABSPATH' ) ) {
10 exit;
11 } // Exit if accessed directly
12
13 if ( empty( $woo_product_list ) ) {
14 $woo_product_list = Woo_Product_List::get_woo_product_list_settings( $settings );
15 }
16
17 $product = wc_get_product( get_the_ID() );
18 if ( ! $product ) {
19 error_log( '$product not found in ' . __FILE__ );
20 return;
21 }
22
23 $woo_product_list_loop = Woo_Product_List::get_woo_product_list_loop_settings( $product, $settings, $woo_product_list ); // static method as the template is used by read more feature too
24 ?>
25 <div <?php post_class( 'product' ); ?>>
26 <div class="eael-product-list-item <?php echo esc_attr( $woo_product_list['image_alignment'] ); ?>">
27 <?php if( 'badge-preset-2' === $woo_product_list['badge_preset'] ) : ?>
28 <?php Woo_Product_List::eael_print_produt_badge_html( $woo_product_list, $product ); ?>
29 <?php endif; ?>
30
31 <div class="eael-product-list-image-wrap">
32 <?php if( 'badge-preset-2' !== $woo_product_list['badge_preset'] ) : ?>
33 <?php Woo_Product_List::eael_print_produt_badge_html( $woo_product_list, $product ); ?>
34 <?php endif; ?>
35
36 <?php if ( $woo_product_list['image_clickable'] ) : ?>
37 <a href="<?php echo esc_url( $product->get_permalink() ); ?>" class="woocommerce-LoopProduct-link woocommerce-loop-product__link" >
38 <?php endif; ?>
39
40 <?php echo wp_kses_post( $product->get_image( $woo_product_list['image_size'], ['loading' => 'eager', 'alt' => $product->get_title()] ) ); ?>
41
42 <?php if ( $woo_product_list['image_clickable'] ) : ?>
43 </a>
44 <?php endif; ?>
45
46 <?php if ( $woo_product_list['button_position_on_hover'] ) : ?>
47 <ul class="eael-product-list-buttons-on-hover">
48 <?php if ( $woo_product_list['add_to_cart_button_show'] ) : ?>
49 <li class="eael-product-list-add-to-cart-button eael-m-0">
50 <?php woocommerce_template_loop_add_to_cart(); ?>
51 </li>
52 <?php endif; ?>
53
54 <?php if ( $woo_product_list['quick_view_button_show'] ) : ?>
55 <li class="eael-product-list-quick-view-button eael-m-0">
56 <a id="eael_quick_view_<?php echo esc_attr( uniqid() ); ?>" data-quickview-setting="<?php echo esc_attr( htmlspecialchars( json_encode( $woo_product_list_loop['quick_view_setting'] ), ENT_QUOTES ) ); ?>" class="open-popup-link"><i class="fas fa-eye"></i></a>
57 </li>
58 <?php endif; ?>
59
60 <?php if ( $woo_product_list['link_button_show'] ) : ?>
61 <li class="eael-product-list-link-button eael-m-0">
62 <a href="<?php echo esc_url( $product->get_permalink() ); ?>"><i class="fas fa-link"></i></a>
63 </li>
64 <?php endif; ?>
65 </ul>
66 <?php endif; ?>
67 </div>
68
69 <div class="eael-product-list-content-wrap">
70 <?php
71 if ( 'after-title' === $woo_product_list['content_header_position'] ) :
72 Woo_Product_List::eael_print_product_title_html( $woo_product_list, $product );
73 endif;
74 ?>
75
76 <div class="eael-product-list-content-header <?php echo esc_attr( $woo_product_list_loop['direction_rtl_class'] ) ?>" >
77 <?php if ( $woo_product_list['rating_show'] ) : ?>
78 <div class="eael-product-list-rating">
79 <?php
80 $avg_rating = $product->get_average_rating();
81 if( $avg_rating > 0 ){
82 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
83 echo wc_get_rating_html( $avg_rating, $product->get_rating_count());
84 } else {
85 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
86 echo Helper::eael_rating_markup( $avg_rating, $product->get_rating_count() );
87 }
88 ?>
89
90 <?php if ( $woo_product_list['review_count_show'] && $woo_product_list_loop['review_count'] > 0 ) : ?>
91 <a href="<?php echo esc_url( get_permalink() ) ?>#reviews" class="woocommerce-review-link eael-product-list-review-count" rel="nofollow">(<?php printf( '%s', esc_html__( $woo_product_list_loop['review_count'], 'essential-addons-for-elementor-lite' ) ); ?>)</a>
92 <?php endif; ?>
93 </div>
94 <?php endif; ?>
95
96 <div class="eael-product-list-notice eael-product-list-notice-category">
97 <?php if ( $woo_product_list['category_show'] && $woo_product_list_loop['has_terms'] ) : ?>
98 <p>
99 <i class="fas fa-box"></i>
100 <?php echo esc_html( Woo_Product_List::eael_get_product_category_name( $woo_product_list_loop['terms'] ) ); ?>
101 </p>
102 <?php endif; ?>
103 </div>
104 </div>
105 <div class="eael-product-list-content-body">
106 <?php
107 if ( 'before-title' === $woo_product_list['content_header_position'] ) :
108 Woo_Product_List::eael_print_product_title_html( $woo_product_list, $product );
109 endif;
110 ?>
111
112 <?php if ( $woo_product_list['excerpt_show'] ) : ?>
113 <div class="eael-product-list-excerpt">
114 <?php
115 if( $woo_product_list['excerpt_words_count'] ){
116 $content = wp_trim_words( strip_shortcodes( get_the_excerpt() ), $woo_product_list['excerpt_words_count'], $woo_product_list['excerpt_expanison_indicator'] );
117 echo esc_html( $content );
118 } else {
119 echo wp_kses( get_the_excerpt(), Helper::eael_allowed_tags() );
120 }
121 ?>
122 </div>
123 <?php endif; ?>
124
125 <?php if ( $woo_product_list['price_show'] ) : ?>
126 <h3 class="eael-product-list-price">
127 <?php echo wp_kses_post( $product->get_price_html() ); ?>
128 </h3>
129 <?php endif; ?>
130 </div>
131 <div class="eael-product-list-content-footer">
132 <?php if ( $woo_product_list['total_sold_show'] ) : ?>
133 <div class="eael-product-list-progress">
134 <div class="eael-product-list-progress-info">
135 <h4 class="eael-product-list-progress-count"><?php esc_html_e( $woo_product_list['total_sold_text'], 'essential-addons-for-elementor-lite' ); ?> <span><?php echo esc_html( $woo_product_list_loop['total_sales_count'] ); ?></span></h4>
136
137 <?php if( $product->managing_stock() && $woo_product_list['total_sold_remaining_show'] ) : ?>
138 <h4 class="eael-product-list-progress-remaining"><?php esc_html_e( $woo_product_list['total_sold_remaining_text'], 'essential-addons-for-elementor-lite' ); ?> <span><?php echo esc_html( $woo_product_list_loop['stock_quantity_count'] ); ?></span></h4>
139 <?php endif; ?>
140 </div>
141 <div class="eael-product-list-progress-bar-outer">
142 <div style="width: <?php echo esc_attr( $woo_product_list_loop['total_sold_progress_percentage'] ); ?>%;" class="eael-product-list-progress-bar-inner"></div>
143 </div>
144 </div>
145 <?php endif; ?>
146
147 <?php if ( $woo_product_list['button_position_static'] ) : ?>
148 <div class="eael-product-list-buttons">
149 <?php if ( $woo_product_list['add_to_cart_button_show'] ) : ?>
150 <p class="eael-product-list-add-to-cart-button eael-m-0"><?php woocommerce_template_loop_add_to_cart(); ?></p>
151 <?php endif; ?>
152
153 <?php if ( $woo_product_list['quick_view_button_show'] ) : ?>
154 <p class="eael-product-list-quick-view-button eael-m-0">
155 <a id="eael_quick_view_<?php echo esc_attr( uniqid() ); ?>" data-quickview-setting="<?php echo esc_attr( htmlspecialchars( json_encode( $woo_product_list_loop['quick_view_setting'] ), ENT_QUOTES ) ); ?>" class="open-popup-link">
156 <?php esc_html_e( $woo_product_list['quick_view_text'], 'essential-addons-for-elementor-lite' ); ?>
157 </a>
158 </p>
159 <?php endif; ?>
160 </div>
161 <?php endif; ?>
162 </div>
163 </div>
164 </div>
165 </div>