| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | User manuals | Login |
How do I change the "out of stock" message to "sold out"? | ||||
|
|
Thread Tools | Search this Thread |
#31
|
|||||||||
|
|||||||||
Re: How do I change the "out of stock" message to "sold out"?
I think I got it! I tested it on the old code and I get the same results. It seems like every time a -1 is in stock indicator it auto disable the product from my site.
I personally think it has something to do with the part below in "BOLD"?? Am I correct? {/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> |
|||||||||
#32
|
|||||||||
|
|||||||||
Re: How do I change the "out of stock" message to "sold out"?
No, this is not it.
What is the condition you are putting in for -1?
__________________
Steve Stoyanov CFLSystems.com Web Development |
|||||||||
#33
|
|||||||||
|
|||||||||
Re: How do I change the "out of stock" message to "sold out"?
Steve
I am using your code that you supplied on my question when I asked that I want a 3rd condition. The BOLD one below is suppose to appear when I have my stock indicator set to -1 As soon as I set the stock indicator field to -1 it then disable that product from my shop front, so my guess it there must be some other code somewhere that makes that happen as this is what I originally wanted when I asked BCS to set it up for me. Obviously now there is a change of plan and I don▓t want the -1 to disable the product from my shop. The question is where would that piece of code be that disables my product as soon as -1 is in stock indicator? {if $product.stock_indicator ge 1} <span style="color: green; font-size: 12px; font-weight: bold;">{$lng.lbl_product_in_stock_now|regex_replac e:"/<br[^>]*>/iS":" "}</span> {elseif $product.stock_indicator lt 0} <span style="color: red; font-size: 12px; font-weight: bold;">{$lng.lbl_discontinued|regex_replace:"/<br[^>]*>/iS":" "}</span> {else} <span style="color: orange; font-size: 12px; font-weight: bold;">{$lng.lbl_out of stock|regex_replace:"/<br[^>]*>/iS":" "}</span> {/if} |
|||||||||
#34
|
|||||||||
|
|||||||||
Re: How do I change the "out of stock" message to "sold out"?
I would guess the code that disables it in the storefront (I assume that means it doesn't appear) is in a php file.
Does it set the status of the product, to disabled or anything, or is the status still avaailable but it still doesn't appear? If it changes the status, i would guess there's something in the product modify code,so when it changes product details, it also changes the status based on the extra field, if it doesn't change the status, i'd look in the files that select the products for display and see if it's excluding disabled products and those with -1 in the extra field, hth
__________________
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! |
|||||||||
#35
|
|||||||||
|
|||||||||
Re: How do I change the "out of stock" message to "sold out"?
Quote:
Hi Amy I have been at it since this morning to try and find out where is the piece of code that disables the product from storefront when -1 is in stock indicator and am still at it and can't find it. Strange, it does not change the status of the product as it still stay as available for sale but the product just disappears from storefront as if it goes invisible once stock indicator is -1 |
|||||||||
#36
|
|||||||||
|
|||||||||
Re: How do I change the "out of stock" message to "sold out"?
In that case I would expect that the php file that selects the products for display from the database is also excluding products with -1
Have yu used webmaster mode to see if you can see which file selects the products and see if there'sanything there?
__________________
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! |
|||||||||
|
#37
|
|||||||||
|
|||||||||
Re: How do I change the "out of stock" message to "sold out"?
Tried it all - It's like a hidden gem!
|
|||||||||
#38
|
|||||||||
|
|||||||||
Re: How do I change the "out of stock" message to "sold out"?
amy2003 is right - it is most likely the php file that sets the indicator value. You need to look in product.php and products.php. There will be a SQL statement selecting all extra fields and their values and then some line that sets the indicator based on its extra field value (code could be in /modules/Extra_Fields/extra_fields.php or in one of the products related functions in include/func/func.product.php). There could also be a clause in the SQL to say "select all products where indicator is greater then 0" so like amy2003 says products with less then 0 indicator may not be selected at all
__________________
Steve Stoyanov CFLSystems.com Web Development |
|||||||||
|
#39
|
|||||||||
|
|||||||||
Re: How do I change the "out of stock" message to "sold out"?
Quote:
Firstly - Thank you Steve and Amy for trying to help me! Much appreciated! I found in /include/func/func.product.php the following and not sure what is does or if it can be changed but the word stock_indicator is present so I guess this must be it as stock_indicator is a custom field that was added and I do not know of anything else in xcart with that name #BCSE Begin if($current_area == 'C') $where[] = "$sql_tbl[products].stock_indicator >= 0"; #BCSE End It is very hard looking for something if you are not sure what it is you are looking for |
|||||||||
#40
|
|||||||||
|
|||||||||
Re: How do I change the "out of stock" message to "sold out"?
This is the pice of code that tells the script only products with indicator 0 and up to be included. If you comment it out all products will be included. Place # in front of the lines
__________________
Steve Stoyanov CFLSystems.com Web Development |
|||||||||
|
|||
X-Cart forums © 2001-2020
|