Sold Out Button

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
aaronfrankel
Lieutenant, Jr. Grade (LT JG)
Lieutenant, Jr. Grade (LT JG)
Posts: 47
Joined: Wed May 07, 2008 1:44 pm
Location: Houston, TX
Contact:

Sold Out Button

Post by aaronfrankel » Wed Oct 07, 2009 11:42 am

I am finding that customers completely miss the text message the cart produces that a product is sold out. How to I get the cart to use an image instead of the "Out of stock message" in the store settings?

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

Re: Sold Out Button - Help

Post by mazhar » Thu Oct 08, 2009 3:50 am

Eidt ConLib/BuyProductDialog.ascx.cs file and locate followng line of code

Code: Select all

InventoryDetailsPanel.Controls.Add(new LiteralControl(outOfStockMessage));
and replace it with below code

Code: Select all

//InventoryDetailsPanel.Controls.Add(new LiteralControl(outOfStockMessage));
Image outofstockImage = new Image();
outofstockImage.AlternateText = outOfStockMessage;
outofstockImage.ImageUrl = "out of stock image url here";
InventoryDetailsPanel.Controls.Add(outofstockImage);
Note that you need to provide a out of stock image URL instead of text "out of stock image url here"

aaronfrankel
Lieutenant, Jr. Grade (LT JG)
Lieutenant, Jr. Grade (LT JG)
Posts: 47
Joined: Wed May 07, 2008 1:44 pm
Location: Houston, TX
Contact:

Re: Sold Out Button - Help

Post by aaronfrankel » Thu Oct 08, 2009 9:10 am

Prefect, thank you!

User avatar
napacabs
Lieutenant, Jr. Grade (LT JG)
Lieutenant, Jr. Grade (LT JG)
Posts: 45
Joined: Mon Jan 14, 2008 2:58 pm
Location: Chino, California
Contact:

Re: Sold Out Button - Help

Post by napacabs » Wed Jun 15, 2011 6:02 pm

mazhar wrote:Eidt ConLib/BuyProductDialog.ascx.cs file and locate followng line of code

Code: Select all

InventoryDetailsPanel.Controls.Add(new LiteralControl(outOfStockMessage));
and replace it with below code

Code: Select all

//InventoryDetailsPanel.Controls.Add(new LiteralControl(outOfStockMessage));
Image outofstockImage = new Image();
outofstockImage.AlternateText = outOfStockMessage;
outofstockImage.ImageUrl = "out of stock image url here";
InventoryDetailsPanel.Controls.Add(outofstockImage);
Note that you need to provide a out of stock image URL instead of text "out of stock image url here"
Is there a way that you can adjust this code, so that the sold out image appears in place of the "quantity box" that is removed when an items is out of stock? I'd like to keep the out stock message for backorders info.

TyMorris
Ensign (ENS)
Ensign (ENS)
Posts: 13
Joined: Fri Jun 05, 2009 5:49 am

Re: Sold Out Button - Help

Post by TyMorris » Tue Jun 28, 2011 8:23 am

What about if your sold out is a text message and not an image? How do you change the text itself? I have been searching the forums and can't seem to figure it out.

I am not referring to the display inventory message that can be found in Configure>Store in the admin

Thanks!

Post Reply