Forum Replies Created

Viewing 3 replies - 1 through 3 (of 3 total)
  • can your share the screenshot please?

    Thread Starter Farhat Ullah

    (@farhat7776240)

    Add this code to your footer.php

    //plus and minus buttons in mini cart
          $(document).on('click touch', '.woofc-item-qty-plus, .woofc-item-qty-minus', function(){
            setTimeout(function(){
              //remove inner loading from minicart
              jQuery('.woofc-inner').removeClass('woofc-inner-loading');
              //remove loader from count total top
              jQuery('.woofc-count').removeClass('woofc-count-loading');
              $("#woofc-count").append('<div class="total_amount">R<?php  echo $woocommerce->cart->get_cart_total();?></div>');
            }, 3000);
          });
    Thread Starter Farhat Ullah

    (@farhat7776240)

    If the plugin removes the item button that is not working you can try this code…

    Add this in your footer.php

    //Woofc remove button
    $(".woofc-item-remove").click(function(){
    var datakey=$(this).closest(".woofc-item-has-remove").data('key');
    // ajax call for remove item button through data_key 
    $.ajax({
    type : "post",
    url: '<?php echo admin_url( 'admin-ajax.php' ); ?>',
    data:{
    'action' : 'remove_item_minicart',
    'dta_key' : datakey,
    },
    success: function(data)
    {  
    $('.woofc-inner').removeClass('woofc-inner-loading');
    $('.woofc-item-has-remove[data-key="' +datakey+ '"]').remove();
    console.log('removed successfully');						          
    }
    });
    });

    and add this to your functions.php

    function remove_item_from_minicart()
    { 
        WC()->cart->remove_cart_item( $_POST['dta_key'] );
        die(0);
    }
    add_action("wp_ajax_remove_item_minicart", "remove_item_from_minicart");
    add_action("wp_ajax_nopriv_remove_item_minicart", "remove_item_from_minicart");
    • This reply was modified 2 years, 3 months ago by Farhat Ullah.
    • This reply was modified 2 years, 3 months ago by Farhat Ullah.
    • This reply was modified 2 years, 3 months ago by Farhat Ullah.
Viewing 3 replies - 1 through 3 (of 3 total)