PluginProbe
ShopBuilder – WooCommerce Builder For Elementor / 2.0.3
ShopBuilder – WooCommerce Builder For Elementor v2.0.3
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 / grid / grid-layout1.php

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

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