Online shop

Module refers to the part of the CMS "Online shop" and can be installed optionally.

The module "Online shop" can be attached to the various pages of the site. If the module is attached to a few pages in the administrative part of the module there is a special filter "section of the website" with the possibility of filtering the output (list of products, categories and settings) as belonging to the page.

Products

List of products

Edit of product

Products have the following characteristics.

Categories

Categories can have an unlimited number of subcategories. If necessary, the category can not be used. To do this, disable the "Use category" in the module settings.

List of categories

When deleting a category will delete all sub-categories and products.

Edit of category

Categories have the following characteristics.

Brands

Products can be specified by the brand. Link to all the products come from the brand of each product.

Brands have the following characteristics.

Features

List of features

Features – this additional parameters characterizing the product. You can add features common (for all products within the same section of the website) or assign characteristics to one or more categories of products.

To attach several characteristics in one category or the other way around, undock from the category, you can use the group operation.

Edit of feature

Features have the following parameters.

What are the types of features

  • Input – a free text description of the products. If it is assigned to a category, all products will be the usual string field to enter information. Use it must be, when the contents of the characteristics of small and different products it is different. For example, a character certificate of conformity.
  • Number – Free numerical characteristic of the products. If it is assigned to a category, all products will be a plain text field for entering numbers. We do not accept any characters other than numbers and points. To use it you need, when you want a numerical characteristic, and different products it is different. For example, the number of the customs declaration.
  • Date – time characteristic of the products in the dd.mm.yyyy format. If this feature is assigned to the category of products appeared in the text box with the calendars for easy date input. Use this feature when you want to date products, such as date of manufacture.
  • Date and time – the time characteristic of the products, in the format dd.mm.yyyy hh: mm. Characteristics similar to "date" only extended to time.
  • Text area – a free text description of the products. According to the properties similar to those of "string", but larger in volume. If it is assigned to a category, all products will be a normal text field to enter information. Use it must be, when the contents of the average volume characteristics (paragraph two), and different products it is different. For example, a particular product.
  • Checkbox – characteristic values for yes / no, 1/0 or +/-. Products with this characteristic appears to fill two fields: "yes" and "no." They allow you to set the display settings for a user of the site. If the value is empty, then the display of products only the name of the characteristics will be displayed (if there is a "Yes") and does not display anything (for the "No").

Example:

In stock

If the values ​​are set, then it displays the name of one of the characteristics and values.

Example:

In stock: yes In stock: no

  • Select – behavior similar to "string" is designed for small text properties of the product. However, it differs in the fact that the goods will be formed dropdown list of preset values performance. This may be such a characteristic, such as color, i.e. such property categories of goods, which initially limited. Fill in all the possible values have characteristics, for example, for the color "black", "white", "Blue", adding their button Create, save the response. Then, when filling out the goods he will display a drop-down list, which will be only the mouse to choose the desired color.
  • Select multiple – one of the most important characteristics affecting the form and method of ordering goods. According to the properties similar to those of "Select", ie it consists of several small string variables, but there are some features.
    • The main feature – goods can be multiple values of characteristics, for example, when the goods can be of different colors.
    • The second feature – the user on the site to choose the value of the characteristic. For example, if the goods can be of different colors and the user must choose the color when ordering, you must note the checkbox "Available to a choice when ordering"
    • The third feature – if the price is dependent on the characteristics. For example, if the goods can be of different volumes, soda 0.5l, 1l, 1.5l - respectively, different price. It should be noted first daw "Available to a choice when ordering" at the performance, and to fill all the possible values: 0.5, 1, 1.5, using the button Create. Then, when filling Product Specifications noted near daw "Affects the price." Then perhaps assign some product prices, a window will appear.
  • Field with visual editor – free text description of the goods. According to the properties similar to the totalizer "Input" and "Text area", but it is intended for the large volumes of information, which also want to format. If totalizer assign categories when editing the fields will be displayed visual editor. Use characteristic, for example, to enter information about the complete product.
  • Title of features group – utility characteristics. By product does not apply. Only need to visually distinguish from each other characteristics. Used when the characteristics of goods and a lot of them need to visually group, both in the administrative part, and the user.
  • Files – feature in the form of a file. If a product you need to attach any additional files, such as a user manual.
  • Images – feature in the form of an image, to solve non-standard problems in registration of the goods cards. Conventional images without loading the goods characteristics, this tool is, and so on the item card. This characteristic is necessary to further illustrate the output in an extra bed.

Connection

Подключаемая часть – файл modules/shop/shop.inc.php. В нем описан класс Shop_inc. В модуле к объекту класса можно обратиться через переменную $this->diafan->_shop. Экземпляр класса создается при первом вызове переменной.

Methods of connection online store are divided into two parts in meaning:

  • methods for working with the prices (modules/shop/inc/shop.inc.price.php);
  • methods for working with orders (modules/shop/inc/shop.inc.order.php).

In addition, "Online shop" module comprises two modules, which also have their connections:

  • cart modules/cart/cart.inc.php;
  • wishlist modules/wishlist/wishlist.inc.php.

Prices

The methods of work with the prices is necessary to add the prefix price_. Eg $this->diafan->_shop->price_get().

Методы

array get (integer $good_id, array $params, [boolean $current_user = true]) – Получает цену товара с указанными параметрами для пользователя.

  • integer $good_id: номер товара
  • array $params: параметры, влияющие на цену
  • boolean $current_user: текущий пользователь

Example:

// get price of product ID=3 color (ID=6) blue (ID=15),
// size (ID=5) XS (ID=16). When we select the price taken
// personal discounts for the current user
$price = $this->diafan->_shop->price_get(3, array(6 => 15, 5 => 16));

