WordPress.org

Ready to get started?Download WordPress

Forums

WooCommerce - excelling eCommerce
Delete "From" price (14 posts)

  1. rrqub
    Member
    Posted 1 year ago #

    I need to delete the "from" price as the lowest price in my variable products set is actually just an option to pay a deposit for the variable products.

    Is there a way to remove this "from" price.

    Alternatively, is there a better way of giving the option of paying a 10% deposit for a product?

    Thank you in advance for any help!

    http://wordpress.org/extend/plugins/woocommerce/

  2. gregfuller
    Member
    Posted 1 year ago #

    You can hide the price entirely by placing this in your theme's style.css file:

    .products .price {
        display: none !important;
    }

    To display the second lowest price would require a modification to a template.

  3. DSaidov
    Member
    Posted 1 year ago #

    .products .price {
        display: none !important;
    }

    This remove the whole price, not only the From:
    Can you tell us what code we need to add to show the <del> price</del> and the final sale price.

    Regards,
    DSaidov

  4. jruez
    Member
    Posted 1 year ago #

    Any luck finding an answer for this?

  5. bheadrick
    Member
    Posted 1 year ago #

    there's this

    This allows you to modify the actual text and not just hide parts of it.

    it goes in your functions.php.

  6. jruez
    Member
    Posted 1 year ago #

    I found this information on another site:

    You should be able to find it here:
    /wp-content/plugins/woocommerce/classes/class-wc-product.php on or around line 704

    /** Functions for getting parts of a price, in html, used by get_price_html */
    function get_price_html_from_text() {
    return '<span class="from">' . _x('From:', 'min_price', 'woocommerce') . ' </span>';

    You should just be able to remove the word or replace it with what you want.

  7. bheadrick
    Member
    Posted 1 year ago #

    This does work, until another woocommerce version is released.

    yeah, don't hack the woocommerce core, that's a bad idea.
    The method I linked to works consistently, and you don't have to redo it every time woocommerce gets an update.

  8. jruez
    Member
    Posted 1 year ago #

    agreed, thanks for your comment. Nothing worse than doing a bunch of work to then lose it after an update.

    thanks again, will try your linked solution

  9. hcd
    Member
    Posted 1 year ago #

    jruez, to remove only "From" text before prices, simply add this to your woocommerce-mod.css.
    I was looking for the same thing and it worked perfectly fine for me.

    #top .price .from {
    display: none !important;
    }

    Note that this will also remove the "From" before your On Sale products, should you have any.

    Cheers!

  10. dsbrennan
    Member
    Posted 1 year ago #

    This worked for me on the category page. How about removing it from the individual product page? http://dsbrennan.com/store/albino-blue-jay/

    You can hide the price entirely by placing this in your theme's style.css file:

    .products .price {
    display: none !important;
    }

  11. sally.wolleat
    Member
    Posted 1 year ago #

    I was just dealing with a similar situation where a client didn't want the lowest price of a variable product to show up in the price field on the shop and individual product pages. This is what I used (it displays only the max price) and goes in the functions.php file.

    Found it here: https://gist.github.com/mikejolley/1600117

    /**
    * Returns max price for variably priced products
    **/
    add_filter('woocommerce_variable_price_html', 'custom_variation_price', 10, 2);
    
    	function custom_variation_price( $price, $product ) {
    		$price = '';
    
    		$price .= woocommerce_price($product->max_variation_price);
    
    		return $price;
    	}
  12. Paxjah
    Member
    Posted 1 year ago #

    Would anyone be able to help me with a similar issue that I'm having? - I'm trying to remove the '<del>' tags from around the 'regular price' when an item is on sale.

    Any help is much appreciated :)

  13. MikeBrits
    Member
    Posted 9 months ago #

    Ok, So this has been bugging me for quite some time because even though the solutions above do work, they didn't do exactly what I needed, maybe this solution will help you.
    Basically, I had 2 types of variable products in the store: One where the weight (and therefore price) changed, and the other where only the flavour changed (and therefore not the price). The problem with setting the From price to display: none is that on the fixed price (but variable flavour) the price would disappear too. So I needed some way to remove the price only if it said From before it. For me, the easiest solution was jQuery:

    $from = $('.summary').find('.from');
    $from.css("display","none");
    $from.next().css("display","none");

    If you have a valid js using jquery file, placing the above code in it removes the from text and the from price only if it is on a page where the from text would be visible. The reason I use the $('.summary') is to ensure it removes it only from within the single product description :
    Hope this helps somebody!

  14. elsonce
    Member
    Posted 7 months ago #

    hi there, i woud like to change the ''from'' text, im a noob on php and i just started my first wordpress woocommerce website....

    can anyone tell me how can i change the 'from' text??

    ps: i tryed to modify the woocommerce .po file but it didnt work...:(

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.