[ic] Problems with assign handling at checkout - Fixed adds a Paypal fee at checkout :-))

AS news1 at dsl.pipex.com
Tue Oct 7 00:29:09 EDT 2003

> Hi All,
> I am trying to add a handling charge at checkout for Paypal, to get
> things going I am trying to add a flat cost of 5% the total. It seems
> whatever I do I can never get any handling charge to appear at the
> checkout at all.
> I currently have these lines in checkout:-
> <INPUT TYPE=hidden NAME=mv_handling VALUE=add>
> [assign handling="[calc][total-cost] * 0.05[/calc]"]
> It doesn't do anything, I've also tried using [subtotal] instead of
> [total-cost] but nothing displays or adds a handling charge.
> Please help....


[calc][total-cost noformat=1] * 0.05[/calc]

For calculation you need a number, not a string with the currency.


Thanks the [calc] works a treat, I have now finally got this working, I
will paste the code below in case it is of use for anyone. It uses a
pulldown to select payment (mv_payment), if Paypal is selected a fee of
3.4% + 20 pence is added to the total cost. If any of the other payments
are selected 'handling' is set to false and assign is cleared so no
handling charge is displayed or added. It is the top two lines that had
me foxed all evening, if you don't clear assign then the handling charge
just sticks there and if you don't reset mv_handling then handling is
always displayed even when it equals zero.

Thanks for the help!


[assign clear=1]
[value name=mv_handling set="" hide=1]

[if value mv_payment eq 'Paypal']
      [value name=mv_handling set="Paypal" hide=1]
      [assign handling="[calc]([total-cost noformat=1] *



<SELECT NAME="mv_payment" onChange="this.form.submit()">
	        <Option value="Cheque">Cheque
              <Option value="Nochex">Nochex
              <Option value="Fastpay">Fastpay
              <Option value="Paypal">Paypal (Adds 3.4% + 20p)
              <Option value="BACS">BACS Transfer
              <Option value="P.O.">Postal Order
              <Option value="Cash">Cash

More information about the interchange-users mailing list