print_r($price);
/* output:
Array
(
    [id] => 39
    [price_id] => 39
    [count_goods] => 5
    [price] => 1390
    [old_price] => 1500
    [discount_id] => 1
) */

array get_person_discounts () – Возвращает идентификаторы персональных скидок, применимые для текущего пользователя.

Example:

// get personal discounts IDs
$person_discount_ids = $this->diafan->_shop->price_get_person_discounts();

$cache_meta = array(
    
"name" => "list",
    
// ...
    
"discounts" => $person_discount_ids
);
//cache
if (! $result = $this->diafan->_cache->get($cache_meta, "shop"))
{
    
// ...
    
$this->diafan->_cache->save($result, $cache_meta, "shop");
}

array get_all (integer $good_id, [integer $current_user = true]) – Получает все цены товара для пользователя.

  • integer $good_id: номер товара
  • integer $current_user: пользователь, для которого определяется цена

Example:

// get all prices of product ID=12.
// When we select the price taken
// personal discounts for the current user
$prices = $this->diafan->_shop->price_get_all(12);

print_r($prices);
/* output:
Array
(
    [0] => Array
    (
        [id] => 94
        [good_id] => 12
        [price] => 5490
        [old_price] => 5990
        [count_goods] => 0
        [price_id] => 12
        [date_start] => 0
        [date_finish] => 0
        [discount] => 0
        [discount_id] => 4
        [person] => 0
        [role_id] => 0
        [currency_id] => 0
        [import_id] =>
        [trash] => 0
    )

    [1] => Array
    (
        [id] => 95
        [good_id] => 12
        [price] => 5490
        [old_price] => 5990
        [count_goods] => 0
        [price_id] => 13
        [date_start] => 0
        [date_finish] => 0
        [discount] => 0
        [discount_id] => 4
        [person] => 0
        [role_id] => 0
        [currency_id] => 0
        [import_id] =>
        [trash] => 0
    )

) */

void prepare_all (integer $good_id) – Подготавливает все цены товара для пользователя.

  • integer $good_id: номер товара

Example:

// in this example, three SQL-requests will be send to the database for get the prices for all given products
$ids = array(3, 5, 7);
foreach(
$ids as $id)
{
    
$prices[$id] = $this->diafan->_shop->price_get_all($id);
}

Example:

// in this example, one SQL-request will be send to the database for get the prices for all given products
$ids = array(3, 5, 7);
foreach(
$ids as $id)
{
    
$this->diafan->_shop->price_prepare_all($id);
}
foreach(
$ids as $id)
{
    
$prices[$id] = $this->diafan->_shop->price_get_all($id);
}

array get_base (integer $good_id, [boolean $base_currency = false]) – Получает основы для цен на товар (указываемые в панеле администрирования).

  • integer $good_id: номер товара
  • boolean $base_currency: показывать результаты в основной валюте

Example:

// get all prices of product ID=12 without discounts (base prices)
$prices = $this->diafan->_shop->price_get_base(12);

print_r($prices);
/* output:
Array
(
    [0] => Array
        (
            [id] => 12
            [price_id] => 12
            [price] => 5990
            [currency_id] => 0
            [count_goods] => 0
            [good_id] => 12
            [currency_name] => руб.
            [param] => Array
                (
                    [2] => 2
                )

        )

    [1] => Array
        (
            [id] => 13
            [price_id] => 13
            [price] => 5990
            [currency_id] => 0
            [count_goods] => 0
            [good_id] => 12
            [currency_name] => руб.
            [param] => Array
                (
                    [2] => 1
                )
        )

) */

array prepare_base (integer $good_id) – Подготавливает основы для цен на товар (указываемые в панеле администрирования).

  • integer $good_id: номер товара

Example:

// in this example, three SQL-requests will be send to the database for get base prices for all given products
$ids = array(3, 5, 7);
foreach(
$ids as $id)
{
    
$prices[$id] = $this->diafan->_shop->price_get_base($id);
}

Example:

// in this example, one SQL-request will be send to the database for get base prices for all given products
$ids = array(3, 5, 7);
foreach(
$ids as $id)
{
    
$this->diafan->_shop->price_prepare_base($id);
}
foreach(
$ids as $id)
{
    
$prices[$id] = $this->diafan->_shop->price_get_base($id);
}

void calc ([integer $good_id = 0], [integer $discount_id = 0], [integer $currency_id = 0]) – Рассчитывает все возможные вариации цен и записывает их в базу данных.

  • integer $good_id: номер товара, если не задан, цены рассчитываются для всех товаров
  • integer $discount_id: номер скидки
  • integer $currency_id: номер валюты, если нужно изменить цены, указанные в валюте

Example:

// after saving changes to discounts ID=5
// calculate prices for all products based on this discount
$this->diafan->_shop->price_calc(0, 5);

integer insert (integer $good_id, float $price, float $old_price, integer $count, [integer $params = array()], [integer $currency_id = 0], [integer $import_id = ''], [integer $image_id = 0]) – Добавляет базовую цену для товара.

  • integer $good_id: номер товара
  • float $price: price
  • float $old_price: старая цена
  • integer $count: number of goods
  • integer $params: дополнительные характеристики, учитываемые в цене
  • integer $currency_id: номер валюты
  • integer $import_id: ID цены для импорта
  • integer $image_id: ID изображения, прикрепляемого к цене

Example:

// write price $1500 for product ID=13, quantity of products 5 pcs.
// color (ID=6) blue (ID=15), size (ID=5) XS (ID=16)
$price_id = $this->diafan->_shop->price_insert(13, 1500, 5, array(6 => 15, 5 => 16));

