bigcommerce-api-php icon indicating copy to clipboard operation
bigcommerce-api-php copied to clipboard

* Fix for API error: The field 'calculated_price' cannot be written to. ...

Open poul-kg opened this issue 10 years ago • 9 comments

...Please remove it from your request before trying again.

  • Fix for API error: The field 'primary_image' cannot be written to. Please remove it from your request before trying again.
  • Fix for API error: The field 'downloads' cannot be written to. Please remove it from your request before trying again.

poul-kg avatar Jun 21 '14 02:06 poul-kg

Coverage Status

Coverage remained the same when pulling 8df41ba11b83fd15d24e7f88a8871038d4394538 on poul-kg:master into c659e670947e0eb4a07cb6ca0eae9a434bab3914 on bigcommerce:master.

coveralls avatar Jun 21 '14 02:06 coveralls

Coverage Status

Coverage remained the same when pulling 8793a71a6ae0647b4439410c5d63611225e56494 on poul-kg:master into c659e670947e0eb4a07cb6ca0eae9a434bab3914 on bigcommerce:master.

coveralls avatar Jun 21 '14 03:06 coveralls

Coverage Status

Coverage decreased (-3.54%) when pulling df7619ebe97ab7ae454b480a4e7e5fc57ab4a378 on poul-kg:master into c659e670947e0eb4a07cb6ca0eae9a434bab3914 on bigcommerce:master.

coveralls avatar Jul 01 '14 05:07 coveralls

Coverage Status

Coverage decreased (-3.54%) when pulling 999b7f48bff977d23b22627cf8e20cad19a085cb on poul-kg:master into c659e670947e0eb4a07cb6ca0eae9a434bab3914 on bigcommerce:master.

coveralls avatar Jul 01 '14 05:07 coveralls

Coverage Status

Coverage decreased (-3.3%) when pulling 64af37cb3dc6b2c9cb7b4609f7cab8824fb9e079 on poul-kg:master into c659e670947e0eb4a07cb6ca0eae9a434bab3914 on bigcommerce:master.

coveralls avatar Jul 09 '14 06:07 coveralls

I need some suggestion about the webhook in php How can i use web-hook for orders? Is there necessary to create app in developers account? In big-commerce where i put my web-hook call back url?

How can i use webhook? Also for multiple stores? Please help me.

pankajEdreamz avatar Jul 06 '15 07:07 pankajEdreamz

@pankajEdreamz oAuth is required to use webhooks, so yes it is neccessary to create app in developers account. Assuming you have obtained the clients oauth token already and have authenticated, you can install a webhook simply like:

<?php
use Bigcommerce\Api\Client as bc;

# setup the webhook
$order_webhook = array(
  'scope' => "store/order/*",
  'destination' => $webhook_url, //the url to your webhook
    'is_active'   => true,
    'headers'     => array(
      'X-Custom-Auth' => $client_secret  //I validate the webhook request with the app client secret
    )
);

# install the webhook
bc::createResource('/hooks', $order_webhook);

# print to confirm 
print_r(bc::getCollection('/hooks');

sudosoul avatar Jul 06 '15 19:07 sudosoul

Hello Robert,

Thank you for your valuable reply.

I have some questions

  1. Now I have trail store account can i use this for webhook?
  2. Can i add multiple store accounts for one app?
  3. How can i create the relation about store and app? the partner id is the store's account id?
  4. You have any video or docs for app? its really help me.

pankajEdreamz avatar Jul 07 '15 14:07 pankajEdreamz

Hi @pankajEdreamz,

Most of your questions about creating a public app can be answered here: https://developer.bigcommerce.com/api/using-oauth-intro

But in an attempt to answer:

  1. Yes, you can use webhooks on your trial store as long as the app has been installed on that trial store.
  2. Yes, you can install the app on multiple stores ONLY IF the store owner account is the same as the app developer account.
  3. Once you have your app registered at https://developer.bigcommerce.com, the app will appear in the app store, under "My Draft Apps" (top left corner). Your client ID is assigned to you once you create the draft app.
  4. I recommend reading the official documentation here: https://developer.bigcommerce.com/api/using-oauth-intro If you still have specific questions with code example, feel free to ping me here (@mullinsr), or on StackOverflow(@sudo soul).

Cheers, Rob

sudosoul avatar Jul 08 '15 05:07 sudosoul