MiniVend Akopia Services

[Date Prev][Date Next][Thread Prev][Thread Next][Minivend by date ][Minivend by thread ]

Re: Adding Insurance into the mix.



[subtotal] returns a currency formatted string, not a number!
You may try [subtotal noformat=1]  to get a number.
Chris

This problem has been covered several times recently in this list!
 

Gaelyne Gasson wrote:
> 
> ******    message to minivend-users from Gaelyne Gasson <gaelyne@videocam.net.au>     ******
> 
> G'day,
> 
> Hopefully someone on the list can help me.
> 
> I'd like to be able to add shipping Insurance as an option if either
> the subtotal or total is over $80.  In testing the condition, I've
> used:
> 
> ---------------------------------
> [if explicit]
> [condition]
>         $subtotal = '[subtotal]';
>                return 0 if $subtotal < 80;
>                return 1 if $subtotal > 80;
> [/condition]
> 
> Minivend thinks no insurance is required. (debugging purposes).<p>
> [else]
> <TABLE WIDTH=600><TR><TD __HEADERBG__>
> <FONT SIZE="+2">Insurance</FONT>
> </TD></TR></TABLE>
> 
> <TABLE WIDTH=90%>
> <TR><TD ALIGN=RIGHT>*</TD>
>         <TD ALIGN=RIGHT><B>Shipping Insurance</B></TD>
>         <TD>Text here about amounts. Add in a Yes/No option<br>
>                         <center><INPUT TYPE=submit
>                     VALUE="[L]Update[/L]"></center>
>                     </TD></TR>
> </table>
> 
> [/else]
> [/if]
> ---------------------------------
> 
> I've also tried:
> 
> [if [subtotal] > 80]
> 
> <TABLE WIDTH=600><TR><TD __HEADERBG__>
> <FONT SIZE="+2">Insurance</FONT>
> </TD></TR></TABLE>
> 
> <TABLE WIDTH=90%>
> <TR><TD ALIGN=RIGHT>*</TD>
>         <TD ALIGN=RIGHT><B>Shipping Insurance</B></TD>
>         <TD>Text here about amounts. Add in a Yes/No option<br>
>                         <center><INPUT TYPE=submit
>                     VALUE="[L]Update[/L]"></center>
>                     </TD></TR>
> </table>
> 
> [else]
> Minivend thinks no insurance is required. (debugging purposes).<p>
> [/else]
> [/if]
> ---------------------------------
> And I've tried this too (after looking at the salestax format):
> 
>            [if subtotal [value subtotal] > 80]
>            This item should be insured
>            [else]
>            No insurance required
>            [/else]
>            [/if]
> 
> After the condition has been tested and proved positive, I'll also
> need it added to the total if the customer opts to add it.  Any
> pointers on how this can be acheived would also be greatly
> appreciated.  Thanks!
> 
> Cheers,
> Gaelyne
> 
>  //\         /\\    Gaelyne R. Gasson        gaelyne@videocam.net.au
> || * \ . . / * ||   90 Hilliers Rd           Phone: +61 8 8322-2716
>  \\____\X/____//    Reynella, S.A. 5161      Fax:   +61 8 8387-5810
>   / *  /O\  * \     Australia                ICQ:   5069384
>   \__/  "  \__/     http://videocam.net.au   http://vcsweb.com
>                     C64/128 Support  *  Web Hosting  *  Web Design
> -
> To unsubscribe from the list, DO NOT REPLY to this message.  Instead, send
> email with 'UNSUBSCRIBE minivend-users' in the body to Majordomo@minivend.com.
> Archive of past messages: http://www.minivend.com/minivend/minivend-list


Search for: Match: Format: Sort by: