- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-03-2024
11:26 PM
03-03-2024
11:26 PM
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
Labels:
1 REPLY 1
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-08-2024
05:25 AM
05-08-2024
05:25 AM
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:
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.