📜 ⬆️ ⬇️

Simpla - the engine for great online stores



The last 5 years I have been creating online shopping. Many shops. Good and different. I was myself a programmer, coder, designer and manager.

You can not be a professional in several areas at once, you say. And, probably, you will be right. I am not a professional in customer design and hilling. But interest in these areas and the need for appropriate activities gave me something. Thousands of questions for technical support, endless consultations of clients and their content managers, studying other people's target audiences, communication with programmers, designers and layout designers from customers gave me a good experience. And most importantly, experience is not in one area, but experience in all facets of the process of creating an online store. From programming and design to communication with the client and analysis of its business processes.
')

Plain story


I think many people are familiar with the situation when, after creating a website, for several months, they call you with the question "how to insert a picture on the website" first the customer, then his secretary, then a new secretary, then a sales manager (secretary on vacation). And then their new “geek” calls to find out which file to pick to insert a red scrolling text to the right of the logo. And so on and so forth.





Of course, in a good web studio there is a technical support department, which should answer such questions. But this is a solution to the results of the problem, not its causes.
The problem itself arises from the fact that many site management systems are made by programmers for programmers, and not for ordinary people.

You can be angry with the customer's stupidity every time, advising him to hire a normal content manager, not to pick up the phone.
And you can listen to each customer, come to him and observe the work of the content manager in your cms, advising him, and record all the difficulties he faced. And then sit and think about how to remake your cms so that in the future the customers do not have such questions. And most importantly - do not complicate these other functions and the internal structure of the system.

So i'm promoting


As I wrote at the beginning, for 5 years now I have been creating online shopping. And all these 5 years, I used my own online store engine, constantly improving it. Recently, I made a complete processing of the code, structure and design of the engine. As a result, the Simpla online store script appeared.

The main advantage of Simpla is its simplicity. Simplicity in terms of site visitor, administrator, coder and programmer. There are no 9999 features in it. But it has everything that a good online store needs.

Requirements


Since I do not know in advance where Simpla will be installed, I tried to make it as demanding as possible for server parameters:

Installation


The script comes as an archive source.zip and installer install.php, which works as an installation wizard, and consists of several steps:


After installation, we have a shop with test content and minimal design. This template is convenient as a basis for future design - all that can be rendered in css, everything is commented on in full.



From the point of view of the buyer


Of course, the design of the store can be very different, but the structure of the work is approximately preserved.
To illustrate the convenience for the user, I will show the process of ordering goods in the store.

Add the item to the cart:


Then it remains to enter information about the recipient, and click "order":


After that, the user and the administrator receive letters with information about the order, and the user is offered to pay for the order in various ways:


Among the online payment methods now there are webmoney and visa / mastercard, but some more popular methods will be added soon.
The user can always see the status of his order, despite the fact that he is not registered. It is very convenient.

Shop in terms of adminstrator


The control panel looks like this:


For example, try to edit a product:


Please note that pictures for the product can be downloaded directly from another site (which is relevant for 70% of customers, ay-yay).
Naturally, the pictures are automatically brought to the required size.

Also, I can not fail to mention the image upload plugin in the tinymce built-in editor, which I bought in Germany (as well as the file upload plugin).
This is how it looks, but I advise you to touch it live:



Admin happiness


For the most frequent actions, a function is created that I called “admin happiness” - the administrator can perform most operations with online store objects directly on the site (and not in the control panel):



Most often, content errors are detected by the administrator when viewing the site, and not in the control panel. And to fix it, just click “edit”, correct the error, click save and automatically return to where we clicked “edit”.

How to change the design


The appearance of the store is set by the “themes” of the design. Each theme is just a folder that contains css, images and html subfolders.


Although in most cases it is enough to take a standard design and change the css.

Design can be edited directly from the control panel:



For minor edits, it is very convenient. And some people are comfortable for large ones.

From the point of view of the programmer


Most cms are made according to the principle “add 9999 functions, maybe some kind of useful.” Of course, some functions really come in handy in different cases. But they clutter the code and control panel. I chose a slightly different principle - if the need for the function is doubtful, I will not include it in the cms. This has made the code simpler, and makes it easier to add the really necessary function for a specific site. As an example, I just give the source code, for example, the news feed module:

<?PHP
/**
* Simpla CMS
*
* @copyright   2009 Denis Pikusov
* @link     simplacms.ru
* @author     Denis Pikusov
*
*
* news.tpl , news_item.tpl
*/

require_once('Widget.class.php');

class NewsLine extends Widget
{
  /**
   *
   */
  function NewsLine(&$parent)
  {
    Widget::Widget($parent);
  }
  
  /**
   *
   */
  function fetch()
  {
    // ?
    $news_url = $this->url_filtered_param('news_url');

    if (!empty($news_url))
    {
      // url ,
      return $this->fetch_item($news_url);
    }
    else
    {
      // ,
      return $this->fetch_list();
    }
  }

  /**
   *
   */  
  function fetch_list()
  {
    //
    $this->db->query('SELECT *, DATE_FORMAT(date, \'%d.%m.%Y\') as date FROM news WHERE enabled=1 ORDER BY date DESC');
    $news = $this->db->results();

    //
    $this->smarty->assign('news', $news);
    $this->body = $this->smarty->fetch('news.tpl');
    
    return $this->body;
  }

  /**
   *
   */  
  function fetch_item($url)
  {
    //
    $query = sql_placeholder('SELECT *, DATE_FORMAT(date, \'%d.%m.%Y\') as date FROM news WHERE url = ? AND enabled=1 LIMIT 1', $url);
    $this->db->query($query);

    // - 404
    if ($this->db->num_rows() == 0)
    {
      return false;
    }
    $item = $this->db->result();

    //
    $this->title = $item->meta_title;
    $this->keywords = $item->meta_keywords;
    $this->description = $item->meta_description;

    //
    $this->smarty->assign('news_item', $item);
    $this->body = $this->smarty->fetch('news_item.tpl');
    return $this->body;
  }
}


* This source code was highlighted with Source Code Highlighter.




( , ). , , , , .

Simpla : simplacms.ru

-:
simplacms.ru/demo
simplacms.ru/demo/admin

, , , .

UPD - — - . — — default.zip . , ) —

UPD2 , , , ( , ). - — . , :)

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


All Articles