• julienmau

    (@julienmau)


    Hello,
    Woocommerce 2.6.8
    Opal Fashion Theme + Child Theme

    When selecting a variation (size in our case) on the single product page, the selectino will work for add to cart but is not “visually displayed” anymore (used to turn the selected size into black).
    Used to work perfectly.
    Not sure since when it doesn’t work (ie which woocommerce update or other plugins made it happen)

    Any idea ?

    Thanks for your help
    Julien

Viewing 4 replies - 1 through 4 (of 4 total)
  • Simba123

    (@simba123)

    Try adding this css to see if it works:

    input[type=”radio”]:checked + label {
    color: black;
    }

    Marc

    (@liomar)

    Hi

    Thanks for this tip. Unfortunatly it doesn’t permit to solve this issue.

    The problem is that the checked attribute never appears in HTML code, even if we click on the size.

    Thanks.

    Marc

    (@liomar)

    Hi
    We solved the issue by adding two lines from line 353 in add-to-cart-variation.js file:

    $( this ).find( 'label' ).removeAttr('style');
    
    if ( exclude && attribute_name === exclude ) {
    all_attributes_chosen = false;
    current_settings[ attribute_name ] = '';
    } else {
    // Add to settings array
    current_settings[ attribute_name ] = $checked_radio.val();
    $checked_radio.next( 'label' ).attr('style','color:white;background-color:black;');
    }

    Thanks

    • This reply was modified 8 years ago by Marc.
    • This reply was modified 8 years ago by Marc.

    Hi,
    How could we proceed to highlight selected option since the last plugin update?
    Thanks

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Selected option not highlighted’ is closed to new replies.