What is the Connection Bridge and why do I need it?
Connection Bridge file is what helps API2Cart users connect stores which are based on open-source shopping platforms like Magento, WooCommerce, PrestaShop, and CS-Cart. API2Cart API works directly with databases of such type of shopping platforms via a bridge file. Read more.
We use the minimum of code in our bridge files. Running SQL queries allows us to retrieve the data directly without running all the shopping cart code. What is more, the bridge allows us to work with the data that is not available via the platform’s API.
Benefits of the Connection Bridge:
- Low server load, because all data is proceeded on our side.
- Flexibility, as we can add new methods without updating the bridge.
This special access gateway is secured by the unique token for safe data processing. To add a store to your API2Cart account you have to set up Connection Bridge to enable data interaction.
There are two ways you can connect Bridge file:
1. Manually download the Bridge to your computer. It will be stored in zip file named “bridge.zip”. Extract the file. It will contain “bridge2cart” folder. Upload it to the store’s root folder via FTP client (WinSCP, FileFTP, FileZilla, CuteFTP, etc.)
If needed, bridge file can be stored in any folder on server, but in that case you’ll need to use parameters bridge_url (the full http url for a bridge) and store_root (absolute server path to the store root folder).
If the bridge folder is contained in the store root folder, then you don’t need to specify store_root parameter, only bridge_url.
After uploading the bridge, use cart.create method.
For this, press the button “Add store” in your API2Cart admin panel and check the box “Please upload bridge to my store” and provide your FTP credentials.
To check if the Connection Bridge file has been installed correctly enter https://[yourstore url]/bridge2cart/bridge.php within your browser address line. If the bridge file is working correctly, you will see the following message:
Check the current bridge version here.
If not, please set the following permissions:
- 644 or 666 for "bridge.php", depending on your server configuration
- 755 or 777 for "/bridge2cart" folder, depending on your server configuration
Note! We strongly recommend to turn off your website redirects to ensure proper functioning of the Connection Bridge file.
Posted in: General Service Questions