Manually adding your widget can help to freely embed the campaign section at any place you prefer.

Firstly, you will need to access our app and take the widget code before inserting on your theme.

Please go to the Campaign > click the widget tab > click into the View detail button

For example:


You will be redirected to the configuration, please choose Install > click Widget Code > Copy





Currently, Shopify is developing two kinds of theme for your templates.

Theme 1.0 will include .liquid file extension

Theme 2.0 will include .json file extension

Embedding manual code in each theme type will follow different ways. From Shopify Admin → Select Online StoreThemes → Tap Action on your preferred theme → Edit Code


Theme 1.0

Please go to the product.liquid file → insert the code <div id="fs-product-widget-placeholder"></div> at the position that you want → Save


Theme 2.0

Because the theme 2.0 is having` .json` file extension. You will need to create a new section with flashify-product-widget.liquid file extension.

Add new section

Select Add a new sectionName as flashify-product-widget.liquid


Insert code to file

Insert this below code into the flashify-product-widget.liquid

{% schema %}
{
"name": "Flashify Product Widget",
"settings": [
{
"id": "flashify_campaign_id",
"type": "text",
"label": "Flashify Campaign ID",
"default": "1"
}
],
"blocks": [
{
"type": "@app"
}
]
}
{% endschema %}

{% stylesheet %}
{% endstylesheet %}

{% javascript %}
{% endjavascript %}

<div data-flashify-id="{{ section.settings.flashify_campaign_id }}" data-flashify-type="product_widget" data-current-product-id="{{ product.id }}" id="fs-product-widget" class="fs-wrapper"></div>

Insert code to JSON file

Go to the product.json to add this code as the below image:

"flashify_product_widget": {
"type": "flashify-product-widget",
"settings": {
"flashify_campaign_id": "campaign ID"
}
}


Then, at the order item, please call out the "flashify_product_widget"

,"order": [
"main",
"product-recommendations",
"flashify_product_widget"
]



How to get the campaign ID: at the Campaign > click into the 3 dotsEdit campaign → you can see the URL of the campaign.

For example: https://run.flashify.app/flash-sale/campaigns/6964 6964 is campaign ID.



If you have any further concern, you can always reach out to us via in-app live chat or email at support@socialhead.io