Language:


Webshop - The Webshop in a Multi-Company Database

This page describes operating a webshop from a multi-Company database.

---

If you have more than one Company in your database, most of the registers and settings in the Webshop and CMS module are stored in Company 0, a partition of the database that stores information available in every Company. This means that these registers will be used by all Companies, that any change you make will immediately be available to all Companies, and that it doesn't matter in which Company you are working when you need to construct a web page. The Product register is the only main register in the Webshop and CMS module that is Company-specific. This allows you to sell different Products in your webshop from different Companies, and for the consequent Orders and/or Invoices to be created in the relevant Companies.

An easy way to tell whether a setting or register is stored in Company 0 is to look for the Company Short Code in the window title of the browse window or a record window. The Company Short Code will not be included in the window title of a window belonging to a setting or register stored in Company 0.

If you have more than one Company in your database but only wish to operate a single webshop, you must operate the webshop from the first Company listed in the Company register. In other words:

If you would like to operate more than one webshop, follow these steps:
  1. The first step is to connect the Companies in your database to the countries in the Countries on Web setting. A browser user will select their country and this will connect them to the correct Company. If you only operate in one country, you might be able to use the Countries on Web setting to configure a different system of identification. To establish this connection, use the Mappings Company/Country setting:

    Using 'Paste Special' if necessary, enter a Company Number in the Company No. and a country (from the Country on Web setting) in the Country field. This connects the country to the Company. Use the Lang. and Text fields in the matrix to enter translations of the Company Name if necessary.

    You can enter more than one record in this setting for a particular country i.e. you can connect a particular country to more than one Company. This will mean that when a browser user logs in, they will be asked to choose a Company as well as providing a log-in ID and password:

    In this illustration, the following attributes are assigned automatically by Standard ERP (i.e. you will not be able to change these attributes, but you will be able to apply styling to them in your .css file):

    • <div id="loginbox"> (wraps the Company selector, the two log-in fields and the button)

    • <span class="loginlabel"> (used for Web Text 25902, by default "Select which company you are a customer of:" (including the colon)).

    • <select id="company"> (used for the drop-down menu. The names of the options in this menu will be the Comments in the relevant Mappings Company/Country records or the appropriate translations).

    Similarly, if you have entered more than one Mappings Company/Country record for a particular country, browser users will be asked to choose a Company when registering as a new Customer:

    In this illustration, the following attributes are assigned automatically by Standard ERP (i.e. you will not be able to change these attributes, but you will be able to apply styling to them in your .css file):

    • <div id="cureg_edit"> (wraps the table containing the company selector, the fields and the button)

    • <select id="hmcompany"> (used for the drop-down menu. The names of the options in this menu will be the Comments in the relevant Mappings Company/Country records or the appropriate translations).

    "Select which company you want to register as a customer in:" (including the colon) is Web Text 25901.

    If you have entered more than one Mappings Company/Country record for a particular country, you should select the

    Default Shop Company for Country option in only one of those records. This will mark a particular Company as being the default Company for the country. A browser user who has selected a country but not logged in (i.e. has not yet been asked to choose a Company) will be taken to the shop in the default Company.

  2. If you have more than one webshop, you will need browser users to choose a country before going to the shop. Implementing this requires the following steps:

    1. Select the Multi-country/company shopping option in the Webshop Settings setting:

    2. On flip C in the Sites setting, specify the Code of the Structure record for the country selection page. The country selection page is described here.

    As a result of these steps, browser users going to the webshop will be taken to the country selection page if they have not already selected a country. After selecting a country, they will need to follow the link to the shop once again.

  3. If you have different domain names for each webshop, you can have a country selected automatically depending on the domain that a user visits. To do this, create separate records for each domain in the Mappings Hostname/Country setting:

    Each record will connect a domain name to a country and therefore, through the Mappings Company/Country setting, to a Company.

  4. Add Product Categories and Products to each Company as appropriate.

  5. Configure Company-specific settings such as Delivery Address Fields, Display on the Web, Paypal Settings, Web Payment Methods, Webshop Email and Webshop Company Settings in each Company as appropriate.
---

The Webshop in Standard ERP:

Go back to: