Closed ianstormtaylor closed 10 years ago
Could you bring an example based on the code below, please:
"id: '%s',
incrementId: '%s',
created: '%s',
grand_total: '%s',
subtotal: '%s',
shipping_description: '%s',
shipping: '%s',
discount: '%s',
tax: '%s',
"
Sure thing. Here's what those should end up looking like in Javascript:
{
id: '%s',
created: '%s',
total: '%s',
subtotal: '%s',
shippingDescription: '%s',
shipping: '%s',
discount: '%s',
tax: '%s'
}
total
is the field we use for the total amount instead "grand total", and then shippingDescription
instead of shipping_description
so that we keep everything camel case.
For these types of properties we want to use camel case everywhere, since it will be rendered in Javascript and camel case is common there.