// Fix installer && not displaying Shop fields on specific price when multishop is disabled

This commit is contained in:
rGaillard
2011-12-21 10:36:54 +00:00
parent d95167a478
commit b55966306e
3 changed files with 18 additions and 15 deletions
+14 -11
View File
@@ -260,16 +260,19 @@ jQuery(document).ready(Customer.init);
{/foreach}
</script>
<div id="add_specific_price" style="display: none;">
<input type="hidden" name="sp_id_shop" value="0" />
<label>{l s='For:'}</label>
<div class="margin-form">
<select name="sp_id_shop">
<option value="0">{l s='All shops'}</option>
{foreach from=$shops item=shop}
<option value="{$shop.id_shop}">{$shop.name|htmlentitiesUTF8}</option>
{/foreach}
</select>
&gt;
{if !$multi_shop}
<input type="hidden" name="sp_id_shop" value="0" />
{else}
<label>{l s='For:'}</label>
<div class="margin-form">
<select name="sp_id_shop">
<option value="0">{l s='All shops'}</option>
{foreach from=$shops item=shop}
<option value="{$shop.id_shop}">{$shop.name|htmlentitiesUTF8}</option>
{/foreach}
</select>
&gt;
{/if}
<select name="sp_id_currency" id="spm_currency_0" onchange="changeCurrencySpecificPrice(0);">
<option value="0">{l s='All currencies'}</option>
{foreach from=$currencies item=curr}
@@ -380,7 +383,7 @@ jQuery(document).ready(Customer.init);
<tr>
<th class="cell border" style="width: 12%;">{l s='Rule'}</th>
<th class="cell border" style="width: 12%;">{l s='Combination'}</th>
<th class="cell border" style="width: 12%;">{l s='Shop'}</th>
{if $multi_shop}<th class="cell border" style="width: 12%;">{l s='Shop'}</th>{/if}
<th class="cell border" style="width: 12%;">{l s='Currency'}</th>
<th class="cell border" style="width: 11%;">{l s='Country'}</th>
<th class="cell border" style="width: 13%;">{l s='Group'}</th>
@@ -2589,7 +2589,8 @@ class AdminProductsControllerCore extends AdminController
'groups' => $groups,
'combinations' => $combinations,
'product' => $product,
'link' => new Link
'multi_shop' => Shop::isFeatureActive(),
'link' => new Link()
));
}
else
@@ -2838,7 +2839,7 @@ class AdminProductsControllerCore extends AdminController
<tr '.($i%2 ? 'class="alt_row"' : '').'>
<td class="cell border">'.$rule_name.'</td>
<td class="cell border">'.$attributes_name.'</td>
<td class="cell border">'.($specific_price['id_shop'] ? $shops[$specific_price['id_shop']]['name'] : $this->l('All shops')).'</td>
'.(Shop::isFeatureActive() ? '<td class="cell border">'.($specific_price['id_shop'] ? $shops[$specific_price['id_shop']]['name'] : $this->l('All shops')).'</td>' : '').'
<td class="cell border">'.($specific_price['id_currency'] ? $currencies[$specific_price['id_currency']]['name'] : $this->l('All currencies')).'</td>
<td class="cell border">'.($specific_price['id_country'] ? $countries[$specific_price['id_country']]['name'] : $this->l('All countries')).'</td>
<td class="cell border">'.($specific_price['id_group'] ? $groups[$specific_price['id_group']]['name'] : $this->l('All groups')).'</td>
+1 -2
View File
@@ -1606,5 +1606,4 @@ INSERT INTO `PREFIX_supply_order_state_lang` (`id_supply_order_state`, `id_lang`
(6, 4, 'order fenced'),
(6, 5, 'order fenced');
INSERT INTO `PREFIX_category_shop` (`id_category`, `id_shop`) VALUES
(1, 1);
INSERT INTO `PREFIX_category_shop` (`id_category`, `id_shop`) VALUES (1, 1);