commerce:SEO

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

 

Available features

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

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


 

Install 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:

Download the plugin

Download the plugin via this link (same plugin as xt:Commerce 3) and extract the content of the zip file. This should give you 4 folders: admin, includes, lang, and shopgate.

Upload the plugin to your server

You need an FTP client tool (such as FileZilla) to copy the plugin into your commerce:SEO shop.

  1. Connect your 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.

Set file permissions

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.

Adjust 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 into 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 to 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.

(commerce:SEO 2 only) File 1: 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');
(commerce:SEO 2 only) File 2: 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');
File 3: 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 **********/
?>
File 4: 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){
(commerce:SEO 3 only) File 5.1: 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);
(commerce:SEO 2 only) File 5.1: 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>
(Older versions only) File 5.1: admin/includes/column_top.php

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

<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>
File 5.2: 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;
}
?>
File 6: 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 **********/
?>
File 7: 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 **********/
?>
File 8: 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 **********/
}
File 9: 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');
File 10: 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');
File 11: 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){

Install the plugin

  1. Log into your shop's admin.
  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.

 

Establish connections

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.

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 commerce:SEO 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 (explained in Establish connection)
  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 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 to your first connection. Leave all assignments to ON at this time. 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

To update an existing plugin, simply uninstall the Shopgate payment module, and repeat the install process. However, skip "Adjust codes". 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.

 

Configure the plugin

Here you can find a detailed explanation of 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.

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.

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, e.g. m.myawesomeshop.com. You'll need to configure this on your server.

Redirected languages

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

 

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

Select 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 from the short description, the long description and a combination of both for exporting your products to Shopgate.

Price group for Shopgate

Select 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.

Importing Orders

Customer group

Select 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 to incoming Shopgate orders that are not blocked for shipping.

Shipping blocked

Set the status to be assigned to 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 canceled. This is used to synchronize the cancellation status of orders with Shopgate.

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 drop-down menu box above, provide a custom URL to the Shopgate API here.

 

Was this article helpful?
0 out of 0 found this helpful