Page 1 of 1

setting a style to price

Posted: Wed Jul 15, 2009 3:56 am
by troutlet
Using the 'Show Product with Options Grid' Scriptlet I want to set a style class for the Price that is displayed within the grid. I've followed it to the Conlib 'BuyProductDialogOptionsList' but I've not been able to locate where the code is that puts out the <span> $0.00 </span>.

Can anybody give me a hand?

Re: setting a style to price

Posted: Wed Jul 15, 2009 6:21 am
by mazhar
Check ConLib/Utility/ProductPrice control for this. You need to update

Code: Select all

<asp:Literal ID="Price" runat="server"></asp:Literal>
with something like

Code: Select all

<div class="your class here">
<asp:Literal ID="Price" runat="server"></asp:Literal>
</div>

Re: setting a style to price

Posted: Wed Jul 15, 2009 6:40 am
by troutlet
Thanks but that didn't do it. Making that change caused the class to be applied to the Popular Products Grid though.

Re: setting a style to price

Posted: Wed Jul 15, 2009 11:42 am
by troutlet
mazhar,
Can you tell me where the control is for the Options List grid?

Re: setting a style to price

Posted: Thu Jul 16, 2009 2:21 am
by mazhar
Edit ConLib/BuyProductDialogOptionList.ascx.cs file and locate following code

Code: Select all

// get the raw data value and make it pretty            
            string optionList = DataBinder.Eval(row.DataItem, "OptionList").ToString();
            l.Text = GetVariantPrice(optionList);
in above code you need to set CSS class on l.CssClass like

Code: Select all

// get the raw data value and make it pretty            
            string optionList = DataBinder.Eval(row.DataItem, "OptionList").ToString();
            l.Text = GetVariantPrice(optionList);
            l.CssClass = "YourClass Here";

Re: setting a style to price

Posted: Thu Jul 16, 2009 4:15 am
by troutlet
Mazhar,

Thank you very much! That really makes my morning. I would never have found that.