[ic] Discount of x% on >2 items
Paul Jordan
paul at gishnetwork.com
Sat Jan 16 19:46:26 UTC 2010
> I'd like to apply a discount whereby x% is taken off of the total
> order price if there are 3 or more items in the cart. Should I write
> some code to check the number of items in the cart at each page load
> and apply or remove the [discount] based on that, or does IC have some
> built-in stuff that will help there?
That is what I did. IIRC Mike helped me a bit. I believe his advice was to
remove the discount on every page, and attempt to reapply it on every page.
I guess it's more defensive - assume they don't get it, and just check if
they do. This was about 2 years ago and I don't think there was anything to
accommodate my needs. We do a buy 4 get one free - perpetual (I.e., buy 8
get 2 free...), and has the ability to consider a second (additional) $/%
discount.
Whether or not I used the discount tag I don't remember, but I can say your
intentions work, and are at least proper enough for MH to give it a nod. Oh,
you know I didn't use the discount tag, I actually inserted an item with a
price as the discount amount. I don't remember why I needed to do it that
way - but if you do it that way, you need to account for that extra item.
Perhaps it was because I have two discounts that can work in unison.
Paul
More information about the interchange-users
mailing list