Plugin Directory

Changeset 2189376


Ignore:
Timestamp:
11/11/2019 12:47:46 AM (6 years ago)
Author:
Narnoo
Message:

Version 1.6

Location:
narnoo-commerce-manager/trunk
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • narnoo-commerce-manager/trunk/assets/js/ncm_front.js

    r2176621 r2189376  
    771771});
    772772
     773/*jQuery(document).ready(function() {
     774
     775    var pc = jQuery('.ncm_pickup_location option:selected').attr("data-pick-price");
     776    console.log(pc);
     777
     778    //var pc = jQuery('.ncm_pickup_location option:selected').trigger("change");
     779    //console.log(pc);
     780
     781});*/
    773782
    774783
     
    781790
    782791    var booking_date = jQuery(this).attr("data-ncm_booking_date");
     792   
     793    var data_ncm_pick_loc_price = jQuery(this).attr("data-ncm_pick_loc_price");
     794    //console.log('Yes'+data_ncm_pick_loc_price);
     795    //console.log(jQuery("select.ncm_pickup_location").length > 0);
    783796
    784797    ncm_add_to_cart( post_id, booking_date, '', '', pickup, '', '' );
    785798
    786799    var PickPrice = jQuery(this).find("option:selected").data("pick-price");
    787     console.log(PickPrice);   
    788 
    789     if (PickPrice == 'undefined') {
     800    //console.log(PickPrice);   
     801
     802    /*if (PickPrice == 'undefined') {
    790803        PickPrice = 0;
    791804    }else{
    792805        PickPrice = PickPrice;
    793     }
     806    }*/
    794807
    795808    var PickLocationPrice = jQuery('option:selected', this).attr('data-pick-price');
    796809    //console.log(PickLocationPrice);
    797 
    798     jQuery(".ncm_pickup_location").attr("data-ncm_pick_loc_price", PickPrice);
     810    var selectid = jQuery(this).attr('id');
     811    jQuery(this).attr("data-ncm_pick_loc_price", PickPrice);
     812    //console.log('datancm_pick_loc_price'+PickPrice);
    799813
    800814    ncm_calculate_price();
     
    839853
    840854        var levy = jQuery(this).attr("data-ncm_levy");
    841         console.log(levy);
     855        //console.log(levy);
    842856
    843857        if(ncm_post_id==post_id && ncm_booking_date==booking_date) {
     
    13001314        var products = [];
    13011315
    1302         var picklocprice = jQuery('.ncm_pickup_location').attr("data-ncm_pick_loc_price");
    1303         console.log(picklocprice);
     1316       
    13041317
    13051318        jQuery("select.ncm_passenger").each( function () {
     
    13171330            var commission = select.attr('data-ncm_commission');
    13181331
     1332            var group = select.attr('data-ncm_group');
     1333
     1334            var maxquantity = select.attr('data-ncm_maxquantity');
     1335
     1336            //console.log('Yes-->'+group);
     1337
    13191338            var product_subtotal_id = select.attr('data-ncm_subtotal_id');
    13201339
     
    13331352            var ncm_passenger_fields = jQuery("#ncm_passenger_fields_"+ncm_cart_row_id).val();
    13341353
    1335 
     1354            var pickppriceselect =  jQuery('.ncm_passenger_'+ncm_cart_row_id).find('.ncm_pickup_location').attr('data-ncm_pick_loc_price');
     1355           
    13361356
    13371357            products.push({
     
    13461366
    13471367                'commission' : commission,
     1368               
     1369                'group' : group,
     1370               
     1371                'maxquantity' : maxquantity,
    13481372
    13491373                'product_subtotal_id' : product_subtotal_id,
     
    13621386
    13631387                'ncm_passenger_fields' : ncm_passenger_fields,
    1364 
    1365                 'ncm_pick_loc_price' : picklocprice,               
     1388               
     1389                'ncm_pick_loc_price' : pickppriceselect,
     1390                               
    13661391
    13671392            });
  • narnoo-commerce-manager/trunk/includes/controller/ncm_cart.class.php

    r2176621 r2189376  
    103103            foreach ($_POST['product'] as $product) {
    104104
    105                 $passenger = isset($product['passenger']) ? $product['passenger'] : 0;
     105
     106                //$passenger = isset($product['passenger']) ? $product['passenger'] : 0;
    106107
    107108                $price = isset($product['price']) ? $product['price'] : 0;
     
    111112                $pax = isset($product['pax']) ? $product['pax'] : 1;
    112113
     114                $group = $product['group'];
     115               
     116                $maxQuantity = $product['maxQuantity'];
     117
     118                //$passenger = isset($product['passenger']) ? $product['passenger'] : 0;
     119
     120                if($group == 'false'){
     121                    $passenger = isset($product['passenger']) ? $product['passenger'] : 0;
     122                }else{
     123                    if($product['passenger'] == 0){
     124                        $passenger = 0;
     125                    }elseif($product['passenger'] >= 1){
     126                        $passenger = 1;
     127                    }
     128                }
     129
     130                //$passenger = isset($product['passenger']) ? $product['passenger'] : 0;
     131
     132                //echo 'Price->>>'.$price;
     133                //echo 'Pes->>>'.$passenger;
     134
    113135                $pick_loc_price = isset($product['ncm_pick_loc_price']) ? $product['ncm_pick_loc_price'] : 0;
     136
     137                //echo 'picklocation===>'.$pick_loc_price;
    114138
    115139                $commission = isset($product['commission']) ? $product['commission'] : 0;
     
    133157
    134158
    135 
     159               
    136160               
    137161                $product_levy = $levy * $passenger;
    138162
     163               
    139164                //if($pick_loc_price > 0 && !empty($pick_loc_price)){
    140165
     
    154179
    155180                    $product_price = $price * $passenger;
     181                   
     182                    //$product_price = $price * $passenger;
    156183
    157184                    $product_total = $product_levy + $product_price;
    158185                //}
    159 
     186                    //echo 'Product Price'.$product_price;
    160187
    161188                // For sub total amount
     
    163190                if( !empty( $product_sub_arr ) && in_array( $product_subtotal_id, $product_sub_arr ) ) {
    164191
     192
    165193                    $picloc = $pick_loc_price * $passenger;
    166194
    167195                    $subtotal = $ncm_calculate[$product_subtotal_id]['amount'] + $product_price + $picloc;
    168196
     197                   
    169198                    $ncm_calculate[$product_subtotal_id] = array('amount' => $subtotal, 'subtotal' => $ncm_settings->ncm_display_price($subtotal) );
    170199
     200
    171201                } else {
    172202
    173203                    $picloc = $pick_loc_price * $passenger;
    174204
     205
    175206                    $subtotal = $product_price + $picloc;
    176207
     208
    177209                    $ncm_calculate[$product_subtotal_id] = array('amount' => $subtotal, 'subtotal' => $ncm_settings->ncm_display_price($subtotal) );
    178210
     
    180212
    181213                $ncm_cart_subtotal = $ncm_cart_subtotal + $product_price + $picloc + $product_levy;
     214
    182215
    183216                $product_sub_arr[] = $product_subtotal_id;
     
    207240
    208241
    209 
    210242                // For total amount
    211243
     
    233265
    234266
    235 
    236267                // For Passenger fields
    237268
     
    246277
    247278
    248                     $ncm_passenger_fields = json_decode( stripslashes( $ncm_passenger_fields ), true );   
     279                    $ncm_passenger_fields = json_decode( stripslashes( $ncm_passenger_fields ), true ); 
     280
     281 
    249282
    250283                    // set fields for no of passengers.
     
    315348
    316349
    317 
    318350                if( !empty( $product_passenger_fields_arr ) && in_array( $product_passenger_fields, $product_passenger_fields_arr ) ) {
    319351
     
    328360                }
    329361
     362
    330363                $product_passenger_fields_arr[] = $product_passenger_fields;
    331364
     
    334367            }
    335368
     369           
    336370            $ncm_calculate['ncm_cart_subtotal'] = array('amount' => $ncm_cart_subtotal, 'subtotal' => $ncm_settings->ncm_display_price($ncm_cart_subtotal));
    337371
     
    676710        $ncm_passenger_data = array();
    677711
     712        /*echo '<pre>';
     713        print_r($ncm_booking_data);
     714        echo '</pre>';*/
     715
    678716        $fields = ( isset( $booking_data['bookingFields'] ) && !empty( $booking_data['bookingFields'] ) ) ? $booking_data['bookingFields'] : array();
    679717
     
    706744        // get passenger fields from api
    707745
     746        /*echo '<pre>';
     747        print_r($fields['perParticipant']);
     748        echo '</pre>';*/
     749
    708750        $passenger_fields = ( isset( $fields['perParticipant'] ) && !empty( $fields['perParticipant'] ) ) ? $fields['perParticipant'] : array();
    709751
     
    728770        global $ncm_narnoo_helper, $ncm;
    729771
     772        /*echo '<pre>';
     773        print_r($ncm_booking_data);
     774        echo '</pre>';*/
     775
     776
    730777        $passenger_type = array();
    731778
     
    746793        $passenger    = isset($cart_data['passenger']) ? $cart_data['passenger'] : '0';
    747794
    748 
     795        //echo 'pik====>'.$pickup;
     796        if (is_array($ncm_booking_data['productPickUps']) || is_object($ncm_booking_data['productPickUps'])){
     797
     798            foreach($ncm_booking_data['productPickUps'] as $keyp => $valuep){
     799               
     800                /*echo '<pre>';
     801                print_r($valuep);
     802                echo '</pre>';*/
     803               
     804                if($valuep['id'] == $pickup){
     805                    //echo 'Yes';
     806                    $pickuplocval = $valuep['price']; 
     807                }
     808            }
     809        }
     810        //echo 'pickval=>>>>>'.$pickuplocval;
    749811
    750812        $passenger_info = array();
     
    763825
    764826
    765 
    766827            $product_available = isset($result['productAvailability'][0]) ? $result['productAvailability'][0] : array();
    767828
     
    770831            $availability_option = array_combine(range(0,$availability), range(0,$availability));
    771832
    772 
     833            /*echo '<pre>';
     834            print_r($ncm_booking_data['productPrices']);
     835            echo '</pre>';*/
    773836
    774837            $ncm_product_prices = array();
     
    778841                foreach( $ncm_booking_data['productPrices'] as $price ) {
    779842
     843                    /*echo '<pre>';
     844                    print_r($price);
     845                    echo '</pre>';*/
     846
    780847                    $passenger_id = isset($price['id']) ? $price['id'] : 0;
    781848
    782849                    $pax = isset($price['pax']) ? $price['pax'] : 1;
    783850
     851                    $group = !empty($price['group']) ? $price['group'] : 'false';
     852                    //$group = $price['group'];
     853                    //echo 'Group-->'.$price['minQuantity'];
     854                   
     855                    $maxQuantity = !empty($price['maxQuantity']) ? $price['maxQuantity'] : 'null';
     856
    784857                    $ncm_product_prices[$passenger_id] = $pax;
    785858
     
    788861            }
    789862
    790 
     863            //echo 'Group-->'.$maxQuantity;
    791864
    792865
     
    796869            $levy = 0;
    797870
     871            //$pickuplocval = 0;
     872
    798873            if( isset($product_available['price']) && !empty($product_available['price']) ) {
    799874
     
    802877                foreach( $product_available['price'] as $type ) {
    803878
     879
     880                    /*echo '<pre>';
     881                    print_r($type);
     882                    echo '</pre>';*/
     883
    804884                    $passengers = array();
    805885
     
    820900                    $passengers['commission'] = isset($type['commission']) ? $type['commission'] : 0;
    821901
     902                    $passengers['group'] = $group;
     903
     904                    $passengers['maxQuantity'] = $maxQuantity;
     905
     906                   
    822907
    823908
    824909                    $passenger_type[] = $passengers;
    825910
    826 
     911                    //echo 'Group Val->>>'.$group;
     912
     913
     914                    if($group == 1){
     915                        if($passengers['value'] == 0 ){
     916                            $passengers['value'] = 0;
     917                        }elseif($passengers['value'] >= 1){
     918                            $passengers['value'] = 1;
     919                        }
     920                    }elseif($group == false){
     921                        $passengers['value'] = $passengers['value'];
     922                    }else{
     923                        $passengers['value'] = $passengers['value'];
     924                    }
     925
     926                    //echo 'Pas val-->'.$passengers['value'].'<br/>';
    827927
    828928                    $levy     = $levy + ( $passengers['value'] * $passengers['levy'] );
     
    830930                    $subtotal = $subtotal + ( $passengers['value'] * $passengers['price'] );
    831931
     932                    //$subtotal = $subtotal + $pickuplocval;
     933
     934                    //echo $passengers['value'];
     935
     936                    //$pickuplocval = $passengers['value'] * 25;
     937                    //echo 'pric==>'.$passengers['price'].'<br/>';
     938
     939
    832940                }
    833941
    834942            }
    835 
    836943           
     944           
    837945
    838946            $passenger_info['tour_name'] = $tour_names;
     
    842950            $passenger_info['passenger_types'] = $passenger_type;
    843951
    844             $passenger_info['subtotal'] = $subtotal;
     952            /*echo '<pre>';
     953            print_r($passenger_type);
     954            echo '</pre>';*/
     955
     956            $subpescount = 0;
     957            foreach($passenger_type as $key => $datap){
     958                //echo $datap['value'];
     959                if($datap['value'] >= 1){
     960                     $subpescount = $subpescount + $datap['value'];
     961                }
     962            }
     963            //echo $subpescount;
     964
     965            //$passenger_info['subtotal'] = $subtotal;
     966            $pickuplocval = $pickuplocval * $subpescount;
     967            if(!empty($pickuplocval)){
     968                $passenger_info['subtotal'] = $subtotal + $pickuplocval;
     969            }else{
     970                $passenger_info['subtotal'] = $subtotal;
     971            }
    845972
    846973            $passenger_info['levy'] = $levy;
    847974
     975            $passenger_info['picklocationprice'] = $pickuplocval;
     976
     977
    848978            //$passenger_info['total'] = $subtotal; // + $levy;
    849             $passenger_info['total'] = $subtotal + $levy;
     979            //$passenger_info['total'] = $subtotal + $levy;
     980
     981            if(!empty($pickuplocval)){
     982                $passenger_info['total'] = $subtotal + $levy + $pickuplocval;
     983            }else{
     984                $passenger_info['total'] = $subtotal + $levy;
     985            }
     986
    850987
    851988            $passenger_info['ncm_res_availability'] = $result_available;
     
    853990            $passenger_info['passenger_fields'] = isset($ncm_fields['passenger_fields']) ? $ncm_fields['passenger_fields'] : array();
    854991
     992
    855993        }
    856994
     
    8671005        $passengers_info = $this->passenger_type;
    8681006
     1007        /*echo '<pre>';
     1008        print_r($passengers_info);
     1009        echo '</pre>';*/
    8691010
    8701011
     
    8781019                $availability_option = isset($passenger_info['availability_option']) ? $passenger_info['availability_option'] : '';
    8791020
     1021                /*echo '<pre>';
     1022                print_r($passenger_info);
     1023                echo '</pre>';*/
     1024
    8801025                $passenger_types = isset($passenger_info['passenger_types']) ? $passenger_info['passenger_types'] : '';
    8811026
    8821027
    883 
    8841028                $passenger_type = array();
    8851029
     
    8921036                    foreach ($passenger_types as $key => $passenger) {
    8931037
    894 
     1038                        /*echo '<pre>';
     1039                        print_r($passenger);
     1040                        echo '</pre>';*/
    8951041
    8961042                        $id = isset($passenger['id']) ? $passenger['id'] : 0;
     
    9101056                        $commission = isset($type['commission']) ? $type['commission'] : 0;
    9111057
     1058                        $group = $passenger['group'];
     1059                       
     1060                        $maxQuantity = $passenger['maxQuantity'];
     1061
     1062                        //echo 'Group->>>'.$group;
     1063
     1064
    9121065                        $name = 'passenger_'.$cart_row_id.'_'.$id;
    9131066
    9141067
    915 
     1068                        //echo 'max qty->>'.$maxQuantity;
     1069
     1070                        if($maxQuantity == 'null'){
     1071                            $availability_option = $availability_option;
     1072                        }else{
     1073                            $ncm_maxqty = 0;
     1074                            $maxQuantityarray = array();
     1075                            while($ncm_maxqty <= $maxQuantity) {
     1076                              $maxQuantityarray[] = $ncm_maxqty;
     1077                              $ncm_maxqty++;
     1078                            }
     1079
     1080                            $availability_option = $maxQuantityarray;
     1081                        }
     1082
     1083                       
    9161084                        $control = $ncm_controls->ncm_control(
    9171085
     
    9291097
    9301098                                        "options" => $availability_option,
    931 
     1099                                       
    9321100                                        "data-ncm_price" => $price,
    9331101
     
    9371105
    9381106                                        "data-ncm_commission" => $commission,
     1107
     1108                                        "data-ncm_group" => $group,
     1109                                       
     1110                                        "data-ncm_maxQuantity" => $maxQuantity,
    9391111
    9401112                                        "data-ncm_subtotal_id" => "product_subtotal_".$cart_row_id,
     
    10781250
    10791251
    1080 
    10811252                        $ncm_booking_data = isset( $ncm_product_booking_data['bookingData'] ) ? $ncm_product_booking_data['bookingData'] : array();
    10821253
    10831254
    1084 
    10851255                        $ncm_fields = $this->ncm_get_fields($cart_row_id, $ncm_booking_data);
    10861256
     
    11151285                        }
    11161286
     1287                        foreach ($pickup_options as $keypick => $valuepick) {
     1288                            if($keypick == $pickup){
     1289                                $pickuplocval = $valuepick[1]; 
     1290                            }
     1291                        }
     1292
    11171293                        $ncm_is_live = isset( $ncm_booking_data['isLive'] ) ? $ncm_booking_data['isLive'] : true;
    11181294
     
    11341310
    11351311                        $products[$cart_row_id]['pickup_value'] = $pickup;
     1312                        $products[$cart_row_id]['pickup_price'] = $pickuplocval;
    11361313
    11371314                        $products[$cart_row_id]['dropoff_value'] = $dropoff;
     
    11651342        $products_info = $this->ncm_cart_product_info();
    11661343
     1344        /*echo '<pre>';
     1345        print_r($products_info);
     1346        echo '</pre>';*/
    11671347
    11681348        $ncm_booking_fields = array();
     
    11911371                $booking_fields = isset($product['ncm_booking_fields']) ? $product['ncm_booking_fields'] : array();
    11921372
     1373
     1374                //echo $product['pickup_dropoff_option']$product['pickup_value'];
     1375                foreach ($product['pickup_dropoff_option'] as $key => $value) {
     1376                    if($key == $pickup){
     1377                        $pickpir = $value[1]; 
     1378                    }
     1379                }
     1380                //echo 'pickprice===>>'.$pickpir;
     1381                //setcookie('NCM_pickuplocationprice', $pickpir, 0, '/');
    11931382
    11941383
     
    12091398                if( count( $pickup_options ) > 1 ) {
    12101399
     1400
    12111401                    $ncm_data_val = '';
    12121402
     
    12331423                                    "data-ncm_booking_date" => $booking_date,
    12341424
    1235                                     "data-ncm_pick_loc_price" => $pick_loc_price,
     1425                                    "data-ncm_pick_loc_price" => $pickpir,
     1426                                    //"data-ncm_pick_loc_price" => $pick_loc_price,
    12361427
    12371428                                    "data-error_required" => __("Please select pickup location.", NCM_txt_domain),
     
    13991590        }
    14001591
     1592
    14011593        return $product_info;
    14021594
     
    14531645        $ncm_passenger = $this->ncm_get_passenger();
    14541646
     1647        /*echo '<pre>';
     1648        print_r($ncm_passenger);
     1649        echo '</pre>';*/
     1650
    14551651        foreach ($ncm_passenger as $row_id => $ncm_product_field) {
    14561652
     
    15501746
    15511747        $ncm_levy = array_sum(array_column($ncm_cart->passenger_type, 'levy'));
    1552 
     1748       
     1749        $ncm_picklocation = array_sum(array_column($ncm_cart->passenger_type, 'picklocationprice'));
     1750
     1751        //$ncm_subtotal = $ncm_subtotal + $ncm_levy + $ncm_picklocation;
    15531752        $ncm_subtotal = $ncm_subtotal + $ncm_levy;
    15541753
     1754
    15551755        echo '<span class="ncm_cart_subtotal" id="ncm_cart_subtotal">'.$ncm_settings->ncm_display_price($ncm_subtotal).'</span>';
    15561756
     
    15711771        $ncm_levy = array_sum(array_column($ncm_cart->passenger_type, 'levy'));
    15721772
     1773        $ncm_picklocation = array_sum(array_column($ncm_cart->passenger_type, 'picklocationprice'));
     1774
     1775
     1776
     1777        //$ncm_total = $ncm_total + $ncm_picklocation;
    15731778        $ncm_total = $ncm_total - $ncm_levy;
    1574 
     1779        //echo 'pickprice=>>'.$ncm_picklocation.'---Total====>>'.$ncm_total;
     1780       
    15751781        echo '<span class="ncm_cart_total" id="ncm_cart_total">'.$ncm_settings->ncm_display_price($ncm_total).'</span>';
    15761782
  • narnoo-commerce-manager/trunk/includes/controller/ncm_checkout.class.php

    r2176621 r2189376  
    519519        $cart_products = $ncm_cart->ncm_cart_product_info();
    520520
     521        /*echo '<pre>';
     522        print_r($cart_products);
     523        echo '</pre>';*/
     524
    521525        $cart_passenger = $ncm_cart->passenger_type;
    522526
     
    525529            foreach ($cart_products as $key => $product) {
    526530
    527 
     531               /* echo '<pre>';
     532                print_r($product);
     533                echo '</pre>';*/
    528534
    529535                $checkout_data = array();
     
    545551                $ncm_dropoff_data_val = ( $checkout_data['dropoff'] == 'Please Select' ) ? 'data-val="Please select"' : '';
    546552
    547 
     553               
     554
     555                //echo 'pickloc===>'.$checkout_data['pickup'][1];
    548556
    549557                $checkout_data['pickup']='<span class="ncm_pickup" ' . $ncm_pickup_data_val . '>'. $checkout_data['pickup'][0] .'</span>';
     
    552560
    553561
    554 
     562                foreach ($product['pickup_dropoff_option'] as $keypick => $valuepick) {
     563                    if($keypick == $checkout_data['pickup_value']){
     564                        $pickuplocval = $valuepick[1]; 
     565                    }
     566                }
     567
     568                //echo $checkout_data['pickup_price'];
     569
     570                //echo $pickuplocval;
    555571
    556572
     
    559575                $passenger_text = '';
    560576
     577                /*echo '<pre>';
     578                print_r($cart_passenger[$key]['passenger_types']);
     579                echo '</pre>';*/
     580
    561581                if( isset($cart_passenger[$key]['passenger_types']) && !empty($cart_passenger[$key]['passenger_types']) && is_array($cart_passenger[$key]['passenger_types']) ) {
    562582
     
    581601                $checkout_data['passenger'] = empty($passenger_text) ? '-' : $passenger_text;
    582602
    583 
     603                /*echo '<pre>';
     604                echo count($passenger_data);
     605                echo '</pre>';*/
     606                //echo $passenger['value'];
     607                //echo 'subttal==>'.$checkout_data['pickup_price'];
     608                //echo 'subtotal==>'.$cart_passenger[$key]['subtotal'];
     609
     610                //$pickprice = $checkout_data['pickup_price'] * count($passenger_data);
     611                //echo $pickprice;
     612
     613                $checkoutsubtotal = $cart_passenger[$key]['subtotal'] + $checkout_data['pickup_price'];
     614                $checkouttotal = $cart_passenger[$key]['total'] + $checkout_data['pickup_price'];
     615
     616                //echo $cart_passenger[$key]['subtotal'];
    584617
    585618                $checkout_data['subtotal'] = $ncm_settings->ncm_display_price($cart_passenger[$key]['subtotal']);
    586619
     620                //echo 'Subtotla'.$checkout_data['subtotal'];
     621                //$checkout_data['subtotal'] = $ncm_settings->ncm_display_price($checkoutsubtotal);
     622
     623
    587624                $checkout_data['levy'] = $ncm_settings->ncm_display_price($cart_passenger[$key]['levy']);
    588625
    589626                $checkout_data['total'] = $ncm_settings->ncm_display_price($cart_passenger[$key]['total']);
     627
     628                //$checkout_data['total'] = $ncm_settings->ncm_display_price($checkouttotal);
    590629
    591630                ncm_get_template("ncm-checkout-product", $checkout_data);
     
    769808                $pickup = isset($location_option[$product['pickup_value']]) ? $location_option[$product['pickup_value']] : '';
    770809
     810                //echo '<pre>';
     811                //echo $pickup[0];
     812                //echo '</pre>'; die();
     813
    771814                $dropoff = isset($location_option[$product['dropoff_value']]) ? $location_option[$product['dropoff_value']] : '';
    772815
     
    777820                $prod_post_id = isset($product['post_id']) ? $product['post_id'] : 0;
    778821
    779  
     822                $subtotalorder = $product['subtotal'] + $product['picklocationprice'];
     823                $totalorder = $product['total'] + $product['picklocationprice'];
    780824
    781825                $product_data = array(
     
    799843                    'pickup_id' => isset($product['pickup_value']) ? $product['pickup_value'] : '',
    800844
    801                     'pickup' => $pickup,
     845                    //'pickup' => $pickup,
     846                    'pickup' => $pickup[0],
    802847
    803848                    'dropoff_id' => isset($product['dropoff_value']) ? $product['dropoff_value'] : '',
     
    808853
    809854                    'subtotal' => $product['subtotal'],
     855                    //'subtotal' => $subtotalorder,
    810856
    811857                    'levy' => $product['levy'],
    812858
    813859                    'total' => $product['total'],
     860                    //'total' => $totalorder,
    814861
    815862                );
     
    929976        global $ncm, $wpdb, $ncm_cart, $ncm_narnoo_helper, $ncm_payment_gateways, $ncm_order;
    930977
     978
    931979        $order_id = '';
    932980
     
    948996
    949997                $cart_passenger = $ncm_cart->passenger_type;
     998
     999                /*echo '<pre>';
     1000                print_r($cart_passenger);
     1001                echo '</pre>'; die();*/
    9501002
    9511003                $products = array();
     
    10361088                    $data['subtotal'] = array_sum(array_column($products, 'subtotal')) + array_sum(array_column($products, 'levy'));
    10371089
     1090                    //$data['subtotal'] = array_sum(array_column($products, 'subtotal')) + array_sum(array_column($products, 'levy')) + array_sum(array_column($products, 'picklocationprice'));
     1091
     1092                   
    10381093                    $data['levy'] = array_sum(array_column($products, 'levy'));
    10391094
     
    10441099                    }else{
    10451100                        $data['total'] = array_sum(array_column($products, 'total')) - array_sum(array_column($products, 'levy')); 
     1101                        //$totalprice = array_sum(array_column($products, 'total')) + array_sum(array_column($products, 'picklocationprice')); 
     1102                        //$data['total'] = $totalprice - array_sum(array_column($products, 'levy')); 
    10461103                    }
    10471104
     
    12871344
    12881345                                            $order_id = $data['order_id'];
    1289 
    12901346
    12911347
  • narnoo-commerce-manager/trunk/includes/controller/ncm_narnoo_helper.class.php

    r2176621 r2189376  
    256256            $result_data = json_decode($result);
    257257
     258            /*echo '<pre>';
     259            print_r($result_data);
     260            echo '</pre>'; die();*/
     261
    258262            $result = isset($result_data->data) ? json_encode($result_data->data) : json_encode($result_data);
    259263
     
    327331        }
    328332
    329 
     333       
    330334
    331335        if( $response_type == 'array' ) {
     
    379383
    380384            $result_data = json_decode($result);
     385
     386            /*echo '<pre>';
     387            print_r($result_data);
     388            echo '</pre>';*/
    381389
    382390            $result = isset($result_data->data) ? json_encode($result_data->data) : json_encode($result_data);
     
    480488                    $option["price"] = $passenger['price'];
    481489
     490                    $option["group"] = $passenger['group'];
     491
     492                    $option["maxQuantity"] = $passenger['maxQuantity'];
     493
    482494                    $options[] = $option;
    483495
  • narnoo-commerce-manager/trunk/includes/controller/ncm_narnoo_operator_helper.class.php

    r2155249 r2189376  
    375375                    $option["price"] = $passenger['price'];
    376376
     377                    $option["group"] = $passenger['group'];
     378
    377379                    $options[] = $option;
    378380
  • narnoo-commerce-manager/trunk/includes/controller/ncm_product.class.php

    r2155249 r2189376  
    8181        $product_data = $ncm_narnoo_helper->ncm_product_details( $op_id, $product_id, 'array' );
    8282
     83       
    8384        $booking_data = isset($product_data['bookingData']) ? $product_data['bookingData'] : array();
    8485
  • narnoo-commerce-manager/trunk/includes/controller/ncm_shortcode.class.php

    r2176621 r2189376  
    18141814
    18151815
    1816 
    1817             $col = $atts['col'];
    1818 
    1819             $posts_per_page = $atts['posts_per_page'];
    1820 
    1821 
    1822 
    1823             if(!empty($posts_per_page)){
    1824 
    1825                 $perpage = $posts_per_page;
     1816            if(!empty($atts['col'])){
     1817                $col = $atts['col'];
     1818            }
     1819
     1820            //$posts_per_page = $atts['posts_per_page'];
     1821
     1822
     1823
     1824            if(!empty($atts['posts_per_page'])){
     1825
     1826                $perpage = $atts['posts_per_page'];
    18261827
    18271828            }else{
     
    20072008            global $ncm_settings, $post;
    20082009
    2009 
    2010 
    2011             $col = $atts['col'];
    2012 
    2013             $posts_per_page = $atts['posts_per_page'];
    2014 
    2015 
    2016 
    2017             if(!empty($posts_per_page)){
    2018 
    2019                 $perpage = $posts_per_page;
     2010           
     2011            if(!empty($atts['col'])){
     2012                $col = $atts['col'];
     2013            }
     2014
     2015           
     2016            //$posts_per_page = $atts['posts_per_page'];
     2017
     2018            if(!empty($atts['posts_per_page'])){
     2019
     2020                $perpage = $atts['posts_per_page'];
    20202021
    20212022            }else{
     
    20432044                    'post_status' => 'publish',
    20442045
    2045                     'posts_per_page' => $posts_per_page,
     2046                    'posts_per_page' => $perpage,
    20462047
    20472048                    'order' => 'DESC',
  • narnoo-commerce-manager/trunk/log/ncm_log.txt

    r2176621 r2189376  
    404404 after make booking call response values => {"success":true,"uniqueId":"XpaAwSgVsGBEdKA","data":{"contact":{"firstName":"Developer","lastName":"Last Name","phone":"0123456789","email":"aj.developer055@gmail.com","State":"Business State","Postcode\/Zip":"12345","country":"Australia","Comment":"fasfafasfaffasfafasfa","I agree to the terms and conditions of travel":"I"},"booking":[{"confirmed":true,"reservationCode":173694,"bookingDate":"20-10-2019","productBookingCode":"RP:16:41:5","productId":496,"reservationProductName":null,"reservationPaymentOption":"full-agent","reservationProvider":"Respax"}],"bookingCount":1,"reservationQueryTime":"1029.48ms","success":true,"timestamp":"2019-10-18T21:46:35+11:00","cacheTime":null},"queryTime":"1797.39ms"}
    405405
     406=============== Write At => 19-10-24 10:13:09 ===============
     407 after make booking call response values => {"success":true,"uniqueId":"0jeaLFl5wLEyXb9","data":{"contact":{"firstName":"Developer","lastName":"Last Name","Phone":"0123456789","email":"aj.developer055@gmail.com","State":"Business State","Postcode":"12345","country":"Australia","Comment":"dsdsfsdfsd","I agree to the terms and conditions of travel":"I"},"booking":[{"error":true,"msg":"No availability reference code - check bookingDate","bookingCode":"FH:489:TT","order":{"productId":489,"bookingCode":"FH:489:TT","bookingDate":"26-10-2019 08:00:00","paymentMethod":"FULL_AGENT","productOptions":[{"id":395131,"label":"Child Snorkelers","quantity":1,"price":"110.00"}],"participants":[[{"label":"First Name","value":"demo"},{"label":"Last Name","value":"demo"}]],"bookingForm":{"2":{"value":"Developer","label":"First Name"},"3":{"value":"Last Name","label":"Last Name"},"4":{"value":"0123456789","label":"Phone"},"5":{"value":"aj.developer055@gmail.com","label":"Email"},"6":{"value":"Business State","label":"State"},"7":{"value":"12345","label":"Postcode"},"8":{"value":"Australia","label":"Country"},"1":{"value":"dsdsfsdfsd","label":"Comment"},"9":{"value":"I","label":"I agree to the terms and conditions of travel"}}}}],"bookingCount":1,"reservationQueryTime":"120.3ms","success":true,"timestamp":"2019-10-24T21:13:04+11:00","cacheTime":null},"queryTime":"689.44ms"}
     408
     409=============== Write At => 19-10-24 10:46:55 ===============
     410 after make booking call response values => {"success":true,"uniqueId":"MDSUBAtZj8wJhw0","data":{"contact":{"firstName":"Developer","lastName":"Last Name","Phone":"0123456789","email":"aj.developer055@gmail.com","State":"Business State","Postcode":"12345","country":"Australia","Comment":"dasdasd","I agree to the terms and conditions of travel":"I"},"booking":[{"error":true,"msg":"No availability reference code - check bookingDate","bookingCode":"FH:489:TT","order":{"productId":489,"bookingCode":"FH:489:TT","bookingDate":"26-10-2019 08:00:00","paymentMethod":"FULL_AGENT","productOptions":[{"id":395131,"label":"Child Snorkelers","quantity":1,"price":"110.00"}],"participants":[[{"label":"First Name","value":"asdasd"},{"label":"Last Name","value":"dasd"}]],"bookingForm":{"2":{"value":"Developer","label":"First Name"},"3":{"value":"Last Name","label":"Last Name"},"4":{"value":"0123456789","label":"Phone"},"5":{"value":"aj.developer055@gmail.com","label":"Email"},"6":{"value":"Business State","label":"State"},"7":{"value":"12345","label":"Postcode"},"8":{"value":"Australia","label":"Country"},"1":{"value":"dasdasd","label":"Comment"},"9":{"value":"I","label":"I agree to the terms and conditions of travel"}}}}],"bookingCount":1,"reservationQueryTime":"25.84ms","success":true,"timestamp":"2019-10-24T21:46:51+11:00","cacheTime":null},"queryTime":"700.89ms"}
     411
     412=============== Write At => 19-10-24 11:05:38 ===============
     413 after make booking call response values => {"success":true,"uniqueId":"KjsOkR4Hm5v6DH2","data":{"contact":{"firstName":"Developer","lastName":"Last Name","Phone":"0123456789","email":"aj.developer055@gmail.com","State":"Business State","Postcode":"12345","country":"Australia","Comment":"fsdfsdfsdfsdfsd","I agree to the terms and conditions of travel":"I"},"booking":[{"error":true,"msg":"No availability reference code - check bookingDate","bookingCode":"FH:489:TT","order":{"productId":489,"bookingCode":"FH:489:TT","bookingDate":"26-10-2019 08:00:00","paymentMethod":"FULL_AGENT","productOptions":[{"id":395131,"label":"Child Snorkelers","quantity":1,"price":"110.00"}],"participants":[[{"label":"First Name","value":"dsadsaf"},{"label":"Last Name","value":"fdsfsdf"}]],"bookingForm":{"2":{"value":"Developer","label":"First Name"},"3":{"value":"Last Name","label":"Last Name"},"4":{"value":"0123456789","label":"Phone"},"5":{"value":"aj.developer055@gmail.com","label":"Email"},"6":{"value":"Business State","label":"State"},"7":{"value":"12345","label":"Postcode"},"8":{"value":"Australia","label":"Country"},"1":{"value":"fsdfsdfsdfsdfsd","label":"Comment"},"9":{"value":"I","label":"I agree to the terms and conditions of travel"}}}}],"bookingCount":1,"reservationQueryTime":"69.43ms","success":true,"timestamp":"2019-10-24T22:05:34+11:00","cacheTime":null},"queryTime":"640.21ms"}
     414
     415=============== Write At => 19-10-24 13:58:20 ===============
     416 after make booking call response values => {"success":true,"uniqueId":"ovVRAPr1YXvCJpD","data":{"contact":{"firstName":"Developer","lastName":"Last Name","Phone":"0123456789","email":"aj.developer055@gmail.com","State":"Business State","Postcode":"12345","country":"Australia","Comment":"Testing Comment","I agree to the terms and conditions of travel":"I"},"booking":[{"error":true,"msg":"No availability reference code - check bookingDate","bookingCode":"FH:489:TT","order":{"productId":489,"bookingCode":"FH:489:TT","bookingDate":"26-10-2019 08:00:00","paymentMethod":"FULL_AGENT","productOptions":[{"id":395131,"label":"Child Snorkelers","quantity":1,"price":"110.00"}],"participants":[[{"label":"First Name","value":"Demo"},{"label":"Last Name","value":"Demo"}]],"bookingForm":{"2":{"value":"Developer","label":"First Name"},"3":{"value":"Last Name","label":"Last Name"},"4":{"value":"0123456789","label":"Phone"},"5":{"value":"aj.developer055@gmail.com","label":"Email"},"6":{"value":"Business State","label":"State"},"7":{"value":"12345","label":"Postcode"},"8":{"value":"Australia","label":"Country"},"1":{"value":"Testing Comment","label":"Comment"},"9":{"value":"I","label":"I agree to the terms and conditions of travel"}}}}],"bookingCount":1,"reservationQueryTime":"26.77ms","success":true,"timestamp":"2019-10-25T00:58:15+11:00","cacheTime":null},"queryTime":"481.12ms"}
     417
     418=============== Write At => 19-10-25 06:57:52 ===============
     419 after make booking call response values => {"success":true,"uniqueId":"pEsi5jrLACANy5k","data":{"contact":{"firstName":"Developer","lastName":"Last Name","Phone":"0123456789","email":"aj.developer055@gmail.com","State":"Business State","Postcode":"12345","country":"Australia","Comment":"Testing comment","I agree to the terms and conditions of travel":"I"},"booking":[{"error":true,"msg":"No availability reference code - check bookingDate","bookingCode":"FH:489:TT","order":{"productId":489,"bookingCode":"FH:489:TT","bookingDate":"27-10-2019 08:00:00","paymentMethod":"FULL_AGENT","productOptions":[{"id":395127,"label":"Adult Snorkelers","quantity":1,"price":"175.00"},{"id":395131,"label":"Child Snorkelers","quantity":1,"price":"110.00"}],"participants":[[{"label":"First Name","value":"Demo"},{"label":"Last Name","value":"Demo"}],[{"label":"First Name","value":"First Name"},{"label":"Last Name","value":"Last Name"}]],"bookingForm":{"2":{"value":"Developer","label":"First Name"},"3":{"value":"Last Name","label":"Last Name"},"4":{"value":"0123456789","label":"Phone"},"5":{"value":"aj.developer055@gmail.com","label":"Email"},"6":{"value":"Business State","label":"State"},"7":{"value":"12345","label":"Postcode"},"8":{"value":"Australia","label":"Country"},"1":{"value":"Testing comment","label":"Comment"},"9":{"value":"I","label":"I agree to the terms and conditions of travel"}}}}],"bookingCount":1,"reservationQueryTime":"17.51ms","success":true,"timestamp":"2019-10-25T17:57:48+11:00","cacheTime":null},"queryTime":"560.66ms"}
     420
     421=============== Write At => 19-10-25 07:22:16 ===============
     422 after make booking call response values => {"success":true,"uniqueId":"sPm3EekTw26Lh3O","data":{"contact":{"firstName":"Developer","lastName":"Last Name","Phone":"0123456789","email":"aj.developer055@gmail.com","State":"Business State","Postcode":"12345","country":"Australia","Comment":"sbcbcbcbcbcbcb","I agree to the terms and conditions of travel":"I"},"booking":[{"error":true,"msg":"No availability reference code - check bookingDate","bookingCode":"FH:489:TT","order":{"productId":489,"bookingCode":"FH:489:TT","bookingDate":"27-10-2019 08:00:00","paymentMethod":"FULL_AGENT","productOptions":[{"id":395127,"label":"Adult Snorkelers","quantity":1,"price":"175.00"},{"id":395131,"label":"Child Snorkelers","quantity":1,"price":"110.00"}],"participants":[[{"label":"First Name","value":"Demo"},{"label":"Last Name","value":"Demo"}],[{"label":"First Name","value":"First Name"},{"label":"Last Name","value":"Last Name"}]],"bookingForm":{"2":{"value":"Developer","label":"First Name"},"3":{"value":"Last Name","label":"Last Name"},"4":{"value":"0123456789","label":"Phone"},"5":{"value":"aj.developer055@gmail.com","label":"Email"},"6":{"value":"Business State","label":"State"},"7":{"value":"12345","label":"Postcode"},"8":{"value":"Australia","label":"Country"},"1":{"value":"sbcbcbcbcbcbcb","label":"Comment"},"9":{"value":"I","label":"I agree to the terms and conditions of travel"}}}}],"bookingCount":1,"reservationQueryTime":"62.2ms","success":true,"timestamp":"2019-10-25T18:22:12+11:00","cacheTime":null},"queryTime":"581.05ms"}
     423
     424=============== Write At => 19-10-25 07:44:09 ===============
     425 after make booking call response values => {"success":true,"uniqueId":"g2m5lgHPqWcmbUx","data":{"contact":{"firstName":"Developer","lastName":"Last Name","Phone":"0123456789","email":"aj.developer055@gmail.com","State":"Business State","Postcode":"12345","country":"Australia","Comment":"testing comment","I agree to the terms and conditions of travel":"I"},"booking":[{"error":true,"msg":"No availability reference code - check bookingDate","bookingCode":"FH:489:TT","order":{"productId":489,"bookingCode":"FH:489:TT","bookingDate":"27-10-2019 08:00:00","paymentMethod":"FULL_AGENT","productOptions":[{"id":395127,"label":"Adult Snorkelers","quantity":1,"price":"175.00"},{"id":395131,"label":"Child Snorkelers","quantity":1,"price":"110.00"}],"participants":[[{"label":"First Name","value":"Demo"},{"label":"Last Name","value":"Demo"}],[{"label":"First Name","value":"First Name"},{"label":"Last Name","value":"First Name"}]],"bookingForm":{"2":{"value":"Developer","label":"First Name"},"3":{"value":"Last Name","label":"Last Name"},"4":{"value":"0123456789","label":"Phone"},"5":{"value":"aj.developer055@gmail.com","label":"Email"},"6":{"value":"Business State","label":"State"},"7":{"value":"12345","label":"Postcode"},"8":{"value":"Australia","label":"Country"},"1":{"value":"testing comment","label":"Comment"},"9":{"value":"I","label":"I agree to the terms and conditions of travel"}}}}],"bookingCount":1,"reservationQueryTime":"26.68ms","success":true,"timestamp":"2019-10-25T18:44:06+11:00","cacheTime":null},"queryTime":"706.77ms"}
     426
     427=============== Write At => 19-10-25 08:06:18 ===============
     428 after make booking call response values => {"success":true,"uniqueId":"WpdRAXwMr1k478B","data":{"contact":{"firstName":"Developer","lastName":"Last Name","Phone":"0123456789","email":"aj.developer055@gmail.com","State":"Business State","Postcode":"12345","country":"Australia","Comment":"testing comment","I agree to the terms and conditions of travel":"I"},"booking":[{"error":true,"msg":"No availability reference code - check bookingDate","bookingCode":"FH:489:TT","order":{"productId":489,"bookingCode":"FH:489:TT","bookingDate":"27-10-2019 08:00:00","paymentMethod":"FULL_AGENT","productOptions":[{"id":395127,"label":"Adult Snorkelers","quantity":1,"price":"175.00"},{"id":395131,"label":"Child Snorkelers","quantity":1,"price":"110.00"}],"participants":[[{"label":"First Name","value":"Demo"},{"label":"Last Name","value":"Demo"}],[{"label":"First Name","value":"First Name"},{"label":"Last Name","value":"First Name"}]],"bookingForm":{"2":{"value":"Developer","label":"First Name"},"3":{"value":"Last Name","label":"Last Name"},"4":{"value":"0123456789","label":"Phone"},"5":{"value":"aj.developer055@gmail.com","label":"Email"},"6":{"value":"Business State","label":"State"},"7":{"value":"12345","label":"Postcode"},"8":{"value":"Australia","label":"Country"},"1":{"value":"testing comment","label":"Comment"},"9":{"value":"I","label":"I agree to the terms and conditions of travel"}}}}],"bookingCount":1,"reservationQueryTime":"24.94ms","success":true,"timestamp":"2019-10-25T19:06:14+11:00","cacheTime":null},"queryTime":"686.77ms"}
     429
     430=============== Write At => 19-10-25 08:44:22 ===============
     431 after make booking call response values => {"success":true,"uniqueId":"pgskHKpJOCNlfEH","data":{"contact":{"firstName":"Developer","lastName":"Last Name","Phone":"0123456789","email":"aj.developer055@gmail.com","State":"Business State","Postcode":"12345","country":"Australia","Comment":"testing comment","I agree to the terms and conditions of travel":"I"},"booking":[{"error":true,"msg":"No availability reference code - check bookingDate","bookingCode":"FH:489:TT","order":{"productId":489,"bookingCode":"FH:489:TT","bookingDate":"27-10-2019 08:00:00","paymentMethod":"FULL_AGENT","productOptions":[{"id":395127,"label":"Adult Snorkelers","quantity":1,"price":"175.00"},{"id":395131,"label":"Child Snorkelers","quantity":1,"price":"110.00"}],"participants":[[{"label":"First Name","value":"Demo"},{"label":"Last Name","value":"Demo"}],[{"label":"First Name","value":"First Name"},{"label":"Last Name","value":"First Name"}]],"bookingForm":{"2":{"value":"Developer","label":"First Name"},"3":{"value":"Last Name","label":"Last Name"},"4":{"value":"0123456789","label":"Phone"},"5":{"value":"aj.developer055@gmail.com","label":"Email"},"6":{"value":"Business State","label":"State"},"7":{"value":"12345","label":"Postcode"},"8":{"value":"Australia","label":"Country"},"1":{"value":"testing comment","label":"Comment"},"9":{"value":"I","label":"I agree to the terms and conditions of travel"}}}}],"bookingCount":1,"reservationQueryTime":"70ms","success":true,"timestamp":"2019-10-25T19:44:18+11:00","cacheTime":null},"queryTime":"719.98ms"}
     432
     433=============== Write At => 19-10-25 09:09:41 ===============
     434 after make booking call response values => {"success":true,"uniqueId":"Hm8wwIXfiFShkUi","data":{"contact":{"firstName":"Developer","lastName":"Last Name","Phone":"0123456789","email":"aj.developer055@gmail.com","State":"Business State","Postcode":"12345","country":"Australia","Comment":"dadadadadsd","I agree to the terms and conditions of travel":"I"},"booking":[{"error":true,"msg":"No availability reference code - check bookingDate","bookingCode":"FH:489:TT","order":{"productId":489,"bookingCode":"FH:489:TT","bookingDate":"27-10-2019 08:00:00","paymentMethod":"FULL_AGENT","productOptions":[{"id":395127,"label":"Adult Snorkelers","quantity":1,"price":"175.00"},{"id":395131,"label":"Child Snorkelers","quantity":1,"price":"110.00"}],"participants":[[{"label":"First Name","value":"Demo"},{"label":"Last Name","value":"Demo"}],[{"label":"First Name","value":"First Name"},{"label":"Last Name","value":"Last Name"}]],"bookingForm":{"2":{"value":"Developer","label":"First Name"},"3":{"value":"Last Name","label":"Last Name"},"4":{"value":"0123456789","label":"Phone"},"5":{"value":"aj.developer055@gmail.com","label":"Email"},"6":{"value":"Business State","label":"State"},"7":{"value":"12345","label":"Postcode"},"8":{"value":"Australia","label":"Country"},"1":{"value":"dadadadadsd","label":"Comment"},"9":{"value":"I","label":"I agree to the terms and conditions of travel"}}}}],"bookingCount":1,"reservationQueryTime":"28.07ms","success":true,"timestamp":"2019-10-25T20:09:37+11:00","cacheTime":null},"queryTime":"566.08ms"}
     435
     436=============== Write At => 19-10-29 06:16:25 ===============
     437 after make booking call response values => {"success":true,"uniqueId":"HSmgCx0i0XRz3ce","data":{"contact":{"firstName":"Developer","lastName":"Last Name","Phone":"0123456789","email":"aj.developer055@gmail.com","State":"Business State","Postcode":"12345","country":"Australia","Comment":"Testing Comment","I agree to the terms and conditions of travel":"I"},"booking":[{"error":true,"msg":"No availability reference code - check bookingDate","bookingCode":"FH:489:TT","order":{"productId":489,"bookingCode":"FH:489:TT","bookingDate":"31-10-2019 08:00:00","paymentMethod":"FULL_AGENT","productOptions":[{"id":395131,"label":"Child Snorkelers","quantity":1,"price":"110.00"}],"participants":[[{"label":"First Name","value":"Demo"},{"label":"Last Name","value":"Demo"}]],"bookingForm":{"2":{"value":"Developer","label":"First Name"},"3":{"value":"Last Name","label":"Last Name"},"4":{"value":"0123456789","label":"Phone"},"5":{"value":"aj.developer055@gmail.com","label":"Email"},"6":{"value":"Business State","label":"State"},"7":{"value":"12345","label":"Postcode"},"8":{"value":"Australia","label":"Country"},"1":{"value":"Testing Comment","label":"Comment"},"9":{"value":"I","label":"I agree to the terms and conditions of travel"}}}}],"bookingCount":1,"reservationQueryTime":"25.8ms","success":true,"timestamp":"2019-10-29T17:16:23+11:00","cacheTime":null},"queryTime":"806.3ms"}
     438
     439=============== Write At => 19-10-29 06:22:34 ===============
     440 after make booking call response values => {"success":true,"uniqueId":"CKfkUIDm2VjCu0B","data":{"contact":{"firstName":"First Name","lastName":"Last Name","Phone":"0123456789","email":"aj.developer055@gmail.com","State":"Business State","Postcode":"12345","country":"Australia","Comment":"Testing comment","I agree to the terms and conditions of travel":"I"},"booking":[{"error":true,"msg":"No availability reference code - check bookingDate","bookingCode":"FH:489:TT","order":{"productId":489,"bookingCode":"FH:489:TT","bookingDate":"31-10-2019 08:00:00","paymentMethod":"FULL_AGENT","productOptions":[{"id":395131,"label":"Child Snorkelers","quantity":1,"price":"110.00"}],"participants":[[{"label":"First Name","value":"Demo"},{"label":"Last Name","value":"Demo"}]],"bookingForm":{"2":{"value":"First Name","label":"First Name"},"3":{"value":"Last Name","label":"Last Name"},"4":{"value":"0123456789","label":"Phone"},"5":{"value":"aj.developer055@gmail.com","label":"Email"},"6":{"value":"Business State","label":"State"},"7":{"value":"12345","label":"Postcode"},"8":{"value":"Australia","label":"Country"},"1":{"value":"Testing comment","label":"Comment"},"9":{"value":"I","label":"I agree to the terms and conditions of travel"}}}}],"bookingCount":1,"reservationQueryTime":"27.44ms","success":true,"timestamp":"2019-10-29T17:22:31+11:00","cacheTime":null},"queryTime":"712.63ms"}
     441
     442=============== Write At => 19-10-29 07:48:41 ===============
     443 after make booking call response values => {"success":true,"uniqueId":"L8um61aSw35Jc8M","data":{"contact":{"firstName":"Developer","lastName":"Last Name","Phone":"0123456789","email":"aj.developer055@gmail.com","State":"Business State","Postcode":"12345","country":"Australia","Comment":"asdsadasdas","I agree to the terms and conditions of travel":"I"},"booking":[{"error":true,"msg":"No availability reference code - check bookingDate","bookingCode":"FH:489:TT","order":{"productId":489,"bookingCode":"FH:489:TT","bookingDate":"31-10-2019 08:00:00","paymentMethod":"FULL_AGENT","productOptions":[{"id":395127,"label":"Adult Snorkelers","quantity":1,"price":"175.00"},{"id":395131,"label":"Child Snorkelers","quantity":1,"price":"110.00"}],"participants":[[{"label":"First Name","value":"Demo"},{"label":"Last Name","value":"Demo"}],[{"label":"First Name","value":"First Name"},{"label":"Last Name","value":"First Name"}]],"bookingForm":{"2":{"value":"Developer","label":"First Name"},"3":{"value":"Last Name","label":"Last Name"},"4":{"value":"0123456789","label":"Phone"},"5":{"value":"aj.developer055@gmail.com","label":"Email"},"6":{"value":"Business State","label":"State"},"7":{"value":"12345","label":"Postcode"},"8":{"value":"Australia","label":"Country"},"1":{"value":"asdsadasdas","label":"Comment"},"9":{"value":"I","label":"I agree to the terms and conditions of travel"}}}}],"bookingCount":1,"reservationQueryTime":"17.16ms","success":true,"timestamp":"2019-10-29T18:48:39+11:00","cacheTime":null},"queryTime":"643.57ms"}
     444
     445=============== Write At => 19-10-29 13:06:01 ===============
     446 after make booking call response values => {"success":true,"uniqueId":"kSYE0V636K0qN8R","data":{"contact":{"firstName":"Developer","lastName":"Last Name","Phone":"0123456789","email":"aj.developer055@gmail.com","State":"Business State","Postcode":"12345","country":"Australia","Comment":"Testing comment","I agree to the terms and conditions of travel":"I"},"booking":[{"error":true,"msg":"No availability reference code - check bookingDate","bookingCode":"FH:489:TT","order":{"productId":489,"bookingCode":"FH:489:TT","bookingDate":"31-10-2019 08:00:00","paymentMethod":"FULL_AGENT","productOptions":[{"id":395127,"label":"Adult Snorkelers","quantity":1,"price":"175.00"},{"id":395131,"label":"Child Snorkelers","quantity":1,"price":"110.00"},{"id":395132,"label":"Child with Dive","quantity":1,"price":"155.00"}],"participants":[[{"label":"First Name","value":"Demo"},{"label":"Last Name","value":"Demo"}],[{"label":"First Name","value":"First Name"},{"label":"Last Name","value":"First Name"}],[{"label":"First Name","value":"Test"},{"label":"Last Name","value":"Test"}]],"bookingForm":{"2":{"value":"Developer","label":"First Name"},"3":{"value":"Last Name","label":"Last Name"},"4":{"value":"0123456789","label":"Phone"},"5":{"value":"aj.developer055@gmail.com","label":"Email"},"6":{"value":"Business State","label":"State"},"7":{"value":"12345","label":"Postcode"},"8":{"value":"Australia","label":"Country"},"1":{"value":"Testing comment","label":"Comment"},"9":{"value":"I","label":"I agree to the terms and conditions of travel"}}}}],"bookingCount":1,"reservationQueryTime":"18.25ms","success":true,"timestamp":"2019-10-30T00:05:58+11:00","cacheTime":null},"queryTime":"661.69ms"}
     447
     448=============== Write At => 19-10-29 13:21:53 ===============
     449 after make booking call response values => {"success":true,"uniqueId":"NescBbxdIFH9cjS","data":{"contact":{"firstName":"Developer","lastName":"Last Name","Phone":"0123456789","email":"aj.developer055@gmail.com","State":"Business State","Postcode":"12345","country":"Australia","Comment":"bcbcbcvb","I agree to the terms and conditions of travel":"I"},"booking":[{"error":true,"msg":"No availability reference code - check bookingDate","bookingCode":"FH:489:TT","order":{"productId":489,"bookingCode":"FH:489:TT","bookingDate":"31-10-2019 08:00:00","paymentMethod":"FULL_AGENT","productOptions":[{"id":395131,"label":"Child Snorkelers","quantity":1,"price":"110.00"}],"participants":[[{"label":"First Name","value":"Demo"},{"label":"Last Name","value":"Demo"}]],"bookingForm":{"2":{"value":"Developer","label":"First Name"},"3":{"value":"Last Name","label":"Last Name"},"4":{"value":"0123456789","label":"Phone"},"5":{"value":"aj.developer055@gmail.com","label":"Email"},"6":{"value":"Business State","label":"State"},"7":{"value":"12345","label":"Postcode"},"8":{"value":"Australia","label":"Country"},"1":{"value":"bcbcbcvb","label":"Comment"},"9":{"value":"I","label":"I agree to the terms and conditions of travel"}}}}],"bookingCount":1,"reservationQueryTime":"18.22ms","success":true,"timestamp":"2019-10-30T00:21:50+11:00","cacheTime":null},"queryTime":"655.76ms"}
     450
     451=============== Write At => 19-10-29 13:51:52 ===============
     452 after make booking call response values => {"success":true,"uniqueId":"IFriaundIHV31e6","data":{"contact":{"firstName":"Developer","lastName":"Last Name","Phone":"0123456789","email":"aj.developer055@gmail.com","State":"Business State","Postcode":"12345","country":"Australia","Comment":"Testing comment","I agree to the terms and conditions of travel":"I"},"booking":[{"error":true,"msg":"No availability reference code - check bookingDate","bookingCode":"FH:489:TT","order":{"productId":489,"bookingCode":"FH:489:TT","bookingDate":"31-10-2019 08:00:00","paymentMethod":"FULL_AGENT","productOptions":[{"id":395127,"label":"Adult Snorkelers","quantity":1,"price":"175.00"},{"id":395131,"label":"Child Snorkelers","quantity":1,"price":"110.00"},{"id":395132,"label":"Child with Dive","quantity":1,"price":"155.00"}],"participants":[[{"label":"First Name","value":"Demo"},{"label":"Last Name","value":"Demo"}],[{"label":"First Name","value":"First Name"},{"label":"Last Name","value":"First Name"}],[{"label":"First Name","value":"Test"},{"label":"Last Name","value":"Test"}]],"bookingForm":{"2":{"value":"Developer","label":"First Name"},"3":{"value":"Last Name","label":"Last Name"},"4":{"value":"0123456789","label":"Phone"},"5":{"value":"aj.developer055@gmail.com","label":"Email"},"6":{"value":"Business State","label":"State"},"7":{"value":"12345","label":"Postcode"},"8":{"value":"Australia","label":"Country"},"1":{"value":"Testing comment","label":"Comment"},"9":{"value":"I","label":"I agree to the terms and conditions of travel"}}}}],"bookingCount":1,"reservationQueryTime":"17.68ms","success":true,"timestamp":"2019-10-30T00:51:49+11:00","cacheTime":null},"queryTime":"576.7ms"}
     453
     454=============== Write At => 19-10-30 11:52:50 ===============
     455 after make booking call response values => {"success":true,"uniqueId":"oYiWlvRLxGto1FI","data":{"contact":{"firstName":"Developer","lastName":"Last Name","Phone":"0123456789","email":"aj.developer055@gmail.com","State":"Business State","Postcode":"12345","country":"Australia","Comment":"Testing Comment","I agree to the terms and conditions of travel":"I"},"booking":[{"error":true,"msg":"No availability reference code - check bookingDate","bookingCode":"FH:489:TT","order":{"productId":489,"bookingCode":"FH:489:TT","bookingDate":"01-11-2019 08:00:00","paymentMethod":"FULL_AGENT","productOptions":[{"id":395131,"label":"Child Snorkelers","quantity":1,"price":"110.00"}],"participants":[[{"label":"First Name","value":"demo"},{"label":"Last Name","value":"demo"}]],"bookingForm":{"2":{"value":"Developer","label":"First Name"},"3":{"value":"Last Name","label":"Last Name"},"4":{"value":"0123456789","label":"Phone"},"5":{"value":"aj.developer055@gmail.com","label":"Email"},"6":{"value":"Business State","label":"State"},"7":{"value":"12345","label":"Postcode"},"8":{"value":"Australia","label":"Country"},"1":{"value":"Testing Comment","label":"Comment"},"9":{"value":"I","label":"I agree to the terms and conditions of travel"}}}},{"confirmed":true,"reservationCode":854192,"bookingDate":"01-11-2019","productBookingCode":"RP:16:41:5","productId":496,"reservationProductName":null,"reservationPaymentOption":"full-agent","reservationProvider":"Respax"},{"confirmed":true,"reservationCode":839982,"bookingDate":"31-10-2019","productBookingCode":"RP:7:15:1","productId":495,"reservationProductName":null,"reservationPaymentOption":"full-agent","reservationProvider":"Respax"}],"bookingCount":3,"reservationQueryTime":"1863.42ms","success":true,"timestamp":"2019-10-30T22:52:46+11:00","cacheTime":null},"queryTime":"2508.06ms"}
     456
     457=============== Write At => 19-10-31 10:02:23 ===============
     458 after make booking call response values => {"success":true,"uniqueId":"1zhHHkpLVst0cMU","data":{"contact":{"firstName":"Web","lastName":"Developer","email":"aj.developer055@gmail.com","phone":"0123456789","country":"Australia"},"booking":[{"error":true,"msg":"No availability reference code - check bookingDate","bookingCode":"FH:489:TT","order":{"productId":489,"bookingCode":"FH:489:TT","bookingDate":"03-11-2019 08:00:00","paymentMethod":"FULL_AGENT","productOptions":[{"id":395131,"label":"Child Snorkelers","quantity":1,"price":"110.00"}],"participants":[[{"label":"First Name","value":"Test"},{"label":"Last Name","value":"Test"}]],"bookingForm":{"1":{"value":"Web","label":"First Name"},"2":{"value":"Developer","label":"Last Name"},"3":{"value":"aj.developer055@gmail.com","label":"Email"},"4":{"value":"0123456789","label":"Phone\/Mobile"},"5":{"value":"Australia","label":"Country"}}}}],"bookingCount":1,"reservationQueryTime":"68.89ms","success":true,"timestamp":"2019-10-31T21:02:20+11:00","cacheTime":null},"queryTime":"606.75ms"}
     459
     460=============== Write At => 19-11-04 06:42:11 ===============
     461 after make booking call response values => {"success":true,"uniqueId":"4zcBTZ3qyZHxzCu","data":{"contact":{"firstName":"Developer","lastName":"Last Name","Phone":"0123456789","email":"aj.developer055@gmail.com","State":"Business State","Postcode":"12345","country":"Australia","Comment":"Testing comment","I agree to the terms and conditions of travel":"I"},"booking":[{"error":true,"msg":"No availability reference code - check bookingDate","bookingCode":"FH:489:TT","order":{"productId":489,"bookingCode":"FH:489:TT","bookingDate":"06-11-2019 08:00:00","paymentMethod":"FULL_AGENT","productOptions":[{"id":395127,"label":"Adult Snorkelers","quantity":2,"price":"175.00","group":"false"},{"id":395130,"label":"Adult with Dive","quantity":2,"price":"220.00","group":"false"}],"participants":[[{"label":"First Name","value":"First Name"},{"label":"Last Name","value":"Last Name"}],[{"label":"First Name","value":"Demo"},{"label":"Last Name","value":"Demo"}]],"bookingForm":{"2":{"value":"Developer","label":"First Name"},"3":{"value":"Last Name","label":"Last Name"},"4":{"value":"0123456789","label":"Phone"},"5":{"value":"aj.developer055@gmail.com","label":"Email"},"6":{"value":"Business State","label":"State"},"7":{"value":"12345","label":"Postcode"},"8":{"value":"Australia","label":"Country"},"1":{"value":"Testing comment","label":"Comment"},"9":{"value":"I","label":"I agree to the terms and conditions of travel"}}}}],"bookingCount":1,"reservationQueryTime":"16.92ms","success":true,"timestamp":"2019-11-04T17:42:03+11:00","cacheTime":null},"queryTime":"5450.23ms"}
     462
     463=============== Write At => 19-11-04 07:02:44 ===============
     464 after make booking call response values => {"success":true,"uniqueId":"jGmhOwCNeN3RQAG","data":{"contact":{"firstName":"Developer","lastName":"Last Name","phone":"0123456789","email":"aj.developer055@gmail.com","State":"Business State","Postcode\/Zip":"12345","country":"Australia","Comment":"Testing Comment","I agree to the terms and conditions of travel":"I"},"booking":[{"confirmed":true,"reservationCode":121662,"bookingDate":"05-11-2019","productBookingCode":"RP:1655:3776:1777","productId":1324,"reservationProductName":null,"reservationPaymentOption":"full-agent","reservationProvider":"Respax"},{"confirmed":true,"reservationCode":561158,"bookingDate":"06-11-2019","productBookingCode":"RP:7:15:1","productId":495,"reservationProductName":null,"reservationPaymentOption":"full-agent","reservationProvider":"Respax"}],"bookingCount":2,"reservationQueryTime":"2188.17ms","success":true,"timestamp":"2019-11-04T18:02:39+11:00","cacheTime":null},"queryTime":"2890.63ms"}
     465
     466=============== Write At => 19-11-06 07:09:41 ===============
     467 after make booking call response values => {"success":false,"message":"Error with booking details via the gateway","queryTime":"755.69ms"}
     468
     469=============== Write At => 19-11-08 07:24:50 ===============
     470 after make booking call response values => {"success":true,"uniqueId":"arL8H3Vd2gkQTmL","data":{"contact":{"country":"Aland Islands","email":"aj.developer055@gmail.com","firstName":"First Name","Mobile":"0123456789","lastName":"Last Name"},"booking":[{"reservationProvider":"Rezdy","confirmed":true,"reservationCode":284923,"productId":1773,"productBookingCode":"RZ:1773:TT","bookingDate":"10-11-2019","reservationProductName":null,"reservationPaymentOption":"FULL_AGENT"},{"reservationProvider":"Rezdy","confirmed":true,"reservationCode":707072,"productId":1772,"productBookingCode":"RZ:1772:TT","bookingDate":"10-11-2019","reservationProductName":null,"reservationPaymentOption":"FULL_AGENT"}],"bookingCount":2,"reservationQueryTime":"2044.14ms","success":true,"timestamp":"2019-11-08T18:24:46+11:00","cacheTime":null},"queryTime":"2717.37ms"}
     471
     472=============== Write At => 19-11-08 11:29:31 ===============
     473 after make booking call response values => {"success":true,"uniqueId":"yY6h7qVAEgVM6oa","data":{"contact":{"country":"Australia","email":"aj.developer055@gmail.com","firstName":"First Name","Mobile":"0123456789","lastName":"Last Name","Pick up Location":"10"},"booking":[{"reservationProvider":"Rezdy","confirmed":true,"reservationCode":813487,"productId":1774,"productBookingCode":"RZ:1774:TT","bookingDate":"10-11-2019","reservationProductName":null,"reservationPaymentOption":"FULL_AGENT"},{"reservationProvider":"Rezdy","confirmed":true,"reservationCode":736171,"productId":1776,"productBookingCode":"RZ:1776:TT","bookingDate":"10-11-2019","reservationProductName":null,"reservationPaymentOption":"FULL_AGENT"}],"bookingCount":2,"reservationQueryTime":"2393.16ms","success":true,"timestamp":"2019-11-08T22:29:26+11:00","cacheTime":null},"queryTime":"2959.34ms"}
     474
  • narnoo-commerce-manager/trunk/narnoo-commerce-manager.php

    r2176621 r2189376  
    44Plugin URI: https://www.narnoo.com/
    55Description: Allows Narnoo distributors to manager their bookings via the Narnooo BYOB system.
    6 Version: 1.5.0
     6Version: 1.6.0
    77Author: Narnoo Wordpress developer
    88Author URI: https://www.narnoo.com/
     
    6565
    6666global $ncm_version;
    67 $ncm_version = '1.1';
     67$ncm_version = '1.6';
    6868
    6969class Narnoo_Commerce_Manager {
Note: See TracChangeset for help on using the changeset viewer.