バージョン選択

フォーラム

メニュー

オンライン状況

49 人のユーザが現在オンラインです。 (27 人のユーザが フォーラム を参照しています。)
登録ユーザ: 1
ゲスト: 48
kynuo8855 もっと...

サイト内検索

質問 > フロント機能 > カートに入れるボタンをクリック後、指定したURLに飛ばしたいです

フロント機能

新規スレッドを追加する

フラット表示 前のトピック | 次のトピック
投稿者 スレッド
sumida
投稿日時: 2014/6/18 16:31
対応状況: −−−
仙人
登録日: 2013/2/10
居住地: 広島県呉市ときどき瀬戸内海
投稿: 641
Re: カートに入れるボタンをクリック後、指定したURLに飛ばしたいです
確認はしていませんが、
以下の

SC_Response_Ex::sendRedirect(CART_URL, $arrQueryString);

部分を変更すればできるような。
data/class/pages/products/LC_Page_Products_List.php

        //カート処理
        $target_product_id = intval($this->arrForm['product_id']);
        if ($target_product_id > 0) {
            // 商品IDの正当性チェック
            if (!SC_Utils_Ex::sfIsInt($this->arrForm['product_id'])
                || !SC_Helper_DB_Ex::sfIsRecord('dtb_products', 'product_id', $this->arrForm['product_id'], 'del_flg = 0 AND status = 1')) {
                SC_Utils_Ex::sfDispSiteError(PRODUCT_NOT_FOUND);
            }

            // 入力内容のチェック
            $arrErr = $this->lfCheckError($objFormParam);
            if (empty($arrErr)) {
                $this->lfAddCart($this->arrForm);

                // 開いているカテゴリーツリーを維持するためのパラメーター
                $arrQueryString = array(
                    'category_id' => $this->arrForm['category_id'],
                );

                SC_Response_Ex::sendRedirect(CART_URL, $arrQueryString);
                SC_Response_Ex::actionExit();
            }
            $js_fnOnLoad .= $this->lfSetSelectedData($this->arrProducts, $this->arrForm, $arrErr, $target_product_id);
        } else {
            // カート「戻るボタン」用に保持
            $netURL = new Net_URL();
            //該当メソッドが無いため、$_SESSIONに直接セット
            $_SESSION['cart_referer_url'] = $netURL->getURL();
        }

data/class/pages/products/LC_Page_Products_Detail.php

    public function doCart()
    {
        $this->arrErr = $this->lfCheckError($this->mode,$this->objFormParam,
                                            $this->tpl_classcat_find1,
                                            $this->tpl_classcat_find2);
        if (count($this->arrErr) == 0) {
            $objCartSess = new SC_CartSession_Ex();
            $product_class_id = $this->objFormParam->getValue('product_class_id');

            $objCartSess->addProduct($product_class_id, $this->objFormParam->getValue('quantity'));

            // 開いているカテゴリーツリーを維持するためのパラメーター
            $arrQueryString = array(
                'product_id' => $this->objFormParam->getValue('product_id'),
            );

            SC_Response_Ex::sendRedirect(CART_URL, $arrQueryString);
            SC_Response_Ex::actionExit();
        }
    }

フラット表示 前のトピック | 次のトピック


題名 投稿者 日時
   カートに入れるボタンをクリック後、指定したURLに飛ばしたいです mamiko 2014/6/18 16:11
     Re: カートに入れるボタンをクリック後、指定したURLに飛ばしたいです piropiro 2014/6/18 16:30
       Re: カートに入れるボタンをクリック後、指定したURLに飛ばしたいです mamiko 2014/6/18 18:09
   » Re: カートに入れるボタンをクリック後、指定したURLに飛ばしたいです sumida 2014/6/18 16:31
       Re: カートに入れるボタンをクリック後、指定したURLに飛ばしたいです mamiko 2014/6/18 18:16
         Re: カートに入れるボタンをクリック後、指定したURLに飛ばしたいです piropiro 2014/6/18 19:06
           Re: カートに入れるボタンをクリック後、指定したURLに飛ばしたいです mamiko 2014/6/19 11:28

 



ログイン


EC-CUBE公式 Amazon Payプラグイン

統計情報

総メンバー数は89,723名です
総投稿数は110,154件です

投稿数ランキング

1
seasoft
7367
2
468
3217
3
AMUAMU
2712
4
nanasess
2314
5
umebius
2085
6
yuh
1819
7
h_tanaka
1657
8
red
1570
9
mcontact
1327
10
tsuji
958
11
fukap
907
12
shutta
835
13
tao_s
799
14 ramrun 789
15 karin 689
16 sumida 641
17
homan
633
18 DELIGHT 572
19
patapata
502
20
flealog
485


ネットショップの壺

EC-CUBEインテグレートパートナー

Copyright© EC-CUBE CO.,LTD. All Rights Reserved.