Hi all, im new too shopify and apologies if i am completely in the wrong forum location or that this has been answered before or anything. I have tried to find an answer within google, shopify chat and shopify community without success.
Now my main goal was to add a mandatory field within the checkout called “Organization number”. It has to be digits only and has to be 9 digits. As far as i understand there is no way to edit the checkout using the Basic shopify plan.
So then i read further and found that maybe the best solution is too do this within the cart attribute. At this moment the code looks like this:
If i understand it correctly at the moment it will accept anything. Text, numbers whatever.
Would it be some kind of possibility to make something like:
"While ( vat_reg_no>99999999 && vat_reg_no<1000000000) {keep asking for the cart attribute}
(So basically only accept numbers that is 9 digits and if not keep asking)
Also i have figured like an alternative for me is: Create a new mandatory account field called “Organization number” and it will create a note on the account with the number in question. I would also need to set that account is required to buy at store which i would like to avoid.
Currently the code within customers/register.liquid looks like this:
This one has the same problem as the cart attribute that it has no kind of validation which is problematic.
Also naturally if i do get to fix this “Account creation with validation” i would like that the cart value gets automatically updated so that customers that have created an account dont have to fill it in twice.
Any help would be greatly appreciated. I am aware that there are apps that may help me out like “Customer fields” (https://apps.shopify.com/customr/reviews?rating=5&sort_by=recent)
However i am on a low budget and it will just not be possible. Thanks in advance.