Support Center

Connecting to commerce:SEO

Follow

 

commerce:SEO is available as a shopping cart system at Shopgate.

By setting up the Shopgate plugin for your commerce:SEO shop, you will get these wonderful features straight into your mobile shop and apps:

Support

Version

 

2.1 - 3.0*

Import to commerce:SEO

Orders

 

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

Products
Categories
Reviews

 



Sync

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

 



Validate, upon Cart Changes

Coupon
Shipping Method & Price
Product Availability

 



Payments Supported

Prepayment, Invoice, Cash on Delivery, Direct Debit, PayPal

Notes

Customized text option available in configuration.

Product and brand searches done in a search engine on a mobile device are now redirected to the shop's mobile website.

* Known issues with version 3.0: We cannot send emails to new customers; "no shipping costs" checkbox is not taken into account yet

 

In this article, you will find the instructions to set up the Shopgate plugin for your commerce:SEO shop.

 

Topics covered in this article:

  1. Installing the Shopgate Plugin
  2. Establishing connection between plugin and Shopgate
  3. Updating an existing Shopgate plugin
  4. Configuring the Plugin

 

1. Installing the Shopgate plugin

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

1.1 Downloading the plugin

Download the plugin via this link: http://files.shopgate.com/plugins/xtcommerce3.zip (same plugin as xt:Commerce 3) and extract the content of the zip file. This should give you 4 folders:

  • admin
  • includes
  • lang
  • shopgate

 

1.2 Uploading the plugin to your server

You need an FTP client tool to copy the plugin into your commerce:SEO shop. Plenty of FTP programs can be found on the internet. If you don’t know which one to use, we recommend FileZilla. (Link to download FileZilla)

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



  3. In case a dialog appears asking you to overwrite files, select overwrite, check all checkboxes (marked as [2] on the image), and click OK.

 

1.3 Setting file permissions in your commerce:SEO backend

Before the Shopgate plugin can be connected and configured, you need so give permissions to the "temp" and "config" folders on your server.

  1. To do this, navigate to the /shopgate/shopgate_library folder on your server and select both temp and config folders. Right-click on your selection and open the Change file attributes dialog by clicking on File permissions....



  2. Enter the numeric value "774*" into the input field. Make sure the checkbox "Recurse into subdirectories" is enabled and "Apply to all files and directories" is selected as the option. Click OK to finish the upload.
    * If you cannot save your changes or configurations, set file permissions to 777.

 

1.4 Adjusting codes

To make the plugin fully accessible in the shop, a few lines of codes need to be added to 11 files in your commerce:SEO backend. For detailed descriptions on how to modify codes in your shop's backend folders, click here.

Please modify all files listed below. Copy the marked codes, and paste them at the corresponding lines in your file. Line numbers in the following code snippets, however, refer to an "unmodified" version of files. If you already modified your files, the line numbers may vary. Only the highlighted parts need to be added into the files.

The paths are relative to your shop’s base folder. E.g. if commerce:SEO has been installed at /public_html/catalog/, then the path of includes/filenames.php refers to /public_html/catalog/includes/filename.php.

 

----------------------------------- part 1 (commerce:SEO 2.x only) -----------------------------------

File: lang/german/admin/german.php

define('TEXT_PDF_ARTIKELNR','Artikel-Nr.');
define('TEXT_PDF_EINZELPREIS','Einzelpreis');
define('TEXT_PDF_PREIS','Gesamtpreis');
define('TEXT_PDF_KOMMENTAR','Kommentare');

/******* SHOPGATE **********/
include_once DIR_FS_CATALOG.'/shopgate/base/lang/german/admin/german.php';
/******* SHOPGATE **********/

//Dividers text for menu

define('BOX_HEADING_MODULES','Module');
define('BOX_HEADING_LOCALIZATION','Sprachen / Währungen');

 

----------------------------------- part 2 (commerce:SEO 2.x only) -----------------------------------

File: lang/english/admin/english.php

define('TEXT_PDF_ARTIKELNR','Item-Nr.');
define('TEXT_PDF_EINZELPREIS','Single price');
define('TEXT_PDF_PREIS','Total price');
define('TEXT_PDF_KOMMENTAR','Comments');

/******* SHOPGATE **********/
include_once DIR_FS_CATALOG.'/shopgate/base/lang/english/admin/english.php';
/******* SHOPGATE **********/

