We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 245585a commit 6715263Copy full SHA for 6715263
src/functions/shiptheory/DataStore.js
@@ -123,11 +123,11 @@ class DataStore extends DataStoreBase {
123
// TODO: account for possible multiple shippings in a single transaction
124
// grab data from each shipment and create a list of shipments to be sent to Shiptheory
125
// for now it is simply assuming all items in embedded are part of the shipment
126
- const products = items.map(p => ({
+ const products = items.map((p,i) => ({
127
height: p.height,
128
name: p.name,
129
qty: p.quantity,
130
- sku: p.code,
+ sku: p.code || `${transaction.id}-${i}`,
131
value: p.price,
132
weight: p.weight,
133
width: p.width
0 commit comments