AbleCommerce version? 7.0.5 build 14053
In the Shopping cart, you can change the quantity of any item, until a discount is applied. Once a discount is applied, you can change the quantity of only the first item in the cart.
Cant change quantity in cart once discount is applied
- jmestep
- AbleCommerce Angel
- Posts: 8164
- Joined: Sun Feb 29, 2004 8:04 pm
- Location: Dayton, OH
- Contact:
Re: Cant change quantity in cart once discount is applied
Do you have custom code on the basket? I'm not seeing that problem in a 7.0.5 site.
Judy Estep
Web Developer
jestep@web2market.com
http://www.web2market.com
708-653-3100 x209
New search report plugin for business intelligence:
http://www.web2market.com/Search-Report ... -P154.aspx
Web Developer
jestep@web2market.com
http://www.web2market.com
708-653-3100 x209
New search report plugin for business intelligence:
http://www.web2market.com/Search-Report ... -P154.aspx
Re: Cant change quantity in cart once discount is applied
we call a method: ShowDiscountMessageInfo(); in page load in basket.ascx.cs
i put this additional code in a clean install and it works fine. but just doesnt work on the real website....
Code: Select all
private void ShowDiscountMessageInfo()
{
VolumeDiscountCollection volumeDiscountCollection = VolumeDiscountDataSource.LoadForStore();
for (int i = 0; i < volumeDiscountCollection.Count; i++)
{
VolumeDiscount volumeDiscount = volumeDiscountCollection[i];
if (string.Compare(volumeDiscount.Name, "new discount", StringComparison.OrdinalIgnoreCase) == 0)
{
VolumeDiscountLevelCollection volumeDiscountLevelCollection = volumeDiscountCollection[i].Levels;
BasketHelper.SaveBasket(BasketGrid);
BindBasketGrid();
LSDecimal subTotalOfCart = GetBasketSubtotalWithoutDiscount();
bool discountApplied = false;
for (int j = 0; j < volumeDiscountLevelCollection.Count; j++)
{
VolumeDiscountLevel volumeDiscountLevel = volumeDiscountLevelCollection[j];
if (volumeDiscountLevel.MinValue - subTotalOfCart < 10 &&
volumeDiscountLevel.MinValue - subTotalOfCart > 0)
{
bool isPercent = volumeDiscountLevel.IsPercent;
string discountAmount = string.Empty;
if (isPercent)
{
discountAmount = (volumeDiscountLevel.DiscountAmount / 100).ToString("0.00%");
}
else
{
discountAmount = volumeDiscountLevel.DiscountAmount.ToString("C");
}
lblDiscountInfo.Text = (volumeDiscountLevel.MinValue - subTotalOfCart).ToString("C") +
" more and you will save " + discountAmount + " on your entire order";
discountApplied = true;
break;
}
}
if (!discountApplied)
{
divDiscountInfo.Visible = false;
}
else
{
divDiscountInfo.Visible = true;
}
}
}
}
- jmestep
- AbleCommerce Angel
- Posts: 8164
- Joined: Sun Feb 29, 2004 8:04 pm
- Location: Dayton, OH
- Contact:
Re: Cant change quantity in cart once discount is applied
There has to be some other difference on the live site. Try checking for nulls in your code and see if that helps.
Judy Estep
Web Developer
jestep@web2market.com
http://www.web2market.com
708-653-3100 x209
New search report plugin for business intelligence:
http://www.web2market.com/Search-Report ... -P154.aspx
Web Developer
jestep@web2market.com
http://www.web2market.com
708-653-3100 x209
New search report plugin for business intelligence:
http://www.web2market.com/Search-Report ... -P154.aspx