// Product is now correctly inserted in product_shop for existant products
This commit is contained in:
@@ -235,7 +235,7 @@
|
|||||||
<form id="product_form" action="{$form_action}" method="post" enctype="multipart/form-data" name="product" style="display:none;">
|
<form id="product_form" action="{$form_action}" method="post" enctype="multipart/form-data" name="product" style="display:none;">
|
||||||
<input type="hidden" name="id_product" value="{$id_product}" />
|
<input type="hidden" name="id_product" value="{$id_product}" />
|
||||||
<div class="tab-pane" id="tabPane1">
|
<div class="tab-pane" id="tabPane1">
|
||||||
{if !$product->active}
|
{if !$product->active && $product->isAssociatedToShop()}
|
||||||
<div class="warn draft" >
|
<div class="warn draft" >
|
||||||
<p>
|
<p>
|
||||||
<span style="float: left">
|
<span style="float: left">
|
||||||
|
|||||||
@@ -150,11 +150,11 @@
|
|||||||
<td style="padding-bottom:5px;">
|
<td style="padding-bottom:5px;">
|
||||||
<ul class="listForm">
|
<ul class="listForm">
|
||||||
<li>
|
<li>
|
||||||
<input onclick="toggleDraftWarning(false);showOptions(true);" type="radio" name="active" id="active_on" value="1" {if $product->active}checked="checked" {/if} />
|
<input onclick="toggleDraftWarning(false);showOptions(true);" type="radio" name="active" id="active_on" value="1" {if $product->active || !$product->isAssociatedToShop()}checked="checked" {/if} />
|
||||||
<label for="active_on" class="radioCheck">{l s='Enabled'}</label>
|
<label for="active_on" class="radioCheck">{l s='Enabled'}</label>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<input onclick="toggleDraftWarning(true);showOptions(false);" type="radio" name="active" id="active_off" value="0" {if !$product->active}checked="checked"{/if} />
|
<input onclick="toggleDraftWarning(true);showOptions(false);" type="radio" name="active" id="active_off" value="0" {if !$product->active && $product->isAssociatedToShop()}checked="checked"{/if} />
|
||||||
<label for="active_off" class="radioCheck">{l s='Disabled'}</label>
|
<label for="active_off" class="radioCheck">{l s='Disabled'}</label>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|||||||
@@ -547,8 +547,7 @@ abstract class ObjectModelCore
|
|||||||
{
|
{
|
||||||
$fields['id_shop'] = (int)$id_shop;
|
$fields['id_shop'] = (int)$id_shop;
|
||||||
$all_fields['id_shop'] = (int)$id_shop;
|
$all_fields['id_shop'] = (int)$id_shop;
|
||||||
$where = $this->def['primary'].' = '.(int)$this->id.' AND id_shop = '.(int)$id_shop;
|
$result &= Db::getInstance()->insert($this->def['table'].'_shop', $fields, $null_values, true, Db::REPLACE);
|
||||||
$result &= Db::getInstance()->update($this->def['table'].'_shop', $fields, $where, 0, $null_values);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user