📜 ⬆️ ⬇️

Shop-Script 5

We have released Shop-Script 5 - a new version of the script for creating online stores. From previous versions, Shop-Script 5 took only the name and extensive experience and was developed entirely from scratch based on the Webasyst framework .


Demo version: shop window , backend .
Fully try the product for free as a web service (a hosting account will be created with a pre-installed Shop-Script 5 and framework).

Under the cut: a brief overview of the product for developers and access to the private repository of Shop-Script 5 on GitHub.
')

What is Shop-Script?


For those who are not familiar with previous versions of the product: Shop-Script 5 allows you to create an online store with all the key functions of the store: showcase, basket and order processing, product management, orders, customers, viewing reports, import and export data. Immediately "out of the box", many useful application functions are also supported, such as automated invoice printing, forms for sending parcels by Russian Post, recommendations for goods based on the principle “other customers have also ordered”, photo stickers for highlighting goods, etc. All functions can be found on the product site .

Shop-Script 5 Architecture


Shop-Script 5 is built on the MVC paradigm, developed in PHP / MySQL / jQuery based on the Webasyst framework (free framework: LGPL).



Like any framework application, Shop-Script 5 is located in a separate folder in wa-apps /. Each individual action is implemented in its action.

To judge the code, it is better to look at it yourself. On GitHub there is a Shop-Script 5 repository, to which we open access to developers on request (private repository). You can send an application here: http://www.shop-script.ru/developers/ . If you do not want through GitHub, then you can see other free applications based on the framework, for example, " Blog " or " Photo ".

DB structure


Shop-Script 5 runs on MySQL. In the database of the current version of the script table 54 (clickable):


Design Themes


One of the key tasks in creating Shop-Script 5 was to allow the designer of showcase themes to create themes almost arbitrarily: so that there are no limiting factors for this, such that the design theme needs to be adapted to the overall layout, which should be suitable for another ten other applications (forum, blog, helpdesk, etc.).

The design theme is edited with the maximum degree of freedom. You can create a theme for a large store with different product filters, and for a single product store. In fact, only the design theme determines the functionality of the storefront.

Smarty template engine is used. Each window design template can be edited and customized. User-modified design theme files are copied to a separate folder outside the Shop-Script application, which allows you to install all the updates to Shop-Script and the original theme without affecting user changes. Fragment of product output template product.html:

<!-- product reviews --> <div class="reviews"> <h3>{sprintf('[`%s reviews`]', $product.name|escape)}</h3> <ul class="menu-v with-icons"> {foreach $reviews as $review} <li data-id={$review.id} data-parent-id="0"> {include file="review.html" reply_allowed=false inline} </li> {/foreach} </ul> {if !$reviews} <p>{sprintf('[`Be the first to <a href="%s">write a review</a> of this product!`]', 'reviews/')}</p> {else} {sprintf('[`Read <a href="%s">all %d reviews</a> on %s`]', 'reviews/', $reviews_total_count, $product.name|escape)} {/if} </div> 

There are internal helpers for retrieving data from other framework applications and embedding them in store design templates or on pages with product descriptions. For example, all photos with a specific tag from the Photos application:

  «»,    : {$photos = $wa->photos->photos("/tag/", "970")} {foreach $photos as $photo} <p> <img src='{$photo.thumb_970.url}' alt='{$photo.description}'> </p> {/foreach} 

The default design theme is called “Default” and fully justifies its name. Her task is not to make her look attractive, but to let her create her own theme based on it. The clean layout and layout of the store content according to the standards of microformats Schema.org immediately “out of the box” adapt the store content for indexing by search robots.

Plugins


The capabilities of the store are expanded with the help of plug-ins that are installed via the web interface using the framework’s basic tools.

The plugin is a “mini-application” and has a file structure similar to the file structure of the Shop-Script 5 itself (below is an example of a product export plug-in to Yandex.Market):


The plugin connects to the store's functionality using hooks (events). Writing a plug-in for Shop-Script 5 is no different from writing a plug-in for any other application based on the Webasyst framework ( general documentation ; a plug-in for developing a plug-in for Shop-Script 5 will be published soon).

You can develop your own plug-in using the example of those plug-ins that have already been published for Shop-Script 5: selected products, filtering products by brand, export to Yandex.Market, etc.

Shop-Script 5 repository on GitHub


To start developing for Shop-Script 5, you do not need to buy it. For developers and designers, we open access to the Shop-Script 5 repository on GitHub . For this you need to make an application (private repository).

Add-ons Shop


We invite developers and designers to cooperate! Shop-Script users express many wishes regarding new features that can be implemented in the form of plug-ins and add-ons. For a long open list of suggestions, look at webasyst.reformal.ru or in the multiple comments on the framework blog .

Design themes, plug-ins, payment and delivery modules for Shop-Script 5 are now especially necessary for users. Soon we will open an add-ons store for the framework, through which users will be able to install products developed by you using the framework’s basic tools - through a web interface and in one click. As iOS App Store and Google Play, only for the web. You will be able to determine the cost of your products when you publish, make them free or paid.

I will be glad to answer your questions in the comments. Thanks for attention.

Source: https://habr.com/ru/post/172609/


All Articles