PHP SDK
Last updated
Last updated
We have developed a ready to use PHP library to allow you to connect your shop with our service in less than one.
Our plugin is available via compose. Just run the following command to install it
composer require cartsguru/cartsguru
You can download the library follow this url
Our SDK expose a CartsGuru class that you should extend to adapt it to your needs: - override the constructor to set your API credentials. - override adaptCart, adaptOrder and adaptProduct to convert your data into our API models. You can find documentation about and
A cart must be sent on each update.
An order must be sent when it is created or state change.
You should insert the tag on each page that the visitor can access
We must distinguish two kind of cart : identified and non identified. When the visitor is logged in, we speak about identified cart. You must set the accountId field with the user email on this case. When the visitor is anonymous, it's a non identified cart. And so, you should set the visitorId field using the value of the cookie trkcg_vid