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 have the following characteristics.
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.
When deleting a category will delete all sub-categories and products.
Categories have the following characteristics.
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 – 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.
Features have the following parameters.
What are the types of features
Example:
In stockIf the values are set, then it displays the name of one of the characteristics and values.
Example:
In stock: yes In stock: no
Подключаемая часть – файл modules/shop/shop.inc.php. В нем описан класс
Shop_inc. В модуле к объекту класса можно обратиться через переменную $this->diafan->_shop
. Экземпляр класса создается при первом вызове
переменной.
Methods of connection online store are divided into two parts in meaning:
In addition, "Online shop" module comprises two modules, which also have their connections:
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]) – Получает цену товара с указанными параметрами для пользователя.
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]) – Получает все цены товара для пользователя.
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) – Подготавливает все цены товара для пользователя.
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]) – Получает основы для цен на товар (указываемые в панеле администрирования).
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) – Подготавливает основы для цен на товар (указываемые в панеле администрирования).
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]) – Рассчитывает все возможные вариации цен и записывает их в базу данных.
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]) – Добавляет базовую цену для товара.
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()]) – Отправляет уведомления о поступлении товара.
string format (float $price) – Форматирует цену согласно настройкам модуля.
Example:
echo $this->diafan->_shop->price_insert(23000.5);
// output: 23 000,50
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) – Получает все данные о товарах, дополнительных услугах, доставке и скидках в заказе.
array get_param (integer $order_id) – Получает все данные из формы оформления заказа.
void pay (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 details (integer $order_id) – Возврат информаци о плательщике.
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 = '']) – Возвращает информацию из корзины.
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 = '']) – Записывает данные в корзину.
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();
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 = '']) – Возвращает информацию из списка пожеланий.
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 = '']) – Записывает данные в список пожеланий.
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();
It displays a table with all the orders coming from the user of the site. Table comprising:
If you leave the page open orders, the flashing message will appear when a new order in the title bar.
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.
The form "Order" can be supplemented with their fields using the form builder.
Fields have the following characteristics.
If you selected "select" or "select multiple," then there will be additional fields with values.
Sale reports – a table with the list of items sold in a chronological order with the withdrawal of the total amount for the period.
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.
Waiting list – a table listing the goods ordered by users through form "Inform on e-mail when item will be available again".
User set the order status.
Updates have the following properties:
Discounts can be installed on the entire store, several categories and a few goods.
Discounts have the following characteristics:
Quantity discounts offered unlimited. Of the several discounts applied to a single product, the highest selected.
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.
Currencies have the following properties:
Unlimited addition of delivery methods.
Characteristics delivery methods:
Accessories and services can be selected when ordering.
Features related services:
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".
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.
Fields have the following characteristics:
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.
You can save different settings for different module pages to which the module is attached.
Для работы с модулем «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:
Товары обладают следующими характеристиками:
Значит значение атрибута param="3=5&3=6&10>12&16=0" расшифровывается как товары красного и синего цвета (5 и 6 номер), высотой более 12, не имеющие аналогов. Символы
<
и
>
нужно заменять HTML-мнемониками
<
и
>
.
<insert name="show_block" module="shop" param="3=5&3=6&10>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"]["название атрибута"]
.
{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} – Товары в списке пожеланий
modules/cart/cart.php – Controller;
modules/cart/cart.action.php – Processes the received data from the form;
modules/cart/cart.inc.php – Подключение модуля «Корзина товаров, оформление заказа»;
modules/cart/cart.model.php – Модель модуля «Корзина товаров, оформление заказа»;
modules/cart/js/cart.form.js – JS-сценарий модуля «Корзина товаров, оформление заказа»;
modules/cart/js/cart.show_block.js – JS-сценарий блока корзины;
modules/cart/views/cart.view.form.php – Form template of the basket page with the ordered goods;
modules/cart/views/cart.view.images.php – Template attached images;
modules/cart/views/cart.view.info.php – Product template of basket;
modules/cart/views/cart.view.one_click.php – Template of form "Buy now with one click";
modules/cart/views/cart.view.payment.php – Form template of payment system;
modules/cart/views/cart.view.result.php – Template of payment result;
modules/cart/views/cart.view.show_block.php – Template of basket;
modules/cart/views/cart.view.show_last_order.php – Template of block with the last ordered goods;
modules/cart/views/cart.view.table.php – Template of the product table in the basket;
modules/cart/views/cart.view.table_mail.php – Template of the product table in the basket for send on email;
modules/delivery/admin/delivery.admin.php – Редактирование способов доставки;
modules/delivery/delivery.php – Контроллер;
modules/delivery/delivery.action.php – Обработка POST-запросов;
modules/delivery/delivery.inc.php – Подключение модуля «Доставка»;
modules/shop/admin/js/shop.admin.additionalcost.js – Услуги, JS-сценарий;
modules/shop/admin/js/shop.admin.config.js – Module settings, JS-сценарий;
modules/shop/admin/js/shop.admin.discount.js – Редактирование способов доставки, JS-сценарий;
modules/shop/admin/js/shop.admin.importexport.js – Импорт/экспорт данных, JS-сценарий;
modules/shop/admin/js/shop.admin.js – Редактирование товаров, JS-сценарий;
modules/shop/admin/js/shop.admin.order.js – Редактирование заказов, JS-сценарий;
modules/shop/admin/js/shop.admin.orderparam.js – Конструктор формы оформления заказа, JS-сценарий;
modules/shop/admin/js/shop.admin.param.js – Редактирование дополнительных характеристик товаров, JS-сценарий;
modules/shop/admin/shop.admin.php – Product editing;
modules/shop/admin/shop.admin.action.php – Обработка POST-запросов в административной части модуля;
modules/shop/admin/shop.admin.additionalcost.php – Дополнительная стоимость;
modules/shop/admin/shop.admin.brand.php – Редактирование производителей;
modules/shop/admin/shop.admin.cart.php – Abandonmented carts;
modules/shop/admin/shop.admin.category.php – Editing categories;
modules/shop/admin/shop.admin.config.php – Module settings;
modules/shop/admin/shop.admin.counter.php – Viewings statistics;
modules/shop/admin/shop.admin.currency.php – Currencies;
modules/shop/admin/shop.admin.discount.php – Редактирование скидок;
modules/shop/admin/shop.admin.import.php – Import;
modules/shop/admin/shop.admin.importexport.php – Администрирование импорта/экспорт данных;
modules/shop/admin/shop.admin.importexport.category.php – Список описанных файлов;
modules/shop/admin/shop.admin.importexport.element.php – Import/export data;
modules/shop/admin/shop.admin.inc.php – Connecting the module to the administrative part of other modules;
modules/shop/admin/shop.admin.menu.php – Map of links for "Menu on the website" module;
modules/shop/admin/shop.admin.order.php – Редактирование заказов;
modules/shop/admin/shop.admin.order.count.php – Количество новых заказов для меню административной панели;
modules/shop/admin/shop.admin.order.dashboard.php – Заказы для событий;
modules/shop/admin/shop.admin.ordercount.php – Отчет о продажах;
modules/shop/admin/shop.admin.orderparam.php – Ordering form constructor;
modules/shop/admin/shop.admin.orderstatus.php – Order status;
modules/shop/admin/shop.admin.param.php – Редактирование дополнительных характеристик товаров;
modules/shop/admin/shop.admin.view.php – Template of the module в административной части;
modules/shop/admin/shop.admin.waitlist.php – Waiting list;
modules/shop/admin/shop.admin.wishlist.php – Список желаний в административной части;
modules/shop/inc/shop.inc.order.php – Подключение модуля «Магазин» для работы с заказами;
modules/shop/inc/shop.inc.price.php – Подключение модуля «Магазин» для работы с ценами;
modules/shop/js/shop.buy_form.js – JS-сценарий модуля;
modules/shop/js/shop.compare.js – JS-сценарий сравнения товаров;
modules/shop/js/shop.id.js – JS-сценарий модуля;
modules/shop/js/shop.show_search.js – JS-сценарий формы поиска по товарам;
modules/shop/shop.php – Controller;
modules/shop/shop.action.php – Обработка запроса при добавлении товара в корзину;
modules/shop/shop.export.php – Export of products;
modules/shop/shop.google.php – Uploading to Google Merchant;
modules/shop/shop.inc.php – Подключение модуля «Магазин»;
modules/shop/shop.install.php – Module installation;
modules/shop/shop.model.php – Model of module "Online shop";
modules/shop/shop.search.php – Settings for search indexing for "Search" module;
modules/shop/shop.sitemap.php – Map of links for "Site map" module;
modules/shop/views/m/shop.view.id.php – Product page template;
modules/shop/views/shop.view.buy_form.php – Template of button "Buy", in which the features goods affecting the price displayed in select list;
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;
modules/shop/views/shop.view.buy_form_order_rel.php – Шаблон кнопки «Купить» для блока товаров;
modules/shop/views/shop.view.compare.php – Template of comparison shopping page;
modules/shop/views/shop.view.compare_form.php – Template of "Compare" for goods button;
modules/shop/views/shop.view.compare_param.php – Template of product features on the comparison page;
modules/shop/views/shop.view.compared_goods_list.php – Template of "Compare Selected Products" button;
modules/shop/views/shop.view.first_page.php – Template of the first page of the module, if the settings module checked "Use category";
modules/shop/views/shop.view.id.php – Product page template;
modules/shop/views/shop.view.list.php – Template of products list;
modules/shop/views/shop.view.list_search.php – Template of products to find list;
modules/shop/views/shop.view.param.php – Template of product features;
modules/shop/views/shop.view.rows.php – Template of products list;
modules/shop/views/shop.view.show_add_coupon.php – Template of coupon activation form;
modules/shop/views/shop.view.show_block.php – Template commodities unit;
modules/shop/views/shop.view.show_block_left.php – Template commodities unit;
modules/shop/views/shop.view.show_block_order_rel.php – Template of "usually buy the current item" product block;
modules/shop/views/shop.view.show_block_rel.php – Template of similar products block;
modules/shop/views/shop.view.show_brand.php – Template brands block;
modules/shop/views/shop.view.show_category.php – Шаблон блока категорий;
modules/shop/views/shop.view.show_category_level.php – Шаблон вложенных уровней блока категорий;
modules/shop/views/shop.view.show_search.php – Template of search by goods form;
modules/shop/views/shop.view.sort_block.php – Template of "Sorting" with sorting link block;
modules/wishlist/js/wishlist.form.js – JS-сценарий модуля «Список желаний»;
modules/wishlist/views/wishlist.view.form.php – Template for editing the wishlist;
modules/wishlist/views/wishlist.view.info.php – Шаблон информации о товарах в списке пожеланий;
modules/wishlist/views/wishlist.view.show_block.php – Wishlist block template;
modules/wishlist/views/wishlist.view.table.php – Шаблон таблицы с товарами в списке желаний;
modules/wishlist/wishlist.php – Controller;
modules/wishlist/wishlist.action.php – Обработка запроса при пересчете суммы покупки в списке желаний;
modules/wishlist/wishlist.inc.php – Подключение модуля «Список пожеланий»;
modules/wishlist/wishlist.model.php – Модель модуля Список желаний.