I have a Javascript that a 3rd party company gave us so that they can track when sales are coming in for them from one of our clients website. They ask me to put the code in the shopping cart on the confirmation page. I did that. However, I don't know how to popluate the attributes. Here's a sample of the attributes part of the code.
// This is where you put information about which items were purchased
items: [
{
name: "",
sku: "",
quantity: "",
price: ""
},
{
name: "",
sku: "",
quantity: "",
price: ""
}
]
}
The instructions say the most important attribute for you will be the 'items' attribute, which is populated from the list of products that were sold to your customer. It is an array of hashes, where each hash can have a 'name', 'sku', 'quantity' and 'price' attribute. This can be easily
generated using any standard JSON encoder.
Does anyone know how to help me with this? It's not working correctly. I don't know what a JSON encoder is or how it works. I need to get this resolved ASAP. Thanks so much!