Can you advise me how to limit the number of characters on the Cart Note in the Debut theme?

Topic summary

A user needed to limit the cart note field to 320 characters in Shopify’s Debut theme and was unsure how to modify the cart-template.liquid file.

Solution provided:

  • Add maxlength="320" attribute to the textarea element
  • The modification should be applied to the <textarea> tag with id “CartSpecialInstructions”

Outcome:

  • The solution successfully resolved the issue for the original poster
  • Another user confirmed the same approach works for the Dawn theme when applied to the ‘main-cart-footer.liquid’ file

Status: Resolved - The thread reached a successful conclusion with a working code solution.

Summarized with AI on November 9. AI used: claude-sonnet-4-5-20250929.

I am trying to limit the max character count to 320 on my “cart note” in the Debut theme. I believe this is done in the cart-template.liquid but am unsure what code adjustments to make. Any suggestions would be greatly appreciated.

{%- if section.settings.cart_notes_enable -%}

{{ 'cart.general.note' | t }} {{ cart.note }}
{%- endif -%}

{%- assign cartDiscounts = 'template ’ | split: ’ ’ -%}
{%- if cart.cart_level_discount_applications.size > 0 -%}
{%- assign cartDiscounts = cart.cart_level_discount_applications -%}
{%- endif -%}
<div{% if cart.cart_level_discount_applications.size == 0 %} class=“hide”{% endif %} data-cart-discount-wrapper>

{%- for discount_application in cartDiscounts -%} {% include 'icon-saletag' %}{{ 'customer.order.discount' | t }}:{{- discount_application.title -}} -{{ discount_application.total_allocated_amount | money }} {%- endfor -%}

Hello @lisamkg

Try updating below line of code from your above code


with


Please hit LIke and mark as a solution if this helps

2 Likes

Thank you so much @JasmeetVT14313 !

This did the trick! I aqppreciate your help very much. :raising_hands:

1 Like

Worked for me also on the dawn theme editing ‘main-cart-footer.liquid’.

Thank you!

1 Like