Jump to content
Mort-lemur

Paypal Express - Seen New Error - Help Please

Recommended Posts

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)?


:heart:, osCommerce

Share this post


Link to post
Share on other sites

@@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 by Mort-lemur

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.

Share this post


Link to post
Share on other sites

@@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.


This is a signature that appears on all my posts.  
IF YOU MAKE A POST REQUESTING HELP...please state the exact version
of osCommerce that you are using. THANKS

 
Get the latest Responsive osCommerce CE (community edition) here

Share this post


Link to post
Share on other sites

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


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.

Share this post


Link to post
Share on other sites

where is the subtotal calculated?


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.

Share this post


Link to post
Share on other sites

$currencies->format($cart->show_total())

 

and the shopping cart show_total() method calls calculate() internally.

Edited by Harald Ponce de Leon

:heart:, osCommerce

Share this post


Link to post
Share on other sites

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;
    }

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.

Share this post


Link to post
Share on other sites

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..


This is a signature that appears on all my posts.  
IF YOU MAKE A POST REQUESTING HELP...please state the exact version
of osCommerce that you are using. THANKS

 
Get the latest Responsive osCommerce CE (community edition) here

Share this post


Link to post
Share on other sites

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.


:heart:, osCommerce

Share this post


Link to post
Share on other sites

Hi, 

 

I have the same problem and I can't find solution.

 

maybe somebody found something and can schare the code / solution?

 

Regards

 

L.

Share this post


Link to post
Share on other sites

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://forums.oscommerce.com/topic/409406-oscommerce-bug-brand-new-234-install-without-customisationsaddons/


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.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×