evbeej Posted June 14, 2016 Share Posted June 14, 2016 Hello Everyone, I have been through a lot of forums trying to find a solution to this, and no one else seems to have the same issue I am. I have order total Discount Code v2.6 installed. Everything is working fine, except when you enter the code for a set price discount, if the customer is purchasing items that total less then the voucher it makes the total into a negative amount. ie. items equal : 62.20 discount: 100.00 vat amount: 10.37 total: -37.80 I have seen on some posts a mention of 'Allow negative order total?' but my version doesnt provide this option.. is this something i can add to my module? If so, any clues would be a massive help! Thanks guys! Quote Link to comment Share on other sites More sharing options...
♥Tsimi Posted June 14, 2016 Share Posted June 14, 2016 Hi Erika It's gonna be difficult to help without looking at the actual code of that module. But let's try something... inside your ot_discount.php file you should have the following code around line 96 $order->info['total'] -= $discount; replace that with the following code provided by marcochiana if ($discount > $order->info['subtotal']) { $discount = $order->info['subtotal']; $order->info['total'] -= $discount; } else { $order->info['total'] -= $discount; } Not sure if that will work for you but give it a try and report back. Just make sure to back up that ot_discount.php file just in case. Quote Link to comment Share on other sites More sharing options...
evbeej Posted June 14, 2016 Author Share Posted June 14, 2016 That fixed it! Clearly i didnt look hard enough! Could you link me to where i could find this code provided by marcochiana? Your a star - thank you! Quote Link to comment Share on other sites More sharing options...
♥Tsimi Posted June 14, 2016 Share Posted June 14, 2016 You can find his post in under this link here http://www.oscommerce.com/forums/topic/407936-discount-code-bs/?p=1732755 Glad it worked for you. :thumbsup: Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.