add to cart button

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
7 Jahre weitere
Hello,
How can I get the "add to cart" button under the product despcption ? i can't fin it in the configuration !
7 Jahre weitere
You have to update the view. Either ProductTemplate.Grouped.cshtml or ProductTemplate.Simple.cshtml. The partial view referenced is _AddToCart.cshtml.

:)
7 Jahre weitere
Hello,
thank you for your answer but i don't understand How can I update it ?
7 Jahre weitere
Hello,

As wooncherk told you, you will need to edit the ProductTemplate.Simple.cshtml. This file is responsible for the product details page of the simple products (the ones that are not grouped).

On line 108 you will see the following code:

                        <!--price & add to cart-->
                        @{
                            var dataDictPrice = new ViewDataDictionary();
                            dataDictPrice.TemplateInfo.HtmlFieldPrefix = string.Format("price_{0}", Model.Id);
                            @Html.Partial("_ProductPrice", Model.ProductPrice, dataDictPrice)

                            @Html.Partial("_ProductTierPrices", Model.TierPrices)

                            var dataDictAddToCart = new ViewDataDictionary();
                            dataDictAddToCart.TemplateInfo.HtmlFieldPrefix = string.Format("addtocart_{0}", Model.Id);
                            @Html.Partial("_AddToCart", Model.AddToCart, dataDictAddToCart)
                        }


That is the code for the price and add to cart button in the simple products view. You can move it to wherever you'd like (inside of that file).

Hope that helps!

Regards,
Anton
7 Jahre weitere
Thank you all for you answer , that was very helpful !
7 Jahre weitere
moving the button requires programming skills, if not i recommend you check the solution partners page and get a quote.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.