[ic] discount based on total quantity ordered

Stephen Ricketts steve at bojanglesdesign.co.uk
Wed Mar 24 14:56:10 EST 2004


I was able to do this the other day as it's explained pretty well in the
documentation, but it looks like you've got in a bit of a muddle. I think
this should work for you:

    [comment] calculates the total number of articles [/comment]
    [calc]
        [item-list]
            $totalq += 1;
        [/item-list]
        return '';
    [/calc]

    [discount ENTIRE_ORDER]
        return ($s - 20) if $totalq == 2;
        return ($s - 50) if $totalq == 3;
        return ($s - 65) if $totalq == 4;
    [/discount]

Add all that before the [subtotal] on your basket and checkout pages and the
discount will be applied to the [subtotal].

I'm not sure if there is a tag to show the total order discount but you
could do it with another [calc] calculation.

I've only put this together quickly so let me know if it doesn't work or you
need help with a calculation to show the total discount.

Thanks

Steve

> From: "Jeannie Stevenson" <webteam at wes-state.com>
> Reply-To: interchange-users at icdevgroup.org
> Date: Wed, 24 Mar 2004 10:27:11 -0800
> To: <interchange-users at icdevgroup.org>
> Subject: [ic] discount based on total quantity ordered
> 
> Good day list
> 
> I'm trying to figure out how to discount the ENTIRE_ORDER if different
> quantity of items are ordered. I have different discounts if the user has
> order 2,3, or 4 total items
> I have placed in catalog.cfg
> 
> [if type=explicit compare="[calc][nitems] == 2 [/calc]"]
> [discount ENTIRE_ORDER]$s - 20.00[/discount]
> [else]
> [discount ENTIRE_ORDER][/discount]
> [/else]
> [/if]
> [if type=explicit compare="[calc][nitems] == 3 [/calc]"]
> [discount ENTIRE_ORDER]$s - 50.00[/discount]
> [else]
> [discount ENTIRE_ORDER][/discount]
> [/else]
> [/if]
> [if type=explicit compare="[calc][nitems] == 4 [/calc]"]
> [discount ENTIRE_ORDER]$s - 65.00[/discount]
> [else]
> [discount ENTIRE_ORDER][/discount]
> [/else]
> [/if]
> but this really doesn't work correctly
> 
> Also, how do I get this discount amount to appear on the basket/checkout
> page?
> 
> 
> REDHAT 7.2
> IC 5.0
> 
> Thanks in advance
> 
> John A
> 
> 
> _______________________________________________
> interchange-users mailing list
> interchange-users at icdevgroup.org
> http://www.icdevgroup.org/mailman/listinfo/interchange-users
> 



More information about the interchange-users mailing list