バージョン選択

フォーラム

メニュー

オンライン状況

90 人のユーザが現在オンラインです。 (74 人のユーザが フォーラム を参照しています。)
登録ユーザ: 0
ゲスト: 90
もっと...

サイト内検索

その他 > その他 > WordPressプラグイン:wp-cumulusをEC-CUBE商品カテゴリーに組み込んでみました。

その他

新規スレッドを追加する

スレッド表示 | 新しいものから 前のトピック | 次のトピック | 下へ
投稿者 スレッド
sumida
投稿日時: 2013/4/23 22:01
対応状況: −−−
仙人
登録日: 2013/2/10
居住地: 広島県呉市ときどき瀬戸内海
投稿: 641
WordPressプラグイン:wp-cumulusをEC-CUBE商品カテゴリーに組み込んでみました。
あくまで遊び心です。
以前、ZenCartで表示させていたものをEC-CUBEで表示させてみました。
どんな動作かは、wp-cumulusのサイトを参照してください。
追記、http://www.roytanck.com/2009/03/11/how-to-use-wp-cumulus-shortcodes/

ローカル環境で動作していますが、ネット上にEC-CUBEのサイトを持っていないので、
興味のある方は、やってみてください。

準備:
http://wordpress.org/extend/plugins/wp-cumulus/developers
からwp-cumulus.zipをダウンロードします。

(1) 商品カテゴリーがアルファベットだけの場合
    最新版をダウンロード
(2) 商品カテゴリーが日本語の場合
    開発版をダウンロード(※の作業をします。)

必要なファイルは、以下の2つです。
tagcloud.swf
swfobject.js

※ tagcloud.swfに日本語を組み込みます。
(これは、以前行った時のメモです。)
1. wp-cumulus>flash sources>tagcloud.flaをAdobe Flash(体験版で可能です)で開きます。
2. Scene 1ウィンドウ内、白地枠外の左上「Tag」の文字をクリック。右枠「プロパティ」タグ内、「文字」のフォントファミリーを「Arial」から日本語(「メイリオ」)に変更。「文字の埋め込み...」ボタンを押す。
3. 文字の埋め込みウィンドウが開くので、埋め込みに使用する文字セットを選択します。例えば「日本語(すべて)(7517文字)」を選択。
4. メニューの 制御>ムービープレビュー を選択するとFlashムービーが書き出されます。tagcloud.swfが1.9MBほどに
(フォント名をメモ:Meiryo Bold)
5. wp-cumulus>flash sources>com>roytanck>wpcumulus>Tag.asをAdobe Flashで開きます。
6. 58行目付近のformat.font = "Arial";の「Arial」を、変更した日本語フォント名("Meiryo Bold")に変更します。
(先ほどメモしたフォント名:Meiryo Bold)
7. 保存して、メニューの 制御>ムービーをプレビューする を選択する。
8. 書き出されたtagcloud.swfを、アルファベット用のtagcloud.swfと置き換えれば完了です。

設置:
(1) tagcloud.swf
    html/tagcloud.swf

(2) swfobject.js
    html/js/swfobject.js

(3) テンプレート(data/Smarty/templates/default/frontparts/bloc/category.tplに追加)

            <!--{/strip}-->

<!-- ▼タグクラウド -->
<hr />
<div id="flashcontent">This will be shown to users with no Flash or Javascript.</div>
<script type="text/javascript" src="<!--{$smarty.const.ROOT_URLPATH}-->js/swfobject.js">
</script>
<script type="text/javascript">//<![CDATA[
    var so = new SWFObject("<!--{$smarty.const.ROOT_URLPATH}-->tagcloud.swf", "tagcloud", "150", "100", "7", "#ffffff");
    so.addParam("wmode", "transparent");
    so.addVariable("tcolor", "0x333333");
    so.addVariable("mode", "tags");
    so.addVariable("distr", "true");
    so.addVariable("tspeed", "100");
    so.addVariable("tagcloud", "<tags><!--{section name=cnt loop=$arrTree}--><!--{* 表示フラグがTRUEなら表示 *}--><!--{if $arrTree[cnt].display == 1}--><a href='<!--{$smarty.const.ROOT_URLPATH}-->products/list.php?category_id=<!--{$arrTree[cnt].category_id}-->' style='font-size:25pt'<!--{if in_array($arrTree[cnt].category_id, $tpl_category_id)}--> color='0xff0000' hicolor='0xff0000'<!--{else}--> color='0x3399ff' hicolor='0xff6600'<!--{/if}-->><!--{$arrTree[cnt].category_name|h}-->(<!--{$arrTree[cnt].product_count|default:0}-->)</a><!--{/if}--><!--{/section}--></tags>");
    so.write("flashcontent");
//]]></script>
<!-- ▲タグクラウド -->

        </div>
    </div>
</div>

参考:
表示箇所:<div id="flashcontent">
画像サイズ:new SWFObjectで指定("150", "100")
表示リンク:"<tags>・・・・・</tags>"
色:color=
色onMouse:hicolor=
sumida
投稿日時: 2013/9/26 17:28
対応状況: −−−
仙人
登録日: 2013/2/10
居住地: 広島県呉市ときどき瀬戸内海
投稿: 641
v2.13.0用にしてみました。
v2.13.0で$arrTreeの構造が変更になったので、対応してみました。

data/Smarty/templates/default/frontparts/bloc/category.tpl
一行変更します。

    so.addVariable("tagcloud", "<tags><!--{include file='frontparts/bloc/category_tree_fork_tagcloud.tpl' children=$arrTree display=1}--></tags>");


新規にテンプレートを作成(再帰呼び出し)
data/Smarty/templates/default/frontparts/bloc/category_tree_fork_tagcloud.tpl

<!--{foreach from=$children item=child}--><!--{if $display == 1}--><a href='<!--{$smarty.const.ROOT_URLPATH}-->products/list.php?category_id=<!--{$child.category_id}-->' style='font-size:25pt'<!--{if in_array($child.category_id, $tpl_category_id)}--> color='0xff0000' hicolor='0xff0000'<!--{else}--> color='0x3399ff' hicolor='0xff6600'<!--{/if}-->><!--{$child.category_name|h}-->(<!--{$child.product_count|default:0}-->)</a><!--{if in_array($child.category_id, $arrParentID)}--><!--{assign var=disp_child value=1}--><!--{else}--><!--{assign var=disp_child value=0}--><!--{/if}--><!--{if isset($child.children|smarty:nodefaults)}--><!--{include file='frontparts/bloc/category_tree_fork_tagcloud.tpl' children=$child.children display=$disp_child}--><!--{/if}--><!--{/if}--><!--{/foreach}-->
スレッド表示 | 新しいものから 前のトピック | 次のトピック | トップ


 



ログイン


EC-CUBE公式 Amazon Payプラグイン

統計情報

総メンバー数は88,865名です
総投稿数は109,999件です

投稿数ランキング

1
seasoft
7367
2
468
3217
3
AMUAMU
2712
4
nanasess
2313
5
umebius
2085
6
yuh
1819
7
h_tanaka
1646
8
red
1570
9
mcontact
1295
10
tsuji
958
11
fukap
907
12
shutta
835
13
tao_s
799
14 ramrun 789
15 karin 689
16 sumida 641
17
homan
633
18 DELIGHT 572
19
patapata
502
20
flealog
485


ネットショップの壺

EC-CUBEインテグレートパートナー

Copyright© EC-CUBE CO.,LTD. All Rights Reserved.