Author Topic: Jotcache with dynamic prices and stock modification for both VM1.xx and VM2.xx  (Read 1407 times)

Genius WebDesign

  • 3rd party VirtueMart Developer
  • Jr. Member
  • *
  • Posts: 175
    • Genius WebDesign
Hi,

I thought I´d share with you my latest Virtuemart modification regarding Jotcache.

As many shopowners are often only updating product prices on a regular basis it would be great if you could use a cache plugin such as Jotcache where you cache everything except the product prices and product stock information.
Normally this is not possible but I found a way to achieve this on all product details pages and category pages, and also in the product module (only if there are no more than 1 instance of that module active on 1 page at a time)

The way I did it was to send all the product IDs via ajax to an external PHP script and then calculate all the prices (salesprice, discount, baseprice etc.) and the stock info, and then retrieve that information and insert them into each products specific HTML price and stock element IDswith jQuery.

It was pretty tricky and the implementation takes alot of hours to code, but in the end I now have a super fast Virtuemart shop with dynamic prices which means that I can set Jotcache´s cache lifetime so expire e.g. after 1 week or 1 month and then apply a weekly or monthly cache clean and cachewarmer script.

If you want to hear more about this, or if you´d like to have this implemented on your site, feel free to contact me and I´ll happily provide you with my services.
Contact: mo@geniusdesign.dk