<span class="price">
         <?php 
        if ((is_array($_tmp = $this->_tpl_vars['arrProducts'][$this->_sections['cnt']['index']]['price02_min']) ? $this->_run_mod_handler('script_escape', true, $_tmp) : smarty_modifier_script_escape($_tmp)) == (is_array($_tmp = $this->_tpl_vars['arrProducts'][$this->_sections['cnt']['index']]['price02_max']) ? $this->_run_mod_handler('script_escape', true, $_tmp) : smarty_modifier_script_escape($_tmp))) {
            ?>
           <?php 
            echo is_array($_tmp = is_array($_tmp = is_array($_tmp = $this->_tpl_vars['arrProducts'][$this->_sections['cnt']['index']]['price02_min']) ? $this->_run_mod_handler('script_escape', true, $_tmp) : smarty_modifier_script_escape($_tmp)) ? $this->_run_mod_handler('sfPreTax', true, $_tmp, is_array($_tmp = $this->_tpl_vars['arrSiteInfo']['tax']) ? $this->_run_mod_handler('script_escape', true, $_tmp) : smarty_modifier_script_escape($_tmp), is_array($_tmp = $this->_tpl_vars['arrSiteInfo']['tax_rule']) ? $this->_run_mod_handler('script_escape', true, $_tmp) : smarty_modifier_script_escape($_tmp)) : SC_Utils_Ex::sfPreTax($_tmp, is_array($_tmp = $this->_tpl_vars['arrSiteInfo']['tax']) ? $this->_run_mod_handler('script_escape', true, $_tmp) : smarty_modifier_script_escape($_tmp), is_array($_tmp = $this->_tpl_vars['arrSiteInfo']['tax_rule']) ? $this->_run_mod_handler('script_escape', true, $_tmp) : smarty_modifier_script_escape($_tmp))) ? $this->_run_mod_handler('number_format', true, $_tmp) : number_format($_tmp);
            ?>

         <?php 
        } else {
            ?>
           <?php 
            echo is_array($_tmp = is_array($_tmp = is_array($_tmp = $this->_tpl_vars['arrProducts'][$this->_sections['cnt']['index']]['price02_min']) ? $this->_run_mod_handler('script_escape', true, $_tmp) : smarty_modifier_script_escape($_tmp)) ? $this->_run_mod_handler('sfPreTax', true, $_tmp, is_array($_tmp = $this->_tpl_vars['arrSiteInfo']['tax']) ? $this->_run_mod_handler('script_escape', true, $_tmp) : smarty_modifier_script_escape($_tmp), is_array($_tmp = $this->_tpl_vars['arrSiteInfo']['tax_rule']) ? $this->_run_mod_handler('script_escape', true, $_tmp) : smarty_modifier_script_escape($_tmp)) : SC_Utils_Ex::sfPreTax($_tmp, is_array($_tmp = $this->_tpl_vars['arrSiteInfo']['tax']) ? $this->_run_mod_handler('script_escape', true, $_tmp) : smarty_modifier_script_escape($_tmp), is_array($_tmp = $this->_tpl_vars['arrSiteInfo']['tax_rule']) ? $this->_run_mod_handler('script_escape', true, $_tmp) : smarty_modifier_script_escape($_tmp))) ? $this->_run_mod_handler('number_format', true, $_tmp) : number_format($_tmp);
            ?>
〜<?php 
            echo is_array($_tmp = is_array($_tmp = is_array($_tmp = $this->_tpl_vars['arrProducts'][$this->_sections['cnt']['index']]['price02_max']) ? $this->_run_mod_handler('script_escape', true, $_tmp) : smarty_modifier_script_escape($_tmp)) ? $this->_run_mod_handler('sfPreTax', true, $_tmp, is_array($_tmp = $this->_tpl_vars['arrSiteInfo']['tax']) ? $this->_run_mod_handler('script_escape', true, $_tmp) : smarty_modifier_script_escape($_tmp), is_array($_tmp = $this->_tpl_vars['arrSiteInfo']['tax_rule']) ? $this->_run_mod_handler('script_escape', true, $_tmp) : smarty_modifier_script_escape($_tmp)) : SC_Utils_Ex::sfPreTax($_tmp, is_array($_tmp = $this->_tpl_vars['arrSiteInfo']['tax']) ? $this->_run_mod_handler('script_escape', true, $_tmp) : smarty_modifier_script_escape($_tmp), is_array($_tmp = $this->_tpl_vars['arrSiteInfo']['tax_rule']) ? $this->_run_mod_handler('script_escape', true, $_tmp) : smarty_modifier_script_escape($_tmp))) ? $this->_run_mod_handler('number_format', true, $_tmp) : number_format($_tmp);
            ?>

         <?php 
        }
        ?>
