Đang Thực Hiện

Shopify simple PHP code: send product with Shopify JSON API

Hello,

I am looking for freelancer to solve my problem. I have simple PHP code for Shopify API ([url removed, login to view]). I would like to send new product to Shopify thru API. When I have array deifinition like this:

$newproduct = array

(

"product"=>array

(

"title"=>"Title of product",

"body_html"=>"Product description",

"vendor"=>"Vendor",

"product_type"=>"Product type"

)

);

it works and new products is added to Shopify thru API. I do not know, how to change multiple array $newproduct. I would like to use my own variables. For example for title, I would like to use $title, for body_html I would like to use $body_html etc.

Then I can for example catch information from forms or other sources (like prepare form for adding Shopify products, then get information from $title = $_POST['title']).

So your task is simple: please write for me short code, so I can use PHP variables for big multiple array product. This is in my mind (and not working):

//Get title from previous form

$title = $_POST['title'];

$newproduct = array

(

"product"=>array

(

"title"=>$title,

"body_html"=>$body_html,

"vendor"=>$vendor,

"product_type"=>$product_type

)

);

I try also use combination with compact and than create new array for "product", but Shopify API tell me error.

Kỹ năng: PHP, Shopify

Xem thêm: shopify php api example, shopify api php example, shopify php, write php code shopify, shopify php code, create array shopify, php json api example, shopify php example, vendor product, vendor freelancer, simple description freelancer, prepare freelancer, php freelancer works, php form freelancer, mind array, get works freelancer, freelancer site works, how code, freelancer shopify api, freelancer 502, create php code, code php site freelancer, shopify product php api, my shopify, freelancer works site

Về Bên Thuê:
( 0 nhận xét ) Prague, Czech Republic

Mã Dự Án: #1686123

1 freelancer đang chào giá trung bình $8 cho công việc này

rakshit0

Hi !PHP expert here ! I can help you out !

$8 USD / giờ
(43 Đánh Giá)
5.8