Showing similar products through AJAX

Rabotodatel
Employer

[no-member:pro]Rabotodatel[/no-member:pro]Rabotodatel

1 projects
Closed
Project parameters
Type of cooperationPeriodic employment
Prepaymentwithout prepayment
Payment methodsElectronic money
Acceptance of requestsclosed
Project description
I need advice on where to put it on the site.
Text hidden

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: Text hidden + 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.
Project author: Rabotodatel