Adding a field to the customer profile

Hello, friends! Here in Brazil sometimes we have to inform the mail company some ID of the recipient of the package we are shipping. So I added this ID field to the billing component, to make our customers inform their IDs. It’s working fine: at the Snipcart dashboard I can see their IDs attached to their orders.

Problem is: if the customer creates an account for him/her, on his/her next orders I can’t see this ID anymore (because they don’t need to fill the billing form anymore). Is it possible to attach this ID field to the customer profile, the same way that his/her addresses are associated?

Thnaks in advance!

Hi @Fabricio,
The only way to fix your issue would be to make the ID field required, as it would force the client to fill out this field at each checkout. Otherwise, it is currently impossible to set customer data from a custom order field.

Cheers,

Felix, thanks for your reply! My ID field is already required. When a customer fills the billing component, I always get their ID. But when they create an account, on their next orders they won’t need to fill the billing component (the checkout button takes them directly to the shipping methods; the billing and addresses info come from their accounts, I suppose) and then they can complete the checkout without filling the ID field. That means that orders of these registered customers are created without the ID, even though it is required at the billing component.

I tried to override the register-form component, to add this ID field along with the email and password, but it didn’t work… Is it possible to create a new field in the customer profile? That would be nice – it would be easy to get their IDs, even if it doesn’t come with their orders!

Hi @Fabricio

I logged this issue into our system as I can understand that this is not an expected behavior: Required custom fields should be taken into account before skipping a checkout step.

I also added the feature request for custom fields in customer profile.

For now, would moving the custom field ID to the Shipping or Payment step work for you?

Let me know if this helps,
Cheers!

Hello, Dominic, thank you very much for the reply. Custom fields in customer profile would be awesome! That’s the perfect solution because then registered customers wouldn’t need to inform this ID every time they purchase, right?

For now, I’ll move this custom field ID to the Shipping or Payment and see what happens.

Thanks again!

1 Like