stackable discount possible?

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
13 years ago
Is it possible to have stackable discount?
I would like to give 10% discount on whole order to first time user and an additional discount of 15% if coupon code is used. (total discount of 25% on whole order)

Also, does anyone know how to display discount description on order summary?

Thank you in advance for your response!
13 years ago
Discounts aren't stackable.

You can display the Discount Name field with the following changes to the OrderSummary control:

Add the following to Modules\OrderSummary.ascx to display the text:
<asp:Literal ID="ltlDiscountName" runat="server" EnableViewState="false" />

Add the following to the code behind file Modules\OrderSummary.ascx (in OnPreRender() method)
if (NopContext.Current.User != null)
{
    string couponCode = NopContext.Current.User.LastAppliedCouponCode;

    if (!String.IsNullOrEmpty(couponCode))
    {
        var discounts = DiscountManager.GetAllDiscounts(null);
        var discount = discounts.FindByCouponCode(couponCode);
        if (discount != null)
        {
            ltlDiscountName.Text = String.Format("Applied Discount: {0}", discount.Name);
            // uncomment the following to display the coupon code in the textbox
            //txtDiscountCouponCode.Text = discount.CouponCode;
        }
    }
}
You will need to recompile the NopCommerceStore project.

.
13 years ago
Thank you mb!
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.