Cart don't update quantity correctly or delete product when user is registered

Started by Darko F., February 04, 2021, 11:48:52 AM

Previous topic - Next topic

Darko F.

Hi all
I have strange problem with my shopping cart.
When guest user update quantity or press delete product button in cart everything work flawlessly.
But if user is registered and logged, then when he press delete product button in cart, there Joomla message  will pop up with (your product was deleted) but product will still show in cart, only second time click on delete button will actually delete product from cart.
The same is with update quantity, only second click will actually update new quantity.

All help if any know solution to this is appreciated.

VirtueMart 3.8.4 10335
Joomla version, 3.9.24.
There in no problem if you fall. Problem is if you don't get up

Jörgen

Check Your browsers console, I suspect You have javascript errors. (F12)

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

Darko F.

Hi,
Thank you for answer.
I think this too but I couldn't find any errors in console. Please see yourself

https://tuamv.com/shop/liquor/wines/orange/povh-2018-orange-rebula-wine
Go shop -> check out and delete product in cart all work

To register log in with name: registriran and pass: registriran
Then give product in cart and try to delete out of cart and will work only second click on button to delete.

Regards.
There in no problem if you fall. Problem is if you don't get up

Jörgen

You have JS errors and cookie warnings for example:

BLOCKED: https://hn.inspectlet.com/mlsi?jv=6&r=2067321899&w=1663580089&k=0d8afd71&oid=12357968&sid=2469706473&pad=6&mlrc=2&isfpayload=W3sidCI6MTY3OTMsImsiOiJkIiwiZCI6W1tdLFtdLFt7ImlkIjoxODAsImF0dHJpYnV0ZXMiOnsiYXV0b2NvbXBsZXRlIjpudWxsfX1dLFtdXX1d&isfnum=1&isftotal=1&rrtn=1612528801263


Uncaught TypeError: document.getElementsByClassName(...)[0] is undefined
    <anonymous> https://tuamv.com/shop/liquor/wines/orange/povh-2018-orange-rebula-wine:25


By the way, I could erase products in cart. Firefox 85.0

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

sirius

Hi
seems you also have a json syntax error, missing a comma here on the first line in red:
{"@type":"Offer","priceCurrency":"EUR","price":"12.79644","url":"https://tuamv.com/shop/liquor/wines/orange/povh-2018-orange-rebula-wine",
                  "availability": "InStock",
                  "valueAddedTaxIncluded": "false",
                   "priceValidUntil": "2022-02-05",
                   "itemCondition": "NewCondition"
               }

You should turn off jch when trying to figure out such things. Will be easier to find which js is possibly causing a bug.
J3.10.12 | PHP 7.4.33 + APC + Opcode
VM Prod : 3.8.6 | VM Test : 4.4.0.11095

Darko F.

Hi
Thanks all to take a time and check my website I'm grateful.

Is true I have console errors but I didn't think they are important.

I know for all errors why they are there. Some of them are because add blockers or not excepting cookies - (Inspectled), and one is because one of my java script, which cannot get element because it is not exist on this page. Json was wrong for short period of time today, I just add few new options in schema.

I am sure all .js are on the bottom of page and load asynchronously (I put them there) but I will remove them to see if they are causing trouble.
Keep in mind that the same errors was there also when you are not registered and all works fine.

Jörgen you could remove product from cart when you were registered on first try?
That is a good news I guess. Unfortunately I need to click two times when I'm registered to delete product, no mater what kind of browser I use.

Is it not a big deal, but still it bothers me.

Thank you.


There in no problem if you fall. Problem is if you don't get up