<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>

<channel>
	<title>WEB MEMO:RE</title>
	<atom:link href="http://memo.6-bird.net/feed" rel="self" type="application/rss+xml" />
	<link>http://memo.6-bird.net</link>
	<description>ウェブメモリー / WEB制作について忘れないためのメモ</description>
	<pubDate>Thu, 13 Nov 2008 04:47:06 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.3</generator>
	<language>ja</language>
			<item>
		<title>新商品ブロックを作ろう（カテゴリ指定）</title>
		<link>http://memo.6-bird.net/archives/38</link>
		<comments>http://memo.6-bird.net/archives/38#comments</comments>
		<pubDate>Wed, 29 Oct 2008 15:19:46 +0000</pubDate>
		<dc:creator>sixbird</dc:creator>
		
		<category><![CDATA[EC-CUBE2系]]></category>

		<category><![CDATA[カテゴリ]]></category>

		<category><![CDATA[ブロック]]></category>

		<category><![CDATA[新商品]]></category>

		<guid isPermaLink="false">http://memo.6-bird.net/?p=38</guid>
		<description><![CDATA[前回にも「新商品ブロックを作ろう」を書きましたが、
「特定のカテゴリーの新商品やお勧め商品を表示できるように設定できないか」
というお問い合わせがありましたので、カテゴリー指定バージョンを書きます。
基本的には前回の通りにブロックを作りましょう。
違うのは、LC_Page_FrontParts_Bloc_New.phpのロジックです。
以下がそのロジックです。



function process&#40;&#41; &#123;


&#160;


// 基本情報を渡す


$objSiteInfo = new SC_SiteInfo&#40;&#41;;


$this-&#62;arrInfo = $objSiteInfo-&#62;data;


&#160;


$objQuery = new SC_Query&#40;&#41;;


&#160;


$col &#160; &#160;= &#34; product_id, price02_min, price02_max, main_image, name&#34;;


$from &#160; = &#34; vw_products_allclass &#34;;


$where &#160;= &#34; substring(product_flag,1,1) = &#8216;1&#8242;&#34;;


$where .= &#34; and del_flg = 0 &#34;;


$where .= &#34; and category_id = カテゴリIDを指定&#34;;


$order &#160;= &#34; rank&#34;;


&#160;


$this-&#62;order=$objQuery-&#62;setorder&#40;$order&#41;;


$arrNewProducts = $objQuery-&#62;select&#40;$col, $from, $where&#41;;


&#160;


$this-&#62;arrNewProducts = $arrNewProducts;


&#160;


$objSubView = new SC_SiteView&#40;&#41;;


$objSubView-&#62;assignobj&#40;$this&#41;;


$objSubView-&#62;display&#40;$this-&#62;tpl_mainpage&#41;;


&#125;



上記の「カテゴリIDを指定」の箇所に表示させたいカテゴリを指定。
もし、複数カテゴリを指定したい場合は、



$col [...]]]></description>
		<wfw:commentRss>http://memo.6-bird.net/archives/38/feed</wfw:commentRss>
		</item>
		<item>
		<title>非常に簡単にRSSを取得し表示する</title>
		<link>http://memo.6-bird.net/archives/29</link>
		<comments>http://memo.6-bird.net/archives/29#comments</comments>
		<pubDate>Wed, 13 Aug 2008 10:53:08 +0000</pubDate>
		<dc:creator>sixbird</dc:creator>
		
		<category><![CDATA[EC-CUBE2系]]></category>

		<category><![CDATA[RSS]]></category>

		<guid isPermaLink="false">http://memo.6-bird.net/?p=29</guid>
		<description><![CDATA[最近はECサイトに人の存在感を与え、そして安心感を与えるためにブログも運営することが多くなった。
そこで、ECサイトにそのブログのRSS情報を非常に簡単に表示する方法。
ただしPHP5が条件。
なぜなら、simplexml_load_fileを使用するから。
EC-CUBEを利用、新規ブロックを作成した場合の方法。
/data/class/pages/frontparts/bloc/LC_Page_FrontParts_Bloc_Rss.php



function process&#40;&#41; &#123;


&#160;


$memore_rss =simplexml_load_file&#40;&#8216;http://memo.6-bird.net/feed/&#8217;&#41;;


$this-&#62;memore_rss = $memore_rss;


&#160;


$objSubView = new SC_SiteView&#40;&#41;;


$objSubView-&#62;assignobj&#40;$this&#41;;


$objSubView-&#62;display&#40;$this-&#62;tpl_mainpage&#41;;


&#125;



/user_data/packages/memore/bloc/rss.tpl



&#60;ol&#62;


&#123;foreach from=$memore_rss-&#62;channel-&#62;item item=&#34;datum&#34; key=&#34;key&#34; name=&#34;memore_rss&#34;&#125;


&#160; &#160; &#60;li&#62;&#60;!&#8211;&#123;$datum-&#62;pubDate&#124;date_format:&#34;%Y-%m-%d&#34;&#125;&#8211;&#62; &#60;a href=&#34;&#60;!&#8211;&#123;$datum-&#62;link&#125;&#8211;&#62;&#34;&#62;&#60;!&#8211;&#123;$datum-&#62;title&#125;&#8211;&#62;&#60;/a&#62;&#60;/li&#62;


&#123;/foreach&#125;


&#60;/ol&#62;



これで、ブログの記事タイトルにリンクがはられ、ズラーッと表示される。
]]></description>
		<wfw:commentRss>http://memo.6-bird.net/archives/29/feed</wfw:commentRss>
		</item>
		<item>
		<title>商品マスタCSV DOWNLOADで規格名が表示されない</title>
		<link>http://memo.6-bird.net/archives/26</link>
		<comments>http://memo.6-bird.net/archives/26#comments</comments>
		<pubDate>Thu, 07 Aug 2008 07:58:09 +0000</pubDate>
		<dc:creator>sixbird</dc:creator>
		
		<category><![CDATA[EC-CUBE2系]]></category>

		<category><![CDATA[2.2.0-beta]]></category>

		<category><![CDATA[csv]]></category>

		<category><![CDATA[規格]]></category>

		<guid isPermaLink="false">http://memo.6-bird.net/?p=26</guid>
		<description><![CDATA[商品管理→商品マスタ→CSV DOWNLOADでダウンロードしたCSVファイルの規格名1、および規格名2を見ると、規格を登録しているにもかかわらずNULLの状態となっている。
そこで/data/class/helper/SC_Helper_CSV.phpの115行目辺りを以下のように修正。



// 規格分類名一覧


//if (!empty($arrOutputCols['classcategory_id1']) &#124;&#124; !empty($arrOutputCols['classcategory_id2'])) {


$arrClassCatName = $objDb-&#62;sfGetIDValueList&#40;&#34;dtb_classcategory&#34;, &#34;classcategory_id&#34;, &#34;name&#34;&#41;;


//}



つまり、無条件に規格名一覧を取得させる。



$list_data = $objQuery-&#62;select&#40;$cols, $from, $where, $arrval&#41;;



ここで規格コードは取得できているのに、規格名が取得できないせいでCSVに吐き出されないのが原因。
]]></description>
		<wfw:commentRss>http://memo.6-bird.net/archives/26/feed</wfw:commentRss>
		</item>
		<item>
		<title>「CSV出力項目設定」の「出力可能項目一覧」の変更</title>
		<link>http://memo.6-bird.net/archives/19</link>
		<comments>http://memo.6-bird.net/archives/19#comments</comments>
		<pubDate>Wed, 30 Jul 2008 17:30:17 +0000</pubDate>
		<dc:creator>sixbird</dc:creator>
		
		<category><![CDATA[EC-CUBE2系]]></category>

		<category><![CDATA[2.2.0-beta]]></category>

		<category><![CDATA[csv]]></category>

		<category><![CDATA[EC-CUBE]]></category>

		<guid isPermaLink="false">http://memo.6-bird.net/?p=19</guid>
		<description><![CDATA[カスタマイズをしてDBのテーブルが変わった場合、CSVダウンロードしてもデフォルトのままではダウンロード項目に不整合が生じる。なので、出力可能項目を増やしてあげる必要がでてくる。
CSVで出力させる項目をもっているテーブルはdtb_csv。
このテーブルに追加or変更or削除したカラムデータを反映させればOK。
dtb_csvのcsv_idの内訳は、

商品管理
顧客管理
受注管理
キャンペーン
カテゴリ

例えば、dtb_categoryにaaaというカラムを追加したのなら、dtb_csvに

csv_id=5
col=aaa
disp_name=aaa
status=2
rankは任意

にしてデータをインサートすればヨシ。
]]></description>
		<wfw:commentRss>http://memo.6-bird.net/archives/19/feed</wfw:commentRss>
		</item>
		<item>
		<title>li要素の中に画像を入れたときにできる隙間</title>
		<link>http://memo.6-bird.net/archives/13</link>
		<comments>http://memo.6-bird.net/archives/13#comments</comments>
		<pubDate>Fri, 25 Jul 2008 14:54:04 +0000</pubDate>
		<dc:creator>sixbird</dc:creator>
		
		<category><![CDATA[CSS]]></category>

		<category><![CDATA[IE6]]></category>

		<category><![CDATA[バグ]]></category>

		<category><![CDATA[隙間]]></category>

		<guid isPermaLink="false">http://memo.6-bird.net/?p=13</guid>
		<description><![CDATA[IE6のバグでliにできる隙間の解決方法。
たいがいはliに、
line-height: 0;
で隙間がなくなるが、liの中に画像を挿入してる場合はこれじゃ無理。
imgに、
vertical-align:top;
を指定すると解決。
IE7が出て、IE8もβ版が出たというのに、まだまだIE6のシェアが圧倒的。
IEを使ってる皆さん、IEを使わずにFirefoxかSafari、もしくはOperaなどのまともなブラウザのご利用を是非ご検討くださーい。
]]></description>
		<wfw:commentRss>http://memo.6-bird.net/archives/13/feed</wfw:commentRss>
		</item>
		<item>
		<title>モバイルでのクレジットカード決済ができない</title>
		<link>http://memo.6-bird.net/archives/12</link>
		<comments>http://memo.6-bird.net/archives/12#comments</comments>
		<pubDate>Thu, 26 Jun 2008 04:21:31 +0000</pubDate>
		<dc:creator>sixbird</dc:creator>
		
		<category><![CDATA[EC-CUBE2系]]></category>

		<category><![CDATA[2.2.0-beta]]></category>

		<category><![CDATA[EC-CUBE]]></category>

		<category><![CDATA[クレジットカード決済]]></category>

		<category><![CDATA[モバイル]]></category>

		<guid isPermaLink="false">http://memo.6-bird.net/?p=12</guid>
		<description><![CDATA[ＰＣでは問題なくクレジット決済で購入できるのに、モバイルではできない問題に直面。
クレジット決済画面でカード番号などを入力したあと、自サイト（EC-CUBE）に戻ってきたときに「不正なページ移動です」とでる。
ちなみに、コンビニ決済は問題なし。
ということはセッション絡みということはわかるんやけど、どこが悪いのかが分からない…
しかし、神は私を見放さなかった！
EC-CUBEコミュで解決策がありました。
micaさん、感謝します。あなたは私にとっての神です。
/data/class/session/SC_SessionFactory.phpを以下のように修正



&#160;


function getInstance&#40;&#41; &#123;


&#160;


$type = defined&#40;&#8216;SESSION_KEEP_METHOD&#8217;&#41; &#160;? &#160;SESSION_KEEP_METHOD &#160;: &#160;&#8221;;


&#160;


// ☆モバイル用ページの場合はセッション管理をuseRequestで固定。☆


$type = defined&#40;&#8216;MOBILE_SITE&#8217;&#41; ? &#8216;useRequest&#8217; : $type;


&#160;


switch&#40;$type&#41; &#123;


// セッションの維持にリクエストパラメータを使用する


case &#8216;useRequest&#8217;:


$session = new SC_SessionFactory_UseRequest;


defined&#40;&#8216;MOBILE_SITE&#8217;&#41;


? $session-&#62;setState&#40;&#8216;mobile&#8217;&#41;


: $session-&#62;setState&#40;&#8216;pc&#8217;&#41;;


break;


&#160;


// クッキーを使用する


case &#8216;useCookie&#8217;:


default:


$session = new SC_SessionFactory_UseCookie;


break;


&#125;


&#160;


return $session;


&#125;


&#160;



このスレは「モバイルで商品の注文ができません」ということで、買い物かごにすら商品が入らない現象だったので、私の現象とは違うだろうと思っていた。
先入観で決め付けず、とりあえず試してみることは大事だと、改めて思った。
]]></description>
		<wfw:commentRss>http://memo.6-bird.net/archives/12/feed</wfw:commentRss>
		</item>
		<item>
		<title>ポイント一括変更</title>
		<link>http://memo.6-bird.net/archives/11</link>
		<comments>http://memo.6-bird.net/archives/11#comments</comments>
		<pubDate>Tue, 17 Jun 2008 10:12:12 +0000</pubDate>
		<dc:creator>sixbird</dc:creator>
		
		<category><![CDATA[EC-CUBE2系]]></category>

		<category><![CDATA[2.2.0-beta]]></category>

		<category><![CDATA[EC-CUBE]]></category>

		<category><![CDATA[ポイント]]></category>

		<guid isPermaLink="false">http://memo.6-bird.net/?p=11</guid>
		<description><![CDATA[管理画面でポイントの一括変更ができない。
仕方がないのでSQL叩くしかない。
update dtb_products
set point_rate = 変更するポイント
これで全ての商品のポイントが変更される。
特定のカテゴリだけの商品を対象とするなら
where category_id = カテゴリid
新商品だけを対象とするなら
where product_flag like &#8216;1____&#8217;
これくらい簡単なことだが、コピペできるのでメモ。
]]></description>
		<wfw:commentRss>http://memo.6-bird.net/archives/11/feed</wfw:commentRss>
		</item>
		<item>
		<title>イプシロン用のコンビニ決済テンプレート</title>
		<link>http://memo.6-bird.net/archives/10</link>
		<comments>http://memo.6-bird.net/archives/10#comments</comments>
		<pubDate>Tue, 10 Jun 2008 12:20:44 +0000</pubDate>
		<dc:creator>sixbird</dc:creator>
		
		<category><![CDATA[EC-CUBE2系]]></category>

		<category><![CDATA[EC-CUBE]]></category>

		<category><![CDATA[イプシロン]]></category>

		<category><![CDATA[コンビニ]]></category>

		<category><![CDATA[テンプレート]]></category>

		<category><![CDATA[決済]]></category>

		<guid isPermaLink="false">http://memo.6-bird.net/?p=10</guid>
		<description><![CDATA[イプシロンのコンビニ決済テンプレートのデザインを変更しようと思い/data/Smarty/templates/xxxx/shopping/shopping/convenience.tplをいじったが何故か反映されない。
調べた結果、/data/downloads/module/mdl_epsilon/にあるepsilon_convenience.tplがイプシロン用のコンビニ決済テンプレートだった。
まさかここにあるとは…
]]></description>
		<wfw:commentRss>http://memo.6-bird.net/archives/10/feed</wfw:commentRss>
		</item>
		<item>
		<title>新商品ブロックを作ろう</title>
		<link>http://memo.6-bird.net/archives/5</link>
		<comments>http://memo.6-bird.net/archives/5#comments</comments>
		<pubDate>Sun, 04 May 2008 16:24:24 +0000</pubDate>
		<dc:creator>sixbird</dc:creator>
		
		<category><![CDATA[EC-CUBE2系]]></category>

		<category><![CDATA[EC-CUBE]]></category>

		<category><![CDATA[ブロック]]></category>

		<guid isPermaLink="false">http://memo.6-bird.net/?p=5</guid>
		<description><![CDATA[新商品のみを表示するブロックを作ろう。
このブロックは、EC-CUBEの開発コミュニティであがっていたスレッド「新入荷商品をブロックに表示したい」を参考にさせて頂きました。参考というよりも、ほとんど丸々頂いている（duckeiさんに心より感謝）
まず、新規ブロックの作り方から。

管理画面より、「デザイン管理」→「ブロック編集」にて、
ブロック名（新商品）、ファイル名（new）を追加。
その下の大きなテキストボックスには、best5.tplの中身をコピペ。
DBのdtb_blocに新商品ブロックのデータが追加されているので、
php_path：frontparts/bloc/new.php
とし更新。
/data/class/pages/frontparts/bloc/LC_Page_FrontParts_Bloc_Best5.php
/data/class_extends/page_extends/frontparts/bloc/LC_Page_FrontParts_Bloc_Best5_Ex.php
/frontparts/bloc/best5.php
上記3ファイルをそれぞれコピーし、Best5(best5)をNew(new)にファイル名を変更。
LC_Page_FrontParts_Bloc_New.php
LC_Page_FrontParts_Bloc_New_Ex.php
new.php
の中身の&#8221;Best5&#8243;(best5)を&#8221;New&#8221;(new)に置換。

とりあえずこれでブロック完成。（たぶん）
コピーしただけなので、まだ中身はおすすめ商品のまま。
次、LC_Page_FrontParts_Bloc_New.phpを以下のように修正。
function process() {
// 基本情報を渡す
$objSiteInfo = new SC_SiteInfo();
$this-&#62;arrInfo = $objSiteInfo-&#62;data;
$objQuery = new SC_Query();
//検索したい商品のステータスを設定
//NEW→1, 残りわずか→2, ポイント2倍→3, オススメ→4, 限定品→5
$productNew = 1;
//検索する商品のステータスをランダムに決定し、表示させたい場合は以下のコメントを外してください。
//$id_count = $objQuery-&#62;count(mtb_status);
//$productNew = rand(1,$id_count);
$this-&#62;statusName =$objQuery-&#62;get(&#8221;mtb_status_image&#8221;, &#8220;name&#8221;, &#8220;id={$productNew}&#8221;);
//表示する商品の件数
$listCount = 99;
$ret = &#8220;&#8221;;
$arrTmp[$productNew] = &#8220;1&#8243;;
for($i = 1; $i &#60;= $productNew; $i++) {
if($arrTmp[$i] == &#8220;1&#8243;) {
$ret.= &#8220;1&#8243;;
} else {
$ret.= &#8220;_&#8221;;
}
}
if($ret != &#8220;&#8221;) {
$ret.= &#8220;%&#8221;;
}
$col = &#8220;DISTINCT price02_min, product_id, price02_max, main_image, [...]]]></description>
		<wfw:commentRss>http://memo.6-bird.net/archives/5/feed</wfw:commentRss>
		</item>
		<item>
		<title>静的URLでSEO</title>
		<link>http://memo.6-bird.net/archives/4</link>
		<comments>http://memo.6-bird.net/archives/4#comments</comments>
		<pubDate>Sun, 04 May 2008 10:27:51 +0000</pubDate>
		<dc:creator>sixbird</dc:creator>
		
		<category><![CDATA[EC-CUBE2系]]></category>

		<category><![CDATA[EC-CUBE]]></category>

		<category><![CDATA[SEO]]></category>

		<guid isPermaLink="false">http://memo.6-bird.net/?p=4</guid>
		<description><![CDATA[EC-CUBEのURLは、デフォルトでは
http://www.xxx.net/products/detail.php?product_id=1
や
http://www.xxx.net/products/list.php?category_id=1
のようにパラメータが付与されている。
これはSEO的に好ましくないと言われている。
（パラメータ一つくらいならたいした事はないと思うが）
念のため、静的URLにする。
.htaccessに以下を追加。
RewriteEngine On
RewriteRule detail\/([0-9]+)\/? /virtual/契約しているID/public_html/products/detail.php?product_id=$1 [L]
RewriteRule list\/([0-9]+)\/?   /virtual/契約しているID/public_html/products/list.php?category_id=$1 [L]
もし、サブドメインにEC-CUBEをインストールした場合は以下。
RewriteEngine On
RewriteRule detail\/([0-9]+)\/? /virtual/契約しているID/public_html/サブドメイン名/products/detail.php?product_id=$1 [L]
RewriteRule list\/([0-9]+)\/?   /virtual/契約しているID/public_html/サブドメイン名/products/list.php?category_id=$1 [L]
次に管理画面よりパラメータの変更を行う。
「基本情報管理」→「パラメータ設定」で以下の設定を行う。
LIST_P_HTML：URL_DIR . &#8220;products/list/&#8221;
DETAIL_P_HTML：URL_DIR . &#8220;products/detail/&#8221;
次に、テンプレートの変更を行う。
/data/Smarty/templates/default/bloc/category.tplの&#60;!&#8211;{$smarty.const.URL_DIR}&#8211;&#62;products/list.php?category_id=を以下に変更。
&#60;!&#8211;{$smarty.const.LIST_P_HTML}&#8211;&#62;
/data/Smarty/templates/default/bloc/best5.tplの&#60;!&#8211;{$smarty.const.URL_DIR}&#8211;&#62;products/detail.php?product_id=を以下に変更。
&#60;!&#8211;{$smarty.const.DETAIL_P_HTML}&#8211;&#62;
つまり、全ての動的URLの部分を定数（LIST_P_HTML、DETAIL_P_HTML）で置き換える。
]]></description>
		<wfw:commentRss>http://memo.6-bird.net/archives/4/feed</wfw:commentRss>
		</item>
	</channel>
</rss>
