VirtueMart Forum

VirtueMart 2 + 3 + 4 => General Questions => Topic started by: sohopros on August 24, 2022, 02:22:06 AM

Title: Cannot add to cart in ViruteMart Cart Error
Post by: sohopros on August 24, 2022, 02:22:06 AM
Joomla 3.10.11
VM 4.0.6
VM Extensions 4.0.4

We are experiencing an error where users are not able to add items to their shopping carts following the update to J 3.10.11. The page just reloads but does not update the cart.

an excerpt from our error log:

```

[24-Aug-2022 00:19:27 UTC] PHP Warning: Declaration of plgVmCalculationSpain::plgVmOnDisplayEdit(&$calc, &$html) should be compatible with vmPlugin::plgVmOnDisplayEdit($custom_id, &$html) in /home/folchsohotest/public_html/plugins/vmcalculation/spain/spain.php on line 79

[24-Aug-2022 00:19:27 UTC] PHP Notice: Undefined variable: product in /home/folchsohotest/public_html/modules/mod_virtuemart_minicart/tmpl/default.php on line 49

[24-Aug-2022 00:19:27 UTC] PHP Notice: Trying to access array offset on value of type null in /home/example/public_html/modules/mod_virtuemart_minicart/tmpl/default.php on line 49

[24-Aug-2022 00:19:27 UTC] PHP Notice: Undefined variable: product in /home/example/public_html/modules/mod_virtuemart_minicart/tmpl/default.php on line 49

[24-Aug-2022 00:19:27 UTC] PHP Notice: Trying to access array offset on value of type null in /home/example/public_html/modules/mod_virtuemart_minicart/tmpl/default.php on line 49

[24-Aug-2022 00:19:27 UTC] PHP Notice: Undefined variable: product in /home/example/public_html/modules/mod_virtuemart_minicart/tmpl/default.php on line 53

[24-Aug-2022 00:19:27 UTC] PHP Notice: Trying to access array offset on value of type null in /home/example/public_html/modules/mod_virtuemart_minicart/tmpl/default.php on line 53

```

Does anybody have experience on how to fix this error where users cannot add items to their carts?
Title: Re: Cannot add to cart in ViruteMart Cart Error
Post by: Mike J on August 24, 2022, 02:40:00 AM
Hello Sohopros,

I'm on Joomla! 3.10.11 Stable / VirtueMart 4.0.2 10661 and all is well ( taking orders successfully ).

If you can roll back to VirtueMart 4.0.2 10661, please do so and await the return of Max on the 26th.

Will be sorted shortly.
Title: Re: Cannot add to cart in ViruteMart Cart Error
Post by: sohopros on August 24, 2022, 04:16:45 AM
Can you provide a procedure for rolling the version back?
Title: Re: Cannot add to cart in ViruteMart Cart Error
Post by: Mike J on August 24, 2022, 07:34:15 AM
Hopefully you made a backup before upgrading to VM 4.0.6 (One way is to copy the file structure and database manually or use akeeba back up which simplifies the process).

If you don't have a back up of your site that correlates to VM 4.0.2 10661, this may help: See https://forum.virtuemart.net/index.php?topic=148609.msg530834#msg530834 You'll find a download link for 4.0.7 there but it isn't perfect... However, it will hopefully will get you back into business in the interim.
Title: Re: Cannot add to cart in ViruteMart Cart Error
Post by: ssc3 on August 24, 2022, 10:20:25 AM
Quote from: Mike J on August 24, 2022, 07:34:15 AM
If you don't have a back up of your site that correlates to VM 4.0.2 10661, this may help: See https://forum.virtuemart.net/index.php?topic=148609.msg530834#msg530834 You'll find a download link for 4.0.7 there but it isn't perfect... However, it will hopefully will get you back into business in the interim.

I would not advice installing VM 4.0.7 just yet. While it does look like it is generally working, there is still a  protected server error that requires a code mod to get around.

Go back to whatever versions of Joomla and Virtuemart worked for you in the past.

Wait for VM 4.0.8 "Stable" to be released. Then check the forums to see what problems other people have.

If after at least a month you think it is safe, make a backup of your present installation and then try upgrading to VM 4.0.8 .



Title: Re: Cannot add to cart in ViruteMart Cart Error
Post by: sohopros on August 24, 2022, 21:10:35 PM
Hello,

We resolved the problem by downgrading VM to 4.0.2

Thank you for your help.