I'm trying to add a new checkout step to NOP, so that when customer selects Parcel Machine as delivery option, new step appear. I was able to add new step, and now I can select the options I want in there... but they are not saved after I click the Next button. I modified Customer class by adding two custom attributes like this:
#region Custom Properties
public string LastPrimaryParcelMachine { get; set; }
public string LastSecondaryParcelMachine { get; set; }
but when I use the following code:
protected void btnNextStep_Click(object sender, EventArgs e)
{
if (Page.IsValid)
{
NopContext.Current.User.LastPrimaryParcelMachine = ddlPreferedParcelMachine.SelectedValue;
NopContext.Current.User.LastSecondaryParcelMachine = ddlAlternateParcelMachine.SelectedValue;
this.CustomerService.UpdateCustomer(NopContext.Current.User);
var args1 = new CheckoutStepEventArgs() { PrimaryAndSecondaryPaczkomatSet = true };
OnCheckoutStepChanged(args1);
if (!this.OnePageCheckout)
Response.Redirect("~/checkoutpaymentmethod.aspx");
}
}
the NopContext.Current.User.LastPrimaryParcelMachine and NopContext.Current.User.LastSecondaryParcelMachine properties are null inside the next step, while others (ShippingAddressId for example) are not null.
What am I doing wrong?
Thanks in advance