简体   繁体   中英

virtuemart cart timer

Please help, don't really understand joomla + virtuemart. If we want to put a timer when user add to cart, so, and product will be unavailable for another user, can give a rough illustration how to do that?

So, if within that timeframe, user still no checking out, then the product will be removed from his cart, and become avail again.

Each product in VirtueMart has an "In Stock" property; this is in the "Product Status" tab.

Under Admin -> Configuration in VirtueMart admin, in the section "Core Settings", there's an option called "Check Stock". If enabled, the user will not be able to check out if they try to buy more units than are in stock.

So, say there is 1 unit left and Alice puts it in her cart, then decides to go for dinner or something. Bob comes to the site, sees the same item, puts it in his cart and then checks out. Bob is successful; order is sent to him. When Alice gets back, even though the item is in her cart, it won't let her check out because the "In Stock" quantity is now zero.

Make sense?

Now it solved.

Just edit the code for virtual mart plugin and store the cart time in session. And use javascript module to pull from server whether any product expired, if does, then just remove it.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM