function x_woocommerce_navbar_cart_ajax_notification() { if (x_is_product_index() && get_option('woocommerce_enable_ajax_add_to_cart') == 'yes') { $notification = '<div class="x-cart-notification">' . '<div class="x-cart-notification-icon loading">' . '<i class="x-icon-cart-arrow-down" data-x-icon="" aria-hidden="true"></i>' . '</div>' . '<div class="x-cart-notification-icon added">' . '<i class="x-icon-check" data-x-icon="" aria-hidden="true"></i>' . '</div>' . '</div>'; } else { $notification = ''; } echo $notification; }
?> <?php } ?> <?php } ?> /* AJAX Add to Cart // ========================================================================== */ <?php if (x_is_product_index() && get_option('woocommerce_enable_ajax_add_to_cart') == 'yes') { ?> .x-cart-notification-icon.loading { color: <?php echo x_get_option('x_woocommerce_ajax_add_to_cart_color'); ?> ; } .x-cart-notification:before { background-color: <?php echo x_get_option('x_woocommerce_ajax_add_to_cart_bg_color'); ?> ; }