d
Topic
Posts:
7
5 days ago

HTML Coding in Product Title crashes cart page

Hey guys,

we wanted to show our product titles in different sections and font sizes etc. (example: acáo Quitte-Zitrone <br> <font size="3">12 x 250ml</font> <br> <font size="2">zzgl. Pfand</font>), so we used HTML coding which works fine. We just saw that the new titles seem to crash our cart page in Debut theme (see pictures: 1. picture: before HTML coding in product title). Can anybody help???

i
Replies
Posts:
2
4 days ago

Is the problem that the html code inside the titles effect the buttons?

Posts:
7
4 days ago

Yes, definitely! With products without html codes inside the titles everything works out fine...

Posts:
442
4 days ago

Hallo Jenny!

Adding HTML to the product title field is definitely not a recommended way how to modify display properties for your titles. You have a few options here though.

  1. You can customize the theme settings and titles. This may be a little to broad in scope for your case as it will affect all titles, but still good to know
  2. You can customize the theme templates and CSS styles - this is the approach I'd pick. For the cart customizations, you can edit Sections / cart-template.liquid. As ever with changes, make sure to make a copy of your theme before editing.

Hope this helps!

I turn coffee in to code - since 1998
Posts:
2
4 days ago

In my opinion, If the problem is only on checkout page buttons, then maybe an easy fix would be changing (and removing the extra text) from the buttons using a simple js function this is not the elegant way.

Better way would be adding those different sized fields as product custom fields and on the theme display those custom fields if present. 

Hope this helps.