MiniVend Akopia Services

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

Re: Adding Insurance into the mix.



I would add something similar to the following to your basket page:

[perl interpolate=1]
	my $var = [subtotal] || 0;
	if ($var => 80) {
    $out = '[order insurance]Click here to add shipping insurance[/order]';
	$out;
[/perl]

and then put items in your products.asc to represent insurance costs.
I'm not sure how the subtotal item is stored ($80, 80, $80.00) so you may have to strip some stuff off. But this should work
---
Brian@mediabang.com
minivend@mediabang.com

On Fri, Jul 30, 1999 at 09:25:02PM +0930, 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: