Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Discount % rounded off in 5 cent


Guest

Recommended Posts

Ive given a lot of products 18% discount. For some reason it doesnt round the new discount price in -5 or +5 cent. In Switzerland we dont use cents or pennys. We start at increments of 5 cents. Is there any way to change the way it round off the % in the MS2 version?

 

Original Price: CHF9.90

New Price: CHF8.12 should show CHF8.10

Percentage: 18%

 

 

Thanks

Steven

Link to comment
Share on other sites

  • 3 months later...
Ive given a lot of products 18% discount. For some reason it doesnt round the new discount price in -5 or +5 cent. In Switzerland we dont use cents or pennys. We start at increments of 5 cents. Is there any way to change the way it round off the % in the MS2 version?

 

Original Price: CHF9.90

New Price: CHF8.12 should show CHF8.10

Percentage: 18%

Thanks

Steven

 

 

Hi

 

Here's an example how I did round the mod "Price Sensitive Discount"

 

 

// Calculate tax group deductions
     reset($order->info['tax_groups']);
     while (list($key, $value) = each($order->info['tax_groups'])) {
       $god_amount = round($value*10)/10*$od_pc/100;
[B]$god_amount_2 = round($god_amount *1.2+0.05,1)-0.1;[/B]

 

Hope this helps :)

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...