I'm trying to get the SKU on a product page. The product area is kind of a black box in the editor, but exposes values in the DOM.
In normal jquery, I'd use $("[data-hook='product-page-sku']").innerHTML.split(":") to get the value, but this doesn't work. Is there a $w method I'm missing? I want to use the value to lookup a row in a wix collection so I can generate a price estimation in a custom quote tool.
Or, is there a more Wixy way to do this? Basically, my product price isn't fixed per product, but depends on the product, quantity, and other factors in a collection I've tied to the base product sku, so I'm trying to make a custom js user input module to use the sku/collection with another collection table.
I've got everything working but the code to get the SKU from the page.