msOptions и астомные поля товара
После добавления ряда полей, с помощью плагина, они появились в админке, заполняются и сохраняются, но не выводятся с помощью msOptions.
Вот файлы плагина(на одинаковые файлы помощи не обращайте внимания)
msproductdata.js
Вот файлы плагина(на одинаковые файлы помощи не обращайте внимания)
msproductdata.js
miniShop2.plugin.pluginname = {
getFields: function(config) {
return {
availability: {xtype: 'numberfield', description: '<b></b><br />'+_('ms2_product_availability_help')},
sostav: {xtype: 'textfield', description: '<b></b><br />'+_('ms2_product_sostav_help')},
material: {xtype: 'textfield', description: '<b></b><br />'+_('ms2_product_pack_help')},
pack: {xtype: 'textfield', description: '<b></b><br />'+_('ms2_product_pack_help')},
fill: {xtype: 'textfield', description: '<b></b><br />'+_('ms2_product_pack_help')},
inset: {xtype: 'textfield', description: '<b></b><br />'+_('ms2_product_set_help')},
technic: {xtype: 'textfield', description: '<b></b><br />'+_('ms2_product_pack_help')},
kanva: {xtype: 'textfield', description: '<b></b><br />'+_('ms2_product_pack_help')},
kanva_color: {xtype: 'textfield', description: '<b></b><br />'+_('ms2_product_pack_help')},
picture_type: {xtype: 'textfield', description: '<b></b><br />'+_('ms2_product_pack_help')},
result: {xtype: 'textfield', description: '<b></b><br />'+_('ms2_product_result_help')},
use: {xtype: 'textfield', description: '<b></b><br />'+_('ms2_product_use_help')},
}
}
,getColumns: function() {
return {
availability: {width:50, sortable:true, editor: {xtype:'numberfield'}},
sostav: {width:100, sortable:true, editor: {xtype:'textfield'}},
material: {width:100, sortable:true, editor: {xtype:'textfield'}},
pack: {width:100, sortable:true, editor: {xtype:'textfield'}},
fill: {width:100, sortable:true, editor: {xtype:'textfield'}},
inset: {width:100, sortable:true, editor: {xtype:'textfield'}},
technic: {width:100, sortable:true, editor: {xtype:'textfield'}},
kanva:{width:100, sortable:true, editor: {xtype:'textfield'}},
kanva_color:{width:100, sortable:true, editor: {xtype:'textfield'}},
picture_type:{width:100, sortable:true, editor: {xtype:'textfield'}},
result: {width:100, sortable:true, editor: {xtype:'textfield'}},
use: {width:100, sortable:true, editor: {xtype:'textfield'}}
}
}
};msproductdata.map.inc.php<?php
return array(
'fields' => array(
'availability' => 0,
'sostav' => NULL,
'material' => NULL,
'pack' => NULL,
'fill' => NULL,
'inset' => NULL,
'technic' => NULL,
'kanva' => NULL,
'kanva_color' => NULL,
'picture_type' => NULL,
'result' => NULL,
'use' => NULL,
)
,'fieldMeta' => array(
'availability' => array(
'dbtype' => 'integer'
,'precision' => '10'
,'phptype' => 'integer'
,'null' => true
,'default' => 0
),
'sostav' => array (
'dbtype' => 'text',
'phptype' => 'string',
'null' => true
,'default' => NULL
),
'material' => array (
'dbtype' => 'text',
'phptype' => 'string',
'null' => true
,'default' => NULL
),
'pack' => array (
'dbtype' => 'text',
'phptype' => 'string',
'null' => true
,'default' => NULL
),
'fill' => array (
'dbtype' => 'text',
'phptype' => 'string',
'null' => true
,'default' => NULL
),
'inset' => array (
'dbtype' => 'text',
'phptype' => 'string',
'null' => true
,'default' => NULL
),
'technic' => array (
'dbtype' => 'text',
'phptype' => 'string',
'null' => true
,'default' => NULL
),
'kanva' => array (
'dbtype' => 'text',
'phptype' => 'string',
'null' => true
,'default' => NULL
),
'kanva_color' => array (
'dbtype' => 'text',
'phptype' => 'string',
'null' => true
,'default' => NULL
),
'picture_type' => array (
'dbtype' => 'text',
'phptype' => 'string',
'null' => true
,'default' => NULL
),
'result' => array (
'dbtype' => 'text',
'phptype' => 'string',
'null' => true
,'default' => NULL
),
'use' => array (
'dbtype' => 'text',
'phptype' => 'string',
'null' => true
,'default' => NULL
)
)
); Комментарии: 5
Авторизуйтесь или зарегистрируйтесь, чтобы оставлять комментарии.
Проверяй вызов MsOption, смотри showLogs, быть может там кроется ошибка?
Остальные можно выбирать сниппетом msProducts.
Никита ПавловА мне бы хотелось, чтобы документацию читали, но мир не совершенен.
Никита Павлов