Changeset 21047


Ignore:
Timestamp:
2011/07/27 13:36:43 (9 years ago)
Author:
468
Message:

#1413 スマートフォン版お気に入りページ用処理(Ajax通信用データ返信)追加

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/version-2_11-dev/data/class/pages/mypage/LC_Page_Mypage_Favorite.php

    r20764 r21047  
    7373 
    7474        switch ($this->getMode()) { 
    75         case 'delete_favorite': 
    76             // お気に入り削除 
    77             $this->lfDeleteFavoriteProduct($customer_id, $_POST['product_id']); 
    78             break; 
     75            case 'delete_favorite': 
     76                // お気に入り削除 
     77                $this->lfDeleteFavoriteProduct($customer_id, $_POST['product_id']); 
     78                break; 
     79            case 'getList': 
     80                // スマートフォン版のもっと見るボタン用 
     81                // ページ送り用 
     82                if (isset($_POST['pageno'])) { 
     83                    $this->tpl_pageno = htmlspecialchars($_POST['pageno'], ENT_QUOTES, CHAR_CODE); 
     84                } 
     85                $this->arrFavorite = $this->lfGetFavoriteProduct($customer_id, $this); 
     86                $this->arrFavorite = $this->lfSetPriceTax($this->arrFavorite); 
     87                echo SC_Utils_Ex::jsonEncode($this->arrFavorite); 
     88                exit; 
     89                break; 
    7990        } 
    8091 
     
    8495        } 
    8596        $this->arrFavorite = $this->lfGetFavoriteProduct($customer_id, $this); 
     97        // 1ページあたりの件数 
     98        $this->dispNumber = SEARCH_PMAX; 
    8699    } 
    87100 
     
    172185        } 
    173186    } 
     187     
     188    /** 
     189     * お気に入り情報配列に税込み金額を追加する 
     190     * 
     191     * @param Array $arrProducts お気に入り一覧情報 
     192     * @return Array $arrProducts お気に入り一覧情報 
     193     */ 
     194    function lfSetPriceTax($arrProducts){ 
     195        foreach($arrProducts as $key=>$val){ 
     196            $arrProducts[$key]['price01_min_format'] = number_format($arrProducts[$key]['price01_min']); 
     197            $arrProducts[$key]['price01_max_format'] = number_format($arrProducts[$key]['price01_max']); 
     198            $arrProducts[$key]['price02_min_format'] = number_format($arrProducts[$key]['price02_min']); 
     199            $arrProducts[$key]['price02_max_format'] = number_format($arrProducts[$key]['price02_max']); 
     200 
     201            $arrProducts[$key]['price01_min_tax'] = SC_Helper_DB::sfCalcIncTax($arrProducts[$key]['price01_min']); 
     202            $arrProducts[$key]['price01_max_tax'] = SC_Helper_DB::sfCalcIncTax($arrProducts[$key]['price01_max']); 
     203            $arrProducts[$key]['price02_min_tax'] = SC_Helper_DB::sfCalcIncTax($arrProducts[$key]['price02_min']); 
     204            $arrProducts[$key]['price02_max_tax'] = SC_Helper_DB::sfCalcIncTax($arrProducts[$key]['price02_max']); 
     205 
     206            $arrProducts[$key]['price01_min_tax_format'] = number_format($arrProducts[$key]['price01_min_tax']); 
     207            $arrProducts[$key]['price01_max_tax_format'] = number_format($arrProducts[$key]['price01_max_tax']); 
     208            $arrProducts[$key]['price02_min_tax_format'] = number_format($arrProducts[$key]['price02_min_tax']); 
     209            $arrProducts[$key]['price02_max_tax_format'] = number_format($arrProducts[$key]['price02_max_tax']); 
     210        } 
     211        return $arrProducts; 
     212    } 
    174213} 
Note: See TracChangeset for help on using the changeset viewer.