Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $(document).on('click','.ddelivery_popup .close_btn',function(e){
- console.log('sendForm');
- DDeliveryModule.sendForm({
- success:function(){
- console.log('sendFormSuccess');
- $.ajax({
- url: '/udata://emarket/apply_order.json',
- type: 'POST',
- dataType: 'json'
- })
- .done(function(data) {
- console.log("success");
- console.log(data);
- $('.order_number').html(data.number);
- $('.order_cost').html(data.summary.price.original);
- $('.order_delivery_cost').html(data.summary.price.delivery);
- $('.order_total_cost').html(data.summary.price.actual);
- ddeliveryPopup.close();
- $('.success_popup').bPopup({
- closeClass: 'close',
- transition: 'slideDown',
- follow: [false, false]
- });
- yaCounter37369280.reachGoal('buy');
- })
- .fail(function() {
- console.log("error");
- })
- .always(function() {
- console.log("complete");
- });
- },
- error:function(error){
- console.log('sendFormError');
- $('.ddelivery_errors').html(error).show();
- }
- });
- });
Add Comment
Please, Sign In to add comment