Calendar

<< 6月 >>
1234567
891011121314
15161718192021
22232425262728
2930  

Mobile

  • EC-CUBEで会員機能を無くし更に「お支払方法・お届け時間等の指定」ページも無くす
  • 2015.06.20
  • ECCUBEバージョン:2.13.3

    対象ファイル
    data/class/pages/shopping/LC_Page_Shopping.php
    data/Smarty/templates/default/shopping/confirm.tpl

    対象関数
    LC_Page_Shopping.php内のaction

    【以下変更箇所抜粋】

    ●変更前
    // お客様情報登録
    case ‘nonmember_confirm’:
    $this->tpl_mainpage = $nonmember_mainpage;
    $this->tpl_title = $nonmember_title;
    $this->lfInitParam($objFormParam);
    $objFormParam->setParam($_POST);
    $this->arrErr = $this->lfCheckError($objFormParam);

    if (SC_Utils_Ex::isBlank($this->arrErr)) {
    $this->lfRegistData($this->tpl_uniqid, $objPurchase, $objCustomer, $objFormParam);

    $arrParams = $objFormParam->getHashArray();
    $shipping_id = $arrParams[‘deliv_check’] == ‘1’ ? 1 : 0;
    $objPurchase->setShipmentItemTempForSole($objCartSess, $shipping_id);

    $objSiteSess->setRegistFlag();

    SC_Response_Ex::sendRedirect(SHOPPING_PAYMENT_URLPATH);
    SC_Response_Ex::actionExit();
    }
    break;

    default:
    // 前のページから戻ってきた場合は, お客様情報入力ページ
    if (isset($_GET[‘from’]) && $_GET[‘from’] == ‘nonmember’) {
    $this->tpl_mainpage = $nonmember_mainpage;
    $this->tpl_title = $nonmember_title;
    $this->lfInitParam($objFormParam);
    } else {
    // 通常はログインページ
    $this->lfInitLoginFormParam($objFormParam);
    }

    $this->setFormParams($objFormParam, $objPurchase, $this->tpl_uniqid);
    break;

    ●変更後
    // お客様情報登録
    case ‘nonmember_confirm’:
    $this->tpl_mainpage = $nonmember_mainpage;
    $this->tpl_title = $nonmember_title;
    $this->lfInitParam($objFormParam);
    $objFormParam->setParam($_POST);
    $this->arrErr = $this->lfCheckError($objFormParam);

    if (SC_Utils_Ex::isBlank($this->arrErr)) {
    $this->lfRegistData($this->tpl_uniqid, $objPurchase, $objCustomer, $objFormParam);

    $arrParams = $objFormParam->getHashArray();
    $shipping_id = $arrParams[‘deliv_check’] == ‘1’ ? 1 : 0;
    $objPurchase->setShipmentItemTempForSole($objCartSess, $shipping_id);

    $objSiteSess->setRegistFlag();

    SC_Response_Ex::sendRedirect(SHOPPING_CONFIRM_URLPATH);
    // SC_Response_Ex::sendRedirect(SHOPPING_PAYMENT_URLPATH);
    SC_Response_Ex::actionExit();
    }
    break;

    default:
    // 前のページから戻ってきた場合は, お客様情報入力ページ
    // if (isset($_GET[‘from’]) && $_GET[‘from’] == ‘nonmember’) {
    $this->tpl_mainpage = $nonmember_mainpage;
    $this->tpl_title = $nonmember_title;
    $this->lfInitParam($objFormParam);
    // } else {
    // 通常はログインページ
    // $this->lfInitLoginFormParam($objFormParam);
    // }

    $this->setFormParams($objFormParam, $objPurchase, $this->tpl_uniqid);
    break;

    メンテナンス性を考え、実際には「LC_Page_Shopping_Ex.php」に変更箇所だけ記述して上書きしています。
    まず、defaultの所で、ログインページを表示するのをやめゲスト購入だけ表示するようにしました。
    またサイト内ではMyページ等へのリンクも全て削除する必要があります。

    次にnonmember_confirmの所でリダイレクト先をSHOPPING_CONFIRM_URLPATHに変更しています。

    最後にconfirm.phpの「戻る」ボタンのリンク先を<a href="./payment.php">から<a href="payment.php?mode=return">に変更して戻り先をお客様情報入力画面に変更しました。

【この記事のタグ】
コメント&トラックバック(0)

▲ PAGE TOP