define('BOX_PRODUCT_FILTER','Product Filter');
define('BOX_MODULE_ORDER_PRODUCTS','Ordering-articles');

 

----------------------------------- part 3 -----------------------------------

File: includes/database_tables.php

define('TABLE_PRODUCTS_BUNDLES','products_bundles');

define('TABLE_ACCESSORIES','accessories');
define('TABLE_ACCESSORIES_PRODUCTS','accessories_products');
define('TABLE_CSEO_ANTISPAM','cseo_antispam');
/******** SHOPGATE **********/
define("TABLE_SHOPGATE_ORDERS","orders_shopgate_order");
/******** SHOPGATE **********/
?>

 

----------------------------------- part 4 -----------------------------------

File: admin/includes/modules/order_update_order.php

xtc_db_query("INSERT INTO ".TABLE_ORDERS_STATUS_HISTORY." (orders_id, orders_status_id, date_added, customer_notified, comments) values ('".xtc_db_input($oID)."', '".xtc_db_input($status)."', now(), '".$customer_notified."', '".xtc_db_input($comments)."')");

/******* SHOPGATE **********/
include_once DIR_FS_DOCUMENT_ROOT.'/shopgate/base/admin/orders.php';
setShopgateOrderStatus($oID,$status);
/******* SHOPGATE **********/

$order_updated=true;
}

