You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+310Lines changed: 310 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -56,6 +56,315 @@ into the scope with the following namespace declaration:
56
56
use Bigcommerce\Api\Client as Bigcommerce;
57
57
~~~
58
58
59
+
V3 Update - *NEW
60
+
---------
61
+
This update is on the development with `Backward Compatibility` and can be easily customised on future version releases. Feel free to add more features and create issues.
62
+
63
+
`configureBasicAuth` is Completely removed now you can only configure using `auth_token, client_id and store_hash`
64
+
65
+
Now you can set the version on Configuration and can be overridden anywhere in the code.
66
+
~~~php
67
+
Bigcommerce::configure(array(
68
+
'client_id' => 'xxxxxxxxxxxxxxxxxxxxxx',
69
+
'auth_token' => 'xxxxxxxxxxxxxxxxxxxxxxx',
70
+
'store_hash' => 'xxxxxxxxx',
71
+
'version' => 'v3' //optional By Default set as 'v2'
72
+
));
73
+
74
+
//If you don't want to set version by default, you can always set it in the method.
75
+
76
+
$brands = Bigcommerce::getBrands([],"v3");
77
+
78
+
foreach($brands as $brand){
79
+
echo $brand->name."\n";
80
+
}
81
+
~~~
82
+
As of now, Only `Carts, Wishlists and Catlalog\brands support 'v3'` other APIs are still in development will be added here once it is completed, Meanwhile `You can still use 'v2' features without any issues`.
83
+
84
+
Set 'v3' by default if you're only using 'v3' APIs
85
+
86
+
'v3' methods has `$version` parameter which can be used if you didn't set version 'v3' as default version.
87
+
88
+
##Carts(V3)
89
+
90
+
you can do almost all the functions in cart.
91
+
92
+
**Get Cart by Cart Id**: `getCart($id, $version = null);`
93
+
* $id = String Cart Id
94
+
* $version = (Optional) String "v2", "v3", ..
95
+
~~~php
96
+
Bigcommerce::configure(array(
97
+
'client_id' => 'xxxxxxxxxxxxxxxxxxxxxx',
98
+
'auth_token' => 'xxxxxxxxxxxxxxxxxxxxxxx',
99
+
'store_hash' => 'xxxxxxxxx',
100
+
'version' => 'v3'
101
+
));
102
+
$cart = Bigcommerce::getCart();
103
+
104
+
echo $cart->id;
105
+
106
+
//for this documentation, I'll use the above example
107
+
//$version variable available for only methods that use 'v3', you can use older functions as it was without '$version' variable
0 commit comments