| 1 |
<?php |
| 2 |
/** |
| 3 |
* Template variables: |
| 4 |
* |
| 5 |
* @var $controllers array settings as array |
| 6 |
*/ |
| 7 |
|
| 8 |
use RadiusTheme\SB\Helpers\Fns; |
| 9 |
|
| 10 |
// Do not allow directly accessing this file. |
| 11 |
if ( ! defined( 'ABSPATH' ) ) { |
| 12 |
exit( 'This script cannot be accessed directly.' ); |
| 13 |
} |
| 14 |
|
| 15 |
global $product, $post; |
| 16 |
|
| 17 |
if ( empty( $product ) ) { |
| 18 |
return; |
| 19 |
} |
| 20 |
$parent_class = ! empty( $controllers['sale_flash_badge'] ) ? 'rtsb-sale-flash-position-' . $controllers['flash_sale_position'] : ''; |
| 21 |
$lightbox_icon = ! empty( $controllers['show_zoom'] ) ? $controllers['lightbox_icon'] : ''; |
| 22 |
$gallery_class = ! empty( Fns::get_cached_gallery_ids( $product ) ) ? ' has-product-gallery' : ' no-product-gallery'; |
| 23 |
|
| 24 |
?> |
| 25 |
<div class="rtsb-product-images <?php echo esc_attr( $parent_class . $gallery_class ); ?>" data-zoom-icon="<?php echo esc_attr( $lightbox_icon ); ?>"> |
| 26 |
<?php if ( ! empty( $controllers['sale_flash_badge'] ) ) { ?> |
| 27 |
<?php woocommerce_show_product_sale_flash(); ?> |
| 28 |
<?php } ?> |
| 29 |
<?php woocommerce_show_product_images(); ?> |
| 30 |
</div> |
| 31 |
|
| 32 |
|
| 33 |
|
| 34 |
|