Got questions? Contact Us, Call Us 1-800-224-0976 or write manager@api2cart.com

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 types of shopping platforms via a bridge file. Read more.

We use the minimum amount 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:

- Speed

- Low server load, because all data is processed on our side.

- Flexibility, as we can add new methods without updating the bridge.

This special access gateway is secured by the unique signature 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 three ways you can connect Bridge file:

1. Manually download the Bridge to your computer. It will be stored in a zip file named “bridge.zip”. Extract the file. It will contain the “bridge2cart” folder. Upload it to the store’s root folder via FTP client (WinSCP, FileFTP, FileZilla, CuteFTP, etc.)

If needed, the bridge file can be stored in any folder on the 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 account.cart.add method.

2. Automatically upload the Bridge via account.cart.add method. Use account.cart.add method specifying FTP credentials (Host, Port, Login, Password and Store Path) or use API2Cart admin panel.

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. We do not collect any FTP credentials. They are used once, in order to upload the bridge to the store.

3. Using plugins that can be built in the BUILD PLUGIN section on your API2Cart account.

Plugin uploads the bridge and installs it to the store’s root folder. You can place the plugin on the platform app marketplace. Then, your clients will be able to install the bridge in one click.

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:

“Version: xx

BRIDGE INSTALLED.”

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 turning off your website redirects to ensure proper functioning of the Connection Bridge file.

If you have any questions during the process of bridge installation, please read this article or contact us by email (manager@api2cart.com).

Posted in: General Service Questions