void send_mail_waitlist (integer $good_id, array $params, [array $row = array()]) – Отправляет уведомления о поступлении товара.

  • integer $good_id: идентификатор товара
  • array $params: дополнительные характеристики, влияющие на цену
  • array $row: данные о товаре

string format (float $price) – Форматирует цену согласно настройкам модуля.

  • float $price: price

Example:

echo $this->diafan->_shop->price_insert(23000.5);
// output: 23 000,50

Orders

The methods of work with the orders is necessary to add the prefix order_. Eg .$this->diafan->_shop->order_pay()

Методы

array get (integer $order_id) – Получает все данные о товарах, дополнительных услугах, доставке и скидках в заказе.

  • integer $order_id: номер заказа

array get_param (integer $order_id) – Получает все данные из формы оформления заказа.

  • integer $order_id: номер заказа

void pay (integer $order_id) – Оплата заказ (смена статуса на «В обработке»).

  • integer $order_id: номер заказа

Example:

// payment order #12 (status change, reducing the amount of stock on hand)
$this->diafan->_shop->order_pay(12);

void set_status (array $order, array $status) – Установка статуса.

  • array $order: информация о заказе
  • array $status: информация о статусе заказа

array details (integer $order_id) – Возврат информаци о плательщике.

  • integer $order_id: ID заказа

Cart

By class object can be accessed through a variable $this->diafan->_cart. An instance is created on the first call variable.

Методы

mixed get ([integer $id = 0], [mixed $param = false], [mixed $additional_cost = false], [string $name_info = '']) – Возвращает информацию из корзины.

  • integer $id: номер товра
  • mixed $param: характеристики товара, учитываемые в заказе
  • mixed $additional_cost: сопутствующие услуги
  • string $name_info: тип информации (count - количество, is_file - это товар-файл)

Example:

// ask for all the goods in the cart
$cart = $this->diafan->_cart->get();
print_r($cart);
/* output:
Array
(
    [38] => Array
    (
        [a:0:{}] => Array
            (
                [price_id] => 39
                [count] => 1
                [is_file] => 0
            )
    )

    [49] => Array
    (
        [a:0:{}] => Array
            (
                [price_id] => 60
                [count] => 1
                [is_file] => 0
            )
    )

) */

// ask amount of product ID=38 in the cart
echo $this->diafan->_cart->get(38, array(), "count");
// output: 1

integer get_count () – Возвращает количество товаров в корзине.

Example:

echo 'In the cart '.$this->diafan->_cart->get_count().' products';
// output: In the cart 2 products

float get_summ () – Возвращает общую стоимость товаров в корзине.

Example:

echo 'In the cart of products in the amount of $'.$this->diafan->_cart->get_summ().'.';
// output: In the cart of products in the amount of $2738.

void set ([mixed $value = array()], [integer $id = 0], [mixed $param = false], [mixed $additional_cost = false], [string $name_info = '']) – Записывает данные в корзину.

  • mixed $value: данные
  • integer $id: номер товра
  • mixed $param: характеристики товара, учитываемые в заказе
  • mixed $additional_cost: сопутствующие услуги
  • string $name_info: тип информации (count - количество, is_file - это товар-файл)

Example:

// add the amount of product ID=38 in the cart
// or add it in the cart if no product in the cart
$this->diafan->_cart->set(3, 38, array(), "count");
if(
$err = $this->diafan->_cart->set($cart, 38, array()))
{
    echo
'Error: '.$err;
}

// add the amount of product and stating that product is a file
// of add product in the cart
$cart = array(
        
"count" => 3,
        
"is_file" => true,
    );
if(
$err = $this->diafan->_cart->set($cart, 38, array()))
{
    echo
'Error: '.$err;
}

// remove product ID=38 from the cart
$this->diafan->_cart->set(0, 38, array(), "count");

// empty cart
$this->diafan->_cart->set();

void write () – Записывает информацию о корзине в хранилище.

Example:

// empty cart
$this->diafan->_cart->set();

// write data, set function set()
$this->diafan->_cart->write();

Favorite products

By class object can be accessed through a variable $this->diafan->_wishlist. An instance is created on the first call variable.

Методы

mixed get ([integer $id = 0], [mixed $param = false], [mixed $additional_cost = false], [string $name_info = '']) – Возвращает информацию из списка пожеланий.

  • integer $id: номер товра
  • mixed $param: характеристики товара, учитываемые в заказе
  • mixed $additional_cost: сопутствующие услуги
  • string $name_info: тип информации (count - количество, is_file - это товар-файл)

Example:

// ask for all the products that are in wishlist
$wishlist = $this->diafan->_wishlist->get();
print_r($wishlist);
/* output:
Array
(
    [38] => Array
    (
        [a:0:{}] => Array
            (
                [price_id] => 39
                [count] => 1
                [is_file] => 0
            )
    )

    [49] => Array
    (
        [a:0:{}] => Array
            (
                [price_id] => 60
                [count] => 1
                [is_file] => 0
            )
    )

) */

// ask amount of product ID=38 in the wishlist
echo $this->diafan->_wishlist->get(38, array(), "count");
// output: 1

integer get_count () – Возвращает количество товаров в списке пожеланий.

Example:

echo 'In the wishlist '.$this->diafan->_wishlist->get_count().' products.';
// output: In the wishlist 2 products.

void set ([mixed $value = array()], [integer $id = 0], [mixed $param = false], [mixed $additional_cost = false], [string $name_info = '']) – Записывает данные в список пожеланий.

  • mixed $value: данные
  • integer $id: номер товра
  • mixed $param: характеристики товара, учитываемые в заказе
  • mixed $additional_cost: сопутствующие услуги
  • string $name_info: тип информации (count - количество, is_file - это товар-файл)

Example:

