I want to present to the community a component for MODX Revolution that easily turns a regular website into an online store.

He does not claim to be the best store in the observable universe, and will surely lose to all engines specialized for this purpose, but in the niche of stores for Revo he will be exactly the third.
After
VisionCart and
Shopkeeper .
')
So, here is my
miniShop . On the demo site you can see everything both outside and in the
administrative part (
login and password - demo ).
The extension is completely open-source, free. To whom it is interesting - the details under the habrakat.
Installation
It is conducted through the package manager, a couple of clicks immediately from the
repository . From there, there will also be updates (store in a tight design).
After installation, you need to create 2 templates for categories and products, and specify them in the settings.
Categories and Products
All products and categories are located in the resource tree. To distinguish one from another, use different templates. Also, categories must be containers.
Templates for them should be specified in the system settings of the component (Switch the namespace to minishop).
There you also need to change the status number for the new order (1 by default, already set)
Before developing the store, I conducted a survey on how best to store goods - in my own tables, or in resources. And although the majority voted for the tables, in the process of discussion I realized that I would do everything in resources.
And that's why:
1. You can use the TV options.
2. You can use contexts.
3. You can use all standard snippets.
4. You can use resource groups and access rights.
5. Caching works out of the box.
6. Friendly urla for each product.
You can continue on your own.
I don’t see any flaws, the speed is quite at the level (15000 products are crammed on the demo site). All products are created and changed directly from the component. You do not need to climb into the resource tree.
In the component there is a convenient filtering by category, name and article number of the goods, so that nothing is lost in many hundreds / thousands of positions.

Warehouses
The component supports an unlimited number of warehouses.
Separately configured parameters for each. Delivery, address, mail for receiving order messages, etc.
You can not use this feature, but at least one warehouse for work must be (the default is created).
Goods have 4 main properties so far: article, image, price and balance. All 4 properties are tied to the warehouse-to-goods ratio. Also added 3 additional properties for different needs. 2 varchar (255) and 1 text.

That is, you have all the goods at the same time in all warehouses, but everywhere they can have different properties (or the same). It provides rich management capabilities.
You can display the product on the site using the balance in the current warehouse. If the balance is 0 - do not display the goods, or do not give to order.
Multicategories
This is a feature for which (but not only!) I had to write my own store.

Each product has its own main category (the container in which it is located) and may be additional - you specify them in its settings. There are no restrictions.
When displaying goods through the msGetResources snippet, all products are retrieved based on categories. There is also a sorting by all properties, both resource and product.
This snippet is bundled and is a modified getResources (its class is also used).
Thus, one product is displayed in different categories.
Statuses
You can create any number of statuses for orders and switch them in any order. Each status can be configured notification to the mail of the buyer and the manager (different headers of the body of letters).

At installation, the status is “New” with notifications enabled.
Notification manager goes to the mail warehouse (you can specify them there a few, separated by commas).
When switching the order status in the component, this action is saved in the order change history and a notification is sent (or not), in accordance with the setting of this status.
Catalog on the site
All operations with a basket, adding / deleting goods, ordering work through Ajax.
Required jquery 1.7+, jquery.form 2.8+ and friendly urls.
In general, in my opinion, the frontend is still weak, but it is not clear what the people want.
Everyone has different requirements for ordering, registering users, etc. Therefore, see $ _SESSION ['minishop'] and write your snippets, if that.
In my option for placing an order, the user is identified by email, if it is not in the database, then it is registered with a random password (then you can reset and change to your own - that’s registration =)) Order and shipping address are tied to this user. The address can be changed in the admin at the properties of the order. Number of products can also be changed there.
In the main class there are rudiments for choosing from these addresses when ordering, but for now everything is commented out - for it is unstable.
After placing the order, the user session is cleared.
When working with a basket, a json line is returned with the status, message, number of goods and the basket amount.

Personal Area
This bun is released literally today. Authorization required (Login snippets, or Loginza).
The cabinet is made on ExtJS, just like the MODX admin panel, all the scripts from the manager are loaded into it, and the styles are taken from the CDN Sencha.
On the one hand it comes out hard, but on the other - you can make a very cool office. While a list of all orders is displayed, with products and a history of status changes, you can track the fate of the package. Given the unlimited statuses - you can publish here from the admin at least "Manager Peter wrapped the goods in the package."

To use the account on my site, you need
to login through a login
before ordering and order something. A little later I will modify my
Loginza snippet so that it can change the user's properties in the account (full name, address, etc.). And then the services of such information do not provide, and the buyer will want to fill in their own necessary data for substitution in orders.
Conclusion
The package includes all the necessary snippets and chunks to create a simple store.
How to use them,
I will write later (in any case I will try), see the
manual , and you can always look at the demo site.
The project is still quite young, it can do a little bit, but over time, I think it will grow. I actively develop it and am not going to throw it.
In the near future, screwing up payment systems and releasing a ready-made MODX assembly immediately with a miniShop configured . Screwed the payment through
z-payment.ru and made
scripts for automated installation .
Links
Project home page + documentation + demo (including admin panel)Github source codePackage in the MODX repositoryDemonstration of speedPSPlease do not criticize me too hard. Remember that this is an extension for the MODX Revolution engine, and not a separate project.
Also please indicate errors on the
Github tracker .