PluginProbe
ShopBuilder – WooCommerce Builder For Elementor / 3.4.1
ShopBuilder – WooCommerce Builder For Elementor v3.4.1
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-layout1.php

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

217 lines 5.1 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 1.
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
42
43 global $product;
44
45 $classes = esc_attr( $grid ) . ' ' . esc_attr( $class );
46 $swatch_title_class = $has_attributes && in_array( 'swatches', $items, true ) && 'title' === $swatch_position ? 'title-with-swatch' : 'title-with-no-swatch';
47 $swatch_price_class = $has_attributes && in_array( 'swatches', $items, true ) && 'price' === $swatch_position ? ' price-with-swatch' : '';
48 $has_featured_img = $raw_settings['show_featured_image'] ? 'show-feature-img' : 'hide-feature-img';
49 ?>
50
51 <div <?php wc_product_class( $classes, $product ); ?> data-id="<?php echo absint( $p_id ); ?>">
52 <?php
53 /**
54 * Before product items hook.
55 */
56 do_action( 'rtsb/before/shop/product/item' );
57 ?>
58
59 <div class="rtsb-list-item <?php echo esc_attr( $has_featured_img ); ?>">
60 <div class="rtsb-product-img">
61 <?php
62 /**
63 * Before product image hook.
64 */
65 do_action( 'rtsb/before/shop/product/image' );
66
67 /**
68 * Product image hook.
69 *
70 * @hooked RadiusTheme\SB\Controllers\Hooks\ActionHooks::render_image 10
71 */
72 do_action( 'rtsb/shop/product/image', $img_args, $raw_settings );
73
74 /**
75 * Sale Badge.
76 */
77 if ( ! empty( $p_sale ) ) {
78 ?>
79 <div class="rtsb-promotion">
80 <?php
81 Fns::get_badge_html( $p_sale, $badge_class );
82 ?>
83 </div>
84 <?php
85 }
86
87 /**
88 * After product image hook.
89 */
90 do_action( 'rtsb/after/shop/product/image', $raw_settings );
91 ?>
92 </div><!-- .rtsb-product-img -->
93
94 <div class="rtsb-product-content">
95 <?php
96 /**
97 * Before product content hook.
98 */
99 do_action( 'rtsb/before/shop/product/content' );
100
101 /**
102 * Product Categories.
103 */
104 if ( in_array( 'categories', $items, true ) ) {
105 ?>
106 <div class="rtsb-product-category">
107 <?php
108 Fns::get_categories_list( $p_id );
109 ?>
110 </div>
111 <?php
112 }
113 /**
114 * Product Brands.
115 */
116 if ( in_array( 'brands', $items, true ) ) {
117 ?>
118 <div class="rtsb-brand-category">
119 <?php
120 Fns::get_brands_list( $p_id );
121 ?>
122 </div>
123 <?php
124 }
125
126 /**
127 * Product Swatches.
128 */
129 if ( in_array( 'swatches', $items, true ) ) {
130 Fns::get_product_swatches( $swatch_type );
131 }
132
133 /**
134 * Product Rating.
135 */
136 if ( in_array( 'rating', $items, true ) ) {
137 Fns::get_product_rating_html( $rating_args );
138 }
139
140 /**
141 * Before product title hook.
142 */
143 do_action( 'rtsb/before/shop/product/title' );
144
145 /**
146 * Product Title.
147 */
148 if ( in_array( 'title', $items, true ) ) {
149 ?>
150 <div class="rtsb-product-title-wrapper">
151 <<?php Fns::print_validated_html_tag( $title_tag ); ?> class="<?php echo esc_attr( $title_class ); ?>">
152 <?php if ( $title_link ) { ?>
153 <a class="woocommerce-LoopProduct-link" href="<?php echo esc_url( $p_link ); ?>"><?php Fns::print_html( $title ); ?></a>
154 <?php
155 } else {
156 Fns::print_html( $title );
157 }
158 ?>
159 </<?php Fns::print_validated_html_tag( $title_tag ); ?>>
160 </div>
161 <?php
162 }
163
164 /**
165 * After product title hook.
166 */
167 do_action( 'rtsb/after/shop/product/title' );
168
169 /**
170 * Product Price.
171 */
172 if ( in_array( 'price', $items, true ) ) {
173 ?>
174 <div class="product-price<?php echo esc_attr( $swatch_price_class ); ?>">
175 <div class="price-wrapper">
176 <?php
177 woocommerce_template_single_price();
178 ?>
179 </div>
180 </div>
181 <?php
182 }
183
184 /**
185 * Product Short Description.
186 */
187 if ( in_array( 'excerpt', $items, true ) ) {
188 ?>
189 <div class="product-short-description rtsb-text-limit limit-<?php echo esc_attr( $excerpt_limit ); ?>">
190 <?php
191 Fns::print_html( $excerpt );
192 ?>
193 </div>
194 <?php
195 }
196
197 /**
198 * Action buttons after content.
199 */
200 Fns::print_html( Fns::get_formatted_action_buttons( $items, $add_to_cart, 'preset1', 'after', 'bottom' ) );
201
202 /**
203 * After product content hook.
204 */
205 do_action( 'rtsb/after/shop/product/content', $raw_settings );
206 ?>
207 </div>
208 </div><!-- .rtsb-list-item -->
209
210 <?php
211 /**
212 * After product item hook.
213 */
214 do_action( 'rtsb/after/shop/product/item' );
215 ?>
216 </div><!-- .rtsb-product -->
217