News:

Support the VirtueMart project and become a member

Main Menu

cart wont update if user is not logged in

Started by kiasati, July 03, 2018, 12:04:45 PM

Previous topic - Next topic

kiasati

Hi

a user goes to an product detail page and adds the product to cart,
but when user opens the cart, there is no item in it,
when the user logs in, then can see the product or products that he/she has added to cart.

why this happens?!!
how can i solve it??

i'm using joomla 3.8.10 and VirtueMart 3.2.14

Jörgen

#1
Not enough information.

Broken template, added module, added plugin, PHP update, Joomla Update, VM update, JS conflict, take Your pick.

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

kiasati

Quote from: Jörgen on July 03, 2018, 13:17:33 PM
Not enough information.

Broken template, added module, added plugin, PHP update, Joomla Update, VM update, JS conflict, take Your pick.

Jörgen @ Kreativ Fotografi

i deleted "com_virtuemart" folder in template overrides, but still the problem remained.
i'm using php 7.
JS conflict is possible. how can i find out if there is?

on localhost it works fine...

Jörgen

Check you debugger, F12 in some browsers.
PHP 7.2 dose not go well with VM.

Find out what the difference is between Your local host and your webhost and You may have Your answer.

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

jenkinhill

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

Jumbo!

It sounds like a cache issue. Have you enabled "System - Page Cache" plugin or using any other page cache extension?

Studio 42

Quote from: Jumbo! on July 03, 2018, 19:41:51 PM
It sounds like a cache issue. Have you enabled "System - Page Cache" plugin or using any other page cache extension?
+1

aftertaf

i gather its better to disable system cache, page cache etc with virtuemart..., right ?

Studio 42

Cart use session, so if you have cache active, the page is not updated with user session data(cart)
This problem is same with any cart system, it's not specific to Virtuemart.
If you want use a cache you need a more advanced cache manager but this can slowdown your site, if you have to many cases to handel(because
disk writing).
So page cache should never be used for a shop, modules can in some case be cached(menu for eg., categories ...) my own category module can use a static cache that never expire for eg.(can be cleared with joomla cache handler)
Virtuemart do not use advanced caching rules, so the caching fails because session values. Eg currrency changes,language changes are value in session but virtuemart have never added this in the cache key, so you cannot add it in cache.
But other datas can change the display as promotions, stock changes, so it's not easy to write a specific cache system for a shop.

kiasati

#9
PROBLEM SOLVED.

I use all of these for caching:
1. Conservative caching -enabled in global configuration
2. System - Page Cache
3. System - JCH Optimize Pro
4. cloudflare

I'd had excluded cart page in jch before,
problem was made by "System - Page Cache"
excluded cart page in it and then problem solved.

Thanks a lot guys.