Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

商品詳細画面のブラウザバック時の挙動を修正 #1571

Merged
merged 2 commits into from Aug 9, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Eccube/Controller/ProductController.php
Expand Up @@ -265,7 +265,7 @@ public function detail(Application $app, Request $request, $id)
$app['session']->getFlashBag()->set('eccube.add.favorite', true);
return $app->redirect($app->url('mypage_login'));
}
} else {
} elseif ($addCartData['mode'] === 'add_cart') {
try {
$app['eccube.service.cart']->addProduct($addCartData['product_class_id'], $addCartData['quantity'])->save();
} catch (CartException $e) {
Expand Down
5 changes: 4 additions & 1 deletion src/Eccube/Resource/template/default/Product/detail.twig
Expand Up @@ -76,6 +76,9 @@ $(function(){
$('#mode').val('add_favorite');
});

$('#add-cart').click(function() {
$('#mode').val('add_cart');
});
});
</script>

Expand Down Expand Up @@ -216,7 +219,7 @@ $(function(){
{# カートボタン #}
<div id="detail_cart_box__button_area" class="btn_area">
<ul id="detail_cart_box__insert_button" class="row">
<li class="col-xs-12 col-sm-8"><button type="submit" id="cart" class="btn btn-primary btn-block prevention-btn prevention-mask">カートに入れる</button></li>
<li class="col-xs-12 col-sm-8"><button type="submit" id="add-cart" class="btn btn-primary btn-block prevention-btn prevention-mask">カートに入れる</button></li>
</ul>
{% if BaseInfo.option_favorite_product == 1 %}
<ul id="detail_cart_box__favorite_button" class="row">
Expand Down