cancel
Showing results for 
Search instead for 
Did you mean: 

Most viewed/popular products using Livesearch-4.0

Most viewed/popular products using Livesearch-4.0

Hi Team,

 

I am using magento- 2.4.4 with AEM cloud. I want to show most viewed products on my aem site using livesearch. Livesearch(4.0 ver) has rules under search merchandising section but i want to show as separate section/component on my site. i didn't find any query/ref doc for the same. Anybody can help me here?

Thanks

Heena

1 REPLY 1

Re: Most viewed/popular products using Livesearch-4.0

Hello @heenamadanc7cc ,

To display the most viewed products from Magento 2.4.4 on your AEM site using LiveSearch 4.0, you can follow these general steps:

 

  1. Retrieve Most Viewed Products from Magento: Use Magento's API or database queries to retrieve the most viewed products. Magento provides APIs to fetch product data, including most viewed products.

  2. Transform Data for LiveSearch: Once you have retrieved the most viewed products from Magento, transform the data into a format suitable for LiveSearch. This might involve formatting the data into JSON or another format that can be easily consumed by LiveSearch.

  3. Integrate with LiveSearch: Use LiveSearch's API or SDK to send the most viewed products data to LiveSearch. This typically involves making HTTP requests to LiveSearch's API endpoints with the transformed data.

  4. Create Component in AEM: In your AEM site, create a component or section where you want to display the most viewed products. This could be a custom component that fetches and displays data from LiveSearch.

  5. Fetch Data in AEM Component: In your custom AEM component, use server-side or client-side code to fetch the most viewed products data from LiveSearch. This might involve making AJAX requests to LiveSearch's API endpoints.

  6. Render Data in AEM Component: Once you have retrieved the most viewed products data in your AEM component, render it in the desired format on your AEM site. This could be a list of product thumbnails with links to the product pages.

  7. Test and Deploy: Test your AEM component to ensure that it displays the most viewed products correctly. Once you're satisfied with the functionality, deploy the changes to your production AEM environment.