// REVERT MERGE
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@7761 b9a71923-0436-4b27-9f14-aed3839534dd
@@ -1,91 +0,0 @@
|
|||||||
<?php
|
|
||||||
/*
|
|
||||||
* 2007-2011 PrestaShop
|
|
||||||
*
|
|
||||||
* NOTICE OF LICENSE
|
|
||||||
*
|
|
||||||
* This source file is subject to the Open Software License (OSL 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/osl-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-2011 PrestaShop SA
|
|
||||||
* @version Release: $Revision$
|
|
||||||
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
|
||||||
* International Registered Trademark & Property of PrestaShop SA
|
|
||||||
*/
|
|
||||||
|
|
||||||
define('_PS_ADMIN_DIR_', getcwd());
|
|
||||||
define('PS_ADMIN_DIR', _PS_ADMIN_DIR_); // Retro-compatibility
|
|
||||||
|
|
||||||
include(_PS_ADMIN_DIR_.'/../config/config.inc.php');
|
|
||||||
include(_PS_ADMIN_DIR_.'/functions.php');
|
|
||||||
|
|
||||||
|
|
||||||
include(_PS_ADMIN_DIR_.'/init.php');
|
|
||||||
|
|
||||||
if (empty($tab) and !sizeof($_POST))
|
|
||||||
{
|
|
||||||
$tab = 'AdminHome';
|
|
||||||
$_POST['tab'] = 'AdminHome';
|
|
||||||
$_POST['token'] = Tools::getAdminTokenLite($tab);
|
|
||||||
}
|
|
||||||
if ($id_tab = checkingTab($tab))
|
|
||||||
{
|
|
||||||
$isoUser = Language::getIsoById(intval($cookie->id_lang));
|
|
||||||
|
|
||||||
|
|
||||||
if (Validate::isLoadedObject($adminObj))
|
|
||||||
{
|
|
||||||
$adminObj->ajax = true;
|
|
||||||
if ($adminObj->checkToken())
|
|
||||||
{
|
|
||||||
// the differences with index.php is here
|
|
||||||
|
|
||||||
$adminObj->ajaxPreProcess();
|
|
||||||
$action = Tools::getValue('action');
|
|
||||||
|
|
||||||
// no need to use displayConf() here
|
|
||||||
|
|
||||||
if (!empty($action) AND method_exists($adminObj, 'ajaxProcess'.Tools::toCamelCase($action)) )
|
|
||||||
$adminObj->{'ajaxProcess'.Tools::toCamelCase($action)}();
|
|
||||||
else
|
|
||||||
$adminObj->ajaxProcess();
|
|
||||||
|
|
||||||
// @TODO We should use a displayAjaxError
|
|
||||||
$adminObj->displayErrors();
|
|
||||||
if (!empty($action) AND method_exists($adminObj, 'displayAjax'.Tools::toCamelCase($action)) )
|
|
||||||
$adminObj->{'displayAjax'.$action}();
|
|
||||||
else
|
|
||||||
$adminObj->displayAjax();
|
|
||||||
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
// If this is an XSS attempt, then we should only display a simple, secure page
|
|
||||||
ob_clean();
|
|
||||||
|
|
||||||
// ${1} in the replacement string of the regexp is required, because the token may begin with a number and mix up with it (e.g. $17)
|
|
||||||
$url = preg_replace('/([&?]token=)[^&]*(&.*)?$/', '${1}'.$adminObj->token.'$2', $_SERVER['REQUEST_URI']);
|
|
||||||
if (false === strpos($url, '?token=') AND false === strpos($url, '&token='))
|
|
||||||
$url .= '&token='.$adminObj->token;
|
|
||||||
|
|
||||||
// we can display the correct url
|
|
||||||
// die(Tools::jsonEncode(array(translate('Invalid security token'),$url)));
|
|
||||||
die(Tools::jsonEncode(translate('Invalid security token')));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -688,7 +688,7 @@ if (Tools::isSubmit('getAdminHomeElement'))
|
|||||||
|
|
||||||
if (Tools::isSubmit('getChildrenCategories') && Tools::getValue('id_category_parent'))
|
if (Tools::isSubmit('getChildrenCategories') && Tools::getValue('id_category_parent'))
|
||||||
{
|
{
|
||||||
$children_categories = Category::getChildrenWithNbSelectedSubCat(Tools::getValue('id_category_parent'), Tools::getValue('selectedCat', array()), $cookie->id_lang);
|
$children_categories = Category::getChildrenWithNbSelectedSubCatForProduct(Tools::getValue('id_category_parent'), Tools::getValue('id_product', 0), Tools::getValue('post_selected_cat', null), $cookie->id_lang);
|
||||||
die(Tools::jsonEncode($children_categories));
|
die(Tools::jsonEncode($children_categories));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -207,9 +207,10 @@ function createDir($path, $rights)
|
|||||||
|
|
||||||
function checkPSVersion()
|
function checkPSVersion()
|
||||||
{
|
{
|
||||||
$upgrader = new Upgrader();
|
libxml_set_streams_context(stream_context_create(array('http' => array('timeout' => 3))));
|
||||||
|
if ($feed = @simplexml_load_file('http://www.prestashop.com/xml/version.xml') AND _PS_VERSION_ < $feed->version->num)
|
||||||
return $upgrader->checkPSVersion();
|
return array('name' => $feed->version->name, 'link' => $feed->download->link);
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
function translate($string)
|
function translate($string)
|
||||||
|
|||||||
@@ -52,7 +52,7 @@ if (empty($tab) and !sizeof($_POST))
|
|||||||
? '<a href="?tab='.$item['class_name'].'&token='.Tools::getAdminToken($item['class_name'].intval($item['id_tab']).intval($cookie->id_employee)).'">'
|
? '<a href="?tab='.$item['class_name'].'&token='.Tools::getAdminToken($item['class_name'].intval($item['id_tab']).intval($cookie->id_employee)).'">'
|
||||||
: '').'
|
: '').'
|
||||||
'.$item['name'].((sizeof($tabs) - 1 > $key) ? '</a>' : '');
|
'.$item['name'].((sizeof($tabs) - 1 > $key) ? '</a>' : '');
|
||||||
// @TODO : a way to desactivate this feature
|
|
||||||
echo'<script type="text/javascript">
|
echo'<script type="text/javascript">
|
||||||
|
|
||||||
$(function() {
|
$(function() {
|
||||||
|
|||||||
@@ -59,6 +59,7 @@ class AdminAliases extends AdminTab
|
|||||||
|
|
||||||
if (!sizeof($this->_errors))
|
if (!sizeof($this->_errors))
|
||||||
{
|
{
|
||||||
|
Alias::deleteAliases($search);
|
||||||
foreach ($aliases AS $alias)
|
foreach ($aliases AS $alias)
|
||||||
{
|
{
|
||||||
$obj = new Alias(NULL, trim($alias), trim($search));
|
$obj = new Alias(NULL, trim($alias), trim($search));
|
||||||
|
|||||||
@@ -241,7 +241,7 @@ class AdminBackup extends AdminTab
|
|||||||
if (preg_match('/^([\d]+-[a-z\d]+)\.sql(\.gz|\.bz2)?$/', $file, $matches) == 0)
|
if (preg_match('/^([\d]+-[a-z\d]+)\.sql(\.gz|\.bz2)?$/', $file, $matches) == 0)
|
||||||
continue;
|
continue;
|
||||||
$timestamp = (int)($matches[1]);
|
$timestamp = (int)($matches[1]);
|
||||||
$date = date('Y-m-d H:i:s', $timestamp);
|
$date = date('Y-m-d h:i:s', $timestamp);
|
||||||
$age = time() - $timestamp;
|
$age = time() - $timestamp;
|
||||||
if ($age < 3600)
|
if ($age < 3600)
|
||||||
$age = '< 1 '.$this->l('hour');
|
$age = '< 1 '.$this->l('hour');
|
||||||
|
|||||||
@@ -100,6 +100,36 @@ class AdminCategories extends AdminTab
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
/* Change object statuts (active, inactive) */
|
||||||
|
elseif (isset($_GET['status']) AND Tools::getValue($this->identifier))
|
||||||
|
{
|
||||||
|
if ($this->tabAccess['edit'] === '1')
|
||||||
|
{
|
||||||
|
if (Validate::isLoadedObject($object = $this->loadObject()))
|
||||||
|
{
|
||||||
|
if ($object->toggleStatus())
|
||||||
|
{
|
||||||
|
$target = '';
|
||||||
|
if (($id_category = (int)(Tools::getValue('id_category'))) AND Tools::getValue('id_product'))
|
||||||
|
$target = '&id_category='.(int)($id_category);
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$referrer = Tools::secureReferrer($_SERVER['HTTP_REFERER']);
|
||||||
|
if (preg_match('/id_category=(\d+)/', $referrer, $matches))
|
||||||
|
$target = '&id_category='.(int)($matches[1]);
|
||||||
|
}
|
||||||
|
Module::hookExec('categoryUpdate');
|
||||||
|
Tools::redirectAdmin(self::$currentIndex.'&conf=5'.$target.'&token='.Tools::getValue('token'));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
$this->_errors[] = Tools::displayError('An error occurred while updating status.');
|
||||||
|
}
|
||||||
|
else
|
||||||
|
$this->_errors[] = Tools::displayError('An error occurred while updating status for object.').' <b>'.$this->table.'</b> '.Tools::displayError('(cannot load object)');
|
||||||
|
}
|
||||||
|
else
|
||||||
|
$this->_errors[] = Tools::displayError('You do not have permission to edit here.');
|
||||||
|
}
|
||||||
/* Delete object */
|
/* Delete object */
|
||||||
elseif (isset($_GET['delete'.$this->table]))
|
elseif (isset($_GET['delete'.$this->table]))
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -62,12 +62,6 @@ class AdminGenerator extends AdminTab
|
|||||||
<p>'.$this->l('Enable only if your server allows URL rewriting.').'</p>
|
<p>'.$this->l('Enable only if your server allows URL rewriting.').'</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="clear"> </div>
|
<div class="clear"> </div>
|
||||||
<label for="imageCacheControl">'.$this->l('Disable apache multiviews').'</label>
|
|
||||||
<div class="margin-form">
|
|
||||||
<input type="checkbox" name="PS_HTACCESS_DISABLE_MULTIVIEWS" id="PS_HTACCESS_CACHE_CONTROL" value="1" '.(Configuration::get('PS_HTACCESS_DISABLE_MULTIVIEWS') == 1 ? 'checked="checked"' : '').' />
|
|
||||||
<p>'.$this->l('Enable this option only if you have problems with some pages URL rewriting.').'</p>
|
|
||||||
</div>
|
|
||||||
<div class="clear"> </div>
|
|
||||||
<label for="specific_configuration">'.$this->l('Specific configuration').'</label>
|
<label for="specific_configuration">'.$this->l('Specific configuration').'</label>
|
||||||
<div class="margin-form">
|
<div class="margin-form">
|
||||||
<textarea rows="10" class="width3" id="specific_configuration" name="ps_htaccess_specific">'.Configuration::get('PS_HTACCESS_SPECIFIC').'</textarea>
|
<textarea rows="10" class="width3" id="specific_configuration" name="ps_htaccess_specific">'.Configuration::get('PS_HTACCESS_SPECIFIC').'</textarea>
|
||||||
@@ -118,9 +112,8 @@ class AdminGenerator extends AdminTab
|
|||||||
{
|
{
|
||||||
Configuration::updateValue('PS_HTACCESS_CACHE_CONTROL', (int)Tools::getValue('PS_HTACCESS_CACHE_CONTROL'));
|
Configuration::updateValue('PS_HTACCESS_CACHE_CONTROL', (int)Tools::getValue('PS_HTACCESS_CACHE_CONTROL'));
|
||||||
Configuration::updateValue('PS_REWRITING_SETTINGS', (int)Tools::getValue('PS_REWRITING_SETTINGS'));
|
Configuration::updateValue('PS_REWRITING_SETTINGS', (int)Tools::getValue('PS_REWRITING_SETTINGS'));
|
||||||
Configuration::updateValue('PS_HTACCESS_DISABLE_MULTIVIEWS', (int)Tools::getValue('PS_HTACCESS_DISABLE_MULTIVIEWS'));
|
|
||||||
Configuration::updateValue('PS_HTACCESS_SPECIFIC', Tools::getValue('ps_htaccess_specific'), true);
|
Configuration::updateValue('PS_HTACCESS_SPECIFIC', Tools::getValue('ps_htaccess_specific'), true);
|
||||||
if (Tools::generateHtaccess($this->_htFile, Configuration::get('PS_REWRITING_SETTINGS'), Configuration::get('PS_HTACCESS_CACHE_CONTROL'), Tools::getValue('ps_htaccess_specific'), Tools::getValue('PS_HTACCESS_DISABLE_MULTIVIEWS')))
|
if (Tools::generateHtaccess($this->_htFile, Configuration::get('PS_REWRITING_SETTINGS'), Configuration::get('PS_HTACCESS_CACHE_CONTROL'), Tools::getValue('ps_htaccess_specific')))
|
||||||
Tools::redirectAdmin(self::$currentIndex.'&conf=4&token='.$this->token);
|
Tools::redirectAdmin(self::$currentIndex.'&conf=4&token='.$this->token);
|
||||||
$this->_errors[] = $this->l('Cannot write into file:').' <b>'.$this->_htFile.'</b><br />'.$this->l('Please check write permissions.');
|
$this->_errors[] = $this->l('Cannot write into file:').' <b>'.$this->_htFile.'</b><br />'.$this->l('Please check write permissions.');
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -159,13 +159,9 @@ class AdminHome extends AdminTab
|
|||||||
<h1>'.$this->l('Dashboard').'</h1>
|
<h1>'.$this->l('Dashboard').'</h1>
|
||||||
<hr style="background-color: #812143;color: #812143;" />
|
<hr style="background-color: #812143;color: #812143;" />
|
||||||
<br />';
|
<br />';
|
||||||
if (@ini_get('allow_url_fopen'))
|
if (@ini_get('allow_url_fopen') AND $update = checkPSVersion())
|
||||||
{
|
|
||||||
$upgrade = new Upgrader();
|
|
||||||
if($update = $upgrade->checkPSVersion())
|
|
||||||
echo '<div class="warning warn" style="margin-bottom:30px;"><h3>'.$this->l('New PrestaShop version available').' : <a style="text-decoration: underline;" href="'.$update['link'].'" target="_blank">'.$this->l('Download').' '.$update['name'].'</a> !</h3></div>';
|
echo '<div class="warning warn" style="margin-bottom:30px;"><h3>'.$this->l('New PrestaShop version available').' : <a style="text-decoration: underline;" href="'.$update['link'].'" target="_blank">'.$this->l('Download').' '.$update['name'].'</a> !</h3></div>';
|
||||||
}
|
elseif (!@ini_get('allow_url_fopen'))
|
||||||
else
|
|
||||||
{
|
{
|
||||||
echo '<p>'.$this->l('Update notification unavailable').'</p>';
|
echo '<p>'.$this->l('Update notification unavailable').'</p>';
|
||||||
echo '<p> </p>';
|
echo '<p> </p>';
|
||||||
|
|||||||
@@ -425,58 +425,11 @@ class AdminImages extends AdminTab
|
|||||||
*/
|
*/
|
||||||
private function _moveImagesToNewFileSystem()
|
private function _moveImagesToNewFileSystem()
|
||||||
{
|
{
|
||||||
if (!Image::testFileSystem())
|
ini_set('max_execution_time', $this->max_execution_time); // ini_set may be disabled, we need the real value
|
||||||
$this->_errors[] = Tools::displayError('Error: your server configuration is not compatible with the new image system. No images were moved');
|
$this->max_execution_time = (int)ini_get('max_execution_time');
|
||||||
else
|
$result = Image::moveToNewFileSystem($this->max_execution_time);
|
||||||
{
|
if ($result === 'timeout')
|
||||||
ini_set('max_execution_time', $this->max_execution_time); // ini_set may be disabled, we need the real value
|
$this->_errors[] = Tools::displayError('Not all images have been moved, server timed out before finishing. Click on \"Move images\" again to resume moving images');
|
||||||
$this->max_execution_time = (int)ini_get('max_execution_time');
|
Tools::redirectAdmin(self::$currentIndex.'&conf=25'.'&token='.$this->token);
|
||||||
$result = Image::moveToNewFileSystem($this->max_execution_time);
|
|
||||||
if ($result === 'timeout')
|
|
||||||
$this->_errors[] = Tools::displayError('Not all images have been moved, server timed out before finishing. Click on \"Move images\" again to resume moving images');
|
|
||||||
elseif ($result === false)
|
|
||||||
$this->_errors[] = Tools::displayError('Error: some or all images could not be moved.');
|
|
||||||
}
|
|
||||||
return (sizeof($this->_errors) > 0 ? false : true);
|
|
||||||
}
|
}
|
||||||
/**
|
|
||||||
* Display the block for moving images
|
|
||||||
*/
|
|
||||||
public function displayImagePreferences()
|
|
||||||
{
|
|
||||||
global $currentIndex;
|
|
||||||
echo '<br />
|
|
||||||
<form action="'.$currentIndex.'&token='.$this->token.'" method="post">
|
|
||||||
<fieldset class="width4">
|
|
||||||
<legend><img src="../img/admin/picture.gif" /> '.$this->l('Images').'</legend>'.'
|
|
||||||
<p>'.$this->l('JPEG images have a small file size and standard quality. PNG images have a bigger file size, a higher quality and support transparency. Note that in all cases the image files will have the .jpg extension.').'
|
|
||||||
<br /><br />'.$this->l('WARNING: This feature may not be compatible with your theme or with some modules. In particular, PNG mode is not compatible with the Watermark module. If you encounter any issue, turn it off by selecting "Use JPEG".').'</p>
|
|
||||||
<br />
|
|
||||||
<label>'.$this->l('Image quality').' </label>
|
|
||||||
<div class="margin-form">
|
|
||||||
<input type="radio" value="jpg" name="PS_IMAGE_QUALITY" id="PS_IMAGE_QUALITY_0" '.(Configuration::get('PS_IMAGE_QUALITY') == 'jpg' ? 'checked="checked"' : '').' />
|
|
||||||
<label class="t" for="PS_IMAGE_QUALITY_0">'.$this->l('Use JPEG').'</label>
|
|
||||||
<br />
|
|
||||||
<input type="radio" value="png" name="PS_IMAGE_QUALITY" id="PS_IMAGE_QUALITY_1" '.(Configuration::get('PS_IMAGE_QUALITY') == 'png' ? 'checked="checked"' : '').' />
|
|
||||||
<label class="t" for="PS_IMAGE_QUALITY_1">'.$this->l('Use PNG only if the base image is in PNG format').'</label>
|
|
||||||
<br />
|
|
||||||
<input type="radio" value="png_all" name="PS_IMAGE_QUALITY" id="PS_IMAGE_QUALITY_2" '.(Configuration::get('PS_IMAGE_QUALITY') == 'png_all' ? 'checked="checked"' : '').' />
|
|
||||||
<label class="t" for="PS_IMAGE_QUALITY_2">'.$this->l('Use PNG for all images').'</label>
|
|
||||||
</div>
|
|
||||||
<br />
|
|
||||||
<label for="PS_JPEG_QUALITY">'.$this->l('JPEG quality').'</label>
|
|
||||||
<div class="margin-form">
|
|
||||||
<input type="text" name="PS_JPEG_QUALITY" id="PS_JPEG_QUALITY" value="'.(int)Configuration::get('PS_JPEG_QUALITY').'" size="3" />
|
|
||||||
<p>'.$this->l('Ranges from 0 (worst quality, smallest file) to 100 (best quality, biggest file)').'</p>
|
|
||||||
</div>
|
|
||||||
<label for="PS_PNG_QUALITY">'.$this->l('PNG quality').'</label>
|
|
||||||
<div class="margin-form">
|
|
||||||
<input type="text" name="PS_PNG_QUALITY" id="PS_PNG_QUALITY" value="'.(int)Configuration::get('PS_PNG_QUALITY').'" size="3" />
|
|
||||||
<p>'.$this->l('Ranges from 9 (worst quality, smallest file) to 0 (best quality, biggest file)').'</p>
|
|
||||||
</div>
|
|
||||||
<div class="margin-form">
|
|
||||||
<input type="submit" value="'.$this->l(' Save ').'" name="submitImagePreferences" class="button" />
|
|
||||||
</div>
|
|
||||||
</fieldset>
|
|
||||||
</form>';
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -183,7 +183,7 @@ class AdminPayment extends AdminTab
|
|||||||
if ($nameId == 'country' && isset($module->limited_countries) &&
|
if ($nameId == 'country' && isset($module->limited_countries) &&
|
||||||
count($module->limited_countries))
|
count($module->limited_countries))
|
||||||
{
|
{
|
||||||
if (in_array(strtoupper($item['iso_code']), array_map('strtoupper', $module->limited_countries)))
|
if (in_array($item['iso_code'], $module->limited_countries))
|
||||||
echo '<input type="checkbox" name="'.$module->name.'_'.
|
echo '<input type="checkbox" name="'.$module->name.'_'.
|
||||||
$nameId.'[]" value="'.$item['id_'.$nameId].'"'.
|
$nameId.'[]" value="'.$item['id_'.$nameId].'"'.
|
||||||
(in_array($item['id_'.$nameId.''], $value) ?
|
(in_array($item['id_'.$nameId.''], $value) ?
|
||||||
|
|||||||
@@ -171,7 +171,15 @@ class AdminPreferences extends AdminTab
|
|||||||
{
|
{
|
||||||
$context = Context::getContext();
|
$context = Context::getContext();
|
||||||
$languages = Language::getLanguages(false);
|
$languages = Language::getLanguages(false);
|
||||||
Tools::clearCache($context->smarty);
|
if (!Configuration::get('PS_FORCE_SMARTY_2'))
|
||||||
|
{
|
||||||
|
$files = scandir(_PS_THEME_DIR_);
|
||||||
|
foreach ($files AS $file)
|
||||||
|
if (!preg_match('/^\..*/', $file))
|
||||||
|
$context->smarty->clearCache($file);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
$context->smarty->clear_all_cache();
|
||||||
|
|
||||||
/* Check required fields */
|
/* Check required fields */
|
||||||
foreach ($fields AS $field => $values)
|
foreach ($fields AS $field => $values)
|
||||||
|
|||||||
@@ -248,7 +248,7 @@ class AdminProducts extends AdminTab
|
|||||||
$attachment->file = $uniqid;
|
$attachment->file = $uniqid;
|
||||||
$attachment->mime = $_FILES['attachment_file']['type'];
|
$attachment->mime = $_FILES['attachment_file']['type'];
|
||||||
$attachment->file_name = pSQL($_FILES['attachment_file']['name']);
|
$attachment->file_name = pSQL($_FILES['attachment_file']['name']);
|
||||||
if (empty($attachment->mime) OR Tools::strlen($attachment->mime) > 128)
|
if (empty($attachment->mime) OR Tools::strlen($attachment->mime) > 64)
|
||||||
$this->_errors[] = Tools::displayError('Invalid file extension');
|
$this->_errors[] = Tools::displayError('Invalid file extension');
|
||||||
if (!Validate::isGenericName($attachment->file_name))
|
if (!Validate::isGenericName($attachment->file_name))
|
||||||
$this->_errors[] = Tools::displayError('Invalid file name');
|
$this->_errors[] = Tools::displayError('Invalid file name');
|
||||||
@@ -2709,48 +2709,8 @@ class AdminProducts extends AdminTab
|
|||||||
<br /><input type="radio" name="out_of_stock" id="out_of_stock_3" value="2" '.($this->getFieldValue($obj, 'out_of_stock') == 2 ? 'checked="checked"' : '').'/> <label for="out_of_stock_3" class="t" id="label_out_of_stock_3">'.$this->l('Default:').' <i>'.$this->l(((int)(Configuration::get('PS_ORDER_OUT_OF_STOCK')) ? 'Allow orders' : 'Deny orders')).'</i> ('.$this->l('as set in').' <a href="index.php?tab=AdminPPreferences&token='.Tools::getAdminToken('AdminPPreferences'.(int)(Tab::getIdFromClassName('AdminPPreferences')).(int)$context->employee->id).'" onclick="return confirm(\''.$this->l('Are you sure you want to delete entered product information?', __CLASS__, true, false).'\');">'.$this->l('Preferences').'</a>)</label>
|
<br /><input type="radio" name="out_of_stock" id="out_of_stock_3" value="2" '.($this->getFieldValue($obj, 'out_of_stock') == 2 ? 'checked="checked"' : '').'/> <label for="out_of_stock_3" class="t" id="label_out_of_stock_3">'.$this->l('Default:').' <i>'.$this->l(((int)(Configuration::get('PS_ORDER_OUT_OF_STOCK')) ? 'Allow orders' : 'Deny orders')).'</i> ('.$this->l('as set in').' <a href="index.php?tab=AdminPPreferences&token='.Tools::getAdminToken('AdminPPreferences'.(int)(Tab::getIdFromClassName('AdminPPreferences')).(int)$context->employee->id).'" onclick="return confirm(\''.$this->l('Are you sure you want to delete entered product information?', __CLASS__, true, false).'\');">'.$this->l('Preferences').'</a>)</label>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr><td colspan="2" style="padding-bottom:5px;"><hr style="width:100%;" /></td></tr>
|
||||||
<td colspan="2" style="padding-bottom:5px;">
|
<tr id="tr_categories"></tr>
|
||||||
<hr style="width:100%;" />
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="col-left"><label for="id_category_default" class="t">'.$this->l('Default category:').'</label></td>
|
|
||||||
<td>
|
|
||||||
<div id="no_default_category" style="color: red;font-weight: bold;display: none;">'.$this->l('Please check a category in order to select the default category.').'</div>
|
|
||||||
<script>var post_selected_cat;</script>';
|
|
||||||
if (Tools::isSubmit('categoryBox'))
|
|
||||||
{
|
|
||||||
$postCat = Tools::getValue('categoryBox');
|
|
||||||
$selectedCat = Category::getSimpleCategories($this->_defaultFormLanguage, false, true, 'AND c.`id_category` IN ('.(empty($postCat) ? '1' : implode(',', $postCat)).')');
|
|
||||||
echo '<script>post_selected_cat = \''.implode(',', $postCat).'\';</script>';
|
|
||||||
}
|
|
||||||
if ($obj->id)
|
|
||||||
$selectedCat = Product::getProductCategoriesFull($obj->id, $this->_defaultFormLanguage);
|
|
||||||
else if(!Tools::isSubmit('categoryBox'))
|
|
||||||
$selectedCat[] = array('id_category' => 1, 'name' => $this->l('Home'));
|
|
||||||
echo '<select id="id_category_default" name="id_category_default">';
|
|
||||||
|
|
||||||
foreach($selectedCat AS $cat)
|
|
||||||
echo '<option value="'.$cat['id_category'].'" '.($obj->id_category_default == $cat['id_category'] ? 'selected' : '').'>'.$cat['name'].'</option>';
|
|
||||||
echo '</select>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr id="tr_categories">
|
|
||||||
<td colspan="2">
|
|
||||||
';
|
|
||||||
// Translations are not automatic for the moment ;)
|
|
||||||
$trads = array(
|
|
||||||
'Home' => $this->l('Home'),
|
|
||||||
'selected' => $this->l('selected'),
|
|
||||||
'Collapse All' => $this->l('Collapse All'),
|
|
||||||
'Expand All' => $this->l('Expand All'),
|
|
||||||
'Check All' => $this->l('Check All'),
|
|
||||||
'Uncheck All' => $this->l('Uncheck All')
|
|
||||||
);
|
|
||||||
echo Helper::renderAdminCategorieTree($trads, $selectedCat).'
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr><td colspan="2" style="padding-bottom:5px;"><hr style="width:100%;" /></td></tr>
|
<tr><td colspan="2" style="padding-bottom:5px;"><hr style="width:100%;" /></td></tr>
|
||||||
<tr><td colspan="2">
|
<tr><td colspan="2">
|
||||||
<span onclick="$(\'#seo\').slideToggle();" style="cursor: pointer"><img src="../img/admin/arrow.gif" alt="'.$this->l('SEO').'" title="'.$this->l('SEO').'" style="float:left; margin-right:5px;"/>'.$this->l('Click here to improve product\'s rank in search engines (SEO)').'</span><br />
|
<span onclick="$(\'#seo\').slideToggle();" style="cursor: pointer"><img src="../img/admin/arrow.gif" alt="'.$this->l('SEO').'" title="'.$this->l('SEO').'" style="float:left; margin-right:5px;"/>'.$this->l('Click here to improve product\'s rank in search engines (SEO)').'</span><br />
|
||||||
@@ -2759,7 +2719,7 @@ class AdminProducts extends AdminTab
|
|||||||
<tr>
|
<tr>
|
||||||
<td class="col-left">'.$this->l('Meta title:').'</td>
|
<td class="col-left">'.$this->l('Meta title:').'</td>
|
||||||
<td class="translatable">';
|
<td class="translatable">';
|
||||||
foreach ($this->_languages AS $language)
|
foreach ($this->_languages as $language)
|
||||||
echo ' <div class="lang_'.$language['id_lang'].'" style="display: '.($language['id_lang'] == $this->_defaultFormLanguage ? 'block' : 'none').'; float: left;">
|
echo ' <div class="lang_'.$language['id_lang'].'" style="display: '.($language['id_lang'] == $this->_defaultFormLanguage ? 'block' : 'none').'; float: left;">
|
||||||
<input size="55" type="text" id="meta_title_'.$language['id_lang'].'" name="meta_title_'.$language['id_lang'].'"
|
<input size="55" type="text" id="meta_title_'.$language['id_lang'].'" name="meta_title_'.$language['id_lang'].'"
|
||||||
value="'.htmlentities($this->getFieldValue($obj, 'meta_title', $language['id_lang']), ENT_COMPAT, 'UTF-8').'" />
|
value="'.htmlentities($this->getFieldValue($obj, 'meta_title', $language['id_lang']), ENT_COMPAT, 'UTF-8').'" />
|
||||||
@@ -2934,10 +2894,18 @@ class AdminProducts extends AdminTab
|
|||||||
<script type="text/javascript" src="'.__PS_BASE_URI__.'js/tinymce.inc.js"></script>
|
<script type="text/javascript" src="'.__PS_BASE_URI__.'js/tinymce.inc.js"></script>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
toggleVirtualProduct(getE(\'is_virtual_good\'));
|
toggleVirtualProduct(getE(\'is_virtual_good\'));
|
||||||
unitPriceWithTax(\'unit\');
|
unitPriceWithTax(\'unit\');';
|
||||||
</script>';
|
|
||||||
$categoryBox = Tools::getValue('categoryBox', array());
|
$categoryBox = Tools::getValue('categoryBox', array());
|
||||||
|
echo '
|
||||||
|
$(function() {
|
||||||
|
$.ajax({
|
||||||
|
type: \'POST\',
|
||||||
|
url: \'ajax_category_list.php\',
|
||||||
|
data: \''.(sizeof($categoryBox) > 0 ? 'categoryBox='.serialize($categoryBox).'&' : '').'id_product='.$obj->id.'&id_category_default='.($this->getFieldValue($obj, 'id_category_default') ? $this->getFieldValue($obj, 'id_category_default') : Tools::getValue('id_category', 1)).'&id_category='.(int)(Tools::getValue('id_category')).'&token='.$this->token.'\',
|
||||||
|
async : true,
|
||||||
|
success: function(msg) { $(\'#tr_categories\').replaceWith(msg); }
|
||||||
|
});
|
||||||
|
});</script>';
|
||||||
}
|
}
|
||||||
|
|
||||||
function displayFormImages($obj, $token = NULL)
|
function displayFormImages($obj, $token = NULL)
|
||||||
|
|||||||
@@ -112,11 +112,6 @@ class AdminStores extends AdminTab
|
|||||||
if ((int)($country->contains_states) AND !$id_state)
|
if ((int)($country->contains_states) AND !$id_state)
|
||||||
$this->_errors[] = Tools::displayError('An address located in a country containing states must have a state selected.');
|
$this->_errors[] = Tools::displayError('An address located in a country containing states must have a state selected.');
|
||||||
|
|
||||||
$latitude = (int)(Tools::getValue('latitude'));
|
|
||||||
$longitude = (int)(Tools::getValue('longitude'));
|
|
||||||
if(empty($latitude) OR empty($longitude))
|
|
||||||
$this->_errors[] = Tools::displayError('Latitude and longitude are required.');
|
|
||||||
|
|
||||||
/* Check zip code */
|
/* Check zip code */
|
||||||
if ($country->need_zip_code)
|
if ($country->need_zip_code)
|
||||||
{
|
{
|
||||||
@@ -232,7 +227,6 @@ class AdminStores extends AdminTab
|
|||||||
<label>'.$this->l('Latitude / Longitude:').'</label>
|
<label>'.$this->l('Latitude / Longitude:').'</label>
|
||||||
<div class="margin-form">
|
<div class="margin-form">
|
||||||
<input type="text" size="8" maxlength="10" name="latitude" value="'.htmlentities($this->getFieldValue($obj, 'latitude'), ENT_COMPAT, 'UTF-8').'" onKeyUp="javascript:this.value = this.value.replace(/,/g, \'.\');" /> / <input type="text" size="8" maxlength="10" name="longitude" value="'.htmlentities($this->getFieldValue($obj, 'longitude'), ENT_COMPAT, 'UTF-8').'" onKeyUp="javascript:this.value = this.value.replace(/,/g, \'.\');" />
|
<input type="text" size="8" maxlength="10" name="latitude" value="'.htmlentities($this->getFieldValue($obj, 'latitude'), ENT_COMPAT, 'UTF-8').'" onKeyUp="javascript:this.value = this.value.replace(/,/g, \'.\');" /> / <input type="text" size="8" maxlength="10" name="longitude" value="'.htmlentities($this->getFieldValue($obj, 'longitude'), ENT_COMPAT, 'UTF-8').'" onKeyUp="javascript:this.value = this.value.replace(/,/g, \'.\');" />
|
||||||
<sup>*</sup>
|
|
||||||
<p class="clear">'.$this->l('Store coords, eg. 45.265469 / -47.226478').'</p>
|
<p class="clear">'.$this->l('Store coords, eg. 45.265469 / -47.226478').'</p>
|
||||||
</div>
|
</div>
|
||||||
<label>'.$this->l('Phone:').'</label>
|
<label>'.$this->l('Phone:').'</label>
|
||||||
|
|||||||
@@ -266,7 +266,6 @@ class AdminThemes extends AdminPreferences
|
|||||||
Configuration::updateValue('PS_IMG_UPDATE_TIME', time());
|
Configuration::updateValue('PS_IMG_UPDATE_TIME', time());
|
||||||
if (!empty($val) AND !$this->_isThemeCompatible($val)) // don't submit if errors
|
if (!empty($val) AND !$this->_isThemeCompatible($val)) // don't submit if errors
|
||||||
unset($_POST['submitThemes'.$this->table]);
|
unset($_POST['submitThemes'.$this->table]);
|
||||||
Tools::clearCache($smarty);
|
|
||||||
parent::postProcess();
|
parent::postProcess();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -157,7 +157,7 @@ class AdminTranslations extends AdminTab
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ($bool)
|
if ($bool)
|
||||||
Tools::redirectAdmin(self::$currentIndex.'&conf=14&token='.$this->token);
|
Tools::redirectLink(self::$currentIndex.'&conf=14&token='.$this->token);
|
||||||
$this->_errors[] = $this->l('a part of the data has been copied but some language files could not be found or copied');
|
$this->_errors[] = $this->l('a part of the data has been copied but some language files could not be found or copied');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -37,6 +37,7 @@ class AdminWebservice extends AdminTab
|
|||||||
$this->lang = false;
|
$this->lang = false;
|
||||||
$this->edit = true;
|
$this->edit = true;
|
||||||
$this->delete = true;
|
$this->delete = true;
|
||||||
|
|
||||||
$this->id_lang_default = Configuration::get('PS_LANG_DEFAULT');
|
$this->id_lang_default = Configuration::get('PS_LANG_DEFAULT');
|
||||||
|
|
||||||
$this->fieldsDisplay = array(
|
$this->fieldsDisplay = array(
|
||||||
@@ -92,13 +93,6 @@ class AdminWebservice extends AdminTab
|
|||||||
$warnings[] = $this->l('If possible, it is preferable to use SSL (https) for webservice calls, as it avoids the security issues of type "man in the middle".');
|
$warnings[] = $this->l('If possible, it is preferable to use SSL (https) for webservice calls, as it avoids the security issues of type "man in the middle".');
|
||||||
|
|
||||||
$this->displayWarning($warnings);
|
$this->displayWarning($warnings);
|
||||||
|
|
||||||
foreach ($this->_list as $k => $item)
|
|
||||||
if ($item['is_module'] && $item['class_name'] && $item['module_name'] &&
|
|
||||||
($instance = Module::getInstanceByName($item['module_name'])) &&
|
|
||||||
!$instance->useNormalPermissionBehaviour())
|
|
||||||
unset($this->_list[$k]);
|
|
||||||
parent::displayList();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function displayForm($isMainTab = true)
|
public function displayForm($isMainTab = true)
|
||||||
@@ -227,8 +221,6 @@ echo '
|
|||||||
{
|
{
|
||||||
if (Tools::getValue('key') && strlen(Tools::getValue('key')) < 32)
|
if (Tools::getValue('key') && strlen(Tools::getValue('key')) < 32)
|
||||||
$this->_errors[] = Tools::displayError($this->l('Key length must be 32 character long'));
|
$this->_errors[] = Tools::displayError($this->l('Key length must be 32 character long'));
|
||||||
if (WebserviceKey::keyExists(Tools::getValue('key')) && !Tools::getValue('id_webservice_account'))
|
|
||||||
$this->_errors[] = Tools::displayError($this->l('Key already exists'));
|
|
||||||
return parent::postProcess();
|
return parent::postProcess();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -59,10 +59,3 @@ a.action_module{color: #488C40;text-decoration: underline;}
|
|||||||
a.header_module_toggle{font-weight: bold;color: #812143;display:block;}
|
a.header_module_toggle{font-weight: bold;color: #812143;display:block;}
|
||||||
a.module_toggle_all{color:#FFF;text-decoration:none;display:inherit;}
|
a.module_toggle_all{color:#FFF;text-decoration:none;display:inherit;}
|
||||||
.nbr_module{float:right;margin-right:10px;font-style:italic;font-size:12px;color: #812143;}
|
.nbr_module{float:right;margin-right:10px;font-style:italic;font-size:12px;color: #812143;}
|
||||||
|
|
||||||
.autoupgradeSteps div { line-height: 30px; }
|
|
||||||
.upgradestep { margin-right: 5px;padding-left: 10px; padding-right: 5px;}
|
|
||||||
#upgradeNow.stepok, .autoupgradeSteps a.stepok { background-image: url("../img/admin/enabled.gif");background-position: left center;background-repeat: no-repeat;padding-left: 15px;}
|
|
||||||
#upgradeNow {-moz-border-bottom-colors: none;-moz-border-image: none;-moz-border-left-colors: none;-moz-border-right-colors: none;-moz-border-top-colors: none;border-color: #FFF6D3 #DFD5AF #DFD5AF #FFF6D3;border-right: 1px solid #DFD5AF;border-style: solid;border-width: 1px;color: #268CCD;font-size: medium;padding: 5px;}
|
|
||||||
.button-autoupgrade {-moz-border-bottom-colors: none;-moz-border-image: none;-moz-border-left-colors: none;-moz-border-right-colors: none;-moz-border-top-colors: none;border-color: #FFF6D3 #DFD5AF #DFD5AF #FFF6D3;border-right: 1px solid #DFD5AF;border-style: solid;border-width: 1px;color: #268CCD;font-size: medium;padding: 5px;}
|
|
||||||
.processing {overflow: auto;}
|
|
||||||
|
|||||||
@@ -53,11 +53,4 @@ select {border: 1px solid #E0D0B1}
|
|||||||
a.action_module{color: #268CCD;text-decoration: underline;}
|
a.action_module{color: #268CCD;text-decoration: underline;}
|
||||||
a.header_module_toggle{font-weight: bold;color: #268CCD;display:block;}
|
a.header_module_toggle{font-weight: bold;color: #268CCD;display:block;}
|
||||||
a.module_toggle_all{color: #268CCD;}
|
a.module_toggle_all{color: #268CCD;}
|
||||||
.nbr_module{float:right;margin-right:10px;font-style:italic;font-size:12px;color: #268CCD;}
|
.nbr_module{float:right;margin-right:10px;font-style:italic;font-size:12px;color: #268CCD;}
|
||||||
|
|
||||||
.autoupgradeSteps div { line-height: 30px; }
|
|
||||||
.upgradestep { margin-right: 5px;padding-left: 10px; padding-right: 5px;}
|
|
||||||
#upgradeNow.stepok, .autoupgradeSteps a.stepok { background-image: url("../img/admin/enabled.gif");background-position: left center;background-repeat: no-repeat;padding-left: 15px;}
|
|
||||||
#upgradeNow {-moz-border-bottom-colors: none;-moz-border-image: none;-moz-border-left-colors: none;-moz-border-right-colors: none;-moz-border-top-colors: none;border-color: #FFF6D3 #DFD5AF #DFD5AF #FFF6D3;border-right: 1px solid #DFD5AF;border-style: solid;border-width: 1px;color: #268CCD;font-size: medium;padding: 5px;}
|
|
||||||
.button-autoupgrade {-moz-border-bottom-colors: none;-moz-border-image: none;-moz-border-left-colors: none;-moz-border-right-colors: none;-moz-border-top-colors: none;border-color: #FFF6D3 #DFD5AF #DFD5AF #FFF6D3;border-right: 1px solid #DFD5AF;border-style: solid;border-width: 1px;color: #268CCD;font-size: medium;padding: 5px;}
|
|
||||||
.processing {overflow: auto;}
|
|
||||||
@@ -57,9 +57,3 @@ a.header_module_toggle{font-weight: bold;color: #268CCD;display:block;}
|
|||||||
a.module_toggle_all{color: #268CCD;}
|
a.module_toggle_all{color: #268CCD;}
|
||||||
.nbr_module{float:right;margin-right:10px;font-style:italic;font-size:12px;color: #268CCD;}
|
.nbr_module{float:right;margin-right:10px;font-style:italic;font-size:12px;color: #268CCD;}
|
||||||
|
|
||||||
.autoupgradeSteps div { line-height: 30px; }
|
|
||||||
.upgradestep { margin-right: 5px;padding-left: 10px; padding-right: 5px;}
|
|
||||||
#upgradeNow.stepok, .autoupgradeSteps a.stepok { background-image: url("../img/admin/enabled.gif");background-position: left center;background-repeat: no-repeat;padding-left: 15px;}
|
|
||||||
#upgradeNow {-moz-border-bottom-colors: none;-moz-border-image: none;-moz-border-left-colors: none;-moz-border-right-colors: none;-moz-border-top-colors: none;border-color: #FFF6D3 #DFD5AF #DFD5AF #FFF6D3;border-right: 1px solid #DFD5AF;border-style: solid;border-width: 1px;color: #268CCD;font-size: medium;padding: 5px;}
|
|
||||||
.button-autoupgrade {-moz-border-bottom-colors: none;-moz-border-image: none;-moz-border-left-colors: none;-moz-border-right-colors: none;-moz-border-top-colors: none;border-color: #FFF6D3 #DFD5AF #DFD5AF #FFF6D3;border-right: 1px solid #DFD5AF;border-style: solid;border-width: 1px;color: #268CCD;font-size: medium;padding: 5px;}
|
|
||||||
.processing {overflow: auto;}
|
|
||||||
|
|||||||
@@ -159,8 +159,6 @@ abstract class AdminTabCore
|
|||||||
protected $_includeVars = false;
|
protected $_includeVars = false;
|
||||||
protected $_includeContainer = true;
|
protected $_includeContainer = true;
|
||||||
|
|
||||||
public $ajax = false;
|
|
||||||
|
|
||||||
public static $tabParenting = array(
|
public static $tabParenting = array(
|
||||||
'AdminProducts' => 'AdminCatalog',
|
'AdminProducts' => 'AdminCatalog',
|
||||||
'AdminCategories' => 'AdminCatalog',
|
'AdminCategories' => 'AdminCatalog',
|
||||||
@@ -235,14 +233,6 @@ abstract class AdminTabCore
|
|||||||
return str_replace('"', '"', ($addslashes ? addslashes($str) : stripslashes($str)));
|
return str_replace('"', '"', ($addslashes ? addslashes($str) : stripslashes($str)));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* ajaxDisplay is the default ajax return sytem
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public function displayAjax()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
/**
|
/**
|
||||||
* Manage page display (form, list...)
|
* Manage page display (form, list...)
|
||||||
*/
|
*/
|
||||||
@@ -516,24 +506,6 @@ abstract class AdminTabCore
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* ajaxPreProcess is a method called in ajax-tab.php before displayConf().
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public function ajaxPreProcess()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* ajaxProcess is the default handle method for request with ajax-tab.php
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public function ajaxProcess()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Manage page processing
|
* Manage page processing
|
||||||
*/
|
*/
|
||||||
@@ -1135,9 +1107,9 @@ abstract class AdminTabCore
|
|||||||
public function displayConf()
|
public function displayConf()
|
||||||
{
|
{
|
||||||
if ($conf = Tools::getValue('conf'))
|
if ($conf = Tools::getValue('conf'))
|
||||||
echo '
|
echo '<div class="conf">
|
||||||
<div class="conf">
|
<img src="../img/admin/ok2.png" />
|
||||||
<img src="../img/admin/ok2.png" alt="" /> '.$this->_conf[(int)($conf)].'
|
'.$this->_conf[(int)($conf)].'
|
||||||
</div>';
|
</div>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -70,7 +70,7 @@ class AliasCore extends ObjectModel
|
|||||||
FROM `'._DB_PREFIX_.'alias`
|
FROM `'._DB_PREFIX_.'alias`
|
||||||
WHERE `search` LIKE \''.pSQL($search).'\'');
|
WHERE `search` LIKE \''.pSQL($search).'\'');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getAliases()
|
public function getAliases()
|
||||||
{
|
{
|
||||||
$aliases = Db::getInstance()->ExecuteS('
|
$aliases = Db::getInstance()->ExecuteS('
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ class AttachmentCore extends ObjectModel
|
|||||||
public $position;
|
public $position;
|
||||||
|
|
||||||
protected $fieldsRequired = array('file', 'mime');
|
protected $fieldsRequired = array('file', 'mime');
|
||||||
protected $fieldsSize = array('file' => 40, 'mime' => 128, 'file_name' => 128);
|
protected $fieldsSize = array('file' => 40, 'mime' => 64, 'file_name' => 128);
|
||||||
protected $fieldsValidate = array('file' => 'isGenericName', 'mime' => 'isCleanHtml', 'file_name' => 'isGenericName');
|
protected $fieldsValidate = array('file' => 'isGenericName', 'mime' => 'isCleanHtml', 'file_name' => 'isGenericName');
|
||||||
|
|
||||||
protected $fieldsRequiredLang = array('name');
|
protected $fieldsRequiredLang = array('name');
|
||||||
|
|||||||
@@ -1232,10 +1232,7 @@ class CartCore extends ObjectModel
|
|||||||
{
|
{
|
||||||
$moduleName = $carrier->external_module_name;
|
$moduleName = $carrier->external_module_name;
|
||||||
$module = Module::getInstanceByName($moduleName);
|
$module = Module::getInstanceByName($moduleName);
|
||||||
|
if (key_exists('id_carrier', $module))
|
||||||
if (Validate::isLoadedObject($module))
|
|
||||||
{
|
|
||||||
if (array_key_exists('id_carrier', $module))
|
|
||||||
$module->id_carrier = $carrier->id;
|
$module->id_carrier = $carrier->id;
|
||||||
if($carrier->need_range)
|
if($carrier->need_range)
|
||||||
$shipping_cost = $module->getOrderShippingCost($this, $shipping_cost);
|
$shipping_cost = $module->getOrderShippingCost($this, $shipping_cost);
|
||||||
@@ -1246,9 +1243,6 @@ class CartCore extends ObjectModel
|
|||||||
if ($shipping_cost === false)
|
if ($shipping_cost === false)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
else
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Apply tax
|
// Apply tax
|
||||||
if (isset($carrierTax))
|
if (isset($carrierTax))
|
||||||
@@ -1333,7 +1327,7 @@ class CartCore extends ObjectModel
|
|||||||
|
|
||||||
$groups = Customer::getGroupsStatic($this->id_customer);
|
$groups = Customer::getGroupsStatic($this->id_customer);
|
||||||
|
|
||||||
if (($discountObj->id_customer OR $discountObj->id_group) AND ((($this->id_customer != $discountObj->id_customer) OR ($this->id_customer == 0)) AND !in_array($discountObj->id_group, $groups)))
|
if (($discountObj->id_customer OR $discountObj->id_group) AND ($this->id_customer != $discountObj->id_customer AND !in_array($discountObj->id_group, $groups)))
|
||||||
{
|
{
|
||||||
if (!$customer->isLogged())
|
if (!$customer->isLogged())
|
||||||
return Tools::displayError('You cannot use this voucher.').' - '.Tools::displayError('Please log in.');
|
return Tools::displayError('You cannot use this voucher.').' - '.Tools::displayError('Please log in.');
|
||||||
@@ -1705,8 +1699,6 @@ class CartCore extends ObjectModel
|
|||||||
{
|
{
|
||||||
$carrier = new Carrier((int)$id_carrier, Configuration::get('PS_LANG_DEFAULT'));
|
$carrier = new Carrier((int)$id_carrier, Configuration::get('PS_LANG_DEFAULT'));
|
||||||
$shippingMethod = $carrier->getShippingMethod();
|
$shippingMethod = $carrier->getShippingMethod();
|
||||||
if (!$carrier->range_behavior)
|
|
||||||
return true;
|
|
||||||
|
|
||||||
if ($shippingMethod == Carrier::SHIPPING_METHOD_FREE)
|
if ($shippingMethod == Carrier::SHIPPING_METHOD_FREE)
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
@@ -179,16 +179,6 @@ class CategoryCore extends ObjectModel
|
|||||||
return $ret;
|
return $ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @see ObjectModel::toggleStatus()
|
|
||||||
*/
|
|
||||||
public function toggleStatus()
|
|
||||||
{
|
|
||||||
$result = parent::toggleStatus();
|
|
||||||
Module::hookExec('categoryUpdate');
|
|
||||||
return $result;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Recursive scan of subcategories
|
* Recursive scan of subcategories
|
||||||
*
|
*
|
||||||
@@ -604,19 +594,37 @@ class CategoryCore extends ObjectModel
|
|||||||
* @param int $id_lang
|
* @param int $id_lang
|
||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
public static function getChildrenWithNbSelectedSubCat($id_parent, $selectedCat, $id_lang)
|
public static function getChildrenWithNbSelectedSubCatForProduct($id_parent, $id_product = 0, $ids_categories = null, $id_lang)
|
||||||
{
|
{
|
||||||
|
$categories_product_str = '';
|
||||||
|
if ($id_product)
|
||||||
|
{
|
||||||
|
$categories_product = Db::getInstance()->ExecuteS('
|
||||||
|
SELECT `id_category`
|
||||||
|
FROM `'._DB_PREFIX_.'category_product`
|
||||||
|
WHERE `id_product` = '.(int)$id_product);
|
||||||
|
if (sizeof($categories_product))
|
||||||
|
foreach ($categories_product as $category_product)
|
||||||
|
$categories_product_str .= $category_product['id_category'].',';
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$categories_product = array();
|
||||||
|
$categories_product_str = $ids_categories;
|
||||||
|
}
|
||||||
|
$categories_product_str = rtrim($categories_product_str, ',');
|
||||||
|
|
||||||
return Db::getInstance(_PS_USE_SQL_SLAVE_)->ExecuteS('
|
return Db::getInstance(_PS_USE_SQL_SLAVE_)->ExecuteS('
|
||||||
SELECT c.`id_category`, c.`level_depth`, cl.`name`, IF((
|
SELECT c.`id_category`, cl.`name`, IF((
|
||||||
SELECT COUNT(*)
|
SELECT COUNT(*)
|
||||||
FROM `'._DB_PREFIX_.'category` c2
|
FROM `'._DB_PREFIX_.'category` c2
|
||||||
WHERE c2.`id_parent` = c.`id_category`
|
WHERE c2.`id_parent` = c.`id_category`
|
||||||
) > 0, 1, 0) AS has_children, '.($selectedCat ? '(
|
) > 0, 1, 0) AS has_children, '.($categories_product_str ? '(
|
||||||
SELECT count(c3.`id_category`)
|
SELECT count(c3.`id_category`)
|
||||||
FROM `'._DB_PREFIX_.'category` c3
|
FROM `'._DB_PREFIX_.'category` c3
|
||||||
WHERE c3.`nleft` > c.`nleft`
|
WHERE c3.`nleft` > c.`nleft`
|
||||||
AND c3.`nright` < c.`nright`
|
AND c3.`nright` < c.`nright`
|
||||||
AND c3.`id_category` IN ('.$selectedCat.')
|
AND c3.`id_category` IN ('.$categories_product_str.')
|
||||||
)' : '0').' AS nbSelectedSubCat
|
)' : '0').' AS nbSelectedSubCat
|
||||||
FROM `'._DB_PREFIX_.'category` c
|
FROM `'._DB_PREFIX_.'category` c
|
||||||
LEFT JOIN `'._DB_PREFIX_.'category_lang` cl ON c.`id_category` = cl.`id_category`
|
LEFT JOIN `'._DB_PREFIX_.'category_lang` cl ON c.`id_category` = cl.`id_category`
|
||||||
|
|||||||
@@ -1,198 +0,0 @@
|
|||||||
<?php
|
|
||||||
/*
|
|
||||||
* 2007-2011 PrestaShop
|
|
||||||
*
|
|
||||||
* NOTICE OF LICENSE
|
|
||||||
*
|
|
||||||
* This source file is subject to the Open Software License (OSL 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/osl-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-2011 PrestaShop SA
|
|
||||||
* @version Release: $Revision$
|
|
||||||
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
|
||||||
* International Registered Trademark & Property of PrestaShop SA
|
|
||||||
*/
|
|
||||||
|
|
||||||
class CompareProduct extends ObjectModel
|
|
||||||
{
|
|
||||||
public $id;
|
|
||||||
|
|
||||||
public $id_product;
|
|
||||||
|
|
||||||
public $id_guest;
|
|
||||||
|
|
||||||
public $id_customer;
|
|
||||||
|
|
||||||
public $date_add;
|
|
||||||
|
|
||||||
public $date_upd;
|
|
||||||
|
|
||||||
protected $fieldRequired = array(
|
|
||||||
'id_product',
|
|
||||||
'id_guest',
|
|
||||||
'id_customer');
|
|
||||||
|
|
||||||
protected $fieldsValidate = array(
|
|
||||||
'id_product' => 'isUnsignedInt',
|
|
||||||
'id_guest' => 'isUnsignedInt',
|
|
||||||
'id_customer' => 'isUnsignedInt'
|
|
||||||
);
|
|
||||||
|
|
||||||
protected $table = 'compare_product';
|
|
||||||
|
|
||||||
protected $identifier = 'id_compare_product';
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Get all compare products of the guest
|
|
||||||
* @param int $id_guest
|
|
||||||
* @return array
|
|
||||||
*/
|
|
||||||
public static function getGuestCompareProducts($id_guest)
|
|
||||||
{
|
|
||||||
$results = Db::getInstance()->ExecuteS('
|
|
||||||
SELECT DISTINCT `id_product`
|
|
||||||
FROM `'._DB_PREFIX_.'compare_product`
|
|
||||||
WHERE `id_guest` = '.(int)($id_guest));
|
|
||||||
|
|
||||||
$compareProducts = null;
|
|
||||||
|
|
||||||
foreach($results as $result)
|
|
||||||
$compareProducts[] = $result['id_product'];
|
|
||||||
|
|
||||||
return $compareProducts;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Add a compare product for the guest
|
|
||||||
* @param int $id_guest, int $id_product
|
|
||||||
* @return boolean
|
|
||||||
*/
|
|
||||||
public static function addGuestCompareProduct($id_guest, $id_product)
|
|
||||||
{
|
|
||||||
return Db::getInstance()->Execute('
|
|
||||||
INSERT INTO `'._DB_PREFIX_.'compare_product` (`id_product`, `id_guest`, `date_add`, `date_upd`)
|
|
||||||
VALUES ('.(int)($id_product).', '.(int)($id_guest).', NOW(), NOW())
|
|
||||||
');
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Remove a compare product for the guest
|
|
||||||
* @param int $id_guest, int $id_product
|
|
||||||
* @return boolean
|
|
||||||
*/
|
|
||||||
public static function removeGuestCompareProduct($id_guest, $id_product)
|
|
||||||
{
|
|
||||||
return Db::getInstance()->Execute('DELETE FROM `'._DB_PREFIX_.'compare_product` WHERE `id_guest` = '.(int)($id_guest).' AND `id_product` = '.(int)($id_product));
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Get the number of compare products of the guest
|
|
||||||
* @param int $id_guest
|
|
||||||
* @return int
|
|
||||||
*/
|
|
||||||
public static function getGuestNumberProducts($id_guest)
|
|
||||||
{
|
|
||||||
return (int)(Db::getInstance()->getValue('
|
|
||||||
SELECT count(`id_compare_product`)
|
|
||||||
FROM `'._DB_PREFIX_.'compare_product`
|
|
||||||
WHERE `id_guest` = '.(int)($id_guest)));;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Get all comapare products of the customer
|
|
||||||
* @param int $id_customer
|
|
||||||
* @return array
|
|
||||||
*/
|
|
||||||
public static function getCustomerCompareProducts($id_customer)
|
|
||||||
{
|
|
||||||
$results = Db::getInstance()->ExecuteS('
|
|
||||||
SELECT DISTINCT `id_product`
|
|
||||||
FROM `'._DB_PREFIX_.'compare_product`
|
|
||||||
WHERE `id_customer` = '.(int)($id_customer));
|
|
||||||
|
|
||||||
$compareProducts = null;
|
|
||||||
|
|
||||||
foreach($results as $result)
|
|
||||||
$compareProducts[] = $result['id_product'];
|
|
||||||
|
|
||||||
return $compareProducts;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Add a compare product for the customer
|
|
||||||
* @param int $id_customer, int $id_product
|
|
||||||
* @return boolean
|
|
||||||
*/
|
|
||||||
public static function addCustomerCompareProduct($id_customer, $id_product)
|
|
||||||
{
|
|
||||||
return Db::getInstance()->Execute('INSERT INTO `'._DB_PREFIX_.'compare_product` (`id_product`, `id_customer`, `date_add`, `date_upd`) VALUES ('.(int)($id_product).', '.(int)($id_customer).', NOW(), NOW())');
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Remove a compare product for the customer
|
|
||||||
* @param int $id_customer, int $id_product
|
|
||||||
* @return boolean
|
|
||||||
*/
|
|
||||||
public static function removeCustomerCompareProduct($id_customer, $id_product)
|
|
||||||
{
|
|
||||||
return Db::getInstance()->Execute('DELETE FROM `'._DB_PREFIX_.'compare_product` WHERE `id_customer` = '.(int)($id_customer).' AND `id_product` = '.(int)($id_product));
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Get the number of compare products of the customer
|
|
||||||
* @param int $id_customer
|
|
||||||
* @return int
|
|
||||||
*/
|
|
||||||
public static function getCustomerNumberProducts($id_customer)
|
|
||||||
{
|
|
||||||
return (int)(Db::getInstance()->getValue('
|
|
||||||
SELECT count(`id_compare_product`)
|
|
||||||
FROM `'._DB_PREFIX_.'compare_product`
|
|
||||||
WHERE `id_customer` = '.(int)($id_customer)));
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Clean entries which are older than the period
|
|
||||||
* @param string $period
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public static function cleanCompareProducts($period = 'week')
|
|
||||||
{
|
|
||||||
if ($period === 'week')
|
|
||||||
$interval = '1 WEEK';
|
|
||||||
elseif ($period === 'month')
|
|
||||||
$interval = '1 MONTH';
|
|
||||||
elseif ($period === 'year')
|
|
||||||
$interval = '1 YEAR';
|
|
||||||
else
|
|
||||||
return;
|
|
||||||
|
|
||||||
if ($interval != null)
|
|
||||||
{
|
|
||||||
Db::getInstance()->Execute('
|
|
||||||
DELETE FROM `'._DB_PREFIX_.'compare_product`
|
|
||||||
WHERE date_upd < DATE_SUB(NOW(), INTERVAL '.pSQL($interval).')');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,118 +0,0 @@
|
|||||||
<?php
|
|
||||||
/*
|
|
||||||
* 2007-2011 PrestaShop
|
|
||||||
*
|
|
||||||
* NOTICE OF LICENSE
|
|
||||||
*
|
|
||||||
* This source file is subject to the Open Software License (OSL 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/osl-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-2011 PrestaShop SA
|
|
||||||
* @version Release: $Revision$
|
|
||||||
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
|
||||||
* International Registered Trademark & Property of PrestaShop SA
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
|
||||||
* TODO : move HTML code in template files
|
|
||||||
*/
|
|
||||||
|
|
||||||
class HelperCore
|
|
||||||
{
|
|
||||||
public static $translationsKeysForAdminCategorieTree = array(
|
|
||||||
'Home', 'selected', 'selecteds', 'Collapse All', 'Expand All', 'Check All', 'Uncheck All'
|
|
||||||
);
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @param type $trads values of translations keys
|
|
||||||
* For the moment, translation are not automatic
|
|
||||||
* @param type $selected_cat array of selected categories
|
|
||||||
* Format
|
|
||||||
* Array
|
|
||||||
(
|
|
||||||
[0] => 1
|
|
||||||
[1] => 2
|
|
||||||
)
|
|
||||||
* OR
|
|
||||||
Array
|
|
||||||
(
|
|
||||||
[1] => Array
|
|
||||||
(
|
|
||||||
[id_category] => 1
|
|
||||||
[name] => Home page
|
|
||||||
[link_rewrite] => home
|
|
||||||
)
|
|
||||||
)
|
|
||||||
* @param type $input_name name of input
|
|
||||||
* @return string
|
|
||||||
*/
|
|
||||||
public static function renderAdminCategorieTree($trads, $selected_cat = array(), $input_name = 'categoryBox')
|
|
||||||
{
|
|
||||||
$html = '
|
|
||||||
<script src="../js/jquery/treeview/jquery.treeview.js" type="text/javascript"></script>
|
|
||||||
<script src="../js/jquery/treeview/jquery.treeview.async.js" type="text/javascript"></script>
|
|
||||||
<script src="../js/jquery/treeview/jquery.treeview.edit.js" type="text/javascript"></script>
|
|
||||||
<script src="../js/admin-categories-tree.js" type="text/javascript"></script>
|
|
||||||
<script type="text/javascript">
|
|
||||||
var inputName = "'.$input_name.'";
|
|
||||||
var selectedCat = "'.implode(',', array_keys($selected_cat)).'";
|
|
||||||
</script>
|
|
||||||
<script type="text/javascript">
|
|
||||||
var selectedLabel = \''.$trads['selected'].'\';
|
|
||||||
var home = \''.$trads['Home'].'\';
|
|
||||||
</script>
|
|
||||||
<link type="text/css" rel="stylesheet" href="../css/jquery.treeview.css" />
|
|
||||||
';
|
|
||||||
|
|
||||||
$html .= '
|
|
||||||
<div style="background-color:#F4E6C9; width:99%;padding:5px 0 5px 5px;">
|
|
||||||
<a href="#" id="collapse_all" >'.$trads['Collapse All'].'</a>
|
|
||||||
- <a href="#" id="expand_all" >'.$trads['Expand All'].'</a>
|
|
||||||
- <a href="#" id="check_all" >'.$trads['Check All'].'</a>
|
|
||||||
- <a href="#" id="uncheck_all" >'.$trads['Uncheck All'].'</a>
|
|
||||||
</div>
|
|
||||||
';
|
|
||||||
|
|
||||||
$home_is_selected = false;
|
|
||||||
foreach($selected_cat AS $cat)
|
|
||||||
{
|
|
||||||
if (is_array($cat))
|
|
||||||
{
|
|
||||||
if ($cat['id_category'] != 1)
|
|
||||||
$html .= '<input type="hidden" name="'.$input_name.'[]" value="'.$cat['id_category'].'" >';
|
|
||||||
else
|
|
||||||
$home_is_selected = true;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if ($cat != 1)
|
|
||||||
$html .= '<input type="hidden" name="'.$input_name.'[]" value="'.$cat.'" >';
|
|
||||||
else
|
|
||||||
$home_is_selected = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
$html .= '
|
|
||||||
<ul id="categories-treeview" class="filetree">
|
|
||||||
<li id="1" class="hasChildren">
|
|
||||||
<span class="folder"> <input type="checkbox" name="'.$input_name.'[]" value="1" '.($home_is_selected ? 'checked' : '').' onclick="clickOnCategoryBox($(this));" /> '.$trads['Home'].'</span>
|
|
||||||
<ul>
|
|
||||||
<li><span class="placeholder"> </span></li>
|
|
||||||
</ul>
|
|
||||||
</li>
|
|
||||||
</ul>';
|
|
||||||
return $html;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -452,17 +452,7 @@ class ImageCore extends ObjectModel
|
|||||||
public function createImgFolder()
|
public function createImgFolder()
|
||||||
{
|
{
|
||||||
if (!file_exists(_PS_PROD_IMG_DIR_.$this->getImgFolder()))
|
if (!file_exists(_PS_PROD_IMG_DIR_.$this->getImgFolder()))
|
||||||
{
|
return @mkdir(_PS_PROD_IMG_DIR_.$this->getImgFolder(), 0755, true);
|
||||||
// Apparently sometimes mkdir cannot set the rights, and sometimes chmod can't. Trying both.
|
|
||||||
$success = @mkdir(_PS_PROD_IMG_DIR_.$this->getImgFolder(), 0755, true)
|
|
||||||
|| @chmod(_PS_PROD_IMG_DIR_.$this->getImgFolder(), 0755);
|
|
||||||
|
|
||||||
// Create an index.php file in the new folder
|
|
||||||
if ($success
|
|
||||||
&& !file_exists(_PS_PROD_IMG_DIR_.$this->getImgFolder().'index.php')
|
|
||||||
&& file_exists($this->source_index))
|
|
||||||
return @copy($this->source_index, _PS_PROD_IMG_DIR_.$this->getImgFolder().'index.php');
|
|
||||||
}
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -521,51 +511,6 @@ class ImageCore extends ObjectModel
|
|||||||
}
|
}
|
||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
public static function testFileSystem()
|
|
||||||
{
|
|
||||||
$safe_mode = ini_get('safe_mode');
|
|
||||||
if ($safe_mode)
|
|
||||||
return false;
|
|
||||||
$folder1 = _PS_PROD_IMG_DIR_.'testfilesystem/';
|
|
||||||
$test_folder = $folder1.'testsubfolder/';
|
|
||||||
if (file_exists($test_folder))
|
|
||||||
{
|
|
||||||
@rmdir($test_folder);
|
|
||||||
@rmdir($folder1);
|
|
||||||
}
|
|
||||||
if (file_exists($test_folder))
|
|
||||||
return false;
|
|
||||||
@mkdir($test_folder, 0755, true);
|
|
||||||
@chmod($test_folder, 0755);
|
|
||||||
if (!is_writeable($test_folder))
|
|
||||||
return false;
|
|
||||||
@rmdir($test_folder);
|
|
||||||
@rmdir($folder1);
|
|
||||||
if (file_exists($folder1))
|
|
||||||
return false;
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns the path where a product image should be created (without file format)
|
|
||||||
*
|
|
||||||
* @return string path
|
|
||||||
*/
|
|
||||||
public function getPathForCreation()
|
|
||||||
{
|
|
||||||
if (!$this->id)
|
|
||||||
return false;
|
|
||||||
if (Configuration::get('PS_LEGACY_IMAGES'))
|
|
||||||
{
|
|
||||||
if (!$this->id_product)
|
|
||||||
return false;
|
|
||||||
$path = $this->id_product.'-'.$this->id;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$path = $this->getImgPath();
|
|
||||||
$this->createImgFolder();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -103,8 +103,7 @@ class LanguageCore extends ObjectModel
|
|||||||
return ($resUpdateSQL AND Tools::generateHtaccess(dirname(__FILE__).'/../.htaccess',
|
return ($resUpdateSQL AND Tools::generateHtaccess(dirname(__FILE__).'/../.htaccess',
|
||||||
(int)(Configuration::get('PS_REWRITING_SETTINGS')),
|
(int)(Configuration::get('PS_REWRITING_SETTINGS')),
|
||||||
(int)(Configuration::get('PS_HTACCESS_CACHE_CONTROL')),
|
(int)(Configuration::get('PS_HTACCESS_CACHE_CONTROL')),
|
||||||
Configuration::get('PS_HTACCESS_SPECIFIC'),
|
Configuration::get('PS_HTACCESS_SPECIFIC')
|
||||||
(int)Configuration::get('PS_HTACCESS_DISABLE_MULTIVIEWS')
|
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -119,8 +118,7 @@ class LanguageCore extends ObjectModel
|
|||||||
return (Tools::generateHtaccess(dirname(__FILE__).'/../.htaccess',
|
return (Tools::generateHtaccess(dirname(__FILE__).'/../.htaccess',
|
||||||
(int)(Configuration::get('PS_REWRITING_SETTINGS')),
|
(int)(Configuration::get('PS_REWRITING_SETTINGS')),
|
||||||
(int)(Configuration::get('PS_HTACCESS_CACHE_CONTROL')),
|
(int)(Configuration::get('PS_HTACCESS_CACHE_CONTROL')),
|
||||||
Configuration::get('PS_HTACCESS_SPECIFIC'),
|
Configuration::get('PS_HTACCESS_SPECIFIC')
|
||||||
(int)Configuration::get('PS_HTACCESS_DISABLE_MULTIVIEWS')
|
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -292,8 +290,7 @@ class LanguageCore extends ObjectModel
|
|||||||
|
|
||||||
foreach($tables as $table)
|
foreach($tables as $table)
|
||||||
foreach($table as $t)
|
foreach($table as $t)
|
||||||
if ($t != _DB_PREFIX_.'configuration_lang')
|
$langTables[] = $t;
|
||||||
$langTables[] = $t;
|
|
||||||
|
|
||||||
Db::getInstance()->Execute('SET @id_lang_default = (SELECT c.`value` FROM `'._DB_PREFIX_.'configuration` c WHERE c.`name` = \'PS_LANG_DEFAULT\' LIMIT 1)');
|
Db::getInstance()->Execute('SET @id_lang_default = (SELECT c.`value` FROM `'._DB_PREFIX_.'configuration` c WHERE c.`name` = \'PS_LANG_DEFAULT\' LIMIT 1)');
|
||||||
$return = true;
|
$return = true;
|
||||||
@@ -406,8 +403,7 @@ class LanguageCore extends ObjectModel
|
|||||||
return Tools::generateHtaccess(dirname(__FILE__).'/../.htaccess',
|
return Tools::generateHtaccess(dirname(__FILE__).'/../.htaccess',
|
||||||
(int)(Configuration::get('PS_REWRITING_SETTINGS')),
|
(int)(Configuration::get('PS_REWRITING_SETTINGS')),
|
||||||
(int)(Configuration::get('PS_HTACCESS_CACHE_CONTROL')),
|
(int)(Configuration::get('PS_HTACCESS_CACHE_CONTROL')),
|
||||||
Configuration::get('PS_HTACCESS_SPECIFIC'),
|
Configuration::get('PS_HTACCESS_SPECIFIC')
|
||||||
(int)Configuration::get('PS_HTACCESS_DISABLE_MULTIVIEWS')
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -430,8 +426,7 @@ class LanguageCore extends ObjectModel
|
|||||||
Tools::generateHtaccess(dirname(__FILE__).'/../.htaccess',
|
Tools::generateHtaccess(dirname(__FILE__).'/../.htaccess',
|
||||||
(int)(Configuration::get('PS_REWRITING_SETTINGS')),
|
(int)(Configuration::get('PS_REWRITING_SETTINGS')),
|
||||||
(int)(Configuration::get('PS_HTACCESS_CACHE_CONTROL')),
|
(int)(Configuration::get('PS_HTACCESS_CACHE_CONTROL')),
|
||||||
Configuration::get('PS_HTACCESS_SPECIFIC'),
|
Configuration::get('PS_HTACCESS_SPECIFIC')
|
||||||
(int)Configuration::get('PS_HTACCESS_DISABLE_MULTIVIEWS')
|
|
||||||
);
|
);
|
||||||
|
|
||||||
return $result;
|
return $result;
|
||||||
@@ -571,8 +566,7 @@ class LanguageCore extends ObjectModel
|
|||||||
return Tools::generateHtaccess(dirname(__FILE__).'/../.htaccess',
|
return Tools::generateHtaccess(dirname(__FILE__).'/../.htaccess',
|
||||||
(int)(Configuration::get('PS_REWRITING_SETTINGS')),
|
(int)(Configuration::get('PS_REWRITING_SETTINGS')),
|
||||||
(int)(Configuration::get('PS_HTACCESS_CACHE_CONTROL')),
|
(int)(Configuration::get('PS_HTACCESS_CACHE_CONTROL')),
|
||||||
Configuration::get('PS_HTACCESS_SPECIFIC'),
|
Configuration::get('PS_HTACCESS_SPECIFIC')
|
||||||
(int)Configuration::get('PS_HTACCESS_DISABLE_MULTIVIEWS')
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -77,7 +77,6 @@ class ManufacturerCore extends ObjectModel
|
|||||||
|
|
||||||
protected $webserviceParameters = array(
|
protected $webserviceParameters = array(
|
||||||
'fields' => array(
|
'fields' => array(
|
||||||
'active' => array(),
|
|
||||||
'link_rewrite' => array('getter' => 'getLink', 'setter' => false),
|
'link_rewrite' => array('getter' => 'getLink', 'setter' => false),
|
||||||
),
|
),
|
||||||
'associations' => array(
|
'associations' => array(
|
||||||
@@ -375,19 +374,16 @@ class ManufacturerCore extends ObjectModel
|
|||||||
$ids = array();
|
$ids = array();
|
||||||
foreach ($id_addresses as $id)
|
foreach ($id_addresses as $id)
|
||||||
$ids[] = (int)$id['id'];
|
$ids[] = (int)$id['id'];
|
||||||
$result1 = (Db::getInstance()->ExecuteS('
|
Db::getInstance()->ExecuteS('
|
||||||
UPDATE `'._DB_PREFIX_.'address`
|
UPDATE `'._DB_PREFIX_.'address`
|
||||||
SET id_manufacturer = 0
|
SET id_manufacturer = 0
|
||||||
WHERE id_manufacturer = '.(int)$this->id.'
|
WHERE id_manufacturer = '.(int)$this->id.'
|
||||||
AND deleted = 0') !== false);
|
AND deleted = 0');
|
||||||
$result2 = true;
|
return (Db::getInstance()->ExecuteS('
|
||||||
if (count($ids))
|
|
||||||
$result2 = (Db::getInstance()->ExecuteS('
|
|
||||||
UPDATE `'._DB_PREFIX_.'address`
|
UPDATE `'._DB_PREFIX_.'address`
|
||||||
SET id_customer = 0, id_supplier = 0, id_manufacturer = '.(int)$this->id.'
|
SET id_customer = 0, id_supplier = 0, id_manufacturer = '.(int)$this->id.'
|
||||||
WHERE id_address IN('.implode(',', $ids).')
|
WHERE id_address IN('.implode(',', $ids).')
|
||||||
AND deleted = 0') !== false);
|
AND deleted = 0') !== false);
|
||||||
return ($result1 && $result2);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -523,11 +523,6 @@ abstract class ModuleCore
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function configXmlStringFormat($string)
|
|
||||||
{
|
|
||||||
return str_replace('\'', '\\\'', Tools::htmlentitiesDecodeUTF8($string));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return available modules
|
* Return available modules
|
||||||
*
|
*
|
||||||
@@ -572,12 +567,12 @@ abstract class ModuleCore
|
|||||||
$item->warning = '';
|
$item->warning = '';
|
||||||
foreach ($xml_module as $k => $v)
|
foreach ($xml_module as $k => $v)
|
||||||
$item->$k = (string) $v;
|
$item->$k = (string) $v;
|
||||||
$item->displayName = Module::findTranslation($xml_module->name, self::configXmlStringFormat($xml_module->displayName), (string)$xml_module->name);
|
$item->displayName = Module::findTranslation($xml_module->name, $xml_module->displayName, (string)$xml_module->name);
|
||||||
$item->description = Module::findTranslation($xml_module->name, self::configXmlStringFormat($xml_module->description), (string)$xml_module->name);
|
$item->description = Module::findTranslation($xml_module->name, $xml_module->description, (string)$xml_module->name);
|
||||||
$item->author = Module::findTranslation($xml_module->name, self::configXmlStringFormat($xml_module->author), (string)$xml_module->name);
|
$item->author = Module::findTranslation($xml_module->name, $xml_module->author, (string)$xml_module->name);
|
||||||
|
|
||||||
if (isset($xml_module->confirmUninstall))
|
if (isset($xml_module->confirmUninstall))
|
||||||
$item->confirmUninstall = Module::findTranslation($xml_module->name, self::configXmlStringFormat($xml_module->confirmUninstall), (string)$xml_module->name);
|
$item->confirmUninstall = Module::findTranslation($xml_module->name, $xml_module->confirmUninstall, (string)$xml_module->name);
|
||||||
|
|
||||||
$item->active = 0;
|
$item->active = 0;
|
||||||
$moduleList[$moduleListCursor] = $item;
|
$moduleList[$moduleListCursor] = $item;
|
||||||
@@ -797,22 +792,8 @@ abstract class ModuleCore
|
|||||||
{
|
{
|
||||||
$context = Context::getContext();
|
$context = Context::getContext();
|
||||||
$hookArgs = array('cookie' => $context->cookie, 'cart' => $context->cart);
|
$hookArgs = array('cookie' => $context->cookie, 'cart' => $context->cart);
|
||||||
|
$billing = new Address((int)($context->cart->id_address_invoice));
|
||||||
$output = '';
|
$output = '';
|
||||||
|
|
||||||
$result = self::getPaymentModules();
|
|
||||||
|
|
||||||
if ($result)
|
|
||||||
foreach ($result AS $module)
|
|
||||||
if (($moduleInstance = Module::getInstanceByName($module['name'])) AND is_callable(array($moduleInstance, 'hookpayment')))
|
|
||||||
if (!$moduleInstance->currencies OR ($moduleInstance->currencies AND sizeof(Currency::checkPaymentCurrencies($moduleInstance->id))))
|
|
||||||
$output .= call_user_func(array($moduleInstance, 'hookpayment'), $hookArgs);
|
|
||||||
return $output;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static function getPaymentModules()
|
|
||||||
{
|
|
||||||
$context = Context::getContext();
|
|
||||||
$billing = new Address($context->cart->id_address_invoice);
|
|
||||||
$list = Context::getContext()->shop->getListOfID();
|
$list = Context::getContext()->shop->getListOfID();
|
||||||
$sql = 'SELECT DISTINCT h.`id_hook`, m.`name`, hm.`position`
|
$sql = 'SELECT DISTINCT h.`id_hook`, m.`name`, hm.`position`
|
||||||
FROM `'._DB_PREFIX_.'module_country` mc
|
FROM `'._DB_PREFIX_.'module_country` mc
|
||||||
@@ -829,7 +810,13 @@ abstract class ModuleCore
|
|||||||
AND hm.id_shop IN('.implode(', ', $list).')
|
AND hm.id_shop IN('.implode(', ', $list).')
|
||||||
GROUP BY hm.id_hook, hm.id_module
|
GROUP BY hm.id_hook, hm.id_module
|
||||||
ORDER BY hm.`position`, m.`name` DESC';
|
ORDER BY hm.`position`, m.`name` DESC';
|
||||||
return Db::getInstance(_PS_USE_SQL_SLAVE_)->ExecuteS($sql);
|
$result = Db::getInstance(_PS_USE_SQL_SLAVE_)->ExecuteS($sql);
|
||||||
|
if ($result)
|
||||||
|
foreach ($result AS $k => $module)
|
||||||
|
if (($moduleInstance = Module::getInstanceByName($module['name'])) AND is_callable(array($moduleInstance, 'hookpayment')))
|
||||||
|
if (!$moduleInstance->currencies OR ($moduleInstance->currencies AND sizeof(Currency::checkPaymentCurrencies($moduleInstance->id))))
|
||||||
|
$output .= call_user_func(array($moduleInstance, 'hookpayment'), $hookArgs);
|
||||||
|
return $output;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -1128,7 +1115,13 @@ abstract class ModuleCore
|
|||||||
|
|
||||||
protected function _clearCache($template, $cacheId = NULL, $compileId = NULL)
|
protected function _clearCache($template, $cacheId = NULL, $compileId = NULL)
|
||||||
{
|
{
|
||||||
Tools::clearCache(Context::getContext()->smarty);
|
$context = Context::getContext();
|
||||||
|
/* Use Smarty 3 API calls */
|
||||||
|
if (!Configuration::get('PS_FORCE_SMARTY_2')) /* PHP version > 5.1.2 */
|
||||||
|
return $context->smarty->clearCache($template ? $this->_getApplicableTemplateDir($template).$template : NULL, $cacheId, $compileId);
|
||||||
|
/* or keep a backward compatibility if PHP version < 5.1.2 */
|
||||||
|
else
|
||||||
|
return $context->smarty->clear_cache($template ? $this->_getApplicableTemplateDir($template).$template : NULL, $cacheId, $compileId);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function _generateConfigXml()
|
protected function _generateConfigXml()
|
||||||
|
|||||||
@@ -137,19 +137,11 @@ class MySQLCore extends Db
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* tryToConnect return 0 if the connection succeed and the database can be selected.
|
* @see DbCore::tryToConnect()
|
||||||
* @since 1.4.4.0, the parameter $newDbLink (default true) has been added.
|
|
||||||
*
|
|
||||||
* @param string $server mysql server name
|
|
||||||
* @param string $user mysql user
|
|
||||||
* @param string $pwd mysql user password
|
|
||||||
* @param string $db mysql database name
|
|
||||||
* @param boolean $newDbLink if set to true, the function will not create a new link if one already exists.
|
|
||||||
* @return integer
|
|
||||||
*/
|
*/
|
||||||
static public function tryToConnect($server, $user, $pwd, $db, $newDbLink = true)
|
static public function tryToConnect($server, $user, $pwd, $db)
|
||||||
{
|
{
|
||||||
if (!$link = @mysql_connect($server, $user, $pwd, $newDbLink))
|
if (!$link = @mysql_connect($server, $user, $pwd))
|
||||||
return 1;
|
return 1;
|
||||||
if (!@mysql_select_db($db, $link))
|
if (!@mysql_select_db($db, $link))
|
||||||
return 2;
|
return 2;
|
||||||
|
|||||||
@@ -408,7 +408,7 @@ abstract class ObjectModelCore
|
|||||||
$fields = array();
|
$fields = array();
|
||||||
|
|
||||||
if($this->id_lang == NULL)
|
if($this->id_lang == NULL)
|
||||||
foreach (Language::getLanguages(false) as $language)
|
foreach (Language::getLanguages() as $language)
|
||||||
$this->makeTranslationFields($fields, $fieldsArray, $language['id_lang']);
|
$this->makeTranslationFields($fields, $fieldsArray, $language['id_lang']);
|
||||||
else
|
else
|
||||||
$this->makeTranslationFields($fields, $fieldsArray, $this->id_lang);
|
$this->makeTranslationFields($fields, $fieldsArray, $this->id_lang);
|
||||||
|
|||||||
@@ -293,14 +293,7 @@ class OrderCore extends ObjectModel
|
|||||||
/* Update order */
|
/* Update order */
|
||||||
$shippingDiff = $this->total_shipping - $cart->getOrderShippingCost();
|
$shippingDiff = $this->total_shipping - $cart->getOrderShippingCost();
|
||||||
$this->total_products -= $productPriceWithoutTax;
|
$this->total_products -= $productPriceWithoutTax;
|
||||||
|
|
||||||
// After upgrading from old version
|
|
||||||
// total_products_wt is null
|
|
||||||
// removing a product made order total negative
|
|
||||||
// and don't recalculating totals (on getTotalProductsWithTaxes)
|
|
||||||
if ($this->total_products_wt != 0)
|
|
||||||
$this->total_products_wt -= $productPrice;
|
$this->total_products_wt -= $productPrice;
|
||||||
|
|
||||||
$this->total_shipping = $cart->getOrderShippingCost();
|
$this->total_shipping = $cart->getOrderShippingCost();
|
||||||
|
|
||||||
/* It's temporary fix for 1.3 version... */
|
/* It's temporary fix for 1.3 version... */
|
||||||
|
|||||||
@@ -105,7 +105,7 @@ abstract class PaymentModuleCore extends Module
|
|||||||
$order->id_customer = (int)($cart->id_customer);
|
$order->id_customer = (int)($cart->id_customer);
|
||||||
$order->id_address_invoice = (int)($cart->id_address_invoice);
|
$order->id_address_invoice = (int)($cart->id_address_invoice);
|
||||||
$order->id_address_delivery = (int)($cart->id_address_delivery);
|
$order->id_address_delivery = (int)($cart->id_address_delivery);
|
||||||
$vat_address = new Address((int)($order->{Configuration::get('PS_TAX_ADDRESS_TYPE')}));
|
$vat_address = new Address((int)($order->id_address_delivery));
|
||||||
$order->id_currency = ($currency_special ? (int)($currency_special) : (int)($cart->id_currency));
|
$order->id_currency = ($currency_special ? (int)($currency_special) : (int)($cart->id_currency));
|
||||||
$order->id_lang = (int)($cart->id_lang);
|
$order->id_lang = (int)($cart->id_lang);
|
||||||
$order->id_cart = (int)($cart->id);
|
$order->id_cart = (int)($cart->id);
|
||||||
|
|||||||
@@ -263,7 +263,7 @@ class ProductCore extends ObjectModel
|
|||||||
'out_of_stock' => array('required' => true),
|
'out_of_stock' => array('required' => true),
|
||||||
'new' => array(),
|
'new' => array(),
|
||||||
'cache_default_attribute' => array(),
|
'cache_default_attribute' => array(),
|
||||||
'id_default_image' => array('getter' => 'getCoverWs', 'setter' => 'setCoverWs', 'xlink_resource' => array('resourceName' => 'images', 'subResourceName' => 'products')),
|
'id_default_image' => array('getter' => 'getCoverWs', 'setter' => false, 'xlink_resource' => array('resourceName' => 'images', 'subResourceName' => 'products')),
|
||||||
'id_default_combination' => array('getter' => 'getWsDefaultCombination', 'setter' => 'setWsDefaultCombination', 'xlink_resource' => array('resourceName' => 'combinations')),
|
'id_default_combination' => array('getter' => 'getWsDefaultCombination', 'setter' => 'setWsDefaultCombination', 'xlink_resource' => array('resourceName' => 'combinations')),
|
||||||
'position_in_category' => array('getter' => 'getWsPositionInCategory', 'setter' => false),
|
'position_in_category' => array('getter' => 'getWsPositionInCategory', 'setter' => false),
|
||||||
'manufacturer_name' => array('getter' => 'getWsManufacturerName', 'setter' => false),
|
'manufacturer_name' => array('getter' => 'getWsManufacturerName', 'setter' => false),
|
||||||
@@ -285,10 +285,6 @@ class ProductCore extends ObjectModel
|
|||||||
'id' => array('required' => true),
|
'id' => array('required' => true),
|
||||||
'id_feature_value' => array('required' => true, 'xlink_resource' => 'product_feature_values'),
|
'id_feature_value' => array('required' => true, 'xlink_resource' => 'product_feature_values'),
|
||||||
)),
|
)),
|
||||||
'tags' => array('resource' => 'tag',
|
|
||||||
'fields' => array(
|
|
||||||
'id' => array('required' => true),
|
|
||||||
)),
|
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -3340,21 +3336,6 @@ class ProductCore extends ObjectModel
|
|||||||
return $result['id_image'];
|
return $result['id_image'];
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Webservice setter : set virtual field id_default_image in category
|
|
||||||
*
|
|
||||||
* @return bool
|
|
||||||
*/
|
|
||||||
public function setCoverWs($id_image)
|
|
||||||
{
|
|
||||||
Db::getInstance()->ExecuteS('UPDATE `'._DB_PREFIX_.'image`
|
|
||||||
SET `cover` = 0 WHERE `id_product` = '.(int)($this->id).'
|
|
||||||
');
|
|
||||||
Db::getInstance()->ExecuteS('UPDATE `'._DB_PREFIX_.'image`
|
|
||||||
SET `cover` = 1 WHERE `id_product` = '.(int)($this->id).' AND `id_image` = '.(int)$id_image);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Webservice getter : get image ids of current product for association
|
* Webservice getter : get image ids of current product for association
|
||||||
*
|
*
|
||||||
@@ -3369,15 +3350,6 @@ class ProductCore extends ObjectModel
|
|||||||
ORDER BY `position`');
|
ORDER BY `position`');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getWsTags()
|
|
||||||
{
|
|
||||||
return Db::getInstance()->ExecuteS('
|
|
||||||
SELECT `id_tag` as id
|
|
||||||
FROM `'._DB_PREFIX_.'product_tag`
|
|
||||||
WHERE `id_product` = '.(int)($this->id));
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public function getWsManufacturerName()
|
public function getWsManufacturerName()
|
||||||
{
|
{
|
||||||
return Manufacturer::getNameById((int)$this->id_manufacturer);
|
return Manufacturer::getNameById((int)$this->id_manufacturer);
|
||||||
|
|||||||
@@ -231,12 +231,7 @@ class SpecificPriceCore extends ObjectModel
|
|||||||
`id_country` IN(0, '.(int)($id_country).') AND
|
`id_country` IN(0, '.(int)($id_country).') AND
|
||||||
`id_group` IN(0, '.(int)($id_group).') AND
|
`id_group` IN(0, '.(int)($id_group).') AND
|
||||||
`from_quantity` = 1 AND
|
`from_quantity` = 1 AND
|
||||||
(
|
(`from` = \'0000-00-00 00:00:00\' OR (\''.$beginning.'\' >= `from` AND \''.$ending.'\' <= `to`)) AND
|
||||||
(`from` = \'0000-00-00 00:00:00\' OR \''.$beginning.'\' >= `from`)
|
|
||||||
AND
|
|
||||||
(`to` = \'0000-00-00 00:00:00\' OR \''.$ending.'\' <= `to`)
|
|
||||||
)
|
|
||||||
AND
|
|
||||||
`reduction` > 0
|
`reduction` > 0
|
||||||
', false);
|
', false);
|
||||||
$ids_product = array();
|
$ids_product = array();
|
||||||
|
|||||||
@@ -1491,7 +1491,7 @@ class ToolsCore
|
|||||||
return Tools::getHttpHost();
|
return Tools::getHttpHost();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function generateHtaccess($path, $rewrite_settings, $cache_control, $specific = '', $disableMuliviews = false)
|
public static function generateHtaccess($path, $rewrite_settings, $cache_control, $specific = '')
|
||||||
{
|
{
|
||||||
if (!$writeFd = @fopen($path, 'w'))
|
if (!$writeFd = @fopen($path, 'w'))
|
||||||
return false;
|
return false;
|
||||||
@@ -1531,8 +1531,7 @@ class ToolsCore
|
|||||||
$tab['RewriteRule'][$domain]['content']['^'.ltrim($uri['uri'], '/').'([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?/[_a-zA-Z0-9-]*\.jpg$'] = _PS_PROD_IMG_.'$1/$2/$3/$4/$5/$6/$7/$1$2$3$4$5$6$7$8.jpg [L]';
|
$tab['RewriteRule'][$domain]['content']['^'.ltrim($uri['uri'], '/').'([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?/[_a-zA-Z0-9-]*\.jpg$'] = _PS_PROD_IMG_.'$1/$2/$3/$4/$5/$6/$7/$1$2$3$4$5$6$7$8.jpg [L]';
|
||||||
$tab['RewriteRule'][$domain]['content']['^'.ltrim($uri['uri'], '/').'([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?/[_a-zA-Z0-9-]*\.jpg$'] = _PS_PROD_IMG_.'$1/$2/$3/$4/$5/$6/$7/$8/$1$2$3$4$5$6$7$8$9.jpg [L]';
|
$tab['RewriteRule'][$domain]['content']['^'.ltrim($uri['uri'], '/').'([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?/[_a-zA-Z0-9-]*\.jpg$'] = _PS_PROD_IMG_.'$1/$2/$3/$4/$5/$6/$7/$8/$1$2$3$4$5$6$7$8$9.jpg [L]';
|
||||||
|
|
||||||
$tab['RewriteRule']['content']['^c/([0-9]+)(\-[_a-zA-Z0-9-]*)/[_a-zA-Z0-9-]*\.jpg$'] = 'img/c/$1$2.jpg [L]';
|
$tab['RewriteRule'][$domain]['content']['^'.ltrim($uri['uri'], '/').'c/([0-9]+)(\-[_a-zA-Z0-9-]*)/[_a-zA-Z0-9-]*\.jpg$'] = 'img/c/$1$2.jpg [L]';
|
||||||
$tab['RewriteRule']['content']['^c/([a-zA-Z-]+)/[a-zA-Z0-9-]+\.jpg$'] = 'img/c/$1.jpg [L]';
|
|
||||||
|
|
||||||
if ($multilang)
|
if ($multilang)
|
||||||
{
|
{
|
||||||
@@ -1592,13 +1591,9 @@ class ToolsCore
|
|||||||
fwrite($writeFd, $specific);
|
fwrite($writeFd, $specific);
|
||||||
// RewriteEngine
|
// RewriteEngine
|
||||||
fwrite($writeFd, "\n<IfModule mod_rewrite.c>\n");
|
fwrite($writeFd, "\n<IfModule mod_rewrite.c>\n");
|
||||||
|
fwrite($writeFd, "\nRewriteEngine on\n\n");
|
||||||
if ($disableMuliviews)
|
// fwrite($writeFd, $tab['RewriteRule']['comment']."\n");
|
||||||
fwrite($writeFd, "\n# Disable Multiviews\nOptions -Multiviews\n\n");
|
// Webservice needs apache_mod_rewrite in order to work
|
||||||
|
|
||||||
fwrite($writeFd, $tab['RewriteEngine']['comment']."\nRewriteEngine on\n\n");
|
|
||||||
fwrite($writeFd, $tab['RewriteRule']['comment']."\n");
|
|
||||||
// Webservice
|
|
||||||
fwrite($writeFd, 'RewriteRule ^api/?(.*)$ '.__PS_BASE_URI__."webservice/dispatcher.php?url=$1 [QSA,L]\n");
|
fwrite($writeFd, 'RewriteRule ^api/?(.*)$ '.__PS_BASE_URI__."webservice/dispatcher.php?url=$1 [QSA,L]\n");
|
||||||
|
|
||||||
fwrite($writeFd, "RewriteCond %{REQUEST_FILENAME} -s [OR]\nRewriteCond %{REQUEST_FILENAME} -l [OR]\nRewriteCond %{REQUEST_FILENAME} -d\nRewriteRule ^.*$ - [NC,L]\nRewriteRule ^.*\$ index.php [NC,L]\n");
|
fwrite($writeFd, "RewriteCond %{REQUEST_FILENAME} -s [OR]\nRewriteCond %{REQUEST_FILENAME} -l [OR]\nRewriteCond %{REQUEST_FILENAME} -d\nRewriteRule ^.*$ - [NC,L]\nRewriteRule ^.*\$ index.php [NC,L]\n");
|
||||||
@@ -1995,19 +1990,6 @@ FileETag INode MTime Size
|
|||||||
{
|
{
|
||||||
return str_replace(array("\r\n", "\r", "\n"), '<br />', $str);
|
return str_replace(array("\r\n", "\r", "\n"), '<br />', $str);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Clear cache for Smarty
|
|
||||||
*
|
|
||||||
* @param objet $smarty
|
|
||||||
*/
|
|
||||||
public static function clearCache($smarty)
|
|
||||||
{
|
|
||||||
if (!Configuration::get('PS_FORCE_SMARTY_2'))
|
|
||||||
$smarty->clearAllCache();
|
|
||||||
else
|
|
||||||
$smarty->clear_all_cache();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -1,138 +0,0 @@
|
|||||||
<?php
|
|
||||||
/*
|
|
||||||
* 2007-2011 PrestaShop
|
|
||||||
*
|
|
||||||
* NOTICE OF LICENSE
|
|
||||||
*
|
|
||||||
* This source file is subject to the Open Software License (OSL 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/osl-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-2011 PrestaShop SA
|
|
||||||
* @version Release: $Revision$
|
|
||||||
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
|
||||||
* International Registered Trademark & Property of PrestaShop SA
|
|
||||||
*/
|
|
||||||
|
|
||||||
class UpgraderCore{
|
|
||||||
const DEFAULT_CHECK_VERSION_DELAY_HOURS = 24;
|
|
||||||
/**
|
|
||||||
* link contains hte url where to download the file
|
|
||||||
*
|
|
||||||
* @var string
|
|
||||||
*/
|
|
||||||
private $needUpgrade = false;
|
|
||||||
private $noRefresh = false;
|
|
||||||
|
|
||||||
public $version_name;
|
|
||||||
public $version_num;
|
|
||||||
public $link;
|
|
||||||
public $autoupgrade;
|
|
||||||
|
|
||||||
public function __get($var)
|
|
||||||
{
|
|
||||||
if($var == 'needUpgrade')
|
|
||||||
return $this->isLastVersion();
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* we need to checkPSVersion when we use that class
|
|
||||||
* @param boolean noRefresh if true, checkPSVersion will not refresh its information
|
|
||||||
* @return object Upgrader
|
|
||||||
*/
|
|
||||||
public function __construct($noRefresh = false)
|
|
||||||
{
|
|
||||||
$this->noRefresh = (bool)$noRefresh;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* downloadLast download the last version of PrestaShop and save it in $dest/$filename
|
|
||||||
*
|
|
||||||
* @param string $dest directory where to save the file
|
|
||||||
* @param string $filename new filename
|
|
||||||
* @return boolean
|
|
||||||
*
|
|
||||||
* @TODO ftp if copy is not possible (safe_mode for example)
|
|
||||||
*/
|
|
||||||
public function downloadLast($dest, $filename = 'prestashop.zip')
|
|
||||||
{
|
|
||||||
if (empty($this->link))
|
|
||||||
$this->checkPSVersion();
|
|
||||||
|
|
||||||
if (@copy($this->link, realpath($dest).DIRECTORY_SEPARATOR.$filename))
|
|
||||||
return true;
|
|
||||||
else
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
public function isLastVersion()
|
|
||||||
{
|
|
||||||
if (empty($this->link))
|
|
||||||
$this->checkPSVersion();
|
|
||||||
|
|
||||||
return $this->needUpgrade;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* checkPSVersion ask to prestashop.com if there is a new version. return an array if yes, false otherwise
|
|
||||||
*
|
|
||||||
* @return mixed
|
|
||||||
*/
|
|
||||||
public function checkPSVersion($force = false)
|
|
||||||
{
|
|
||||||
if (empty($this->link))
|
|
||||||
{
|
|
||||||
$lastCheck = Configuration::get('PS_LAST_VERSION_CHECK');
|
|
||||||
// if we use the autoupgrade process, we will never refresh it
|
|
||||||
// except if no check has been done before
|
|
||||||
if (!($this->autoUpgrade AND $lastCheck) AND ($force OR ($lastCheck < time() - (3600 * Upgrader::DEFAULT_CHECK_VERSION_DELAY_HOURS))) )
|
|
||||||
{
|
|
||||||
libxml_set_streams_context(stream_context_create(array('http' => array('timeout' => 3))));
|
|
||||||
if ($feed = @simplexml_load_file('http://www.prestashop.com/xml/version.xml'))
|
|
||||||
{
|
|
||||||
$this->version_name = (string)$feed->version->name;
|
|
||||||
$this->version_num = (string)$feed->version->num;
|
|
||||||
$this->link = (string)$feed->download->link;
|
|
||||||
$this->autoupgrade = (int)$feed->autoupgrade;
|
|
||||||
$configLastVersion = array(
|
|
||||||
'name' => $this->version_name,
|
|
||||||
'num' => $this->version_num,
|
|
||||||
'link' => $this->link,
|
|
||||||
'autoupgrade' => $this->autoupgrade
|
|
||||||
);
|
|
||||||
Configuration::updateValue('PS_LAST_VERSION',serialize($configLastVersion));
|
|
||||||
Configuration::updateValue('PS_LAST_VERSION_CHECK',time());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$lastVersionCheck = unserialize(Configuration::get('PS_LAST_VERSION'));
|
|
||||||
$this->version_name = $lastVersionCheck['name'];
|
|
||||||
$this->version_num = $lastVersionCheck['num'];
|
|
||||||
$this->link = $lastVersionCheck['link'];
|
|
||||||
$this->autoupgrade = $lastVersionCheck['autoupgrade'];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// retro-compatibility :
|
|
||||||
// return array(name,link) if you don't use the last version
|
|
||||||
// false otherwise
|
|
||||||
if (version_compare(_PS_VERSION_, $this->version_num, '<'))
|
|
||||||
{
|
|
||||||
$this->needUpgrade = true;
|
|
||||||
return array('name' => $this->version_name, 'link' => $this->link);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1356,7 +1356,7 @@ class WebserviceRequestCore
|
|||||||
$this->setError(400, 'id is duplicate in request', 89);
|
$this->setError(400, 'id is duplicate in request', 89);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (count($xmlEntities) != count($ids))
|
if ($xmlEntities->count() != count($ids))
|
||||||
{
|
{
|
||||||
$this->setError(400, 'id is required when modifying a resource', 90);
|
$this->setError(400, 'id is required when modifying a resource', 90);
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
@@ -151,11 +151,6 @@ class CategoryControllerCore extends FrontController
|
|||||||
'thumbSceneSize' => Image::getSize('thumb_scene'),
|
'thumbSceneSize' => Image::getSize('thumb_scene'),
|
||||||
'homeSize' => Image::getSize('home')
|
'homeSize' => Image::getSize('home')
|
||||||
));
|
));
|
||||||
|
|
||||||
if (isset(self::$cookie->id_customer))
|
|
||||||
self::$smarty->assign('compareProducts', CompareProduct::getCustomerCompareProducts((int)self::$cookie->id_customer));
|
|
||||||
elseif (isset(self::$cookie->id_guest))
|
|
||||||
self::$smarty->assign('compareProducts', CompareProduct::getGuestCompareProducts((int)self::$cookie->id_guest));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -31,74 +31,23 @@ class CompareControllerCore extends FrontController
|
|||||||
{
|
{
|
||||||
parent::setMedia();
|
parent::setMedia();
|
||||||
$this->addCSS(_THEME_CSS_DIR_.'/comparator.css');
|
$this->addCSS(_THEME_CSS_DIR_.'/comparator.css');
|
||||||
|
|
||||||
if (Configuration::get('PS_COMPARATOR_MAX_ITEM') > 0)
|
|
||||||
Tools::addJS(_THEME_JS_DIR_.'products-comparison.js');
|
|
||||||
}
|
|
||||||
|
|
||||||
public function preProcess()
|
|
||||||
{
|
|
||||||
parent::preProcess();
|
|
||||||
|
|
||||||
//Add or remove product with Ajax
|
|
||||||
if (Tools::getValue('ajax') AND Tools::getValue('id_product') AND Tools::getValue('action'))
|
|
||||||
{
|
|
||||||
if (Tools::getValue('action') == 'add')
|
|
||||||
{
|
|
||||||
if (isset(self::$cookie->id_customer))
|
|
||||||
{
|
|
||||||
if(CompareProduct::getCustomerNumberProducts(self::$cookie->id_customer) < Configuration::get('PS_COMPARATOR_MAX_ITEM'))
|
|
||||||
CompareProduct::addCustomerCompareProduct((int)self::$cookie->id_customer, (int)Tools::getValue('id_product'));
|
|
||||||
else
|
|
||||||
die('0');
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if ((isset(self::$cookie->id_guest) AND CompareProduct::getGuestNumberProducts(self::$cookie->id_guest) < Configuration::get('PS_COMPARATOR_MAX_ITEM')))
|
|
||||||
CompareProduct::addGuestCompareProduct((int)self::$cookie->id_guest, (int)Tools::getValue('id_product'));
|
|
||||||
else
|
|
||||||
die('0');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
elseif (Tools::getValue('action') == 'remove')
|
|
||||||
{
|
|
||||||
if (isset(self::$cookie->id_customer))
|
|
||||||
CompareProduct::removeCustomerCompareProduct((int)self::$cookie->id_customer, (int)Tools::getValue('id_product'));
|
|
||||||
elseif (isset(self::$cookie->id_guest))
|
|
||||||
CompareProduct::removeGuestCompareProduct((int)self::$cookie->id_guest, (int)Tools::getValue('id_product'));
|
|
||||||
else
|
|
||||||
die('0');
|
|
||||||
}
|
|
||||||
else
|
|
||||||
die('0');
|
|
||||||
|
|
||||||
die('1');
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function process()
|
public function process()
|
||||||
{
|
{
|
||||||
parent::process();
|
parent::process();
|
||||||
|
|
||||||
//Clean compare product table
|
|
||||||
CompareProduct::cleanCompareProducts('week');
|
|
||||||
|
|
||||||
$hasProduct = false;
|
$hasProduct = false;
|
||||||
|
$product_list = Tools::getValue('compare_product_list');
|
||||||
|
$postProducts = isset($product_list) ? rtrim($product_list,'|') : '';
|
||||||
|
|
||||||
if (!Configuration::get('PS_COMPARATOR_MAX_ITEM'))
|
if (!Configuration::get('PS_COMPARATOR_MAX_ITEM'))
|
||||||
return Tools::redirect('index.php?controller=404');
|
return Tools::redirect('index.php?controller=404');
|
||||||
|
|
||||||
if ($product_list = Tools::getValue('compare_product_list') AND $postProducts = (isset($product_list) ? rtrim($product_list,'|') : ''))
|
if ($postProducts)
|
||||||
$ids = array_unique(explode('|', $postProducts));
|
|
||||||
elseif (isset(self::$cookie->id_customer))
|
|
||||||
$ids = CompareProduct::getCustomerCompareProducts(self::$cookie->id_customer);
|
|
||||||
elseif(isset(self::$cookie->id_guest))
|
|
||||||
$ids = CompareProduct::getGuestCompareProducts(self::$cookie->id_guest);
|
|
||||||
else
|
|
||||||
$ids = null;
|
|
||||||
|
|
||||||
if ($ids)
|
|
||||||
{
|
{
|
||||||
|
$ids = array_unique(explode('|', $postProducts));
|
||||||
|
|
||||||
if (sizeof($ids) > 0)
|
if (sizeof($ids) > 0)
|
||||||
{
|
{
|
||||||
if (sizeof($ids) > Configuration::get('PS_COMPARATOR_MAX_ITEM'))
|
if (sizeof($ids) > Configuration::get('PS_COMPARATOR_MAX_ITEM'))
|
||||||
|
|||||||
@@ -146,7 +146,6 @@ class OrderDetailControllerCore extends FrontController
|
|||||||
'messages' => Message::getMessagesByOrderId((int)($order->id)),
|
'messages' => Message::getMessagesByOrderId((int)($order->id)),
|
||||||
'CUSTOMIZE_FILE' => _CUSTOMIZE_FILE_,
|
'CUSTOMIZE_FILE' => _CUSTOMIZE_FILE_,
|
||||||
'CUSTOMIZE_TEXTFIELD' => _CUSTOMIZE_TEXTFIELD_,
|
'CUSTOMIZE_TEXTFIELD' => _CUSTOMIZE_TEXTFIELD_,
|
||||||
'isRecyclable' => Configuration::get('PS_RECYCLABLE_PACK'),
|
|
||||||
'use_tax' => Configuration::get('PS_TAX'),
|
'use_tax' => Configuration::get('PS_TAX'),
|
||||||
'group_use_tax' => (Group::getPriceDisplayMethod($customer->id_default_group) == PS_TAX_INC),
|
'group_use_tax' => (Group::getPriceDisplayMethod($customer->id_default_group) == PS_TAX_INC),
|
||||||
'customizedDatas' => $customizedDatas));
|
'customizedDatas' => $customizedDatas));
|
||||||
|
|||||||
@@ -360,9 +360,7 @@ class ParentOrderControllerCore extends FrontController
|
|||||||
$this->context->smarty->assign(array(
|
$this->context->smarty->assign(array(
|
||||||
'checked' => $this->_setDefaultCarrierSelection($carriers),
|
'checked' => $this->_setDefaultCarrierSelection($carriers),
|
||||||
'carriers' => $carriers,
|
'carriers' => $carriers,
|
||||||
'default_carrier' => (int)(Configuration::get('PS_CARRIER_DEFAULT'))
|
'default_carrier' => (int)(Configuration::get('PS_CARRIER_DEFAULT')),
|
||||||
));
|
|
||||||
self::$smarty->assign(array(
|
|
||||||
'HOOK_EXTRACARRIER' => Module::hookExec('extraCarrier', array('address' => $address)),
|
'HOOK_EXTRACARRIER' => Module::hookExec('extraCarrier', array('address' => $address)),
|
||||||
'HOOK_BEFORECARRIER' => Module::hookExec('beforeCarrier', array('carriers' => $carriers))
|
'HOOK_BEFORECARRIER' => Module::hookExec('beforeCarrier', array('carriers' => $carriers))
|
||||||
));
|
));
|
||||||
|
|||||||
@@ -28,8 +28,6 @@
|
|||||||
class ProductControllerCore extends FrontController
|
class ProductControllerCore extends FrontController
|
||||||
{
|
{
|
||||||
protected $product;
|
protected $product;
|
||||||
public $php_self = 'product.php';
|
|
||||||
protected $canonicalURL;
|
|
||||||
|
|
||||||
public function setMedia()
|
public function setMedia()
|
||||||
{
|
{
|
||||||
@@ -51,28 +49,11 @@ class ProductControllerCore extends FrontController
|
|||||||
$this->addJS(_PS_JS_DIR_.'jquery/jquery.jqzoom.js');
|
$this->addJS(_PS_JS_DIR_.'jquery/jquery.jqzoom.js');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function canonicalRedirection()
|
|
||||||
{
|
|
||||||
// Automatically redirect to the canonical URL if the current in is the right one
|
|
||||||
// $_SERVER['HTTP_HOST'] must be replaced by the real canonical domain
|
|
||||||
if (Validate::isLoadedObject($this->product))
|
|
||||||
{
|
|
||||||
$canonicalURL = self::$link->getProductLink($this->product);
|
|
||||||
if (!preg_match('/^'.Tools::pRegexp($canonicalURL, '/').'([&?].*)?$/', Tools::getProtocol().$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']))
|
|
||||||
{
|
|
||||||
header('HTTP/1.0 301 Moved');
|
|
||||||
if (defined('_PS_MODE_DEV_') AND _PS_MODE_DEV_)
|
|
||||||
die('[Debug] This page has moved<br />Please use the following URL instead: <a href="'.$canonicalURL.'">'.$canonicalURL.'</a>');
|
|
||||||
Tools::redirectLink($canonicalURL);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public function preProcess()
|
public function preProcess()
|
||||||
{
|
{
|
||||||
if ($id_product = (int)Tools::getValue('id_product'))
|
if ($id_product = (int)Tools::getValue('id_product'))
|
||||||
$this->product = new Product($id_product, true, $this->context->language->id);
|
$this->product = new Product($id_product, true, $this->context->language->id, $this->id_current_shop);
|
||||||
|
|
||||||
if (!Validate::isLoadedObject($this->product))
|
if (!Validate::isLoadedObject($this->product))
|
||||||
{
|
{
|
||||||
@@ -80,16 +61,42 @@ class ProductControllerCore extends FrontController
|
|||||||
header('Status: 404 Not Found');
|
header('Status: 404 Not Found');
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
$this->canonicalRedirection();
|
{
|
||||||
|
// Automatically redirect to the canonical URL if the current in is the right one
|
||||||
|
// $_SERVER['HTTP_HOST'] must be replaced by the real canonical domain
|
||||||
|
if (Validate::isLoadedObject($this->product))
|
||||||
|
{
|
||||||
|
$canonicalURL = $this->context->link->getProductLink($this->product);
|
||||||
|
if (!preg_match('/^'.Tools::pRegexp($canonicalURL, '/').'([&?].*)?$/i', Tools::getProtocol().$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']))
|
||||||
|
{
|
||||||
|
header('HTTP/1.0 301 Moved');
|
||||||
|
if (defined('_PS_MODE_DEV_') AND _PS_MODE_DEV_)
|
||||||
|
die('[Debug] This page has moved<br />Please use the following URL instead: <a href="'.$canonicalURL.'">'.$canonicalURL.'</a>');
|
||||||
|
Tools::redirectLink($canonicalURL);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
parent::preProcess();
|
parent::preProcess();
|
||||||
|
|
||||||
|
if((int)(Configuration::get('PS_REWRITING_SETTINGS')))
|
||||||
|
if ($id_product = (int)Tools::getValue('id_product'))
|
||||||
|
{
|
||||||
|
$rewrite_infos = Product::getUrlRewriteInformations((int)$id_product);
|
||||||
|
|
||||||
|
$default_rewrite = array();
|
||||||
|
foreach ($rewrite_infos AS $infos)
|
||||||
|
$default_rewrite[$infos['id_lang']] = $this->context->link->getProductLink((int)$id_product, $infos['link_rewrite'], $infos['category_rewrite'], $infos['ean13'], (int)$infos['id_lang']);
|
||||||
|
|
||||||
|
$this->context->smarty->assign('lang_rewrite_urls', $default_rewrite);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function process()
|
public function process()
|
||||||
{
|
{
|
||||||
parent::process();
|
parent::process();
|
||||||
|
|
||||||
if (!Validate::isLoadedObject($this->product))
|
if (!$id_product = (int)(Tools::getValue('id_product')) OR !Validate::isUnsignedId($id_product))
|
||||||
$this->errors[] = Tools::displayError('Product not found');
|
$this->errors[] = Tools::displayError('Product not found');
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -98,7 +105,7 @@ class ProductControllerCore extends FrontController
|
|||||||
|| !file_exists(dirname(__FILE__).'/../'.Tools::getValue('ad').'/ajax.php')))
|
|| !file_exists(dirname(__FILE__).'/../'.Tools::getValue('ad').'/ajax.php')))
|
||||||
{
|
{
|
||||||
header('HTTP/1.1 404 page not found');
|
header('HTTP/1.1 404 page not found');
|
||||||
$this->errors[] = Tools::displayError('Product is no longer available.');
|
$this->errors[] = Tools::displayError('Pproduct is no longer available.');
|
||||||
}
|
}
|
||||||
elseif (!$this->product->checkAccess(isset($this->context->customer) ? $this->context->customer->id : 0))
|
elseif (!$this->product->checkAccess(isset($this->context->customer) ? $this->context->customer->id : 0))
|
||||||
$this->errors[] = Tools::displayError('You do not have access to this product.');
|
$this->errors[] = Tools::displayError('You do not have access to this product.');
|
||||||
@@ -109,6 +116,9 @@ class ProductControllerCore extends FrontController
|
|||||||
if (!$this->product->active)
|
if (!$this->product->active)
|
||||||
$this->context->smarty->assign('adminActionDisplay', true);
|
$this->context->smarty->assign('adminActionDisplay', true);
|
||||||
|
|
||||||
|
/* rewrited url set */
|
||||||
|
$rewrited_url = $this->context->link->getProductLink($this->product->id, $this->product->link_rewrite);
|
||||||
|
|
||||||
/* Product pictures management */
|
/* Product pictures management */
|
||||||
require_once('images.inc.php');
|
require_once('images.inc.php');
|
||||||
$this->context->smarty->assign('customizationFormTarget', Tools::safeOutput(urldecode($_SERVER['REQUEST_URI'])));
|
$this->context->smarty->assign('customizationFormTarget', Tools::safeOutput(urldecode($_SERVER['REQUEST_URI'])));
|
||||||
@@ -142,11 +152,16 @@ class ProductControllerCore extends FrontController
|
|||||||
'pictures' => $pictures,
|
'pictures' => $pictures,
|
||||||
'textFields' => $textFields));
|
'textFields' => $textFields));
|
||||||
|
|
||||||
|
$productPriceWithTax = Product::getPriceStatic($id_product, true, NULL, 6);
|
||||||
|
if (Product::$_taxCalculationMethod == PS_TAX_INC)
|
||||||
|
$productPriceWithTax = Tools::ps_round($productPriceWithTax, 2);
|
||||||
|
|
||||||
|
$productPriceWithoutEcoTax = (float)($productPriceWithTax - $this->product->ecotax);
|
||||||
$configs = Configuration::getMultiple(array('PS_ORDER_OUT_OF_STOCK', 'PS_LAST_QTIES'));
|
$configs = Configuration::getMultiple(array('PS_ORDER_OUT_OF_STOCK', 'PS_LAST_QTIES'));
|
||||||
|
|
||||||
/* Features / Values */
|
/* Features / Values */
|
||||||
$features = $this->product->getFrontFeatures($this->context->language->id);
|
$features = $this->product->getFrontFeatures($this->context->language->id);
|
||||||
$attachments = ($this->product->cache_has_attachments) ? $this->product->getAttachments($this->context->language->id) : array();
|
$attachments = $this->product->getAttachments($this->context->language->id);
|
||||||
|
|
||||||
/* Category */
|
/* Category */
|
||||||
$category = false;
|
$category = false;
|
||||||
@@ -154,13 +169,13 @@ class ProductControllerCore extends FrontController
|
|||||||
{
|
{
|
||||||
if (isset($regs[2]) AND is_numeric($regs[2]))
|
if (isset($regs[2]) AND is_numeric($regs[2]))
|
||||||
{
|
{
|
||||||
if (Product::idIsOnCategoryId($this->product->id, array('0' => array('id_category' => (int)$regs[2]))))
|
if (Product::idIsOnCategoryId((int)($this->product->id), array('0' => array('id_category' => (int)($regs[2])))))
|
||||||
$category = new Category($regs[2], $this->context->language->id);
|
$category = new Category((int)($regs[2]), (int)$this->context->cookie->id_lang);
|
||||||
}
|
}
|
||||||
elseif (isset($regs[5]) AND is_numeric($regs[5]))
|
elseif (isset($regs[5]) AND is_numeric($regs[5]))
|
||||||
{
|
{
|
||||||
if (Product::idIsOnCategoryId($this->product->id, array('0' => array('id_category' => (int)$regs[5]))))
|
if (Product::idIsOnCategoryId((int)($this->product->id), array('0' => array('id_category' => (int)($regs[5])))))
|
||||||
$category = new Category($regs[5], $this->context->language->id);
|
$category = new Category((int)($regs[5]), (int)$this->context->cookie->id_lang);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!$category)
|
if (!$category)
|
||||||
@@ -169,13 +184,12 @@ class ProductControllerCore extends FrontController
|
|||||||
if (isset($category) AND Validate::isLoadedObject($category))
|
if (isset($category) AND Validate::isLoadedObject($category))
|
||||||
{
|
{
|
||||||
$this->context->smarty->assign(array(
|
$this->context->smarty->assign(array(
|
||||||
'path' => Tools::getPath((int)$category->id, $this->product->name, true),
|
'path' => Tools::getPath((int)$category->id, $this->product->name, true),
|
||||||
'category' => $category,
|
'category' => $category,
|
||||||
'subCategories' => $category->getSubCategories($this->context->language->id, true),
|
'subCategories' => $category->getSubCategories($this->context->language->id, true),
|
||||||
'id_category_current' => (int)($category->id),
|
'id_category_current' => (int)($category->id),
|
||||||
'id_category_parent' => (int)($category->id_parent),
|
'id_category_parent' => (int)($category->id_parent),
|
||||||
'return_category_name' => Tools::safeOutput($category->name),
|
'return_category_name' => Tools::safeOutput($category->name)));
|
||||||
));
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
$this->context->smarty->assign('path', Tools::getPath((int)$this->product->id_category_default, $this->product->name));
|
$this->context->smarty->assign('path', Tools::getPath((int)$this->product->id_category_default, $this->product->name));
|
||||||
@@ -183,7 +197,7 @@ class ProductControllerCore extends FrontController
|
|||||||
$this->context->smarty->assign('return_link', (isset($category->id) AND $category->id) ? Tools::safeOutput($this->context->link->getCategoryLink($category)) : 'javascript: history.back();');
|
$this->context->smarty->assign('return_link', (isset($category->id) AND $category->id) ? Tools::safeOutput($this->context->link->getCategoryLink($category)) : 'javascript: history.back();');
|
||||||
|
|
||||||
$lang = Configuration::get('PS_LANG_DEFAULT');
|
$lang = Configuration::get('PS_LANG_DEFAULT');
|
||||||
if (Pack::isPack($this->product->id) AND !Pack::isInStock((int)$this->product->id, $lang))
|
if (Pack::isPack((int)($this->product->id), (int)($lang)) AND !Pack::isInStock((int)($this->product->id), (int)($lang)))
|
||||||
$this->product->quantity = 0;
|
$this->product->quantity = 0;
|
||||||
|
|
||||||
$id_customer = (isset($this->context->customer) ? (int)($this->context->customer->id) : 0);
|
$id_customer = (isset($this->context->customer) ? (int)($this->context->customer->id) : 0);
|
||||||
@@ -195,13 +209,8 @@ class ProductControllerCore extends FrontController
|
|||||||
$tax = (float)(Tax::getProductTaxRate((int)($this->product->id), $this->context->cart->{Configuration::get('PS_TAX_ADDRESS_TYPE')}));
|
$tax = (float)(Tax::getProductTaxRate((int)($this->product->id), $this->context->cart->{Configuration::get('PS_TAX_ADDRESS_TYPE')}));
|
||||||
$this->context->smarty->assign('tax_rate', $tax);
|
$this->context->smarty->assign('tax_rate', $tax);
|
||||||
|
|
||||||
$productPriceWithTax = Product::getPriceStatic($this->product->id, true, NULL, 6);
|
|
||||||
if (Product::$_taxCalculationMethod == PS_TAX_INC)
|
|
||||||
$productPriceWithTax = Tools::ps_round($productPriceWithTax, 2);
|
|
||||||
$productPriceWithoutEcoTax = (float)($productPriceWithTax - $this->product->ecotax);
|
|
||||||
|
|
||||||
$ecotax_rate = (float) Tax::getProductEcotaxRate($this->context->cart->{Configuration::get('PS_TAX_ADDRESS_TYPE')});
|
$ecotax_rate = (float) Tax::getProductEcotaxRate($this->context->cart->{Configuration::get('PS_TAX_ADDRESS_TYPE')});
|
||||||
$ecotaxTaxAmount = Tools::ps_round($this->product->ecotax, 2);
|
$ecotaxTaxAmount = Tools::ps_round($this->product->ecotax, 2);
|
||||||
if (Product::$_taxCalculationMethod == PS_TAX_INC && (int)Configuration::get('PS_TAX'))
|
if (Product::$_taxCalculationMethod == PS_TAX_INC && (int)Configuration::get('PS_TAX'))
|
||||||
$ecotaxTaxAmount = Tools::ps_round($ecotaxTaxAmount * (1 + $ecotax_rate / 100), 2);
|
$ecotaxTaxAmount = Tools::ps_round($ecotaxTaxAmount * (1 + $ecotax_rate / 100), 2);
|
||||||
|
|
||||||
@@ -212,13 +221,13 @@ class ProductControllerCore extends FrontController
|
|||||||
'ecotax_tax_exc' => Tools::ps_round($this->product->ecotax, 2),
|
'ecotax_tax_exc' => Tools::ps_round($this->product->ecotax, 2),
|
||||||
'ecotaxTax_rate' => $ecotax_rate,
|
'ecotaxTax_rate' => $ecotax_rate,
|
||||||
'homeSize' => Image::getSize('home'),
|
'homeSize' => Image::getSize('home'),
|
||||||
'product_manufacturer' => new Manufacturer($this->product->id_manufacturer, $this->context->language->id),
|
'product_manufacturer' => new Manufacturer((int)($this->product->id_manufacturer), Configuration::get('PS_LANG_DEFAULT')),
|
||||||
'token' => Tools::getToken(false),
|
'token' => Tools::getToken(false),
|
||||||
'productPriceWithoutEcoTax' => (float)$productPriceWithoutEcoTax,
|
'productPriceWithoutEcoTax' => (float)($productPriceWithoutEcoTax),
|
||||||
'features' => $features,
|
'features' => $features,
|
||||||
'attachments' => $attachments,
|
'attachments' => $attachments,
|
||||||
'allow_oosp' => $this->product->isAvailableWhenOutOfStock((int)($this->product->out_of_stock)),
|
'allow_oosp' => $this->product->isAvailableWhenOutOfStock((int)($this->product->out_of_stock)),
|
||||||
'last_qties' => (int)Configuration::get('PS_LAST_QTIES'),
|
'last_qties' => (int)($configs['PS_LAST_QTIES']),
|
||||||
'group_reduction' => $group_reduction,
|
'group_reduction' => $group_reduction,
|
||||||
'col_img_dir' => _PS_COL_IMG_DIR_,
|
'col_img_dir' => _PS_COL_IMG_DIR_,
|
||||||
));
|
));
|
||||||
@@ -232,7 +241,7 @@ class ProductControllerCore extends FrontController
|
|||||||
'HOOK_PRODUCT_TAB_CONTENT' => Module::hookExec('productTabContent')
|
'HOOK_PRODUCT_TAB_CONTENT' => Module::hookExec('productTabContent')
|
||||||
));
|
));
|
||||||
|
|
||||||
$images = $this->product->getImages((int)$this->context->language->id);
|
$images = $this->product->getImages((int)$this->context->cookie->id_lang);
|
||||||
$productImages = array();
|
$productImages = array();
|
||||||
foreach ($images AS $k => $image)
|
foreach ($images AS $k => $image)
|
||||||
{
|
{
|
||||||
@@ -243,7 +252,7 @@ class ProductControllerCore extends FrontController
|
|||||||
$cover['id_image'] = (Configuration::get('PS_LEGACY_IMAGES') ? ($this->product->id.'-'.$image['id_image']) : $image['id_image']);
|
$cover['id_image'] = (Configuration::get('PS_LEGACY_IMAGES') ? ($this->product->id.'-'.$image['id_image']) : $image['id_image']);
|
||||||
$cover['id_image_only'] = (int)($image['id_image']);
|
$cover['id_image_only'] = (int)($image['id_image']);
|
||||||
}
|
}
|
||||||
$productImages[(int)$image['id_image']] = $image;
|
$productImages[(int)($image['id_image'])] = $image;
|
||||||
}
|
}
|
||||||
if (!isset($cover))
|
if (!isset($cover))
|
||||||
$cover = array('id_image' => $this->context->language->iso_code.'-default', 'legend' => 'No picture', 'title' => 'No picture');
|
$cover = array('id_image' => $this->context->language->iso_code.'-default', 'legend' => 'No picture', 'title' => 'No picture');
|
||||||
@@ -339,7 +348,7 @@ class ProductControllerCore extends FrontController
|
|||||||
|
|
||||||
$this->context->smarty->assign(array(
|
$this->context->smarty->assign(array(
|
||||||
'no_tax' => Tax::excludeTaxeOption() OR !Tax::getProductTaxRate((int)$this->product->id, $this->context->cart->{Configuration::get('PS_TAX_ADDRESS_TYPE')}),
|
'no_tax' => Tax::excludeTaxeOption() OR !Tax::getProductTaxRate((int)$this->product->id, $this->context->cart->{Configuration::get('PS_TAX_ADDRESS_TYPE')}),
|
||||||
'customizationFields' => ($this->product->customizable) ? $this->product->getCustomizationFields($this->context->language->id) : false,
|
'customizationFields' => $this->product->getCustomizationFields($this->context->language->id)
|
||||||
));
|
));
|
||||||
|
|
||||||
// Pack management
|
// Pack management
|
||||||
@@ -353,7 +362,7 @@ class ProductControllerCore extends FrontController
|
|||||||
'outOfStockAllowed' => (int)(Configuration::get('PS_ORDER_OUT_OF_STOCK')),
|
'outOfStockAllowed' => (int)(Configuration::get('PS_ORDER_OUT_OF_STOCK')),
|
||||||
'errors' => $this->errors,
|
'errors' => $this->errors,
|
||||||
'categories' => Category::getHomeCategories($this->context->language->id),
|
'categories' => Category::getHomeCategories($this->context->language->id),
|
||||||
'have_image' => (isset($cover) ? (int)$cover['id_image'] : false),
|
'have_image' => Product::getCover((int)(Tools::getValue('id_product'))),
|
||||||
'tax_enabled' => Configuration::get('PS_TAX'),
|
'tax_enabled' => Configuration::get('PS_TAX'),
|
||||||
'display_qties' => (int)(Configuration::get('PS_DISPLAY_QTIES')),
|
'display_qties' => (int)(Configuration::get('PS_DISPLAY_QTIES')),
|
||||||
'display_ht' => !Tax::excludeTaxeOption(),
|
'display_ht' => !Tax::excludeTaxeOption(),
|
||||||
@@ -374,7 +383,7 @@ class ProductControllerCore extends FrontController
|
|||||||
|
|
||||||
public function pictureUpload(Product $product, Cart $cart)
|
public function pictureUpload(Product $product, Cart $cart)
|
||||||
{
|
{
|
||||||
if (!$fieldIds = $this->product->getCustomizationFieldIds())
|
if (!$fieldIds = $product->getCustomizationFieldIds())
|
||||||
return false;
|
return false;
|
||||||
$authorizedFileFields = array();
|
$authorizedFileFields = array();
|
||||||
foreach ($fieldIds AS $fieldId)
|
foreach ($fieldIds AS $fieldId)
|
||||||
@@ -445,15 +454,16 @@ class ProductControllerCore extends FrontController
|
|||||||
foreach ($specificPrices AS $key => &$row)
|
foreach ($specificPrices AS $key => &$row)
|
||||||
{
|
{
|
||||||
$row['quantity'] = &$row['from_quantity'];
|
$row['quantity'] = &$row['from_quantity'];
|
||||||
// The price may be directly set
|
if ($row['price'] != 0) // The price may be directly set
|
||||||
if ($row['price'] != 0)
|
|
||||||
{
|
{
|
||||||
$cur_price = (Product::$_taxCalculationMethod == PS_TAX_EXC ? $row['price'] : $row['price'] * (1 + $taxRate / 100));
|
$cur_price = (Product::$_taxCalculationMethod == PS_TAX_EXC ? $row['price'] : $row['price'] * (1 + $taxRate / 100));
|
||||||
|
|
||||||
if ($row['reduction_type'] == 'amount')
|
if ($row['reduction_type'] == 'amount')
|
||||||
|
{
|
||||||
$cur_price = Product::$_taxCalculationMethod == PS_TAX_INC ? $cur_price - $row['reduction'] : $cur_price - ($row['reduction'] / (1 + $taxRate / 100));
|
$cur_price = Product::$_taxCalculationMethod == PS_TAX_INC ? $cur_price - $row['reduction'] : $cur_price - ($row['reduction'] / (1 + $taxRate / 100));
|
||||||
else
|
} else {
|
||||||
$cur_price = $cur_price * ( 1 - ($row['reduction']));
|
$cur_price = $cur_price * ( 1 - ($row['reduction']));
|
||||||
|
}
|
||||||
|
|
||||||
$row['real_value'] = $price - $cur_price;
|
$row['real_value'] = $price - $cur_price;
|
||||||
}
|
}
|
||||||
@@ -471,3 +481,4 @@ class ProductControllerCore extends FrontController
|
|||||||
return $specificPrices;
|
return $specificPrices;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,73 +0,0 @@
|
|||||||
.treeview, .treeview ul {
|
|
||||||
padding: 0;
|
|
||||||
margin: 0;
|
|
||||||
list-style: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.treeview ul {
|
|
||||||
margin-top: 4px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.treeview .hitarea {
|
|
||||||
background: url(../img/admin/jquery-treeview/treeview-default.gif) -64px -25px no-repeat;
|
|
||||||
height: 16px;
|
|
||||||
width: 16px;
|
|
||||||
margin-left: -16px;
|
|
||||||
float: left;
|
|
||||||
cursor: pointer;
|
|
||||||
}
|
|
||||||
/* fix for IE6 */
|
|
||||||
* html .hitarea {
|
|
||||||
display: inline;
|
|
||||||
float:none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.treeview li {
|
|
||||||
margin: 0;
|
|
||||||
padding: 3px 0pt 3px 16px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.treeview a.selected {
|
|
||||||
background-color: #eee;
|
|
||||||
}
|
|
||||||
|
|
||||||
#treecontrol { margin: 1em 0; display: none; }
|
|
||||||
|
|
||||||
.treeview .hover { color: gray; cursor: pointer; }
|
|
||||||
|
|
||||||
.treeview li { background: url(../img/admin/jquery-treeview/treeview-default-line.gif) 0 0 no-repeat; }
|
|
||||||
.treeview li.collapsable, .treeview li.expandable { background-position: 0 -176px; }
|
|
||||||
|
|
||||||
.treeview .expandable-hitarea { background-position: -80px -3px; }
|
|
||||||
|
|
||||||
.treeview li.last { background-position: 0 -1766px }
|
|
||||||
.treeview li.lastCollapsable, .treeview li.lastExpandable { background-image: url(../img/admin/jquery-treeview/treeview-default.gif); }
|
|
||||||
.treeview li.lastCollapsable { background-position: 0 -111px }
|
|
||||||
.treeview li.lastExpandable { background-position: -32px -67px }
|
|
||||||
|
|
||||||
.treeview div.lastCollapsable-hitarea, .treeview div.lastExpandable-hitarea { background-position: 0; }
|
|
||||||
|
|
||||||
.treeview-red li { background-image: url(../img/admin/jquery-treeview/treeview-red-line.gif); }
|
|
||||||
.treeview-red .hitarea, .treeview-red li.lastCollapsable, .treeview-red li.lastExpandable { background-image: url(../img/admin/jquery-treeview/treeview-red.gif); }
|
|
||||||
|
|
||||||
.treeview-black li { background-image: url(../img/admin/jquery-treeview/treeview-black-line.gif); }
|
|
||||||
.treeview-black .hitarea, .treeview-black li.lastCollapsable, .treeview-black li.lastExpandable { background-image: url(../img/admin/jquery-treeview/treeview-black.gif); }
|
|
||||||
|
|
||||||
.treeview-gray li { background-image: url(../img/admin/jquery-treeview/treeview-gray-line.gif); }
|
|
||||||
.treeview-gray .hitarea, .treeview-gray li.lastCollapsable, .treeview-gray li.lastExpandable { background-image: url(../img/admin/jquery-treeview/treeview-gray.gif); }
|
|
||||||
|
|
||||||
.treeview-famfamfam li { background-image: url(../img/admin/jquery-treeview/treeview-famfamfam-line.gif); }
|
|
||||||
.treeview-famfamfam .hitarea, .treeview-famfamfam li.lastCollapsable, .treeview-famfamfam li.lastExpandable { background-image: url(../img/admin/jquery-treeview/treeview-famfamfam.gif); }
|
|
||||||
|
|
||||||
.treeview .placeholder {
|
|
||||||
background: url(../img/admin/jquery-treeview/ajax-loader.gif) 0 0 no-repeat;
|
|
||||||
height: 16px;
|
|
||||||
width: 16px;
|
|
||||||
display: block;
|
|
||||||
}
|
|
||||||
|
|
||||||
.filetree li { padding: 3px 0 2px 16px; }
|
|
||||||
.filetree span.folder, .filetree span.file { padding: 1px 0 1px 16px; display: block; }
|
|
||||||
.filetree span.folder { background: url(../img/admin/jquery-treeview/folder.gif) 0 0 no-repeat; }
|
|
||||||
.filetree li.expandable span.folder { background: url(../img/admin/jquery-treeview/folder-closed.gif) 0 0 no-repeat; }
|
|
||||||
.filetree span.file { background: url(../img/admin/jquery-treeview/file.gif) 0 0 no-repeat; }
|
|
||||||
|
Before Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 209 B |
|
Before Width: | Height: | Size: 847 B |
|
Before Width: | Height: | Size: 110 B |
|
Before Width: | Height: | Size: 105 B |
|
Before Width: | Height: | Size: 106 B |
|
Before Width: | Height: | Size: 837 B |
|
Before Width: | Height: | Size: 841 B |
|
Before Width: | Height: | Size: 1.8 KiB |
|
Before Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 807 B |
|
Before Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 1.8 KiB |
|
Before Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 1.8 KiB |
|
Before Width: | Height: | Size: 1.2 KiB |
@@ -20,14 +20,14 @@
|
|||||||
*
|
*
|
||||||
* @author PrestaShop SA <contact@prestashop.com>
|
* @author PrestaShop SA <contact@prestashop.com>
|
||||||
* @copyright 2007-2011 PrestaShop SA
|
* @copyright 2007-2011 PrestaShop SA
|
||||||
* @version Release: $Revision$
|
* @version Release: $Revision: 7040 $
|
||||||
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
||||||
* International Registered Trademark & Property of PrestaShop SA
|
* International Registered Trademark & Property of PrestaShop SA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class ConfigurationTestCore
|
class ConfigurationTest
|
||||||
{
|
{
|
||||||
static function check($tests)
|
static function check($tests)
|
||||||
{
|
{
|
||||||
$res = array();
|
$res = array();
|
||||||
foreach ($tests AS $key => $test)
|
foreach ($tests AS $key => $test)
|
||||||
@@ -35,7 +35,7 @@ class ConfigurationTestCore
|
|||||||
return $res;
|
return $res;
|
||||||
}
|
}
|
||||||
|
|
||||||
static function run($ptr, $arg = 0)
|
static function run($ptr, $arg = 0)
|
||||||
{
|
{
|
||||||
if (call_user_func(array('ConfigurationTest', 'test_'.$ptr), $arg))
|
if (call_user_func(array('ConfigurationTest', 'test_'.$ptr), $arg))
|
||||||
return ('ok');
|
return ('ok');
|
||||||
@@ -43,32 +43,32 @@ class ConfigurationTestCore
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Misc functions
|
// Misc functions
|
||||||
static function test_phpversion()
|
static function test_phpversion()
|
||||||
{
|
{
|
||||||
return version_compare(substr(phpversion(), 0, 3), '5.0', '>=');
|
return version_compare(substr(phpversion(), 0, 3), '5.0', '>=');
|
||||||
}
|
}
|
||||||
|
|
||||||
static function test_mysql_support()
|
static function test_mysql_support()
|
||||||
{
|
{
|
||||||
return function_exists('mysql_connect');
|
return function_exists('mysql_connect');
|
||||||
}
|
}
|
||||||
|
|
||||||
static function test_magicquotes()
|
static function test_magicquotes()
|
||||||
{
|
{
|
||||||
return !ini_get('magic_quotes_gpc');
|
return !ini_get('magic_quotes_gpc');
|
||||||
}
|
}
|
||||||
|
|
||||||
static function test_upload()
|
static function test_upload()
|
||||||
{
|
{
|
||||||
return ini_get('file_uploads');
|
return ini_get('file_uploads');
|
||||||
}
|
}
|
||||||
|
|
||||||
static function test_fopen()
|
static function test_fopen()
|
||||||
{
|
{
|
||||||
return ini_get('allow_url_fopen');
|
return ini_get('allow_url_fopen');
|
||||||
}
|
}
|
||||||
|
|
||||||
static function test_system($funcs)
|
static function test_system($funcs)
|
||||||
{
|
{
|
||||||
foreach ($funcs AS $func)
|
foreach ($funcs AS $func)
|
||||||
if (!function_exists($func))
|
if (!function_exists($func))
|
||||||
@@ -76,17 +76,17 @@ class ConfigurationTestCore
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
static function test_gd()
|
static function test_gd()
|
||||||
{
|
{
|
||||||
return function_exists('imagecreatetruecolor');
|
return function_exists('imagecreatetruecolor');
|
||||||
}
|
}
|
||||||
|
|
||||||
static function test_register_globals()
|
static function test_register_globals()
|
||||||
{
|
{
|
||||||
return !ini_get('register_globals');
|
return !ini_get('register_globals');
|
||||||
}
|
}
|
||||||
|
|
||||||
static function test_gz()
|
static function test_gz()
|
||||||
{
|
{
|
||||||
if (function_exists('gzencode'))
|
if (function_exists('gzencode'))
|
||||||
return !(@gzencode('dd') === false);
|
return !(@gzencode('dd') === false);
|
||||||
@@ -94,7 +94,7 @@ class ConfigurationTestCore
|
|||||||
}
|
}
|
||||||
|
|
||||||
// is_writable dirs
|
// is_writable dirs
|
||||||
static function test_dir($dir, $recursive = false)
|
static function test_dir($dir, $recursive = false)
|
||||||
{
|
{
|
||||||
if (!file_exists($dir) OR !$dh = opendir($dir))
|
if (!file_exists($dir) OR !$dh = opendir($dir))
|
||||||
return false;
|
return false;
|
||||||
@@ -119,112 +119,107 @@ class ConfigurationTestCore
|
|||||||
}
|
}
|
||||||
|
|
||||||
// is_writable files
|
// is_writable files
|
||||||
static function test_file($file)
|
static function test_file($file)
|
||||||
{
|
{
|
||||||
return (file_exists($file) AND is_writable($file));
|
return (file_exists($file) AND is_writable($file));
|
||||||
}
|
}
|
||||||
|
|
||||||
static function test_config_dir($dir)
|
static function test_config_dir($dir)
|
||||||
{
|
{
|
||||||
return self::test_dir($dir);
|
return self::test_dir($dir);
|
||||||
}
|
}
|
||||||
|
|
||||||
static function test_sitemap($dir)
|
static function test_sitemap($dir)
|
||||||
{
|
{
|
||||||
return self::test_file($dir);
|
return self::test_file($dir);
|
||||||
}
|
}
|
||||||
|
|
||||||
static function test_root_dir($dir)
|
static function test_root_dir($dir)
|
||||||
{
|
{
|
||||||
return self::test_dir($dir);
|
return self::test_dir($dir);
|
||||||
}
|
}
|
||||||
|
|
||||||
static function test_log_dir($dir)
|
static function test_log_dir($dir)
|
||||||
{
|
{
|
||||||
return self::test_dir($dir);
|
return self::test_dir($dir);
|
||||||
}
|
}
|
||||||
|
|
||||||
static function test_admin_dir($dir)
|
static function test_admin_dir($dir)
|
||||||
{
|
{
|
||||||
return self::test_dir($dir);
|
return self::test_dir($dir);
|
||||||
}
|
}
|
||||||
|
|
||||||
static function test_img_dir($dir)
|
static function test_img_dir($dir)
|
||||||
{
|
{
|
||||||
return self::test_dir($dir, true);
|
return self::test_dir($dir, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
static function test_module_dir($dir)
|
static function test_module_dir($dir)
|
||||||
{
|
{
|
||||||
return self::test_dir($dir, true);
|
return self::test_dir($dir, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
static function test_tools_dir($dir)
|
static function test_tools_dir($dir)
|
||||||
{
|
{
|
||||||
return self::test_dir($dir);
|
return self::test_dir($dir);
|
||||||
}
|
}
|
||||||
|
|
||||||
static function test_cache_dir($dir)
|
static function test_cache_dir($dir)
|
||||||
{
|
{
|
||||||
return self::test_dir($dir);
|
return self::test_dir($dir);
|
||||||
}
|
}
|
||||||
|
|
||||||
static function test_tools_v2_dir($dir)
|
static function test_tools_v2_dir($dir)
|
||||||
{
|
{
|
||||||
return self::test_dir($dir);
|
return self::test_dir($dir);
|
||||||
}
|
}
|
||||||
|
|
||||||
static function test_cache_v2_dir($dir)
|
static function test_cache_v2_dir($dir)
|
||||||
{
|
{
|
||||||
return self::test_dir($dir);
|
return self::test_dir($dir);
|
||||||
}
|
}
|
||||||
|
|
||||||
static function test_download_dir($dir)
|
static function test_download_dir($dir)
|
||||||
{
|
{
|
||||||
return self::test_dir($dir);
|
return self::test_dir($dir);
|
||||||
}
|
}
|
||||||
|
|
||||||
static function test_mails_dir($dir)
|
static function test_mails_dir($dir)
|
||||||
{
|
{
|
||||||
return self::test_dir($dir, true);
|
return self::test_dir($dir, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
static function test_translations_dir($dir)
|
static function test_translations_dir($dir)
|
||||||
{
|
{
|
||||||
return self::test_dir($dir, true);
|
return self::test_dir($dir, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
static function test_theme_lang_dir($dir)
|
static function test_theme_lang_dir($dir)
|
||||||
{
|
{
|
||||||
if (!file_exists($dir))
|
if (!file_exists($dir))
|
||||||
return true;
|
return true;
|
||||||
return self::test_dir($dir, true);
|
return self::test_dir($dir, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
static function test_theme_cache_dir($dir)
|
static function test_theme_cache_dir($dir)
|
||||||
{
|
{
|
||||||
if (!file_exists($dir))
|
if (!file_exists($dir))
|
||||||
return true;
|
return true;
|
||||||
return self::test_dir($dir, true);
|
return self::test_dir($dir, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
static function test_customizable_products_dir($dir)
|
static function test_customizable_products_dir($dir)
|
||||||
{
|
{
|
||||||
return self::test_dir($dir);
|
return self::test_dir($dir);
|
||||||
}
|
}
|
||||||
|
|
||||||
static function test_virtual_products_dir($dir)
|
static function test_virtual_products_dir($dir)
|
||||||
{
|
{
|
||||||
return self::test_dir($dir);
|
return self::test_dir($dir);
|
||||||
}
|
}
|
||||||
|
|
||||||
static function test_mcrypt()
|
static function test_mcrypt()
|
||||||
{
|
{
|
||||||
return function_exists('mcrypt_encrypt');
|
return function_exists('mcrypt_encrypt');
|
||||||
}
|
}
|
||||||
|
|
||||||
static function test_dom()
|
|
||||||
{
|
|
||||||
return extension_loaded('Dom');
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -463,9 +463,7 @@ class GetVersionFromDb
|
|||||||
// List keys
|
// List keys
|
||||||
$struct[$virtualTable]['@keys'] = array();
|
$struct[$virtualTable]['@keys'] = array();
|
||||||
$sql = 'SHOW INDEX FROM ' . $table;
|
$sql = 'SHOW INDEX FROM ' . $table;
|
||||||
$results = Db::getInstance()->executeS($sql);
|
foreach (Db::getInstance()->executeS($sql) as $rowIndex)
|
||||||
if($results)
|
|
||||||
foreach ($results as $rowIndex)
|
|
||||||
{
|
{
|
||||||
$keyName = strtolower($rowIndex['Key_name']);
|
$keyName = strtolower($rowIndex['Key_name']);
|
||||||
$type = 'index';
|
$type = 'index';
|
||||||
|
|||||||
@@ -28,15 +28,9 @@ class ToolsInstall
|
|||||||
{
|
{
|
||||||
public static function checkDB ($srv, $login, $password, $name, $posted = true, $engine = false)
|
public static function checkDB ($srv, $login, $password, $name, $posted = true, $engine = false)
|
||||||
{
|
{
|
||||||
// Don't include theses files if classes are already defined
|
include_once(INSTALL_PATH.'/../classes/Validate.php');
|
||||||
if (!class_exists('Validate', false))
|
include_once(INSTALL_PATH.'/../classes/Db.php');
|
||||||
include_once(INSTALL_PATH.'/../classes/Validate.php');
|
include_once(INSTALL_PATH.'/../classes/MySQL.php');
|
||||||
|
|
||||||
if (!class_exists('Db', false))
|
|
||||||
include_once(INSTALL_PATH.'/../classes/Db.php');
|
|
||||||
|
|
||||||
if (!class_exists('MySQL', false))
|
|
||||||
include_once(INSTALL_PATH.'/../classes/MySQL.php');
|
|
||||||
|
|
||||||
if($posted)
|
if($posted)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -73,9 +73,6 @@ function showStep(aStep, way)
|
|||||||
.removeClass("selected")
|
.removeClass("selected")
|
||||||
.removeClass("finished");
|
.removeClass("finished");
|
||||||
if (step < 6) {
|
if (step < 6) {
|
||||||
if (step == 5)
|
|
||||||
$('#tabs li:nth-child(' + step + ')').addClass("finished");
|
|
||||||
else
|
|
||||||
$('#tabs li:nth-child(' + step + ')').addClass("selected");
|
$('#tabs li:nth-child(' + step + ')').addClass("selected");
|
||||||
$('#tabs li:lt(' + (step - 1) + ')').addClass("finished");
|
$('#tabs li:lt(' + (step - 1) + ')').addClass("finished");
|
||||||
}
|
}
|
||||||
@@ -109,7 +106,7 @@ function showStep(aStep, way)
|
|||||||
$('#tabs li:nth-child(1)').removeClass("selected").addClass("finished");
|
$('#tabs li:nth-child(1)').removeClass("selected").addClass("finished");
|
||||||
$('#tabs li:nth-child(2)').removeClass("selected").addClass("finished");
|
$('#tabs li:nth-child(2)').removeClass("selected").addClass("finished");
|
||||||
$('#tabs li:nth-child(3)').removeClass("selected").addClass("finished");
|
$('#tabs li:nth-child(3)').removeClass("selected").addClass("finished");
|
||||||
$('#tabs li:nth-child(4)').addClass("finished");
|
$('#tabs li:nth-child(4)').addClass("selected").removeClass("finished");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -279,26 +276,26 @@ function verifyAndSetRequire(firsttime)
|
|||||||
for (i = 0; i < testListRequired.length; i++){
|
for (i = 0; i < testListRequired.length; i++){
|
||||||
result = testListRequired[i].getAttribute("result");
|
result = testListRequired[i].getAttribute("result");
|
||||||
$($("div#sheet_require"+isUpdate+" > ul#required"+isUpdate+" .required")[i])
|
$($("div#sheet_require"+isUpdate+" > ul#required"+isUpdate+" .required")[i])
|
||||||
.removeClass( (result == "fail") ? "okBlock" : "errorBlock" )
|
.removeClass( (result == "fail") ? "ok" : "fail" )
|
||||||
.addClass(result);
|
.addClass(result);
|
||||||
if (result == "fail") configIsOk = false;
|
if (result == "fail") configIsOk = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
testListOptional = testLists[1].getElementsByTagName('test');
|
testListOptional = testLists[1].getElementsByTagName('test');
|
||||||
|
|
||||||
for (i = 0; i < testListOptional.length; i++){
|
for (i = 0; i < testListOptional.length; i++){
|
||||||
result = testListOptional[i].getAttribute("result");
|
result = testListOptional[i].getAttribute("result");
|
||||||
$($("div#sheet_require"+isUpdate+" > ul#optional"+isUpdate+" li.optional")[i])
|
$($("div#sheet_require"+isUpdate+" > ul#optional"+isUpdate+" li.optional")[i])
|
||||||
.removeClass( (result == "fail") ? "okBlock" : "errorBlock" )
|
.removeClass( (result == "fail") ? "ok" : "fail" )
|
||||||
.addClass(result);
|
.addClass(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!configIsOk) {
|
if (!configIsOk) {
|
||||||
$('#btNext').attr({'disabled':'disabled','class':'button little disabled'});
|
$('#btNext').attr({'disabled':'disabled','class':'button little disabled'});
|
||||||
$('h3#resultConfig'+isUpdate).html(txtConfigIsNotOk).removeClass('okBlock').addClass('errorBlock').slideDown('slow');
|
$('h3#resultConfig'+isUpdate).html(txtConfigIsNotOk).slideDown('slow');
|
||||||
$('h3#resultConfigHelper').show();
|
$('h3#resultConfigHelper').show();
|
||||||
$("div#sheet_require"+isUpdate+" > ul").slideDown("1500");
|
$("div#sheet_require"+isUpdate+" > ul").slideDown("1500");
|
||||||
$('#stepList_2 li:contains("Etape 2")').addClass('ko');
|
|
||||||
} else {
|
} else {
|
||||||
$("#btNext").removeAttr('disabled');
|
$("#btNext").removeAttr('disabled');
|
||||||
$('#btNext').removeClass('disabled');
|
$('#btNext').removeClass('disabled');
|
||||||
@@ -308,10 +305,9 @@ function verifyAndSetRequire(firsttime)
|
|||||||
$("input#btNext").click();
|
$("input#btNext").click();
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$('h3#resultConfig'+isUpdate).html(txtConfigIsOk).removeClass('errorBlock').addClass('okBlock').slideDown('slow');
|
$('h3#resultConfig'+isUpdate).html(txtConfigIsOk).slideDown('slow');
|
||||||
$('h3#resultConfigHelper').hide();
|
$('h3#resultConfigHelper').hide();
|
||||||
$("div#sheet_require"+isUpdate+" > ul").slideDown("1500");
|
$("div#sheet_require"+isUpdate+" > ul").slideDown("1500");
|
||||||
$('#stepList_2 li:contains("Etape 2")').removeClass('ko');
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -324,38 +320,32 @@ function verifyDbAccess ()
|
|||||||
//local verifications
|
//local verifications
|
||||||
if($("#dbServer[value=]").length > 0)
|
if($("#dbServer[value=]").length > 0)
|
||||||
{
|
{
|
||||||
$("#dbResultCheck").addClass("errorBlock").removeClass("okBlock").removeClass('infosBlock').html(txtDbServerEmpty).slideDown('slow');
|
$("#dbResultCheck").addClass("fail").removeClass("ok").removeClass('userInfos').html(txtDbServerEmpty).show('slow');
|
||||||
$('#stepList_3 li:contains("Etape 3")').addClass('ko');
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$("#dbResultCheck").removeClass("errorBlock").removeClass("okBlock").removeClass('infosBlock').html('');
|
$("#dbResultCheck").removeClass("fail").removeClass("ok").removeClass('userInfos').html('');
|
||||||
$('#stepList_3 li:contains("Etape 3")').removeClass('ko');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if($("#dbLogin[value=]").length > 0)
|
if($("#dbLogin[value=]").length > 0)
|
||||||
{
|
{
|
||||||
$("#dbResultCheck").addClass("errorBlock").removeClass("okBlock").removeClass('infosBlock').html(txtDbLoginEmpty).slideDown('slow');
|
$("#dbResultCheck").addClass("fail").removeClass("ok").removeClass('userInfos').html(txtDbLoginEmpty).show('slow');
|
||||||
$('#stepList_3 li:contains("Etape 3")').addClass('ko');
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$("#dbResultCheck").removeClass("errorBlock").removeClass("okBlock").removeClass('infosBlock').html('');
|
$("#dbResultCheck").removeClass("fail").removeClass("ok").removeClass('userInfos').html('');
|
||||||
$('#stepList_3 li:contains("Etape 3")').removeClass('ko');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if($("#dbName[value=]").length > 0)
|
if($("#dbName[value=]").length > 0)
|
||||||
{
|
{
|
||||||
$("#dbResultCheck").addClass("errorBlock").removeClass("okBlock").removeClass('infosBlock').html(txtDbNameEmpty).slideDown('slow');
|
$("#dbResultCheck").addClass("fail").removeClass("ok").removeClass('userInfos').html(txtDbNameEmpty).show('slow');
|
||||||
$('#stepList_3 li:contains("Etape 3")').addClass('ko');
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$("#dbResultCheck").removeClass("errorBlock").removeClass("okBlock").removeClass('infosBlock').html('');
|
$("#dbResultCheck").removeClass("fail").removeClass("ok").removeClass('userInfos').html('');
|
||||||
$('#stepList_3 li:contains("Etape 3")').removeClass('ko');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//external verifications and sets
|
//external verifications and sets
|
||||||
@@ -377,23 +367,21 @@ function verifyDbAccess ()
|
|||||||
if (ret.getAttribute("result") == "ok")
|
if (ret.getAttribute("result") == "ok")
|
||||||
{
|
{
|
||||||
$("#dbResultCheck")
|
$("#dbResultCheck")
|
||||||
.addClass("okBlock")
|
.addClass("ok")
|
||||||
.removeClass("errorBlock")
|
.removeClass("fail")
|
||||||
.html(txtError[23])
|
.html(txtError[23])
|
||||||
.slideDown('slow');
|
.show('slow');
|
||||||
$("#dbCreateResultCheck")
|
$("#dbCreateResultCheck")
|
||||||
.slideUp('slow');
|
.hide('slow');
|
||||||
$('#stepList_3 li:contains("Etape 3")').removeClass('ko');
|
|
||||||
} else
|
} else
|
||||||
{
|
{
|
||||||
$("#dbResultCheck")
|
$("#dbResultCheck")
|
||||||
.addClass("errorBlock")
|
.addClass("fail")
|
||||||
.removeClass("okBlock")
|
.removeClass("ok")
|
||||||
.html(txtError[parseInt(ret.getAttribute("error"))])
|
.html(txtError[parseInt(ret.getAttribute("error"))])
|
||||||
.slideDown('slow');
|
.show('slow');
|
||||||
$("#dbCreateResultCheck")
|
$("#dbCreateResultCheck")
|
||||||
.slideUp('slow');
|
.hide('slow');
|
||||||
$('#stepList_3 li:contains("Etape 3")').addClass('ko');
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -428,12 +416,11 @@ function createDB()
|
|||||||
action_ret = ret.getElementsByTagName('action')[0];
|
action_ret = ret.getElementsByTagName('action')[0];
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
$("#dbCreateResultCheck")
|
$("#dbCreateResultCheck")
|
||||||
.addClass("errorBlock")
|
.addClass("fail")
|
||||||
.removeClass("okBlock")
|
.removeClass("ok")
|
||||||
.removeClass('infosBlock')
|
.removeClass('userInfos')
|
||||||
.html(ret)
|
.html(ret)
|
||||||
.show();
|
.show();
|
||||||
$('#stepList_3 li:contains("Etape 3")').addClass('ko');
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (action_ret.getAttribute("result") == "ok")
|
if (action_ret.getAttribute("result") == "ok")
|
||||||
@@ -465,9 +452,9 @@ function createDB()
|
|||||||
if (action_ret.getAttribute("error") == "11")
|
if (action_ret.getAttribute("error") == "11")
|
||||||
{
|
{
|
||||||
$("#dbCreateResultCheck")
|
$("#dbCreateResultCheck")
|
||||||
.addClass("errorBlock")
|
.addClass("fail")
|
||||||
.removeClass("okBlock")
|
.removeClass("ok")
|
||||||
.removeClass('infosBlock')
|
.removeClass('userInfos')
|
||||||
.html(
|
.html(
|
||||||
txtError[11]+ "<br />\'"+
|
txtError[11]+ "<br />\'"+
|
||||||
action_ret.getAttribute("sqlQuery") + "\'<br/>"+
|
action_ret.getAttribute("sqlQuery") + "\'<br/>"+
|
||||||
@@ -478,13 +465,12 @@ function createDB()
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
$("#dbCreateResultCheck")
|
$("#dbCreateResultCheck")
|
||||||
.addClass("errorBlock")
|
.addClass("fail")
|
||||||
.removeClass("okBlock")
|
.removeClass("ok")
|
||||||
.removeClass('infosBlock')
|
.removeClass('userInfos')
|
||||||
.html(txtError[parseInt(action_ret.getAttribute("error"))])
|
.html(txtError[parseInt(action_ret.getAttribute("error"))])
|
||||||
.show();
|
.show();
|
||||||
}
|
}
|
||||||
$('#stepList_3 li:contains("Etape 3")').addClass('ko');
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -496,27 +482,29 @@ function verifyMail()
|
|||||||
//local verifications
|
//local verifications
|
||||||
if ($("#testEmail[value=]").length > 0)
|
if ($("#testEmail[value=]").length > 0)
|
||||||
{
|
{
|
||||||
$("#mailResultCheck").addClass("errorBlock").removeClass("okBlock").removeClass('infosBlock').html(txtError[0]);
|
$("#mailResultCheck").addClass("fail").removeClass("ok").removeClass('userInfos').html(txtError[0]);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
else if (!verifMailREGEX.test( $("#testEmail").val() ))
|
else if (!verifMailREGEX.test( $("#testEmail").val() ))
|
||||||
{
|
{
|
||||||
$("#mailResultCheck").addClass("errorBlock").removeClass("okBlock").removeClass('infosBlock').html(txtError[3]);
|
$("#mailResultCheck").addClass("fail").removeClass("ok").removeClass('userInfos').html(txtError[3]);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
||||||
if (smtpChecked)
|
if (smtpChecked)
|
||||||
{
|
{
|
||||||
//local verifications
|
//local verifications
|
||||||
if($("#smtpSrv[value=]").length > 0)
|
if($("#smtpSrv[value=]").length > 0)
|
||||||
{
|
{
|
||||||
$("#mailResultCheck").addClass("errorBlock").removeClass("okBlock").removeClass('infosBlock').html(txtSmtpSrvEmpty);
|
$("#mailResultCheck").addClass("fail").removeClass("ok").removeClass('userInfos').html(txtSmtpSrvEmpty);
|
||||||
smtpIsOk = false;
|
smtpIsOk = false;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//external verifications and sets
|
//external verifications and sets
|
||||||
$.ajax(
|
$.ajax(
|
||||||
{
|
{
|
||||||
@@ -540,13 +528,13 @@ function verifyMail()
|
|||||||
|
|
||||||
if (ret.getAttribute("result") == "ok")
|
if (ret.getAttribute("result") == "ok")
|
||||||
{
|
{
|
||||||
$("#mailResultCheck").addClass("okBlock").removeClass("errorBlock").removeClass('infosBlock').html(mailSended);
|
$("#mailResultCheck").addClass("ok").removeClass("fail").removeClass('userInfos').html(mailSended);
|
||||||
mailIsOk = true;
|
mailIsOk = true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
mailIsOk = false;
|
mailIsOk = false;
|
||||||
$("#mailResultCheck").addClass("errorBlock").removeClass("okBlock").removeClass('infosBlock').html(txtError[26]);
|
$("#mailResultCheck").addClass("fail").removeClass("ok").removeClass('userInfos').html(txtError[26]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -571,13 +559,13 @@ function uploadLogo ()
|
|||||||
{
|
{
|
||||||
if(data.error != '')
|
if(data.error != '')
|
||||||
{
|
{
|
||||||
$("#resultInfosLogo").html( txtError[parseInt(data.error)] ).addClass("errorBlock").show();
|
$("#resultInfosLogo").html( txtError[parseInt(data.error)] ).addClass("fail").show();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$(this).attr('src', ps_base_uri + 'img/logo.jpg?' + (new Date()))
|
$(this).attr('src', ps_base_uri + 'img/logo.jpg?' + (new Date()))
|
||||||
$(this).show('slow');
|
$(this).show('slow');
|
||||||
$("#resultInfosLogo").html("").removeClass("errorBlock").hide();
|
$("#resultInfosLogo").html("").removeClass("fail").hide();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -585,7 +573,7 @@ function uploadLogo ()
|
|||||||
error: function (data, status, e)
|
error: function (data, status, e)
|
||||||
{
|
{
|
||||||
$("#uploadedImage").attr('src', ps_base_uri + 'img/logo.jpg?' + (new Date()));
|
$("#uploadedImage").attr('src', ps_base_uri + 'img/logo.jpg?' + (new Date()));
|
||||||
$("#resultInfosLogo").html("").addClass("errorBlock");
|
$("#resultInfosLogo").html("").addClass("fail");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
@@ -633,7 +621,7 @@ function ajaxRefreshField(nthField, idResultField, fieldsList, inputId)
|
|||||||
{
|
{
|
||||||
$("#"+idResultField)
|
$("#"+idResultField)
|
||||||
.html( txtError[parseInt(fieldsList[nthField].getAttribute("error"))] )
|
.html( txtError[parseInt(fieldsList[nthField].getAttribute("error"))] )
|
||||||
.addClass("errorBlock")
|
.addClass("fail")
|
||||||
.show("slow");
|
.show("slow");
|
||||||
if (validShopInfos)
|
if (validShopInfos)
|
||||||
$("#"+inputId).focus();
|
$("#"+inputId).focus();
|
||||||
@@ -643,7 +631,7 @@ function ajaxRefreshField(nthField, idResultField, fieldsList, inputId)
|
|||||||
{
|
{
|
||||||
$("#"+idResultField)
|
$("#"+idResultField)
|
||||||
.html("")
|
.html("")
|
||||||
.removeClass("errorBlock")
|
.removeClass("fail")
|
||||||
.show("slow");
|
.show("slow");
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -663,7 +651,7 @@ function verifyShopInfos()
|
|||||||
$.ajax(
|
$.ajax(
|
||||||
{
|
{
|
||||||
url: "model.php",
|
url: "model.php",
|
||||||
async: true,
|
async: false,
|
||||||
cache: false,
|
cache: false,
|
||||||
data:
|
data:
|
||||||
"method=checkShopInfos"+
|
"method=checkShopInfos"+
|
||||||
@@ -688,7 +676,9 @@ function verifyShopInfos()
|
|||||||
"&smtpPort="+ encodeURIComponent($("input#smtpPort").val())+
|
"&smtpPort="+ encodeURIComponent($("input#smtpPort").val())+
|
||||||
"&smtpEnc="+ encodeURIComponent($("select#smtpEnc option:selected").val())+
|
"&smtpEnc="+ encodeURIComponent($("select#smtpEnc option:selected").val())+
|
||||||
"&mailSubject="+ encodeURIComponent(mailSubject)+
|
"&mailSubject="+ encodeURIComponent(mailSubject)+
|
||||||
"&isoCodeLocalLanguage="+isoCodeLocalLanguage,
|
"&isoCodeLocalLanguage="+isoCodeLocalLanguage
|
||||||
|
,
|
||||||
|
|
||||||
success: function(ret)
|
success: function(ret)
|
||||||
{
|
{
|
||||||
fieldsList = ret.getElementsByTagName('shopConfig')[0].getElementsByTagName('field');
|
fieldsList = ret.getElementsByTagName('shopConfig')[0].getElementsByTagName('field');
|
||||||
@@ -712,7 +702,6 @@ function verifyShopInfos()
|
|||||||
$('#endFirstName').html($('input#infosFirstname').val());
|
$('#endFirstName').html($('input#infosFirstname').val());
|
||||||
$('#endName').html($('input#infosName').val());
|
$('#endName').html($('input#infosName').val());
|
||||||
$('#endEmail').html($('input#infosEmail').val());
|
$('#endEmail').html($('input#infosEmail').val());
|
||||||
showStep(5);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -730,14 +719,14 @@ function autoCheckField(idField, idResultSpan, typeVerif)
|
|||||||
{
|
{
|
||||||
$(idResultSpan)
|
$(idResultSpan)
|
||||||
.show("slow")
|
.show("slow")
|
||||||
.addClass("errorBlock")
|
.addClass("fail")
|
||||||
.html(txtError[0]);
|
.html(txtError[0]);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$(idResultSpan)
|
$(idResultSpan)
|
||||||
.hide("slow")
|
.hide("slow")
|
||||||
.removeClass("errorBlock")
|
.removeClass("fail")
|
||||||
.html("");
|
.html("");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -752,14 +741,14 @@ function autoCheckField(idField, idResultSpan, typeVerif)
|
|||||||
{
|
{
|
||||||
$(idResultSpan)
|
$(idResultSpan)
|
||||||
.show("slow")
|
.show("slow")
|
||||||
.addClass("errorBlock")
|
.addClass("fail")
|
||||||
.html(txtError[3]);
|
.html(txtError[3]);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$(idResultSpan)
|
$(idResultSpan)
|
||||||
.hide("slow")
|
.hide("slow")
|
||||||
.removeClass("errorBlock")
|
.removeClass("fail")
|
||||||
.html("");
|
.html("");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -774,14 +763,14 @@ function autoCheckField(idField, idResultSpan, typeVerif)
|
|||||||
{
|
{
|
||||||
$(idResultSpan)
|
$(idResultSpan)
|
||||||
.show("slow")
|
.show("slow")
|
||||||
.addClass("errorBlock")
|
.addClass("fail")
|
||||||
.html(txtError[47]);
|
.html(txtError[47]);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$(idResultSpan)
|
$(idResultSpan)
|
||||||
.hide("slow")
|
.hide("slow")
|
||||||
.removeClass("errorBlock")
|
.removeClass("fail")
|
||||||
.html("");
|
.html("");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -796,14 +785,14 @@ function autoCheckField(idField, idResultSpan, typeVerif)
|
|||||||
{
|
{
|
||||||
$(idResultSpan)
|
$(idResultSpan)
|
||||||
.show("slow")
|
.show("slow")
|
||||||
.addClass("errorBlock")
|
.addClass("fail")
|
||||||
.html(txtError[48]);
|
.html(txtError[48]);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$(idResultSpan)
|
$(idResultSpan)
|
||||||
.hide("slow")
|
.hide("slow")
|
||||||
.removeClass("errorBlock")
|
.removeClass("fail")
|
||||||
.html("");
|
.html("");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -852,7 +841,8 @@ function doUpgrade()
|
|||||||
url: "model.php",
|
url: "model.php",
|
||||||
cache: false,
|
cache: false,
|
||||||
data:
|
data:
|
||||||
"method=doUpgrade&customModule=" + customModule+ "",
|
"method=doUpgrade&customModule=" + customModule+ ""
|
||||||
|
,
|
||||||
success: function(ret)
|
success: function(ret)
|
||||||
{
|
{
|
||||||
var ret;
|
var ret;
|
||||||
@@ -869,19 +859,18 @@ function doUpgrade()
|
|||||||
{
|
{
|
||||||
requests = ret.getElementsByTagName('request');
|
requests = ret.getElementsByTagName('request');
|
||||||
$("#updateLog").empty();
|
$("#updateLog").empty();
|
||||||
$("#updateLog").hide();
|
|
||||||
$(requests).each(function()
|
$(requests).each(function()
|
||||||
{
|
{
|
||||||
var html = "<div class='request'>" + $(this).children("sqlQuery").text();
|
$("#updateLog").append("<div class='request'>" + $(this).children("sqlQuery").text() + "</div><br/>");
|
||||||
if($(this).attr("result") == "fail")
|
if($(this).attr("result") == "fail")
|
||||||
{
|
{
|
||||||
countSqlError++;
|
countSqlError++;
|
||||||
html += "<br /><span class='fail'>(" + $(this).children("sqlNumberError").text() + ") " + $(this).children("sqlMsgError").text() + "</span><br style='clear:both;'/>";
|
$("#updateLog").append("<span class='fail'>(" + $(this).children("sqlNumberError").text() + ") " + $(this).children("sqlMsgError").text() + "</span><br/>");
|
||||||
}
|
}
|
||||||
$("#updateLog").append(html+"</div><br/>");
|
|
||||||
});
|
});
|
||||||
if (ret.getAttribute("error") == "34")
|
if (ret.getAttribute("error") == "34")
|
||||||
$("#txtErrorUpdateSQL").html(txtError[35]+" "+countSqlError+" "+txtError[36]).show();
|
$("#txtErrorUpdateSQL").html(txtError[35]+" "+countSqlError+" "+txtError[36]);
|
||||||
showStep(9);
|
showStep(9);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -916,18 +905,29 @@ $(document).ready(
|
|||||||
$("#container").show();
|
$("#container").show();
|
||||||
|
|
||||||
//ajax animation
|
//ajax animation
|
||||||
$("#loaderSpace").ajaxStart(
|
$("#loader").ajaxStart(
|
||||||
function()
|
function()
|
||||||
{
|
{
|
||||||
$(this).fadeIn('slow');
|
$(this).fadeIn();
|
||||||
$(this).children('div').fadeIn('slow');
|
$("#btNext[disabled!=1], #btBack[disabled!=1]").attr("disabled", "disabled").addClass("disabled").addClass("lockedForAjax");
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
$("#loaderSpace").ajaxComplete(
|
$("#loader").ajaxComplete(
|
||||||
function(e, xhr, settings)
|
function(e, xhr, settings)
|
||||||
{
|
{
|
||||||
$(this).fadeOut('slow');
|
$(this).fadeOut();
|
||||||
$(this).children('div').fadeOut('slow');
|
if (!errorOccured)
|
||||||
|
{
|
||||||
|
$(".lockedForAjax").removeAttr("disabled").removeClass("disabled").removeClass("lockedForAjax");
|
||||||
|
if (step == 1)
|
||||||
|
$("#btNext[disabled!=1], #btBack[disabled!=1]").attr("disabled", "disabled").addClass("disabled").addClass("lockedForAjax");
|
||||||
|
if (step == 6)
|
||||||
|
{
|
||||||
|
$('#btNext, #btBack').removeAttr('disabled').removeClass('disabled');
|
||||||
|
if (!$('#btDisclaimerOk').is(':checked'))
|
||||||
|
$("#btNext[disabled!=1]").attr("disabled", "disabled").addClass("disabled").addClass("lockedForAjax");
|
||||||
|
}
|
||||||
|
}
|
||||||
errorOccured = false;
|
errorOccured = false;
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
@@ -950,7 +950,6 @@ $(document).ready(
|
|||||||
);
|
);
|
||||||
|
|
||||||
//set SMTP pannels states
|
//set SMTP pannels states
|
||||||
$("div#mailSMTPParam").hide();
|
|
||||||
$("#set_stmp").bind("click",
|
$("#set_stmp").bind("click",
|
||||||
function()
|
function()
|
||||||
{
|
{
|
||||||
@@ -959,10 +958,13 @@ $(document).ready(
|
|||||||
case 0 :
|
case 0 :
|
||||||
$("div#mailSMTPParam").slideUp('slow');
|
$("div#mailSMTPParam").slideUp('slow');
|
||||||
smtpChecked = false;
|
smtpChecked = false;
|
||||||
|
$("#mailResultCheck").addClass("userInfos").removeClass("ok").removeClass('fail').html("");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 1 :
|
case 1 :
|
||||||
$("div#mailSMTPParam").slideDown('slow');
|
$("div#mailSMTPParam").slideDown('slow');
|
||||||
smtpChecked = true;
|
smtpChecked = true;
|
||||||
|
$("#mailResultCheck").addClass("userInfos").removeClass("ok").removeClass('fail').html("");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 215 B |
|
Before Width: | Height: | Size: 141 B |
|
Before Width: | Height: | Size: 233 B |
|
Before Width: | Height: | Size: 298 B |
|
Before Width: | Height: | Size: 139 B |
|
Before Width: | Height: | Size: 1006 B |
|
Before Width: | Height: | Size: 218 B |
|
Before Width: | Height: | Size: 885 B |
|
Before Width: | Height: | Size: 2.2 KiB |
|
Before Width: | Height: | Size: 204 B |
|
Before Width: | Height: | Size: 109 B |
|
Before Width: | Height: | Size: 262 B |
|
Before Width: | Height: | Size: 772 B |
|
Before Width: | Height: | Size: 474 B |
|
Before Width: | Height: | Size: 248 B After Width: | Height: | Size: 474 B |
|
Before Width: | Height: | Size: 251 B After Width: | Height: | Size: 752 B |
|
Before Width: | Height: | Size: 251 B After Width: | Height: | Size: 772 B |
|
Before Width: | Height: | Size: 251 B |
|
Before Width: | Height: | Size: 251 B |
|
Before Width: | Height: | Size: 4.3 KiB After Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 450 B |
|
Before Width: | Height: | Size: 453 B |
|
Before Width: | Height: | Size: 374 B |
|
Before Width: | Height: | Size: 7.4 KiB |
|
Before Width: | Height: | Size: 11 KiB |
@@ -245,30 +245,18 @@ if ($lm->getIncludeTradFilename())
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="container">
|
<div id="container">
|
||||||
<div id="header" class="clearfix">
|
|
||||||
<ul id="headerLinks">
|
|
||||||
<li class="lnk_forum"><a href="http://www.prestashop.com/forums/" target="_blank"><?php echo lang('Forum'); ?></a></li>
|
|
||||||
<li class="lnk_blog last"><a href="http://www.prestashop.com/blog/"><?php echo lang('Blog'); ?></a></li>
|
|
||||||
<?php if ((isset($_GET['language']) AND $_GET['language'] == 1) OR $lm->getIsoCodeSelectedLang() == 'fr'): ?>
|
|
||||||
<li id="phone_block" class="last">
|
|
||||||
<div><?php echo '<span>'.lang('Contact us!').'</span><br />'.lang('+33 (0)1.40.18.30.04'); ?></div>
|
|
||||||
</li>
|
|
||||||
<?php endif; ?>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<div id="PrestaShopLogo">PrestaShop</div>
|
|
||||||
|
|
||||||
<div id="infosSup">
|
|
||||||
<div class="installerVersion" id="installerVersion-<?php echo $lm->getIsoCodeSelectedLang()?>">PrestaShop <?php echo INSTALL_VERSION.'<br />'.lang('Installer'); ?></div>
|
|
||||||
<div class="updaterVersion" id="updaterVersion-<?php echo $lm->getIsoCodeSelectedLang()?>">PrestaShop <?php echo INSTALL_VERSION.'<br />'.lang('Updater'); ?></div>
|
|
||||||
</div>
|
|
||||||
</div><!-- /end header -->
|
|
||||||
|
|
||||||
<div id="loaderSpace">
|
<div id="loaderSpace">
|
||||||
<div id="loader"> </div>
|
<div id="loader"> </div>
|
||||||
</div><!-- /end loaderSpace -->
|
</div>
|
||||||
|
|
||||||
<div id="leftpannel">
|
<div id="leftpannel">
|
||||||
|
<h1>
|
||||||
|
<div id="PrestaShopLogo"> </div>
|
||||||
|
<div class="installerVersion" id="installerVersion-<?php echo $lm->getIsoCodeSelectedLang()?>">PrestaShop <?php echo INSTALL_VERSION.'<br />'.lang('Installer'); ?></div>
|
||||||
|
<div class="updaterVersion" id="updaterVersion-<?php echo $lm->getIsoCodeSelectedLang()?>">PrestaShop <?php echo INSTALL_VERSION.'<br />'.lang('Updater'); ?></div>
|
||||||
|
</h1>
|
||||||
|
|
||||||
<ol id="tabs"><li> </li></ol>
|
<ol id="tabs"><li> </li></ol>
|
||||||
|
|
||||||
<div id="help">
|
<div id="help">
|
||||||
@@ -277,28 +265,27 @@ if ($lm->getIncludeTradFilename())
|
|||||||
<div class="content">
|
<div class="content">
|
||||||
<p class="title"><?php echo lang('Need help?'); ?></p>
|
<p class="title"><?php echo lang('Need help?'); ?></p>
|
||||||
<p class="title_down"><?php echo lang('All tips and advice about PrestaShop'); ?></p>
|
<p class="title_down"><?php echo lang('All tips and advice about PrestaShop'); ?></p>
|
||||||
|
|
||||||
|
<ul>
|
||||||
|
<li><img src="img/puce.gif" alt="" /> <a href="http://www.prestashop.com/forums/" target="_blank"><?php echo lang('Forum'); ?></a><br class="clear" /></li>
|
||||||
|
<li><img src="img/puce.gif" alt="" /> <a href="http://www.prestashop.com/blog/"><?php echo lang('Blog'); ?></a><br class="clear" /></li>
|
||||||
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div><!-- /end help -->
|
</div>
|
||||||
</div><!-- /end leftpannel -->
|
|
||||||
|
<?php if ((isset($_GET['language']) AND $_GET['language'] == 1) OR $lm->getIsoCodeSelectedLang() == 'fr'): ?>
|
||||||
|
<p id="phone_block">
|
||||||
|
<?php echo '<span>'.lang('A question about PrestaShop or issues during installation or upgrade? Call us!').'</span><br /><img src="img/phone.png" style="vertical-align: middle;" alt="" /> '.lang('+33 (0)1.40.18.30.04'); ?>
|
||||||
|
</p>
|
||||||
|
<?php endif; ?>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div id="sheets">
|
<div id="sheets">
|
||||||
|
|
||||||
<div class="sheet shown" id="sheet_lang">
|
<div class="sheet shown" id="sheet_lang">
|
||||||
<div class="contentTitle">
|
<h2><?php echo lang('Welcome')?></h2>
|
||||||
<h1><?php echo lang('Welcome')?></h1>
|
<h3><?php echo lang('Welcome to the PrestaShop '.INSTALL_VERSION.' Installer.')?><br /><?php echo lang('Please allow 5-15 minutes to complete the installation process.')?></h3>
|
||||||
|
|
||||||
<ul id="stepList_1" class="stepList clearfix">
|
|
||||||
<li>Etape 1</li>
|
|
||||||
<li>Etape 2</li>
|
|
||||||
<li>Etape 3</li>
|
|
||||||
<li>Etape 4</li>
|
|
||||||
<li>Etape 5</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<h2><?php echo lang('Welcome to the PrestaShop '.INSTALL_VERSION.' Installer.')?></h2>
|
|
||||||
<p><?php echo lang('Please allow 5-15 minutes to complete the installation process.')?></p>
|
|
||||||
<p><?php echo lang('The PrestaShop Installer will do most of the work in just a few clicks.')?><br /><?php echo lang('However, you must know how to do the following manually:')?></p>
|
<p><?php echo lang('The PrestaShop Installer will do most of the work in just a few clicks.')?><br /><?php echo lang('However, you must know how to do the following manually:')?></p>
|
||||||
<ul>
|
<ul>
|
||||||
<li><?php echo lang('Set permissions on folders & subfolders using Terminal or an FTP client')?></li>
|
<li><?php echo lang('Set permissions on folders & subfolders using Terminal or an FTP client')?></li>
|
||||||
@@ -309,7 +296,7 @@ if ($lm->getIncludeTradFilename())
|
|||||||
<?php echo lang('For more information, please consult our') ?> <a href="http://www.prestashop.com/wiki/Getting_Started/"><?php echo lang('online documentation') ?></a>.
|
<?php echo lang('For more information, please consult our') ?> <a href="http://www.prestashop.com/wiki/Getting_Started/"><?php echo lang('online documentation') ?></a>.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<h2><?php echo lang('Choose the installer language:')?></h2>
|
<h3><?php echo lang('Choose the installer language:')?></h3>
|
||||||
<form id="formSetInstallerLanguage" action="<?php $_SERVER['REQUEST_URI']; ?>" method="get">
|
<form id="formSetInstallerLanguage" action="<?php $_SERVER['REQUEST_URI']; ?>" method="get">
|
||||||
<ul id="langList" style="line-height: 20px;">
|
<ul id="langList" style="line-height: 20px;">
|
||||||
<?php foreach ($lm->getAvailableLangs() as $lang): ?>
|
<?php foreach ($lm->getAvailableLangs() as $lang): ?>
|
||||||
@@ -327,7 +314,7 @@ if ($lm->getIncludeTradFilename())
|
|||||||
<?php echo lang('Prestashop and community offers over 40 different languages for free download on'); ?> <a href="http://www.prestashop.com" target="_blank">http://www.prestashop.com</a>
|
<?php echo lang('Prestashop and community offers over 40 different languages for free download on'); ?> <a href="http://www.prestashop.com" target="_blank">http://www.prestashop.com</a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<h2><?php echo lang('Installation method')?></h2>
|
<h3><?php echo lang('Installation method')?></h3>
|
||||||
<form id="formSetMethod" action="<?php $_SERVER['REQUEST_URI']; ?>" method="post">
|
<form id="formSetMethod" action="<?php $_SERVER['REQUEST_URI']; ?>" method="post">
|
||||||
<p><input <?php echo (!($oldversion AND !$tooOld AND !$sameVersions AND !$installOfOldVersion)) ? 'checked="checked"' : '' ?> type="radio" value="install" name="typeInstall" id="typeInstallInstall"/><label for="typeInstallInstall"><?php echo lang('Installation : complete install of the PrestaShop Solution')?></label></p>
|
<p><input <?php echo (!($oldversion AND !$tooOld AND !$sameVersions AND !$installOfOldVersion)) ? 'checked="checked"' : '' ?> type="radio" value="install" name="typeInstall" id="typeInstallInstall"/><label for="typeInstallInstall"><?php echo lang('Installation : complete install of the PrestaShop Solution')?></label></p>
|
||||||
<p <?php echo ($oldversion AND !$tooOld AND !$sameVersions AND !$installOfOldVersion) ? '' : 'class="disabled"'; ?>><input <?php echo ($oldversion AND !$tooOld AND !$sameVersions AND !$installOfOldVersion) ? 'checked="checked"' : 'disabled="disabled"'; ?> type="radio" value="upgrade" name="typeInstall" id="typeInstallUpgrade"/><label <?php echo ($oldversion === false) ? 'class="disabled"' : ''; ?> for="typeInstallUpgrade"><?php echo lang('Upgrade: get the latest stable version!')?> <?php echo ($oldversion === false) ? lang('(no old version detected)') : ("(".( ($tooOld) ? lang('the already installed version detected is too old, no more update available') : ($installOfOldVersion ? lang('the already installed version detected is too recent, no update available') : lang('installed version detected').' : '.$oldversion )).")") ?></label></p>
|
<p <?php echo ($oldversion AND !$tooOld AND !$sameVersions AND !$installOfOldVersion) ? '' : 'class="disabled"'; ?>><input <?php echo ($oldversion AND !$tooOld AND !$sameVersions AND !$installOfOldVersion) ? 'checked="checked"' : 'disabled="disabled"'; ?> type="radio" value="upgrade" name="typeInstall" id="typeInstallUpgrade"/><label <?php echo ($oldversion === false) ? 'class="disabled"' : ''; ?> for="typeInstallUpgrade"><?php echo lang('Upgrade: get the latest stable version!')?> <?php echo ($oldversion === false) ? lang('(no old version detected)') : ("(".( ($tooOld) ? lang('the already installed version detected is too old, no more update available') : ($installOfOldVersion ? lang('the already installed version detected is too recent, no update available') : lang('installed version detected').' : '.$oldversion )).")") ?></label></p>
|
||||||
@@ -366,20 +353,11 @@ if ($lm->getIncludeTradFilename())
|
|||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="sheet clearfix" id="sheet_require">
|
<div class="sheet" id="sheet_require">
|
||||||
<div class="contentTitle">
|
|
||||||
<h1><?php echo lang('System and permissions')?></h1>
|
|
||||||
|
|
||||||
<ul id="stepList_2" class="stepList clearfix">
|
<h2><?php echo lang('System and permissions')?></h2>
|
||||||
<li class="ok">Etape 1</li>
|
|
||||||
<li>Etape 2</li>
|
|
||||||
<li>Etape 3</li>
|
|
||||||
<li>Etape 4</li>
|
|
||||||
<li>Etape 5</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<h2><?php echo lang('Required set-up. Please verify the following checklist items are true.')?></h2>
|
<h3><?php echo lang('Required set-up. Please verify the following checklist items are true.')?></h3>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
<?php echo lang('If you have any questions, please visit our '); ?>
|
<?php echo lang('If you have any questions, please visit our '); ?>
|
||||||
@@ -388,7 +366,7 @@ if ($lm->getIncludeTradFilename())
|
|||||||
<a href="http://www.prestashop.com/forums/" target="_blank"><?php echo lang('Community Forum'); ?></a><?php echo lang('.'); ?>
|
<a href="http://www.prestashop.com/forums/" target="_blank"><?php echo lang('Community Forum'); ?></a><?php echo lang('.'); ?>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<h3 id="resultConfig"></h3>
|
<h3 id="resultConfig" style="font-size: 20px; text-align: center; padding: 0px; display: none;"></h3>
|
||||||
<ul id="required">
|
<ul id="required">
|
||||||
<li class="title"><?php echo lang('PHP parameters:')?></li>
|
<li class="title"><?php echo lang('PHP parameters:')?></li>
|
||||||
<li class="required"><?php echo lang('PHP 5.0 or later installed')?></li>
|
<li class="required"><?php echo lang('PHP 5.0 or later installed')?></li>
|
||||||
@@ -429,24 +407,13 @@ if ($lm->getIncludeTradFilename())
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="sheet clearfix" id="sheet_db">
|
<div class="sheet" id="sheet_db">
|
||||||
<div class="contentTitle">
|
<h2><?php echo lang('Database configuration')?></h2>
|
||||||
<h1><?php echo lang('Database configuration')?></h1>
|
|
||||||
|
|
||||||
<ul id="stepList_3" class="stepList clearfix">
|
<p><?php echo lang('Configure your database by filling out the following fields:')?></p>
|
||||||
<li class="ok">Etape 1</li>
|
|
||||||
<li class="ok">Etape 2</li>
|
|
||||||
<li>Etape 3</li>
|
|
||||||
<li>Etape 4</li>
|
|
||||||
<li>Etape 5</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div id="dbPart">
|
|
||||||
<h2><?php echo lang('Configure your database by filling out the following fields:')?></h2>
|
|
||||||
<p><?php echo lang('You have to create a database, help available in readme_en.txt'); ?></p>
|
|
||||||
<form id="formCheckSQL" class="aligned" action="<?php $_SERVER['REQUEST_URI']; ?>" onsubmit="verifyDbAccess(); return false;" method="post">
|
<form id="formCheckSQL" class="aligned" action="<?php $_SERVER['REQUEST_URI']; ?>" onsubmit="verifyDbAccess(); return false;" method="post">
|
||||||
<p class="first" style="margin-top: 15px;">
|
<h3 style="padding:0;margin:0;"><?php echo lang('You have to create a database, help available in readme_en.txt'); ?></h3>
|
||||||
|
<p style="margin-top: 15px;">
|
||||||
<label for="dbServer"><?php echo lang('Server:')?> </label>
|
<label for="dbServer"><?php echo lang('Server:')?> </label>
|
||||||
<input size="25" class="text" type="text" id="dbServer" value="localhost"/>
|
<input size="25" class="text" type="text" id="dbServer" value="localhost"/>
|
||||||
</p>
|
</p>
|
||||||
@@ -469,32 +436,27 @@ if ($lm->getIncludeTradFilename())
|
|||||||
<option value="MyISAM">MyISAM</option>
|
<option value="MyISAM">MyISAM</option>
|
||||||
</select>
|
</select>
|
||||||
</p>
|
</p>
|
||||||
<p class="last">
|
|
||||||
<label for="db_prefix"><?php echo lang('Tables prefix:')?></label>
|
|
||||||
<input class="text" type="text" id="db_prefix" value="ps_"/>
|
|
||||||
</p>
|
|
||||||
<p class="aligned">
|
<p class="aligned">
|
||||||
<input id="btTestDB" class="button" type="submit" value="<?php echo lang('Verify now!')?>"/>
|
<input id="btTestDB" class="button" type="submit" value="<?php echo lang('Verify now!')?>"/>
|
||||||
</p>
|
</p>
|
||||||
<p id="dbResultCheck"></p>
|
<p id="dbResultCheck"></p>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
|
||||||
|
|
||||||
<div id="dbTableParam">
|
<div id="dbTableParam">
|
||||||
<form action="#" method="post" onsubmit="createDB(); return false;">
|
<form action="#" method="post" onsubmit="createDB(); return false;">
|
||||||
|
<p><label for="db_prefix"><?php echo lang('Tables prefix:')?> </label><input class="text" type="text" id="db_prefix" value="ps_"/></p>
|
||||||
<h2><?php echo lang('Installation type')?></h2>
|
<h2><?php echo lang('Installation type')?></h2>
|
||||||
<p id="dbModeSetter" style="line-height: 20px;">
|
<p id="dbModeSetter" style="line-height: 20px;">
|
||||||
<input value="lite" type="radio" name="db_mode" id="db_mode_simple" style="vertical-align: middle;" /> <label for="db_mode_simple"><?php echo lang('Simple mode: Basic installation')?> <span><?php echo lang('(FREE)'); ?></span></label><br />
|
<input value="lite" type="radio" name="db_mode" id="db_mode_simple" style="vertical-align: middle;" /><label for="db_mode_simple"><?php echo lang('Simple mode: Basic installation')?> <span style="color: #CC0000; font-weight: bold;"><?php echo lang('(FREE)'); ?></span></label><br />
|
||||||
<input value="full" type="radio" name="db_mode" checked="checked" id="db_mode_complet" style="vertical-align: middle;" /> <label for="db_mode_complet"><?php echo lang('Full mode: includes').' <b>'.lang('100+ additional modules').'</b> '.lang('and demo products'); ?> <span><?php echo lang('(FREE too!)'); ?></span></label>
|
<input value="full" type="radio" name="db_mode" checked="checked" id="db_mode_complet" style="vertical-align: middle;" /><label for="db_mode_complet"><?php echo lang('Full mode: includes').' <b>'.lang('100+ additional modules').'</b> '.lang('and demo products'); ?> <span style="color: #CC0000; font-weight: bold;"><?php echo lang('(FREE too!)'); ?></span></label>
|
||||||
</p>
|
</p>
|
||||||
</form>
|
</form>
|
||||||
<p id="dbCreateResultCheck"></p>
|
<p id="dbCreateResultCheck"></p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="mailPart">
|
<div id="mailPart">
|
||||||
<h2><?php echo lang('E-mail delivery set-up')?></h2>
|
<h2><?php echo lang('E-mail delivery set-up')?></h2>
|
||||||
|
|
||||||
<p id="configsmtp">
|
<p>
|
||||||
<input type="checkbox" id="set_stmp" style="vertical-align: middle;" /><label for="set_stmp"><?php echo lang('Configure SMTP manually (advanced users only)'); ?></label><br/>
|
<input type="checkbox" id="set_stmp" style="vertical-align: middle;" /><label for="set_stmp"><?php echo lang('Configure SMTP manually (advanced users only)'); ?></label><br/>
|
||||||
<span class="userInfos"><?php echo lang('By default, the PHP \'mail()\' function is used'); ?></span>
|
<span class="userInfos"><?php echo lang('By default, the PHP \'mail()\' function is used'); ?></span>
|
||||||
</p>
|
</p>
|
||||||
@@ -516,7 +478,7 @@ if ($lm->getIncludeTradFilename())
|
|||||||
|
|
||||||
<p>
|
<p>
|
||||||
<label for="smtpPort"><?php echo lang('Port:'); ?></label>
|
<label for="smtpPort"><?php echo lang('Port:'); ?></label>
|
||||||
<input type="text" size="5" id="smtpPort" value="25" class="text" />
|
<input type="text" size="5" id="smtpPort" value="25" />
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
@@ -532,41 +494,27 @@ if ($lm->getIncludeTradFilename())
|
|||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
<p>
|
<p>
|
||||||
<input class="text" id="testEmail" type="text" size="15" value="<?php echo lang('enter@your.email'); ?>" />
|
<input class="text" id="testEmail" type="text" size="15" value="<?php echo lang('enter@your.email'); ?>"></input>
|
||||||
<input id="btVerifyMail" class="button" type="submit" value="<?php echo lang('Send me a test email!'); ?>" />
|
<input id="btVerifyMail" class="button" type="submit" value="<?php echo lang('Send me a test email!'); ?>"></input>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p id="mailResultCheck"></p>
|
<p id="mailResultCheck" class="userInfos"></p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="sheet clearfix" id="sheet_infos">
|
<div class="sheet" id="sheet_infos">
|
||||||
<form action="<?php $_SERVER['REQUEST_URI']; ?>" method="post" onsubmit="return false;" enctype="multipart/form-data">
|
<form action="<?php $_SERVER['REQUEST_URI']; ?>" method="post" onsubmit="return false;" enctype="multipart/form-data">
|
||||||
<div class="contentTitle">
|
|
||||||
<h1><?php echo lang('Shop configuration')?></h1>
|
|
||||||
|
|
||||||
<ul id="stepList_4" class="stepList clearfix">
|
<h2><?php echo lang('Shop configuration'); ?></h2>
|
||||||
<li class="ok">Etape 1 ok</li>
|
|
||||||
<li class="ok">Etape 2 ok</li>
|
|
||||||
<li class="ok">Etape 3 ok</li>
|
|
||||||
<li>Etape 4</li>
|
|
||||||
<li>Etape 5</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div id="infosShopBlock">
|
<h3><?php echo lang('Merchant info'); ?></h3>
|
||||||
<h2><?php echo lang('Merchant info'); ?></h2>
|
|
||||||
<div class="field">
|
<div class="field">
|
||||||
<label for="infosShop" class="aligned"><?php echo lang('Shop name:'); ?> </label>
|
<label for="infosShop" class="aligned"><?php echo lang('Shop name:'); ?> </label><input class="text required" type="text" id="infosShop" value=""/><br/>
|
||||||
<span class="contentinput">
|
|
||||||
<input class="text required" type="text" id="infosShop" value=""/> <sup class="required">*</sup>
|
|
||||||
</span>
|
|
||||||
<span id="resultInfosShop" class="result aligned"></span>
|
<span id="resultInfosShop" class="result aligned"></span>
|
||||||
</div>
|
</div>
|
||||||
<div class="field">
|
<div class="field">
|
||||||
<label for="infosActivity" class="aligned"><?php echo lang('Main activity:'); ?></label>
|
<label for="infosActivity" class="aligned"><?php echo lang('Main activity:'); ?></label>
|
||||||
<span class="contentinput">
|
<select id="infosActivity" style="border:1px solid #D41958">
|
||||||
<select id="infosActivity">
|
|
||||||
<option value="0"><?php echo lang('-- Please choose your main activity --'); ?></option>
|
<option value="0"><?php echo lang('-- Please choose your main activity --'); ?></option>
|
||||||
<option value="1"><?php echo lang('Adult'); ?></option>
|
<option value="1"><?php echo lang('Adult'); ?></option>
|
||||||
<option value="2"><?php echo lang('Animals and Pets'); ?></option>
|
<option value="2"><?php echo lang('Animals and Pets'); ?></option>
|
||||||
@@ -590,96 +538,64 @@ if ($lm->getIncludeTradFilename())
|
|||||||
<option value="20"><?php echo lang('Travel'); ?></option>
|
<option value="20"><?php echo lang('Travel'); ?></option>
|
||||||
<option value="0"><?php echo lang('Other activity...'); ?></option>
|
<option value="0"><?php echo lang('Other activity...'); ?></option>
|
||||||
</select>
|
</select>
|
||||||
</span>
|
|
||||||
<p class="userInfos aligned"><?php echo lang('This information isn\'t required, it will be used for statistical purposes. This information doesn\'t change anything in your store.'); ?></p>
|
<p class="userInfos aligned"><?php echo lang('This information isn\'t required, it will be used for statistical purposes. This information doesn\'t change anything in your store.'); ?></p>
|
||||||
</div>
|
</div>
|
||||||
<div class="field">
|
<div class="field">
|
||||||
<label for="infosCountry" class="aligned"><?php echo lang('Default country:'); ?></label>
|
<label for="infosCountry" class="aligned"><?php echo lang('Default country:'); ?></label>
|
||||||
<span class="contentinput">
|
<select id="infosCountry" style="width:175px;border:1px solid #D41958">
|
||||||
<select id="infosCountry">
|
|
||||||
</select>
|
</select>
|
||||||
</span>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="field">
|
<div class="field">
|
||||||
<label for="infosTimezone" class="aligned"><?php echo lang('Shop\'s timezone:'); ?></label>
|
<label for="infosTimezone" class="aligned"><?php echo lang('Shop\'s timezone:'); ?></label>
|
||||||
<span class="contentinput">
|
<select id="infosTimezone" style="width:175px;border:1px solid #D41958">
|
||||||
<select id="infosTimezone">
|
|
||||||
</select>
|
</select>
|
||||||
</span>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="field">
|
<div class="field">
|
||||||
<label for="infosLogo" class="aligned logo"><?php echo lang('Shop logo'); ?> : </label>
|
<label for="infosLogo" class="aligned logo"><?php echo lang('Shop logo'); ?> : </label>
|
||||||
<span class="contentinput">
|
|
||||||
<p id="alignedLogo"><img id="uploadedImage" src="<?php echo PS_BASE_URI ?>img/logo.jpg" alt="Logo" /></p>
|
|
||||||
</span>
|
|
||||||
<p class="userInfos aligned"><?php echo lang('recommended dimensions: 230px X 75px'); ?></p>
|
|
||||||
|
|
||||||
<span id="inputFileLogo" class="contentinput">
|
|
||||||
<input type="file" onchange="uploadLogo()" name="fileToUpload" id="fileToUpload"/>
|
<input type="file" onchange="uploadLogo()" name="fileToUpload" id="fileToUpload"/>
|
||||||
</span>
|
|
||||||
<span id="resultInfosLogo" class="result"></span>
|
<span id="resultInfosLogo" class="result"></span>
|
||||||
|
<p class="userInfos aligned"><?php echo lang('recommended dimensions: 230px X 75px'); ?></p>
|
||||||
|
<p id="alignedLogo"><img id="uploadedImage" src="<?php echo PS_BASE_URI ?>img/logo.jpg" alt="Logo" /></p>
|
||||||
</div>
|
</div>
|
||||||
<div class="field">
|
<div class="field">
|
||||||
<label for="catalogMode" class="aligned"><?php echo lang('Catalog mode:'); ?></label>
|
<label for="catalogMode" class="aligned"><?php echo lang('Catalog mode:'); ?></label>
|
||||||
<span class="contentinput">
|
|
||||||
<input type="radio" name="catalogMode" id="catalogMode_1" value="1" />
|
<input type="radio" name="catalogMode" id="catalogMode_1" value="1" />
|
||||||
<label for="catalogMode_1" class="radiolabel"><?php echo lang('Yes'); ?></label>
|
<label for="catalogMode_1"><?php echo lang('Yes'); ?></label>
|
||||||
<input type="radio" name="catalogMode" id="catalogMode_0" value="0" checked="checked"/>
|
<input type="radio" name="catalogMode" id="catalogMode_0" value="0" checked="checked"/>
|
||||||
<label for="catalogMode_0" class="radiolabel"><?php echo lang('No'); ?></label>
|
<label for="catalogMode_0"><?php echo lang('No'); ?></label>
|
||||||
</span>
|
|
||||||
<p class="userInfos aligned"><?php echo lang('If you activate this feature, all purchase features will be disabled. You can activate this feature later in your back office'); ?></p>
|
<p class="userInfos aligned"><?php echo lang('If you activate this feature, all purchase features will be disabled. You can activate this feature later in your back office'); ?></p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="field">
|
<div class="field">
|
||||||
<label for="infosFirstname" class="aligned"><?php echo lang('First name:'); ?> </label>
|
<label for="infosFirstname" class="aligned"><?php echo lang('First name:'); ?> </label><input class="text required" type="text" id="infosFirstname"/><br/>
|
||||||
<span class="contentinput">
|
|
||||||
<input class="text required" type="text" id="infosFirstname"/> <sup class="required">*</sup>
|
|
||||||
</span>
|
|
||||||
<span id="resultInfosFirstname" class="result aligned"></span>
|
<span id="resultInfosFirstname" class="result aligned"></span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="field">
|
<div class="field">
|
||||||
<label for="infosName" class="aligned"><?php echo lang('Last name:'); ?> </label>
|
<label for="infosName" class="aligned"><?php echo lang('Last name:'); ?> </label><input class="text required" type="text" id="infosName"/><br/>
|
||||||
<span class="contentinput">
|
|
||||||
<input class="text required" type="text" id="infosName"/> <sup class="required">*</sup>
|
|
||||||
</span>
|
|
||||||
<span id="resultInfosName" class="result aligned"></span>
|
<span id="resultInfosName" class="result aligned"></span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="field">
|
<div class="field">
|
||||||
<label for="infosEmail" class="aligned"><?php echo lang('E-mail address:'); ?> </label>
|
<label for="infosEmail" class="aligned"><?php echo lang('E-mail address:'); ?> </label><input type="text" class="text required" id="infosEmail"/><br/>
|
||||||
<span class="contentinput">
|
|
||||||
<input type="text" class="text required" id="infosEmail"/> <sup class="required">*</sup>
|
|
||||||
</span>
|
|
||||||
<span id="resultInfosEmail" class="result aligned"></span>
|
<span id="resultInfosEmail" class="result aligned"></span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="field">
|
<div class="field">
|
||||||
<label for="infosPassword" class="aligned"><?php echo lang('Shop password:'); ?> </label>
|
<label for="infosPassword" class="aligned"><?php echo lang('Shop password:'); ?> </label><input autocomplete="off" type="password" class="text required" id="infosPassword"/><br/>
|
||||||
<span class="contentinput">
|
|
||||||
<input autocomplete="off" type="password" class="text required" id="infosPassword"/> <sup class="required">*</sup>
|
|
||||||
</span>
|
|
||||||
<span id="resultInfosPassword" class="result aligned"></span>
|
<span id="resultInfosPassword" class="result aligned"></span>
|
||||||
</div>
|
</div>
|
||||||
<div class="field">
|
<div class="field">
|
||||||
<label class="aligned" for="infosPasswordRepeat"><?php echo lang('Re-type to confirm:'); ?> </label>
|
<label class="aligned" for="infosPasswordRepeat"><?php echo lang('Re-type to confirm:'); ?> </label><input type="password" autocomplete="off" class="text required" id="infosPasswordRepeat"/><br/>
|
||||||
<span class="contentinput">
|
|
||||||
<input type="password" autocomplete="off" class="text required" id="infosPasswordRepeat"/> <sup class="required">*</sup>
|
|
||||||
</span>
|
|
||||||
<span id="resultInfosPasswordRepeat" class="result aligned"></span>
|
<span id="resultInfosPasswordRepeat" class="result aligned"></span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="field" id="contentInfosNotification">
|
<div class="field">
|
||||||
<span class="contentinput">
|
|
||||||
<input type="checkbox" id="infosNotification" class="aligned" style="vertical-align: middle;" /><label for="infosNotification"><?php echo lang('Receive notifications by e-mail'); ?></label><br/>
|
<input type="checkbox" id="infosNotification" class="aligned" style="vertical-align: middle;" /><label for="infosNotification"><?php echo lang('Receive notifications by e-mail'); ?></label><br/>
|
||||||
<span id="resultInfosNotification" class="result aligned"></span>
|
<span id="resultInfosNotification" class="result aligned"></span>
|
||||||
</span>
|
|
||||||
|
|
||||||
<p class="userInfos aligned"><?php echo lang('If you check this box and your mail configuration is wrong, your installation might be blocked. If so, please uncheck the box to go to the next step.'); ?></p>
|
<p class="userInfos aligned"><?php echo lang('If you check this box and your mail configuration is wrong, your installation might be blocked. If so, please uncheck the box to go to the next step.'); ?></p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
|
|
||||||
<div id="benefitsBlock">
|
|
||||||
<!-- Partner Modules -->
|
<!-- Partner Modules -->
|
||||||
<?php
|
<?php
|
||||||
if (!isset($_GET['language']))
|
if (!isset($_GET['language']))
|
||||||
@@ -687,7 +603,11 @@ if ($lm->getIncludeTradFilename())
|
|||||||
?>
|
?>
|
||||||
<link href="../css/jquery.fancybox-1.3.4.css" rel="stylesheet" type="text/css" media="screen" />
|
<link href="../css/jquery.fancybox-1.3.4.css" rel="stylesheet" type="text/css" media="screen" />
|
||||||
<script src="../js/jquery/jquery.fancybox-1.3.4.js" type="text/javascript"></script>
|
<script src="../js/jquery/jquery.fancybox-1.3.4.js" type="text/javascript"></script>
|
||||||
<script type="text/javascript">
|
<style>
|
||||||
|
.installModuleList { display: none; }
|
||||||
|
.installModuleList.selected { display: block; }
|
||||||
|
</style>
|
||||||
|
<script>
|
||||||
var moduleChecked = new Array();
|
var moduleChecked = new Array();
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
$('#infosCountry').change(function() {
|
$('#infosCountry').change(function() {
|
||||||
@@ -742,14 +662,6 @@ if ($lm->getIncludeTradFilename())
|
|||||||
foreach ($p->prechecked as $country_iso_code)
|
foreach ($p->prechecked as $country_iso_code)
|
||||||
$modulesPrechecked[trim($p->key)][trim($country_iso_code)] = 1;
|
$modulesPrechecked[trim($p->key)][trim($country_iso_code)] = 1;
|
||||||
}
|
}
|
||||||
echo '<table cellpadding="0" callspacing="0" border="0" class="moduleTable">
|
|
||||||
<tr>
|
|
||||||
<th style="width: 30px;"></th>
|
|
||||||
<th style="width: 100px;">Modules</th>
|
|
||||||
<th style="padding: 12px; width: 430px;">Avantages</th>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
';
|
|
||||||
|
|
||||||
foreach ($modulesHelpInstall as $country_iso_code => $modulesList)
|
foreach ($modulesHelpInstall as $country_iso_code => $modulesList)
|
||||||
{
|
{
|
||||||
@@ -757,20 +669,21 @@ if ($lm->getIncludeTradFilename())
|
|||||||
foreach ($modulesList as $module)
|
foreach ($modulesList as $module)
|
||||||
{
|
{
|
||||||
echo '
|
echo '
|
||||||
<table cellpadding="0" callspacing="0" border="0" class="moduleTable">
|
<table style="border: 1px solid #CCC; padding: 5px; width: 650px">
|
||||||
<tr>
|
<tr>
|
||||||
<td valign="top" style="text-align: center; padding-top:10px; width: 30px; background: #FFF;">
|
<td style="width: 100px; text-align: center;"><img src="'.$modulesDescription[$module]['logo'].'" alt="'.$modulesDescription[$module]['name'].'" title="'.$modulesDescription[$module]['name'].'">'.(isset($modulesDescription[$module]['more']) ? $modulesDescription[$module]['more'] : '').'</td>
|
||||||
<span style="padding: 12px 4px 6px 2px;">
|
<td style="padding-left: 15px; width: 430px;">
|
||||||
|
'.$modulesDescription[$module]['description'].'
|
||||||
|
</td>
|
||||||
|
<td style="text-align: center; width: 30px; background: #FFF;">
|
||||||
|
<span style="padding: 3px 4px 6px 2px; background: none repeat scroll 0pt 0pt #7EB423;">
|
||||||
<input type="checkbox" id="preInstallModules_'.$country_iso_code.'_'.$module.'" value="'.$module.'" class="'.$module.' preInstallModules_'.$country_iso_code.'" style="vertical-align: middle;" />
|
<input type="checkbox" id="preInstallModules_'.$country_iso_code.'_'.$module.'" value="'.$module.'" class="'.$module.' preInstallModules_'.$country_iso_code.'" style="vertical-align: middle;" />
|
||||||
</span>
|
</span>
|
||||||
</td>
|
</td>
|
||||||
<td valign="top" style="width: 100px; text-align: center;"><img src="'.$modulesDescription[$module]['logo'].'" alt="'.$modulesDescription[$module]['name'].'" title="'.$modulesDescription[$module]['name'].'">'.(isset($modulesDescription[$module]['more']) ? $modulesDescription[$module]['more'] : '').'</td>
|
|
||||||
<td style="padding: 15px; width: 430px;">
|
|
||||||
'.$modulesDescription[$module]['description'].'
|
|
||||||
</td>
|
|
||||||
</tr>
|
</tr>
|
||||||
<tr><td colspan="3"><div id="divForm_'.$country_iso_code.'_'.$module.'"> </div></td></tr></table>
|
<tr><td colspan="3"><div id="divForm_'.$country_iso_code.'_'.$module.'"> </div></td></tr>
|
||||||
';
|
</table>
|
||||||
|
<br />';
|
||||||
echo "<script>
|
echo "<script>
|
||||||
moduleChecked['".$country_iso_code.'_'.$module."'] = 0;
|
moduleChecked['".$country_iso_code.'_'.$module."'] = 0;
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
@@ -832,6 +745,7 @@ if ($lm->getIncludeTradFilename())
|
|||||||
});
|
});
|
||||||
});";
|
});";
|
||||||
}
|
}
|
||||||
|
|
||||||
echo "</script>";
|
echo "</script>";
|
||||||
}
|
}
|
||||||
echo '</div>';
|
echo '</div>';
|
||||||
@@ -840,8 +754,13 @@ if ($lm->getIncludeTradFilename())
|
|||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<!-- Partner Modules -->
|
<!-- Partner Modules -->
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!--<h3><?php echo lang('Shop\'s languages'); ?></h3>
|
<!--<h3><?php echo lang('Shop\'s languages'); ?></h3>
|
||||||
<p class="userInfos"><?php echo lang('Select the different languages available for your shop'); ?></p>-->
|
<p class="userInfos"><?php echo lang('Select the different languages available for your shop'); ?></p>-->
|
||||||
<div id="availablesLanguages" style=" float:left; text-align: center; display:none;">
|
<div id="availablesLanguages" style=" float:left; text-align: center; display:none;">
|
||||||
@@ -879,44 +798,31 @@ if ($lm->getIncludeTradFilename())
|
|||||||
<?php }} ?>
|
<?php }} ?>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
<div id="resultEnd">
|
<div id="resultEnd">
|
||||||
<span id="resultInfosSQL" class="result"></span>
|
<span id="resultInfosSQL" class="result"></span>
|
||||||
<span id="resultInfosLanguages" class="result"></span>
|
<span id="resultInfosLanguages" class="result"></span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="sheet clearfix" id="sheet_end">
|
<div class="sheet" id="sheet_end" style="padding:0">
|
||||||
|
<div style="padding:1em">
|
||||||
<div class="contentTitle">
|
<h2><?php echo lang('PrestaShop is ready!'); ?></h2>
|
||||||
<h1><?php echo lang('PrestaShop is ready!'); ?></h1>
|
<h3><?php echo lang('Your installation is finished!'); ?></h3>
|
||||||
|
|
||||||
<ul id="stepList_5" class="stepList clearfix">
|
|
||||||
<li class="ok">Etape 1 ok</li>
|
|
||||||
<li class="ok">Etape 2 ok</li>
|
|
||||||
<li class="ok">Etape 3 ok</li>
|
|
||||||
<li class="ok">Etape 4 ok</li>
|
|
||||||
<li class="ok">Etape 5</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="clearfix">
|
|
||||||
<h2><?php echo lang('Your installation is finished!'); ?></h2>
|
|
||||||
<p><?php echo lang('You have just installed and configured PrestaShop as your online shop solution. We wish you all the best with the success of your online shop.'); ?></p>
|
<p><?php echo lang('You have just installed and configured PrestaShop as your online shop solution. We wish you all the best with the success of your online shop.'); ?></p>
|
||||||
<p><?php echo lang('Here are your shop information. You can modify them once logged in.'); ?></p>
|
<p><?php echo lang('Here are your shop information. You can modify them once logged in.'); ?></p>
|
||||||
<table cellpadding="0" cellspacing="0" border="0" id="resultInstall" width="620">
|
<table id="resultInstall" cellspacing="0">
|
||||||
<tr class="odd">
|
<tr>
|
||||||
<td width="220" class="label"><?php echo lang('Shop name:'); ?></td>
|
<td class="label"><?php echo lang('Shop name:'); ?></td>
|
||||||
<td width="400" id="endShopName" class="resultEnd"> </td>
|
<td id="endShopName" class="resultEnd"> </td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="label"><?php echo lang('First name:'); ?></td>
|
<td class="label"><?php echo lang('First name:'); ?></td>
|
||||||
<td id="endFirstName" class="resultEnd"> </td>
|
<td id="endFirstName" class="resultEnd"> </td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="odd">
|
<tr>
|
||||||
<td class="label"><?php echo lang('Last name:'); ?></td>
|
<td class="label"><?php echo lang('Last name:'); ?></td>
|
||||||
<td id="endName" class="resultEnd"> </td>
|
<td id="endName" class="resultEnd"> </td>
|
||||||
</tr>
|
</tr>
|
||||||
@@ -925,26 +831,23 @@ if ($lm->getIncludeTradFilename())
|
|||||||
<td id="endEmail" class="resultEnd"> </td>
|
<td id="endEmail" class="resultEnd"> </td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
<h3><?php echo lang('WARNING: For more security, you must delete the \'install\' folder and readme files (readme_fr.txt, readme_en.txt, readme_es.txt, readme_de.txt, readme_it.txt, CHANGELOG).'); ?></h3>
|
||||||
|
|
||||||
<h3 class="infosBlock"><?php echo lang('WARNING: For more security, you must delete the \'install\' folder and readme files (readme_fr.txt, readme_en.txt, readme_es.txt, readme_de.txt, readme_it.txt, CHANGELOG).'); ?></h3>
|
<a href="../admin" id="access" class="BO" target="_blank">
|
||||||
|
<span class="title"><?php echo lang('Back Office'); ?></span>
|
||||||
<div id="boBlock" class="blockInfoEnd clearfix">
|
<span class="description"><?php echo lang('Manage your store with your back office. Manage your orders and customers, add modules, change your theme, etc...'); ?></span>
|
||||||
<img src="img/visu_boBlock.png" />
|
<span class="message"><?php echo lang('Manage your store'); ?></span>
|
||||||
<h3><?php echo lang('Back Office'); ?></h3>
|
</a>
|
||||||
<p class="description"><?php echo lang('Manage your store with your back office. Manage your orders and customers, add modules, change your theme, etc...'); ?></p>
|
<a href="../" id="access" class="FO" target="_blank">
|
||||||
<a href="../admin" id="access" class="BO" target="_blank"><span><?php echo lang('Manage your store'); ?></span></a>
|
<span class="title"><?php echo lang('Front Office'); ?></span>
|
||||||
</div>
|
<span class="description"><?php echo lang('Find your store as your future customers will see!'); ?></span>
|
||||||
<div id="foBlock" class="blockInfoEnd last clearfix">
|
<span class="message"><?php echo lang('Discover your store'); ?></span>
|
||||||
<img src="img/visu_foBlock.png" />
|
</a>
|
||||||
<h3><?php echo lang('Front Office'); ?></h3>
|
|
||||||
<p class="description"><?php echo lang('Find your store as your future customers will see!'); ?></p>
|
|
||||||
<a href="../" id="access" class="FO" target="_blank"><span><?php echo lang('Discover your store'); ?></span></a>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div id="resultEnd"></div>
|
<div id="resultEnd"></div>
|
||||||
</div>
|
</div>
|
||||||
<?php
|
<?php
|
||||||
if (@fsockopen('addons.prestashop.com', 80, $errno, $errst, 3)): ?>
|
if (@fsockopen('addons.prestashop.com', 80, $errno, $errst, 3)): ?>
|
||||||
|
|
||||||
<iframe src="http://addons.prestashop.com/psinstall.php?lang=<?php echo $lm->getIsoCodeSelectedLang()?>" scrolling="no" id="prestastore">
|
<iframe src="http://addons.prestashop.com/psinstall.php?lang=<?php echo $lm->getIsoCodeSelectedLang()?>" scrolling="no" id="prestastore">
|
||||||
<p>Your browser does not support iframes.</p>
|
<p>Your browser does not support iframes.</p>
|
||||||
</iframe>
|
</iframe>
|
||||||
@@ -953,18 +856,9 @@ if ($lm->getIncludeTradFilename())
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="sheet clearfix" id="sheet_disclaimer">
|
<div class="sheet" id="sheet_disclaimer">
|
||||||
<div class="contentTitle">
|
<h2><?php echo lang('Disclaimer'); ?></h2>
|
||||||
<h1><?php echo lang('Disclaimer'); ?></h1>
|
<h3><?php echo lang('Warning: a manual backup is HIGHLY recommended before continuing!'); ?></h3>
|
||||||
|
|
||||||
<ul id="stepList_6" class="stepList clearfix">
|
|
||||||
<li class="ok">Etape 1</li>
|
|
||||||
<li>Etape 2</li>
|
|
||||||
<li>Etape 3</li>
|
|
||||||
<li>Etape 4</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
<h2><?php echo lang('Warning: a manual backup is HIGHLY recommended before continuing!'); ?></h2>
|
|
||||||
<p><?php echo lang('Please backup the database and application files.'); ?></p>
|
<p><?php echo lang('Please backup the database and application files.'); ?></p>
|
||||||
<p><?php echo lang('When your files and database are saving in an other support, please certify that your shop is really backed up.'); ?><br /><br /></p>
|
<p><?php echo lang('When your files and database are saving in an other support, please certify that your shop is really backed up.'); ?><br /><br /></p>
|
||||||
|
|
||||||
@@ -985,7 +879,7 @@ if ($lm->getIncludeTradFilename())
|
|||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: 'xml/getNonNativeModules.php',
|
url: 'xml/getNonNativeModules.php',
|
||||||
async: true,
|
async: false,
|
||||||
dataType: "json",
|
dataType: "json",
|
||||||
success: function (json)
|
success: function (json)
|
||||||
{
|
{
|
||||||
@@ -1068,20 +962,20 @@ if ($lm->getIncludeTradFilename())
|
|||||||
if (sizeof($upgradeFiles))
|
if (sizeof($upgradeFiles))
|
||||||
{
|
{
|
||||||
echo '
|
echo '
|
||||||
<table cellpadding="0" cellspacing="0" border="0">
|
<table cellpadding="5" border="1" style="font-size: 11px; margin-top: 10px;">
|
||||||
<tr>
|
<tr>
|
||||||
<th>'.lang('Upgrade file').'</th>
|
<th>'.lang('Upgrade file').'</th>
|
||||||
<th style="text-align: right;">'.lang('Modifications to process').'</th>
|
<th style="width: 100px;">'.lang('Modifications to process').'</th>
|
||||||
</tr>';
|
</tr>';
|
||||||
|
|
||||||
uasort($upgradeFiles, 'sortnatversion');
|
uasort($upgradeFiles, 'sortnatversion');
|
||||||
$totalInstructions = 0;
|
$totalInstructions = 0;
|
||||||
foreach ($upgradeFiles AS $file)
|
foreach ($upgradeFiles AS $file)
|
||||||
{
|
{
|
||||||
echo '<tr><td style="'.($file['is_major'] ? 'font-weight: bold;' : '').'">v'.$file['version'].($file['is_major'] ? ' '.lang('(major)') : '').'</td><td style="text-align: right;">'.(int)$file['instructions'].'</td></tr>';
|
echo '<tr><td style="'.($file['is_major'] ? 'font-weight: bold;' : 'padding-left: 12px;').'">v'.$file['version'].($file['is_major'] ? ' '.lang('(major)') : '').'</td><td style="text-align: right; padding-right: 5px;">'.(int)$file['instructions'].'</td></tr>';
|
||||||
$totalInstructions += (int)$file['instructions'];
|
$totalInstructions += (int)$file['instructions'];
|
||||||
}
|
}
|
||||||
echo '<tr style="font-weight: bold;"><td>'.lang('TOTAL').'</td><td style="text-align: right;">'.(int)$totalInstructions.'</td></tr>';
|
echo '<tr style="font-weight: bold;"><td>'.lang('TOTAL').'</td><td style="text-align: right; padding-right: 5px;">'.(int)$totalInstructions.'</td></tr>';
|
||||||
echo '
|
echo '
|
||||||
</table>';
|
</table>';
|
||||||
|
|
||||||
@@ -1089,7 +983,7 @@ if ($lm->getIncludeTradFilename())
|
|||||||
$minutes = (int)($upgradeTime / 60);
|
$minutes = (int)($upgradeTime / 60);
|
||||||
$seconds = (int)($upgradeTime - ($minutes * 60));
|
$seconds = (int)($upgradeTime - ($minutes * 60));
|
||||||
|
|
||||||
echo '<p><img src="../img/admin/time.gif" alt="" style="vertical-align: absmiddle;" /> '.lang('Estimated time to complete the').' '.(int)$totalInstructions.' '.lang('modifications:').' <b style="font-size: 14px;">'.(int)$minutes.' '.($minutes > 1 ? lang('minutes') : lang('minute')).' '.(int)$seconds.' '.($seconds > 1 ? lang('seconds') : lang('second')).'</b><br />
|
echo '<p><img src="../img/admin/time.gif" alt="" style="vertical-align: middle;" /> '.lang('Estimated time to complete the').' '.(int)$totalInstructions.' '.lang('modifications:').' <b style="font-size: 14px;">'.(int)$minutes.' '.($minutes > 1 ? lang('minutes') : lang('minute')).' '.(int)$seconds.' '.($seconds > 1 ? lang('seconds') : lang('second')).'</b><br />
|
||||||
<i style="font-size: 11px;">'.lang('Depending on your server and the size of your shop').'</i></p>';
|
<i style="font-size: 11px;">'.lang('Depending on your server and the size of your shop').'</i></p>';
|
||||||
|
|
||||||
if ($majorReleases > 1)
|
if ($majorReleases > 1)
|
||||||
@@ -1117,7 +1011,7 @@ if ($lm->getIncludeTradFilename())
|
|||||||
<br />
|
<br />
|
||||||
<h2>'.lang('Hosting parameters').'</h2>
|
<h2>'.lang('Hosting parameters').'</h2>
|
||||||
<p>'.lang('PrestaShop tries to automatically set the best settings for your server in order the update to be successful.').'</p>
|
<p>'.lang('PrestaShop tries to automatically set the best settings for your server in order the update to be successful.').'</p>
|
||||||
<table cellpadding="0" cellspacing="0" border="0">
|
<table cellpadding="5" border="1" style="font-size: 11px;">
|
||||||
<tr>
|
<tr>
|
||||||
<th>'.lang('PHP parameter').'</th>
|
<th>'.lang('PHP parameter').'</th>
|
||||||
<th>'.lang('Description').'</th>
|
<th>'.lang('Description').'</th>
|
||||||
@@ -1134,32 +1028,28 @@ if ($lm->getIncludeTradFilename())
|
|||||||
<td style="text-align: right;">'.ini_get('memory_limit').'</td>
|
<td style="text-align: right;">'.ini_get('memory_limit').'</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
<div class="infosBlock">';
|
<div style="font-weight: bold; background: '.$color.'; color: #000; padding: 10px; border: 1px solid #999; margin-top: 10px;">';
|
||||||
|
|
||||||
if ($color == '#D9F2D0')
|
if ($color == '#D9F2D0')
|
||||||
echo '<img src="../img/admin/ok.gif" alt="" style="vertical-align: absmiddle;" /> '.lang('All your settings seem to be OK, go for it!');
|
echo '<img src="../img/admin/ok.gif" alt="" style="vertical-align: middle;" /> '.lang('All your settings seem to be OK, go for it!');
|
||||||
elseif ($color == '#FFDEB7')
|
elseif ($color == '#FFDEB7')
|
||||||
echo '<img src="../img/admin/warning.gif" alt="" style="vertical-align: absmiddle;" /> '.lang('Beware, your settings look correct but are not optimal, if you encounter problems (upgrade too long, memory error...), please ask your hosting provider to increase the values of these parameters (max_execution_time & memory_limit).');
|
echo '<img src="../img/admin/warning.gif" alt="" style="vertical-align: middle;" /> '.lang('Beware, your settings look correct but are not optimal, if you encounter problems (upgrade too long, memory error...), please ask your hosting provider to increase the values of these parameters (max_execution_time & memory_limit).');
|
||||||
elseif ($color == '#FAE2E3')
|
elseif ($color == '#FAE2E3')
|
||||||
echo '<img src="../img/admin/error2.png" alt="" style="vertical-align: absmiddle;" /> '.lang('We strongly recommend that you inform your hosting provider to modify the settings before process to the update.');
|
echo '<img src="../img/admin/error2.png" alt="" style="vertical-align: middle;" /> '.lang('We strongly recommend that you inform your hosting provider to modify the settings before process to the update.');
|
||||||
echo '</div>';
|
|
||||||
|
echo '
|
||||||
|
</div><br />';
|
||||||
|
|
||||||
|
|
||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="sheet clearfix" id="sheet_require_update">
|
<div class="sheet" id="sheet_require_update">
|
||||||
<div class="contentTitle">
|
|
||||||
<h1><?php echo lang('System and permissions')?></h1>
|
|
||||||
|
|
||||||
<ul id="stepList_7" class="stepList clearfix">
|
<h2><?php echo lang('System and permissions'); ?></h2>
|
||||||
<li class="ok">Etape 1 ok</li>
|
|
||||||
<li class="ok">Etape 2 ok</li>
|
<h3><?php echo lang('Required set-up. Please verify the following checklist items are true.'); ?></h3>
|
||||||
<li>Etape 3</li>
|
|
||||||
<li>Etape 4</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
<h2><?php echo lang('Required set-up. Please verify the following checklist items are true.'); ?></h2>
|
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
<?php echo lang('If you have any questions, please visit our '); ?>
|
<?php echo lang('If you have any questions, please visit our '); ?>
|
||||||
@@ -1168,7 +1058,7 @@ if ($lm->getIncludeTradFilename())
|
|||||||
<a href="http://www.prestashop.com/forums/" target="_blank"><?php echo lang('Community Forum'); ?></a><?php echo lang('.'); ?>
|
<a href="http://www.prestashop.com/forums/" target="_blank"><?php echo lang('Community Forum'); ?></a><?php echo lang('.'); ?>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<h3 id="resultConfig_update"></h3>
|
<h3 id="resultConfig_update" style="font-size: 20px; text-align: center; padding: 0px; display: none;"></h3>
|
||||||
<ul id="required_update">
|
<ul id="required_update">
|
||||||
<li class="title"><?php echo lang('PHP parameters:')?></li>
|
<li class="title"><?php echo lang('PHP parameters:')?></li>
|
||||||
<li class="required"><?php echo lang('PHP 5.0 or later installed')?></li>
|
<li class="required"><?php echo lang('PHP 5.0 or later installed')?></li>
|
||||||
@@ -1209,44 +1099,21 @@ if ($lm->getIncludeTradFilename())
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="sheet clearfix" id="sheet_updateErrors">
|
<div class="sheet" id="sheet_updateErrors">
|
||||||
<div class="contentTitle">
|
<h2><?php echo lang('Error!'); ?></h2>
|
||||||
<h1><?php echo lang('Error!'); ?></h1>
|
|
||||||
|
|
||||||
<ul id="stepList_8" class="stepList clearfix">
|
|
||||||
<li class="ok">Etape 1 ok</li>
|
|
||||||
<li class="ok">Etape 2 ok</li>
|
|
||||||
<li class="ko">Etape 3</li>
|
|
||||||
<li>Etape 4</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<h3><?php echo lang('One or more errors have occurred, you can find more informations below or in the log/installation.log file.'); ?></h3>
|
<h3><?php echo lang('One or more errors have occurred, you can find more informations below or in the log/installation.log file.'); ?></h3>
|
||||||
|
<p id="resultUpdate"></p>
|
||||||
<p id="resultUpdate" class="errorBlock"></p>
|
<p id="detailsError"></p>
|
||||||
<br />
|
|
||||||
<p id="detailsError" class="infosBlock"><?php echo lang('No more informations'); ?></p>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="sheet clearfix" id="sheet_end_update">
|
<div class="sheet" id="sheet_end_update" style="padding:0px;">
|
||||||
<div>
|
<div style="padding:1em;">
|
||||||
<div class="contentTitle">
|
|
||||||
<h1><?php echo lang('Your update is completed!'); ?></h1>
|
<h1><?php echo lang('Your update is completed!'); ?></h1>
|
||||||
|
<h3><?php echo lang('Your shop version is now').' '.INSTALL_VERSION; ?></h3>
|
||||||
<ul id="stepList_7" class="stepList clearfix">
|
<p class="fail" id="txtErrorUpdateSQL"></p>
|
||||||
<li class="ok">Etape 1 ok</li>
|
<p><a href="javascript:showUpdateLog()"><?php echo lang('view the log'); ?></a></p>
|
||||||
<li class="ok">Etape 2 ok</li>
|
|
||||||
<li class="ok">Etape 3</li>
|
|
||||||
<li class="ok">Etape 4</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
<div class="okBlock">
|
|
||||||
<?php echo lang('Your shop version is now').' '.INSTALL_VERSION; ?>
|
|
||||||
</div>
|
|
||||||
<p class="errorBlock" id="txtErrorUpdateSQL" style="display:none;"></p>
|
|
||||||
<p style="padding-bottom: 5px;"><a href="javascript:showUpdateLog()"><?php echo lang('view the log'); ?></a></p>
|
|
||||||
<div id="updateLog"></div>
|
<div id="updateLog"></div>
|
||||||
<p><?php echo lang('You have just updated and configured PrestaShop as your online shop solution. We wish you all the best with the success of your online shop.'); ?></p>
|
<p><?php echo lang('You have just updated and configured PrestaShop as your online shop solution. We wish you all the best with the success of your online shop.'); ?></p><br />
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
@@ -1254,23 +1121,19 @@ if ($lm->getIncludeTradFilename())
|
|||||||
{
|
{
|
||||||
echo '
|
echo '
|
||||||
<h2>'.lang('New features in PrestaShop v').INSTALL_VERSION.'</h2>
|
<h2>'.lang('New features in PrestaShop v').INSTALL_VERSION.'</h2>
|
||||||
<iframe style="width: 638px; margin-top: 5px; padding: 5px; border: 1px solid #BBB;" src="http://features.prestashop.com/lang/'.$lm->getIsoCodeSelectedLang().'/version/'.INSTALL_VERSION.'">
|
<iframe style="width: 595px; margin-top: 5px; padding: 5px; border: 1px solid #BBB;" src="http://features.prestashop.com/lang/'.$lm->getIsoCodeSelectedLang().'/version/'.INSTALL_VERSION.'">
|
||||||
<p>Your browser does not support iframes.</p>
|
<p>Your browser does not support iframes.</p>
|
||||||
</iframe>';
|
</iframe>';
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<div class="infosBlock">
|
<h3 style="margin-top: 15px;"><?php echo lang('WARNING: For more security, you must delete the \'install\' folder and readme files (readme_fr.txt, readme_en.txt, readme_es.txt, readme_de.txt, readme_it.txt, CHANGELOG).'); ?></h3>
|
||||||
<?php echo lang('WARNING: For more security, you must delete the \'install\' folder and readme files (readme_fr.txt, readme_en.txt, readme_es.txt, readme_de.txt, readme_it.txt, CHANGELOG).'); ?>
|
<a href="../" id="access_update" target="_blank">
|
||||||
</div>
|
<span class="title"><?php echo lang('Front Office'); ?></span>
|
||||||
|
<span class="description"><?php echo lang('Find your store as your future customers will see!'); ?></span>
|
||||||
<div id="foBlock" class="blockInfoEnd clearfix">
|
<span class="message"><?php echo lang('Discover your store'); ?></span>
|
||||||
<img src="img/visu_foBlock.png" />
|
</a>
|
||||||
<h3><?php echo lang('Front Office'); ?></h3>
|
|
||||||
<p class="description"><?php echo lang('Find your store as your future customers will see!'); ?></p>
|
|
||||||
<a href="../" id="access" class="FO" target="_blank"><span><?php echo lang('Discover your store'); ?></span></a>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<?php
|
<?php
|
||||||
if (@fsockopen('addons.prestashop.com', 80, $errno, $errst, 3)): ?>
|
if (@fsockopen('addons.prestashop.com', 80, $errno, $errst, 3)): ?>
|
||||||
|
|||||||
@@ -177,8 +177,8 @@ $_LANG['Did you know?'] = 'Le saviez-vous ?';
|
|||||||
$_LANG['Prestashop and community offers over 40 different languages for free download on'] = 'Prestashop et sa communauté propose plus de 40 langues différentes en téléchargement gratuit sur';
|
$_LANG['Prestashop and community offers over 40 different languages for free download on'] = 'Prestashop et sa communauté propose plus de 40 langues différentes en téléchargement gratuit sur';
|
||||||
$_LANG['Default country:'] = 'Pays par défaut :';
|
$_LANG['Default country:'] = 'Pays par défaut :';
|
||||||
$_LANG['Shop\'s timezone:'] = 'Fuseau horaire de la boutique :';
|
$_LANG['Shop\'s timezone:'] = 'Fuseau horaire de la boutique :';
|
||||||
$_LANG['Your configuration is valid, click next to continue!'] = 'Votre configuration est valide, cliquez sur suivant pour continuer !';
|
$_LANG['Your configuration is valid, click next to continue!'] = 'Votre configuration est valide,<br />cliquez sur suivant pour continuer !';
|
||||||
$_LANG['Your configuration is invalid. Please fix the issues below:'] = 'Votre configuration n\'est pas valide, merci de corriger ces problèmes :';
|
$_LANG['Your configuration is invalid. Please fix the issues below:'] = 'Votre configuration n\'est pas valide,<br />merci de corriger ces problèmes :';
|
||||||
$_LANG['You have to create a database, help available in readme_en.txt'] = 'Vous devez au préalable créer une base de données (aide disponible dans le fichier readme.txt)';
|
$_LANG['You have to create a database, help available in readme_en.txt'] = 'Vous devez au préalable créer une base de données (aide disponible dans le fichier readme.txt)';
|
||||||
$_LANG['If you check this box and your mail configuration is wrong, your installation might be blocked. If so, please uncheck the box to go to the next step.'] = 'Cette option peut être bloquante si votre configuration e-mail est erronée, merci de la désactiver si vous ne pouvez pas passer à l\'étape suivante.';
|
$_LANG['If you check this box and your mail configuration is wrong, your installation might be blocked. If so, please uncheck the box to go to the next step.'] = 'Cette option peut être bloquante si votre configuration e-mail est erronée, merci de la désactiver si vous ne pouvez pas passer à l\'étape suivante.';
|
||||||
$_LANG['Mcrypt is available (recommended)'] = 'Mcrypt est disponible (recommandé)';
|
$_LANG['Mcrypt is available (recommended)'] = 'Mcrypt est disponible (recommandé)';
|
||||||
|
|||||||
@@ -1,39 +0,0 @@
|
|||||||
<?php
|
|
||||||
/*
|
|
||||||
* 2007-2011 PrestaShop
|
|
||||||
*
|
|
||||||
* NOTICE OF LICENSE
|
|
||||||
*
|
|
||||||
* This source file is subject to the Open Software License (OSL 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/osl-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-2011 PrestaShop SA
|
|
||||||
* @version Release: $Revision$
|
|
||||||
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
|
||||||
* International Registered Trademark & Property of PrestaShop SA
|
|
||||||
*/
|
|
||||||
|
|
||||||
function alter_productcomments_guest_index()
|
|
||||||
{
|
|
||||||
Configuration::loadConfiguration();
|
|
||||||
$productcomments = Module::getInstanceByName('productcomments');
|
|
||||||
if (!$productcomments->id)
|
|
||||||
return;
|
|
||||||
|
|
||||||
DB::getInstance()->Execute('
|
|
||||||
ALTER TABLE `'._DB_PREFIX_.'product_comment` DROP INDEX `id_guest`,
|
|
||||||
ADD INDEX `id_guest` USING BTREE(`id_guest`);');
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -61,7 +61,7 @@ CREATE TABLE `PREFIX_attachment` (
|
|||||||
`id_attachment` int(10) unsigned NOT NULL auto_increment,
|
`id_attachment` int(10) unsigned NOT NULL auto_increment,
|
||||||
`file` varchar(40) NOT NULL,
|
`file` varchar(40) NOT NULL,
|
||||||
`file_name` varchar(128) NOT NULL,
|
`file_name` varchar(128) NOT NULL,
|
||||||
`mime` varchar(128) NOT NULL,
|
`mime` varchar(64) NOT NULL,
|
||||||
PRIMARY KEY (`id_attachment`)
|
PRIMARY KEY (`id_attachment`)
|
||||||
) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8;
|
) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8;
|
||||||
|
|
||||||
@@ -290,16 +290,6 @@ CREATE TABLE `PREFIX_cms_category_lang` (
|
|||||||
KEY `category_name` (`name`)
|
KEY `category_name` (`name`)
|
||||||
) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8;
|
) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8;
|
||||||
|
|
||||||
CREATE TABLE `PREFIX_compare_product` (
|
|
||||||
`id_compare_product` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
||||||
`id_product` int(10) unsigned NOT NULL,
|
|
||||||
`id_guest` int(10) unsigned NOT NULL,
|
|
||||||
`id_customer` int(10) unsigned NOT NULL,
|
|
||||||
`date_add` datetime NOT NULL,
|
|
||||||
`date_upd` datetime NOT NULL,
|
|
||||||
PRIMARY KEY (`id_compare_product`)
|
|
||||||
) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8;
|
|
||||||
|
|
||||||
CREATE TABLE `PREFIX_configuration` (
|
CREATE TABLE `PREFIX_configuration` (
|
||||||
`id_configuration` int(10) unsigned NOT NULL auto_increment,
|
`id_configuration` int(10) unsigned NOT NULL auto_increment,
|
||||||
`id_group_shop` INT(11) UNSIGNED DEFAULT NULL,
|
`id_group_shop` INT(11) UNSIGNED DEFAULT NULL,
|
||||||
|
|||||||
@@ -712,8 +712,8 @@ INSERT INTO `PREFIX_tab` (`id_tab`, `class_name`, `id_parent`, `position`) VALUE
|
|||||||
(53, 'AdminBackup', 9, 8),(57, 'AdminCMSContent', 9, 9),(64, 'AdminGenerator', 9, 10),(43, 'AdminSearch', -1, 0),(69, 'AdminInformation', 9, 11),
|
(53, 'AdminBackup', 9, 8),(57, 'AdminCMSContent', 9, 9),(64, 'AdminGenerator', 9, 10),(43, 'AdminSearch', -1, 0),(69, 'AdminInformation', 9, 11),
|
||||||
(70, 'AdminPerformance', 8, 11),(71, 'AdminCustomerThreads', 29, 4),(72, 'AdminWebservice', 9, 12),(73, 'AdminStockMvt', 1, 9),
|
(70, 'AdminPerformance', 8, 11),(71, 'AdminCustomerThreads', 29, 4),(72, 'AdminWebservice', 9, 12),(73, 'AdminStockMvt', 1, 9),
|
||||||
(80, 'AdminAddonsCatalog', 7, 1),(81, 'AdminAddonsMyAccount', 7, 2),(83, 'AdminThemes', 7, 3),(84, 'AdminGeolocation', 8, 12),
|
(80, 'AdminAddonsCatalog', 7, 1),(81, 'AdminAddonsMyAccount', 7, 2),(83, 'AdminThemes', 7, 3),(84, 'AdminGeolocation', 8, 12),
|
||||||
(85, 'AdminTaxRulesGroup', 4, 3),(86, 'AdminLogs', 9, 13), (87, 'AdminCounty', 5, 4),(88,'AdminHome',-1,0),(89,'AdminUpgrade',9,14),(90,'AdminShop', 0, 11), (91,'AdminGroupShop', 90, 1),
|
(85, 'AdminTaxRulesGroup', 4, 3),(86, 'AdminLogs', 9, 13), (87, 'AdminCounty', 5, 4),(88,'AdminHome',-1,0),(89,'AdminShop', 0, 11), (90,'AdminGroupShop', 89, 1),
|
||||||
(92, 'AdminShopUrl', 90, 2);
|
(91, 'AdminShopUrl', 89, 2);
|
||||||
|
|
||||||
INSERT INTO `PREFIX_access` (`id_profile`, `id_tab`, `view`, `add`, `edit`, `delete`) (SELECT 1, id_tab, 1, 1, 1, 1 FROM PREFIX_tab);
|
INSERT INTO `PREFIX_access` (`id_profile`, `id_tab`, `view`, `add`, `edit`, `delete`) (SELECT 1, id_tab, 1, 1, 1, 1 FROM PREFIX_tab);
|
||||||
|
|
||||||
@@ -730,11 +730,11 @@ INSERT INTO `PREFIX_tab_lang` (`id_lang`, `id_tab`, `name`) VALUES
|
|||||||
(1, 61, 'Search Engines'),(1, 62, 'Referrers'),(1, 63, 'Groups'),(1, 64, 'Generators'),(1, 65, 'Shopping Carts'),(1, 66, 'Tags'),(1, 67, 'Search'),
|
(1, 61, 'Search Engines'),(1, 62, 'Referrers'),(1, 63, 'Groups'),(1, 64, 'Generators'),(1, 65, 'Shopping Carts'),(1, 66, 'Tags'),(1, 67, 'Search'),
|
||||||
(1, 68, 'Attachments'),(1, 69, 'Configuration Information'),(1, 70, 'Performance'),(1, 71, 'Customer Service'),(1, 72, 'Webservice'),(1, 73, 'Stock Movements'),
|
(1, 68, 'Attachments'),(1, 69, 'Configuration Information'),(1, 70, 'Performance'),(1, 71, 'Customer Service'),(1, 72, 'Webservice'),(1, 73, 'Stock Movements'),
|
||||||
(1, 80, 'Modules & Themes Catalog'),(1, 81, 'My Account'),(1, 82, 'Stores'),(1, 83, 'Themes'),(1, 84, 'Geolocation'),(1, 85, 'Tax Rules'),(1, 86, 'Log'),
|
(1, 80, 'Modules & Themes Catalog'),(1, 81, 'My Account'),(1, 82, 'Stores'),(1, 83, 'Themes'),(1, 84, 'Geolocation'),(1, 85, 'Tax Rules'),(1, 86, 'Log'),
|
||||||
(1, 87, 'Counties'),(1, 88, 'Home'), (1, 89, 'Upgrade'),(1, 90, 'Shops'), (1, 91, 'Group Shops'), (1, 92, 'Shop Urls');
|
(1, 87, 'Counties'),(1, 88, 'Home'), (1, 89, 'Shops'), (1, 90, 'Group Shops'), (1, 91, 'Shop Urls');
|
||||||
|
|
||||||
INSERT INTO `PREFIX_tab_lang` (`id_lang`, `id_tab`, `name`) VALUES
|
INSERT INTO `PREFIX_tab_lang` (`id_lang`, `id_tab`, `name`) VALUES
|
||||||
(2, 1, 'Catalogue'),(2, 2, 'Clients'),(2, 3, 'Commandes'),(2, 4, 'Paiement'),(2, 5, 'Transport'),
|
(2, 1, 'Catalogue'),(2, 2, 'Clients'),(2, 3, 'Commandes'),(2, 4, 'Paiement'),(2, 5, 'Transport'),
|
||||||
(2, 6, 'Stats'),(2, 7, 'Modules'),(2, 8, 'Préférences'),(2, 9, 'Outils'),(2, 10, 'Marques'),(2, 11, 'Attributs et groupes'),(2, 12, 'Adresses'),(2, 13, 'Statuts'),
|
(2, 6, 'Stats'),(2, 7, 'Modules'),(2, 8, 'Préférences'),(2, 9, 'Outils'),(2, 10, 'Fabricants'),(2, 11, 'Attributs et groupes'),(2, 12, 'Adresses'),(2, 13, 'Statuts'),
|
||||||
(2, 14, 'Bons de réduction'),(2, 15, 'Devises'),(2, 16, 'Taxes'),(2, 17, 'Transporteurs'),(2, 18, 'Pays'),(2, 19, 'Zones'),(2, 20, 'Tranches de prix'),
|
(2, 14, 'Bons de réduction'),(2, 15, 'Devises'),(2, 16, 'Taxes'),(2, 17, 'Transporteurs'),(2, 18, 'Pays'),(2, 19, 'Zones'),(2, 20, 'Tranches de prix'),
|
||||||
(2, 21, 'Tranches de poids'),(2, 22, 'Positions'),(2, 23, 'Base de données'),(2, 24, 'Emails'),(2, 26, 'Images'),(2, 27, 'Produits'),(2, 28, 'Contacts'),
|
(2, 21, 'Tranches de poids'),(2, 22, 'Positions'),(2, 23, 'Base de données'),(2, 24, 'Emails'),(2, 26, 'Images'),(2, 27, 'Produits'),(2, 28, 'Contacts'),
|
||||||
(2, 29, 'Employés'),(2, 30, 'Profils'),(2, 31, 'Permissions'),(2, 32, 'Langues'),(2, 33, 'Traductions'),(2, 34, 'Fournisseurs'),(2, 35, 'Onglets'),
|
(2, 29, 'Employés'),(2, 30, 'Profils'),(2, 31, 'Permissions'),(2, 32, 'Langues'),(2, 33, 'Traductions'),(2, 34, 'Fournisseurs'),(2, 35, 'Onglets'),
|
||||||
@@ -745,7 +745,7 @@ INSERT INTO `PREFIX_tab_lang` (`id_lang`, `id_tab`, `name`) VALUES
|
|||||||
(2, 62, 'Sites affluents'),(2, 63, 'Groupes'),(2, 64, 'Générateurs'),(2, 65, 'Paniers'),(2, 66, 'Tags'),(2, 67, 'Recherche'),
|
(2, 62, 'Sites affluents'),(2, 63, 'Groupes'),(2, 64, 'Générateurs'),(2, 65, 'Paniers'),(2, 66, 'Tags'),(2, 67, 'Recherche'),
|
||||||
(2, 68, 'Documents joints'),(2, 69, 'Informations'),(2, 70, 'Performances'),(2, 71, 'SAV'),(2, 72, 'Service web'),(2, 73, 'Mouvements de Stock'),
|
(2, 68, 'Documents joints'),(2, 69, 'Informations'),(2, 70, 'Performances'),(2, 71, 'SAV'),(2, 72, 'Service web'),(2, 73, 'Mouvements de Stock'),
|
||||||
(2, 80, 'Catalogue de modules et thèmes'),(2, 81, 'Mon compte'),(2, 82, 'Magasins'),(2, 83, 'Thèmes'),(2, 84, 'Géolocalisation'),(2, 85, 'Règles de taxes'),(2, 86, 'Log'),
|
(2, 80, 'Catalogue de modules et thèmes'),(2, 81, 'Mon compte'),(2, 82, 'Magasins'),(2, 83, 'Thèmes'),(2, 84, 'Géolocalisation'),(2, 85, 'Règles de taxes'),(2, 86, 'Log'),
|
||||||
(2, 87, 'Comtés'),(2,88,'Accueil'),(2, 89, 'Mise à jour'), (2, 90, 'Boutiques'), (2, 91, 'Groupes de boutique'), (2, 92, 'URLs de boutique');
|
(2, 87, 'Comtés'),(2,88,'Accueil'), (2, 89, 'Boutiques'), (2, 90, 'Groupes de boutique'), (2, 91, 'URLs de boutique');
|
||||||
|
|
||||||
INSERT INTO `PREFIX_tab_lang` (`id_lang`, `id_tab`, `name`) VALUES
|
INSERT INTO `PREFIX_tab_lang` (`id_lang`, `id_tab`, `name`) VALUES
|
||||||
(3, 1, 'Catálogo'),(3, 2, 'Clientes'),(3, 3, 'Pedidos'),(3, 4, 'Pago'),(3, 5, 'Transporte'),
|
(3, 1, 'Catálogo'),(3, 2, 'Clientes'),(3, 3, 'Pedidos'),(3, 4, 'Pago'),(3, 5, 'Transporte'),
|
||||||
@@ -758,8 +758,8 @@ INSERT INTO `PREFIX_tab_lang` (`id_lang`, `id_tab`, `name`) VALUES
|
|||||||
(3, 49, 'Vales'),(3, 51, 'Configuración'),(3, 52, 'Subcampos'),(3, 53, 'Copia de seguridad'),(3, 54, 'Mensajes de Orden'),
|
(3, 49, 'Vales'),(3, 51, 'Configuración'),(3, 52, 'Subcampos'),(3, 53, 'Copia de seguridad'),(3, 54, 'Mensajes de Orden'),
|
||||||
(3, 55, 'Albaranes de entrega'),(3, 56, 'SEO & URLs'),(3, 57, 'CMS'),(3, 58, 'Mapeo de la imagen'),(3, 59, 'Mensajes del cliente'),(3, 60, 'Rastreo'),
|
(3, 55, 'Albaranes de entrega'),(3, 56, 'SEO & URLs'),(3, 57, 'CMS'),(3, 58, 'Mapeo de la imagen'),(3, 59, 'Mensajes del cliente'),(3, 60, 'Rastreo'),
|
||||||
(3, 61, 'Motores de búsqueda'),(3, 62, 'Referido'),(3, 63, 'Grupos'),(3, 64, 'Generadores'),(3, 65, 'Carritos'),(3, 66, 'Etiquetas'),(3, 67, 'Búsqueda'),(3, 68, 'Adjuntos'),
|
(3, 61, 'Motores de búsqueda'),(3, 62, 'Referido'),(3, 63, 'Grupos'),(3, 64, 'Generadores'),(3, 65, 'Carritos'),(3, 66, 'Etiquetas'),(3, 67, 'Búsqueda'),(3, 68, 'Adjuntos'),
|
||||||
(3, 69, 'Informaciones'),(3, 70, 'Rendimiento'),(3, 72, 'Web service'),(3, 71, 'Servicio al cliente'),(3, 73, 'Movimiento de Stock'), (3, 82, 'Tiendas'),(3, 83, 'Temas'),(3, 84, 'Geolocalización'),(3, 85, 'Reglas de Impuestos'),(3, 86, 'Log'),
|
(3, 69, 'Informations'),(3, 70, 'Rendimiento'),(3, 72, 'Web service'),(3, 71, 'Servicio al cliente'),(3, 73, 'Movimiento de Stock'), (3, 82, 'Tiendas'),(3, 83, 'Temas'),(3, 84, 'Geolocalización'),(3, 85, 'Reglas de Impuestos'),(3, 86, 'Log'),
|
||||||
(3, 87, 'Condados'),(3,88,'Home'),(3, 89, 'Mejorar'), (3, 90, 'Shops'), (3, 91, 'Group Shops'), (3, 92, 'Shop Urls');
|
(3, 87, 'Condados'),(3,88,'Home'), (3, 89, 'Shops'), (3, 90, 'Group Shops'), (3, 91, 'Shop Urls');
|
||||||
|
|
||||||
INSERT INTO `PREFIX_tab_lang` (`id_lang`, `id_tab`, `name`) VALUES
|
INSERT INTO `PREFIX_tab_lang` (`id_lang`, `id_tab`, `name`) VALUES
|
||||||
(4, 1, 'Katalog'),(4, 2, 'Kunden'),(4, 3, 'Bestellungen'),(4, 4, 'Zahlung'),
|
(4, 1, 'Katalog'),(4, 2, 'Kunden'),(4, 3, 'Bestellungen'),(4, 4, 'Zahlung'),
|
||||||
@@ -774,7 +774,7 @@ INSERT INTO `PREFIX_tab_lang` (`id_lang`, `id_tab`, `name`) VALUES
|
|||||||
(4, 61, 'Suchmaschinen'),(4, 62, 'Referrer'),(4, 63, 'Gruppen'),(4, 64, 'Generatoren'),(4, 65, 'Warenkörbe'),(4, 66, 'Tags'),(4, 67, 'Suche'),
|
(4, 61, 'Suchmaschinen'),(4, 62, 'Referrer'),(4, 63, 'Gruppen'),(4, 64, 'Generatoren'),(4, 65, 'Warenkörbe'),(4, 66, 'Tags'),(4, 67, 'Suche'),
|
||||||
(4, 68, 'Anhänge'),(4, 69, 'Konfigurationsinformationen'),(4, 70, 'Leistung'),(4, 71, 'Kundenservice'),(4, 72, 'Webservice'),(4, 73, 'Lagerbewegungen'),
|
(4, 68, 'Anhänge'),(4, 69, 'Konfigurationsinformationen'),(4, 70, 'Leistung'),(4, 71, 'Kundenservice'),(4, 72, 'Webservice'),(4, 73, 'Lagerbewegungen'),
|
||||||
(4, 80, 'Module und Themenkatalog'),(4, 81, 'Mein Konto'),(4, 82, 'Shops'),(4, 83, 'Themen'),(4, 84, 'Geotargeting'),(4, 85, 'Steuerregeln'),(4, 86, 'Log'),
|
(4, 80, 'Module und Themenkatalog'),(4, 81, 'Mein Konto'),(4, 82, 'Shops'),(4, 83, 'Themen'),(4, 84, 'Geotargeting'),(4, 85, 'Steuerregeln'),(4, 86, 'Log'),
|
||||||
(4,87,'Counties'),(4,88,'Home'),(4, 89, 'Upgrade'), (4, 90, 'Shops'), (4, 91, 'Group Shops'), (4, 92, 'Shop Urls');
|
(4,87,'Counties'),(4,88,'Home'), (4, 89, 'Shops'), (4, 90, 'Group Shops'), (4, 91, 'Shop Urls');
|
||||||
|
|
||||||
INSERT INTO `PREFIX_tab_lang` (`id_lang`, `id_tab`, `name`) VALUES
|
INSERT INTO `PREFIX_tab_lang` (`id_lang`, `id_tab`, `name`) VALUES
|
||||||
(5, 1, 'Catalogo'),(5, 2, 'Clienti'),(5, 3, 'Ordini'),(5, 4, 'Pagamento'),
|
(5, 1, 'Catalogo'),(5, 2, 'Clienti'),(5, 3, 'Ordini'),(5, 4, 'Pagamento'),
|
||||||
@@ -789,7 +789,7 @@ INSERT INTO `PREFIX_tab_lang` (`id_lang`, `id_tab`, `name`) VALUES
|
|||||||
(5, 61, 'Motori di ricerca'),(5, 62, 'Referenti'),(5, 63, 'Gruppi'),(5, 64, 'Generatori'),(5, 65, 'Carrelli shopping'),(5, 66, 'Tag'),(5, 67, 'Cerca'),
|
(5, 61, 'Motori di ricerca'),(5, 62, 'Referenti'),(5, 63, 'Gruppi'),(5, 64, 'Generatori'),(5, 65, 'Carrelli shopping'),(5, 66, 'Tag'),(5, 67, 'Cerca'),
|
||||||
(5, 68, 'Allegati'),(5, 69, 'Informazioni di configurazione'),(5, 70, 'Performance'),(5, 71, 'Servizio clienti'),(5, 72, 'Webservice'),(5, 73, 'Movimenti magazzino'),
|
(5, 68, 'Allegati'),(5, 69, 'Informazioni di configurazione'),(5, 70, 'Performance'),(5, 71, 'Servizio clienti'),(5, 72, 'Webservice'),(5, 73, 'Movimenti magazzino'),
|
||||||
(5, 80, 'Moduli & Temi catalogo'),(5, 81, 'Il mio Account'),(5, 82, 'Negozi'),(5, 83, 'Temi'),(5, 84, 'Geolocalizzazione'),(5, 85, 'Regimi fiscali'),(5, 86, 'Log'),
|
(5, 80, 'Moduli & Temi catalogo'),(5, 81, 'Il mio Account'),(5, 82, 'Negozi'),(5, 83, 'Temi'),(5, 84, 'Geolocalizzazione'),(5, 85, 'Regimi fiscali'),(5, 86, 'Log'),
|
||||||
(5,87,'Counties'),(5,88,'Home'),(5, 89, 'Aggiornamento'), (5, 90, 'Shops'), (5, 91, 'Group Shops'), (5, 92, 'Shop Urls');
|
(5,87,'Counties'),(5,88,'Home'), (5, 89, 'Shops'), (5, 90, 'Group Shops'), (5, 91, 'Shop Urls');
|
||||||
|
|
||||||
INSERT IGNORE INTO `PREFIX_tab_lang` (`id_tab`, `id_lang`, `name`)
|
INSERT IGNORE INTO `PREFIX_tab_lang` (`id_tab`, `id_lang`, `name`)
|
||||||
(SELECT `id_tab`, id_lang, (SELECT tl.`name`
|
(SELECT `id_tab`, id_lang, (SELECT tl.`name`
|
||||||
|
|||||||