How can I access product variables on the Product Details page?

How-To: How can I access product variables on the Product Details page?

For third party data extraction, the following code shows how to access product SKU, Name and Price values.

<script type="text/javascript">
    var productSKU = document.getElementById('productSKU').value;
    var productName =document.getElementById('productName').value;
    var price = document.getElementById('rawPrice').value;
</script>

Please note, that in order to use these variables, all such scripts should be placed under the Product Details page section on the Product Details Page.

 

Have more questions? Submit a request

0 Comments

Article is closed for comments.