• Hi there folks.

    I am quite new on this field, and I need your help.

    As the title describes, I need a solution to empty my cart, but I do NOT have a cart-page, and I need to get around this without one.

    I simply searched the web thin and installed a sea of ??various plugins and widgets, without success.

    The customer do not want a cart-page, as it is a service they offer and not an actual product. Therefor I removed all the cart functions in WooCommerce.

    I think what I need might be a shortcode, a widget or a hack of some sort ?? – that can give me an “empty cart” button without navigating to a cart -page , is this possible?

    When I choose a product/service on the page: https://www.boligibyen.dk/vores-services/
    Fills out the form and proceeds to checkout:
    https://www.boligibyen.dk/checkout/

    It will add, and you can keep adding/buying other services, but you CANT remove them again – thats the problem.

    For your information, this site is in danish so you probably wont understand much, but I hope you might be able to understand the problem.

    Best regards Jannik, hope you can help me out
    Please tell me if you need more info, if I perhaps left something out?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Jon (Kenshino)

    (@kenshino)

    Lord Jon

    You probably have to code for this.

    https://docs.woothemes.com/wc-apidocs/class-WC_Cart.html

    You can use the WC_Cart and use it’s public function empty_cart

    So something like $woocommerce->cart->empty_cart();

    For that to work, you will need to hook to AJAX on a html button that will run the php line above.

    Although, in my mind, the better way to do it is to educate your client – and tell them that the cart page can be renamed – Service Overview or something like that.

    End users will know what they are basically using is an e-commerce system, and not being to find a cart function is poor user experience ??

    Thread Starter JannikRandrup

    (@jannikrandrup)

    Hi Jon.

    Thank you very much for your answer.

    Haha I like the “educate your client” answer ??
    And I deffinetly think I will, talk to them again about this, and hopefully make them accepting having a “service overview” page ??

    It would give me less struggle and like you said, be a better and more safe experience.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Empty Basket WITHOUT the " Cart" Page’ is closed to new replies.