VirtueMart Forum

VirtueMart 2 + 3 + 4 => Frontend Modules => Topic started by: BjornOnPole on April 16, 2015, 13:47:06 PM

Title: Product Module not updating until I refresh the page
Post by: BjornOnPole on April 16, 2015, 13:47:06 PM
URL: http://testacc.letsgrow.com/nl/shop/algemeen/aansluiten-detail

On this website in the shop I've added a VirtueMart Products module, to display the recently watched products.
I have noticed that the list of products only gets updated whenever I refresh the page.

For example, I open the product in the URL above, and click on the next button, to go to "Heraansluiten".
Only when I refresh "Heraansluiten" is added to the list "Onlangs bekeken producten".

One thing that makes me wonder where this problem comes from is the breadcrumbs, they have the same problem. But that module is not VirtueMart native, but maybe there is some VirtueMart caching or something?
I have checked the caching in the modules and template, and that is off.

Does anyone know what the problem is? Or point me in the right direction?

Thanks in advance!

Bjorn

VirtueMart 3.0.6.2
Joomla! 3.4.1
Title: Re: Product Module not updating until I refresh the page
Post by: GJC Web Design on April 17, 2015, 00:13:13 AM
the page isn't refreshed by the next-> prev buttons

an ajax call is made to JUST refresh the products details div  -

you can see the ajax calls in the JS console

e.g. http://testacc.letsgrow.com/nl/shop/algemeen/external-web-service-detail?tmpl=component

to get the page to actually refresh so as to reload the breadcrumbs and your module you would have to disable the ajax refresh

disabling the ajax is available apparently  - haven't tested in vm3.0.7  - u should be on this anyway with J3.4.1
had you not noticed you couldn't save any new products?  ;)

Title: Re: Product Module not updating until I refresh the page
Post by: BaidareW on April 18, 2015, 22:22:31 PM
Sorry not the answer to your question, but how you add "recently viewed products" in module ?

I create VM products module, but there is no option to choose "recently viewed", only "best selling", "random", "newest".

VM 3.0.6.4
Title: Re: Product Module not updating until I refresh the page
Post by: GJC Web Design on April 18, 2015, 22:57:39 PM
QuoteBut that module is not VirtueMart native

3rd party module
Title: Re: Product Module not updating until I refresh the page
Post by: BaidareW on April 18, 2015, 23:37:28 PM
Does this means that virtuemar 3.x does not have "latest viewed products" function ? The world must be crazy.. :)

Quote from: GJC Web Design on April 18, 2015, 22:57:39 PM
QuoteBut that module is not VirtueMart native

3rd party module
Title: Re: Product Module not updating until I refresh the page
Post by: jenkinhill on April 18, 2015, 23:54:04 PM
Quote from: BaidareW on April 18, 2015, 23:37:28 PM
Does this means that virtuemar 3.x does not have "latest viewed products" function ? The world must be crazy.. :)

Of course it does, it is an option for VirtueMart Products module. See pic (this is from VM3.0.7.4)
Title: Re: Product Module not updating until I refresh the page
Post by: BaidareW on April 19, 2015, 08:37:53 AM
Thanks.

Now I see why I didn't noticed this future. In description translation there is no mention about it and also in options the string is like this "MOD_VIRTUEMART_PROD..". Sure for test reasons I tested this also, but it didn't showed results as I expected.

Only one first product is remembered (set to 3) so for some reason it is not working correctly.

I noticed that browsing our virtuemart forum gives me such error:

"Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[HY000]: General error: 145 Table './c1_admarket2/fraud_quick_search' is marked as crashed and should be repaired' in /var/www/clients/client1/web1/web/system/application/libraries/Zend/Db/Statement/Pdo.php:0 Stack trace: #0 /var/www/clients/client1/web1/web/system/application/libraries/Zend/Db/Statement/Pdo.php(0): PDOStatement->execute(Array) #1 /var/www/clients/client1/web1/web/system/application/libraries/Zend/Db/Statement.php(0): ......"

Quote from: jenkinhill on April 18, 2015, 23:54:04 PM
Quote from: BaidareW on April 18, 2015, 23:37:28 PM
Does this means that virtuemar 3.x does not have "latest viewed products" function ? The world must be crazy.. :)

