In my vue-app I want to include an external script from a shop, so that when I click on a product, the script gets fired and opens the overlay with the buying process...
I tried to to this:
<template>
<div>
<div v-for="product in products" :key="product.id">
<h1>{{ product.title }}</h1>
// then the code, the shop requires for its overlay to work
<a href="#" data-fsc-action="Add,Checkout" data-fsc-item-path-value="PRODUCT ID SHOULD BE HERE">Buy now 99$</a>
// product id = {{product.id}}
</div>
</div>
</template>
then I included the script tag which is also provided by the shop ( for security reasons I cannot provide all of it...)
export default {
head() {
return {
script: [
{
id: "fsc-api",
src: "https://d1f8f9xcsvx3ha.cloudfront.net/...",
type: "text/javascript",
"data-storefront": "...",
"data-popup-closed": "...",
async: true,
},
],
};
},
}
but this triggers nothing and I don't know how to solve this
can someone help me out?