How can I correctly add HTML to product page collapsible rows?

Solved

How can I correctly add HTML to product page collapsible rows?

RRobichaud
Excursionist
22 1 4

Hello, im seeking help with adding HTML to my product pages collapsible rows. I was able to add a custom google review widget, how ever when i attempted to do the same for my product description is just seems to half work. 

 

It works, but then the source code is also in the row. As if it was repeating the same paragraph.

 

here is my code.

                  </summary>
                  <div class="accordion__content rte" id="ProductAccordion-{{ block.id }}-{{ section.id }}">
                  {% if block.settings.heading == 'Reviews' %}
                    {{ product.metafields.my_fields.google }}
                    {% else %}
                    {{ block.settings.content }}
                    {{ block.settings.page.content }}
                     {{ product.metafields.my_fields.firing_modes }}
                  {% endif %}  
                  </div>
                </details>

here is the link to my page https://www.smalltechgaming.ca/products/stock-controller-express-stick

Accepted Solution (1)

RRobichaud
Excursionist
22 1 4

This is an accepted solution.

Anyone running into this issue, here is what i did. Obviously change your headings, and metafields according in this code for it to work

                  {% if block.settings.heading == 'Reviews' %}
                    {{ product.metafields.my_fields.google }}
                    {% else %}
                     {% if block.settings.heading == 'Description' %}
                   {{ product.metafields.my_fields.firing_modes }}
                    {% else %}
                    {{ block.settings.content }}
                    {{ block.settings.page.content }}
                  {% endif %}  
                    {% endif %}

 

 

View solution in original post

Reply 1 (1)

RRobichaud
Excursionist
22 1 4

This is an accepted solution.

Anyone running into this issue, here is what i did. Obviously change your headings, and metafields according in this code for it to work

                  {% if block.settings.heading == 'Reviews' %}
                    {{ product.metafields.my_fields.google }}
                    {% else %}
                     {% if block.settings.heading == 'Description' %}
                   {{ product.metafields.my_fields.firing_modes }}
                    {% else %}
                    {{ block.settings.content }}
                    {{ block.settings.page.content }}
                  {% endif %}  
                    {% endif %}