I get the next error on some custom code:
The current request for action 'Cart' on controller type 'ShoppingCartController'
is ambiguous between the following action methods:
The idea is that users enter next to the discount coupon code an additional number 'qediscountreference'. For some customers the apply discount works, and other throw a server error.
How can I fix this?
J.
System.Web.Mvc.ActionResult StartCheckout(System.Web.Mvc.FormCollection) on type Nop.Web.Controllers.ShoppingCartController
System.Web.Mvc.ActionResult ApplyDiscountCoupon(System.String, System.String, System.Web.Mvc.FormCollection) on type Nop.Web.Controllers.ShoppingCartController
Code snippet in ShoppingCartController:
[ValidateInput(false)]
[HttpPost, ActionName("Cart")]
[FormValueRequired("checkout")]
public ActionResult StartCheckout(FormCollection form)
{
....
[ValidateInput(false)]
[HttpPost, ActionName("Cart")]
//[FormValueRequired("applydiscountcouponcode")]
//public ActionResult ApplyDiscountCoupon(string discountcouponcode, FormCollection form)
[FormValueRequired("applydiscountcouponcode", "qediscountreference")]
public ActionResult ApplyDiscountCoupon(string discountcouponcode, string qediscountreference, FormCollection form)
{
Code snippeter in _DiscountBox.cshtml
<div class="coupon-code">
<input name="qediscountreference" type="text" class="discount-coupon-code" />
<input type="submit" name="applydiscountcouponcode" value="@T("ShoppingCart.DiscountCouponCode.Button")" class="button-2 apply-discount-coupon-code-button" />
</div>