Open praveen-asset opened 4 years ago
Hello there,
I am using Shopify::retrieve to get access token and after that I am trying to create an new product using api but not able to create send error "{"errors":{"product":"Required parameter missing or invalid"}"
$cUser = auth()->user()->providers->where('provider', 'shopify')->first(); $shopify = \Shopify::retrieve(auth()->user()->username, $cUser->provider_token); $productData = [ 'products' => [ 'id' => 0, 'title' => 'my cool products', 'body_html' => '
my cool product!
Hello there,
I am using Shopify::retrieve to get access token and after that I am trying to create an new product using api but not able to create send error "{"errors":{"product":"Required parameter missing or invalid"}"
$cUser = auth()->user()->providers->where('provider', 'shopify')->first(); $shopify = \Shopify::retrieve(auth()->user()->username, $cUser->provider_token); $productData = [ 'products' => [ 'id' => 0, 'title' => 'my cool products', 'body_html' => '
my cool product!
', 'vendor' => 'My Shopify Shop', 'product_type' => 'Snowboard', 'published_scope' => 'global', 'handle' => 'chain-bracelet', 'template_suffix' => null, 'published_scope' => 'web', 'tags' => 'amit', ] ]; $productResponse = $shopify->create('products', $productData);