setting a style to price

Store UI, layout, design, look and feel; Discussion on the customer facing pages of your online store. Cascading Style Sheets, Themes, Scriptlets, NVelocity and the components in the ConLib directory.
Post Reply
User avatar
troutlet
Lieutenant (LT)
Lieutenant (LT)
Posts: 77
Joined: Mon Sep 24, 2007 3:01 am
Location: USA
Contact:

setting a style to price

Post by troutlet » Wed Jul 15, 2009 3:56 am

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?

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

Re: setting a style to price

Post by mazhar » Wed Jul 15, 2009 6:21 am

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>

User avatar
troutlet
Lieutenant (LT)
Lieutenant (LT)
Posts: 77
Joined: Mon Sep 24, 2007 3:01 am
Location: USA
Contact:

Re: setting a style to price

Post by troutlet » Wed Jul 15, 2009 6:40 am

Thanks but that didn't do it. Making that change caused the class to be applied to the Popular Products Grid though.

User avatar
troutlet
Lieutenant (LT)
Lieutenant (LT)
Posts: 77
Joined: Mon Sep 24, 2007 3:01 am
Location: USA
Contact:

Re: setting a style to price

Post by troutlet » Wed Jul 15, 2009 11:42 am

mazhar,
Can you tell me where the control is for the Options List grid?

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

Re: setting a style to price

Post by mazhar » Thu Jul 16, 2009 2:21 am

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";

User avatar
troutlet
Lieutenant (LT)
Lieutenant (LT)
Posts: 77
Joined: Mon Sep 24, 2007 3:01 am
Location: USA
Contact:

Re: setting a style to price

Post by troutlet » Thu Jul 16, 2009 4:15 am

Mazhar,

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

Post Reply