[SOLVED] Your Cart Is Currently Empty Error – WooCommerce

How To Fix “Empty Cart” WooCommerce Error

Hello visitor,

If you are running a WooCommerce website, you may have come across the dreaded Your cart is currently empty error. The reason for this error can be anything from an expired SSL certificate to your hosting server not being able to handle the traffic. This post will walk through some of the most common causes and solutions for this problem.

This issue may appear from different reasons, such updating the WooCommerce plugin, updating the WordPress version, a plugin conflict between WooCommerce and “x” plugin, due to a cache problem and so on.

Let’s get started!

Your Cart Is Currently Empty Error – “Cache issue” Scenario

Let’s say you just create your own online store with the WooCommerce plugin. Like any other site developer, you go to your site from another browser/device/incognito, to test the functionality of the site and you discover that once you add a new product in the cart, nothing happen. The only message you get is: “Your cart is currently empty”. After that, you try to buy from your developer account, and it works: The product is added in the cart. This kind of error is generated, in most of the cases, by a cache issue. Basically, your cart page is not refreshing with the new information.

Before showing 2 potential fixes, go to Wp-dashboard -> WooCommerce -> Status -> Make sure everything is OK (any red flag must be solved).

How To Fix “Your Cart Is Currently Empty” Issue:

FIX 1. Cache Plugin and WooCommerce pages

If you are using a cache plugin, try to exclude the WooCommerce pages (shop, cart and checkout). If you are caching these pages, you may get this error. If you initially included them and now you just excluded these pages from the cache, purge the cache of the site and also clean the browser cache.

FIX 2. CloudFront and WooCommerce

This fix isn’t apply only for CloudFront CDN, but also for any other CDNs. The problem is the CDN cache some important cookies and don’t allow that page (cart, etc) to be refreshed. To solve the empty cart error (again, this is apply for CloudFront, but it is similar to any other CDN), go on your AWS CloudFront account and follow these steps:

*Find the CloudFront Distribution related to your site and edit it.

CloudFront Distribution
CloudFront Distribution

*Locate the ‘Behaviors’ TAB and open it.

*Locate the 'Behaviors' TAB and open it.
*Locate the ‘Behaviors’ TAB and open it.

*Locate the ‘default(*)’ behavior and open it.

*Locate the 'default(*)' behavior and open it.
*Locate the ‘default(*)’ behavior and open it.

*Add the following cookie to the list: Add “wp_woocommerce_session_*” – Without quotes

CloudFront wp_woocommerce_session_*
CloudFront wp_woocommerce_session_*

Extra tip: If you want to avoid similar issues, add these cookies to the whitelist, too:

"woocommerce_items_in_cart*"
"woocommerce_cart_hash*"
"woocommerce_recently_viewed*"
"wp-resetpass*" (for WP password resets)

Wait a few minutes to deploy and check it again (from incognito). It should be fixed right now.

WooCommerce cart is empty after adding products

What is the WooCommerce Cart is Empty After Adding Products Issue?

This issue is caused by a conflict between the plugin and another plugin or theme.

When a customer adds products to their cart, the WooCommerce cart should show the products in the cart. However, if you see that your WooCommerce cart is empty after adding products, it may be because of a conflict with another plugin or theme.

What Causes the WooCommerce Cart to be Empty After Adding Products?

If you have been trying to add products to your cart and the cart is not loading, then this article will help you.

There could be many reasons why the WooCommerce cart is empty after adding products. Nevertheless, in this article, we will try to cover some of the most common ones.

How to Fix the WooCommerce Cart is Empty After Adding Products Issue

Several reasons can cause the issue. This article will help you diagnose and fix the issue.

The first step is to identify what is causing the issue, which can be done by looking at the following things:

  • Theme compatibility: Is the theme compatible with Woocommerce?
  • Theme settings: Are there any conflicting settings in your theme?
  • Product settings: Are there any product-specific settings that might need to be changed?
  • Woocommerce settings: What are your woocommerce settings, and are they appropriate for your store?
  • Browser Compatibility: Is your browser up-to-date and compatible with Woocommerce?

Your Cart Is Currently Empty Error – Other Ways To Fix

