Home Forums WoodMart support forum Remove price variation of a product from shop page, category and single product

Remove price variation of a product from shop page, category and single product

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #118757

    wurlnet
    Participant

    Hi

    I have set my products into categories, each product will have price variations and other variations that will affect the price before it is added to basket, this is fine.

    However I would like to remove the price variation (i.e. £35 – £70) from below the Product heading. I would like this change to affect everywhere where the single product would be displayed, but only for items that have variations.

    i.e.

    Items with variations, price variation is removed.

    Items with fixed price (Simple product), price variation is displayed

    Many thanks!

    Attachments:
    You must be logged in to view attached files.
    #118771

    Hello,

    It is not possible to show the price range in variation and hide on a simple product with custom CSS. Such modification would require complicated Woocommerce template customization what is not covered by our support.

    Best Regards

    #118789

    wurlnet
    Participant

    Thanks for your reply. I believe it is possible to hide the price range for both variation and a simple product, could you provide the custom CSS for this?

    **I searched the forum before raising the ticket and found a thread / code from xtemos for doing this with the Basel theme, but i couldn’t make it work for Woodmart**

    Thanks

    #118823

    Hello,

    Please have a look at the screenshot http://prntscr.com/nc0x7a

    If you accept this add this code to the Theme Settings > Custom CSS > Global:

    body .product-image-summary .summary-inner>.price{
    display:none;
    }

    Best Regards

    #118882

    wurlnet
    Participant

    Hi Elise – Unfortunately this code has no affect?

    #118921

    Hello,

    Please provide me the screen of code in Custom CSS > Global and product page URL for checking.

    Best Regards

    #242644

    Oriol Duarri
    Participant

    Hi Elise,

    I want to remove the highest price of the variable products, for example,

    5€-45€

    I want just to show the 5€, is it possible? thanks!

    I used this code at the child theme, but I want to know if woodmart theme have this functionallity integrated:

    function wc_varb_price_range( $wcv_price, $product ) {

    $prefix = sprintf(‘%s: ‘, __(‘From’, ‘wcvp_range’));

    $wcv_reg_min_price = $product->get_variation_regular_price( ‘min’, true );
    $wcv_min_sale_price = $product->get_variation_sale_price( ‘min’, true );
    $wcv_max_price = $product->get_variation_price( ‘max’, true );
    $wcv_min_price = $product->get_variation_price( ‘min’, true );

    $wcv_price = ( $wcv_min_sale_price == $wcv_reg_min_price ) ?
    wc_price( $wcv_reg_min_price ) :
    ‘ . wc_price( $wcv_reg_min_price ) . ‘‘ . ‘<ins>’ . wc_price( $wcv_min_sale_price ) . ‘</ins>’;

    return ( $wcv_min_price == $wcv_max_price ) ?
    $wcv_price :
    sprintf(‘%s%s’, $prefix, $wcv_price);
    }

    add_filter( ‘woocommerce_variable_sale_price_html’, ‘wc_varb_price_range’, 10, 2 );
    add_filter( ‘woocommerce_variable_price_html’, ‘wc_varb_price_range’, 10, 2 );

    #242706

    Hello,

    Please remove all your code and find the option in the Theme Settings > Shop > find “Hide “to” price”

    This option has been recently added.

    Best Regards

Viewing 8 posts - 1 through 8 (of 8 total)