| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | Mark Forums Read | User manuals | Login |
How do I change the "out of stock" message to "sold out"? | ||||
|
|
Thread Tools | Search this Thread |
#21
|
|||||||||
|
|||||||||
Re: How do I change the "out of stock" message to "sold out"?
All you have to do is add an extra field, then in products_t.tpl (products_list.tpl, whichever you use) and product.tpl (for 4.3.x it may be in product_details.tpl) call that extra field and place an if statement to show green or red text/image depending on the value of the field. If you search the forum for extra fields you find many post how to call it in different files and for different versions
__________________
Steve Stoyanov CFLSystems.com Web Development |
|||||||||
#22
|
|||||||
|
|||||||
Re: How do I change the "out of stock" message to "sold out"?
Please provide me the product.tpl and products.tpl file both.
|
|||||||
#23
|
|||||||||
|
|||||||||
Re: How do I change the "out of stock" message to "sold out"?
In skin1/main/product_details.tpl the code that was added to create the extra field in your "Add new product" is as follows. You would need to add it where you want your extra field to appear
Code:
In skin1/customer/main/product.tpl this code was added Code:
In skin1/customer/mainproducts.tpl this was added Code:
Don't ask me where to place the code as mine would be different from yours as our products layout is different. You would also need to create lanuage variables |
|||||||||
#24
|
|||||||||
|
|||||||||
Re: How do I change the "out of stock" message to "sold out"?
Does anyone know how I can add a 3rd condition?
If stock indicator = -1 I would like it to display "No longer Available" This would be used if I set products to "Hidden but available for sale" , for products that are discontinued Thanks your help would be appreciated |
|||||||||
#25
|
|||||||||
|
|||||||||
Re: How do I change the "out of stock" message to "sold out"?
{if $product.stock_indicator ge 1}
CONDITION IF MORE THEN 1 {elseif $product.stock_indicator lt 0} CONDITION IF LESS THEN 0 {else} ALL OTHER {/if}
__________________
Steve Stoyanov CFLSystems.com Web Development |
|||||||||
#26
|
|||||||||
|
|||||||||
Re: How do I change the "out of stock" message to "sold out"?
Thanks Steve
Unfortunately it is not working. When I make my "stock indicator" field -1 then the product does not display at all. The stock indicator does not like -1 for some reason. Any suggestion for a fix? |
|||||||||
#27
|
|||||||||
|
|||||||||
Re: How do I change the "out of stock" message to "sold out"?
have you got it set to disable out of stock products? in the settings?
__________________
X-Cart version 5 (Previously 3.5-4) Previous Versions included BCSE Reward Points Mod Altered Cart On Sale Mod Wordpress Plugin Please don't PM me for support. I help where I can on the forum and your question will more likely be answered there. Shout me a Coffee! |
|||||||||
#28
|
|||||||||
|
|||||||||
Re: How do I change the "out of stock" message to "sold out"?
Quote:
Hi Amy This should not matter because the "stock indicator" is a custom field that was added and if set on 0 it will display a language variable "Pre-Order" and if 1 it will display "in stock now" and what I am trying to do now is add a third condition if -1 it must display "discontinued". For some reason it does not display the product at all when it is set to -1 |
|||||||||
#29
|
|||||||||
|
|||||||||
Re: How do I change the "out of stock" message to "sold out"?
sorry, misunderstood, I thought you were talking about the standard stock field.
I'd maybe look at how it's stored in the db, is it a text field or something? maybe it can't accept negative numbers? I don't do a lot with extra fields so i'm not much help i'm afraid,
__________________
X-Cart version 5 (Previously 3.5-4) Previous Versions included BCSE Reward Points Mod Altered Cart On Sale Mod Wordpress Plugin Please don't PM me for support. I help where I can on the forum and your question will more likely be answered there. Shout me a Coffee! |
|||||||||
#30
|
|||||||||
|
|||||||||
Re: How do I change the "out of stock" message to "sold out"?
Quote:
Yes it is an text field, I think? {/if} <tr> {if $geid ne ''}<td width="15" class="TableSubHead"><input type="checkbox" value="Y" name="fields[stock_indicator]" /></td>{/if} <td class="FormButton" nowrap="nowrap">{$lng.lbl_stock_indicator}</td> <td class="ProductDetails"> <input type="text" name="stock_indicator" size="2" value="{$product.stock_indicator}" /> </td> </tr> |
|||||||||
|
Thread Tools | Search this Thread |
|
|
|
|||
X-Cart forums © 2001-2020
|