Post edited 1:56 pm – January 27, 2010 by mhackney Post edited 1:57 pm – January 27, 2010 by mhackney Post edited 1:57 pm – January 27, 2010 by mhackney Post edited 1:58 pm – January 27, 2010 by mhackney
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
Don't forget to add this block to all of the files you copied from frontdoor.php – to support product categories in the menubar for instance.
You can see this in operation on my site at http://www.eclecticangler.com/store and click on the Reelsmithing menu (at least until I price the book!).
Hope this helps some people.
Cheers,
Michael
Note: my store location is going to change to the root, so if the above links don't work, use http://www.eclecticangler.com
1:47 pm January 27, 2010
Market Admin
Admin
posts 4728
2
Post edited 6: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.
Lines #51 and #78
1:54 pm January 27, 2010
mhackney
Groton, MA USA
Member
posts 37
3
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.