First of all, I am not a fan of installing a ton of plugins. But, if this will solve your issue, it’s up to you how many plugins do you want to keep on your site. So, add and install this plugin: Ajax add to cart for WooCommerce. If it don’t solve the issue, try other ways from the list below.

  1.  Have you installed any plugin just before this issue appeared? If so, deactivate it, clean the cache and test. Maybe that plugin is in conflict with WooCommerce. You can also deactivate all plugins and keep active just the WooCommerce plugin.
  2.  Page structure: Make sure the hierarchy of the pages is the right one: Shop -> Cart -> Checkout. Ideally, Cart and Checkout page should be configured without a parent page.
  3.  www/non-www – Make sure the domain configuration corresponding with the WooCommerce settings. For example, if your domain is set to yoursite.com and in the WooCommerce settings the domain is configured to www.yoursite.com, try edit it and configure to yoursite.com.
  4.  If you are using a translation plugin, such WPML, All languages, etc, make sure you set the WooCommerce pages (shop, cart, checkout, etc) to each new language you add. Usually, these pages aren’t configured for all languages, but only for English.
  5.  After a WooCommerce migration, make sure the database tables are ok. For example, make sure wp_woocommerce_sessions table is set to “AUTO INCREMENTING”. To access it, go to: cPanel -> PHPmyadmin -> Your site db -> table.
  6.  Theme conflict – Try to temporary change the theme to Twenty Twenty-One theme. If everything is fine, return to your main theme.
  7.  Check if on the WooCommerce checkout endpoints. There shouldn’t be any spaces in your Endpoint URL. For example, “ORDER PAY” is not good. “ORDER-PAY” is good. To check the checkout endpoints, go to WooCommerce -> Settings -> Advanced -> and locate “checkout endpoints”.

If it don’t want to be fixed, delete the WooCommerce pages and recreate them. To recreate the WooCommerce pages, go to WooCommerce -> Status -> Tools and click on “Create default WooCommerce pages”.

That’s it!

Previous Post
WordPress 5.8 Tatum is vrijgegeven – 3 geweldige functies
Next Post
Why Is My Website Not Showing Up on Google?

[SOLVED] Uw winkelwagen is momenteel leeg Fout – WooCommerce

Hoe te herstellen “Lege Winkelwagen” WooCommerce Fout

Hallo bezoeker,

Als u een WooCommerce website beheert, bent u wellicht de gevreesde foutmelding Your cart is currently empty tegen gekomen. De reden voor deze fout kan van alles zijn, van een verlopen SSL-certificaat tot het feit dat uw hosting server het verkeer niet aankan. In dit bericht worden enkele van de meest voorkomende oorzaken en oplossingen voor dit probleem besproken.

Dit probleem kan verschillende oorzaken hebben, zoals het updaten van de WooCommerce plugin, het updaten van de WordPress versie, een plugin conflict tussen WooCommerce en “x” plugin, als gevolg van een cache probleem enzovoort.

Laten we beginnen!

Uw winkelwagen is momenteel leeg Fout – “Cache probleem” Scenario

Laten we zeggen dat u gewoon uw eigen online winkel met de WooCommerce plugin. Net als elke andere site-ontwikkelaar, ga je naar je site vanuit een andere browser/apparaat/incognito, om de functionaliteit van de site te testen en je ontdekt dat er niets gebeurt zodra je een nieuw product toevoegt aan de winkelwagen. Het enige bericht dat je krijgt is: “Uw winkelwagen is momenteel leeg”. Daarna probeert u te kopen via uw ontwikkelaarsaccount, en het werkt: Het product is toegevoegd aan de winkelwagen. Dit soort fout wordt in de meeste gevallen veroorzaakt door een cache probleem. In principe, je winkelwagen pagina wordt niet vernieuwd met de nieuwe informatie.

Voordat u 2 mogelijke fixes laat zien, ga naar Wp-dashboard -> WooCommerce -> Status -> Zorg ervoor dat alles OK is (elke rode vlag moet worden opgelost).

Hoe los je het probleem “Uw winkelwagen is momenteel leeg” op:

FIX 1. Cache Plugin en WooCommerce pagina’s

Als u een cache plugin gebruikt, probeer dan de WooCommerce pagina’s (shop, winkelwagen en kassa) uit te sluiten. Als u deze pagina’s cacht, kunt u deze foutmelding krijgen. Als u ze aanvankelijk had opgenomen en nu deze pagina’s net uit de cache hebt verwijderd, moet u de cache van de site wissen en ook de cache van de browser opschonen.

FIX 2. CloudFront en WooCommerce

