FROM CACHE - en_header

Override products without using the handle.

Solved
Oblify
Tourist
12 2 2

Hi everyone,

I'm wondering if there's any other way to override products using another value than the handle (e.g. SKU)?
The reason why I need this is rather complicated and I think there are not many ways around it.

Accepted Solution (1)

Accepted Solutions
Oblify
Tourist
12 2 2

This is an accepted solution.

I've installed an app called StockSync to solve my problem, just in case anyone has the same problem as I did.
In case StockSync is not right for you, there is also Moose Sync which does the same thing but I haven't tried it.

View solution in original post

Replies 5 (5)
Jayvin
Shopify Partner
284 42 85

Hi,

That's simple.

  1. Get all products from your store
  2. Filter the products by looking for the correct sku in all the products variants
  3. Once the you get product, you just use this endpoint to override the existing product with updated properties, variants or whatever you want to update
Anonymous
Not applicable

Hello

 

Not possible unfortunately, only handles can replace products

Oblify
Tourist
12 2 2

Hi, thank you for your reply.

Are you sure there are no alternatives?
I mean, it's as simple as using another value other than the handle to recognize and override my products..

Jayvin
Shopify Partner
284 42 85

Hi Oblify,

Just use the product update endpoint:

PUT /admin/api/2021-04/products/XXXXXX.json
{
  "product": {
    "id": XXXXXX,
         ...... other properties you want to update goes in here...
  }
}

 

Oblify
Tourist
12 2 2

This is an accepted solution.

I've installed an app called StockSync to solve my problem, just in case anyone has the same problem as I did.
In case StockSync is not right for you, there is also Moose Sync which does the same thing but I haven't tried it.