How to hide unnecessary size swatch in a product variable

Hello everyone! We are having a problem when we want to delete having size for one variable of our products.

We are selling cloths and the buyer has two options when buying the cloth. One with a stitched which we have three possible sizes. And another one is Unstitched which we don’t have any variables in size.

How could we do it that when you press the button “Unstitched” the size variables disappear? Is there any possible solution? I’ve tried almost everything
site link
https://www.marjjan.com/products/test-afsana-rtw-01?variant=43826493128927
Thank you

Yes please what should I do to resolve this problem , need your expertise.

Hello @dfmdigitals thanks for the response, I am sorry I do not have the rights to add you as a staff but I can provide you the required code.

Thanks here I am sending the product-form, theme, and main-product code If you need anything else please feel free to ask. first one is product-form

{%- assign product_form_id = 'product-form-' | append: pr_se_id -%}
{%- liquid 
assign pr_variants = product.variants
assign PR_buy_pr = false
if bk_stts.show_dynamic_checkout and isExternal == false and isProductAvailable
  assign PR_buy_pr = true 
endif
assign choose_an_option = 'products.product.choose_an_option' | t
assign date_in = settings.date_in
assign class_frm = 't4s-form__product has--form__swatch'
if isProductDefault
  assign class_frm = 't4s-form__product'
endif
if settings.sticky_atc and type == 'main'
  assign class_frm =  class_frm | append:' is--main-sticky'
else if settings.sticky_atc and type == 'main_sticky'
  assign class_frm =  class_frm | append:' is--atc-sticky'
endif
 
assign color_swatch    = 'disabled-'
assign color_mode      = bk_stts.color_mode
assign selector_mode   = bk_stts.selector_mode
assign stt_color_ck    = settings.color_ck | deafult:';'
assign color_ck        = stt_color_ck | append:',color,colors,couleur,colour' |remove:';,'
assign get_color       = color_ck | downcase | replace: ' ,', ',' | replace: ', ', ',' | split: ',' | uniq
assign color_mode_list = 'color, color is-sw-cl__round, variant_image, variant_image is-sw-cl__round' |split:', '
if color_mode_list contains color_mode
  assign color_swatch  = 'is-sw__color '
endif
assign current_variant_available = current_variant.available
assign use_incoming_mess = settings.use_incoming_mess
assign current_variant_incoming = false
if current_variant.inventory_quantity <= 0 and current_variant.inventory_management == 'shopify' and current_variant.incoming
assign current_variant_incoming = true
endif -%}

{%- if color_mode == 'dropdown' or selector_mode == 'dropdown' %}{% endif -%}

  

    {%- form 'product', product, id: product_form_id, data-productid: product.id, class:class_frm, novalidate: 'novalidate', data-type: 'add-to-cart-form', data-disable-swatch:isProductDefault -%}
        
        {{- form | payment_terms -}}

        {%- if isProductDefault -%}
          
          {%- if advance_pr_type != blank %}{% render 'choose_style', advance_pr_type:advance_pr_type, title:advance_label, pid:product.id %}{% endif -%}

        {%- else -%}

           {{ 'swatch.css' | asset_url | stylesheet_tag }}
           

          

            
            {%- if advance_pr_type != blank %}{% render 'choose_style', advance_pr_type:advance_pr_type, title:advance_label, pid:product.id %}{% endif -%}
              
            {%- for option in product.options_with_values -%}

              {%- liquid 
              assign option_index   = 'option' | append:forloop.index
              assign selected_value = current_variant[option_index]
              assign option_name    = option.name
              assign name_downcase  = option_name | downcase -%}
              
              {%- if get_color contains name_downcase -%}
                
                

                  #### {{option_name}}: {{selected_value | default:choose_an_option }}{% if name_sizeg == name_downcase %}{{html_sizeg}}{% endif %}
                  
                    {%- if color_mode != 'dropdown' -%}
                      {%- for value in option.values -%}
                      
{{ value }}

                      {%- endfor -%}

                    {%- else -%}
                      
                      

                        

                        
                           {{selected_value | default:choose_an_option }}
                           
                        

                        
                           {%- for value in option.values -%}
                           
{{ value }}

                           {%- endfor -%}
                        

                      

                    {%- endif -%}
                  

                

  
              {%- else -%}

                
                  #### {{option_name}}: {{selected_value | default:choose_an_option }}{% if name_sizeg == name_downcase %}{{html_sizeg}}{% endif %}
                  
                    {%- if selector_mode != 'dropdown' -%}
                      {%- for value in option.values -%}
                      
{{ value }}

                        
                      {%- endfor -%}
                      {%- if product.tags contains 'test' -%} 

 **Advance payment has to be made for stitched orders**

{%- endif -%}
    
               
     
                    {%- else -%}
                      
                      

                        

                        
                           {{selected_value | default:choose_an_option }}
                           
                        

                        
                           {%- for value in option.values -%}
                           