Deze oplossing is niet alleen van toepassing op CloudFront CDN, maar ook op andere CDNs. Het probleem is dat de CDN een aantal belangrijke cookies in cache heeft en niet toestaat dat die pagina (winkelwagen, etc) wordt ververst. Om de lege winkelwagen fout op te lossen (nogmaals, dit is van toepassing op CloudFront, maar het is vergelijkbaar met elke andere CDN), ga naar uw AWS CloudFront account en volg deze stappen:

*Vind de CloudFront Distribution gerelateerd aan uw site en bewerk deze.

CloudFront Distribution
CloudFront Distributie

*Locate the ‘Behaviors’ TAB and open it.

*Locate the 'Behaviors' TAB and open it.
*Locate the ‘Behaviors’ TAB and open it.

*Locate the ‘default(*)’ behavior and open it.

*Locate the 'default(*)' behavior and open it.
*Locate the ‘default(*)’ behavior and open it.

*Voeg de volgende cookie toe aan de lijst: Voeg “wp_woocommerce_session_*” toe – Zonder aanhalingstekens

CloudFront wp_woocommerce_session_*
CloudFront wp_woocommerce_session_*

Extra tip: Als u soortgelijke problemen wilt vermijden, voeg deze cookies dan ook toe aan de whitelist:

"woocommerce_items_in_cart*"
"woocommerce_cart_hash*"
"woocommerce_recently_viewed*"
"wp-resetpass*" (for WP password resets)

Wacht een paar minuten om het te implementeren en controleer het opnieuw (vanuit incognito). Het zou nu opgelost moeten zijn.

Uw winkelwagen is momenteel leeg Fout – Andere manieren om te herstellen

Allereerst, ik ben geen fan van het installeren van een ton van plugins. Maar, als dit je probleem oplost, is het aan jou hoeveel plugins je op je site wilt houden. Dus, toevoegen en installeren van deze plugin: Ajax toevoegen aan winkelwagen voor WooCommerce. Als dit het probleem niet oplost, probeer dan andere manieren uit de onderstaande lijst.

  1. Heb je een plugin geïnstalleerd net voor dit probleem verscheen? Zo ja, deactiveer het, maak de cache leeg en test. Misschien is die plugin in conflict met WooCommerce. U kunt ook alle plugins deactiveren en alleen de WooCommerce plugin actief houden.
  2. Paginastructuur: Zorg ervoor dat de hiërarchie van de pagina’s de juiste is: Shop -> Cart -> Checkout. In het ideale geval worden de pagina’s Cart en Checkout geconfigureerd zonder een bovenliggende pagina.
  3. www/non-www – Zorg ervoor dat de domein configuratie overeenkomt met de WooCommerce instellingen. Bijvoorbeeld, als uw domein is ingesteld op uwsite.com en in de WooCommerce instellingen is het domein geconfigureerd op www.yoursite.com, probeer het te bewerken en configureer naar uwsite.com.
  4. Als u gebruik maakt van een vertaling plugin, zoals WPML, Alle talen, enz., zorg ervoor dat u de WooCommerce pagina’s (winkel, winkelwagen, kassa, enz.) in te stellen op elke nieuwe taal die u toevoegt. Gewoonlijk zijn deze pagina’s niet geconfigureerd voor alle talen, maar alleen voor het Engels.
  5. Na een WooCommerce migratie, zorg ervoor dat de database tabellen in orde zijn. Zorg er bijvoorbeeld voor dat de wp_woocommerce_sessions tabel is ingesteld op “AUTO INCREMENTING”. Om toegang te krijgen, ga naar: cPanel -> PHPmyadmin -> Uw site db -> tabel.
  6. Thema conflict – Probeer tijdelijk het thema te veranderen naar Twenty Twenty-One thema. Als alles in orde is, keer dan terug naar je hoofdthema.
  7. Controleer of op de WooCommerce kassa eindpunten. Er zouden geen spaties mogen staan in je Endpoint URL. Bijvoorbeeld, “ORDER PAY” is niet goed. “ORDER-PAY” is goed. Om de checkout eindpunten te controleren, ga naar WooCommerce -> Instellingen -> Geavanceerd -> en lokaliseer “checkout eindpunten”.

Als het niet opgelost wil worden, verwijder dan de WooCommerce pagina’s en maak ze opnieuw aan. Om de WooCommerce pagina’s opnieuw te maken, ga naar WooCommerce -> Status -> Tools en klik op “Maak standaard WooCommerce pagina’s”.

Dat is het!

Previous Post
WordPress 5.8 Tatum is vrijgegeven – 3 geweldige functies
Next Post
Why Is My Website Not Showing Up on Google?