質問 > フロント機能 > 買い物かご画面で合計金額だけ表示されない。 |
フロント機能
スレッド表示 | 新しいものから | 前のトピック | 次のトピック | 下へ |
投稿者 | スレッド |
---|---|
ashiyabatt |
投稿日時: 2013/2/8 17:38
対応状況: −−−
|
新米 登録日: 2013/2/8 居住地: 投稿: 4 |
買い物かご画面で合計金額だけ表示されない。 買い物カゴや注文確定の画面で合計金額だけ表示されません。
当方は初心者で解決方法がまったくわかりません。 どなたか教えていただければ幸いです。 バージョンは2.2.0-betaです。 どうぞよろしくお願いします。 |
karin |
投稿日時: 2013/2/8 17:43
対応状況: −−−
|
仙人 登録日: 2008/9/15 居住地: 東京都 投稿: 689 |
Re: 買い物かご画面で合計金額だけ表示されない。 ashiyabatt様
EC-CUBEのカスタマイズを行っている状態でしょうか?
|
kanagettyo |
投稿日時: 2013/2/8 20:48
対応状況: −−−
|
半人前 登録日: 2012/12/13 居住地: 投稿: 26 |
Re: 買い物かご画面で合計金額だけ表示されない。 こんにちは。
「合計金額が表示されない」場合に考えられる事としましては… ・処理部分で合計金額の計算が行われていない可能性(不正な金額が表示される) →この場合、「data/class/pages/cart/LC_Page_Cart.php」のような「phpファイル」を修正する必要があります。 ・表示部分で合計金額を表示する記述が抜けている可能性(表示がされない) →この場合、「data/Smarty/templates/default/cart/index.tpl」のような「tplファイル」を修正する必要があります。 この2つが考えられるかと思います。 ご参考になれば幸いです。 |
kato-sc |
投稿日時: 2013/2/8 22:03
対応状況: −−−
|
一人前 登録日: 2013/1/15 居住地: 投稿: 87 |
Re: 買い物かご画面で合計金額だけ表示されない。 カスタムされているか不明なので、仮定のお話になってしまいますが、参考までに。
PHPそのものの変更を行っていなくても、デザインを当て込むなどでtplファイルを編集した場合、誤ってSmartyのタグを消してしまう事があります。 |
ashiyabatt |
投稿日時: 2013/2/9 11:48
対応状況: −−−
|
新米 登録日: 2013/2/8 居住地: 投稿: 4 |
Re: 買い物かご画面で合計金額だけ表示されない。 ご返答ありがとうございます。
カスタマイズはしております。 以前は業者さんに委託していたのですがいろいろあって契約を打ち切ってしまいました。デザインなどはなんとか自分でいじれたのですが、こういうのは全くわからなくって。 他にレスポンスを頂いた方々からのアドバイスを参考にしてみましたが この辺りのことでしょうか? // カート集計処理 if (empty($arrData)) { $arrData = array(); } $objDb->sfTotalCart($this, $objCartSess, $arrInfo); $this->arrData = $objDb->sfTotalConfirm($arrData, $this, $objCartSess, $arrInfo, $objCustomer); $this->arrInfo = $arrInfo; <table summary="商品情報"> <tr> <th>削除</th> <th>商品写真</th> <th>商品名</th> <th>単価</th> <th>個数</th> <th>小計</th> </tr> <!--{section name=cnt loop=$arrProductsClass}--> <tr> <td><a href="<!--{$smarty.server.PHP_SELF|escape}-->" onclick="fnChangeAction('<!--{$smarty.server.PHP_SELF|escape}-->'); fnModeSubmit('delete', 'cart_no', '<!--{$arrProductsClass[cnt].cart_no}-->'); return false;">削除</a> </td> <td class="phototd"> <a href="<!--{$smarty.server.PHP_SELF|escape}-->" onclick="win01('../products/detail_image.php?product_id=<!--{$arrProductsClass[cnt].product_id}-->&image=main_image','detail_image','<!--{$arrProductsClass[cnt].tpl_image_width}-->','<!--{$arrProductsClass[cnt].tpl_image_height}-->'); return false;" target="_blank"> <img src="<!--{$smarty.const.URL_DIR}-->resize_image.php?image=<!--{$arrProductsClass[cnt].main_list_image}-->&width=65&height=65" alt="<!--{$arrProductsClass[cnt].name|escape}-->" /> </a> </td> <td><!--{* 商品名 *}--><strong><!--{$arrProductsClass[cnt].name|escape}--></strong><br /> <!--{if $arrProductsClass[cnt].classcategory_name1 != ""}--> <!--{$arrProductsClass[cnt].class_name1}-->:<!--{$arrProductsClass[cnt].classcategory_name1}--><br /> <!--{/if}--> <!--{if $arrProductsClass[cnt].classcategory_name2 != ""}--> <!--{$arrProductsClass[cnt].class_name2}-->:<!--{$arrProductsClass[cnt].classcategory_name2}--> <!--{/if}--> </td> <td class="pricetd"> <!--{if $arrProductsClass[cnt].price02 != ""}--> <!--{$arrProductsClass[cnt].price02|sfPreTax:$arrInfo.tax:$arrInfo.tax_rule|number_format}-->円 <!--{else}--> <!--{$arrProductsClass[cnt].price01|sfPreTax:$arrInfo.tax:$arrInfo.tax_rule|number_format}-->円 <!--{/if}--> </td> |
ashiyabatt |
投稿日時: 2013/2/9 11:50
対応状況: −−−
|
新米 登録日: 2013/2/8 居住地: 投稿: 4 |
Re: 買い物かご画面で合計金額だけ表示されない。 こんにちは
ご返答ありがとうございます。 教えて頂いたところを開いてみました。 この辺りのことでしょうか。 // カート集計処理 if (empty($arrData)) { $arrData = array(); } $objDb->sfTotalCart($this, $objCartSess, $arrInfo); $this->arrData = $objDb->sfTotalConfirm($arrData, $this, $objCartSess, $arrInfo, $objCustomer); $this->arrInfo = $arrInfo; <table summary="商品情報"> <tr> <th>削除</th> <th>商品写真</th> <th>商品名</th> <th>単価</th> <th>個数</th> <th>小計</th> </tr> <!--{section name=cnt loop=$arrProductsClass}--> <tr> <td><a href="<!--{$smarty.server.PHP_SELF|escape}-->" onclick="fnChangeAction('<!--{$smarty.server.PHP_SELF|escape}-->'); fnModeSubmit('delete', 'cart_no', '<!--{$arrProductsClass[cnt].cart_no}-->'); return false;">削除</a> </td> <td class="phototd"> <a href="<!--{$smarty.server.PHP_SELF|escape}-->" onclick="win01('../products/detail_image.php?product_id=<!--{$arrProductsClass[cnt].product_id}-->&image=main_image','detail_image','<!--{$arrProductsClass[cnt].tpl_image_width}-->','<!--{$arrProductsClass[cnt].tpl_image_height}-->'); return false;" target="_blank"> <img src="<!--{$smarty.const.URL_DIR}-->resize_image.php?image=<!--{$arrProductsClass[cnt].main_list_image}-->&width=65&height=65" alt="<!--{$arrProductsClass[cnt].name|escape}-->" /> </a> </td> <td><!--{* 商品名 *}--><strong><!--{$arrProductsClass[cnt].name|escape}--></strong><br /> <!--{if $arrProductsClass[cnt].classcategory_name1 != ""}--> <!--{$arrProductsClass[cnt].class_name1}-->:<!--{$arrProductsClass[cnt].classcategory_name1}--><br /> <!--{/if}--> <!--{if $arrProductsClass[cnt].classcategory_name2 != ""}--> <!--{$arrProductsClass[cnt].class_name2}-->:<!--{$arrProductsClass[cnt].classcategory_name2}--> <!--{/if}--> </td> <td class="pricetd"> <!--{if $arrProductsClass[cnt].price02 != ""}--> <!--{$arrProductsClass[cnt].price02|sfPreTax:$arrInfo.tax:$arrInfo.tax_rule|number_format}-->円 <!--{else}--> <!--{$arrProductsClass[cnt].price01|sfPreTax:$arrInfo.tax:$arrInfo.tax_rule|number_format}-->円 <!--{/if}--> </td> |
ashiyabatt |
投稿日時: 2013/2/9 11:51
対応状況: −−−
|
新米 登録日: 2013/2/8 居住地: 投稿: 4 |
Re: 買い物かご画面で合計金額だけ表示されない。 ご返答ありがとうございます。
この辺りのことでしょうか。 // カート集計処理 if (empty($arrData)) { $arrData = array(); } $objDb->sfTotalCart($this, $objCartSess, $arrInfo); $this->arrData = $objDb->sfTotalConfirm($arrData, $this, $objCartSess, $arrInfo, $objCustomer); $this->arrInfo = $arrInfo; <table summary="商品情報"> <tr> <th>削除</th> <th>商品写真</th> <th>商品名</th> <th>単価</th> <th>個数</th> <th>小計</th> </tr> <!--{section name=cnt loop=$arrProductsClass}--> <tr> <td><a href="<!--{$smarty.server.PHP_SELF|escape}-->" onclick="fnChangeAction('<!--{$smarty.server.PHP_SELF|escape}-->'); fnModeSubmit('delete', 'cart_no', '<!--{$arrProductsClass[cnt].cart_no}-->'); return false;">削除</a> </td> <td class="phototd"> <a href="<!--{$smarty.server.PHP_SELF|escape}-->" onclick="win01('../products/detail_image.php?product_id=<!--{$arrProductsClass[cnt].product_id}-->&image=main_image','detail_image','<!--{$arrProductsClass[cnt].tpl_image_width}-->','<!--{$arrProductsClass[cnt].tpl_image_height}-->'); return false;" target="_blank"> <img src="<!--{$smarty.const.URL_DIR}-->resize_image.php?image=<!--{$arrProductsClass[cnt].main_list_image}-->&width=65&height=65" alt="<!--{$arrProductsClass[cnt].name|escape}-->" /> </a> </td> <td><!--{* 商品名 *}--><strong><!--{$arrProductsClass[cnt].name|escape}--></strong><br /> <!--{if $arrProductsClass[cnt].classcategory_name1 != ""}--> <!--{$arrProductsClass[cnt].class_name1}-->:<!--{$arrProductsClass[cnt].classcategory_name1}--><br /> <!--{/if}--> <!--{if $arrProductsClass[cnt].classcategory_name2 != ""}--> <!--{$arrProductsClass[cnt].class_name2}-->:<!--{$arrProductsClass[cnt].classcategory_name2}--> <!--{/if}--> </td> <td class="pricetd"> <!--{if $arrProductsClass[cnt].price02 != ""}--> <!--{$arrProductsClass[cnt].price02|sfPreTax:$arrInfo.tax:$arrInfo.tax_rule|number_format}-->円 <!--{else}--> <!--{$arrProductsClass[cnt].price01|sfPreTax:$arrInfo.tax:$arrInfo.tax_rule|number_format}-->円 <!--{/if}--> </td> |
kato-sc |
投稿日時: 2013/2/12 16:55
対応状況: −−−
|
一人前 登録日: 2013/1/15 居住地: 投稿: 87 |
Re: 買い物かご画面で合計金額だけ表示されない。 ご提供頂いたソースを拝見しますと、肝心な「合計」を表示している部分が抜けている様に見えるのですが。。。
金額表示部分のソースはこれだけという事でしょうか? もしコピペミスで無く、ご提示頂いたソースが全てであれば、デザインを変更された際に誤って「合計」部分のソースを削除してしまったものと推察されます。 |
kanagettyo |
投稿日時: 2013/2/13 10:18
対応状況: −−−
|
半人前 登録日: 2012/12/13 居住地: 投稿: 26 |
Re: 買い物かご画面で合計金額だけ表示されない。 こんにちは。
kato-scさんがおっしゃっていた事の補足を致します。 表示部分には、以下の文字が表示されていると思います。 <tr> <th>削除</th> <th>商品写真</th> <th>商品名</th> <th>単価</th> <th>個数</th> <th>小計</th> </tr> これらは<tr>〜</tr>と<th>〜</th>の構造になっています。 上記の考えで、2つめの<tr>を見ていきます。 <!--{section name=cnt loop=$arrProductsClass}-->の下にある<tr>ですね。 御表示頂いたソースを拝見致しますと、この「<tr>」に対応する「</tr>」が存在しません。 よって、ソースが途中で途切れているのかな?と推測致します。 また、2つめの「<tr>」内には<td>〜</td>が存在しますが… これらの箇所が最初に表示した「削除」や「商品写真」といった文字部分に対応し、実際に処理を担当している構造です。 それを踏まえると、「削除」「商品写真」「商品名」「単価」に対応する<td>〜</td>部分は存在するのですが… 個数と小計に対応する<td>〜</td>部分が存在していません。 |
kato-sc |
投稿日時: 2013/2/14 9:13
対応状況: −−−
|
一人前 登録日: 2013/1/15 居住地: 投稿: 87 |
Re: 買い物かご画面で合計金額だけ表示されない。 具体的な場所を記していませんでしたね。
kanagettyoさん、補足ありがとうございます。 直接的な回答ではないのですが、今後もご自身でソースを編集されるならば、SVNやGitといったツールの導入をお勧めします。 上記ツールを導入していれば、間違って削除してしまったりした場合でも修正前のソースへ簡単に戻す事が可能です。 |
スレッド表示 | 新しいものから | 前のトピック | 次のトピック | トップ |