### Install MiniShop3 from Source Source: https://docs.modx.pro/components/minishop3 For developers needing the latest features, this method involves cloning the repository, installing PHP dependencies, building Vue widgets, and then building and installing the component. ```bash # Клонирование репозитория git clone https://github.com/modx-pro/MiniShop3.git cd MiniShop3 # Установка PHP зависимостей composer install # Сборка Vue виджетов (требуется Node.js 18+) cd vueManager npm install npm run build cd .. # Сборка и установка компонента # Откройте _build/build.php в браузере или выполните: php _build/build.php ``` -------------------------------- ### Full Mini Cart Example with msOrderTotal Snippet Source: https://docs.modx.pro/components/minishop3/snippets/msordertotal This example shows how to integrate the 'msOrderTotal' snippet into a header navigation to display a mini-cart. It uses the 'selector' option to target the cart's container and an inline template for its content. ```fenom ``` -------------------------------- ### msfo_success Chunk Example (Fenom) Source: https://docs.modx.pro/components/msfastorder/chunks Example of the `msfo_success` chunk using Fenom syntax, demonstrating how to display a payment link if available. This serves as a template for the success screen. ```fenom {if $payment_link} {$_modx->lexicon('msfastorder_pay_button')} {/if} ``` -------------------------------- ### Accessing Global System Variables Source: https://docs.modx.pro/components/pdotools/parser Provides examples of accessing various global system variables like $_ENV, $_GET, $_POST, and $_SERVER. ```fenom $ * `$.env` — массив `$_ENV`. * `$.get` — массив `$_GET`. * `$.post` — массив `$_POST`. * `$.files` — массив `$_FILES`. * `$.cookie` — массив `$_COOKIE`. * `$.server` — массив `$_SERVER`. * `$.session` — массив `$_SESSION`. * `$.globals` — массив `$GLOBALS`. * `$.request` — массив `$_REQUEST`. * `$.tpl.name` возвращает текущее название шаблона. * `$.tpl.basename` возвращает текущее название шаблона без схемы. * `$.tpl.scm` возвращает схему шаблона. * `$.tpl.options` возвращает параметры шаблона в виде целого числа. * `$.tpl.depends` возвращает массив шаблонов, на которые ссылается текущий шаблон. * `$.tpl.time` возвращает штамп времени, когда шаблон последний раз менялся * `$.version` возвращает версию Fenom. * `$.const` обращение к PHP константе: `$.const.PHP_EOL` обращение к константе `PHP_EOL`. Поддерживается пространство имен которое разделяется через точку: `$.const.Storage.FS::DIR_SEPARATOR` обращение к PHP константе `Storage\FS::DIR_SEPARATOR` если такой константы нет будет взята константа `Storage\FS\DIR_SEPARATOR`. * `$.call` обращение к статическомому методу. `$.call.Storage.FS::put($filename, $data)` обращение к методу `Storage\FS::put($filename, $data)`. Настройка `disable_call` отключает возможность обращения к `$.call`. Так же можно ограничить и указать список доступных к вызову классов и функций. * `$.block` проверка на существование блоков которые были определены до момента обращения к аксессору. Например, `{$.blocks.BLOCK_NAME}`. Так же вы можете добавить свои или удалить существующие системные переменные и функции ``` -------------------------------- ### Example msGetOrder Output Structure Source: https://docs.modx.pro/components/minishop2/snippets/msgetorder This example shows the typical array structure returned by msGetOrder when no 'tpl' is specified. It includes details about the order itself and a list of products within that order, with each product containing its own set of properties. ```PHP Array ( [tpl] => [includeTVs] => [includeThumbs] => [toPlaceholder] => [showLog] => [order] => Array ( [id] => 1 [user_id] => 2 [session_id] => [createdon] => 2023-11-05 08:31:47 [updatedon] => [num] => 2311/1 [cost] => 2100 [cart_cost] => 2100 [delivery_cost] => 0 [weight] => 0 [status] => 1 [delivery] => 1 [payment] => 1 [context] => web [order_comment] => [properties] => [type] => 0 ) [products] => Array ( [0] => Array ( [id] => 4 [type] => document [contentType] => text/html [pagetitle] => Товар 1 [longtitle] => [description] => [alias] => товар-1 [alias_visible] => 1 [link_attributes] => [published] => 1 [pub_date] => 0 [unpub_date] => 0 [parent] => 3 [isfolder] => 0 [introtext] => [richtext] => 1 [template] => 1 [menuindex] => 0 [searchable] => 1 [cacheable] => 1 [createdby] => 1 [createdon] => 1699161918 [editedby] => 0 [editedon] => 0 [deleted] => 0 [deletedon] => 0 [deletedby] => 0 [publishedon] => 1699161918 [publishedby] => 1 [menutitle] => [donthit] => 0 [privateweb] => 0 [privatemgr] => 0 [content_dispo] => 0 [hidemenu] => 0 [class_key] => msProduct [context_key] => web [content_type] => 1 [uri] => [uri_override] => 0 [hide_children_in_tree] => 0 [show_in_tree] => 0 [properties] => [article] => [price] => 500 [old_price] => 0 [weight] => 0 [image] => [thumb] => [vendor] => 0 [made_in] => [new] => 0 [popular] => 0 [favorite] => 0 [tags] => [color] => [size] => [source] => 2 [original_price] => 500.00 [vendor.name] => [vendor.resource] => [vendor.country] => [vendor.logo] => [vendor.address] => [vendor.phone] => [vendor.fax] => [vendor.email] => [vendor.description] => [vendor.properties] => [vendor.rank] => [product_id] => 4 [order_id] => 1 [name] => Товар 1 [count] => 3 [cost] => 1 500 [options] => Array ( ) [order_product_id] => 1 [discount_price] => 0 [discount_cost] => 0 ) [1] => Array ( [id] => 5 [type] => document [contentType] => text/html [pagetitle] => Товар 2 [longtitle] => [description] => [alias] => товар-1 [alias_visible] => 1 [link_attributes] => [published] => 1 [pub_date] => 0 [unpub_date] => 0 [parent] => 3 [isfolder] => 0 [introtext] => [richtext] => 1 [template] => 1 [menuindex] => 0 [searchable] => 1 [cacheable] => 1 [createdby] => 1 [createdon] => 1699161930 [editedby] => 1 [editedon] => 1699161941 [deleted] => 0 [deletedon] => 0 [deletedby] => 0 ``` -------------------------------- ### API Configuration Example Source: https://docs.modx.pro/components/ms3promocode/frontend/js-api Shows how to globally configure the MS3 Promo Code API, including setting a custom API URL and enabling debug logging. ```javascript ``` -------------------------------- ### Minimal Pagination tplOuter Example Source: https://docs.modx.pro/components/mfilter/frontend/pagination Basic structure for the tplOuter template when using standard pagination. ```html
{$rows ?: 'Ничего не найдено'}
{if $pagination}
{$pagination}
{/if}
``` -------------------------------- ### Subscribe to MiniShop3 Ready Event Source: https://docs.modx.pro/components/minishop3/development/javascript Listen for the 'ms3:ready' DOM event to execute code once the MiniShop3 frontend is fully initialized. This is useful for initial setup tasks. ```javascript document.addEventListener('ms3:ready', () => { console.log('MiniShop3 готов') }) ``` -------------------------------- ### Example Task File Source: https://docs.modx.pro/components/minishop3/development/scheduler This PHP code demonstrates the basic structure of a task file for the Scheduler component. It shows how to access MiniShop3 services and log task completion or errors. ```php services->get('ms3'); // Ваша логика try { // ... выполнение задачи ... $modx->log(modX::LOG_LEVEL_INFO, "[myTask] Completed successfully"); return true; } catch (\Exception $e) { $run->addError($e->getMessage()); return false; } ``` -------------------------------- ### Minimal Pagination tplPagination Example Source: https://docs.modx.pro/components/mfilter/frontend/pagination Template for rendering pagination links, including previous, next, and page numbers. ```html {if $pageCount > 1} {/if} ``` -------------------------------- ### msfo_success Chunk Example (MODX Tag) Source: https://docs.modx.pro/components/msfastorder/chunks Example of the `msfo_success` chunk using MODX tags, demonstrating how to display a payment link if available. This serves as a template for the success screen. ```modx [[+payment_link:notempty=` [[%msfastorder_pay_button]] `]] ``` -------------------------------- ### Vue Integration Example Source: https://docs.modx.pro/components/ms3promocode/frontend/js-api Demonstrates how to use the MS3 Promo Code API within a Vue.js component to apply and remove promo codes, and display their status. ```javascript ``` -------------------------------- ### mSearch2 with mSearchForm and pdoPage Source: https://docs.modx.pro/components/msearch2/snippets/msearch2 This example demonstrates using mSearch2 in conjunction with mSearchForm for enhanced search functionality, combined with pdoPage for pagination of results. ```modx [[!mSearchForm]] [[!pdoPage? &element=`mSearch2` ]] [[!+page.nav]] ``` -------------------------------- ### Load More Button tplOuter Example Source: https://docs.modx.pro/components/mfilter/frontend/pagination Structure for the tplOuter template to include a 'Show More' button for loadmore pagination. ```html
{$rows}
{if $pageCount > 1}
{/if}
``` -------------------------------- ### Package Calculation Example (Method 3) Source: https://docs.modx.pro/components/mscdek This PHP code demonstrates the structure of package data used for calculation when the 'mscdek_packages_packages_calc_type' setting is '3'. It includes weight, length, width, and height for each package. ```php $packages = [ [ 'weight' => 2, 'length' => 20, 'width' => 30, 'height' => 20 ], [ 'weight' => 1, 'length' => 20, 'width' => 30, 'height' => 10 ], ]; ``` -------------------------------- ### Adding Custom Tab for Reviews Source: https://docs.modx.pro/components/minishop3/frontend/product Extend the product page with a new tab for displaying reviews. This example shows how to create a tab button and a tab pane that loads the 'msProductReviews' snippet. ```fenom
{'!msProductReviews' | snippet : ['product' => $_modx->resource.id]}
``` -------------------------------- ### Quick View Chunk Structure (MODX Fenom) Source: https://docs.modx.pro/components/mxquickview/integration This snippet demonstrates the HTML structure for a quick view product chunk using MODX Fenom syntax. It is similar to the previous example but uses Fenom's specific variable and filter syntax. ```html
{$variants_html}
``` -------------------------------- ### Get Only Product IDs Source: https://docs.modx.pro/components/minishop3/snippets/msproducts Retrieve only the IDs of the products that match the specified criteria. Set 'returnIds' to 1. ```fenom {set $productIds = 'msProducts' | snippet : [ 'parents' => 5, 'returnIds' => 1 ]} {* $productIds = "1,2,3,4,5" *} ``` -------------------------------- ### Display Products with Pagination (pdoPage) Source: https://docs.modx.pro/components/minishop3/snippets/msproducts Integrate msProducts with pdoPage for implementing pagination. The navigation placeholder 'page.nav' is also shown. ```fenom {'pdoPage' | snippet : [ 'element' => 'msProducts', 'parents' => 0, 'limit' => 12, 'tpl' => 'tpl.msProducts.row' ]} {$_modx->getPlaceholder('page.nav')} ``` -------------------------------- ### Get Price Format Setting in PHP Source: https://docs.modx.pro/components/minishop3/settings Retrieves the price format setting from MiniShop3 using the getOption method in PHP. ```php $priceFormat = $modx->getOption('ms3_price_format'); $currencySymbol = $modx->getOption('ms3_currency_symbol'); ``` -------------------------------- ### Create and Populate an Order Source: https://docs.modx.pro/components/minishop3/development/models Demonstrates how to create a new order and add products to it using MiniShop3 models. ```php use MiniShop3\Model\msOrder; use MiniShop3\Model\msOrderProduct; use MiniShop3\Model\msOrderAddress; // Создание заказа $order = $modx->newObject(msOrder::class); $order->fromArray([ 'customer_id' => $customerId, 'user_id' => $modx->user->get('id') ?: 0, 'status_id' => $modx->getOption('ms3_status_new'), 'delivery_id' => $deliveryId, 'payment_id' => $paymentId, 'context' => $modx->context->key, ]); $order->save(); // Добавление товара в заказ $orderProduct = $modx->newObject(msOrderProduct::class); $orderProduct->fromArray([ 'order_id' => $order->get('id'), 'product_id' => $productId, 'name' => $productName, 'price' => $price, 'count' => $count, 'cost' => $price * $count, 'options' => json_encode($options), ]); $orderProduct->save(); ``` -------------------------------- ### Get Currency Symbol Setting in Fenom Source: https://docs.modx.pro/components/minishop3/settings Accesses the currency symbol setting using the 'option' filter in Fenom for frontend display. ```fenom {'ms3_currency_symbol' | option} ``` -------------------------------- ### Accessing System Configuration Settings Source: https://docs.modx.pro/components/pdotools/parser Shows how to access system configuration settings like site name, sender email, and site URL using the $_modx->config object. ```fenom {$_modx->config.site_name} {$_modx->config.emailsender} {$_modx->config['site_url']} {$_modx->config['any_system_setting']} ``` -------------------------------- ### Get Payment Cost Source: https://docs.modx.pro/components/minishop3/interface/settings/payments Calculates the cost for a specific payment method. This is useful for displaying any additional fees associated with a payment option. ```HTTP GET /api/v1/order/cost/payment?payment_id=2 ``` ```JSON { "success": true, "data": { "cost": 150.00 } } ``` -------------------------------- ### Manage Customer and Addresses Source: https://docs.modx.pro/components/minishop3/development/models Shows how to find or create a customer, add an address, and retrieve all addresses associated with a customer. ```php use MiniShop3\Model\msCustomer; use MiniShop3\Model\msCustomerAddress; // Поиск или создание клиента $customer = $modx->getObject(msCustomer::class, ['email' => $email]); if (!$customer) { $customer = $modx->newObject(msCustomer::class); $customer->fromArray([ 'email' => $email, 'first_name' => $firstName, 'phone' => $phone, ]); $customer->save(); } // Добавление адреса $address = $modx->newObject(msCustomerAddress::class); $address->fromArray([ 'customer_id' => $customer->get('id'), 'city' => $city, 'street' => $street, 'building' => $building, ]); $address->save(); // Получение всех адресов клиента $addresses = $customer->getMany('Addresses'); ``` -------------------------------- ### Loading and Using Lexicon Dictionaries Source: https://docs.modx.pro/components/pdotools/parser Illustrates how to load a lexicon dictionary and then use its entries for translations. ```fenom {$_modx->lexicon->load('ms2gallery:default')} Проверка словарей ms2Gallery: {$_modx->lexicon('ms2gallery_err_gallery_exists')} ``` -------------------------------- ### Create Custom Price Modifier Snippet Source: https://docs.modx.pro/components/minishop3/settings A PHP snippet example to dynamically modify product prices based on certain conditions, such as category. ```php get('price'); // Применяем скидку 10% для определённой категории if ($product->get('parent') == 5) { $price = $price * 0.9; } return $price; ``` -------------------------------- ### Using msCategoryOptions Snippet Source: https://docs.modx.pro/components/mscategoryoptions This snippet calculates options and passes them to a Fenom template. Specify the desired options and an empty template to see all available placeholders. ```modx [[msCategoryOptions? &options=`type,features` &tpl=`` ]] ``` -------------------------------- ### Get Customer Profile Page ID in Fenom Source: https://docs.modx.pro/components/minishop3/settings Retrieves the customer profile page ID setting using the 'option' filter in Fenom. ```fenom {'ms3_customer_profile_page_id' | option} ``` -------------------------------- ### GET /api/v1/order/cost/payment Source: https://docs.modx.pro/components/minishop3/interface/settings/payments Calculates the cost associated with a specific payment method. This is useful for displaying any additional fees or charges before the user confirms their order. ```APIDOC ## GET /api/v1/order/cost/payment ### Description Calculates the cost associated with a specific payment method. ### Method GET ### Endpoint /api/v1/order/cost/payment ### Parameters #### Query Parameters - **payment_id** (integer) - Required - The ID of the payment method for which to calculate the cost. ### Response #### Success Response (200) - **success** (boolean) - Indicates if the request was successful. - **data** (object) - An object containing the payment cost. - **cost** (float) - The calculated cost for the specified payment method. ### Response Example { "success": true, "data": { "cost": 150.00 } } ``` -------------------------------- ### Display Product Results with Pagination Snippet Source: https://docs.modx.pro/components/flatfilters/index Use the `Pagination` snippet to display product results. Configure it with a specific `configId`, `presetName`, and rendering options for `msProducts`. It also handles result block selection and display methods. ```fenom {set $presetName = 'filters.presetName' | placeholder}
{'!Pagination' | snippet: [ 'configId' => $configId, 'snippet' => '!Pagination', 'render' => '!msProducts', 'presetName' => $presetName, 'pagination' => 'filters', 'resultBlockSelector' => '[data-pn-result="filters"]', 'resultShowMethod' => 'insert', 'hashParams' => 'filtersHash,sortby', 'noDisabled' => 1, 'tplEmpty' => '@INLINE

Товаров удовлетворяющих заданным параметрам не найдено.

', 'limit' => $pageLimit, 'parents' => 0, 'sortby' => ['Data.weight' => 'ASC'], 'tpl' => 'Чанк-вывода-товара', 'includeTVs' => 'modifications', 'includeThumbs' => 'small', 'showUnpublished' => 1 ]}
``` -------------------------------- ### GET /api/mgr/categories/{category_id}/options Source: https://docs.modx.pro/components/minishop3/interface/settings/options Retrieves options bound to a specific category. It includes global captions and descriptions, with the possibility of category-specific overrides. ```APIDOC ## GET /api/mgr/categories/{category_id}/options ### Description Retrieves options bound to a specific category. It includes global captions and descriptions, with the possibility of category-specific overrides. ### Method GET ### Endpoint /api/mgr/categories/{category_id}/options ### Parameters #### Path Parameters - **category_id** (integer) - Required - The ID of the category to retrieve options for. ``` -------------------------------- ### msCategoryOptions Output Structure Source: https://docs.modx.pro/components/mscategoryoptions This is an example of the output generated by the msCategoryOptions snippet when no template is specified. It shows the detailed structure of the 'options' variable passed to the template. ```php Array ( [options] => Array ( [type] => Array ( [path] => Электроника/ТВ/Телевизор/Тип.yml [depth] => 3 [title] => Тип [import] => /Электроника/ТВ/Тип.yml [caption] => Тип [unit] => [description] => Выберите из списка наиболее подходящий тип товара. Определить его можно по вопросу "Что это?". [key] => type [type] => option [required] => 1 [collection] => [option] => Array ( [0] => Автомобильный телевизор [1] => Плазменная панель [2] => Портативный телевизор [3] => Телевизор ) [value] => Array ( [0] => Телевизор ) ) [features] => Array ( [path] => Электроника/ТВ/Телевизор/Особенности.yml [depth] => 3 [title] => Особенности [import] => /Электроника/ТВ/Особенности.yml [caption] => Особенности [unit] => [description] => Выбираются особенности устройства [key] => features [type] => option [required] => [collection] => 1 [option] => Array ( [0] => Android TV [1] => HDR [2] => Smart TV [3] => WiFi модуль [4] => Изогнутый экран [5] => Поддержка 3D [6] => Поддержка iTunes [7] => Управление жестами ) [value] => Array ( [0] => Android TV [1] => WiFi модуль [2] => Изогнутый экран ) ) ) ) ``` -------------------------------- ### Register Before and After Hooks for Standard Actions Source: https://docs.modx.pro/components/minishop3/interface/category Demonstrates registering 'before' and 'after' hooks for standard MiniShop3 actions. The 'before' hook can cancel an action, while the 'after' hook can perform follow-up tasks. ```javascript // Хук перед удалением товара MS3ActionRegistry.registerBeforeHook('delete', async (data, gridId) => { // Проверка условий if (data.orders_count > 0) { alert('Нельзя удалить товар с заказами!') return false // Отменить действие } return true // Продолжить }) // Хук после публикации MS3ActionRegistry.registerAfterHook('publish', async (data, result, gridId) => { console.log(`Товар ${data.id} опубликован:`, result) // Отправка уведомления, обновление кэша и т.д. }) ``` -------------------------------- ### Price Format JSON Configuration Source: https://docs.modx.pro/components/minishop3/settings Example of the JSON array format for the 'ms3_price_format' setting, defining decimal places, decimal separator, and thousands separator. ```json [ 2, ".", " " ] ``` -------------------------------- ### Output as JSON for AJAX Source: https://docs.modx.pro/components/minishop3/snippets/msproducts Return product data in JSON format, suitable for AJAX requests. Set 'return' to 'json'. ```fenom {'msProducts' | snippet : [ 'parents' => 0, 'return' => 'json', 'limit' => 20 ]} ``` -------------------------------- ### Example hreflang Output Source: https://docs.modx.pro/components/localizator/hreflang-attribute This HTML snippet shows the expected output of the 'hreflang' snippet, displaying alternate language links for different versions of a webpage. ```html ``` -------------------------------- ### GET /api/v1/order/payments Source: https://docs.modx.pro/components/minishop3/interface/settings/payments Retrieves a list of available payment methods for a given delivery. This endpoint is useful for displaying payment options to the user during the checkout process. ```APIDOC ## GET /api/v1/order/payments ### Description Retrieves a list of available payment methods for a given delivery. ### Method GET ### Endpoint /api/v1/order/payments ### Parameters #### Query Parameters - **delivery_id** (integer) - Required - The ID of the delivery to get payment methods for. ### Response #### Success Response (200) - **success** (boolean) - Indicates if the request was successful. - **data** (array) - An array of payment method objects. - **id** (integer) - The unique identifier for the payment method. - **name** (string) - The name of the payment method (e.g., "Наличными при получении"). - **description** (string) - A brief description of the payment method (e.g., "Оплата курьеру"). - **price** (string) - The cost associated with this payment method. - **logo** (string) - The URL to the logo of the payment method, if available. ### Response Example { "success": true, "data": [ { "id": 1, "name": "Наличными при получении", "description": "Оплата курьеру", "price": "0", "logo": "" }, { "id": 2, "name": "Онлайн картой", "description": "Visa, MasterCard, МИР", "price": "0", "logo": "/assets/images/cards.png" } ] } ``` -------------------------------- ### Manage Product Links via Processors Source: https://docs.modx.pro/components/minishop3/development/backend-api/product Utilize MiniShop3 processors for creating and removing product links. Specify the processor path and provide the necessary link and product IDs. ```php // Создание связи $response = $modx->runProcessor('MiniShop3\Processors\Product\ProductLink\Create', [ 'link' => $linkTypeId, 'master' => $productId, 'slave' => $relatedId, ], [ 'processors_path' => $modx->getOption('core_path') . 'components/minishop3/src/Processors/', ]); // Удаление связи $response = $modx->runProcessor('MiniShop3\Processors\Product\ProductLink\Remove', [ 'link' => $linkTypeId, 'master' => $productId, 'slave' => $relatedId, ], [ 'processors_path' => $modx->getOption('core_path') . 'components/minishop3/src/Processors/', ]); ``` -------------------------------- ### Include Image Previews Source: https://docs.modx.pro/components/minishop3/snippets/msproducts Include specific image sizes (thumbs) for products. The URLs for these thumbs will be available as placeholders in the template. ```fenom {'msProducts' | snippet : [ 'parents' => 0, 'includeThumbs' => 'small,medium' ]} ``` -------------------------------- ### Get Available Payment Methods Source: https://docs.modx.pro/components/minishop3/interface/settings/payments Retrieves a list of all available payment methods for a given delivery ID. Use this to display payment options to the user. ```HTTP GET /api/v1/order/payments?delivery_id=1 ``` ```JSON { "success": true, "data": [ { "id": 1, "name": "Наличными при получении", "description": "Оплата курьеру", "price": "0", "logo": "" }, { "id": 2, "name": "Онлайн картой", "description": "Visa, MasterCard, МИР", "price": "0", "logo": "/assets/images/cards.png" } ] } ``` -------------------------------- ### Check AVIF Format Support using ImageMagick Source: https://docs.modx.pro/components/minishop3/interface/gallery Tests if the ImageMagick installation supports the AVIF format. AVIF support is dependent on ImageMagick being compiled with libheif. ```bash convert -list format | grep AVIF ``` -------------------------------- ### Displaying All Order Placeholders with msGetOrder Source: https://docs.modx.pro/components/minishop2/snippets/msgetorder Use this snippet to output all available placeholders for an order. This is achieved by calling msGetOrder with an empty 'tpl' parameter. The output will be a structured array of order and product data. ```MODX [[!msGetOrder?tpl=``]] ``` -------------------------------- ### Handle mSearch2 Filter Load Event Source: https://docs.modx.pro/components/msearch2/snippets/mfilter2 Listen for the 'mse2_load' event to perform additional processing after filters are loaded. This example logs the event and data to the console. ```javascript $(document).on('mse2_load', function (e, data) { console.log(e, data); }); ``` -------------------------------- ### Enable Debugging via URL Parameter Source: https://docs.modx.pro/components/msrussianpost/quick-start Alternatively, you can enable debugging by appending `?msrp_debug=1` to the page URL. This is useful for debugging issues directly on the storefront. ```html ?msrp_debug=1 ``` -------------------------------- ### Display Language Switcher (MODX Tags) Source: https://docs.modx.pro/components/localizator/switch-languages This example shows how to use standard MODX tags to call the 'getLanguages' snippet for displaying the language switcher in your templates. ```modx
[[!getLanguages? &tpl=`section-langs-1`]]
``` -------------------------------- ### MiniShop3 Core Directory Structure Source: https://docs.modx.pro/components/minishop3/index Overview of the core component files and directories, including configuration, controllers, elements, and source code. ```text core/components/minishop3/ ├── bootstrap.php # Инициализация компонента ├── config/ │ ├── routes/ # Маршруты REST API │ ├── mgr/ # Конфигурация админки │ ├── combos/ # Комбобоксы для админки │ ├── filters/ # Фильтры для гридов │ └── ms3.services.d/ # Кастомные сервисы ├── controllers/ # Контроллеры страниц админки ├── elements/ │ ├── snippets/ # Сниппеты (msProducts, msCart, msOrder...) │ ├── chunks/ # Чанки (шаблоны Fenom) │ ├── plugins/ # MODX плагины │ ├── tasks/ # Задачи Scheduler │ └── templates/ # Email-шаблоны ├── lexicon/ # Языковые файлы (en, ru) ├── migrations/ # Миграции Phinx ├── schema/ # xPDO схема БД ├── seeds/ # Сиды для БД ├── src/ │ ├── Controllers/ │ ├── Model/ │ ├── Processors/ │ ├── Services/ │ ├── Notifications/ │ ├── Router/ │ ├── Middleware/ │ ├── Utils/ │ ├── MiniShop3.php # Главный класс компонента │ └── ServiceRegistry.php # Реестр сервисов └── vendor/ # Composer зависимости ``` -------------------------------- ### Display Order Information on Thank You Page Source: https://docs.modx.pro/components/minishop3/snippets/msgetorder Integrate msGetOrder into your thank you page template to display order details after a successful checkout. This example includes an image thumbnail. ```fenom

Спасибо за заказ!

Мы свяжемся с вами в ближайшее время.

{'msGetOrder' | snippet : [ 'includeThumbs' => 'small' ]}
На главную
``` -------------------------------- ### Enable Debug Mode for msRussianPost (MODX Fenom) Source: https://docs.modx.pro/components/msrussianpost/snippets/msRussianPost Enable debug mode to get extended logging in the browser console. This is helpful for troubleshooting delivery calculation issues. ```modx [[!msRussianPost? &debug=`1`]] ``` -------------------------------- ### Configure Pagination Block Source: https://docs.modx.pro/components/flatfilters/index Set up the pagination block, including 'Load More' buttons and navigation controls. This snippet allows users to adjust the current page, total pages, and items per page. ```fenom {set $totalPages = 'filters.totalPages' | placeholder} {set $limit = 'filters.limit' | placeholder}

из {$totalPages?:1}

Показывать по

```