fixed conflix payment page
This commit is contained in:
@@ -684,6 +684,8 @@ $(function() {
|
||||
$('.add_to_order').attr('data-attributes',JSON.stringify(attribute_arr));
|
||||
$('.add_to_order').attr('data-options',JSON.stringify(option_arr));
|
||||
var item_data = $(this);
|
||||
item = get_item(item_data);
|
||||
customer_display_view(item,"add");
|
||||
show_item_detail(item_data);
|
||||
calculate_sub_total();
|
||||
|
||||
@@ -692,6 +694,8 @@ $(function() {
|
||||
// click plus icon for add
|
||||
$(document).on('click', '.add_icon', function(event){
|
||||
var item_data = $(this);
|
||||
item = get_item(item_data);
|
||||
customer_display_view(item,"add");
|
||||
show_item_detail(item_data);
|
||||
calculate_sub_total();
|
||||
}); //End Add Icon Click
|
||||
@@ -795,7 +799,8 @@ $(function() {
|
||||
url: ajax_url,
|
||||
data: params,
|
||||
dataType: "json",
|
||||
success:function(result){
|
||||
success:function(result){
|
||||
customer_display_view(null,"reload");
|
||||
if (type == "quick_service") {
|
||||
window.location.href = "/origami/quick_service"
|
||||
}else{
|
||||
@@ -824,9 +829,7 @@ $(function() {
|
||||
type = "quick_service"
|
||||
modify_order = window.location.href.indexOf("modify_order");
|
||||
$("#oqs_loading_wrapper").show();
|
||||
console.log(modify_order)
|
||||
if (modify_order !=-1) {
|
||||
console.log($('#sale_id').text())
|
||||
var ajax_url = '../../../quick_service/update_modify_order';
|
||||
var table_type = $('#table_type').text();
|
||||
var table_id = $('#table_id').text();
|
||||
@@ -861,7 +864,6 @@ $(function() {
|
||||
data: params,
|
||||
dataType: "json",
|
||||
success:function(result){
|
||||
console.log(result)
|
||||
if (result.status) {
|
||||
if (result.data == null){
|
||||
window.location.href = '/origami/quick_service/pending_order/' + $('#sale_id').text();
|
||||
@@ -1152,6 +1154,35 @@ $(function() {
|
||||
});
|
||||
//end Ajax
|
||||
}
|
||||
|
||||
/* Get Item rows */
|
||||
function get_item(data){
|
||||
var sale_items = [];
|
||||
|
||||
var sale_item = {};
|
||||
sale_item.qty = parseInt(data.attr('data-qty'))
|
||||
sale_item.name = data.attr('data-name');
|
||||
sale_item.price = data.attr('data-price');
|
||||
sale_item.item_code = data.attr('data-item-code')
|
||||
sale_item.instance_code = data.attr('data-instance-code')
|
||||
sale_item.attributes = data.attr('data-attributes')
|
||||
sale_item.options = data.attr('data-options')
|
||||
sale_item.instance = data.attr('data-instance')
|
||||
sale_items.push(sale_item);
|
||||
|
||||
return sale_items;
|
||||
}
|
||||
|
||||
function customer_display_view(data,status) {
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: '../../origami/customer_view',
|
||||
data: {"data":data,"status":status},
|
||||
dataType: "json",
|
||||
success:function(result){
|
||||
}
|
||||
});
|
||||
}
|
||||
/* $("input").keypress(function(){
|
||||
$("span").text(i += 1);
|
||||
});*/
|
||||
|
||||
Reference in New Issue
Block a user