I am using simplecart 3.0 and am attempting to add additional form data to the simpleCart object before checkout to include in my post event. I am creating an object (allData) by serializing the form data on submission and have validated the data is in the object before I call the following:
// get allData object and append each kv pair to cart before checkout executes
simpleCart.bind( 'beforeCheckout' , function( data ){
$.each(allData, function(key, value) {
data.key = value;
});
});
However none of the data is getting passed to the post object. I also tried the simpleCart.extend method to extend the cart with allData and that did not work either. Any suggestions would be great. Thanks.
I am using simplecart 3.0 and am attempting to add additional form data to the simpleCart object before checkout to include in my post event. I am creating an object (allData) by serializing the form data on submission and have validated the data is in the object before I call the following:
However none of the data is getting passed to the post object. I also tried the simpleCart.extend method to extend the cart with allData and that did not work either. Any suggestions would be great. Thanks.