Methodology - Creating a new web/e-shop

In order for web and e-shop to work properly, it is necessary to have web services installed and operational. Thanks to them, data are displayed directly from the K2 (or their interpretation) on the web/e-shop, or they are loaded at regular intervals. The web/e-shop customer can register (a record is created in K2) and the purchase they make is also immediately saved in K2 as a sales order. The resulting orders are then processed in the usual way.

Book Contents

Book Index

Installation of necessary programs and add-ons

For the installation of AS and SWS it is necessary to have the IIS function (Internet Information Services) version 6.0 and higher enabled and also its IIS URL Rewrite add-on (it is a part of the installation program - in Other installations). It is also necessary to have K2 installed with the same version and release. For e-shop it is necessary to have PHP 7.0.32 and higher (for 64bit) installed for IIS (it is a part of the installation program - in Other installations). Note: You need to have the date.timezone = "Europe/Prague” time zone set in the PHP.ini file if the web server is not operated in another country. If this settings is different, time shifts occur (e.g. when working with data, after filling in the Required Delivery Date, the date in K2 is shifted by a different time zone).

A detailed description of the installation process of the application server, web services server and K2 E-shop is given in the K2 Installer methodology.

Book Contents

Book Index

Actions and Settings in K2

In order for the e-shop to work, you must prepare the data for the web/e-shop (category tree, published data, parameters, etc.) and the e-shop itself, i.e. set the expected properties and behaviour (e.g. supported currencies and languages, price groups which you want to consider, shipping or payment methods, specific text pages, etc.).

Book Contents

Book Index

Creation of a web/e-shop and related data

Create a new record in the Webs and E-shops book and edit the values on the Basic Data tab. Its is advisable to copy the whole set of text pages - the recommended procedure is given in the subordinate chapter Text Pages. There is also a script Import of text pages (K2ETextPageImp.PAS), which allows to import an XML file with texts into the selected e-shop. Define payments (see chapter Payments for e-shop) and shipping methods (see chapter Shipping for e-shop) including their corresponding Articles card (for valuation) and insert their combinations to the web/e-shop. Pay attention to Settings - see chapter Web and e-shop settings.

We recommend using the ordering option for advertising banners on the web/e-shop - see the Book Banners chapter.

To create categories, you can use the Import web/e-shop categories (EshopCategoryImport.PAS) script. Allows you to import the categories from the specified tree stored in the general interface to the selected web/e-shop (used for example for FastCentrik). Categories and their importance is described in detail in the chapter Book Categories. Images are also an integral part of the web/e-shop. NewEshop_AddPicture.PAS (for new e-shop) and Eshop_AddPicture.PAS (for old e-shop) scripts are intended for easy image addition.

The script for Initialization of web modules (Eshop_InitWebModules.PAS) can be used to switch between the old version of the e-shop and the new one. After its launch, data are converted (e.g. text pages).

Book Contents

Book Index

Text Pages
Setting up text pages for a responsive e-shop (older version)

You can create a set of required text pages based on Settings - part Specific Pages. Here is a list of pages that are necessary for the web/e-shop to use all the functionality. Usually these pages simply have to exist, it is not necessary to address their content (i.e. the Description field), however, it is advisable to add this description so that customers can find all the necessary information. Only on the pages for Shopping Cart, Search Results, Comparison, the description does not appear, even if it is entered.

You can also create a whole set of text pages using standard K2 e-shop - export of text pages (K2ETextPageExp.PAS) and K2 e-shop - import of text pages (K2ETextPageImp.PAS) scripts, thanks to which you can copy text pages from DEMO data or from another already existing e-shop and save these pages directly according to their original positions in Settings of the new web/e-shop. Then you can easily adjust the content of the website to your needs (contact details, etc.). For the page of the logged in user, you can use the options of nested pages - so-called widgets. Below are examples of their application.

Setting up text pages for a template e-shop (new version)

