What PHPShop Monitor is made of

    In this article, we will describe how we created a utility that combines the capabilities of an order controller, statistical reports on website traffic and information on the current status of a shopping cart. The utility will be interesting to managers-managers of IM who want to get more information about what is happening with customers on their sites.

    Already working PHPShop modules were taken as a basis:

    1. Order Agent API of the Order Agent , which allows you to manage orders in real time.
    2. The Stat module , recording every step of visitors and giving statistics on site visits, by analogy with the well-known Yandex.Metrica informers and others.
    3. VisualCart module . This module allows you to keep the customer’s basket not in the browser session, but in the store’s database. At any time, the recycle bin will be restored from the database if the user has closed the browser. He carefully stores the information that is now added to users in the baskets and allows you to operate on this information.

    So, we have potatoes and onions. What do we fry them on? At the moment, we are actively using Delphi to implement graphical utilities. Previously, we used the Gentee language extensively.

    The trick is that we wrote our own query format for remote database management, based on the XML-RPC format and our own PHPShopOrm library. This library receives / gives XML in a certain way, with the commands embedded in it, and passes it all through ORM, receiving an understandable SQL query at the output, observing all the subtleties and rights to manage data.

    In other words, to ensure security, dependencies are set per request. They indicate from which tables information can be taken and which commands need to be executed with the table. If selection by goods is allowed, then changing system settings and editing the order table is prohibited. So, for example, our partner module allows you to operate with the database of goods, but access to the user or order tables is closed to him. Thus, we get all the necessary information from our modules.

    So, if one of the readers was engaged in cooking, then he knows that you need to pour a little and not a little, otherwise everything will burn up, or it will cook slowly. In our case, the amount of oil is determined by the server ping / polling parameter for receiving information - it can be controlled from 1 second to N. This will allow the server to be unloaded, and at the same time to receive fresh data from it.
    Voila! A dish called "fried potatoes" is ready.

    PHPShop Monitor

    What prompted us to make “Monitor”?


    We communicate daily with our customers, and from all our users we have identified a circle of customers who do not have certain knowledge for managing the store, but who want to have a general picture of what is happening on the site. This group can conditionally be called "managerial managers." In fact, they don’t need to sit in the admin panel with a bunch of functions to edit orders - it’s convenient for them to have summary information of what is happening on the site. Therefore, we called the utility “Monitor”.

    On the other hand, there are users who are full of various programs and reports in their eyes, and their daily routine: “come here, log in, click the button, log in here, log in, see the report ...” - agree, it’s boring. As a “monitor,” we have brought together the most important reporting functions into a single program. Need to see what was ordered in the order? -You are welcome! Print an order form? - There he is! Count how many visitors are currently on the site? - You are welcome. All messages hang in the tray and always keep the user in the know.

    In addition, all reports and messages are customizable: the extra ones can be disabled, change the order form and logo.

    By the way, the idea of ​​simplifying the work of managers and couriers visited us before: according to the same plan, the Windows Order Agent , Mobile Agent , Windows Order Gaget , 1C Monitor utilities were created and are still used today . So, there were no difficulties with the implementation now - all the server polling functionality was honed using previous utilities.

    Mobile agentWindows Order AgenWindows Order Gaget1C Monitor

    Development plans


    We are not going to stop here: in the plans to enable the delivery and procurement departments to connect to this monitor. We want to give them the opportunity to place orders with accompanying documents in a couple of clicks, find the right product and immediately advise the buyer on the properties of the product. For managers, it is planned to bring into the tray the correspondence that managers conduct in the Chat , so that managers' answers to customer questions can be promptly adjusted.

    Also popular now: