News:

Looking for documentation? Take a look on our wiki

Main Menu

cart not updating correctly. (database issue?)

Started by maarten33, March 09, 2020, 11:50:36 AM

Previous topic - Next topic

maarten33

Joomla: 3.9.14.
VirtueMart 3.6.10 10211
PHP version 7.3
shop:https://www.robintele.com/en/engrave-service.html

Good morning,

I have such a situation. When I add a product to the shopping cart. The first time the product is added correctly. When I add more products to the cart. The shopping cart is not updated correctly (will not add up to 2). When I clear (emty) the cart. The website is refreshing multi times and it looks like it is empty. When i try now to add new products to cart it is not working anymore.

What I tried to solve the problem.
-Looked at javascript issue in the chrome console. I did not find any.
-Tried the standard templates from joomla protostar and Breeze3. Did not solve the issue. Same behavior.

What solved the problem in the end is using the RB tools in the virtuemart module and Reset all Virtuemart tables and do a fresh install with sample data.

After that I tries to restore the data with PHPmyadmin, but with no luck. Not sure which tables I need to restore. If I restore all virtuemart tables the problem is back as describe.

Hopefully someone can help me with this issue.

Many thanks!

jjk

Might be a cache problem. Check your jchoptimize configuration. Perhaps disable it temporarily in order to see if it makes a difference.
Non-English Shops: Are your language files up to date?
http://virtuemart.net/community/translations

maarten33

Thank you for the reply.

This plugin is disabled and the problem still exists.

jjk

Quote from: maarten33 on March 09, 2020, 20:43:34 PM
Thank you for the reply.

This plugin is disabled and the problem still exists.
Did you clear all cache folders, too?
Non-English Shops: Are your language files up to date?
http://virtuemart.net/community/translations

maarten33

I found out that it is related to the standard payment option. If I disable this payment option. The cart is working like normal.


maarten33


jjk

Your payment settings should work. However normally you don't need to select a tax, unless you charge a payment fee.

I can only guess, what might be the problem. Is your VP One Page version Checkout up to date? Another candidate which might cause the problem is a script named wow.js. As far as I know it creates animations when scrolling.
Non-English Shops: Are your language files up to date?
http://virtuemart.net/community/translations

maarten33

Thanks again for the reply.
I checked both of your guesses, but Vp One page is on the latest version (6.6.1) and I removed the script that makes it possible to scroll back the top.
The bavoir was still the same.

I notices something strange, that I cannot explain.
When i turn on the debug option of the virtuemart  (Enable debugging messages:  For all) and the standard payment enable.
The page is working like normal.
Then I turn off the debug messages and the cart is not updating as it should be.



Jörgen

VM debug can break som JSON created data. in this case it might prevent some plugin from doing its job and stopping it.

Take note all payment processors are called no matter what payment is used or qualified. Every payment plugin is responsible to check that the served data is for the him, otherwise ignore and pass it on. This means that You can have a albeit unused payment plugin that uses incorrect data and destroys for the others. My guess is that this does not mean the standard payment plugin. This plugin is used in so many shops that I am sure it has correctly written code. That is though, If You haven´t overridden the views of the plugin.

Check ALL your payment plugins and see if anyone that is unused actually has an activated plugin.

If Your plugins are as they should, turn on Your console and check for JS errors, double loaded JQuery etc.

Jörgen @ Kreativ Fotografi
Joomla 3.9.18
Virtuemart 3.4.x
Olympiantheme Hera (customized)
This reflects current status when viewing old post.

jjk

I still think that it probably is a jchoptimize problem. The jchoptimize script is loaded in your cart view. However, as far as I know jchoptimize doesn't check session values, and therefore would cache a page that needs to be refreshed. I don't use jchoptimize in any shops. In most cases the Joomla 'Conservative cache' works just fine. If you think you need jchoptimize, you should probably exclude at least the cart view in it's configuration.
Non-English Shops: Are your language files up to date?
http://virtuemart.net/community/translations

maarten33

Quote from: jjk on March 10, 2020, 21:52:55 PM
I still think that it probably is a jchoptimize problem. The jchoptimize script is loaded in your cart view. However, as far as I know jchoptimize doesn't check session values, and therefore would cache a page that needs to be refreshed. I don't use jchoptimize in any shops. In most cases the Joomla 'Conservative cache' works just fine. If you think you need jchoptimize, you should probably exclude at least the cart view in it's configuration.

I am testing in an local environment. I took a backup with Akeeba from the website. So I can try to fix the issue without down time of the current website.

I have jchoptimize disabled. If the plugin is disabled it cannot have data cashed I assume?


jjk

Quote from: maarten33 on March 10, 2020, 23:20:09 PM
I have jchoptimize disabled. If the plugin is disabled it cannot have data cashed I assume?
If you disable it, the cached pages will probably still be in the jchoptimize cache folder. I'm not familiar with this extension, but I suppose it has a feature which clears all cached pages. The folder probably is at a different location than the Joomla cache folder.
Non-English Shops: Are your language files up to date?
http://virtuemart.net/community/translations

jenkinhill

If using JCH Optimize with VirtueMart I do not use the cache facility, as VM can look after its own caching, and I exclude VM JavaScript files from "optimisation".
Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

maarten33

Thank you all for the help.
It was not related to the database.
In the end I disabled the plugin system cache page and this solved the issue.