Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View

Hi all PHP gurus,

how can I solve this:
I have filled variable total (total oredr)
This variable I must recalculate before sending, ie (look at HERE word)

total = 100

    function process_button() {
      global $order;

      $process_button_string = web_draw_hidden_field('x_login', blah blah
....) .

HERE                             web_draw_hidden_field('x_amount',
number_format($order->info['total'], 2)) .

Here must total be not 100, but divided with 5.85

How can I do that?

I have tryed
web_draw_hidden_field('x_amount', number_format($order->info['total/5.85'],
2)) .
but did not work

Thank you

Re: Calculating

Test wrote:
Quoted text here. Click to load it

does  $order->info['total/5.85']   exist?

what you want is  number_format($order->info['total']/5.85,2)

Re: Calculating

Quoted text here. Click to load it

Ahhh... thank you

Site Timeline