WordPress.org

Support

Support » Plugins and Hacks » [Plugin: WooCommerce – excelling eCommerce] Delete "From" price

[Plugin: WooCommerce – excelling eCommerce] Delete "From" price

  • 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/

Viewing 13 replies - 1 through 13 (of 13 total)
  • 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.

    .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

    Any luck finding an answer for this?

    there’s this

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

    it goes in your functions.php.

    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.

    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.

    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

    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!

    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;
    }

    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;
    	}

    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 🙂

    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!

    elsonce

    @elsonce

    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…:(

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘[Plugin: WooCommerce – excelling eCommerce] Delete "From" price’ is closed to new replies.