Your 3P OpenCart installation can have any number of subshops with any language. Some customers host several subshops with the same language in a single country, while others manage several countries with one subshop and language each. OpenCart allows you to configure any of these scenarios in one installation and database.
The OpenCart Administration however always shows customers and orders from all subshops. If you want to manage one subshop at a time, you have to use the 3P BackOffice.
Before creating a new subshop (OpenCart store), you may need to add a new language and a new currency to OpenCart.
Adding a new language
1. | Download your language for the correct OpenCart version (example 1.5.6) and install it. Read Adding a language topic in the OpenCart documentation.
 |
2. | Insert the language you have just downloaded and installed in the OpenCart Administration > System > Localisation > Languages. Make sure to check the documentation of the installed language to find the right Code and Locale values. To the right you see the values of a Greek language installation.
|
3. | Copy the 3p-design folder from opencart\catalog\language\english into your new language folder, and translate the tokens inside the language files contained in this folder. Also translate the email & html templates. For more information on translations click here.
If you want to translate any other string, look for it in the corresponding php files of your language folder. There are 2 locations for language files:
opencart\catalog\language\<your language> and opencart\admin\language\<your language>
|
4. | Translate new strings in the mySQL oc_stock_status and oc_order_status tables using HeidiSQL or the 3P Backoffice. |
5. | Translate (or add) language records in the oc_3p_description table. The following screenshot shows an example for the German language. Make sure you use the right language_id. In the example below it is 2, but for your new language it will be 3 or higher. These values are displayed in several dialogs of the 3P BackOffice and the Paypal Payment:
|
If your store displays strings in the wrong language, or if you need to change the translations, they can be corrected either in the language PHP files, the template files or in one of the mySQL tables.
Adding a Currency
Since each OpenCart installation can have only one default currency, and all prices for other currencies are derived via exchange rate from this default currency, you have to make sure the OpenCart storefront shows the same price as the 3P Publisher application, which reads the prices from the products.xml file. So, if your default currency is €, and a product price inside the products.xml is $13, then the exchange rate € to $ must be set (fixed) to 1,30 in the Value field of the $ currency definition under Administration > System > Localisation > Currencies.

|
Important
1. | The currency code defined in the products.xml (example <Currency>EUR</Currency>) must be the same as the Code field in the OpenCart currency definition. |
2. | After the store installed, the default currency is EUR. All other store currencies will be exchanged from EUR. If you change the default currency, for instance to USD, you will have to create a new EUR currency for the demo store, and define the exchange rate to USD. You then have to re-import the demo products.xml to recalculate all product prices in the store. |
|
Adding a new Subshop (OpenCart store)
Once you have installed new language and defined new currencies, you can create a new subshop. This is done in Administration > System > Settings > New. After defining the shop parameters, you can add products via Administration > System > Products Importer.

|
Important
• | Make sure each shop has a unique subshop ID, and tell us this ID, so we can unlock the shop for the 3P SetupWizard and 3P Publisher applications. |
• | If you import a products.xml file into a subshop, which has a different language than the 3P Demo shop (default, English), then at first you won't be able to see these products in the OpenCart Administration. You have to change the Administration > System > Settings > Default Shop > Administration Language of the default EN store to your new language, in order to see the products & options of the new language. (This is a little drawback in the otherwise great OpenCart multishop feature.) On the other hand, if you install two stores with same language (the default language), you will see the products of both stores in the OpenCart Administration.
|

