wholesale for some customers
Posted: Fri Aug 22, 2008 5:44 pm
I have set up a wholesale user group and all wholesale usergroup members get a percentage discount.
I set this up my creating a volume discount and applying the percentage discount, set discount scope to global and selected my user group.
The discount works great on the basket page.
Now I need to display the discounted price on the product detail page, and on the category page if the logged in user is part of the wholesale user group.
I need to know if a customer is part of the wholesale user group and also the discounted price.
So far I have this:
This is all written in the ProductHelper file. Has anyone else done this before?
Thanks for the help,
Ryan
I set this up my creating a volume discount and applying the percentage discount, set discount scope to global and selected my user group.
The discount works great on the basket page.
Now I need to display the discounted price on the product detail page, and on the category page if the logged in user is part of the wholesale user group.
I need to know if a customer is part of the wholesale user group and also the discounted price.
So far I have this:
Code: Select all
if (!Token.Instance.User.IsAnonymous)
{
VolumeDiscountCollection VolumeDiscounts = VolumeDiscountDataSource.LoadForProduct(product.ProductId);
foreach (VolumeDiscount discount in VolumeDiscounts)
{
if(discount.IsValidForUser(Token.Instance.User))
{
//discount.CalculateDiscount(1,1,product.Price,);
_IsWholesale = true;
}
}
}
Thanks for the help,
Ryan