Pull .getProduct Data onto Product Page

I’m struggling to pass the product data into an element on my page. My Current Code is below.

Any pointers would be appreciated

I have not tried it, but what about scope? I would try to put the “let ProductSku” just underneath the $w.onReady, so its scope is broader and then attach a value to it where you now “let” it.

Thanks Giri, managed to get this working by placing it higher up in the code like you mentioned.

I’m now trying to make sure I’m pulling through all product options before I attribute them to a dropdown. I’m slightly confused by the fact they are all in one column in the DB:


{“Width”:{“optionType”:“drop_down”,“name”:“Width”,“choices”:[{“value”:“100mm”,“description”:“100mm”,“inStock”:true,“visible”:true,“mainMedia”:null,“mediaItems”:[]},{“value”:“300mm”,“description”:“300mm”,“inStock”:true,“visible”:true,“mainMedia”:null,“mediaItems”:[]}]}}


Any pointers?