Despite the fact that the plugin is compatible with the old version of PHP 7.4, we recommend using it on systems with PHP 8.0 for faster and more stable work.
Using the application you can create and customize various menus for the frontend of your website.
You can set the structure of the new menu using a simple visual editor. Automatic generation of links to individual sections of the site (for example, store categories) is available using installed plugins.
After creating the structure, you can test it in the "Information" section.
Installing a menu on the site
Installing a Menu on a Website If your design theme does not support the default application, then you will need basic knowledge of HTML layout to modify the templates.
Using the following code you can get an array of elements of a specific menu. Note that $menu_id — this is the ID of a specific menu
, $user_id - this is the user ID.{$user_id = $wa->user("id")}
{$items = $wa->menu->get($menu_id,$user_id)}
или
{$items = $wa->menu->get($menu_id,$wa->user("id"))}
The next step is to create the HTML structure of your menu. The easiest way to do this is to use the function wa_print_tree, which will output a nested structure of UL lists:
{wa_print_tree tree=$items elem='<a href=":url">:name</a>'}
A slightly more advanced way is to use Smarty loops, for example foreach.
<nav class="menu">
{* cycle by elements of the top level *}
{foreach $items as $item}
<div class="menu-item">
{* rendering links *}
<a href="{$item.url}">{$item.name}</a>
{* an element may have nested elements *}
{if !empty($item.childs)}
<div class="menu-item-childs">
{* cycle by elements of the second level *}
{foreach $item.childs as $child}
<div class="menu-item-child">
{* rendering links *}
<a href="{$item.url}">{$item.name}</a>
{* further there may be more nested elements: {$child.childs} etc.*}
</div>
{/foreach}
</div>
{/if}
</div>
{/foreach}
</nav>
Caching
The application uses a cache to reduce the load on the server. You can change the cache lifetime on the settings page.
The default is file cache. But by following this guide you can change the cache settings of your Webasyst:
https://developers.webasyst.ru/features/cache/
Filter orders by params and export to xlsx/csv.
7 days free