VirtueMart Forum

VirtueMart 1.1.x [ Old version - no longer supported ] => Security (https) / Performance / SEO/ SEF issues VM 1.1 => Topic started by: cvoogt on July 25, 2008, 19:39:13 pm

Title: Joomla 1.5 System Cache and VM cart caching
Post by: cvoogt on July 25, 2008, 19:39:13 pm
I am running Joomla 1.5.4 with VM 1.1, in native mode (no legacy).
In my global configuration I have caching turned ON, gzip compression turned ON, and in my plugins I have the "System - Cache" plugin turned OFF (disabled).

When I turn the System Cache plugin on, it of course caches the pages on my site, but it is also caching the VM cart module. This is strange, because I thought the cache from the global config is what actually cached modules. I have tested it extensively with various combinations of settings, and I can do nothing but conclude that I have to have page caching (i.e. the "System - Cache" plugin) disabled in order to have the cart showing the correct information to the shopper.

Here is an example of what happens to a shopper when the system cache is turned on:

Shopper enters home page, and the cart shows empty (correct).
Shopper browses to product category pages and adds a couple products. They show up in their cart in the VM cart module (correct).
Customer goes back to home page (using same URL as before), but cart shows empty.

Or, if the customer at first adds just one product, then goes to home, it will correctly show the one product in their cart module. If they then go and add a second product and then return to the home page using the same URL (i.e. http://www.yourdomain.com), it will still only show the one product there ... UNLESS I have the system cache turned off.

I really need the system cache to speed up my site.

Does anyone have advice on this? The VM cart module does not have an option to exclude it from caching, like many modules do, and it does appear to be adversely affected by the Joomla system cache.

I have as I said tested this with the global config's cache off and page caching on, and the problem still happened. Turn system cache off, and the problem disappears. Turning gzip compression on or off made no difference either ... only turning page caching off in the plugins area is what fixed it.

Thanks,
Casper
Title: Re: Joomla 1.5 System Cache and VM cart caching
Post by: benm on August 25, 2008, 11:39:59 am
Hi Casper,

I had this exact same problem and I put in a small hack to get around this:

In the file /plugins/system/cache.php

Change line 60:

Code: [Select]
if (!$user->get('aid') && $_SERVER['REQUEST_METHOD'] == 'GET') {
to

Code: [Select]
if (!$user->get('aid') && !$_SESSION['cart']['idx'] && $_SERVER['REQUEST_METHOD'] == 'GET') {
I'm basically just telling the cache plugin to not display the cached page if the customer has anything in the cart!

Let me know if it works.

-Ben
Title: Re: Joomla 1.5 System Cache and VM cart caching
Post by: trendsettingdesign on September 01, 2008, 16:31:37 pm
Side note: make sure you upgrade to Joomla! 1.5.6 immediately, if not sooner.  Lots of Joomla sites have been hacked of late, and the 1.5.6 upgrade addresses security vulnerabilities.  It'd be terrible if you got the cache working properly, then lost your site to some loser hacker!
Title: Re: Joomla 1.5 System Cache and VM cart caching
Post by: kiper on November 30, 2008, 23:31:05 pm
Thanks Ben, that really helped me out. I am wrestling with a webshop that has some heavy traffic right now that consists of Joomla, Virtuemart and JoomFish among other things and the caching proved neccessary unless I want to bring the webserver down...
Title: Re: Joomla 1.5 System Cache and VM cart caching
Post by: krinolin on August 26, 2009, 01:44:02 am
This solution saved my life!!!
Thanks!
Title: Re: Joomla 1.5 System Cache and VM cart caching
Post by: jm3d on August 27, 2009, 07:56:09 am
It's refreshing to find a good answer on this forum! Thank you for the new code.
-john
Title: Re: Joomla 1.5 System Cache and VM cart caching
Post by: dj_hardbeat on September 16, 2009, 17:10:27 pm
Hi all!

I'm using VM 1.1.3 and Joomla 1.5.14 and was wondering if this solution is still actual? Is this the only thing to do to speed up? Any other tips or tricks?

Thanks everybody!

Title: Re: Joomla 1.5 System Cache and VM cart caching
Post by: Otto0815 on October 15, 2009, 12:34:05 pm
Yeaah...this seems to work.......using vm 1.1.3, joomla 1.5.14 legacy "on"

many many thanks!!!!!!
Title: Re: Joomla 1.5 System Cache and VM cart caching
Post by: rbalji75 on October 16, 2009, 08:45:39 am
Awesome!!! thanks a lot
Title: Re: Joomla 1.5 System Cache and VM cart caching
Post by: dsmarket on June 29, 2010, 04:11:26 am
Thanks. It is work with virtuemart 1.1.4 too.
www.dsmarket.rs
Title: Re: Joomla 1.5 System Cache and VM cart caching
Post by: QubeSys Technologies on September 02, 2010, 23:54:07 pm
Hi..
Do I need to keep the System Cache plugin active for this ?
Title: Re: Joomla 1.5 System Cache and VM cart caching
Post by: bulesz on September 07, 2010, 04:10:55 am
Thanks benm, its really working! :) I have put this code to the JOTcache so now it can use with VM.. ;)

Zehana: yes, turn on the plugin, but make the hack first....
Title: Re: Joomla 1.5 System Cache and VM cart caching
Post by: QubeSys Technologies on September 07, 2010, 04:41:04 am
Did it.

It works for me now.
But client says, it doesnt work for him.
No idea, whats going on..
Title: Re: Joomla 1.5 System Cache and VM cart caching
Post by: vishwa on October 05, 2010, 17:34:45 pm
hi ben
your code is working for me thanks.

In the file /plugins/system/cache.php

Change line 60:

Code:
if (!$user->get('aid') && $_SERVER['REQUEST_METHOD'] == 'GET') {

to

Code:
if (!$user->get('aid') && !$_SESSION['cart']['idx'] && $_SERVER['REQUEST_METHOD'] == 'GET') {

Title: Re: Joomla 1.5 System Cache and VM cart caching
Post by: _fD_ on January 05, 2011, 11:51:12 am
Hi Ben

i tested it a little bit out and found following bug:

If i deleted the content of the basket and then press back to shop the modul basket shows still a product in the overview. Of coz, if i go to the basket it is empty.

Do you have an idea to fix this too

Then i have a question, if it isnt possible to exclude the link from the basket intead the session, becoz so far i see is the basket session running, when i add products to the basket, only when i click the link to the basket it is empty. Do i add again a product to it, the basket is again filled...

Thank you for your replay.

With best regards,
Urs

VM 1.1.4
Joomla 1.5.22
Title: Re: Joomla 1.5 System Cache and VM cart caching
Post by: QubeSys Technologies on January 05, 2011, 12:00:39 pm
Virtuemart team seriously needs to work on this bug, since this is putting a very very bad impact n customers and bad experience as well.
I dont know, howcome it has not been fixed yet, since 1.1.3.

Not cool.
Title: Re: Joomla 1.5 System Cache and VM cart caching
Post by: _fD_ on January 05, 2011, 12:14:46 pm
Zehana i have asked the developer about this bug.
Title: Re: Joomla 1.5 System Cache and VM cart caching
Post by: _fD_ on January 05, 2011, 12:20:23 pm
I found a similar solution for the old VM 1.0.X with the extension PageCache following:

http://www.joomlaperformance.com/forums/func,view/id,958/catid,8/

So far i unterstand all this, this would be the perfect solution for VM and Joomla caching.
Title: Re: Joomla 1.5 System Cache and VM cart caching
Post by: QubeSys Technologies on January 05, 2011, 13:08:08 pm
I dont remember, how I had fixed it, but I did it after a long struggle, few months back.
Title: Re: Joomla 1.5 System Cache and VM cart caching
Post by: smartdigital on January 17, 2011, 01:25:59 am
Thanks to Ben,  i was searching for this solution for a long time.



great

Regards,

Richard

Richard
Title: Re: Joomla 1.5 System Cache and VM cart caching
Post by: bobysolo on March 02, 2011, 18:37:50 pm
I dont remember, how I had fixed it, but I did it after a long struggle, few months back.

Have you fixed the cache problem for ever? Or just a temporary solution? Could you please share it here?

Thanks.
Title: Re: Joomla 1.5 System Cache and VM cart caching
Post by: QubeSys Technologies on March 02, 2011, 18:47:05 pm
Hey friend,
yes I had fixed it on a client site and it was done.
Its running cool and has made around 2 million USD in 7 months.

But now again, 2 of my client sites have the same problem and Im totally stuck!

Stupid stuff.
Title: Re: Joomla 1.5 System Cache and VM cart caching
Post by: bobysolo on March 02, 2011, 20:51:21 pm
Hey friend,
yes I had fixed it on a client site and it was done.
Its running cool and has made around 2 million USD in 7 months.

But now again, 2 of my client sites have the same problem and Im totally stuck!

Stupid stuff.

Are you saying that you don't remember how you did it?
Title: Re: Joomla 1.5 System Cache and VM cart caching
Post by: QubeSys Technologies on March 03, 2011, 03:25:44 am
yes, I dont remember.
Title: Re: Joomla 1.5 System Cache and VM cart caching
Post by: RAINFIRE on March 05, 2011, 07:05:52 am
Thanks also @benm. Only wasted a day on this and I guess it should have been more obvious had I not been messing with JoomSEF at the same time.

Agreed with Qubesys. This needs to be elevated to Virtuemart team.
Title: Re: Joomla 1.5 System Cache and VM cart caching
Post by: jenkinhill on March 05, 2011, 10:26:15 am
I wonder if this is a new issue, as the cache problem was fixed in VM1.1.4 - a simple change:

In components/com_virtuemart/themes/default/templates/browse/included/browse_layouttable.tpl.php and browse_notables.tpl.php change:

echo $this->fetch_cache( 'browse/'.$templatefile .'.php' );

to:

echo $this->fetch( 'browse/'.$templatefile .'.php' );

I have just tested cache on in VM1.1.7a/J1.5.22 (no SEF) and have no display problems.
Title: Re: Joomla 1.5 System Cache and VM cart caching
Post by: QubeSys Technologies on March 05, 2011, 10:41:07 am
Try this site,
http://qubesys.net/wasco/ on IE8.
Its running Joomla 1.5.22 and VM 1.1.7 and still issues.

So, its sure, the issue is there. :|
Title: Re: Joomla 1.5 System Cache and VM cart caching
Post by: jenkinhill on March 05, 2011, 12:30:55 pm
Had a look but could not see any products....

One of my test/demo sites has Joomla cache on to test - www.keswick.biz/newstore?keyword=ryan and works OK as far as I can tell in all browsers. I don't usually use cache though.
Title: Re: Joomla 1.5 System Cache and VM cart caching
Post by: RAINFIRE on March 05, 2011, 15:52:39 pm
Problem is still there. I was using Joomla 1.5.21 and Virtuemart 1.1.5. Had problems. Upgraded to latest Joomla and VM and still had the problem.
Title: Re: Joomla 1.5 System Cache and VM cart caching
Post by: QubeSys Technologies on March 05, 2011, 15:55:25 pm
Click on ORDER NOW.
Go here ,
http://www.qubesys.net/wasco/index.php?option=com_virtuemart&Itemid=80&vmcchk=1&Itemid=80

Its not working. Just tried on IE8.
Title: Re: Joomla 1.5 System Cache and VM cart caching
Post by: jenkinhill on March 05, 2011, 19:34:04 pm
Cart is not displayed on every page so difficult to check...

Have you tried using JotCache? I remember that some users found it to be a good plugin http://extensions.joomla.org/extensions/site-management/cache/13155
Title: Re: Joomla 1.5 System Cache and VM cart caching
Post by: QubeSys Technologies on March 05, 2011, 19:37:10 pm
I never use Cache with VM, since it kills the store for sure.
havent tried JotCache .
Title: Re: Joomla 1.5 System Cache and VM cart caching
Post by: QubeSys Technologies on March 05, 2011, 19:38:33 pm
Ok try adding this product,
http://www.qubesys.net/wasco/index.php?page=shop.product_details&flypage=flypage.tpl&product_id=40&category_id=7&option=com_virtuemart&Itemid=80

Title: Re: Joomla 1.5 System Cache and VM cart caching
Post by: jenkinhill on March 05, 2011, 19:54:49 pm
I added that product, but need the cart module displayed on the page to see how the xart works when I go back to homepage etc.

Although I have not seen this issue, I wonder if ensuring that the cart is only displayed on the VM pages is a sort of answer. I have seen something about that on the metamod forum. The Joomla plugin code fix by benm earlier in this thread has obviously helped some users.

If my servers weren't so fast I may have come across a page caching issue myself.
Title: Re: Joomla 1.5 System Cache and VM cart caching
Post by: QubeSys Technologies on March 05, 2011, 19:56:09 pm
Sorry dint get you.
Do you mean, we need to have the VM Cart module active on all pages to ignore this issue ?
Title: Re: Joomla 1.5 System Cache and VM cart caching
Post by: RAINFIRE on March 14, 2011, 08:42:49 am
Yes, curious also. So far System Cache plugin does not work correctly with Joomla 1.5.21-1.5.22 and Virtuemart versions 1.1.5-1.1.7a that I've tried. benm's hack basically disables the cache when items are in the cart; slowing down the main thing we want the user to breeze through; the $$$ in the cart.

I'd sure like to get this fixed? What's the procedure for opening a bug report here?

OFFTOPIC - On a separate note, been reading up on Community Builder or Jomsocial and Virtuemart. wow - my next pet peeve . . . multiple user tables/schemas with both installed ;) Still using Joomla (and Drupal). They've both got some delicious features (and some warts).
Title: Re: Joomla 1.5 System Cache and VM cart caching
Post by: jenkinhill on March 14, 2011, 09:29:42 am
Bugs can be discussed on http://forum.virtuemart.net/index.php?board=61.0

I agree with you about userfield complications caused by CB and Jomsocial. VirtueMart works in conjuction with Joomla's user table, but CB uses its own schema. I don't think it was considered when development of these components started that some people would want to install and use more than one component at the same time.
Title: Re: Joomla 1.5 System Cache and VM cart caching
Post by: RAINFIRE on March 14, 2011, 19:50:42 pm
@jenkinhil - I took your advice and found the bug in the tracker. Status: Rejected


http://dev.virtuemart.net/issues/205 (http://dev.virtuemart.net/issues/205)

"not easily fixable"  - Suggests to use the fix in this thread by benm
Title: Re: Joomla 1.5 System Cache and VM cart caching
Post by: Cory1970 on April 15, 2011, 04:28:49 am
VM 1.1.8
Joomla 1.5.18

I am still running into the exact same problem even after making the change to the cache.php.  This happens with global caching on or off.  This happens with the cache plugin on or off.

Here is what happens.
Put item in cart.
Click "continue shopping" - the item is still in the cart at this point
Click on home page - sometimes the item stays in the cart.
Visit several other pages - after one or two pages the item is gone.

Any ideas?
Title: Re: Joomla 1.5 System Cache and VM cart caching
Post by: Cory1970 on April 15, 2011, 06:46:19 am
Here is my URL http://mtiracing.com
Title: Re: Joomla 1.5 System Cache and VM cart caching
Post by: RAINFIRE on April 15, 2011, 06:51:26 am
I subscribed to this thread hoping that the VM peepz would eventually see this is a pretty big issue. Yep - this is almost a deal killer for Virtuemart. Many Joomla sites are slow with the cache turned off. The last ecommerce site I built I used a different cart because of this flaw. I at least got it to VirtueMart's cart to work by turning off the cache altogether.
Title: Re: Joomla 1.5 System Cache and VM cart caching
Post by: Cory1970 on April 15, 2011, 06:56:39 am
I have been searching around and continue to find the issue popping in various forums on the web, but no one seems to have a real answer.

Here is another one http://forum.virtuemart.net/index.php?topic=52825.0 (http://forum.virtuemart.net/index.php?topic=52825.0)
Title: Re: Joomla 1.5 System Cache and VM cart caching
Post by: QubeSys Technologies on April 15, 2011, 06:58:21 am
This is a big bug, without a solution :|
Title: Re: Joomla 1.5 System Cache and VM cart caching
Post by: Cory1970 on April 15, 2011, 07:14:21 am
I have turned caching back off, cleared the sit'e cache, and cleared browser cache but the site has continued to have this issue.

I have mod_virtuemart_cart posted on every page in the left hand column. After clicking "continue shopping" and browsing several pages, the modules appears empty and states "Your Cart is currently empty."

Here is the interesting part, once I add another item to the cart my old items appear as well.

Any thoughts?
Title: Re: Joomla 1.5 System Cache and VM cart caching
Post by: Cory1970 on April 15, 2011, 22:15:33 pm
Anyone else having this issue with or without caching?
Title: Re: Joomla 1.5 System Cache and VM cart caching
Post by: jenkinhill on April 16, 2011, 15:30:12 pm
The cart content is stored in the browser as session variables so I guess it would be possible to overwhelm the storage, but the cart info is still there.

I just tried on Amazon and was able to lose the cart content & reinstate it by adding another product....
Title: Re: Joomla 1.5 System Cache and VM cart caching
Post by: Cory1970 on April 17, 2011, 21:24:08 pm
Thank you for your reply.  Overwhelming the storage would be reasonable explanation if it didn't happen after only one or two pages being browsed.
Title: Re: Joomla 1.5 System Cache and VM cart caching
Post by: gtech on April 20, 2011, 13:11:14 pm
On my site when I turn cache on all the products are showing exactly same ( virtue mart will display only 1 product xx numbers of times)
Site:
suknie slubne (http://www.i-slubny.pl)
I have SEF404SH installed
Title: Re: Joomla 1.5 System Cache and VM cart caching
Post by: smartdigital on May 26, 2011, 18:13:29 pm
Still the same problem for me for along time.  Global cache turned on or off it doesn't matter, it keep on caching even when the cache folder is blocked for wrting (CMOD 644), but when global caching is turned of it not caching all the time. but you never know when it is and when not

realy frustrating that there is no good solution for this.

I.m running:

Joomla 1.5.23
VM 1.1.8

Using:
JHC optimize
SH404SF v. 2.2.5.964
Rockettheme Mixxag site templae
Yagendoo VM VAmazing template
Title: Re: Joomla 1.5 System Cache and VM cart caching
Post by: TimU on June 21, 2011, 16:13:22 pm
Man, what a pain!
All through my test phase, Joomla Server caching was switched on. Being the only person who ever placed test orders from my site, I never saw an issue.
It wasn't until orders significantly dropped, that I realised I had a problem

People complained that they:
* couldn't place an order
* had the wrong item in their cart
* couldn't clear their cart
* couldn't update their cart

I've now switched off all server caching (in both places, Global configuration and Plugins) and am a little hesitant to try out the other caching tools that are mentioned here.

Has anyone had 100% success with *any* caching modules for VM?

Tim
Title: Re: Joomla 1.5 System Cache and VM cart caching
Post by: thanoss43 on August 31, 2011, 21:33:17 pm
Hello,

I have been using VM 1.1.9 with Joomla Cache on for some days now. The system cache plugin is off. I am not using any third party seo components.

I have read in older threads that joomla cache in virtue mart should be off. I think in the latest vm release (1.1.9) this is fixed.

I haven't seen any problems until now, no duplicate products or wrong items in the cart.

What are your suggestions? Has anybody tried with the cache plugging on?

Thanks



Title: Re: Joomla 1.5 System Cache and VM cart caching
Post by: voidkun on September 24, 2011, 23:57:38 pm
Still no resolution to this?
Title: Re: Joomla 1.5 System Cache and VM cart caching
Post by: mikeboon on November 06, 2011, 17:22:04 pm
What a pain that he VM team does not see this as a really mayor issue.
I'm checking to use other software for my new shop now. What a pain! For 3 years people report issues and still no solution!
Title: Re: Joomla 1.5 System Cache and VM cart caching
Post by: siojak on November 29, 2011, 12:22:35 pm
Hi,It helped me:

virtuemart>configuration>security

In the security tab of the virtuamart configuration you will see to addresses: "Site URL" and "SECUREURL". If these addresses don't both use "www" then the problem exists. they should both have www.

siojak
Title: Re: Joomla 1.5 System Cache and VM cart caching
Post by: marcof on December 04, 2011, 23:27:41 pm
Well, nothing helped for me unfortunately... Cache on or off makes no difference, Site URL is set to www... etc...

Can there something be set to refresh the entire page every time you browse to a different page? If I refresh the page everything looks fine...

(EDITED]
Title: Re: Joomla 1.5 System Cache and VM cart caching
Post by: valdez79 on May 11, 2012, 00:17:20 am
I have turned caching back off, cleared the sit'e cache, and cleared browser cache but the site has continued to have this issue.

I have mod_virtuemart_cart posted on every page in the left hand column. After clicking "continue shopping" and browsing several pages, the modules appears empty and states "Your Cart is currently empty."

Here is the interesting part, once I add another item to the cart my old items appear as well.

Any thoughts?

Hello Cory1970
I had exactly the same issue as you.
I turned off the following plugins:
plg_gkcache
gavickExtCache
cache

In global configuration the cache is on
global conservative
15 minutes


My Problem was solved.
Title: Re: Joomla 1.5 System Cache and VM cart caching
Post by: billkou on August 22, 2012, 15:37:06 pm
Hello people.

Take a look at this and your problems should be over :

http://forum.virtuemart.net/index.php?topic=43602.0

Post No.2

:)
Title: Re: Joomla 1.5 System Cache and VM cart caching
Post by: Limonbay on September 01, 2012, 19:34:43 pm
I see there's no solution yet for the problem of the cache turned ON and all images in VM repeating themselves.

I hope someone find a solution for this, Cache off is not an option, people want fast sites!
Title: Re: Joomla 1.5 System Cache and VM cart caching
Post by: mbit on September 25, 2012, 16:23:04 pm
So every time you publish new products you have to clean the cache in order to be generated again and all pages must be opened once in order to get cached. First time of caching is so slow! Can we avoid this and somehow purge the new updates without need of regenerating cache pages?
Also does JotCache offers any more features than what joomla default cache does?
Title: Re: Joomla 1.5 System Cache and VM cart caching
Post by: jenkinhill on September 25, 2012, 18:01:05 pm
I have used Jotcache on Joomla 2.5 with VirtueMart 2 and it works OK, even though VM2 is already faster than 1.1.9 I think there is some benefit. This morning I checked JotCache 3.0.2 on Joomla 2.5.7 with VM 2.0.11d.  It does allow you to now exclude some modules from cache, useful for the cart and currency exchange rate display.

I have not tested it with VM1.1/J1.5 as I no longer have any old version sites, but my experience now suggests it could be worth a try.
Title: Re: Joomla 1.5 System Cache and VM cart caching
Post by: atpascal on December 14, 2012, 18:21:55 pm
Hi,

Im' running Joomla 2.5.4 and VM 2.0.6

I have the directory&file /plugins/system/cache/cache.php instead of /plugins/system/cache.php
and
the line 62:

if ($user->get('guest') && $_SERVER['REQUEST_METHOD'] == 'GET') {

instead of line 60:

if (!$user->get('aid') && $_SERVER['REQUEST_METHOD'] == 'GET') {

in your instructions.

Should I change this???


Thank's
Pascal.