Digital experiences for all disciplines
New Landing › How can we help? › Themeforest Theme Support › Neighborhood › Changing 'out of stock' text
New Landing › How can we help? › Themeforest Theme Support › Neighborhood › Changing 'out of stock' text
- This topic has 25 replies, 7 voices, and was last updated 8 years by Mohammad – SUPPORT.
-
Posted in: Neighborhood
-
June 11, 2014 at 11:57 am #81754
Hello,
I’d like to know how to change the ‘Out of Stock’ text on the banner to ‘Sold Out’.
I found this topic: http://support.swiftideas.net/forums/topic/out-of-stock-badge-colortext/ using the search function but the code on there does not work with Neighborhood.
Cheers.
June 11, 2014 at 12:22 pm #81758Hi
You need to chnage it in a few places, see below:
PATH: neighborhood/woocommerce/content-product.php: 70 if (is_out_of_stock()) { 71 72: echo '<span class="out-of-stock-badge">' . __( 'Out of Stock', 'swiftframework' ) . '</span>'; 73 74 } else if ($product->is_on_sale()) {
PATH: neighborhood/woocommerce/wishlist.php: 175 if( $stock_status == 'out-of-stock' ) { 176 $stock_status = "Out"; 177: echo '<span class="wishlist-out-of-stock">' . __( 'Out of Stock', 'swiftframework' ) . '</span>'; 178 } else { 179 $stock_status = "In";
PATH: neighborhood/woocommerce/single-product/product-image.php: 21 if (is_out_of_stock()) { 22 23: echo '<span class="out-of-stock-badge">' . __( 'Out of Stock', 'swiftframework' ) . '</span>'; 24 25 } else if ($product->is_on_sale()) {
– Kyle
June 11, 2014 at 5:06 pm #81882Thanks mate!
June 11, 2014 at 5:42 pm #81889No problem!
– Kyle
July 7, 2014 at 8:54 pm #88769HI,
I want to do this in a child theme. Where do I go in my child them to input these changes?July 8, 2014 at 5:51 am #88833Hi,
Please copy content-product.php with directory structure so you will have content-product.php at /neighborhood-child/woocommerce/content-product.php. Now you can make your desire change.Thanks
September 2, 2014 at 2:24 pm #106352I also want to do this. Which posts do I change? All there it says “out of stock” ?
September 2, 2014 at 2:27 pm #106353See the above references, the file paths are the top line in each of the boxes, along with the line numbers you need to change
– Kyle
July 13, 2015 at 2:33 am #193886Hi I have tried this and it has worked on the products on the products page but when you click on the particular product the one on there has not changed
Are you able to help with this – I’m sure it’s something simple.
Thanks for your help!
July 13, 2015 at 5:57 am #193894Hi,
Please use this plugin https://wordpress.org/plugins/real-time-find-and-replace/ to change any text anywhere.
Thanks
MohammadOctober 10, 2015 at 6:05 pm #219836Please tell me where
neighborhood/woocommerce/single-product/product-image.php is..I could not find it.
October 12, 2015 at 7:09 am #219923Hi,
The full path of this file is /wordpress_instalation_directory/wp-content/themes/neighborhood/woocommerce/single-product/product-image.php. You can find it through FTP software.
Thanks
MohammadOctober 12, 2015 at 9:13 am #219951Thank you!
October 12, 2015 at 9:17 am #219954No problem
December 4, 2015 at 2:17 am #233216Hello.
I changed ‘out of stock’ text to ’SOLD OUT’ in the following places based on your description above and that’s all worked. (in stock -> AVAILABLE too.)
neighborhood/woocommerce/content-product.php:
neighborhood/woocommerce/wishlist.php:
neighborhood/woocommerce/single-product/product-image.php:Now I tried to remove the badge and add this to my custom css:
.out-of-stock-badge {
display:none;
}This also worked, but wishlist.php seems like it doesn’t work.
AVAILABE(In stock)/SOLD OUT(out of stock) is not displayed now.Please advise!
-
Posted in: Neighborhood
You must be logged in and have valid license to reply to this topic.