Skip to content

Convert form static to dynamic product fields #13

@Zen4All

Description

@Zen4All

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.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions