バージョン選択

フォーラム

メニュー

オンライン状況

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

サイト内検索

質問 > 管理機能 > モバイル用の画像設定について

管理機能

新規スレッドを追加する

フラット表示 前のトピック | 次のトピック
投稿者 スレッド
Gbiledge
投稿日時: 2009/6/30 12:24
対応状況: −−−
常連
登録日: 2009/4/25
居住地:
投稿: 55
Re: モバイル用の画像設定について
EC-CUBE2.4
PostgreSQL8.3~

解決いたしましたので方法を記載しておきます。
以下の方法で携帯サイトの商品詳細画像を任意の大きさに設定可能にします。

目的:
・/upload/mobile_image/ から /upload/save_image/ に変更してモバイル用の画像ではない大きなサイズの画像を使用出来るようにする。
この事により、意図しない画像のリサイズを回避。(僕の場合は意図せずに「43 x 65」の画像サイズになっていた)

手順1:
/data/require_base.php
require_once(CLASS_PATH . "SC_MobileImage.php");

を以下のようにコメントアウト
//require_once(CLASS_PATH . "SC_MobileImage.php");


手順2:
/html/require.php
header("Location: ". SC_Utils_Ex::sfRmDupSlash($url . $path));
exit;

を以下のようにif分つけて変更
/* resize_image.phpのときだけ、リダイレクト解除 */
if(!preg_match("/resize_image.php/i", $path)) {
header("Location: ". SC_Utils_Ex::sfRmDupSlash($url . $path));
exit;
}


手順3:
/data/smarty/templates/default (または使用中のテンプレート名)/mobile/products/detai.tpl
メイン商品画像を表示したい箇所に張り付け(widthは個別で指定して下さい)
<!--{assign var=key value="main_image"}-->
<img src="<!--{$smarty.const.SITE_URL}-->resize_image.php?image=<!--{$arrProduct.main_image}-->&width=240" alt="<!--{$arrProduct.name|escape}-->"/>



携帯サイトの「オススメ商品」にresize.phpを使用してサムネイルを表示するには、上記の手順1と2を行った上で、以下の方法で可
data/smarty/templates/default (または使用中のテンプレート名)/mobile/frontparts/best5.tpl
オススメ商品画像を表示したい箇所に張り付け(widthは個別で指定して下さい)

<!--{if count($arrBestProducts) > 0}-->
<!--{foreach from=$arrBestProducts item=arrProduct name=best_products}-->
<!-- ▼オススメコメント ここから -->
<td rowspan=""><a href="<!--{$smarty.const.MOBILE_DETAIL_P_HTML}--><!--{$arrProduct.product_id}-->">
<img src="<!--{$smarty.const.SITE_URL}-->resize_image.php?image=<!--{$arrProduct.main_list_image}-->&width=25" alt="<!--{$arrProduct.name|escape}-->"/></a></td>
<!-- ▲オススメコメント ここまで -->
<!--{if !$smarty.foreach.best_products.last}--><!--{/if}-->
<!--{/foreach}-->
<!--{/if}-->


次に、携帯サイトのトップ画面の「オススメ商品」を表示したい箇所に以下を貼付け
data/smarty/templates/default (または使用中のテンプレート名)/mobile/top.tpl
<!--{include_php file=`$smarty.const.MOBILE_HTML_PATH`frontparts/bloc/best5.php}-->
フラット表示 前のトピック | 次のトピック


題名 投稿者 日時
   モバイル用の画像設定について Gbiledge 2009/6/28 23:08
     Re: モバイル用の画像設定について seasoft 2009/6/28 23:17
       Re: モバイル用の画像設定について Gbiledge 2009/6/28 23:20
         Re: モバイル用の画像設定について seasoft 2009/6/28 23:23
           Re: モバイル用の画像設定について Gbiledge 2009/6/28 23:24
             Re: モバイル用の画像設定について seasoft 2009/6/28 23:40
           Re: モバイル用の画像設定について Gbiledge 2009/6/28 23:33
             Re: モバイル用の画像設定について seasoft 2009/6/28 23:44
               Re: モバイル用の画像設定について Gbiledge 2009/6/28 23:55
                 Re: モバイル用の画像設定について AMUAMU 2009/6/29 14:30
       Re: モバイル用の画像設定について AMUAMU 2009/6/29 14:22
       » Re: モバイル用の画像設定について Gbiledge 2009/6/30 12:24

 



ログイン


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

統計情報

総メンバー数は89,282名です
総投稿数は110,072件です

投稿数ランキング

1
seasoft
7367
2
468
3217
3
AMUAMU
2712
4
nanasess
2314
5
umebius
2085
6
yuh
1819
7
h_tanaka
1652
8
red
1570
9
mcontact
1301
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.