0👍
As I assumed trouble was in line_items. I pushed in data uncorrectly. Then I checked the documentation. Add line price data and product_data in forEach item. And that’s it. Thank u for ur attention. Also, big thanks to user: karllekko
all.forEach(item => {
const data = {
price_data: {
product_data:{
}
}
};
data.price_data.unit_amount = parseFloat(item.data().price * 100);
data.price_data.currency = "aud";
data.price_data.product_data.name = item.data().name;
myProducts.forEach(q => {
if(item.id == q[0]){
data.quantity = q[1];
}
});
results.push(data)
});
- [Vuejs]-Importing a Vue component fails with error "the requested module does not provide an export named 'default'
- [Vuejs]-How can I correctly output a card with v-for?
Source:stackexchange.com