Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Price displays only one decimal place


Guest

Recommended Posts

Posted

Hi Guys,

 

My problem is that my price is displayed only with one digit after the decimal place.

 

e.g.

 

R 50.0 instead of R 50.00

 

 

But the problem is only displayed on the 'inner.php' page, when I display the products in a category. On all the other pages my price is displayed correctly. It is only with that specific page I am having problems.

 

Here is my URL: http://boltandtoolafrica.co.za/pages/store/inner.php

 

Please Help!!

Posted

looks like your featured products have the 2 decimal places for prices. Check in your osc admin first if the currency you're using has 2 decimal places. osc admin->localization->currencies.

Posted
looks like your featured products have the 2 decimal places for prices. Check in your osc admin first if the currency you're using has 2 decimal places. osc admin->localization->currencies.

 

I already checked those settings and it is set to '2' decimal places. Even if i set it to '3'. The problem still occurs.

 

The problem only persists on the inner.php page.

Posted

can you post your catalog\includes\modules\product_listing.php (or whatever module is used to list the products in that page because its a template I don't know if they use the default osc files.)

Posted

I can hardly see what's going on without linefeeds in the code. But check your product_listing.php file here is the problem

 

number_format($listing['products_price'],1)

whoever did the code does not follow the currency settings and pretty much hard-codes the value. You should have:

 

$currencies->display_price($listing['products_price'], tep_get_tax_rate($listing['products_tax_class_id']))

Archived

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

×
×
  • Create New...