virtuemart 3.0.10 disable double confirmation on checkout

萝らか妹 提交于 2020-01-25 12:50:07

问题


There is solution. In my sites on virtuemart I manually (with code editing) do one page checkout (and one step). But after version 3.0.10 my solution no longer work.

Before version 3.0.10 I used follow method: In cart/tmpl/default.php in bottom of file present hidden inputs. After <input type='hidden' name='task' value='updatecart'/> add <input type='hidden' name='task' value='confirm'/>. And it works.

But after version 3.0.10 I found no other option except hack of virtuemart core: In cart/tmpl/default.php in bottom of file present hidden inputs. Del <input type='hidden' name='task' value='updatecart'/> add <input type='hidden' name='task' value='confirm'/>. In site/components/com_virtuemart/controllers/cart.php in method display() change

if(($task == 'confirm' or isset($request['confirm'])) and !$cart->getInCheckOut()){
$cart->confirmDone();

to

if(($task == 'confirm' or isset($request['confirm'])) and !$cart->getInCheckOut()){
$cart->checkoutData(false);
$cart->confirmDone();

My English is bad, but hope this will helpful.


回答1:


There is no need for hacks anymore. VirtueMart 3.0.10 doesn't have double confirmation. Just check "OPC" and "Ajax for OPC" in the VirtueMart configuration - tab "checkout". If you have chosen shipping and payment and checked the TOS button, the "Check Out Now" button switches to "Confirm Purchase". One click and it is done.

Best practise will be to delete your old overrides and use the original VirtueMart files. Apply any custom changes to the new original files.



来源:https://stackoverflow.com/questions/32785533/virtuemart-3-0-10-disable-double-confirmation-on-checkout

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!