Collaborative filtering recommendation?

I am using wix store.
With a product page, that has a recommending related products.
now I do not want it to be manualy filled or randomly filled.

I am looking on how to fill the related items to be shown as an alghorithem of collaborative filtering recommendation, which it for example:
I user A buys product x and y.
after this, if user B comes and buy product x, i’d like to show item y in his related items bar like (you may also like : Product y).

So i am thinking about everytime a customer purchases item, his user id and product id would be imported to a database lets call it : BoughtItmes.

So when another customer click on item and get to the product page , a query runs and searches in the database for customers who already bought this item, and check what else they did buy and show this products in the recommenders bar.

is this possible? is there a way to do that thing that everytime a product is bought i can import his id and the products id to a data base? and use a query like this??

or even if there’s a easier way , i’d be glad to hear it.

Regards

Anyone?

  1. Set up a database to store customer purchase data: You can use a database service like MySQL or MongoDB to store information about customer purchases, including the customer’s user ID and the product ID.

  2. Set up a way to import customer purchase data into the database: You can use the Wix API or a custom code snippet to import customer purchase data into the database every time a product is purchased.

  3. Set up a recommendation system: You can use a recommendation engine or build your own using machine learning libraries and frameworks such as TensorFlow or scikit-learn. This system can use the data in the database to make recommendations based on what other customers with similar interests have bought.

  4. Display the recommendations on the product page: You can use a code snippet or widget to display the recommendations on the product page. You can also use the Wix API to fetch the recommendations from the recommendation system and display them on the page.

Any updates on this post?