Вопрос по fieldLabel в админке для доп.полей ms2

Подскажите, может кто сталкивался. Одно и то же поле (добавленное плагином) используется для разных шаблонов товаров. Можно ли изменить в зависимости от шаблона подпись поля в админке? Не инфу по наведению, которая указывается в параметре description, а именно подпись (по умолчанию она берется из лексикона _('ms2_product_'+field)). Возможно ли это без переписывания исходников? С extjs на «Вы», по-этому буду благодарен за любую помощь.
Код плагина:
miniShop2.plugin.product= {
    getFields: function(config) {
     
        //heat mats
        if (config.record['parent']=='1106'){
            return {
                available: {xtype: 'minishop2-combo-available', description: '<b>[[+available]]</b><br />'+_('ms2_product_available_help')},
                manufacturer: {xtype: 'minishop2-combo-autocomplete', description: '<b>[[+manufacturer]]</b><br />'+_('ms2_product_manufacturer_help')},
                site_price: {xtype:  'numberfield', decimalPrecision: 2, description: '<b>[[+site_price]]</b><br />'+_('ms2_product_site_price_help')},
                basic_price: {xtype:  'numberfield', decimalPrecision: 2, description: '<b>[[+basic_price]]</b><br />'+_('ms2_product_basic_price_help')},
                older_price: {xtype:  'numberfield', decimalPrecision: 2, description: '<b>[[+older_price]]</b><br />'+_('ms2_product_older_price_help')},
                purchase_price: {xtype:  'numberfield', decimalPrecision: 2, description: '<b>[[+purchase_price]]</b><br />'+_('ms2_product_purchase_price_help')},
                currency: {xtype:  'minishop2-combo-autocomplete', description: '<b>[[+currency]]</b><br />'+_('ms2_product_currency_help')},
                series: {xtype:  'minishop2-combo-autocomplete', description: '<b>[[+series]]</b><br />'+_('ms2_product_series_help')},
                cable_mat: {xtype:  'minishop2-combo-autocomplete', description: '<b>[[+cable_mat]]</b><br />'+_('ms2_product_cable_mat_help')},
                power: {xtype:  'numberfield', decimalPrecision: 0, description: '<b>[[+power]]</b><br />'+_('ms2_product_power_teplyie_poli')},
                square: {xtype:  'numberfield', decimalPrecision: 2, description: '<b>[[+square]]</b><br />'+_('ms2_product_square')},
                sides: {xtype:  'minishop2-combo-autocomplete', description: '<b>[[+sides]]</b><br />'+_('ms2_product_sides_help')}
            }
        }
        //heat kabels
        if (config.record['parent']=='1107'){
            return {
                available: {xtype: 'minishop2-combo-available', description: '<b>[[+available]]</b><br />'+_('ms2_product_available_help')},
                manufacturer: {xtype: 'minishop2-combo-autocomplete', description: '<b>[[+manufacturer]]</b><br />'+_('ms2_product_manufacturer_help')},
                site_price: {xtype:  'numberfield', decimalPrecision: 2, description: '<b>[[+site_price]]</b><br />'+_('ms2_product_site_price_help')},
                basic_price: {xtype:  'numberfield', decimalPrecision: 2, description: '<b>[[+basic_price]]</b><br />'+_('ms2_product_basic_price_help')},
                older_price: {xtype:  'numberfield', decimalPrecision: 2, description: '<b>[[+older_price]]</b><br />'+_('ms2_product_older_price_help')},
                purchase_price: {xtype:  'numberfield', decimalPrecision: 2, description: '<b>[[+purchase_price]]</b><br />'+_('ms2_product_purchase_price_help')},
                currency: {xtype:  'minishop2-combo-autocomplete', description: '<b>[[+currency]]</b><br />'+_('ms2_product_currency_help')},
                series: {xtype:  'minishop2-combo-autocomplete', description: '<b>[[+series]]</b><br />'+_('ms2_product_series_help')},
                cable_mat: {xtype:  'minishop2-combo-autocomplete', description: '<b>[[+cable_mat]]</b><br />'+_('ms2_product_cable_mat_help')},
                power: {xtype:  'numberfield', decimalPrecision: 0, description: '<b>[[+power]]</b><br />'+_('ms2_product_power_teplyie_poli')},
                square: {xtype:  'numberfield', decimalPrecision: 2, description: '<b>[[+square]]</b><br />'+_('ms2_product_square')},
                length: {xtype:  'numberfield', decimalPrecision: 2, description: '<b>[[+length]]</b><br />'+_('ms2_product_length_help')},
            }
        }
    }
    ,getColumns: function() {
        return {
            available: {width:50, sortable:false, editor: {xtype:'minishop2-combo-available', name: 'available'}},
            manufacturer: {width:50, sortable:false, editor: {xtype:'minishop2-combo-autocomplete', name: 'manufacturer'}},
            site_price: {width:50, sortable:false, editor: {xtype:'minishop2-combo-autocomplete', name: 'site_price'}},
            basic_price: {width:50, sortable:false, editor: {xtype:'minishop2-combo-autocomplete', name: 'basic_price'}},
            older_price: {width:50, sortable:false, editor: {xtype:'minishop2-combo-autocomplete', name: 'older_price'}},
            purchase_price: {width:50, sortable:false, editor: {xtype:'minishop2-combo-autocomplete', name: 'purchase_price'}},
            currency: {width:50, sortable:false, editor: {xtype:'minishop2-combo-autocomplete', name: 'currency'}},
            series: {width:50, sortable:false, editor: {xtype:'minishop2-combo-autocomplete', name: 'series'}},
            cable_mat: {width:50, sortable:false, editor: {xtype:'minishop2-combo-autocomplete', name: 'cable_mat'}},
			power: {width:50, sortable:false, editor: {xtype:'minishop2-combo-autocomplete', name: 'power'}},
            square: {width:50, sortable:false, editor: {xtype:'minishop2-combo-autocomplete', name: 'square'}},
            sides: {width:50, sortable:false, editor: {xtype:'minishop2-combo-autocomplete', name: 'sides'}},
			length: {width:50, sortable:false, editor: {xtype:'minishop2-combo-autocomplete', name: 'length'}}
        }
    }            
};
Владислав
18 января 2017, 13:21
modx.pro
997
0

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

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