JBZoo Related items (auto) is an element that displays similar products on the website. Your visitors will see not only the main product which they are interested in, but also some parametrically similar products. This element can automatically select similar items so that an administrator doesn’t have to manually pick related items for every product.
You can see an example on our demo website. Just open any product from the “Catalog” section.
Find an item type where you want to add an element. Hover it with a mouse and click the “Edit Elements” link.
On the next page you’ll see the “Element Library”. Find “JBZoo Related items (auto)” and click on it.
New element will appear on the left with such settings:
Click on the pencil icon in the right side of an element title. You’ll see following settings:
Additional conditions option helps you to limit related items by a custom criterion. And real values of fields will be overridden by those that are specified in this option.
For example, we have a clothing shop. We want to display special offers of our shop under every product. So we set following condition in the “Additional conditions”:
_itemtag = Sale
Now, if we open some product, all similar products that have a “Sale” tag will be selected. And it doesn’t matter what tags the main product has, because if Element ID matches additional conditions, its value is replaced with the latter.
So, it’s possible to additionally tweak the result of the search.
Go to the “Edit elements” of your item type and click on the pencil icon. Custom fields have a unique ID, so you can’t make additional condition for it. But core elements (Edit Core Elements) can match.
For example, you can create a condition _itemcategory = category name, where “_itemcategory” is a key, and “category name” is a value. Or Element ID = blue. Then similar items will be selected not by ID but by “blue” value.
Not all fields can be used in the search. They are listed in the “Choose fields” option. For example, a list of core fields is very limited because there is not much sense to search by the creation date. At least, seconds will be different.
Apart from simple values like a number or a word, you can specify multiple values as an array in JSON format. For example, to specify several tags at once, use following:
_itemtag = ["News", "Update", "Download"]
Carefully use double quotes, commas and brackets!
The search will use these values instead of item tags, like it were a repeatable text field.
Notice. Unfortunately, at this moment there is no possibility to specify a range of values or complex data like “sku+stock amount” in the JBPrice Advance element. However, these features and some others are in our to-do list for future versions.
Relevance is an evaluation of the extent of items matching by their fields. In this case it is a numerical value that can be used to determine how much one item is similar to another.
So how is it calculated? For example, in the Choose fields option for the product of one type we set the following: Tags (core field), Text and Date (repeatable fields). In the settings we will specify that search should check an item type, limit of items will be 2, relevance limit will be 6.
Products in the picture are compared in such way that the search is made separately for each field. Next to them, for illustration purposes, we wrote down every match - it is one point of relevance. By adding these points we receive a relevance for each product.
After that those products with a relevance of 6 and above will be displayed on the website while others will not. Those with more matched fields will be displayed on the first place.
There is no difference between custom fields and core fields for relevance.
JBRelatedItems (auto) is designed in such way that all database selections are made within one SQL query. Almost all math and relevance calculation is made by MySQL database.
Thus, an optimization of the element’s performance is achieved.
But despite the efforts of developers to accelerate the element, a lot of factors that affect its performance should be considered.
This element has its own caching algorithm which is enabled together with Joomla cache (in general settings). So it is recommended to enable it for large websites. This way you can exclude complex database queries.
There are no universal solution to improve the performance of the element because all websites are different and require an individual approach. So we suggest you to carefully choose its settings.
Visit our special JBZoo tech support forum which is specifically meant for JBZoo so the priority of the response and its promptness are much better there than in any other place. With inactive account with a “Plus” sign in a tariff plan you can ask for support in one of these sections or use any of our contacts.