Of course it does, it is an option for VirtueMart Products module. See pic (this is from VM3.0.7.4)

Quote from: jenkinhill on April 18, 2015, 23:54:04 PM
Quote from: BaidareW on April 18, 2015, 23:37:28 PM
Does this means that virtuemar 3.x does not have "latest viewed products" function ? The world must be crazy.. :)

Of course it does, it is an option for VirtueMart Products module. See pic (this is from VM3.0.7.4)

Quote from: jenkinhill on April 18, 2015, 23:54:04 PM
Quote from: BaidareW on April 18, 2015, 23:37:28 PM
Does this means that virtuemar 3.x does not have "latest viewed products" function ? The world must be crazy.. :)

Of course it does, it is an option for VirtueMart Products module. See pic (this is from VM3.0.7.4)

Title: Re: Product Module not updating until I refresh the page
Post by: jenkinhill on April 19, 2015, 11:39:19 AM
That "forum" error is from the ad server.
Title: Re: Product Module not updating until I refresh the page
Post by: BaidareW on April 19, 2015, 20:53:42 PM
And how do you think why module shows only one or some time 3 products, but they are not changing (not real last viewed products).
Title: Re: Product Module not updating until I refresh the page
Post by: jenkinhill on April 19, 2015, 21:05:51 PM
You should turn off VM Cache in the module settings.
Title: Re: Product Module not updating until I refresh the page
Post by: BaidareW on April 19, 2015, 23:03:52 PM
Thanks.

5 years of experience working with virtuemart and still making such silly mistakes (I set cache to 0 instead of turning it off - well that it is because of poor translation and unavailable fields).
Now on Opera browser everthing fine, while on IE 11 and Chrome I get
"Fatal error: Class 'shopFunctionsF' not found in ../public_html/modules/mod_virtuemart_product/mod_virtuemart_product.php on line 75 "

Quote from: jenkinhill on April 19, 2015, 21:05:51 PM
You should turn off VM Cache in the module settings.
Title: Re: Product Module not updating until I refresh the page
Post by: GJC Web Design on April 20, 2015, 10:22:30 AM
I was referring to @BjornOnPole post that HIS was a 3rd party module

QuoteOne thing that makes me wonder where this problem comes from is the breadcrumbs, they have the same problem. But that module is not VirtueMart native, but maybe there is some VirtueMart caching or something?
Title: Re: Product Module not updating until I refresh the page
Post by: BjornOnPole on April 20, 2015, 16:12:22 PM
Quote from: GJC Web Design on April 17, 2015, 00:13:13 AM
the page isn't refreshed by the next-> prev buttons

an ajax call is made to JUST refresh the products details div  -

you can see the ajax calls in the JS console

e.g. http://testacc.letsgrow.com/nl/shop/algemeen/external-web-service-detail?tmpl=component

to get the page to actually refresh so as to reload the breadcrumbs and your module you would have to disable the ajax refresh

disabling the ajax is available apparently  - haven't tested in vm3.0.7  - u should be on this anyway with J3.4.1
had you not noticed you couldn't save any new products?  ;)

This makes sense! And no, I guess I didn't notice..  :o

I can't find the setting you mention, about AJAX I can only find: "Gebruik het Ajax script Landen / Regio's" which translates to "Use the Ajax script Countries / Regions".

But disabling that does not solve my problem.

I also made a topic about it: http://forum.virtuemart.net/index.php?topic=129531.0
Not sure if allowed, but I could not find anything about this in the search and maybe other people would like to know.

Do you know which setting I need? BTW I am on VirtueMart 3.0.6.2 and cannot seem to download a newer (3.0.7?) version.
Title: Re: Product Module not updating until I refresh the page
Post by: jenkinhill on April 20, 2015, 18:29:48 PM
See "Use ajax for product content" in config/templates but I found it still uses Ajax for prev/next on my default template (VM3.0.7.4)

To change the navigation you can edit components/com_virtuemart/views/productdetails/tmpl/default.php and use the edited file as an override.