Review Shop-Script 5

    Hello! I lead the development of Shop-Script . Over the course of the year, I collected questions that arise from users and developers starting to work with Shop-Script 5 (the latest version of the product), and in this post I designed them in a separate review article. A promotional website with a promotional website, documentation is also sometimes useful, but it is always easier to get to know a product by reading or scrolling through just one article. Under the cut - a detailed review of Shop-Script 5 with a description of key features and how the engine works, 5 MB screenshots, some statistics and plans for the future.





    Shop-Script 5 is designed to create retailonline stores. To understand the portrait of a typical online store for which Shop-Script 5 will be useful, you should imagine a company with a small staff located in a large Russian city, has several warehouses (for example, office, warehouse and point of sale), works with 1C, carries out delivery of orders by courier and mail. The platform is flexible and can be used to operate online stores in any country, however, the most common type of companies that use Shop-Script 5 today corresponds to just such a portrait.

    Demo Shop-Script 5 : showcase , backend (enter any username and password to enter the backend)
    Download : .tar.gz (4.5 MB) or on GitHub(private repository, access is provided to all developers by filling out the form)
    Product website: http://www.shop-script.ru/

    Installation


    Shop-Script 5 is an application based on the Webasyst framework . Developed based on PHP 5.2+ / MySQL 4.1+ / Smarty / jQuery.

    To install Shop-Script 5 you need to download the distribution kit (4.5 MB; the archive already includes the framework and Shop-Script 5), copy all the distribution files to a folder on the server, then open the installation script in the browser and enter the database access data.







    Detailed installation instructions .

    If you do not want to install anything, then Shop-Script 5 can be tried in action by creating a test store in the web service on the product website.

    Start use


    Beckend (admin):



    Frontend (showcase):



    Products can be added in different ways: one at a time via the web interface or you can import many products at once from a CSV file, YML file (Yandex.Market), 1C, or even dragging a bunch of photos into a browser. The ability to import from a set of photos is especially useful when there are already many ready-made photos of goods (DIY stores, hand-made), and all that remains is to come up with names and set prices.



    Interface


    Let's skip the boring part of importing goods and immediately see the backend interface with demo content: Redactor is











    used as a WYSIWYG editor . Code Editor - based on Ace . The default design theme of a store with goods: The default design theme immediately out of the box supports many useful features, such as Schema.org micro- layout, responsive design, and automatic support for @ 2x product images for Retina. The backend and frontend are best seen in the demo .











    File structure and MVC


    Shop-Script 5, like any Webasyst-based application, is designed in accordance with the MVC design principle. All requests to the backend and frontend go through index.php and then are routed according to the routing rules: first, by application, then by action inside the application.



    Read more about the mechanism of operation of Webasyst applications is best read in the documentation .

    All Shop-Script 5 code is in the wa-apps / shop / folder .



    Implementation of all the basic logic of Shop-Script 5 is in lib / actions / (screens), lib / classes / (objects) and lib / model / (work with data )

    Data structure


    The database has 60 tables. General Shop-Script 5 ER diagram:



    The product management model is designed to work with various independent types of products within a single store. You can sell in the same store, for example, household appliances, and shoes, and at the same time the goods management interface will not be overloaded.

    The main entities on which the management of goods is based:

    Type of goods
    They serve as the internal classification of goods and the independent organization of sets of various characteristics (properties) of goods, the division of goods into shop windows (different sites). Example: Home Appliances, Auto Parts, Shoes.
    Product
    What is presented on the window as a logically unified product on a separate page of the online store. A product can only belong to one type.
    Example: iPhone 5S
    vendor code
    This is what you can put in the basket and order. Each product can have many articles. The price is set for the article, the balance in stock.
    Examples:
    iPhone 5S Gold 16 GB
    , iPhone 5S White 32 GB
    Product Category
    External classification of goods. Each category of goods has its own address in the window and can be published (or hidden) in different windows of the online store. A category can be static (type-setting) or dynamic (based on some rule). Categories can be nested into each other.
    Product List
    Allows you to embed individual product lists in design templates or on arbitrary information pages on the site. Example: special offers in a slider on a display case or in a side column.

    The most interesting features


    Shop-Script 5 provides a large number of features right out of the box, many features can be added using plugins, and listing them all here will be pointless. For completeness, I will mention some of the key features:

    • Multi-Vitality : Routing rules are set depending on the domain and allow opening several online stores on the basis of one Shop-Script 5 installation. Each showcase will have its own set of products, its sitemap.xml, its own design theme.

    • Filtration of goods: for each category of goods, you can set your own set of characteristics by which the selection of goods will be made.


    • Product search works on the basis of an index, which is collected from different parameters of the goods: names, descriptions, tags, characteristic values, etc. In the store settings, you can vary the priority (weight) with which each parameter is taken into account.



    • Product images “on the fly” : from the uploaded original product image, sketches are created automatically upon request. For example, if you specify .200x250.jpg in the file name (in the URL), an image of exactly this size will be created.

    • SEO : initial support for Schema.org micro-markup in basic design topics, the ability to use product information in the form of variables in the page headers (“Buy {$ name} in Moscow”), automatic sitemap.xml generation, etc.

    • Accounting for goods in several warehouses with the ability to view the movement log of goods for each warehouse.

    • Pending messages to customers by mail and SMS: for example, thanks for the purchase 3 days after payment of the order.

    • Product recommendations: based on what other customers bought (cross-selling) and based on the selection of goods with similar characteristics (up-selling).

    Yandex.Market, data exchange with 1C: Trade Management, support for all major payment systems, etc. - A description of all the features is best viewed on the product website .


    Design Topics: fasten your design


    wa-apps / shop / themes / THEME_FOLDER / - original design theme files that are completely updated (overwritten) when the design theme is updated.
    wa-data / public / shop / themes / THEME_FOLDER / - modified user design templates that do not change during theme updates (essentially a fork).

    If there is a copy in wa-data / public /, then it will be used; if not, then the original from the application folder wa-apps /.

    Each design theme is a separate folder with a set of HTML / Smarty templates, CSS, JS, images and a theme.xml description file.

    To implement your design, the easiest way is to use the built-in design editor, in which you can edit the basic settings of the design theme (they are defined in theme.xml):



    And each separate design theme template (HTML, CSS, JS) directly in the browser:



    One of the coolest features of design themes is the ability to receive data from another application in the design template of one application. For example, in any application, you can make such a call - {$ in_the_cart = $ wa-> shop-> cart ()} - and get an array of all products in the user's basket into the variable {$ in_the_cart}. Or from another application, for example, from the "Blog": {$ best_posts = $ wa-> blog-> posts ('/ tag / best')}.

    Plugins: expanding the basic functionality of the online store


    The basic functionality of Shop-Script 5 is expanded using plug-ins, the implementation of which is located in a subfolder wa-apps / shop / plugins /

    To create your own plug-in, run in the console:

    php wa.php createPlugin shop brands
    

    Running such a command will create the file structure necessary for the plugin in the Shop-Script 5 folder, which is similar to the structure of the application itself: img, js, lib, templates. The plugin architecture almost completely repeats the application architecture, all the same MVC and the same approaches.



    Plugins “cling” to the main functionality and get stuck in Shop-Script 5 using events and hooks. For example:

    1. We find a suitable hook in the documentation . Let's say you need to display something in the navigation block on the storefront - the frontend_nav hook is responsible for this .

    2. In the application config lib / config / plugin.php, we declare a method that listens for the event associated with this hook:

    'handlers' => array(
        'frontend_nav' => 'frontendNav',
    ),
    

    3. We write the code and output the HTML directly in PHP (if the HTML is simple):

    getSettings('feature_id');
            $feature_model = new shopFeatureModel();
            $feature = $feature_model->getById($feature_id);
            if (!$feature) {
                return;
            }
            $values = $feature_model->getFeatureValues($feature);
            if (waRequest::param('type_id') && is_array(waRequest::param('type_id'))) {
                $types = waRequest::param('type_id');
            } else {
                $types = array();
            }
            $existed = $this->getByTypes($feature['id'], $types);
            $html = '';
            return $html;
        }
    

    Or we transfer data to the template, we determine the formatting in the template:

    $this->view->assign('features', $values);
    

    And then we display in it in the {foreach $features as $key => $val} … {/foreach}

    Look at the detailed tutorial for developing the “Brands” plugin in the documentation .

    Applications: extend functionality even further


    If the functionality of the plugins is not enough and you need to write your own Shop-Script 5 to do something larger, you can create a separate Webasyst application that appears in the main navigation menu and works independently of Shop-Script 5.



    Like the plug-in, create your own application You can also dummy from the console:

    php wa.php createApp mysupercoolapp -name "Мое приложение" -version 0.0.1
    

    Depending on the specifics of your customers' requests, you can create applications with any logic of work: procurement, project management, traffic jams, routes, and a farm.

    Look at the detailed guestbook development tutorial or ready-made applications for an example.

    API


    Shop-Script 5 provides 44 API methods for reading and writing data from the outside.

    Authorization is based on the OAuth 2.0 protocol. Data exchange formats: JSON and XML.

    Depending on the method, the call is made through GET or POST. For example, the method of reading product data: http://demo1-ru.webasyst.com/api.php/ shop.product.getInfo? Id = 65

    Deployments and Statistics


    Largest implementation: Enter Messenger . Shop-Script 5 is used in the "Enter Messenger" infrastructure as a CMS .

    At the moment, more than 3,500 licensed installations of Shop-Script 5 are already registered (free and trial installations do not count). Despite the fact that the total number of online stores operating on the basis of old versions of the product is still significantly higher than the number of Shop-Script 5 users ( according to Ruward today it is 18600 sites), the dynamics of the transition to the new version is growing. More than 700 developers have already

    accessed the private Shop-Script 5 repository on GitHub .

    Market


    Webasyst store is a market in which any developer can publish their decisions based on the Webasyst framework. Our commission for presenting the product on the Webasyst website and in the “Installer” (client application for installing new applications), installing and delivering updates to users is only 20%.

    Currently, our development partners have published 11 applications, more than 150 plugins and 40 design themes in the Webasyst store.

    The total sales of developers have already exceeded 12 million (!) Rubles, and this is only the first nine months of the market. Plug-ins and themes of Shop-Script 5 design are most popular: plug-in developers have earned more than 6 million rubles, theme designers have earned more than 5 million rubles, and application developers are about half a million rubles (although the growth potential of the applications is certainly the largest).

    We invite developers and designers to create products that Shop-Script 5 owners and Webasyst users will be happy to buy:www.webasyst.ru/developers/store

    Licensing


    Shop-Script 5 is a paid CMS. To open a working online store you need to purchase a license worth 9,999 rubles or use a web service worth 798 rubles per month (599 rubles for Shop-Script 5 without access to the source code + 199 rubles for hosting: 2 GB, SSL, domain, etc. .d.).

    For developers, a license is provided free of charge.

    When developing Shop-Script 5, we considered various monetization options, including the option of a complete transition to the open source distribution model, but as a result, we realized this option not in the final solution for online stores (not in Shop-Script 5 itself), but in its basis and the general platform on which it works - Webasyst framework- and satellite applications, which currently supplement the functionality of Shop-Script 5 (although these applications themselves are also full-fledged solutions for their tasks, the attitude to them and their positioning are still built around online stores - I say the first queue about the applications “ Site ”, “ Blog ” and “ Photo ”).

    about the project




    The Shop-Script project turned 12 this year. The first version of Shop-Script 1.0 was released back in 2002, and today's generation is already the fifth in a row. Who cares, read the history of the project .

    Yes, we know that outdated versions of Shop-Script products are not very popular among developers, designers and users. Indeed, there is a reason. Therefore, Shop-Script 5 and the Webasyst framework were developed from scratch and inherited only the name and experience from older versions.

    A bit about development plans


    It will be boring to talk about specific features that will appear in the next updates to Shop-Script 5, and it’s better to talk about the general direction of the platform’s development - these are tools that will help end users manage not business content but business development , better evaluate company performance and analyze how boost sales.

    For example, in the next versions in the basic version of Shop-Script 5, we will implement support for evaluating the liquidity of goods: instead of the list of best-selling goods, it will be possible to work with a more significant (in terms of profit) list of the most liquid and profitable goods: including sales during recent time, and the purchase value, and the cost of storage - all this in the basic version of the CMS without any additional analytical applications. This will allow store owners to better know the structure of their sales: to monitor not only which product is better bought, but also what is more likely to make a profit.

    In addition, there are applications for CRM, customer support, organization of affairs, teamwork, etc. Gradually, the functionality of the CMS will replenish with the functionality of the intranet. Webasyst has everything for combining these two areas in a single interface.

    Thanks for attention!

    We invite developers


    We invite developers to work together on new applications: register in the developer program and create your own useful tools. We are happy to advertise interesting projects on the main page of the Webasyst store (market) and in our blog. Shop-Script 5 already has a large audience, which is happy to buy quality and useful solutions!

    Also popular now: