Akopia Akopia Services

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

Re: [mv] Discount everything but 1 item?



******    message to minivend-users from Mike Heins <mikeh@minivend.com>     ******

Quoting Chris Rapier (rapier@psc.edu):
> 
> My clients decided they want to sell gift certificates. They also have a
> set of customers that are entitled to a 10% discount. They don't want
> the gift certificates to be discounted though. 
> 
> Right now the discount for the 10%ers is being done with 
> [discount ALL_ITEMS]$s * .9[/discount]
> 
> Is there any easy way to exclude a subset of items from this discount?
> 
> I'm guessing there isn't. The alternative, that I see, is to determine
> the amount of discount as applied to the gift certificates and add it
> back into the order as a whole with something like
> [discount ENTIRE_ORDER] $s + [scratch gift_cert_disc_amt][/discount]
> 
> But that just seems like a mess. Any ideas?

I *think* this is documented. The variable $item contains the item hash,
so you should be able to do:

	[discount ALL_ITEMS]
	return $s if $item->{code} = 'EXCLUDE-SKU';
	return $s * .90;
	[/discount]

-- 
Akopia, Inc., 131 Willow Lane, Floor 2, Oxford, OH  45056
phone +1.513.523.8220 fax 7501 <heins@akopia.com>

Light travels faster than sound. This is why some people appear bright
until you hear them speak. -- unknown
-
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: