Post by Cruzer » Thu Oct 11, 2012 8:41 pm

Hi,

I have problem with php round.

I must have rounded price only in total /invoice, etc/, when I use round at

Code: Select all

 <?php echo $total['text']; ?>
>>

Code: Select all

 <?php echo round($total['text']); ?>
I get only 1 number when price is more than thousand.

I must have rounded total price, tax price, other is unimportant.

Thank you so much.

Newbie

Posts

Joined
Tue Feb 21, 2012 3:16 am

Post by myshadowself » Thu Oct 18, 2012 3:49 am

not 100% sure I understand what your problem is, but round() accepts up to 3 parameters, you're using just one - you'll likely find the answer here: http://php.net/manual/en/function.round.php

Ronald Laughton is the worst referee in Rugby League


New member

Posts

Joined
Tue Jun 07, 2011 8:59 pm

Post by OpenCart Addons » Wed Oct 24, 2012 4:19 am

Try rounding the $total['value'] instead.

Regards,
Joel.

Canada's Leading Expert In OpenCart Development & Certified OpenCart Development Partner Image


User avatar
Active Member

Posts

Joined
Thu Nov 24, 2011 10:51 am
Location - Canada

Post by rajithg » Wed Oct 24, 2012 11:12 am

I'am integrating a payment gateway. The total has to be passed to that payment gateway redirect needs to have 12 digits(10+2, Two for cents).

e.g if total is 1456 , the value that I have to pass should have 000000145600

New member

Posts

Joined
Tue Mar 27, 2012 11:28 am

Post by pristinenote » Tue Jan 15, 2013 9:36 pm

rajithg wrote:I'am integrating a payment gateway. The total has to be passed to that payment gateway redirect needs to have 12 digits(10+2, Two for cents).

e.g if total is 1456 , the value that I have to pass should have 000000145600
Hi. I am also facing similar problem. Have you been able to work on the same?

My website : http://www.proaudiohome.com
http://www.pristinenote.com


New member

Posts

Joined
Fri Jul 13, 2012 7:33 pm
Location - Mumbai, India
Who is online

Users browsing this forum: No registered users and 3 guests