Using different AddtoCart images

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
AlanW
Lieutenant, Jr. Grade (LT JG)
Lieutenant, Jr. Grade (LT JG)
Posts: 42
Joined: Wed Apr 08, 2009 12:47 pm

Using different AddtoCart images

Post by AlanW » Wed Jul 15, 2009 10:10 am

We use an image called AddtoCart button in BuyProductDialog.ascx
The name of the image is picked up from the style.skin – the SkinID=”BuyNowButton”
The same image is used for PopularProductsDialog, related items, etc.

I want to use a new image for BuyProductDialog.ascx and keep the other images the same.

So I added a new image and referenced it style.skin, but when I uploaded the file the site crashed.

Here's the original style.skin section that specifies the images to use.

Code: Select all

<P><asp:Image runat="server" SkinId="MoreDetailsButton" ImageUrl="images/more_btn.gif" /></P>
<P><asp:Image runat="server" SkinId="BuyNowButton" ImageUrl="images/cart_btn.gif" /></P>
<P><asp:ImageButton runat="server" SkinId="MoreDetailsButton" ImageUrl="images/more_btn.gif" /></P>
<P><asp:ImageButton runat="server" SkinId="BuyNowButton" ImageUrl="images/cart_btn.gif" /></P>
Here's a modified style.skin section to add a second image to use.

Code: Select all

<P><asp:Image runat="server" SkinId="MoreDetailsButton" ImageUrl="images/more_btn.gif" /></P>
<P><asp:Image runat="server" SkinId="BuyNowButton" ImageUrl="images/cart_btn.gif" /></P>
<P><asp:Image runat="server" SkinId="BuyNowProductPageButton" ImageUrl="images/cart_btn_lg.gif" /></P>
<P><asp:ImageButton runat="server" SkinId="MoreDetailsButton" ImageUrl="images/more_btn.gif" /></P>
<P><asp:ImageButton runat="server" SkinId="BuyNowButton" ImageUrl="images/cart_btn.gif" /></P>
<P><asp:ImageButton runat="server" SkinId="BuyNowProductPageButton ImageUrl="images/cart_btn_lg.gif" /></P>
How do I reference the new cart_btn_lg.gif image in style.skin and make call to the new image in BuyProductDialog.ascx so our product page can use the different addtocart image?

--Alan

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

Re: Using different AddtoCart images

Post by mazhar » Wed Jul 15, 2009 11:06 am

Edit your skin file and locate BuyNowButton entry and crate a copy of that and give it skin id like BuyNowButtonCustom. Then go to buy product dialog and locate control that is making use of BuyNowButton skin id and change its skin id to BuyNowButtonCustom.

AlanW
Lieutenant, Jr. Grade (LT JG)
Lieutenant, Jr. Grade (LT JG)
Posts: 42
Joined: Wed Apr 08, 2009 12:47 pm

Re: Using different AddtoCart images

Post by AlanW » Wed Jul 15, 2009 12:08 pm

Site crashing caused by extra code inserted by FrontPage editor. Got to stop using that program but old habits die hard.

Everything working now.

Thanks

Post Reply