Hello,
I have a problem that I’ve been trying to solve for the past 2 days.
Workflow goal: Successfully create Printify products from Mock-Up products saved in my shop.
To achieve this, I am using a “Get a Product” module, which provides me with all the necessary information to create my new product.
I can then create a new product based on the output information provided by this module:
However, when I create my product based on the Mock-Up product information, it updates correctly but also assigns the same SKU number. As a result, it creates a new product on Printify but replaces my product on my Shopify store.
I think I know where the problem comes from; it only links the variants with the variant ID and price:
This works, but it only considers the first variant returned by the “GET” module and not all the variants. As a result, the created product only has one variant instead of four.
Here is the output of the “GET” module:
"variants": [
{
"id": 41521,
"sku": "37358789014584201000",
"cost": 1312,
"price": 1800,
"title": "14\" × 14\"",
"grams": 550,
"is_enabled": true,
"is_default": false,
"is_available": true,
"is_printify_express_eligible": false,
"options": [
1828
],
"quantity": 1
},
{
"id": 41524,
"sku": "32831341371905590575",
"cost": 1401,
"price": 1900,
"title": "16\" × 16\"",
"grams": 750,
"is_enabled": true,
"is_default": false,
"is_available": true,
"is_printify_express_eligible": false,
"options": [
1831
],
"quantity": 1
},
{
"id": 41527,
"sku": "61718285493791707444",
"cost": 1573,
"price": 2100,
"title": "18\" × 18\"",
"grams": 870,
"is_enabled": true,
"is_default": false,
"is_available": true,
"is_printify_express_eligible": false,
"options": [
1834
],
"quantity": 1
},
{
"id": 41530,
"sku": "21733478925616320339",
"cost": 1906,
"price": 2500,
"title": "20\" × 20\"",
"grams": 1000,
"is_enabled": true,
"is_default": true,
"is_available": true,
"is_printify_express_eligible": false,
"options": [
1837
],
"quantity": 1
}
],
Here is the input for the POST module:
{
"variant_ids": [
41521
],
I think I know where the problem is coming from; it probably requires using an iterator to break down the IDs from the GET module and inject them into the POST module. However, with this technique, I’m stuck at this point, and I might be on the wrong track.
Any ideas ?