New Landing How can we help? Themeforest Theme Support Neighborhood Information about "item is sold" in size dropbdown menu

Viewing 5 posts - 1 through 5 (of 5 total)
  • #253179
    suchjy
    Member
    Post count: 25

    Hello,

    I want to show clients all size’s of my clothes.
    But now WordPress is showing avalibility of product under size dropdown menu.
    Is there posibility to show avalibility inside size menu – right to the size like in https://www.zalando.pl/hilfiger-denim-t-shirt-basic-black-hi122o03t-q11.html

    I make a screenshot and mark what i mean:

    Attachments:
    You must be logged in to view attached files.
    #253183
    suchjy
    Member
    Post count: 25

    “sold” i mean there is no product on that size more. all was sold

    #253356
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    Please go to Admin -> Theme Options -> General Options -> Analytic code -> Insert the given below code and update options.

    
    <script type="text/javascript">
      jQuery( document ).bind( 'woocommerce_update_variation_values', function() {
     
        jQuery( '.variations select option' ).each( function( index, el ) {
          var sold_out = '<?php _e( 'sold out', 'woocommerce' ); ?>';
          var re = new RegExp( ' - ' + sold_out + '$' );
          el = jQuery( el );
     
          if ( el.is( ':disabled' ) ) {
            if ( ! el.html().match( re ) ) el.html( el.html() + ' - ' + sold_out );
          } else {
            if ( el.html().match( re ) ) el.html( el.html().replace( re,'' ) );
          }
        } );
     
      } );
    </script>

    Thanks
    Mohammad

    #253748
    suchjy
    Member
    Post count: 25

    Hey,
    i add this code to: Tracking code – its in page code now. But nothing change at product view: http://www.miomondo.com.pl/produkt/sukienka-chiara/

    #253792
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    Please go to WooCommerce > Settings > Inventory, and ensure that “Hide out of stock items from the catalog” is checked.
    Thanks
    Mohammad

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