[Date Prev][Date Next][Thread Prev][Thread Next][Minivend by date
][Minivend by thread
]
User Discount Problems
****** message to minivend-users from mwatkins@lexmark.com ******
I currently running minivend version 3.12beta6 and have been
working on a way to give an individual a discount. The userdb
has a column added called getdiscount.
The following code is from basket.html:
[item-list]
.
.
[if session logged_in]
[if value getdiscount]
[calc]
$myper{""} += 1 - ([value getdiscount]/100);
return '';
[/calc]
[discount [item-code]]
return ($s * $myper{""});
[/discount]
<FONT COLOR="#FFFF80" SIZE=-1>User gets a
[value getdiscount]% discount!</FONT>
[/if]
[else]
[discount [item-code]] return($s); [/discount]
[/else]
[/if]
</TD>
<TD [var HEADERBG] VALIGN=TOP ALIGN=RIGHT>
<FONT COLOR="__HEADERTEXT__">[item-subtotal]
</FONT>
</TD>
</TR>
[/item-list]
The basket total shows up exactly correct. If I change the number in userdb
the total work fine. HOWEVER, when I proceed to the checkout page.
I get the following:
Durr-Walks in Beauty
Giclee 1 @ $320.00
$320.00
Subtotal
$0.00
Sales Tax
$0.00
Shipping (includes $3 handling charge) $6.93
TOTAL
$6.93
BUT if I put the following in for [discount]:
[discount [item-code]]
return ($s * 0.9);
[/discount]
Everything works like it should, checkout is fine the totals are fine!
What am I missing it has been driving me nuts!
Thanks in advance!
Mark Watkins
-
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