Each Products can have multiple features - each feature is essentially a string
User should be able to add features at run-time to any product
When user is creating quote - he/she can select which features are added to the product
When a user views a product - the feature list is displayed - and the user can add, edit or remove features of a product.
I am thinking of extending the Products module. But i am not sure what will be the “Features” -
Option 1> Features is a separate module and I create one-to-many relationship between Product and Features
Option 2> Feature is a custom field -
I would prefer choosing Option 2 (Since feature would not have its own properties, don’t see the need for a module)- but how do I create a variable array field type …
The dropdown values (Multiselect) can only be set from the Admin menu - or is there a way to let the drop-down values be added deleted by normal users?
We need normal sales people to be able to add/remove/edit the product features
Also, when products are added to quotes, they can omit certain values ( not really delete the feature from products) but select which features are added to a specific quote
The dropdown values (or Multiselect) can only be set from the Admin menu - or is there a way to let the drop-down values be added deleted by normal users?
We need normal sales people to be able to add/remove/edit the product features
Also, when products are added to quotes, they can omit certain values ( not really delete the feature from products) but select which features are added to a specific quote
Ok, then go for a relate field. This will actually create a relationship, but it will be much simpler in terms of UI than a full-blown relationship with subpanels.
Thanks. So if i have to create a relate field, i have to create Features as a full blown custom module - or atleast a module with a database table supporting the entries?
Is there any other way to create a relate field with a Array variable - for example the features are Array(String) stored in a table - and the product<-> feature is a relation table with product-id and feature-id entries ?
Just try the relate field, I think it will work well for you. Make a simple custom module with only one column if that’s all you need. Then add the relate field to your other module.
You get all the necessary screens to handle the Product features, you get all the power of the list views (import/export/filter etc), you get Security Groups to handle permissions, etc.
And your relate field will have “find-as-you-type” as you’re filling it.
So i have made some progress- but seem to have hit a road-block. Relate fields are single select.
So The Product module has a relate field which is Feature Module - but for each Product I can choose only one Feature - I should be able to select multiple features for same product.
Sorry, I got lost in your requirements and I gave you inadequate advice.
If it needs to be one-to-many then the relate field won’t do, you need a full blown relationship and you can manage each related records as an individual line in a subpanel.
I was looking at the “Accounts” module - and it has “email” address field - and i can add as many email address as possible - so i looked up the table structure and there is an “email_addresses” table and “email_addr_bean_rel” table.
So, my question is - is the following a very complex convoluted solution-
create a table structure similar to that of “email_addr_bean_rel” for product-features relation
create a custom “field type” say - type ArrayEntities - which relates one module to another but can be a variable array
provide an option in the front-end to link the features to products at run time
How complex is this? Is there any starting documentation / forum-post that will give me a good headstart?