MiniVend Akopia Services

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

Re: How do you display discount amount?



******    message to minivend-users from "Steven Schmidt" <steve@eurocenter-usa.com>     ******

Am I the only one who got 13 copies of this question?  Well anyway, can't
you just create variables for each discount and display those?  I am one of
those "(k)no(w)-nothing private Win95/Word/Browsing end-users" (well, ok
Linux and NT too) so this might not help, but this tcl script seems to solve
your problem.  I don't know Perl, so I'm not sure how to translate it

#     s is your sale amount, set here to 100,
#    but of course would be set by your catalog [item-price]

set s 100

#      the discounts
set y ($s*.9)
set x ($s*.85)
set z ($s*.82)

#    your if tests to decide which discount to apply, then

expr $s - $y

    ....which returns 10  - the discount amount

If I have time I'll do this in minivend, but I think its already in the demo
somewhere.  If this is completely ridiculous, I apologize for the wasted
bandwidth.  Posted on once, I hope :)

-----Original Message-----
From: Ceres <jfrye@ehg.net>
To: minivend-users@minivend.com <minivend-users@minivend.com>
Date: Tuesday, January 26, 1999 6:31 PM
Subject: How do you display discount amount?


>******    message to minivend-users from Ceres <jfrye@ehg.net>     ******
>
>Hello everyone,
>
>I have done my best to solve this on my own by way of docs and mail list
>archive but I am at a dead-end. My wish is to display on basket.html and
>checkout.html the amount of the customers discount. Something like:
>
> Quantity Price     Extension
>   11 $100.00 $1100.00
>
> Less Discount $165.00
> Subtotal $935.00
>
>I have the subtotal discounting correctly with:
>
> [discount ENTIRE_ORDER]
>    return ($s)       if $s < 500;
>    return ($s * .9)  if $s < 1000;
>    return ($s * .85) if $s < 2500;
>    return ($s * .82) if $s > 2500;
> [/discount]
>
>I have not been able to figure out how to get the discount amount to
>display. I've fumbled with some various perl code without success. I
>figure if I can get the original value of subtotal before the discount
>is applied I could use it in perl to calculate the discount amount and
>put that into a scratch variable to be displayed on the checkout,
>receipt, and report pages. Problem is I can't find a way to grab
>subtotal before the discount is applied.
>
>I've exhausted my knowledge of Perl and Minivend (both pretty limited),
>now I need some assistance.
>
>TIA
>
>
>Jayme Frye
>Sys Admin
>Epsen Hillmer Graphics Co.
>-
>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
>

-
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: