<?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/"
	>

<channel>
	<title>Little.ws &#187; EC-cube</title>
	<atom:link href="http://little.ws/category/ec-cube/feed" rel="self" type="application/rss+xml" />
	<link>http://little.ws</link>
	<description>web制作とかcssとかデザインとか色々～な覚え書き</description>
	<lastBuildDate>Sat, 04 Feb 2012 07:27:16 +0000</lastBuildDate>
	<language>ja</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>EC-cube：SAKURAだけじゃなかった。新規に作成したページの500エラー</title>
		<link>http://little.ws/200908/254.html</link>
		<comments>http://little.ws/200908/254.html#comments</comments>
		<pubDate>Tue, 18 Aug 2009 06:40:37 +0000</pubDate>
		<dc:creator>chibi</dc:creator>
				<category><![CDATA[EC-cube]]></category>
		<category><![CDATA[500エラー]]></category>
		<category><![CDATA[仕様でございます]]></category>

		<guid isPermaLink="false">http://little.ws/?p=254</guid>
		<description><![CDATA[同じ現象が、今作ってるサイトでも発生したので対応メモ。 デザイン管理→ページ詳細から新規にページを作成するとhtml/user_dataのなかに新しいページ名.phpのファイルが出来て、そこにアクセスで表示されるようにな&#8230;]]></description>
			<content:encoded><![CDATA[<p>同じ現象が、今作ってるサイトでも発生したので対応メモ。<br />
デザイン管理→ページ詳細から新規にページを作成するとhtml/user_dataのなかに新しいページ名.phpのファイルが出来て、そこにアクセスで表示されるようになるのですが、うちのサーバーでは、何回作成しても500エラーの表示で、作成したページにアクセスできませぬ。<br />
調べてみると、さくらのレンタルサーバーでも起きるらしい。<br />
ということで以下対策メモ<br />
<span id="more-254"></span><br />
ほぼ<a href="http://xoops.ec-cube.net/modules/newbb/viewtopic.php?topic_id=4385&#038;forum=11&#038;post_id=19980" class="liexternal">フォーラム</a>のコピーなので、フォーラムをお読み下さい。こちらはあくまでも個人用です。<br/><br />
ただ単に、新規作成のページのパーミッションが666になってるので、それを644に変更すればいいのですが、Adminページ上で編集する度にEC-cube側の仕様で、パーミッションが666に戻ってしまい、また変更という感じでいたちごっこみたくなっちゃいます。<br />
ということで、そんな仕様を変更。<br/><br />
/data/class/pages/admin/design/LC_Page_Admin_Design_MainEdit.php</p>
<pre class="brush: php; title: ; notranslate">
// phpファイルの作成
$fp = fopen($path,&quot;w&quot;);
fwrite($fp, $php_data);
chmod($path, 0644); //この行追加
fclose($fp);
</pre>
<p>以上</p>
]]></content:encoded>
			<wfw:commentRss>http://little.ws/200908/254.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>EC-cube：カゴの中ブロックに商品名や商品写真を表示させる</title>
		<link>http://little.ws/200908/249.html</link>
		<comments>http://little.ws/200908/249.html#comments</comments>
		<pubDate>Mon, 10 Aug 2009 14:59:27 +0000</pubDate>
		<dc:creator>chibi</dc:creator>
				<category><![CDATA[EC-cube]]></category>
		<category><![CDATA[カート]]></category>
		<category><![CDATA[ブロック]]></category>

		<guid isPermaLink="false">http://little.ws/?p=249</guid>
		<description><![CDATA[調べて出てきた情報が古かったので、Forumのramrun様をリスペクトしてここに覚え書きしときます。 元記事を読んで分からないときにだけお読み下さい。 あくまでもコピペ+改良版です。1系をお使いの方はフォーラムをご覧下&#8230;]]></description>
			<content:encoded><![CDATA[<p>調べて出てきた情報が古かったので、Forumのramrun様をリスペクトしてここに覚え書きしときます。<br />
<a href="http://xoops.ec-cube.net/modules/newbb/viewtopic.php?topic_id=384&#038;post_id=1657&#038;order=0&#038;viewmode=flat&#038;pid=0&#038;forum=5" class="liexternal">元記事</a>を読んで分からないときにだけお読み下さい。<br />
<strong>あくまでもコピペ+改良版です。1系をお使いの方はフォーラムをご覧下さい。</strong><br />
<span id="more-249"></span><br />
ソース見にくいですがソース右上のクリップボードにコピーとか色々試して見て下さい。</p>
<h4>/bloc/cart.tplブロックファイル</h4>
<p>これもフォーラムのじゃちょっと動きがおかしかったので少し編集してます。</p>
<pre class="brush: php; title: ; notranslate">
&lt;!--{*
* Copyright(c) 2000-2007 LOCKON CO.,LTD. All Rights Reserved.
*
* http://www.lockon.co.jp/
*}--&gt;
&lt;!--▼現在のカゴの中ここから--&gt;
&lt;div class=&quot;sb-base&quot;&gt;

&lt;!--★タイトル★--&gt;
&lt;h4&gt;&lt;img src=&quot;&lt;!--{$smarty.const.URL_DIR}--&gt;img/side/title_cartin.jpg&quot; alt=&quot;現在のカゴの中&quot; /&gt;&lt;/h4&gt;

&lt;div class=&quot;sb-main&quot;&gt;
&lt;div class=&quot;sb-content&quot;&gt;

&lt;!--★商品点数★--&gt;
  &lt;div&gt;&lt;span class=&quot;fs10&quot;&gt;商品数：&lt;!--{$arrCartList.0.TotalQuantity|number_format|default:0}--&gt;点&lt;/span&gt;&lt;/div&gt;

 &lt;!--{if $arrCartList.0.TotalQuantity &gt; 0}--&gt;
&lt;form name=&quot;form2&quot; id=&quot;form2&quot; method=&quot;post&quot; action=&quot;&lt;!--{$smarty.const.URL_DIR}--&gt;frontparts/bloc/cart_delitem.php&quot;&gt;
&lt;input type=&quot;hidden&quot; name=&quot;mode&quot; value=&quot;delete&quot; /&gt;
&lt;input type=&quot;hidden&quot; name=&quot;cart_no&quot; value=&quot;&quot; /&gt;
&lt;!--{section name=cnt loop=$arrCartList}--&gt;
&lt;div style=&quot;margin-bottom:5px&quot;&gt;
&lt;!--★商品画像★--&gt;
&lt;div style=&quot;width:50px;float:left&quot;&gt;&lt;a href=&quot;&lt;!--{$smarty.const.URL_DIR}--&gt;cart/index.php&quot;&gt;
 //↓rewrited by chibiの覚え書き
&lt;img src=&quot;&lt;!--{$smarty.const.SITE_URL}--&gt;resize_image.php?image=&lt;!--{$arrCartList[cnt].img}--&gt;&amp;width=48&amp;height=48&quot; alt=&quot;&lt;!--{$arrCartList[cnt].product_name|escape}--&gt;&quot; /&gt;
&lt;/a&gt;&lt;/div&gt;

&lt;div style=&quot;width:95px;float:right&quot;&gt;
&lt;!--★商品名★--&gt;
&lt;div style=&quot;color:#4a6fa6;font-size:14px&quot;&gt;
&lt;strong&gt;&lt;!--{$arrCartList[cnt].product_name|escape}--&gt;&lt;/strong&gt;
&lt;/div&gt;

&lt;!--★販売価格×数量★--&gt;
&lt;div style=&quot;text-align:right;font-size:12px&quot;&gt;
&lt;!--{$arrCartList[cnt].price|sfPreTax:$arrInfo.tax:$arrInfo.tax_rule|number_format|default:0}--&gt;円×&lt;!--{$arrCartList[cnt].quantity|escape}--&gt;
&lt;a href=&quot;&lt;!--{$smarty.const.URL_DIR}--&gt;frontparts/bloc/cart_delitem.php&quot; onclick=&quot;fnFormModeSubmit('form2', 'delete', 'cart_no', '&lt;!--{$arrCartList[cnt].cart_no}--&gt;'); return false;&quot;&gt;&lt;img src=&quot;&lt;!--{$smarty.const.URL_DIR}--&gt;img/contents/icon_delete.jpg&quot; alt=&quot;この商品の購入を取り消す&quot; /&gt;&lt;/a&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;br style=&quot;clear:both&quot; /&gt;
&lt;/div&gt;
&lt;!--{/section}--&gt;
&lt;/form&gt;
&lt;!--{/if}--&gt;
&lt;!--★区切り線★--&gt;
&lt;hr /&gt;
&lt;!--★合計★--&gt;
&lt;div style=&quot;margin-bottom:5px;text-align:right&quot;&gt;
&lt;span class=&quot;redst&quot;&gt;&lt;span class=&quot;fs14&quot;&gt;合計：&lt;!--{$arrCartList.0.ProductsTotal|number_format|default:0}--&gt;円&lt;/span&gt;&lt;/span&gt;
&lt;/div&gt;
&lt;!--★カゴの中に商品がある場合にのみ表示★--&gt;
&lt;!--{if $arrCartList.0.TotalQuantity &gt; 0 and $arrCartList.0.free_rule &gt; 0}--&gt;
&lt;div style=&quot;margin-bottom:10px&quot;&gt;
&lt;span class=&quot;fs10&quot;&gt;
&lt;!--{if $arrCartList.0.deliv_free &gt; 0}--&gt;
送料手数料無料まであと&lt;!--{$arrCartList.0.deliv_free|number_format|default:0}--&gt;円（税込）です。
&lt;!--{else}--&gt;
現在、送料は「&lt;span class=&quot;redst&quot;&gt;無料&lt;/span&gt;」です。
&lt;!--{/if}--&gt;
&lt;/span&gt;
&lt;/div&gt;
&lt;!--{/if}--&gt;
&lt;!--★ボタン★--&gt;
&lt;div style=&quot;margin-top:5px;text-align:center&quot;&gt;
&lt;a href=&quot;&lt;!--{$smarty.const.URL_DIR}--&gt;cart/index.php&quot; onmouseover=&quot;chgImg('&lt;!--{$smarty.const.URL_DIR}--&gt;img/side/button_cartin_on.gif','button_cartin');&quot; onmouseout=&quot;chgImg('&lt;!--{$smarty.const.URL_DIR}--&gt;img/side/button_cartin.gif','button_cartin');&quot;&gt;&lt;img src=&quot;&lt;!--{$smarty.const.URL_DIR}--&gt;img/side/button_cartin.gif&quot; alt=&quot;カゴの中を見る&quot; name=&quot;button_cartin&quot; /&gt;&lt;/a&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;sb-bottom&quot;&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;!--▲現在のカゴの中ここまで--&gt;
</pre>
<h4>data/class/pages/frontparts/bloc/LC_Page_FrontParts_Bloc_Cart.php</h4>
<p>フォーラムではeccube/html/frontparts/bloc/cart.phpとなっているファイルですが、2系ではdata/class/pages/frontparts/bloc/LC_Page_FrontParts_Bloc_Cart.phpこのファイルを編集。<br />
編集する場所はここ！！のとこでｗ</p>
<pre class="brush: php; title: ; notranslate">
if (count($_SESSION[$objCart-&gt;key]) &gt; 0){
// カート情報を取得
$arrCartList = $objCart-&gt;getCartList();

// カート内の商品ＩＤ一覧を取得
$arrAllProductID = $objCart-&gt;getAllProductID();
// 商品が1つ以上入っている場合には商品名称を取得
if (count($arrAllProductID) &gt; 0){
	$objQuery = new SC_Query();
	$arrVal = array();
	$sql = &quot;&quot;;
   //↓ここ！！！
	$sql = &quot;SELECT product_id,name,main_list_image FROM dtb_products WHERE product_id IN ( ?&quot;;
	$arrVal = array($arrAllProductID[0]);
	for($i = 1 ; $i &lt; count($arrAllProductID) ; $i++){
	$sql.= &quot; ,? &quot;;
	array_push($arrVal, $arrAllProductID[$i]);
}
$sql.= &quot; )&quot;;
 //↓ここから！！！
$arrProduct_list = $objQuery-&gt;getAll($sql, $arrVal);

$item_list = array();
for($i = 0; $i &lt; count($arrProduct_list); $i++){
$item_list[$arrProduct_list[$i]['product_id']]['name'] = $arrProduct_list[$i]['name'];
$item_list[$arrProduct_list[$i]['product_id']]['main_list_image'] = $arrProduct_list[$i]['main_list_image'];
}
for($i = 0; $i &lt; count($arrCartList); $i++){
$arrCartList[$i]['product_name'] = $item_list[$arrCartList[$i]['id'][0]]['name'];
$arrCartList[$i]['img'] = $item_list[$arrCartList[$i]['id'][0]]['main_list_image'];
}
//↑ここまで！！！
}
// 店舗情報の取得
$arrInfo = $objSiteInfo-&gt;data;
// 購入金額合計
$ProductsTotal = $objCart-&gt;getAllProductsTotal($arrInfo);

// 合計個数
$TotalQuantity = $objCart-&gt;getTotalQuantity();1

// 送料無料までの金額
$arrCartList[0]['ProductsTotal'] = $ProductsTotal;
$arrCartList[0]['TotalQuantity'] = $TotalQuantity;
$deliv_free = $arrInfo['free_rule'] - $ProductsTotal;
$arrCartList[0]['free_rule'] = $arrInfo['free_rule'];
$arrCartList[0]['deliv_free'] = $deliv_free;

$objSubPage-&gt;arrCartList = $arrCartList;
//↓ここ！！！
$objSubPage-&gt;arrInfo = $arrInfo;
}
</pre>
<h4>/html/frontparts/bloc/cart_delitem.php</h4>
<p>ファイルを新規に作成</p>
<pre class="brush: php; title: ; notranslate">
&lt;?php

require_once(&quot;../../require.php&quot;);

$objCartSess = new SC_CartSession(&quot;&quot;, false);

switch($_POST['mode']) {
case 'up':
    $objCartSess-&gt;upQuantity($_POST['cart_no']);
    header(&quot;Location: &quot; . URL_DIR);
    break;
case 'down':
    $objCartSess-&gt;downQuantity($_POST['cart_no']);
    header(&quot;Location: &quot; . URL_DIR);
    break;
case 'delete':
    $objCartSess-&gt;delProduct($_POST['cart_no']);
    header(&quot;Location: &quot; . URL_DIR);
    break;
default:
    header(&quot;Location: &quot; . URL_DIR);
    break;
}

?&gt;
</pre>
<p>以上で出来ると思います。<br />
ちなみに、フォーラムに書いてある、eccube/html/products/list.phpとeccube/html/products/detail.phpは編集しなくてもいいと思ったので見てません。<br />
というか、編集前にテストしたら全然問題ないので見てませんｗ<br/></p>
]]></content:encoded>
			<wfw:commentRss>http://little.ws/200908/249.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>EC-CUBE：SEOの為のタイトル変更のまとめ！</title>
		<link>http://little.ws/200906/212.html</link>
		<comments>http://little.ws/200906/212.html#comments</comments>
		<pubDate>Thu, 25 Jun 2009 03:05:23 +0000</pubDate>
		<dc:creator>chibi</dc:creator>
				<category><![CDATA[EC-cube]]></category>
		<category><![CDATA[SEO]]></category>

		<guid isPermaLink="false">http://little.ws/?p=212</guid>
		<description><![CDATA[色々調べましたが、みなさん偉くめんどくさいことをしているようで・・。 SQLいじってみたり・・・。そんなことしなくても変更できるのに。 ということで、タイトル変更のまとめです。 ぼくが開発中なのはver2.4.0で以下S&#8230;]]></description>
			<content:encoded><![CDATA[<p>色々調べましたが、みなさん偉くめんどくさいことをしているようで・・。<br />
SQLいじってみたり・・・。そんなことしなくても変更できるのに。<br/><br />
ということで、タイトル変更のまとめです。<br />
<span id="more-212"></span><br />
ぼくが開発中なのはver2.4.0で以下SS<br />
<a href="http://little.ws/wp-content/uploads/2009/06/ec_ver.jpg" rel="fancybox-gallery" rel='lightbox' class="liimagelink"><img src="http://little.ws/wp-content/uploads/2009/06/ec_ver-300x85.jpg" alt="ec_ver" title="ec_ver" width="300" height="85" class="alignnone size-medium wp-image-213" /></a><br />
title表示の為のテンプレートファイルは/data/Smarty/templates/使用中のテンプレート/site_frame.tplで、これをいじっていきます。<br />
プラス、それぞれのページに対応したタイトルの表示の仕方が、<br />
data/class/pages/のなかにあります。<br/></p>
<h3>1.TOPページ(index)のタイトル変更</h3>
<p>上記の通りdata/class/pages/の中、data/class/pages/LC_Page_Index.phpを編集。44行目あたりから、</p>
<pre class="brush: php; title: ; notranslate">
    /**
     * Page を初期化する.
     *
     * @return void
     */
    function init() {
        parent::init();
        $this-&gt;tpl_mainpage = 'top.tpl';
        $this-&gt;tpl_column_num = 3;
    /*以下を追加　by chibi*/
        $this-&gt;tpl_title = 'TOPページ';
    }
</pre>
<p><span style="color:red;">$this->tpl_title = &#8216;TOPページ&#8217;;</span>この一文を追記。<br/><br />
こうすることによって、TOPページのタイトルに【TOPページ】という一文が必ず入るようになるので、<br />
/data/Smarty/templates/使用中のテンプレート/site_frame.tplの中のtitleの部分を書き換えます。</p>
<pre class="brush: php; title: ; notranslate">
&lt;!--{if $tpl_title == &quot;TOPページ&quot;}--&gt;
&lt;title&gt;ここに書いたtitleがそのままTOPページで表示されます&lt;/title&gt;
&lt;!--{else}--&gt;
&lt;title&gt;&lt;!--{$tpl_title|escape}--&gt;｜&lt;!--{$arrSiteInfo.shop_name|escape}--&gt;&lt;/title&gt;
&lt;!--{/if}--&gt;
</pre>
<p>という少々荒っぽいやり方ですが、SQLいじったりするより楽かと・・。<br/></p>
<h3>2.商品一覧ページのタイトル変更</h3>
<p>これは、<a href="http://www.jaga99.com/blog/?p=33" class="liexternal">Web PHP 北九州 SEO  &raquo; Blog Archive   &raquo; EC-CUBE 商品一覧ページと、商品詳細ページのタイトルタグの変更</a>こちらのサイト様の方でわかりやすく説明あるので。。<br />
ということで、商品一覧、TOPページ、商品詳細ページの３つのページのタイトルをSEO対策的に変更してまとめた/data/Smarty/templates/使用中のテンプレート/site_frame.tplのtitle部分は以下</p>
<pre class="brush: php; title: ; notranslate">
&lt;!--{if $tpl_title == &quot;商品一覧ページ&quot;}--&gt;
&lt;title&gt;&lt;!--{$tpl_subtitle|escape}--&gt;｜&lt;!--{$arrSiteInfo.shop_name|escape}--&gt;&lt;/title&gt;
&lt;!--{elseif $tpl_title == &quot;TOPページ&quot;}--&gt;
&lt;title&gt;ここに書いたtitleがそのままTOPページで表示されます&lt;/title&gt;
&lt;!--{else}--&gt;
&lt;title&gt;&lt;!--{$tpl_title|escape}--&gt;｜&lt;!--{$arrSiteInfo.shop_name|escape}--&gt;&lt;/title&gt;
&lt;!--{/if}--&gt;
</pre>
<p>ダメだ、ここにまとめるの、途中からすごく面倒。</p>
]]></content:encoded>
			<wfw:commentRss>http://little.ws/200906/212.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>EC-CUBE：新着商品表示・パンくず・SEO</title>
		<link>http://little.ws/200906/209.html</link>
		<comments>http://little.ws/200906/209.html#comments</comments>
		<pubDate>Wed, 24 Jun 2009 12:41:23 +0000</pubDate>
		<dc:creator>chibi</dc:creator>
				<category><![CDATA[EC-cube]]></category>
		<category><![CDATA[SEO]]></category>
		<category><![CDATA[ただの覚え書き]]></category>
		<category><![CDATA[ブックマーク]]></category>

		<guid isPermaLink="false">http://little.ws/?p=209</guid>
		<description><![CDATA[覚え書き。 EC-CUBEで、新着商品の紹介をトップページに表示する方法。 &#8211; Naga Blog EC-CUBEでSEOってどうすればいいですか？ &#124; EC-CUBE工房 EC-CUBE開発Wiki &#8&#8230;]]></description>
			<content:encoded><![CDATA[<p>覚え書き。<br/><br />
<a href="http://www.naga-blog.com/archives/2009/03/101727.php" class="liexternal">EC-CUBEで、新着商品の紹介をトップページに表示する方法。 &#8211; Naga Blog</a><br/><br />
<a href="http://ec-cube.systemfriend.co.jp/consult/consult0011/" class="liexternal">EC-CUBEでSEOってどうすればいいですか？ | EC-CUBE工房</a><br/><br />
<a href="http://www28.atwiki.jp/lucier/m/pages/42.html?guid=on" class="liexternal">EC-CUBE開発Wiki &#8211; [EC-CUBE]パンくずリスト設置</a></p>
]]></content:encoded>
			<wfw:commentRss>http://little.ws/200906/209.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

