Harald Ponce de Leon Posted July 25, 2014 Posted July 25, 2014 Oh I thought you would have upgraded from an earlier version than v2.3.3.4. Could the problem come from an add-on then? Quote , osCommerce
Harald Ponce de Leon Posted July 25, 2014 Posted July 25, 2014 Maybe this could be caused by attributes? This is one further test that can be performed. Until now I've tested with a base product price of 8.3200. What is your base product price and the product attribute price(s)? Quote , osCommerce
Mort-lemur Posted July 25, 2014 Author Posted July 25, 2014 (edited) @@Harald Ponce de Leon Not attributes - I set up a test product without any attributes with the net of 8.32 and the same problem - it seems to only occur whe the gross prices are to 3 decimal places where multiples of the product make the third decimal place greater than 5 hence the rounding up - if I set the gross price to 9.980 rather than 9.984 then everything is ok as it should be But the strange thing is when I go through the full checkout process (rather than PP Express from shopping_cart) the subtotal is shown as 19.97, the shipping as 2.98 BUT the order total is 22.94 as it should be. So this is leading me to think that its something in the way my sub totals are calculated Edited July 25, 2014 by Mort-lemur Quote Now running on a fully modded, Mobile Friendly 2.3.4 Store with the Excellent MTS installed - See my profile for the mods installed ..... So much thanks for all the help given along the way by forum members.
Harald Ponce de Leon Posted July 25, 2014 Posted July 25, 2014 I have no problems with 9.984 gross though :mellow: Having a gross price of 9.980 sets the net price to 8.3167. Quote , osCommerce
burt Posted July 25, 2014 Posted July 25, 2014 @@Mort-lemur I've just buzzed through your older thread where you added loads of addons, but didn't see any addon that could (at first glance) cause subtotal issues. There is mention of some order_total changes you made...but not much detail on it so cannot say if that is the culprit. Quote
Mort-lemur Posted July 25, 2014 Author Posted July 25, 2014 Thanks Gary I will go back and take a look at that see if I can remember what changes I made Harald I have sent you a link so you can see the behaviour Quote Now running on a fully modded, Mobile Friendly 2.3.4 Store with the Excellent MTS installed - See my profile for the mods installed ..... So much thanks for all the help given along the way by forum members.
Harald Ponce de Leon Posted July 25, 2014 Posted July 25, 2014 The subtotal shows as 19.97 instead of 19.96 even on her shopping cart page (without a payment module involved). Quote , osCommerce
Mort-lemur Posted July 25, 2014 Author Posted July 25, 2014 where is the subtotal calculated? Quote Now running on a fully modded, Mobile Friendly 2.3.4 Store with the Excellent MTS installed - See my profile for the mods installed ..... So much thanks for all the help given along the way by forum members.
Harald Ponce de Leon Posted July 25, 2014 Posted July 25, 2014 (edited) $currencies->format($cart->show_total()) and the shopping cart show_total() method calls calculate() internally. Edited July 25, 2014 by Harald Ponce de Leon Quote , osCommerce
Mort-lemur Posted July 25, 2014 Author Posted July 25, 2014 yep I have that line in my shopping_cart.php and it is not modified : <p align="right"><strong><?php echo SUB_TITLE_SUB_TOTAL; ?> <?php echo $currencies->format($cart->show_total()); ?></strong></p> and in includes/classes/shopping_cart.php I have: function show_total() { $this->calculate(); return $this->total; } Quote Now running on a fully modded, Mobile Friendly 2.3.4 Store with the Excellent MTS installed - See my profile for the mods installed ..... So much thanks for all the help given along the way by forum members.
burt Posted July 25, 2014 Posted July 25, 2014 Keep on tracking back through; $this->calculate(); == function calculate -in the same file (compare this to a stock 2.3.4) in that function you'll find other functions (eg: tep_round and so on). Find these functions and compare to a stock 234). Something somewhere is causing issues for you.. Quote
Harald Ponce de Leon Posted July 25, 2014 Posted July 25, 2014 I just had a look at her files and there was a customization performed in currencies->calculate_price() that rounded the price to 10 decimal points instead of the currency decimal points value. That would explain the rounding issue. Mort-lemur, kymation and burt 3 Quote , osCommerce
Laurenso Posted February 23, 2015 Posted February 23, 2015 Hi, I have the same problem and I can't find solution. maybe somebody found something and can schare the code / solution? Regards L. Quote
peterbuzzin Posted May 5, 2016 Posted May 5, 2016 Hi Harald, I don't think this is as clear cut as you think. I'm unfortunately suffering from this problem too on a production site and to test it wasn't any addons/customisations I've loaded a brand new 2.3.4 install without any addons/customisations. Please see here http://www.oscommerce.com/forums/topic/409406-oscommerce-bug-brand-new-234-install-without-customisationsaddons/ Quote If it still don't work, hit it again! Senior PHP Dev with 18+ years of commercial experience for hire, all requirements considered, see profile for more information. Is your version of osC up to date? You'll find the latest osC version (the community-supported responsive version) here.
astecme Posted May 6, 2016 Posted May 6, 2016 I occasionally get a discrepancy if: 1. the item price was input to the store in the including tax box. 2. the excluding tax price is then 3 odd digits, I think it is down to which way the rounding happens and the tax calculated by the shop and paypal. Quote
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.
Note: Your post will require moderator approval before it will be visible.