Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function() {
- var products = {{dlv - purchase.products}};
- return products.map(function(prod) {
- return {
- 'item_name': prod.name,
- 'item_id': prod.id,
- 'price': prod.price,
- 'item_brand': prod.brand,
- 'item_category': prod.category.split('/')[0],
- 'item_category2': prod.category.split('/')[1],
- 'item_category3': prod.category.split('/')[2],
- 'item_category4': prod.category.split('/')[3],
- 'item_category5': prod.category.split('/')[4],
- 'item_variant': prod.variant,
- 'item_coupon': prod.coupon,
- 'quantity': prod.quantity
- }
- });
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement