バージョン選択

フォーラム

メニュー

オンライン状況

59 人のユーザが現在オンラインです。 (45 人のユーザが フォーラム を参照しています。)
登録ユーザ: 4
ゲスト: 55
tattsu h_tanaka yu86 MsmSC もっと...

サイト内検索

 > フロント機能 > ショッピングカート内、商品の削除・数量の増減を行うとシステムエラー

フロント機能

新規スレッドを追加する

スレッド表示 | 古いものから 前のトピック | 次のトピック | 下へ
投稿者 スレッド
ymmuu
投稿日時: 2016/10/14 9:58
対応状況: −−−
新米
登録日: 2016/10/12
居住地:
投稿: 3
Re: ショッピングカート内、商品の削除・数量の増減を行うとシステムエラー
返信が遅くなりまして申し訳ございません。

確認したところ、function.jsが読み込まれてなかったので追記したところ、
無事動作するようになりました。

とても助かりました、
ありがとうございました!
umebius
投稿日時: 2016/10/12 19:32
対応状況: −−−
登録日: 2016/7/22
居住地:
投稿: 2085
Re: ショッピングカート内、商品の削除・数量の増減を行うとシステムエラー
ではfunction.jsは読み込まれていますか?
/template/default/js/function.js にあったものです。


----------------
EC-CUBEカスタマイズ・高速化・脆弱性対策・SEO ご相談ください。

2系・3系から4系へのバージョンアップ実績豊富

ymmuu
投稿日時: 2016/10/12 16:41
対応状況: −−−
新米
登録日: 2016/10/12
居住地:
投稿: 3
Re: ショッピングカート内、商品の削除・数量の増減を行うとシステムエラー
umebiusさま

さっそく返信ありがとうございます。

custom/cart/index.twigの増減箇所は下記のように記述しております。
デフォルトのテンプレートを流用したので、
svg→テキストになっているだけですが…。


<li>
    {% if CartItem.quantity > 1 %}
        <a id="cart_item_list__down" href="{{ url('cart_down', {'productClassId': ProductClass.id}) }}" {{ csrf_token_for_anchor() }} data-method="put" data-confirm="false">−</a>
    {% else %}
        <span>−</span>
    {% endif %}
</li>
<li>
    <a id="cart_item_list__up" href="{{ url('cart_up', {'productClassId': ProductClass.id}) }}" {{ csrf_token_for_anchor() }} data-method="put" data-confirm="false">+</a>
</li>


ちなみにformの記述は

<form name="form" id="form_cart" method="post" action="{{ url('cart') }}">


になっています。

よろしくおねがいします。
umebius
投稿日時: 2016/10/12 15:08
対応状況: −−−
登録日: 2016/7/22
居住地:
投稿: 2085
Re: ショッピングカート内、商品の削除・数量の増減を行うとシステムエラー
エラーの通りなのですが、
/cart/remove/【商品ID】
/cart/up/【商品ID】

などはGETではなくPUTでアクセスしないといけません。
そのために起こっているエラーです。

削除ボタンや増減部分のtwigをデフォルトテンプレートと見比べてみてください。

<a id="cart_item_list__down" href="{{ url('cart_down', {'productClassId': ProductClass.id}) }}" {{ csrf_token_for_anchor() }} data-method="put" data-confirm="false"><svg class="cb cb-minus"><use xlink:href="#cb-minus" /></svg></a>


オリジナルテンプレートではこの部分がただのリンクになっているはずです。
デフォルトテンプレでは実際にはリンクではなくフォームの送信を行っております。


----------------
EC-CUBEカスタマイズ・高速化・脆弱性対策・SEO ご相談ください。

2系・3系から4系へのバージョンアップ実績豊富

ymmuu
投稿日時: 2016/10/12 15:04
対応状況: −−−
新米
登録日: 2016/10/12
居住地:
投稿: 3
ショッピングカート内、商品の削除・数量の増減を行うとシステムエラー
お世話になっております。
システムカート内でシステムエラーが表示されるのですが
自力で解決できなかったため投稿します。

【EC-CUBE 3.0.10】を使用しております。
インストールはエックスサーバーのインストーラを使用して行いました。

ショッピングカート内で

・削除
・数量の増減

を行うとシステムエラーが表示されてしまいます。
EC-CUBEのログには以下のように表示されています。

■削除時
eccube.ERROR: Symfony\Component\HttpKernel\Exception\MethodNotAllowedHttpException: No route found for "GET /cart/remove/【商品ID】": Method Not Allowed (Allow: PUT) (uncaught exception) at 【サーバーディレクトリ】/vendor/symfony/http-kernel/EventListener/RouterListener.php line 163 {"exception":"[object] (Symfony\\Component\\HttpKernel\\Exception\\MethodNotAllowedHttpException(code: 0): No route found for \"GET /cart/remove/【商品ID】\": Method Not Allowed (Allow: PUT) at 【サーバーディレクトリ】/vendor/symfony/http-kernel/EventListener/RouterListener.php:163, Symfony\\Component\\Routing\\Exception\\MethodNotAllowedException(code: 0): at 【サーバーディレクトリ】/vendor/symfony/routing/Matcher/UrlMatcher.php:97)"} []

■増加時
eccube.ERROR: Symfony\Component\HttpKernel\Exception\MethodNotAllowedHttpException: No route found for "GET /cart/up/【商品ID】": Method Not Allowed (Allow: PUT) (uncaught exception) at 【サーバーディレクトリ】/vendor/symfony/http-kernel/EventListener/RouterListener.php line 163 {"exception":"[object] (Symfony\\Component\\HttpKernel\\Exception\\MethodNotAllowedHttpException(code: 0): No route found for \"GET /cart/up/【商品ID】\": Method Not Allowed (Allow: PUT) at 【サーバーディレクトリ】/vendor/symfony/http-kernel/EventListener/RouterListener.php:163, Symfony\\Component\\Routing\\Exception\\MethodNotAllowedException(code: 0): at 【サーバーディレクトリ】/vendor/symfony/routing/Matcher/UrlMatcher.php:97)"} []

テンプレートは、デフォルトテンプレートをコピーしてカスタマイズしたオリジナルのものを使用しています。
症状はオリジナルテンプレートを使用したときに発生しており、
デフォルトのテンプレートでは発生しませんでした。

オリジナルテンプレートに問題があるのかと、思い
/app/template/オリジナルテンプレーフォルダに、
デフォルトテーマのファイルを上書きしてみましたが改善されませんでした。

何か考えられる減少がありましたらご教示いただければ幸いです。
スレッド表示 | 古いものから 前のトピック | 次のトピック | トップ


 



ログイン


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

統計情報

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

投稿数ランキング

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