<?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"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
		xmlns:xhtml="http://www.w3.org/1999/xhtml"
>

<channel>
	<title>Development memo</title>
	<atom:link href="http://officesoya.net/weblog/feed/" rel="self" type="application/rss+xml" />
	<link>http://officesoya.net/weblog</link>
	<description>Rough Consensus　And Running code</description>
	<lastBuildDate>Mon, 21 Jun 2010 09:22:37 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>ja</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://officesoya.net/weblog/feed/" />
		<item>
		<title>グーグルのCDNを利用してjqueryを読み込む2</title>
		<link>http://officesoya.net/weblog/2010/06/21/google_cdn2/</link>
		<comments>http://officesoya.net/weblog/2010/06/21/google_cdn2/#comments</comments>
		<pubDate>Mon, 21 Jun 2010 09:22:37 +0000</pubDate>
		<dc:creator>soya</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[cdn]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[jsapi]]></category>

		<guid isPermaLink="false">http://officesoya.net/weblog/?p=199</guid>
		<description><![CDATA[以前書いたメモの追記。ｊqueryの1.4.2とthemeまでグーグルから呼んでしまおうという奥義です。

&#60;link href=&#34;http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/themes/base/jquery-ui.css&#34; rel=&#34;stylesheet&#34; type=&#34;text/css&#34; /&#62;
&#60;script src=&#34;http://www.google.com/jsapi&#34;&#62;&#60;/script&#62;

&#60;script type=&#34;text/javascript&#34;&#62;
google.load(&#34;jquery&#34;, &#34;1.4.2&#34;);
google.load(&#34;jqueryui&#34;, &#34;1.8&#34;);
&#60;/script&#62;

このthemeで読み込めるthemeの種類はhttp://jqueryui.com/developmentこちらの右下にある base,  black-tie,  blitzer,  cupertino,  dark-hive,  dot-luv,  eggplant,  excite-bike,  flick,  hot-sneaks,  humanity,  le-frog,  mint-choc,  overcast,  pepper-grinder,  redmond,  smoothness,  south-street,  start,  sunny,  swanky-purse,  trontastic,  ui-darkness,  [...]]]></description>
			<content:encoded><![CDATA[<p>以前書いたメモの追記。ｊqueryの1.4.2とthemeまでグーグルから呼んでしまおうという奥義です。</p>
<pre class="brush: jscript;">
&lt;link href=&quot;http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/themes/base/jquery-ui.css&quot; rel=&quot;stylesheet&quot; type=&quot;text/css&quot; /&gt;
&lt;script src=&quot;http://www.google.com/jsapi&quot;&gt;&lt;/script&gt;

&lt;script type=&quot;text/javascript&quot;&gt;
google.load(&quot;jquery&quot;, &quot;1.4.2&quot;);
google.load(&quot;jqueryui&quot;, &quot;1.8&quot;);
&lt;/script&gt;
</pre>
<p>このthemeで読み込めるthemeの種類は<a href="http://jqueryui.com/development" target="_blank">http://jqueryui.com/development</a>こちらの右下にある <a href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.2/themes/base/jquery-ui.css">base</a>,  <a href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.2/themes/black-tie/jquery-ui.css">black-tie</a>,  <a href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.2/themes/blitzer/jquery-ui.css">blitzer</a>,  <a href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.2/themes/cupertino/jquery-ui.css">cupertino</a>,  <a href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.2/themes/dark-hive/jquery-ui.css">dark-hive</a>,  <a href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.2/themes/dot-luv/jquery-ui.css">dot-luv</a>,  <a href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.2/themes/eggplant/jquery-ui.css">eggplant</a>,  <a href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.2/themes/excite-bike/jquery-ui.css">excite-bike</a>,  <a href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.2/themes/flick/jquery-ui.css">flick</a>,  <a href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.2/themes/hot-sneaks/jquery-ui.css">hot-sneaks</a>,  <a href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.2/themes/humanity/jquery-ui.css">humanity</a>,  <a href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.2/themes/le-frog/jquery-ui.css">le-frog</a>,  <a href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.2/themes/mint-choc/jquery-ui.css">mint-choc</a>,  <a href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.2/themes/overcast/jquery-ui.css">overcast</a>,  <a href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.2/themes/pepper-grinder/jquery-ui.css">pepper-grinder</a>,  <a href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.2/themes/redmond/jquery-ui.css">redmond</a>,  <a href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.2/themes/smoothness/jquery-ui.css">smoothness</a>,  <a href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.2/themes/south-street/jquery-ui.css">south-street</a>,  <a href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.2/themes/start/jquery-ui.css">start</a>,  <a href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.2/themes/sunny/jquery-ui.css">sunny</a>,  <a href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.2/themes/swanky-purse/jquery-ui.css">swanky-purse</a>,  <a href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.2/themes/trontastic/jquery-ui.css">trontastic</a>,  <a href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.2/themes/ui-darkness/jquery-ui.css">ui-darkness</a>,  <a href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.2/themes/ui-lightness/jquery-ui.css">ui-lightness</a>,  <a href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.2/themes/vader/jquery-ui.css">vader</a> これらのthemeが指定できる。</p>
<p>サンプルコードはbaseを指定しています。</p>
]]></content:encoded>
			<wfw:commentRss>http://officesoya.net/weblog/2010/06/21/google_cdn2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://officesoya.net/weblog/2010/06/21/google_cdn2/" />
	</item>
		<item>
		<title>thickbox.js とIE7でバグかと・・・</title>
		<link>http://officesoya.net/weblog/2010/03/19/thickbox-js_e7/</link>
		<comments>http://officesoya.net/weblog/2010/03/19/thickbox-js_e7/#comments</comments>
		<pubDate>Fri, 19 Mar 2010 08:41:18 +0000</pubDate>
		<dc:creator>soya</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[thickbox]]></category>

		<guid isPermaLink="false">http://officesoya.net/weblog/?p=195</guid>
		<description><![CDATA[thickbox.jsを使って、htmlを表示させようとしたのですが、IE７で表示すると、ページの下のほうでthickboxを使うと、ページの上部でウィンドウが開くという現象に悩まされた。jqeryのバージョンをさげたり [...]]]></description>
			<content:encoded><![CDATA[<p>thickbox.jsを使って、htmlを表示させようとしたのですが、IE７で表示すると、ページの下のほうでthickboxを使うと、ページの上部でウィンドウが開くという現象に悩まされた。jqeryのバージョンをさげたり、thickboxのパラメータをいろいろ変えたりしたけど、解決せず。</p>
<p>Thickboxの公式サイトをよく読んで見ると、</p>
<p>Before you can implement ThickBox make sure the page that invokes ThickBox has a  valid <a href="http://www.alistapart.com/articles/doctype/">DTD</a>. This is  required for ThickBox to look and function correctly.</p>
<p>おい。</p>
<p>ということで、</p>
<p>&lt;!DOCTYPE html PUBLIC &#8220;-//W3C//DTD XHTML 1.0 Strict//EN&#8221;<br />
&#8220;http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd&#8221;&gt;</p>
<p>私のｈｔｍｌの場合上記を入れることで、解決。幸せになりました。</p>
]]></content:encoded>
			<wfw:commentRss>http://officesoya.net/weblog/2010/03/19/thickbox-js_e7/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://officesoya.net/weblog/2010/03/19/thickbox-js_e7/" />
	</item>
		<item>
		<title>とても気になっていたorder.phpでエラー(v1.4.0)</title>
		<link>http://officesoya.net/weblog/2010/03/14/order-php_error/</link>
		<comments>http://officesoya.net/weblog/2010/03/14/order-php_error/#comments</comments>
		<pubDate>Sat, 13 Mar 2010 19:50:38 +0000</pubDate>
		<dc:creator>soya</dc:creator>
				<category><![CDATA[OpenCart]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[日本語化]]></category>

		<guid isPermaLink="false">http://officesoya.net/weblog/?p=186</guid>
		<description><![CDATA[catalog/model/checkout/order.php
の155行目

if ($order_query-&#62;row['payment_address_format']) {
 $format = $order_info['payment_address_format'];
 }


if ($order_query-&#62;row['payment_address_format']) {
 $format = $order_query-&#62;row['payment_address_format'];
 }

これだけでは$order_query-&#62;row['payment_address_format']の
値を取得できないので、さらに4行目のクエリを一部変更

public function getOrder($order_id) {
 $query = $this-&#62;db-&#62;query(&#34;SELECT *, c1.iso_code_2 AS shipping_iso_code_2, c1.iso_code_3 AS shipping_iso_code_3, c2.iso_code_2 AS payment_iso_code_2, c2.iso_code_3 AS shipping_iso_code_3, z1.code AS shipping_zone_code, z2.code AS payment_zone_code FROM `&#34; . DB_PREFIX . &#34;order` o LEFT JOIN &#34; . DB_PREFIX . &#34;country c1 ON (o.shipping_country_id [...]]]></description>
			<content:encoded><![CDATA[<p>catalog/model/checkout/order.php</p>
<p>の155行目</p>
<pre class="brush: php;">
if ($order_query-&gt;row['payment_address_format']) {
 $format = $order_info['payment_address_format'];
 }
</pre>
<pre class="brush: php;">
if ($order_query-&gt;row['payment_address_format']) {
 $format = $order_query-&gt;row['payment_address_format'];
 }
</pre>
<p>これだけでは<code>$order_query</code><code>-&gt;row[</code><code>'payment_address_format'</code><code>]の</code></p>
<p>値を取得できないので、さらに4行目のクエリを一部変更</p>
<pre class="brush: php;">
public function getOrder($order_id) {
 $query = $this-&gt;db-&gt;query(&quot;SELECT *, c1.iso_code_2 AS shipping_iso_code_2, c1.iso_code_3 AS shipping_iso_code_3, c2.iso_code_2 AS payment_iso_code_2, c2.iso_code_3 AS shipping_iso_code_3, z1.code AS shipping_zone_code, z2.code AS payment_zone_code FROM `&quot; . DB_PREFIX . &quot;order` o LEFT JOIN &quot; . DB_PREFIX . &quot;country c1 ON (o.shipping_country_id = c1.country_id) LEFT JOIN &quot; . DB_PREFIX . &quot;country c2 ON (o.payment_country_id = c2.country_id) LEFT JOIN &quot; . DB_PREFIX . &quot;zone z1 ON (o.shipping_zone_id  = z1.zone_id) LEFT JOIN &quot; . DB_PREFIX . &quot;zone z2 ON (o.payment_zone_id = z2.zone_id) WHERE o.order_id = '&quot; . (int)$order_id . &quot;'&quot;);

 return $query-&gt;row;
 }
</pre>
<p>一番うしろのほうの</p>
<p>zone z1 ON (o.payment_zone_id  = z1.zone_id)</p>
<p>だったのを</p>
<p>zone z1 ON (o.shipping_zone_id  = z1.zone_id)</p>
<p>に変更してます。</p>
<p>といっても既に1.4.3にバージョンアップしてる・・・バージョンアップについていけなくなってきました。</p>
<p>OpenCart本家を参照：http://forum.opencart.com/viewtopic.php?f=31&amp;t=9041&amp;p=42779&amp;hilit=ModelCheckoutOrder#p42779<!--ｐ--></p>
]]></content:encoded>
			<wfw:commentRss>http://officesoya.net/weblog/2010/03/14/order-php_error/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://officesoya.net/weblog/2010/03/14/order-php_error/" />
	</item>
		<item>
		<title>OpenCartのfilemanegerでフォルダが表示されない（IE）</title>
		<link>http://officesoya.net/weblog/2010/03/08/opencart1-4-0bug/</link>
		<comments>http://officesoya.net/weblog/2010/03/08/opencart1-4-0bug/#comments</comments>
		<pubDate>Mon, 08 Mar 2010 05:01:51 +0000</pubDate>
		<dc:creator>soya</dc:creator>
				<category><![CDATA[OpenCart]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Javascript]]></category>

		<guid isPermaLink="false">http://officesoya.net/weblog/?p=184</guid>
		<description><![CDATA[Firefoxは問題ないが、IEではフォルダが表示されない。OpenCart　v1.4.0
原因はjavascriptにあった。
admin/view/template/common/filamanger.tpl
の13 [...]]]></description>
			<content:encoded><![CDATA[<pre>Firefoxは問題ないが、IEではフォルダが表示されない。OpenCart　v1.4.0
原因はjavascriptにあった。
admin/view/template/common/filamanger.tpl
の130行目
<pre class="brush: jscript;">
valid_children : 'all',
</pre>
<p>allの後の「,」を削除する
<pre class="brush: jscript;">
valid_children : 'all'
</pre>
]]></content:encoded>
			<wfw:commentRss>http://officesoya.net/weblog/2010/03/08/opencart1-4-0bug/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://officesoya.net/weblog/2010/03/08/opencart1-4-0bug/" />
	</item>
		<item>
		<title>Googleのjqueryを読み込む</title>
		<link>http://officesoya.net/weblog/2009/12/20/google_jquery/</link>
		<comments>http://officesoya.net/weblog/2009/12/20/google_jquery/#comments</comments>
		<pubDate>Sun, 20 Dec 2009 04:19:24 +0000</pubDate>
		<dc:creator>soya</dc:creator>
				<category><![CDATA[HTML]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[jQuery]]></category>

		<guid isPermaLink="false">http://officesoya.net/weblog/?p=176</guid>
		<description><![CDATA[自分のサイトにjqueryを置かずに、Googleからjqueryを読み込むメモ。

&#60;script src=&#34;http://www.google.com/jsapi&#34;&#62;&#60;/script&#34;&#62;
&#60;script&#62;
google.load(&#34;jquery&#34;, &#34;1.2.3&#34;);
google.load(&#34;jqueryui&#34;, &#34;1.7.1&#34;); &#60;/script&#62;

APIを利用する場合は、

&#60;script src=&#34;http://www.google.com/jsapi?key=YOUR_API_KEY&#34;&#62;&#60;/script&#62;
&#60;script&#62;
google.load(&#34;maps&#34;, &#34;2.x&#34;);
  google.load(&#34;jquery&#34;, &#34;1.3.2&#34;);
  google.load(&#34;jqueryui&#34;, &#34;1.7.1&#34;);
&#60;/script&#62;

YOUR_API_KEYは自分のAPIキーに書き換えて。
GOOGLE API KEYはこちらで取得。
]]></description>
			<content:encoded><![CDATA[<p>自分のサイトにjqueryを置かずに、Googleからjqueryを読み込むメモ。</p>
<pre class="brush: xml;">
&lt;script src=&quot;http://www.google.com/jsapi&quot;&gt;&lt;/script&quot;&gt;
&lt;script&gt;
google.load(&quot;jquery&quot;, &quot;1.2.3&quot;);
google.load(&quot;jqueryui&quot;, &quot;1.7.1&quot;); &lt;/script&gt;
</pre>
<p>APIを利用する場合は、</p>
<pre class="brush: xml;">
&lt;script src=&quot;http://www.google.com/jsapi?key=YOUR_API_KEY&quot;&gt;&lt;/script&gt;
&lt;script&gt;
google.load(&quot;maps&quot;, &quot;2.x&quot;);
  google.load(&quot;jquery&quot;, &quot;1.3.2&quot;);
  google.load(&quot;jqueryui&quot;, &quot;1.7.1&quot;);
&lt;/script&gt;
</pre>
<p>YOUR_API_KEYは自分のAPIキーに書き換えて。<br />
GOOGLE API KEYは<a title="GOOGLE API KEY" href="http://code.google.com/intl/ja/apis/maps/signup.html" target="_blank">こちら</a>で取得。</p>
]]></content:encoded>
			<wfw:commentRss>http://officesoya.net/weblog/2009/12/20/google_jquery/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://officesoya.net/weblog/2009/12/20/google_jquery/" />
	</item>
		<item>
		<title>カラーミーで大カテゴリーの下に小カテゴリーの一覧を表示する</title>
		<link>http://officesoya.net/weblog/2009/12/14/%e3%82%ab%e3%83%a9%e3%83%bc%e3%83%9f%e3%83%bc%e3%81%a7%e5%a4%a7%e3%82%ab%e3%83%86%e3%82%b4%e3%83%aa%e3%83%bc%e3%81%ae%e4%b8%8b%e3%81%ab%e5%b0%8f%e3%82%ab%e3%83%86%e3%82%b4%e3%83%aa%e3%83%bc%e3%81%ae/</link>
		<comments>http://officesoya.net/weblog/2009/12/14/%e3%82%ab%e3%83%a9%e3%83%bc%e3%83%9f%e3%83%bc%e3%81%a7%e5%a4%a7%e3%82%ab%e3%83%86%e3%82%b4%e3%83%aa%e3%83%bc%e3%81%ae%e4%b8%8b%e3%81%ab%e5%b0%8f%e3%82%ab%e3%83%86%e3%82%b4%e3%83%aa%e3%83%bc%e3%81%ae/#comments</comments>
		<pubDate>Mon, 14 Dec 2009 06:42:37 +0000</pubDate>
		<dc:creator>soya</dc:creator>
				<category><![CDATA[HTML]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Smarty]]></category>
		<category><![CDATA[カラーミー]]></category>

		<guid isPermaLink="false">http://officesoya.net/weblog/?p=170</guid>
		<description><![CDATA[カラーミーでは小カテゴリーの中に商品を全部振り分けてしまうと大カテゴリーのリンクをクリックしても小カテゴリーの一覧が表示されるだけで小カテゴリーの商品は一覧表示されない。
大カテゴリーをクリックした先で小カテゴリーに登録されている商品一覧を表示させたいというカスタマイズ依頼のメモ。
カテゴリーを画像表示することが原則です。
「商品検索結果ページ」の上部に下記のようにしてcategory_id とctという変数をアサインする。
$search_category という変数に大カテゴリーの名前が入ってくるのでそれをif文で振り分ける。
category_id は大カテゴリーのIdを、
ctは大カテゴリーに属する小カテゴリーの数を入力する。

&#60;{if $search_category == &#34;MEN'S WEAR&#34; }&#62;
&#60;{assign var=&#34;category_id&#34; value=&#34;787440&#34;}&#62;
&#60;{assign var=&#34;ct&#34; value=&#34;8&#34;}&#62;

&#60;{elseif $search_category == &#34;LADIE'S WEAR&#34; }&#62;
&#60;{assign var=&#34;category_id&#34; value=&#34;787441&#34;}&#62;
&#60;{assign var=&#34;ct&#34; value=&#34;9&#34;}&#62;
・
・
・
&#60;{elseif $search_category == &#34;OTHERS&#34; }&#62;
&#60;{assign var=&#34;category_id&#34; value=&#34;787443&#34;}&#62;
&#60;{assign var=&#34;ct&#34; value=&#34;4&#34;}&#62;
&#60;{/if}&#62;

その後ctがアサインされているかどうかで検索結果とするのか大カテゴリーの一覧表示とするのか
振り分ける。
さらにiとｋという変数を作り初期値に1をいれてループの回数（$ct）回るたびにインクリメント
させると”&#60;{$category_id}&#62;_&#60;{$i++}&#62;.jpg&#8221;で画像が取得できる。リンクは”?mode=cate&#38;cbid=&#60;{$category_id}&#62;&#38;csid=&#60;{$k++}&#62;”です。

&#60;{if isset($ct)}&#62;
&#60;a href=&#34;./&#34;&#62;TOP&#60;/a&#62; &#62; &#60;a href='/?mode=srh&#38;amp;amp;cid=&#60;{$category_id}&#62;%2C0'&#62;&#60;{$search_category}&#62;&#60;/a&#62;
&#60;!--// パンくずナビ --&#62;
&#60;{assign var=&#34;i&#34; value=&#34;1&#34;}&#62;
&#60;{assign var=&#34;k&#34; value=&#34;1&#34;}&#62;
&#60;div id=&#34;subcate&#34;&#62;&#60;div class=&#34;title&#34;&#62;sub categories&#60;/div&#62;

&#60;{section name=cate loop=$ct }&#62;
&#60;div style=&#34;float: left;margin:10px 12px 0 0;&#34;&#62;
&#60;a href=&#34;?mode=cate&#38;amp;amp;cbid=&#60;{$category_id}&#62;&#38;amp;amp;csid=&#60;{$k++}&#62;&#34;&#62;
&#60;img src=&#34;http://img15.shop-pro.jp/PA01084/170/category/&#60;{$category_id}&#62;_&#60;{$i++}&#62;.jpg&#34;&#62;&#60;/a&#62;&#38;amp;amp;nbsp;&#38;amp;amp;nbsp;
&#60;/div&#62;

&#60;{/section}&#62;
&#60;br class=&#34;clear&#34; [...]]]></description>
			<content:encoded><![CDATA[<p>カラーミーでは小カテゴリーの中に商品を全部振り分けてしまうと大カテゴリーのリンクをクリックしても小カテゴリーの一覧が表示されるだけで小カテゴリーの商品は一覧表示されない。<br />
大カテゴリーをクリックした先で小カテゴリーに登録されている商品一覧を表示させたいというカスタマイズ依頼のメモ。<br />
カテゴリーを画像表示することが原則です。<br />
「商品検索結果ページ」の上部に下記のようにしてcategory_id とctという変数をアサインする。<br />
$search_category という変数に大カテゴリーの名前が入ってくるのでそれをif文で振り分ける。<br />
category_id は大カテゴリーのIdを、<br />
ctは大カテゴリーに属する小カテゴリーの数を入力する。</p>
<pre class="brush: xml;">
&lt;{if $search_category == &quot;MEN'S WEAR&quot; }&gt;
&lt;{assign var=&quot;category_id&quot; value=&quot;787440&quot;}&gt;
&lt;{assign var=&quot;ct&quot; value=&quot;8&quot;}&gt;

&lt;{elseif $search_category == &quot;LADIE'S WEAR&quot; }&gt;
&lt;{assign var=&quot;category_id&quot; value=&quot;787441&quot;}&gt;
&lt;{assign var=&quot;ct&quot; value=&quot;9&quot;}&gt;
・
・
・
&lt;{elseif $search_category == &quot;OTHERS&quot; }&gt;
&lt;{assign var=&quot;category_id&quot; value=&quot;787443&quot;}&gt;
&lt;{assign var=&quot;ct&quot; value=&quot;4&quot;}&gt;
&lt;{/if}&gt;
</pre>
<p>その後ctがアサインされているかどうかで検索結果とするのか大カテゴリーの一覧表示とするのか<br />
振り分ける。<br />
さらにiとｋという変数を作り初期値に1をいれてループの回数（$ct）回るたびにインクリメント<br />
させると”&lt;{$category_id}&gt;_&lt;{$i++}&gt;.jpg&#8221;で画像が取得できる。リンクは”?mode=cate&amp;cbid=&lt;{$category_id}&gt;&amp;csid=&lt;{$k++}&gt;”です。</p>
<pre class="brush: xml;">
&lt;{if isset($ct)}&gt;
&lt;a href=&quot;./&quot;&gt;TOP&lt;/a&gt; &gt; &lt;a href='/?mode=srh&amp;amp;amp;cid=&lt;{$category_id}&gt;%2C0'&gt;&lt;{$search_category}&gt;&lt;/a&gt;
&lt;!--// パンくずナビ --&gt;
&lt;{assign var=&quot;i&quot; value=&quot;1&quot;}&gt;
&lt;{assign var=&quot;k&quot; value=&quot;1&quot;}&gt;
&lt;div id=&quot;subcate&quot;&gt;&lt;div class=&quot;title&quot;&gt;sub categories&lt;/div&gt;

&lt;{section name=cate loop=$ct }&gt;
&lt;div style=&quot;float: left;margin:10px 12px 0 0;&quot;&gt;
&lt;a href=&quot;?mode=cate&amp;amp;amp;cbid=&lt;{$category_id}&gt;&amp;amp;amp;csid=&lt;{$k++}&gt;&quot;&gt;
&lt;img src=&quot;http://img15.shop-pro.jp/PA01084/170/category/&lt;{$category_id}&gt;_&lt;{$i++}&gt;.jpg&quot;&gt;&lt;/a&gt;&amp;amp;amp;nbsp;&amp;amp;amp;nbsp;
&lt;/div&gt;

&lt;{/section}&gt;
&lt;br class=&quot;clear&quot; /&gt;
&lt;/div&gt;
&lt;{else}&gt;

&lt;br class=&quot;clear&quot; /&gt;
&lt;!-- ページタイトル --&gt;
&lt;strong&gt;｜検索結果&lt;/strong&gt;

&lt;br /&gt;
&amp;amp;amp;nbsp;&amp;amp;amp;nbsp;ヒット件数：&lt;strong&gt;&lt;{$productlist_num}&gt;&lt;/strong&gt;件
&lt;br /&gt;
検索条件　[カテゴリー]：&lt;{if $search_category!=&quot;&quot;}&gt;&lt;strong&gt;&lt;{$search_category}&gt;&lt;/strong&gt;&lt;{/if}&gt;
&amp;amp;amp;nbsp;&amp;amp;amp;nbsp;[検索文字]：&lt;{if $search_keyword!=&quot;&quot;}&gt;&lt;strong&gt;&lt;{$search_keyword}&gt;&lt;/strong&gt;&lt;{/if}&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;{/if}&gt;
</pre>
<p>商品一覧、商品詳細ページのパンくずリストも変更が必要なため、以下のように変更。</p>
<p>ここにはグループ名がくることもあるのでグループID（$group_id）もアサインしてif文で振り分ける。</p>
<pre class="brush: xml;">
&lt;{if $search_category == &quot;MEN'S WEAR&quot; }&gt;
&lt;{assign var=&quot;category_id&quot; value=&quot;787440&quot;}&gt;

&lt;{elseif $search_category == &quot;LADIE'S WEAR&quot; }&gt;

&lt;{assign var=&quot;category_id&quot; value=&quot;787441&quot;}&gt;

・
・
&lt;{elseif $bid_name == &quot;sassy&quot; }&gt;
&lt;{assign var=&quot;group_id&quot; value=&quot;67887&quot;}&gt;
&lt;{elseif $bid_name == &quot;conbi&quot; }&gt;
&lt;{assign var=&quot;group_id&quot; value=&quot;67888&quot;}&gt;
・
・
&lt;{elseif $search_category == &quot;OTHERS&quot; }&gt;
&lt;{assign var=&quot;category_id&quot; value=&quot;787443&quot;}&gt;
&lt;{/if}&gt;
&lt;{ if $product.id != &quot;&quot; }&gt;
&lt;!-- パンくずナビ --&gt;
&lt;a href=&quot;./&quot;&gt;TOP&lt;/a&gt; &lt;{if $category_id!=&quot;&quot;}&gt;&amp;gt; &lt;a href='?mode=srh&amp;cid=&lt;{$category_id}&gt;%2C0'&gt;&lt;{$bid_name}&gt;&lt;/a&gt;&lt;{elseif $group_id!=&quot;&quot;}&gt;
&amp;gt; &lt;a href='?mode=grp&amp;gid=&lt;{$group_id}&gt;'&gt;&lt;{$bid_name}&gt;&lt;/a&gt;&lt;{/if}&gt;&lt;{if $sid_name != &quot;&quot;}&gt; &amp;gt; &lt;a href='&lt;{$sid_link}&gt;'&gt;&lt;{$sid_name}&gt;&lt;/a&gt;&lt;{/if}&gt;&lt;{if $product_name != &quot;&quot;}&gt; &amp;gt; &lt;a href='&lt;{$product_link}&gt;'&gt;&lt;{$product_name}&gt;&lt;/a&gt;&lt;{/if}&gt;
&lt;!--// パンくずナビ --&gt;
&lt;br /&gt;
・
・
・
</pre>
<p>完全自動ではないが、HTMLを全部書き出すよりはイイ！<br />
画像登録はカテゴリー管理から登録すること。</p>
]]></content:encoded>
			<wfw:commentRss>http://officesoya.net/weblog/2009/12/14/%e3%82%ab%e3%83%a9%e3%83%bc%e3%83%9f%e3%83%bc%e3%81%a7%e5%a4%a7%e3%82%ab%e3%83%86%e3%82%b4%e3%83%aa%e3%83%bc%e3%81%ae%e4%b8%8b%e3%81%ab%e5%b0%8f%e3%82%ab%e3%83%86%e3%82%b4%e3%83%aa%e3%83%bc%e3%81%ae/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://officesoya.net/weblog/2009/12/14/%e3%82%ab%e3%83%a9%e3%83%bc%e3%83%9f%e3%83%bc%e3%81%a7%e5%a4%a7%e3%82%ab%e3%83%86%e3%82%b4%e3%83%aa%e3%83%bc%e3%81%ae%e4%b8%8b%e3%81%ab%e5%b0%8f%e3%82%ab%e3%83%86%e3%82%b4%e3%83%aa%e3%83%bc%e3%81%ae/" />
	</item>
		<item>
		<title>Diceが実行されない　Fedora</title>
		<link>http://officesoya.net/weblog/2009/11/11/dice%e3%81%8c%e5%ae%9f%e8%a1%8c%e3%81%95%e3%82%8c%e3%81%aa%e3%81%84%e3%80%80fedora/</link>
		<comments>http://officesoya.net/weblog/2009/11/11/dice%e3%81%8c%e5%ae%9f%e8%a1%8c%e3%81%95%e3%82%8c%e3%81%aa%e3%81%84%e3%80%80fedora/#comments</comments>
		<pubDate>Wed, 11 Nov 2009 10:42:01 +0000</pubDate>
		<dc:creator>soya</dc:creator>
				<category><![CDATA[Fedora Core6]]></category>

		<guid isPermaLink="false">http://officesoya.net/weblog/?p=168</guid>
		<description><![CDATA[Diceの更新が止まってしまうという現象に悩まされたが、解決。Diceが実行されないとホームページも表示できないし、メールも送受信されないので困っていました。
以下のように設定をしました。

参考URL：http://w [...]]]></description>
			<content:encoded><![CDATA[<p>Diceの更新が止まってしまうという現象に悩まされたが、解決。Diceが実行されないとホームページも表示できないし、メールも送受信されないので困っていました。<br />
以下のように設定をしました。</p>
<p><a href="http://officesoya.net/weblog/wp-content/uploads/2009/11/dice.png" rel="lightbox[pics-1257935759]" title="dice"><img src="http://officesoya.net/weblog/wp-content/uploads/2009/11/dice.thumbnail.png" alt="dice" width="200" height="134" class="attachment wp-att-167 alignleft" /></a><br />
参考URL：http://www.aconus.com/~oyaji/ddns/ddns_linux.htm<br />
Dice：http://www.hi-ho.ne.jp/yoshihiro_e/dice/</p>
]]></content:encoded>
			<wfw:commentRss>http://officesoya.net/weblog/2009/11/11/dice%e3%81%8c%e5%ae%9f%e8%a1%8c%e3%81%95%e3%82%8c%e3%81%aa%e3%81%84%e3%80%80fedora/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://officesoya.net/weblog/2009/11/11/dice%e3%81%8c%e5%ae%9f%e8%a1%8c%e3%81%95%e3%82%8c%e3%81%aa%e3%81%84%e3%80%80fedora/" />
	</item>
		<item>
		<title>jqueryをgoogleのjsapiで読み込む</title>
		<link>http://officesoya.net/weblog/2009/10/26/jquery%e3%82%92google%e3%81%aejsapi%e3%81%a7%e8%aa%ad%e3%81%bf%e8%be%bc%e3%82%80/</link>
		<comments>http://officesoya.net/weblog/2009/10/26/jquery%e3%82%92google%e3%81%aejsapi%e3%81%a7%e8%aa%ad%e3%81%bf%e8%be%bc%e3%82%80/#comments</comments>
		<pubDate>Mon, 26 Oct 2009 03:53:35 +0000</pubDate>
		<dc:creator>soya</dc:creator>
				<category><![CDATA[Javascript]]></category>

		<guid isPermaLink="false">http://officesoya.net/weblog/?p=164</guid>
		<description><![CDATA[javascriptのファイルを置けないサーバーでもjqueryを使えるようにしたときのメモ。
こう書くことで自分のサーバー上にjqueryのjsファイルがなくてもjqueryを書くことができる。便利。

&#60;scr [...]]]></description>
			<content:encoded><![CDATA[<p>javascriptのファイルを置けないサーバーでもjqueryを使えるようにしたときのメモ。<br />
こう書くことで自分のサーバー上にjqueryのjsファイルがなくてもjqueryを書くことができる。便利。</p>
<pre class="brush: jscript;">
&lt;script&gt;
google.load(&quot;jquery&quot;, &quot;1.2.3&quot;);
google.load(&quot;jqueryui&quot;, &quot;1.7.1&quot;); &lt;/script&gt;
</pre>
]]></content:encoded>
			<wfw:commentRss>http://officesoya.net/weblog/2009/10/26/jquery%e3%82%92google%e3%81%aejsapi%e3%81%a7%e8%aa%ad%e3%81%bf%e8%be%bc%e3%82%80/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://officesoya.net/weblog/2009/10/26/jquery%e3%82%92google%e3%81%aejsapi%e3%81%a7%e8%aa%ad%e3%81%bf%e8%be%bc%e3%82%80/" />
	</item>
		<item>
		<title>php.iniのmbstringで設定した文字コードとスクリプトの文字コードが違う場合の文字化け</title>
		<link>http://officesoya.net/weblog/2009/04/28/phpini/</link>
		<comments>http://officesoya.net/weblog/2009/04/28/phpini/#comments</comments>
		<pubDate>Tue, 28 Apr 2009 11:37:24 +0000</pubDate>
		<dc:creator>soya</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[mbstring]]></category>
		<category><![CDATA[php.ini]]></category>
		<category><![CDATA[文字化け]]></category>

		<guid isPermaLink="false">http://officesoya.net/weblog/?p=152</guid>
		<description><![CDATA[だいぶ前に作成したプログラムを久々に動かしてみたところ、EUC-JPで作成されていたため（php.iniの文字コード設定はUTF-8 ）ブラウザで表示されるたびに文字化けが起こる。ブラウザの「表示」→「エンコード」でEU [...]]]></description>
			<content:encoded><![CDATA[<p>だいぶ前に作成したプログラムを久々に動かしてみたところ、EUC-JPで作成されていたため（php.iniの文字コード設定はUTF-8 ）ブラウザで表示されるたびに文字化けが起こる。ブラウザの「表示」→「エンコード」でEUC-JPに直せば問題なく表示できるのだが、ページを遷移したりリロードするたびに直さなくてはならない。</p>
<p>その際のおまじないがこちら。</p>
<pre class="brush: php;">
mb_http_output('EUC-JP');
mb_internal_encoding('EUC-JP');
ini_set(&quot;default_charset&quot;, &quot;EUC-JP&quot;);
</pre>
<p>これをすべてのスクリプトが読み込む部分に記述した。文字コードがphp.iniと合っていたとしても上記のように記述しておくと環境が変わっても文字化けしなくてよいかも、と思った。ちなみにUTF-8の場合は下記のように。</p>
<pre class="brush: php;">
mb_http_output('UTF8');
mb_internal_encoding('UTF8');
ini_set(&quot;default_charset&quot;, &quot;UTF8&quot;);
</pre>
<p>文字化けなんて、もうしない！</p>
]]></content:encoded>
			<wfw:commentRss>http://officesoya.net/weblog/2009/04/28/phpini/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://officesoya.net/weblog/2009/04/28/phpini/" />
	</item>
		<item>
		<title>phpのバージョンが変わらない[Windows php5.2.9]</title>
		<link>http://officesoya.net/weblog/2009/04/11/php_varsion_up/</link>
		<comments>http://officesoya.net/weblog/2009/04/11/php_varsion_up/#comments</comments>
		<pubDate>Fri, 10 Apr 2009 15:19:29 +0000</pubDate>
		<dc:creator>soya</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[バージョンアップ]]></category>

		<guid isPermaLink="false">http://officesoya.net/weblog/?p=148</guid>
		<description><![CDATA[かなりはまりました。phpとApacheのインストールはWindows Serverで何十回も行っているのですが、バージョンアップは初でした。で、はまりました。
以前のバージョンはPHP5.2.3なんですが今回バージョン [...]]]></description>
			<content:encoded><![CDATA[<p>かなりはまりました。phpとApacheのインストールはWindows Serverで何十回も行っているのですが、バージョンアップは初でした。で、はまりました。</p>
<p>以前のバージョンはPHP5.2.3なんですが今回バージョンアップを試み最新バージョン（PHP5.2.9）のインストーラーをダウンロードしてきました。バージョンアップする必要なし！というつっこみはおいといて･･･</p>
<p>で、以前のバージョンのはインストーラではなくてバイナリをダウンロードしてきたものでしたので、そのままゴミ箱へ。そして最新バージョンのをインストーラーでインストール。でApache再起動でOK！と思っていました。</p>
<p>でも、phpinfo()でみると以前のバージョンのまま・・・なぜ？？</p>
<p>PHP何度も削除してインストールしてを繰り返しましたが結局だめでした。最終的にはバイナリ版を持ってきて丸ごとフォルダにコピーしてもやっぱりバージョンは変わらない･･･</p>
<p>コマンドラインから　php -v</p>
<p>とやると、PHP5.2.9と出るんです。でもphpinfo()だとPHP5.2.3と出るんです･･･。</p>
<p>でもって</p>
<p>echo phpversion();</p>
<p>でも　PHP5.2.3と出るんです。</p>
<p>echo PHP_VERSION</p>
<p>でも　PHP5.2.3と出るんですよ。</p>
<p>でも、解決しました。原因はバイナリ版を以前コピペでインストールしたとき、php.iniとphp5ts.dllがC:\WINDOWSにコピーしてあったんです。それがPHP5.2.3を表示させている原因でした。php.iniはこの現象の原因とは関係ないですが。</p>
<p>C:\WINDOWSにあるphp5ts.dllを削除<br />
ついでにC:\WINDOWS\php.iniも紛らわしいので削除（インストーラではphp.iniはphpをインストールしたディレクトリに置かれ、Apacheのhttpd.confに勝手にINI_PATHを書き込んでくれるため）</p>
<p>解決！4時間くらい悩みました。</p>
]]></content:encoded>
			<wfw:commentRss>http://officesoya.net/weblog/2009/04/11/php_varsion_up/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://officesoya.net/weblog/2009/04/11/php_varsion_up/" />
	</item>
	</channel>
</rss>
