Hello... I thought I would post this here, in case it is helpful for anyone...
I was having a problem with kit pricing not showing on the Category grid pages. Now, I know this isn't the best option for a permenant fix, and it does not take into account options (only kit pricing), but, it fixed my problem. So...
In the ProductPrice.acsx.cs file, find the line:
Price.Text = pcalc.Price.ToString("ulc");
Replace with:
if (pcalc.Price == 0)
{
LSDecimal lowestKitPrice = 999999;
KitComponentCollection kcc = KitComponentDataSource.LoadForProduct(_Product.ProductId);
foreach (KitComponent kc in kcc)
{
KitProductCollection kpc = KitProductDataSource.LoadForKitComponent(kc.KitComponentId);
foreach (KitProduct kp in kpc)
{
if ((kp.Quantity * kp.Price) < lowestKitPrice)
{
lowestKitPrice = kp.Quantity * kp.Price;
}
}
}
Price.Text = lowestKitPrice.ToString("ulc");
}
else
{
Price.Text = pcalc.Price.ToString("ulc");
}
So, this change will fix the error. I would suggest, however, making copies and making the changes to those, of course.
Hope this is helpful.
Scott
Kit Pricing fix for now
- compunerdy
- Admiral (ADM)
- Posts: 1283
- Joined: Sun Nov 18, 2007 3:55 pm
Re: Kit Pricing fix for now
I tried this on a kit that has hidden items and it didn't work.
Re: Kit Pricing fix for now
Sorry Tim... I only use kits for creating Case quantities of different sizes. Works fine for me, but, I don't have any kit items that are not displayed. I'm using the AC object and collection classes here, so, I'm not sure how they handle the hidden stuff. Wish I could be more helpful...
Scott
Scott