// add amount of product ID=38 in the wishlist
// or add product in the wishlist
$this->diafan->_wishlist->set(3, 38, array(), "count");
if(
$err = $this->diafan->_wishlist->set($wishlist, 38, array()))
{
    echo
'Error: '.$err;
}

// add amount of product and and stating that product is a file
// of add product in the wishlist
$wishlist = array(
        
"count" => 3,
        
"is_file" => true,
    );
if(
$err = $this->diafan->_wishlist->set($wishlist, 38, array()))
{
    echo
'Error: '.$err;
}

// remove product ID=38 from the wishlist
$this->diafan->_wishlist->set(0, 38, array(), "count");

// empty wishlist
$this->diafan->_wishlist->set();

void write () – Записывает информацию в хранилище.

Example:

// empty wishlist
$this->diafan->_wishlist->set();

// write data, set function set()
$this->diafan->_wishlist->write();

Orders

List of orders

It displays a table with all the orders coming from the user of the site. Table comprising:

  • Date and time – the date of creation of the order;
  • Order – order number (in the form of links to more information);
  • Status – order status edited in a single interface ;
  • Sum;
  • Customer – user who added the order (in the form of links to detailed information about the user or the words "without registration", if the user has chosen not to register);
  • Additional fields – a group of fields, defined in terms of "order."

If you leave the page open orders, the flashing message will appear when a new order in the title bar.

Edit of order

Orders have the following parameters.

Cart – is a separate module in the user part of the site. It is installed with the module "Online shop" and is required to view the cart and checkout. Saving changes in a basket made with Ajax technology, ie without reloading the whole page.

When ordering, the administrator is notified of the order for e-mail, the user is notified of the registration of the order by e-mail, and the order is added to the database.

Ordering form

The form "Order" can be supplemented with their fields using the form builder.

List of fields

Fields have the following characteristics.

If you selected "select" or "select multiple," then there will be additional fields with values.

Sale reports

Sale reports – a table with the list of items sold in a chronological order with the withdrawal of the total amount for the period.

Reports order

Favorite products

Favorite products – table with a list of goods, which is located in the user wish list site in chronological order with the withdrawal of the total amount for the period.

Favorite products

Waiting list

Waiting list – a table listing the goods ordered by users through form "Inform on e-mail when item will be available again".

Waiting list

Order status

Order status

User set the order status.

Updates have the following properties:

Discounts

List of discounts

Discounts can be installed on the entire store, several categories and a few goods.

Edit of discount

Discounts have the following characteristics:

Quantity discounts offered unlimited. Of the several discounts applied to a single product, the highest selected.

Currencies

It allows you to create an unlimited number of currencies. Currency used to determine the price of goods in a currency other than the main one. Online prices are displayed in the main currency conversion is at a rate specified in the module.

List of currencies

Currencies have the following properties:

Delivery methods

Unlimited addition of delivery methods.

List of delivery methods

Characteristics delivery methods:

Edit of delivery method

Accessories and services

Accessories and services can be selected when ordering.

List of accessories and services

Features related services:

Edit of accessory or service

Import/export

List of descriptions of the file import/export

Import and export of goods uses the CSV form.

Before you import or export, you need to describe the content of the files.

Firstly, you need to add a new file by clicking on "Add a description of the file import/export".

Add new description of the file import/export

The file has the following characteristics:

Secondly, it is necessary to describe the information contained in the file. To do this, click on the file name in the list of file import / export, or press the button "Save and Exit" when adding or editing an import file.

List of fields

Fields have the following characteristics:

Edit of field

When the File field are described, will link "Export" to download the export file and the form to download the import file. When importing all the data are checked for validity and in the case of an incorrect format or incorrect values ​​displayed error log.

Settings

You can save different settings for different module pages to which the module is attached.

Settings

Template tags

Для работы с модулем «Online shop» служат следующие шаблонные теги:

show_add_coupon – displays the activation form of the coupon for a discount, if the non-activated coupon is in the system, the user is authorized and has not activated another coupon.

Атрибуты:

defer – deferred load tag template tag: event – load content only at the request of the user when you click "Upload", emergence – load content only when the client window appears in the browser window, async – asynchronous (simultaneous) content loading together with the content of template tags with the same marker, sync – synchronous (sequential) load of content in conjunction with the content of template tags with the same marker, by default, downloading content only at the request of the user;

defer_title – text string displayed at the point where the loadable content appears with the help of delayed loading of the template tag;

template – tag template (file modules/shop/views/shop.view.show_add_coupon_template.php; by default - file modules/shop/views/shop.view.show_add_coupon.php).

Example:

<insert name="show_add_coupon" module="shop">

выведет форму активирования купона

В шаблоне тега можно получить значение любого атрибута через переменную $result["attributes"]["название атрибута"].

show_block module="cart" – выводит информацию о заказанных товарах, т. н. корзину.

Атрибуты:

defer – deferred load tag template tag: event – load content only at the request of the user when you click "Upload", emergence – load content only when the client window appears in the browser window, async – asynchronous (simultaneous) content loading together with the content of template tags with the same marker, sync – synchronous (sequential) load of content in conjunction with the content of template tags with the same marker, by default, downloading content only at the request of the user;

defer_title – text string displayed at the point where the loadable content appears with the help of delayed loading of the template tag;

template – tag template (file modules/cart/views/cart.view.show_block_template.php; default - file modules/cart/views/cart.view.show_block.php).

Example:

<insert name="show_block" module="cart">

выведет информацию о корзине

В шаблоне тега можно получить значение любого атрибута через переменную $result["attributes"]["название атрибута"].

show_block – выводит несколько товаров из каталога.

Атрибуты:

count – number of displayed goods (by default 3);

site_id – pages to which the module is attached. Page identifiers are enumerated comma-separated. You can indicate negative value, then the goods from the indicated section will be excluded. By default all pages are selected;

cat_id – categories of goods, if "Use categories" is checked in the module settings. You can indicate negative value, then the questions from the indicated category will be excluded. Category identifiers are enumerated comma-separated. You can indicate current value, then the goods from the current (opened) category or all categories, if neither of them is opened, will be shown. By default the category is not taken into account, all goods are shown.;

brand_id – brands of goods. You can indicate negative value, then the questions from the indicated brands will be excluded. Brand identifiers are enumerated comma-separated. By default the brand is not taken into account, all goods are shown.;

sort – sorting goods: by default as on the module page, date – by date, rand – randomly, price - by price, sale – по количеству продаж;

images – number of images attached to the piece of goods;

images_variation – image size tag, set in module settings;

param – значения дополнительных характеристике;

Example:

Товары обладают следующими характеристиками:

  • цвет – выпадающий список, номер 3;
  • высота – число, номер 10;
  • наличие аналогов – галочка, номер 16.

Значит значение атрибута param="3=5&3=6&10>12&16=0" расшифровывается как товары красного и синего цвета (5 и 6 номер), высотой более 12, не имеющие аналогов. Символы < и > нужно заменять HTML-мнемониками &lt; и &gt;.

<insert name="show_block" module="shop" param="3=5&3=6&10&gt;12&16=0">

Номер (или идентификатор) характеристики можно посмотреть, если подвести курсор к названию характеристики в списке характеристик в административной части. Появиться всплывающая подсказка «Редактировать (номер характеристики)».

Номер (или идентификатор) значения характеристики можно посмотреть, если при редактировании характеристики подвести курсора на нужное значение. Появиться всплывающия подсказка «ID: номер».

hits_only – выводить только товары с пометкой «Хит»: true – выводить только товары с пометкой «Хит», по умолчанию пометка «Хит» будет игнорироваться;

action_only – выводить только товары с пометкой «Акция»: true – выводить только товары с пометкой «Акция», по умолчанию пометка «Акция» будет игнорироваться;

new_only – выводить только товары с пометкой «Новинка»: true – выводить только товары с пометкой «Новинка», по умолчанию пометка «Новинка» будет игнорироваться;

discount_only – выводить только товары, на которые действует скидка: true – выводить только товары, на которые действует скидка, по умолчанию скидка у товаров игнорируется;

only_module – show the block only on the page to which "Online shop" module is attached: true – show the block only on the module page, by default the block will be shown on all pages;

tag – tag attached to the goods;

defer – deferred load tag template tag: event – load content only at the request of the user when you click "Upload", emergence – load content only when the client window appears in the browser window, async – asynchronous (simultaneous) content loading together with the content of template tags with the same marker, sync – synchronous (sequential) load of content in conjunction with the content of template tags with the same marker, by default, downloading content only at the request of the user;

defer_title – text string displayed at the point where the loadable content appears with the help of delayed loading of the template tag;

template – tag template (file modules/shop/views/shop.view.show_block_template.php; default - file modules/shop/views/shop.view.show_block.php).

Example:

<insert name="show_block" module="shop">

выведет 3 последних товара из магазина


<insert name="show_block" module="shop" count="5" sort="rand">

выведет 5 случайных товаров из магазина


<insert name="show_block" module="shop" sort="price" count="4" cat_id="12">

выведет 4 самых дешевых товаров из рубрики №12 магазина

В шаблоне тега можно получить значение любого атрибута через переменную $result["attributes"]["название атрибута"].

show_block module="wishlist" – displays information about products in the wishlist.

Атрибуты:

defer – deferred load tag template tag: event – load content only at the request of the user when you click "Upload", emergence – load content only when the client window appears in the browser window, async – asynchronous (simultaneous) content loading together with the content of template tags with the same marker, sync – synchronous (sequential) load of content in conjunction with the content of template tags with the same marker, by default, downloading content only at the request of the user;

defer_title – text string displayed at the point where the loadable content appears with the help of delayed loading of the template tag;

template – tag template (file modules/wishlist/views/wishlist.view.show_block_template.php; default - file modules/wishlist/views/wishlist.view.show_block.php).

Example:

<insert name="show_block" module="wishlist">

В шаблоне тега можно получить значение любого атрибута через переменную $result["attributes"]["название атрибута"].

show_block_order_rel – товары, которые обычно покупают с текущим товаром.

Атрибуты:

count – number of displayed goods (by default 3);

images – number of images attached to the piece of goods;

images_variation – image size tag, set in module settings;

defer – deferred load tag template tag: event – load content only at the request of the user when you click "Upload", emergence – load content only when the client window appears in the browser window, async – asynchronous (simultaneous) content loading together with the content of template tags with the same marker, sync – synchronous (sequential) load of content in conjunction with the content of template tags with the same marker, by default, downloading content only at the request of the user;

defer_title – text string displayed at the point where the loadable content appears with the help of delayed loading of the template tag;

template – tag template (file modules/shop/views/shop.view.show_block_order_rel_template.php; default - file modules/shop/views/shop.view.show_block_order_rel.php).

Example:

<insert name="show_block_order_rel" module="shop">

выведет 3 товара, которые обычно покупают с текущим товаром

В шаблоне тега можно получить значение любого атрибута через переменную $result["attributes"]["название атрибута"].

show_block_rel – shows similar products on the page of the product. By default the connection between products are one-sided, this can be changed by checking the option "Link back to parent in the block of similar products" in module settings.

Атрибуты:

count – number of displayed goods (by default 3);

images – number of images attached to the piece of goods;

images_variation – image size tag, set in module settings;

