I am using Angular and the ng-cart plugin for the shopping cart; the problem is that everything works fine but I require that the items be put in a textarea to save in the bd.
The json that you send is:
{
"shipping":null,
"tax":0,
"taxRate":null,
"subTotal":1318.52,
"totalCost":1318.52,
"items":[
{
"id":"4",
"name":"Clasico Panini",
"price":80,
"quantity":13,
"data":"2",
"total":1040
},
{
"id":"2",
"name":"Mixiote",
"price":69.63,
"quantity":4,
"data":"2",
"total":278.52
}
]
}
I currently have a for loop that prints me the console without problems.
But when I want to print it in the textarea, it seems that nothing else puts the last item nothing else.
I already try several methods but I get the same result, and if I directly send the ngCart.getItems();
in the textarea I get [object][object]
.
the url of the plugin as reference is: ngcart.snapjay.com/docs