Merge branch 'develop' of gitlab.antadis.net:dev-antadis/chocolatdemariage into develop
This commit is contained in:
commit
e4646d8365
@ -48,12 +48,13 @@ class ConfiguratorStorage extends ObjectModel
|
||||
public static function getConfiguratorOptImpact($id_product)
|
||||
{
|
||||
$context = Context::getContext();
|
||||
$id_lang = $context->language->id;
|
||||
$result = Db::getInstance()->executeS('
|
||||
SELECT pcoi.`id_product_configurator_opt_impact`, pcoi.`id_product_configurator_opt_group`, pcoi.`id_configurator_opt`, col.`name`, pcoi.`price`, co.`position`
|
||||
FROM `'._DB_PREFIX_.'product_configurator_opt_impact` pcoi
|
||||
LEFT JOIN `'._DB_PREFIX_.'configurator_opt` co ON co.`id_configurator_opt` = pcoi.`id_configurator_opt`
|
||||
LEFT JOIN `'._DB_PREFIX_.'configurator_opt_lang` col
|
||||
ON (col.`id_configurator_opt` = pcoi.`id_configurator_opt` AND col.`id_lang` = '.(int)$context->language->id.')
|
||||
ON (col.`id_configurator_opt` = pcoi.`id_configurator_opt` AND col.`id_lang` = '.(int)$id_lang.')
|
||||
WHERE pcoi.`id_product` = '.(int)$id_product.'
|
||||
ORDER BY pcoi.`id_product_configurator_opt_group`, co.`position` ASC');
|
||||
|
||||
|
@ -530,12 +530,7 @@ class AdminAntadisConfiguratorController extends ModuleAdminController
|
||||
{
|
||||
$id_product_from = Tools::getValue('id_product_from');
|
||||
$id_product_to = Tools::getValue('id_product_to');
|
||||
|
||||
echo Tools::jsonEncode(array(
|
||||
'hasError' => true,
|
||||
'errors' => 'ID product cannot be null',
|
||||
));
|
||||
|
||||
|
||||
if (empty($id_product_from) || empty($id_product_to)) {
|
||||
$return = array(
|
||||
'hasError' => true,
|
||||
|
@ -51,7 +51,6 @@ $('form#product-configurator-opt-add').submit(function(){
|
||||
|
||||
{$ProductOptGroupList}
|
||||
|
||||
|
||||
{if $OptNb == 0}
|
||||
<div class="panel product-tab">
|
||||
<div class="panel-heading">{l s='Copy options from product'}</div>
|
||||
@ -107,7 +106,9 @@ $('#configurator_product_autocomplete_input').autocomplete('ajax_products_list.p
|
||||
$('#configurator_product_autocomplete_input').val('');
|
||||
});
|
||||
$('a#submitCopyoptions').on('click', function(e){
|
||||
e.stopPropagation();
|
||||
e.preventDefault();
|
||||
$(this).removeAttr('id');
|
||||
$.post($(this).data('url'), {id_product_from: $('input[name=configurator_product_id]').val()}, function(data){
|
||||
if (data.hasError == true) {
|
||||
alert(data.errors);
|
||||
|
Loading…
Reference in New Issue
Block a user