Author Topic: Problem with number of products in cart  (Read 1288 times)

artonweb

  • Beginner
  • *
  • Posts: 33
    • Art On web
Problem with number of products in cart
« on: August 14, 2023, 11:27:50 AM »
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
Code: [Select]
if ($caching && $user->get('guest') && $this->app->input->getMethod() == 'GET')
{
$this->_cache->setCaching(true);

to

Code: [Select]
if ($caching && $user->get('guest') && $this->app->input->getMethod() == 'GET')
{
$this->_cache->setCaching(false);
Now the code is different.
Thank you in advance

Jumbo!

  • 3rd party VirtueMart Developer
  • Full Member
  • *
  • Posts: 930
  • Full-stack Web Developer
    • www.virtueplanet.com
  • VirtueMart Version: Always the latest
Re: Problem with number of products in cart
« Reply #1 on: August 15, 2023, 20:24:26 PM »
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

  • Beginner
  • *
  • Posts: 33
    • Art On web
Re: Problem with number of products in cart
« Reply #2 on: August 15, 2023, 22:13:31 PM »
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

  • 3rd party VirtueMart Developer
  • Super Hero
  • *
  • Posts: 10882
  • Virtuemart, Joomla & php developer
    • GJC Web Design
  • VirtueMart Version: 3.8.8
Re: Problem with number of products in cart
« Reply #3 on: August 16, 2023, 11:14:46 AM »
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
VM3 AusPost Shipping Plugin - e-go Shipping Plugin - VM3 Postcode Shipping Plugin - Radius Shipping Plugin - VM3 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

  • Beginner
  • *
  • Posts: 33
    • Art On web
Re: Problem with number of products in cart
« Reply #4 on: August 16, 2023, 17:32:18 PM »
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.