Kevin.Dallas 1 Posted October 3 thank you Mr.Raiwa I was wondering if i can apply the discount on the shopping_cart.php for example: SubTotal: $293.87 BOO Sale 15% Discount: -$51.86 Shipping: $0.00 Sales Tax: $27.92 Total: $321.79 Share this post Link to post Share on other sites
Kevin.Dallas 1 Posted October 3 (edited) in Order Total: when i enabled the Module Version 4.4.2 BS Display Discount false to true shopping cart gives a error 500 i am running php5.6 Edited October 3 by Kevin.Dallas Share this post Link to post Share on other sites
Kevin.Dallas 1 Posted October 3 here is a example: upon apply it doesn't seem to work Share this post Link to post Share on other sites
♥raiwa 1,085 Posted October 3 Revert your installation to the version which was working in your Edge store. Hope you have a backup. If you need to update to 4.4.2 follow the update instructions. If you didn’t had problems with your previous version, don’t update. About Me: http://forums.oscommerce.com/user/249059-raiwa/ 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 Pheonix 1.0.0.0) here. Share this post Link to post Share on other sites
puggybelle 27 Posted October 15 2.3.4.1 CE and PHP 7.0 Sorry if this has been addressed before... I'm using Discount Coupons 4.4.2 BS with Modular Shopping Cart and have been for quite some time with no problems. Normally, I just assign a dollar amount or percentage off anything in the website. What I'm experimenting with is assigning a coupon code for $5 off any purchase of $25 or more from CATEGORY A only. I've set up the coupon so it only applies only to CATEGORY A. If I add an item to my cart from CATEGORY A that costs $20, the coupon will not apply. Which is great, I haven't hit the $25 threshold yet. But, if I now add an item from ANOTHER category to the cart and hit $25 in the order sub-total, the coupon applies - which I feel is wrong. I haven't purchased $25 worth of items from CATEGORY A yet - and that is the only category that should be getting the discount. Is it just me or is this the way it's set up to work? I get the feeling this all revolves around order sub-total. - Andrea Share this post Link to post Share on other sites
♥raiwa 1,085 Posted October 16 Hello Andrea, Yes it is coded like you say, reference is order-subtotal, not amount of discountable products/categories.: Minimum Order Sub-Total: I understand your concern, but the module doesn't take care for all possible combinations. If it would like you wish, there would be other users needing just like it is now. I'll think about if this could be implemented with a switcheable option. rgds Rainer 1 puggybelle reacted to this About Me: http://forums.oscommerce.com/user/249059-raiwa/ 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 Pheonix 1.0.0.0) here. Share this post Link to post Share on other sites
puggybelle 27 Posted October 16 HI @raiwa - hope you're doing well. Yes, I guess I learned that the hard way yesterday. Had never done that before, trying to assign a coupon to be applied to certain categories only. That just does not work. In the end, it's all about the order sub-total. You do have to have something in your cart from that category to trigger the coupon, but...not necessarily the dollar amount you applied to it. My dilemma is that I'm also using another discount module called Better Together. It's set up to offer a Buy 1, Get 1 50% off in a few cats and I was trying to figure out a way to offer a discount coupon that would exclude those categories, since the buyers are already getting discounts to start with. Last thing I need is someone getting discounts off the first one and then throwing in a $5 coupon code at the end. Not a good way to make money! Oh, well. Lots to think about. Thank You for replying to my post - your help is always appreciated! - Andrea Share this post Link to post Share on other sites
Zzyzx1234 6 Posted October 31 Hi, Does this add on work with the WorldPay payment module? Thanks Share this post Link to post Share on other sites
♥raiwa 1,085 Posted October 31 It should, but I don't remember having it tried. Just try, installation is easy and fast. 1 Zzyzx1234 reacted to this About Me: http://forums.oscommerce.com/user/249059-raiwa/ 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 Pheonix 1.0.0.0) here. Share this post Link to post Share on other sites
Zzyzx1234 6 Posted October 31 Great, i'll give it a try. 1 raiwa reacted to this Share this post Link to post Share on other sites
milerwan 30 Posted November 7 (edited) On 8/17/2019 at 2:21 PM, raiwa said: Hello Omar @Omar_one, The fact that it aplies only 39€ is correct as it's supposed you will not "pay" to the customer the difference of 11 €. It is coded like this, max discount is always order subtotal. The tax is not shown as there is zero subtotal ergo tax is also zero. What is wrong is the negative total. It should be 8€, shipping is not included in discount. I checked the code and it seems there is a bug inherit since time. Please change the fillowing in the ot_discount.php module: Find line 208-212: if (!empty($order_tax)) { $order->info['tax'] = $order_tax; } else { $order->info['total'] -= $discount; } and change to: if (!empty($order_tax)) { $order->info['tax'] = $order_tax; } Please confirm and I'll upload this fix. Hi @raiwa Warning, I have tested your fix and I found a serious bug when the order is without VAT applied. In that case discount is not applied in total. Another way to solve the minor bug related is to apply a "Minimum Order Sub-Total" amount more than the amount of the discount and not equal. NB: Or not apply "Minimum Order Sub-Total". Edited November 7 by milerwan Osc v2.3.4 BS "custom" PHP 7.3 compatible (710 modified files => o_O') Share this post Link to post Share on other sites
♥raiwa 1,085 Posted November 7 @milerwan, Please see this post and use the latest version 5.1.2 where this is fixed. About Me: http://forums.oscommerce.com/user/249059-raiwa/ 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 Pheonix 1.0.0.0) here. Share this post Link to post Share on other sites
milerwan 30 Posted November 7 36 minutes ago, raiwa said: @milerwan, Please see this post and use the latest version 5.1.2 where this is fixed. So what was the fix you applied to solve the issue of @Omar_one ? By the way, I have taken a look on the "includes/modules/order_total/ot_shipping.php" file and find this sentence : $subtotal_correction += $order->products[$i]['final_price']; //use for tax calculation only products which have taxes But it seems the "$subtotal_correction" variable is alone on the script so it doesn't affect anything normally...A vestige of a past version that must be removed? Osc v2.3.4 BS "custom" PHP 7.3 compatible (710 modified files => o_O') Share this post Link to post Share on other sites
♥raiwa 1,085 Posted November 7 3 hours ago, milerwan said: So what was the fix you applied to solve the issue of @Omar_one ? Its in the updated 5.1.2. package. Please download and compare file. 3 hours ago, milerwan said: By the way, I have taken a look on the "includes/modules/order_total/ot_shipping.php" file and find this sentence : $subtotal_correction += $order->products[$i]['final_price']; //use for tax calculation only products which have taxes But it seems the "$subtotal_correction" variable is alone on the script so it doesn't affect anything normally...A vestige of a past version that must be removed? Possible. I'll have a look and remove in the next update. Thank you. About Me: http://forums.oscommerce.com/user/249059-raiwa/ 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 Pheonix 1.0.0.0) here. Share this post Link to post Share on other sites
milerwan 30 Posted November 7 (edited) @raiwa I find a fix... To fix the @Omar_one issue when "$discount" amount is superior to "$order_subtotal", find this sentence : if ( tep_not_null($order_tax)) { $order->info['tax'] = $order_tax; } else { $order->info['total'] -= $discount; } or this one : if (!empty($order_tax)) { $order->info['tax'] = $order_tax; } else { $order->info['total'] -= $discount; } And add below this : // fix negative amount BOF if ($order->info['total'] < 0) { $order->info['total'] += $discount; } // fix negative amount EOF More simple method and works with or without tax added in total. Edited November 7 by milerwan Osc v2.3.4 BS "custom" PHP 7.3 compatible (710 modified files => o_O') Share this post Link to post Share on other sites
♥raiwa 1,085 Posted November 7 I remember there were more reasons for this modification and I tested the fix included in 5.1.2 with all variants and settings. I will not begin again and risk to break the code. Use whatever you wish in your store. Thank you. About Me: http://forums.oscommerce.com/user/249059-raiwa/ 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 Pheonix 1.0.0.0) here. Share this post Link to post Share on other sites
milerwan 30 Posted November 7 48 minutes ago, raiwa said: I remember there were more reasons for this modification and I tested the fix included in 5.1.2 with all variants and settings. I will not begin again and risk to break the code. Use whatever you wish in your store. Thank you. Sorry it's because I haven't located the fix... Now I see it... You have modify this : $order_tax = 0; By this : $order_tax = $order->info['tax']; So yes, it is better than my fix. Osc v2.3.4 BS "custom" PHP 7.3 compatible (710 modified files => o_O') Share this post Link to post Share on other sites
ariyaya 0 Posted November 14 hello guys Does this add on work with the WorldPay payment module? Share this post Link to post Share on other sites
♥raiwa 1,085 Posted November 14 About Me: http://forums.oscommerce.com/user/249059-raiwa/ 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 Pheonix 1.0.0.0) here. Share this post Link to post Share on other sites
♥BrockleyJohn 238 Posted November 17 On 11/14/2019 at 9:15 AM, ariyaya said: hello guys Does this add on work with the WorldPay payment module? Yes. Be sure to use my addon instead of the worldpay module delivered with Phoenix because that still has an unfixed bug in it and you'll get blank order emails. The addon also brings people who cancel back into the checkout process, and records more info on the order history. addon: https://apps.oscommerce.com/brAIY&worldpay-hosted-payments-extended 1 altoid reacted to this For a new install or if your store isn't mobile-friendly, get the community-supported responsive osCommerce (Phoenix). here: on the official osc download page Working on generalising bespoke solutions for Quickbooks integration, Easify integration and pay4later (DEKO) integration at 2.3.x Share this post Link to post Share on other sites
Kevin.Dallas 1 Posted November 22 (edited) i am having issues with the code on exclude [22-Nov-2019 09:41:24 America/Los_Angeles] PHP Fatal error: Call to undefined method currencies::format_raw() in /public_html/includes/modules/order_total/ot_discount.php on line 133 line 133 if (!empty($order->products[$i]['tax'])) { if (DISPLAY_PRICE_WITH_TAX != 'true') { $tax_correction = $currencies->format_raw(($products_discount * ($order->products[$i]['tax'] / 100))); $order->info['total'] -= $tax_correction; } else { $tax_correction = $currencies->format_raw($products_discount - $products_discount / (1.0 + $order->products[$i]['tax'] / 100)); } } using edge php 5.6 Discount Codes 4.4.2 BS Edited November 22 by Kevin.Dallas Share this post Link to post Share on other sites
♥raiwa 1,085 Posted November 22 Hello Kevin @Kevin.Dallas On 10/3/2019 at 10:28 PM, raiwa said: If you didn’t had problems with your previous version, don’t update. Your EDGE version is missing that function which has been introduced in a later EDGE version. Please download the latest Phoenix and just add the functions "display_raw" and "format_raw" in: "includes/classes/currencies.php" to your file. About Me: http://forums.oscommerce.com/user/249059-raiwa/ 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 Pheonix 1.0.0.0) here. Share this post Link to post Share on other sites
Kevin.Dallas 1 Posted November 22 i am sorry, i should have read it, method currencies::format_raw() another issue that i am having is, i have one product that is excluded and one is not both of them in the checkout it don't give a discount for one of the product is not excluded Share this post Link to post Share on other sites
Kevin.Dallas 1 Posted November 22 i am also having issues not giving a correct discount SubTotal: $79.90 Discount 10% : -$7.99 Shipping: $0.00 Sales Tax: $6.83 Total: $78.74 -------------------------------------- 7.59 <-- 10% off Share this post Link to post Share on other sites
ArtcoInc 309 Posted November 23 @Kevin.Dallas 7 minutes ago, Kevin.Dallas said: i am also having issues not giving a correct discount SubTotal: $79.90 Discount 10% : -$7.99 Shipping: $0.00 Sales Tax: $6.83 Total: $78.74 -------------------------------------- 7.59 <-- 10% off The math looks right to me. 10% of $79.90 = $7.99 M Get the latest Responsive osCommerce CE (community edition) here . Share this post Link to post Share on other sites