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

164
Views
función cambio valor google tag manager

Creé una variable {{dlv-cart}} en el administrador de etiquetas de Google desde la capa de datos, que da un ejemplo de valor (matriz de tipos):

 [ { id: "14", code: "P00006-2", title: "Name Product 01", quantity: 2, option: {id: "85"}, price: {withVat: 138, withoutVat: 115, vat: 23, vatRate: 20} }, { id: "16", code: "P00004", title: "Name Product 02", quantity: 1, option: null, price: {withVat: 63.59, withoutVat: 52.99, vat: 10.6, vatRate: 20} }, { id: "17", code: "P00003-1", title: "Name Product 03", quantity: 1, option: {id: "61"}, price: {withVat: 16, withoutVat: 13.33, vat: 2.67, vatRate: 20} } ]

1. Necesito una función para combinar valores con "_ " "id" y "option.id" = "id_option.id" ...si "option" es nulo, entonces solo "id" ) 2. Necesito obtener valor price.WithVat

y obtener el resultado:

 [ { id: "14_85", title: "Name Product 01", quantity: 2, price: 138 }, { id: "16", title: "Name Product 02", quantity: 1, price: 63.59 }, { id: "17_61", title: "Name Product 03", quantity: 1, price: 16 } ]

Gracias.

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!