Hello,
I'm having a bit of a problem with a discount requirement plugin I've been developing. It was working fine for the last few days, but suddenly this issue came up and I'm unable to use my plugin because of the issue.
In my main plugin class in the GetConfigurationUrl(int, int?) method, the second variable is always NULL and I can't figure out why. I need to rely on this value in order to apply the requirement properly. I'm not sure how or where this method is called from or how the discountRequirementId variable is generated from and I need help with it.
Here's my code for this class:
public partial class ShippingMethodDiscountRequirementRule : BasePlugin, IDiscountRequirementRule
{
... (constructors, other methods, etc.)
public string GetConfigurationUrl(int discountId, int? discountRequirementId)
{
//configured in RouteProvider.cs
var sb = new StringBuilder();
sb.Append("Plugins/DiscountRulesShippingMethods/Configure/?discountId=");
sb.Append(discountId);
if (discountRequirementId.HasValue)
sb.AppendFormat("&discountRequirementId={0}", discountRequirementId.Value);
return sb.ToString();
}
}
Thanks!