Changeset 23596


Ignore:
Timestamp:
2014/08/20 23:17:47 (7 years ago)
Author:
dkazuto
Message:

#2453 購入フロー>支払方法・お届け先時間の指定においてdeliv_idの数値チェックを行うように修正

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/version-2_13-dev/data/class/pages/shopping/LC_Page_Shopping_Payment.php

    r23546 r23596  
    157157                // パラメーター情報の初期化 
    158158                $this->setFormParams($objFormParam, $_POST, $this->is_download, $this->arrShipping); 
    159  
    160                 $deliv_id = $objFormParam->getValue('deliv_id'); 
    161                 $arrSelectedDeliv = $this->getSelectedDeliv($objCartSess, $deliv_id); 
    162                 $this->arrPayment = $arrSelectedDeliv['arrPayment']; 
    163                 $this->arrDelivTime = $arrSelectedDeliv['arrDelivTime']; 
    164                 $this->img_show = $arrSelectedDeliv['img_show']; 
    165  
    166159                $this->arrErr = $this->lfCheckError($objFormParam, $this->arrPrices['subtotal'], $this->tpl_user_point); 
    167160 
     
    176169                    SC_Response_Ex::sendRedirect(SHOPPING_CONFIRM_URLPATH); 
    177170                    SC_Response_Ex::actionExit(); 
     171                } else { 
     172                    $deliv_id = $objFormParam->getValue('deliv_id'); 
     173 
     174                    if(strval($deliv_id) !== strval(intval($deliv_id))){ 
     175                        $deliv_id = $this->arrDeliv[0]['deliv_id']; 
     176                        $objFormParam->setValue('deliv_id', $deliv_id); 
     177                    } 
     178 
     179                    $arrSelectedDeliv = $this->getSelectedDeliv($objCartSess, $deliv_id); 
     180                    $this->arrPayment = $arrSelectedDeliv['arrPayment']; 
     181                    $this->arrDelivTime = $arrSelectedDeliv['arrDelivTime']; 
     182                    $this->img_show = $arrSelectedDeliv['img_show']; 
     183 
    178184                } 
    179185 
     
    392398    { 
    393399        $arrResults = array(); 
    394         $arrResults['arrDelivTime'] = SC_Helper_Delivery_Ex::getDelivTime($deliv_id); 
    395         $total = $objCartSess->getAllProductsTotal($objCartSess->getKey()); 
    396         $payments_deliv = SC_Helper_Delivery_Ex::getPayments($deliv_id); 
    397         $objPayment = new SC_Helper_Payment_Ex(); 
    398         $payments_total = $objPayment->getByPrice($total); 
    399         $arrPayment = array(); 
    400         foreach ($payments_total as $payment) { 
    401             if (in_array($payment['payment_id'], $payments_deliv)) { 
    402                 $arrPayment[] = $payment; 
    403             } 
    404         } 
    405         $arrResults['arrPayment'] = $arrPayment; 
    406         $arrResults['img_show'] = $this->hasPaymentImage($arrResults['arrPayment']); 
    407  
     400        if (strval($deliv_id) === strval(intval($deliv_id))) { 
     401            $arrResults['arrDelivTime'] = SC_Helper_Delivery_Ex::getDelivTime($deliv_id); 
     402            $total = $objCartSess->getAllProductsTotal($objCartSess->getKey()); 
     403            $payments_deliv = SC_Helper_Delivery_Ex::getPayments($deliv_id); 
     404            $objPayment = new SC_Helper_Payment_Ex(); 
     405            $payments_total = $objPayment->getByPrice($total); 
     406            $arrPayment = array(); 
     407            foreach ($payments_total as $payment) { 
     408                if (in_array($payment['payment_id'], $payments_deliv)) { 
     409                    $arrPayment[] = $payment; 
     410                } 
     411            } 
     412            $arrResults['arrPayment'] = $arrPayment; 
     413            $arrResults['img_show'] = $this->hasPaymentImage($arrResults['arrPayment']); 
     414        } 
    408415        return $arrResults; 
    409416    } 
Note: See TracChangeset for help on using the changeset viewer.