if($order_updated){

 

----------------------------------- part 5.1 for commerce:SEO 3 -----------------------------------

File: admin/includes/column_top.php

$module_array = array ();
while ($navi = xtc_db_fetch_array($nav_query)) {
if ($navi[$navi['name']] !='0') {
if ($navi['nav_set'] == '') {
$module_array[$rows] = array(
'href' => xtc_href_link($navi['filename']),
'title' => $navi['title'],
'active' => ($p == $navi['name'] ? true : false),
);
} else {
$module_array[$rows] = array(
'href' => xtc_href_link($navi['filename'], 'set=' . $navi['nav_set']),
'title' => $navi['title'],
'active' => ($_GET['set'] == $navi['nav_set'] ? ' active' : ''),
);
}
}
$rows++;
}

include_once DIR_FS_CATALOG.'/shopgate/base/lang/english/admin/english.php';
$module_array[$rows] = array(
'href' => xtc_href_link(FILENAME_SHOPGATE, 'subsite=shopgate&sg_option=config&gID=1'),
'title' => 'Shopgate',
'active' => ($_GET['subsite'] == 'shopgate' ? ' active' : ''),
);
$rows++;

$smarty->assign('mlink', $mlink);
$smarty->assign('module_array', $module_array);

 

----------------------------------- part 5.1 for commerce:SEO 2 -----------------------------------

File: admin/includes/column_top.php

  </ul>
</li>

<!-- Shopgate Config -->
<?php include_once DIR_FS_DOCUMENT_ROOT.'/shopgate/base/admin/includes/column_top.php'; ?>

<!-- Country Config -->
<li>
<a href="<?php echo xtc_href_link(FILENAME_LANGUAGES, 'subsite=zones'); ?>"><img src="images/admin_icons/content.png" /><span><?php echo COUNRTY ?></span></a>
<ul>

 

If you are using an older version of commerce:SEO, and you can't find the code described above, try this instead:

----------------------------- part 5.1 for older versions ----------------------------

File: admin/includes/column_top.php

<table width="100%" class="outerTable top_table">
<tr>
<td>
<a class="top_link<?php echo linkCheck('products'); ?>" href="<?php echo xtc_href_link(FILENAME_CATEGORIES, 'subsite=products'); ?>"><?php echo PRODUCTS; ?></a>
<a class="top_link<?php echo linkCheck('customers'); ?>" href="<?php echo xtc_href_link(FILENAME_CUSTOMERS, 'subsite=customers'); ?>"><?php echo CUSTOMERS; ?></a>
<a class="top_link<?php echo linkCheck('modules'); ?>" href="<?php echo xtc_href_link(FILENAME_MODULES, 'set=payment&subsite=modules'); ?>"><?php echo MODULES; ?></a>
<a class="top_link<?php echo linkCheck('statistics'); ?>" href="<?php echo xtc_href_link('whos_online.php', 'subsite=statistics') ?>"><?php echo STATISTIK; ?></a>
<a class="top_link<?php echo linkCheck('tools'); ?>" href="<?php echo xtc_href_link(FILENAME_MODULE_NEWSLETTER_PRODUCTS, 'subsite=tools') ?>"><?php echo TOOLS; ?></a>
<?php if (ACTIVATE_GIFT_SYSTEM=='true') { ?>
<a class="top_link<?php echo linkCheck('gift'); ?>" href="<?php echo xtc_href_link(FILENAME_COUPON_ADMIN, 'subsite=gift') ?>"><?php echo GIFT; ?></a>
<?php } ?>
<a class="top_link<?php echo linkCheck('zones'); ?>" href="<?php echo xtc_href_link(FILENAME_LANGUAGES, 'subsite=zones') ?>"><?php echo COUNRTY; ?></a>
<a class="top_link<?php echo linkCheck('seo_config'); ?>" href="<?php echo xtc_href_link(FILENAME_CONFIGURATION, 'gID=155&subsite=seo_config') ?>">cSEO Config</a>
<a class="top_link<?php echo linkCheck('modules'); ?>" href="<?php echo xtc_href_link('module_export.php?set=&module=commerce_seo_url', '') ?>">cSEO URL</a>

<?php /******* SHOPGATE **********/ ?>
<?php include_once DIR_FS_DOCUMENT_ROOT.'/shopgate/base/admin/includes/column_top.php'; ?>
<?php /******* SHOPGATE **********/ ?>

<a class="top_link<?php echo linkCheck('config'); ?>" href="<?php echo xtc_href_link(FILENAME_CONFIGURATION, 'gID=1&subsite=config'); ?>"><?php echo CONFIG; ?></a>
</td>
</tr>
</table>

 

----------------------------------- part 5.2 -----------------------------------

File: admin/includes/column_left.php

 if (($cs == '0') && ($aa['orders_status'] == '1')) echo '<a '.($p == 'orders_status'?'class="menu_link_aktiv"':'').' href="' . xtc_href_link(FILENAME_ORDERS_STATUS, '') . '" class="menuBoxContentLink">' . BOX_ORDERS_STATUS . '</a>';
if (ACTIVATE_SHIPPING_STATUS=='true')
if (($cs == '0') && ($aa['shipping_status'] == '1')) echo '<a '.($p == 'shipping_status'?'class="menu_link_aktiv"':'').' href="' . xtc_href_link(FILENAME_SHIPPING_STATUS, '') . '" class="menuBoxContentLink">' . BOX_SHIPPING_STATUS . '</a>';
if (($cs == '0') && ($aa['products_vpe'] == '1')) echo '<a '.($p == 'products_vpe'?'class="menu_link_aktiv"':'').' href="' . xtc_href_link(FILENAME_PRODUCTS_VPE, '') . '" class="menuBoxContentLink">' . BOX_PRODUCTS_VPE . '</a>';
if (($cs == '0') && ($aa['campaigns'] == '1')) echo '<a '.($p == 'campaigns'?'class="menu_link_aktiv"':'').' href="' . xtc_href_link(FILENAME_CAMPAIGNS, '') . '" class="menuBoxContentLink">' . BOX_CAMPAIGNS . '</a>';
if (($cs == '0') && ($aa['cross_sell_groups'] == '1')) echo '<a '.($p == 'cross_sell_groups'?'class="menu_link_aktiv"':'').' href="' . xtc_href_link(FILENAME_XSELL_GROUPS, '') . '" class="menuBoxContentLink">' . BOX_ORDERS_XSELL_GROUP . '</a>';
echo '</div>';
break;

case 'shopgate': include_once DIR_FS_DOCUMENT_ROOT.'/shopgate/base/admin/includes/column_left.php'; break;

default :
break;
}
?>

 

----------------------------------- part 6 -----------------------------------

File: admin/includes/database_admin.php

define('TABLE_BUTTON_LANGUAGES','button_languages');
define('TABLE_ACCESSORIES','accessories');
define('TABLE_ACCESSORIES_PRODUCTS','accessories_products');

define('TABLE_CSEO_LANG_BUTTON','cseo_lang_button');
define('TABLE_CSEO_ANTISPAM','cseo_antispam');
/******** SHOPGATE **********/
define("TABLE_SHOPGATE_ORDERS","orders_shopgate_order");
/******** SHOPGATE **********/
?>

 

----------------------------------- part 7 -----------------------------------

File: admin/includes/filenames_admin.php

