Ignore:
Timestamp:
2009/06/09 16:38:08 (15 years ago)
Author:
Seasoft
Message:

merge r17931, r17932, r17933
・取得元: version-2_4
【取得元のログメッセージ】

  • お気に入り商品機能
Location:
branches/comu-ver2/data
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • branches/comu-ver2/data/Smarty/templates/default/detail.tpl

    r18042 r18069  
    208208                <!--{if $tpl_stock_find}--> 
    209209                    <p class="btn"> 
    210                         <!--{if $smarty.const.OPTION_FAVOFITE_PRODUCT == 1 && $tpl_login}--> 
     210                        <!--{if $smarty.const.OPTION_FAVOFITE_PRODUCT == 1 && $tpl_login === true}--> 
    211211                            <!--{assign var=add_favorite value="add_favorite`$product_id`"}--> 
    212212                            <!--{if $arrErr[$add_favorite]}--><div class="attention"><!--{$arrErr[$add_favorite]}--></div><!--{/if}--> 
    213213                            <!--{if !$arrProduct.favorite_count}--> 
    214                             <a href="javascript:fnModeSubmit('add_favorite','favorite_product_id','<!--{$arrProduct.product_id}-->');">[お気に入りに追加]</a><br /> 
     214                                <a 
     215                                    href="javascript:fnModeSubmit('add_favorite','favorite_product_id','<!--{$arrProduct.product_id|escape}-->');" 
     216                                    onmouseover="chgImg('<!--{$TPL_DIR}-->img/products/add_favolite_product_on.gif','add_favolite_product');" 
     217                                    onmouseout="chgImg('<!--{$TPL_DIR}-->img/products/add_favolite_product.gif','add_favolite_product');" 
     218                                ><img src="<!--{$TPL_DIR}-->img/products/add_favolite_product.gif" width="115" height="20" alt="お気に入りに追加" name="add_favolite_product" id="add_favolite_product" /></a> 
    215219                            <!--{else}--> 
    216                             [お気に入り登録済]<br /> 
     220                                <img src="<!--{$TPL_DIR}-->img/products/add_favolite_product_on.gif" width="115" height="20" alt="お気に入り登録済" name="add_favolite_product" id="add_favolite_product" /> 
    217221                            <!--{/if}--> 
    218222                        <!--{/if}--> 
  • branches/comu-ver2/data/Smarty/templates/default/mypage/favorite.tpl

    r17999 r18069  
    4444      <!--▲ページナビ--> 
    4545    </div> 
    46     <p>※最大20件まで表示します。</p> 
    4746 
    48     <form name="form1" id="form1" method="post" action="<!--{$smarty.server.PHP_SELF|escape}-->"> 
     47    <form name="form1" id="form1" method="post" action="?"> 
    4948    <input type="hidden" name="mode" value="cart" /> 
    5049    <input type="hidden" name="product_id" value="" /> 
     
    5958      <!--{assign var=product_id value="`$arrFavorite[cnt].product_id`"}--> 
    6059      <tr> 
    61        <td><a href="javascript:fnModeSubmit('delete_favorite','product_id','<!--{$product_id}-->');">削除</a></td> 
    62        <td><a href="<!--{$smarty.const.DETAIL_P_HTML}--><!--{$product_id}-->"><img src="<!--{$smarty.const.SITE_URL}-->resize_image.php?image=<!--{$arrFavorite[cnt].main_list_image|sfNoImageMainList|escape}-->&width=65&height=65"></a></td> 
    63        <td><a href="<!--{$smarty.const.DETAIL_P_HTML}--><!--{$product_id}-->"><!--{$arrFavorite[cnt].name}--></a></td> 
     60       <td><a href="javascript:fnModeSubmit('delete_favorite','product_id','<!--{$product_id|escape}-->');">削除</a></td> 
     61       <td><a href="<!--{$smarty.const.DETAIL_P_HTML}--><!--{$product_id|escape}-->"><img src="<!--{$smarty.const.SITE_URL}-->resize_image.php?image=<!--{$arrFavorite[cnt].main_list_image|sfNoImageMainList|escape}-->&width=65&height=65"></a></td> 
     62       <td><a href="<!--{$smarty.const.DETAIL_P_HTML}--><!--{$product_id|escape}-->"><!--{$arrFavorite[cnt].name}--></a></td> 
    6463       <td class="right sale_price"> 
    6564        <span class="price"> 
  • branches/comu-ver2/data/Smarty/templates/default/mypage/navi.tpl

    r17605 r18069  
    2323*}--> 
    2424<div id="mynavarea"> 
    25     <ul class="button_like"><!--{* IE不具合対策(空白を入れない) 
    26         *}--><li><a href="./<!--{$smarty.const.DIR_INDEX_URL}-->" class="<!--{if $tpl_mypageno == 'index'}--> selected<!--{/if}-->"> 
    27             購入履歴一覧</a></li><!--{* IE不具合対策(空白を入れない) 
    28         *}--><!--{if $smarty.const.OPTION_FAVOFITE_PRODUCT == 1}--><!--{* IE不具合対策(空白を入れない) 
    29             *}--><li><a href="favorite.php" class="<!--{if $tpl_mypageno == 'favorite'}--> selected<!--{/if}-->"> 
    30                 お気に入り一覧</a></li><!--{* IE不具合対策(空白を入れない) 
    31         *}--><!--{/if}--><!--{* IE不具合対策(空白を入れない) 
    32         *}--><li><a href="change.php" class="<!--{if $tpl_mypageno == 'change'}--> selected<!--{/if}-->"> 
    33             会員登録内容変更</a></li><!--{* IE不具合対策(空白を入れない) 
    34         *}--><li><a href="delivery.php" class="<!--{if $tpl_mypageno == 'delivery'}--> selected<!--{/if}-->"> 
    35             お届け先追加・変更</a></li><!--{* IE不具合対策(空白を入れない) 
    36         *}--><li><a href="refusal.php" class="<!--{if $tpl_mypageno == 'refusal'}--> selected<!--{/if}-->"> 
    37             退会手続き</a></li><!--{* IE不具合対策(空白を入れない) 
    38     *}--></ul> 
    39      
    40     <!--▼現在のポイント--> 
    41     <!--{if $point_disp !== false}--> 
    42         <ul> 
    43              <li>ようこそ <br /> 
    44                  <!--{$CustomerName1|escape}--> <!--{$CustomerName2|escape}-->様 
    45                  <!--{if $smarty.const.USE_POINT !== false}--> 
    46                      <br />現在の所持ポイントは<em><!--{$CustomerPoint|number_format|escape|default:"0"}-->pt</em>です。 
    47                  <!--{/if}--> 
    48              </li> 
     25    <!--{strip}--> 
     26        <ul class="button_like"> 
     27            <li><a href="./<!--{$smarty.const.DIR_INDEX_URL}-->" class="<!--{if $tpl_mypageno == 'index'}--> selected<!--{/if}-->"> 
     28                購入履歴一覧</a></li> 
     29            <!--{if $smarty.const.OPTION_FAVOFITE_PRODUCT == 1}--> 
     30                <li><a href="favorite.php" class="<!--{if $tpl_mypageno == 'favorite'}--> selected<!--{/if}-->"> 
     31                    お気に入り一覧</a></li> 
     32            <!--{/if}--> 
     33            <li><a href="change.php" class="<!--{if $tpl_mypageno == 'change'}--> selected<!--{/if}-->"> 
     34                会員登録内容変更</a></li> 
     35            <li><a href="delivery.php" class="<!--{if $tpl_mypageno == 'delivery'}--> selected<!--{/if}-->"> 
     36                お届け先追加・変更</a></li> 
     37            <li><a href="refusal.php" class="<!--{if $tpl_mypageno == 'refusal'}--> selected<!--{/if}-->"> 
     38                退会手続き</a></li> 
    4939        </ul> 
    50     <!--{/if}--> 
    51     <!--▲現在のポイント--> 
     40         
     41        <!--▼現在のポイント--> 
     42        <!--{if $point_disp !== false}--> 
     43            <ul> 
     44                 <li>ようこそ <br /> 
     45                     <!--{$CustomerName1|escape}--> <!--{$CustomerName2|escape}-->様 
     46                     <!--{if $smarty.const.USE_POINT !== false}--> 
     47                         <br />現在の所持ポイントは<em><!--{$CustomerPoint|number_format|escape|default:"0"}-->pt</em>です。 
     48                     <!--{/if}--> 
     49                 </li> 
     50            </ul> 
     51        <!--{/if}--> 
     52        <!--▲現在のポイント--> 
     53    <!--{/strip}--> 
    5254</div> 
    5355<!--▲NAVI--> 
  • branches/comu-ver2/data/class/pages/mypage/LC_Page_Mypage_Favorite.php

    r17955 r18069  
    7878            SC_Utils_Ex::sfDispSiteError(CUSTOMER_ERROR); 
    7979        }else { 
    80             //マイページトップ顧客情報表示用 
     80            // マイページトップ顧客情報表示用 
    8181            $this->CustomerName1 = $objCustomer->getvalue('name01'); 
    8282            $this->CustomerName2 = $objCustomer->getvalue('name02'); 
     
    9090        } 
    9191 
    92         //ページ送り用 
     92        // ページ送り用 
    9393        if (isset($_POST['pageno'])) { 
    9494            $this->tpl_pageno = htmlspecialchars($_POST['pageno'], ENT_QUOTES, CHAR_CODE); 
     
    103103            $where .= ' AND (alldtl.stock_max >= 1 OR alldtl.stock_unlimited_max = 1)'; 
    104104        } 
     105        $order = "create_date DESC"; 
    105106 
    106107        $arrval = array($objCustomer->getvalue('customer_id')); 
    107         $order = "product_id DESC"; 
    108  
     108 
     109        // お気に入りの数を取得 
    109110        $linemax = $objQuery->count($from, $where, $arrval); 
    110111        $this->tpl_linemax = $linemax; 
     
    120121        $objQuery->setorder($order); 
    121122 
    122         //お気に入りの取得 
     123        // お気に入りの取得 
    123124        $this->arrFavorite = $objQuery->select($col, $from, $where, $arrval); 
    124125 
  • branches/comu-ver2/data/class/pages/products/LC_Page_Products_Detail.php

    r18053 r18069  
    8787        $helper->sfGetPageLayout($this, false, "products/detail.php"); 
    8888 
    89         if(isset($_POST['mode']) && $_POST['favorite_product_id'] != "" && $_POST['mode'] == "add_favorite") { 
     89        // ログイン中のユーザが商品をお気に入りにいれる処理 
     90        if ($objCustomer->isLoginSuccess() === true && strlen($_POST['mode']) > 0 && $_POST['mode'] == "add_favorite" && strlen($_POST['favorite_product_id']) > 0 ) { 
    9091            // 値の正当性チェック 
    9192            if(!SC_Utils_Ex::sfIsInt($_POST['favorite_product_id']) || !$objDb->sfIsRecord("dtb_products", "product_id", $_POST['favorite_product_id'], "del_flg = 0 AND status = 1")) { 
     
    135136        } 
    136137        // ログイン判定 
    137         if($objCustomer->isLoginSuccess()) { 
     138        if ($objCustomer->isLoginSuccess() === true) { 
    138139            //お気に入りボタン表示 
    139140            $this->tpl_login = true; 
     
    886887            $sqlval['customer_id'] = $customer_id; 
    887888            $sqlval['product_id'] = $product_id; 
     889            $sqlval['update_date'] = "now()"; 
     890            $sqlval['create_date'] = "now()"; 
    888891 
    889892            $objQuery->begin(); 
Note: See TracChangeset for help on using the changeset viewer.