Shopping Cart Systems

Connect with your mobile customers using Shopgate.


In this article, you will find out how to create an app and mobile website from your Swisscart desktop shop.


Available features

With Swisscart and Shopgate, you are able to create your app and mobile website with the following features:





Import to Swisscart



Customer Account

Login with Desktop Shop Account
Login to Desktop Shop with Mobile Account
Customer Groups / Tier Pricing
Show Desktop Orders On Mobile


✘ / ✘

Export to Shopgate Mobile Shop




Delivery Status "Shipped"
Order Status "Canceled"
Stock Quantity, on Product Detail Page


Validate, upon Cart Changes

Shipping Method & Price
Product Availability


Payments Supported





Install the Shopgate plugin

The Shopgate plugin for Swisscart can be installed in all Swisscart shops starting from version 4.0. Simply upload the plugin to your Swisscart folder and activate it in your Swisscart admin page. To do this, please follow the steps below:

Download the plugin

Download the latest plugin via this link (this is the same plugin as osCommerce) and extract the content of the zip file.

Upload the plugin

You need an FTP client tool (such as FileZilla) to copy the plugin into your Swisscart shop's root directory.

  1. Connect FileZilla or another FTP program to your server.
  2. Navigate to the Shopgate plugin you just extracted from the previous step.
  3. Mark the files and drag them to your shop's main directory.
  4. When asked, choose to overwrite files and folders.

Set file permissions

Set permissions for the folders config and temp that are located in ext/modules/shopgate/shopgate_library to readable and writeable (774*). Check all checkboxes in the pop-up, and choose "Apply to all files and directories". Click OK.

* If you cannot save your changes or configurations, set file permissions to 777.

Modify the codes

In order for the Shopgate plugin to work, a few lines of codes need to be added to your shop backend - Copy the highlighted codes and paste them at the corresponding lines in your file.

Please keep in mind:

  • Line numbers shown below can be different from those in your file.
  • The paths are relative to your shop’s base folder. E.g. if your shop has been installed at /public_html/catalog/, then the path of includes/filenames.php refers to /public_html/catalog/includes/filename.php.
  • The default folder name admin is used below. If you have renamed your admin folder, locate the files in that directory.

For more detailed descriptions on how to modify codes in your shop's backend folders, click here.

File 1: includes/filenames.php
define('FILENAME_SHOPPING_CART', 'shopping_cart.php');
define('FILENAME_SPECIALS', 'specials.php');
define('FILENAME_SSL_CHECK', 'ssl_check.php');
define('FILENAME_TELL_A_FRIEND', 'tell_a_friend.php');
define('FILENAME_UPCOMING_PRODUCTS', 'upcoming_products.php');

/******** SHOPGATE **********/
define('FILENAME_SHOPGATE', 'shopgate.php');
/******** SHOPGATE **********/
File 2: admin/includes/filenames.php
define('FILENAME_TAX_CLASSES', 'tax_classes.php');
define('FILENAME_TAX_RATES', 'tax_rates.php');
define('FILENAME_VERSION_CHECK', 'version_check.php');
define('FILENAME_WHOS_ONLINE', 'whos_online.php');
define('FILENAME_ZONES', 'zones.php');