円</span></span>
         <span class="btnbox"><!--★詳細ボタン★-->
         <?php 
        $this->assign('name', "detail" . $this->_sections['cnt']['iteration']);
        ?>
           <a href="<?php 
        echo is_array($_tmp = @DETAIL_P_HTML) ? $this->_run_mod_handler('script_escape', true, $_tmp) : smarty_modifier_script_escape($_tmp);
        echo is_array($_tmp = $this->_tpl_vars['arrProducts'][$this->_sections['cnt']['index']]['product_id']) ? $this->_run_mod_handler('script_escape', true, $_tmp) : smarty_modifier_script_escape($_tmp);
        ?>
" onmouseover="chgImg('<?php 
                $this->assign('price02', $this->_tpl_vars['arrBestProducts'][$this->_tpl_vars['cnt2']]['price02_min']);
                ?>

      <p>価格<span class="mini">(税込)</span>:<span class="price">
<?php 
                if ((is_array($_tmp = $this->_tpl_vars['price02']) ? $this->_run_mod_handler('script_escape', true, $_tmp) : smarty_modifier_script_escape($_tmp)) == "") {
                    ?>
  <?php 
                    echo is_array($_tmp = is_array($_tmp = is_array($_tmp = $this->_tpl_vars['price01']) ? $this->_run_mod_handler('script_escape', true, $_tmp) : smarty_modifier_script_escape($_tmp)) ? $this->_run_mod_handler('sfPreTax', true, $_tmp, is_array($_tmp = $this->_tpl_vars['arrInfo']['tax']) ? $this->_run_mod_handler('script_escape', true, $_tmp) : smarty_modifier_script_escape($_tmp), is_array($_tmp = $this->_tpl_vars['arrInfo']['tax_rule']) ? $this->_run_mod_handler('script_escape', true, $_tmp) : smarty_modifier_script_escape($_tmp)) : SC_Utils_Ex::sfPreTax($_tmp, is_array($_tmp = $this->_tpl_vars['arrInfo']['tax']) ? $this->_run_mod_handler('script_escape', true, $_tmp) : smarty_modifier_script_escape($_tmp), is_array($_tmp = $this->_tpl_vars['arrInfo']['tax_rule']) ? $this->_run_mod_handler('script_escape', true, $_tmp) : smarty_modifier_script_escape($_tmp))) ? $this->_run_mod_handler('number_format', true, $_tmp) : number_format($_tmp);
                    ?>

<?php 
                } else {
                    ?>
  <?php 
                    echo is_array($_tmp = is_array($_tmp = is_array($_tmp = $this->_tpl_vars['price02']) ? $this->_run_mod_handler('script_escape', true, $_tmp) : smarty_modifier_script_escape($_tmp)) ? $this->_run_mod_handler('sfPreTax', true, $_tmp, is_array($_tmp = $this->_tpl_vars['arrInfo']['tax']) ? $this->_run_mod_handler('script_escape', true, $_tmp) : smarty_modifier_script_escape($_tmp), is_array($_tmp = $this->_tpl_vars['arrInfo']['tax_rule']) ? $this->_run_mod_handler('script_escape', true, $_tmp) : smarty_modifier_script_escape($_tmp)) : SC_Utils_Ex::sfPreTax($_tmp, is_array($_tmp = $this->_tpl_vars['arrInfo']['tax']) ? $this->_run_mod_handler('script_escape', true, $_tmp) : smarty_modifier_script_escape($_tmp), is_array($_tmp = $this->_tpl_vars['arrInfo']['tax_rule']) ? $this->_run_mod_handler('script_escape', true, $_tmp) : smarty_modifier_script_escape($_tmp))) ? $this->_run_mod_handler('number_format', true, $_tmp) : number_format($_tmp);
                    ?>

<?php 
                }
                ?>
円</span>
      </p>

      <p class="mini"><?php 
                echo is_array($_tmp = is_array($_tmp = is_array($_tmp = $this->_tpl_vars['arrBestProducts'][$this->_tpl_vars['cnt2']]['comment']) ? $this->_run_mod_handler('script_escape', true, $_tmp) : smarty_modifier_script_escape($_tmp)) ? $this->_run_mod_handler('escape', true, $_tmp) : smarty_modifier_escape($_tmp)) ? $this->_run_mod_handler('nl2br', true, $_tmp) : smarty_modifier_nl2br($_tmp);
                ?>
</p>
      <?php 
            }
            ?>
 function lfCheek($arrInfo, $mode = "")
 {
     $objDb = new SC_Helper_DB_Ex();
     $arrVal = $this->objFormParam->getHashArray();
     $arrErr = array();
     // 商品の種類数
     $max = count($arrVal['quantity']);
     $subtotal = 0;
     $totalpoint = 0;
     $totaltax = 0;
     for ($i = 0; $i < $max; $i++) {
         // 小計の計算
         $subtotal += SC_Utils_Ex::sfPreTax($arrVal['price'][$i], $arrInfo['tax'], $arrInfo['tax_rule']) * $arrVal['quantity'][$i];
         // 小計の計算
         $totaltax += SC_Utils_Ex::sfTax($arrVal['price'][$i], $arrInfo['tax'], $arrInfo['tax_rule']) * $arrVal['quantity'][$i];
         // 加算ポイントの計算
         $totalpoint += SC_Utils_Ex::sfPrePoint($arrVal['price'][$i], $arrVal['point_rate'][$i]) * $arrVal['quantity'][$i];
     }
     // 消費税
     $arrVal['tax'] = $totaltax;
     // 小計
     $arrVal['subtotal'] = $subtotal;
     // 合計
     $arrVal['total'] = $subtotal - $arrVal['discount'] + $arrVal['deliv_fee'] + $arrVal['charge'];
     // お支払い合計
     $arrVal['payment_total'] = $arrVal['total'] - $arrVal['use_point'] * POINT_VALUE;
     // 加算ポイント
     $arrVal['add_point'] = SC_Utils_Ex::sfGetAddPoint($totalpoint, $arrVal['use_point'], $arrInfo);
     if (strlen($_POST['customer_id']) > 0) {
         list($arrVal['point'], $arrVal['total_point']) = $objDb->sfGetCustomerPointFromCid($_POST['customer_id'], $arrVal['use_point'], $arrVal['add_point']);
     } else {
         list($arrVal['point'], $arrVal['total_point']) = $objDb->sfGetCustomerPoint($_POST['order_id'], $arrVal['use_point'], $arrVal['add_point']);
     }
     if ($arrVal['total'] < 0) {
         $arrErr['total'] = '合計額がマイナス表示にならないように調整して下さい。<br />';
     }
     if ($arrVal['payment_total'] < 0) {
         $arrErr['payment_total'] = 'お支払い合計額がマイナス表示にならないように調整して下さい。<br />';
     }
     //新規追加受注のみ
     if ($mode == "add") {
         if ($arrVal['total_point'] < 0) {
             $arrErr['use_point'] = '最終保持ポイントがマイナス表示にならないように調整して下さい。<br />';
         }
     }
     $this->objFormParam->setParam($arrVal);
     return $arrErr;
 }
