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

64
Vistas
Editing Product Options Using the Shopify API

I am trying to edit a product's option values in Shopify. Essentially, I want to pass a reordered array for products[0].options[0].values

enter image description here

Using Shopify's REST API docs, I make a request like so:

import {Product} from '@shopify/shopify-api/dist/rest-resources/2021-10/index.js';

const test_session = await Shopify.Utils.loadCurrentSession(request, response);

const product = new Product({session: test_session});

product.id = 7758005469437;

product.options[0].values = newOptionsOrder;

await product.save({});

I get the following error:

Cannot read properties of undefined (reading '0')

I was successfuly able to edit the title of the target product using product.title = "New Title"; The issue just seems to be targeting more nested elements.

Any idea how to edit the first options.values array?

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