Volume Discount based on Subtotal

For general questions and discussions specific to the AbleCommerce 7.0 Asp.Net product.
Post Reply
daviddavis
Ensign (ENS)
Ensign (ENS)
Posts: 10
Joined: Wed Sep 03, 2008 7:03 am

Volume Discount based on Subtotal

Post by daviddavis » Fri Dec 05, 2008 4:49 pm

Hello,
I need help with volume discounts.
I have this broken down into two phases of what I am trying to do.

Phase One
Provide a volume discount based on the SUBTOTAL of a cart such that anyone purchasing $750 to $1249 gets 10% off and anyone purchasing $1250 or greater gets 20% off. I am hoping to do this with the existing volume discount system in Able.

Is this possible "out of the box"?

Phase Two
Notify the customer in the upon reviewing their cart prior to checkout that if they spend $X more they will receive $X discount (based on the above calculations).
I suspect that some custom code would need to be written to do this.

Are there any AC experts that can do this in a reasonable amount of time?

I appreciate your help.

Thank you,
David D.

User avatar
mazhar
Master Yoda
Master Yoda
Posts: 5084
Joined: Wed Jul 09, 2008 8:21 am
Contact:

Re: Volume Discount based on Subtotal

Post by mazhar » Sat Dec 06, 2008 5:11 am

Phase One
Provide a volume discount based on the SUBTOTAL of a cart such that anyone purchasing $750 to $1249 gets 10% off and anyone purchasing $1250 or greater gets 20% off. I am hoping to do this with the existing volume discount system in Able.

Is this possible "out of the box"?
No the volume discounts are note available at cart total or order level. One possible solution to give the discount in this case would be to make use of the coupons.
Phase Two
Notify the customer in the upon reviewing their cart prior to checkout that if they spend $X more they will receive $X discount (based on the above calculations).
I suspect that some custom code would need to be written to do this.
As i suggested the use of coupons for phase 1 so the solution for phase 2 is also regarding the coupons.

Code: Select all

CouponCollection coupons = CouponDataSource.LoadForStore();
        LSDecimal cartTotal = Token.Instance.User.Basket.Items.TotalProductPrice();
        Coupon nextCoupon = null;
        foreach (Coupon coupon in coupons)
        {
            if (coupon.CouponType == CouponType.Order && coupon.MinPurchase > cartTotal)
            {
                nextCoupon = coupon;
                break;
            }
        }
        if (nextCoupon != null)
        {
            LSDecimal diffAmount = nextCoupon.MinPurchase - cartTotal;
            Response.Write(string.Format("spend {0} more and get {} discount", diffAmount, nextCoupon.DiscountAmount));
        }

daviddavis
Ensign (ENS)
Ensign (ENS)
Posts: 10
Joined: Wed Sep 03, 2008 7:03 am

Re: Volume Discount based on Subtotal

Post by daviddavis » Mon Dec 08, 2008 10:53 am

Hi Mazhar,

Thank you for your help on this!

My apologies, I am not strong in ASP.

What does this code do exactly?

Would the customer have to manually enter the coupon that applied to his volume order?

Thank you again for your help,
David

User avatar
mazhar
Master Yoda
Master Yoda
Posts: 5084
Joined: Wed Jul 09, 2008 8:21 am
Contact:

Re: Volume Discount based on Subtotal

Post by mazhar » Thu Dec 11, 2008 3:06 am

What does this code do exactly?
The above code was to show the next available coupon which customer can get after spending some money.
Would the customer have to manually enter the coupon that applied to his volume order?
Yes, but if you want to automate this process you can customize the onepagecheckout and put some code which check the order total and then apply the proper coupon automatically. Have a look at the following post.
viewtopic.php?f=42&t=9030

gary-trainsignal
Ensign (ENS)
Ensign (ENS)
Posts: 13
Joined: Mon Dec 08, 2008 1:10 pm
Location: Rolling Meadows, IL
Contact:

Re: Volume Discount based on Subtotal

Post by gary-trainsignal » Tue Dec 23, 2008 3:34 pm

Good news. We've figured it out. With the volume discount there is a setting under the store configuration in the Dashboard. This allows you to change from line item to group by category and then when we selected global for the volume discount it was applied based on the subtotal of the cart. I put together a quick video here:
http://gary.eimerman.com/?p=102 or you can download it directly http://gary.eimerman.com/videos/ablecom ... scount.wmv

I hope this helps.
_________________
Gary Eimerman
Train Signal
Global Leader in Professional Computer Training
http://www.trainsignal.com
http://garyeimerman.com

Post Reply