Breeze - WooCommerce cart bug


#1

Cannot change product quantity in cart page and sometime it load other’s cart data (other browser, other user). This issue usually happen a few hours after enable Breeze caching. I have to toggle this option on/off to fix the issue and it will happen again after a few hours.

System: WooCommerce application with multisite enabled

Steps to reproduce:

  1. enable Breeze and wait for a few hours
  2. open two browser and add product to cart
  3. try changing product quantity in cart page

#2

Hi @nutrawee

First of all, please verify that you have installed the latest version (1.0.3-beta) of the Breeze Plugin. The issues you have mentioned above are fixed in this version.
If you have the latest version of the plugin, could you provide the URL of the pages where this issue has been observed? I will do my best to look into it.

Thanks.


#3

Yes, I use latest version (1.0.3-beta). After I restart server, the issue has gone and I cannot reproduce it. I will let you know if the issue occur again. Thank you very much.


#4

It start to not working again. Please check this page: https://inthetea.com/cart/


#5

After working on this issue, I found that the cause is all sites in multisite setup use the same breeze-config.php. Each site should has it own breeze-config.php.

For example: I have multisite setup a.com (woocommerce activated) and b.com (no woocommerce)

  1. network activate Breeze plugin
  2. go to site a.com dashboard > Breeze setting > save changes. The breeze-config.php will be written with exclude_url array like this ‘exclude_url’ => array ( 0 => ‘/checkout/(.)’, 1 => ‘/cart/’, 2 => '/my-account/(.)’ )
  3. go to site b.com dashboard > Breeze setting > save changes. The breeze-config.php will be overwrite with exclude_url array like this ‘exclude_url’ => array ( )

Please consider and fix this issue on next update.


#6

Hi @nutrawee

Thanks for you feedback. We are on it and this issue will fix shortly.


#7

Thank you very much.


#8

Hi @nutrawee

Thank you for providing to your store. To reproduce the issue, I installed WordPress multisite and used a similar configuration (with and without WooCommerce). Unfortunately, I was unable to reproduce the issue that you describe.
I would recommend that you open a support ticket at Cloudways Support so that support people could take care of your issue.


#9

Please consider this http://woocommerce-112688-329520.cloudwaysapps.com/wc

Please try adding product to cart, change quantity and update cart and you will see it does not work as expected.


#10

Hi @nutrawee

Can you please make sure that you are using the latest (1.0.5) version of Breeze? We have pushed a few changes for WooCommerce. Kindly update the Breeze plugin, purge Varnish from the server as well.

Please let us know, how the things are going.

Additionally, you can also open a support ticket; an expert will get in touch with you shortly.


#11

Thank you. I try latest version (1.0.5) and the issue still occur. I will create support ticket then.


#12

@nutrawee Can you please let me know, you have launched WordPress with WooCommerce first, then configured WPMU OR you have launched WPMU first then installed WooCommerce on it?


#13

Hi @nutrawee This seems to be more of a application configuration issue rather than a bug of Breeze, It appears that you initially installed a default wocommerce app and then turned to a wordpress mu site or migrated one to it. Although default varnish rules will be applied to the site woocommerce-112688-329520.cloudwaysapps.com however the subsite woocommerce-112688-329520.cloudwaysapps.com/wc wouldn’t be included in the rules and for subdomain or sub-site installs you would need to add exclusion for wocommerce URLs both from breeze and varnish settings available under Application settings.

for example :
woocommerce-112688-329520.cloudwaysapps.com/wc/cart
woocommerce-112688-329520.cloudwaysapps.com/wc/my-account
woocommerce-112688-329520.cloudwaysapps.com/wc/checkout

I have excluded some URLs for the mentioned site and tried checking by adding multiple products later updating the cart with adding deducting products which appears to work fine, can you verify the same?


#14

@mustaasam.saleem I use WordPress with WooCommerce then enable WPMU.

@hassam.sattar Thank you for looking into this. Can we use wildcard URLs to exclude these WooCommerce page.

Also, I think this issue is also related to Breeze (wp-content/breeze-config/breeze-config.php).

Without any setting on Varnish rule, if I go to Breeze setting on woocommerce-112688-329520.cloudwaysapps.com/wc and click save, the breeze-config.php will be override with exclude URL that contain /cart, /my-account, /checkout and the site will works fine.

Then if I go to Breeze setting on woocommerce-112688-329520.cloudwaysapps.com/no-wc (no WooCommerce on this site) and click save, the breeze-config.php will be override without exclude URL that contain /cart, /my-account, /checkout and all WooCommerce sites in WPMU network won’t work fine.

For conclusion, I think the cause of this issue is all sites in WPMU network use the same “wp-content/breeze-config/breeze-config.php”. Each site should have their own breeze-config.php

Please consider.


#15

Hello,

You may solve this problem with two steps:-

Step 1. Disable Browser Cache at Breeze Plugin (Very important)
Step 2. Exclude Varnish by some cookie name, please see here.

Let me know if this helps.


#16

Thank you very much for suggestion. However, I can make it works by click on “breeze > setting > save settings” on site with WooCommerce activated. In this thread, I just want to point out that there is a problem on how Breeze plugin use breeze-config.php file and I hope the DEV will be noticed and fix it.


#17

Hi @nutrawee

Kindly check the latest version of Breeze 1.0.6.


#18

Is there any update on this? I have had to disable Varnish in order to get my cart to work.

@Nutreawee How did you get WooCommerce cart function to work with Breeze + Varnish?


#19

My current setting which works fine is: PHP 7.0 + WooCommerce Application + Breeze 1.0.5 + Varnish