Пример #4
0
 /**
  * Page のプロセス.
  *
  * @return void
  */
 function process()
 {
     $objQuery = new SC_Query();
     $objView = new SC_SiteView();
     $objSiteInfo = new SC_SiteInfo();
     //店舗情報をセット
     $arrSiteInfo = $objSiteInfo->data;
     //商品IDを取得
     $product_id = $_GET['product_id'];
     $mode = $_GET['mode'];
     if ($product_id != "" and is_numeric($product_id) or $mode == "all") {
         //商品詳細を取得
         $mode == "all" ? $arrProduct = $this->lfGetProductsDetail($objQuery, $mode) : ($arrProduct = $this->lfGetProductsDetail($objQuery, $product_id));
         // 値のセットし直し
         foreach ($arrProduct as $key => $val) {
             //商品価格を税込みに編集
             $arrProduct[$key]["price02"] = SC_Utils_Ex::sfPreTax($arrProduct[$key]["price02"], $arrSiteInfo["tax"], $arrSiteInfo["tax_rule"]);
             // 画像ファイルのURLセット
             file_exists(IMAGE_SAVE_DIR . $arrProduct[$key]["main_list_image"]) ? $dir = IMAGE_SAVE_URL_RSS : ($dir = IMAGE_TEMP_URL_RSS);
             $arrProduct[$key]["main_list_image"] = $dir . $arrProduct[$key]["main_list_image"];
             file_exists(IMAGE_SAVE_DIR . $arrProduct[$key]["main_image"]) ? $dir = IMAGE_SAVE_URL_RSS : ($dir = IMAGE_TEMP_URL_RSS);
             $arrProduct[$key]["main_image"] = $dir . $arrProduct[$key]["main_image"];
             file_exists(IMAGE_SAVE_DIR . $arrProduct[$key]["main_large_image"]) ? $dir = IMAGE_SAVE_URL_RSS : ($dir = IMAGE_TEMP_URL_RSS);
             $arrProduct[$key]["main_large_image"] = $dir . $arrProduct[$key]["main_large_image"];
             // ポイント計算
             $arrProduct[$key]["point"] = SC_Utils_Ex::sfPrePoint($arrProduct[$key]["price02"], $arrProduct[$key]["point_rate"], POINT_RULE, $arrProduct[$key]["product_id"]);
             // 在庫無制限
             $arrProduct[$key]["stock_unlimited"] = $arrProduct[$key]["stock_unlimited"] == 1 ? "在庫無制限" : NULL;
         }
     } elseif ($mode == "list") {
         //商品一覧を取得
         $arrProduct = $objQuery->getall("SELECT product_id, name AS product_name FROM dtb_products");
     } else {
         $arrProduct = $this->lfGetProductsAllclass($objQuery);
         // 値のセットし直し
         foreach ($arrProduct as $key => $val) {
             //商品価格を税込みに編集
             $arrProduct[$key]["price01_max"] = SC_Utils_Ex::sfPreTax($arrProduct[$key]["price01_max"], $arrSiteInfo["tax"], $arrSiteInfo["tax_rule"]);
             $arrProduct[$key]["price01_min"] = SC_Utils_Ex::sfPreTax($arrProduct[$key]["price01_min"], $arrSiteInfo["tax"], $arrSiteInfo["tax_rule"]);
             $arrProduct[$key]["price02_max"] = SC_Utils_Ex::sfPreTax($arrProduct[$key]["price02_max"], $arrSiteInfo["tax"], $arrSiteInfo["tax_rule"]);
             $arrProduct[$key]["price02_min"] = SC_Utils_Ex::sfPreTax($arrProduct[$key]["price02_min"], $arrSiteInfo["tax"], $arrSiteInfo["tax_rule"]);
             // 画像ファイルのURLセット
             file_exists(IMAGE_SAVE_DIR . $arrProduct[$key]["main_list_image"]) ? $dir = IMAGE_SAVE_URL_RSS : ($dir = IMAGE_TEMP_URL_RSS);
             $arrProduct[$key]["main_list_image"] = $dir . $arrProduct[$key]["main_list_image"];
             file_exists(IMAGE_SAVE_DIR . $arrProduct[$key]["main_image"]) ? $dir = IMAGE_SAVE_URL_RSS : ($dir = IMAGE_TEMP_URL_RSS);
             $arrProduct[$key]["main_image"] = $dir . $arrProduct[$key]["main_image"];
             file_exists(IMAGE_SAVE_DIR . $arrProduct[$key]["main_large_image"]) ? $dir = IMAGE_SAVE_URL_RSS : ($dir = IMAGE_TEMP_URL_RSS);
             $arrProduct[$key]["main_large_image"] = $dir . $arrProduct[$key]["main_large_image"];
             // ポイント計算
             $arrProduct[$key]["point_max"] = SC_Utils_Ex::sfPrePoint($arrProduct[$key]["price02_max"], $arrProduct[$key]["point_rate"], POINT_RULE, $arrProduct[$key]["product_id"]);
             $arrProduct[$key]["point_min"] = SC_Utils_Ex::sfPrePoint($arrProduct[$key]["price02_min"], $arrProduct[$key]["point_rate"], POINT_RULE, $arrProduct[$key]["product_id"]);
         }
     }
     //商品情報をセット
     $this->arrProduct = $arrProduct;
     if (is_array(SC_Utils_Ex::sfswaparray($arrProduct))) {
         $this->arrProductKeys = array_keys(SC_Utils_Ex::sfswaparray($arrProduct));
     }
     //店舗情報をセット
     $this->arrSiteInfo = $arrSiteInfo;
     //セットしたデータをテンプレートファイルに出力
     $objView->assignobj($this);
     //キャッシュしない(念のため)
     header("Pragma: no-cache");
     //XMLテキスト(これがないと正常にRSSとして認識してくれないツールがあるため)
     header("Content-type: application/xml");
     DETAIL_P_HTML;
     //画面表示
     $objView->display($this->tpl_mainpage, true);
 }
Пример #5
0
 function getProductTotal($arrInfo, $id)
 {
     $max = $this->getMax();
     for ($i = 0; $i <= $max; $i++) {
         if (isset($_SESSION[$this->key][$i]['id']) && $_SESSION[$this->key][$i]['id'] == $id) {
             // 税込み合計
             $price = $_SESSION[$this->key][$i]['price'];
             $quantity = $_SESSION[$this->key][$i]['quantity'];
             $pre_tax = SC_Utils_Ex::sfPreTax($price, $arrInfo['tax'], $arrInfo['tax_rule']);
             $total = $pre_tax * $quantity;
             return $total;
         }
     }
     return 0;
 }