Shopify App Setting After Changing Theme

Shopify App Setting After Changing Theme

In Shopify, when an app is installed, a code is auto-injected in the theme file which needs to be added again after changing the theme.

Below are some steps which will help you add the code manually:

Step 1.

Edit the theme in which you want to set up the app. To do so, from your Shopify admin go to Online Store > Themes > Actions > Edit Code.

 

Step 2.

Add a new snippet aio-script in the theme (app setup required).

And copy the below code and paste it into the newly created aio-script file

<script>
var aioMeta ={
meta_e : '',
meta_i : '',
meta_n : ' ',
}</script>
<script async="async" src="https://dcdn.aitrillion.com/aio_stats_lib_v3.min.js?v=1.1"></script>
<script async="async" src="https://d2rs7qkk6x0fuo.cloudfront.net/aio-script/stores/CTk7Al_a4GYqPrMtvEt0LQV5eStSSfpCU22-935czGV8DJF6E7obUVk4IIH_bIoe6PmzqxlUqhiIBpQ8SUeQUQ.js?shop_name=yourshopdomain.myshopify.com">

</script>

 

Note: Replace yourshopdomain.myshopify.com  with your store myshopify domain.

 

This is required to run the AiTrillion app, and it enables Ai Box, and Chat in a new theme.

To set up Loyalty Rewards in the new theme –

Step 1. 

Add a new snippet aio_loyalty_snippet  in the new theme (app setup required).

And copy the below code and paste it into the newly created aio_loyalty_snippet file




<input type="hidden" name="is_customer_logged_in" value="0" class="is_customer_logged_in">
<input type="hidden" name="referral_customer_logged_id" value="0" class="referral_customer_logged_id">

<input type="hidden" name="referral_shop_currency" value="" class="referral_shop_currency">
<div id="master-referal-div"></div>
<div class="aaa-noti-container"></div>

 

 

To setup Reviews in the new theme –

Step 1. 

Add a new snippet aio_reviewform in the new theme (app setup required).

And copy the below code and paste it into the newly created aio_reviewform file

 

<div id="egg_review_container" class="revw_main">
<div class="full-width headr">
<h3 class="rvw_heading"></h3>
<div class="rate-and-add-review">
<div class="egg-review-left">
<div class="egg-btn-right">
<div class="egg_average_rating_star">
<span class="stars"></span>
</div>
<p id="review-report"></p>
</div>
<div class="egg-btns">
<div class="review_btn"></div>
<div class="question_btn" style="display:none">Ask A Question</div>
</div>
</div>
</div>
<div class="revw_toggle" style="display:none;">
<iframe src="https://app.aitrillion.com/review/form_data.php?pid=&shopname=" width="100%" height="600px" style="border:0px;"></iframe>
</div>
<div class="egg_question_form_toggle" style="display:none;">
<iframe src="https://app.aitrillion.com/review/ask_question.php?pid=&shopname=" width="100%" height="380px" style="border:0px;"></iframe>
</div>
<div class="egg_store_question_review_tab" style="display:none">
<ul class="egg_store_nav">
<li>
<a href="javascript:void(0)" class="active" data-attr-tab="egg_review">Review (<span id="egg_product_review_count"></span>)</a>
</li>
<li>
<a href="javascript:void(0)" data-attr-tab="egg_question">Question (<span id="egg_product_question_count"></span>)</a>
</li>
</ul>
</div>
</div>
</div>
<div style="display:none;"> </div>

 

 

Step 2. 

Add a new snippet aio_reviewlist  in the new theme (app setup required).

And copy the below code and paste it into the newly created aio_reviewlist file


<input type='hidden' id='aio-review-product_id' value=''>
<div id='aio-review-product-image'></div>

 

To setup Product Recommendations in the new theme –  

Step 1. 

Add a new snippet aio_product_recommendation in the new theme (app setup required).

And copy below code and paste it into the newly created aio_product_recommendation file


<div class="aionewarrival" id="aionewarrival"></div>
<div class="aiotrendingproducts" id="aiotrendingproducts"></div>
<div class="aiorecentview" id="aiorecentview"></div>

To set up Loyalty Reward Widgets refer to this article. 

After adding all the snippets in the theme correctly, open the file theme.liquid in the new theme (app setup required) and add the below-mentioned code. This is required to run the AiTrillion app.

  • Search for the closing </head> tag in the file and paste the code above it

 

Open file product.liquid under Templates and paste the below code at the end of the file and save it. This code will display the review form and list on the product page.

 

 

 

 

Replace Shopify Apps


    • Related Articles

    • Set Up App Again After Changing The Theme

      When the Membership app is installed, additional “Snippet” files are automatically inserted into the main, published theme. If you added or publish a new theme after the app is installed then these snippet files will need to be added to the ...
    • How to show points balance in your theme

      Introduction 1. Customer available points 2. Customer lifetime points 3. Customer spent points Workflow Following loyalty reward points can be shown in the Shopify store theme – 1. Customer available points Here are the steps for setting up the ...
    • How To Replace Shopify Default Registration Form With The Form Created In The App?

      In Shopify, various themes are available. So, file structure may vary accordingly. Here is the guidance on how you can replace the default registration form in your Shopify store theme. 1. After creating a form in the app, copy the shortcode or embed ...
    • How To Generate HTML Code And Place In Shopify Store?

      For setting up the membership subscription form, you will have to copy its HTML code from the app dashboard and add/paste in your theme where ever you want to show it. To add it in a page, follow below steps – Step 1. After creating a membership ...
    • How To Setup The Button At Shopify Store?

      Introduction For setting up the membership subscription button, you will have to copy its embed code from the app dashboard and add/paste in your theme where ever you want to show it. Workflow Step 1. After creating a membership plan, either navigate ...