I have been working on implementing a review system into my website and am stuck at this point:
I take all the product SKUs which are only accessible from the Cart page like such:
<span class="ProdSkus">SKU1</span>
<span class="ProdSkus">SKU2</span>
<span class="ProdSkus">SKU3</span>
I'm combining these into an array with this:
var combinedText = $('.ProdSkus').text();
When I log it I get this result:
SKU1SKU2SKU3
I need to format it to be as such:
["SKU1", "SKU2", ...]
Any help is appreciated!
This has to be done from the cart page, stored locally, and then used after the customer has made the purchase. I have been doing this like such:
localStorage.setItem("SKUS", combinedText);
localStorage, you need to convert it to JSON.