Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

final_price problem


Bassie

Recommended Posts

Posted

I'm really getting desperate now. :(

 

I have build a fully functional shop and during testing I noticed the following:

 

Under Admin, Customers, Orders you can view the orders and even print invoice.

 

The problem is that on the website itself and also under Admin, Catalog, Products the prices are displayed properly (excluding and including tax).

However, on the page to view the order/invoice the Price columns (both ex and inc) show the wrong prices.

The sub total, shipping and total price are shown correct though.

Because I'm also using the plugin to Turbocash I noticed the same there. TC is picking up the final price as well.

 

Having done some investigation I can clearly see where the cause is.

In table products 'products_price' the prices are shown ok (ex tax).

 

But in table orders_products the cause is visable:

products_price : correct (also ex tax just like in products table)

final_price : INCORRECT (rounded amounts)

 

Just to give you a brief example:

tax rate: 19%, price ex : 6.7227 (therefore inc it would be 8)

table products 'products_price' = 6.7227

table orders_products 'products_price' = 6.7227

table orders_products 'final_price' = 6.0000

table orders_products 'products_tax' = 19.0000 (=tax rate)

=> result order/invoice display under admin show price inc : 7.14 (6.000*1.19)

Could someone explain to me how/where and why the final price is used please ?

Because it seems that it goes wrong there.

I don't understand this because where you create the products it shows the correct ex and inc prices on screen and in table, it's just the order*tables that work with final price that is causing the issue.

 

Note: I'm not using any discount (don't even know where to maintain this), just shipping and tax rate.

 

Please HELP ! Many thanks in advanced !

Posted

I'm having a similar problem that just start happening with one client. Confirmation email is sent with all prices and totals correct, but when checking on Admin, on Details individual prices show rounded down, so there are no cents, but the total is correct including the missing cents. On Order Editor all prices with cents are rounded down and shipping is also rounded down. If I fix the prices using the latest Order Editor 2.2.1 the total, the final calculation doesn't count the fixed values.

 

I look in the table and like above the problem is in final_price. Product_price shows the right value for the product, it's final_price that has been changed? Why? How?

 

Hope someone can help.

Patty

Posted

Hi all,

 

I'm having exactly the same issue with the final price.

 

In shop/catalog/checkout_confirmation.php I can read during the purchase of [Test Item] sold at 68.90:

 

Products

1 x [Test Item] 68.90

Sub-Total: 68.90

Total: 68.90

 

While, just after the purchase, in shop/catalog/account_history_info.php (and in admin/invoice too) I can read:

 

Products

1 x [Test Item] 68.00

Sub-Total: 68.90

Total: 68.90

 

Why? If someone knows how to solve this issue, please share the solution with us.

 

Sincerely,

 

Amar Guerfi

  • 4 months later...
Posted
But in table orders_products the cause is visable:

products_price : correct (also ex tax just like in products table)

final_price : INCORRECT (rounded amounts)

The most possible reason for this error is the wrong usage of @setlocale in english.php

 

Check for @setlocale(LC_TIME, 'en_US.ISO_8859-1'); in english.php.

"LC_ALL" makes problems.

I have got this error on a german shop, as LC_ALL sets LC_NUMERIC and numbers are formatet with ',' as decimaldelimiter. mysql eventually gets "," instead of "."

Posted
The most possible reason for this error is the wrong usage of @setlocale in english.php

 

Check for @setlocale(LC_TIME, 'en_US.ISO_8859-1'); in english.php.

"LC_ALL" makes problems.

I have got this error on a german shop, as LC_ALL sets LC_NUMERIC and numbers are formatet with ',' as decimaldelimiter. mysql eventually gets "," instead of "."

Great!! it worked perfectly!!! :lol: :thumbsup:

 

 

BUT... :(

 

The total % taxes it calculates is wrong... Totals quantity is ok, but the % number of taxes it shows is wrng, and no idea from where it gets it...

 

For instance, here, % taxes should be 12.93 x 16% = 2.068 :'(

tempzs7.jpg

Posted
The total % taxes it calculates is wrong... Totals quantity is ok, but the % number of taxes it shows is wrng, and no idea from where it gets it...

 

For instance, here, % taxes should be 12.93 x 16% = 2.068

Yes, and what about the VAT in the EUR 8.31 for shipping (EUR 1.146 + 2.068 = 3.214)?
Posted
Great!! it worked perfectly!!! :lol: :thumbsup:

BUT... :(

 

The total % taxes it calculates is wrong... Totals quantity is ok, but the % number of taxes it shows is wrng, and no idea from where it gets it...

 

For instance, here, % taxes should be 12.93 x 16% = 2.068 :'(

tempzs7.jpg

SORRY!!!

 

didn't have time to edit. It works PERFECTLY!!! it was my foult. Thanks!!! :thumbsup:

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...