Ignore:
Timestamp:
2013/12/09 11:51:18 (7 years ago)
Author:
undertree
Message:

#2411 非会員購入時に生年月日が登録されない 対応

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/version-2_13-dev/data/class/pages/admin/order/LC_Page_Admin_Order_Edit.php

    r23251 r23300  
    102102        $this->arrORDERSTATUS = $masterData->getMasterData('mtb_order_status'); 
    103103        $this->arrDeviceType = $masterData->getMasterData('mtb_device_type'); 
    104  
    105         $objDate = new SC_Date_Ex(RELEASE_YEAR); 
    106         $this->arrYearShippingDate = $objDate->getYear('', date('Y'), ''); 
    107         $this->arrMonthShippingDate = $objDate->getMonth(true); 
    108         $this->arrDayShippingDate = $objDate->getDay(true); 
     104        $this->arrSex = $masterData->getMasterData('mtb_sex'); 
     105        $this->arrJob = $masterData->getMasterData('mtb_job'); 
     106 
     107        $objShippingDate = new SC_Date_Ex(RELEASE_YEAR); 
     108        $this->arrYearShippingDate = $objShippingDate->getYear('', date('Y'), ''); 
     109        $this->arrMonthShippingDate = $objShippingDate->getMonth(true); 
     110        $this->arrDayShippingDate = $objShippingDate->getDay(true); 
     111 
     112        $objBirthDate = new SC_Date_Ex(BIRTH_YEAR, date('Y',strtotime('now'))); 
     113        $this->arrBirthYear = $objBirthDate->getYear('', START_BIRTH_YEAR, ''); 
     114        $this->arrBirthMonth = $objBirthDate->getMonth(true); 
     115        $this->arrBirthDay = $objBirthDate->getDay(true); 
    109116 
    110117        // 支払い方法の取得 
     
    340347        $objFormParam->addParam('FAX番号2', 'order_fax02', TEL_ITEM_LEN, 'n', array('MAX_LENGTH_CHECK' ,'NUM_CHECK')); 
    341348        $objFormParam->addParam('FAX番号3', 'order_fax03', TEL_ITEM_LEN, 'n', array('MAX_LENGTH_CHECK' ,'NUM_CHECK')); 
     349        $objFormParam->addParam('性別', 'order_sex', TEL_ITEM_LEN, 'n', array('MAX_LENGTH_CHECK' ,'NUM_CHECK')); 
     350        $objFormParam->addParam('職業', 'order_job', TEL_ITEM_LEN, 'n', array('MAX_LENGTH_CHECK' ,'NUM_CHECK')); 
     351        $objFormParam->addParam('生年月日(年)', 'order_birth_year', INT_LEN, 'n', array('MAX_LENGTH_CHECK', 'NUM_CHECK')); 
     352        $objFormParam->addParam('生年月日(月)', 'order_birth_month', INT_LEN, 'n', array('MAX_LENGTH_CHECK', 'NUM_CHECK')); 
     353        $objFormParam->addParam('生年月日(日)', 'order_birth_day', INT_LEN, 'n', array('MAX_LENGTH_CHECK', 'NUM_CHECK')); 
     354        $objFormParam->addParam('生年月日', 'order_birth', STEXT_LEN, 'KVa', array('SPTAB_CHECK', 'MAX_LENGTH_CHECK')); 
    342355 
    343356        // 受注商品情報 
     
    579592         */ 
    580593        $arrOrder = $objPurchase->getOrder($order_id); 
     594 
     595        // 生年月日の処理 
     596        if (!SC_Utils_Ex::isBlank($arrOrder['order_birth'])) { 
     597            $order_birth = substr($arrOrder['order_birth'], 0, 10); 
     598            $arrOrderBirth = explode("-", $order_birth); 
     599 
     600            $arrOrder['order_birth_year'] = intval($arrOrderBirth[0]); 
     601            $arrOrder['order_birth_month'] = intval($arrOrderBirth[1]); 
     602            $arrOrder['order_birth_day'] = intval($arrOrderBirth[2]); 
     603        } 
     604 
    581605        $objFormParam->setParam($arrOrder); 
    582606 
     
    710734            $arrValuesBefore['payment_id'] = NULL; 
    711735        } 
     736 
     737        // 生年月日の調整 
     738        $arrValues['order_birth'] = SC_Utils_Ex::sfGetTimestamp($arrValues['order_birth_year'], $arrValues['order_birth_month'], $arrValues['order_birth_day']); 
    712739 
    713740        // 受注テーブルの更新 
Note: See TracChangeset for help on using the changeset viewer.