New Landing How can we help? Themeforest Theme Support Neighborhood Changing 'out of stock' text

Viewing 15 posts - 1 through 15 (of 26 total)
  • #81754
    catseye
    Member
    Post count: 43

    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.

    #81758
    Kyle – SUPPORT
    Moderator
    Post count: 35880

    Hi

    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

    #81882
    catseye
    Member
    Post count: 43

    Thanks mate!

    #81889
    Kyle – SUPPORT
    Moderator
    Post count: 35880

    No problem!

    – Kyle

    #88769
    tarakennymv
    Member
    Post count: 53

    HI,
    I want to do this in a child theme. Where do I go in my child them to input these changes?

    #88833
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    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

    #106352
    MH
    Member
    Post count: 3

    I also want to do this. Which posts do I change? All there it says “out of stock” ?

    #106353
    Kyle – SUPPORT
    Moderator
    Post count: 35880

    See 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

    #193886
    emair
    Member
    Post count: 19

    Hi 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

    SKIRTS

    Are you able to help with this – I’m sure it’s something simple.

    Thanks for your help!

    #193894
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    Please use this plugin https://wordpress.org/plugins/real-time-find-and-replace/ to change any text anywhere.
    Thanks
    Mohammad

    #219836
    zigame
    Member
    Post count: 13

    Please tell me where
    neighborhood/woocommerce/single-product/product-image.php is..

    I could not find it.

    #219923
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    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
    Mohammad

    #219951
    zigame
    Member
    Post count: 13

    Thank you!

    #219954
    Kyle – SUPPORT
    Moderator
    Post count: 35880

    No problem

    #233216
    zigame
    Member
    Post count: 13

    Hello.

    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!

Viewing 15 posts - 1 through 15 (of 26 total)

You must be logged in and have valid license to reply to this topic.

License required for one of the following items
Login and Registration Log in · Register