Calculating

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Test

    Calculating

    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

    Example
    ---------------------
    function process_button( ) {
    global $order;

    $process_button _string = web_draw_hidden _field('x_login ', blah blah
    ....) .


    HERE web_draw_hidden _field('x_amoun t',
    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_amoun t', number_format($ order->info['total/5.85'],
    2)) .
    but did not work

    Thank you


  • BKDotCom

    #2
    Re: Calculating


    Test wrote:[color=blue]
    > web_draw_hidden _field('x_amoun t',[/color]
    number_format($ order->info['total/5.85'],2))

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

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

    Comment

    • Test

      #3
      Re: Calculating

      [color=blue]
      > Test wrote:[color=green]
      > > web_draw_hidden _field('x_amoun t',[/color]
      > number_format($ order->info['total/5.85'],2))
      >
      > does $order->info['total/5.85'] exist?
      >
      > what you want is number_format($ order->info['total']/5.85,2)[/color]

      Ahhh... thank you


      Comment

      Working...