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 / slider / slider-layout2.php

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

232 lines 5.8 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Template: Slider 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 $hover_btn_text string
21 * @var $excerpt_limit string
22 * @var $excerpt string
23 * @var $title_class string
24 * @var $title_link bool
25 * @var $title string
26 * @var $badge_class string
27 * @var $action_btn_preset string
28 * @var $action_btn_position string
29 * @var $swatch_position string
30 * @var $swatch_type string
31 * @var $has_attributes bool
32 * @var $raw_settings array
33 */
34
35 use RadiusTheme\SB\Helpers\Fns;
36
37 // Do not allow directly accessing this file.
38 if ( ! defined( 'ABSPATH' ) ) {
39 exit( 'This script cannot be accessed directly.' );
40 }
41
42 global $product;
43
44 $classes = esc_attr( $grid ) . ' ' . esc_attr( $class );
45 $swatch_title_class = $has_attributes && in_array( 'swatches', $items, true ) && 'title' === $swatch_position ? ' title-with-swatch' : '';
46 $swatch_price_class = $has_attributes && in_array( 'swatches', $items, true ) && 'price' === $swatch_position ? ' price-with-swatch' : '';
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-grid-item">
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 * Action buttons above image.
87 */
88 Fns::print_html( Fns::get_formatted_action_buttons( $items, $add_to_cart, $action_btn_preset, $action_btn_position, 'top' ) );
89
90 /**
91 * After product image hook.
92 */
93 do_action( 'rtsb/after/shop/product/image', $raw_settings );
94 ?>
95 </div><!-- .rtsb-product-img -->
96
97 <div class="rtsb-product-content">
98 <?php
99 /**
100 * Before product content hook.
101 */
102 do_action( 'rtsb/before/shop/product/content' );
103
104 /**
105 * Product Swatches.
106 */
107 if ( in_array( 'swatches', $items, true ) && 'top' === $swatch_position ) {
108 Fns::get_product_swatches( $swatch_type );
109 }
110
111 /**
112 * Product Rating.
113 */
114 if ( in_array( 'rating', $items, true ) ) {
115 Fns::get_product_rating_html( $rating_args );
116 }
117
118 /**
119 * Product Price.
120 */
121 if ( in_array( 'price', $items, true ) ) {
122 ?>
123 <div class="product-price<?php echo esc_attr( $swatch_price_class ); ?>">
124 <div class="price-wrapper">
125 <?php
126 woocommerce_template_single_price();
127 ?>
128 </div>
129 <?php
130 if ( in_array( 'swatches', $items, true ) && 'price' === $swatch_position ) {
131 Fns::get_product_swatches( $swatch_type );
132 }
133 ?>
134 </div>
135 <?php
136 }
137
138 /**
139 * Before product title hook.
140 */
141 do_action( 'rtsb/before/shop/product/title' );
142
143 /**
144 * Product Title.
145 */
146 if ( in_array( 'title', $items, true ) ) {
147 ?>
148 <div class="product-title-with-btn">
149 <div class="rtsb-product-title-wrapper <?php echo esc_attr( $swatch_title_class ); ?>">
150 <<?php Fns::print_validated_html_tag( $title_tag ); ?> class="<?php echo esc_attr( $title_class ); ?>">
151 <?php
152 if ( $title_link ) {
153 ?>
154 <a class="woocommerce-LoopProduct-link" href="<?php echo esc_url( $p_link ); ?>"><?php Fns::print_html( $title ); ?></a>
155 <?php
156 } else {
157 Fns::print_html( $title );
158 }
159
160 if ( in_array( 'swatches', $items, true ) && 'title' === $swatch_position ) {
161 Fns::get_product_swatches( $swatch_type );
162 }
163 ?>
164 </<?php Fns::print_validated_html_tag( $title_tag ); ?>>
165 </div>
166 <div class="btn-wrap">
167 <a class="woocommerce-LoopProduct-link rtsb-text-btn" href="<?php echo esc_url( $p_link ); ?>">
168 <span class="text"><?php echo esc_html( $hover_btn_text ); ?></span>
169
170 <?php
171 if ( ! empty( $hover_btn_icon ) ) {
172 Fns::print_html( $hover_btn_icon, true );
173 }
174 ?>
175 </a>
176 </div>
177 </div>
178 <?php
179 }
180
181 /**
182 * After product title hook.
183 */
184 do_action( 'rtsb/after/shop/product/title' );
185
186 /**
187 * Product Categories.
188 */
189 if ( in_array( 'categories', $items, true ) ) {
190 ?>
191 <div class="rtsb-product-category">
192 <?php
193 Fns::get_categories_list( $p_id );
194 ?>
195 </div>
196 <?php
197 }
198
199 /**
200 * Product Short Description.
201 */
202 if ( in_array( 'excerpt', $items, true ) ) {
203 ?>
204 <div class="product-short-description rtsb-text-limit limit-<?php echo esc_attr( $excerpt_limit ); ?>">
205 <?php
206 Fns::print_html( $excerpt );
207 ?>
208 </div>
209 <?php
210 }
211
212 /**
213 * Action buttons after content.
214 */
215 Fns::print_html( Fns::get_formatted_action_buttons( $items, $add_to_cart, $action_btn_preset, $action_btn_position, 'bottom' ) );
216
217 /**
218 * After product content hook.
219 */
220 do_action( 'rtsb/after/shop/product/content', $raw_settings );
221 ?>
222 </div><!-- .rtsb-product-content -->
223 </div><!-- .rtsb-grid-item -->
224
225 <?php
226 /**
227 * After product item hook.
228 */
229 do_action( 'rtsb/after/shop/product/item' );
230 ?>
231 </div><!-- .rtsb-product -->
232