• Resolved AdrienNash

    (@adriennash)


    Hello..

    I would like to know how or if I can have the “Checkout Page” on Front of site even when there are no products in the cart? If I have the [Woocommerce_checkout] & [Woocommerce_cart] and empty my cart.. it shows just the image of the “empty blue cart” I want the Checkout Page to show on Front of site (with all the Checkout fields “Name, Address, etc.. on the page) even when there are no products in the cart to check out.. how can I have this done?

    my site is: https://AllNaturalBox.com

    Thanks,
    Adrien

Viewing 7 replies - 1 through 7 (of 7 total)
  • Hello,

    you can add below filters in your active theme functions.php file.

    add_filter( 'woocommerce_checkout_redirect_empty_cart', '__return_false' );
    add_filter( 'woocommerce_checkout_update_order_review_expired', '__return_false' );

    Thanks

    Plugin Support AW a11n

    (@slash1andy)

    Automattic Happiness Engineer

    Hey there!

    This is not something that WooCommerce can do out of the box. You can try the code shared above, or wait and see if someone else shares something else to make this customization.

    I’m going to leave it open for a bit to see if anyone is able to chime in to help you out.

    I can also recommend the WooCommerce Developer Resources Portal for resources on developing for WooCommerce.

    You can also visit the WooCommerce Facebook group or the #developers channel of the WooCommerce Community Slack. We’re lucky to have a great community of open-source developers for WooCommerce, and many of our developers hang out there, as well.

    Thread Starter AdrienNash

    (@adriennash)

    AW..

    Thank you very much for replying.. and, allowing others to chime in to assist me with this! Really appreciate you!

    Best,
    Adrien

    Thread Starter AdrienNash

    (@adriennash)

    @aimsinfosofts

    Thank you very much for offering up this code! I will get it added to the functions.. and circle back to let you know )and others who may need this to work for them..) how it goes!

    Thanks again!
    Adrien

    Thread Starter AdrienNash

    (@adriennash)

    @aimsinfosofts

    Thanks again for the code.. but, it seems to crash the site every time I add it to the functions.php

    Is there a specific place in the functions.php where I should add it? Maybe I’m adding it in the wrong area?

    Thank you,
    Adrien

    Hi @adriennash,

    I did give that snippet a try. Instead of adding it to the functions.php file, I used a plugin called Code Snippets to load it. I didn’t run into any PHP errors with it either. Here’s a screenshot of the snippet so you can see how it’s set up.

    snippet

    
    add_filter( 'woocommerce_checkout_redirect_empty_cart', '__return_false' );
    add_filter( 'woocommerce_checkout_update_order_review_expired', '__return_false' );
    

    If you copied the snippet from your email, I would recommend visiting this forum post and copying it directly from here. Emails sometimes convert straight quotes to curly ones. That will break everything if that happens.

    Cheers.

    Hi @adriennash,

    It’s been a while since we heard from you, so I’m marking this thread resolved. Hopefully, you’ve been able to resolve this, but if you haven’t, please let open up a new topic and we’ll be happy to help out.

    Take care

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Checkout on Front of Site Always On Even without products in cart?’ is closed to new replies.