Zen Cart 订单号格式修改zen cart的订单号 大家都知道是从1开始的
对用户来说以猜解,同时体验不好, 而直接修改数据库中的orders_id 加大它的值 不能超过10位数 一般我们比较喜欢日期时间加随机数的订单号 比如 2010120716020001 作为订单号 这已经16位数了 怎样才能更好的增加个订单号呢 我们只能来另外再添加个字段作为订单号! LIGHTINTHEBOX就是这样的形式 体验非常好 这修改需要一定的编程技术,不懂技术的请做好备份 谨慎操作 ------------------------------------------------------------------ 在数据库里添加订单号字段 orders 表 orders_number `orders_number` varchar(100) NOT NULL, ------------------------------------------------------------------ includes/classes/order.php 文件 function create($zf_ot_modules, $zf_mode = 2) { global $db, $zco_notifier; 下面插入 $sql_data_array = array('customers_id' => $_SESSION['customer_id'] 下面修改插入为 $sql_data_array = array('orders_number' => $order_number, 订单的显示——后台 admin/orders.php 修改 zen_mail($check_status->fields['customers_name'], $check_status->fields['customers_email_address'], EMAIL_TEXT_SUBJECT . ' #' . $oID, $message, STORE_NAME, EMAIL_FROM, $html_msg, 'order_status'); 为 zen_mail($check_status->fields['customers_name'], $check_status->fields['customers_email_address'], EMAIL_TEXT_SUBJECT . ' #' . $check_status->fields['orders_number'], $message, STORE_NAME, EMAIL_FROM, $html_msg, 'order_status'); 修改 zen_mail('', SEND_EXTRA_ORDERS_STATUS_ADMIN_EMAILS_TO, SEND_EXTRA_ORDERS_STATUS_ADMIN_EMAILS_TO_SUBJECT . ' ' . EMAIL_TEXT_SUBJECT . ' #' . $oID, $message, STORE_NAME, EMAIL_FROM, $html_msg, 'order_status_extra'); 为 zen_mail('', SEND_EXTRA_ORDERS_STATUS_ADMIN_EMAILS_TO, SEND_EXTRA_ORDERS_STATUS_ADMIN_EMAILS_TO_SUBJECT . ' ' . EMAIL_TEXT_SUBJECT . ' #' . $check_status->fields['orders_number'], $message, STORE_NAME, EMAIL_FROM, $html_msg, 'order_status_extra'); admin/includes/classes/order.php 修改 $order = $db->Execute("select cc_cvv, customers_name, customers_company, customers_street_address, 为 $order = $db->Execute("select cc_cvv, orders_number, customers_name, customers_company, customers_street_address, 修改 $this->info = array('currency' => $order->fields['currency'], 为 $this->info = array('currency' => $order->fields['currency'], admin/invoice.php文件 修改 <td class="main"><b><?php echo ENTRY_ORDER_ID . $oID; ?></b></td> 为 <td class="main"><b><?php echo ENTRY_ORDER_ID . $order->info['orders_number']; ?></b></td> admin/packingslip.php 修改 <td class="main"><b><?php echo ENTRY_ORDER_ID . $oID; ?></b></td> 为 <td class="main"><b><?php echo ENTRY_ORDER_ID . $order->info['orders_number']; ?></b></td> adminincludesfunctionsge 增加 admin/gv_queue.php文件 修改 <td class="dataTableContent" align="center"><?php echo $gv_list->fields['order_id']; ?></td> 为 <td class="dataTableContent" align="center"><?php echo zen_get_order_orders_number($gv_list->fields['order_id']); ?></td> ------------------------------------------------------------------ 订单的显示——前台 includes/classes/order.php 修改 $order_query = "select customers_id, customers_name, customers_company, 为 $order_query = "select orders_number, customers_id, customers_name, customers_company, 修改 $this->info = array('currency' => $order->fields['currency'], 为 $this->info = array('currency' => $order->fields['currency'], 修改 EMAIL_TEXT_ORDER_NUMBER . ' ' . $zf_insert_id . "n" . 为 EMAIL_TEXT_ORDER_NUMBER . ' ' . zen_get_order_orders_number($zf_insert_id) . "n" . 修改 zen_mail($this->customer['firstname'] . ' ' . $this->customer['lastname'], $this->customer['email_address'], EMAIL_TEXT_SUBJECT . EMAIL_ORDER_NUMBER_SUBJECT . $zf_insert_id, $email_order, STORE_NAME, EMAIL_FROM, $html_msg, 'checkout', $this->attachArray); 为 zen_mail($this->customer['firstname'] . ' ' . $this->customer['lastname'], $this->customer['email_address'], EMAIL_TEXT_SUBJECT . EMAIL_ORDER_NUMBER_SUBJECT . zen_get_order_orders_number($zf_insert_id), $email_order, STORE_NAME, EMAIL_FROM, $html_msg, 'checkout', $this->attachArray); 修改 zen_mail('', SEND_EXTRA_ORDER_EMAILS_TO, SEND_EXTRA_NEW_ORDERS_EMAILS_TO_SUBJECT . ' ' . EMAIL_TEXT_SUBJECT . EMAIL_ORDER_NUMBER_SUBJECT . $zf_insert_id, 为 zen_mail('', SEND_EXTRA_ORDER_EMAILS_TO, SEND_EXTRA_NEW_ORDERS_EMAILS_TO_SUBJECT . ' ' . EMAIL_TEXT_SUBJECT . EMAIL_ORDER_NUMBER_SUBJECT . zen_get_order_orders_number($zf_insert_id), includes/modules/pages/acco 修改 $orders_query = "SELECT o.orders_id, o.date_purchased, o.delivery_name, 为 $orders_query = "SELECT o.orders_id, o.orders_number, o.date_purchased, o.delivery_name, 修改 $ordersArray[] = array('orders_id'=>$orders->fields['orders_id'], 为 $ordersArray[] = array('orders_id'=>$orders->fields['orders_id'], includes/templates你的模板templates/tpl_account_default.php文件 修改 <td width="30px"><?php echo TEXT_NUMBER_SYMBOL . $orders['orders_id']; ?></td> 为 <td width="30px"><?php echo TEXT_NUMBER_SYMBOL . $orders['orders_number']; ?></td> includes/templates你的模板templates/tpl_account_history_info_default.php文件 修改 <?php echo HEADING_TITLE . ORDER_HEADING_DIVIDER . sprintf(HEADING_ORDER_NUMBER, $_GET['order_id']); ?> 为 <?php echo HEADING_TITLE . ORDER_HEADING_DIVIDER . sprintf(HEADING_ORDER_NUMBER, $order->info['orders_number']); ?> includes/modules/pages/acco 修改 $breadcrumb->add(sprintf(NAVBAR_TITLE_3, $_GET['order_id'])); 为 $breadcrumb->add(sprintf(NAVBAR_TITLE_3, $order->info['orders_number'])); 并移动到 $order = new order($_GET['order_id']); 下面 includes/modules/pages/acco 修改 $history_query_raw = "SELECT o.orders_id, o.date_purchased, o.delivery_name, 为 $history_query_raw = "SELECT o.orders_id, o.orders_number, o.date_purchased, o.delivery_name, includes/templates你的模板templates/tpl_account_history_default.php文件 修改 <?php echo TEXT_ORDER_NUMBER . $history['orders_id']; ?> 为 <?php echo TEXT_ORDER_NUMBER . $history['orders_number']; ?> includesmodulespageschec 修改 $zv_orders_id = (isset($_SESSION['order_number_created']) && $_SESSION['order_number_created'] >= 1) ? $_SESSION['order_number_created'] : $orders_id; 为 $zv_orders_id = $orders->fields['orders_number']; 注释掉 //$orders_id = $zv_orders_id; includesfunctionsfunctio 增加
没有评论
|
|
Copyright © 2012-2013 迪赛普科技 版权所有
合作邮箱:admin@desipo.com 合作QQ:76052083 |