Skip to content

Commit

Permalink
[fix] refs #107 完了画面での JavaScript によるトラッキングが多重に行われる
Browse files Browse the repository at this point in the history
  • Loading branch information
seasoftjapan committed Aug 21, 2018
1 parent 212fb1f commit f73a268
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 14 deletions.
2 changes: 1 addition & 1 deletion data/class/pages/contact/LC_Page_Contact_Complete.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ public function init()
parent::init();
$this->tpl_title = 'お問い合わせ(完了ページ)';
$this->tpl_mainno = 'contact';
$this->httpCacheControl('nocache');
}

/**
Expand All @@ -64,6 +65,5 @@ public function process()
public function action()
{
// do nothing...

}
}
3 changes: 2 additions & 1 deletion data/class/pages/entry/LC_Page_Entry.php
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,8 @@ public function action()
}

// 完了ページに移動させる。
SC_Response_Ex::sendRedirect('complete.php', array('ci' => SC_Helper_Customer_Ex::sfGetCustomerId($uniqid)));
$_SESSION['registered_customer_id'] = SC_Helper_Customer_Ex::sfGetCustomerId($uniqid);
SC_Response_Ex::sendRedirect('complete.php');
}
break;
case 'return':
Expand Down
19 changes: 12 additions & 7 deletions data/class/pages/entry/LC_Page_Entry_Complete.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,9 @@ public function process()
*/
public function action()
{
$objCartSess = new SC_CartSession_Ex();

// カートが空かどうかを確認する。
$objCartSess = new SC_CartSession_Ex();
$arrCartKeys = $objCartSess->getKeys();
$this->tpl_cart_empty = true;
foreach ($arrCartKeys as $cart_key) {
Expand All @@ -73,14 +74,18 @@ public function action()
}
}

// メインテンプレートを設定
// 仮会員登録完了
if (CUSTOMER_CONFIRM_MAIL == true) {
// 仮会員登録完了
$this->tpl_mainpage = 'entry/complete.tpl';
} else {
// 本会員登録完了
// 登録された会員ID
$this->tpl_customer_id = $_SESSION['registered_customer_id'];
unset($_SESSION['registered_customer_id']);

// メインテンプレートを設定
$this->tpl_mainpage = 'entry/complete.tpl';
}
// 本会員登録完了
else {
SC_Response_Ex::sendRedirectFromUrlPath('regist/complete.php');
}

}
}
5 changes: 3 additions & 2 deletions data/class/pages/regist/LC_Page_Regist.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,8 @@ public function action()
$registSecretKey = $this->lfRegistData($_GET); //本会員登録(フラグ変更)
$this->lfSendRegistMail($registSecretKey); //本会員登録完了メール送信

SC_Response_Ex::sendRedirect('complete.php', array('ci' => SC_Helper_Customer_Ex::sfGetCustomerId($registSecretKey)));
$_SESSION['registered_customer_id'] = SC_Helper_Customer_Ex::sfGetCustomerId($registSecretKey);
SC_Response_Ex::sendRedirect('complete.php');
break;
//-- それ以外のアクセスは無効とする
default:
Expand Down Expand Up @@ -112,7 +113,7 @@ public function lfRegistData($array)
*/
public function lfCheckError($array)
{
$objErr = new SC_CheckError_Ex($array);
$objErr = new SC_CheckError_Ex($array);

if (preg_match("/^[[:alnum:]]+$/", $array['id'])) {
if (!is_numeric(SC_Helper_Customer_Ex::sfGetCustomerId($array['id'], true))) {
Expand Down
4 changes: 4 additions & 0 deletions data/class/pages/regist/LC_Page_Regist_Complete.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ public function init()
{
parent::init();
$this->tpl_title = '会員登録(完了ページ)';
$this->httpCacheControl('nocache');
}

/**
Expand All @@ -62,5 +63,8 @@ public function process()
*/
public function action()
{
// 登録された会員ID
$this->tpl_customer_id = $_SESSION['registered_customer_id'];
unset($_SESSION['registered_customer_id']);
}
}
2 changes: 2 additions & 0 deletions data/class/pages/shopping/LC_Page_Shopping_Complete.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ public function init()
{
parent::init();
$this->tpl_title = 'ご注文完了';
$this->httpCacheControl('nocache');
}

/**
Expand All @@ -65,6 +66,7 @@ public function process()
public function action()
{
$this->arrInfo = SC_Helper_DB_Ex::sfGetBasisData();
$this->tpl_order_id = $_SESSION['order_id'];
}

/**
Expand Down
4 changes: 1 addition & 3 deletions data/class/pages/shopping/LC_Page_Shopping_Confirm.php
Original file line number Diff line number Diff line change
Expand Up @@ -146,9 +146,7 @@ public function action()
SC_Response_Ex::actionExit();
break;
case 'confirm':
/*
* 決済モジュールで必要なため, 受注番号を取得
*/
// 注文番号を取得
$this->arrForm['order_id'] = $objPurchase->getNextOrderID();
$_SESSION['order_id'] = $this->arrForm['order_id'];

Expand Down

0 comments on commit f73a268

Please sign in to comment.