V
V
Vlad2018-03-11 17:50:13
opencart
Vlad, 2018-03-11 17:50:13

How to display checkout from the side of the page like in the Fastfood template?

Good afternoon, please tell me how to display the checkout as in this example fastfood2.oc-dev.ru

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Anton Danilkin, 2018-03-11
@danilkin

The button has a form handler that sends a request to the third-party "quick_order" module. The handler function is below:

function add_quick_order() {
  $.ajax({
    url: 'index.php?route=module/quick_order/add_order',
    type: 'post',
    data: $('.quick_order input, .quick_order textarea').serialize(),
    dataType: 'json',
    success: function(json) {				
      if (json['success']) {
        $('.quick_order').removeClass('show');
        $('#cart').load('index.php?route=common/cart/info #cart > *');
        $('.cart_content').load('index.php?route=common/cart/info .cart_content > *', function() {
          $('.cart_content .empty').css('display', 'none').delay(5000).fadeIn();
          $('.quick_order').after($('<div class="quick_order_success">'+json['success']+'</div>').fadeIn().delay(4000).fadeOut());
        });
      }
      if (json['error']) {
        $('.quick_order_button').before($('<div class="quick_order_warning">'+json['error']+'</div>').fadeIn().delay(3000).fadeOut());
      }
    }
  });
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question