Author Topic: cart not updating correctly. (database issue?)  (Read 797 times)

maarten33

  • Beginner
  • *
  • Posts: 7
  • A beginner
cart not updating correctly. (database issue?)
« on: March 09, 2020, 11:50:36 am »
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

  • Global Moderator
  • Sr. Member
  • *
  • Posts: 3638
  • using Matomo instead of Google Analytics
Re: cart not updating correctly. (database issue?)
« Reply #1 on: March 09, 2020, 20:21:53 pm »
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

  • Beginner
  • *
  • Posts: 7
  • A beginner
Re: cart not updating correctly. (database issue?)
« Reply #2 on: March 09, 2020, 20:43:34 pm »
Thank you for the reply.

This plugin is disabled and the problem still exists.

jjk

  • Global Moderator
  • Sr. Member
  • *
  • Posts: 3638
  • using Matomo instead of Google Analytics
Re: cart not updating correctly. (database issue?)
« Reply #3 on: March 09, 2020, 21:49:43 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

  • Beginner
  • *
  • Posts: 7
  • A beginner
Re: cart not updating correctly. (database issue?)
« Reply #4 on: March 09, 2020, 21:51:09 pm »
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

  • Beginner
  • *
  • Posts: 7
  • A beginner
Re: cart not updating correctly. (database issue?)
« Reply #5 on: March 09, 2020, 21:58:38 pm »
Settings of the standard payment option



jjk

  • Global Moderator
  • Sr. Member
  • *
  • Posts: 3638
  • using Matomo instead of Google Analytics
Re: cart not updating correctly. (database issue?)
« Reply #6 on: March 09, 2020, 22:20:09 pm »
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

  • Beginner
  • *
  • Posts: 7
  • A beginner
Re: cart not updating correctly. (database issue?)
« Reply #7 on: March 10, 2020, 20:46:47 pm »
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

  • Global Moderator
  • Sr. Member
  • *
  • Posts: 2596
    • Kreativ Fotografi
  • VirtueMart Version: 3.4.x
Re: cart not updating correctly. (database issue?)
« Reply #8 on: March 10, 2020, 21:39:39 pm »
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.8
Virtuemart 3.4.x
Olympiantheme Hera (customized)

jjk

  • Global Moderator
  • Sr. Member
  • *
  • Posts: 3638
  • using Matomo instead of Google Analytics
Re: cart not updating correctly. (database issue?)
« Reply #9 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.
Non-English Shops: Are your language files up to date?
http://virtuemart.net/community/translations

maarten33

  • Beginner
  • *
  • Posts: 7
  • A beginner
Re: cart not updating correctly. (database issue?)
« Reply #10 on: March 10, 2020, 23:20:09 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

  • Global Moderator
  • Sr. Member
  • *
  • Posts: 3638
  • using Matomo instead of Google Analytics
Re: cart not updating correctly. (database issue?)
« Reply #11 on: March 10, 2020, 23:28:42 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

  • UK Web Developer & Consultant
  • Global Moderator
  • Super Hero
  • *
  • Posts: 27674
  • Always on vacation
    • Jenkin Hill Internet
Re: cart not updating correctly. (database issue?)
« Reply #12 on: March 11, 2020, 11:11:07 am »
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

Jenkin Hill Internet,
Lowestoft, Suffolk, UK

Unsolicited PMs/emails will be ignored.

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

Currently using VM 3.6.11 10292 on Joomla 3.9.16 PHP 7.0.33

maarten33

  • Beginner
  • *
  • Posts: 7
  • A beginner
Re: cart not updating correctly. (database issue?)
« Reply #13 on: March 24, 2020, 14:30:58 pm »
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.