| 1 |
<?php |
| 2 |
/** |
| 3 |
* Template variables: |
| 4 |
* |
| 5 |
* @var $controllers array Widgets/Addons Settings |
| 6 |
* @var $product_type array Widgets/Addons Settings |
| 7 |
*/ |
| 8 |
|
| 9 |
// Do not allow directly accessing this file. |
| 10 |
if ( ! defined( 'ABSPATH' ) ) { |
| 11 |
exit( 'This script cannot be accessed directly.' ); |
| 12 |
} |
| 13 |
|
| 14 |
global $product; |
| 15 |
if ( empty( $product ) ) { |
| 16 |
return; |
| 17 |
} |
| 18 |
|
| 19 |
$ajax_class = ! empty( $controllers['enable_single_ajax_add_to_cart'] ) ? ' has-ajax-cart' : ' no-ajax-cart'; |
| 20 |
$wrapper_class = 'rtsb-product-add-to-cart has-cart-button quantity-' . $controllers['quantity_style'] . $controllers['visibility'] . $ajax_class; |
| 21 |
?> |
| 22 |
<div class="<?php echo esc_attr( $wrapper_class ); ?>" data-cart-icon="<?php echo esc_attr( $controllers['cart_icon_html'] ); ?>" data-product-type='<?php echo esc_attr( $product_type ); ?>'> |
| 23 |
<?php woocommerce_template_single_add_to_cart(); ?> |
| 24 |
</div> |
| 25 |
|