New Landing How can we help? Themeforest Theme Support Neighborhood "from £x/xx " price instead of "£xx-£XX"

Viewing 6 posts - 1 through 6 (of 6 total)
  • #176141
    MarieWorks
    Member
    Post count: 225

    Hi,

    Is it possible to change the way product prices are shown on the catalogue pages so that it reads “from £xx.xx” (the lowest cost variant) instead of showing the price range in the “£xx.xx to £XX.XX” ?

    Seems like it should be a simple change to make?

    Thanks

    C.

    #176266
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    Please paste this code at functions.php of child theme.

    <?php
    function patricks_custom_variation_price( $price, $product ) {
    
    	$target_product_types = array( 
    		'variable' 
    	);
    
    	if ( in_array ( $product->product_type, $target_product_types ) ) {
    		// if variable product return and empty string
    		return '';
    	}
    
    	// return normal price
    	return $price;
    }
    add_filter('woocommerce_get_price_html', 'patricks_custom_variation_price', 10, 2);
    
    ?>

    Thanks
    Mohammad

    #176299
    MarieWorks
    Member
    Post count: 225

    Hi Mohammad,

    Thats great !

    Thanks for your help – much appreciated,

    C

    #176303
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    You most welcome.

    Thanks
    Mohammad

    #308760
    gflwrg
    Member
    Post count: 113

    Hello, were in functions.php should this be posted please. Need a the same solution 🙂

    #308772
    David Martin – Support
    Moderator
    Post count: 20834

    Please install and activate the supplied child theme, inside the child theme functions.php file simply paste it before the end of the file.

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