- Timestamp:
- 2013/05/02 18:11:36 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/version-2_12-dev/data/Smarty/templates/sphone/mypage/index.tpl
r22563 r22796 102 102 var url = "<!--{$smarty.const.ROOT_URLPATH}-->mypage/history.php"; 103 103 var statusImagePath = "<!--{$TPL_URLPATH}-->"; 104 var arrPayment = <!--{$json_payment}-->105 var arrCustomerOrderStatus = <!--{$json_customer_order_status}-->106 104 107 105 function getHistory(limit) { … … 136 134 historyEl = $(historyEl).clone(true).insertAfter(historyEl); 137 135 maxCnt++; 138 139 var regex = new RegExp('([0-9]{2,4}).([0-9]{1,2}).([0-9]{1,2}).([0-9]{1,2}).([0-9]{1,2}).');140 var matches = history.create_date.match(regex);141 var formatted_date = history.create_date;142 if(matches != null){143 formatted_date = matches[1]+'/'+matches[2]+'/'+matches[3]+' '+matches[4]+':'+matches[5];144 }145 146 var formatted_payment_total = history.payment_total.toString().replace(/([0-9]+?)(?=(?:[0-9]{3})+$)/g , '$1,');147 136 148 137 //注文番号をセット 149 138 $($(".arrowBox span.order_id").get(maxCnt)).text(history.order_id); 150 139 //購入日時をセット 151 $($(".arrowBox span.create_date").get(maxCnt)).text( formatted_date);140 $($(".arrowBox span.create_date").get(maxCnt)).text(history.create_date); 152 141 //支払い方法をセット 153 $($(".arrowBox span.payment_id").get(maxCnt)).text( arrPayment[history.payment_id]);142 $($(".arrowBox span.payment_id").get(maxCnt)).text(history.payment_id); 154 143 //合計金額をセット 155 $($(".arrowBox span.payment_total").get(maxCnt)).text( formatted_payment_total);144 $($(".arrowBox span.payment_total").get(maxCnt)).text(history.payment_total); 156 145 //履歴URLをセット 157 146 $($(".arrowBox a").get(maxCnt)).attr("href", url + "?order_id=" + history.order_id); 158 //注文状況をセット159 $($(".arrowBox span.order_status").get(maxCnt)).text(arrCustomerOrderStatus[history.status]);160 147 } 161 148 }
Note: See TracChangeset
for help on using the changeset viewer.