Custom fields

Create issue
Issue #51 resolved
Former user created an issue

A model that allow - Define custom fields to attach to Items - Manage those fields

The implementation uses CharField with maxlength=255 for both the name and the value. Only one ocurrence of a give custom field is allowed per Item.

Regards, maykel

Reported by moya

Comments (2)

  1. Former user Account Deleted

    There are 2 options to do this in the product-model-refactor branch.

    The first is you can extend the product model with another external model. You can use the DownloadableProduct, BundledProduct, ProductVariation, and ConfigurableProduct models as an example of how to do this for now. I plan to document a better example shortly. This will let you effectively add fields to the product model using whatever model constraints you want.

    The second option (added in [449]) is a lesser version of the attached patch. It just allows arbitrary name/value pairs (as strings) to be attached to a product. This is a very quick and dirty way to add extra info to a product if you don't want to take the time to add your own model extension. I didn't go any further then this because I feel like if you want more structure then you should be using the first option.

  2. Log in to comment