MiniVend Akopia Services

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

Displaying discount amount final solution.



******    message to minivend-users from Ceres <jfrye@ehg.net>     ******

Hello everyone,

I wanted to post the final code I'm using to display the discount amount
when using [discount ENTIRE_ORDER]. Just in case someone else needs it
in the future. Mike pointed me in the right direction with:

 [discount ENTIRE_ORDER]
                $original = $s;
                $discounted = $s - 5.00;
                $difference = $original - $discounted;
                return $discounted;
        [/discount]

        Total cost is [total-cost].

        You save [currency]
                                [calc]
                                        return $difference;
                                [/calc]
                        [/currency].

I added a little bit extra for the different levels of discount I'm using:

[discount ENTIRE_ORDER]
               
                $original = $s;
                if ($s < 500) {
                	$discounted = $s;
                } elsif ($s < 1000) {
                	$discounted = $s * .9;
                } elsif ($s < 2500) {
                $discounted = $s * .85;
                } elsif ($s > 2500) {
                $discounted = $s * .82;
                }
                $difference = $original - $discounted;
                return $discounted;

        [/discount]

This seems to be working great. Thanks to Mike again :-)

Jayme Frye
-- 
Jayme Frye
Sys Admin
Epsen Hillmer Graphics Co.
402-342-7000
              jfrye@ehg.net
-
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: