first commit

This commit is contained in:
2024-07-15 11:28:08 +02:00
commit f52d538ea5
21891 changed files with 6161164 additions and 0 deletions

View File

@@ -0,0 +1,18 @@
<?php
/**
* Cart count template
*/
$elementor = Elementor\Plugin::instance();
$is_edit_mode = $elementor->editor->is_edit_mode();
if ( ( $is_edit_mode && ! wp_doing_ajax() ) || null === WC()->cart ) {
$count = '';
} else {
$count = WC()->cart->get_cart_contents_count();
}
?>
<span class="jet-blocks-cart__count-val"><?php
echo $count;
?></span>

View File

@@ -0,0 +1,35 @@
<?php
/**
* Cart Link
*/
$this->add_render_attribute( 'cart-link', 'href', esc_url( wc_get_cart_url() ) );
$this->add_render_attribute( 'cart-link', 'class', 'jet-blocks-cart__heading-link' );
$this->add_render_attribute( 'cart-link', 'title', esc_attr__( 'View your shopping cart', 'jet-blocks' ) );
?>
<a <?php echo $this->get_render_attribute_string( 'cart-link' ); ?>><?php
$this->__icon( 'cart_icon', '<span class="jet-blocks-cart__icon jet-blocks-icon">%s</span>' );
$this->__html( 'cart_label', '<span class="jet-blocks-cart__label">%s</span>' );
if ( 'yes' === $settings['show_count'] ) {
?>
<span class="jet-blocks-cart__count"><?php
ob_start();
include $this->__get_global_template( 'cart-count' );
printf( $settings['count_format'], ob_get_clean() );
?></span>
<?php
}
if ( 'yes' === $settings['show_total'] ) {
?>
<span class="jet-blocks-cart__total"><?php
ob_start();
include $this->__get_global_template( 'cart-totals' );
printf( $settings['total_format'], ob_get_clean() );
?></span>
<?php
}
?></a>

View File

@@ -0,0 +1,9 @@
<?php
/**
* Cart list template
*/
?>
<div class="jet-blocks-cart__list">
<?php $this->__html( 'cart_list_label', '<h4 class="jet-blocks-cart__list-title">%s</h4>' ); ?>
<?php the_widget( 'WC_Widget_Cart', 'title=' ); ?>
</div>

View File

@@ -0,0 +1,18 @@
<?php
/**
* Cart totals template
*/
$elementor = Elementor\Plugin::instance();
$is_edit_mode = $elementor->editor->is_edit_mode();
if ( ( $is_edit_mode && ! wp_doing_ajax() ) || null === WC()->cart ) {
$totals = '';
} else {
$totals = wp_kses_data( WC()->cart->get_cart_subtotal() );
}
?>
<span class="jet-blocks-cart__total-val"><?php
echo $totals;
?></span>

View File

@@ -0,0 +1,14 @@
<?php
/**
* Main cart template
*/
?>
<div class="jet-blocks-cart">
<div class="jet-blocks-cart__heading"><?php
include $this->__get_global_template( 'cart-link' );
?></div>
<?php if ( 'yes' === $settings['show_cart_list'] ) {
include $this->__get_global_template( 'cart-list' );
} ?>
</div>