These pages are created and recorded in the book Text Pages. Some pages need to be assigned functionality in the book Web and e-shop - Web and E-shop Settings button - Specific Pages. Most text pages have their own template created for the new version of the template e-shop, according to which it is then loaded. Here is a list of basic text pages that are needed for the operation of the new template e-shop.

Page Title

Page Type

Superior Page

New Page

Template Name

User Accessibility

Homepage

/

 

Homepage

pageHomepage

All

Shopping Cart

 

Homepage

 

pageOrderBasket

All

Shipping and Payment

 

Shopping Cart

Shipping and Payment

pageOrderShipping

All

Order Confirmation

 

Shopping Cart

Order Confirmation

pageOrderConfirmation

All

Quick Order

 

Homepage

 

pageOrderFast

All

Search Results

 

Homepage

 

pageSearch

All

Comparison

 

Homepage

 

pageCompare

All

Business Conditions

 

Homepage

 

PageVop

All

Privacy Policy

 

Homepage

 

pagePersonalData

All

Article Category

c

Homepage

 

pageCategory

All

Product Detail

p

Article Category

Product Detail

pageProduct

All

Registration

 

Homepage

 

pageUserRegistration

All

Login

 

Homepage

 

pageUserLogin

Not Logged In

Logout

 

Homepage

 

pageUserLogout

Logged In

User Profile

 

Homepage

User Profile

pageUserProfile

Logged In

Change of Registration Data

 

User Profile

 

pageUserChangeRegistratio

Logged In

List of Invoicing Addresses

 

User Profile

 

pageUserAddressInvoice

Logged In

Address Detail

 

User Profile

 

pageUserAddressDetail

Logged In

List of Delivery Addresses

 

User Profile

 

pageUserAddressDelivery

Logged In

List of Partners

 

User Profile

 

pageUserPartner

Logged In

Favourites

 

User Profile

 

pageUserFavorite

Logged In

List of Orders

 

User Profile

 

pageOrderList

Logged In

Order Detail

 

User Profile

 

pageOrderDetail

Logged In

List of Invoices

 

User Profile

 

pageInvoiceList

Logged In

Invoice Detail

 

User Profile

 

pageInvoiceDetail

Logged In

List of Delivery Notes

 

User Profile

 

pagePackageList

Logged In

Delivery Note Detail

 

User Profile

 

pagePackageDetail

Logged In

List of Ordered Items

 

User Profile

 

pageOrderedList

Logged In

New In Article

 

Homepage

 

pageCategoryFlagNew

All

Promoaction Article

 

Homepage

 

pageCategoryFlagAction

All

Discount Article

 

Homepage

 

pageCategoryFlagDiscount

All

Sale Article

 

Homepage

 

pageCategoryFlagSale

All

Free Shipping Article

 

Homepage

 

pageCategoryFlagFreeShipping

All

Tip Article

 

Homepage

 

pageCategoryFlagTip

All

Preparing Article

 

Homepage

 

pageCategoryFlagPreparing

All

Used Articles Article

 

Homepage

 

pageCategoryFlagUsed

All

Contacts

 

Homepage

 

pageContacts

All

News

 

Homepage

News

pageNews

All

News Category

nc

News

News Category

pageNewsCategory

All

News Detail

nd

News Category

News Detail

pageNewsDetail

All

Forgotten Password

 

Homepage

 

pageUserPassword

Not Logged In

New Password

 

Homepage

 

pageUserPasswordNew

Not Logged In

Registration Confirmation

 

Homepage

 

pageUserRegistrationConfirm

Not Logged In

Consent to the Sending of Information and Offers

 

Homepage

 

pageNewsletter

All

Note: The new page is the one that for others is the superior (root) page. The superior page can be other text pages.

Book Contents

Book Index

Widgets examples
Nested pages - responsive web/e-shop (older version)
Examples of using nested text pages

You want do display a list of newsletters on the page of a logged-in user to traders of larger companies, and also a list of overdue invoices for all logged-in users, a preview of several messages for customers and an abbreviated list of orders. You have traders specified via the Assign to a Group field in the Contact Person record on the page E.

Note: This is how the DEMO data is set.

