Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

89
Vistas
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
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda