简体   繁体   中英

magento add to cart function

When I have only one unit of the product and click on buy, the product page refresh, and not redirect to shopping cart. How to disable this function?

Form post:

<form id="addtocart_form" method="post" action="https://www.domain.com/checkout/cart/add/uenc/Z2VTcGVlZD1vZmYmX19fU0lEPVU,/product/15/form_key/hTmJMC7HS/">

Button:

<button type="button" title="Buy" id="product-addtocart-button" class="btn-cart" onclick="productAddToCartForm.submit(this)">BUY</button>

Change your setting from admin->configuration->sales>checkout under shopping cart. Set "After Adding a Product Redirect to Shopping Cart" to yes.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM