# NO BUG: logged out user in bricks can not add to cart product in custom archive page

**URL:** <https://forum.bricksbuilder.io/t/no-bug-logged-out-user-in-bricks-can-not-add-to-cart-product-in-custom-archive-page/30785>\
**Category:** Bugs\
**Tags:** v1-11-1-1\
**Created:** [March 5, 2025, 1:49am UTC](https://forum.bricksbuilder.io/t/no-bug-logged-out-user-in-bricks-can-not-add-to-cart-product-in-custom-archive-page/30785 "2025-03-05T01:49:11Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![hamza49](https://forum.bricksbuilder.io/letter_avatar_proxy/v4/letter/h/65b543/32.png) [@hamza49](https://forum.bricksbuilder.io/u/hamza49)\
**Post date:** [March 5, 2025, 1:49am UTC](https://forum.bricksbuilder.io/t/no-bug-logged-out-user-in-bricks-can-not-add-to-cart-product-in-custom-archive-page/30785/1 "2025-03-05T01:49:11Z")

</div>

**Browser** : Chrome 110  
**OS** : Windows.  
**URL** : [https://dev.imperialcoins.com.au/](https://dev.imperialcoins.com.au/)  
**Video** : [Jam](https://jam.dev/c/dc0d3985-1f44-4f44-b56f-15f63062b593)

I have developed a custom product query loop both in homepage (as a carousel) and archive page. Whenever as a logged-out user I try to “add to cart” a product, the product does not added to the cart. First, it shows “1” on the mini cart and after reload complete it goes back to “0” which you will be able to see in that short “Jam” video.  
Thank you!

---

<div class="post-metadata">

**Author:** ![itchycode](https://forum.bricksbuilder.io/user_avatar/forum.bricksbuilder.io/itchycode/32/4542_2.png) [@itchycode](https://forum.bricksbuilder.io/u/itchycode)\
**Post date:** [March 5, 2025, 1:53am UTC](https://forum.bricksbuilder.io/t/no-bug-logged-out-user-in-bricks-can-not-add-to-cart-product-in-custom-archive-page/30785/2 "2025-03-05T01:53:40Z")

</div>

Hi @hamza49 ,

This should be related to your performance plugin (WPRocket) that disabled the WooCommerce functions.

You could test with a default WP theme and probably you will be facing the same issue.

Then try deactivating WP Rocket and check if it’s the root cause.

Regards,  
Jenn

---

<div class="post-metadata">

**Author:** ![hamza49](https://forum.bricksbuilder.io/letter_avatar_proxy/v4/letter/h/65b543/32.png) [@hamza49](https://forum.bricksbuilder.io/u/hamza49)\
**Post date:** [March 6, 2025, 12:48am UTC](https://forum.bricksbuilder.io/t/no-bug-logged-out-user-in-bricks-can-not-add-to-cart-product-in-custom-archive-page/30785/3 "2025-03-06T00:48:58Z")

</div>

Hi @itchycode  
Thanks for the instructions, I have disabled the Performance plugin (WP Rocket) but the issue remains the same.

---

<div class="post-metadata">

**Author:** ![dsgadmin](https://forum.bricksbuilder.io/user_avatar/forum.bricksbuilder.io/dsgadmin/32/9460_2.png) [@dsgadmin](https://forum.bricksbuilder.io/u/dsgadmin)\
**Post date:** [March 6, 2025, 2:08am UTC](https://forum.bricksbuilder.io/t/no-bug-logged-out-user-in-bricks-can-not-add-to-cart-product-in-custom-archive-page/30785/4 "2025-03-06T02:08:20Z")

</div>

Do you have any cache? Besides wp rocket, it’s not working on the product page either

---

<div class="post-metadata">

**Author:** ![itchycode](https://forum.bricksbuilder.io/user_avatar/forum.bricksbuilder.io/itchycode/32/4542_2.png) [@itchycode](https://forum.bricksbuilder.io/u/itchycode)\
**Post date:** [March 6, 2025, 3:23am UTC](https://forum.bricksbuilder.io/t/no-bug-logged-out-user-in-bricks-can-not-add-to-cart-product-in-custom-archive-page/30785/5 "2025-03-06T03:23:57Z")

</div>

Hi @hamza49 ,

How about the default WP theme + WooCommerce?

Possible that certain configurations on your server/dns causing the issue?

Did you try deactivating all plugins except the WooCommerce + Bricks theme?

---

<div class="post-metadata">

**Author:** ![hamza49](https://forum.bricksbuilder.io/letter_avatar_proxy/v4/letter/h/65b543/32.png) [@hamza49](https://forum.bricksbuilder.io/u/hamza49)\
**Post date:** [March 9, 2025, 11:52pm UTC](https://forum.bricksbuilder.io/t/no-bug-logged-out-user-in-bricks-can-not-add-to-cart-product-in-custom-archive-page/30785/6 "2025-03-09T23:52:36Z")

</div>

@dsgadmin & @itchycode, thanks for those instructions. I’ve followed them all and even contacted the server team but it hasn’t been resolved yet.

---

<div class="post-metadata">

**Author:** ![itchycode](https://forum.bricksbuilder.io/user_avatar/forum.bricksbuilder.io/itchycode/32/4542_2.png) [@itchycode](https://forum.bricksbuilder.io/u/itchycode)\
**Post date:** [March 10, 2025, 6:05am UTC](https://forum.bricksbuilder.io/t/no-bug-logged-out-user-in-bricks-can-not-add-to-cart-product-in-custom-archive-page/30785/7 "2025-03-10T06:05:25Z")

</div>

Hi @hamza49,

Thanks for the update.

Could you confirm if the issue persists when using the default WordPress theme along with WooCommerce?

If the problem still occurs with the default setup, it is unrelated to Bricks. We can’t replicate this issue as well.

Best regards,  
Jenn

---

<div class="post-metadata">

**Author:** ![hamza49](https://forum.bricksbuilder.io/letter_avatar_proxy/v4/letter/h/65b543/32.png) [@hamza49](https://forum.bricksbuilder.io/u/hamza49)\
**Post date:** [March 11, 2025, 12:00am UTC](https://forum.bricksbuilder.io/t/no-bug-logged-out-user-in-bricks-can-not-add-to-cart-product-in-custom-archive-page/30785/8 "2025-03-11T00:00:53Z")

</div>

with WP default theme and woocommerce enabled:  
“on the shop page, we only can add 1 item to the cart as a logged-out user”  
if I add a few items to the cart it only adds the last product I added.

Thank you for all the help. If it is not related to Bricks then what might be the issue? Give me a suggestion, I have contacted the Server Team and they said the same thing.

---

<div class="post-metadata">

**Author:** ![itchycode](https://forum.bricksbuilder.io/user_avatar/forum.bricksbuilder.io/itchycode/32/4542_2.png) [@itchycode](https://forum.bricksbuilder.io/u/itchycode)\
**Post date:** [March 11, 2025, 1:37am UTC](https://forum.bricksbuilder.io/t/no-bug-logged-out-user-in-bricks-can-not-add-to-cart-product-in-custom-archive-page/30785/9 "2025-03-11T01:37:36Z")

</div>

Hi @hamza49 ,

My suggestions:

1. Go to WooCommerce \> Status \> Tools (Try to use the WooCommerce tools to fix possible issues)  
Verify Database  
Update Database  
Clear customer sessions  
Clear template cache

2. If step 1 not working, you should try cloning your website to another server for testing to check if it’s because server issue.

Reference:

> **[Not logged in users can’t add items to their cart](https://wordpress.org/support/topic/not-logged-in-users-cant-add-items-to-their-cart/)**
>
> Not logged in users can’t add items to their cart Resolved andrewiskander (@andrewiskander) 10 months, 2 weeks ago I have a website running on woocommerce but I have an issue that makes non l…

---

<div class="post-metadata">

**Author:** ![hamza49](https://forum.bricksbuilder.io/letter_avatar_proxy/v4/letter/h/65b543/32.png) [@hamza49](https://forum.bricksbuilder.io/u/hamza49)\
**Post date:** [March 11, 2025, 2:12am UTC](https://forum.bricksbuilder.io/t/no-bug-logged-out-user-in-bricks-can-not-add-to-cart-product-in-custom-archive-page/30785/10 "2025-03-11T02:12:51Z")

</div>

Hi @itchycode  
Again thanks for the instructions, I have already tried this method and even cloned on a different host. But the issue remains the same.

Now I would like to know:  
“Could Bricks Builder be blocking the code for guest users to run add to cart” it’s working for all other users just not logged-in ones.

Thank you.

---

<div class="post-metadata">

**Author:** ![itchycode](https://forum.bricksbuilder.io/user_avatar/forum.bricksbuilder.io/itchycode/32/4542_2.png) [@itchycode](https://forum.bricksbuilder.io/u/itchycode)\
**Post date:** [March 11, 2025, 2:23am UTC](https://forum.bricksbuilder.io/t/no-bug-logged-out-user-in-bricks-can-not-add-to-cart-product-in-custom-archive-page/30785/11 "2025-03-11T02:23:26Z")

</div>

Hi @hamza49 ,

> “Could Bricks Builder be blocking the code for guest users to run add to cart”

Nope, if that’s the case, I believe there will be many more users reporting this issue in the forum and our Facebook Group now, right?

If in this case, please provide admin access for us to clone your site locally for testing. (Please send to [help@bricksbuilder.io](mailto:help@bricksbuilder.io) and include this forum thread URL as reference)

Regards,  
Jenn

---

<div class="post-metadata">

**Author:** ![itchycode](https://forum.bricksbuilder.io/user_avatar/forum.bricksbuilder.io/itchycode/32/4542_2.png) [@itchycode](https://forum.bricksbuilder.io/u/itchycode)\
**Post date:** [March 12, 2025, 7:07am UTC](https://forum.bricksbuilder.io/t/no-bug-logged-out-user-in-bricks-can-not-add-to-cart-product-in-custom-archive-page/30785/12 "2025-03-12T07:07:09Z")

</div>

Hi @hamza49 ,

Thanks for the login details.

I just replied to your email.

The root cause of your website is all WooCommerce-related DB tables are corrupted.

The ID columns for each table should have Auto Increment but it’s not on your website.

This caused any new Add to Cart session unable to insert a new row in the DB. (`wp_woocommerce_session`)

To solve this issue, you can delete this table and it will be auto create again once Add to cart is triggered.

However, you might need to check with WooCommerce support to solve other table issues as deleting those tables might cause data lost. (orders, etc)

Regards,  
Jenn
