I want to create a custom field. I want a Company ID (or VAT) to be entered when registering or changing an address. I did it, but it gives me an error:
"Fatal error: Cannot use string offset as an array in ../admin/view/template/sale/customer_form.tpl on line 501"
I use OpenCart 2.0.1.1
Where is my mistake?
"Fatal error: Cannot use string offset as an array in ../admin/view/template/sale/customer_form.tpl on line 501"
I use OpenCart 2.0.1.1
Where is my mistake?
By not giving us enough details to be able to help you.
You started changing files, but didn't tell us what exactly you did to your files.
Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig
I'm not changing files.
I added a new field from the OpenCart administrator, "Sales - Customers - Customs fields". I added a new field "Company ID".
In "Register Account", the field is filled in. No problem.
However, in "Edit Consumer" from the OpenCart administrator, "Address1", this error appears below the "Company ID" field:
"Fatal error: Cannot use string offset as an array in ../admin/view/template/sale/customer_form.tpl on line 501"
Let me explain what I want to do if anyone can give an idea.
I want the user to choose a private person or company when registering or Edit / New address.
If a company, user must enter the Company ID (or VAT Number). This information should be published on Order in the email.
I hope I explained correctly. And this for OpenCart 2.0.1.1
I added a new field from the OpenCart administrator, "Sales - Customers - Customs fields". I added a new field "Company ID".
In "Register Account", the field is filled in. No problem.
However, in "Edit Consumer" from the OpenCart administrator, "Address1", this error appears below the "Company ID" field:
"Fatal error: Cannot use string offset as an array in ../admin/view/template/sale/customer_form.tpl on line 501"
Let me explain what I want to do if anyone can give an idea.
I want the user to choose a private person or company when registering or Edit / New address.
If a company, user must enter the Company ID (or VAT Number). This information should be published on Order in the email.
I hope I explained correctly. And this for OpenCart 2.0.1.1
This custom field data is not sent by email by default and is not shown on the invoice...
Custom OpenCart modules and solutions. You can write PM with additional questions... Extensions you can find here
Something like this might work:
https://www.opencart.com/index.php?rout ... n_id=23447
latest Release:
https://github.com/IP-CAM/Custom-field- ... oice-email
https://www.opencart.com/index.php?rout ... n_id=23447
latest Release:
https://github.com/IP-CAM/Custom-field- ... oice-email
My Github OC Site: https://github.com/IP-CAM
5'200 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.
Custom fields have been fixed on the master branch already. I would suggest to take a look at the validate() and validateForm() methods from the controllers and integrate those fixes. You could also look on the Marketplace for similar fixes.
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
Sounds like you'd save time by posting a paid job here Commercial Support Forum.
UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk
Who is online
Users browsing this forum: Semrush [Bot] and 114 guests