How works the lists field in the SellIt's models
It's important to allow to the client to select a size, style o color for the item which client wants to purchase. To add these options, i've created the lists field in the SellIt's models, which allows to create a list with new items(could be sizes, colors, styles, etc.) and manage them.
I've explained how to add a new register a new SellIt's model here https://www.midrub.com/articles/set-sellit-model If you're looking at the model structure, you're seeing the fields key which has no value there.
If you want to add a new field with the lists type, you have to add another array like this:
array(
'field_slug' => 'unique field type',
'field_type' => 'lists',
'field_name' => 'field name displayed to the user',
'field_instructions' => 'short instructions displayed to the user',
'field_placeholder' => 'placeholder displayed in the add new item input',
'field_add_item' => 'text which is showed on the button',
'required' => 'boolean value'
)
Suggested Articles
- How to integrate a new payment gateway in the SellIt app
- Payments Introduction for SellIt
- About SellIt
- How to add preferences in a SellIt's model for items
- How to create a model for the SellIt app
- How to add a checkbox field in a SellIt's model
- How works the lists field in the SellIt's models
- How to install the apps in Midrub
- Midrub Apps Structure
- Apps Introduction