Went 2.0 beta1 Shopkeeper for MODX Revolution


Ongoing development of module Shopkeeper for MODx Revolution. This module (snippet) to the many famous and used MODx Evolution to create online stores.
In addition to the transfer of Shopkeeper on Revo are planning to refactor the code in the light of accumulated experience. But now we can use the version of beta1 to create a simple store.

What I have so far:
the
    the
  • Full automatic setting of the control system;
  • the
  • items are added to the basket;
  • the
  • Sending of mail order to the Manager of shop and the control module orders;
  • the
  • Ability to set order statuses;
  • the
  • the Ability to edit statuses and their colors;
  • the
  • the possibility of placing the goods in a separate context MODX (useful to customize the directory).
  • the
  • Binding orders to the registered users.








To install the package is very simple:
    the
  1. Download the archive shopkeeper-2.0-beat1.transport.zip in folder core/packages/ your site.
  2. the
  3. In the control panel click System -> "Managing packages" -> "Add new package" -> "to find packages locally" -> "On".
  4. the
  5. In the packages grid appears package "shopkeeper". Click "Install".
  6. the
  7. Finish the installation.


As before, the most used ready additions for MODX. To display products, use the snippet getResources. To send the order mail and the order management system uses the snippet FormIt. For registration and authorization you can use the snippet Login. The kit also includes a snippet shk_fihook, which is used as a hook for the FormIt and plugin may to switch contexts.

Placing the goods in a separate context not required, but recommended if you plan a lot of products (more than 2000). This will allow for a directory to make individual settings, for example when you need to disable the friendly URL (friendly_urls).
General context it is almost the same as a separate database table in Evolution. I have not yet tested the speed with a large quantity of goods (resource MODX), but when friendly_urls is disabled (as a temporary solution) shouldn't be a problem.



context Creation for products:
    the
  1. in the menu go "System" - > "Contexts", click "Create new". In the "context Key" enter "catalog". Next, click the right button on the context bar in the list and choose "Update context".
  2. Configuration context
    site_start: 20
    error_page: 21
    unauthorized_page: 22
    where 20 is the ID of the document catalog 21 page 404, 22 — page 403 (access denied).
    the

  3. Create in the context of the "catalog" document-container "Directory". Inside to create the directory structure.
  4. the
  5. In the context of the "web" create document link "Catalog" in the "Link" field, enter "catalog/".
  6. the
  7. If you are using friendly URLS and use Apache server .htaccess replace line
    the
    RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]

    the
    RewriteRule ^(catalog)?(\/)?(.*)$ index.php?c=$1&q=$1$2$3 [L,QSA]

  8. the
  9. Check that you installed the plugin may (core/components/shopkeeper/elements/plugins/context_switch.php).

an Example of calling the snippet Shopkeeper:

the
[[!Shopkeeper? &cartType=`full`&flyToCart=`image`&orderFormPage=`12`]]


Conclusion goods out of context "catalog":

the
[[!getResources?
&context=`catalog`
&tplPath=`[[++core_path]]components/shopkeeper/elements/chunks/ru/`
&tpl=`@FILE chunk_shopStuff.tpl`
&includeTVs=`1`
&parents=`9`
]]


updated
Already available version of beta3 (you can download from the control panel).
Article based on information from habrahabr.ru

Комментарии

Популярные сообщения из этого блога

Briefly on how to make your Qt geoservice plugin

Database replication PostgreSQL-based SymmetricDS

Yandex.Widget + adjustIFrameHeight + MooTools