Setup Affiliate V2 at the Front store

Setup Affiliate V2 at the Front store

Introduction

In this article, you will learn how to setup Affiliate V2 at the front store

Overview🗂️

If App block is available on your theme

If App block is not available on your theme


App block is available on your theme

Here are the steps to show Affiliate V2 at the Front store if the App block is not available on your theme -:

Step 1: Go to Shopify admin >> Online store >> Themes >> Customize


Step 2: Click on Default page >> Search the page where you would like to add the block >> Click on Add section >> Click on Affiliate V2 >> Click on Save




Step 3: To change the banner of Affiliate V2, follow the steps below:

a) Go to Affiliate Program >> Display on store. Click on the Custom button.

b) Click on the Plus icon and select the image

c) Crop the image according to the requirement and click on Crop & Save

Now, the custom image that you have added to the Affiliate Program will appear

Note📝: Affiliate V2 supports RTL (Right to left text)

App block is not available on your theme

Here are the steps to setup Affiliate V2 at Front store if App block is not available on your theme -:

Step 1: Go to Shopify admin >> Online store >> Edit code



Step 2: Create a liquid file under section with name - ait-affiliate-v2.liquid and copy the below code

<!--- Affiliate code started --->
<div id="aio-affiliate-app"
data-customer-id="{{ customer.id }}"
data-customer-email="{{ customer.email }}"
data-shop-url="{{ shop.permanent_domain }}"
data-shop-name="{{ shop.name }}"
style="min-height:400px;display:none"
class="aio-affiliate-block-width"></div>

<script>
const affiliateAppDiv = document.getElementById("aio-affiliate-app");
const script = document.createElement("script");
const aioAffiliatev2Version = new Date().getTime();
script.src = `https://app.aitrillion.com/aio-script/aio-affiliate-prod.js?v=${aioAffiliatev2Version}`;
script.defer = true;
affiliateAppDiv.appendChild(script);
</script>

<style>
.aio-affiliate-block-width {
width: 100%;
text-align: center;
}
.aio-affiliate-block-width .aio-app-container {
width: {{ section.settings.aioblockWidth | default: "1200" }}px;
max-width: 100%;
margin-left: auto;
margin-right: auto;
padding-left: {{ section.settings.aioblockpaddingleft | default: "15" }}px;
padding-right: {{ section.settings.aioblockpaddingright | default: "15" }}px;
padding-top: {{ section.settings.aioblockpaddingtop | default: "15" }}px;
padding-bottom: {{ section.settings.aioblockpaddingbottom | default: "15" }}px;
display: inline-block;
text-align: left;
}
</style>
{% schema %}
{
"name": "Affiliate",
"settings": [
{ "type": "text", "id": "aioblockWidth", "label": "Width", "default": "1200", "info": "Do not set the width below 992px for better desktop view." },
{ "type": "text", "id": "aioblockpaddingleft", "label": "Padding left (px)", "default": "15" },
{ "type": "text", "id": "aioblockpaddingright", "label": "Padding right (px)", "default": "15" },
{ "type": "text", "id": "aioblockpaddingtop", "label": "Padding top (px)", "default": "15" },
{ "type": "text", "id": "aioblockpaddingbottom", "label": "Padding bottom (px)", "default": "15" }
]
}
{% endschema %}

<!--- Affiliate code end --->

Step 3: Create a liquid template with the same name - ait-affiliate-v2, Click on Add new template >> select page >> select liquid and copy and paste the below code

{% section 'ait-affiliate-v2' %}

Step 4: Go to Pages >> Click on Add Page

Step 5: Give a name to the page and select the template - ait-affiliate-v2

Now, the affiliate program will be visible to the front store


    • Related Articles

    • Setup Affiliate V2 in WooCommerce

      Introduction In this article, you will learn how to setup Affiliate V2 to your store in WooCommerce Here are the steps to setup Affiliate V2 in WooCommerce: Step 1: Go to WooCommerce store >> Pages >> All pages >>Click or Add New or Edit button Step ...
    • Edit Language for Affiliate program (Affiliate V2)

      Introduction You and your customers can now use the AiTrillion review system in the language of your choice. All you have to do is follow the process below and replace the default English sentence with one in your own language! Note: The language can ...
    • Affiliate Program – General Configuration

      Introduction Dive into the heart of your affiliate program with the Affiliate Program General Configuration. This foundational setting grants you control over key aspects of your affiliate initiative, from commission structures to tracking ...
    • Setup Affiliate Tracking Cookies

      Introduction: Maximize affiliate marketing effectiveness by mastering tracking cookies. Discover how to set up and manage affiliate tracking cookies to accurately attribute sales, optimize commissions, and foster successful partnerships. Here are the ...
    • How To Create Affiliate Program?

      Introduction Unlock new revenue streams and amplify your brand's reach with an effective affiliate program! An affiliate program allows you to partner with influencers, bloggers, and other marketers who promote your products in exchange for a ...