[ic] Discounting Entire Orders

Ed LaFrance interchange-users@interchange.redhat.com
Tue Oct 23 11:41:01 2001


At 08:19 PM 10/22/2001 -0400, you wrote:
>On Mon, Oct 22, 2001 at 08:04:01PM -0400, Jim Balcom wrote:
> > On Mon, 22 Oct 2001, Ed LaFrance wrote:
> >
> > EL>>Well, take a look at this doc:
> > EL>>http://interchange.redhat.com/cgi-bin/ic/dev-4.8/ictags_24.html
> > EL>>
> > EL>>..and consider something like this, on ord/checkout.html, top of page:
> > EL>>
> > EL>>[if type=explicit compare="[calc][subtotal noformat=1] > 100[/calc]"]
> > EL>>         [discount ENTIRE_ORDER]$s * .9[/discount]
> > EL>>[else]
> > EL>>         [discount ENTIRE_ORDER][/discount]
> > EL>>[/else]
> > EL>>[/if]
> >
> > Oh! Wow! Fan-$#%$&*(&ing-tastic!
> >
> > That is VERY valuable! Thanks a whole lot!
>
>Just bear in mind that does not work in the strictest sense because it
>sets the session permanently.  One could set the discount, drop a few
>items, and still have the discount.

I don't think so - you might temporarily have the discount if you went to 
checkout with cart > $100, which would activate it, then back to the basket 
and dropped a few items.  But as soon as you went back to checkout, the 
tags would be re-evaluated, and if the subtotal <= 100 the discount would 
be removed.  So in that sense, it passes the acid test: they only get the 
discount on their submitted order if it meets the minimum.

It might be cumulative, however - it has been a while since I messed with 
discounts.  So it would probably be a good idea to see if a discount has 
already been applied first:

[if type=explicit compare="[calc][subtotal noformat=1] > 100[/calc]"]
         [if !discount ENTIRE_ORDER]
                 [discount ENTIRE_ORDER]$s * .9[/discount]
         [/if]
[else]
         [discount ENTIRE_ORDER][/discount]
[/else]
[/if]

One more thing I should have mentioned - the discount should be reset after 
the order is submitted - easy enough by putting this at the bottom of the 
receipt page:

[if discount ENTIRE_ORDER][discount ENTRIRE_ORDER][/discount][/if]


- Ed L.


>  That might be irrelevant or it
>might not :-)  It even gets page dependant, eg they may not have to
>go through checkout once it is filled.  I suppose you could simply
>unset it each page and reset; the [else] won't quite do that.
>
>
>
> >
> > -= Jim =-
> >
> > ----------------------------------------------------------------
> > Jim's Linux-Operated Underground Bomb Shelter
> >
> > Tagline for Monday, October 22, 2001 at 20:00 PM:
> > Free advice is worth what you pay for it
> >
> > ----------------------------------------------------------------
> > This Linux System has been up 34 hours
> >
> > My web page: http://www.idk-enterprises.com
> > ----------------------------------------------------------------
> >
> > _______________________________________________
> > interchange-users mailing list
> > interchange-users@interchange.redhat.com
> > http://interchange.redhat.com/mailman/listinfo/interchange-users
>
>--
>
>Christopher F. Miller, Publisher                               cfm@maine.com
>MaineStreet Communications, Inc           208 Portland Road, Gray, ME  04039
>1.207.657.5078                                         http://www.maine.com/
>Content/site management, online commerce, internet integration, Debian linux
>_______________________________________________
>interchange-users mailing list
>interchange-users@interchange.redhat.com
>http://interchange.redhat.com/mailman/listinfo/interchange-users

===============================================================
New Media E.M.S.               Software Solutions for Business
463 Main St., Suite D          eCommerce | Consulting | Hosting
Placerville, CA  95667         edl@newmediaems.com
(530) 622-9421                 http://www.newmediaems.com
(866) 519-4680 Toll-Free       (530) 622-9426 Fax
===============================================================