source: branches/version-2_12-dev/data/class/pages/products/LC_Page_Products_Detail.php @ 21594

Revision 21594, 23.6 KB checked in by h_yoshimoto, 12 years ago (diff)

#1687 プラグイン機能(フックポイント:フロント画面)を実装

  • Property svn:eol-style set to LF
  • Property svn:keywords set to Id
  • Property svn:mime-type set to text/x-httpd-php; charset=UTF-8
Line 
1<?php
2/*
3 * This file is part of EC-CUBE
4 *
5 * Copyright(c) 2000-2011 LOCKON CO.,LTD. All Rights Reserved.
6 *
7 * http://www.lockon.co.jp/
8 *
9 * This program is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU General Public License
11 * as published by the Free Software Foundation; either version 2
12 * of the License, or (at your option) any later version.
13 *
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17 * GNU General Public License for more details.
18 *
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
22 */
23
24// {{{ requires
25require_once CLASS_EX_REALDIR . 'page_extends/LC_Page_Ex.php';
26
27if (file_exists(MODULE_REALDIR . 'mdl_gmopg/inc/function.php')) {
28    require_once MODULE_REALDIR . 'mdl_gmopg/inc/function.php';
29}
30/**
31 * 商品詳細 のページクラス.
32 *
33 * @package Page
34 * @author LOCKON CO.,LTD.
35 * @version $Id:LC_Page_Products_Detail.php 15532 2007-08-31 14:39:46Z nanasess $
36 */
37class LC_Page_Products_Detail extends LC_Page_Ex {
38
39    /** 商品ステータス */
40    var $arrSTATUS;
41
42    /** 商品ステータス画像 */
43    var $arrSTATUS_IMAGE;
44
45    /** 発送予定日 */
46    var $arrDELIVERYDATE;
47
48    /** おすすめレベル */
49    var $arrRECOMMEND;
50
51    /** フォームパラメーター */
52    var $objFormParam;
53
54    /** アップロードファイル */
55    var $objUpFile;
56
57    /** モード */
58    var $mode;
59
60    // }}}
61    // {{{ functions
62
63    /**
64     * Page を初期化する.
65     *
66     * @return void
67     */
68    function init() {
69        parent::init();
70        $masterData = new SC_DB_MasterData_Ex();
71        $this->arrSTATUS = $masterData->getMasterData('mtb_status');
72        $this->arrSTATUS_IMAGE = $masterData->getMasterData('mtb_status_image');
73        $this->arrDELIVERYDATE = $masterData->getMasterData('mtb_delivery_date');
74        $this->arrRECOMMEND = $masterData->getMasterData('mtb_recommend');
75    }
76
77    /**
78     * Page のプロセス.
79     *
80     * @return void
81     */
82    function process() {
83        parent::process();
84        $this->action();
85        $this->sendResponse();
86    }
87
88    /**
89     * Page のAction.
90     *
91     * @return void
92     */
93    function action() {
94        // フックポイント.
95        $objPlugin = SC_Helper_Plugin_Ex::getSingletonInstance($this->plugin_activate_flg);
96        $objPlugin->doAction('lc_page_products_detail_action_start', array($this));
97       
98        // 会員クラス
99        $objCustomer = new SC_Customer_Ex();
100
101        // パラメーター管理クラス
102        $this->objFormParam = new SC_FormParam_Ex();
103        // パラメーター情報の初期化
104        $this->arrForm = $this->lfInitParam($this->objFormParam);
105        // ファイル管理クラス
106        $this->objUpFile = new SC_UploadFile_Ex(IMAGE_TEMP_REALDIR, IMAGE_SAVE_REALDIR);
107        // ファイル情報の初期化
108        $this->objUpFile = $this->lfInitFile($this->objUpFile);
109
110        // プロダクトIDの正当性チェック
111        $product_id = $this->lfCheckProductId($this->objFormParam->getValue('admin'),$this->objFormParam->getValue('product_id'));
112        $this->mode = $this->getMode();
113
114        $objProduct = new SC_Product_Ex();
115        $objProduct->setProductsClassByProductIds(array($product_id));
116
117        // 規格1クラス名
118        $this->tpl_class_name1 = $objProduct->className1[$product_id];
119
120        // 規格2クラス名
121        $this->tpl_class_name2 = $objProduct->className2[$product_id];
122
123        // 規格1
124        $this->arrClassCat1 = $objProduct->classCats1[$product_id];
125
126        // 規格1が設定されている
127        $this->tpl_classcat_find1 = $objProduct->classCat1_find[$product_id];
128        // 規格2が設定されている
129        $this->tpl_classcat_find2 = $objProduct->classCat2_find[$product_id];
130
131        $this->tpl_stock_find = $objProduct->stock_find[$product_id];
132        $this->tpl_product_class_id = $objProduct->classCategories[$product_id]['__unselected']['__unselected']['product_class_id'];
133        $this->tpl_product_type = $objProduct->classCategories[$product_id]['__unselected']['__unselected']['product_type'];
134
135        // 在庫が無い場合は、OnLoadしない。(javascriptエラー防止)
136        if ($this->tpl_stock_find) {
137            // 規格選択セレクトボックスの作成
138            $this->js_lnOnload .= $this->lfMakeSelect();
139        }
140
141        $this->tpl_javascript .= 'classCategories = ' . SC_Utils_Ex::jsonEncode($objProduct->classCategories[$product_id]) . ';';
142        $this->tpl_javascript .= 'function lnOnLoad(){' . $this->js_lnOnload . '}';
143        $this->tpl_onload .= 'lnOnLoad();';
144
145        // モバイル用 規格選択セレクトボックスの作成
146        if (SC_Display_Ex::detectDevice() == DEVICE_TYPE_MOBILE) {
147            $this->lfMakeSelectMobile($this, $product_id,$this->objFormParam->getValue('classcategory_id1'));
148        }
149
150        // 商品IDをFORM内に保持する
151        $this->tpl_product_id = $product_id;
152
153        switch ($this->mode) {
154            case 'cart':
155                $this->arrErr = $this->lfCheckError($this->mode,$this->objFormParam,
156                                                    $this->tpl_classcat_find1,
157                                                    $this->tpl_classcat_find2);
158                if (count($this->arrErr) == 0) {
159                    $objCartSess = new SC_CartSession_Ex();
160                    $product_class_id = $this->objFormParam->getValue('product_class_id');
161
162                    $objCartSess->addProduct($product_class_id, $this->objFormParam->getValue('quantity'));
163                   
164                    // フックポイント.
165                    $objPlugin = SC_Helper_Plugin_Ex::getSingletonInstance($this->plugin_activate_flg);
166                    $objPlugin->doAction('lc_page_products_detail_action_cart', array($this));
167
168                    SC_Response_Ex::sendRedirect(CART_URLPATH);
169                    exit;
170                }
171                break;
172            case 'add_favorite':
173                // ログイン中のユーザが商品をお気に入りにいれる処理
174                if ($objCustomer->isLoginSuccess() === true && $this->objFormParam->getValue('favorite_product_id') > 0) {
175                    $this->arrErr = $this->lfCheckError($this->mode,$this->objFormParam);
176                    if (count($this->arrErr) == 0) {
177                        if (!$this->lfRegistFavoriteProduct($this->objFormParam->getValue('favorite_product_id'),$objCustomer->getValue('customer_id'))) {
178                            // フックポイント.
179                            $objPlugin = SC_Helper_Plugin_Ex::getSingletonInstance($this->plugin_activate_flg);
180                            $objPlugin->doAction('lc_page_products_detail_action_add_favorite', array($this));
181                           
182                            exit;
183                        }
184                    }
185                }
186                break;
187
188            case 'add_favorite_sphone':
189                // ログイン中のユーザが商品をお気に入りにいれる処理(スマートフォン用)
190                if ($objCustomer->isLoginSuccess() === true && $this->objFormParam->getValue('favorite_product_id') > 0) {
191                    $this->arrErr = $this->lfCheckError($this->mode,$this->objFormParam);
192                    if (count($this->arrErr) == 0) {
193                        if ($this->lfRegistFavoriteProduct($this->objFormParam->getValue('favorite_product_id'),$objCustomer->getValue('customer_id'))) {
194                            // フックポイント.
195                            $objPlugin = SC_Helper_Plugin_Ex::getSingletonInstance($this->plugin_activate_flg);
196                            $objPlugin->doAction('lc_page_products_detail_action_add_favorite_sphone', array($this));
197                           
198                            print 'true';
199                            exit;
200                        }
201                    }
202                    print 'error';
203                    exit;
204                }
205                break;
206
207            case 'select':
208            case 'select2':
209            case 'selectItem':
210                /**
211                 * モバイルの数量指定・規格選択の際に、
212                 * $_SESSION['cart_referer_url'] を上書きさせないために、
213                 * 何もせずbreakする。
214                 */
215                break;
216
217            default:
218                // カート「戻るボタン」用に保持
219                $netURL = new Net_URL();
220                $_SESSION['cart_referer_url'] = $netURL->getURL();
221                break;
222        }
223
224        // モバイル用 ポストバック処理
225        if (SC_Display_Ex::detectDevice() == DEVICE_TYPE_MOBILE) {
226            switch ($this->mode) {
227                case 'select':
228                    // 規格1が設定されている場合
229                    if ($this->tpl_classcat_find1) {
230                        // templateの変更
231                        $this->tpl_mainpage = 'products/select_find1.tpl';
232                        break;
233                    }
234
235                    // 数量の入力を行う
236                    $this->tpl_mainpage = 'products/select_item.tpl';
237                    break;
238
239                case 'select2':
240                    $this->arrErr = $this->lfCheckError($this->mode,$this->objFormParam,$this->tpl_classcat_find1,$this->tpl_classcat_find2);
241
242                    // 規格1が設定されていて、エラーを検出した場合
243                    if ($this->tpl_classcat_find1 and $this->arrErr['classcategory_id1']) {
244                        // templateの変更
245                        $this->tpl_mainpage = 'products/select_find1.tpl';
246                        break;
247                    }
248
249                    // 規格2が設定されている場合
250                    if ($this->tpl_classcat_find2) {
251                        $this->arrErr = array();
252
253                        $this->tpl_mainpage = 'products/select_find2.tpl';
254                        break;
255                    }
256
257                case 'selectItem':
258                    $this->arrErr = $this->lfCheckError($this->mode,$this->objFormParam,$this->tpl_classcat_find1,$this->tpl_classcat_find2);
259
260                    // 規格2が設定されていて、エラーを検出した場合
261                    if ($this->tpl_classcat_find2 and $this->arrErr['classcategory_id2']) {
262                        // templateの変更
263                        $this->tpl_mainpage = 'products/select_find2.tpl';
264                        break;
265                    }
266
267                    $value1 = $this->objFormParam->getValue('classcategory_id1');
268                    $value2 = '#' . $this->objFormParam->getValue('classcategory_id2');
269
270                    if (strlen($value1) === 0) {
271                        $value1 = '__unselected';
272                    }
273
274                    $this->tpl_product_class_id = $objProduct->classCategories[$product_id][$value1][$value2]['product_class_id'];
275
276                    // この段階では、数量の入力チェックエラーを出させない。
277                    unset($this->arrErr['quantity']);
278
279                    // 数量の入力を行う
280                    $this->tpl_mainpage = 'products/select_item.tpl';
281                    break;
282
283                case 'cart':
284                    // この段階でエラーが出る場合は、数量の入力エラーのはず
285                    if (count($this->arrErr)) {
286                        // 数量の入力を行う
287                        $this->tpl_mainpage = 'products/select_item.tpl';
288                    }
289                    break;
290
291                default:
292                    $this->tpl_mainpage = 'products/detail.tpl';
293                    break;
294            }
295        }
296
297        // 商品詳細を取得
298        $this->arrProduct = $objProduct->getDetail($product_id);
299
300        // サブタイトルを取得
301        $this->tpl_subtitle = $this->arrProduct['name'];
302
303        // 関連カテゴリを取得
304        $this->arrRelativeCat = SC_Helper_DB_Ex::sfGetMultiCatTree($product_id);
305
306        // 商品ステータスを取得
307        $this->productStatus = $objProduct->getProductStatus($product_id);
308
309        // 画像ファイル指定がない場合の置換処理
310        $this->arrProduct['main_image']
311            = SC_Utils_Ex::sfNoImageMain($this->arrProduct['main_image']);
312
313        $this->subImageFlag = $this->lfSetFile($this->objUpFile,$this->arrProduct,$this->arrFile);
314        //レビュー情報の取得
315        $this->arrReview = $this->lfGetReviewData($product_id);
316
317        //関連商品情報表示
318        $this->arrRecommend = $this->lfPreGetRecommendProducts($product_id);
319
320        // ログイン判定
321        if ($objCustomer->isLoginSuccess() === true) {
322            //お気に入りボタン表示
323            $this->tpl_login = true;
324            $this->is_favorite = SC_Helper_DB_Ex::sfDataExists('dtb_customer_favorite_products', 'customer_id = ? AND product_id = ?', array($objCustomer->getValue('customer_id'), $product_id));
325        }
326        // フックポイント.
327        $objPlugin = SC_Helper_Plugin_Ex::getSingletonInstance($this->plugin_activate_flg);
328        $objPlugin->doAction('lc_page_products_detail_action_end', array($this));
329    }
330
331    /**
332     * デストラクタ.
333     *
334     * @return void
335     */
336    function destroy() {
337        parent::destroy();
338    }
339
340    /* プロダクトIDの正当性チェック */
341    function lfCheckProductId($admin_mode,$product_id) {
342        // 管理機能からの確認の場合は、非公開の商品も表示する。
343        if (isset($admin_mode) && $admin_mode == 'on') {
344            SC_Utils_Ex::sfIsSuccess(new SC_Session_Ex());
345            $status = true;
346            $where = 'del_flg = 0';
347        } else {
348            $status = false;
349            $where = 'del_flg = 0 AND status = 1';
350        }
351
352        if(!SC_Utils_Ex::sfIsInt($product_id)
353            || SC_Utils_Ex::sfIsZeroFilling($product_id)
354            || !SC_Helper_DB_Ex::sfIsRecord('dtb_products', 'product_id', (array)$product_id, $where))
355            SC_Utils_Ex::sfDispSiteError(PRODUCT_NOT_FOUND);
356        return $product_id;
357    }
358
359    /* ファイル情報の初期化 */
360    function lfInitFile($objUpFile) {
361        $objUpFile->addFile('詳細-メイン画像', 'main_image', array('jpg'), IMAGE_SIZE);
362        for ($cnt = 1; $cnt <= PRODUCTSUB_MAX; $cnt++) {
363            $objUpFile->addFile("詳細-サブ画像$cnt", "sub_image$cnt", array('jpg'), IMAGE_SIZE);
364        }
365        return $objUpFile;
366    }
367
368    /* 規格選択セレクトボックスの作成 */
369    function lfMakeSelect() {
370        return  'fnSetClassCategories('
371            . 'document.form1, '
372            . SC_Utils_Ex::jsonEncode($this->objFormParam->getValue('classcategory_id2'))
373            . '); ';
374    }
375
376    /* 規格選択セレクトボックスの作成(モバイル) */
377    function lfMakeSelectMobile(&$objPage, $product_id,$request_classcategory_id1) {
378
379        $classcat_find1 = false;
380        $classcat_find2 = false;
381
382        // 規格名一覧
383        $arrClassName = SC_Helper_DB_Ex::sfGetIDValueList('dtb_class', 'class_id', 'name');
384        // 規格分類名一覧
385        $arrClassCatName = SC_Helper_DB_Ex::sfGetIDValueList('dtb_classcategory', 'classcategory_id', 'name');
386        // 商品規格情報の取得
387        $arrProductsClass = $this->lfGetProductsClass($product_id);
388
389        // 規格1クラス名の取得
390        $objPage->tpl_class_name1 = $arrClassName[$arrProductsClass[0]['class_id1']];
391        // 規格2クラス名の取得
392        $objPage->tpl_class_name2 = $arrClassName[$arrProductsClass[0]['class_id2']];
393
394        // すべての組み合わせ数
395        $count = count($arrProductsClass);
396
397        $classcat_id1 = '';
398
399        $arrSele1 = array();
400        $arrSele2 = array();
401
402        for ($i = 0; $i < $count; $i++) {
403            // 在庫のチェック
404            if ($arrProductsClass[$i]['stock'] <= 0 && $arrProductsClass[$i]['stock_unlimited'] != '1') {
405                continue;
406            }
407
408            // 規格1のセレクトボックス用
409            if ($classcat_id1 != $arrProductsClass[$i]['classcategory_id1']) {
410                $classcat_id1 = $arrProductsClass[$i]['classcategory_id1'];
411                $arrSele1[$classcat_id1] = $arrClassCatName[$classcat_id1];
412            }
413
414            // 規格2のセレクトボックス用
415            if ($arrProductsClass[$i]['classcategory_id1'] == $request_classcategory_id1 and $classcat_id2 != $arrProductsClass[$i]['classcategory_id2']) {
416                $classcat_id2 = $arrProductsClass[$i]['classcategory_id2'];
417                $arrSele2[$classcat_id2] = $arrClassCatName[$classcat_id2];
418            }
419        }
420
421        // 規格1
422        $objPage->arrClassCat1 = $arrSele1;
423        $objPage->arrClassCat2 = $arrSele2;
424
425        // 規格1が設定されている
426        if (isset($arrProductsClass[0]['classcategory_id1']) && $arrProductsClass[0]['classcategory_id1'] != '0') {
427            $classcat_find1 = true;
428        }
429
430        // 規格2が設定されている
431        if (isset($arrProductsClass[0]['classcategory_id2']) && $arrProductsClass[0]['classcategory_id2'] != '0') {
432            $classcat_find2 = true;
433        }
434
435        $objPage->tpl_classcat_find1 = $classcat_find1;
436        $objPage->tpl_classcat_find2 = $classcat_find2;
437    }
438
439    /* パラメーター情報の初期化 */
440    function lfInitParam(&$objFormParam) {
441        $objFormParam->addParam('規格1', 'classcategory_id1', INT_LEN, 'n', array('NUM_CHECK', 'MAX_LENGTH_CHECK'));
442        $objFormParam->addParam('規格2', 'classcategory_id2', INT_LEN, 'n', array('NUM_CHECK', 'MAX_LENGTH_CHECK'));
443        $objFormParam->addParam('数量', 'quantity', INT_LEN, 'n', array('EXIST_CHECK', 'ZERO_CHECK', 'NUM_CHECK', 'MAX_LENGTH_CHECK'));
444        $objFormParam->addParam('管理者ログイン', 'admin', INT_LEN, 'a', array('ALNUM_CHECK','MAX_LENGTH_CHECK'));
445        $objFormParam->addParam('商品ID', 'product_id', INT_LEN, 'n', array('EXIST_CHECK', 'ZERO_CHECK', 'NUM_CHECK', 'MAX_LENGTH_CHECK'));
446        $objFormParam->addParam('お気に入り商品ID', 'favorite_product_id', INT_LEN, 'n', array('ZERO_CHECK', 'NUM_CHECK', 'MAX_LENGTH_CHECK'));
447        $objFormParam->addParam('商品規格ID', 'product_class_id', INT_LEN, 'n', array('EXIST_CHECK', 'NUM_CHECK', 'MAX_LENGTH_CHECK'));
448        // 値の取得
449        $objFormParam->setParam($_REQUEST);
450        // 入力値の変換
451        $objFormParam->convParam();
452        // 入力情報を渡す
453        return $objFormParam->getFormParamList();
454    }
455
456    /* 商品規格情報の取得 */
457    function lfGetProductsClass($product_id) {
458        $objProduct = new SC_Product_Ex();
459        return $objProduct->getProductsClassFullByProductId($product_id);
460    }
461
462    /* 登録済み関連商品の読み込み */
463    function lfPreGetRecommendProducts($product_id) {
464        $objProduct = new SC_Product_Ex();
465        $objQuery =& SC_Query_Ex::getSingletonInstance();
466
467        $objQuery->setOrder('rank DESC');
468        $arrRecommendData = $objQuery->select('recommend_product_id, comment', 'dtb_recommend_products', 'product_id = ?', array($product_id));
469
470        $arrRecommendProductId = array();
471        foreach ($arrRecommendData as $recommend) {
472            $arrRecommendProductId[] = $recommend['recommend_product_id'];
473        }
474
475        $objQuery =& SC_Query_Ex::getSingletonInstance();
476        $arrProducts = $objProduct->getListByProductIds($objQuery, $arrRecommendProductId);
477
478        $arrRecommend = array();
479        foreach ($arrRecommendData as $key => $arrRow) {
480            $arrRecommendData[$key] = array_merge($arrRow, $arrProducts[$arrRow['recommend_product_id']]);
481        }
482
483        return $arrRecommendData;
484    }
485
486    /* 入力内容のチェック */
487    function lfCheckError($mode,&$objFormParam,$tpl_classcat_find1 = null ,$tpl_classcat_find2 = null) {
488
489        switch ($mode) {
490        case 'add_favorite_sphone':
491        case 'add_favorite':
492            $objCustomer = new SC_Customer_Ex();
493            $objErr = new SC_CheckError_Ex();
494            $customer_id = $objCustomer->getValue('customer_id');
495            if (SC_Helper_DB_Ex::sfDataExists('dtb_customer_favorite_products', 'customer_id = ? AND product_id = ?', array($customer_id, $favorite_product_id))) {
496                $objErr->arrErr['add_favorite'.$favorite_product_id] = '※ この商品は既にお気に入りに追加されています。<br />';
497            }
498            break;
499        default:
500            // 入力データを渡す。
501            $arrRet =  $objFormParam->getHashArray();
502            $objErr = new SC_CheckError_Ex($arrRet);
503            $objErr->arrErr = $objFormParam->checkError();
504
505            // 複数項目チェック
506            if ($tpl_classcat_find1) {
507                $objErr->doFunc(array('規格1', 'classcategory_id1'), array('EXIST_CHECK'));
508            }
509            if ($tpl_classcat_find2) {
510                $objErr->doFunc(array('規格2', 'classcategory_id2'), array('EXIST_CHECK'));
511            }
512            break;
513        }
514
515        return $objErr->arrErr;
516    }
517
518    //商品ごとのレビュー情報を取得する
519    function lfGetReviewData($id) {
520        $objQuery =& SC_Query_Ex::getSingletonInstance();
521        //商品ごとのレビュー情報を取得する
522        $col = 'create_date, reviewer_url, reviewer_name, recommend_level, title, comment';
523        $from = 'dtb_review';
524        $where = 'del_flg = 0 AND status = 1 AND product_id = ? ORDER BY create_date DESC LIMIT ' . REVIEW_REGIST_MAX;
525        $arrWhereVal = array($id);
526        $arrReview = $objQuery->select($col, $from, $where, $arrWhereVal);
527        return $arrReview;
528    }
529
530    /*
531     * ファイルの情報をセットする
532     * @return $subImageFlag
533     */
534    function lfSetFile($objUpFile,$arrProduct,&$arrFile) {
535        // DBからのデータを引き継ぐ
536        $objUpFile->setDBFileList($arrProduct);
537        // ファイル表示用配列を渡す
538        $arrFile = $objUpFile->getFormFileList(IMAGE_TEMP_URLPATH, IMAGE_SAVE_URLPATH, true);
539
540        // サブ画像の有無を判定
541        $subImageFlag = false;
542        for ($i = 1; $i <= PRODUCTSUB_MAX; $i++) {
543            if ($arrFile['sub_image' . $i]['filepath'] != '') {
544                $subImageFlag = true;
545            }
546        }
547        return $subImageFlag;
548    }
549
550    /*
551     * お気に入り商品登録
552     * @return void
553     */
554    function lfRegistFavoriteProduct($favorite_product_id,$customer_id) {
555        // ログイン中のユーザが商品をお気に入りにいれる処理
556        if (!SC_Helper_DB_Ex::sfIsRecord('dtb_products', 'product_id', $favorite_product_id, 'del_flg = 0 AND status = 1')) {
557            SC_Utils_Ex::sfDispSiteError(PRODUCT_NOT_FOUND);
558            return false;
559        } else {
560            $objQuery =& SC_Query_Ex::getSingletonInstance();
561            $exists = $objQuery->exists('dtb_customer_favorite_products', 'customer_id = ? AND product_id = ?', array($customer_id, $favorite_product_id));
562
563            if (!$exists) {
564                $sqlval['customer_id'] = $customer_id;
565                $sqlval['product_id'] = $favorite_product_id;
566                $sqlval['update_date'] = 'CURRENT_TIMESTAMP';
567                $sqlval['create_date'] = 'CURRENT_TIMESTAMP';
568
569                $objQuery->begin();
570                $objQuery->insert('dtb_customer_favorite_products', $sqlval);
571                $objQuery->commit();
572            }
573            // お気に入りに登録したことを示すフラグ
574            $this->just_added_favorite = true;
575            return true;
576        }
577    }
578}
Note: See TracBrowser for help on using the repository browser.