Merge branch 'development' of https://github.com/PrestaShop/PrestaShop into development
This commit is contained in:
@@ -30,9 +30,9 @@
|
||||
function ajaxStoreStates(id_state_selected)
|
||||
{
|
||||
$.ajax({
|
||||
url: "ajax.php",
|
||||
url: "index.php",
|
||||
cache: false,
|
||||
data: "ajaxStates=1&id_country="+$('#PS_SHOP_COUNTRY_ID').val() + "&id_state=" + $('#PS_SHOP_STATE_ID').val(),
|
||||
data: "ajax=1&tab=AdminStates&token={getAdminToken tab='AdminStates'}&action=states&id_country="+$('#PS_SHOP_COUNTRY_ID').val() + "&id_state=" + $('#PS_SHOP_STATE_ID').val(),
|
||||
success: function(html)
|
||||
{
|
||||
if (html == 'false')
|
||||
|
||||
@@ -62,7 +62,7 @@
|
||||
$.ajax({
|
||||
url: "index.php",
|
||||
cache: false,
|
||||
data: "ajax=1&tab=AdminTaxRulesGroup&token={getAdminToken tab='AdminTaxRulesGroup'}&action=states&id_country="+id_country+"&id_state="+id_state+"&empty_value={l s='All'}",
|
||||
data: "ajax=1&tab=AdminStates&token={getAdminToken tab='AdminStates'}&action=states&id_country="+id_country+"&id_state="+id_state+"&empty_value={l s='All'}",
|
||||
success: function(html){
|
||||
if (html == "false")
|
||||
{
|
||||
|
||||
@@ -35,12 +35,12 @@
|
||||
</div>
|
||||
<div class="footerRight">
|
||||
{if $iso_is_fr}
|
||||
<span>Questions / Renseignements / Formations :</span> <strong>+33 (0)1.40.18.30.04</strong> de 09h à 18h
|
||||
<span>Questions / Renseignements / Formations :</span> <strong>+33 (0)1.40.18.30.04</strong>
|
||||
{/if}
|
||||
| <a href="http://www.prestashop.com/en/contact_us/" target="_blank" class="footer_link">{l s='Contact'}</a>
|
||||
| <a href="http://forge.prestashop.com" target="_blank" class="footer_link">{l s='Bug Tracker'}</a>
|
||||
| <a href="http://www.prestashop.com/forums/" target="_blank" class="footer_link">{l s='Forum'}</a>
|
||||
| <a href="http://addons.prestashop.com/" target="_blank" class="footer_link">{l s='Addons'}</a>
|
||||
| <a href="http://www.prestashop.com/en/contact-us?utm_source=backoffice_footer" target="_blank" class="footer_link">{l s='Contact'}</a>
|
||||
| <a href="http://forge.prestashop.com/?utm_source=backoffice_footer" target="_blank" class="footer_link">{l s='Bug Tracker'}</a>
|
||||
| <a href="http://www.prestashop.com/forums/?utm_source=backoffice_footer" target="_blank" class="footer_link">{l s='Forum'}</a>
|
||||
| <a href="http://addons.prestashop.com/?utm_source=backoffice_footer" target="_blank" class="footer_link">{l s='Addons'}</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -455,6 +455,7 @@
|
||||
});
|
||||
|
||||
});
|
||||
state_token = '{getAdminToken tab='AdminStates'}';
|
||||
{block name="script"}{/block}
|
||||
</script>
|
||||
{/if}
|
||||
|
||||
@@ -139,7 +139,7 @@ class Autoload
|
||||
$filename_tmp = tempnam(dirname($filename), basename($filename.'.'));
|
||||
if($filename_tmp !== FALSE and file_put_contents($filename_tmp, $content, LOCK_EX) !== FALSE)
|
||||
{
|
||||
rename($filename_tmp, $filename);
|
||||
@rename($filename_tmp, $filename);
|
||||
@chmod($filename, 0664);
|
||||
}
|
||||
else
|
||||
|
||||
+6
-2
@@ -120,15 +120,19 @@ class ImageCore extends ObjectModel
|
||||
*
|
||||
* @param integer $id_lang Language ID
|
||||
* @param integer $id_product Product ID
|
||||
* @param integer $id_product_attribute Product Attribute ID
|
||||
* @return array Images
|
||||
*/
|
||||
public static function getImages($id_lang, $id_product)
|
||||
public static function getImages($id_lang, $id_product, $id_product_attribute = NULL)
|
||||
{
|
||||
$attribute_filter = ($id_product_attribute ? ' AND ai.`id_product_attribute` = '.(int)$id_product_attribute : '');
|
||||
|
||||
return Db::getInstance()->executeS('
|
||||
SELECT *
|
||||
FROM `'._DB_PREFIX_.'image` i
|
||||
LEFT JOIN `'._DB_PREFIX_.'image_lang` il ON (i.`id_image` = il.`id_image`)
|
||||
WHERE i.`id_product` = '.(int)$id_product.' AND il.`id_lang` = '.(int)$id_lang.'
|
||||
LEFT JOIN `'._DB_PREFIX_.'product_attribute_image` ai ON (i.`id_image` = ai.`id_image`)
|
||||
WHERE i.`id_product` = '.(int)$id_product.' AND il.`id_lang` = '.(int)$id_lang . $attribute_filter.'
|
||||
ORDER BY i.`position` ASC');
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -347,7 +347,7 @@ class ProductCore extends ObjectModel
|
||||
),
|
||||
'id_tax_rules_group' => array(
|
||||
'xlink_resource' => array(
|
||||
'resourceName' => 'tax_rules_group'
|
||||
'resourceName' => 'tax_rule_groups'
|
||||
)
|
||||
),
|
||||
'position_in_category' => array(
|
||||
|
||||
Vendored
+5
-2
@@ -34,9 +34,12 @@ class CacheApcCore extends Cache
|
||||
public function __construct()
|
||||
{
|
||||
$this->keys = array();
|
||||
$cache_info = apc_cache_info('user');
|
||||
$cache_info = apc_cache_info((extension_loaded('apcu') === true )? '' : 'user' );
|
||||
foreach ($cache_info['cache_list'] as $entry)
|
||||
$this->keys[$entry['info']] = $entry['ttl'];
|
||||
if ( extension_loaded('apcu') === true )
|
||||
$this->keys[$entry['key']] = $entry['ttl'];
|
||||
else
|
||||
$this->keys[$entry['info']] = $entry['ttl'];
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -387,7 +387,7 @@ class AdminControllerCore extends Controller
|
||||
$filter = '';
|
||||
foreach ($this->fields_list AS $field => $t)
|
||||
{
|
||||
if ($val = htmlspecialchars(Tools::getValue($this->table.'Filter_'.$field), ENT_QUOTES, 'UTF-8'))
|
||||
if ($val = Tools::getValue($this->table.'Filter_'.$field))
|
||||
{
|
||||
if(!is_array($val) && !empty($val))
|
||||
$filter .= ($filter ? ', ' : $this->l(' filter by ')).$t['title'].' : ';
|
||||
@@ -395,13 +395,13 @@ class AdminControllerCore extends Controller
|
||||
if (isset($t['type']) && $t['type'] == 'bool')
|
||||
$filter .= ((bool)$val) ? $this->l('yes') : $this->l('no');
|
||||
elseif(is_string($val))
|
||||
$filter .= $val;
|
||||
$filter .= htmlspecialchars($val, ENT_QUOTES, 'UTF-8');
|
||||
elseif(is_array($val))
|
||||
{
|
||||
$tmp = '';
|
||||
foreach($val as $v)
|
||||
if(is_string($v) && !empty($v))
|
||||
$tmp .= ' - '.$v;
|
||||
$tmp .= ' - '.htmlspecialchars($v, ENT_QUOTES, 'UTF-8');
|
||||
if(Tools::strlen($tmp))
|
||||
{
|
||||
$tmp = ltrim($tmp, ' - ');
|
||||
@@ -1535,6 +1535,16 @@ class AdminControllerCore extends Controller
|
||||
|
||||
protected function addToolBarModulesListButton()
|
||||
{
|
||||
|
||||
if (!$this->isFresh(Module::CACHE_FILE_DEFAULT_COUNTRY_MODULES_LIST, 86400))
|
||||
file_put_contents(_PS_ROOT_DIR_.Module::CACHE_FILE_DEFAULT_COUNTRY_MODULES_LIST, Tools::addonsRequest('native'));
|
||||
|
||||
$country_module_list_xml = simplexml_load_file(_PS_ROOT_DIR_.Module::CACHE_FILE_DEFAULT_COUNTRY_MODULES_LIST);
|
||||
$country_module_list = array();
|
||||
foreach ($country_module_list_xml->module as $k => $m)
|
||||
$country_module_list[] = (string)$m->name;
|
||||
$this->tab_modules_list['slider_list'] = array_intersect($this->tab_modules_list['slider_list'], $country_module_list);
|
||||
|
||||
if (is_array($this->tab_modules_list['slider_list']) && count($this->tab_modules_list['slider_list']))
|
||||
$this->toolbar_btn['modules-list'] = array(
|
||||
'href' => '#',
|
||||
|
||||
@@ -1726,7 +1726,15 @@ abstract class ModuleCore
|
||||
<need_instance>'.(int)$this->need_instance.'</need_instance>'.(isset($this->limited_countries) ? "\n\t".'<limited_countries>'.(count($this->limited_countries) == 1 ? $this->limited_countries[0] : '').'</limited_countries>' : '').'
|
||||
</module>';
|
||||
if (is_writable(_PS_MODULE_DIR_.$this->name.'/'))
|
||||
file_put_contents(_PS_MODULE_DIR_.$this->name.'/config.xml', $xml);
|
||||
{
|
||||
$file = _PS_MODULE_DIR_.$this->name.'/config.xml';
|
||||
if (!@file_put_contents($file, $xml))
|
||||
if (!is_writable($file))
|
||||
{
|
||||
@unlink($file);
|
||||
@file_put_contents($file, $xml);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -1260,40 +1260,40 @@ class WebserviceRequestCore
|
||||
if (!isset($this->urlFragments['display']))
|
||||
$this->fieldsToDisplay = 'full';
|
||||
|
||||
// Check if Object is accessible for this/those id_shop
|
||||
$assoc = Shop::getAssoTable($this->resourceConfiguration['retrieveData']['table']);
|
||||
if ($assoc !== false)
|
||||
{
|
||||
$check_shop_group = false;
|
||||
|
||||
$sql = 'SELECT 1
|
||||
FROM `'.bqSQL(_DB_PREFIX_.$this->resourceConfiguration['retrieveData']['table']);
|
||||
if ($assoc['type'] != 'fk_shop')
|
||||
$sql .= '_'.$assoc['type'];
|
||||
else
|
||||
{
|
||||
$def = ObjectModel::getDefinition($this->resourceConfiguration['retrieveData']['className']);
|
||||
if (isset($def['fields']) && isset($def['fields']['id_shop_group']))
|
||||
$check_shop_group = true;
|
||||
}
|
||||
$sql .= '`';
|
||||
|
||||
foreach (self::$shopIDs as $id_shop)
|
||||
$OR[] = ' (id_shop = '.(int)$id_shop.($check_shop_group ? ' OR (id_shop = 0 AND id_shop_group='.(int)Shop::getGroupFromShop((int)$id_shop).')' : '').') ';
|
||||
|
||||
$check = ' WHERE ('.implode('OR', $OR).') AND `'.bqSQL($this->resourceConfiguration['fields']['id']['sqlId']).'` = '.(int)$this->urlSegment[1];
|
||||
if (!Db::getInstance()->getValue($sql.$check))
|
||||
$this->setError(403, 'Bad id_shop : You are not allowed to access this '.$this->resourceConfiguration['retrieveData']['className'].' ('.(int)$this->urlSegment[1].')', 131);
|
||||
}
|
||||
|
||||
//get entity details
|
||||
$object = new $this->resourceConfiguration['retrieveData']['className']((int)$this->urlSegment[1]);
|
||||
if ($object->id)
|
||||
{
|
||||
$objects[] = $object;
|
||||
return $objects;
|
||||
// Check if Object is accessible for this/those id_shop
|
||||
$assoc = Shop::getAssoTable($this->resourceConfiguration['retrieveData']['table']);
|
||||
if ($assoc !== false)
|
||||
{
|
||||
$check_shop_group = false;
|
||||
|
||||
$sql = 'SELECT 1
|
||||
FROM `'.bqSQL(_DB_PREFIX_.$this->resourceConfiguration['retrieveData']['table']);
|
||||
if ($assoc['type'] != 'fk_shop')
|
||||
$sql .= '_'.$assoc['type'];
|
||||
else
|
||||
{
|
||||
$def = ObjectModel::getDefinition($this->resourceConfiguration['retrieveData']['className']);
|
||||
if (isset($def['fields']) && isset($def['fields']['id_shop_group']))
|
||||
$check_shop_group = true;
|
||||
}
|
||||
$sql .= '`';
|
||||
|
||||
foreach (self::$shopIDs as $id_shop)
|
||||
$OR[] = ' (id_shop = '.(int)$id_shop.($check_shop_group ? ' OR (id_shop = 0 AND id_shop_group='.(int)Shop::getGroupFromShop((int)$id_shop).')' : '').') ';
|
||||
|
||||
$check = ' WHERE ('.implode('OR', $OR).') AND `'.bqSQL($this->resourceConfiguration['fields']['id']['sqlId']).'` = '.(int)$this->urlSegment[1];
|
||||
if (!Db::getInstance()->getValue($sql.$check))
|
||||
$this->setError(404, 'This '.$this->resourceConfiguration['retrieveData']['className'].' ('.(int)$this->urlSegment[1].') does not exists on this shop', 131);
|
||||
else
|
||||
return $objects;
|
||||
}
|
||||
}
|
||||
elseif (!count($this->errors))
|
||||
if (!count($this->errors))
|
||||
{
|
||||
$this->objOutput->setStatus(404);
|
||||
$this->_outputEnabled = false;
|
||||
|
||||
@@ -256,7 +256,7 @@ class AdminManufacturersControllerCore extends AdminController
|
||||
'lang' => true,
|
||||
'cols' => 60,
|
||||
'rows' => 10,
|
||||
'class' => 'rte',
|
||||
'autoload_rte' => 'rte', //Enable TinyMCE editor for short description
|
||||
'hint' => $this->l('Invalid characters:').' <>;=#{}'
|
||||
),
|
||||
array(
|
||||
@@ -266,7 +266,7 @@ class AdminManufacturersControllerCore extends AdminController
|
||||
'lang' => true,
|
||||
'cols' => 60,
|
||||
'rows' => 10,
|
||||
'class' => 'rte',
|
||||
'autoload_rte' => 'rte', //Enable TinyMCE editor for description
|
||||
'hint' => $this->l('Invalid characters:').' <>;=#{}'
|
||||
),
|
||||
array(
|
||||
@@ -730,4 +730,4 @@ class AdminManufacturersControllerCore extends AdminController
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -302,14 +302,13 @@ class AdminModulesPositionsControllerCore extends AdminController
|
||||
|
||||
public function getLiveEditUrl($live_edit_params)
|
||||
{
|
||||
$lang = '';
|
||||
$lang = '';
|
||||
$admin_dir = dirname($_SERVER['PHP_SELF']);
|
||||
$admin_dir = substr($admin_dir, strrpos($admin_dir, '/') + 1);
|
||||
$dir = str_replace($admin_dir, '', dirname($_SERVER['SCRIPT_NAME']));
|
||||
if (Configuration::get('PS_REWRITING_SETTINGS') && count(Language::getLanguages(true)) > 1)
|
||||
$lang = Language::getIsoById($this->context->employee->id_lang).'/';
|
||||
$url = Tools::getCurrentUrlProtocolPrefix().Tools::getHttpHost().$dir.$lang.Dispatcher::getInstance()->createUrl('index', (int)$this->context->language->id, $live_edit_params);
|
||||
|
||||
return $url;
|
||||
}
|
||||
|
||||
|
||||
@@ -863,6 +863,12 @@ class AdminProductsControllerCore extends AdminController
|
||||
{
|
||||
$combination = new Combination((int)$id_product_attribute);
|
||||
$combination->setAttributes(Tools::getValue('attribute_combination_list'));
|
||||
|
||||
// images could be deleted before
|
||||
$id_images = Tools::getValue('id_image_attr');
|
||||
if (!empty($id_images))
|
||||
$combination->setImages($id_images);
|
||||
|
||||
$product->checkDefaultAttributes();
|
||||
if (Tools::getValue('attribute_default'))
|
||||
{
|
||||
|
||||
@@ -236,6 +236,34 @@ class AdminStatesControllerCore extends AdminController
|
||||
else
|
||||
parent::postProcess();
|
||||
}
|
||||
}
|
||||
|
||||
protected function displayAjaxStates()
|
||||
{
|
||||
if ($this->tabAccess['view'] === '1')
|
||||
{
|
||||
$states = Db::getInstance()->executeS('
|
||||
SELECT s.id_state, s.name
|
||||
FROM '._DB_PREFIX_.'state s
|
||||
LEFT JOIN '._DB_PREFIX_.'country c ON (s.`id_country` = c.`id_country`)
|
||||
WHERE s.id_country = '.(int)(Tools::getValue('id_country')).' AND s.active = 1 AND c.`contains_states` = 1
|
||||
ORDER BY s.`name` ASC');
|
||||
|
||||
if (is_array($states) AND !empty($states))
|
||||
{
|
||||
$list = '';
|
||||
if (Tools::getValue('no_empty') != true)
|
||||
{
|
||||
$empty_value = (Tools::isSubmit('empty_value')) ? Tools::getValue('empty_value') : '----------';
|
||||
$list = '<option value="0">'.Tools::htmlentitiesUTF8($empty_value).'</option>'."\n";
|
||||
}
|
||||
|
||||
foreach ($states AS $state)
|
||||
$list .= '<option value="'.(int)($state['id_state']).'"'.((isset($_GET['id_state']) AND $_GET['id_state'] == $state['id_state']) ? ' selected="selected"' : '').'>'.$state['name'].'</option>'."\n";
|
||||
}
|
||||
else
|
||||
$list = 'false';
|
||||
|
||||
die($list);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -94,7 +94,8 @@ class AdminSuppliersControllerCore extends AdminController
|
||||
'rows' => 10,
|
||||
'lang' => true,
|
||||
'hint' => $this->l('Invalid characters:').' <>;=#{}',
|
||||
'desc' => $this->l('Will appear in the supplier list')
|
||||
'desc' => $this->l('Will appear in the supplier list'),
|
||||
'autoload_rte' => 'rte' //Enable TinyMCE editor for short description
|
||||
),
|
||||
array(
|
||||
'type' => 'text',
|
||||
|
||||
@@ -519,35 +519,5 @@ class AdminTaxRulesGroupControllerCore extends AdminController
|
||||
die(Tools::jsonEncode($output));
|
||||
}
|
||||
}
|
||||
|
||||
protected function displayAjaxStates()
|
||||
{
|
||||
if ($this->tabAccess['view'] === '1')
|
||||
{
|
||||
$states = Db::getInstance()->executeS('
|
||||
SELECT s.id_state, s.name
|
||||
FROM '._DB_PREFIX_.'state s
|
||||
LEFT JOIN '._DB_PREFIX_.'country c ON (s.`id_country` = c.`id_country`)
|
||||
WHERE s.id_country = '.(int)(Tools::getValue('id_country')).' AND s.active = 1 AND c.`contains_states` = 1
|
||||
ORDER BY s.`name` ASC');
|
||||
|
||||
if (is_array($states) AND !empty($states))
|
||||
{
|
||||
$list = '';
|
||||
if (Tools::getValue('no_empty') != true)
|
||||
{
|
||||
$empty_value = (Tools::isSubmit('empty_value')) ? Tools::getValue('empty_value') : '----------';
|
||||
$list = '<option value="0">'.Tools::htmlentitiesUTF8($empty_value).'</option>'."\n";
|
||||
}
|
||||
|
||||
foreach ($states AS $state)
|
||||
$list .= '<option value="'.(int)($state['id_state']).'"'.((isset($_GET['id_state']) AND $_GET['id_state'] == $state['id_state']) ? ' selected="selected"' : '').'>'.$state['name'].'</option>'."\n";
|
||||
}
|
||||
else
|
||||
$list = 'false';
|
||||
|
||||
die($list);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -134,4 +134,12 @@ class ManufacturerControllerCore extends FrontController
|
||||
else
|
||||
$this->context->smarty->assign('nbManufacturers', 0);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get instance of current manufacturer
|
||||
*/
|
||||
public function getManufacturer()
|
||||
{
|
||||
return $this->manufacturer;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -689,7 +689,7 @@ Country</value>
|
||||
<value>7700</value>
|
||||
</configuration>
|
||||
<configuration id="PS_VERSION_DB" name="PS_VERSION_DB">
|
||||
<value>1.5.0.9</value>
|
||||
<value>1.5.5.0</value>
|
||||
</configuration>
|
||||
<configuration id="PS_BASE_DISTANCE_UNIT" name="PS_BASE_DISTANCE_UNIT">
|
||||
<value>m</value>
|
||||
@@ -701,7 +701,7 @@ Country</value>
|
||||
<value>localhost</value>
|
||||
</configuration>
|
||||
<configuration id="PS_INSTALL_VERSION" name="PS_INSTALL_VERSION">
|
||||
<value>1.5.0.9</value>
|
||||
<value>1.5.5.0</value>
|
||||
</configuration>
|
||||
<configuration id="PS_SHOP_NAME" name="PS_SHOP_NAME">
|
||||
<value>PrestaShop</value>
|
||||
|
||||
@@ -74,8 +74,8 @@
|
||||
<tab id="Search" name="Pesquisar"/>
|
||||
<tab id="Search_Engines" name="Ferramentas de Pesquisa"/>
|
||||
<tab id="SEO_URLs" name="SEO e URLs"/>
|
||||
<tab id="Shipping" name="Preferências"/>
|
||||
<tab id="Shipping_1" name="Envio"/>
|
||||
<tab id="Shipping" name="Envio"/>
|
||||
<tab id="Shipping_1" name="Preferências"/>
|
||||
<tab id="Shop_URLs" name="URL da loja"/>
|
||||
<tab id="Shopping_Carts" name="Carrinhos de Compras"/>
|
||||
<tab id="Shops" name="Lojas"/>
|
||||
|
||||
@@ -74,8 +74,8 @@
|
||||
<tab id="Search" name="Suche"/>
|
||||
<tab id="Search_Engines" name="Suchmaschinen"/>
|
||||
<tab id="SEO_URLs" name="SEO & URLs"/>
|
||||
<tab id="Shipping" name="Voreinstellungen"/>
|
||||
<tab id="Shipping_1" name="Versand"/>
|
||||
<tab id="Shipping" name="Versand"/>
|
||||
<tab id="Shipping_1" name="Voreinstellungen"/>
|
||||
<tab id="Shop_URLs" name="Shop-URLs"/>
|
||||
<tab id="Shopping_Carts" name="Warenkörbe"/>
|
||||
<tab id="Shops" name="Shops"/>
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
<tab id="Orders" name="Orders"/>
|
||||
<tab id="Customers" name="Customers"/>
|
||||
<tab id="Price_Rules" name="Price Rules"/>
|
||||
<tab id="Shipping" name="Preferences"/>
|
||||
<tab id="Shipping" name="Shipping"/>
|
||||
<tab id="Localization" name="Localization"/>
|
||||
<tab id="Modules" name="Modules"/>
|
||||
<tab id="Preferences" name="Preferences"/>
|
||||
@@ -48,7 +48,7 @@
|
||||
<tab id="Cart_Rules" name="Cart Rules"/>
|
||||
<tab id="Catalog_Price_Rules" name="Catalog Price Rules"/>
|
||||
<tab id="Marketing" name="Marketing"/>
|
||||
<tab id="Shipping_1" name="Shipping"/>
|
||||
<tab id="Shipping_1" name="Preferences"/>
|
||||
<tab id="Carriers" name="Carriers"/>
|
||||
<tab id="Localization_1" name="Localization"/>
|
||||
<tab id="Languages" name="Languages"/>
|
||||
|
||||
@@ -74,8 +74,8 @@
|
||||
<tab id="Search" name="Buscar"/>
|
||||
<tab id="Search_Engines" name="Buscador"/>
|
||||
<tab id="SEO_URLs" name="SEO y URLs"/>
|
||||
<tab id="Shipping" name="Preferencias"/>
|
||||
<tab id="Shipping_1" name="transporte"/>
|
||||
<tab id="Shipping" name="Transporte"/>
|
||||
<tab id="Shipping_1" name="Preferencias"/>
|
||||
<tab id="Shop_URLs" name="URL cortos"/>
|
||||
<tab id="Shopping_Carts" name="Cestas"/>
|
||||
<tab id="Shops" name="Tiendas"/>
|
||||
|
||||
@@ -74,8 +74,8 @@
|
||||
<tab id="Search" name="Recherche"/>
|
||||
<tab id="Search_Engines" name="Moteurs de recherche"/>
|
||||
<tab id="SEO_URLs" name="SEO & URLs"/>
|
||||
<tab id="Shipping" name="Préférences"/>
|
||||
<tab id="Shipping_1" name="Transport"/>
|
||||
<tab id="Shipping" name="Transport"/>
|
||||
<tab id="Shipping_1" name="Préférences"/>
|
||||
<tab id="Shop_URLs" name="URLs de boutique"/>
|
||||
<tab id="Shopping_Carts" name="Paniers"/>
|
||||
<tab id="Shops" name="Boutiques"/>
|
||||
|
||||
@@ -74,8 +74,8 @@
|
||||
<tab id="Search" name="Cerca"/>
|
||||
<tab id="Search_Engines" name="Motori di ricerca"/>
|
||||
<tab id="SEO_URLs" name="URL e SEO"/>
|
||||
<tab id="Shipping" name="Preferenze"/>
|
||||
<tab id="Shipping_1" name="Spedizione"/>
|
||||
<tab id="Shipping" name="Spedizione"/>
|
||||
<tab id="Shipping_1" name="Preferenze"/>
|
||||
<tab id="Shop_URLs" name="URLs negozi"/>
|
||||
<tab id="Shopping_Carts" name="Carrello"/>
|
||||
<tab id="Shops" name="Negozi associati"/>
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
<tab id="Orders" name="Orders"/>
|
||||
<tab id="Customers" name="Customers"/>
|
||||
<tab id="Price_Rules" name="Price Rules"/>
|
||||
<tab id="Shipping" name="Preferences"/>
|
||||
<tab id="Shipping" name="Shipping"/>
|
||||
<tab id="Localization" name="Localization"/>
|
||||
<tab id="Modules" name="Modules"/>
|
||||
<tab id="Preferences" name="Preferences"/>
|
||||
@@ -48,7 +48,7 @@
|
||||
<tab id="Cart_Rules" name="Cart Rules"/>
|
||||
<tab id="Catalog_Price_Rules" name="Catalog Price Rules"/>
|
||||
<tab id="Marketing" name="Marketing"/>
|
||||
<tab id="Shipping_1" name="Shipping"/>
|
||||
<tab id="Shipping_1" name="Preferences"/>
|
||||
<tab id="Carriers" name="Carriers"/>
|
||||
<tab id="Price_Ranges" name="Price Ranges"/>
|
||||
<tab id="Weight_Ranges" name="Weight Ranges"/>
|
||||
|
||||
@@ -74,8 +74,8 @@
|
||||
<tab id="Search" name="Wyszukaj"/>
|
||||
<tab id="Search_Engines" name="Wyszukiwarki"/>
|
||||
<tab id="SEO_URLs" name="Dane URL i SEO"/>
|
||||
<tab id="Shipping" name="Preferencje"/>
|
||||
<tab id="Shipping_1" name="Wysyłka"/>
|
||||
<tab id="Shipping" name="Wysyłka"/>
|
||||
<tab id="Shipping_1" name="Preferencje"/>
|
||||
<tab id="Shop_URLs" name="Adres URL sklepu"/>
|
||||
<tab id="Shopping_Carts" name="Koszyk zakupów"/>
|
||||
<tab id="Shops" name="Sklepy"/>
|
||||
|
||||
@@ -74,8 +74,8 @@
|
||||
<tab id="Search" name="Поиск"/>
|
||||
<tab id="Search_Engines" name="Поисковые с-мы"/>
|
||||
<tab id="SEO_URLs" name="SEO и URLs"/>
|
||||
<tab id="Shipping" name="Настройки"/>
|
||||
<tab id="Shipping_1" name="Доставка"/>
|
||||
<tab id="Shipping" name="Доставка"/>
|
||||
<tab id="Shipping_1" name="Настройки"/>
|
||||
<tab id="Shop_URLs" name="URL магазина"/>
|
||||
<tab id="Shopping_Carts" name="Корзины"/>
|
||||
<tab id="Shops" name="Магазины"/>
|
||||
|
||||
@@ -31,6 +31,6 @@ function block_category_1521()
|
||||
(`id_configuration` ,`id_shop_group` ,`id_shop` ,`name` ,`value` ,`date_add` ,`date_upd`)
|
||||
VALUES (NULL, NULL, NULL, \'BLOCK_CATEG_MAX_DEPTH\', 4, NOW(), NOW())');
|
||||
else if ($maxdepth = (int)Db::getInstance()->getValue('SELECT FROM `'._DB_PREFIX_.'configuration` WHERE `value` IS NOT NULL AND `value` <> 0'))
|
||||
Db::getInstance()->Execute('UPDATE `'._DB_PREFIX_.'configuration` SET `value` = '.($maxdepth + 1).' WHERE `name` LIKE\'BLOCK_CATEG_MAX_DEPTH\'');
|
||||
Db::getInstance()->Execute('UPDATE `'._DB_PREFIX_.'configuration` SET `value` = '.($maxdepth + 1).' WHERE `name` LIKE \'BLOCK_CATEG_MAX_DEPTH\'');
|
||||
|
||||
}
|
||||
@@ -27,5 +27,5 @@
|
||||
function fix_download_product_feature_active()
|
||||
{
|
||||
if (Db::getInstance()->getValue('SELECT COUNT(id_product_download) FROM `'._DB_PREFIX_.'product_download` WHERE `active` = 1 ;') > 0)
|
||||
Configuration::updateGlobaleValue('PS_VIRTUAL_PROD_FEATURE_ACTIVE');
|
||||
Db::getInstance()->execute('UPDATE `'._DB_PREFIX_.'configuration` SET `value` = 1 WHERE `name` LIKE \'PS_VIRTUAL_PROD_FEATURE_ACTIVE\'');
|
||||
}
|
||||
+3
-3
@@ -26,9 +26,9 @@
|
||||
function ajaxStates (id_state_selected)
|
||||
{
|
||||
$.ajax({
|
||||
url: "ajax.php",
|
||||
url: "index.php",
|
||||
cache: false,
|
||||
data: "ajaxStates=1&no_empty=1&id_country="+$('#id_country').val() + "&id_state=" + $('#id_state').val(),
|
||||
data: "token="+state_token+"&ajax=1&action=states&tab=AdminStates&no_empty=1&id_country="+$('#id_country').val() + "&id_state=" + $('#id_state').val(),
|
||||
success: function(html)
|
||||
{
|
||||
if (html == 'false')
|
||||
@@ -59,4 +59,4 @@ function ajaxStates (id_state_selected)
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -214,26 +214,46 @@ var ajaxCart = {
|
||||
$element = $('#bigpic');
|
||||
var $picture = $element.clone();
|
||||
var pictureOffsetOriginal = $element.offset();
|
||||
pictureOffsetOriginal.right = $(window).innerWidth() - pictureOffsetOriginal.left - $element.width();
|
||||
|
||||
if ($picture.size())
|
||||
$picture.css({'position': 'absolute', 'top': pictureOffsetOriginal.top, 'left': pictureOffsetOriginal.left});
|
||||
if ($picture.length)
|
||||
{
|
||||
$picture.css({
|
||||
position: 'absolute',
|
||||
top: pictureOffsetOriginal.top,
|
||||
right: pictureOffsetOriginal.right
|
||||
});
|
||||
}
|
||||
|
||||
var pictureOffset = $picture.offset();
|
||||
if ($('#cart_block')[0] && $('#cart_block').offset().top && $('#cart_block').offset().left)
|
||||
var cartBlockOffset = $('#cart_block').offset();
|
||||
else
|
||||
var cartBlockOffset = $('#shopping_cart').offset();
|
||||
var cartBlock = $('#cart_block');
|
||||
if (!$('#cart_block')[0] || !$('#cart_block').offset().top || !$('#cart_block').offset().left)
|
||||
cartBlock = $('#shopping_cart');
|
||||
var cartBlockOffset = cartBlock.offset();
|
||||
cartBlockOffset.right = $(window).innerWidth() - cartBlockOffset.left - cartBlock.width();
|
||||
|
||||
// Check if the block cart is activated for the animation
|
||||
if (cartBlockOffset != undefined && $picture.size())
|
||||
if (cartBlockOffset != undefined && $picture.length)
|
||||
{
|
||||
$picture.appendTo('body');
|
||||
$picture.css({ 'position': 'absolute', 'top': $picture.css('top'), 'left': $picture.css('left'), 'z-index': 4242 })
|
||||
.animate({ 'width': $element.attr('width')*0.66, 'height': $element.attr('height')*0.66, 'opacity': 0.2, 'top': cartBlockOffset.top + 30, 'left': cartBlockOffset.left + 15 }, 1000)
|
||||
.fadeOut(100, function() {
|
||||
ajaxCart.updateCartInformation(jsonData, addedFromProductPage);
|
||||
$(this).remove();
|
||||
});
|
||||
$picture
|
||||
.css({
|
||||
position: 'absolute',
|
||||
top: pictureOffsetOriginal.top,
|
||||
right: pictureOffsetOriginal.right,
|
||||
zIndex: 4242
|
||||
})
|
||||
.animate({
|
||||
width: $element.attr('width')*0.66,
|
||||
height: $element.attr('height')*0.66,
|
||||
opacity: 0.2,
|
||||
top: cartBlockOffset.top + 30,
|
||||
right: cartBlockOffset.right + 15
|
||||
}, 1000)
|
||||
.fadeOut(100, function() {
|
||||
ajaxCart.updateCartInformation(jsonData, addedFromProductPage);
|
||||
$(this).remove();
|
||||
});
|
||||
}
|
||||
else
|
||||
ajaxCart.updateCartInformation(jsonData, addedFromProductPage);
|
||||
|
||||
@@ -111,7 +111,10 @@ class BlockNewProducts extends Module
|
||||
{
|
||||
if (!$this->isCached('blocknewproducts.tpl', $this->getCacheId()))
|
||||
{
|
||||
if (!Configuration::get('PS_BLOCK_NEWPRODUCTS_DISPLAY') && !($newProducts = Product::getNewProducts((int)$params['cookie']->id_lang, 0, (int)Configuration::get('NEW_PRODUCTS_NBR'))))
|
||||
if (!Configuration::get('PS_BLOCK_NEWPRODUCTS_DISPLAY'))
|
||||
return;
|
||||
$newProducts = Product::getNewProducts((int) $params['cookie']->id_lang, 0, (int) Configuration::get('NEW_PRODUCTS_NBR'));
|
||||
if (!$newProducts)
|
||||
return;
|
||||
|
||||
$this->smarty->assign(array(
|
||||
@@ -151,4 +154,4 @@ class BlockNewProducts extends Module
|
||||
{
|
||||
$this->_clearCache('blocknewproducts.tpl');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -221,6 +221,8 @@ class Blocktopmenu extends Module
|
||||
|
||||
// BEGIN SUPPLIER
|
||||
$this->_html .= '<optgroup label="'.$this->l('Supplier').'">';
|
||||
// Option to show all Suppliers
|
||||
$this->_html .= '<option value="ALLSUP0">'.$this->l('All suppliers').'</option>';
|
||||
$suppliers = Supplier::getSuppliers(false, $id_lang);
|
||||
foreach ($suppliers as $supplier)
|
||||
$this->_html .= '<option value="SUP'.$supplier['id_supplier'].'">'.$spacer.$supplier['name'].'</option>';
|
||||
@@ -228,6 +230,8 @@ class Blocktopmenu extends Module
|
||||
|
||||
// BEGIN Manufacturer
|
||||
$this->_html .= '<optgroup label="'.$this->l('Manufacturer').'">';
|
||||
// Option to show all Manufacturers
|
||||
$this->_html .= '<option value="ALLMAN0">'.$this->l('All manufacturers').'</option>';
|
||||
$manufacturers = Manufacturer::getManufacturers(false, $id_lang);
|
||||
foreach ($manufacturers as $manufacturer)
|
||||
$this->_html .= '<option value="MAN'.$manufacturer['id_manufacturer'].'">'.$spacer.$manufacturer['name'].'</option>';
|
||||
@@ -472,12 +476,22 @@ class Blocktopmenu extends Module
|
||||
$this->_html .= '<option value="CMS_CAT'.$id.'">'.$category->name.'</option>'.PHP_EOL;
|
||||
break;
|
||||
|
||||
// Case to handle the option to show all Manufacturers
|
||||
case 'ALLMAN':
|
||||
$this->_html .= '<option value="ALLMAN0">'.$this->l('All manufacturers').'</option>'.PHP_EOL;
|
||||
break;
|
||||
|
||||
case 'MAN':
|
||||
$manufacturer = new Manufacturer((int)$id, (int)$id_lang);
|
||||
if (Validate::isLoadedObject($manufacturer))
|
||||
$this->_html .= '<option value="MAN'.$id.'">'.$manufacturer->name.'</option>'.PHP_EOL;
|
||||
break;
|
||||
|
||||
// Case to handle the option to show all Suppliers
|
||||
case 'ALLSUP':
|
||||
$this->_html .= '<option value="ALLSUP0">'.$this->l('All suppliers').'</option>'.PHP_EOL;
|
||||
break;
|
||||
|
||||
case 'SUP':
|
||||
$supplier = new Supplier((int)$id, (int)$id_lang);
|
||||
if (Validate::isLoadedObject($supplier))
|
||||
@@ -549,6 +563,16 @@ class Blocktopmenu extends Module
|
||||
}
|
||||
break;
|
||||
|
||||
// Case to handle the option to show all Manufacturers
|
||||
case 'ALLMAN':
|
||||
$link = new Link;
|
||||
$this->_menu .= '<li><a href="'.$link->getPageLink('manufacturer').'">'.$this->l('All manufacturers').'</a><ul>'.PHP_EOL;
|
||||
$manufacturers = Manufacturer::getManufacturers();
|
||||
foreach ($manufacturers as $key => $manufacturer)
|
||||
$this->_menu .= '<li><a href="'.$link->getManufacturerLink((int)$manufacturer['id_manufacturer'], $manufacturer['link_rewrite']).'">'.$manufacturer['name'].'</a></li>'.PHP_EOL;
|
||||
$this->_menu .= '</ul>';
|
||||
break;
|
||||
|
||||
case 'MAN':
|
||||
$selected = ($this->page_name == 'manufacturer' && (Tools::getValue('id_manufacturer') == $id)) ? ' class="sfHover"' : '';
|
||||
$manufacturer = new Manufacturer((int)$id, (int)$id_lang);
|
||||
@@ -563,6 +587,16 @@ class Blocktopmenu extends Module
|
||||
}
|
||||
break;
|
||||
|
||||
// Case to handle the option to show all Suppliers
|
||||
case 'ALLSUP':
|
||||
$link = new Link;
|
||||
$this->_menu .= '<li><a href="'.$link->getPageLink('supplier').'">'.$this->l('All suppliers').'</a><ul>'.PHP_EOL;
|
||||
$suppliers = Supplier::getSuppliers();
|
||||
foreach ($suppliers as $key => $supplier)
|
||||
$this->_menu .= '<li><a href="'.$link->getSupplierLink((int)$supplier['id_supplier'], $supplier['link_rewrite']).'">'.$supplier['name'].'</a></li>'.PHP_EOL;
|
||||
$this->_menu .= '</ul>';
|
||||
break;
|
||||
|
||||
case 'SUP':
|
||||
$selected = ($this->page_name == 'supplier' && (Tools::getValue('id_supplier') == $id)) ? ' class="sfHover"' : '';
|
||||
$supplier = new Supplier((int)$id, (int)$id_lang);
|
||||
@@ -896,4 +930,4 @@ class Blocktopmenu extends Module
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -434,7 +434,7 @@ class shopimporter extends ImportModule
|
||||
if ((sizeof($rules['requiredLang']) || sizeof($rules['sizeLang']) || sizeof($rules['validateLang']) || Tools::isSubmit('syncLang') || Tools::isSubmit('syncCurrency')))
|
||||
{
|
||||
$moduleName = Tools::getValue('moduleName');
|
||||
if (Validate::isModuleName($moduleName) && Validate::file_exists('../../modules/'.$moduleName.'/'.$moduleName.'.php'))
|
||||
if (Validate::isModuleName($moduleName) && file_exists('../../modules/'.$moduleName.'/'.$moduleName.'.php'))
|
||||
{
|
||||
require_once('../../modules/'.$moduleName.'/'.$moduleName.'.php');
|
||||
$importModule = new $moduleName();
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user