{{ value }}

                           {%- endfor -%}
                        

                      

          
                    {%- endif -%}
                         
                  

                

              {%- endif -%}

            {%- endfor -%}
          

        {%- endif -%}

        {%- if use_incoming_mess and current_variant_incoming and pr_variants.size == 1 and current_variant.next_incoming_date != blank -%}
            {%- assign format_date = current_variant.next_incoming_date | date: date_in -%}
            {% if current_variant_available %}{{ 'products.product_single.will_not_ship_until_html' | t: date:format_date }}{% else %}{{ 'products.product_single.will_be_in_stock_after_html' | t: date:format_date }}{% endif %}

        {%- elsif use_incoming_mess and pr_variants.size > 1 -%}
            {%- liquid
            assign format_date = current_variant.next_incoming_date | date: date_in
            unless format_date 
              assign format_date = '19041994'
            endunless -%}
            {{ 'products.product_single.will_not_ship_until_html' | t: date:format_date }}{{ 'products.product_single.will_be_in_stock_after_html' | t: date:format_date }}

        {%- endif -%}
        {{ 'button-style.css' | asset_url | stylesheet_tag }}
        
        
        {{- html_price -}}
    
         
          

             {%- if isExternal -%}

                {{external_title}}
                {%- if bk_stts.enable_wishlist or bk_stts.enable_compare -%}
                
                {%- render 't4s_wis_cp', product:product, bk_stts:bk_stts -%}
                {%- endif -%}

             {%- else -%}

                {%- if bk_stts.show_qty and isProductAvailable -%}
                
 
                  
                  
                  
                

                {%- else -%}
                 
                {%- endif -%}

                {%- if bk_stts.enable_wishlist or bk_stts.enable_compare -%}
                
                {%- render 't4s_wis_cp', product:product, bk_stts:bk_stts -%}
                {%- endif -%}

                

            {%- endif -%}
          

          {%- if PR_buy_pr and type != 'main_sticky' %}{{- form | payment_button -}}{% endif -%}
          {%- if settings.use_notify_me -%}{%- endif -%}
        

    {%- endform -%}

    {%- unless isProductDefault or type == 'main_sticky' -%}
    
    
    {%- endunless -%}

    {%- if bk_stts.ani != 'none '-%}{%- endif -%}
    
  

 

{%- if PR_buy_pr and current_variant_available != true and type != 'main_sticky' -%}{% endif -%}

second is theme file


{%- liquid
  if settings.use_rtl == '1'
    assign isRTL = true
  elsif settings.use_rtl == '2' and settings.list_rtl contains request.locale.iso_code
    assign isRTL = true
  else
    assign isRTL = false
  endif
  assign body_img = settings.body_bg_image
  if body_img != blank and settings.general_layout == 'boxed'
    assign class_lazy = 'lazyloadt4s'
  endif -%}
{%- capture class_html -%}
t4sp-theme t4s-wrapper__{{settings.general_layout}} rtl_{{isRTL}} swatch_color_style_{{settings.swatch_color_style}} pr_border_style_{{settings.pr_border_style}} pr_img_effect_{{settings.pr_img_effect}} enable_eff_img1_{{settings.enable_eff_img1}} badge_shape_{{settings.badge_shape}} css_for_wis_app_{{settings.enable_css_wis}}{% if settings.use_cus_lz and settings.cus_lz %} t4s-lzcus-true{% endif %} shadow_round_img_{{settings.enable_shadow_round_img}} t4s-header__{{settings.header_design}} is-remove-unavai-{{settings.variant_remove}} t4_compare_{{settings.enable_compe}} is-catalog__mode-{{settings.catalog_mode}}{% if settings.type_qv == '1' %} t4s-sidebar-qv{% endif %} t4s-cart-count-{{cart.item_count}} t4s-pr-ellipsis-{{settings.enable_pr_ellipsis}}
{%- endcapture -%}

  
    
    
    
    
    
    
    
    {%- if settings.favicon != blank %}{% endif -%}
    {%- if settings.favicon_apple != blank %}{% endif -%}

    {%- if settings.font_source == '1' and settings.fnt_fm_sp1.system? == false or settings.fnt_fm_sp2.system? == false or settings.fnt_fm_sp3.system? == false -%}
      
    {%- endif -%}

    {%- capture seo_title -%}
      {%- if template == 'search' and search.performed == true -%}{{ 'search.general.heading' | t: count: search.results_count }}: {{ 'search.results_with_count_and_term' | t: terms: search.terms, count: search.results_count }}{%- elsif template == 'search.wishlist' %}{{ 'wishlist_page.meta' | t }}{%- elsif template == 'search.compare' %}{{ 'compare_page.meta' | t }}{%- else -%}{{ page_title }}{%- endif -%}
      {%- if current_tags -%}{%- assign meta_tags = current_tags | join: ', ' %} – {{ 'general.meta.tags' | t: tags: meta_tags -}}{%- endif -%}
      {%- if current_page != 1 %} – {{ 'general.meta.page' | t: page: current_page }}{%- endif -%}
      {%- assign escaped_page_title = page_title | escape -%}
      {%- unless escaped_page_title contains shop.name %} – {{ shop.name }}{%- endunless -%}
    {%- endcapture -%}
    
    

    {%- liquid 
      assign t_name = request.page_type
      assign body_img = settings.body_bg_image
      render 'meta-tags',t_name:t_name -%}
    
    
    
    {{ content_for_header }}
    {%- render 'head_assets',t_name:t_name,isRTL:isRTL -%}
    
  

  
    {{ "accessibility.skip_to_text" | t }}
    

    
      {%- render 'header',t_name:t_name -%}

      

      
    

      
        - {{ 'accessibility.refresh_page' | t }}
      

    {%- render 'render_bottom' -%}
    {% include 'custom-fonts' %}
  


I thought this would be a helping hand from you like most of the community members do.

no problem :slightly_smiling_face:

okay my budget is $10.

via payoneer

can you send me your email address so I can send you the files there

please check your mail

please check your email