Minishop2 - msOption add field style "color" or "tags"

Adding a field to Minishop2 I followed this article:
Docu

But I have problems to get it work like the option fields «color» or «tags».

Is
xtype: 'minishop2-combo-autocomplete',
wrong?
Or something in the map-file
, 'fieldMeta' => array(
        'material' => array(
            'dbtype' => 'text',
            'precision' => '255',
            'phptype' => 'string',
            'null' => true,
            'default' => NULL
Every help is appreciated.
Fabian
Fabian Christen
12 июня 2018, 12:50
modx.pro
1 197
+1

Комментарии: 3

Дмитрий
12 июня 2018, 18:17
+2
Fix map-file, try to replace this:
'phptype' => 'string',
with
, 'phptype' => 'json'
it's work for me.
    Василий Наумкин
    13 июня 2018, 07:09
    +1
    You need to use
    xtype: 'minishop2-combo-options',

    And xPDO map should look like
    'fieldMeta' => array (
    	'material' => array (
    		'dbtype' => 'text',
    		'phptype' => 'json',
    		'null' => true,
    	)
    ),

    All this you can find in miniShop2 sources.
      Fabian Christen
      13 июня 2018, 11:10
      +1
      Thank both of you.
      Works perfect!

        Авторизуйтесь или зарегистрируйтесь, чтобы оставлять комментарии.
        3