Hi..

I'm trying to change DiscountBox from ShoppingCart page to OnePageCheckout page

but it's not working

I've replicated part of the code from OrderSummary.cshtml to OnePageCheckout.cshtml
and also the method ApplyDiscountCoupon from ShoppingCartController to CheckoutController and inserted a Breakpoint into CheckoutController method.. but it never reaches there

do I have to register my button action or anything ?

many thanks

CheckoutController.cs


[ValidateInput(false)]
        [HttpPost, ActionName("CheckoutOnePageDiscount")]
        [FormValueRequired("applydiscountcouponcode")]
        public ActionResult ApplyDiscountCoupon(string discountcouponcode)
        {...}


RouteProvider.cs



            routes.MapLocalizedRoute("CheckoutOnePageDiscount",
                            "onepagecheckout/",
                            new { controller = "Checkout", action = "CheckoutOnePageDiscount" },
                            new[] { "Nop.Web.Controllers" });



OnePageCheckout.cshtml


@if (Model.IsEditable)  // TRUE
    {
        <div class="deals">
            @if (Model.ShowDiscountBox) // TRUE
            {
                using (Html.BeginRouteForm("CheckoutOnePageDiscount", FormMethod.Post))
                {
                <div class="coupon-box">
                    <b>@T("Checkout.DiscountCouponCode")</b>
                    <br />@T("Checkout.DiscountCouponCode.Tooltip")<br />
                    <input name="discountcouponcode" type="text" id="discountcouponcode" style="width: 125px;" />&nbsp;
                    <input type="submit" name="applydiscountcouponcode" value="@T("Checkout.DiscountCouponCode.Button")" id="applydiscountcouponcode" class="applycouponcodebutton" />
                    @if (!String.IsNullOrEmpty(Model.DiscountMessage))
                    {
                        <div class="clear">
                        </div>
                        <div class="message-error">
                            @Model.DiscountMessage
                        </div>
                    }
@*@if (!String.IsNullOrEmpty(Model.CurrentDiscountCode))
                    {
                        <div class="clear">
                        </div>
                        <div class="current-code">
                            <br />
                            @string.Format(T("ShoppingCart.DiscountCouponCode.CurrentCode").Text, Model.CurrentDiscountCode)
                            <input id="removediscountcouponcode" type="submit" name="removediscountcouponcode" value=" " title="@T("Common.Remove")" class="removediscountbutton" />
                        </div>
                    }*@
                </div>
                }
            } @*@if (Model.ShowGiftCardBox)
            {
                using (Html.BeginRouteForm("ShoppingCart", FormMethod.Post))
                {
                <div class="giftcard-box">
                    <b>@T("ShoppingCart.GiftCardCouponCode")</b>
                    <br />@T("ShoppingCart.GiftCardCouponCode.Tooltip")<br />
                    <input name="giftcardcouponcode" type="text" id="giftcardcouponcode" style="width: 125px;" />&nbsp;
                    <input type="submit" name="applygiftcardcouponcode" value="@T("ShoppingCart.GiftCardCouponCode.Button")" id="applygiftcardcouponcode" class="applycouponcodebutton" />
                    @if (!String.IsNullOrEmpty(Model.GiftCardMessage))
                    {
                        <div class="clear">
                        </div>
                        <div class="message-error">
                            @Model.GiftCardMessage
                        </div>
                    }
                </div>
                }
            }*@
        </div>
@*@Html.Partial("EstimateShipping", Model.EstimateShipping)*@
    }
</div>