Can I remove the variant options on the cart page?

Yes, you can. The highlighted areas are the variant title generated by BYOB. 

The theme shown above is Debutify but it should be more or less the same for other themes. 

If you can't handle it, please send us an email and we can give you our professional assistance.

Instructions for Debutify theme:

If you want to change the cart drawer, you can change the cart.ajax.liquid in the theme editor:

1. search for {{ item.variant.title }} (there should be only 1 line)
2. replace {{ item.variant.title }} by {% if item.product.vendor != 'BYOB' %}{{ item.variant.title }}{% endif %}

If you want to change the cart page, you can change the cart-page.liquid in the theme editor. The steps are the same as above.

Results:

Instructions for Dawn theme:

  1. Visit Themes => Actions => Edit Code => Sections. You'll edit a file in the theme code editor 
  2. Look for the file main-cart-items.liquid
  3. Replace the following (search for has_only_default_variant):
    {%- if item.product.has_only_default_variant == false -%}
      {%- for option in item.options_with_values -%}
    <div>
      <dt>{{ option.name }}: </dt>
      <dd>{{ option.value }}</dd>
    </div>
      {%- endfor -%}
    {%- endif -%}
  4. By the following (only 1 line is changed):
    {%- if item.product.has_only_default_variant == false and item.product.template_suffix != 'byob' -%}
      {%- for option in item.options_with_values -%}
    <div>
      <dt>{{ option.name }}: </dt>
      <dd>{{ option.value }}</dd>
    </div>
      {%- endfor -%}
    {%- endif -%}
  5. Done

# Update on 8/12/2021

When a BYOB product is detected on the cart page, the option1 name and value (Name: Bundle1234_....) are hidden by the script tag on the cart page automatically. But some themes may not be supported.

Still need help? Contact Us Contact Us