I am using a .cshtml file to display the details of a product and want to put some add to basket functionality into this page. Specifically as the products are unique items, an Add To Basket button, which will add to the basket and then redirect to the basket page.
My question is how to achieve this, I can see how to do this via the XSLT examples, but can't work out how to achieve this using Razor in the .cshtml file??
Thanks very much for the informative link. I do have a question though, the Add to Basket functionality in the thread you posted above, whereabouts would this code sit? I have a page called ProductDetails.cshtml which displays the details of the product along with an Add To Basket button, upon clicking this button, what should I do, redirect to another page, or just capture the postback within the ProductDetails.cshtml file, do the functionality specified in the Add To Basket area of the thread above, and then redirect to the basket/cart page?
Has anyone got any further information as to how to do the following in the above post. As mentioned I am having trouble integrating the code samples provided in the thread Soren posted.
I typically advocate redirecting when dealing with high value items where customers are not expected to add a lot of different items to the basket. When the reverse is true I generally have the customer stay on the product page or pop up a dialog which lets them decide what to do.
Add to basket from CSHTML
Hi,
I am using a .cshtml file to display the details of a product and want to put some add to basket functionality into this page. Specifically as the products are unique items, an Add To Basket button, which will add to the basket and then redirect to the basket page.
My question is how to achieve this, I can see how to do this via the XSLT examples, but can't work out how to achieve this using Razor in the .cshtml file??
Any help would be much appreciated.
Graham
The thread "Step by Step Process on Ordering in Razor" might help.
Hi Soren,
Thanks very much for the informative link. I do have a question though, the Add to Basket functionality in the thread you posted above, whereabouts would this code sit? I have a page called ProductDetails.cshtml which displays the details of the product along with an Add To Basket button, upon clicking this button, what should I do, redirect to another page, or just capture the postback within the ProductDetails.cshtml file, do the functionality specified in the Add To Basket area of the thread above, and then redirect to the basket/cart page?
Any help on this would be appreciated.
Cheers,
Graham
Hi,
Has anyone got any further information as to how to do the following in the above post. As mentioned I am having trouble integrating the code samples provided in the thread Soren posted.
Cheers,
Graham
It's you to you whether to redirect or not.
I typically advocate redirecting when dealing with high value items where customers are not expected to add a lot of different items to the basket. When the reverse is true I generally have the customer stay on the product page or pop up a dialog which lets them decide what to do.
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.