bnguru Posted September 18, 2019 Posted September 18, 2019 First the stats: OsC Phoenix 1.0.2.4, Discouont Code addon 5.1.1 As you can (maybe see) in the image below, the subtotal is correct, the Discount is correct, but the total excludes the discount. Which file is doing this math and saving the total? Steve in Ellenton, FL
♥raiwa Posted September 18, 2019 Posted September 18, 2019 Hello Steve @bnguru, Please post addons support questions in the appropriate support topic: Discount Code BS the file where the calc is done is: includes/modules/order_total/ot_discount.php Which tax setting are you using in your store? Which payment module did you use in this example? Do you have any aditional modification/addons added to the checkout pages/process/involved files? I'll then check on my test store. Best regards Rainer About Me: http://www.oscommerce.com/forums/user/249059-raiwa/ Need help? How To Get The Help You Need Is your version of osC up to date? You'll find the latest osC community version CE Phoenix here. Public Phoenix Change Log Cheat Set on Google Sheets
bnguru Posted September 18, 2019 Author Posted September 18, 2019 6 hours ago, raiwa said: Which tax setting are you using in your store? - in this test, no tax Which payment module did you use in this example? - check/money order Do you have any aditional modification/addons added to the checkout pages/process/involved files? - no Steve in Ellenton, FL
♥raiwa Posted September 19, 2019 Posted September 19, 2019 20 hours ago, bnguru said: Which tax setting are you using in your store? - in this test, no tax I meant by tax setting: My Store => show prices with tax true or false Anyway I could recreate the error which was introduced with 5.1.1. fix for another wrong order total calc if tax is used (if I well remember). Please apply the following fix: in: includes/modules/order_total/ot_discount.php find around line 208-210: if (!empty($order_tax)) { $order->info['tax'] = $order_tax; } and replace with: if ( tep_not_null($order->info['tax']) ) { $order->info['tax'] = $order_tax; } else { $order->info['total'] -= $discount; } Please let me know and I'll upload the update with this fix. About Me: http://www.oscommerce.com/forums/user/249059-raiwa/ Need help? How To Get The Help You Need Is your version of osC up to date? You'll find the latest osC community version CE Phoenix here. Public Phoenix Change Log Cheat Set on Google Sheets
bnguru Posted September 19, 2019 Author Posted September 19, 2019 Rainer, this seems to have fixed it. Both the previous order worked and I tried it using PayPal standard and it worked as well. I have not tried it charging tax yet. Steve in Ellenton, FL
♥raiwa Posted September 20, 2019 Posted September 20, 2019 Hello Steve, The good one to address also the previous issue, if discount is higher than order subtotal, is: line 164: $order_tax = $order->info['tax']; and lines 209-213: if ( tep_not_null($order_tax)) { $order->info['tax'] = $order_tax; } else { $order->info['total'] -= $discount; } About Me: http://www.oscommerce.com/forums/user/249059-raiwa/ Need help? How To Get The Help You Need Is your version of osC up to date? You'll find the latest osC community version CE Phoenix here. Public Phoenix Change Log Cheat Set on Google Sheets
♥raiwa Posted September 20, 2019 Posted September 20, 2019 Update uploaded with the above fix: Discount Code 5.1.2. Phoenix Please apply these fixes also to previous versions. Older versions, FROZEN, EDGE and Gold BS3, please use Discount_Codes_4.4.3_BS Version 5.1.2.: Fix for wrong order total showing when no tax is applied. Thanks to @bnguru for the report and testing Added support for stripe sca 3.0 payment module. Thanks to @peterespana for testing Fixed several minor errors in instructions, ot module and admin page. Thanks to @Demitry About Me: http://www.oscommerce.com/forums/user/249059-raiwa/ Need help? How To Get The Help You Need Is your version of osC up to date? You'll find the latest osC community version CE Phoenix here. Public Phoenix Change Log Cheat Set on Google Sheets
Recommended Posts
Archived
This topic is now archived and is closed to further replies.