| 1 |
<?php |
| 2 |
/** |
| 3 |
* Drawer: Floating Cart Button. |
| 4 |
* |
| 5 |
* @package Orderable/Templates |
| 6 |
*/ |
| 7 |
|
| 8 |
defined( 'ABSPATH' ) || exit; |
| 9 |
|
| 10 |
$position = Orderable_Settings::get_setting( 'style_cart_position' ); |
| 11 |
|
| 12 |
if ( 'none' === $position ) { |
| 13 |
return; |
| 14 |
} |
| 15 |
|
| 16 |
$cart_count = WC()->cart->get_cart_contents_count(); |
| 17 |
$style = Orderable_Drawer_Settings::get_cart_icon_css(); |
| 18 |
?> |
| 19 |
|
| 20 |
<div class="orderable-floating-cart orderable-floating-cart--<?php echo esc_attr( $position ); ?>" data-orderable-trigger="cart" style="<?php echo esc_attr( $style ); ?>"> |
| 21 |
<button class="orderable-floating-cart__button"><?php echo file_get_contents( ORDERABLE_PATH . 'assets/icons/basket.svg' ); ?></button> |
| 22 |
<span class="orderable-floating-cart__count"><?php echo wp_kses_data( $cart_count ); ?></span> |
| 23 |
</div> |