Page 1 of 1

product reservation after add to cart

PostPosted: Thu May 26, 2022 8:55 am
by d0ublezer0
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

Re: product reservation after add to cart

PostPosted: Fri Nov 25, 2022 4:45 pm
by admin
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