Opencart country of manufacturer [closed]

风格不统一 提交于 2019-12-13 06:00:40

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!