Skip to end of metadata
Go to start of metadata

You are viewing an old version of this content. View the current version.

Compare with Current View Version History

Version 1 Next »

This section explains how to add the AI Shop Assistant PDP script to your Shopify theme.

To install the PDP, follow the steps outlined below:

  1. Login to Shopify store.

  2. Navigate to Online Store > Themes.

  3. Navigate to the desired theme for the widget, then select the 'Actions' drop-down.

  4. Select “Edit code“, this will take you to the theme code editor.

Note: If you have multiple testing themes in your store (dev, staging etc), you can test the PDP in your testing theme before putting it on your live theme.

image-20241022-230117.png
  1. In the theme code editor, find the main-product.liquid file.

  2. In your main-product.liquid file, find the place where you want to place the PDP on the page

  3. Add the script by copying and pasting it on the line directly above the </head> tag.

<script src="https://widget.shopassistant-ai.com/preguide_ai.js" data-tenantid='<Please insert your tenant id here>' data-app-type="pdp" defer></script>

Please insert your tenant id in the 'data-tenantid' attribute.

For Example:

<script src="https://widget.shopassistant-ai.com/preguide_ai.js" data-tenantid='prz_123123123' data-app-type=”pdp” defer></script>

Please ensure to include defer in the script tag.

  1. Hit “Save“ button on the top right.

  2. Navigate to your Shopify store product page, you should be able to see the AI shop assistant PDP on your page!

If PDP layout is off, please add an outer container to the script like below

<div style="display: block; width: 100%;">
  <script src="https://widget.shopassistant-ai.com/preguide_ai.js" data-tenantid='prz_123123123' data-app-type=”pdp” defer></script>
</div> 

Note: The AI Shop Assistant PDP will be loaded on the specific page where you put the script.

  • No labels