| 1 |
<?php |
| 2 |
/** |
| 3 |
* Template variables: |
| 4 |
* |
| 5 |
* @var $controllers array Widgets/Addons Settings |
| 6 |
* @var $archive_data array Archive Settings |
| 7 |
* @var $parent_class string Settings |
| 8 |
* @var $icon string Settings |
| 9 |
*/ |
| 10 |
|
| 11 |
use RadiusTheme\SB\Helpers\Fns; |
| 12 |
|
| 13 |
// Do not allow directly accessing this file. |
| 14 |
if ( ! defined( 'ABSPATH' ) ) { |
| 15 |
exit( 'This script cannot be accessed directly.' ); |
| 16 |
} |
| 17 |
|
| 18 |
if ( Fns::product_has_applied_filters( 'shop' ) || Fns::product_has_applied_filters( 'archive' ) || 'rtsb_builder' === get_post_type( get_the_ID() ) ) { |
| 19 |
echo '<div class="rtsb-active-filters-wrapper"></div>'; |
| 20 |
} |
| 21 |
|
| 22 |
$parent_class .= ! empty( $controllers['show_pagination'] ) ? ' rtsb-has-pagination' : ' rtsb-no-pagination'; |
| 23 |
?> |
| 24 |
<div class="rtsb-product-catalog has-cart-button <?php echo esc_attr( $parent_class ); ?>" data-cart-icon="<?php echo esc_attr( $icon ); ?>" <?php Fns::print_html( $archive_data, true ); ?>> |
| 25 |
<?php |
| 26 |
// column_per_row. |
| 27 |
if ( woocommerce_product_loop() ) { |
| 28 |
do_action( 'woocommerce_before_shop_loop' ); |
| 29 |
woocommerce_product_loop_start(); |
| 30 |
if ( wc_get_loop_prop( 'total' ) ) { |
| 31 |
while ( have_posts() ) { |
| 32 |
the_post(); |
| 33 |
/** |
| 34 |
* Hook: woocommerce_shop_loop. |
| 35 |
*/ |
| 36 |
do_action( 'woocommerce_shop_loop' ); |
| 37 |
wc_get_template_part( 'content', 'product' ); |
| 38 |
} |
| 39 |
} |
| 40 |
woocommerce_product_loop_end(); |
| 41 |
do_action( 'woocommerce_after_shop_loop' ); |
| 42 |
} else { |
| 43 |
/** |
| 44 |
* Hook: woocommerce_no_products_found. |
| 45 |
* |
| 46 |
* @hooked wc_no_products_found - 10 |
| 47 |
*/ |
| 48 |
do_action( 'woocommerce_no_products_found' ); |
| 49 |
} |
| 50 |
?> |
| 51 |
</div> |
| 52 |
|