Add reference in display
This commit is contained in:
parent
7af93b1cc0
commit
7adb1c26d7
@ -24,8 +24,10 @@ class ProductConfiguratorOptGroup extends ObjectModel
|
||||
$id_lang = (int)Context::getContext()->language->id;
|
||||
|
||||
$opts = Db::getInstance()->executeS('
|
||||
SELECT pcog.*, col.`name` FROM `'._DB_PREFIX_.'product_configurator_opt_group` pcog, `'._DB_PREFIX_.'configurator_opt_group_lang` col
|
||||
SELECT pcog.*, col.`name`, cog.`reference`
|
||||
FROM `'._DB_PREFIX_.'product_configurator_opt_group` pcog, `'._DB_PREFIX_.'configurator_opt_group` cog, `'._DB_PREFIX_.'configurator_opt_group_lang` col
|
||||
WHERE pcog.`id_product` = '.(int)$id_product.'
|
||||
AND cog.`id_configurator_opt_group` = col.`id_configurator_opt_group`
|
||||
AND pcog.`id_configurator_opt_group` = col.`id_configurator_opt_group`
|
||||
AND col.`id_lang` = '.(int)$id_lang.'
|
||||
ORDER BY pcog.`position` ASC');
|
||||
|
@ -86,6 +86,9 @@ class AdminAntadisConfiguratorProductGroupController extends ModuleAdminControll
|
||||
'name' => array(
|
||||
'title' => $this->l('Option Name'),
|
||||
),
|
||||
'reference' => array(
|
||||
'title' => $this->l('Option Reference'),
|
||||
),
|
||||
'required' => array(
|
||||
'title' => $this->l('Required'),
|
||||
'active' => 'status',
|
||||
@ -100,8 +103,9 @@ class AdminAntadisConfiguratorProductGroupController extends ModuleAdminControll
|
||||
);
|
||||
|
||||
// Override SQL to get name
|
||||
$this->_select = ' cogl.`name`';
|
||||
$this->_select = ' cogl.`name`, cog.`reference`';
|
||||
$this->_join = 'LEFT JOIN `'._DB_PREFIX_.'configurator_opt_group_lang` cogl ON(cogl.`id_configurator_opt_group` = a.`id_configurator_opt_group`)';
|
||||
$this->_join.= 'LEFT JOIN `'._DB_PREFIX_.'configurator_opt_group` cog ON(cog.`id_configurator_opt_group` = a.`id_configurator_opt_group`)';
|
||||
$this->_where = ' AND a.`id_product` = '.(int)$id_product;
|
||||
$this->_orderBy = 'position';
|
||||
|
||||
|
@ -33,6 +33,9 @@ class AntadisConfiguratorDisplayAdminProductsExtraController
|
||||
'name' => array(
|
||||
'title' => $this->module->l('Option Name'),
|
||||
),
|
||||
'reference' => array(
|
||||
'title' => $this->module->l('Option reference'),
|
||||
),
|
||||
'required' => array(
|
||||
'title' => $this->module->l('Required'),
|
||||
'active' => 'status',
|
||||
|
@ -51,3 +51,14 @@ $('form#product-configurator-opt-add').submit(function(){
|
||||
|
||||
{$ProductOptGroupList}
|
||||
|
||||
<div id="product-configurator-opt" class="panel product-tab">
|
||||
<div class="panel-heading">{l s='Copy options from product'}</div>
|
||||
<div class="panel-body">
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user