Waltt - FAQ - How to add the application on a 1.0 theme ?
**1. Install the application on a product page, collection, home page
First go to the code editor of your theme and create a snippet named "waltt-faq-product-page".
Then paste the following code inside the file you just created :
Then go to the product file of your theme and go to the place where you want to place the application block.
Once you have found the place, enter the following code:
**2. Install the application on a classic page**
First go to the code editor of your theme and create a snippet named "waltt-faq-classic-page".
Then paste the following code inside the file you just created :
Then go to the page file of your theme and go to the place where you want to place the application block.
Once you have found the place, enter the following code:
First go to the code editor of your theme and create a snippet named "waltt-faq-product-page".
Then paste the following code inside the file you just created :
<!-- FE03 & FE02 18.11.2021 & 15-12-2021 FE Faq_app (React) -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.2.1/css/all.min.css" integrity="sha512-MV7K8+y+gLIBoVD59lQIYicR65iaqukzvf/nwasF0nqhPay5w/9lJmVM2hMDcnK1OnMGCdVK+iQrJ7lzPJQd1w==" crossorigin="anonymous" referrerpolicy="no-referrer" />
<!-- Top Atc -->
{% assign configIdList = shop.metafields.faq_app.config_id.value %}
<!-- collection handel taken code -->
{% assign getCollection = product.collections.last.handle %}
{% assign appCollectionProduct = collections[getCollection] %}
<!-- End -->
{% assign shownFaq = false %}
{% if product.metafields.faq_app.top_atc.value != blank %}
{% assign productListing = product.metafields.faq_app.top_atc.value %}
{% for config in configIdList %}
{% assign productListing_id = productListing.id | append: "" %}
{% assign config_id = config.id | append: "" %}
{% if productListing_id == config_id %}
{{ productListing.content }}
{% assign shownFaq = true %}
{% endif %}
{% endfor %}
{% endif %}
{% if appCollectionProduct.metafields.faq_app.top_atc != blank and shownFaq == false %}
{% assign collectionListing = appCollectionProduct.metafields.faq_app.top_atc.value %}
{% for config in configIdList %}
{% assign collectionListing_id = collectionListing.id | append: "" %}
{% assign config_id = config.id | append: "" %}
{% if collectionListing_id == config_id %}
{{ collectionListing.content }}
{% assign shownFaq = true %}
{% endif %}
{% endfor %}
{% endif %}
{% if shop.metafields.faq_app.top_atc != blank and shownFaq == false %}
{{ shop.metafields.faq_app.top_atc }}
{% endif %}
<!-- End -->
Then go to the product file of your theme and go to the place where you want to place the application block.
Once you have found the place, enter the following code:
{% include 'waltt-faq-product-page' %}
**2. Install the application on a classic page**
First go to the code editor of your theme and create a snippet named "waltt-faq-classic-page".
Then paste the following code inside the file you just created :
<!-- FE03 & FE02 18.11.2021 & 15-12-2021 FE Faq_app (React) -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.2.1/css/all.min.css" integrity="sha512-MV7K8+y+gLIBoVD59lQIYicR65iaqukzvf/nwasF0nqhPay5w/9lJmVM2hMDcnK1OnMGCdVK+iQrJ7lzPJQd1w==" crossorigin="anonymous" referrerpolicy="no-referrer" />
<!-- Top Atc -->
{% assign configIdList = shop.metafields.faq_app.config_id.value %}
{% assign shownFaq = false %}
{% if page.metafields.faq_app.top_atc.value != blank %}
{% assign pageListing = page.metafields.faq_app.top_atc.value %}
{% for config in configIdList %}
{% assign productListing_id = pageListing.id | append: "" %}
{% assign config_id = config.id | append: "" %}
{% if productListing_id == config_id %}
{{ pageListing.content }}
{% assign shownFaq = true %}
{% endif %}
{% endfor %}
{% endif %}
{% if shop.metafields.faq_app.top_atc != blank and shownFaq == false %}
{{ shop.metafields.faq_app.top_atc }}
{% endif %}
<!-- End -->
Then go to the page file of your theme and go to the place where you want to place the application block.
Once you have found the place, enter the following code:
{% include 'waltt-faq-classic-page' %}
Updated on: 17/12/2022
Thank you!