Post edited 8:56 am - January 27, 2010 by mhackney Post edited 8:57 am - January 27, 2010 by mhackney Post edited 8:57 am - January 27, 2010 by mhackney Post edited 8:58 am - January 27, 2010 by mhackney
My new book is in print and I wanted to list it in my store but not take orders for it yet (http://www.eclecticangler.com/store).
I tried creating my product like normal but not setting a price. Then I said something like "This book is coming soon..." in the product description. However, in places where the product is listed (categories, grid) the "SOLD OUT" message is displayed. Not what I wanted!
So, I added a few lines of code to frontdoor.php (and all derivatives if you've made any), mkt_language.php, and style.css to check if the item's price is "" and display the message "Coming Soon". Here's the code:
style.css - it doesn't matter where you put these but search for "sold" and place these there
#content .grid .comingsoon {
background-color: #cfa925;
color: #000000;
width: 108px;
margin: 0px auto;
text-align: center;
font-weight: bold;
padding-top: 2px;
padding-bottom: 2px;
margin-bottom: 9px;
}
#content h2 .comingsoon {
background-color: #ca1717;
color: #444444;
padding-right: 2px;
padding-left: 2px;
margin-left: 5px;
}
mkt_language.php - it doesn't matter where you put this but search for "mkt_THEME_TEMPLATE_FRONTDOOR_SOLDOUT" and place this there
frontdoor.php - this needs to be inserted in the proper place. Search for "// if there is a price at the moment show it"
This is the start of the code that displays the price. The original code displays a price if $price is not equal to 0. Otherwise it displays "Sold Out". We're just going to do an extra check to see if the price is null ("") and display "Coming Soon" if it is.
Replace the "if" ... "else" code with this:
<?php // if there is a price at the moment show it
Post edited 1:48 pm - January 27, 2010 by Market Admin
Another easier method for those less code-savvy is to change the text of "Sold Out" to something like "Coming soon". Then you can just manually disable the item in your Product Manager area for that product. (located under inventory settings)
To change the text, there are two lines that need to be modifed in the "mkt_language.php" file.
Thanks. I had considered that but I also wanted to have a Sold Out capability too. I hand-make small batches of my reels and furling engines so having sold-out is important for those.