notmaintained / shopify.php Goto Github PK
View Code? Open in Web Editor NEWThis only works with legacy authentication. For OAuth2 use https://github.com/sandeepshetty/shopify_api
License: MIT License
This only works with legacy authentication. For OAuth2 use https://github.com/sandeepshetty/shopify_api
License: MIT License
This line breaks my request when I try to push a javascript file to the assets.
$payload = in_array($method, array('POST','PUT')) ? stripslashes(json_encode($params)) : array();
I took the stripslashes()
function out and it worked perfectly.
So I just plopped in the code and included it and I'm getting an error right out the gate.
Parse error: syntax error, unexpected T_FUNCTION in *******/shopify.php on line 21
I believe it is refering to that return anonymous function which is something I've personally never seen before, any ideas on why I'm getting this error?
I am using a pretty up to date version of PHP on dreamhost.
I am having a hard time creating this shopify asset.
public function shopifyAPI_assets($shopify,$id,$attachment){
try{
$request = array(
"assets" => array(
"key" => "assets/appscript.js",
"attachment" => "var js = 4;"
)
);
$assets = $shopify("PUT","/admin/themes/{$id}/assets.json",$request);
}catch (ShopifyApiException $e){
$assets = false;
}
return $assets;
}
This is returning all of the assets for this theme.
Hello, I want to add price on new product through api. Below is the code which i am using to add new product. Can you please tell me where is the error.
$newproduct = array
(
"product"=>array
(
"title"=>"Product again",
"body_html"=>"testing product",
"vendor"=>"Vendor",
"product_type"=>"Test",
"variants": [ {"price": 12.00 } ]
)
);
foreach($newproduct["product"] as $k => $v){
$newproduct["product"][$k] = iconv("UTF-8", "ISO-8859-2", $v);
}
$senditem = $sc->call('POST', '/admin/products.json', $newproduct, $response_headers);
Thanks in advance.
Regards,
Shopify will be switching to oAuth 2.0 is there any prospect of updating the library?
http://www.shopify.com/technology/5922341-sound-the-trumpets-oauth2-has-arrived
Hi to all,
I recive an error on running this code present in the example:
Unprocessable Entity - 422
$charge = array
(
"recurring_application_charge"=>array
(
"price"=>10.0,
"name"=>"Super Duper Plan",
"return_url"=>"http://super-duper.shopifyapps.com",
"test"=>true
)
);
try
{
// All requests accept an optional fourth parameter, that is populated with the response headers.
$recurring_application_charge = $shopify('POST', '/admin/recurring_application_charges.json', $charge, $response_headers);
// API call limit helpers
echo shopify_calls_made($response_headers); // 2
echo shopify_calls_left($response_headers); // 298
echo shopify_call_limit($response_headers); // 300
}
catch (ShopifyApiException $e)
{
// If you're here, either HTTP status code was >= 400 or response contained the key 'errors'
}
Some suggestion?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.