Updating the SKU as users select options/variants

For general questions and discussions specific to the AbleCommerce 7.0 Asp.Net product.
Post Reply
User avatar
efficiondave
Commander (CMDR)
Commander (CMDR)
Posts: 151
Joined: Tue Dec 02, 2008 10:20 am
Location: St. Louis Missouri
Contact:

Updating the SKU as users select options/variants

Post by efficiondave » Mon Dec 22, 2008 9:33 am

Is it possible to display the updated SKU on the detail page as users select different Options/Variants?

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

Re: Updating the SKU as users select options/variants

Post by mazhar » Mon Dec 22, 2008 10:01 am

For this you can edit the ConLib/BuyProductDialog.ascx.cs file and put the following code at the very end of the Page_PreRender method

Code: Select all

protected void Page_PreRender(object sender, EventArgs e)
    {
......................
.........................
......................
 ProductVariant productVariant = ProductVariantDataSource.LoadForOptionList(_ProductId, optionList);
        if(productVariant != null)
        Sku.Text = productVariant.Sku;
}

User avatar
efficiondave
Commander (CMDR)
Commander (CMDR)
Posts: 151
Joined: Tue Dec 02, 2008 10:20 am
Location: St. Louis Missouri
Contact:

Re: Updating the SKU as users select options/variants

Post by efficiondave » Mon Dec 22, 2008 10:26 am

Worked great! Thanks!

Post Reply