Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert form static to dynamic product fields #13

Open
8 of 14 tasks
Zen4All opened this issue Dec 25, 2018 · 0 comments
Open
8 of 14 tasks

Convert form static to dynamic product fields #13

Zen4All opened this issue Dec 25, 2018 · 0 comments

Comments

@Zen4All
Copy link
Member

Zen4All commented Dec 25, 2018

Currently all product fields are hard-coded in the product collect_info page, and there is a lot of code duplication for each product type. This is a pain for those people writing mods and need to add extra fields to the page.

Time for a change, and try to make this easier.

After much trial and error, I came to this solution:

  • Place all the fields in separate files
  • Use a database table to save which fields are to be shown in a product type
  • Put new fields in new tables PRODUCTS_EXTRA, and PRODUCTS_EXTRA_DESCRIPTION (multi language fields) Decided not to do this for better compatibility with existing extra fields
  • create new fields
  • delete fields
  • Add product types
  • Edit product types
  • Remove product types
  • Add tabs
  • Edit tabs
  • Remove tabs
  • Load fields in collect info
  • Load/build database query from fields
  • Load language defines
    Parts of this are based/inspired on the Numinix product fields module.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant