
〒730-0048 広島市中区竹屋町1-17 フォレストビル3F
TEL: 082-298-7556 FAX: 082-298-7566
LC_Page_Products_Detail.php
* Page のプロセス.
* Page のプロセス(モバイル). 共
// DBから商品情報を取得する。
$arrRet = $objQuery->select("*, (SELECT count(*) FROM dtb_customer_favorite_products WHERE product_id = alldtl.product_id AND customer_id = ?) AS favorite_count", "vw_products_allclass_detail AS alldtl", "product_id = ?", array($objCustomer->getValue('customer_id'), $tmp_id));
$this->arrProduct = $arrRet[0];
//登録日の取得
$this->arrProduct['create_date'] = $objQuery->get("dtb_products", "create_date", "product_id = ? ", array($this->arrProduct['product_id']));
// 商品コードの取得
$code_sql = "SELECT product_code FROM dtb_products_class AS prdcls WHERE prdcls.product_id = ? GROUP BY product_code ORDER BY product_code";
$arrProductCode = $objQuery->getall($code_sql, array($tmp_id));
$arrProductCode = SC_Utils_Ex::sfswaparray($arrProductCode);
$this->arrProductCode = $arrProductCode["product_code"];
/html/products/list.php
追加
<!--★登録日: {*$arrProducts[cnt].create_date|sfDispDBDate|date_format:"%Y/%m/%d"*}★-->
<!--★本日: {*$smarty.now|date_format:"%Y/%m/%d"*}★-->
<!--{assign var="day1" value=$smarty.now|date_format:"%s"}-->
<!--{assign var="day2" value=$arrProducts[cnt].create_date|sfDispDBDate|date_format:"%s"}-->
<!--{$day1}--><br>
<!--{$day2}--><br>
<!--★登録日からの経過時間(日)★-->
<!--{math equation="($day1-$day2)/86400" assign="def_day"}-->
<!--{$def_day}-->
<!--{if $def_day <= 3}-->
<span class="price">NEW !!</span><br>
<!--{/if}-->
/html/products/detail.php
追加
<!--★本日: <!--{*$smarty.now|date_format:"%Y/%m/%d"*}-->
<!--★CR1: <!--{*$arrProduct.create_date|sfDispDBDate|date_format:"%Y/%m/%d"*}-->
<!--{assign var="day3" value=$smarty.now|date_format:"%s"}-->
<!--{assign var="day4" value=$arrProduct.create_date|sfDispDBDate|date_format:"%s"}-->
<!--{$day3}--><br>
<!--{$day4}--><br>
<!--★登録日からの経過時間(日)★-->
<!--{math equation="($day3-$day4)/86400" assign="def_day1"}-->
<!--{$def_day1}-->
<!--{if $def_day1 <= 3}-->
<span class="price">NEW !!</span>
<!--{/if}-->
<br>
mobileの場合
注)ムービングgifでアップしてもJPGに勝手に変換される。
注)"NEW"を画像で置くと、下の商品画像が極端に小さく(20pix程度)表示された。
/data/Smarty/templates/default/mobile/products/list.tpl
<!--{/if}-->
<!--{if isset($tpl_next_page|smarty:nodefaults)}-->
<a href="<!--{$tpl_next_page|escape}-->">次へ</a>
<!--{/if}-->
<br><br>
<!--{/if}-->
<!--{foreach from=$arrProducts key=i item=arrProduct}-->
<!-- ▼商品 ここから -->
<!--★登録日:<!--{*$arrProducts[$i].create_date|sfDispDBDate|date_format:"%Y/%m/%d"*}-->
<!--★本日: <!--{*$smarty.now|date_format:"%Y/%m/%d"*}-->
<!--{assign var="day1" value=$smarty.now|date_format:"%s"}-->
<!--{assign var="day2" value=$arrProducts[$i].create_date|sfDispDBDate|date_format:"%s"}-->
<!--本日:<!--{*$day1*}-->
<!--登録日:<!--{*$day2*}-->
<!--★登録日からの経過時間(日)★-->
<!--{math equation="($day1-$day2)/86400" assign="def_day"}-->
<!--{*$def_day*}-->
<!--{if $def_day <= 30}-->
<font color="#FF0000"><b>NEW!!</b></font><br>
<!--{/if}-->
<!--{if $i+1<9}--><!--{$i+1|numeric_emoji}--><!--{else}-->[<!--{$i+1}-->]<!--{/if}-->
<!-- 商品名 --><!--{$arrProduct.name|escape}--><br>
<!--{if $arrProduct.price02_min != 1}-->
/data/Smarty/templates/default/mobile/products/detail.tpl
<!--▼CONTENTS-->
<!--▼MAIN CONTENTS-->
<!--タイトルここから-->
<!--★商品名★-->
<div align="center"><!--{$arrProduct.name|escape}--></div>
<hr>
<!--タイトルここまで-->
<!--{assign var="day3" value=$smarty.now|date_format:"%s"}-->
<!--{assign var="day4" value=$arrProduct.create_date|sfDispDBDate|date_format:"%s"}-->
<!--★登録日からの経過時間(日)★-->
<!--{math equation="($day3-$day4)/86400" assign="def_day1"}-->
<!--{*$def_day1*}-->
<!--{if $def_day1 <= 30}-->
<font color="#FF0000"><b>NEW!!</b></font><br>
<!--{/if}-->
<!--詳細ここから-->
<!--{assign var=key value="main_image"}-->
<img src="<!--{$arrFile[$key].filepath}-->"><br>
<!--{* オペビルダー用 *}-->
<!--{if "sfViewDetailOpe"|function_exists === TRUE}-->
<!--{include file=`$smarty.const.MODULE_PATH`mdl_opebuilder/detail_ope_mb_view.tpl}-->
<!--{/if}-->
<!--★詳細メインコメント★-->
[emoji:76]<!--{$arrProduct.main_comment|nl2br}--><br>
<br>
<!--アイコン-->
<!--★価格★-->
ブロックに新着(NEW)を表示する (最新登録商品から設定件数分表示product_new.tpl)
新着ブロックはエラーになってNG。カテゴリブロック等に表示、携帯のTOPページも表示確認済み
<!--新着ここから-->
<!--{php}-->
echo @file_get_contents("http://domain/html/rss/product_new.php");
<!--{/php}-->
<!--新着ここまで-->
表示させたい場所に上を貼り付ける
/data/class/pages/rss/LC_Page_Rss_Products.php
/shop/data/class_extends/page_extends/rss/LC_Page_Rss_Products_Ex.php
/shop/data/Smarty/templates/default/rss/product.tpl
/html/rss/product.php
それぞれファイル名を変えてコピーして内容を変更
/data/class/pages/rss/LC_Page_Rss_Products_new.php
/shop/data/class_extends/page_extends/rss/LC_Page_Rss_Products_new_Ex.php
/shop/data/Smarty/templates/default/rss/product_new.tpl (実際の表示内容)
/html/rss/product_new.php
Movable Type OS5をテスト用サブドメインにインストールした。
ページが変わる度に毎回ログインを要求してくる・・・
調べるとmt_sessionが原因の場合が多いらしい。
http://www.3oclock.com/hello-world/2009/10/mt-session.html
しかし、mt_sessionは壊れていない。
Movable Type OS4に替えても、SQLを替えてもダメ。
IEのクッキーを削除しても当然ダメ・・
念のため・・・Firefoxで・・・正常。??
再度検索、検索。
ありました!。
IEの場合、URLに"_"(アンダーバー)が含まれているとcookieが保存されない
http://blog.knockoutmarch.com/mt3/mt-search.cgi?search=cookie&IncludeBlogs=2
サブドメインを変更して一件落着。
受注番号変更
pgadmin
シーケンス一覧 : dtb_order_order_id_seq: プロパティ
名前 最終値 増加数 最大値 最小値 キャッシュ値 ログカウント Is Cycled? Is
Called?
dtb_order_order_id_seq nnnn 1 9223372036854775807 1 1 0 いいえ はい
SQL文
SELECT setval('dtb_order_order_id_seq', nnnn);
nnnn=新受注番号
郵便局留めの購入手続き時、お問合せ欄に最寄の1,郵便局名 2,郵便局の郵便番号 3,郵便局の住所を入力し受注管理(受注履歴編集)顧客管理(顧客編集 受注詳細)に表示する
(dtb_customerとdtb_orderに同じフィールド名"note"がありうまく表示されない)
★実際の留め置き局は、最寄局と異なる場合があるため発送時確認、連絡が必要。
配送先追加だと苗字、名前とそれぞれのヨミ、電話番号が必須で使いづらい。