<?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 &#187; OpenCart</title>
	<atom:link href="http://officesoya.net/weblog/tag/opencart/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/tag/opencart/feed/" />
		<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>Opencartがバージョンアップしました</title>
		<link>http://officesoya.net/weblog/2009/02/20/opencart_/</link>
		<comments>http://officesoya.net/weblog/2009/02/20/opencart_/#comments</comments>
		<pubDate>Fri, 20 Feb 2009 08:43:21 +0000</pubDate>
		<dc:creator>soya</dc:creator>
				<category><![CDATA[OpenCart]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://officesoya.net/weblog/?p=134</guid>
		<description><![CDATA[Opencart v1.1.8　がリリースされましたね。
早速見てみましたが、Modelディレクトリに以前は何も入っていなかったのですが、モデルクラスが追加されていました。
プログラムコードもだいぶ改良されていて、以前よ [...]]]></description>
			<content:encoded><![CDATA[<p>Opencart v1.1.8　がリリースされましたね。</p>
<p>早速見てみましたが、Modelディレクトリに以前は何も入っていなかったのですが、モデルクラスが追加されていました。</p>
<p>プログラムコードもだいぶ改良されていて、以前より、ソースコードが短くて済みます。より、フレームワークになったって感じです。</p>
<p>管理者画面も、以前は画像と商品を別々にアップロードしなくてはなりませんでしたが、今度のは同じ画面で追加が出来るので、こちらのほうが一般的で良いと思いました。</p>
<p>構造を全て理解するにはまだ少し時間がかかりますが、すこしずつ紐解いて行きたいです。</p>
<p>デザインも一新して前よりもさらにいい感じだし、これで日本のユーザーも少しは増えてくれるかな？</p>
<p>さあＯｐｅｎＣａｒｔを使いましょう！！困ったことは相談に乗ります！一緒に解決しましょう！</p>
]]></content:encoded>
			<wfw:commentRss>http://officesoya.net/weblog/2009/02/20/opencart_/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://officesoya.net/weblog/2009/02/20/opencart_/" />
	</item>
		<item>
		<title>OpenCartのモジュール　DisplayIcons</title>
		<link>http://officesoya.net/weblog/2008/12/01/opencart_display_icon_module/</link>
		<comments>http://officesoya.net/weblog/2008/12/01/opencart_display_icon_module/#comments</comments>
		<pubDate>Sun, 30 Nov 2008 16:14:52 +0000</pubDate>
		<dc:creator>soya</dc:creator>
				<category><![CDATA[OpenCart]]></category>
		<category><![CDATA[module]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://officesoya.net/weblog/?p=127</guid>
		<description><![CDATA[英語の説明文が完成したのでContributionをアップしました。名前はDisplayIcons。
その名前の通り、新作リリースの場合は「New」、在庫が少ない場合は「在庫少」、在庫がない場合は「在庫無」のアイコンが出 [...]]]></description>
			<content:encoded><![CDATA[<p>英語の説明文が完成したのでContributionをアップしました。名前はDisplayIcons。<br />
その名前の通り、新作リリースの場合は「New」、在庫が少ない場合は「在庫少」、在庫がない場合は「在庫無」のアイコンが出る、というものです。新作の場合は何日まで表示するか、在庫が少ない場合のアイコンは在庫がいくつになったら表示するか設定できます。<br />
日本のショッピング事情には必須だと思うのですが、（特に在庫無しっていうの）無かったので自作しました。<br />
OpenCartを使いましょう！</p>
<p>こちらでダウンロードできます<br />
<a href="http://www.opencart.com/contribution/info/category_id/1/contribution_id/81">http://www.opencart.com/contribution/info/category_id/1/contribution_id/81</a></p>
]]></content:encoded>
			<wfw:commentRss>http://officesoya.net/weblog/2008/12/01/opencart_display_icon_module/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://officesoya.net/weblog/2008/12/01/opencart_display_icon_module/" />
	</item>
		<item>
		<title>OpenCartのrss.phpで文字化け</title>
		<link>http://officesoya.net/weblog/2008/11/22/opencart_rss/</link>
		<comments>http://officesoya.net/weblog/2008/11/22/opencart_rss/#comments</comments>
		<pubDate>Fri, 21 Nov 2008 15:10:28 +0000</pubDate>
		<dc:creator>soya</dc:creator>
				<category><![CDATA[OpenCart]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[rss]]></category>

		<guid isPermaLink="false">http://officesoya.net/weblog/?p=123</guid>
		<description><![CDATA[OpenCartのrss.phpで日本語が文字化けする。&#38;atilde;←こんな文字がたくさん出る。
upload/rss.phpのソースコードを見てみると、48行目

foreach ($results as $result) {
$products[]=array(

'name' =&#62; htmlentities(strip_tags($result['name'])),
'url' =&#62; htmlentities($url-&#62;href('product', FALSE, array('product_id' =&#62; $result['product_id']))),
'add_date' =&#62; date(&#34;D, d M Y H:i:s T&#34;, strtotime($result['date_product_added'])),
'desc' =&#62; htmlentities(strip_tags($result['description'],'ENT_QUOTES')) .
htmlentities('&#60;br&#62;&#60;img width=&#34;100&#34; height=&#34;100&#34; src=&#34;' .
$image-&#62;resize($result['filename'], 100, 100) . '&#34;&#62;')
);
}

となっているが、ここのforeach文で文字化けしている様子。
htmlentities のデフォルト文字列は iso-8859-1なのでUTF-8に変更。

foreach ($results as $result) {
$products[]=array(

'name' =&#62; htmlentities(strip_tags($result['name']),ENT_COMPAT,&#34;utf-8&#34;),
'url' =&#62; htmlentities($url-&#62;href('product', FALSE, array('product_id' =&#62; $result['product_id'])),ENT_COMPAT,&#34;utf-8&#34;),
'add_date' =&#62; date(&#34;D, d M Y H:i:s T&#34;, strtotime($result['date_product_added'])),
'desc' =&#62; [...]]]></description>
			<content:encoded><![CDATA[<p>OpenCartのrss.phpで日本語が文字化けする。&amp;atilde;←こんな文字がたくさん出る。</p>
<p>upload/rss.phpのソースコードを見てみると、48行目</p>
<pre class="brush: php;">
foreach ($results as $result) {
$products[]=array(

'name' =&gt; htmlentities(strip_tags($result['name'])),
'url' =&gt; htmlentities($url-&gt;href('product', FALSE, array('product_id' =&gt; $result['product_id']))),
'add_date' =&gt; date(&quot;D, d M Y H:i:s T&quot;, strtotime($result['date_product_added'])),
'desc' =&gt; htmlentities(strip_tags($result['description'],'ENT_QUOTES')) .
htmlentities('&lt;br&gt;&lt;img width=&quot;100&quot; height=&quot;100&quot; src=&quot;' .
$image-&gt;resize($result['filename'], 100, 100) . '&quot;&gt;')
);
}
</pre>
<p>となっているが、ここのforeach文で文字化けしている様子。<br />
htmlentities のデフォルト文字列は iso-8859-1なのでUTF-8に変更。</p>
<pre class="brush: php;">
foreach ($results as $result) {
$products[]=array(

'name' =&gt; htmlentities(strip_tags($result['name']),ENT_COMPAT,&quot;utf-8&quot;),
'url' =&gt; htmlentities($url-&gt;href('product', FALSE, array('product_id' =&gt; $result['product_id'])),ENT_COMPAT,&quot;utf-8&quot;),
'add_date' =&gt; date(&quot;D, d M Y H:i:s T&quot;, strtotime($result['date_product_added'])),
'desc' =&gt; htmlentities(strip_tags($result['description'],'ENT_QUOTES'),ENT_COMPAT,&quot;utf-8&quot;) .
htmlentities('&lt;br&gt;&lt;img width=&quot;100&quot; height=&quot;100&quot; src=&quot;' .
$image-&gt;resize($result['filename'], 100, 100) . '&quot;&gt;'),ENT_COMPAT,&quot;utf-8&quot;
);
}
</pre>
<p>これで文字化けが解消された</p>
]]></content:encoded>
			<wfw:commentRss>http://officesoya.net/weblog/2008/11/22/opencart_rss/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://officesoya.net/weblog/2008/11/22/opencart_rss/" />
	</item>
		<item>
		<title>OpenCartの日本語化</title>
		<link>http://officesoya.net/weblog/2008/11/21/opencart_japanse/</link>
		<comments>http://officesoya.net/weblog/2008/11/21/opencart_japanse/#comments</comments>
		<pubDate>Fri, 21 Nov 2008 14:59:45 +0000</pubDate>
		<dc:creator>soya</dc:creator>
				<category><![CDATA[OpenCart]]></category>
		<category><![CDATA[日本語化]]></category>

		<guid isPermaLink="false">http://officesoya.net/weblog/?p=120</guid>
		<description><![CDATA[日本語化ファイルを制作しました。ファイルは本家http://www.opencart.com/のcontribution内にアップロードしました。ここです。
英語は基本的に苦手なので、日本人がもっとOpencartを使っ [...]]]></description>
			<content:encoded><![CDATA[<p>日本語化ファイルを制作しました。ファイルは本家http://www.opencart.com/のcontribution内にアップロードしました。<a title="コントリビューション" href="http://www.opencart.com/contribution/category/category_id/7">ここ</a>です。</p>
<p>英語は基本的に苦手なので、日本人がもっとOpencartを使ってくれるよう、日本語を見るとなんとなく安心できる人のためにアップしました。開発時間の短縮になれば、と思います。日本語化したらかえってわかりずらくなった、という方は自分で日本語を直してください。ご利用はご自身の責任でお願いします。</p>
<p>ただいま、アイコンを表示するモジュールを製作中です。完成すれば、New アイコンと在庫少ないアイコンと在庫切れアイコンが表示できるようになります。、というか、もうできているのですが、本家にアップロードするのに、インストール方法の翻訳（日本語→英語）に苦闘しています<span style="color: #c0c0c0;">（というか、できない）</span>。今週中に通訳の知り合いにお願いして翻訳してもらう予定です。</p>
]]></content:encoded>
			<wfw:commentRss>http://officesoya.net/weblog/2008/11/21/opencart_japanse/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://officesoya.net/weblog/2008/11/21/opencart_japanse/" />
	</item>
		<item>
		<title>OpenCartの日本語化（バグフィックス）</title>
		<link>http://officesoya.net/weblog/2008/11/12/opencart_japanese/</link>
		<comments>http://officesoya.net/weblog/2008/11/12/opencart_japanese/#comments</comments>
		<pubDate>Tue, 11 Nov 2008 20:08:59 +0000</pubDate>
		<dc:creator>soya</dc:creator>
				<category><![CDATA[OpenCart]]></category>
		<category><![CDATA[日本語化]]></category>

		<guid isPermaLink="false">http://officesoya.net/weblog/?p=108</guid>
		<description><![CDATA[引き続きオープンカートOpenCartの日本語化に集中。
といっても日本語になる前にバグを発見したのでメモっておきます。
①/upload/library/environment/url.php
80行目//return [...]]]></description>
			<content:encoded><![CDATA[<p>引き続きオープンカートOpenCartの日本語化に集中。<br />
といっても日本語になる前にバグを発見したのでメモっておきます。<br />
①<span style="color: #339966;">/upload/library/environment/url.php</span><br />
80行目//return htmlspecialchars($server . $link);<br />
return $server . $link;</p>
<p>に書き換える<br />
extension.phpのURLがおかしかったので。<br />
参考URL→http://forum.opencart.com/index.php?action=profile;u=2022;sa=showPosts</p>
<p>②<span style="color: #339966;">/upload/admin/template/default/content/product.tpl</span><br />
10行目  &lt;div class=&#8221;enabled&#8221; onmouseover=&#8221;className=&#8217;hover&#8217;&#8221; onmouseout=&#8221;className=&#8217;enabled&#8217;&#8221; onclick=&#8221;location=&#8217;&lt;?php echo $delete; ?&gt;&#8217;&gt;<br />
を<br />
&lt;div class=&#8221;enabled&#8221; onmouseover=&#8221;className=&#8217;hover&#8217;&#8221; onmouseout=&#8221;className=&#8217;enabled&#8217;&#8221; onclick=&#8221;location=&#8217;&lt;?php echo $delete; ?&gt;&#8217;&#8221;&gt;<br />
に書き換える。※最後の方の「&#8221;」を書き加える<br />
製品更新の画面で削除アイコンが表示されなかったため（動作には問題ないが）。</p>
<p>デモ用オープンカート <a href="http://officesoya.net/~demo3/" target="_blank">http://officesoya.net/~demo3 </a>にて公開予定です。</p>
]]></content:encoded>
			<wfw:commentRss>http://officesoya.net/weblog/2008/11/12/opencart_japanese/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://officesoya.net/weblog/2008/11/12/opencart_japanese/" />
	</item>
		<item>
		<title>.htaccessを有効にするためにAllowOverride AllにするとForbiddenになる・・・</title>
		<link>http://officesoya.net/weblog/2008/11/08/opencart/</link>
		<comments>http://officesoya.net/weblog/2008/11/08/opencart/#comments</comments>
		<pubDate>Sat, 08 Nov 2008 08:07:01 +0000</pubDate>
		<dc:creator>soya</dc:creator>
				<category><![CDATA[OpenCart]]></category>
		<category><![CDATA[htaccess]]></category>

		<guid isPermaLink="false">http://officesoya.net/weblog/?p=102</guid>
		<description><![CDATA[OpenCartのインターフェイスがかわいくて大変気に入っているのですが、日本ではほとんど使われていないOpenCartを必死に日本語化しているさなか、ローカル(WindowsXP)ではリンクをクリックしてもページが変わ [...]]]></description>
			<content:encoded><![CDATA[<p><a title="OpenCart" href="http://http://www.opencart.com/" target="_blank">OpenCart</a>のインターフェイスがかわいくて大変気に入っているのですが、日本ではほとんど使われていないOpenCartを必死に日本語化しているさなか、ローカル(WindowsXP)ではリンクをクリックしてもページが変わらない、テストサーバー(Fedora Core6)ではRewriteが動いていない様子でNotFoundになってしまい、心が折れました・・・。日本語の情報が少なすぎなのは覚悟の上でしたが。英語のFAQを読み漁っていると、解決しました。私はチルダ付きのUserdirにインストールしたわけだが、以下の太字の部分を加える必要があったのです。</p>
<p>&lt;IfModule mod_rewrite.c&gt;<br />
RewriteEngine On<br />
<strong><br />
# Put your installation directory here:<br />
# If your URL is www.example.com/shop/, use /shop/<br />
# If your URL is www.example.com/, use /<br />
<span style="text-decoration: line-through;">RewriteBase /</span><br />
RewriteBase /~mydir/</strong></p>
<p>#OPENCART REWRITES START<br />
RewriteCond %{REQUEST_FILENAME} !-f<br />
RewriteCond %{REQUEST_FILENAME} !-d<br />
RewriteRule ^(.*) index.php<br />
#OPENCART REWRITES END</p>
<p>&lt;/IfModule&gt;</p>
<p>テストサーバー(Fedora Core6)では上記の問題に加え、.htaccessの設定をhttpd.confで使用しているディレクトリにだけ<br />
AllowOverride All<br />
としてみるとForbiddenに<br />
AllowOcerride None<br />
としてみるとトップページは表示されるがその他のページはFileNotFoundになってしまうという現象に悩まされた。<br />
が、.htaccessのパーミッションが間違っていた・・・644で表示できました。</p>
<p>日本語情報がかなり少ないOpenCartですが、ソースコードが整理されていてカスタマイズしやすそうなので選びました。ZenCartやPrestaShopもインストールしてみたけど、どうも管理画面とかが気に入らない・・・<br />
皆さんこんなにかわいい<a title="OpenCart" href="http://http://www.opencart.com/" target="_blank">OpenCart</a>をもっと使ってください！</p>
]]></content:encoded>
			<wfw:commentRss>http://officesoya.net/weblog/2008/11/08/opencart/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://officesoya.net/weblog/2008/11/08/opencart/" />
	</item>
	</channel>
</rss>
