Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

88
Views
Vuejs how to trigger external script event

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?

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!