Since widgets (i.e. frames containing links or specific data) are sorted by date and time of publication, you can proceed directly in reverse order (and set the current date and time). Or you can edit this information manually.

List of Orders

If you don´t already have one, create a Recent Orders page type and set it in the On-line Store Settings in the Record Types section - Recent Orders. On the page for the list of orders (set in the Store Settings - Specific Pages - List of Orders) in the Superior Page field fill in the page of the logged n user (again see Settings). In the Type field, fill in the type you created for Recent Orders).

Messages for the Customer

If you don´t already have one, create a Content Preview page type and set it in the On-line Store Settings in the Record Types section - Recent Orders. Then create a page - widget - Messages for the Customer, in the Superior Page field fill in the page of the logged in user (see Settings), in the Type field fill in the type you created for Content Preview. This contains a short descriptive text of what the customer can expect here. Then add additional text pages with individual messages to it: Create a new text page for each such message to customer and fill in the superior page Messages for the Customer. Do not set any type for these messages anymore.

Note: If you would like to restrict some messages, e.g. for traders, use the Assign to a Group field - see the example for the list of newsletters for traders. You can restrict the entire message widget or individual messages this way.

List of Overdue Invoices

If you don´t already have one, create a Overdue Invoices page type and set it in the On-line Store Settings in the Record Types section - Overdue Invoices. On the page for the list of overdue invoices (set in the Store Settings - Specific Pages - List of Invoices) in the Superior Page field fill in the page of the logged in user (again see Settings). In the Type field, fill in the type you created for Overdue Invoices).

List of Newsletters for Traders

If you don´t already have one, create a List of Subordinates page type and set it in the On-line Store Settings in the Record Types section - List of Subordinates. Then create a page - widget - Newsletter, in the Superior Page field fill in the page of the logged in user (see Settings), in the Type field fill in the type you created for List of Subordinates. Then create a new text page for each newsletter, fill in the Newsletter page in the Superior Page field. Fill in the record intended for traders to the Assign to a Group field . Then the given newsletter is always displayed only to those registered users who have been set up as traders (corresponding record of Assign to a Group code list).

Note: Using Assign to a Group, you can prevent the entire widget or individual pages from being displayed as a list or preview. When setting up the Assignment on the text pages, consider other ways than the widget.

Examples of the use of Assign to a Group in widgets and their subordinate pages:

You have a Messages page and its subordinate page Christmas Event. The setting variants and data availability are listed below:

Messages and Christmas Event to traders: On the user page, only traders can see the message block, just as only they can open the Christmas Event page.

Messages to traders, Christmas Event without limits: On the user page, only traders can see the message block, but whoever receives the link to Christmas Event, for example by e-mail, can click it.

Messages without limits and Christmas Event to traders: A message block is displayed to every logged in user, but only traders see notification about the Christmas Event there, others cannot get to the page about the event even with a link from elsewhere.

Messages and Christmas Event without limits: All users can see a message block and open the page about the Christmas Event.

Book Contents

Book Index

Setting the necessary data on the selling articles

A lot of data is used from the Articles card. Some are already in K2, others must be added, because they are specific to the given web/e-shop. Here is an overview of all data related to the web/e-shop.

Basic data (1st tab)

These fields are used for the e-shop from the 1st page of the Articles card:

Abbr 1

If it is enabled in the Web and E-shop Settings, it is displayed on the e-shop in detail as a Code.

Abbr 2

If it is enabled in the Web and E-shop Settings, it is displayed on the e-shop in detail as a Code.

Unit

The articles are sold in a unit with the Default for E-shop flag, other units marked with the Display on E-shop flag are also transferred. The Integer Value flag is also taken into account for these units.

Sign

It is displayed in the article detail.

Identification Numbers

I.e. Additional item numbers - button next to Bar Codes. For example, P/N or other numbers are stored there, especially for product search. This number is not displayed to the customer.

Sale (3rd tab)

The Alternative and Related relation types are transferred from the Related Articles table. If the card has these types set, the classified articles are displayed on the tabs of the same name in the article detail on the e-shop (Description is transferred to the e-shop as tab name).

Note: Types of relations that are implicit in the K2 are system records (high numbering). If you make any changes to these types, the original factory settings is restored after installation. If you want to avoid losing your edits, create your own Relation Typee records.

The Article Variants table contains links to Articles cards that are closely related (e.g. the same type, only a different size). All these related cards are offered separately on the e-shop, selection using a variant only allows easy clocking between the individual cards.

Further on this tab you can find Price Groups and Price Settings. You can choose from two types of price lists:

Prices for the price groups listed in the Web and e-shop settings always apply.

To apply prices on the web/e-shop, it is necessary to recalculate prices for the web and e-shop on the given card by pressing Shift+F3 or in bulk using the function Web and E-shop - Administration and Settings - Recalculations - Conversion of articles for e-shop. A more detailed description of these functions is given in the chapter Overview of scripts, reports, tables and other functions.

Guarantee

If you want to display the duration of the guarantee for the articles, set it in the Sales tab in the Guarantee for the End Customer field. The value from the Guarantee for the Companies field is not used for the web and e-shop.

Attachments (9th tab)

On the Attachments tab, you need to have a series of images set for each item sold. This table also includes other links and documents, such as instruction, videos, links to the manufacturer´s website, etc., which you want to publish for the articles. It is necessary to first set the Document and Image Storage Configuration.

The easiest way to insert these images is to use the script New e-shop - Add Images to the Article (NewEshop_AddPicture.PAS) or for Old e-shop - Add Images to the Article (Eshop_AddPicture.PAS). For the basic article image use the default settings of the script, for further addition of images turn on the OnlyAdditionalPicture parameter to the value Yes.

A detailed description, meaning and methods of creating individual records is given in the basic manual Basic Code Lists - chapter Links. For easier access, there is a list of required chapters at the end of this manual in the chapter List of Related Documents.

Parameters (8th tab)

Parameters allow to display detailed (especially technical) information about the articles. It can also be searched on the web/e-shop according to selected parameters. Therefore, it is important to enter this information. A more detailed description of the data from this page is given in the basic manual Basic Code Lists - Articles - Article Card - Articles - Parameters tab (12th page - P). For easier access, there is a list of required chapters at the end of this manual in the chapter List of Related Documents. It should be emphasized that only parameters with the Export to Web flag are transferred to the web and e-shop.

E-shop (6th tab)

A basic description of the data from this page is given in the basic manual Basic Code Lists - Articles - Article Card - Articles - E-shop tab. For easier access, there is a list of required chapters at the end of this manual in the chapter List of Related Documents. Only additional data or specification of the algorithm are given here.

Group for E-shop

The articles are divided into a group so that each Articles card does not have to be inserted into the category separately, instead a group is inserted. They are homogeneous groups of cards that differ, for example, in colour or size. They are always classified in the same way - the articles of different brands cannot be in one group if you plan to divide a level of categories according to the brand. Groups then help you if you want to sell other identical articles in a different colour on the e-shop, you don´t have to manually search in which category it is to be included, you just assign a group to it. This automatically places these articles in all categories where the group is used. This reduces the risk of forgetting some category or classifying the article elsewhere than all the previous ones.

Groups are recommended to use, however their use in not mandatory.

Text at Zero Stock

The text is displayed on the e-shop only if the articles are not in stock and at the same time the Alternative text is not filled in. Texts can be suppressed in bulk with the Display actual stock statuses flag in Web and E-shop Settings.

Alternative Text of Stock Level

The book Alternative Text of Stock Level allows to rename the In Stock values or replace the exact stock data with text. By using this code list, it is possible to determine which value of the stock availability status is to be displayed depending on the actual stock status. Texts can be suppressed in bulk with the Display actual stock statuses flag in  Web and E-shop Settings.

If you offer articles that are sold in tens, you can define that if there are less than 100 pieces, the text “Not In Stock” is displayed, if there are more than 100 pieces, the text “More Than 100 Pieces” is displayed. For other articles that the supplier delivers by the next day, you can set the text “In Stock” to be displayed even if the articles are not actually in stock.

