Akopia Akopia Services

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

[mv] [discount] Please help



******    message to minivend-users from kphillips@ultratec.com     ******


Please help. It has been days and I can't get this to work as advertised in the
docs.

I have tried all manner of $safe{scratch}{discountAmount}, [scratch
discountAmount] and [value discountAmount] variables but I can't get a variable
from JavaScript or Perl to play nicely with the [discount] tag. I have scoured
the list and the documentation but each example I have found has failed to work.

How do I convert the perl code below into something that passes it along to the
[discount] tag?

Thank you in advance for your most appreciated and valued help!


[snip]
<TR>    
        <TD COLSPAN=2>
        COUPON CODE: <INPUT onChange="this.form.submit();" TYPE="text" NAME=
"coupon" VALUE="[value coupon]" size="10">
        [perl interpolate="1"]
          my $coupon = '[value coupon]';
          if ($coupon eq "coupon0")  {
            $Safe{'scratch'}{'discountAmount'} = .75; 
            return "$Safe{'scratch'}{'discountAmount'}"; #see this works <smile>
          }
          else {
            $Safe{'scratch'}{'discountAmount'} = .5;  
            return "$Safe{'scratch'}{'discountAmount'}";#this too!
          } 
        [/perl]
[discount code="ALL_ITEMS"]
        return ($s * [scratch discountAmount]);##How do I get ANYTHING here??
[/discount]
        
        </TD>
        <TD>[L]Subtotal[/L]</TD>
        <TD ALIGN=RIGHT>[subtotal]</TD>
</TR>
[/snip]
-
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: