问题
How do you create an additional field (dropdown) in the manufacturer's edit page. I need it to add a manufacturer country. I searched the web a lot, but I didn't find any information or documentation.
回答1:
It's a long procedure i can only explain the steps, as you know Opencart is MVC based so you have to go through each portion.
In Language of admin catalog/manufacturer.php add new required variable to display label.
Controller of Admin catalog/manufacturer.php
getForm() //update regarding view variables according to tpl.
View file of admin catalog/manufacturer_form.tpl add your dropdown field and variables passed from getForm().
Controller of Admin catalog/manufacturer.php
validate() //check if you need validation on passed values from tpl file.
Now alter table manufacturer add extra field on database.
Model of Admin catalog/manufacturer.php
addManufacturer() //edit query to add your extra to insert in database
editManufacturer() //edit query to update your extra added field
来源:https://stackoverflow.com/questions/20623719/opencart-country-of-manufacturer