0

My Problem is when adding the item to the cart it doesnt have a remove button, just in case the user has a wrong choice the user will only remove the items in the cart. Here is my JSFIDDLE Click Here

This is my Add Function on the script

        function addProduct(name,price){
            function add(){
                for(var i=0; i<data.total; i++){
                    var row = data.rows[i];
                    if (row.name == name){
                        row.quantity += 1;
                        return;
                    }
                }
                data.total += 1;
                data.rows.push({
                    name:name,
                    quantity:1,
                    price:price
                });
            }
2
Contributors
1
Reply
30
Views
3 Years
Discussion Span
Last Post by maltesersssss
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.