Simpla - engine for great online stores
The last 5 years I have been creating online stores. Many shops. Good and different. I was myself a programmer, layout designer, designer and manager.
You cannot be a professional in several areas at once, you say. And, probably, you will be right. I am not a professional in design and hilling clients. But the interest in these areas and the need for appropriate activities have given 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 typesetters from customers gave me a good experience. And most importantly - experience is not in one area, but experience in all aspects of the process of creating an online store. From programming and design, to communication with the client and analysis of his business processes.
Ordinary story
I think many people are familiar with the situation when, after creating the site, for several months they called you with the question “how to insert a picture on the site”, first the customer, then his secretary, then the new secretary, then the sales manager (secretary on vacation). And then their new “computer technician” calls to find out which file to pick, to insert a red creeping line 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 cause.
The problem itself arises from the fact that many site management systems are made by programmers for programmers, and not for ordinary people.
Every time you can get mad at the stupidity of the customer, advise him to hire a normal content manager, do not 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 encountered. And then sit and think about how to remake your cms so that in the future, customers do not have such questions. And most importantly - do not complicate this with other functions and the internal structure of the system.
So I'm PR
As I wrote at the beginning, for 5 years now I have been creating online stores. And all these 5 years I used my own engine of the online store, constantly improving it. Recently, I completely reworked the code, structure and design of the engine. As a result, a script appeared online store Simpla .
The main advantage of Simpla is its simplicity. Simplicity from the point of view of the site visitor, administrator, layout and programmer. There are no 9999 possibilities in it. But it has everything a good online store needs.
Requirements
Since I don’t know in advance where Simpla will be installed, I tried to make it as less demanding on server parameters as possible:
- Apache server + mod_rewrite
- MySQL 4.1 and higher (possibly smaller, not tested on earlier)
- PHP4 or PHP5
- no Zend Optimizer required
- GD2 is desirable for autoresize pictures
- UPD --enable-bcmath
Installation
The script is supplied as a source.zip archive and install.php installer, which works as an installation wizard, and consists of several steps:
After installation, we have a store with test content and a minimalistic design. This template is convenient as a basis for future design - everything that can be submitted 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 a store.
Add the product to the basket:
Next, enter the information about the recipient, and click "order":
After that, the user and administrator receive letters with information about the order, and the user is invited to pay for the order in various ways:
Among the online payment methods, there are now webmoney and visa / mastercard , but some more popular ways 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 from the point of view of the administrator
The control panel looks like this:
For example, let's try to edit some product:
Please note that the pictures for the product can be downloaded directly from another site (which is relevant for 70% of customers, a-y-yay).
Naturally, pictures are automatically resized to the required size.
Also, I can not help but mention the image upload plugin in the built-in tinymce editor, which I bought in Germany (as well as the file upload plugin).
Here's what it looks like, but I advise you to feel it live:
Admin's happiness
For the most frequent actions, a function was created that I called “admin happiness” - the administrator can perform most operations with objects of the online store 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 panel management. And to fix it, just click “edit”, fix 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 design. Each theme is simply a folder that contains subfolders of css, images and html.
Although in most cases it’s enough to take the standard design and change the css.
Design can be edited directly from the control panel:
For minor edits, this is very convenient. And for some people it’s convenient for large ones.
From the point of view of the programmer
Most cms are made on the principle of "add 9999 functions, maybe some will come in handy." Of course, some functions really come in handy in different cases. But they clutter up the code and control panel. I chose a slightly different principle - if the need for a function is doubtful, I do not include it in cms. This allowed us to make the code simpler and easier to add the really necessary function for a particular site. As an example, I just give the source code of, say, a 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.
From the point of view of common sense
From the point of view of common sense, site management systems are designed to simplify work (and not complication, as it sometimes happens). And I hope that my development will help you save your time and nerves, whether you are a typesetter, programmer, manager or store owner.
I invite you to get to know Simpla better on my humble website: simplacms.ru
Online demo:
simplacms.ru/demo
simplacms.ru/demo/admin I
thank those who took their time to me and I hope that this will help you save it in further.
UPDIf the online demo is crooked or doesn’t work, it means someone up there mismanaged you. Just go into automation - backup - and restore default.zip, otherwise I don’t have time to monitor it continuously. Sorry, I just didn’t expect such an effect) And better - put yourself locally
UPD2 Thank you so much to everyone who paid attention, I am very pleased to hear that many liked it, and criticism is also nice (better than indifference, and more useful). If someone found real security holes - I beg you not to be silent. Any comments, nastiness and compliments are welcome :)