*Text at Zero Stock and Alternative Text can also be suppressed with the option Disallow Sale of Available Articles. It can be found in the Web and E-shop Settings on the Goods Catalogue tab. The user can thus limit the article sale for which, for example, the Text at Zero Stock is set to 2 weeks. In this case, the customer does not have a Buy button available on the e-shop.

Tab Information for Price Search Engines

Code lists for Heureka, Zbozi.cz, Google Merchant Center servers can be imported using scripts: EshopHeurekaCatImport.PAS, EshopZboziCatImport.PAS, EshopMerchantCenterCatImport.PAS. More information about these scripts can be found in the chapter Overview of Scripts, Reports, Tables and Other Functions, or in the scripts documentation for web and e-shop.

Book Contents

Book Index

Prices for E-shop

Prices are one of the most important figures, when it comes to sale. Therefore, their settings and behaviour on the e-shop deserve a separate chapter, even if the information provided here overlaps with the information provided in other chapters. At the same time, we would like to point out that when changing the price, it is always necessary to start the price recalculation of the given article in order for the price to be reflected in the e-shop. If you add or remove customer prices, it is necessary to recalculate all articles, so this customer gets the correct price for all items of their order, not just the changed articles.

Uniform Selling Prices for All

The easiest way is to set only the selling price on the tab of the 5th page of the aArticles card. In the Settings, leave the table of supported price groups blank and do not check the Customer Price option on the 1st page of the On-line Shop. In this case, only the basic price, which is valid for all customers, is charged for the articles.

Reduced Price for Registered Users on the E-shop for End Users

If, for example, you want to reward registered users - customers with various price promotion, you can create a new Price Group (e.g. Registered), which you include in the table of supported price groups, and you can then set more advantageous product prices for this price group. Create a new Customer (and Partner), to whom you assign the price group created above and you will then connect this partner to each newly created contact person with registration data. Now you basically have two anonymous customers - one for any person who buys in your on-line store, the other you assign manually to registered people whose purchases you do not want to track separately.

A more complicated way is to create new Partner and Customer cards for each registered user and connect them with the appropriate contact person, where you can evaluate the subscription of individual registered person, but in this case both of mentioned code lists are filled in quickly. You can use a combination of both approaches - so if a contact person appears in sales orders more often and you want to track them more closely, create a Partner and Customer cards for them with the correct price group, then connect the partner to the contact person. Sales orders are then automatically created on this separate Customer card.

Sales through the On-line Shop to Existing Clients

It is important to note that if you make extensive use of price groups and gradually add more and more registrations for different customers, it is advisable to harmonize the list of price groups used in K2 and price groups used in the on-line shop. If you connect a customer whose price group in the on-line shop is not calculated (it is not listed in the list of price groups in Settings), this user will not see any articles (unless you display articles with zero price) and will not be able to buy in your e-shop.

Customer Prices

You can use the flag on the On-line Shop card to set the use of customer and buyer prices (both prices are defined in detail in the Basic Manual - chapter Sales - Sales Methodologies - Pricing in K2 IS).

Prices in Currency

If you want to be able to switch to another currency on the on-line shop, then you need to set a list of these currencies in the On-line Shop Settings - Supported Currencies section. For each currency, set the exchange rate at which the prices are to be calculated. This exchange rate is then transferred to the sales order created in this currency.

When switching on the currency, it is necessary to carefully consider the format settings of displayed prices in the on-line shop (see below). The format applies to the entire e-shop regardless of currency. If you have prices in CZK rounded to whole numbers, you can set the display of prices without decimal places on the e-shop. If you decide to allow the purchase in EUR, when 1 EUR = 25 CZK and you would leave the format without decimal places, then the prices in EUR are displayed as whole units, while the calculated price is decimal and it is then added to the sales order. After sending the order, the total price changes, which is confusing and undesirable. Another example of the same problem is a surcharge for payment by card set at 10 CZK, in EUR it is then displayed as 0 EUR (rounded to the whole EUR), but the price of 0,40 EUR is included in the sales order.

