product reservation after add to cart

If you are runnig Joomla 3.x and Virtuemart 3.x please post to this forum your questions or support tickets about One Page Checkout

product reservation after add to cart

Postby d0ublezer0 » Thu May 26, 2022 8:55 am

Hello! It is possible to do product reservation when it is in cart?

For example (only for non-registered users):
We have 5 items of some product,
When user add 2 items to cart, for other users should be 3 items available, because 2 is temporary reserved.
When cart session destroyed (user not buy these 2 items) reservation must be cancelled
d0ublezer0
 
Posts: 14
Joined: Tue Mar 24, 2015 9:26 am

Re: product reservation after add to cart

Postby admin » Fri Nov 25, 2022 4:45 pm

hello, there is a system in OPC - plg_system_cartstock which does stock blocking on cart level, but it might cause performance issues because it block table rows during the concurrent updates so if your site is having way too many visitors at once it might not work for you.

It also might need a few modifications within VM template files:
\templates\{your template}\html\com_virtuemart\cart\padded.php

add this to beginning of the file within php block:

Code: Select all

$dispatcher = JDispatcher::getInstance();
     $countDownHtml = '';
     $errors = array();
     $dispatcher->trigger('plgVmOnDisplayMiniCart',array(&$countDownHtml, &$errors));
echo $countDownHtml;


in OPC the banner shows via "advertise position" so it has to be enabled in opc config. (show advertisement from payment plugin... )

best regards, stan
admin
Site Admin
 
Posts: 2708
Joined: Wed Jan 06, 2010 11:43 pm


Return to One Page Checkout for Virtuemart 3 on Joomla 3.x

cron