How can I add multi-line text below the Add to Cart button in Dawn theme?

Hello everyone,

I’m using Dawn theme (version 5.0.0) and I want to add a Multi-line text bellow the Add to cart button for each product, but I don’t want to use the Collapsible Row.

The theme blocks available for the Product information are the following:

  • Text
  • Custom Liquid
  • Collapsible Row
  • Pop-up
  • Product Rating

The only options I see, that can maybe cover my needs are the Text (which I tried to use but does not accept Multi-line text as dynamic source) and the Custom Liquid with any specific kind of code.

Note: I can not use the the product’s description from the product’s admin page, because I’m using it to display the color swatches above the Add to Cart button - This way I can have individual pages for each product’s color, which benefits in many aspects.

Can you help me with this survey?

Thank you in advance.

Hi @King-Kang , open your file (Sections > main-product.liquid). Find this element:


And right bellow that add:

{{section.settings.text_area}}

And last step, go to the bottom of the file, you’ll see schema part, starts with ‘{% schema %}’ and ends with '{% endschema %}. Find last element:

{
      "type": "range",
      "id": "padding_bottom",
      "min": 0,
      "max": 100,
      "step": 4,
      "unit": "px",
      "label": "t:sections.all.padding.padding_bottom",
      "default": 36
    }

And just bellow that element add:

{
      "type": "range",
      "id": "padding_bottom",
      "min": 0,
      "max": 100,
      "step": 4,
      "unit": "px",
      "label": "t:sections.all.padding.padding_bottom",
      "default": 36
    },
{
"type":"textarea",
"id":"text_area",
"label":"My custom Field"
}

Hope this helps :slightly_smiling_face:

1 Like

Hello @MarinaPetrovic ,

Thank you very much for helping me with this survey. I followed your instructions carefully. I just want to make sure, in the last step the only thing you want me to paste is

,
{
"type":"textarea",
"id":"text_area",
"label":"My custom Field"
}

I guess it’s not to paste also this… right?

{
      "type": "range",
      "id": "padding_bottom",
      "min": 0,
      "max": 100,
      "step": 4,
      "unit": "px",
      "label": "t:sections.all.padding.padding_bottom",
      "default": 36
}

So after paste the code that starts with the comma, right before

]
}
{% endschema %}

I saved.

Unfortunately it didn’t show anything in the product page customize…

Not sure if I did something wrong or if something is missing. But I think that the path you are providing will reach to the solution :slightly_smiling_face:

That’s right @King-Kang , just pay attention that comma doesn’t go in a new line, but right after previous element, like this:

{
      "type": "range",
      "id": "padding_bottom",
      "min": 0,
      "max": 100,
      "step": 4,
      "unit": "px",
      "label": "t:sections.all.padding.padding_bottom",
      "default": 36
    },
{
"type":"textarea",
"id":"text_area",
"label":"My custom Field"
}
1 Like

Exactly like I did :slightly_smiling_face:
But unfortunately it does not output anything…

So, when you open customizer and go to the product page - you can’t see the field labeled “My custom field”? :thinking:

1 Like

Yes, It does not show.

Oh, it won’t show there. Please click on product information (first main item) and it should be displayed. :slightly_smiling_face:

1 Like

Oh I see, you are right, it shows!

But It does not allow me to use insert dynamic source so It can gathers the admin product Multi-line text - like the collapsible rows do in the row content. We are really near to the solution :slightly_smiling_face:

Thank you for helping me so far

Thanks to you @MarinaPetrovic I have found what I was looking for, all I had to do was replace the code you gave for this one

{{section.settings.content}}

,
{
  "type":"richtext",
  "id":"content",
  "label":"Product description"
}

@King-Kang Awesome!!! Glad I could help! :slightly_smiling_face:

Hi. What if there is no insert dynamic source button at the text headings? What Can I do to add it?