本文整理汇总了PHP中SC_Helper_Purchase_Ex类的典型用法代码示例。如果您正苦于以下问题:PHP SC_Helper_Purchase_Ex类的具体用法?PHP SC_Helper_Purchase_Ex怎么用?PHP SC_Helper_Purchase_Ex使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了SC_Helper_Purchase_Ex类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: action
/**
* Page のAction.
*
* @return void
*/
function action()
{
$objCustomer = new SC_Customer_Ex();
$objDb = new SC_Helper_DB_Ex();
$objPurchase = new SC_Helper_Purchase_Ex();
if (!SC_Utils_Ex::sfIsInt($_GET['order_id'])) {
SC_Utils_Ex::sfDispSiteError(CUSTOMER_ERROR);
}
$order_id = $_GET['order_id'];
//受注データの取得
$this->tpl_arrOrderData = $objPurchase->getOrder($order_id, $objCustomer->getValue('customer_id'));
if (empty($this->tpl_arrOrderData)) {
SC_Utils_Ex::sfDispSiteError(CUSTOMER_ERROR);
}
$this->arrShipping = $this->lfGetShippingDate($objPurchase, $order_id, $this->arrWDAY);
$this->isMultiple = count($this->arrShipping) > 1;
// 支払い方法の取得
$this->arrPayment = $objDb->sfGetIDValueList('dtb_payment', 'payment_id', 'payment_method');
// 受注商品明細の取得
$this->tpl_arrOrderDetail = $objPurchase->getOrderDetail($order_id);
$this->tpl_arrOrderDetail = $this->setMainListImage($this->tpl_arrOrderDetail);
$objPurchase->setDownloadableFlgTo($this->tpl_arrOrderDetail);
// モバイルダウンロード対応処理
$this->lfSetAU($this->tpl_arrOrderDetail);
// 受注メール送信履歴の取得
$this->tpl_arrMailHistory = $this->lfGetMailHistory($order_id);
}
示例2: action
/**
* Page のAction.
*
* @return void
*/
public function action()
{
//決済処理中ステータスのロールバック
$objPurchase = new SC_Helper_Purchase_Ex();
$objPurchase->cancelPendingOrder(PENDING_ORDER_CANCEL_FLAG);
SC_Response_Ex::sendRedirect(DIR_INDEX_PATH);
}
示例3: getModulePath
/**
* 受注IDをキーにして, 決済モジュールのパスを取得する.
*
* 決済モジュールが取得できた場合は, require 可能な決済モジュールのパスを返す.
* 受注IDが無効な場合, 取得したパスにファイルが存在しない場合は false
*
* @param integer $order_id 受注ID
* @return string|boolean 成功した場合は決済モジュールのパス;
* 失敗した場合 false
*/
public function getModulePath($order_id)
{
$objPurchase = new SC_Helper_Purchase_Ex();
$objPayment = new SC_Helper_Payment_Ex();
$order = $objPurchase->getOrder($order_id);
$payment = $objPayment->get($order['payment_id']);
$module_path = $payment['module_path'];
/*
* 2.12.x までは dtb_payment.module_path がフルパスとなっていた.
* 2.13.x より, MODULE_REALDIR からのパスでも対応できるよう修正
* http://svn.ec-cube.net/open_trac/ticket/2292
*/
if (realpath($module_path) !== false) {
$module_path = str_replace('\\', '/', realpath($module_path));
} else {
$module_path = str_replace('\\', '/', $module_path);
}
$module_realdir = str_replace('\\', '/', realpath(MODULE_REALDIR) . '/');
if (strpos($module_path, $module_realdir) !== false) {
$module_path = str_replace($module_realdir, '', $module_path);
}
$module_path = $module_realdir . $module_path;
if (file_exists($module_path)) {
return $module_path;
}
return false;
}
开发者ID:ryoogata,项目名称:eccube-SQLAzureSupport-plugin,代码行数:37,代码来源:LC_Page_Shopping_LoadPaymentModule.php
示例4: action
/**
* Page のAction.
*
* @return void
*/
public function action()
{
//決済処理中ステータスのロールバック
$objPurchase = new SC_Helper_Purchase_Ex();
$objPurchase->cancelPendingOrder(PENDING_ORDER_CANCEL_FLAG);
$objCustomer = new SC_Customer_Ex();
$customer_id = $objCustomer->getValue('customer_id');
//ページ送り用
$this->objNavi = new SC_PageNavi_Ex($_REQUEST['pageno'], $this->lfGetOrderHistory($customer_id), SEARCH_PMAX, 'eccube.movePage', NAVI_PMAX, 'pageno=#page#', SC_Display_Ex::detectDevice() !== DEVICE_TYPE_MOBILE);
$this->arrOrder = $this->lfGetOrderHistory($customer_id, $this->objNavi->start_row);
switch ($this->getMode()) {
case 'getList':
echo SC_Utils_Ex::jsonEncode($this->arrOrder);
SC_Response_Ex::actionExit();
break;
default:
break;
}
// 支払い方法の取得
$this->arrPayment = SC_Helper_Payment_Ex::getIDValueList();
// 1ページあたりの件数
$this->dispNumber = SEARCH_PMAX;
$this->json_payment = SC_Utils::jsonEncode($this->arrPayment);
$this->json_customer_order_status = SC_Utils::jsonEncode($this->arrCustomerOrderStatus);
}
示例5: action
/**
* Page のアクション.
*
* @return void
*/
public function action()
{
//決済処理中ステータスのロールバック
$objPurchase = new SC_Helper_Purchase_Ex();
$objPurchase->cancelPendingOrder(PENDING_ORDER_CANCEL_FLAG);
$this->tpl_title = '';
$objCustomer = new SC_Customer_Ex();
$this->isLogin = $objCustomer->isLoginSuccess(true);
}
示例6: action
/**
* Page のアクション.
*
* @return void
*/
public function action()
{
//決済処理中ステータスのロールバック
$objPurchase = new SC_Helper_Purchase_Ex();
$objPurchase->cancelPendingOrder(PENDING_ORDER_CANCEL_FLAG);
$arrKiyaku = $this->lfGetKiyakuData();
$this->max = count($arrKiyaku);
// mobile時はGETでページ指定
if (SC_Display_Ex::detectDevice() == DEVICE_TYPE_MOBILE) {
$this->offset = $this->lfSetOffset($_GET['offset']);
}
$this->tpl_kiyaku_text = $this->lfMakeKiyakuText($arrKiyaku, $this->max, $this->offset);
}
示例7: action
/**
* Page のAction.
*
* @return void
*/
public function action()
{
//決済処理中ステータスのロールバック
$objPurchase = new SC_Helper_Purchase_Ex();
$objPurchase->cancelPendingOrder(PENDING_ORDER_CANCEL_FLAG);
//受注詳細データの取得
$arrOrderDetail = $this->lfGetOrderDetail($_POST['order_id']);
//ログインしていない、またはDBに情報が無い場合
if (empty($arrOrderDetail)) {
SC_Utils_Ex::sfDispSiteError(CUSTOMER_ERROR);
}
$this->lfAddCartProducts($arrOrderDetail);
SC_Response_Ex::sendRedirect(CART_URL);
}
示例8: action
/**
* Page のAction.
*
* @return void
*/
public function action()
{
//決済処理中ステータスのロールバック
$objPurchase = new SC_Helper_Purchase_Ex();
$objPurchase->cancelPendingOrder(PENDING_ORDER_CANCEL_FLAG);
$objProduct = new SC_Product_Ex();
// パラメーター管理クラス
$objFormParam = new SC_FormParam_Ex();
// パラメーター情報の初期化
$this->lfInitParam($objFormParam);
// 値の設定
$objFormParam->setParam($_REQUEST);
// 入力値の変換
$objFormParam->convParam();
// 値の取得
$this->arrForm = $objFormParam->getHashArray();
//modeの取得
$this->mode = $this->getMode();
//表示条件の取得
$this->arrSearchData = array('category_id' => $this->lfGetCategoryId(intval($this->arrForm['category_id'])), 'maker_id' => intval($this->arrForm['maker_id']), 'name' => $this->arrForm['name']);
$this->orderby = $this->arrForm['orderby'];
//ページング設定
$this->tpl_pageno = $this->arrForm['pageno'];
$this->disp_number = $this->lfGetDisplayNum($this->arrForm['disp_number']);
// 画面に表示するサブタイトルの設定
$this->tpl_subtitle = $this->lfGetPageTitle($this->mode, $this->arrSearchData['category_id']);
// 画面に表示する検索条件を設定
$this->arrSearch = $this->lfGetSearchConditionDisp($this->arrSearchData);
// 商品一覧データの取得
$arrSearchCondition = $this->lfGetSearchCondition($this->arrSearchData);
$this->tpl_linemax = $this->lfGetProductAllNum($arrSearchCondition);
$urlParam = "category_id={$this->arrSearchData['category_id']}&pageno=#page#";
// モバイルの場合に検索条件をURLの引数に追加
if (SC_Display_Ex::detectDevice() === DEVICE_TYPE_MOBILE) {
$searchNameUrl = urlencode(mb_convert_encoding($this->arrSearchData['name'], 'SJIS-win', 'UTF-8'));
$urlParam .= "&mode={$this->mode}&name={$searchNameUrl}&orderby={$this->orderby}";
}
$this->objNavi = new SC_PageNavi_Ex($this->tpl_pageno, $this->tpl_linemax, $this->disp_number, 'eccube.movePage', NAVI_PMAX, $urlParam, SC_Display_Ex::detectDevice() !== DEVICE_TYPE_MOBILE);
$this->arrProducts = $this->lfGetProductsList($arrSearchCondition, $this->disp_number, $this->objNavi->start_row, $objProduct);
switch ($this->getMode()) {
case 'json':
$this->doJson($objProduct);
break;
default:
$this->doDefault($objProduct, $objFormParam);
break;
}
$this->tpl_rnd = SC_Utils_Ex::sfGetRandomString(3);
}
示例9: action
/**
* Page のプロセス.
*
* @return void
*/
public function action()
{
//決済処理中ステータスのロールバック
$objPurchase = new SC_Helper_Purchase_Ex();
$objPurchase->cancelPendingOrder(PENDING_ORDER_CANCEL_FLAG);
$objSiteSess = new SC_SiteSession_Ex();
$objCartSess = new SC_CartSession_Ex();
$objCustomer = new SC_Customer_Ex();
$objFormParam = new SC_FormParam_Ex();
$objAddress = new SC_Helper_Address_Ex();
// 複数配送先指定が無効な場合はエラー
if (USE_MULTIPLE_SHIPPING === false) {
SC_Utils_Ex::sfDispSiteError(PAGE_ERROR, '', true);
SC_Response_Ex::actionExit();
}
$this->tpl_uniqid = $objSiteSess->getUniqId();
$this->addrs = $this->getDelivAddrs($objCustomer, $objPurchase, $objAddress);
$this->tpl_addrmax = count($this->addrs) - 2;
// 「選択してください」と会員の住所をカウントしない
$this->lfInitParam($objFormParam);
$objPurchase->verifyChangeCart($this->tpl_uniqid, $objCartSess);
switch ($this->getMode()) {
case 'confirm':
$objFormParam->setParam($_POST);
$this->arrErr = $this->lfCheckError($objFormParam);
if (SC_Utils_Ex::isBlank($this->arrErr)) {
// フォームの情報を一時保存しておく
$_SESSION['multiple_temp'] = $objFormParam->getHashArray();
$this->saveMultipleShippings($this->tpl_uniqid, $objFormParam, $objCustomer, $objPurchase, $objAddress);
$objSiteSess->setRegistFlag();
SC_Response_Ex::sendRedirect('payment.php');
SC_Response_Ex::actionExit();
}
break;
default:
$this->setParamToSplitItems($objFormParam, $objCartSess);
}
// 前のページから戻ってきた場合
if ($_GET['from'] == 'multiple') {
$objFormParam->setParam($_SESSION['multiple_temp']);
}
$this->arrForm = $objFormParam->getFormParamList();
}
示例10: action
function action()
{
parent::action();
if (is_array($this->arrResults) && count($this->arrResults) > 0) {
$objPurchase = new SC_Helper_Purchase_Ex();
$detect = new Mobile_Detect();
foreach ($this->arrResults as &$order) {
$order["detail"] = $objPurchase->getOrderDetail($order["order_id"]);
if (isset($order["useragent"])) {
$detect->setUserAgent($order["useragent"]);
$useragent = array();
if ($detect->is("AndroidOS")) {
preg_match("{.*;([^;]+) Build}", $order["useragent"], $useragent);
$order["device"] = $useragent[1];
}
}
}
}
}
示例11: action
/**
* Page のAction.
*
* @return void
*/
public function action()
{
//決済処理中ステータスのロールバック
$objPurchase = new SC_Helper_Purchase_Ex();
$objPurchase->cancelPendingOrder(PENDING_ORDER_CANCEL_FLAG);
$objCustomer = new SC_Customer_Ex();
$objProduct = new SC_Product();
if (!SC_Utils_Ex::sfIsInt($_GET['order_id'])) {
SC_Utils_Ex::sfDispSiteError(CUSTOMER_ERROR);
}
$order_id = $_GET['order_id'];
$this->is_price_change = false;
//受注データの取得
$this->tpl_arrOrderData = $objPurchase->getOrder($order_id, $objCustomer->getValue('customer_id'));
if (empty($this->tpl_arrOrderData)) {
SC_Utils_Ex::sfDispSiteError(CUSTOMER_ERROR);
}
$this->arrShipping = $this->lfGetShippingDate($objPurchase, $order_id, $this->arrWDAY);
$this->isMultiple = count($this->arrShipping) > 1;
// 支払い方法の取得
$this->arrPayment = SC_Helper_Payment_Ex::getIDValueList();
// 受注商品明細の取得
$this->tpl_arrOrderDetail = $objPurchase->getOrderDetail($order_id);
foreach ($this->tpl_arrOrderDetail as $product_index => $arrOrderProductDetail) {
//必要なのは商品の販売金額のみなので、遅い場合は、別途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($this->tpl_arrOrderDetail[$product_index]['price'], $this->tpl_arrOrderDetail[$product_index]['tax_rate'], $this->tpl_arrOrderDetail[$product_index]['tax_rule']);
$arrTempProductDetail['price02_inctax'] = SC_Helper_TaxRule_Ex::sfCalcIncTax($arrTempProductDetail['price02'], $arrTempProductDetail['product_id'], $arrTempProductDetail['product_class_id']);
if ($this->tpl_arrOrderDetail[$product_index]['price_inctax'] != $arrTempProductDetail['price02_inctax']) {
$this->is_price_change = true;
}
$this->tpl_arrOrderDetail[$product_index]['product_price_inctax'] = $arrTempProductDetail['price02_inctax'] ? $arrTempProductDetail['price02_inctax'] : 0;
}
$this->tpl_arrOrderDetail = $this->setMainListImage($this->tpl_arrOrderDetail);
$objPurchase->setDownloadableFlgTo($this->tpl_arrOrderDetail);
// モバイルダウンロード対応処理
$this->lfSetAU($this->tpl_arrOrderDetail);
// 受注メール送信履歴の取得
$this->tpl_arrMailHistory = $this->lfGetMailHistory($order_id);
}
示例12: action
/**
* Page のアクション.
*
* @return void
*/
function action()
{
$objCartSess = new SC_CartSession_Ex();
$objSiteSess = new SC_SiteSession_Ex();
$objCustomer = new SC_Customer_Ex();
$objPurchase = new SC_Helper_Purchase_Ex();
$objHelperMail = new SC_Helper_Mail_Ex();
$this->is_multiple = $objPurchase->isMultiple();
// 前のページで正しく登録手続きが行われた記録があるか判定
if (!$objSiteSess->isPrePage()) {
SC_Utils_Ex::sfDispSiteError(PAGE_ERROR, $objSiteSess);
}
// ユーザユニークIDの取得と購入状態の正当性をチェック
$this->tpl_uniqid = $objSiteSess->getUniqId();
$objPurchase->verifyChangeCart($this->tpl_uniqid, $objCartSess);
$this->cartKey = $objCartSess->getKey();
// カート内商品のチェック
$this->tpl_message = $objCartSess->checkProducts($this->cartKey);
if (!SC_Utils_Ex::isBlank($this->tpl_message)) {
SC_Response_Ex::sendRedirect(CART_URLPATH);
SC_Response_Ex::actionExit();
}
// カートの商品を取得
$this->arrShipping = $objPurchase->getShippingTemp($this->is_multiple);
$this->arrCartItems = $objCartSess->getCartList($this->cartKey);
// 合計金額
$this->tpl_total_inctax[$this->cartKey] = $objCartSess->getAllProductsTotal($this->cartKey);
// 税額
$this->tpl_total_tax[$this->cartKey] = $objCartSess->getAllProductsTax($this->cartKey);
// ポイント合計
$this->tpl_total_point[$this->cartKey] = $objCartSess->getAllProductsPoint($this->cartKey);
// 一時受注テーブルの読込
$arrOrderTemp = $objPurchase->getOrderTemp($this->tpl_uniqid);
// カート集計を元に最終計算
$arrCalcResults = $objCartSess->calculate($this->cartKey, $objCustomer, $arrOrderTemp['use_point'], $objPurchase->getShippingPref($this->is_multiple), $arrOrderTemp['charge'], $arrOrderTemp['discount'], $arrOrderTemp['deliv_id']);
$this->arrForm = array_merge($arrOrderTemp, $arrCalcResults);
// 会員ログインチェック
if ($objCustomer->isLoginSuccess(true)) {
$this->tpl_login = '1';
$this->tpl_user_point = $objCustomer->getValue('point');
}
// 決済モジュールを使用するかどうか
$this->use_module = SC_Helper_Payment_Ex::useModule($this->arrForm['payment_id']);
switch ($this->getMode()) {
// 前のページに戻る
case 'return':
// 正常な推移であることを記録しておく
$objSiteSess->setRegistFlag();
SC_Response_Ex::sendRedirect(SHOPPING_PAYMENT_URLPATH);
SC_Response_Ex::actionExit();
break;
case 'confirm':
/*
* 決済モジュールで必要なため, 受注番号を取得
*/
$this->arrForm['order_id'] = $objPurchase->getNextOrderID();
$_SESSION['order_id'] = $this->arrForm['order_id'];
// 集計結果を受注一時テーブルに反映
$objPurchase->saveOrderTemp($this->tpl_uniqid, $this->arrForm, $objCustomer);
// 正常に登録されたことを記録しておく
$objSiteSess->setRegistFlag();
// 決済モジュールを使用する場合
if ($this->use_module) {
$objPurchase->completeOrder(ORDER_PENDING);
SC_Response_Ex::sendRedirect(SHOPPING_MODULE_URLPATH);
} else {
$objPurchase->completeOrder(ORDER_NEW);
$template_id = SC_Display_Ex::detectDevice() == DEVICE_TYPE_MOBILE ? 2 : 1;
$objHelperMail->sfSendOrderMail($this->arrForm['order_id'], $template_id);
SC_Response_Ex::sendRedirect(SHOPPING_COMPLETE_URLPATH);
}
SC_Response_Ex::actionExit();
break;
default:
break;
}
}
示例13: lfGetOrderData
private function lfGetOrderData($order_id)
{
if (SC_Utils_Ex::sfIsInt($order_id)) {
// DBから受注情報を読み込む
$objPurchase = new SC_Helper_Purchase_Ex();
$this->arrDisp = $objPurchase->getOrder($order_id);
list($point) = SC_Helper_Customer_Ex::sfGetCustomerPoint($order_id, $this->arrDisp['use_point'], $this->arrDisp['add_point']);
$this->arrDisp['point'] = $point;
// 受注詳細データの取得
$arrRet = $objPurchase->getOrderDetail($order_id);
$arrRet = SC_Utils_Ex::sfSwapArray($arrRet);
$this->arrDisp = array_merge($this->arrDisp, $arrRet);
// その他支払い情報を表示
if ($this->arrDisp['memo02'] != '') {
$this->arrDisp['payment_info'] = unserialize($this->arrDisp['memo02']);
}
$this->arrDisp['payment_type'] = 'お支払い';
}
}
示例14: lfStatusMove
/**
* 対応状況の更新
*/
function lfStatusMove($statusId, $arrOrderId)
{
$objPurchase = new SC_Helper_Purchase_Ex();
$objQuery =& SC_Query_Ex::getSingletonInstance();
if (!isset($arrOrderId) || !is_array($arrOrderId)) {
return false;
}
$masterData = new SC_DB_MasterData_Ex();
$arrORDERSTATUS = $masterData->getMasterData('mtb_order_status');
$objQuery->begin();
foreach ($arrOrderId as $orderId) {
$objPurchase->sfUpdateOrderStatus($orderId, $statusId);
}
$objQuery->commit();
$this->tpl_onload = "window.alert('" . t('c_The selected item was moved to T_ARG1._01', array('T_ARG1' => $arrORDERSTATUS[$statusId])) . "');";
return true;
}
示例15: lfStatusMove
/**
* 対応状況の更新
*/
function lfStatusMove($statusId, $arrOrderId)
{
$objPurchase = new SC_Helper_Purchase_Ex();
$objQuery =& SC_Query_Ex::getSingletonInstance();
if (!isset($arrOrderId) || !is_array($arrOrderId)) {
return false;
}
$masterData = new SC_DB_MasterData_Ex();
$arrORDERSTATUS = $masterData->getMasterData('mtb_order_status');
$objQuery->begin();
foreach ($arrOrderId as $orderId) {
$objPurchase->sfUpdateOrderStatus($orderId, $statusId);
}
$objQuery->commit();
$this->tpl_onload = "window.alert('選択項目を" . $arrORDERSTATUS[$statusId] . "へ移動しました。');";
return true;
}