1つ解決しました!でも・・・ |
このメッセージの投稿者: cha@超初心者さん 2001/05/23 20:58:15元メッセージ: Re:追加質問です 投稿者: ベルコールさん 2001/05/23 19:53:57
>>>こんにちは。
>>>商品の登録は商品データメンテナンスでまず行い、次に詳細ファイルの作成で処理をしてもファイルが作成されないのですが。。。>>>一回だけ出来てた様な気がするのですが。。。
>>>自動にhtmとしてファイルが作成されるのですよね?
>>>そこで作られたファイルへのリンクを貼る作業が
>>> ↓
>>>商品データメンテナンスで関連URL部に詳細ファイルのURLを入力する様になるわけですよね?>>>なんか間違った事をしてしまったのでしょうか?
>>>あと、写真を大小用意(カタログ用と詳細ファイル用)しますよね?
>>>詳細ファイル作成時には参照でローカルから選択できますが、商品データメンテでは
>>>ファイル名だけ指定し、別でファイル転送(画像)する方法で合っていますか?
>>>その場合データ登録する前に送信しておいた方がいいのでしょうか??>>>以上、支離滅裂な文章になってしまいスイマセン!よろしくお願い致します。
>>いつも追加、追加ですいません。
>>カタログテンプレートを添付の物を使用しています。
>>商品数がまだあるのにも関わらず、2ページしか進みません。
>>それと1ページ5点の表示設定にしてあるのですが、端数で1ページに表示対象データが5点以下の場合に「商品の写真は用意しいていません」やカートに入れるなど表示が5点分表示されるのを消したい場合は方法がありますか?
>>よろしくお願い致します。
>-----
>以下をコピーして「catalog.tpl」というファイル名で保存して、今のものと差し替えてみてください。>---ここから-----
>#// カタログ自動出力テンプレート //////////
>{
>$view=3;#1ページに表示する商品数>if($scart){$target=' target="subcart"'}
>print qq|cache-control: no-cache\npragma: no-cache\ncontent-type: text/html\n\n<html><head><meta http-equiv=content-type content=text/html><title>$shopname</title><style type="text/css">
>a{color:green;text-decoration:none}
>a:hover{color:red;text-decoration:underline}
></style></head><body bgcolor="$bg"$bgrnd text="$txtcolor"><basefont face="$basefont"><center>
>
><table width=90% cellspacing=0 cellpadding=0>|;>if(!$start){$start=0}if($back){$start=$prev-$view}$prev=$start;if(!$category){$category='item'}
>$ref="$cgi?com:catalog(and)tpl(eq)$tpl(and)category(eq)$category(and)start(eq)$start";
>open(DB,"$datadir/$category.tdb");@db=<DB>;close DB;
>for($i=$start;$i<$start+$view;$i++){
>last if($i>=@db);
>($hinban,$hinmei,$price,$zeikubun,$sou,$hikikae,$seigen,$weight,$zaiko,$keyword,$iurl,$img,$setumei)=split(/:\:/,$db[$i]);
>$keppin="";if($hinban=~s/^\*//){$keppin=1}
>$price=&comma($price);
>#------------------------------------
># $hinban 商品番号
># $hinmei 商品名
># $price 単価
># $seigen 購入制限数
># $weight 重量
># $zaiko 在庫数
># $iurl 関連URL
># $img 商品写真ファイル名
># $setumei 商品説明文
># $keppin (値を持っていたら欠品)
>#------------------------------------>print q|<tr><td width=120 valign=top>|;
>print qq|<a href="$iurl" target="_blank">|if($img&&$iurl);
>if($img){print"<img src=$imgurl/$img width=110 height=100 border=0>"}else{print"<table width=115 height=105><td bgcolor=$meisaibg align=center><font size=2><i>商品の写真は
>用意しいていません</td></table>"}
>print qq|</a>|if($img&&$iurl);
>$setumei=~s/ /
>/g;
>print "</td><td width=20></td><td valign=top><b>$hinmei</b>
><font size=2>$setumei
><font color=#aa0000><b>";
>print q|
>●この商品は、ただ今売り切れでございます。|if($keppin||$zaiko&&$zaiko<2);
>print qq|
>●この商品は、お一人様 $seigen個限りとさせていただきます。|if($seigen);
>print qq|</td><td width=20><td valign=bottom nowrap>
><font size=2>商品番号:$hinban
><b><i>\\$price</i></b></font>
>
><form method="POST" action="$cgi"$target><select name="no:$category::$hinban">
><option value="1"> 1
><option value="2"> 2
><option value="3"> 3
><option value="4"> 4
><option value="5"> 5</option></select> 個
>
><input type=submit name="c:buy" value="カートに入れる"><input type=hidden name=ref value="$ref"></td></form></tr>
><tr><td colspan=5><hr size=1 noshade color=$dentitle></td></tr>|
>}
>print q|</table><font size=2>|;
>if($prev){print"<a href=\"$cgi?c:catalog&tpl=$tpl&back=1&category=$category&start=$i&prev=$prev&ref=$ref\"><<<<</a>"}else{print"<font color=\"$bg\"><<<<</font>"}print'◇';if($i<@db){print"<a href=\"$cgi?c:catalog&tpl=$tpl&next=1&category=$category&start=$i&prev=$prev&ref=$ref\">>>>></a>"}else{print"<font color=\"$bg\">>>>></font>"}
>if($scart){print qq|<form><input type=button onclick="parent.location.href='$cgi?c:check&ref=$ref'|}else{print qq|<form method="POST" action="$cgi"><td><input type=hidden name=ref value="$ref"><input type="submit" name="c:check|}
>print q|" value="カートの中を見る"></form>
>
></body></html>
>|}
>1;>---ここまで-----
上記アドバイス通り試しましたら、解決しました。ありがとうございます。
ところで、問題なのは始めに質問しました詳細ファイルの作成が出来ない件は
どうでしょうか???
お願い致します。
このメッセージへの返事: