Setting Up miniShop2 for an MODX Ecommerce Store
A client brought a catalog of 3,000 products from 1C-Bitrix — we needed to migrate to MODX Revolution in two weeks. The category structure differed, and prices with options were tied to SKUs. miniShop2, the e-commerce component from the Bezumkin team, handles such tasks if you know the setup nuances. It integrates seamlessly into MODX architecture: products become resources with extra fields, cart and orders are separate tables. As a result, the catalog is managed through the familiar MODX manager, not a separate panel. We have used miniShop2 in over 50 projects, and it has proven reliable under loads up to 10,000 products. With proper optimization, maintenance costs are reduced by 2–3 times — an important argument when choosing an e-commerce platform. Hosting costs drop by about 30%, saving roughly $1,800 annually.
The main challenges during migration are N+1 queries, configuring options with surcharges, and integrating payment gateways. To speed up filtering, we use mSearch2 and MySQL indexes. pdoTools reduces the number of queries by 2–3 times. According to the official documentation: MODX docs on pdoTools.
What We Solve
- N+1 queries when displaying the catalog — pdoTools optimizes the query via ORM lazy loading, and we configure caching via Redis. This provides a 3x speed increase compared to standard queries.
- Complex options with surcharges — msOptionsPrice2 allows setting a price for each combination, a separate SKU, and stock.
- Integration with delivery and payment — we connect CDEK, Boxberry, Russian Post, and payment gateways.
- Cart performance under high load — we use AJAX requests to processors, keeping the state in the session.
How We Do It
Stack: MODX Revolution 3.x, PHP 8.2, MySQL 8, Redis, Nginx. Optimizations:
- The msProducts snippet is always called uncached (!) for dynamic data.
- For options, we use msOptionsPrice2 with select type — values are stored in a separate table.
- Filtering via mFilter2 is configured with indexes on price and stock.
- Resources are cached via Redis with tagging for fast invalidation.
Case study: recently we deployed a store with 5,000 products and 30 options. Filtering worked in 200 ms, and the AJAX cart without page reload. The only issue was import — we wrote a script that loaded 100 products per transaction, speeding up the process by 3 times. This saved the client a week of development and reduced the overall migration cost by $2,000.
How to Set Up Filtering and Search for a Large Catalog?
We use mSearch2 with facet filtering. The mFilter2 snippet with msProducts elements and filters by price and options. Filtering is done via AJAX. To speed up, we add indexes in MySQL:
ALTER TABLE modx_ms2_products ADD INDEX idx_price (price); ALTER TABLE modx_ms2_products ADD INDEX idx_count (count); This reduces the execution time of filtering queries by 50–70%.
Why miniShop2 Is More Efficient Than Ready-Made Box Solutions?
Unlike Bitrix editions, miniShop2 does not overload the system with unnecessary modules. You get only the necessary functionality, and you build everything else to your needs. The cost of ownership is 2–3 times lower due to the absence of annual licenses and the ability to modify the code yourself. The savings become especially noticeable when scaling — no vendor lock-in.
Import and Migration
There is no bulk import out of the box, so we use a script that directly creates products via the MODX API. For 3,000 products from CSV, we split into batches of 100 and run in the background.
PHP Implementation of Batch Import
foreach (array_chunk($rows, 100) as $batch) { foreach ($batch as $row) { $resource = $modx->newObject('msProduct'); $resource->fromArray([ 'pagetitle' => $row[0], 'parent' => $categoryId, 'class_key' => 'msProduct', ]); $resource->save(); $product = $modx->getObject('msProductData', $resource->id); $product->set('price', (float) $row[2]); $product->save(); } $modx->cacheManager->clearCache(); } For migration from 1C, we prepare a script that reads CommerceML, maps categories, and loads products with options.
Work Process
- Analysis — we study the current catalog, structure, integrations.
- Design — category scheme, option types, delivery and payment methods.
- Implementation — installation, configuration, layout, integration.
- Testing — checking the cart, orders, performance.
- Deployment — setting up URL routing, SEO, schema.org microdata.
Deliverables include: project documentation, admin access, training for editors, and 1 month of post-launch support.
Timelines and What’s Included
| Stage | Duration (days) |
|---|---|
| Installation and basic setup | 1 |
| Catalog and cart templates | 3–5 |
| Delivery and payment integration | 1–2 |
| Product import from CSV/CommerceML | 1–2 |
| mSearch2 filtering | 2–3 |
| SEO + microdata | 1 |
An additional stage is also available — creating a detailed checklist for editors (1 day).
| Parameter | CSV Import | CommerceML |
|---|---|---|
| Complexity | Low | Medium |
| Speed | 1,000 products/min | 500 products/min |
| Accuracy | Requires pre-cleaning | High, preserves relations |
Contact us — we will evaluate your project and propose a solution. Get a consultation from an engineer with 7 years of MODX experience. We guarantee a fully functional store within the agreed timeline.







