• Resolved Rex AZ

    (@rexyspy)


    Hi,

    You have a great plugin here. I must commend your effort.

    I have this issue for a while now: When I top-up the plugin using credit card it is successful. When I try to now add a product to cut, or in my case join to participate in a product, it does not proceed but instead gives me the error below. How can I solve this problem?

    “You can not add another product while your cart contains with wallet rechargeable product”.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Subrata Mal

    (@subratamal)

    @rexyspy,

    The logic of this plugin is you can not process an order with wallet rechargeable product. So please go to cart and remove the wallet rechargeable product first and then place the order with any other WooCommerce product.

    Cheers!!!

    Thread Starter Rex AZ

    (@rexyspy)

    Thanks for your response anyway…

    I decided to allow one product in cart at a time. Which means, if there’s any product/item in the cart, it will be automatically over-written when another is added until the user checks out by completing his order.

    See the code I used below to allow only one order at a time until checkout.

    // Only allow 1 item in cart before placing order.
    add_filter( 'woocommerce_add_to_cart_validation', 'rexy_custom_add_to_cart_before' );
     
    function rexy_custom_add_to_cart_before( $cart_item_data ) {
     
        global $woocommerce;
        $woocommerce->cart->empty_cart();
     
        // Do nothing with the data and return
        return true;
    }

    I hope this helps anyone in such situation. So, I consider this issue closed then.
    Thank you again.

    Dear @rexyspy

    For a best understanding about your demand and solution…
    Your intention is to add a product item per each order and this go to checkout?
    OR
    If in the cart there is a recharchable product (abandoned or not), user can add 1 (and only one) product item and only this product item go to checkout? over-written the recharchabel product.
    Can you clear me?
    Tks in advance

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Can not add another product while cart contains with wallet rechargeable product’ is closed to new replies.