PluginProbe
ShopBuilder – WooCommerce Builder For Elementor / 3.2.5
ShopBuilder – WooCommerce Builder For Elementor v3.2.5
3.4.2 3.4.1 3.4.0 2.0.1 2.0.2 2.0.3 2.1.0 2.1.1 2.1.10 2.1.11 2.1.12 2.1.13 2.1.14 2.1.15 2.1.2 2.1.3 2.1.4 2.1.5 2.1.6 2.1.7 2.1.8 2.1.9 2.2.0 2.2.1 2.2.2 All 63 releases
shopbuilder / templates / elementor / general / list / list-layout2.php

list-layout2.php in ShopBuilder – WooCommerce Builder For Elementor 3.2.5, at templates/elementor/general/list/list-layout2.php

223 lines 5.3 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Template: List Layout 2.
4 *
5 * @package RadiusTheme\SB
6 */
7
8 /**
9 * Template variables:
10 *
11 * @var $grid string
12 * @var $class string
13 * @var $p_id int
14 * @var $img_args array
15 * @var $p_link string
16 * @var $items array
17 * @var $rating_args array
18 * @var $add_to_cart string
19 * @var $title_tag string
20 * @var $excerpt_limit string
21 * @var $excerpt string
22 * @var $title_class string
23 * @var $title_link bool
24 * @var $title string
25 * @var $badge_class string
26 * @var $action_btn_preset string
27 * @var $action_btn_position string
28 * @var $swatch_position string
29 * @var $swatch_type string
30 * @var $has_attributes bool
31 * @var $raw_settings array
32 */
33
34 use RadiusTheme\SB\Helpers\Fns;
35
36 // Do not allow directly accessing this file.
37 if ( ! defined( 'ABSPATH' ) ) {
38 exit( 'This script cannot be accessed directly.' );
39 }
40
41 global $product;
42
43 $classes = esc_attr( $grid ) . ' ' . esc_attr( $class );
44 $swatch_title_class = $has_attributes && in_array( 'swatches', $items, true ) && 'title' === $swatch_position ? ' title-with-swatch' : '';
45 $swatch_price_class = $has_attributes && in_array( 'swatches', $items, true ) && 'price' === $swatch_position ? ' price-with-swatch' : '';
46 $has_featured_img = $raw_settings['show_featured_image'] ? 'show-feature-img' : 'hide-feature-img';
47 ?>
48
49 <div <?php wc_product_class( $classes, $product ); ?> data-id="<?php echo absint( $p_id ); ?>">
50 <?php
51 /**
52 * Before product items hook.
53 */
54 do_action( 'rtsb/before/shop/product/item' );
55 ?>
56
57 <div class="rtsb-list-item <?php echo esc_attr( $has_featured_img ); ?>">
58 <div class="rtsb-product-img">
59 <?php
60 /**
61 * Before product image hook.
62 */
63 do_action( 'rtsb/before/shop/product/image' );
64
65 /**
66 * Product image hook.
67 *
68 * @hooked RadiusTheme\SB\Controllers\Hooks\ActionHooks::render_image 10
69 */
70 do_action( 'rtsb/shop/product/image', $img_args, $raw_settings );
71
72 /**
73 * Sale Badge.
74 */
75 if ( ! empty( $p_sale ) ) {
76 ?>
77 <div class="rtsb-promotion">
78 <?php
79 Fns::get_badge_html( $p_sale, $badge_class );
80 ?>
81 </div>
82 <?php
83 }
84
85 /**
86 * After product image hook.
87 */
88 do_action( 'rtsb/after/shop/product/image', $raw_settings );
89 ?>
90 </div><!-- .rtsb-product-img -->
91
92 <div class="rtsb-product-content">
93 <?php
94 /**
95 * Before product content hook.
96 */
97 do_action( 'rtsb/before/shop/product/content' );
98
99 /**
100 * Product Categories.
101 */
102 if ( in_array( 'categories', $items, true ) ) {
103 ?>
104 <div class="rtsb-product-category">
105 <?php
106 Fns::get_categories_list( $p_id, 'rtsb-category-text' );
107 ?>
108 </div>
109 <?php
110 }
111 /**
112 * Product Brands.
113 */
114 if ( in_array( 'brands', $items, true ) ) {
115 ?>
116 <div class="rtsb-brand-category">
117 <?php
118 Fns::get_brands_list( $p_id );
119 ?>
120 </div>
121 <?php
122 }
123
124 /**
125 * Product Swatches.
126 */
127 if ( in_array( 'swatches', $items, true ) ) {
128 Fns::get_product_swatches( $swatch_type );
129 }
130 ?>
131
132 <div class="product-title-with-price">
133 <?php
134 /**
135 * Before product title hook.
136 */
137 do_action( 'rtsb/before/shop/product/title' );
138
139 /**
140 * Product Title.
141 */
142 if ( in_array( 'title', $items, true ) ) {
143 ?>
144 <div class="rtsb-product-title-wrapper">
145 <<?php Fns::print_validated_html_tag( $title_tag ); ?> class="<?php echo esc_attr( $title_class ); ?>">
146 <?php
147 if ( $title_link ) {
148 ?>
149 <a class="woocommerce-LoopProduct-link" href="<?php echo esc_url( $p_link ); ?>"><?php Fns::print_html( $title ); ?></a>
150 <?php
151 } else {
152 Fns::print_html( $title );
153 }
154 ?>
155 </<?php Fns::print_validated_html_tag( $title_tag ); ?>>
156 </div>
157 <?php
158 }
159
160 /**
161 * After product title hook.
162 */
163 do_action( 'rtsb/after/shop/product/title' );
164
165 /**
166 * Product Price.
167 */
168 if ( in_array( 'price', $items, true ) ) {
169 ?>
170 <div class="product-price<?php echo esc_attr( $swatch_price_class ); ?>">
171 <div class="price-wrapper">
172 <?php
173 woocommerce_template_single_price();
174 ?>
175 </div>
176 </div>
177 <?php
178 }
179 ?>
180 </div>
181
182 <?php
183 /**
184 * Product Rating.
185 */
186 if ( in_array( 'rating', $items, true ) ) {
187 Fns::get_product_rating_html( $rating_args );
188 }
189
190 /**
191 * Product Short Description.
192 */
193 if ( in_array( 'excerpt', $items, true ) ) {
194 ?>
195 <div class="product-short-description rtsb-text-limit limit-<?php echo esc_attr( $excerpt_limit ); ?>">
196 <?php
197 Fns::print_html( $excerpt );
198 ?>
199 </div>
200 <?php
201 }
202
203 /**
204 * Action buttons after content.
205 */
206 Fns::print_html( Fns::get_formatted_action_buttons( $items, $add_to_cart, 'preset1', 'after', 'bottom' ) );
207
208 /**
209 * After product content hook.
210 */
211 do_action( 'rtsb/after/shop/product/content', $raw_settings );
212 ?>
213 </div><!-- .rtsb-product-content -->
214 </div><!-- .rtsb-list-item -->
215
216 <?php
217 /**
218 * After product item hook.
219 */
220 do_action( 'rtsb/after/shop/product/item' );
221 ?>
222 </div><!-- .rtsb-product -->
223