In case of currency combinations, it is recommended to use formats with non-zero decimal places. This will avoid the problem described above.

Quantity Discounts

Quantity Discounts flag in the On-line Shop Settings - the Article Detail section allows you to display the set quantity discounts. However, these good prices offered are not transferred to the sales order and are not automatically used in K2 either. It is not recommended to use this option, because due to the lack of automation there is a risk of unfulfilled expectations and customer complaints. The methodology for using quantity discount in the on-line shop is currently under development.

Zero Price on the Article Card

The zero price of articles is more often a mistake than an intention. Therefore, in the On-line Shop Settings - Catalogue section, it is recommended not to have the Display Items with Zero Price option checked. If you check this option, it may happen that anyone buys the articles at zero price within the order in any quantity. However, there may be a variant that you check the option, for regular articles you will strictly control the prices and exceptionally offer articles at zero price, for example, as a gift for registered users.

Display of the Original Price

The original price means the value of the field Original Price on the ES page (the entered value is without VAT). You can turn on its display only in the article detail (On-line Shop Settings - section Article Detail). However, if the flag is checked, any value is displayed (i.e. the same as current, lower or zero). If you use this functionality, the value must be filled in consistently.

Price Display Format

Via the On-line Shop Settings - section Pages, you can set the decimal separator and the thousands separator, characters substitute zeros in the decimal places of the price. It is also determined here whether the prices without VAT or with VAT (respectively both) are displayed in the on-line shop. Both prices are always displayed in the sum of the shopping cart. It is also possible to set the format of displayed prices to 4, 2, 2 non-zero and no decimal place, always in a variant with or without currency.

Advanced - Calculation of the Article Price Table for the E-shop

Here is a detailed description of how the table EsGoodsPrice is calculated, i.e. What records can be found and expected in it.

For each article there are several records that combine the currency, the price group and customer (if Customer Prices are used - flag on 1st page of the On-line Shop card). All this for every on-line shop in which the articles are sold. Where the list of price groups is given in the On-line Shop Settings, the list of customers is generated on the basis of customer and buyer prices, i.e. prices of all articles are generated for each customer for which at least one customer/buyer price is defined for articles sold in the given e-shop. Buyer prices defined in the product group (flag on the Articles card) are also taken into account.

The way the list of relevant Customer records is generated is also the reason why, for example, adding/removing a customer price can affect prices in the entire on-line shop - this change can also change the list of relevant customers to whom prices are calculated, because it could be the first or last record price for this customer. Prices can also be affected, for example, by the exclusion of articles from e-shop assortment, because this may again be the last or first customer price, i.e. a change in the list of relevant customers. The same applies to changes in the articles product group or changes in customer prices in the product group, if the Customer Prices in the Product Group flag is used. Therefore, it is advisable to recalculate the article prices regularly, even if you have not made mass changes in the prices of articles.

Book Contents

Book Index

Other Settings

To send e-mails about registration or to send an order, it is necessary to set up mail in K2.

An action (EshopCron.pas script) to update the cache with a frequency of 5 minutes must be added to the planned actions. In case of failure of the cache update, first check the history of planned actions - whether there are any errors.

Book Contents

Book Index

K2 User Settings

Anonymous user who will access K2 (specified in the configuration file) must have minimum rights for security reasons. Access to the necessary data is provided by the application server. You must not forget to always set the current period for this user in the User Parameters.

Book Contents

Book Index

Commissioning and Administration of the E-shop Itself

Book Contents

Book Index

Launch of the Web/E-shop

