Skip to content

Commit

Permalink
Merge pull request #182 from nobuhiko/fix_systemerror
Browse files Browse the repository at this point in the history
存在しないproduct_class_idを指定した時にシステムエラーになるのでその対応
  • Loading branch information
okazy authored Feb 1, 2018
2 parents 97eb2dc + 83de4fd commit c77b857
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions data/class/pages/mypage/LC_Page_Mypage_History.php
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,11 @@ public function action()
// 受注商品明細の取得
$this->tpl_arrOrderDetail = $objPurchase->getOrderDetail($order_id);
foreach ($this->tpl_arrOrderDetail as $product_index => $arrOrderProductDetail) {
//必要なのは商品の販売金額のみなので、遅い場合は、別途SQL作成した方が良い
$arrTempProductDetail = $objProduct->getProductsClass($arrOrderProductDetail['product_class_id']);
//
if (SC_Helper_DB_Ex::sfDataExists('dtb_products_class', 'product_class_id = ?', array($arrOrderProductDetail['product_class_id']))) {
//必要なのは商品の販売金額のみなので、遅い場合は、別途SQL作成した方が良い
$arrTempProductDetail = $objProduct->getProductsClass($arrOrderProductDetail['product_class_id']);
}
// 税計算
$this->tpl_arrOrderDetail[$product_index]['price_inctax'] = $this->tpl_arrOrderDetail[$product_index]['price'] +
SC_Helper_TaxRule_Ex::calcTax(
Expand Down

0 comments on commit c77b857

Please sign in to comment.