Latest OPC crashes with latest AWO Coupon

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

Latest OPC crashes with latest AWO Coupon

Postby avkeele » Sat Jul 15, 2017 12:13 pm

Hello,

After latest updates, using an AWO coupon crashes OPC into a Server Error page at https://www.certifiedinfosec.com/.

Current Versions installed:
Joomla 3.7.3
VM: 3.2.2
OPC: 2.0.340.070717
AWO Coupon: 2.5.8.1

Please advise.

Regards,
Allen
avkeele
 
Posts: 7
Joined: Tue Oct 04, 2016 1:40 pm

Re: Latest OPC crashes with latest AWO Coupon

Postby admin » Mon Jul 17, 2017 11:50 am

hello allen, we tested the case on our demos and we found that awo coupons is doing infinite recursion.

to fix this when using OPC i suggest to comment line 118 in :
\administrator\components\com_awocoupon\helpers\estore\virtuemart\couponhandler.php

so it's fully commented like this:
Code: Select all
//stAn, commented next line since OPC always calls prepareCartData before using coupons:
//if (version_compare($instance->vmversion, '2.9.8', '>='))$cart->prepareCartData();


i already did this on your site. it seems that calling prepareCartData in core VM now calls all coupon functions as well and thus leading to infinite recursion.

since OPC calls prepareCartData before any calculation, this function is not needed when used with OPC - i did not test other cases....

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