ChannelSight "Where To Buy" button on product pages
Budget: $10 – $30 AUD
Site URL: https://esatto.house/
Template: Squarespace 7.1
Hi, I currently have ChannelSight's "Where to Buy" button displaying below each of my product descriptions as a "Buy Now" button. Eg: https://esatto.house/refrigeration/p/84l-upright-freezer-stainless-steel-euf92s
To achieve this, I added the following ChannelSight JS Reference in the Header section of the Code Injection:
<script src="https://cscoreproweustor.blob.core.windows.net/widget/scripts/cswidget.loader.js" defer></script>
Since I don't want the button to display below in the Additional Info section of the product page but below the product description. I've added the widget container to the end of the product description manually by added it to the end of the Description field of a CSV file and importing it via Commerce/Inventory:
<button class="cswidget" data-asset-id="2088" data-product-sku="<!–– SKU-NUMBER-HERE ––>" >Buy Now</button>
This method has worked for me initially but it's very manual and every time I make a change to the product description, I'll have to re-add the widget container and reupload the CSV file.
I was wondering if someone could write some Javascript for me so that this button is this widget is injected to each product page within a Store via the Store's Page Header Code Injection and <!–– SKU-NUMBER-HERE ––> is pulled from product's SKU field?
Template: Squarespace 7.1
Hi, I currently have ChannelSight's "Where to Buy" button displaying below each of my product descriptions as a "Buy Now" button. Eg: https://esatto.house/refrigeration/p/84l-upright-freezer-stainless-steel-euf92s
To achieve this, I added the following ChannelSight JS Reference in the Header section of the Code Injection:
<script src="https://cscoreproweustor.blob.core.windows.net/widget/scripts/cswidget.loader.js" defer></script>
Since I don't want the button to display below in the Additional Info section of the product page but below the product description. I've added the widget container to the end of the product description manually by added it to the end of the Description field of a CSV file and importing it via Commerce/Inventory:
<button class="cswidget" data-asset-id="2088" data-product-sku="<!–– SKU-NUMBER-HERE ––>" >Buy Now</button>
This method has worked for me initially but it's very manual and every time I make a change to the product description, I'll have to re-add the widget container and reupload the CSV file.
I was wondering if someone could write some Javascript for me so that this button is this widget is injected to each product page within a Store via the Store's Page Header Code Injection and <!–– SKU-NUMBER-HERE ––> is pulled from product's SKU field?