}
                    $t = array();
                    $t['d'] = $c['customers_id'];
                    $t['c'] = $cname;
                    $action = '<input type="button" name="cadd2list" value="Add" />';
                    $action .= '<input type="hidden" id="cid-' . $c['customers_id'] . '" name="customers_id" value="' . $c['customers_id'] . '" />';
                    $t['a'] = $action;
                    $table[] = $t;
                }
                $result .= tep_draw_table('spo', $table);
            }
        }
        echo utf8_encode($result);
    } elseif ($_POST['me_action'] == 'ADDCUSTOMER') {
        $customers_id = tep_db_prepare_input($_POST['customers_id']);
        $added = $class_csl->addCustomer($type, $customers_id);
        $result = $added ? $customers_id : 'fail';
        echo utf8_encode($result);
    }
    exit;
}
//START TEMPLATE
$content = '<div>Search Customer Name</div>';
$content .= '<div style="margin-bottom:20px;">';
$content .= '<input type="text" id="search_keywords" value="" class="iwbutton" />';
$content .= '<input type="button" id="search_button" value="Go" />';
$content .= '</div>';
$content .= '<div id="search_loading" style="display:none;"><img src="images/ajax-load-1.gif" /></div>';
$content .= '<div id="search_result" style="display:none;">&nbsp;</div>';
$javascript = '
			var url = "index.php?open=customers-special-list-add&type=' . $type . '";
예제 #2
0
                 $class_o->updateProductStatus($opid, '1', $session_userinfo['username']);
             }
             $comment = 'Order is revived due to late payment';
             $class_o->updateOrderStatus($order_id, '1', $comment);
             $result = '<h3 class="green">REVIVE Successfully!</h3><div><a href="">Click here to refresh Order detail and view changes</a></div>';
             if ($any_deletion_failed) {
                 $result .= '<div class="red">However, some Commissions cancellation are already reported to Partner, this products is not reviveable.</div>';
             }
         }
     }
     echo utf8_encode($result);
     exit;
 } elseif ($_POST['me_action'] == 'UPDATECUSTOMERSPECIALLIST') {
     $customers_id = tep_db_prepare_input($_POST['customers_id']);
     $status = tep_db_prepare_input($_POST['status']);
     $class_csl->addCustomer($status, $customers_id);
     $messagebox->add('Successfully set this customer as a ' . $class_csl->getTypeName($status) . ' Customer', 'green');
     $openspeciallistdetail = true;
 } elseif ($_POST['me_action'] == 'CHANGEEMAILADDRESS') {
     $order_id = tep_db_prepare_input($_POST['order_id']);
     $old_email = tep_db_prepare_input($_POST['old_email']);
     $new_email = tep_db_prepare_input($_POST['new_email']);
     if (tep_validate_email($new_email)) {
         $class_o->updateEmailAddress($order_id, $old_email, $new_email, $session_userinfo['username']);
         $result = 'OK';
     } else {
         $result = 'FAIL';
     }
     echo utf8_encode($result);
     exit;
 } elseif ($_POST['me_action'] == 'REFRESHORDERTOTAL') {
                             } else {
                                 $class_jcs->updateCustomer($jng_sp_customers_id, 'list_type', 'B');
                             }
                         }
                     }
                     break;
                 case 'J':
                     use_class('customers_special_list');
                     $class_cs = new customers_special_list();
                     if (isset($request['userid']) && $request['userid'] != '') {
                         $q = tep_db_query("SELECT customers_id FROM customers WHERE payone_userid=" . $request['userid']);
                         if (tep_db_num_rows($q) > 0) {
                             $cust = tep_db_fetch_array($q);
                             $customers_id = $cust['customers_id'];
                             if (is_null($class_cs->getCustomerDetail($customers_id))) {
                                 $class_cs->addCustomer('B', $customers_id);
                             } else {
                                 $class_cs->updateCustomer($customers_id, 'list_type', 'B');
                             }
                         }
                     }
                     break;
             }
         }
         break;
     default:
         $response = "";
 }
 if ($payi->detail['sequencenumber'] < $request['sequencenumber']) {
     $payi->saveUsedSequenceNumber($request['sequencenumber']);
 }
예제 #4
0
     $new_status = '12';
     $useAltContent = true;
     $product = $class_o->retrieveProductDetail($opid);
     if ($product['status'] == $old_status) {
         $products = $class_o->retrieveProducts($product['orders_id']);
         $opids = array();
         foreach ($products as $p) {
             $class_o->updateProductStatus($p['orders_products_id'], $new_status, $session_userinfo['username']);
             $opids[] = $p['orders_products_id'];
         }
         $class_o->sendProductStatusNotification($opids, $new_status, $languages[2]['path'], $useAltContent);
         //Auto Blacklist Customer
         $order = $class_o->retrieveDetail($product['orders_id']);
         use_class('customers_special_list');
         $class_csl = new customers_special_list();
         $class_csl->addCustomer('B', $order['customers_id']);
         $comment_text = 'Customer is added to blacklist automatically because of Unpaid Vorkasse Cancellation';
         $class_csl->insertComment($order['customers_id'], $comment_text, 'System');
         $result = array();
         $result['op_id'] = implode(',', $opids);
         $result['old_status'] = $old_status;
         $result['new_status'] = $new_status;
         ajaxReturn($result);
     }
 } elseif ($_POST['me_action'] == 'ONHOLDNOTIFICATION') {
     $status = '13';
     $opid = tep_db_prepare_input($_POST['op_id']);
     $product = $class_o->retrieveProductDetail($opid);
     if ($product['status'] == $status) {
         $products = $class_o->retrieveProducts($product['orders_id']);
         $opids = array();