New Landing How can we help? Themeforest Theme Support Neighborhood Disable price range on startpage.

Viewing 15 posts - 1 through 15 (of 19 total)
  • #185123
    [email protected]
    Member
    Post count: 2

    Hello, how i can disable the pricerange from my starting page if i have different variables per product?

    Would be cool, the visitor only see “from 14,95€” instead of “14,95€-29,95€”

    best

    Attachments:
    You must be logged in to view attached files.
    #185132
    Nishant – SUPPORT
    Spectator
    Post count: 649

    For that WooCommerce files need to be edited.

    #187163
    AndyH
    Member
    Post count: 54

    Is this not possible to change through the Custom CSS editor?

     

    #187629
    David Martin – Support
    Moderator
    Post count: 20834

    Hi Andy,

    Could you post up a link and login to your site?

    Thanks,

    David.

    #187682
    AndyH
    Member
    Post count: 54
    This reply has been marked as private.
    #187855
    David Martin – Support
    Moderator
    Post count: 20834

    Hey,

    When editing core files, you really must use the supplied child theme, this way updates will never remove these changes 🙂

    CSS would not be ideal for this, you would need to edit the actual file and do this at template level.

    However, if you cannot do this CSS like this should get you going in the right direction:

    .price .amount:before {
      content: "From ";
    }
    
    .price .amount:nth-of-type(2) {
    	display: none;
    }
    
    .amount font font {
      display: block!important;
    }
    
    .price font > font {
    	display: none;
    }
    
    .price font>font:nth-of-type(1) {
      display: none;
    }
    

    Thanks,
    David.

    #187868
    AndyH
    Member
    Post count: 54

    Hey David,

    this works perfect. Thank you. But I still have the dash “-” behind the price. How can I remove this through CSS?

    Stupid question: What is the childe theme? I cannot find this.

    Thanks

    Best regards

    #187951
    Kyle – SUPPORT
    Moderator
    Post count: 35880

    To change to ‘From Price’ add this to your chidl theme’s functions.php file:

    // Use WC 2.0 variable price format
    add_filter( 'woocommerce_variable_sale_price_html', 'wc_wc20_variation_price_format', 10, 2 );
    add_filter( 'woocommerce_variable_price_html', 'wc_wc20_variation_price_format', 10, 2 );
    function wc_wc20_variation_price_format( $price, $product ) {
    $min_price = $product->get_variation_price( 'min', true );
    $max_price = $product->get_variation_price( 'max', true );
    if ($min_price != $max_price){
    $price = sprintf( __( 'From %1$s', 'woocommerce' ), wc_price( $min_price ) );
    return $price;
    } else {
    $price = sprintf( __( '%1$s', 'woocommerce' ), wc_price( $min_price ) );
    return $price;
    }
    }

    The child theme is available in the download files from Theme Forest

    – Kyle

    #187984
    David Martin – Support
    Moderator
    Post count: 20834

    Hi Andy & Kyle,

    That CSS works perfectly for me, what page do you still see the ‘-‘?

    As mentioned above the CSS is an imperfect solution for this query, Kyle’s solution is the correct direction!

    Thanks.
    David.

    #187996
    AndyH
    Member
    Post count: 54

    Hey David,

    it works that you just see the lowest price. Very good.

    But normale you see the price at a variation for example: 1,40 € – 2,80 €

    The new code in the Custom CSS delets the higher price but there is still this line “-“. So that you see: 1,40 € –

    http://www.wunderkey.eu/shop/

    Do you get what I mean?

    Thank you

    #188002
    Kyle – SUPPORT
    Moderator
    Post count: 35880

    Did you apply my code?

    – Kyle

    #188040
    AndyH
    Member
    Post count: 54

    Hey Kyle,

    I tried your solution, that I copy your code in the functions.php from the child theme. But this does’nt work at all an the whole website showed strange picture.

    The Solutions from David worked better, I just have the problem which I described above. Just remove the line “-”  than everything is fine.

    Thank you

    Best regards

    #188043
    Kyle – SUPPORT
    Moderator
    Post count: 35880

    Looks good to me? http://d.pr/i/194qy/1KIhHiU3

    – Kyle

    #188054
    AndyH
    Member
    Post count: 54

    Hey Kyle,

    it looks really god from your view! Look at my screenshot!

    How have you translated the site? Because we don’t have an “Expansion pack”, we just called it “Erweiterungspack” and so I guess a translation programm made everything right?

    Do you get what I mean?

     

    Attachments:
    You must be logged in to view attached files.
    #188062
    Kyle – SUPPORT
    Moderator
    Post count: 35880

    Try clearing your cache

    – Kyle

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