The new version of Okay CMS 3.8.0

Categories
Table of contents
  1. The ability to modify tpl files
  2. Improved work with images. WebP and SVG, changed many js libraries
  3. Created and added configuration for Nginx
  4. Made it possible to create multiple XML in modules
  5. Added pop-up cart functionality to the system by default
  6. Made various technical improvements to the system
  7. Made various improvements and fixes for site users

The ability to modify tpl files

The most important and key task that we have implemented in 3.8.0 is the ability to modify tpl files.

In addition to embedding into short blocks, OkayCMS now has the functionality of modifying tpl files without changing them. This functionality works in such a way that the original files remain unchanged, but the file gets into the compiled in a changed state, as if the original tpl file was changed.

The file is parsed into a kind of DOM tree, but a Smarty element can also be used as a node.

Currently, of Smarty elements, only foreach, function and if are supported as a node with children (foreachelse and else will be just text children). All other Smarty elements will be text nodes.

`Node` is a DOM (Document Object Model) element of the tree. A node can contain child nodes only if it is not a self-closing (`<img>`, `<br>`, `<input>` etc) and not a text node.

All registration of template changes are made in the modifications block of the module.json file of your module (the file must be located in the Init directory of the module).

The change itself must contain one of the find or like properties, which indicates which node to find.

There are several properties for making the changes themselves.

  • append | text or filename with content | adds content to the end of the specified node
  • prepend | text or filename with content | adds content to the beginning of the specified node
  • appendBefore | text or filename with content | adds content to the parent node but before the current one
  • appendAfter | text or filename with content | adds content to the parent node but after the current one
  • html | text or filename with content | replaces the contents of the selected node with the specified one
  • text | text or filename with content | synonym for html
  • replace | text or filename with content | allows you to change the text of the opening node (may be needed to add / change attributes etc)
  • remove | value is not accepted | deletes the current node with all its descendants.

The documentation at the link https://github.com/OkayCMS/Okay3/blob/master/docs/tpl_modifiers.md has a more detailed description of this functionality with examples of its use.

We believe that this solution, in contrast to the solution of the same opencard, is more revolutionary because we are not working with text and strings, but with DOM objects. We can find an element and add a child element to it, we can refer to the parent elements, the DOM element can be {foreach}, {if}, {function}. This decision should bring the work of developers on modules for our system to a new level.

Improved work with images. WebP and SVG, changed many js libraries

Introduced automatic support for webp images. Now you can activate webp support in the directory setting, and an analog of webp will be added to the usual image.

This allowed us to significantly reduce the size of the connected images on the page, speed up the loading of the site page and achieve higher PageSpeed scores. WebP is currently implemented for banner images, brands, product photos in the product list and photos in the product itself.

Made it possible to load images into svg. This is sometimes more convenient for category, brand, or logo images. Now there is such an opportunity.

Updated, removed or replaced many libraries. Most importantly, we removed the owl-carusel and use the more popular swiper instead. Besides, it allowed to reduce the number of JS files connected and speed up page loading. Of the minuses - now the product card does not have a magnifying glass when you hover over the photo, it is available only when you click on the product photo.

Some modules in older versions of the system could use JS libraries that are not in the new version. If you have additional modules installed, for example, "Video in the product gallery", etc., these modules will additionally need to be adapted for the new version. The adapted modules for the new version will soon be available via the link to download the module, which came to the mail after placing the order.

Created and added configuration for Nginx

An example of Nginx configuration for OkayCMS has been added to the OkayCMS documentation https://github.com/OkayCMS/Okay3/blob/master/docs/nginx/nginx.conf. By default, the system will work with this configuration. But there are omitted such moments as the work of the server with SSL and possibly some other individual characteristics of the server. It may be necessary to modify the configuration for a specific server, but the key rules for rewriting, hiding unnecessary things, etc., are described in the example.

Made it possible to create multiple XML in modules

Sometimes customers need several XML with different products, but in the same format. For example, the same unloading is used for uploading to Turbo Pages and YandexMarket. Our solution to this problem was the ability to create an unlimited number of uploads of one format.

Now, when entering the module, there will first be a button "Create unload". When you press it, there will be a standard functionality with settings for unloading from the module. But there will also be an additional field "Download link".

The client points there a link in Latin, for example "mebel" and this download is available at the link http://new.demookay.com/rozetka/mebel.xml. When saving, the module now shows a list of existing unloads with links to them, and below the button "Create unload"

After the update, the link for uploads will change, take this into account and do not forget to specify a new correct link where you use these uploads.

Added pop-up cart functionality to the system by default

For a long time we were annoyed by the standard "fly away" when adding an item to the cart, which looked very old. As a result, we implemented the functionality of a pop-up basket in the system.

Made various technical improvements to the system

  • We made it possible to specify another callback function when registering a shortblock, which should be called before drawing the shortblock. This may be needed if you need to transfer some data to the design to draw the shortblock. Previously, a separate extender was registered for this, now it can be done more explicitly and easier.
  • Added shortblocks to expand export functionality using third-party modules.
  • Fixed a bug with route strategies NoPrefixAndPathStrategy and PrefixAndPathStrategy. The problem was that if a subcategory with a longer url was created earlier, its parent would not open.
  • Added the ability to add your entities to banner groups along with categories of brands and products. This is necessary when, for example, a "Services" module is created and banners need to be able to determine on which page of the service which banner should be displayed.
  • For categories in the catalog and categories in the block, different names of shortblocks have been made in the admin. panels, as they previously intersected.
  • Added the ability to override routes.

Made various improvements and fixes for site users

Improved and expanded site micro-markup. Introduced micro-markup for search, which should create the ability to search the site directly on the search results page in Google

Added the ability to correctly calculate and configure delivery by New Mail to the door. Previously, it worked correctly only for Warehouse-Warehouse delivery. Now you can connect two different delivery methods at the same time and at the same time the necessary fields appear when placing an order and the correct delivery cost is calculated by Nova Poshta. Also fixed some other problems in the work of Nova Poshta

Added functionality that was earlier in the second version of the system, when when you open the admin panel, the page that is the top one in the menu opens. This allows you to set up the admin panel so that the content manager will immediately get into the products, and the salesperson will go to the orders page.

In bulk actions for products, the ability to not only move the product to another category, but also add an additional category in bulk.  

Made in the LiqPay module, when transferring to the payment page, the display of the language that was selected on the site. This will avoid the situation when a user from another country, buying from the English version of the site, gets to the LiqPay page where the payment information is indicated in Russian.

Fixed the work of the PayKeeper payment system module. Previously, there was a problem that after receiving the payment, he did not mark the order as paid in the admin. panels.

Added pagination functionality to the admin. panels in the FAQ module

Fixed transfer of data from the "Access" field in the "Technical support" section.

Added cannonical meta tag on category pages which correctly points to this page.

Fixed the name of the site, which is indicated in the OpenSearch search.

We made it so that when importing goods from 1C, if several goods have the same names, then their serial number is added to the URL of such goods. Previously, the problem was that the same URL was created for such products and it was only possible to go to the first such product.

You can download the new version by following the link archive with changes compared to 3.7.1 using the link You can also write through the "Technical support" section to order an update.

No reviews yet
Your commentary will be the first :)
Write your comment
log in
Download OkayCMS
version 4.1.1
Subscribe to the newsletter
You will receive a selection of useful articles on working with the site on OkayCMS, discounts on modules and templates