|
Adding a Payment Gateway
Please follow the corresponding payment module help documentation.
For individual payment gateways in your country, you may have to develop an interface to OpenCart yourself. We've done this in Germany with our own payment system called Pixpedia PayDirect. We used the Paypal Express Checkout module as a basic code example. You may also check the OpenCart payment extension database for payment modules which are not included in the default OpenCart installation. If you have no individual payment gateway and don't need one, we advise to install the following standard payment methods in 3P OpenCart, allowing you to reach up to 80% of worldwide customers according to 2014 statistics:
• | PayPal Express Checkout, or |
• | PayPal Payments Standard
|
Example 1: For Bank Transfer you have to set Order Status to Waiting for payment (1) in the settings dialog. As soon as the money is in your account, you can change the status to Queued (2) in the 3P BackOffice. Only then will the printable PDF files be generated (by a Cron Job).
Example 2: For Paypal Express Checkout, you will have to setup an IPN URL in your Paypal merchant account page. You have to copy this URL to your OpenCart Paypal settings, and assign the payment status values from the table oc_order_status to the corresponding Paypal return codes. There are two mandatory Paypal return codes that need to be associated with 3P OpenCart:
Paypal
|
OpenCart
|
oc_order_status
|
Pending Status
|
Waiting for payment (1)
|
1
|
Completed Status
|
Queued (2)
|
2
|
Whenever a payment gateway requiries you to add a status value to oc_order_status, please use a non-reserved status_id above 200, and also add this ID with a description to the table oc_3p_description. If you then add an image with the name order_statusXY.png to the folder openoffice\images, where XY is your new status_id, you will see a corresponding icon in the 3P BackOffice Orders list. You can then also filter for this new status_id.
Warning: an installed payment extension applies to ALL shops. The Geo Zone option in the payment settings dialog only specifies, if the payment gateway is available at the geographical location of the customer, which is defined by his home address.
Order Totals
In order to allow coupons, discounts and vouchers in your store, they have to be enabled and sequenced under Extensions > Order Totals. The item order designates in which sequence they appear in the total calculation. Here is the default OC setup:
Sort Order
|
Order Totals
|
Description
|
1
|
Sub-Total
|
Sum of all order items (quantity * net price) in the cart, without tax (VAT). Must be enabled!
|
2
|
Discount
|
Percentage based value. The resulting value is:
Net Total = Sub-Total - (Sub-Total * Discount)
|
3
|
Shipping
|
You can assign a Tax Class to Shipping under Administration > Extensions > Shipping. If you have no Tax Class assigned, no VAT with be added to Shipping.
|
4
|
Taxes
|
Sum of all order item taxes (VAT) and of shipping tax. Each order item (product) can have a different tax class. The resulting value is:
Gross Total = Net Total + Net Shipping + Taxes
|
5
|
Coupon
|
Generated by the shop Admin. Subtracted from Gross Total. No Tax Class = no VAT added.
|
6
|
Voucher
|
Like Coupon, except that customer can buy this like a product, and use it as a gift.
Subtracted from Gross Total. No Tax Class = no VAT added.
|
99
|
Total
|
Should always be last item!
Total = Gross Total - Coupon - Voucher
|
Example:

In international commerce it is standard to calculate discounts on net prices, and to then apply the tax on the discounted net price. If you applied taxes before the discount, you would be paying too much tax. While it is common for shops in Europe to promote a discount based on the gross price (including taxes), which is convenient for the customer, it is actually wrong from an accounting perspective, even though the end total will turn out the same. Example with a net price of $10, a discount of 10% and a tax of 19%:
Correct (OpenCart): Total = $10 * 0.9 * 1.19 = $10.71 (incl. tax $1.71)
Wrong but common: Total = $10 * 1.19 * 0.9 = $10.71 (incl. tax $1.90)
Depending on your national tax laws, tax may have to be included or excluded in certain order totals. If you cannot come up with the correct calculation by moving the Order Totals items around and by enabling/disabling some of them, then minor code changes may be necessary. Please let us know so we can adapt the code to your requirements.
In our modifications of OpenCart, we tried to consider both common and correct accounting aspects. In 3P (left colum below), the Fixed Coupon (not Percentage Discount) of € 30 is used as a Gross value, i.e. deducted from the Gross Price. In Europe it is not common to give the user a Net coupon. Please note, that in all cases the shipping cost is not affected by coupons or discounts. To check the changes, compare the files total\coupon.php and total\coupon.php.orig

Language strings in the Products.xml
Product Features and Options in the products.xml can have the attribute DisplayName. Example:
<FEATUREGROUP>
<Name>Binding</Name>
<FEATURE selected="1">
<Name>Plastic</Name>
<DisplayName>Plastic spirale</DisplayName>
<OPTION selected="1">
<Name>Metal</Name>
<DisplayName>Metal spirale</DisplayName>
</OPTION>
<OPTION selected="0">
<Name>Gold</Name>
<DisplayName>Gold plated spirale</DisplayName>
<UpPrice>1000</UpPrice>
</OPTION>
</FEATURE>
</FEATUREGROUP>
When you import the products.xml in the 3P OpenCart administration, the importer will use the DisplayName in the product information page. However, some strings need to be translated manually.
If you have 3 different stores and languages, you should have 3 languages packs (extensions) installed in your OpenCart system. The language file for import is located in /admin/language/english/tool/3p_pi.php. You will have to copy this file into the target language folder and translate the strings within.
Related: Changing the Store URL
Read more about languages in the Templates topic
|