Access store products data from Javascript asset file

Shopify Partner
1 0 0

Let's say I want to replace the Home Page with a 3D experience using a JavaScript library (

I call the javascript file that contains the experience, from the home page .liquid file. I call it from a script tag with type="module".

How could I from the javascript file access the products active for sale data?
I would just need to print on the console a URL path to its main image, the price, and the name of 10 products, I don't really mind about the order of them. 


Thanks for your help and sorry if this is a beginner question.

Replies 0 (0)