Projektbeschreibung
This section can be added to any page of the store (or any site at all). The data is obtained using AJAX technology.
The following steps must be taken to implement:
1. On the landing page, add a block to the place where products with similar designs should be displayed. Assign an identifier to this block (e.g., 'related_products')
2. On the landing page add a script that will receive on AJAX object.
$.ajax({{{}}
Url: + productId,
Type: 'GET,'
DataType: 'json',
Success: function (data) {
* render code here *
?
}
In the variable productId, you need to transfer the article of the product for which you want to get similar designs (for example, 711385 for the layout of the productId, you need to transfer the article of the product for which you want to get similar designs (for example, 711385 for the layout of the product / black and white).
3. Instead of * render code here *, you need to enter a script that will sort through all the objects in the resulting array and render them in HTML.