[-] BO: Fix #PSCFV-7995 countries/groups/currencies refreshment when selecting a shop in specific price form
This commit is contained in:
+27
@@ -0,0 +1,27 @@
|
||||
{*
|
||||
* 2007-2013 PrestaShop
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Academic Free License (AFL 3.0)
|
||||
* that is bundled with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* http://opensource.org/licenses/afl-3.0.php
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@prestashop.com so we can send you a copy immediately.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to http://www.prestashop.com for more information.
|
||||
*
|
||||
* @author PrestaShop SA <contact@prestashop.com>
|
||||
* @copyright 2007-2013 PrestaShop SA
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
{foreach from=$option_list item='row'}
|
||||
<option value="{$row[$key_id]|intval}">{$row[$key_value]|escape:'htmlall':'UTF-8'}</option>
|
||||
{/foreach}
|
||||
@@ -360,6 +360,54 @@ class AdminProductsControllerCore extends AdminController
|
||||
return $result;
|
||||
}
|
||||
|
||||
public function ajaxProcessGetCountriesOptions()
|
||||
{
|
||||
if (!$res = Country::getCountriesByIdShop((int)Tools::getValue('id_shop'), (int)$this->context->language->id))
|
||||
return ;
|
||||
|
||||
$tpl = $this->createTemplate('specific_prices_shop_update.tpl');
|
||||
$tpl->assign(array(
|
||||
'option_list' => $res,
|
||||
'key_id' => 'id_country',
|
||||
'key_value' => 'name'
|
||||
)
|
||||
);
|
||||
|
||||
$this->content = $tpl->fetch();
|
||||
}
|
||||
|
||||
public function ajaxProcessGetCurrenciesOptions()
|
||||
{
|
||||
if (!$res = Currency::getCurrenciesByIdShop((int)Tools::getValue('id_shop')))
|
||||
return ;
|
||||
|
||||
$tpl = $this->createTemplate('specific_prices_shop_update.tpl');
|
||||
$tpl->assign(array(
|
||||
'option_list' => $res,
|
||||
'key_id' => 'id_currency',
|
||||
'key_value' => 'name'
|
||||
)
|
||||
);
|
||||
|
||||
$this->content = $tpl->fetch();
|
||||
}
|
||||
|
||||
public function ajaxProcessGetGroupsOptions()
|
||||
{
|
||||
if (!$res = Group::getGroups((int)$this->context->language->id, (int)Tools::getValue('id_shop')))
|
||||
return ;
|
||||
|
||||
$tpl = $this->createTemplate('specific_prices_shop_update.tpl');
|
||||
$tpl->assign(array(
|
||||
'option_list' => $res,
|
||||
'key_id' => 'id_group',
|
||||
'key_value' => 'name'
|
||||
)
|
||||
);
|
||||
|
||||
$this->content = $tpl->fetch();
|
||||
}
|
||||
|
||||
public function ajaxProcessDeleteVirtualProduct()
|
||||
{
|
||||
if (!($id_product_download = ProductDownload::getIdFromIdProduct((int)Tools::getValue('id_product'))))
|
||||
@@ -4251,4 +4299,4 @@ class AdminProductsControllerCore extends AdminController
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user