MOON
Server: Apache
System: Linux server.netcommlabs.in 3.10.0-1160.83.1.el7.x86_64 #1 SMP Wed Jan 25 16:41:43 UTC 2023 x86_64
User: dermova (1051)
PHP: 5.4.45
Disabled: exec,passthru,shell_exec,system
Upload Files
File: /home/dermova/www/india/wp-content/themes/ri-colias/js/rit-woocommerces.js
!function ($) {
    "use strict";
    $(document).ready(function() {
        // Ajax Remove Cart ===================================
        $(document).on('click', '.rit_product_remove', function(event) {
            var $this = $(this);
            var product_key = $this.data('product-key');
            var product_id = $this.data('product-id');

            $.ajax({
                type: 'POST',
                dataType: 'json',
                url: ajaxurl,
                data: { action: "cart_remove_product",
                    product_key: product_key,
                    product_id : product_id
                },success: function(data){
                    var $cart = $('.cart-box');
                    $('.text-items .mini-cart-items').text(data.count+'');
                    $('.text-items .amount').html(data.subtotal);
                    if(data.count==0){
                        $cart.find('.cart_list').html('<li class="empty">'+$cart.find('.cart_container').data('text-emptycart')+'</li>');
                        $cart.find('.total,.buttons').remove();
                    }else{
                        $cart.find('.total .amount').remove();
                        $cart.find('.total').append(data.subtotal);
                        $this.parent().remove();
                    }
                }
            });
            return false;
        });
    });
}(jQuery);