[theme]更改OPTIONS的Popular Widget

起因是有網友反應說用分類索引的第二頁會變成全文章的第二頁這麼一來就分類索引跟頁次等於都不能用了
其實這問題之前我自己就有發現
不過想說反正小貓兩三隻也就拖拖拖….
既然都被點到了就來好好的檢討一下
預設以為是PAGENAVI沒有正確使用
也還一過是不是要用.htaccess來做轉址
結果發現是WP預設的category出來的URL原來還是以”~/?cat=6″的方式出現
如果改用OPTIONS的category輸出的話就會輸出成cleanURL:”/category/about_web_ria”
這麼一來就可以正常使用分類索引(category)的分頁功能了^^
繼續閱讀

ec-cube中商品カテゴリー的靜態網址

昨天只做了detail的靜態網址
今天無意間發現這篇
參考了一下把カテゴリー的靜態網址也弄出來了

RewriteEngine On
RewriteRule detail¥/([0-9]+)/? /onlineshop/products/detail.php?product_id=$1 [L]
RewriteRule list/([0-9]+)/? /onlineshop/products/list.php?category_id=$1 [L]

\data\Smarty\templates\mystyle\bloc\category.tpl

44
<li class="level<!--{$level}--><!--{if in_array($arrTree[cnt].category_id, $tpl_category_id) }--> onmark<!--{/if}-->"><a href="<!--{$smarty.const.URL_DIR}-->products/list/<!--{$arrTree[cnt].category_id}-->"<!--{if in_array($arrTree[cnt].category_id, $tpl_category_id) }--> class="onlink"<!--{/if}-->><!--{$arrTree[cnt].category_name|escape}-->(<!--{$arrTree[cnt].product_count|default:0}-->)</a>

他只有說要改這個
但我改了\html\user_data\packages\mystyle\bloc\category.tpl後才有作用

25
<li class="level<!--{$level}--><!--{if in_array($arrTree[cnt].category_id, $tpl_category_id) }--> onmark<!--{/if}-->"><a href="<!--{$smarty.const.URL_DIR}-->products/list/<!--{$arrTree[cnt].category_id}-->"<!--{if in_array($arrTree[cnt].category_id, $tpl_category_id) }--> class="onlink"<!--{/if}-->><!--{$arrTree[cnt].category_name|escape}-->(<!--{$arrTree[cnt].product_count|default:0}-->)</a>

\data\class\pages\LC_Page_Sitemap.php
把昨天書上沒提到的stiemap也補一下
繼續閱讀

ec-cube中商品detail的靜態網址

恩 又是seo… 又是rewrite…..
以下是參考ec-cube公式ガイドブック用的….
首先當然是確定自己的server有mod_rewrite囉
然後在/html/.htaccess
加入(我是用dreamweaver編輯 因為用記事本光開 存 上傳..就壞了@@)

RewriteEngine On
RewriteRule detail¥/([0-9]+)/? /onlineshop/products/detail.php?product_id=$1

然後在管理系統中(直接修改mysql會沒有效果)
基本情報管理->パラメータ設定->DETAIL_P_HTML
改成:

URL_DIR . "products/detail/"

最後打開\data\Smarty\templates\mystyle\list.tpl

130
<a href="<!--{$smarty.const.DETAIL_P_HTML}--><!--{$arrProducts[cnt].product_id}-->/" onmouseover="chgImg('<!--{$TPL_DIR}-->img/products/b_detail_on.gif','<!--{$name}-->');" onmouseout="chgImg('<!--{$TPL_DIR}-->img/products/b_detail.gif','<!--{$name}-->');">

只是多加一個’/’而已
做完就可以測試拉^^