define('FILENAME_CSEO_LANGUAGE_BUTTON','cseo_language_button.php');
define('FILENAME_CSEO_IDS','cseo_ids.php');
define('FILENAME_CSEO_ANTISPAM','cseo_antispam.php');
/******** SHOPGATE **********/
define('FILENAME_SHOPGATE','shopgate.php');
/******** SHOPGATE **********/
?>

 

----------------------------------- part 8 -----------------------------------

File: admin/includes/functions/general.php

xtc_db_query("delete FROM ".TABLE_ORDERS." WHERE orders_id = '".xtc_db_input($order_id)."'");
xtc_db_query("delete FROM ".TABLE_ORDERS_PRODUCTS." WHERE orders_id = '".xtc_db_input($order_id)."'");
xtc_db_query("delete FROM ".TABLE_ORDERS_PRODUCTS_ATTRIBUTES." WHERE orders_id = '".xtc_db_input($order_id)."'");
xtc_db_query("delete FROM ".TABLE_ORDERS_STATUS_HISTORY." WHERE orders_id = '".xtc_db_input($order_id)."'");
xtc_db_query("delete FROM ".TABLE_ORDERS_TOTAL." WHERE orders_id = '".xtc_db_input($order_id)."'");
/******** SHOPGATE **********/
xtc_db_query("delete from ".TABLE_SHOPGATE_ORDERS." where orders_id = '".xtc_db_input($order_id)."'");
/******** SHOPGATE **********/
}

 

----------------------------------- part 9 -----------------------------------

File: includes/header.php

if($_GET['error']=='404'){
header($_SERVER['SERVER_PROTOCOL']." 404 Not Found",true,404);
header('Status: 404 Not Found');
}

/******** SHOPGATE **********/
include_once DIR_FS_CATALOG.'/shopgate/base/includes/header.php';
/******** SHOPGATE **********/

$browser=$_SERVER[HTTP_USER_AGENT];
header("Content-Type: text/html; charset=utf-8");
header('Connection: Keep-Alive');

 

----------------------------------- part 10 -----------------------------------

File: includes/header.php

echo''."\n".''."\n";

/******** SHOPGATE **********/
echo $shopgateJsHeader;
/******** SHOPGATE **********/

if (strstr($PHP_SELF, FILENAME_CHECKOUT_SUCCESS)&& GOOGLE_CONVERSION =='true')
require('includes/google_conversiontracking.js.php');

 

----------------------------------- part 11 -----------------------------------

File: includes/application_top.php

xtc_update_whos_online();
$current_script=basename(basename($_SERVER['SCRIPT_FILENAME']));

/******** SHOPGATE **********/
include_once(DIR_FS_CATALOG.'shopgate/base/includes/application_top.php');
/******** SHOPGATE **********/

if(MODULE_COMMERCE_SEO_INDEX_AVOIDDUPLICATECONTENT=='True'&& MODULE_COMMERCE_SEO_INDEX_STATUS=='True'// [...] Zeile gekürzt

if(substr_count($_SERVER['REQUEST_URI'],'commerce_seo_url.php')>0){

 

1.5 Installing the plugin

  1. Please login in to the admin backend of your shop.



  2. Select Payment from the menu under Modules.



  3. Choose Shopgate from the list of all payment modules and click on Install in the top right corner.



  4. If installed correctly, the Install button will disappear, Uninstall and Edit buttons will appear. Look on the menu bar on the top, Shopgate should now list here. If the Shopgate menu does not appear right away, reload the page. Your plugin is now installed successfully in your commerce:SEO backend.



  5. Click on Shopgate on the top menu bar to open the configuration page for the Shopgate plugin. Leave this page open - we will explain how to find the required info in the next chapters.

 

2. Establishing connections between the plugin and Shopgate

After the Shopgate plugin has been installed successfully, 2 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.

2.1 Getting API credentials

  1. Log in to your Shopgate Admin page.

  2. Click on Integration from the menu bar, then select Install Interface.



  3. In the drop-down labeled Select system, type commerce:SEO and select it.



  4. 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 authenticate at the Shopgate backend. Leave this page open - we will come back to enter the URL (explained in 2.2 Establishing connection)



  5. 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. This is explained in Chapter 4. Configuring the Plugin). Click Save.

 

2.2 Connecting your shop to Shopgate

  1. Go back to the pop-up window at your Shopgate merchant page from last step (Shopgate Admin > Integration > Install Interface).

  2. Under "3. Enter URL", enter the URL of your shop, ideally starting with “https://”. For example: https://www.MyAwesomeShop.com. Click connect to establish the interface.



  3. If a connection is made successfully, a popup shown below will open. Here you will be able to assign jobs for your first connection. We recommend to leave all assignments to ON at this time. Click Save.



  4. Congratulations! Now you should see the progress bar running, and the Shopgate backend automatically filling your mobile shop with your products. Depending on how many products you have, the import process can take anywhere from a few minutes to a few hours. You can always check the status of the imports. If no status bar is shown, it means either the import is finished, or no import is running at the moment.

    Welcome to the mobile world :)

 

