News:

Support the VirtueMart project and become a member

Main Menu

Problem with number of products in cart

Started by artonweb, August 14, 2023, 11:27:50 AM

Previous topic - Next topic

artonweb

Hello.
I am using Joomla 4.3.3 and Virtuemart  4.2.0 10905
I observe a strange problem.
I add to the cart 1 product, then I add another one.
When I am clicking on "ΑΡΧΙΚΗ" then I see 1 product in the cart.
When I am clicking to another menu item I see 2 products in the cart.

Website url is https://autochaniotakis.gr/joomla4

I had the same issue with Joomla 3, add I solve the problem with a change from /plugins/system/cache/cache.php on line 121 if ($caching && $user->get('guest') && $this->app->input->getMethod() == 'GET')
{
$this->_cache->setCaching(true);


to

if ($caching && $user->get('guest') && $this->app->input->getMethod() == 'GET')
{
$this->_cache->setCaching(false);

Now the code is different.
Thank you in advance

Jumbo!

First of all, that is not a problem. You can not use the "System - Page Cache" plugin on a VirtueMart site where the page contents are dynamic. The page cache plugin is designed for static content websites like blogs, business portals etc. You will face many problems using this plugin on a VirtueMart website.

Secondly, the code you changed utterly turns off all caching functionality of the plugin. Therefore, turning off the plugin would be more logical than deactivating it through codes.

artonweb

Thank you for your answer.
By mistake, I have deleted page cache plugin.
How can I turn off the cache in order to resolve the issue .
Thank you in advance.

GJC Web Design

just extract the plugin from the installer and ftp it back -- might need "discovering" in Joomla but probably not
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

artonweb

I can't found the Page cache plugin, even after a reinstall joomla core files.
However, I'm guessing the problem is somewhere else rather than the missing plugin.