This is your ultimate guide – complete with shortcodes, snippets and workarounds – to completely skip the Cart page and have both cart table and checkout form on the same (Checkout) page.
But first… why’d you want to do this? Well, if you sell high ticket products (i.e. on average, you sell approximately one product per order), if you want to save an additional step (two steps convert better than three: “Add to Cart” >
“Cart Page” > “Checkout Page” – and this is not rocket science), if your custom workflow and ecommerce objectives require you to manage Cart and Checkout all together, well, this tutorial is for you.
There is a mix of shortcodes, settings and PHP snippets you can use to make this work out of the box. And trust me, this is easier than you think.
While many developers decide to turn the checkout process into a “Multi-Step Checkout” (ehm, not sure why – the more steps the more likely it is to have a cart abandonment), in here we’ll see the exact opposite.
So, how do they do it?
Well, here’s the complete, easy, step by step guide to put Cart & Checkout on the same page. Give it a go, do some WooCommerce testing and tracking, and see if it converts better 🙂 Continue reading WooCommerce: How to Put Cart & Checkout on the Same Page?
When you add a hidden product to Cart, either manually or programmatically, this will be displayed in the Cart, Checkout and Order details pages (I’m not sure why a hidden product behaves like that… but thankfully you can hide hidden products from the Cart/Checkout/Order page with this snippet).
Problem is, even if you hide hidden products from the Cart page, the “Mini-Cart” product counter icon or text (it depends on your theme) will still count them as products (see the screenshot below). So the question is: in conjunction with the snippet aforementioned, how do I exclude hidden products from being counted in the “menu cart” (also called Mini-Cart Widget)? Continue reading WooCommerce: Exclude Hidden Products from Mini-Cart Counter
This is a great WooCommerce snippet (or plugin, if you wish to call it like that) for those who want to provide another layer of checkout fees. For example, you might need to display custom checkout radio buttons to pick packaging types, gift wrapping, specific services and whatever can increase your AOV (Average Order Value). Radio button selection must work with “Ajax” – which means as soon as the radio button is chosen, checkout must refresh in order to display the updated fees and totals.
Something similar (and also more complex, such as offering store products) is achieved by the WooCommerce Checkout Add-Ons Plugin sold on the official WooCommerce.com marketplace. But in this article, we take a look at custom coding – either way you’ve got something to play with! Continue reading WooCommerce: Add Checkout Fees Based on Radio Button Choice (Ajax)
If you sell downloadable/virtual products and need to simplify your WooCommerce checkout when such product type is in the Cart, you’ve come to the right place!
Here’s a simple snippet to check if there are only “virtual” products in the Cart and if yes, all the billing fields and order notes are hidden (but name and email address). Go test this on your development environment and let me know if this works! Continue reading WooCommerce: Hide Checkout Billing Fields if Virtual Product @ Cart
Less is more (sometimes). On this website, I’m already forcing max 1 product in the Cart and automatically redirecting users to Checkout upon add to Cart.
As a result, I definitely didn’t need the whole “Mini-Cart Widget Dropdown Content” either. To test, try to “hover” onto the shopping cart icon on the top right, and you’ll notice there is no cart dropdown 🙂
Well, this is how it’s done – I love when a complex thing is fixed with one simple line of PHP! Continue reading WooCommerce: Hide Mini-Cart Widget (Dropdown)
The “Shipping Calculator” can be enabled via the WooCommerce settings in order to give the user a way to calculate their shipping fees before getting to the Checkout Page. Usually they fill out the country, state, city and postcode form fields and click on “Update Totals” in order to calculate the shipping.
However, what if you only calculate shipping based on country? Or what if you only charge by zip code / postcode? In this case, you will need to hide the input fields you don’t need, and make UX better.
Well, here are some WooCommerce filters you can use from WooCommerce version 3.4 onwards to hide the fields you like (apart from country, which is mandatory). Continue reading WooCommerce: How to Hide “Shipping Calculator” Fields @ Cart
Your WooCommerce shopping cart might look messy when it contains many products. Your specific business, besides, might require you buy “Part 1” first and “Part 2” after.
A way to tidy up the WooCommerce shopping basket is – for example – to sort products based on their title, from A to Z. As usual, this can be done with a few lines of PHP, even if you have no clue about coding… feel free to copy, paste, and enjoy the snippet 🙂 Continue reading WooCommerce: Sort Cart Items Alphabetically A>Z
Adding and displaying custom fields on WooCommerce products is quite simple. For example, you can add a “RRP/MSRP” field to a product, or maybe use ACF and display its value on the single product page.
Easy, yes. Unfortunately, the above only applies to products without variations (or the parent product only if it’s a variable product). So the question is: how do we add, save and display a custom field for each single variation? Continue reading WooCommerce: Add Custom Field to Each Product Variation
There is a lot of literature online that solves this UX problem – so in this article let’s see if I can give you a simplified, working, updated version.
So, do you hate the “Update Cart” button too? Yes, the one you have to click after you update the quantity of a product in the cart…
Well, you’re in the right place: a simple PHP function, two lines of JQuery, one line of CSS and the result is pretty straight forward! Continue reading WooCommerce: Automatically Update Cart on Quantity Change
Talking about UX optimization, the WooCommerce checkout is where you should focus most of your time. The checkout page of an ecommerce website is one of the main reasons for shopping cart abandonment – additional hidden charges, lack of trust, confusion and also, too many fields to fill out.
Today, we will see how to turn the “Address 2” field into a dropdown. This is if you sell to specific areas and you want to minimize the writing time – why not let customers pick from a list instead? Continue reading WooCommerce: Turn Address Checkout Field Into Drop-down
We already studied how to detect if a product ID is in the cart – but if you take a look at the comments many of you were asking how to detect product categories.
So, today we’ll do exactly that. You can disable shipping rates, payment gateways, you can print messages, you can apply coupon programmatically… there are lots of things you can do “conditionally”, based on whether a given product category is in the Cart or not. Continue reading WooCommerce: Check if Product Category is in the Cart
This is a nice follow up from last week’s snippet “WooCommerce: Slashed Cart Subtotal if Coupon @ Cart“, where I showed how to display original/discounted cart total on the same totals table row.
This time, I want to let users know the original and discounted cart item (product) amount after a certain coupon is applied. Who knows – this might improve your Cart U/X 🙂 Continue reading WooCommerce: Display Cart Item Subtotal With Coupon Discount
This is a nice snippet to let users know what the original cart amount was by slashing the price and showing the price after the discount on the same line (subtotal). You can then hide the coupon code line if you wish 🙂 Continue reading WooCommerce: Slashed Cart Subtotal if Coupon @ Cart
While working for a freelance client I had to “detect” the cart item categories in order to apply some PHP customization. So I thought – why not sharing with you how to display product categories in the Cart? This adds a nice touch to the Cart page 🙂
Also, I’m glad to introduce you to the amazing world of “wc_get_product_category_list“, a very handy WooCommerce PHP function! Continue reading WooCommerce: Display Categories Under Product Name @ Cart
This is one of those “OMG” moments 🙂
Here’s the story: I’m working with one of my freelance clients and I need to show certain content in the checkout (a product-specific “Terms and Conditions”) if such product is in the Cart.
I’ve always looked for products in the Cart by “looping” through the Cart with a foreach (here, for example: Apply a Coupon Programmatically if a Product is in the Cart).
But as I said, after some random research, I found out about another magic WooCommerce function: “find_product_in_cart()”. Which means finding a product in the Cart doesn’t need to do custom loops or complex PHP… it’s a “one liner”! Continue reading WooCommerce: Check if Product ID is in the Cart
Here’s a very simple snippet that achieves a very complex task – what if you wanted to force your Cart to charge a deposit or a fixed fee, no matter the product price?
Well, thankfully WooCommerce is pretty flexible and a lot of workarounds can be found. In this case, forcing the checkout to a fixed amount (e.g. $100) is as simple as applying a negative “cart fee” to make the total become $100.
Sounds like Japanese? Great – here’s why you’re on Business Bloomer. Copy the snippet, apply it to your test WooCommerce site and see the magic happen – without knowing anything about coding! Continue reading WooCommerce: Force Cart to Specific Amount (Deposit)
Quite an interesting snippet this is! A client needed to show EACH quantity of the SAME product as separate lines (cart items) in the WooCommerce Cart & Checkout page.
At some stage, you might need that too – for different reasons maybe. So, let’s see how this is coded 🙂 Continue reading WooCommerce: Split Cart Items When Product Quantity > 1
So many times I needed to “play” with Cart contents in order to modify the default behaviour (such as removing a columns, hide the sale price to prices, hide an item, etc.).
There is a great PHP function that always helps – it’s called print_r and you can use this to “see” what’s inside the cart array, so that you can return certain information in a message for example.
A bit advanced, but as you grow your WooCommerce coding skills, you will use this a lot 🙂 Continue reading WooCommerce: See What’s Inside the Cart Array (print_r)
While working on a workaround for a client, I had to hide a hidden product from the cart, checkout, order received and emails. Hidden products already don’t show on the shop and category pages, but they do show on the cart if they’re added to cart “programmatically”.
A tough task, but as usual here I come with the solution 🙂 Continue reading WooCommerce: Hide Hidden Products From Cart, Order, Emails
Following up from the other day’s snippet (deny checkout based on cart weight), you might want to show what is the current Cart Weight on the cart and checkout page. So here you go! Continue reading WooCommerce: Display Weight @ Cart & Checkout