New Landing How can we help? Themeforest Theme Support Neighborhood Change Free price (not the banner)

Viewing 15 posts - 1 through 15 (of 20 total)
  • #137377
    jonorenton
    Member
    Post count: 40

    Hello there, I’m wanting to keep the free banner (which i’ve changed to say NFS) But I want to change the ‘Free!’ on the product page next to the title to ‘Not For Sale’

    Thank you so much!

    #137402
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    Where and what code used by you to change FREE to NFS ? Please share code here so i can modify.
    Thanks
    Mohammad

    #137508
    jonorenton
    Member
    Post count: 40

    In content-product.php I changed

    if (is_out_of_stock()) {
    						
    				echo '<span class="out-of-stock-badge">' . __( 'Sold', 'swiftframework' ) . '</span>';
    		
    			} else if ($product->is_on_sale()) {
    				
    				echo apply_filters('woocommerce_sale_flash', '<span class="onsale">'. __( 'Sale!', 'swiftframework' ).'</span>', $post, $product);		
    						
    			} else if (!$product->get_price()) {
    				
    				echo '<span class="free-badge">' . __( 'NFS', 'swiftframework' ) . '</span>';

    and then in product-image.php I have changed to

    if (is_out_of_stock()) {
    				
    			echo '<span class="out-of-stock-badge">' . __( 'Sold', 'swiftframework' ) . '</span>';
    		
    		} else if ($product->is_on_sale()) {
    				
    			echo apply_filters('woocommerce_sale_flash', '<span class="onsale">'.__( 'Sale!', 'swiftframework' ).'</span>', $post, $product);
    				
    		} else if (!$product->get_price()) {
    			
    			echo '<span class="free-badge">' . __( 'NFS', 'swiftframework' ) . '</span>';
    #137509
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    I am not able to view your website.
    Thanks
    Mohammad

    #137514
    jonorenton
    Member
    Post count: 40
    This reply has been marked as private.
    #137553
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    Pleas edit content-product.php at /neighborhood/woocommerce/. Find this code to edit:-
    <p itemprop="price" class="price"><?php echo $product->get_price_html(); ?></p>
    Thanks
    Mohammad

    #137598
    jonorenton
    Member
    Post count: 40

    Opened content-product.php and I can’t find that snippet. What would I edit if I did find it? Thanks for your time 🙂

    #137600
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    Please find that script at content-single-product.php.
    Thanks
    Mohammad

    #137603
    jonorenton
    Member
    Post count: 40

    That’s not what you said the first time 😀

    It seems I have already changed that bit of code to

    <p itemprop="price" class="price"><?php the_title();?> <?php echo $product->get_price_html(); ?></p>

    So that the price is below the title and both are above the description of the product.

    What I’m wanting is just the word ‘Free!’ to be changed to ‘Not For Sale’ not the prices on every page – only on the products which are technically free.

    Hope that makes sense.

    What I’m trying to achieve is that I can upload a product, set the price as £0 and instead of Free it says Not For Sale which I’ve achieved with the mini banner on the thumb, but not on the product page itself.

    Thank you – You guys work so hard!

    #137671
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    Please provide me wordpress admin login detail so i can check and resolve the issue easily.

    Thanks
    Mohammad

    #137726
    jonorenton
    Member
    Post count: 40
    This reply has been marked as private.
    #137728
    jonorenton
    Member
    Post count: 40
    This reply has been marked as private.
    #137735
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    I have changed it so please check.
    Thanks
    Mohammad

    #137737
    jonorenton
    Member
    Post count: 40

    That’s great! Everytime I want a ‘Not For Sale’ product then I can just set the price as 0 and it will show up as Not For Sale on the product from now?

    Thanks Mohammad!

    #137738
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    Yes, it will display as Not for Sale if you have set price 0.
    Thanks
    Mohammad

Viewing 15 posts - 1 through 15 (of 20 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