EulandaXtools — Funktionsreferenz
Weist ein Shopify-Produkt einer Collection zu (idempotent).
Set-ShopifyCollect [-Shop] <string> [-Token] <string> [-ApiVersion] <string> [-ProductId] <long>
[-CollectionId] <long> [[-MaxRetries] <int>] [[-TimeoutSec] <int>] [<CommonParameters>]Fügt ein Produkt per GraphQL collectionAddProducts Mutation einer Collection hinzu. Wenn die Zuordnung bereits existiert, wird dies als Erfolg behandelt (idempotent).
-Shop
Type: stringShopify-Shop-Domain, z.B. 'mein-shop.myshopify.com'.
-Token
Type: stringAdmin API Access Token (shpat_...) der Custom App.
-ApiVersion
Type: stringAPI-Version, z.B. '2025-01'.
-ProductId
Type: longShopify-Produkt-ID.
-CollectionId
Type: longShopify-Collection-ID.
-MaxRetries
Type: int
Default: 3Maximale Anzahl Wiederholungen bei Rate-Limit.
-TimeoutSec
Type: int
Default: 60HTTP Timeout in Sekunden.
pscustomobject# Produkt einer Collection zuweisen
Set-ShopifyCollect -Shop 'mein-shop.myshopify.com' `
-Token 'shpat_abc123' -ApiVersion '2025-01' `
-ProductId 123456789 -CollectionId 987654321# Erneuter Aufruf ist idempotent (kein Fehler)
Set-ShopifyCollect -Shop $shop -Token $token -ApiVersion '2025-01' `
-ProductId $prodId -CollectionId $collId