<% if @order_complete.eql?(true) %>
  $("#ps_cart_items").html("<%= escape_javascript(render('/cart/partials/cart_products')) %>");
  $('#ps_cart_size').html("(<%= @cart.blank? ? 0 : @cart.cart_products.size %>)");
  $("#main_container").html("<%= escape_javascript(render(partial: '/checkout/partials/order_confirmation')) %>");
<% elsif @order_complete.eql?(false) %>
  $("#ps_cart_items").html("<%= escape_javascript(render('/cart/partials/cart_products')) %>");
  $('#ps_cart_size').html("(<%= @cart.blank? ? 0 : @cart.cart_products.size %>)");
  $("#main_container").html("<%= escape_javascript(render(partial: '/checkout/partials/order_error')) %>");
<% else %>
  $('#error').html("<%= escape_javascript(raw @message[1]) %>");
  $('#checkout_tabs a[href="#<%= @message[0] %>"]').tab('show');
  grecaptcha.reset();
<% end %>
