What's your biggest current challenge? Have your say in Community Polls along the right column.
Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

Product.liquid to json

Product.liquid to json

HappaFoods
Visitor
1 0 0

the below code is in liquid format how do I change it to JSON file 

while rendering the if else statement in the section file it is showing an error (section can't be rendered inside section)

 


<!-- spurit_stp-added -->
{% render 'spurit_stp-product-snippet' %}
<!-- /spurit_stp-added -->
{% if settings.product_layout == "default" %}

{% include 'product-default' %}

{% elsif settings.product_layout == "grouped" %}

{% include 'product-grouped' %}

{% elsif settings.product_layout == "slider" %}

{% include 'product-slider' %}

{% elsif settings.product_layout == "gallery" %}

{% include 'product-gallery' %}

{% elsif settings.product_layout == "full_with" %}

{% include 'product-full-width' %}

{% endif %}

{% if template contains 'product' %}

<div class="footbar-fixed footbar-fixed-product">
{% section 'someone-purchased' %}
{% section 'GDPR-modal' %}

{% if settings.display_sticky %}
{% include 'sticky-add-to-cart' %}
{% endif %}
</div>
{% endif %}

{% render 'product_infox' %}

Replies 0 (0)