How to go to product details when clicking on "Add to cart"

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
Hace 7 años
Hi,

When a product contains some product attributes and customer needs to select them, when we click on "Add to cart" button, the shops goes to product details page.

This does not occur when the product does not have product attributes and when we click on "Add to cart button", 1 unit of this product is added to cart.

How can force store to go always to product detail page when clicking on "Add to cart button"?

Thanks!
Hace 7 años
sabueXo wrote:
Hi,

When a product contains some product attributes and customer needs to select them, when we click on "Add to cart" button, the shops goes to product details page.

This does not occur when the product does not have product attributes and when we click on "Add to cart button", 1 unit of this product is added to cart.

How can force store to go always to product detail page when clicking on "Add to cart button"?

Thanks!


You can modify _ProductBox.cshtml  file Add to cart button , put their product details link ==>

Add the following link instead current input button==>
Old

<input type="button" value="@(addToCartText)" class="button-2 product-box-add-to-cart-button" onclick="AjaxCart.addproducttocart_catalog('@addtocartlink');return false;" />


It will like bellow==>


<a href="@Url.RouteUrl("Product", new { SeName = Model.SeName })" title="@Model.DefaultPictureModel.Title">
    @T("ShoppingCart.AddToCart")
</a>
Hace 7 años
Thank you really much for helping, I will try your solution.

Im really appreciate your help!
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.