You need to have these steps handled before you can launch the web/e-shop:

  1. Test whether e-mails are sent and whether they have the correct content for each language defined on the e-shop.
  2. Verify data collection in the Google Analytics or Heureka.
  3. Start monitoring of e-shop running.
  4. In the scheduled task management, set Send Watchdog E-mail if the function is to be active.
  5. Set up XML feeds for search engines (Zbozi.cz, Heureka, Google Merchant Center).
  6. Set notifications for reporting possible errors during scheduled tasks or notification for the registration of a new customer awaiting approval.
  7. In the Internet Information Services Manager (IIS), set the redirection to HTTPS - purchase and install the certificate on the web server, change the path to the images.
  8. In the testing phase of the e-shop, indexing needs to be disabled for robots. The e-shop is being prepared and is therefore not recommended to appear in search results. When you have completed the test phase and are satisfied with the result, don´t forget to enable indexing for robots. You do so in the config.php CONFIG['robots'] = true file.
  9. You should clear the cache files before running to avoid transferring old files from the test phase. You must not forget the cache settings, i.e. how these files are to be saved or loaded.

Book Contents

Book Index

Configuration Outside K2

Outside K2, the e-shop is configured using two configuration files. However, interventions in them can have fatal consequences and their modification is recommended exclusively to consultants:

The Config.php file mainly defines web services settings, the default language, links to files indicating the language (flag_*.png), etc.

Note: Pictures of flags that symbolize languages are stored directly in the e-shop: [eshop]/standard/images/flag_en.png. Their use is related to setting languages for the web/e-shop - see the following chapter Languages on the Web/E-shop.

The Config_menu.php file contains data such as the state offered when filling in the addresses, sorting options, image dimensions (the are the same as set by the Add Image to Article script), top, bottom and right menu configuration (displayed on the right next to the text pages, e.g. of logged in user).

If the e-shop page is out of order, for example the e-shop is in reinstallation mode, it is necessary to turn on the $Cfg['WebServiceReinstallation'] parameter in the e-shop parameters in the config.php file.

Book Contents

Book Index

Languages on the Web/E-shop

The Web and E-shop Settings specify the supported languages as well as the default language (in the Default Values section), in which the web/e-shop is displayed by default. Whether you want to enable language switching on your e-shop, or you have set only one supported language, it is always necessary to set the rules for translations on the web server correctly (e.g. you always set the default language). It is also always a good idea to create the Texts_ file described below, at least for the default language.

Web and e-shop in Czech, English, Slovak and German

