php-shopify icon indicating copy to clipboard operation
php-shopify copied to clipboard

ProducVariant search not working

Open Stasevi4 opened this issue 5 years ago • 8 comments

Search by product variant not working return 'Not found' in all cases

$sku = 'sku:a166132';
$product = $shopify->ProductVariant->search($sku);

Stasevi4 avatar Jun 13 '19 22:06 Stasevi4

@Stasevi4 As I see the Shopify documentation now, the search action is not available for ProductVariant. Not sure if it was a mistake from our side or it was removed by Shopify later. Whatever the case, we don't have this feature enabled now from Shopify side. So we will remove it from our SDK in any later release.

tareqtms avatar Jun 14 '19 09:06 tareqtms

@ShayneP Do you know anything if it was removed by Shopify? (Or if it was my mistake from the beginning? )

tareqtms avatar Jun 14 '19 09:06 tareqtms

If i use direct link its work

https://e6105ccXXXXXXXXXX:[email protected]/admin/api/2019-04/variants/search.json?query=sku:a166132

Stasevi4 avatar Jun 14 '19 14:06 Stasevi4

Any updates or any other way to get product by sku?

Stasevi4 avatar Jun 18 '19 15:06 Stasevi4

https://community.shopify.com/c/Shopify-APIs-SDKs/Variants-Search/m-p/437176 "Search is not documented for variants and by extension is not supported."

derak-kilgo avatar Jun 28 '19 17:06 derak-kilgo

Hi! Anyone found a workaround/solution for this?

jaszfalvitamas avatar Apr 17 '20 17:04 jaszfalvitamas

If i use direct link its work

https://e6105ccXXXXXXXXXX:[email protected]/admin/api/2019-04/variants/search.json?query=sku:a166132

I can confirm that. I has something to do with the curl.

wmdkdkussin avatar Apr 21 '21 16:04 wmdkdkussin

@Stasevi4 @wmdkdkussin

https://d09273f4c&&&&&&&:shppa_6f30b3%%%%%%%%%@VVVV-test-store.myshopify.com/admin/api/2019-04/variants/search.json?query=sku:necklaceSKU1

I tried this url on browser but it didnt work at all, but i checked that sku is present in the store. and always it return as {"errors":"Not Found"}

vasanthhr avatar Sep 01 '21 07:09 vasanthhr