Hello..

I set a discount with coupon code for first buy (Nop 4.0):
Discount type: Assigned to order subtotal
Use percentage: checked
Discount percentage: 10.0000
Requires coupon code: checked
Discount limitation: N times per customer
N times: 1
Required customer role: Registered

Store allow to guest to checkout, i liven up customers to register and get the discount, but still, if anybody enter the coupon without register, this don't apply and "NO message of the reason" is displayed, which causes confusion about the veracity of the discount.

In DiscountServices.cs, line:591, could be added a "else" to send some message (could be considered correction for future version):

if (customer.IsRegistered())
{
    var usedTimes = GetAllDiscountUsageHistory(discount.Id, customer.Id, null, 0, 1).TotalCount;
    if (usedTimes >= discount.LimitationTimes)
    {
        result.Errors = new List<string> { _localizationService.GetResource("ShoppingCart.Discount.CannotBeUsedAnymore") };
        return result;
    }
}
else
{
    result.Errors = new List<string> { "Please register to apply discount" };
    return result;
}


There is any way of handle this matter for guest customers?

Thanks!