/******** SHOPGATE **********/
define('FILENAME_SHOPGATE', 'shopgate.php');
/******** SHOPGATE **********/
File 3: admin/includes/column_left.php
if (tep_session_is_registered('admin')) {
$cl_box_groups = array();

include(DIR_WS_BOXES . 'configuration.php');
include(DIR_WS_BOXES . 'catalog.php');
include(DIR_WS_BOXES . 'modules.php');
include(DIR_WS_BOXES . 'customers.php');
include(DIR_WS_BOXES . 'taxes.php');
include(DIR_WS_BOXES . 'localization.php');
/******** SHOPGATE **********/
include(DIR_WS_BOXES . 'shopgate.php');
/******** SHOPGATE **********/
include(DIR_WS_BOXES . 'reports.php');
include(DIR_WS_BOXES . 'tools.php');
File 4: admin/includes/languages/english.php
define('ERROR_DESTINATION_DOES_NOT_EXIST', 'Error: Destination does not exist.');
define('ERROR_DESTINATION_NOT_WRITEABLE', 'Error: Destination not writeable.');
define('ERROR_FILE_NOT_SAVED', 'Error: File upload not saved.');
define('ERROR_FILETYPE_NOT_ALLOWED', 'Error: File upload type not allowed.');
define('SUCCESS_FILE_SAVED_SUCCESSFULLY', 'Success: File upload saved successfully.');
define('WARNING_NO_FILE_UPLOADED', 'Warning: No file uploaded.');

/******** SHOPGATE **********/
include(DIR_FS_CATALOG . "ext/modules/shopgate/base/admin/includes/languages/english.php");
/******** SHOPGATE **********/
File 5: admin/orders.php
if ( ($check_status['orders_status'] != $status) || tep_not_null($comments)) {
tep_db_query("update " . TABLE_ORDERS . " set orders_status = '" . tep_db_input($status) . "', last_modified = now() where orders_id = '" . (int)$oID . "'");

$customer_notified = '0';
if (isset($HTTP_POST_VARS['notify']) && ($HTTP_POST_VARS['notify'] == 'on')) {
$notify_comments = '';
if (isset($HTTP_POST_VARS['notify_comments']) && ($HTTP_POST_VARS['notify_comments'] == 'on')) {
$notify_comments = sprintf(EMAIL_TEXT_COMMENTS_UPDATE, $comments) . "\n\n";

$email = STORE_NAME . "\n" . EMAIL_SEPARATOR . "\n" . EMAIL_TEXT_ORDER_NUMBER . ' ' . $oID . "\n" . EMAIL_TEXT_INVOICE_URL . ' ' . tep_catalog_href_link(FILENAME_CATALOG_ACCOUNT_HISTORY_INFO, 'order_id=' . $oID, 'SSL') . "\n" . EMAIL_TEXT_DATE_ORDERED . ' ' . tep_date_long($check_status['date_purchased']) . "\n\n" . $notify_comments . sprintf(EMAIL_TEXT_STATUS_UPDATE, $orders_status_array[$status]);

tep_mail($check_status['customers_name'], $check_status['customers_email_address'], EMAIL_TEXT_SUBJECT, $email, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);

$customer_notified = '1';

tep_db_query("insert into " . TABLE_ORDERS_STATUS_HISTORY . " (orders_id, orders_status_id, date_added, customer_notified, comments) values ('" . (int)$oID . "', '" . tep_db_input($status) . "', now(), '" . tep_db_input($customer_notified) . "', '" . tep_db_input($comments) . "')");

/******** SHOPGATE **********/
include(DIR_FS_CATALOG . "ext/modules/shopgate/base/admin/orders.php");
onUpdateOrdersStatus($oID, $status);
/******** SHOPGATE **********/

$order_updated = true;
File 6: admin/includes/functions/general.php
function tep_remove_order($order_id, $restock = false) {
if ($restock == 'on') {
$order_query = tep_db_query("select products_id, products_quantity from " . TABLE_ORDERS_PRODUCTS . " where orders_id = '" . (int)$order_id . "'");
while ($order = tep_db_fetch_array($order_query)) {
tep_db_query("update " . TABLE_PRODUCTS . " set products_quantity = products_quantity + " . $order['products_quantity'] . ", products_ordered = products_ordered - " . $order['products_quantity'] . " where products_id = '" . (int)$order['products_id'] . "'");

tep_db_query("delete from " . TABLE_ORDERS . " where orders_id = '" . (int)$order_id . "'");
tep_db_query("delete from " . TABLE_ORDERS_PRODUCTS . " where orders_id = '" . (int)$order_id . "'");
tep_db_query("delete from " . TABLE_ORDERS_PRODUCTS_ATTRIBUTES . " where orders_id = '" . (int)$order_id . "'");
tep_db_query("delete from " . TABLE_ORDERS_STATUS_HISTORY . " where orders_id = '" . (int)$order_id . "'");
tep_db_query("delete from " . TABLE_ORDERS_TOTAL . " where orders_id = '" . (int)$order_id . "'");
/******** SHOPGATE **********/
include(DIR_FS_CATALOG . "ext/modules/shopgate/plugin.php");
tep_db_query("delete from " . TABLE_ORDERS_SHOPGATE_ORDER . " where orders_id = '" . (int)$order_id . "'");
/******** SHOPGATE **********/
File 7: includes/application_top.php
 // initialize the message stack for output messages
require(DIR_WS_CLASSES . 'message_stack.php');
$messageStack = new messageStack;

/******* SHOPGATE **********/
include_once DIR_FS_CATALOG.'ext/modules/shopgate/base/includes/application_top.php';
/******* SHOPGATE **********/
File 8: includes/template_top
<script type="text/javascript" src="ext/jquery/fancybox/jquery.fancybox-1.3.4.pack.js"></script>
<link rel="stylesheet" type="text/css" href="ext/960gs/<?php echo ((stripos(HTML_PARAMS, 'dir="rtl"') !== false) ? 'rtl_' : ''); ?>960_24_col.css" />
<link rel="stylesheet" type="text/css" href="stylesheet.css" />
<?php echo $oscTemplate->getBlocks('header_tags'); ?>
/******** SHOPGATE **********/
echo $shopgateJsHeader."\n";
/******** SHOPGATE **********/
File 9: includes/languages/english.php
define('TEXT_CCVAL_ERROR_INVALID_DATE', 'The expiry date entered for the credit card is invalid. Please check the date and try again.');
define('TEXT_CCVAL_ERROR_INVALID_NUMBER', 'The credit card number entered is invalid. Please check the number and try again.');
define('TEXT_CCVAL_ERROR_UNKNOWN_CARD', 'The first four digits of the number entered are: %s. If that number is correct, we do not accept that type of credit card. If it is wrong, please try again.');

define('FOOTER_TEXT_BODY', 'Copyright © ' . date('Y') . ' ' . STORE_NAME . '
Powered by osCommerce');

/******* SHOPGATE **********/
include_once DIR_FS_CATALOG.'ext/modules/shopgate/base/includes/languages/english.php';
/******* SHOPGATE **********/

Install the plugin

  1. Log in to your shop’s backend.
  2. Navigate to Modules → Payment in the left menu bar, locate Shopgate in the list, and click + Install button on the right.
  3. If installed correctly, the Shopgate plugin should now be listed on the menu bar on top. If you don't see it right away, reload the page. Your plugin is now installed successfully on your Swisscart backend.
  4. Click on Shopgate → Installation aid on the menu bar to open the settings page (shown below) for the Shopgate plugin. Leave this page open - we will explain how to find the required info in the next chapters.


Establish connections

After the Shopgate plugin has been installed successfully, two simple tasks need to be done to connect your mobile shop at Shopgate to your shop's backend: to enter API credentials in your shop's backend, and to enter your shop's URL in your Shopgate's admin page.

Find API credentials

  1. Log in to your Shopgate Admin and navigate to Integration → Install Interface.
  2. In the drop-down labeled Select system, type Swisscart and select it.
  3. A popup opens. Look for Customer number, Shop number, API key, and Alias under 2. Configure. These are the API credentials the plugin needs to be authenticated at the Shopgate backend. Leave this page open - we will come back to enter the URL.
  4. Copy Customer number, Shop number, API key, and Alias, and paste them individually onto the plugin configuration page you left open from the last chapter. The rest of the options can be configured later (Explained in Configure the Plugin). Click Save.


Connect your shop to Shopgate

  1. Go back to the pop-up window at your Shopgate merchant page (step 4). Enter your shop's URL to the text field under 3. Enter URL. Click connect to establish the interface.
  2. If a connection is made successfully, a popup shown below will open. Leave all assignments to ON and click Save.

That's it! Now the Shopgate backend will automatically start to import product data via the newly established interface. Welcome to the mobile world 😊


Update an existing plugin

  1. Deactivate the plugin. Log in to your shop’s backend. Navigate to Modules → Payment in the left menu bar. Find Shopgate in the list of modules, and click - Remove button on the right.
  2. Backup the plugin. Use an FTP tool like FileZilla to back up your installation of the plugin. Back up the folder ext/modules/shopgate by downloading it:
  3. Delete the plugin. Use your FTP tool to delete the folder ext/modules/shopgate: Right-click on Shopgate folder, then Delete and Yes.
  4. Refer to Install the Shopgate plugin to install the latest version of the plugin.


Configure the plugin

Find the detailed explanations under each option. Click here to locate the configuration page.

Connection Settings

Configure your Shopgate credentials. Those are needed in order to connect to Shopgate.

  1. Module type
    Choose “Non-US” if you’re in a market with fixed tax rates, as most countries in Europe. Choose “US” if you’re on a market with tax rates depending on where your shop is located and where customers are located.
  2. Customer number
    Your customer number at Shopgate.
  3. Shop number
    Your shop’s number at Shopgate.
  4. API key
    Your API key assigned by Shopgate.
Mobile Redirect

Set up your mobile website and redirect.

  1. Shop alias
    The alias is the subdomain of, e.g., where your mobile website can be found. This is used as a fallback if no CNAME is configured.
  2. Custom URL to mobile webpage (CNAME)
    A CNAME is a subdomain of your own domain that points to your mobile website. Usually, that’s something like You’ll have to configure this on your server.
  3. Redirected languages
    Select the languages the redirect to the mobile website should be active for.
Exporting Categories and Products

Choose how your products should be exported.

  1. Language
    Choose the language the products should be exported in.
  2. Currency
    Choose the currency your products should be exported in.
  3. Country
    Choose the country your products should be exported for.
  4. Tax zone for Shopgate
    Select the tax zone products should be exported.
Importing Orders

Configure how orders are imported into your shop.

  1. Shipping not blocked
    Set the status to be assigned to incoming Shopgate orders that are not blocked for shipping.
  2. Shipping blocked
    Set the status to be assigned to incoming Shopgate orders that are blocked for shipping.
  3. Shipped
    Select the status you set for orders that have been shipped. This is used to synchronize the shipping status of orders with Shopgate.
  4. Cancelled
    Select the status you set for orders that have been canceled. This is used to synchronize the cancellation status of orders with Shopgate.
System Settings

These are debugging settings that are usually only used on test and development systems or for compatibility reasons.

  1. Shop system encoding
    Choose the encoding of your system. Swisscart uses ISO-8859-15 by default. If you modified your shop you might need to choose a different encoding instead.
  2. Shopgate server
    Choose from the “Live” or the “Playground” Shopgate servers for API communication. Alternatively, you can provide a “Custom” Shopgate API URL.
  3. Custom Shopgate server URL
    If you chose “Custom” in the drop-down menu box above, provide a custom URL to the Shopgate API here.


Was this article helpful?
Can't find what you're looking for?
Let us help you—submit a support ticket.
Contact Support