Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1022639
    David
    Participant

    Hi there X!

    I would like to know the following:
    – how can I make xtheme hide the price of variaties on the main product page?

    So if i now add a variable product, and add different prices for varieties for example €49 and €59, the main product page shows the price like this:

    €49,00-€59,00

    I would like it to only change into €59 when the €59 variant is selected through he drop-down.

    Please advise me with a fix for this issue, many thanks!

    http://prntscr.com/bbj9rs

    #1022641
    David
    Participant
    This reply has been marked as private.
    #1022956
    Joao
    Moderator

    Hi David,

    Thanks for writing in! To assist you with this issue, we’ll first need you to provide us with your URL. This is to ensure that we can provide you with a tailored answer to your situation. Once you have provided us with your URL, we will be happy to assist you with everything.

    Thanks

    Joao

    #1023053
    David
    Participant
    This reply has been marked as private.
    #1023653
    Rad
    Moderator

    Hi there,

    Please try implementing the recommended code here 🙂

    https://community.theme.co/forums/topic/woo-commerce-tweaks/#post-139252

    Then let us know how it goes 🙂

    Thanks!

    #1023770
    David
    Participant

    Hi Rad,

    none of these codes seem to do the trick. Please see Screenshot.

    http://prntscr.com/bbrdv7

    #1024826
    Rad
    Moderator

    Hi there,

    Please add this latest one,

    jQuery ( function($) {
    
    var price_container = $( '.single-product .product-type-variable .entry-summary div[itemprop="offers"] .price' );
    
    function change_price ( price ) {
    
    $( price_container ).empty();
    $( price ).appendTo( price_container );
    
    }
    
    var default_price = $( price_container).find( '.amount:first-child' ).clone();
    
    if ( $(default_price).length > 0 ) {
    
    change_price ( default_price );
    
    $('.variations select').on('change', function() {
    
    var new_price = $('.product-addon .single_variation > .price > .amount').clone();
    
    if ( $( new_price ).length > 0 ) {
    
    change_price ( new_price );
    
    } else {
    
    change_price ( default_price );
    
    }
    
    } );
    
    }
    
    } );

    Cheers!

  • <script> jQuery(function($){ $("#no-reply-1022639 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>