dinopacha 11 Posted September 13, 2015 with the discount code you can enter the minus. it is possible that the discount code can not pass in the minus and blocked at 0 dollars. otherwise you give your customers money. Share this post Link to post Share on other sites
♥Tsimi 525 Posted September 13, 2015 @@dinopacha Which Discount Addon are you talking about? Discount Code BS or Discount Coupon Codes 3.34? Share this post Link to post Share on other sites
dinopacha 11 Posted September 13, 2015 I mean the addon discount code BS the one you made Tsimi. I have installed it and it work perfect, but I read above that some had an issue with free shipping. now my question is, which one has the issue. also I hope you can help me with the question above about the minus. :rolleyes: Share this post Link to post Share on other sites
♥Tsimi 525 Posted September 13, 2015 (edited) @@dinopacha Yeah, there is an issue with the Free Shipping module and that I cannot solve since the Free Shipping is calculated differently and somehow I am not able to add it to the Discount Code check. For example you have Free Shipping setup to $42. Then you add the DVD Speed 2: Cruise Control (DVD price: $42) to the cart and checkout. It shows "Free Shipping for orders over $42", so far it is working as it should but then in the Payment checkout page you insert a Discount Code for -$10 then the new total is $32 which is not free shipping anymore but it still shows Shipping: $0.00 in the checkout confirmation page. So to add the free shipping check into the discount code check is the issue which I couldn't solve so I just simply removed free shipping from my shop. The other problem regarding the minus total when using a discount code larger the the total. You can either use marcochianas solution which will calculate only a discount for the product or you could replace the code on Line 110 with this if ($discount > $order->info['subtotal']) { $discount = $order->info['total']; $order->info['total'] -= $discount; } else { $order->info['total'] -= $discount; } which will give you a total of $0.00 which might or most likely will cause problems with some payment modules like PayPal. To be honest I never had a customer using a code that is larger then the total. You could write some notice that customers should not use the code if total is smaller then discount. The whole Discount thing by far not perfect and I would recommend to use only discounts in % like -10% or -%20 and so on because you can't go into a minus with % discounts unless you make one that says -100% or -150% something like that. Edited September 13, 2015 by Tsimi Share this post Link to post Share on other sites
dinopacha 11 Posted September 13, 2015 @@Tsimi thanks for the explanation it is now completely clear to me. certainly for sending free, but it'll be fine. concerning the discount I thought myself already, to do with percentages. because with amounts, it can go into the minus. for the rest, I think it works perfectly, exactly what I need. super :) 1 Tsimi reacted to this Share this post Link to post Share on other sites
hyepo 1 Posted December 6, 2015 Hi all... just added Discount BS and got it set up and created a discount code.. but when does it show the discount to the customer... took the order all the way to PayPal and nowhere does it show discount... still regular pricing right up to the point of "pay now".. thanks Share this post Link to post Share on other sites
♥Dan Cole 546 Posted December 6, 2015 @@hyepo The customer needs to enter the coupon code at check out. Dan Need help? See this thread and provide the information requested. Is your version of osC up to date? You'll find the latest osC community version (CE Phoenix) here. Share this post Link to post Share on other sites
hyepo 1 Posted December 6, 2015 (edited) LMAO..... age is showing..... I put the 10% discount in as the name... left the actual % blank.... (w00t) Now it does factor in the discount during checkout (total is correct) however, it does not show the discount on the 'cart' page or even the amount of the discount anywhere including right up to paying with paypal.. any ideas wheat I've gotten wrong? Edited December 6, 2015 by hyepo Share this post Link to post Share on other sites
hyepo 1 Posted December 6, 2015 So I installed Ship In Cart (aka Shipping Estimator) v2.4.6 and now both the discount and the shipping shows on the shopping cart... PERFECT! :) Share this post Link to post Share on other sites
hyepo 1 Posted December 6, 2015 (edited) I have noticed one thing however.. when I set up the discount code BS on my live site, it calculates everything perfectly... however I did noticed a difference when getting over to PayPal (express). Before adding the module, PayPal had a drop down that showed price, tax & total. After adding module, it only shows total price (although correct, it no longer shows the drop down with the order breakdown on it...)... any ideas. Having the customer being able to review all charges on the PayPal end is a good thing... as it helps to instill confidence especially with a new site and new customers.... two images showing with coupon and no PayPal drop down and the second with no coupon code and with PayPal drop down Edited December 6, 2015 by hyepo Share this post Link to post Share on other sites
♥Tsimi 525 Posted April 1, 2016 Found two typos inside the Install manual. Typo 1.) wrong path It says catalog/admin/includes/modules/boxes/catalog_dc_content.php but it should be catalog/admin/includes/boxes/catalog_dc_content.php Typo 2.) Step 7.1 it says find tep_session_unregister('comments'); but it should say if ( tep_session_is_registered('comments') ) { tep_session_unregister('comments'); } I will fix those 2 typos and upload this Discount Codes BS to the addons section. Thanks to @@phatman for pointing out typo 1. Danke! :thumbsup: 1 phatman reacted to this Share this post Link to post Share on other sites
♥Tsimi 525 Posted April 1, 2016 Discount Codes 3.2 BS http://addons.oscommerce.com/info/9460 Discount Codes 3.2 BS addon for osC 2.3.4 Bootstrap version.Based on the Discount Code for osCommerce 2.3.1 addon by high-quality-php-coding.com, updated for osC 2.3.4 BS by TsimiThis addon is compatible with @@raiwa 's Ship In Cart addonhttp://addons.oscommerce.com/info/9066 Share this post Link to post Share on other sites
♥Tsimi 525 Posted April 3, 2016 Another typo; In my post #29 that code shown there is wrong it should say. if ($discount > $order->info['subtotal']) { $discount = $order->info['subtotal']; $order->info['total'] -= $discount; } else { $order->info['total'] -= $discount; } There is also a tax issue that raiwa and I are working on. I will upload a new package with this above code fix and hopefully a fix for the tax issue. Stay tuned... Share this post Link to post Share on other sites
♥raiwa 1,420 Posted April 5, 2016 @@Tsimi, not sure if you saw the ot_discount.php module I uploaded to the ship in cart thread. Here again in the correct forum: I checked in all possible combinations and it sems to be ok 1 Tsimi reacted to this About Me: http://forums.oscommerce.com/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 Share this post Link to post Share on other sites
♥Tsimi 525 Posted April 5, 2016 (edited) Hi @@raiwa Yeah I saw it thank you very much. I downloaded and checked it and it calculates the right total but the taxes are too low now. In my sample it should say Tax: $4.92 but now it says something like $1.89. I didn't had time to look at the code details yet but I will do that asap. I am at the office right now and have no access to my test shop (home PC). My test shop setup is Tax: 19% (Taxable Goods) Product price $18.90 Netto Flat rate: $8.90 (Taxable goods) Show prices with tax set to false That should give me a total of $30.83 and taxes of $4.92 Sub-total: $18.90 Discount (10%) -1.89 Flat rate: $8.90 Tax: $4.92 ------------------------ Total: $30.83 That is what it should show then we are good. Edited April 5, 2016 by Tsimi Share this post Link to post Share on other sites
♥raiwa 1,420 Posted April 5, 2016 @@Tsimi, Yes missed there something for the products discount. Please give that version a try: 1 Tsimi reacted to this About Me: http://forums.oscommerce.com/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 Share this post Link to post Share on other sites
♥Tsimi 525 Posted April 5, 2016 @@raiwa BINGO! Very nice raiwa! That works. Correct tax and total now. Thank you very much for this. I will now upload your fixed file to the addons area. 2 phatman and raiwa reacted to this Share this post Link to post Share on other sites
♥Tsimi 525 Posted April 5, 2016 @@raiwa There is one last issue left but that is not a priority right now. When you select discount by order totals and give a discount code that has a larger value then the subtotal it adjusts the discount to match the subtotal but the total goes into minus. Example; Subtotal: $18.90 Discount ($40) -$18.90 Flat rate: $8.90 Tax: $1.69 ------------------------------ Total: -$14.50 Like I said not a priority at the moment since this is probably rather a rare case that someone uses a discount that is larger then the subtotal. The previous issue is fixed though and that what counts. Thanks again. Share this post Link to post Share on other sites
♥raiwa 1,420 Posted April 5, 2016 (edited) @@Tsimi, I believe this is also fixed now. I moved the check " if discount is higher than subtotal" before the tax correction. Now if the discount is higher, only shipping cost and it's tax will apply to order total. I believe this is correct shipping is always excluded from the discount, because discount is defined to apply on order subtotal, right? Only case where a negative total will show is if someone defines a fixed product discount higher than the product price, but this wouldn't make sense. :- Here the new ot_discount: Edited April 5, 2016 by raiwa 1 Tsimi reacted to this About Me: http://forums.oscommerce.com/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 Share this post Link to post Share on other sites
♥Tsimi 525 Posted April 5, 2016 Perfect! Now all works as it should. Fantastic Job there Rainer, as always. Very appreciate it. :pray: 1 phatman reacted to this Share this post Link to post Share on other sites
♥Tsimi 525 Posted April 6, 2016 (edited) New Version 3.3 BS uploaded. http://addons.oscommerce.com/info/9460 A big THANK YOU to @@raiwa for the tax calculation and larger discount than subtotal fix. Also added version field into the module so that you can see quickly which version of the module is installed. If you have an older version installed read the update instructions or download raiwas file from this thread and apply the code changes by using a comparison tool. Edited April 6, 2016 by Tsimi 2 phatman and raiwa reacted to this Share this post Link to post Share on other sites
phatman 4 Posted April 6, 2016 (edited) sorry..... but does not work correctly with two or more items :- Sub-Total: 37,80 € (2 x 18,90)Discount (10pro): - 3,78 € (Discount 10%)Flat: 8,90 €+ 19 % MwSt.: 8,15 €Total: 53,32 € Edited April 6, 2016 by phatman Share this post Link to post Share on other sites
♥raiwa 1,420 Posted April 6, 2016 (edited) @@phatman, your setting is show prices with tax = false and apply tax to shipping and order subtotal discount = 10%? I'll check. Edited April 6, 2016 by raiwa About Me: http://forums.oscommerce.com/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 Share this post Link to post Share on other sites
♥Tsimi 525 Posted April 6, 2016 @@raiwa @@phatman With my latest uploaded version it works fine even with 2 products. Share this post Link to post Share on other sites
♥raiwa 1,420 Posted April 6, 2016 (edited) @@phatman, I checked again and with the following settings it shows correct for me: show prices with tax = false tax applies to shipping module I checked with order subtotal discount 10% and product discount each 10% and each fix amount of 2 $. I also checked again with show prices with tax option set to true. Results are all correct for me. @@phatman Please post your exact store settings and all details of your example. rgds Rainer Edited April 6, 2016 by raiwa About Me: http://forums.oscommerce.com/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 Share this post Link to post Share on other sites