Error calculating price on product page.

For general questions and discussions specific to the AbleCommerce 7.0 Asp.Net product.
Post Reply
digitalkemical
Ensign (ENS)
Ensign (ENS)
Posts: 9
Joined: Thu Nov 13, 2008 2:33 pm

Error calculating price on product page.

Post by digitalkemical » Thu Dec 11, 2008 10:20 am

I'm getting this error :

[[ConLib:Custom/FramedMirrorProductDialog]] d:\hosting\iartzstore\ConLib\Custom\FramedMirrorProductDialog.ascx.cs(525): error CS1002: ; expected


From this code it seems:

Code: Select all

 {
        //GET THE CURRENT CALCULATED PRICE
        string optionList = ProductVariantDataSource.GetOptionList(_ProductId, _SelectedOptions, true);
        ProductCalculator pcalc = ProductCalculator.LoadForProduct(_ProductId, 1, optionList, _SelectedKitProducts);
        LSDecimal otherCost = pcalc.Price - _Product.Price;
        LnFtCost = ((((((Width + Height) * 2 / 12) * _Product.Price) + (((((Width + Height) / 144)-(Width * 2)) * Bevel) + 3.5)) * .25) * 2) * 2) ;
        CalculatedCost = LnFtCost + otherCost;
        PricePerLnFtLabel.Text = _Product.Price.ToString("ulc");
        CalculatedPriceLabel.Text = CalculatedCost.ToString("ulc");
    }
Any thoughts? Thanks.

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

Re: Error calculating price on product page.

Post by mazhar » Fri Dec 12, 2008 5:35 am

The problem seems to be in the follwong line

Code: Select all

LnFtCost = ((((((Width + Height) * 2 / 12) * _Product.Price) + (((((Width + Height) / 144)-(Width * 2)) * Bevel) + 3.5)) * .25) * 2) * 2) ;
Try by making it look like as below

Code: Select all

LnFtCost = (((((((Width + Height) * 2 / 12) * _Product.Price) + (((((Width + Height) / 144)-(Width * 2)) * Bevel) + 3.5)) * .25) * 2) * 2) ;

digitalkemical
Ensign (ENS)
Ensign (ENS)
Posts: 9
Joined: Thu Nov 13, 2008 2:33 pm

Re: Error calculating price on product page.

Post by digitalkemical » Fri Dec 12, 2008 7:04 am

Got it Working!

Code: Select all

LnFtCost = ((((((((((Width - _Product.MSRP) * (Height - _Product.MSRP))/144) * Bevel) + 3.5M + ((((Width + Height) * 2) / 12) * _Product.Price))) * 1.25M)) * 2)) *2;

Post Reply