Hello Phillip,
I was following the tutorials but i think they are not update. I choose the version as 3.1, still the files the docs is referring to doesn't exists in the source code. Could you please check the below mentioned URL:
http://www.broadleafcommerce.com/docs/c ... e-tutorialThere is a line which states
Code: Select all
Then, we can add the new field to ajax/register.html, right below the confirm password field:
I can see there is no "ajax" folder. This folder was replaced with "template". I think you need to update the content of the tutorials. Once again if you go down to the bottom, you will find the following code:
Code: Select all
String url = super.processRegister(registerCustomerForm, errors, request, response, model);
if (url.equals(getRegisterSuccessView())) {
// Grab the current customer from the request
Customer newCustomer = CustomerState.getCustomer();
// Create the referralCode CustomerAttribute
CustomerAttribute referralCodeAttr = new CustomerAttributeImpl();
referralCodeAttr.setName("referralCode");
referralCodeAttr.setValue(registerCustomerForm.getReferralCode());
referralCodeAttr.setCustomer(newCustomer);
// Update our customer object
newCustomer.getCustomerAttributes().add(referralCodeAttr);
newCustomer = customerService.saveCustomer(newCustomer);
// Place the new customer onto the request
CustomerState.setCustomer(newCustomer);
}
return url;
I am trying to implement it but its throwing up error in the following lines:
Code: Select all
referralCodeAttr.setValue(registerCustomerForm.getReferralCode());
Code: Select all
newCustomer.getCustomerAttributes().add(referralCodeAttr);
The 'registerCustomerForm.getReferralCode()' and 'add()' do not exists. Could you please look into this and let me know your inputs? is it possible to use broadleaf commerce without modifying the core framework?