php-shopify
php-shopify copied to clipboard
ProducVariant search not working
Search by product variant not working return 'Not found' in all cases
$sku = 'sku:a166132';
$product = $shopify->ProductVariant->search($sku);
@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.
@ShayneP Do you know anything if it was removed by Shopify? (Or if it was my mistake from the beginning? )
If i use direct link its work
https://e6105ccXXXXXXXXXX:[email protected]/admin/api/2019-04/variants/search.json?query=sku:a166132
Any updates or any other way to get product by sku?
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."
Hi! Anyone found a workaround/solution for this?
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.
@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"}