Shopify / Shopify/shopify_python_api
Save many metafields with a single request
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- Python
- Sterne
- 1.4k
- Forks
- 388
- Ø Merge
- 5 Std. 39 Min.
- Gemergte PRs (30 T.)
- 1
Beschreibung
There does not seem to be a way to attach metafields locally, and then simply save the product with the metafields along with it. I'm forced to use add_metafields() or Metafield().save(), both of which adds a single metafield per API call. This is very slow.
If I take a product with 50 metafields, and save it as a new product, it saves almost instantly, like so:
p = shopify.Product.find()[0]
print len(p.metafields())
> 50
p.id = None
p.images = None
p.save()
How can I attach metafields to a product in the same way they are attached when they are fetched?
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Beginne damit, Product.save(), add_metafields() und Metafield().save() nachzuverfolgen, um zu verstehen, wie abgerufene metafields dargestellt und persistiert werden. Die Arbeit ist abgeschlossen, wenn lokal angehängte metafields mit einem neuen Produkt in einer einzigen API-Anfrage gespeichert werden können und der gemeldete Fall mit mehreren metafields abgedeckt ist.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- python
- Bereich
- api
- Issue-Typ
- Feature
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 32/100