News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

Clear Cart after an hour or more

Started by whitecollar, February 11, 2013, 05:14:44 AM

Previous topic - Next topic

whitecollar

How to set timer to clear the cart? Some users leave product on the cart then get back on it after a few days. The problem is the product is out of stock and still order it. How can I set a time in clearing the cart maybe clear the cart after one day.

Thanks

jenkinhill

Reduce  Session Settings in Joomla Configuration/System. Also ensure Joomla cache is off.
Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

whitecollar

My joomla cache is only 15minutes but still caching it the whole time. Kindly help me on this. I can't figure it out. Can I add some code on the cart?

[attachment cleanup by admin]

GJC Web Design

You need to find out exactly where it's being cached - I assume the session but you need to check..

in components/com_virtuemart/helpers/cart.php there are public functions

function removeCartFromSession()

and

function emptyCart()

and

function emptyCartValues($cartData)

maybe call one of these with a Cron Job etc...

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