Is it possible to have a discount that is applied to an order only the first time that a customer buys from the store? I'm looking to have a message appear in our advertising and on the home page of our website that says "10% off of your first purchase!!!"
If the above can be achieved, is there then a way to limit the discount to certain categories or products? This would allow for first time buyers to receive an automatic discount only for our CD Duplication packages and our Full Color Printing packages but not on our Apparel Printing packages or Sticker Printing packages.
I'd rather not use a coupon to do the work but instead would like for it to be seamless for the customer.
Discount for first-time buyers?
-
- Lieutenant Commander (LCDR)
- Posts: 91
- Joined: Mon Sep 22, 2008 8:37 pm
- Location: Northeast Ohio
- Contact:
Re: Discount for first-time buyers?
One solution could be to create a user group for example let say it First Time Buyers and then create volume discount for this newly created user group. Now when ever a user signsup you need to place this user in First Time Buyers group through code. By doing so when user will try to checkout he will get the discount. The next job is to remove the user from this group as soon as he places his first order. For this you need to put some code in the CheckedOut method of the OnePageCheckout control's code file. The code for removing the user form user group would be something like
Where groupId means the id of First Time Buyers group. You can find out this id from ac_Groups table of database.
Have a look at the following thread about how to automatically assign user to some group on sign up.
viewtopic.php?f=42&t=8712
Code: Select all
UserGroup userGroup = UserGroupDataSource.Load(Token.Instance.User.UserId,groupId);
int index = Token.Instance.User.UserGroups.IndexOf(userGroup);
if (index > 0)
{
Token.Instance.User.UserGroups.DeleteAt(index);
Token.Instance.User.Save();
}
Have a look at the following thread about how to automatically assign user to some group on sign up.
viewtopic.php?f=42&t=8712