defer – deferred load tag template tag: event – load content only at the request of the user when you click "Upload", emergence – load content only when the client window appears in the browser window, async – asynchronous (simultaneous) content loading together with the content of template tags with the same marker, sync – synchronous (sequential) load of content in conjunction with the content of template tags with the same marker, by default, downloading content only at the request of the user;

defer_title – text string displayed at the point where the loadable content appears with the help of delayed loading of the template tag;

template – tag template (file modules/shop/views/shop.view.show_block_rel_template.php; default - file modules/shop/views/shop.view.show_block_rel.php).

Example:

<insert name="show_block_rel" module="shop">

выведет 3 товара, прикрепленные к текущему товару

В шаблоне тега можно получить значение любого атрибута через переменную $result["attributes"]["название атрибута"].

show_brand – выводит несколько производителей.

Атрибуты:

count – number of displayed brands (by default all brands);

site_id – pages to which the module is attached. Page identifiers are enumerated comma-separated. You can indicate negative value, then the goods from the indicated section will be excluded. By default all pages are selected;

cat_id – categories of goods, if "Use categories" is checked in the module settings. You can indicate negative value, then the brands from the indicated category will be excluded. Category identifiers are enumerated comma-separated. You can indicate current value, then the brands from the current (opened) category or all categories, if neither of them is opened, will be shown. By default the category is not taken into account, all brands are shown.;

sort – sorting brands: by default as on the module page, name – by name, rand – randomly;

images – number of images attached to the piece of brands;

images_variation – image size tag, set in module settings;

only_module – show the block only on the page to which "Online shop" module is attached: true – show the block only on the module page, by default the block will be shown on all pages;

defer – deferred load tag template tag: event – load content only at the request of the user when you click "Upload", emergence – load content only when the client window appears in the browser window, async – asynchronous (simultaneous) content loading together with the content of template tags with the same marker, sync – synchronous (sequential) load of content in conjunction with the content of template tags with the same marker, by default, downloading content only at the request of the user;

defer_title – text string displayed at the point where the loadable content appears with the help of delayed loading of the template tag;

template – tag template (file modules/shop/views/shop.view.show_brand_template.php; default - file modules/shop/views/shop.view.show_brand.php).

Example:

<insert name="show_brand" module="shop">

В шаблоне тега можно получить значение любого атрибута через переменную $result["attributes"]["название атрибута"].

show_category – выводит несколько категорий.

Example:

<insert name="show_category" module="shop">

В шаблоне тега можно получить значение любого атрибута через переменную $result["attributes"]["название атрибута"].

show_last_order module="cart" – выводит информацию о последнем совершенном заказе.

Атрибуты:

defer – deferred load tag template tag: event – load content only at the request of the user when you click "Upload", emergence – load content only when the client window appears in the browser window, async – asynchronous (simultaneous) content loading together with the content of template tags with the same marker, sync – synchronous (sequential) load of content in conjunction with the content of template tags with the same marker, by default, downloading content only at the request of the user;

defer_title – text string displayed at the point where the loadable content appears with the help of delayed loading of the template tag;

template – tag template (file modules/cart/views/cart.view.show_last_order_template.php; default - file modules/cart/views/cart.view.show_last_order.php).

Example:

<insert name="show_last_order" module="cart">

В шаблоне тега можно получить значение любого атрибута через переменную $result["attributes"]["название атрибута"].

show_search – выводит форму поиска товаров. Если для категорий прикреплены дополнительные характеристики, то поиск по ним производится только на странице категории. Поиск по обязательным полям подключается в настройках модуля (опции «Искать по цене», «Искать по артикулу», «Искать товары по акции», «Искать по новинкам», «Искать по хитам»). Если в форму поиска выведены характеристики с типом «выпадающий список» и «список с выбором нескольких значений», то значения характеристик, которые не найдут ни один товар, в форме поиска не выведутся.

Атрибуты:

site_id – pages to which the module is attached. Page identifiers are enumerated comma-separated. By default all pages are selected. Если выбрано несколько страниц сайта, то в форме поиска появляется выпадающих список по выбранным страницам. Можно указать отрицательное значение, тогда указанные страницы будут исключены из списка;

cat_id – categories of goods, if "Use categories" is checked in the module settings. Category identifiers are enumerated comma-separated. Можно указать значение current, тогда поиск будет осуществляться по текущей (открытой) категории магазина или по всем категориям, если ни одна категория не открыта. Если выбрано несколько категорий, то в форме поиска появится выпадающий список категорий магазина, который будет подгружать прикрепленные к категориям характеристики. You can indicate negative value, then the indicated categories will be excluded from list. Можно указать значение all, тогда поиск будет осуществлятся по всем категориям товаров и в форме будут участвовать только общие характеристики. Атрибут не обязателен;

ajax – подгружать результаты поиска без перезагрузки страницы: true – результаты поиска подгружаются, по умолчанию будет перезагружена вся страница. Результаты подгружаются только если открыта страница со списком товаром, иначе поиск работает обычным образом;

only_module – show the block only on the page to which "Online shop" module is attached: true – show the block only on the module page, by default the block will be shown on all pages;

defer – deferred load tag template tag: event – load content only at the request of the user when you click "Upload", emergence – load content only when the client window appears in the browser window, async – asynchronous (simultaneous) content loading together with the content of template tags with the same marker, sync – synchronous (sequential) load of content in conjunction with the content of template tags with the same marker, by default, downloading content only at the request of the user;

defer_title – text string displayed at the point where the loadable content appears with the help of delayed loading of the template tag;

template – tag template (file modules/shop/views/shop.view.show_search_template.php; default - file modules/shop/views/shop.view.show_search.php).

Example:

<insert name="show_search" module="shop">

выведет форму поиска по каталогу товаров

В шаблоне тега можно получить значение любого атрибута через переменную $result["attributes"]["название атрибута"].

Database

{shop} – Goods

{shop_additional_cost} – Accessories and Services

{shop_additional_cost_category_rel} – Связь сопутствующих услуг и категорий

{shop_additional_cost_rel} – Связь сопутствующих услуг и товаров

{shop_brand} – Бренды

{shop_brand_category_rel} – Связи производителей и категорий

{shop_cart} – Товары в корзине

{shop_category} – Категории товаров

{shop_category_parents} – Parents relations of категорий товаров

{shop_category_rel} – Связи товаров и категорий

{shop_counter} – View counter of products

{shop_currency} – Дополнительные валюты магазина

{shop_delivery} – Delivery methods

{shop_delivery_thresholds} – Стоимость способов доставки

{shop_discount} – Discounts

{shop_discount_coupon} – Купоны на скидку

{shop_discount_object} – Товары и категории, на которые действуют скидки

{shop_discount_person} – Пользователи, для которых действуют скидки

{shop_files_codes} – Коды для скачивания товаров-нематериальных активов

{shop_import} – Описание полей файлов импорта

{shop_import_category} – Описание файлов импорта

{shop_order} – Orders

{shop_order_additional_cost} – Сопутствующие услуги, включенные в заказ

{shop_order_goods} – Товары в заказе

{shop_order_goods_param} – Дополнительных характеристики товаров в заказе

{shop_order_param} – Поля конструктора формы оформления заказа

{shop_order_param_element} – Значения полей конструктора оформления заказа

{shop_order_param_select} – Варианты значений полей конструктора оформления заказа типа список

{shop_order_param_user} – Значения полей конструктора оформления заказа, предзаполненные пользователями

{shop_order_status} – Статусы заказов

{shop_param} – Дополнительные характеристики товаров

{shop_param_category_rel} – Связи дополнительных харакеристик товаров и категорий

{shop_param_element} – Значения дополнительных характеристик товаров

{shop_param_select} – Варианты значений дополнительных характеристик товаров типа список

{shop_price} – Products prices

{shop_price_image_rel} – Изображения товаров, прикрепленные к цене

{shop_price_param} – Дополнительные характеристики, учитываемые в цене

{shop_rel} – Связи похожих товаров

{shop_waitlist} – Товары в списке ожидания

{shop_wishlist} – Товары в списке пожеланий

