PluginProbe
ShopBuilder – WooCommerce Builder For Elementor / 2.0.2
ShopBuilder – WooCommerce Builder For Elementor v2.0.2
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.2, at templates/elementor/general/grid/grid-layout1.php

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