Im trying to add some custom fields to the customer account creation.
I would like to collect “company name” and “address” on account creation.
i tried to add the following to main-register.liquid
{{ 'customer.register.company' | t }}
This added “company” to the registration form but with a translation missing error.
I also stumbled along a help file for collecting additional info https://shopify.dev/themes/customer-engagement/additional-customer-information
iam unsure if i should replace all the code with the coding found in the help link and then adjust that?
Any help appreciated.
Hi @cloudisland ,
It’s showing translation missing error because where you write {{customer.register.company}}. It means there should be the metafield or column name in customer object, seems shopify don’t have this object.
Therefore it’s giving error to resolve it, please add metafield in your customer object.
If you need advance help! [Hire me](Share on WhatsApp! Help me)
1 Like
Many thanks for your reply !
I have added customer metafield for “company” but still received the same error.
do i need to adjust {{ ‘customer.register.company’ | t }} ?
when I add metafield
Means metafield should be written like customer.metafields.register.company or possibly it’s because you have use single quote {{ ‘customer.register.company’ | t }}
plz try with
My metafield looks like
Result
This has added to the form , but it doesnt identify the field .
@cloudisland ,
You didn’t mark it as solution! Seems your issue is not only translation missing error. Can you elaborate your problem or flow in detail.
I spent hours trying to get it right but no joy my website only runs in one language and that default for me is english. im not entirely sure it means translation in the way i first thought.
for now i used a work around by skipping metafields and saving the info as a customer note
company
The only downside is i now have to apply the info from the customer note to the account manually but itll do for now !