Files

  1. modules/cart/cart.php – Controller;

  2. modules/cart/cart.action.php – Processes the received data from the form;

  3. modules/cart/cart.inc.php – Подключение модуля «Корзина товаров, оформление заказа»;

  4. modules/cart/cart.model.php – Модель модуля «Корзина товаров, оформление заказа»;

  5. modules/cart/js/cart.form.js – JS-сценарий модуля «Корзина товаров, оформление заказа»;

  6. modules/cart/js/cart.show_block.js – JS-сценарий блока корзины;

  7. modules/cart/views/cart.view.form.php – Form template of the basket page with the ordered goods;

  8. modules/cart/views/cart.view.images.php – Template attached images;

  9. modules/cart/views/cart.view.info.php – Product template of basket;

  10. modules/cart/views/cart.view.one_click.php – Template of form "Buy now with one click";

  11. modules/cart/views/cart.view.payment.php – Form template of payment system;

  12. modules/cart/views/cart.view.result.php – Template of payment result;

  13. modules/cart/views/cart.view.show_block.php – Template of basket;

  14. modules/cart/views/cart.view.show_last_order.php – Template of block with the last ordered goods;

  15. modules/cart/views/cart.view.table.php – Template of the product table in the basket;

  16. modules/cart/views/cart.view.table_mail.php – Template of the product table in the basket for send on email;

  17. modules/delivery/admin/delivery.admin.php – Редактирование способов доставки;

  18. modules/delivery/delivery.php – Контроллер;

  19. modules/delivery/delivery.action.php – Обработка POST-запросов;

  20. modules/delivery/delivery.inc.php – Подключение модуля «Доставка»;

  21. modules/shop/admin/js/shop.admin.additionalcost.js – Услуги, JS-сценарий;

  22. modules/shop/admin/js/shop.admin.config.js – Module settings, JS-сценарий;

  23. modules/shop/admin/js/shop.admin.discount.js – Редактирование способов доставки, JS-сценарий;

  24. modules/shop/admin/js/shop.admin.importexport.js – Импорт/экспорт данных, JS-сценарий;

  25. modules/shop/admin/js/shop.admin.js – Редактирование товаров, JS-сценарий;

  26. modules/shop/admin/js/shop.admin.order.js – Редактирование заказов, JS-сценарий;

  27. modules/shop/admin/js/shop.admin.orderparam.js – Конструктор формы оформления заказа, JS-сценарий;

  28. modules/shop/admin/js/shop.admin.param.js – Редактирование дополнительных характеристик товаров, JS-сценарий;

  29. modules/shop/admin/shop.admin.php – Product editing;

  30. modules/shop/admin/shop.admin.action.php – Обработка POST-запросов в административной части модуля;

  31. modules/shop/admin/shop.admin.additionalcost.php – Дополнительная стоимость;

  32. modules/shop/admin/shop.admin.brand.php – Редактирование производителей;

  33. modules/shop/admin/shop.admin.cart.php – Abandonmented carts;

  34. modules/shop/admin/shop.admin.category.php – Editing categories;

  35. modules/shop/admin/shop.admin.config.php – Module settings;

  36. modules/shop/admin/shop.admin.counter.php – Viewings statistics;

  37. modules/shop/admin/shop.admin.currency.php – Currencies;

  38. modules/shop/admin/shop.admin.discount.php – Редактирование скидок;

  39. modules/shop/admin/shop.admin.import.php – Import;

  40. modules/shop/admin/shop.admin.importexport.php – Администрирование импорта/экспорт данных;

  41. modules/shop/admin/shop.admin.importexport.category.php – Список описанных файлов;

  42. modules/shop/admin/shop.admin.importexport.element.php – Import/export data;

  43. modules/shop/admin/shop.admin.inc.php – Connecting the module to the administrative part of other modules;

  44. modules/shop/admin/shop.admin.menu.php – Map of links for "Menu on the website" module;

  45. modules/shop/admin/shop.admin.order.php – Редактирование заказов;

  46. modules/shop/admin/shop.admin.order.count.php – Количество новых заказов для меню административной панели;

  47. modules/shop/admin/shop.admin.order.dashboard.php – Заказы для событий;

  48. modules/shop/admin/shop.admin.ordercount.php – Отчет о продажах;

  49. modules/shop/admin/shop.admin.orderparam.php – Ordering form constructor;

  50. modules/shop/admin/shop.admin.orderstatus.php – Order status;

  51. modules/shop/admin/shop.admin.param.php – Редактирование дополнительных характеристик товаров;

  52. modules/shop/admin/shop.admin.view.php – Template of the module в административной части;

  53. modules/shop/admin/shop.admin.waitlist.php – Waiting list;

  54. modules/shop/admin/shop.admin.wishlist.php – Список желаний в административной части;

  55. modules/shop/inc/shop.inc.order.php – Подключение модуля «Магазин» для работы с заказами;

  56. modules/shop/inc/shop.inc.price.php – Подключение модуля «Магазин» для работы с ценами;

  57. modules/shop/js/shop.buy_form.js – JS-сценарий модуля;

  58. modules/shop/js/shop.compare.js – JS-сценарий сравнения товаров;

  59. modules/shop/js/shop.id.js – JS-сценарий модуля;

  60. modules/shop/js/shop.show_search.js – JS-сценарий формы поиска по товарам;

  61. modules/shop/shop.php – Controller;

  62. modules/shop/shop.action.php – Обработка запроса при добавлении товара в корзину;

  63. modules/shop/shop.export.php – Export of products;

  64. modules/shop/shop.google.php – Uploading to Google Merchant;

  65. modules/shop/shop.inc.php – Подключение модуля «Магазин»;

  66. modules/shop/shop.install.php – Module installation;

  67. modules/shop/shop.model.php – Model of module "Online shop";

  68. modules/shop/shop.search.php – Settings for search indexing for "Search" module;

  69. modules/shop/shop.sitemap.php – Map of links for "Site map" module;

  70. modules/shop/views/m/shop.view.id.php – Product page template;

  71. modules/shop/views/shop.view.buy_form.php – Template of button "Buy", in which the features goods affecting the price displayed in select list;

  72. modules/shop/views/shop.view.buy_form_list.php – Template of button "Buy", in which the features goods affecting the price displayed in select list;

  73. modules/shop/views/shop.view.buy_form_order_rel.php – Шаблон кнопки «Купить» для блока товаров;

  74. modules/shop/views/shop.view.compare.php – Template of comparison shopping page;

  75. modules/shop/views/shop.view.compared_goods_list.php – Template of "Compare Selected Products" button;

  76. modules/shop/views/shop.view.compare_form.php – Template of "Compare" for goods button;

  77. modules/shop/views/shop.view.compare_param.php – Template of product features on the comparison page;

  78. modules/shop/views/shop.view.first_page.php – Template of the first page of the module, if the settings module checked "Use category";

  79. modules/shop/views/shop.view.id.php – Product page template;

  80. modules/shop/views/shop.view.list.php – Template of products list;

  81. modules/shop/views/shop.view.list_search.php – Template of products to find list;

  82. modules/shop/views/shop.view.param.php – Template of product features;

  83. modules/shop/views/shop.view.rows.php – Template of products list;

  84. modules/shop/views/shop.view.show_add_coupon.php – Template of coupon activation form;

  85. modules/shop/views/shop.view.show_block.php – Template commodities unit;

  86. modules/shop/views/shop.view.show_block_left.php – Template commodities unit;

  87. modules/shop/views/shop.view.show_block_order_rel.php – Template of "usually buy the current item" product block;

  88. modules/shop/views/shop.view.show_block_rel.php – Template of similar products block;

  89. modules/shop/views/shop.view.show_brand.php – Template brands block;

  90. modules/shop/views/shop.view.show_category.php – Шаблон блока категорий;

  91. modules/shop/views/shop.view.show_category_level.php – Шаблон вложенных уровней блока категорий;

  92. modules/shop/views/shop.view.show_search.php – Template of search by goods form;

  93. modules/shop/views/shop.view.sort_block.php – Template of "Sorting" with sorting link block;

  94. modules/wishlist/js/wishlist.form.js – JS-сценарий модуля «Список желаний»;

  95. modules/wishlist/views/wishlist.view.form.php – Template for editing the wishlist;

  96. modules/wishlist/views/wishlist.view.info.php – Шаблон информации о товарах в списке пожеланий;

  97. modules/wishlist/views/wishlist.view.show_block.php – Wishlist block template;

  98. modules/wishlist/views/wishlist.view.table.php – Шаблон таблицы с товарами в списке желаний;

  99. modules/wishlist/wishlist.php – Controller;

  100. modules/wishlist/wishlist.action.php – Обработка запроса при пересчете суммы покупки в списке желаний;

  101. modules/wishlist/wishlist.inc.php – Подключение модуля «Список пожеланий»;

  102. modules/wishlist/wishlist.model.php – Модель модуля Список желаний.