snapjay / ngCart

Really simple shopping cart for AngularJS
http://ngcart.snapjay.com
380 stars 236 forks source link

checkout error #67

Open pwipo opened 8 years ago

pwipo commented 8 years ago

when clicked on ngcart-checkout got error - no success function in fulfilmentProvider.checkout(). angular promise not have success and error funcs to solve problem need change code in line 431:

                fulfilmentProvider.checkout()
                    .then(function (data, status, headers, config) {
                            $rootScope.$broadcast('ngCart:checkout_succeeded', data);
                        },
                        function (data, status, headers, config) {
                            $rootScope.$broadcast('ngCart:checkout_failed', {
                                statusCode: status,
                                error: data
                            });
                        }
                    );
lianee commented 8 years ago

line 431 of which file please?

lianee commented 8 years ago

ok, I guess you were talking about the /dist/ngCart.js file.

That's not very useful, since this file (and the .min file too, the one you should use) is built from files in the src directory. I'm sure it would be better to refer to the /src/ngCart.directives.js file.

wizyoua commented 7 years ago

I'm at this stage of using ng-cart. Let me test if this change accepts the order successfully. I got an error after populating the data="" attribute with an array of objects.

wizyoua commented 7 years ago

Yes the change @pwipo suggested works. If you are getting that .success is not a function change your ngCart.js line 431 to the code above. I am going to continue with the cart to see if I can successfully do an http post.