3. Updating an existing Shopgate plugin

To update an existing plugin, simply uninstall the Shopgate payment module, and repeat the install process described in Chapter 1. However, skip 1.4. You do NOT need to adjust the codes every time you update the plugin.

It is not necessary to delete any files on your shop server prior to updating the plugin version.

If simply updating the plugin to a newer version, the plugin configurations do not need to be changed.

It is also not necessary to create a new interface connection, since there is already one available and active.

 

4. Configuring the plugin

Here you can find a detailed explanation to every configuration field provided on the settings page for the plugin. The settings page is divided into multiple individual sections which are described here one by one.

4.1 Connection Settings

Customer number

Your customer number which is presented to you every time that you create an interface in the Shopgate merchant area.

Shop number

The shop number of your mobile store, provided by Shopgate.

API key

This is the “password” that the plugin uses to be able to communicate with the Shopgate-MerchantAPI on a secure channel.

 

4.2 Mobile Redirect

Shop alias

The alias is the subdomain of shopgate.com, e.g. myshop.shopgate.com, where your mobile website can be found. This is used as a fallback if no CNAME is configured.

CNAME

A CNAME is a subdomain of your own domain that points to your mobile website. Usually that’s something like m.myawesomeshop.com. You’ll have to configure this on your server.

Redirected languages

Select the languages the redirect to the mobile website should be active for.

 

 

4.3 Exporting Categories and Products

Language

Choose the language the products should be exported in.

Currency

Choose the currency your products should be exported in.

Country

Choose the country your products should be exported for.

Tax zone for Shopgate

Choose the tax zone your products will be exported for. This will calculate the tax rates to be exported for your products.

Reverse category sort order

Choose "Yes" if categories in your mobile shop appear to be sorted upside down.

Reverse products sort order

Choose "Yes" if products in your mobile shop appear to be sorted upside down.

Products description

Choose between the short description, the long description or a combination of both to be used for exporting your products to Shopgate.

Price group for Shopgate

Choose the price group products will be exported for to Shopgate.

Export the “New” category

Here you can set the internal identifier for the virtual category “New products”. When exporting to the mobile website, it is exported as a real category using the specified internal identifier. Please note that this value is fine in most cases and should therefore not be changed. It also does not influence the appearance of the category on the mobile website.

 

4.4 Importing Orders

Customer group

Choose the group assigned to customers on incoming Shopgate orders.

Shipping method

Choose the shipping method applied to incoming Shopgate orders.

Shipping not blocked

Set the status to be assigned on incoming Shopgate orders that are not blocked for shipping.

Shipping blocked

Set the status to be assigned on incoming Shopgate orders that are blocked for shipping.

Shipped

Select the status you set on orders that have been shipped. This is used to synchronize the shipping status of orders with Shopgate.

Order Confirmation Mail

It’s possible to send order confirmation emails after importing an order. These emails are sent out of your shop. Choose “Yes” if you want this feature to be activated, “No” otherwise.

Shipping Confirmation Mail

Choose “Yes” if you want Shopgate to send a shipping confirmation mail after the shipping status has been transmitted to Shopgate, “No” otherwise.

Cancelled

Select the status you set on orders that have been cancelled. This is used to synchronize the cancellation status of orders with Shopgate.

 

4.5 System Settings

Shop system encoding

Choose the encoding of your system. This is usually “ISO-8859-15” for commerce:SEO.

Shopgate server

Choose between the “Live” or the “Playground” Shopgate servers for API communication. Alternatively you can provide a “Custom” Shopgate API URL.

Custom Shopgate server URL

If you chose Custom in the dropdown menu box above, provide a custom URL to the Shopgate API here.

 

Comments