For each language you have listed as supported in the Web and E-shop Settings, create a Texts_[language abbreviation according to http://www.w3schools.com/tags/ref_language_codes.asp].php file in the [eshop]\special\pages\language e-shop folder (e.g. Texts_cs.php for Czech).

You can create a file as a copy of the standard file [eshop]\standard\pages\language\Texts_cs.php (resp. _en, _de or _sk), but leave only the texts you want to edit: at least the name of the web and e-shop to be displayed in the browser on the tab, company name, contact phone and e-mail, etc. You can then redefine some standard texts and labels. You can delete others - if they are not found in this file, the standard ones will be used. There are also texts for special modifications of the web/e-shop - these special constants are always numbered from 10 000.

Example of the content of such a file:

<?php
 $Pgs['CompanyName'] = 'My_company'; // Company Name
 $Pgs['ShopName'] = 'Bussiness_of_my_company'; // Eshop Name
 $Pgs['DocumentType'] = '<!DOCTYPE html>'; // Page Document Type
 $Pgs['CharacterSet'] = 'UTF-8'; // Character Set of Site
 $Pgs['Language'] = 'cs'; // Site Language
 $Pgs['Author'] = 'Petr Adamovsky'; // Author of the Site
 $Pgs['Title'] = 'We make dreams come true'; // Homepage Name (the real is extended)
 $Pgs['Description'] = ''; // Homepage Description
 $Pgs['KeyWords'] = ''; // Homepage Keywords
 $Pgs['Robots'] = 'ALL,FOLLOW'; // Robots Site Indexing
 $Pgs['Copyright'] = '(C) 2013-'.date('Y').' '.$Pgs['CompanyName'].', All rights reserved.'; // Copyright for Header
 $Pgs['VisibleCopyright'] = '&copy; 2013-'.date('Y').'&nbsp;'.$Pgs['CompanyName'].', all rights reserved'; // Displayed Copyright
 $Pgs['OpenSearchShortName'] = 'K2 search'; // Short Name for Open Search browsers (maximum 16 characters)
 $Pgs['OpenSearchLongName'] = 'Search for articles in the K2 e-shop'; // Long Name for Open Search browsers (maximum 46 characters)
 $Pgs['OpenSearchDescription'] = 'Find articles in K2 e-shop '. // Description for Open Search browsers (maximum 1024 characters)
 'very simply, straight from your browser';

 $Pgs['DefEmail'] = 'makedreamscometrue@my_company.com'; // Default E-mail Address
 $Pgs['DefPhone'] = '+420 599 133 477'; // Default Phone Number


 // New language constants always start at 10 000 !!!
 $Lng['10001'] = 'Enter a 099 code for a random mix of colours';
 $Lng['10002'] = 'Enter the text of the print';
 $Lng['10003'] = 'Select size ';

Web and e-shop in other languages

For languages for which there is no standard file (there has been no request or the language is not supported yet), it is necessary to create a complete translation of the standard file into the selected language in the special.

Book Contents

Book Index

Monitoring - Testing the Running of Processes

If you run an e-shop, it is in your interest to find out about possible failure of a “component” of the web/e-shop before the customers report the malfunction to you.

Any monitoring program can be used for this (the Zabbix program available on the Zabbix.com is recommended), which will run the /standard/app/monitoring.php page at regular intervals and, depending on the Web and E-shop Settings - the Test section, verify that the correct data is returned. This way you can verify the functionality of the application server, web services, text pages and the e-shop itself. If an error occurs, the program notifies you by e-mail. You will find out about possible failures of the web/e-shop before customers even start to report the malfunction.

Book Contents

Book Index

Restriction of Robot Access

You can prevent or restrict access to robots and search engines (in case the e-shop operation is tested before an actual launch) via the robots.txt file, which is located at the root of the web. A detailed description of the content of this text file can be found, for example, on the page http://www.jakpsatweb.cz/robots-txt.html.

To deny robots access to the entire website, the file must contain:

User-agent: *

Disallow: /

Sitemap: /sitemap_index.xml

Book Contents

Book Index

Cache Settings

Cache is temporarily stored data. It helps to speed up web loading because it remembers what has already been read from K2 once. Each data has set on the page, when it can be deleted from the cache memory, when it needs to be read again from K2.

A special page has been created for the new template e-shop, which allows the e-shop administrator to optimize the cache. Optimization means reducing the number of queries sent between e-shop and K2 API. An example is a query for All product categories. These are seldom changed in the e-shop, so they can be stored in the memory for a longer time without the e-shop having to ask for them often. In contrast, the availability of articles can change at any time, and therefore the caches need to be updated as often as possible.

We strongly do not recommend that the settings of the cache optimization be managed by a person who is not fully familiar with their meaning, as there may be significant damage to the operation of the e-shop itself.

Access to the cache optimization page is via the e-shop URL and adding a query in a form ?KEY=___________&CMD=cache.settings. In the empty space for the KEY query it is necessary to enter the RID number of the e-shop (e.g. 123456789456) from K2. The URL path for working with the cache can then look like this: http://vaseshop.k2.cz?KEY=123456789456&CMD=cache.settings.

For individual services that allow it, it is possible to set whether they depend on:

The default state of the unset share is YES, so all caches depend on all parameters. E.g. config. It is same for all parameters, so it is possible to switch to “NO” in all fields.

Custom Time - custom cache expiration time setting. It is entered in seconds. An empty value means that the default time is used. A value of 0 means that the service always reads data directly from K2.

Default Time - default cache expiration time setting.

The Count link at the end of the table counts the number of cache files for each service as well as the total number of files.

Below the table of ws services there are 2 fields for exporting the currently saved cache settings and importing it to another website. To simplify the set up of common cache set up scenarios, two templates have been set up:

Book Contents

Book Index

Receipt and Processing of the Order

The order is created on-line in the book Sales Orders in K2. Then process it as usual. After sending, the user will see its detail. If a payment via the payment gateway has been chosen, the payment button will be displayed in detail, which will redirect them to the payment gateway.