Page 1 of 1

Using different AddtoCart images

Posted: Wed Jul 15, 2009 10:10 am
by AlanW
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

Re: Using different AddtoCart images

Posted: Wed Jul 15, 2009 11:06 am
by mazhar
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.

Re: Using different AddtoCart images

Posted: Wed Jul 15, 2009 12:08 pm
by AlanW
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