diff --git a/install-new/README.txt b/install-new/README.txt new file mode 100644 index 000000000..32f78359d --- /dev/null +++ b/install-new/README.txt @@ -0,0 +1,67 @@ +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 +@copyright 2007-2011 PrestaShop SA +@license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +International Registered Trademark & Property of PrestaShop SA + +PREPARATION +=========== + +To install PrestaShop, you need a remote web server or on your computer (MAMP), with access to a database like MySQL. +You'll need access to phpMyAdmin to create a database and to indicate the information in the database in the installer. + +If you do not host and unable to create your store, we offer a turnkey store, which lets you create your online store in less than 10 minutes without any technical knowledge. +We invite you to visit: + http://www.prestabox.com/ + +INSTALLATION +============ + +Simply go to your PrestaShop web directory and use installer :-) + +If you have any PHP error, perhaps you don't have PHP5 or you need to activate it on your web host. +Please go to our forum to find pre-installation settings (PHP 5, htaccess) for certain hosting services (1&1, Free, Lycos, OVH, Infomaniak, Amen, GoDaddy, etc). + +English webhost specifics settings : + http://www.prestashop.com/forums/viewthread/2946/installation_configuration___upgrade/preinstallation_settings_php_5_htaccess_for_certain_hosting_services + +If you don't find any solution to launch installer, please post on our forum : + http://www.prestashop.com/forums/viewforum/7/installation_configuration___upgrade + +There are always solutions for your issues ;-) + +DOCUMENTATION +============= + +For any extra documentation (how-to), please read our wiki : + http://www.prestashop.com/wiki/ + +FORUMS +====== + +You can also discute, help and contribute with PrestaShop community on our forums : + http://www.prestashop.com/forums/ + +Thanks for downloading and using PrestaShop e-commerce open-source solution ! + +========================== += The PrestaTeam' = += www.PrestaShop.com = +========================== diff --git a/install-new/classes/controllerHttp.php b/install-new/classes/controllerHttp.php new file mode 100644 index 000000000..1cb507103 --- /dev/null +++ b/install-new/classes/controllerHttp.php @@ -0,0 +1,410 @@ + +* @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 +*/ + +abstract class InstallControllerHttp +{ + /** + * @var array List of installer steps + */ + protected static $steps = array('welcome', 'system', 'database', 'configure', 'process'); + + protected static $instances = array(); + + /** + * @var string Current step + */ + public $step; + + /** + * @var array List of errors + */ + public $errors = array(); + + /** + * @var InstallController + */ + public $controller; + + /** + * @var InstallSession + */ + public $session; + + /** + * @var InstallLanguages + */ + public $language; + + /** + * @var bool If false, disable next button access + */ + public $next_button = true; + + /** + * @var InstallAbstractModel + */ + public $model; + + /** + * @var array Magic vars + */ + protected $__vars = array(); + + /** + * Process form to go to next step + */ + abstract public function processNextStep(); + + /** + * Validate current step + */ + abstract public function validate(); + + /** + * Display current step view + */ + abstract public function display(); + + final public static function execute() + { + // Include all controllers + foreach (self::$steps as $step) + { + if (!file_exists(_PS_INSTALL_CONTROLLERS_PATH_.'http/'.$step.'.php')) + throw new PrestashopInstallerException("Controller file 'http/{$step}.php' not found"); + + require_once _PS_INSTALL_CONTROLLERS_PATH_.'http/'.$step.'.php'; + $classname = 'InstallControllerHttp'.$step; + self::$instances[$step] = new $classname($step); + } + + $session = InstallSession::getInstance(); + if (!$session->last_step || !in_array($session->last_step, self::$steps)) + $session->last_step = self::$steps[0]; + + // Get current step (check first if step is changed, then take it from session) + if (Tools::getValue('step')) + { + $current_step = Tools::getValue('step'); + $session->step = $current_step; + } + else + $current_step = (isset($session->step)) ? $session->step : self::$steps[0]; + + if (!in_array($current_step, self::$steps)) + $current_step = self::$steps[0]; + + // Validate all steps until current step. If a step is not valid, use it as current step. + foreach (self::$steps as $check_step) + { + // Do not validate current step + if ($check_step == $current_step) + break; + + if (!self::$instances[$check_step]->validate()) + { + $current_step = $check_step; + $session->step = $current_step; + $session->last_step = $current_step; + break; + } + } + + // Submit form to go to next step + if (Tools::getValue('submitNext')) + { + self::$instances[$current_step]->processNextStep(); + + // If current step is validated, let's go to next step + if (self::$instances[$current_step]->validate()) + $current_step = self::$instances[$current_step]->findNextStep(); + $session->step = $current_step; + + // Change last step + if (self::getStepOffset($current_step) > self::getStepOffset($session->last_step)) + $session->last_step = $current_step; + } + // Go to previous step + else if (Tools::getValue('submitPrevious') && $current_step != self::$steps[0]) + { + $current_step = self::$instances[$current_step]->findPreviousStep($current_step); + $session->step = $current_step; + } + + self::$instances[$current_step]->process(); + self::$instances[$current_step]->display(); + } + + final public function __construct($step) + { + $this->step = $step; + $this->session = InstallSession::getInstance(); + + // Set current language + $this->language = InstallLanguages::getInstance(); + $lang = (isset($this->session->lang)) ? $this->session->lang : 'en'; + if (!in_array($lang, $this->language->getIsoList())) + $lang = 'en'; + $this->language->setLanguage($lang); + + $this->init(); + } + + /** + * Initialize model + */ + public function init() + { + } + + public function process() + { + } + + /** + * Get steps list + * + * @return array + */ + public function getSteps() + { + return self::$steps; + } + + public function getLastStep() + { + return $this->session->last_step; + } + + /** + * Find offset of a step by name + * + * @param string $step Step name + * @return int + */ + static public function getStepOffset($step) + { + static $flip = null; + + if (is_null($flip)) + $flip = array_flip(self::$steps); + return $flip[$step]; + } + + /** + * Make a HTTP redirection to a step + * + * @param string $step + */ + public function redirect($step) + { + header('location: index.php?step='.$step); + exit; + } + + /** + * Get translated string + * + * @param string $str String to translate + * @param ... All other params will be used with sprintf + * @return string + */ + public function l($str) + { + return call_user_func_array(array($this->language, 'l'), func_get_args()); + } + + /** + * Find previous step + * + * @param string $step + */ + public function findPreviousStep() + { + return (isset(self::$steps[$this->getStepOffset($this->step) - 1])) ? self::$steps[$this->getStepOffset($this->step) - 1] : false; + } + + /** + * Find next step + * + * @param string $step + */ + public function findNextStep() + { + return (isset(self::$steps[$this->getStepOffset($this->step) + 1])) ? self::$steps[$this->getStepOffset($this->step) + 1] : false; + } + + /** + * Check if current step is first step in list of steps + * + * @return bool + */ + public function isFirstStep() + { + return self::getStepOffset($this->step) == 0; + } + + /** + * Check if current step is last step in list of steps + * + * @return bool + */ + public function isLastStep() + { + return self::getStepOffset($this->step) == (count(self::$steps) - 1); + } + + /** + * Check is given step is already finished + * + * @param string $step + * @return bool + */ + public function isStepFinished($step) + { + return self::getStepOffset($step) < self::getStepOffset($this->getLastStep()); + } + + /** + * Get telephone used for this language + * + * @return string + */ + public function getPhone() + { + return $this->language->getInformation('phone', false); + } + + /** + * Get link to documentation for this language + * + * Enter description here ... + */ + public function getDocumentationLink() + { + return $this->language->getInformation('documentation'); + } + + /** + * Get link to forum for this language + * + * Enter description here ... + */ + public function getForumLink() + { + return $this->language->getInformation('forum'); + } + + /** + * Get link to blog for this language + * + * Enter description here ... + */ + public function getBlogLink() + { + return $this->language->getInformation('blog'); + } + + /** + * Get link to support for this language + * + * Enter description here ... + */ + public function getSupportLink() + { + return $this->language->getInformation('support'); + } + + /** + * Send AJAX response in JSON format {success: bool, message: string} + * + * @param bool $success + * @param string $message + */ + public function ajaxJsonAnswer($success, $message = '') + { + die(Tools::jsonEncode(array( + 'success' => (bool)$success, + 'message' => $message, + ))); + } + + /** + * Display a template + * + * @param string $template Template name + * @param bool $get_output Is true, return template html + * @return string + */ + public function displayTemplate($template, $get_output = false, $path = null) + { + if (!$path) + $path = _PS_INSTALL_PATH_.'theme/views/'; + + if (!file_exists($path.$template.'.phtml')) + throw new PrestashopInstallerException("Template '{$template}.phtml' not found"); + + if ($get_output) + ob_start(); + + include($path.$template.'.phtml'); + + if ($get_output) + { + $content = ob_get_contents(); + ob_end_clean(); + return $content; + } + } + + public function &__get($varname) + { + if (isset($this->__vars[$varname])) + $ref = &$this->__vars[$varname]; + else + { + $null = null; + $ref = &$null; + } + return $ref; + } + + public function __set($varname, $value) + { + $this->__vars[$varname] = $value; + } + + public function __isset($varname) + { + return isset($this->__vars[$varname]); + } + + public function __unset($varname) + { + unset($this->__vars[$varname]); + } +} diff --git a/install-new/classes/exception.php b/install-new/classes/exception.php new file mode 100644 index 000000000..5776fc398 --- /dev/null +++ b/install-new/classes/exception.php @@ -0,0 +1,30 @@ + +* @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 PrestashopInstallerException extends PrestashopException +{ +} diff --git a/install-new/classes/fixtures.php b/install-new/classes/fixtures.php new file mode 100644 index 000000000..8c6f77065 --- /dev/null +++ b/install-new/classes/fixtures.php @@ -0,0 +1,1156 @@ + +* @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 +*/ + +abstract class InstallFixtures +{ + /** + * @var array List of errors logged during fixtures process + */ + private $errors = array(); + + /** + * @var InstallLanguages + */ + protected $language; + + /** + * @var Db + */ + protected $db; + + /** + * @var array List of installed languages + */ + protected $installed_languages = array(); + + /** + * @var array Store created ids for each object with ID argument + */ + protected $ids = array(); + + /** + * Process fixtures installation + */ + abstract protected function install(); + + public function __construct(InstallLanguages $language) + { + require_once _PS_ROOT_DIR_.'/images.inc.php'; + + $this->db = Db::getInstance(); + $this->language = $language; + Db::getInstance()->delete('prefix_manufacturer'); + Db::getInstance()->delete('prefix_manufacturer_lang'); + Db::getInstance()->delete('prefix_supplier'); + Db::getInstance()->delete('prefix_supplier_lang'); + Db::getInstance()->delete('prefix_address'); + Db::getInstance()->delete('prefix_product'); + Db::getInstance()->delete('prefix_product_lang'); + Db::getInstance()->delete('prefix_category', 'id_category <> 1'); + Db::getInstance()->delete('prefix_category_product'); + Db::getInstance()->delete('prefix_category_lang', 'id_category <> 1'); + Db::getInstance()->delete('prefix_scene'); + Db::getInstance()->delete('prefix_scene_lang'); + Db::getInstance()->delete('prefix_scene_products'); + Db::getInstance()->delete('prefix_scene_category'); + Db::getInstance()->delete('prefix_attribute_group'); + Db::getInstance()->delete('prefix_attribute_group_lang'); + Db::getInstance()->delete('prefix_attribute'); + Db::getInstance()->delete('prefix_attribute_lang'); + Db::getInstance()->delete('prefix_product_attribute'); + Db::getInstance()->delete('prefix_product_attribute_combination'); + Db::getInstance()->delete('prefix_product_attribute_image'); + Db::getInstance()->delete('prefix_order_message'); + Db::getInstance()->delete('prefix_order_message_lang'); + Db::getInstance()->delete('prefix_feature'); + Db::getInstance()->delete('prefix_feature_lang'); + Db::getInstance()->delete('prefix_feature_value'); + Db::getInstance()->delete('prefix_feature_value_lang'); + Db::getInstance()->delete('prefix_feature_product'); + Db::getInstance()->delete('prefix_store'); + Db::getInstance()->delete('prefix_image'); + Db::getInstance()->delete('prefix_image_lang'); + Db::getInstance()->delete('prefix_tag'); + Db::getInstance()->delete('prefix_alias'); + Db::getInstance()->delete('prefix_customer'); + Db::getInstance()->delete('prefix_guest'); + Db::getInstance()->delete('prefix_connections'); + Db::getInstance()->delete('prefix_customer_group'); + Db::getInstance()->delete('prefix_cart'); + Db::getInstance()->delete('prefix_cart_product'); + Db::getInstance()->delete('prefix_orders'); + Db::getInstance()->delete('prefix_order_detail'); + Db::getInstance()->delete('prefix_order_history'); + Db::getInstance()->delete('prefix_range_price'); + Db::getInstance()->delete('prefix_range_weight'); + Db::getInstance()->delete('prefix_delivery'); + Db::getInstance()->delete('prefix_specific_price'); + foreach (Language::getLanguages(false) as $lang) + $this->installed_languages[$lang['id_lang']] = $lang['iso_code']; + } + + /** + * Log an error during fixtures process + */ + protected function setError() + { + } + + /** + * Get list of errors + * + * @return array + */ + public function getErrors() + { + return $this->errors; + } + + /** + * Install fixtures + */ + public function process() + { + $this->loadData(); + $this->install(); + + Search::indexation(true); + } + + protected function getId($entity, $identifier) + { + return isset($this->ids[$entity.':'.$identifier]) ? $this->ids[$entity.':'.$identifier] : 0; + } + + protected function hydrateEntity(ObjectModel $object, array $data, array $mapper) + { + $hydrate_data = $this->getHydratedData($data, $mapper); + $object->hydrate($hydrate_data); + } + + protected function getHydratedData(array $data, array $mapper) + { + $hydrate_data = array(); + foreach ($mapper as $key => $info) + { + $value = (array_key_exists($key, $data)) ? $data[$key] : $info['default']; + switch ($info['type']) + { + case 'bool': + if (strtolower($value) == 'true') + $value = true; + else if (strtolower($value) == 'false') + $value = false; + $hydrate_data[$key] = (bool)$value; + break; + + case 'int': + $hydrate_data[$key] = (int)$value; + break; + + case 'float': + $hydrate_data[$key] = (float)$value; + break; + + case 'string': + $hydrate_data[$key] = (string)$value; + break; + + case 'date': + if (!Validate::isDateFormat($value)) + $value = '0000-00-00'; + $hydrate_data[$key] = $value; + break; + + case 'relation': + if (!isset($data[$info['field']]) && isset($data[$key])) + $hydrate_data[$info['field']] = $this->getId($info['entity'], $value); + break; + + case 'relation_table': + if (!isset($data[$info['field']]) && isset($data[$key])) + $hydrate_data[$info['field']] = $this->db->getValue(' + SELECT '.$info['field'].' + FROM '._DB_PREFIX_.$info['table'].' + WHERE '.$info['target_field'].' = \''.pSQL($data[$key]).'\' + '); + } + } + + return $hydrate_data; + } + + protected function fillTranslation($entity, $id, $tag) + { + $translations = array(); + foreach ($this->installed_languages as $id_lang => $iso) + $translations[$id_lang] = str_replace(array('\n', '\r'), array("\n", "\r"), $this->language->getFixtureTranslation($iso, $entity.'_'.$id.'_'.$tag)); + return $translations; + } + + protected function createEntityImages($entity, $id, $entity_id, $image_type, $target_folder) + { + return; + $path = _PS_INSTALL_FIXTURES_PATH_.'apple/img/'.$entity.'/'; + $dst_path = _PS_INSTALL_FIXTURES_PATH_.'apple/img/TESTS/'.$target_folder.'/'; + if (!@copy($path.$id.'.jpg', $dst_path.$entity_id.'.jpg')) + { + $this->setError($this->language->l('Cannot create image "%s"', $id)); + return; + } + @chmod($dst_path.$entity_id.'.jpg', 0644); + + $types = ImageType::getImagesTypes($image_type); + foreach ($types as $type) + { + $subpath = ''; + if ($type['name'] == 'thumb_scene') + $subpath = 'thumbs/'; + + $origin_file = $path.$subpath.$id.'-'.$type['name'].'.jpg'; + $target_file = $dst_path.$subpath.$entity_id.'-'.$type['name'].'.jpg'; + + // Test if dest folder is writable + if (!is_writable(dirname($target_file))) + $this->setError($this->language->l('Cannot create image "%1$s" (bad permissions on folder "%2$s")', $id.'-'.$type['name'], dirname($target_file))); + // If a file named folder/entity-type.jpg exists just copy it, this is an optimisation in order to prevent to much resize + else if (file_exists($origin_file)) + { + if (!@copy($origin_file, $target_file)) + $this->setError($this->language->l('Cannot create image "%s"', $id.'-'.$type['name'])); + @chmod($target_file, 0644); + } + // Resize the image if no cache was prepared in fixtures + else if (!imageResize($path.$id.'.jpg', $target_file, $type['width'], $type['height'])) + $this->setError($this->language->l('Cannot create image "%s"', $id.'-'.$type['name'])); + } + } + + protected function createProductImages(Image $image, $id, $id_product) + { + return; + $path = _PS_INSTALL_FIXTURES_PATH_.'apple/img/product/'; + $dst_path = $image->getPathForCreation(); + //$dst_path = str_replace(_PS_ROOT_DIR_.'/img/', _PS_INSTALL_FIXTURES_PATH_.'apple/img/TESTS/', $dst_path); + if (!@copy($path.$id.'.jpg', $dst_path.'.'.$image->image_format)) + { + $this->setError($this->language->l('Cannot create image "%s"', $id)); + return; + } + @chmod($dst_path.'.'.$image->image_format, 0644); + + $types = ImageType::getImagesTypes('products'); + foreach ($types as $type) + { + $origin_file = $path.$id.'-'.$type['name'].'.jpg'; + $target_file = $dst_path.'-'.$type['name'].'.'.$image->image_format; + + // Test if dest folder is writable + if (!is_writable(dirname($target_file))) + $this->setError($this->language->l('Cannot create image "%1$s" (bad permissions on folder "%2$s")', $id.'-'.$type['name'], dirname($target_file))); + // If a file named folder/entity-type.jpg exists just copy it, this is an optimisation in order to prevent to much resize + else if (file_exists($origin_file)) + { + if (!@copy($origin_file, $target_file)) + $this->setError($this->language->l('Cannot create image "%s"', $id.'-'.$type['name'])); + @chmod($target_file, 0644); + } + // Resize the image if no cache was prepared in fixtures + else if (!imageResize($path.$id.'.jpg', $target_file, $type['width'], $type['height'])) + $this->setError($this->language->l('Cannot create image "%s"', $id.'-'.$type['name'])); + } + } + + protected function loadData() + { + $this->loadEntity('manufacturer'); + $this->loadEntity('supplier'); + $this->loadEntity('alias'); + $this->loadEntity('ordermessage'); + $this->loadEntity('carrier'); + $this->loadEntity('range'); + $this->loadEntity('delivery'); + $this->loadEntity('customer'); + $this->loadEntity('guest'); + $this->loadEntity('address'); + $this->loadEntity('store'); + $this->loadEntity('category'); + $this->loadEntity('feature'); + $this->loadEntity('featurevalue'); + $this->loadEntity('attributegroup'); + $this->loadEntity('attribute'); + $this->loadEntity('product'); + $this->loadEntity('specificprice'); + $this->loadEntity('image'); + $this->loadEntity('productattribute'); + $this->loadEntity('scene'); + $this->loadEntity('cart'); + $this->loadEntity('order'); + } + + protected function loadEntity($entity) + { + $entity_file = _PS_INSTALL_FIXTURES_PATH_.'apple/data/'.$entity.'.xml'; + if (!file_exists($entity_file)) + return; + + $xml = simplexml_load_file($entity_file); + foreach ($xml->$entity as $node) + { + // Entity identifier + $identifier = (string)$node['id']; + + // Entity data + $data = array(); + foreach ($node->attributes() as $attr_name => $attr_value) + $data[$attr_name] = (string)$attr_value; + + foreach ($node->children() as $child_node) + $data[$child_node->getName()] = $this->parseNode($child_node); + + $method = 'Install'.ucfirst($entity); + $this->$method($identifier, $data); + } + } + + protected function parseNode(SimpleXMLElement $node) + { + $children = $node->children(); + if (!$children) + return (string)$node; + else + { + $data = array(); + foreach ($node->attributes() as $k => $v) + $data[$k] = (string)$v; + + foreach ($children as $child) + if ($child->getName() == 'item') + $data[] = $this->parseNode($child); + else + $data[$child->getName()] = $this->parseNode($child); + return $data; + } + } + + protected function installGenericEntity($classname, $identifier, array $data, array $mapper, array $lang_fields = array()) + { + $entity = strtolower($classname); + $object = new $classname(); + $this->hydrateEntity($object, $data, $mapper); + + foreach ($lang_fields as $field) + $object->$field = $this->fillTranslation($entity, $identifier, $field); + + if (!$object->add()) + { + $this->setError($this->language->l('Cannot create entity "%s" with identifier "%s"', $entity, $identifier)); + return false; + } + + $this->ids[$entity.':'.$identifier] = $object->id; + return $object; + } + + protected function installManufacturer($identifier, array $data) + { + $object = $this->installGenericEntity( + 'Manufacturer', + $identifier, + $data, + array( + 'name' => array('type' => 'string', 'default' => ''), + 'active' => array('type' => 'bool', 'default' => true), + ), + array('description', 'short_description', 'meta_description', 'meta_title', 'meta_keywords') + ); + + if ($object) + $this->createEntityImages('manufacturer', $identifier, $object->id, 'manufacturers', 'm'); + } + + protected function installSupplier($identifier, array $data) + { + $object = $this->installGenericEntity( + 'Supplier', + $identifier, + $data, + array( + 'name' => array('type' => 'string', 'default' => ''), + 'active' => array('type' => 'bool', 'default' => true), + ), + array('description', 'short_description', 'meta_description', 'meta_title', 'meta_keywords') + ); + + if ($object) + $this->createEntityImages('supplier', $identifier, $object->id, 'suppliers', 'su'); + } + + protected function installAlias($identifier, array $data) + { + $object = $this->installGenericEntity( + 'Alias', + $identifier, + $data, + array( + 'alias' => array('type' => 'string', 'default' => ''), + 'search' => array('type' => 'string', 'default' => ''), + 'active' => array('type' => 'bool', 'default' => true), + ) + ); + } + + protected function installOrderMessage($identifier, array $data) + { + $object = $this->installGenericEntity( + 'OrderMessage', + $identifier, + $data, + array(), + array('name', 'message') + ); + } + + protected function installCarrier($identifier, array $data) + { + $object = $this->installGenericEntity( + 'Carrier', + $identifier, + $data, + array( + 'id_tax_rules_group' => array('type' => 'int', 'default' => 0), + 'name' => array('type' => 'string', 'default' => ''), + 'shipping_handling' => array('type' => 'bool', 'default' => false), + 'is_free' => array('type' => 'bool', 'default' => false), + 'active' => array('type' => 'bool', 'default' => true), + ), + array('delay') + ); + + if ($object) + { + // Add zones to carrier + if (isset($data['zones'])) + { + foreach ($data['zones'] as $zone) + $object->addZone(Zone::getIdByName($zone)); + } + + // Add carrier to groups + if (isset($data['groups'])) + { + foreach ($data['groups'] as $id_group) + $this->db->autoExecute(_DB_PREFIX_.'carrier_group', array( + 'id_carrier' => (int)$object->id, + 'id_group' => (int)$id_group, + ), 'INSERT'); + } + } + } + + protected function installCustomer($identifier, array $data) + { + if (isset($data['passwd'])) + $data['passwd'] = Tools::encrypt($data['passwd']); + + $object = $this->installGenericEntity( + 'Customer', + $identifier, + $data, + array( + 'firstname' => array('type' => 'string', 'default' => ''), + 'lastname' => array('type' => 'string', 'default' => ''), + 'email' => array('type' => 'string', 'default' => ''), + 'passwd' => array('type' => 'string', 'default' => ''), + 'birthday' => array('type' => 'date', 'default' => '0000-00-00'), + 'id_gender' => array('type' => 'int', 'default' => 1), + 'id_default_group' => array('type' => 'int', 'default' => 1), + 'is_guest' => array('type' => 'bool', 'default' => false), + 'active' => array('type' => 'bool', 'default' => true), + ) + ); + } + + protected function installGuest($identifier, array $data) + { + $object = $this->installGenericEntity( + 'Guest', + $identifier, + $data, + array( + 'id_operating_system' => array('type' => 'int', 'default' => 0), + 'operating_system' => array('type' => 'relation_table', 'field' => 'id_operating_system', 'table' => 'operating_system', 'target_field' => 'name', 'default' => ''), + 'id_web_browser' => array('type' => 'int', 'default' => 0), + 'web_browser' => array('type' => 'relation_table', 'field' => 'id_web_browser', 'table' => 'web_browser', 'target_field' => 'name', 'default' => ''), + 'id_customer' => array('type' => 'int', 'default' => 0), + 'customer' => array('type' => 'relation', 'field' => 'id_customer', 'entity' => 'customer', 'default' => ''), + 'screen_resolution_x' => array('type' => 'int', 'default' => 0), + 'screen_resolution_y' => array('type' => 'int', 'default' => 0), + 'screen_color' => array('type' => 'int', 'default' => 0), + 'javascript' => array('type' => 'bool', 'default' => true), + 'sun_java' => array('type' => 'bool', 'default' => false), + 'adobe_flash' => array('type' => 'bool', 'default' => false), + 'adobe_director' => array('type' => 'bool', 'default' => false), + 'apple_quicktime' => array('type' => 'bool', 'default' => false), + 'real_player' => array('type' => 'bool', 'default' => false), + 'windows_media' => array('type' => 'bool', 'default' => false), + 'accept_language' => array('type' => 'string', 'default' => ''), + 'id_shop' => array('type' => 'int', 'default' => Context::getContext()->shop->id), + ) + ); + + if (isset($data['connections']) && is_array($data['connections'])) + { + foreach ($data['connections'] as $connection_data) + { + if (isset($connection_data['id'])) + { + $connection_data['id_guest'] = $object->id; + $this->installConnection($connection_data['id'], $connection_data); + } + } + } + } + + protected function installConnection($identifier, array $data) + { + if (isset($data['ip_address'])) + $data['ip_address'] = ip2long($data['ip_address']); + + $object = $this->installGenericEntity( + 'Connection', + $identifier, + $data, + array( + 'id_guest' => array('type' => 'int', 'default' => 0), + 'guest' => array('type' => 'relation', 'field' => 'id_guest', 'entity' => 'guest', 'default' => ''), + 'id_page' => array('type' => 'int', 'default' => 0), + 'ip_address' => array('type' => 'string', 'default' => ''), + 'http_referer' => array('type' => 'string', 'default' => ''), + 'id_shop' => array('type' => 'int', 'default' => Context::getContext()->shop->id), + 'id_group_shop' => array('type' => 'int', 'default' => Context::getContext()->shop->getGroupID()), + ) + ); + } + + protected function installAddress($identifier, array $data) + { + if (isset($data['country'])) + $data['id_country'] = Country::getByIso($data['country']); + + if (isset($data['state'])) + { + $state = $data['state']; + $data['id_state'] = State::getIdByName($state); + if (!$data['id_state']) + $data['id_state'] = State::getIdByIso($state); + } + + $object = $this->installGenericEntity( + 'Address', + $identifier, + $data, + array( + 'firstname' => array('type' => 'string', 'default' => ''), + 'lastname' => array('type' => 'string', 'default' => ''), + 'address1' => array('type' => 'string', 'default' => ''), + 'address2' => array('type' => 'string', 'default' => ''), + 'postcode' => array('type' => 'string', 'default' => ''), + 'city' => array('type' => 'string', 'default' => ''), + 'phone' => array('type' => 'string', 'default' => ''), + 'alias' => array('type' => 'string', 'default' => ''), + 'company' => array('type' => 'string', 'default' => ''), + 'id_country' => array('type' => 'int', 'default' => 0), + 'id_state' => array('type' => 'int', 'default' => 0), + 'id_customer' => array('type' => 'int', 'default' => 0), + 'customer' => array('type' => 'relation', 'field' => 'id_customer', 'entity' => 'customer', 'default' => ''), + 'id_manufacturer' =>array('type' => 'int', 'default' => 0), + 'manufacturer' => array('type' => 'relation', 'field' => 'id_manufacturer', 'entity' => 'manufacturer', 'default' => ''), + 'id_supplier' => array('type' => 'int', 'default' => 0), + 'supplier' => array('type' => 'relation', 'field' => 'id_supplier', 'entity' => 'supplier', 'default' => ''), + 'active' => array('type' => 'bool', 'default' => true), + ) + ); + } + + protected function installStore($identifier, array $data) + { + if (isset($data['country'])) + $data['id_country'] = Country::getByIso($data['country']); + + if (isset($data['state'])) + { + $state = $data['state']; + $data['id_state'] = State::getIdByName($state); + if (!$data['id_state']) + $data['id_state'] = State::getIdByIso($state); + } + + if (isset($data['hours']) && is_array($data['hours'])) + $data['hours'] = serialize($data['hours']); + + $object = $this->installGenericEntity( + 'Store', + $identifier, + $data, + array( + 'id_country' => array('type' => 'int', 'default' => 0), + 'id_state' => array('type' => 'int', 'default' => 0), + 'name' => array('type' => 'string', 'default' => ''), + 'address1' => array('type' => 'string', 'default' => ''), + 'address2' => array('type' => 'string', 'default' => ''), + 'city' => array('type' => 'string', 'default' => ''), + 'postcode' => array('type' => 'string', 'default' => ''), + 'latitude' => array('type' => 'float', 'default' => 0.00), + 'longitude' => array('type' => 'float', 'default' => 0.00), + 'hours' => array('type' => 'string', 'default' => ''), + 'phone' => array('type' => 'string', 'default' => ''), + 'fax' => array('type' => 'string', 'default' => ''), + 'email' => array('type' => 'string', 'default' => ''), + 'note' => array('type' => 'string', 'default' => ''), + 'active' => array('type' => 'bool', 'default' => true), + ) + ); + } + + protected function installCategory($identifier, array $data) + { + $object = $this->installGenericEntity( + 'Category', + $identifier, + $data, + array( + 'id_parent' => array('type' => 'int', 'default' => 1), + 'parent' => array('type' => 'relation', 'field' => 'id_parent', 'entity' => 'category', 'default' => 0), + 'active' => array('type' => 'bool', 'default' => true), + ), + array('name', 'description', 'link_rewrite', 'meta_title', 'meta_keyword', 'meta_description') + ); + + $this->createEntityImages('category', $identifier, $object->id, 'categories', 'c'); + } + + protected function installFeature($identifier, array $data) + { + $object = $this->installGenericEntity( + 'Feature', + $identifier, + $data, + array(), + array('name') + ); + } + + protected function installFeatureValue($identifier, array $data) + { + $object = $this->installGenericEntity( + 'FeatureValue', + $identifier, + $data, + array( + 'id_feature' => array('type' => 'int', 'default' => 1), + 'feature' => array('type' => 'relation', 'field' => 'id_feature', 'entity' => 'feature', 'default' => 0), + 'custom' => array('type' => 'bool', 'default' => false), + ), + array('value') + ); + } + + protected function installAttributeGroup($identifier, array $data) + { + $object = $this->installGenericEntity( + 'AttributeGroup', + $identifier, + $data, + array( + 'group_type' => array('type' => 'string', 'default' => 'select'), + 'is_color_group' => array('type' => 'bool', 'default' => false), + ), + array('name', 'public_name') + ); + } + + protected function installAttribute($identifier, array $data) + { + $object = $this->installGenericEntity( + 'Attribute', + $identifier, + $data, + array( + 'id_attribute_group' => array('type' => 'int', 'default' => 1), + 'attribute_group' => array('type' => 'relation', 'field' => 'id_attribute_group', 'entity' => 'attributegroup', 'default' => 0), + 'color' => array('type' => 'string', 'default' => ''), + ), + array('name', 'public_name') + ); + } + + protected function installProduct($identifier, array $data) + { + $object = $this->installGenericEntity( + 'Product', + $identifier, + $data, + array( + 'id_supplier' => array('type' => 'int', 'default' => 0), + 'supplier' => array('type' => 'relation', 'field' => 'id_supplier', 'entity' => 'supplier', 'default' => 0), + 'id_manufacturer' => array('type' => 'int', 'default' => 0), + 'manufacturer' => array('type' => 'relation', 'field' => 'id_manufacturer', 'entity' => 'manufacturer', 'default' => 0), + 'id_tax_rules_group' => array('type' => 'int', 'default' => 0), + 'id_category_default' =>array('type' => 'int', 'default' => 1), + 'category_default' => array('type' => 'relation', 'field' => 'id_category_default', 'entity' => 'category', 'default' => 0), + 'on_sale' => array('type' => 'int', 'default' => 0), + 'online_only' => array('type' => 'int', 'default' => 0), + 'ecotax' => array('type' => 'float', 'default' => 0.00), + 'price' => array('type' => 'float', 'default' => 0.00), + 'wholesale_price' => array('type' => 'float', 'default' => 0.00), + 'ean13' => array('type' => 'string', 'default' => ''), + 'reference' => array('type' => 'string', 'default' => ''), + 'supplier_reference' => array('type' => 'string', 'default' => ''), + 'weight' => array('type' => 'int', 'default' => 0), + 'out_of_stock' => array('type' => 'int', 'default' => 2), + 'quantity_discount' => array('type' => 'int', 'default' => 0), + 'customizable' => array('type' => 'int', 'default' => 0), + 'uploadable_files' => array('type' => 'int', 'default' => 0), + 'text_fields' => array('type' => 'int', 'default' => 0), + 'available_date' => array('type' => 'date', 'default' => '0000-00-00'), + 'indexed' => array('type' => 'bool', 'default' => true), + 'active' => array('type' => 'bool', 'default' => true), + ), + array('description', 'description_short', 'link_rewrite', 'meta_description', 'meta_keywords', 'meta_title', 'name', 'available_now', 'available_later') + ); + + if ($object) + { + // Add product to categories + if (isset($data['categories']) && is_array($data['categories'])) + { + $categories = array(); + foreach ($data['categories'] as $category) + $categories = (is_array($category)) ? $this->getId('category', $category['id']) : (int)$category; + $object->addToCategories($categories); + } + + // Add features to the product + if (isset($data['features']) && is_array($data['features'])) + { + static $cache_features = array(); + + foreach ($data['features'] as $id_feature_value) + { + $id_feature_value = (is_array($id_feature_value)) ? $this->getId('featurevalue', $id_feature_value['id']) : (int)$id_feature_value; + if (!isset($cache_features[$id_feature_value])) + $cache_features[$id_feature_value] = $this->db->getValue(' + SELECT id_feature + FROM '._DB_PREFIX_.'feature_value + WHERE id_feature_value = '.(int)$id_feature_value + ); + Product::addFeatureProductImport($object->id, $cache_features[$id_feature_value], $id_feature_value); + } + } + + // Add specific price + if (isset($data['specific_prices']) && is_array($data['specific_prices'])) + { + foreach ($data['specific_prices'] as $price_data) + { + $price_data['id_product'] = $object->id; + $this->installSpecificPrice($price_data['id'], $price_data); + } + } + + // Add images + if (isset($data['images']) && is_array($data['images'])) + { + foreach ($data['images'] as $image_data) + { + $image_data['id_product'] = $object->id; + $this->installImage($image_data['id'], $image_data); + } + } + + // Add combinations + if (isset($data['combinations']) && is_array($data['combinations'])) + { + foreach ($data['combinations'] as $combination_data) + { + $combination_data['id_product'] = $object->id; + $this->installCombination($combination_data['id'], $combination_data); + } + } + } + } + + + protected function installSpecificPrice($identifier, array $data) + { + if (isset($data['country'])) + $data['id_country'] = Country::getByIso($data['country']); + + if (isset($data['currency'])) + $data['id_currency'] = Currency::getIdByIsoCode($data['currency']); + + $object = $this->installGenericEntity( + 'SpecificPrice', + $identifier, + $data, + array( + 'id_product' => array('type' => 'int', 'default' => 0), + 'product' => array('type' => 'relation', 'field' => 'id_product', 'entity' => 'product', 'default' => 0), + 'id_shop' => array('type' => 'int', 'default' => 0), + 'id_currency' => array('type' => 'int', 'default' => 0), + 'id_country' => array('type' => 'int', 'default' => 0), + 'id_group' => array('type' => 'int', 'default' => 0), + 'price' => array('type' => 'float', 'default' => 0), + 'from_quantity' => array('type' => 'int', 'default' => 0), + 'reduction' => array('type' => 'float', 'default' => 0), + 'reduction_type' => array('type' => 'string', 'default' => 'percentage'), + 'from' => array('type' => 'date', 'default' => '0000-00-00 00:00:00'), + 'to' => array('type' => 'date', 'default' => '0000-00-00 00:00:00'), + ) + ); + } + + protected function installImage($identifier, array $data) + { + $object = $this->installGenericEntity( + 'Image', + $identifier, + $data, + array( + 'id_product' => array('type' => 'int', 'default' => 0), + 'product' => array('type' => 'relation', 'field' => 'id_product', 'entity' => 'product', 'default' => 0), + 'cover' => array('type' => 'bool', 'default' => false), + ), + array('legend') + ); + + $this->createProductImages($object, $identifier, $object->id_product); + } + + protected function installCombination($identifier, array $data) + { + if (!isset($data['id_product'])) + return; + + $d = $this->getHydratedData($data, array( + 'reference' => array('type' => 'string', 'default' => ''), + 'supplier_reference' => array('type' => 'string', 'default' => ''), + 'ean13' => array('type' => 'string', 'default' => ''), + 'price' => array('type' => 'float', 'default' => 0.000000), + 'ecotax' => array('type' => 'float', 'default' => 0.00), + 'weight' => array('type' => 'float', 'default' => 0), + 'default_on' => array('type' => 'bool', 'default' => false), + 'unit_price_impact' => array('type' => 'float', 'default' => 0.00), + )); + + $product = new Product($data['id_product']); + if (!Validate::isLoadedObject($product)) + return; + + $images = array(); + if (isset($data['images']) && is_array($data['images'])) + { + $images = array(); + foreach ($data['images'] as $image) + $images[] = (is_array($image)) ? $this->getId('image', $image['id']) : (int)$image; + } + + $id_product_attribute = $product->addProductAttribute( + $d['price'], + $d['weight'], + $d['unit_price_impact'], + $d['ecotax'], + $images, + $d['reference'], + $d['supplier_reference'], + $d['ean13'], + $d['default_on'] + ); + + if (!$id_product_attribute) + { + $this->setError($this->language->l('Cannot create product attribute')); + return false; + } + + if (isset($data['attributes']) && is_array($data['attributes'])) + { + $attributes = array(); + foreach ($data['attributes'] as $attribute) + $attributes[] = (is_array($attribute)) ? $this->getId('attribute', $attribute['id']) : (int)$attribute; + $product->addAttributeCombinaison($id_product_attribute, $attributes); + } + + + $this->ids['combination:'.$identifier] = $id_product_attribute; + } + + protected function installScene($identifier, array $data) + { + $object = $this->installGenericEntity( + 'Scene', + $identifier, + $data, + array( + 'active' => array('type' => 'bool', 'default' => true), + ), + array('legend') + ); + + // Add categories to scene + if (isset($data['categories']) && is_array($data['categories'])) + { + $categories = array(); + foreach ($data['categories'] as $category) + $categories[] = (is_array($category)) ? $this->getId('categories', $category['id']) : (int)$category; + $object->addCategories($categories); + } + + // Add products to scene + if (isset($data['zones']) && is_array($data['zones'])) + { + $zones = array(); + foreach ($data['zones'] as $zone) + { + if (isset($zone['product']) && !isset($zone['id_product'])) + $zone['id_product'] = $this->getId('product', $zone['product']); + $zones[] = $zone; + } + $object->addZoneProducts($zones); + } + + $this->createEntityImages('scene', $identifier, $object->id, 'scenes', 'scenes'); + } + + protected function installRange($identifier, array $data) + { + $class = (isset($data) && $data['type'] == 'price') ? 'RangePrice' : 'RangeWeight'; + $object = $this->installGenericEntity( + $class, + $identifier, + $data, + array( + 'id_carrier' => array('type' => 'int', 'default' => 0), + 'carrier' => array('type' => 'relation', 'field' => 'id_carrier', 'entity' => 'carrier', 'default' => 0), + 'delimiter1' => array('type' => 'int', 'default' => 0), + 'delimiter2' => array('type' => 'int', 'default' => 0), + ) + ); + } + + protected function installDelivery($identifier, array $data) + { + if (isset($data['zone'])) + $data['id_zone'] = Zone::getIdByName($data['zone']); + + $object = $this->installGenericEntity( + 'Delivery', + $identifier, + $data, + array( + 'id_range_price' => array('type' => 'int', 'default' => 0), + 'range_price' => array('type' => 'relation', 'field' => 'id_range_price', 'entity' => 'rangeprice', 'default' => 0), + 'id_range_weight' =>array('type' => 'int', 'default' => 0), + 'range_weight' => array('type' => 'relation', 'field' => 'id_range_weight', 'entity' => 'rangeweight', 'default' => 0), + 'id_carrier' => array('type' => 'int', 'default' => 0), + 'carrier' => array('type' => 'relation', 'field' => 'id_carrier', 'entity' => 'carrier', 'default' => 0), + 'id_zone' => array('type' => 'int', 'default' => 0), + 'price' => array('type' => 'float', 'default' => 0.00), + ) + ); + } + + protected function installCart($identifier, array $data) + { + if (isset($data['lang'])) + $data['id_lang'] = Language::getIdByIso($data['lang']); + + if (isset($data['currency'])) + $data['id_currency'] = Currency::getIdByIsoCode($data['currency']); + + $object = $this->installGenericEntity( + 'Cart', + $identifier, + $data, + array( + 'id_carrier' => array('type' => 'int', 'default' => 0), + 'carrier' => array('type' => 'relation', 'field' => 'id_carrier', 'entity' => 'carrier', 'default' => 0), + 'id_lang' => array('type' => 'int', 'default' => Configuration::get('PS_LANG_DEFAULT')), + 'id_address_delivery' => array('type' => 'int', 'default' => 0), + 'address_delivery' => array('type' => 'relation', 'field' => 'id_address_delivery', 'entity' => 'address', 'default' => 0), + 'id_address_invoice' => array('type' => 'int', 'default' => 0), + 'address_invoice' => array('type' => 'relation', 'field' => 'id_address_invoice', 'entity' => 'address', 'default' => 0), + 'id_currency' => array('type' => 'int', 'default' => Configuration::get('PS_CURRENCY_DEFAULT')), + 'id_customer' => array('type' => 'int', 'default' => 0), + 'customer' => array('type' => 'relation', 'field' => 'id_customer', 'entity' => 'customer', 'default' => 0), + 'id_guest' => array('type' => 'int', 'default' => 0), + 'guest' => array('type' => 'relation', 'field' => 'id_guest', 'entity' => 'guest', 'default' => 0), + 'id_shop' => array('type' => 'int', 'default' => Context::getContext()->shop->id), + 'recyclable' => array('type' => 'bool', 'default' => false), + 'gift' => array('type' => 'bool', 'default' => false), + ) + ); + + // Add products to cart + if ($object && $data['products'] && is_array($data['products'])) + { + foreach ($data['products'] as $product) + { + if (isset($product['product'])) + $product['id_product'] = $this->getId('product', $product['product']); + + if (isset($product['combination'])) + $product['id_product_attribute'] = $this->getId('combination', $product['combination']); + + $this->db->autoExecute(_DB_PREFIX_.'cart_product', array( + 'id_product' => (isset($product['id_product'])) ? (int)$product['id_product'] : 0, + 'id_product_attribute' => (isset($product['id_product_attribute'])) ? (int)$product['id_product_attribute'] : 0, + 'id_cart' => (int)$object->id, + 'id_shop' => (isset($product['id_shop'])) ? $product['id_shop'] : Context::getContext()->shop->id, + 'quantity' => (isset($product['quantity'])) ? (int)$product['quantity'] : 1, + 'date_add' => date('Y-m-d H:i:s') + ), 'INSERT'); + } + } + } + + protected function installOrder($identifier, array $data) + { + if (isset($data['currency'])) + $data['id_currency'] = Currency::getIdByIsoCode($data['currency']); + + $object = $this->installGenericEntity( + 'Order', + $identifier, + $data, + array( + 'id_lang' => array('type' => 'int', 'default' => Configuration::get('PS_LANG_DEFAULT')), + 'id_shop' => array('type' => 'int', 'default' => Context::getContext()->shop->id), + 'id_group_shop' => array('type' => 'int', 'default' => Context::getContext()->shop->getGroupID()), + 'id_carrier' => array('type' => 'int', 'default' => Configuration::get('PS_CARRIER_DEFAULT')), + 'carrier' => array('type' => 'relation', 'field' => 'id_carrier', 'entity' => 'carrier', 'default' => 0), + 'id_customer' => array('type' => 'int', 'default' => 0), + 'customer' => array('type' => 'relation', 'field' => 'id_customer', 'entity' => 'customer', 'default' => 0), + 'id_cart' => array('type' => 'int', 'default' => 0), + 'cart' => array('type' => 'relation', 'field' => 'id_cart', 'entity' => 'cart', 'default' => 0), + 'id_currency' => array('type' => 'int', 'default' => Configuration::get('PS_CURRENCY_DEFAULT')), + 'id_address_delivery' => array('type' => 'int', 'default' => 0), + 'address_delivery' => array('type' => 'relation', 'field' => 'id_address_delivery', 'entity' => 'address', 'default' => 0), + 'id_address_invoice' => array('type' => 'int', 'default' => 0), + 'address_invoice' => array('type' => 'relation', 'field' => 'id_address_invoice', 'entity' => 'address', 'default' => 0), + 'secure_key' => array('type' => 'string', 'default' => ''), + 'payment' => array('type' => 'string', 'default' => ''), + 'module' => array('type' => 'string', 'default' => ''), + 'recyclable' => array('type' => 'bool', 'default' => false), + 'gift' => array('type' => 'bool', 'default' => false), + 'gift_message' => array('type' => 'string', 'default' => ''), + 'shipping_number' => array('type' => 'string', 'default' => ''), + 'total_discounts' => array('type' => 'float', 'default' => 0.00), + 'total_paid' => array('type' => 'float', 'default' => 0.00), + 'total_paid_real' => array('type' => 'float', 'default' => 0.00), + 'total_products' => array('type' => 'float', 'default' => 0.00), + 'total_products_wt' => array('type' => 'float', 'default' => 0.00), + 'total_shipping' => array('type' => 'float', 'default' => 0.00), + 'conversion_rate' => array('type' => 'float', 'default' => 1.000000), + 'invoice_number' => array('type' => 'int', 'default' => 0), + 'delivery_number' => array('type' => 'int', 'default' => 0), + 'invoice_date' => array('type' => 'date', 'default' => '0000-00-00 00:00:00'), + 'delivery_date' => array('type' => 'date', 'default' => '0000-00-00 00:00:00'), + 'valid' => array('type' => 'bool', 'default' => false), + ) + ); + + if ($object) + { + // Add order details + if (isset($data['details']) && is_array($data['details'])) + { + foreach ($data['details'] as $detail_data) + { + $detail_data['id_order'] = $object->id; + $this->installOrderDetail($detail_data['id'], $detail_data); + } + } + + // Add order history + if (isset($data['histories']) && is_array($data['histories'])) + { + foreach ($data['histories'] as $history_data) + { + $history_data['id_order'] = $object->id; + $this->installOrderHistory($history_data['id'], $history_data); + } + } + } + } + + protected function installOrderDetail($identifier, array $data) + { + $object = $this->installGenericEntity( + 'OrderDetail', + $identifier, + $data, + array( + 'id_order' => array('type' => 'int', 'default' => 0), + 'order' => array('type' => 'relation', 'field' => 'id_order', 'entity' => 'order', 'default' => 0), + 'product_id' => array('type' => 'int', 'default' => 0), + 'product' => array('type' => 'relation', 'field' => 'product_id', 'entity' => 'product', 'default' => 0), + 'product_attribute_id' => array('type' => 'int', 'default' => 0), + 'combination' => array('type' => 'relation', 'field' => 'product_attribute_id', 'entity' => 'combination', 'default' => 0), + 'product_name' => array('type' => 'string', 'default' => ''), + 'product_quantity' => array('type' => 'int', 'default' => 1), + 'product_quantity_return' => array('type' => 'int', 'default' => 0), + 'product_price' => array('type' => 'float', 'default' => 0.000000), + 'product_quantity_discount' => array('type' => 'float', 'default' => 0.000000), + 'product_ean13' => array('type' => 'string', 'default' => ''), + 'product_reference' => array('type' => 'string', 'default' => ''), + 'product_supplier_reference' => array('type' => 'string', 'default' => ''), + 'product_weight' => array('type' => 'int', 'default' => 0), + 'ecotax' => array('type' => 'float', 'default' => 0.00), + 'download_hash' => array('type' => 'string', 'default' => ''), + 'download_nb' => array('type' => 'int', 'default' => 0), + 'download_deadline' => array('type' => 'date', 'default' => '0000-00-00 00:00:00'), + ) + ); + } + + protected function installOrderHistory($identifier, array $data) + { + $object = $this->installGenericEntity( + 'OrderHistory', + $identifier, + $data, + array( + 'id_order' => array('type' => 'int', 'default' => 0), + 'order' => array('type' => 'relation', 'field' => 'id_order', 'entity' => 'order', 'default' => 0), + 'id_employee' => array('type' => 'int', 'default' => 0), + 'id_order_state' => array('type' => 'int', 'default' => 0), + ) + ); + } +} \ No newline at end of file diff --git a/install-new/classes/language.php b/install-new/classes/language.php new file mode 100644 index 000000000..c54e81a76 --- /dev/null +++ b/install-new/classes/language.php @@ -0,0 +1,122 @@ + +* @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 InstallLanguage +{ + /** + * @var string Current language folder + */ + protected $path; + + /** + * @var string Current language iso + */ + protected $iso; + + /** + * @var array Cache list of installer translations for this language + */ + protected $data; + + protected $fixtures_data; + + /** + * @var array Cache list of informations in language.xml file + */ + protected $meta; + + /** + * @var array Cache list of countries for this language + */ + protected $countries; + + public function __construct($iso) + { + $this->path = _PS_INSTALL_LANGS_PATH_.$iso.'/'; + $this->iso = $iso; + } + + /** + * Get iso for current language + * + * @return string + */ + public function getIso() + { + return $this->iso; + } + + /** + * Get an information from language.xml file (E.g. $this->getMetaInformation('name')) + * + * @param string $key + * @return string + */ + public function getMetaInformation($key) + { + if (!is_array($this->meta)) + { + $this->meta = array(); + $xml = simplexml_load_file($this->path.'language.xml'); + foreach ($xml->children() as $node) + $this->meta[$node->getName()] = (string)$node; + } + + return isset($this->meta[$key]) ? $this->meta[$key] : null; + } + + public function getTranslation($key, $type = 'translations') + { + if (!is_array($this->data)) + $this->data = file_exists($this->path.'install.php') ? include($this->path.'install.php') : array(); + + return isset($this->data[$type][$key]) ? $this->data[$type][$key] : null; + } + + public function getFixtureTranslation($key) + { + if (!is_array($this->fixtures_data)) + $this->fixtures_data = file_exists(_PS_INSTALL_FIXTURES_PATH_.'apple/langs/'.$this->iso.'/fixtures.php') ? include(_PS_INSTALL_FIXTURES_PATH_.'apple/langs/'.$this->iso.'/fixtures.php') : array(); + + return isset($this->fixtures_data[$key]) ? $this->fixtures_data[$key] : null; + } + + public function getCountries() + { + if (!is_array($this->countries)) + { + $this->countries = array(); + if (file_exists($this->path.'data/country.xml')) + { + if ($xml = simplexml_load_file($this->path.'data/country.xml')) + foreach ($xml->country as $country) + $this->countries[strtolower((string)$country['id'])] = (string)$country->name; + } + } + return $this->countries; + } +} diff --git a/install-new/classes/languages.php b/install-new/classes/languages.php new file mode 100644 index 000000000..3c088c131 --- /dev/null +++ b/install-new/classes/languages.php @@ -0,0 +1,188 @@ + +* @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 InstallLanguages +{ + const DEFAULT_ISO = 'en'; + /** + * @var array List of available languages + */ + protected $languages; + + /** + * @var string Current language + */ + protected $language; + + /** + * @var InstallLanguage Default language (english) + */ + protected $default; + + protected static $_instance; + + public static function getInstance() + { + if (!self::$_instance) + self::$_instance = new self(); + return self::$_instance; + } + + public function __construct() + { + // English language is required + if (!file_exists(_PS_INSTALL_LANGS_PATH_.'en/language.xml')) + throw new PrestashopInstallerException('English language is missing'); + + $this->languages = array( + self::DEFAULT_ISO => new InstallLanguage(self::DEFAULT_ISO), + ); + + // Load other languages + foreach (scandir(_PS_INSTALL_LANGS_PATH_) as $lang) + if ($lang[0] != '.' && is_dir(_PS_INSTALL_LANGS_PATH_.$lang) && $lang != self::DEFAULT_ISO) + $this->languages[$lang] = new InstallLanguage($lang); + } + + /** + * Set current language + * + * @param string $iso Language iso + */ + public function setLanguage($iso) + { + if (!in_array($iso, $this->getIsoList())) + throw new PrestashopInstallerException('Language '.$iso.' not found'); + + $this->language = $iso; + } + + /** + * Get current language + * + * @return string + */ + public function getLanguageIso() + { + return $this->language; + } + + /** + * Get current language + * + * @return InstallLanguage + */ + public function getLanguage($iso = null) + { + if (!$iso) + $iso = $this->language; + return $this->languages[$iso]; + } + + public function getIsoList() + { + return array_keys($this->languages); + } + + /** + * Get list of languages iso supported by installer + * + * @return array + */ + public function getLanguages() + { + return $this->languages; + } + + /** + * Get translated string + * + * @param string $str String to translate + * @param ... All other params will be used with sprintf + * @return string + */ + public function l($str) + { + $args = func_get_args(); + $translation = $this->getLanguage()->getTranslation($args[0]); + if (is_null($translation)) + { + $translation = $this->getLanguage(self::DEFAULT_ISO)->getTranslation($args[0]); + if (is_null($translation)) + $translation = $args[0]; + } + + $args[0] = $translation; + return call_user_func_array('sprintf', $args); + } + + /** + * Get an information from language (phone, links, etc.) + * + * @param string $key Information identifier + */ + public function getInformation($key, $with_default = true) + { + $information = $this->getLanguage()->getTranslation($key, 'informations'); + if (is_null($information) && $with_default) + return $this->getLanguage(self::DEFAULT_ISO)->getTranslation($key, 'informations'); + return false; + } + + /** + * Get list of countries for current language + * + * @return array + */ + public function getCountries() + { + static $countries = null; + + if (is_null($countries)) + { + $countries = array(); + $countries_lang = $this->getLanguage()->getCountries(); + $countries_default = $this->getLanguage(self::DEFAULT_ISO)->getCountries(); + $xml = simplexml_load_file(_PS_INSTALL_DATA_PATH_.'xml/country.xml'); + foreach ($xml->entities->country as $country) + { + $iso = strtolower((string)$country['iso_code']); + $countries[$iso] = isset($countries_lang[$iso]) ? $countries_lang[$iso] : $countries_default[$iso]; + } + } + + return $countries; + } + + public function getFixtureTranslation($iso, $key) + { + $translation = $this->getLanguage($iso)->getFixtureTranslation($key); + if (is_null($translation)) + $translation = $this->getLanguage(self::DEFAULT_ISO)->getFixtureTranslation($key); + return $translation; + } +} diff --git a/install-new/classes/model.php b/install-new/classes/model.php new file mode 100644 index 000000000..24789d079 --- /dev/null +++ b/install-new/classes/model.php @@ -0,0 +1,58 @@ + +* @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 +*/ + +abstract class InstallAbstractModel +{ + /** + * @var InstallLanguages + */ + public $language; + + /** + * @var array List of errors + */ + protected $errors = array(); + + public function __construct() + { + $this->language = InstallLanguages::getInstance(); + } + + public function setError($errors) + { + if (!is_array($errors)) + $errors = array($errors); + + foreach ($errors as $error) + $this->errors[] = $error; + } + + public function getErrors() + { + return $this->errors; + } +} diff --git a/install-new/classes/session.php b/install-new/classes/session.php new file mode 100644 index 000000000..fd6a10d1c --- /dev/null +++ b/install-new/classes/session.php @@ -0,0 +1,66 @@ + +* @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 +*/ + +/** + * Manage session for install script + */ +class InstallSession +{ + protected static $_instance; + + public static function getInstance() + { + if (!self::$_instance) + self::$_instance = new self(); + return self::$_instance; + } + + public function __construct() + { + session_start(); + } + + public function __get($varname) + { + return isset($_SESSION[$varname]) ? $_SESSION[$varname] : null; + } + + public function __set($varname, $value) + { + $_SESSION[$varname] = $value; + } + + public function __isset($varname) + { + return isset($_SESSION[$varname]); + } + + public function __unset($varname) + { + unset($_SESSION[$varname]); + } +} diff --git a/install-new/classes/sqlLoader.php b/install-new/classes/sqlLoader.php new file mode 100644 index 000000000..d9e73a615 --- /dev/null +++ b/install-new/classes/sqlLoader.php @@ -0,0 +1,123 @@ + +* @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 InstallSqlLoader +{ + /** + * @var Db + */ + protected $db; + + /** + * @var array List of keywords which will be replaced in queries + */ + protected $metadata = array(); + + /** + * @var array List of errors during last parsing + */ + protected $errors = array(); + + /** + * @param Db $db + */ + public function __construct(Db $db = null) + { + if (is_null($db)) + $db = Db::getInstance(); + $this->db = $db; + } + + /** + * Set a list of keywords which will be replaced in queries + * + * @param array $data + */ + public function setMetaData(array $data) + { + foreach ($data as $k => $v) + $this->metadata[$k] = $v; + } + + /** + * Parse a SQL file and execute queries + * + * @param string $filename + * @param bool $stop_when_fail + */ + public function parse_file($filename, $stop_when_fail = true) + { + if (!file_exists($filename)) + throw new PrestashopInstallerException("File $filename not found"); + + return $this->parse(file_get_contents($filename), $stop_when_fail); + } + + /** + * Parse and execute a list of SQL queries + * + * @param string $content + * @param bool $stop_when_fail + */ + public function parse($content, $stop_when_fail = true) + { + $this->errors = array(); + + $content = str_replace(array_keys($this->metadata), array_values($this->metadata), $content); + $queries = preg_split('#;\s*[\r\n]+#', $content); + foreach ($queries as $query) + { + $query = trim($query); + if (!$query) + continue; + + if (!$this->db->execute($query)) + { + $this->errors[] = array( + 'errno' => $this->db->getNumberError(), + 'error' => $this->db->getMsgError(), + 'query' => $query, + ); + + if ($stop_when_fail) + return false; + } + } + + return count($this->errors) ? false : true; + } + + /** + * Get list of errors from last parsing + * + * @return array + */ + public function getErrors() + { + return $this->errors; + } +} diff --git a/install-new/classes/xmlLoader.php b/install-new/classes/xmlLoader.php new file mode 100644 index 000000000..ece9a8660 --- /dev/null +++ b/install-new/classes/xmlLoader.php @@ -0,0 +1,1101 @@ + +* @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 InstallXmlLoader +{ + /** + * @var InstallLanguages + */ + protected $language; + + /** + * @var array List of languages stored as array(id_lang => iso) + */ + protected $languages = array(); + + /** + * @var array Store in cache all loaded XML files + */ + protected $cache_xml_entity = array(); + + /** + * @var array List of errors + */ + protected $errors = array(); + + protected $data_path; + protected $lang_path; + protected $img_path; + + protected $ids = array(); + + public function __construct() + { + $this->language = InstallLanguages::getInstance(); + $this->setDefaultPath(); + require_once _PS_ROOT_DIR_.'/images.inc.php'; + } + + /** + * Set list of installed languages + * + * @param array $languages array(id_lang => iso) + */ + public function setLanguages(array $languages) + { + $this->languages = $languages; + } + + public function setDefaultPath() + { + $this->data_path = _PS_INSTALL_DATA_PATH_.'xml/'; + $this->lang_path = _PS_INSTALL_LANGS_PATH_; + $this->img_path = _PS_INSTALL_DATA_PATH_.'img/'; + } + + public function setFixturesPath() + { + $this->data_path = _PS_INSTALL_FIXTURES_PATH_.'apple/data/'; + $this->lang_path = _PS_INSTALL_FIXTURES_PATH_.'apple/langs/'; + $this->img_path = _PS_INSTALL_FIXTURES_PATH_.'apple/img/'; + } + + /** + * Get list of errors + * + * @return array + */ + public function getErrors() + { + return $this->errors; + } + + /** + * Add an error + * + * @param string $error + */ + public function setError($error) + { + $this->errors[] = $error; + } + + /** + * Store an ID related to an entity and its identifier (E.g. we want to save that product with ID "ipod_nano" has the ID 1) + * + * @param string $entity + * @param string $identifier + * @param int $id + */ + public function storeId($entity, $identifier, $id) + { + $this->ids[$entity.':'.$identifier] = $id; + } + + /** + * Retrieve an ID related to an entity and its identifier + * + * @param string $entity + * @param string $identifier + */ + public function retrieveId($entity, $identifier) + { + return isset($this->ids[$entity.':'.$identifier]) ? $this->ids[$entity.':'.$identifier] : 0; + } + + public function getIds() + { + return $this->ids; + } + + public function setIds($ids) + { + $this->ids = $ids; + } + + /** + * Read all XML files from data folder and populate tables + */ + public function populateFromXmlFiles() + { + // Browse all XML files from data/xml directory + $entities = array(); + $dependencies = array(); + $fd = opendir($this->data_path); + while ($file = readdir($fd)) + if (preg_match('#^(.+)\.xml$#', $file, $m)) + { + $entity = $m[1]; + $xml = $this->loadEntity($entity); + + // Store entities dependencies (with field type="relation") + if ($xml->fields) + { + foreach ($xml->fields->field as $field) + { + if ($field['relation'] && $field['relation'] != $entity) + { + if (!isset($dependencies[(string)$field['relation']])) + $dependencies[(string)$field['relation']] = array(); + $dependencies[(string)$field['relation']][] = $entity; + } + } + } + $entities[] = $entity; + } + closedir($fd); + + // Sort entities to populate database in good order (E.g. zones before countries) + do + { + $current = (isset($sort_entities)) ? $sort_entities : array(); + $sort_entities = array(); + foreach ($entities as $key => $entity) + { + if (isset($dependencies[$entity])) + { + $min = count($entities) - 1; + foreach ($dependencies[$entity] as $item) + if (($key = array_search($item, $sort_entities)) !== false) + $min = min($min, $key); + if ($min == 0) + array_unshift($sort_entities, $entity); + else + array_splice($sort_entities, $min, 0, array($entity)); + } + else + $sort_entities[] = $entity; + } + $entities = $sort_entities; + } + while ($current != $sort_entities); + + $start = microtime(true); + + // Populate entities + foreach ($sort_entities as $entity) + { + if (method_exists($this, 'populateEntity'.Tools::toCamelCase($entity))) + $this->{'populateEntity'.Tools::toCamelCase($entity)}(); + else + $this->populateEntity($entity); + } + } + + /** + * Populate an entity + * + * @param string $entity + */ + public function populateEntity($entity) + { + $xml = $this->loadEntity($entity); + + // Read list of fields + if (!$xml->fields) + throw new PrestashopInstallerException('List of fields not found for entity '.$entity); + + if ($this->isMultilang($entity)) + { + $multilang_columns = $this->getColumns($entity, true); + $xml_langs = array(); + $default_lang = null; + foreach ($this->languages as $id_lang => $iso) + { + if ($iso == 'en') + $default_lang = $id_lang; + + try + { + $xml_langs[$id_lang] = $this->loadEntity($entity, $iso); + } + catch (PrestashopInstallerException $e) + { + $xml_langs[$id_lang] = null; + } + } + } + + // Load all row for current entity and prepare data to be populated + foreach ($xml->entities->$entity as $node) + { + $data = array(); + $identifier = (string)$node['id']; + + // Read attributes + foreach ($node->attributes() as $k => $v) + if ($k != 'id') + $data[$k] = (string)$v; + + // Read cdatas + foreach ($node->children() as $child) + $data[$child->getName()] = (string)$child; + + // Load multilang data + $data_lang = array(); + if ($this->isMultilang($entity)) + { + $xpath_query = $entity.'[@id="'.$identifier.'"]'; + foreach ($xml_langs as $id_lang => $xml_lang) + { + if (($node_lang = $xml_lang->xpath($xpath_query)) || ($node_lang = $xml_langs[$default_lang]->xpath($xpath_query))) + { + $node_lang = $node_lang[0]; + foreach ($multilang_columns as $column => $is_text) + { + $value = ''; + if ($node_lang[$column]) + $value = (string)$node_lang[$column]; + + if ($node_lang->$column) + $value = (string)$node_lang->$column; + $data_lang[$column][$id_lang] = $value; + } + } + } + } + + $data = $this->rewriteRelationedData($entity, $data); + $this->createEntity($entity, $identifier, (string)$xml->fields['class'], $data, $data_lang); + if ($xml->fields['image']) + { + if (method_exists($this, 'copyImages'.Tools::toCamelCase($entity))) + $this->{'copyImages'.Tools::toCamelCase($entity)}($identifier, $data); + else + $this->copyImages($entity, $identifier, (string)$xml->fields['image'], $data); + } + } + } + + /** + * Special case for "tag" entity + */ + public function populateEntityTag() + { + foreach ($this->languages as $id_lang => $iso) + { + if (!file_exists($this->lang_path.$iso.'/data/tag.xml')) + continue; + + $xml = $this->loadEntity('tag', $iso); + $tags = array(); + foreach ($xml->tag as $tag_node) + { + $products = trim((string)$tag_node['products']); + if (!$products) + continue; + + foreach (explode(',', $products) as $product) + { + $product = trim($product); + $product_id = $this->retrieveId('product', $product); + if (!isset($tags[$product_id])) + $tags[$product_id] = array(); + $tags[$product_id][] = trim((string)$tag_node['name']); + } + } + + foreach ($tags as $id_product => $tag_list) + Tag::addTags($id_lang, $id_product, $tag_list); + } + } + + /** + * Load an entity XML file + * + * @param string $entity + * @return SimpleXMLElement + */ + protected function loadEntity($entity, $iso = null) + { + $cache_id = $entity; + if ($iso) + $cache_id .= ':'.$iso; + + if (!isset($this->cache_xml_entity[$cache_id])) + { + $path = $this->data_path.$entity.'.xml'; + if ($iso) + $path = $this->lang_path.$iso.'/data/'.$entity.'.xml'; + + if (!file_exists($path)) + throw new PrestashopInstallerException('XML data file '.$entity.'.xml not found'); + + if (!$this->cache_xml_entity[$cache_id] = @simplexml_load_file($path)) + throw new PrestashopInstallerException('XML data file '.$entity.'.xml invalid'); + } + + return $this->cache_xml_entity[$cache_id]; + } + + /** + * Check fields related to an other entity, and replace their values by the ID created by the other entity + * + * @param string $entity + * @param array $data + */ + protected function rewriteRelationedData($entity, array $data) + { + $xml = $this->loadEntity($entity); + foreach ($xml->fields->field as $field) + if ($field['relation']) + $data[(string)$field['name']] = $this->retrieveId((string)$field['relation'], $data[(string)$field['name']]); + + return $data; + } + + /** + * Create a simple entity with all its data and lang data + * If a methode createEntity$entity exists, use it. Else if $classname is given, use it. Else do a simple insert in database. + * + * @param string $entity + * @param string $identifier + * @param string $classname + * @param array $data + * @param array $data_lang + */ + public function createEntity($entity, $identifier, $classname, array $data, array $data_lang = array()) + { + if (method_exists($this, 'createEntity'.Tools::toCamelCase($entity))) + { + // Create entity with custom method in current class + $method = 'createEntity'.Tools::toCamelCase($entity); + $entity_id = $this->$method($data, $data_lang); + } + else if ($classname) + { + // Create entity with ObjectModel class + $object = new $classname(); + $object->hydrate($data); + if ($data_lang) + $object->hydrate($data_lang); + $object->add(); + $entity_id = $object->id; + } + else + { + // Create entity in database); + if (!Db::getInstance()->autoExecute(_DB_PREFIX_.$entity, array_map('pSQL', $data), 'INSERT IGNORE')) + $this->setError($this->language->l('An SQL error occured for entity %1$s: %2$s', $entity, Db::getInstance()->getMsgError())); + $entity_id = Db::getInstance()->Insert_ID(); + + if ($data_lang) + { + $real_data_lang = array(); + foreach ($data_lang as $field => $list) + foreach ($list as $id_lang => $value) + $real_data_lang[$id_lang][$field] = $value; + + foreach ($real_data_lang as $id_lang => $insert_data_lang) + { + $insert_data_lang['id_'.$entity] = $entity_id; + $insert_data_lang['id_lang'] = $id_lang; + if (!Db::getInstance()->autoExecute(_DB_PREFIX_.$entity.'_lang', array_map('pSQL', $insert_data_lang), 'INSERT IGNORE')) + $this->setError($this->language->l('An SQL error occured for entity %1$s: %2$s', $entity, Db::getInstance()->getMsgError())); + } + } + } + + $this->storeId($entity, $identifier, $entity_id); + } + + public function createEntityConfiguration(array $data, array $data_lang = array()) + { + if (!Configuration::get($data['name'])) + Configuration::updateValue($data['name'], ($data_lang) ? $data_lang['value'] : $data['value']); + return Configuration::getIdByName($data['name']); + } + + public function copyImages($entity, $identifier, $path, array $data, $extension = 'jpg') + { + // Get list of image types + $reference = array( + 'product' => 'products', + 'category' => 'categories', + 'manufacturer' => 'manufacturers', + 'supplier' => 'suppliers', + 'scene' => 'scenes', + 'store' => 'stores', + ); + + $types = array(); + if (isset($reference[$entity])) + $types = ImageType::getImagesTypes($reference[$entity]); + + // For each path copy images + $path = array_map('trim', explode(',', $path)); + foreach ($path as $p) + { + $from_path = $this->img_path.$p.'/'; + $dst_path = _PS_IMG_DIR_.$p.'/'; + $entity_id = $this->retrieveId($entity, $identifier); + + if (!copy($from_path.$identifier.'.'.$extension, $dst_path.$entity_id.'.'.$extension)) + { + $this->setError($this->language->l('Cannot create image "%1$s" for entity "%2$s"', $identifier, $entity)); + return; + } + + foreach ($types as $type) + { + $origin_file = $from_path.$identifier.'-'.$type['name'].'.'.$extension; + $target_file = $dst_path.$entity_id.'-'.$type['name'].'.'.$extension; + + // Test if dest folder is writable + if (!is_writable(dirname($target_file))) + $this->setError($this->language->l('Cannot create image "%1$s" (bad permissions on folder "%2$s")', $identifier.'-'.$type['name'], dirname($target_file))); + // If a file named folder/entity-type.extension exists just copy it, this is an optimisation in order to prevent to much resize + else if (file_exists($origin_file)) + { + if (!@copy($origin_file, $target_file)) + $this->setError($this->language->l('Cannot create image "%s"', $identifier.'-'.$type['name'])); + @chmod($target_file, 0644); + } + // Resize the image if no cache was prepared in fixtures + else if (!imageResize($from_path.$identifier.'.'.$extension, $target_file, $type['width'], $type['height'])) + $this->setError($this->language->l('Cannot create image "%1$s" for entity "%2$s"', $identifier.'-'.$type['name'], $entity)); + } + } + } + + public function copyImagesScene($identifier, array $data) + { + $this->copyImages('scene', $identifier, 'scenes', $data); + + $from_path = $this->img_path.'scenes/thumbs/'; + $dst_path = _PS_IMG_DIR_.'scenes/thumbs/'; + $entity_id = $this->retrieveId('scene', $identifier); + + if (!@copy($from_path.$identifier.'-thumb_scene.jpg', $dst_path.$entity_id.'-thumb_scene.jpg')) + { + $this->setError($this->language->l('Cannot create image "%1$s" for entity "%2$s"', $identifier, 'scene')); + return; + } + } + + public function copyImagesOrderState($identifier, array $data) + { + $this->copyImages('order_state', $identifier, 'os', $data, 'gif'); + } + + public function copyImagesTab($identifier, array $data) + { + $from_path = $this->img_path.'t/'; + $dst_path = _PS_IMG_DIR_.'t/'; + if (file_exists($from_path.$data['class_name'].'.gif')) + if (!@copy($from_path.$data['class_name'].'.gif', $dst_path.$data['class_name'].'.gif')) + { + $this->setError($this->language->l('Cannot create image "%1$s" for entity "%2$s"', $identifier, 'tab')); + return; + } + } + + public function copyImagesImage($identifier) + { + $path = $this->img_path.'p/'; + $image = new Image($this->retrieveId('image', $identifier)); + $dst_path = $image->getPathForCreation(); + if (!@copy($path.$identifier.'.jpg', $dst_path.'.'.$image->image_format)) + { + $this->setError($this->language->l('Cannot create image "%1$s" for entity "%2$s"', $identifier, 'product')); + return; + } + @chmod($dst_path.'.'.$image->image_format, 0644); + + $types = ImageType::getImagesTypes('products'); + foreach ($types as $type) + { + $origin_file = $path.$identifier.'-'.$type['name'].'.jpg'; + $target_file = $dst_path.'-'.$type['name'].'.'.$image->image_format; + + // Test if dest folder is writable + if (!is_writable(dirname($target_file))) + $this->setError($this->language->l('Cannot create image "%1$s" (bad permissions on folder "%2$s")', $identifier.'-'.$type['name'], dirname($target_file))); + // If a file named folder/entity-type.jpg exists just copy it, this is an optimisation in order to prevent to much resize + else if (file_exists($origin_file)) + { + if (!@copy($origin_file, $target_file)) + $this->setError($this->language->l('Cannot create image "%1$s" for entity "%2$s"', $identifier.'-'.$type['name'], 'product')); + @chmod($target_file, 0644); + } + // Resize the image if no cache was prepared in fixtures + else if (!imageResize($path.$id.'.jpg', $target_file, $type['width'], $type['height'])) + $this->setError($this->language->l('Cannot create image "%1$s" for entity "%2$s"', $identifier.'-'.$type['name'], 'product')); + } + } + + public function getTables() + { + static $tables = null; + + if (is_null($tables)) + { + $sql = 'SHOW TABLES'; + $tables = array(); + foreach (Db::getInstance()->executeS($sql) as $row) + { + $table = current($row); + if (preg_match('#^'._DB_PREFIX_.'(.+?)(_lang)?$#i', $table, $m) && !preg_match('#(_group_shop|_shop)$#i', $table)) + $tables[$m[1]] = (isset($m[2]) && $m[2]) ? true : false; + } + } + + return $tables; + } + + public function getColumns($table, $multilang = false, array $exclude = array()) + { + static $columns = array(); + + if ($multilang) + return ($this->isMultilang($table)) ? $this->getColumns($table.'_lang', false, array('id_'.$table)) : array(); + + if (!isset($columns[$table])) + { + $columns[$table] = array(); + $sql = 'SHOW COLUMNS FROM `'.bqSQL(_DB_PREFIX_.$table).'`'; + foreach (Db::getInstance()->executeS($sql) as $row) + $columns[$table][$row['Field']] = $this->checkIfTypeIsText($row['Type']); + } + + $exclude = array_merge(array('id_'.$table, 'date_add', 'date_upd', 'position', 'deleted', 'id_lang', 'id_shop', 'id_group_shop'), $exclude); + + $list = array(); + foreach ($columns[$table] as $k => $v) + if (!in_array($k, $exclude)) + $list[$k] = $v; + + return $list; + } + + public function getClasses($path = null) + { + static $cache = null; + + if (!is_null($cache)) + return $cache; + + $dir = $path; + if (is_null($dir)) + $dir = _PS_CLASS_DIR_; + + $classes = array(); + foreach (scandir($dir) as $file) + if ($file[0] != '.' && $file != 'index.php') + { + if (is_dir($dir.$file)) + $classes = array_merge($classes, $this->getClasses($dir.$file.'/')); + else if (preg_match('#^(.+)\.php$#', $file, $m)) + $classes[] = $m[1]; + } + + sort($classes); + if (is_null($path)) + $cache = $classes; + return $classes; + } + + public function checkIfTypeIsText($type) + { + if (preg_match('#^(longtext|text|tinytext)#i', $type)) + return true; + + if (preg_match('#^varchar\(([0-9]+)\)$#i', $type, $m)) + return intval($m[1]) >= 64 ? true : false; + return false; + } + + public function isMultilang($entity) + { + $tables = $this->getTables(); + return isset($tables[$entity]) && $tables[$entity]; + } + + public function entityExists($entity) + { + return file_exists($this->data_path.$entity.'.xml'); + } + + public function getEntityInfo($entity) + { + $info = array( + 'config' => array( + 'id' => '', + 'primary' => '', + 'class' => '', + 'sql' => '', + 'image' => '', + ), + 'fields' => array(), + ); + + if (!$this->entityExists($entity)) + return $info; + + $xml = @simplexml_load_file($this->data_path.$entity.'.xml'); + if (!$xml) + return $info; + + if ($xml->fields['id']) + $info['config']['id'] = (string)$xml->fields['id']; + + if ($xml->fields['primary']) + $info['config']['primary'] = (string)$xml->fields['primary']; + + if ($xml->fields['class']) + $info['config']['class'] = (string)$xml->fields['class']; + + if ($xml->fields['sql']) + $info['config']['sql'] = (string)$xml->fields['sql']; + + if ($xml->fields['image']) + $info['config']['image'] = (string)$xml->fields['image']; + + foreach ($xml->fields->field as $field) + { + $column = (string)$field['name']; + $info['fields'][$column] = array(); + if (isset($field['relation'])) + $info['fields'][$column]['relation'] = (string)$field['relation']; + } + return $info; + } + + /** + * ONLY FOR DEVELOPMENT PURPOSE + */ + public function generateAllEntityFiles() + { + $entities = array(); + foreach (scandir($this->data_path) as $file) + if ($file[0] != '.' && preg_match('#^(.+)\.xml$#', $file, $m)) + $entities[$m[1]] = $this->getEntityInfo($m[1]); + + $this->generateEntityFiles($entities); + } + + /** + * ONLY FOR DEVELOPMENT PURPOSE + */ + public function generateEntityFiles($entities) + { + $dependencies = array(); + $list_entities = array(); + foreach ($entities as $entity => $info) + { + $list_entities[] = $entity; + foreach ($info['fields'] as $field => $info_field) + { + if (isset($info_field['relation']) && $info_field['relation'] != $entity) + { + if (!isset($dependencies[$info_field['relation']])) + $dependencies[$info_field['relation']] = array(); + $dependencies[$info_field['relation']][] = $entity; + } + } + } + + // Sort entities to populate database in good order (E.g. zones before countries) + do + { + $current = (isset($sort_entities)) ? $sort_entities : array(); + $sort_entities = array(); + foreach ($list_entities as $entity) + { + if (isset($dependencies[$entity])) + { + $min = count($entities) - 1; + foreach ($dependencies[$entity] as $item) + if (($key = array_search($item, $sort_entities)) !== false) + $min = min($min, $key); + if ($min == 0) + array_unshift($sort_entities, $entity); + else + array_splice($sort_entities, $min, 0, array($entity)); + } + else + $sort_entities[] = $entity; + } + $list_entities = $sort_entities; + } + while ($current != $sort_entities); + + foreach ($sort_entities as $entity) + $this->generateEntityFile($entity, $entities[$entity]['config'], $entities[$entity]['fields']); + } + + /** + * ONLY FOR DEVELOPMENT PURPOSE + */ + public function generateEntityFile($entity, array $config, array $columns) + { + if (method_exists($this, 'getEntityContents'.Tools::toCamelCase($entity))) + $content = $this->{'getEntityContents'.Tools::toCamelCase($entity)}($config, $columns); + else + $content = $this->getEntityContents($entity, $config, $columns); + + // Generate common XML file + $xml = ''."\n"; + $xml .= ''."\n"; + $xml .= "\t\n"; + foreach ($columns as $column => $info) + if (isset($info['relation'])) + $xml .= "\t\t".''."\n"; + else + $xml .= "\t\t".''."\n"; + $xml .= "\t\n\n"; + $xml .= "\t\n"; + if ($content['nodes']) + $xml .= $this->createXmlEntityNodes($entity, $content['nodes'], 2); + $xml .= "\t\n"; + $xml .= ''; + file_put_contents($this->data_path.$entity.'.xml', $xml); + + // Generate multilang XML files + if ($content['nodes_lang']) + { + foreach ($content['nodes_lang'] as $id_lang => $nodes) + { + if (!isset($this->languages[$id_lang])) + continue; + + $iso = $this->languages[$id_lang]; + if (!is_dir($this->lang_path.$iso.'/data')) + mkdir($this->lang_path.$iso.'/data'); + + $xml = ''."\n"; + $xml .= ''."\n"; + $xml .= $this->createXmlEntityNodes($entity, $nodes); + $xml .= ''; + file_put_contents($this->lang_path.$iso.'/data/'.$entity.'.xml', $xml); + } + } + + if (isset($config['image']) && $config['image']) + { + if (method_exists($this, 'backupImage'.Tools::toCamelCase($entity))) + $this->{'backupImage'.Tools::toCamelCase($entity)}($config['image']); + else + $this->backupImage($entity, $config['image']); + } + } + + /** + * ONLY FOR DEVELOPMENT PURPOSE + */ + public function getEntityContents($entity, array $config, array $columns) + { + $primary = (isset($config['primary']) && $config['primary']) ? $config['primary'] : 'id_'.$entity; + $is_multilang = $this->isMultilang($entity); + + // Check if current table is an association table (if multiple primary keys) + $is_association = false; + if (strpos($primary, ',') !== false) + { + $is_association = true; + $primary = array_map('trim', explode(',', $primary)); + } + + // Build query + $sql = new DbQuery(); + $sql->select('a.*'); + $sql->from($entity.' a'); + if ($is_multilang) + { + $sql->select('b.*'); + $sql->leftJoin($entity.'_lang b ON a.'.$primary.' = b.'.$primary); + } + + if (isset($config['sql']) && $config['sql']) + $sql->where($config['sql']); + + if (!$is_association) + { + $sql->select('a.'.$primary); + $sql->orderBy('a.'.$primary); + } + + if ($is_multilang) + $sql->orderBy('b.id_lang'); + + // Get multilang columns + $alias_multilang = array(); + if ($is_multilang) + { + $multilang_columns = $this->getColumns($entity, true); + + // If some columns from _lang table have same name than original table, rename them (E.g. value in configuration) + foreach ($multilang_columns as $c => $is_text) + if (isset($columns[$c])) + { + $alias = $c.'_alias'; + $alias_multilang[$c] = $alias; + $sql->select('a.'.$c.' as '.$c.', b.'.$c.' as '.$alias); + } + } + + // Get all results + $nodes = $nodes_lang = array(); + $results = Db::getInstance()->executeS($sql); + if (Db::getInstance()->getNumberError()) + $this->setError($this->language->l('SQL error on query %s', $sql)); + else + { + foreach ($results as $row) + { + // Store common columns + if ($is_association) + { + $id = $entity; + foreach ($primary as $key) + $id .= '_'.$row[$key]; + } + else + $id = $this->generateId($entity, $row[$primary], $row, (isset($config['id']) && $config['id']) ? $config['id'] : null); + + if (!isset($nodes[$id])) + { + $node = array(); + foreach ($columns as $column => $info) + { + if (isset($info['relation'])) + { + $sql = 'SELECT `id_'.bqSQL($info['relation']).'` + FROM `'.bqSQL(_DB_PREFIX_.$info['relation']).'` + WHERE `id_'.bqSQL($info['relation']).'` = '.(int)$row[$column]; + $node[$column] = $this->generateId($info['relation'], Db::getInstance()->getValue($sql)); + } + else + $node[$column] = $row[$column]; + } + $nodes[$id] = $node; + } + + // Store multilang columns + if ($is_multilang && $row['id_lang']) + { + $node = array(); + foreach ($multilang_columns as $column => $is_text) + $node[$column] = $row[isset($alias_multilang[$column]) ? $alias_multilang[$column] : $column]; + $nodes_lang[$row['id_lang']][$id] = $node; + } + } + } + + return array( + 'nodes' => $nodes, + 'nodes_lang' => $nodes_lang, + ); + } + + public function getEntityContentsTag() + { + $nodes_lang = array(); + + $sql = 'SELECT t.id_tag, t.id_lang, t.name, pt.id_product + FROM '._DB_PREFIX_.'tag t + LEFT JOIN '._DB_PREFIX_.'product_tag pt ON t.id_tag = pt.id_tag + ORDER BY id_lang'; + foreach (Db::getInstance()->executeS($sql) as $row) + { + $identifier = $this->generateId('tag', $row['id_tag']); + if (!isset($nodes_lang[$row['id_lang']])) + $nodes_lang[$row['id_lang']] = array(); + + if (!isset($nodes_lang[$row['id_lang']][$identifier])) + $nodes_lang[$row['id_lang']][$identifier] = array( + 'name' => $row['name'], + 'products' => '', + ); + + $nodes_lang[$row['id_lang']][$identifier]['products'] .= (($nodes_lang[$row['id_lang']][$identifier]['products']) ? ',' : '').$this->generateId('product', $row['id_product']); + } + + return array( + 'nodes' => array(), + 'nodes_lang' => $nodes_lang, + ); + } + + /** + * ONLY FOR DEVELOPMENT PURPOSE + */ + public function generateId($entity, $primary, array $row = array(), $id_format = null) + { + static $ids = array(); + + if (isset($ids[$entity][$primary])) + return $ids[$entity][$primary]; + + if (!isset($ids[$entity])) + $ids[$entity] = array(); + + if (!$primary) + return ''; + + if (!$id_format || !$row) + $ids[$entity][$primary] = $entity.'_'.$primary; + else + { + $value = $row[$id_format]; + $value = preg_replace('#[^a-z0-9_-]#i', '_', $value); + $value = preg_replace('#_+#', '_', $value); + $value = preg_replace('#^_+#', '', $value); + $value = preg_replace('#_+$#', '', $value); + + $store_identifier = $value; + $i = 1; + while (in_array($store_identifier, $ids[$entity])) + $store_identifier = $value.'_'.$i++; + $ids[$entity][$primary] = $store_identifier; + } + return $ids[$entity][$primary]; + } + + /** + * ONLY FOR DEVELOPMENT PURPOSE + */ + public function createXmlEntityNodes($entity, array $nodes, $tabs = 1) + { + $xml = ''; + $types = array_merge($this->getColumns($entity), $this->getColumns($entity, true)); + foreach ($nodes as $id => $node) + { + $attrs = $cdata = array(); + foreach ($node as $k => $v) + if (isset($types[$k]) && $types[$k]) + $cdata[$k] = $v; + else + $attrs[$k] = $v; + + $xml .= str_repeat("\t", $tabs).'<'.$entity.' id="'.$id.'"'; + if ($attrs) + foreach ($attrs as $k => $v) + $xml .= ' '.$k.'="'.htmlspecialchars($v).'"'; + + if ($cdata) + { + $xml .= ">\n"; + foreach ($cdata as $k => $v) + $xml .= str_repeat("\t", $tabs + 1).'<'.$k.'>'."\n"; + $xml .= str_repeat("\t", $tabs).''."\n"; + } + else + $xml .= " />\n"; + } + + return $xml; + } + + /** + * ONLY FOR DEVELOPMENT PURPOSE + */ + public function backupImage($entity, $path) + { + $reference = array( + 'product' => 'products', + 'category' => 'categories', + 'manufacturer' => 'manufacturers', + 'supplier' => 'suppliers', + 'scene' => 'scenes', + 'store' => 'stores', + ); + + $types = array(); + if (isset($reference[$entity])) + { + $types = array(); + foreach (ImageType::getImagesTypes($reference[$entity]) as $type) + $types[] = $type['name']; + } + + $path_list = array_map('trim', explode(',', $path)); + foreach ($path_list as $p) + { + $backup_path = $this->img_path.$p.'/'; + $from_path = _PS_IMG_DIR_.$p.'/'; + + if (!is_dir($backup_path) && !mkdir($backup_path)) + $this->setError(sprintf('Cannot create directory %s', $backup_path)); + + foreach (scandir($from_path) as $file) + if ($file[0] != '.' && preg_match('#^(([0-9]+)(-('.implode('|', $types).'))?)\.(gif|jpg|jpeg|png)$#i', $file, $m)) + { + $file_id = $m[2]; + $file_type = $m[3]; + $file_extension = $m[5]; + copy($from_path.$file, $backup_path.$this->generateId($entity, $file_id).$file_type.'.'.$file_extension); + } + } + } + + /** + * ONLY FOR DEVELOPMENT PURPOSE + */ + public function backupImageImage() + { + $types = array(); + foreach (ImageType::getImagesTypes('products') as $type) + $types[] = $type['name']; + + $backup_path = $this->img_path.'p/'; + $from_path = _PS_PROD_IMG_DIR_; + if (!is_dir($backup_path) && !mkdir($backup_path)) + $this->setError(sprintf('Cannot create directory %s', $backup_path)); + + foreach (Image::getAllImages() as $image) + { + $image = new Image($image['id_image']); + $image_path = $image->getExistingImgPath(); + copy($from_path.$image_path.'.'.$image->image_format, $backup_path.$this->generateId('image', $image->id).'.'.$image->image_format); + foreach ($types as $type) + copy($from_path.$image_path.'-'.$type.'.'.$image->image_format, $backup_path.$this->generateId('image', $image->id).'-'.$type.'.'.$image->image_format); + } + } + + /** + * ONLY FOR DEVELOPMENT PURPOSE + */ + public function backupImageTab() + { + $backup_path = $this->img_path.'t/'; + $from_path = _PS_IMG_DIR_.'t/'; + if (!is_dir($backup_path) && !mkdir($backup_path)) + $this->setError(sprintf('Cannot create directory %s', $backup_path)); + + $xml = $this->loadEntity('tab'); + foreach ($xml->entities->tab as $tab) + if (file_exists($from_path.$tab->class_name.'.gif')) + copy($from_path.$tab->class_name.'.gif', $backup_path.$tab->class_name.'.gif'); + } +} \ No newline at end of file diff --git a/install-new/controllers/http/configure.php b/install-new/controllers/http/configure.php new file mode 100644 index 000000000..0c6e4b98c --- /dev/null +++ b/install-new/controllers/http/configure.php @@ -0,0 +1,438 @@ + +* @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 +*/ + +/** + * Step 4 : configure the shop, admin access and modules preactivations + */ +class InstallControllerHttpConfigure extends InstallControllerHttp +{ + /** + * @see InstallAbstractModel::processNextStep() + */ + public function processNextStep() + { + // Save shop configuration + $this->session->shop_name = trim(Tools::getValue('shop_name')); + $this->session->shop_activity = Tools::getValue('shop_activity'); + $this->session->shop_country = Tools::getValue('shop_country'); + $this->session->shop_timezone = Tools::getValue('shop_timezone'); + + // Save admin configuration + $this->session->admin_firstname = trim(Tools::getValue('admin_firstname')); + $this->session->admin_lastname = trim(Tools::getValue('admin_lastname')); + $this->session->admin_email = trim(Tools::getValue('admin_email')); + $this->session->send_informations = Tools::getValue('send_informations'); + + // If password fields are empty, but are already stored in session, do not fill them again + if (!$this->session->admin_password || trim(Tools::getValue('admin_password'))) + $this->session->admin_password = trim(Tools::getValue('admin_password')); + + if (!$this->session->admin_password_confirm || trim(Tools::getValue('admin_password_confirm'))) + $this->session->admin_password_confirm = trim(Tools::getValue('admin_password_confirm')); + + // Save partners preactivation configuration + $this->session->partners = array(); + $partners = Tools::getValue('partner'); + if (is_array($partners)) + { + // Check all selected partners and store their fields + $session_partners = array(); + foreach ($partners as $partner_id => $state) + $session_partners[$partner_id] = (isset($_POST['partner_fields'][$partner_id])) ? $_POST['partner_fields'][$partner_id] : array(); + $this->session->partners = $session_partners; + } + } + + /** + * @see InstallAbstractModel::validate() + */ + public function validate() + { + // List of required fields + $required_fields = array('shop_name', 'shop_country', 'shop_timezone', 'admin_firstname', 'admin_lastname', 'admin_email', 'admin_password'); + foreach ($required_fields as $field) + if (!$this->session->$field) + $this->errors[$field] = $this->l('Field required'); + + // Check shop name + if ($this->session->shop_name && !Validate::isGenericName($this->session->shop_name)) + $this->errors['shop_name'] = $this->l('Invalid shop name'); + + // Check admin name + if ($this->session->admin_firstname && !Validate::isGenericName($this->session->admin_firstname)) + $this->errors['admin_firstname'] = $this->l('Your firstname contains some invalid characters'); + + if ($this->session->admin_lastname && !Validate::isGenericName($this->session->admin_lastname)) + $this->errors['admin_lastname'] = $this->l('Your lastname contains some invalid characters'); + + // Check passwords + if ($this->session->admin_password) + { + if (!Validate::isPasswdAdmin($this->session->admin_password)) + $this->errors['admin_password'] = $this->l('The password is incorrect (alphanumeric string at least 8 characters)'); + else if ($this->session->admin_password != $this->session->admin_password_confirm) + $this->errors['admin_password'] = $this->l('Password and its confirmation are different'); + } + + // Check email + if ($this->session->admin_email && !Validate::isEmail($this->session->admin_email)) + $this->errors['admin_email'] = $this->l('This e-mail address is invalid'); + + return count($this->errors) ? false : true; + } + + public function process() + { + if (Tools::getValue('uploadLogo')) + $this->processUploadLogo(); + else if (Tools::getValue('timezoneByIso')) + $this->processTimezoneByIso(); + else if (Tools::getValue('getPartners')) + $this->processGetPartners(); + else if (Tools::getValue('getPartnersFields')) + $this->processGetPartnersFields(); + } + + /** + * Process the upload of new logo + */ + public function processUploadLogo() + { + $error = ''; + if (isset($_FILES['fileToUpload'])) + { + $file = $_FILES['fileToUpload']; + + // If error code is not 0, an error occured during upload + if ($file['error'] != 0) + { + $upload_errors = array( + 1 => $this->l('The uploaded file exceeds the upload_max_filesize directive in php.ini'), + 2 => $this->l('The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form'), + 3 => $this->l('The uploaded file was only partially uploaded'), + 4 => $this->l('No file was uploaded'), + 6 => $this->l('Missing a temporary folder'), + 7 => $this->l('Failed to write file to disk'), + 8 => $this->l('File upload stopped by extension'), + ); + + if (isset($upload_errors[$file['error']])) + $error = $upload_errors[$file['error']]; + else + $error = $this->l('No error code available'); + } + // Check if no error during creation of tmp file + else if (!$file['tmp_name'] || $file['tmp_name'] == 'none') + { + $error = $this->l('Missing a temporary folder'); + } + // No error, let's update the file + else + { + list($width, $height, $type) = getimagesize($file['tmp_name']); + + // Check if this is really an image + if ($height == 0) + $error = $this->l('This is not a valid image file'); + // Resize image + else + { + $newheight = ($height > 500) ? 500 : $height; + $percent = $newheight / $height; + $newwidth = $width * $percent; + $newheight = $height * $percent; + $thumb = imagecreatetruecolor($newwidth, $newheight); + switch ($type) + { + case 1: + $source = imagecreatefromgif($file['tmp_name']); + break; + + case 2: + $source = imagecreatefromjpeg($file['tmp_name']); + break; + + case 3: + $source = imagecreatefrompng($file['tmp_name']); + break; + + default: + $error = $this->l('Image type is not supported'); + } + + if (!$error) + { + imagecopyresampled($thumb, $source, 0, 0, 0, 0, $newwidth, $newheight, $width, $height); + if (!is_writable(_PS_ROOT_DIR_.'/img/logo.jpg')) + $error = $this->l('Image folder is not writable'); + else if (!imagejpeg($thumb, _PS_ROOT_DIR_.'/img/logo.jpg', 90)) + $error = $this->l('Cannot upload the file'); + } + } + } + } + + $this->ajaxJsonAnswer(($error) ? false : true, $error); + } + + /** + * Obtain the timezone associated to an iso + */ + public function processTimezoneByIso() + { + $timezone = $this->getTimezoneByIso(Tools::getValue('iso')); + $this->ajaxJsonAnswer(($timezone) ? true : false, $timezone); + } + + /** + * Obtain a translation from presintall XML file + * + * @param SimplexmlElement $xml + * @param string $xpath + * @return string + */ + public function getPreinstallXmlLang(SimplexmlElement $xml, $xpath) + { + $lang = $this->language->getLanguageIso(); + $translation = $xml->xpath($xpath.'[@iso="'.$lang.'"]'); + if (!$translation && $lang != 'en') + $translation = $xml->xpath($xpath.'[@iso="en"]'); + if (!$translation) + $translation = $xml->xpath($xpath); + return ($translation) ? (string)$translation[0] : ''; + } + + /** + * Get list of partners from PrestaShop website + */ + public function processGetPartners() + { + $this->iso = Tools::getValue('iso'); + if (!$this->iso) + $this->ajaxJsonAnswer(false); + + // Load partners XML file from prestashop.com + $stream_context = @stream_context_create(array('http' => array('method'=> 'GET', 'timeout' => 3))); + $content = @file_get_contents('http://www.prestashop.com/partner/preactivation/partners.php?version=1.1', false, $stream_context); + if (!$xml = @simplexml_load_string($content)) + $this->ajaxJsonAnswer(false, $this->l('Cannot load partners from PrestaShop website')); + + // Browse all partners + $partners = array(); + foreach ($xml->partner as $partner) + { + // Partner available for current language ? + if (!$partner->xpath('countries[country="'.$this->iso.'"]')) + continue; + + $partner_id = (string)$partner->key; + if (!isset($this->session->shop_name)) + $checked = ($partner->prechecked) ? true : false; + else + $checked = (isset($this->session->partners[$partner_id])) ? true : false; + + $partners[$partner_id] = array( + 'name' => (string)$partner->name, + 'label' => $this->getPreinstallXmlLang($partner, 'labels/label'), + 'description' => $this->getPreinstallXmlLang($partner, 'descriptions/description'), + 'logo' => $partner->logo_medium, + 'checked' => $checked, + ); + } + + // If no partners, don't displayany preactivation HTML + if (!$partners) + $this->ajaxJsonAnswer(false); + + // Render partners + $this->partners = $partners; + $html = $this->displayTemplate('partners', true); + $this->ajaxJsonAnswer(true, $html); + } + + /** + * Get fields of a partner for a country as HTML + */ + public function processGetPartnersFields() + { + $this->partner_id = Tools::getValue('partner_id'); + $this->iso = Tools::getValue('iso'); + if (!$this->partner_id || !$this->iso) + $this->ajaxJsonAnswer(false); + + $this->fields = $this->getPartnersFields($this->partner_id, $this->iso); + + if (!$this->fields) + $this->ajaxJsonAnswer(false); + + // Render fields + $html = $this->displayTemplate('partners_fields', true); + $this->ajaxJsonAnswer(true, $html); + } + + /** + * Get list of fields of a partner for a country + * + * @param string $partner_id + * @param string $iso + * @return array + */ + public function getPartnersFields($partner_id, $iso) + { + // Load partners fields XML file from prestashop.com + $stream_context = @stream_context_create(array('http' => array('method' => 'GET', 'timeout' => 5))); + $content = @file_get_contents('http://www.prestashop.com/partner/preactivation/fields.php?version=1.1&partner='.$partner_id.'&country_iso_code='.$iso, false, $stream_context); + if (!$xml = @simplexml_load_string($content)) + $this->ajaxJsonAnswer(false, $this->l('Cannot load partners fields from PrestaShop website')); + + // Browse all fields + $fields = array(); + foreach ($xml->field as $field) + { + $key = (string)$field->key; + $data = array( + 'type' => (string)$field->type, + 'label' => $this->getPreinstallXmlLang($field, 'labels/label'), + 'help' => $this->getPreinstallXmlLang($field, 'helps/help'), + 'value' => (isset($this->session->partners[$partner_id][$key])) ? $this->session->partners[$partner_id][$key] : (string)$field->default, + ); + + switch ($data['type']) + { + case 'text' : + case 'password' : + $data['size'] = (string)$field->size; + break; + + case 'radio' : + case 'select' : + $data['list'] = array(); + foreach ($field->values as $value) + $data['list'][(string)$value->value] = $this->getPreinstallXmlLang($value, 'labels/label'); + break; + + case 'date' : + if (!is_array($data['value'])) + $data['value'] = array( + 'year' => 0, + 'month' => 0, + 'day' => 0, + ); + break; + } + + $fields[$key] = $data; + } + + return $fields; + } + + /** + * Get list of timezones + * + * @return array + */ + public function getTimezones() + { + if (!is_null($this->cache_timezones)) + return; + + if (!file_exists(_PS_INSTALL_DATA_PATH_.'xml/timezone.xml')) + return array(); + + $xml = simplexml_load_file(_PS_INSTALL_DATA_PATH_.'xml/timezone.xml'); + $timezones = array(); + foreach ($xml->entities->timezone as $timezone) + $timezones[] = (string)$timezone['name']; + return $timezones; + } + + /** + * Get a timezone associated to an iso + * + * @param string $iso + * @return string + */ + public function getTimezoneByIso($iso) + { + if (!file_exists(_PS_INSTALL_DATA_PATH_.'iso_to_timezone.xml')) + return ''; + + $xml = simplexml_load_file(_PS_INSTALL_DATA_PATH_.'iso_to_timezone.xml'); + $timezones = array(); + foreach ($xml->relation as $relation) + $timezones[(string)$relation['iso']] = (string)$relation['zone']; + return isset($timezones[$iso]) ? $timezones[$iso] : ''; + } + + /** + * @see InstallAbstractModel::display() + */ + public function display() + { + // List of activities + $list_activities = array( + $this->l('Lingerie and Adult'), + $this->l('Animals and Pets'), + $this->l('Art and Culture'), + $this->l('Babies'), + $this->l('Beauty and Personal Care'), + $this->l('Cars'), + $this->l('Computer Hardware and Software'), + $this->l('Download'), + $this->l('Fashion and accessories'), + $this->l('Flowers, Gifts and Crafts'), + $this->l('Food and beverage'), + $this->l('HiFi, Photo and Video'), + $this->l('Home and Garden'), + $this->l('Home Appliances'), + $this->l('Jewelry'), + $this->l('Mobile and Telecom'), + $this->l('Services'), + $this->l('Shoes and accessories'), + $this->l('Sports and Entertainment'), + $this->l('Travel'), + ); + sort($list_activities); + $this->list_activities = $list_activities; + + $this->displayTemplate('configure'); + } + + /** + * Helper to display error for a field + * + * @param unknown_type $field + */ + public function displayError($field) + { + if (!isset($this->errors[$field])) + return; + + return ''.$this->errors[$field].''; + } +} diff --git a/install-new/controllers/http/database.php b/install-new/controllers/http/database.php new file mode 100644 index 000000000..3027b9f05 --- /dev/null +++ b/install-new/controllers/http/database.php @@ -0,0 +1,202 @@ + +* @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 +*/ + +/** + * Step 3 : configure database and email connection + */ +class InstallControllerHttpDatabase extends InstallControllerHttp +{ + /** + * @var InstallModelDatabase + */ + public $model_database; + + /** + * @var InstallModelMail + */ + public $model_mail; + + public function init() + { + require_once _PS_INSTALL_MODELS_PATH_.'database.php'; + $this->model_database = new InstallModelDatabase(); + + require_once _PS_INSTALL_MODELS_PATH_.'mail.php'; + $this->model_mail = new InstallModelMail(); + } + + /** + * @see InstallAbstractModel::processNextStep() + */ + public function processNextStep() + { + $this->session->install_type = Tools::getValue('db_mode'); + + // Save database config + $this->session->database_server = trim(Tools::getValue('dbServer')); + $this->session->database_name = trim(Tools::getValue('dbName')); + $this->session->database_login = trim(Tools::getValue('dbLogin')); + $this->session->database_password = trim(Tools::getValue('dbPassword')); + $this->session->database_prefix = trim(Tools::getValue('db_prefix')); + $this->session->database_engine = Tools::getValue('dbEngine'); + $this->session->database_clear = Tools::getValue('database_clear'); + + // Save email config + $this->session->use_smtp = (bool)Tools::getValue('smtpChecked'); + $this->session->smtp_server = trim(Tools::getValue('smtpSrv')); + $this->session->smtp_encryption = Tools::getValue('smtpEnc'); + $this->session->smtp_port = (int)Tools::getValue('smtpPort'); + $this->session->smtp_login = trim(Tools::getValue('smtpLogin')); + $this->session->smtp_password = trim(Tools::getValue('smtpPassword')); + } + + /** + * Database configuration must be valid to validate this step + * + * @see InstallAbstractModel::validate() + */ + public function validate() + { + $this->errors = $this->model_database->testDatabaseSettings( + $this->session->database_server, + $this->session->database_name, + $this->session->database_login, + $this->session->database_password, + $this->session->database_prefix, + $this->session->database_engine + ); + + return count($this->errors) ? false : true; + } + + public function process() + { + if (Tools::getValue('checkDb')) + $this->processCheckDb(); + else if (Tools::getValue('sendMail')) + $this->processSendMail(); + } + + /** + * Check if a connection to database is possible with these data + */ + public function processCheckDb() + { + $server = Tools::getValue('dbServer'); + $database = Tools::getValue('dbName'); + $login = Tools::getValue('dbLogin'); + $password = Tools::getValue('dbPassword'); + $prefix = Tools::getValue('db_prefix'); + $engine = Tools::getValue('dbEngine'); + + $errors = $this->model_database->testDatabaseSettings($server, $database, $login, $password, $prefix, $engine); + + $this->ajaxJsonAnswer( + (count($errors)) ? false : true, + (count($errors)) ? implode('
', $errors) : $this->l('Database is connected') + ); + } + + /** + * Send a test email + */ + public function processSendMail() + { + $smtp_checked = (Tools::getValue('smtpChecked') == 'true'); + $server = Tools::getValue('smtpSrv'); + $encryption = Tools::getValue('smtpEnc'); + $port = Tools::getValue('smtpPort'); + $login = Tools::getValue('smtpLogin'); + $password = Tools::getValue('smtpPassword'); + $email = Tools::getValue('testEmail'); + + $result = $this->model_mail->sendTestMail($smtp_checked, $server, $login, $password, $port, $encryption, $email); + + $this->ajaxJsonAnswer( + (bool)$result, + ($result) ? $this->l('A test e-mail has been sent to %s', $email) : $this->l('An error occurred while sending email, please verify your parameters') + ); + } + + /** + * @see InstallAbstractModel::display() + */ + public function display() + { + if (!$this->session->install_type) + { + if (file_exists(_PS_ROOT_DIR_.'/config/settings.inc.php')) + { + include_once _PS_ROOT_DIR_.'/config/settings.inc.php'; + $this->database_server = _DB_SERVER_; + $this->database_name = _DB_NAME_; + $this->database_login = _DB_USER_; + $this->database_password = _DB_PASSWD_; + $this->database_engine = _MYSQL_ENGINE_; + $this->database_prefix = _DB_PREFIX_; + } + else + { + $this->database_server = 'localhost'; + $this->database_name = 'prestashop'; + $this->database_login = 'root'; + $this->database_password = ''; + $this->database_engine = 'InnoDB'; + $this->database_prefix = 'ps_'; + } + + $this->database_clear = true; + $this->install_type = 'full'; + $this->use_smtp = false; + $this->smtp_server = 'smtp.'; + $this->smtp_encryption = 'off'; + $this->smtp_port = 25; + $this->smtp_login = ''; + $this->smtp_password = ''; + } + else + { + $this->database_server = $this->session->database_server; + $this->database_name = $this->session->database_name; + $this->database_login = $this->session->database_login; + $this->database_password = $this->session->database_password; + $this->database_engine = $this->session->database_engine; + $this->database_prefix = $this->session->database_prefix; + $this->database_clear = $this->session->database_clear; + + $this->install_type = $this->session->install_type; + $this->use_smtp = $this->session->use_smtp; + $this->smtp_server = $this->session->smtp_server; + $this->smtp_encryption = $this->session->smtp_encryption; + $this->smtp_port = $this->session->smtp_port; + $this->smtp_login = $this->session->smtp_login; + $this->smtp_password = $this->session->smtp_password; + } + + $this->displayTemplate('database'); + } +} diff --git a/install-new/controllers/http/process.php b/install-new/controllers/http/process.php new file mode 100644 index 000000000..32a9443ec --- /dev/null +++ b/install-new/controllers/http/process.php @@ -0,0 +1,219 @@ + +* @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 InstallControllerHttpProcess extends InstallControllerHttp +{ + const SETTINGS_FILE = 'config/settings.inc.php'; + + public function init() + { + require_once _PS_INSTALL_MODELS_PATH_.'install.php'; + $this->model_install = new InstallModelInstall(); + } + + /** + * @see InstallAbstractModel::processNextStep() + */ + public function processNextStep() + { + } + + /** + * @see InstallAbstractModel::validate() + */ + public function validate() + { + return false; + } + + public function process() + { + if (file_exists(_PS_ROOT_DIR_.'/'.self::SETTINGS_FILE)) + require_once _PS_ROOT_DIR_.'/'.self::SETTINGS_FILE; + + if (Tools::getValue('installDatabase')) + $this->processInstallDatabase(); + else if (Tools::getValue('populateDatabase')) + $this->processPopulateDatabase(); + else if (Tools::getValue('configureShop')) + $this->processConfigureShop(); + else if (Tools::getValue('installModules')) + $this->processInstallModules(); + else if (Tools::getValue('installFixtures')) + $this->processInstallFixtures(); + else if (Tools::getValue('preactivation')) + $this->processPreactivation(); + } + + /** + * PROCESS : installDatabase + * Generate settings file and create database structure + */ + public function processInstallDatabase() + { + $success = $this->model_install->installDatabase( + $this->session->database_server, + $this->session->database_login, + $this->session->database_password, + $this->session->database_name, + $this->session->database_prefix, + $this->session->database_engine, + $this->session->database_clear + ); + + if (!$success || $this->model_install->getErrors()) + $this->ajaxJsonAnswer(false, $this->model_install->getErrors()); + $this->ajaxJsonAnswer(true); + } + + /** + * PROCESS : populateDatabase + * Populate database with default data + */ + public function processPopulateDatabase() + { + $this->initializeContext(); + + if (!$this->model_install->populateDatabase(true) || $this->model_install->getErrors()) + $this->ajaxJsonAnswer(false, $this->model_install->getErrors()); + $this->session->xml_loader_ids = $this->model_install->xml_loader_ids; + $this->ajaxJsonAnswer(true); + } + + /** + * PROCESS : configureShop + * Set default shop configuration + */ + public function processConfigureShop() + { + $this->initializeContext(); + + $success = $this->model_install->configureShop(array( + 'shop_name' => $this->session->shop_name, + 'shop_activity' => $this->session->shop_activity, + 'shop_country' => $this->session->shop_country, + 'shop_timezone' => $this->session->shop_timezone, + 'use_smtp' => $this->session->use_smtp, + 'smtp_server' => $this->session->smtp_server, + 'smtp_login' => $this->session->smtp_login, + 'smtp_password' => $this->session->smtp_password, + 'smtp_encryption' =>$this->session->smtp_encryption, + 'smtp_port' => $this->session->smtp_port, + 'admin_firstname' =>$this->session->admin_firstname, + 'admin_lastname' => $this->session->admin_lastname, + 'admin_password' => $this->session->admin_password, + 'admin_email' => $this->session->admin_email, + )); + + if (!$success || $this->model_install->getErrors()) + $this->ajaxJsonAnswer(false, $this->model_install->getErrors()); + $this->ajaxJsonAnswer(true); + } + + public function initializeContext() + { + global $smarty; + + Context::getContext()->shop = new Shop(1); + Configuration::loadConfiguration(); + Context::getContext()->language = new Language(Configuration::get('PS_LANG_DEFAULT')); + + require_once _PS_ROOT_DIR_.'/config/smarty.config.inc.php'; + Context::getContext()->smarty = $smarty; + } + + /** + * PROCESS : installModules + * Install all modules in ~/modules/ directory + */ + public function processInstallModules() + { + $this->initializeContext(); + + // Remove all modules from module table, just in case + Db::getInstance()->delete(_DB_PREFIX_.'module'); + + if (!$this->model_install->installModules() || $this->model_install->getErrors()) + $this->ajaxJsonAnswer(false, $this->model_install->getErrors()); + $this->ajaxJsonAnswer(true); + } + + /** + * PROCESS : installFixtures + * Install fixtures (E.g. demo products) + */ + public function processInstallFixtures() + { + $this->initializeContext(); + + $this->model_install->xml_loader_ids = $this->session->xml_loader_ids; + if (!$this->model_install->installFixtures() || $this->model_install->getErrors()) + $this->ajaxJsonAnswer(false, $this->model_install->getErrors()); + $this->ajaxJsonAnswer(true); + } + + /** + * PROCESS : preactivation + * (currently not used) + */ + public function processPreactivation() + { + foreach ($this->session->partners as $partner => $data) + { + /*$stream_context = @stream_context_create(array('http' => array('method'=> 'GET', 'timeout' => 5))); + $url = 'http://www.prestashop.com/partner/preactivation/actions.php?version=1.0&partner='.addslashes($_GET['partner']); + + // Protect fields + foreach ($_GET as $key => $value) + $_GET[$key] = strip_tags(str_replace(array('\'', '"'), '', trim($value))); + + // Encore Get, Send It and Get Answers + @require_once('../config/settings.inc.php'); + foreach ($_GET as $key => $val) + $url .= '&'.$key.'='.urlencode($val); + $url .= '&security='.md5($_GET['email']._COOKIE_IV_);*/ + } + + $this->ajaxJsonAnswer(true); + } + + /** + * @see InstallAbstractModel::display() + */ + public function display() + { + $this->process_steps = array( + 'installDatabase', + 'populateDatabase', + 'configureShop', + 'installModules', + 'installFixtures', + //'preactivation', + ); + $this->displayTemplate('process'); + } +} diff --git a/install-new/controllers/http/system.php b/install-new/controllers/http/system.php new file mode 100644 index 000000000..36dfacf84 --- /dev/null +++ b/install-new/controllers/http/system.php @@ -0,0 +1,132 @@ + +* @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 +*/ + +/** + * Step 2 : check system configuration (permissions on folders, PHP version, etc.) + */ +class InstallControllerHttpSystem extends InstallControllerHttp +{ + public $tests = array(); + + /** + * @var InstallModelSystem + */ + public $model_system; + + /** + * @see InstallAbstractModel::init() + */ + public function init() + { + require_once _PS_INSTALL_MODELS_PATH_.'system.php'; + $this->model_system = new InstallModelSystem(); + } + + /** + * @see InstallAbstractModel::processNextStep() + */ + public function processNextStep() + { + } + + /** + * Required tests must be passed to validate this step + * + * @see InstallAbstractModel::validate() + */ + public function validate() + { + $this->tests['required'] = $this->model_system->checkRequiredTests(); + + return $this->tests['required']['success']; + } + + /** + * Display system step + */ + public function display() + { + if (!isset($this->tests['required'])) + $this->tests['required'] = $this->model_system->checkRequiredTests(); + + if (!isset($this->tests['optional'])) + $this->tests['optional'] = $this->model_system->checkOptionalTests(); + + // Generate display array + $this->tests_render = array( + 'required' => array( + array( + 'title' => $this->l('PHP parameters:'), + 'checks' => array( + 'phpversion' => $this->l('Is PHP 5.1.0 or later installed ?'), + 'upload' => $this->l('Can upload files allowed ?'), + 'system' => $this->l('Can create new files and folders ?'), + 'gd' => $this->l('Is GD Library installed ?'), + 'mysql_support' => $this->l('Is MySQL support is on ?'), + ) + ), + array( + 'title' => $this->l('Write permissions on files:'), + 'checks' => array( + 'config_dir' => '~/config/', + 'cache_dir' => '~/cache/', + 'log_dir' => '~/log/', + 'img_dir' => '~/img/', + 'mails_dir' => '~/mails/', + 'module_dir' => '~/modules/', + 'theme_lang_dir' => '~/themes/prestashop/lang/', + 'theme_cache_dir' => '~/themes/prestashop/cache/', + 'translations_dir' => '~/translations/', + 'customizable_products_dir' => '~/upload/', + 'virtual_products_dir' => '~/download/', + 'sitemap' => '~/sitemap.xml', + ) + ), + ), + 'optional' => array( + array( + 'title' => $this->l('PHP parameters:'), + 'checks' => array( + 'fopen' => $this->l('Can open external URLs ?'), + 'register_globals' => $this->l('Is PHP register global option desactivated (recommended) ?'), + 'gz' => $this->l('Is GZIP compression activated (recommended) ?'), + 'mcrypt' => $this->l('Is Mcrypt extension available (recommended) ?'), + 'magicquotes' => $this->l('Is PHP magic quotes option desactivated (recommended) ?'), + 'dom' => $this->l('Is Dom extension loaded ?'), + 'pdo_mysql' => $this->l('Is PDO MySQL extension loaded ?'), + ) + ), + ), + ); + + // If required tests failed, disable next button + if (!$this->tests['required']['success']) + $this->next_button = false; + + $this->displayTemplate('system'); + } +} diff --git a/install-new/controllers/http/welcome.php b/install-new/controllers/http/welcome.php new file mode 100644 index 000000000..7e8ec90b2 --- /dev/null +++ b/install-new/controllers/http/welcome.php @@ -0,0 +1,73 @@ + +* @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 +*/ + +/** + * Step 1 : display agrement form + */ +class InstallControllerHttpWelcome extends InstallControllerHttp +{ + /** + * Process welcome form + * + * @see InstallAbstractModel::process() + */ + public function processNextStep() + { + $this->session->licence_agrement = Tools::getValue('licence_agrement'); + $this->session->configuration_agrement = Tools::getValue('configuration_agrement'); + } + + /** + * Licence agrement must be checked to validate this step + * + * @see InstallAbstractModel::validate() + */ + public function validate() + { + return $this->session->licence_agrement; + } + + /** + * Change language + */ + public function process() + { + if (Tools::getValue('language')) + { + $this->session->lang = Tools::getValue('language'); + $this->redirect('welcome'); + } + } + + /** + * Display welcome step + */ + public function display() + { + $this->displayTemplate('welcome'); + } +} diff --git a/install-new/data/db_structure.sql b/install-new/data/db_structure.sql new file mode 100644 index 000000000..595339222 --- /dev/null +++ b/install-new/data/db_structure.sql @@ -0,0 +1,2174 @@ +SET NAMES 'utf8'; + +CREATE TABLE `PREFIX_access` ( + `id_profile` int(10) unsigned NOT NULL, + `id_tab` int(10) unsigned NOT NULL, + `view` int(11) NOT NULL, + `add` int(11) NOT NULL, + `edit` int(11) NOT NULL, + `delete` int(11) NOT NULL, + PRIMARY KEY (`id_profile`,`id_tab`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +CREATE TABLE `PREFIX_accessory` ( + `id_product_1` int(10) unsigned NOT NULL, + `id_product_2` int(10) unsigned NOT NULL, + KEY `accessory_product` (`id_product_1`,`id_product_2`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +CREATE TABLE `PREFIX_address` ( + `id_address` int(10) unsigned NOT NULL auto_increment, + `id_country` int(10) unsigned NOT NULL, + `id_state` int(10) unsigned default NULL, + `id_customer` int(10) unsigned NOT NULL default '0', + `id_manufacturer` int(10) unsigned NOT NULL default '0', + `id_supplier` int(10) unsigned NOT NULL default '0', + `alias` varchar(32) NOT NULL, + `company` varchar(32) default NULL, + `lastname` varchar(32) NOT NULL, + `firstname` varchar(32) NOT NULL, + `address1` varchar(128) NOT NULL, + `address2` varchar(128) default NULL, + `postcode` varchar(12) default NULL, + `city` varchar(64) NOT NULL, + `other` text, + `phone` varchar(16) default NULL, + `phone_mobile` varchar(16) default NULL, + `vat_number` varchar(32) default NULL, + `dni` varchar(16) DEFAULT NULL, + `date_add` datetime NOT NULL, + `date_upd` datetime NOT NULL, + `active` tinyint(1) unsigned NOT NULL default '1', + `deleted` tinyint(1) unsigned NOT NULL default '0', + PRIMARY KEY (`id_address`), + KEY `address_customer` (`id_customer`), + KEY `id_country` (`id_country`), + KEY `id_state` (`id_state`), + KEY `id_manufacturer` (`id_manufacturer`), + KEY `id_supplier` (`id_supplier`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +CREATE TABLE `PREFIX_alias` ( + `id_alias` int(10) unsigned NOT NULL auto_increment, + `alias` varchar(255) NOT NULL, + `search` varchar(255) NOT NULL, + `active` tinyint(1) NOT NULL default '1', + PRIMARY KEY (`id_alias`), + UNIQUE KEY `alias` (`alias`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +CREATE TABLE `PREFIX_attachment` ( + `id_attachment` int(10) unsigned NOT NULL auto_increment, + `file` varchar(40) NOT NULL, + `file_name` varchar(128) NOT NULL, + `mime` varchar(128) NOT NULL, + PRIMARY KEY (`id_attachment`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +CREATE TABLE `PREFIX_attachment_lang` ( + `id_attachment` int(10) unsigned NOT NULL auto_increment, + `id_lang` int(10) unsigned NOT NULL, + `name` varchar(32) default NULL, + `description` TEXT, + PRIMARY KEY (`id_attachment`, `id_lang`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +CREATE TABLE `PREFIX_product_attachment` ( + `id_product` int(10) unsigned NOT NULL, + `id_attachment` int(10) unsigned NOT NULL, + PRIMARY KEY (`id_product`,`id_attachment`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +CREATE TABLE `PREFIX_attribute` ( + `id_attribute` int(10) unsigned NOT NULL auto_increment, + `id_attribute_group` int(10) unsigned NOT NULL, + `color` varchar(32) default NULL, + `position` int(10) unsigned NOT NULL default '0', + PRIMARY KEY (`id_attribute`), + KEY `attribute_group` (`id_attribute_group`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +CREATE TABLE `PREFIX_attribute_group` ( + `id_attribute_group` int(10) unsigned NOT NULL auto_increment, + `is_color_group` tinyint(1) NOT NULL default '0', + `group_type` ENUM('select', 'radio', 'color') NOT NULL DEFAULT 'select', + `position` int(10) unsigned NOT NULL default '0', + PRIMARY KEY (`id_attribute_group`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +CREATE TABLE `PREFIX_attribute_group_lang` ( + `id_attribute_group` int(10) unsigned NOT NULL, + `id_lang` int(10) unsigned NOT NULL, + `name` varchar(128) NOT NULL, + `public_name` varchar(64) NOT NULL, + PRIMARY KEY (`id_attribute_group`,`id_lang`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +CREATE TABLE `PREFIX_attribute_impact` ( + `id_attribute_impact` int(10) unsigned NOT NULL auto_increment, + `id_product` int(11) unsigned NOT NULL, + `id_attribute` int(11) unsigned NOT NULL, + `weight` float NOT NULL, + `price` decimal(17,2) NOT NULL, + PRIMARY KEY (`id_attribute_impact`), + UNIQUE KEY `id_product` (`id_product`,`id_attribute`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +CREATE TABLE `PREFIX_attribute_lang` ( + `id_attribute` int(10) unsigned NOT NULL, + `id_lang` int(10) unsigned NOT NULL, + `name` varchar(128) NOT NULL, + PRIMARY KEY (`id_attribute`,`id_lang`), + KEY `id_lang` (`id_lang`,`name`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +CREATE TABLE `PREFIX_carrier` ( + `id_carrier` int(10) unsigned NOT NULL AUTO_INCREMENT, + `id_reference` int(10) unsigned NOT NULL, + `id_tax_rules_group` int(10) unsigned DEFAULT '0', + `name` varchar(64) NOT NULL, + `url` varchar(255) DEFAULT NULL, + `active` tinyint(1) unsigned NOT NULL DEFAULT '0', + `deleted` tinyint(1) unsigned NOT NULL DEFAULT '0', + `shipping_handling` tinyint(1) unsigned NOT NULL DEFAULT '1', + `range_behavior` tinyint(1) unsigned NOT NULL DEFAULT '0', + `is_module` tinyint(1) unsigned NOT NULL DEFAULT '0', + `is_free` tinyint(1) unsigned NOT NULL DEFAULT '0', + `shipping_external` tinyint(1) unsigned NOT NULL DEFAULT '0', + `need_range` tinyint(1) unsigned NOT NULL DEFAULT '0', + `external_module_name` varchar(64) DEFAULT NULL, + `shipping_method` int(2) NOT NULL DEFAULT '0', + `position` int(10) unsigned NOT NULL default '0', + PRIMARY KEY (`id_carrier`), + KEY `deleted` (`deleted`,`active`), + KEY `id_tax_rules_group` (`id_tax_rules_group`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +CREATE TABLE `PREFIX_carrier_lang` ( + `id_carrier` int(10) unsigned NOT NULL, + `id_shop` int(11) unsigned NOT NULL DEFAULT '1', + `id_lang` int(10) unsigned NOT NULL, + `delay` varchar(128) default NULL, + UNIQUE KEY `shipper_lang_index` (`id_lang`,`id_shop`, `id_carrier`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +CREATE TABLE `PREFIX_carrier_zone` ( + `id_carrier` int(10) unsigned NOT NULL, + `id_zone` int(10) unsigned NOT NULL, + PRIMARY KEY `carrier_zone_index` (`id_carrier`,`id_zone`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +CREATE TABLE `PREFIX_cart` ( + `id_cart` int(10) unsigned NOT NULL auto_increment, + `id_group_shop` INT(11) UNSIGNED NOT NULL DEFAULT '1', + `id_shop` INT(11) UNSIGNED NOT NULL DEFAULT '1', + `id_carrier` int(10) unsigned NOT NULL, + `id_lang` int(10) unsigned NOT NULL, + `id_address_delivery` int(10) unsigned NOT NULL, + `id_address_invoice` int(10) unsigned NOT NULL, + `id_currency` int(10) unsigned NOT NULL, + `id_customer` int(10) unsigned NOT NULL, + `id_guest` int(10) unsigned NOT NULL, + `secure_key` varchar(32) NOT NULL default '-1', + `recyclable` tinyint(1) unsigned NOT NULL default '1', + `gift` tinyint(1) unsigned NOT NULL default '0', + `gift_message` text, + `date_add` datetime NOT NULL, + `date_upd` datetime NOT NULL, + PRIMARY KEY (`id_cart`), + KEY `cart_customer` (`id_customer`), + KEY `id_address_delivery` (`id_address_delivery`), + KEY `id_address_invoice` (`id_address_invoice`), + KEY `id_carrier` (`id_carrier`), + KEY `id_lang` (`id_lang`), + KEY `id_currency` (`id_currency`), + KEY `id_guest` (`id_guest`), + KEY `id_group_shop` (`id_group_shop`), + KEY `id_shop` (`id_shop`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +CREATE TABLE `PREFIX_cart_rule` ( + `id_cart_rule` int(10) unsigned NOT NULL auto_increment, + `id_customer` int unsigned NOT NULL default 0, + `date_from` datetime NOT NULL, + `date_to` datetime NOT NULL, + `description` text, + `quantity` int(10) unsigned NOT NULL default 0, + `quantity_per_user` int(10) unsigned NOT NULL default 0, + `priority` int(10) unsigned NOT NULL default 1, + `code` varchar(254) NOT NULL, + `minimum_amount` decimal(17,2) NOT NULL default 0, + `minimum_amount_tax` tinyint(1) NOT NULL default 0, + `minimum_amount_currency` int unsigned NOT NULL default 0, + `minimum_amount_shipping` tinyint(1) NOT NULL default 0, + `country_restriction` tinyint(1) unsigned NOT NULL default 0, + `carrier_restriction` tinyint(1) unsigned NOT NULL default 0, + `group_restriction` tinyint(1) unsigned NOT NULL default 0, + `cart_rule_restriction` tinyint(1) unsigned NOT NULL default 0, + `product_restriction` tinyint(1) unsigned NOT NULL default 0, + `free_shipping` tinyint(1) NOT NULL default 0, + `reduction_percent` decimal(4,2) NOT NULL default 0, + `reduction_amount` decimal(17,2) NOT NULL default 0, + `reduction_tax` tinyint(1) unsigned NOT NULL default 0, + `reduction_currency` int(10) unsigned NOT NULL default 0, + `reduction_product` int(10) NOT NULL default 0, + `gift_product` int(10) unsigned NOT NULL default 0, + `active` tinyint(1) unsigned NOT NULL default 0, + `date_add` datetime NOT NULL, + `date_upd` datetime NOT NULL, + PRIMARY KEY (`id_cart_rule`) +); + +CREATE TABLE `PREFIX_cart_rule_lang` ( + `id_cart_rule` int(10) unsigned NOT NULL, + `id_lang` int(10) unsigned NOT NULL, + `name` varchar(254) NOT NULL, + PRIMARY KEY (`id_cart_rule`, `id_lang`) +); + +CREATE TABLE `PREFIX_cart_rule_country` ( + `id_cart_rule` int(10) unsigned NOT NULL, + `id_country` int(10) unsigned NOT NULL, + PRIMARY KEY (`id_cart_rule`, `id_country`) +); + +CREATE TABLE `PREFIX_cart_rule_group` ( + `id_cart_rule` int(10) unsigned NOT NULL, + `id_group` int(10) unsigned NOT NULL, + PRIMARY KEY (`id_cart_rule`, `id_group`) +); + +CREATE TABLE `PREFIX_cart_rule_carrier` ( + `id_cart_rule` int(10) unsigned NOT NULL, + `id_carrier` int(10) unsigned NOT NULL, + PRIMARY KEY (`id_cart_rule`, `id_carrier`) +); + +CREATE TABLE `PREFIX_cart_rule_combination` ( + `id_cart_rule_1` int(10) unsigned NOT NULL, + `id_cart_rule_2` int(10) unsigned NOT NULL, + PRIMARY KEY (`id_cart_rule_1`, `id_cart_rule_2`) +); + +CREATE TABLE `PREFIX_cart_rule_product_rule` ( + `id_product_rule` int(10) unsigned NOT NULL auto_increment, + `id_cart_rule` int(10) unsigned NOT NULL, + `quantity` int(10) unsigned NOT NULL default 1, + `type` ENUM('products', 'categories', 'attributes') NOT NULL, + PRIMARY KEY (`id_product_rule`) +); + +CREATE TABLE `PREFIX_cart_rule_product_rule_value` ( + `id_product_rule` int(10) unsigned NOT NULL, + `id_item` int(10) unsigned NOT NULL, + PRIMARY KEY (`id_product_rule`, `id_item`) +); + +CREATE TABLE `PREFIX_cart_cart_rule` ( + `id_cart` int(10) unsigned NOT NULL, + `id_cart_rule` int(10) unsigned NOT NULL, + PRIMARY KEY (`id_cart`,`id_cart_rule`), + KEY (`id_cart_rule`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +CREATE TABLE `PREFIX_cart_product` ( + `id_cart` int(10) unsigned NOT NULL, + `id_product` int(10) unsigned NOT NULL, + `id_shop` int(10) unsigned NOT NULL DEFAULT '1', + `id_product_attribute` int(10) unsigned default NULL, + `quantity` int(10) unsigned NOT NULL default '0', + `date_add` datetime NOT NULL, + KEY `cart_product_index` (`id_cart`,`id_product`), + KEY `id_product_attribute` (`id_product_attribute`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +CREATE TABLE `PREFIX_category` ( + `id_category` int(10) unsigned NOT NULL auto_increment, + `id_parent` int(10) unsigned NOT NULL, + `level_depth` tinyint(3) unsigned NOT NULL default '0', + `nleft` int(10) unsigned NOT NULL default '0', + `nright` int(10) unsigned NOT NULL default '0', + `active` tinyint(1) unsigned NOT NULL default '0', + `date_add` datetime NOT NULL, + `date_upd` datetime NOT NULL, + `position` int(10) unsigned NOT NULL default '0', + PRIMARY KEY (`id_category`), + KEY `category_parent` (`id_parent`), + KEY `nleftright` (`nleft`,`nright`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +CREATE TABLE `PREFIX_category_group` ( + `id_category` int(10) unsigned NOT NULL, + `id_group` int(10) unsigned NOT NULL, + UNIQUE KEY `category_group_index` (`id_category`,`id_group`), + KEY `id_category` (`id_category`), + KEY `id_group` (`id_group`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +CREATE TABLE `PREFIX_category_lang` ( + `id_category` int(10) unsigned NOT NULL, + `id_shop` INT( 11 ) UNSIGNED NOT NULL DEFAULT '1', + `id_lang` int(10) unsigned NOT NULL, + `name` varchar(128) NOT NULL, + `description` text, + `link_rewrite` varchar(128) NOT NULL, + `meta_title` varchar(128) default NULL, + `meta_keywords` varchar(255) default NULL, + `meta_description` varchar(255) default NULL, + UNIQUE KEY `category_lang_index` (`id_category`,`id_shop`, `id_lang`), + KEY `category_name` (`name`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +CREATE TABLE `PREFIX_category_product` ( + `id_category` int(10) unsigned NOT NULL, + `id_product` int(10) unsigned NOT NULL, + `position` int(10) unsigned NOT NULL default '0', + KEY `category_product_index` (`id_category`,`id_product`), + INDEX (`id_product`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +CREATE TABLE `PREFIX_cms` ( + `id_cms` int(10) unsigned NOT NULL AUTO_INCREMENT, + `id_shop` INT(11) UNSIGNED NOT NULL DEFAULT '1', + `id_cms_category` int(10) unsigned NOT NULL, + `position` int(10) unsigned NOT NULL DEFAULT '0', + `active` tinyint(1) unsigned NOT NULL default '0', + PRIMARY KEY (`id_cms`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +CREATE TABLE `PREFIX_cms_lang` ( + `id_cms` int(10) unsigned NOT NULL, + `id_lang` int(10) unsigned NOT NULL, + `meta_title` varchar(128) NOT NULL, + `meta_description` varchar(255) default NULL, + `meta_keywords` varchar(255) default NULL, + `content` longtext, + `link_rewrite` varchar(128) NOT NULL, + PRIMARY KEY (`id_cms`,`id_lang`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +CREATE TABLE `PREFIX_cms_category` ( + `id_cms_category` int(10) unsigned NOT NULL AUTO_INCREMENT, + `id_parent` int(10) unsigned NOT NULL, + `level_depth` tinyint(3) unsigned NOT NULL DEFAULT '0', + `active` tinyint(1) unsigned NOT NULL DEFAULT '0', + `date_add` datetime NOT NULL, + `date_upd` datetime NOT NULL, + `position` int(10) unsigned NOT NULL default '0', + PRIMARY KEY (`id_cms_category`), + KEY `category_parent` (`id_parent`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +CREATE TABLE `PREFIX_cms_category_lang` ( + `id_cms_category` int(10) unsigned NOT NULL, + `id_lang` int(10) unsigned NOT NULL, + `name` varchar(128) NOT NULL, + `description` text, + `link_rewrite` varchar(128) NOT NULL, + `meta_title` varchar(128) DEFAULT NULL, + `meta_keywords` varchar(255) DEFAULT NULL, + `meta_description` varchar(255) DEFAULT NULL, + UNIQUE KEY `category_lang_index` (`id_cms_category`,`id_lang`), + KEY `category_name` (`name`) +) 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` ( + `id_configuration` int(10) unsigned NOT NULL auto_increment, + `id_group_shop` INT(11) UNSIGNED DEFAULT NULL, + `id_shop` INT(11) UNSIGNED DEFAULT NULL, + `name` varchar(32) NOT NULL, + `value` text, + `date_add` datetime NOT NULL, + `date_upd` datetime NOT NULL, + PRIMARY KEY (`id_configuration`), + KEY `name` (`name`), + KEY `id_shop` (`id_shop`), + KEY `id_group_shop` (`id_group_shop`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +CREATE TABLE `PREFIX_configuration_lang` ( + `id_configuration` int(10) unsigned NOT NULL, + `id_lang` int(10) unsigned NOT NULL, + `value` text, + `date_upd` datetime default NULL, + PRIMARY KEY (`id_configuration`,`id_lang`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +CREATE TABLE `PREFIX_connections` ( + `id_connections` int(10) unsigned NOT NULL auto_increment, + `id_group_shop` INT(11) UNSIGNED NOT NULL DEFAULT '1', + `id_shop` INT(11) UNSIGNED NOT NULL DEFAULT '1', + `id_guest` int(10) unsigned NOT NULL, + `id_page` int(10) unsigned NOT NULL, + `ip_address` BIGINT NULL DEFAULT NULL, + `date_add` datetime NOT NULL, + `http_referer` varchar(255) default NULL, + PRIMARY KEY (`id_connections`), + KEY `id_guest` (`id_guest`), + KEY `date_add` (`date_add`), + KEY `id_page` (`id_page`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +CREATE TABLE `PREFIX_connections_page` ( + `id_connections` int(10) unsigned NOT NULL, + `id_page` int(10) unsigned NOT NULL, + `time_start` datetime NOT NULL, + `time_end` datetime default NULL, + PRIMARY KEY (`id_connections`,`id_page`,`time_start`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +CREATE TABLE `PREFIX_connections_source` ( + `id_connections_source` int(10) unsigned NOT NULL auto_increment, + `id_connections` int(10) unsigned NOT NULL, + `http_referer` varchar(255) default NULL, + `request_uri` varchar(255) default NULL, + `keywords` varchar(255) default NULL, + `date_add` datetime NOT NULL, + PRIMARY KEY (`id_connections_source`), + KEY `connections` (`id_connections`), + KEY `orderby` (`date_add`), + KEY `http_referer` (`http_referer`), + KEY `request_uri` (`request_uri`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +CREATE TABLE `PREFIX_contact` ( + `id_contact` int(10) unsigned NOT NULL auto_increment, + `email` varchar(128) NOT NULL, + `customer_service` tinyint(1) NOT NULL DEFAULT 0, + `position` tinyint(2) unsigned NOT NULL default '0', + PRIMARY KEY (`id_contact`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +CREATE TABLE `PREFIX_contact_lang` ( + `id_contact` int(10) unsigned NOT NULL, + `id_lang` int(10) unsigned NOT NULL, + `name` varchar(32) NOT NULL, + `description` text, + UNIQUE KEY `contact_lang_index` (`id_contact`,`id_lang`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +CREATE TABLE `PREFIX_country` ( + `id_country` int(10) unsigned NOT NULL auto_increment, + `id_zone` int(10) unsigned NOT NULL, + `id_currency` int(10) unsigned NOT NULL default '0', + `iso_code` varchar(3) NOT NULL, + `call_prefix` int(10) NOT NULL default '0', + `active` tinyint(1) unsigned NOT NULL default '0', + `contains_states` tinyint(1) NOT NULL default '0', + `need_identification_number` tinyint(1) NOT NULL default '0', + `need_zip_code` tinyint(1) NOT NULL default '1', + `zip_code_format` varchar(12) NOT NULL default '', + `display_tax_label` BOOLEAN NOT NULL, + PRIMARY KEY (`id_country`), + KEY `country_iso_code` (`iso_code`), + KEY `country_` (`id_zone`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +CREATE TABLE `PREFIX_country_lang` ( + `id_country` int(10) unsigned NOT NULL, + `id_lang` int(10) unsigned NOT NULL, + `name` varchar(64) NOT NULL, + UNIQUE KEY `country_lang_index` (`id_country`,`id_lang`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +CREATE TABLE `PREFIX_currency` ( + `id_currency` int(10) unsigned NOT NULL auto_increment, + `name` varchar(32) NOT NULL, + `iso_code` varchar(3) NOT NULL default '0', + `iso_code_num` varchar(3) NOT NULL default '0', + `sign` varchar(8) NOT NULL, + `blank` tinyint(1) unsigned NOT NULL default '0', + `format` tinyint(1) unsigned NOT NULL default '0', + `decimals` tinyint(1) unsigned NOT NULL default '1', + `conversion_rate` decimal(13,6) NOT NULL, + `deleted` tinyint(1) unsigned NOT NULL default '0', + `active` tinyint(1) unsigned NOT NULL default '1', + PRIMARY KEY (`id_currency`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +CREATE TABLE `PREFIX_customer` ( + `id_customer` int(10) unsigned NOT NULL auto_increment, + `id_group_shop` INT(11) UNSIGNED NOT NULL DEFAULT '1', + `id_shop` INT(11) UNSIGNED NOT NULL DEFAULT '1', + `id_gender` int(10) unsigned NOT NULL, + `id_default_group` int(10) unsigned NOT NULL DEFAULT '1', + `firstname` varchar(32) NOT NULL, + `lastname` varchar(32) NOT NULL, + `email` varchar(128) NOT NULL, + `passwd` varchar(32) NOT NULL, + `last_passwd_gen` timestamp NOT NULL default CURRENT_TIMESTAMP, + `birthday` date default NULL, + `newsletter` tinyint(1) unsigned NOT NULL default '0', + `ip_registration_newsletter` varchar(15) default NULL, + `newsletter_date_add` datetime default NULL, + `optin` tinyint(1) unsigned NOT NULL default '0', + `secure_key` varchar(32) NOT NULL default '-1', + `note` text, + `active` tinyint(1) unsigned NOT NULL default '0', + `is_guest` tinyint(1) NOT NULL default '0', + `deleted` tinyint(1) NOT NULL default '0', + `date_add` datetime NOT NULL, + `date_upd` datetime NOT NULL, + PRIMARY KEY (`id_customer`), + KEY `customer_email` (`email`), + KEY `customer_login` (`email`,`passwd`), + KEY `id_customer_passwd` (`id_customer`,`passwd`), + KEY `id_gender` (`id_gender`), + KEY `id_group_shop` (`id_group_shop`), + KEY `id_shop` (`id_shop`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +CREATE TABLE `PREFIX_customer_group` ( + `id_customer` int(10) unsigned NOT NULL, + `id_group` int(10) unsigned NOT NULL, + PRIMARY KEY `customer_group_index` (`id_customer`,`id_group`), + INDEX customer_login(id_group), + KEY `id_customer` (`id_customer`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +CREATE TABLE `PREFIX_customer_message` ( + `id_customer_message` int(10) unsigned NOT NULL auto_increment, + `id_customer_thread` int(11) default NULL, + `id_employee` int(10) unsigned default NULL, + `message` text NOT NULL, + `file_name` varchar(18) DEFAULT NULL, + `ip_address` int(11) default NULL, + `user_agent` varchar(128) default NULL, + `date_add` datetime NOT NULL, + `private` TINYINT NOT NULL DEFAULT '0', + PRIMARY KEY (`id_customer_message`), + KEY `id_customer_thread` (`id_customer_thread`), + KEY `id_employee` (`id_employee`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + + +CREATE TABLE `PREFIX_customer_message_sync_imap` ( + `md5_header` varbinary(32) NOT NULL, + KEY `md5_header_index` (`md5_header`(4)) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +CREATE TABLE `PREFIX_customer_thread` ( + `id_customer_thread` int(11) unsigned NOT NULL auto_increment, + `id_shop` INT(11) UNSIGNED NOT NULL DEFAULT '1', + `id_lang` int(10) unsigned NOT NULL, + `id_contact` int(10) unsigned NOT NULL, + `id_customer` int(10) unsigned default NULL, + `id_order` int(10) unsigned default NULL, + `id_product` int(10) unsigned default NULL, + `status` enum('open','closed','pending1','pending2') NOT NULL default 'open', + `email` varchar(128) NOT NULL, + `token` varchar(12) default NULL, + `date_add` datetime NOT NULL, + `date_upd` datetime NOT NULL, + PRIMARY KEY (`id_customer_thread`), + KEY `id_shop` (`id_shop`), + KEY `id_lang` (`id_lang`), + KEY `id_contact` (`id_contact`), + KEY `id_customer` (`id_customer`), + KEY `id_order` (`id_order`), + KEY `id_product` (`id_product`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + + +CREATE TABLE `PREFIX_customization` ( + `id_customization` int(10) unsigned NOT NULL auto_increment, + `id_product_attribute` int(10) unsigned NOT NULL default '0', + `id_cart` int(10) unsigned NOT NULL, + `id_product` int(10) NOT NULL, + `quantity` int(10) NOT NULL, + `quantity_refunded` INT NOT NULL DEFAULT '0', + `quantity_returned` INT NOT NULL DEFAULT '0', + `in_cart` TINYINT(1) UNSIGNED NOT NULL DEFAULT '0', + PRIMARY KEY (`id_customization`,`id_cart`,`id_product`), + KEY `id_product_attribute` (`id_product_attribute`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +CREATE TABLE `PREFIX_customization_field` ( + `id_customization_field` int(10) unsigned NOT NULL auto_increment, + `id_product` int(10) unsigned NOT NULL, + `type` tinyint(1) NOT NULL, + `required` tinyint(1) NOT NULL, + PRIMARY KEY (`id_customization_field`), + KEY `id_product` (`id_product`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +CREATE TABLE `PREFIX_customization_field_lang` ( + `id_customization_field` int(10) unsigned NOT NULL, + `id_lang` int(10) unsigned NOT NULL, + `name` varchar(255) NOT NULL, + PRIMARY KEY (`id_customization_field`,`id_lang`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +CREATE TABLE `PREFIX_customized_data` ( + `id_customization` int(10) unsigned NOT NULL, + `type` tinyint(1) NOT NULL, + `index` int(3) NOT NULL, + `value` varchar(255) NOT NULL, + PRIMARY KEY (`id_customization`,`type`,`index`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +CREATE TABLE `PREFIX_date_range` ( + `id_date_range` int(10) unsigned NOT NULL auto_increment, + `time_start` datetime NOT NULL, + `time_end` datetime NOT NULL, + PRIMARY KEY (`id_date_range`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +CREATE TABLE `PREFIX_delivery` ( + `id_delivery` int(10) unsigned NOT NULL auto_increment, + `id_shop` INT UNSIGNED NULL DEFAULT NULL, + `id_group_shop` INT UNSIGNED NULL DEFAULT NULL, + `id_carrier` int(10) unsigned NOT NULL, + `id_range_price` int(10) unsigned default NULL, + `id_range_weight` int(10) unsigned default NULL, + `id_zone` int(10) unsigned NOT NULL, + `price` decimal(20,6) NOT NULL, + PRIMARY KEY (`id_delivery`), + KEY `id_zone` (`id_zone`), + KEY `id_carrier` (`id_carrier`,`id_zone`), + KEY `id_range_price` (`id_range_price`), + KEY `id_range_weight` (`id_range_weight`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +CREATE TABLE `PREFIX_employee` ( + `id_employee` int(10) unsigned NOT NULL auto_increment, + `id_profile` int(10) unsigned NOT NULL, + `id_lang` int(10) unsigned NOT NULL DEFAULT 0, + `lastname` varchar(32) NOT NULL, + `firstname` varchar(32) NOT NULL, + `email` varchar(128) NOT NULL, + `passwd` varchar(32) NOT NULL, + `last_passwd_gen` timestamp NOT NULL default CURRENT_TIMESTAMP, + `stats_date_from` date default NULL, + `stats_date_to` date default NULL, + `bo_color` varchar(32) default NULL, + `bo_theme` varchar(32) default NULL, + `bo_uimode` ENUM('hover','click') default 'click', + `bo_show_screencast` tinyint(1) NOT NULL default '1', + `active` tinyint(1) unsigned NOT NULL default '0', + `id_last_order` tinyint(1) unsigned NOT NULL default '0', + `id_last_message` tinyint(1) unsigned NOT NULL default '0', + `id_last_customer` tinyint(1) unsigned NOT NULL default '0', + PRIMARY KEY (`id_employee`), + KEY `employee_login` (`email`,`passwd`), + KEY `id_employee_passwd` (`id_employee`,`passwd`), + KEY `id_profile` (`id_profile`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +CREATE TABLE `PREFIX_employee_shop` ( +`id_employee` INT( 11 ) UNSIGNED NOT NULL , +`id_shop` INT( 11 ) UNSIGNED NOT NULL , + PRIMARY KEY ( `id_employee` , `id_shop` ), + KEY `id_shop` (`id_shop`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +CREATE TABLE `PREFIX_feature` ( + `id_feature` int(10) unsigned NOT NULL auto_increment, + `position` int(10) unsigned NOT NULL default '0', + PRIMARY KEY (`id_feature`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +CREATE TABLE `PREFIX_feature_lang` ( + `id_feature` int(10) unsigned NOT NULL, + `id_lang` int(10) unsigned NOT NULL, + `name` varchar(128) default NULL, + PRIMARY KEY (`id_feature`,`id_lang`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +CREATE TABLE `PREFIX_feature_product` ( + `id_feature` int(10) unsigned NOT NULL, + `id_product` int(10) unsigned NOT NULL, + `id_feature_value` int(10) unsigned NOT NULL, + PRIMARY KEY (`id_feature`,`id_product`), + KEY `id_feature_value` (`id_feature_value`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +CREATE TABLE `PREFIX_feature_value` ( + `id_feature_value` int(10) unsigned NOT NULL auto_increment, + `id_feature` int(10) unsigned NOT NULL, + `custom` tinyint(3) unsigned default NULL, + PRIMARY KEY (`id_feature_value`), + KEY `feature` (`id_feature`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +CREATE TABLE `PREFIX_feature_value_lang` ( + `id_feature_value` int(10) unsigned NOT NULL, + `id_lang` int(10) unsigned NOT NULL, + `value` varchar(255) default NULL, + PRIMARY KEY (`id_feature_value`,`id_lang`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +CREATE TABLE IF NOT EXISTS `PREFIX_gender` ( + `id_gender` int(11) NOT NULL AUTO_INCREMENT, + `type` tinyint(1) NOT NULL, + PRIMARY KEY (`id_gender`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +CREATE TABLE IF NOT EXISTS `PREFIX_gender_lang` ( + `id_gender` int(10) unsigned NOT NULL, + `id_lang` int(10) unsigned NOT NULL, + `name` varchar(20) NOT NULL, + PRIMARY KEY (`id_gender`,`id_lang`), + KEY `id_gender` (`id_gender`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +CREATE TABLE `PREFIX_group` ( + `id_group` int(10) unsigned NOT NULL auto_increment, + `reduction` decimal(17,2) NOT NULL default '0.00', + `price_display_method` TINYINT NOT NULL DEFAULT 0, + `date_add` datetime NOT NULL, + `date_upd` datetime NOT NULL, + PRIMARY KEY (`id_group`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +CREATE TABLE `PREFIX_group_lang` ( + `id_group` int(10) unsigned NOT NULL, + `id_lang` int(10) unsigned NOT NULL, + `name` varchar(32) NOT NULL, + UNIQUE KEY `attribute_lang_index` (`id_group`,`id_lang`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +CREATE TABLE `PREFIX_group_reduction` ( + `id_group_reduction` MEDIUMINT UNSIGNED NOT NULL AUTO_INCREMENT, + `id_group` INT(10) UNSIGNED NOT NULL, + `id_category` INT(10) UNSIGNED NOT NULL, + `reduction` DECIMAL(4, 3) NOT NULL, + PRIMARY KEY(`id_group_reduction`), + UNIQUE KEY(`id_group`, `id_category`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +CREATE TABLE `PREFIX_product_group_reduction_cache` ( + `id_product` INT UNSIGNED NOT NULL, + `id_group` INT UNSIGNED NOT NULL, + `reduction` DECIMAL(4, 3) NOT NULL, + PRIMARY KEY(`id_product`, `id_group`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +CREATE TABLE `PREFIX_guest` ( + `id_guest` int(10) unsigned NOT NULL auto_increment, + `id_operating_system` int(10) unsigned default NULL, + `id_web_browser` int(10) unsigned default NULL, + `id_customer` int(10) unsigned default NULL, + `javascript` tinyint(1) default '0', + `screen_resolution_x` smallint(5) unsigned default NULL, + `screen_resolution_y` smallint(5) unsigned default NULL, + `screen_color` tinyint(3) unsigned default NULL, + `sun_java` tinyint(1) default NULL, + `adobe_flash` tinyint(1) default NULL, + `adobe_director` tinyint(1) default NULL, + `apple_quicktime` tinyint(1) default NULL, + `real_player` tinyint(1) default NULL, + `windows_media` tinyint(1) default NULL, + `accept_language` varchar(8) default NULL, + PRIMARY KEY (`id_guest`), + KEY `id_customer` (`id_customer`), + KEY `id_operating_system` (`id_operating_system`), + KEY `id_web_browser` (`id_web_browser`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +CREATE TABLE `PREFIX_hook` ( + `id_hook` int(10) unsigned NOT NULL auto_increment, + `name` varchar(64) NOT NULL, + `title` varchar(64) NOT NULL, + `description` text, + `position` tinyint(1) NOT NULL default '1', + `live_edit` tinyint(1) NOT NULL default '0', + `is_native` tinyint(1) NOT NULL default '0', + PRIMARY KEY (`id_hook`), + UNIQUE KEY `hook_name` (`name`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +CREATE TABLE `PREFIX_hook_alias` ( + `id_hook_alias` int(10) unsigned NOT NULL auto_increment, + `alias` varchar(64) NOT NULL, + `name` varchar(64) NOT NULL, + PRIMARY KEY (`id_hook_alias`), + UNIQUE KEY `alias` (`alias`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +CREATE TABLE `PREFIX_hook_module` ( + `id_module` int(10) unsigned NOT NULL, + `id_shop` INT(11) UNSIGNED NOT NULL DEFAULT '1', + `id_hook` int(10) unsigned NOT NULL, + `position` tinyint(2) unsigned NOT NULL, + PRIMARY KEY (`id_module`,`id_hook`,`id_shop`), + KEY `id_hook` (`id_hook`), + KEY `id_module` (`id_module`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +CREATE TABLE `PREFIX_hook_module_exceptions` ( + `id_hook_module_exceptions` int(10) unsigned NOT NULL auto_increment, + `id_shop` INT(11) UNSIGNED NOT NULL DEFAULT '1', + `id_module` int(10) unsigned NOT NULL, + `id_hook` int(10) unsigned NOT NULL, + `file_name` varchar(255) default NULL, + PRIMARY KEY (`id_hook_module_exceptions`), + KEY `id_module` (`id_module`), + KEY `id_hook` (`id_hook`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +CREATE TABLE `PREFIX_image` ( + `id_image` int(10) unsigned NOT NULL auto_increment, + `id_product` int(10) unsigned NOT NULL, + `position` smallint(2) unsigned NOT NULL default '0', + `cover` tinyint(1) unsigned NOT NULL default '0', + PRIMARY KEY (`id_image`), + KEY `image_product` (`id_product`), + KEY `id_product_cover` (`id_product`,`cover`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +CREATE TABLE `PREFIX_image_lang` ( + `id_image` int(10) unsigned NOT NULL, + `id_lang` int(10) unsigned NOT NULL, + `legend` varchar(128) default NULL, + UNIQUE KEY `image_lang_index` (`id_image`,`id_lang`), + KEY `id_image` (`id_image`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +CREATE TABLE `PREFIX_image_type` ( + `id_image_type` int(10) unsigned NOT NULL auto_increment, + `name` varchar(16) NOT NULL, + `width` int(10) unsigned NOT NULL, + `height` int(10) unsigned NOT NULL, + `products` tinyint(1) NOT NULL default '1', + `categories` tinyint(1) NOT NULL default '1', + `manufacturers` tinyint(1) NOT NULL default '1', + `suppliers` tinyint(1) NOT NULL default '1', + `scenes` tinyint(1) NOT NULL default '1', + `stores` tinyint(1) NOT NULL default '1', + PRIMARY KEY (`id_image_type`), + KEY `image_type_name` (`name`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +CREATE TABLE `PREFIX_lang` ( + `id_lang` int(10) unsigned NOT NULL auto_increment, + `name` varchar(32) NOT NULL, + `active` tinyint(3) unsigned NOT NULL default '0', + `iso_code` char(2) NOT NULL, + `language_code` char(5) NOT NULL, + `date_format_lite` char(32) NOT NULL DEFAULT 'Y-m-d', + `date_format_full` char(32) NOT NULL DEFAULT 'Y-m-d H:i:s', + `is_rtl` TINYINT(1) NOT NULL default '0', + PRIMARY KEY (`id_lang`), + KEY `lang_iso_code` (`iso_code`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +CREATE TABLE `PREFIX_manufacturer` ( + `id_manufacturer` int(10) unsigned NOT NULL auto_increment, + `name` varchar(64) NOT NULL, + `date_add` datetime NOT NULL, + `date_upd` datetime NOT NULL, + `active` tinyint(1) NOT NULL default 0, + PRIMARY KEY (`id_manufacturer`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +CREATE TABLE `PREFIX_manufacturer_lang` ( + `id_manufacturer` int(10) unsigned NOT NULL, + `id_lang` int(10) unsigned NOT NULL, + `description` text, + `short_description` varchar(254) default NULL, + `meta_title` varchar(128) default NULL, + `meta_keywords` varchar(255) default NULL, + `meta_description` varchar(255) default NULL, + PRIMARY KEY (`id_manufacturer`,`id_lang`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +CREATE TABLE `PREFIX_message` ( + `id_message` int(10) unsigned NOT NULL auto_increment, + `id_cart` int(10) unsigned default NULL, + `id_customer` int(10) unsigned NOT NULL, + `id_employee` int(10) unsigned default NULL, + `id_order` int(10) unsigned NOT NULL, + `message` text NOT NULL, + `private` tinyint(1) unsigned NOT NULL default '1', + `date_add` datetime NOT NULL, + PRIMARY KEY (`id_message`), + KEY `message_order` (`id_order`), + KEY `id_cart` (`id_cart`), + KEY `id_customer` (`id_customer`), + KEY `id_employee` (`id_employee`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +CREATE TABLE `PREFIX_message_readed` ( + `id_message` int(10) unsigned NOT NULL, + `id_employee` int(10) unsigned NOT NULL, + `date_add` datetime NOT NULL, + PRIMARY KEY (`id_message`,`id_employee`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +CREATE TABLE `PREFIX_meta` ( + `id_meta` int(10) unsigned NOT NULL auto_increment, + `page` varchar(64) NOT NULL, + PRIMARY KEY (`id_meta`), + KEY `meta_name` (`page`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +CREATE TABLE `PREFIX_meta_lang` ( + `id_meta` int(10) unsigned NOT NULL, + `id_shop` INT(11) UNSIGNED NOT NULL DEFAULT '1', + `id_lang` int(10) unsigned NOT NULL, + `title` varchar(128) default NULL, + `description` varchar(255) default NULL, + `keywords` varchar(255) default NULL, + `url_rewrite` varchar(254) NOT NULL, + PRIMARY KEY (`id_meta`, `id_shop`, `id_lang`), + KEY `id_shop` (`id_shop`), + KEY `id_lang` (`id_lang`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +CREATE TABLE `PREFIX_module` ( + `id_module` int(10) unsigned NOT NULL auto_increment, + `name` varchar(64) NOT NULL, + `active` tinyint(1) unsigned NOT NULL default '0', + PRIMARY KEY (`id_module`), + KEY `name` (`name`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +CREATE TABLE `PREFIX_module_access` ( + `id_profile` int(10) unsigned NOT NULL, + `id_module` int(10) unsigned NOT NULL, + `view` tinyint(1) NOT NULL, + `configure` tinyint(1) NOT NULL, + PRIMARY KEY (`id_profile`,`id_module`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +CREATE TABLE `PREFIX_module_country` ( + `id_module` int(10) unsigned NOT NULL, + `id_shop` INT(11) UNSIGNED NOT NULL DEFAULT '1', + `id_country` int(10) unsigned NOT NULL, + PRIMARY KEY (`id_module`,`id_shop`, `id_country`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +CREATE TABLE `PREFIX_module_currency` ( + `id_module` int(10) unsigned NOT NULL, + `id_shop` INT(11) UNSIGNED NOT NULL DEFAULT '1', + `id_currency` int(11) NOT NULL, + PRIMARY KEY (`id_module`,`id_shop`, `id_currency`), + KEY `id_module` (`id_module`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +CREATE TABLE `PREFIX_module_group` ( + `id_module` int(10) unsigned NOT NULL, + `id_shop` INT(11) UNSIGNED NOT NULL DEFAULT '1', + `id_group` int(11) unsigned NOT NULL, + PRIMARY KEY (`id_module`,`id_shop`, `id_group`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +CREATE TABLE `PREFIX_operating_system` ( + `id_operating_system` int(10) unsigned NOT NULL auto_increment, + `name` varchar(64) default NULL, + PRIMARY KEY (`id_operating_system`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +CREATE TABLE `PREFIX_orders` ( + `id_order` int(10) unsigned NOT NULL auto_increment, + `id_group_shop` INT(11) UNSIGNED NOT NULL DEFAULT '1', + `id_shop` INT(11) UNSIGNED NOT NULL DEFAULT '1', + `id_carrier` int(10) unsigned NOT NULL, + `id_lang` int(10) unsigned NOT NULL, + `id_customer` int(10) unsigned NOT NULL, + `id_cart` int(10) unsigned NOT NULL, + `id_currency` int(10) unsigned NOT NULL, + `id_address_delivery` int(10) unsigned NOT NULL, + `id_address_invoice` int(10) unsigned NOT NULL, + `secure_key` varchar(32) NOT NULL default '-1', + `payment` varchar(255) NOT NULL, + `conversion_rate` decimal(13,6) NOT NULL default 1, + `module` varchar(255) default NULL, + `recyclable` tinyint(1) unsigned NOT NULL default '0', + `gift` tinyint(1) unsigned NOT NULL default '0', + `gift_message` text, + `shipping_number` varchar(32) default NULL, + `total_discounts` decimal(17,2) NOT NULL default '0.00', + `total_discounts_tax_incl` decimal(17,2) NOT NULL default '0.00', + `total_discounts_tax_excl` decimal(17,2) NOT NULL default '0.00', + `total_paid` decimal(17,2) NOT NULL default '0.00', + `total_paid_tax_incl` decimal(17,2) NOT NULL default '0.00', + `total_paid_tax_excl` decimal(17,2) NOT NULL default '0.00', + `total_paid_real` decimal(17,2) NOT NULL default '0.00', + `total_products` decimal(17,2) NOT NULL default '0.00', + `total_products_wt` DECIMAL(17, 2) NOT NULL default '0.00', + `total_shipping` decimal(17,2) NOT NULL default '0.00', + `total_shipping_tax_incl` decimal(17,2) NOT NULL default '0.00', + `total_shipping_tax_excl` decimal(17,2) NOT NULL default '0.00', + `carrier_tax_rate` DECIMAL(10, 3) NOT NULL default '0.00', + `total_wrapping` decimal(17,2) NOT NULL default '0.00', + `total_wrapping_tax_incl` decimal(17,2) NOT NULL default '0.00', + `total_wrapping_tax_excl` decimal(17,2) NOT NULL default '0.00', + `invoice_number` int(10) unsigned NOT NULL default '0', + `delivery_number` int(10) unsigned NOT NULL default '0', + `invoice_date` datetime NOT NULL, + `delivery_date` datetime NOT NULL, + `valid` int(1) unsigned NOT NULL default '0', + `date_add` datetime NOT NULL, + `date_upd` datetime NOT NULL, + PRIMARY KEY (`id_order`), + KEY `id_customer` (`id_customer`), + KEY `id_cart` (`id_cart`), + KEY `invoice_number` (`invoice_number`), + KEY `id_carrier` (`id_carrier`), + KEY `id_lang` (`id_lang`), + KEY `id_currency` (`id_currency`), + KEY `id_address_delivery` (`id_address_delivery`), + KEY `id_address_invoice` (`id_address_invoice`), + KEY `id_group_shop` (`id_group_shop`), + KEY `id_shop` (`id_shop`), + INDEX `date_add`(`date_add`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +CREATE TABLE IF NOT EXISTS `PREFIX_order_detail_tax` ( + `id_order_detail` int(11) NOT NULL, + `id_tax` int(11) NOT NULL +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +CREATE TABLE `PREFIX_order_detail` ( + `id_order_detail` int(10) unsigned NOT NULL auto_increment, + `id_order` int(10) unsigned NOT NULL, + `product_id` int(10) unsigned NOT NULL, + `product_attribute_id` int(10) unsigned default NULL, + `product_name` varchar(255) NOT NULL, + `product_quantity` int(10) unsigned NOT NULL default '0', + `product_quantity_in_stock` int(10) NOT NULL default 0, + `product_quantity_refunded` int(10) unsigned NOT NULL default '0', + `product_quantity_return` int(10) unsigned NOT NULL default '0', + `product_quantity_reinjected` int(10) unsigned NOT NULL default 0, + `product_price` decimal(20,6) NOT NULL default '0.000000', + `reduction_percent` DECIMAL(10, 2) NOT NULL default '0.00', + `reduction_amount` DECIMAL(20, 6) NOT NULL default '0.000000', + `group_reduction` DECIMAL(10, 2) NOT NULL default '0.000000', + `product_quantity_discount` decimal(20,6) NOT NULL default '0.000000', + `product_ean13` varchar(13) default NULL, + `product_upc` varchar(12) default NULL, + `product_reference` varchar(32) default NULL, + `product_supplier_reference` varchar(32) default NULL, + `product_weight` float NOT NULL, + `tax_name` varchar(16) NOT NULL, + `tax_rate` DECIMAL(10,3) NOT NULL DEFAULT '0.000', + `tax_computation_method` tinyint(1) unsigned NOT NULL default '0', + `ecotax` decimal(21,6) NOT NULL default '0.00', + `ecotax_tax_rate` DECIMAL(5,3) NOT NULL DEFAULT '0.000', + `discount_quantity_applied` TINYINT(1) NOT NULL DEFAULT 0, + `download_hash` varchar(255) default NULL, + `download_nb` int(10) unsigned default '0', + `download_deadline` datetime default '0000-00-00 00:00:00', + PRIMARY KEY (`id_order_detail`), + KEY `order_detail_order` (`id_order`), + KEY `product_id` (`product_id`), + KEY `product_attribute_id` (`product_attribute_id`), + KEY `id_order_id_order_detail` (`id_order`, `id_order_detail`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +CREATE TABLE `PREFIX_order_cart_rule` ( + `id_order_cart_rule` int(10) unsigned NOT NULL auto_increment, + `id_order` int(10) unsigned NOT NULL, + `id_cart_rule` int(10) unsigned NOT NULL, + `name` varchar(32) NOT NULL, + `value` decimal(17,2) NOT NULL default '0.00', + PRIMARY KEY (`id_order_cart_rule`), + KEY `id_order` (`id_order`), + KEY `id_cart_rule` (`id_cart_rule`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +CREATE TABLE `PREFIX_order_history` ( + `id_order_history` int(10) unsigned NOT NULL auto_increment, + `id_employee` int(10) unsigned NOT NULL, + `id_order` int(10) unsigned NOT NULL, + `id_order_state` int(10) unsigned NOT NULL, + `date_add` datetime NOT NULL, + PRIMARY KEY (`id_order_history`), + KEY `order_history_order` (`id_order`), + KEY `id_employee` (`id_employee`), + KEY `id_order_state` (`id_order_state`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +CREATE TABLE `PREFIX_order_message` ( + `id_order_message` int(10) unsigned NOT NULL auto_increment, + `date_add` datetime NOT NULL, + PRIMARY KEY (`id_order_message`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +CREATE TABLE `PREFIX_order_message_lang` ( + `id_order_message` int(10) unsigned NOT NULL, + `id_lang` int(10) unsigned NOT NULL, + `name` varchar(128) NOT NULL, + `message` text NOT NULL, + PRIMARY KEY (`id_order_message`,`id_lang`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +CREATE TABLE `PREFIX_order_return` ( + `id_order_return` int(10) unsigned NOT NULL auto_increment, + `id_customer` int(10) unsigned NOT NULL, + `id_order` int(10) unsigned NOT NULL, + `state` tinyint(1) unsigned NOT NULL default '1', + `question` text NOT NULL, + `date_add` datetime NOT NULL, + `date_upd` datetime NOT NULL, + PRIMARY KEY (`id_order_return`), + KEY `order_return_customer` (`id_customer`), + KEY `id_order` (`id_order`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +CREATE TABLE `PREFIX_order_return_detail` ( + `id_order_return` int(10) unsigned NOT NULL, + `id_order_detail` int(10) unsigned NOT NULL, + `id_customization` int(10) unsigned NOT NULL default '0', + `product_quantity` int(10) unsigned NOT NULL default '0', + PRIMARY KEY (`id_order_return`,`id_order_detail`,`id_customization`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +CREATE TABLE `PREFIX_order_return_state` ( + `id_order_return_state` int(10) unsigned NOT NULL auto_increment, + `color` varchar(32) default NULL, + PRIMARY KEY (`id_order_return_state`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +CREATE TABLE `PREFIX_order_return_state_lang` ( + `id_order_return_state` int(10) unsigned NOT NULL, + `id_lang` int(10) unsigned NOT NULL, + `name` varchar(64) NOT NULL, + UNIQUE KEY `order_state_lang_index` (`id_order_return_state`,`id_lang`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +CREATE TABLE `PREFIX_order_slip` ( + `id_order_slip` int(10) unsigned NOT NULL auto_increment, + `conversion_rate` decimal(13,6) NOT NULL default 1, + `id_customer` int(10) unsigned NOT NULL, + `id_order` int(10) unsigned NOT NULL, + `shipping_cost` tinyint(3) unsigned NOT NULL default '0', + `date_add` datetime NOT NULL, + `date_upd` datetime NOT NULL, + PRIMARY KEY (`id_order_slip`), + KEY `order_slip_customer` (`id_customer`), + KEY `id_order` (`id_order`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +CREATE TABLE `PREFIX_order_slip_detail` ( + `id_order_slip` int(10) unsigned NOT NULL, + `id_order_detail` int(10) unsigned NOT NULL, + `product_quantity` int(10) unsigned NOT NULL default '0', + PRIMARY KEY (`id_order_slip`,`id_order_detail`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +CREATE TABLE `PREFIX_order_state` ( + `id_order_state` int(10) UNSIGNED NOT NULL auto_increment, + `invoice` tinyint(1) UNSIGNED default '0', + `send_email` tinyint(1) UNSIGNED NOT NULL default '0', + `color` varchar(32) default NULL, + `unremovable` tinyint(1) UNSIGNED NOT NULL, + `hidden` tinyint(1) UNSIGNED NOT NULL default '0', + `logable` tinyint(1) NOT NULL default '0', + `delivery` tinyint(1) UNSIGNED NOT NULL default '0', + `shipped` tinyint(1) UNSIGNED NOT NULL default '0', + PRIMARY KEY (`id_order_state`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +CREATE TABLE `PREFIX_order_state_lang` ( + `id_order_state` int(10) unsigned NOT NULL, + `id_lang` int(10) unsigned NOT NULL, + `name` varchar(64) NOT NULL, + `template` varchar(64) NOT NULL, + UNIQUE KEY `order_state_lang_index` (`id_order_state`,`id_lang`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +CREATE TABLE `PREFIX_pack` ( + `id_product_pack` int(10) unsigned NOT NULL, + `id_product_item` int(10) unsigned NOT NULL, + `quantity` int(10) unsigned NOT NULL DEFAULT 1, + PRIMARY KEY (`id_product_pack`,`id_product_item`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +CREATE TABLE `PREFIX_page` ( + `id_page` int(10) unsigned NOT NULL auto_increment, + `id_page_type` int(10) unsigned NOT NULL, + `id_object` int(10) unsigned default NULL, + PRIMARY KEY (`id_page`), + KEY `id_page_type` (`id_page_type`), + KEY `id_object` (`id_object`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +CREATE TABLE `PREFIX_page_type` ( + `id_page_type` int(10) unsigned NOT NULL auto_increment, + `name` varchar(255) NOT NULL, + PRIMARY KEY (`id_page_type`), + KEY `name` (`name`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +CREATE TABLE `PREFIX_page_viewed` ( + `id_page` int(10) unsigned NOT NULL, + `id_group_shop` INT UNSIGNED NOT NULL DEFAULT '1', + `id_shop` INT UNSIGNED NOT NULL DEFAULT '1', + `id_date_range` int(10) unsigned NOT NULL, + `counter` int(10) unsigned NOT NULL, + PRIMARY KEY (`id_page`, `id_date_range`, `id_shop`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +CREATE TABLE `PREFIX_payment_cc` ( + `id_payment_cc` INT NOT NULL auto_increment, + `id_order` INT UNSIGNED NULL, + `id_currency` INT UNSIGNED NOT NULL, + `amount` DECIMAL(10,2) NOT NULL, + `transaction_id` VARCHAR(254) NULL, + `card_number` VARCHAR(254) NULL, + `card_brand` VARCHAR(254) NULL, + `card_expiration` CHAR(7) NULL, + `card_holder` VARCHAR(254) NULL, + `date_add` DATETIME NOT NULL, + PRIMARY KEY (`id_payment_cc`), + KEY `id_order` (`id_order`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +CREATE TABLE `PREFIX_product` ( + `id_product` int(10) unsigned NOT NULL auto_increment, + `id_supplier` int(10) unsigned default NULL, + `id_manufacturer` int(10) unsigned default NULL, + `id_tax_rules_group` int(10) unsigned NOT NULL, + `id_category_default` int(10) unsigned default NULL, + `on_sale` tinyint(1) unsigned NOT NULL default '0', + `online_only` tinyint(1) unsigned NOT NULL default '0', + `ean13` varchar(13) default NULL, + `upc` varchar(12) default NULL, + `ecotax` decimal(17,6) NOT NULL default '0.00', + `quantity` int(10) NOT NULL default '0', + `minimal_quantity` int(10) unsigned NOT NULL default '1', + `price` decimal(20,6) NOT NULL default '0.000000', + `wholesale_price` decimal(20,6) NOT NULL default '0.000000', + `unity` varchar(255) default NULL, + `unit_price_ratio` decimal(20,6) NOT NULL default '0.000000', + `additional_shipping_cost` decimal(20,2) NOT NULL default '0.00', + `reference` varchar(32) default NULL, + `supplier_reference` varchar(32) default NULL, + `location` varchar(64) default NULL, + `width` float NOT NULL default '0', + `height` float NOT NULL default '0', + `depth` float NOT NULL default '0', + `weight` float NOT NULL default '0', + `out_of_stock` int(10) unsigned NOT NULL default '2', + `quantity_discount` tinyint(1) default '0', + `customizable` tinyint(2) NOT NULL default '0', + `uploadable_files` tinyint(4) NOT NULL default '0', + `text_fields` tinyint(4) NOT NULL default '0', + `active` tinyint(1) unsigned NOT NULL default '0', + `available_for_order` tinyint(1) NOT NULL default '1', + `available_date` date NOT NULL, + `condition` ENUM('new', 'used', 'refurbished') NOT NULL DEFAULT 'new', + `show_price` tinyint(1) NOT NULL default '1', + `indexed` tinyint(1) NOT NULL default '0', + `cache_is_pack` tinyint(1) NOT NULL default '0', + `cache_has_attachments` tinyint(1) NOT NULL default '0', + `is_virtual` tinyint(1) NOT NULL default '0', + `cache_default_attribute` int(10) unsigned default NULL, + `date_add` datetime NOT NULL, + `date_upd` datetime NOT NULL, + PRIMARY KEY (`id_product`), + KEY `product_supplier` (`id_supplier`), + KEY `product_manufacturer` (`id_manufacturer`), + KEY `id_category_default` (`id_category_default`), + KEY `date_add` (`date_add`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +CREATE TABLE `PREFIX_product_attribute` ( + `id_product_attribute` int(10) unsigned NOT NULL auto_increment, + `id_product` int(10) unsigned NOT NULL, + `reference` varchar(32) default NULL, + `supplier_reference` varchar(32) default NULL, + `location` varchar(64) default NULL, + `ean13` varchar(13) default NULL, + `upc` varchar(12) default NULL, + `wholesale_price` decimal(20,6) NOT NULL default '0.000000', + `price` decimal(20,6) NOT NULL default '0.000000', + `ecotax` decimal(17,6) NOT NULL default '0.00', + `quantity` int(10) NOT NULL default '0', + `weight` float NOT NULL default '0', + `unit_price_impact` decimal(17,2) NOT NULL default '0.00', + `default_on` tinyint(1) unsigned NOT NULL default '0', + `minimal_quantity` int(10) unsigned NOT NULL DEFAULT '1', + `available_date` date NOT NULL, + PRIMARY KEY (`id_product_attribute`), + KEY `product_attribute_product` (`id_product`), + KEY `reference` (`reference`), + KEY `supplier_reference` (`supplier_reference`), + KEY `product_default` (`id_product`,`default_on`), + KEY `id_product_id_product_attribute` (`id_product_attribute` , `id_product`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +CREATE TABLE `PREFIX_product_attribute_combination` ( + `id_attribute` int(10) unsigned NOT NULL, + `id_product_attribute` int(10) unsigned NOT NULL, + PRIMARY KEY (`id_attribute`,`id_product_attribute`), + KEY `id_product_attribute` (`id_product_attribute`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +CREATE TABLE `PREFIX_product_attribute_image` ( + `id_product_attribute` int(10) unsigned NOT NULL, + `id_image` int(10) unsigned NOT NULL, + PRIMARY KEY (`id_product_attribute`,`id_image`), + KEY `id_image` (`id_image`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +CREATE TABLE `PREFIX_product_download` ( + `id_product_download` int(10) unsigned NOT NULL AUTO_INCREMENT, + `id_product` int(10) unsigned NOT NULL, + `id_product_attribute` int(10) unsigned NOT NULL, + `display_filename` varchar(255) DEFAULT NULL, + `filename` varchar(255) DEFAULT NULL, + `date_add` datetime NOT NULL, + `date_expiration` datetime DEFAULT NULL, + `nb_days_accessible` int(10) unsigned DEFAULT NULL, + `nb_downloadable` int(10) unsigned DEFAULT '1', + `active` tinyint(1) unsigned NOT NULL DEFAULT '1', + `is_shareable` tinyint(1) unsigned NOT NULL DEFAULT '0', + PRIMARY KEY (`id_product_download`), + KEY `product_active` (`id_product`,`active`), + KEY `id_product_attribute` (`id_product_attribute`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +CREATE TABLE `PREFIX_product_lang` ( + `id_product` int(10) unsigned NOT NULL, + `id_shop` INT( 11 ) UNSIGNED NOT NULL DEFAULT '1', + `id_lang` int(10) unsigned NOT NULL, + `description` text, + `description_short` text, + `link_rewrite` varchar(128) NOT NULL, + `meta_description` varchar(255) default NULL, + `meta_keywords` varchar(255) default NULL, + `meta_title` varchar(128) default NULL, + `name` varchar(128) NOT NULL, + `available_now` varchar(255) default NULL, + `available_later` varchar(255) default NULL, + UNIQUE KEY `product_lang_index` (`id_product`, `id_shop` , `id_lang`), + KEY `id_lang` (`id_lang`), + KEY `name` (`name`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +CREATE TABLE `PREFIX_product_sale` ( + `id_product` int(10) unsigned NOT NULL, + `quantity` int(10) unsigned NOT NULL default '0', + `sale_nbr` int(10) unsigned NOT NULL default '0', + `date_upd` date NOT NULL, + PRIMARY KEY (`id_product`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +CREATE TABLE `PREFIX_product_tag` ( + `id_product` int(10) unsigned NOT NULL, + `id_tag` int(10) unsigned NOT NULL, + PRIMARY KEY (`id_product`,`id_tag`), + KEY `id_tag` (`id_tag`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +CREATE TABLE `PREFIX_profile` ( + `id_profile` int(10) unsigned NOT NULL auto_increment, + PRIMARY KEY (`id_profile`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +CREATE TABLE `PREFIX_profile_lang` ( + `id_lang` int(10) unsigned NOT NULL, + `id_profile` int(10) unsigned NOT NULL, + `name` varchar(128) NOT NULL, + PRIMARY KEY (`id_profile`,`id_lang`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +CREATE TABLE `PREFIX_quick_access` ( + `id_quick_access` int(10) unsigned NOT NULL auto_increment, + `new_window` tinyint(1) NOT NULL default '0', + `link` varchar(128) NOT NULL, + PRIMARY KEY (`id_quick_access`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +CREATE TABLE `PREFIX_quick_access_lang` ( + `id_quick_access` int(10) unsigned NOT NULL, + `id_lang` int(10) unsigned NOT NULL, + `name` varchar(32) NOT NULL, + PRIMARY KEY (`id_quick_access`,`id_lang`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +CREATE TABLE `PREFIX_range_price` ( + `id_range_price` int(10) unsigned NOT NULL auto_increment, + `id_carrier` int(10) unsigned NOT NULL, + `delimiter1` decimal(20,6) NOT NULL, + `delimiter2` decimal(20,6) NOT NULL, + PRIMARY KEY (`id_range_price`), + UNIQUE KEY `id_carrier` (`id_carrier`,`delimiter1`,`delimiter2`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +CREATE TABLE `PREFIX_range_weight` ( + `id_range_weight` int(10) unsigned NOT NULL auto_increment, + `id_carrier` int(10) unsigned NOT NULL, + `delimiter1` decimal(20,6) NOT NULL, + `delimiter2` decimal(20,6) NOT NULL, + PRIMARY KEY (`id_range_weight`), + UNIQUE KEY `id_carrier` (`id_carrier`,`delimiter1`,`delimiter2`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +CREATE TABLE `PREFIX_referrer` ( + `id_referrer` int(10) unsigned NOT NULL auto_increment, + `name` varchar(64) NOT NULL, + `passwd` varchar(32) default NULL, + `http_referer_regexp` varchar(64) default NULL, + `http_referer_like` varchar(64) default NULL, + `request_uri_regexp` varchar(64) default NULL, + `request_uri_like` varchar(64) default NULL, + `http_referer_regexp_not` varchar(64) default NULL, + `http_referer_like_not` varchar(64) default NULL, + `request_uri_regexp_not` varchar(64) default NULL, + `request_uri_like_not` varchar(64) default NULL, + `base_fee` decimal(5,2) NOT NULL default '0.00', + `percent_fee` decimal(5,2) NOT NULL default '0.00', + `click_fee` decimal(5,2) NOT NULL default '0.00', + `date_add` datetime NOT NULL, + PRIMARY KEY (`id_referrer`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +CREATE TABLE `PREFIX_referrer_cache` ( + `id_connections_source` int(11) unsigned NOT NULL, + `id_referrer` int(11) unsigned NOT NULL, + PRIMARY KEY (`id_connections_source`, `id_referrer`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +CREATE TABLE `PREFIX_referrer_shop` ( + `id_referrer` int(10) unsigned NOT NULL auto_increment, + `id_shop` int(10) unsigned NOT NULL default '1', + `cache_visitors` int(11) default NULL, + `cache_visits` int(11) default NULL, + `cache_pages` int(11) default NULL, + `cache_registrations` int(11) default NULL, + `cache_orders` int(11) default NULL, + `cache_sales` decimal(17,2) default NULL, + `cache_reg_rate` decimal(5,4) default NULL, + `cache_order_rate` decimal(5,4) default NULL, + PRIMARY KEY (`id_referrer`, `id_shop`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +CREATE TABLE IF NOT EXISTS `PREFIX_request_sql` ( + `id_request_sql` int(11) NOT NULL AUTO_INCREMENT, + `name` varchar(200) NOT NULL, + `sql` text NOT NULL, + PRIMARY KEY (`id_request_sql`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +CREATE TABLE `PREFIX_scene` ( + `id_scene` int(10) unsigned NOT NULL auto_increment, + `active` tinyint(1) NOT NULL default '1', + PRIMARY KEY (`id_scene`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +CREATE TABLE `PREFIX_scene_category` ( + `id_scene` int(10) unsigned NOT NULL, + `id_category` int(10) unsigned NOT NULL, + PRIMARY KEY (`id_scene`,`id_category`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +CREATE TABLE `PREFIX_scene_lang` ( + `id_scene` int(10) unsigned NOT NULL, + `id_lang` int(10) unsigned NOT NULL, + `name` varchar(100) NOT NULL, + PRIMARY KEY (`id_scene`,`id_lang`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +CREATE TABLE `PREFIX_scene_products` ( + `id_scene` int(10) unsigned NOT NULL, + `id_product` int(10) unsigned NOT NULL, + `x_axis` int(4) NOT NULL, + `y_axis` int(4) NOT NULL, + `zone_width` int(3) NOT NULL, + `zone_height` int(3) NOT NULL, + PRIMARY KEY (`id_scene`, `id_product`, `x_axis`, `y_axis`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +CREATE TABLE `PREFIX_search_engine` ( + `id_search_engine` int(10) unsigned NOT NULL auto_increment, + `server` varchar(64) NOT NULL, + `getvar` varchar(16) NOT NULL, + PRIMARY KEY (`id_search_engine`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +CREATE TABLE `PREFIX_search_index` ( + `id_product` int(11) unsigned NOT NULL, + `id_word` int(11) unsigned NOT NULL, + `weight` smallint(4) unsigned NOT NULL default 1, + PRIMARY KEY (`id_word`, `id_product`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +CREATE TABLE `PREFIX_search_word` ( + `id_word` int(10) unsigned NOT NULL auto_increment, + `id_shop` int(11) unsigned NOT NULL default 1, + `id_lang` int(10) unsigned NOT NULL, + `word` varchar(15) NOT NULL, + PRIMARY KEY (`id_word`), + UNIQUE KEY `id_lang` (`id_lang`,`id_shop`, `word`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +CREATE TABLE `PREFIX_specific_price` ( + `id_specific_price` INT UNSIGNED NOT NULL AUTO_INCREMENT, + `id_product` INT UNSIGNED NOT NULL, + `id_shop` INT(11) UNSIGNED NOT NULL DEFAULT '1', + `id_currency` INT UNSIGNED NOT NULL, + `id_country` INT UNSIGNED NOT NULL, + `id_group` INT UNSIGNED NOT NULL, + `id_product_attribute` INT UNSIGNED NOT NULL, + `price` DECIMAL(20, 6) NOT NULL, + `from_quantity` SMALLINT UNSIGNED NOT NULL, + `reduction` DECIMAL(20, 6) NOT NULL, + `reduction_type` ENUM('amount', 'percentage') NOT NULL, + `from` DATETIME NOT NULL, + `to` DATETIME NOT NULL, + PRIMARY KEY(`id_specific_price`), + KEY (`id_product`, `id_shop`, `id_currency`, `id_country`, `id_group`, `from_quantity`, `from`, `to`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +CREATE TABLE `PREFIX_state` ( + `id_state` int(10) unsigned NOT NULL auto_increment, + `id_country` int(11) unsigned NOT NULL, + `id_zone` int(11) unsigned NOT NULL, + `name` varchar(64) NOT NULL, + `iso_code` char(4) NOT NULL, + `tax_behavior` smallint(1) NOT NULL default '0', + `active` tinyint(1) NOT NULL default '0', + PRIMARY KEY (`id_state`), + KEY `id_country` (`id_country`), + KEY `id_zone` (`id_zone`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +CREATE TABLE `PREFIX_subdomain` ( + `id_subdomain` int(10) unsigned NOT NULL auto_increment, + `name` varchar(16) NOT NULL, + PRIMARY KEY (`id_subdomain`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +CREATE TABLE `PREFIX_supplier` ( + `id_supplier` int(10) unsigned NOT NULL auto_increment, + `name` varchar(64) NOT NULL, + `date_add` datetime NOT NULL, + `date_upd` datetime NOT NULL, + `active` tinyint(1) NOT NULL default 0, + PRIMARY KEY (`id_supplier`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +CREATE TABLE `PREFIX_supplier_lang` ( + `id_supplier` int(10) unsigned NOT NULL, + `id_lang` int(10) unsigned NOT NULL, + `description` text, + `meta_title` varchar(128) default NULL, + `meta_keywords` varchar(255) default NULL, + `meta_description` varchar(255) default NULL, + PRIMARY KEY (`id_supplier`,`id_lang`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +CREATE TABLE `PREFIX_tab` ( + `id_tab` int(10) unsigned NOT NULL auto_increment, + `id_parent` int(11) NOT NULL, + `class_name` varchar(64) NOT NULL, + `module` varchar(64) NULL, + `position` int(10) unsigned NOT NULL, + PRIMARY KEY (`id_tab`), + KEY `class_name` (`class_name`), + KEY `id_parent` (`id_parent`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +CREATE TABLE `PREFIX_tab_lang` ( + `id_tab` int(10) unsigned NOT NULL, + `id_lang` int(10) unsigned NOT NULL, + `name` varchar(32) default NULL, + PRIMARY KEY (`id_tab`,`id_lang`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +CREATE TABLE `PREFIX_tag` ( + `id_tag` int(10) unsigned NOT NULL auto_increment, + `id_lang` int(10) unsigned NOT NULL, + `name` varchar(32) NOT NULL, + PRIMARY KEY (`id_tag`), + KEY `tag_name` (`name`), + KEY `id_lang` (`id_lang`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +CREATE TABLE `PREFIX_tax` ( + `id_tax` int(10) unsigned NOT NULL auto_increment, + `rate` DECIMAL(10, 3) NOT NULL, + `active` tinyint(1) unsigned NOT NULL default '1', + `deleted` tinyint(1) unsigned NOT NULL default '0', + PRIMARY KEY (`id_tax`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +CREATE TABLE `PREFIX_tax_lang` ( + `id_tax` int(10) unsigned NOT NULL, + `id_lang` int(10) unsigned NOT NULL, + `name` varchar(32) NOT NULL, + UNIQUE KEY `tax_lang_index` (`id_tax`,`id_lang`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +CREATE TABLE `PREFIX_timezone` ( + id_timezone int(10) unsigned NOT NULL auto_increment, + name VARCHAR(32) NOT NULL, + PRIMARY KEY timezone_index(`id_timezone`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +CREATE TABLE `PREFIX_web_browser` ( + `id_web_browser` int(10) unsigned NOT NULL auto_increment, + `name` varchar(64) default NULL, + PRIMARY KEY (`id_web_browser`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +CREATE TABLE `PREFIX_zone` ( + `id_zone` int(10) unsigned NOT NULL auto_increment, + `name` varchar(64) NOT NULL, + `active` tinyint(1) unsigned NOT NULL default '0', + PRIMARY KEY (`id_zone`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +CREATE TABLE `PREFIX_carrier_group` ( + `id_carrier` int(10) unsigned NOT NULL, + `id_group` int(10) unsigned NOT NULL, + UNIQUE KEY `id_carrier` (`id_carrier`,`id_group`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +CREATE TABLE `PREFIX_store` ( + `id_store` int(10) unsigned NOT NULL AUTO_INCREMENT, + `id_country` int(10) unsigned NOT NULL, + `id_state` int(10) unsigned DEFAULT NULL, + `name` varchar(128) NOT NULL, + `address1` varchar(128) NOT NULL, + `address2` varchar(128) DEFAULT NULL, + `city` varchar(64) NOT NULL, + `postcode` varchar(12) NOT NULL, + `latitude` decimal(10,8) DEFAULT NULL, + `longitude` decimal(10,8) DEFAULT NULL, + `hours` varchar(254) DEFAULT NULL, + `phone` varchar(16) DEFAULT NULL, + `fax` varchar(16) DEFAULT NULL, + `email` varchar(128) DEFAULT NULL, + `note` text, + `active` tinyint(1) unsigned NOT NULL DEFAULT '0', + `date_add` datetime NOT NULL, + `date_upd` datetime NOT NULL, + PRIMARY KEY (`id_store`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +CREATE TABLE `PREFIX_webservice_account` ( + `id_webservice_account` int(11) NOT NULL AUTO_INCREMENT, + `key` varchar(32) NOT NULL, + `description` text NULL, + `class_name` VARCHAR( 50 ) NOT NULL DEFAULT 'WebserviceRequest', + `is_module` TINYINT( 2 ) NOT NULL DEFAULT '0', + `module_name` VARCHAR( 50 ) NULL DEFAULT NULL, + `active` tinyint(2) NOT NULL, + PRIMARY KEY (`id_webservice_account`), + KEY `key` (`key`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +CREATE TABLE `PREFIX_webservice_permission` ( + `id_webservice_permission` int(11) NOT NULL AUTO_INCREMENT, + `resource` varchar(50) NOT NULL, + `method` enum('GET','POST','PUT','DELETE','HEAD') NOT NULL, + `id_webservice_account` int(11) NOT NULL, + PRIMARY KEY (`id_webservice_permission`), + UNIQUE KEY `resource_2` (`resource`,`method`,`id_webservice_account`), + KEY `resource` (`resource`), + KEY `method` (`method`), + KEY `id_webservice_account` (`id_webservice_account`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +CREATE TABLE `PREFIX_required_field` ( + `id_required_field` int(11) NOT NULL AUTO_INCREMENT, + `object_name` varchar(32) NOT NULL, + `field_name` varchar(32) NOT NULL, + PRIMARY KEY (`id_required_field`), + KEY `object_name` (`object_name`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +CREATE TABLE `PREFIX_memcached_servers` ( +`id_memcached_server` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY , +`ip` VARCHAR( 254 ) NOT NULL , +`port` INT(11) UNSIGNED NOT NULL , +`weight` INT(11) UNSIGNED NOT NULL +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +CREATE TABLE `PREFIX_product_country_tax` ( + `id_product` int(11) NOT NULL, + `id_country` int(11) NOT NULL, + `id_tax` int(11) NOT NULL, + UNIQUE KEY `id_product` (`id_product`,`id_country`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + + +CREATE TABLE `PREFIX_tax_rule` ( + `id_tax_rule` int(11) NOT NULL AUTO_INCREMENT, + `id_tax_rules_group` int(11) NOT NULL, + `id_country` int(11) NOT NULL, + `id_state` int(11) NOT NULL, + `zipcode_from` INT NOT NULL, + `zipcode_to` INT NOT NULL, + `id_tax` int(11) NOT NULL, + `behavior` int(11) NOT NULL, + `description` VARCHAR( 100 ) NOT NULL, + PRIMARY KEY (`id_tax_rule`), + KEY `id_tax_rules_group` (`id_tax_rules_group`), + KEY `id_tax` (`id_tax`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +CREATE TABLE `PREFIX_tax_rules_group` ( +`id_tax_rules_group` INT NOT NULL AUTO_INCREMENT PRIMARY KEY , +`name` VARCHAR( 50 ) NOT NULL , +`active` INT NOT NULL +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +CREATE TABLE `PREFIX_help_access` ( + `id_help_access` int(11) NOT NULL AUTO_INCREMENT, + `label` varchar(45) NOT NULL, + `version` varchar(8) NOT NULL, + PRIMARY KEY (`id_help_access`), + UNIQUE KEY `label` (`label`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +CREATE TABLE `PREFIX_specific_price_priority` ( + `id_specific_price_priority` INT NOT NULL AUTO_INCREMENT , + `id_product` INT NOT NULL , + `priority` VARCHAR( 80 ) NOT NULL , + PRIMARY KEY ( `id_specific_price_priority` , `id_product` ) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +CREATE TABLE `PREFIX_log` ( + `id_log` int(10) unsigned NOT NULL AUTO_INCREMENT, + `severity` tinyint(1) NOT NULL, + `error_code` int(11) DEFAULT NULL, + `message` text NOT NULL, + `object_type` varchar(32) DEFAULT NULL, + `object_id` int(10) unsigned DEFAULT NULL, + `date_add` datetime NOT NULL, + `date_upd` datetime NOT NULL, + PRIMARY KEY (`id_log`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +CREATE TABLE `PREFIX_import_match` ( + `id_import_match` int(10) NOT NULL AUTO_INCREMENT, + `name` varchar(32) NOT NULL, + `match` text NOT NULL, + `skip` int(2) NOT NULL, + PRIMARY KEY (`id_import_match`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +CREATE TABLE `PREFIX_address_format` ( + `id_country` int(10) unsigned NOT NULL, + `format` varchar(255) NOT NULL DEFAULT '', + KEY `country` (`id_country`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +CREATE TABLE IF NOT EXISTS `PREFIX_group_shop` ( + `id_group_shop` int(11) unsigned NOT NULL AUTO_INCREMENT, + `name` varchar(64) CHARACTER SET utf8 NOT NULL, + `share_customer` TINYINT(1) NOT NULL, + `share_order` TINYINT(1) NOT NULL, + `share_stock` TINYINT(1) NOT NULL, + `active` tinyint(1) NOT NULL DEFAULT '1', + `deleted` tinyint(1) NOT NULL DEFAULT '0', + PRIMARY KEY (`id_group_shop`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +CREATE TABLE IF NOT EXISTS `PREFIX_shop` ( + `id_shop` int(11) unsigned NOT NULL AUTO_INCREMENT, + `id_group_shop` int(11) unsigned NOT NULL, + `name` varchar(64) CHARACTER SET utf8 NOT NULL, + `id_category` INT(11) UNSIGNED NOT NULL DEFAULT '1', + `id_theme` INT(1) UNSIGNED NOT NULL, + `active` tinyint(1) NOT NULL DEFAULT '1', + `deleted` tinyint(1) NOT NULL DEFAULT '0', + PRIMARY KEY (`id_shop`), + KEY `id_group_shop` (`id_group_shop`), + KEY `id_category` (`id_category`), + KEY `id_theme` (`id_theme`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + + CREATE TABLE IF NOT EXISTS `PREFIX_shop_url` ( + `id_shop_url` int(11) unsigned NOT NULL AUTO_INCREMENT, + `id_shop` int(11) unsigned NOT NULL, + `domain` varchar(255) NOT NULL, + `domain_ssl` varchar(255) NOT NULL, + `physical_uri` varchar(64) NOT NULL, + `virtual_uri` varchar(64) NOT NULL, + `main` TINYINT(1) NOT NULL, + `active` TINYINT(1) NOT NULL, + PRIMARY KEY (`id_shop_url`), + KEY `id_shop` (`id_shop`), + UNIQUE KEY `shop_url` (`domain`, `virtual_uri`) + ) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +CREATE TABLE IF NOT EXISTS `PREFIX_theme` ( + `id_theme` int(11) NOT NULL AUTO_INCREMENT, + `name` varchar(64) NOT NULL, + PRIMARY KEY (`id_theme`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +CREATE TABLE IF NOT EXISTS `PREFIX_theme_specific` ( + `id_theme` int(11) unsigned NOT NULL, + `id_shop` INT(11) UNSIGNED NOT NULL, + `entity` int(11) unsigned NOT NULL, + `id_object` int(11) unsigned NOT NULL, + PRIMARY KEY (`id_theme`,`id_shop`, `entity`,`id_object`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +CREATE TABLE `PREFIX_country_shop` ( +`id_country` INT( 11 ) UNSIGNED NOT NULL, +`id_shop` INT( 11 ) UNSIGNED NOT NULL , + PRIMARY KEY (`id_country`, `id_shop`), + KEY `id_shop` (`id_shop`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +CREATE TABLE `PREFIX_carrier_shop` ( +`id_carrier` INT( 11 ) UNSIGNED NOT NULL , +`id_shop` INT( 11 ) UNSIGNED NOT NULL , +PRIMARY KEY (`id_carrier`, `id_shop`), + KEY `id_shop` (`id_shop`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +CREATE TABLE `PREFIX_cms_shop` ( +`id_cms` INT( 11 ) UNSIGNED NOT NULL, +`id_shop` INT( 11 ) UNSIGNED NOT NULL , + PRIMARY KEY (`id_cms`, `id_shop`), + KEY `id_shop` (`id_shop`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +CREATE TABLE `PREFIX_lang_shop` ( +`id_lang` INT( 11 ) UNSIGNED NOT NULL, +`id_shop` INT( 11 ) UNSIGNED NOT NULL, + PRIMARY KEY (`id_lang`, `id_shop`), + KEY `id_shop` (`id_shop`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +CREATE TABLE `PREFIX_currency_shop` ( +`id_currency` INT( 11 ) UNSIGNED NOT NULL, +`id_shop` INT( 11 ) UNSIGNED NOT NULL, + PRIMARY KEY (`id_currency`, `id_shop`), + KEY `id_shop` (`id_shop`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +CREATE TABLE `PREFIX_contact_shop` ( + `id_contact` INT(11) UNSIGNED NOT NULL, + `id_shop` INT(11) UNSIGNED NOT NULL, + PRIMARY KEY (`id_contact`, `id_shop`), + KEY `id_shop` (`id_shop`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +CREATE TABLE `PREFIX_image_shop` ( +`id_image` INT( 11 ) UNSIGNED NOT NULL, +`id_shop` INT( 11 ) UNSIGNED NOT NULL, + PRIMARY KEY (`id_image`, `id_shop`), + KEY `id_shop` (`id_shop`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +CREATE TABLE `PREFIX_attribute_group_shop` ( +`id_attribute` INT(11) UNSIGNED NOT NULL, +`id_group_shop` INT(11) UNSIGNED NOT NULL, + PRIMARY KEY (`id_attribute`, `id_group_shop`), + KEY `id_group_shop` (`id_group_shop`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +CREATE TABLE `PREFIX_feature_group_shop` ( +`id_feature` INT(11) UNSIGNED NOT NULL, +`id_group_shop` INT(11) UNSIGNED NOT NULL , + PRIMARY KEY (`id_feature`, `id_group_shop`), + KEY `id_group_shop` (`id_group_shop`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +CREATE TABLE `PREFIX_group_group_shop` ( +`id_group` INT( 11 ) UNSIGNED NOT NULL, +`id_group_shop` INT( 11 ) UNSIGNED NOT NULL, + PRIMARY KEY (`id_group`, `id_group_shop`), + KEY `id_group_shop` (`id_group_shop`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +CREATE TABLE `PREFIX_attribute_group_group_shop` ( +`id_attribute_group` INT( 11 ) UNSIGNED NOT NULL , +`id_group_shop` INT( 11 ) UNSIGNED NOT NULL , + PRIMARY KEY (`id_attribute_group`, `id_group_shop`), + KEY `id_group_shop` (`id_group_shop`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +CREATE TABLE `PREFIX_tax_rules_group_group_shop` ( + `id_tax_rules_group` INT( 11 ) UNSIGNED NOT NULL, + `id_group_shop` INT( 11 ) UNSIGNED NOT NULL, + PRIMARY KEY (`id_tax_rules_group`, `id_group_shop`), + KEY `id_group_shop` (`id_group_shop`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +CREATE TABLE `PREFIX_zone_group_shop` ( +`id_zone` INT( 11 ) UNSIGNED NOT NULL , +`id_group_shop` INT( 11 ) UNSIGNED NOT NULL , + PRIMARY KEY (`id_zone`, `id_group_shop`), + KEY `id_group_shop` (`id_group_shop`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +CREATE TABLE `PREFIX_manufacturer_group_shop` ( +`id_manufacturer` INT( 11 ) UNSIGNED NOT NULL , +`id_group_shop` INT( 11 ) UNSIGNED NOT NULL , + PRIMARY KEY (`id_manufacturer`, `id_group_shop`), + KEY `id_group_shop` (`id_group_shop`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +CREATE TABLE `PREFIX_supplier_group_shop` ( +`id_supplier` INT( 11 ) UNSIGNED NOT NULL, +`id_group_shop` INT( 11 ) UNSIGNED NOT NULL, +PRIMARY KEY (`id_supplier`, `id_group_shop`), + KEY `id_group_shop` (`id_group_shop`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +CREATE TABLE `PREFIX_store_shop` ( +`id_store` INT( 11 ) UNSIGNED NOT NULL , +`id_shop` INT( 11 ) UNSIGNED NOT NULL, +PRIMARY KEY (`id_store`, `id_shop`), + KEY `id_shop` (`id_shop`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +CREATE TABLE `PREFIX_product_shop` ( +`id_product` INT( 11 ) UNSIGNED NOT NULL, +`id_shop` INT( 11 ) UNSIGNED NOT NULL, +PRIMARY KEY ( `id_shop` , `id_product` ), + KEY `id_shop` (`id_shop`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +CREATE TABLE `PREFIX_module_shop` ( +`id_module` INT( 11 ) UNSIGNED NOT NULL, +`id_shop` INT( 11 ) UNSIGNED NOT NULL, +PRIMARY KEY (`id_module` , `id_shop`), + KEY `id_shop` (`id_shop`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +CREATE TABLE `PREFIX_webservice_account_shop` ( +`id_webservice_account` INT( 11 ) UNSIGNED NOT NULL, +`id_shop` INT( 11 ) UNSIGNED NOT NULL, +PRIMARY KEY (`id_webservice_account` , `id_shop`), + KEY `id_shop` (`id_shop`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +CREATE TABLE `PREFIX_scene_shop` ( +`id_scene` INT( 11 ) UNSIGNED NOT NULL , +`id_shop` INT( 11 ) UNSIGNED NOT NULL, +PRIMARY KEY (`id_scene`, `id_shop`), + KEY `id_shop` (`id_shop`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +CREATE TABLE `PREFIX_group_module_restriction` ( + `id_group` INT(11) UNSIGNED NOT NULL , + `id_module` INT(11) UNSIGNED NOT NULL , + `authorized` tinyint(1) NOT NULL DEFAULT '0', +PRIMARY KEY (`id_group`,`id_module`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +CREATE TABLE `PREFIX_stock_mvt` ( + `id_stock_mvt` BIGINT UNSIGNED NOT NULL AUTO_INCREMENT, + `id_stock` INT(11) UNSIGNED NOT NULL, + `id_order` INT(11) UNSIGNED DEFAULT NULL, + `id_supplier_order` INT(11) UNSIGNED DEFAULT NULL, + `id_stock_mvt_reason` INT(11) UNSIGNED NOT NULL, + `id_employee` INT(11) UNSIGNED NOT NULL, + `physical_quantity` INT(11) UNSIGNED NOT NULL, + `date_add` DATETIME NOT NULL, + `sign` tinyint(1) NOT NULL DEFAULT 1, + `price_te` DECIMAL(20,6) DEFAULT '0.000000', + `last_wa` DECIMAL(20,6) DEFAULT '0.000000', + `current_wa` DECIMAL(20,6) DEFAULT '0.000000', + `referer` bigint UNSIGNED DEFAULT NULL, + PRIMARY KEY (`id_stock_mvt`), + KEY `id_stock` (`id_stock`), + KEY `id_stock_mvt_reason` (`id_stock_mvt_reason`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +CREATE TABLE `PREFIX_stock_mvt_reason` ( + `id_stock_mvt_reason` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT, + `sign` tinyint(1) NOT NULL DEFAULT 1, + `date_add` datetime NOT NULL, + `date_upd` datetime NOT NULL, + PRIMARY KEY (`id_stock_mvt_reason`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +CREATE TABLE `PREFIX_stock_mvt_reason_lang` ( + `id_stock_mvt_reason` INT(11) UNSIGNED NOT NULL, + `id_lang` INT(11) UNSIGNED NOT NULL, + `name` VARCHAR(255) CHARACTER SET utf8 NOT NULL, + PRIMARY KEY (`id_stock_mvt_reason`,`id_lang`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +CREATE TABLE `PREFIX_stock` ( +`id_stock` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT, +`id_warehouse` INT(11) UNSIGNED NOT NULL, +`id_product` INT(11) UNSIGNED NOT NULL, +`id_product_attribute` INT(11) UNSIGNED NOT NULL, +`physical_quantity` INT(11) UNSIGNED NOT NULL, +`usable_quantity` INT(11) UNSIGNED NOT NULL, +`price_te` DECIMAL(20,6) DEFAULT '0.000000', + PRIMARY KEY (`id_stock`), + KEY `id_warehouse` (`id_warehouse`), + KEY `id_product` (`id_product`), + KEY `id_product_attribute` (`id_product_attribute`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +CREATE TABLE `PREFIX_warehouse` ( +`id_warehouse` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT, +`id_currency` INT(11) UNSIGNED NOT NULL, +`id_address` INT(11) UNSIGNED NOT NULL, +`id_employee` INT(11) UNSIGNED NOT NULL, +`reference` VARCHAR(32) DEFAULT NULL, +`name` VARCHAR(45) NOT NULL, +`management_type` ENUM('WA', 'FIFO', 'LIFO') NOT NULL DEFAULT 'WA', + PRIMARY KEY (`id_warehouse`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +CREATE TABLE `PREFIX_warehouse_product_location` ( +`id_product` INT(11) UNSIGNED NOT NULL, +`id_product_attribute` INT(11) UNSIGNED NOT NULL, +`id_warehouse` INT(11) UNSIGNED NOT NULL, +`location` VARCHAR(64) DEFAULT NULL, + PRIMARY KEY (`id_product`, `id_product_attribute`, `id_warehouse`), + KEY `id_warehouse` (`id_warehouse`), + KEY `id_product` (`id_product`), + KEY `id_product_attribute` (`id_product_attribute`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +CREATE TABLE `PREFIX_warehouse_shop` ( +`id_shop` INT(11) UNSIGNED NOT NULL, +`id_warehouse` INT(11) UNSIGNED NOT NULL, + PRIMARY KEY (`id_warehouse`, `id_shop`), + KEY `id_warehouse` (`id_warehouse`), + KEY `id_shop` (`id_shop`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +CREATE TABLE `PREFIX_warehouse_carrier` ( +`id_carrier` INT(11) UNSIGNED NOT NULL, +`id_warehouse` INT(11) UNSIGNED NOT NULL, + PRIMARY KEY (`id_warehouse`, `id_carrier`), + KEY `id_warehouse` (`id_warehouse`), + KEY `id_carrier` (`id_carrier`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +CREATE TABLE `PREFIX_stock_available` ( +`id_stock_available` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT, +`id_product` INT(11) UNSIGNED NOT NULL, +`id_product_attribute` INT(11) UNSIGNED NOT NULL, +`id_shop` INT(11) UNSIGNED NOT NULL, +`quantity` INT(10) NOT NULL DEFAULT '0', +`depends_on_stock` TINYINT(1) UNSIGNED NOT NULL DEFAULT '0', +`out_of_stock` TINYINT(1) UNSIGNED NOT NULL DEFAULT '0', + PRIMARY KEY (`id_stock_available`), + KEY `id_shop` (`id_shop`), + KEY `id_product` (`id_product`), + KEY `id_product_attribute` (`id_product_attribute`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +CREATE TABLE `PREFIX_supplier_order` ( +`id_supplier_order` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT, +`id_supplier` INT(11) UNSIGNED NOT NULL, +`id_employee` INT(11) UNSIGNED NOT NULL, +`id_warehouse` INT(11) UNSIGNED NOT NULL, +`id_supplier_order_state` INT(11) UNSIGNED NOT NULL, +`id_currency` INT(11) UNSIGNED NOT NULL, +`id_ref_currency` INT(11) UNSIGNED NOT NULL, +`reference` VARCHAR(32) DEFAULT NULL, +`date_add` DATETIME NOT NULL, +`date_upd` DATETIME NOT NULL, +`date_delivery_expected` DATETIME DEFAULT NULL, +`total_te` DECIMAL(20,6) DEFAULT '0.000000', +`total_with_discount_te` DECIMAL(20,6) DEFAULT '0.000000', +`total_tax` DECIMAL(20,6) DEFAULT '0.000000', +`total_ti` DECIMAL(20,6) DEFAULT '0.000000', +`discount_rate` DECIMAL(20,6) DEFAULT '0.000000', +`discount_value_te` DECIMAL(20,6) DEFAULT '0.000000', + PRIMARY KEY (`id_supplier_order`), + KEY `id_supplier` (`id_supplier`), + KEY `id_warehouse` (`id_warehouse`), + KEY `reference` (`reference`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +CREATE TABLE `PREFIX_supplier_order_detail` ( +`id_supplier_order_detail` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT, +`id_supplier_order` INT(11) UNSIGNED NOT NULL, +`id_product` INT(11) UNSIGNED NOT NULL, +`id_product_attribute` INT(11) UNSIGNED NOT NULL, +`id_currency` INT(11) UNSIGNED NOT NULL, +`exchange_rate` DECIMAL(20,6) DEFAULT '0.000000', +`unit_price_te` DECIMAL(20,6) DEFAULT '0.000000', +`quantity_expected` INT(11) UNSIGNED NOT NULL, +`quantity_received` INT(11) UNSIGNED NOT NULL, +`price_te` DECIMAL(20,6) DEFAULT '0.000000', +`discount_rate` DECIMAL(20,6) DEFAULT '0.000000', +`discount_value_te` DECIMAL(20,6) DEFAULT '0.000000', +`price_with_discount_te` DECIMAL(20,6) DEFAULT '0.000000', +`tax_rate` DECIMAL(20,6) DEFAULT '0.000000', +`tax_value` DECIMAL(20,6) DEFAULT '0.000000', +`price_ti` DECIMAL(20,6) DEFAULT '0.000000', +`tax_value_with_order_discount` DECIMAL(20,6) DEFAULT '0.000000', +`price_with_order_discount_te` DECIMAL(20,6) DEFAULT '0.000000', + PRIMARY KEY (`id_supplier_order_detail`), + KEY `id_supplier_order` (`id_supplier_order`), + KEY `id_product` (`id_product`), + KEY `id_product_attribute` (`id_product_attribute`), + KEY `id_product_product_attribute` (`id_product`, `id_product_attribute`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +CREATE TABLE `PREFIX_supplier_order_history` ( +`id_supplier_order_history` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT, +`id_supplier_order` INT(11) UNSIGNED NOT NULL, +`id_employee` INT(11) UNSIGNED NOT NULL, +`id_state` INT(11) UNSIGNED NOT NULL, +`date_add` DATETIME NOT NULL, + PRIMARY KEY (`id_supplier_order_history`), + KEY `id_supplier_order` (`id_supplier_order`), + KEY `id_employee` (`id_employee`), + KEY `id_state` (`id_state`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +CREATE TABLE `PREFIX_supplier_order_state` ( +`id_supplier_order_state` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT, +`delivery_note` tinyint(1) NOT NULL DEFAULT 0, +`editable` tinyint(1) NOT NULL DEFAULT 0, +`receipt_state` tinyint(1) NOT NULL DEFAULT 0, +`pending_receipt` tinyint(1) NOT NULL DEFAULT 0, +`enclosed` tinyint(1) NOT NULL DEFAULT 0, +`color` VARCHAR(32) DEFAULT NULL, + PRIMARY KEY (`id_supplier_order_state`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +CREATE TABLE `PREFIX_supplier_order_state_lang` ( +`id_supplier_order_state` INT(11) UNSIGNED NOT NULL, +`id_lang` INT(11) UNSIGNED NOT NULL, +`name` VARCHAR(128) DEFAULT NULL, + PRIMARY KEY (`id_supplier_order_state`, `id_lang`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +CREATE TABLE `PREFIX_supplier_order_receipt_history` ( +`id_supplier_order_receipt_history` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT, +`id_supplier_order_detail` INT(11) UNSIGNED NOT NULL, +`id_employee` INT(11) UNSIGNED NOT NULL, +`id_supplier_order_state` INT(11) UNSIGNED NOT NULL, +`quantity` INT(11) UNSIGNED NOT NULL, +`date_add` DATETIME NOT NULL, + PRIMARY KEY (`id_supplier_order_receipt_history`), + KEY `id_supplier_order_detail` (`id_supplier_order_detail`), + KEY `id_supplier_order_state` (`id_supplier_order_state`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +CREATE TABLE `PREFIX_supplier_rates` ( +`id_product` INT(11) UNSIGNED NOT NULL, +`id_product_attribute` INT(11) UNSIGNED NOT NULL, +`id_supplier` INT(11) UNSIGNED NOT NULL, +`id_currency` INT(11) UNSIGNED NOT NULL, +`quantity_min` INT(11) UNSIGNED NOT NULL, +`quantity_max` INT(11) UNSIGNED NOT NULL, +`price_te` DECIMAL(20,6) DEFAULT '0.000000', + PRIMARY KEY (`id_product`, `id_product_attribute`, `id_supplier`, `quantity_min`, `quantity_max`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +CREATE TABLE `PREFIX_accounting_zone_shop` ( + `id_accounting_zone_shop` int(11) NOT NULL AUTO_INCREMENT, + `id_zone` int(11) NOT NULL, + `id_shop` int(11) NOT NULL, + `account_number` varchar(64) NOT NULL, + PRIMARY KEY (`id_accounting_zone_shop`), + UNIQUE KEY `id_zone` (`id_zone`,`id_shop`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; diff --git a/install-new/data/img/genders/Miss.jpg b/install-new/data/img/genders/Miss.jpg new file mode 100644 index 000000000..a2f7ee3f1 Binary files /dev/null and b/install-new/data/img/genders/Miss.jpg differ diff --git a/install-new/data/img/genders/Mr.jpg b/install-new/data/img/genders/Mr.jpg new file mode 100644 index 000000000..14107c32b Binary files /dev/null and b/install-new/data/img/genders/Mr.jpg differ diff --git a/install-new/data/img/genders/Ms.jpg b/install-new/data/img/genders/Ms.jpg new file mode 100644 index 000000000..a2f7ee3f1 Binary files /dev/null and b/install-new/data/img/genders/Ms.jpg differ diff --git a/install-new/data/img/os/Awaiting_PayPal_payment.gif b/install-new/data/img/os/Awaiting_PayPal_payment.gif new file mode 100644 index 000000000..57abc204b Binary files /dev/null and b/install-new/data/img/os/Awaiting_PayPal_payment.gif differ diff --git a/install-new/data/img/os/Awaiting_bank_wire_payment.gif b/install-new/data/img/os/Awaiting_bank_wire_payment.gif new file mode 100644 index 000000000..2780d81e7 Binary files /dev/null and b/install-new/data/img/os/Awaiting_bank_wire_payment.gif differ diff --git a/install-new/data/img/os/Awaiting_cheque_payment.gif b/install-new/data/img/os/Awaiting_cheque_payment.gif new file mode 100644 index 000000000..e7c5f3153 Binary files /dev/null and b/install-new/data/img/os/Awaiting_cheque_payment.gif differ diff --git a/install-new/data/img/os/Canceled.gif b/install-new/data/img/os/Canceled.gif new file mode 100644 index 000000000..8d4e46519 Binary files /dev/null and b/install-new/data/img/os/Canceled.gif differ diff --git a/install-new/data/img/os/Delivered.gif b/install-new/data/img/os/Delivered.gif new file mode 100644 index 000000000..cbce89abe Binary files /dev/null and b/install-new/data/img/os/Delivered.gif differ diff --git a/install-new/data/img/os/On_backorder.gif b/install-new/data/img/os/On_backorder.gif new file mode 100644 index 000000000..f4d413d42 Binary files /dev/null and b/install-new/data/img/os/On_backorder.gif differ diff --git a/install-new/data/img/os/Payment_accepted.gif b/install-new/data/img/os/Payment_accepted.gif new file mode 100644 index 000000000..192829587 Binary files /dev/null and b/install-new/data/img/os/Payment_accepted.gif differ diff --git a/install-new/data/img/os/Payment_error.gif b/install-new/data/img/os/Payment_error.gif new file mode 100644 index 000000000..b16b55530 Binary files /dev/null and b/install-new/data/img/os/Payment_error.gif differ diff --git a/install-new/data/img/os/Payment_remotely_accepted.gif b/install-new/data/img/os/Payment_remotely_accepted.gif new file mode 100644 index 000000000..2e5f3d24c Binary files /dev/null and b/install-new/data/img/os/Payment_remotely_accepted.gif differ diff --git a/install-new/data/img/os/Preparation_in_progress.gif b/install-new/data/img/os/Preparation_in_progress.gif new file mode 100644 index 000000000..56d6cefc5 Binary files /dev/null and b/install-new/data/img/os/Preparation_in_progress.gif differ diff --git a/install-new/data/img/os/Refund.gif b/install-new/data/img/os/Refund.gif new file mode 100644 index 000000000..c3a61298f Binary files /dev/null and b/install-new/data/img/os/Refund.gif differ diff --git a/install-new/data/img/os/Shipped.gif b/install-new/data/img/os/Shipped.gif new file mode 100644 index 000000000..54a3e55c7 Binary files /dev/null and b/install-new/data/img/os/Shipped.gif differ diff --git a/install-new/data/img/t/AdminAccess.gif b/install-new/data/img/t/AdminAccess.gif new file mode 100644 index 000000000..bb0cd495c Binary files /dev/null and b/install-new/data/img/t/AdminAccess.gif differ diff --git a/install-new/data/img/t/AdminAccounting.gif b/install-new/data/img/t/AdminAccounting.gif new file mode 100644 index 000000000..e13342213 Binary files /dev/null and b/install-new/data/img/t/AdminAccounting.gif differ diff --git a/install-new/data/img/t/AdminAddonsCatalog.gif b/install-new/data/img/t/AdminAddonsCatalog.gif new file mode 100644 index 000000000..2104e0bed Binary files /dev/null and b/install-new/data/img/t/AdminAddonsCatalog.gif differ diff --git a/install-new/data/img/t/AdminAddonsMyAccount.gif b/install-new/data/img/t/AdminAddonsMyAccount.gif new file mode 100644 index 000000000..2104e0bed Binary files /dev/null and b/install-new/data/img/t/AdminAddonsMyAccount.gif differ diff --git a/install-new/data/img/t/AdminAddresses.gif b/install-new/data/img/t/AdminAddresses.gif new file mode 100644 index 000000000..2e0b0e373 Binary files /dev/null and b/install-new/data/img/t/AdminAddresses.gif differ diff --git a/install-new/data/img/t/AdminAliases.gif b/install-new/data/img/t/AdminAliases.gif new file mode 100644 index 000000000..662738879 Binary files /dev/null and b/install-new/data/img/t/AdminAliases.gif differ diff --git a/install-new/data/img/t/AdminAttachments.gif b/install-new/data/img/t/AdminAttachments.gif new file mode 100644 index 000000000..0fea309c9 Binary files /dev/null and b/install-new/data/img/t/AdminAttachments.gif differ diff --git a/install-new/data/img/t/AdminAttributesGroups.gif b/install-new/data/img/t/AdminAttributesGroups.gif new file mode 100644 index 000000000..897dc0a63 Binary files /dev/null and b/install-new/data/img/t/AdminAttributesGroups.gif differ diff --git a/install-new/data/img/t/AdminBackup.gif b/install-new/data/img/t/AdminBackup.gif new file mode 100644 index 000000000..15991a4c7 Binary files /dev/null and b/install-new/data/img/t/AdminBackup.gif differ diff --git a/install-new/data/img/t/AdminCMSContent.gif b/install-new/data/img/t/AdminCMSContent.gif new file mode 100644 index 000000000..176c99a23 Binary files /dev/null and b/install-new/data/img/t/AdminCMSContent.gif differ diff --git a/install-new/data/img/t/AdminCarriers.gif b/install-new/data/img/t/AdminCarriers.gif new file mode 100644 index 000000000..482ceea3c Binary files /dev/null and b/install-new/data/img/t/AdminCarriers.gif differ diff --git a/install-new/data/img/t/AdminCartRules.gif b/install-new/data/img/t/AdminCartRules.gif new file mode 100644 index 000000000..32390cd0f Binary files /dev/null and b/install-new/data/img/t/AdminCartRules.gif differ diff --git a/install-new/data/img/t/AdminCarts.gif b/install-new/data/img/t/AdminCarts.gif new file mode 100644 index 000000000..0fadd3c2b Binary files /dev/null and b/install-new/data/img/t/AdminCarts.gif differ diff --git a/install-new/data/img/t/AdminCatalog.gif b/install-new/data/img/t/AdminCatalog.gif new file mode 100644 index 000000000..bc48e2e06 Binary files /dev/null and b/install-new/data/img/t/AdminCatalog.gif differ diff --git a/install-new/data/img/t/AdminContact.gif b/install-new/data/img/t/AdminContact.gif new file mode 100644 index 000000000..7f85b9660 Binary files /dev/null and b/install-new/data/img/t/AdminContact.gif differ diff --git a/install-new/data/img/t/AdminContacts.gif b/install-new/data/img/t/AdminContacts.gif new file mode 100644 index 000000000..2e0b0e373 Binary files /dev/null and b/install-new/data/img/t/AdminContacts.gif differ diff --git a/install-new/data/img/t/AdminCountries.gif b/install-new/data/img/t/AdminCountries.gif new file mode 100644 index 000000000..1d5dcd2fd Binary files /dev/null and b/install-new/data/img/t/AdminCountries.gif differ diff --git a/install-new/data/img/t/AdminCurrencies.gif b/install-new/data/img/t/AdminCurrencies.gif new file mode 100644 index 000000000..a8672a610 Binary files /dev/null and b/install-new/data/img/t/AdminCurrencies.gif differ diff --git a/install-new/data/img/t/AdminCustomerThreads.gif b/install-new/data/img/t/AdminCustomerThreads.gif new file mode 100644 index 000000000..2194c59db Binary files /dev/null and b/install-new/data/img/t/AdminCustomerThreads.gif differ diff --git a/install-new/data/img/t/AdminCustomers.gif b/install-new/data/img/t/AdminCustomers.gif new file mode 100644 index 000000000..2194c59db Binary files /dev/null and b/install-new/data/img/t/AdminCustomers.gif differ diff --git a/install-new/data/img/t/AdminDb.gif b/install-new/data/img/t/AdminDb.gif new file mode 100644 index 000000000..ee12dc40f Binary files /dev/null and b/install-new/data/img/t/AdminDb.gif differ diff --git a/install-new/data/img/t/AdminDeliverySlip.gif b/install-new/data/img/t/AdminDeliverySlip.gif new file mode 100644 index 000000000..5a732a5a6 Binary files /dev/null and b/install-new/data/img/t/AdminDeliverySlip.gif differ diff --git a/install-new/data/img/t/AdminEmails.gif b/install-new/data/img/t/AdminEmails.gif new file mode 100644 index 000000000..94ba79d85 Binary files /dev/null and b/install-new/data/img/t/AdminEmails.gif differ diff --git a/install-new/data/img/t/AdminEmployees.gif b/install-new/data/img/t/AdminEmployees.gif new file mode 100644 index 000000000..d1ca455c7 Binary files /dev/null and b/install-new/data/img/t/AdminEmployees.gif differ diff --git a/install-new/data/img/t/AdminFeatures.gif b/install-new/data/img/t/AdminFeatures.gif new file mode 100644 index 000000000..857f861f6 Binary files /dev/null and b/install-new/data/img/t/AdminFeatures.gif differ diff --git a/install-new/data/img/t/AdminGenders.gif b/install-new/data/img/t/AdminGenders.gif new file mode 100644 index 000000000..507a132fb Binary files /dev/null and b/install-new/data/img/t/AdminGenders.gif differ diff --git a/install-new/data/img/t/AdminGenerator.gif b/install-new/data/img/t/AdminGenerator.gif new file mode 100644 index 000000000..7b277197b Binary files /dev/null and b/install-new/data/img/t/AdminGenerator.gif differ diff --git a/install-new/data/img/t/AdminGeolocation.gif b/install-new/data/img/t/AdminGeolocation.gif new file mode 100644 index 000000000..96fbf8379 Binary files /dev/null and b/install-new/data/img/t/AdminGeolocation.gif differ diff --git a/install-new/data/img/t/AdminGroups.gif b/install-new/data/img/t/AdminGroups.gif new file mode 100644 index 000000000..213f3a2c7 Binary files /dev/null and b/install-new/data/img/t/AdminGroups.gif differ diff --git a/install-new/data/img/t/AdminHome.gif b/install-new/data/img/t/AdminHome.gif new file mode 100644 index 000000000..c5c8f1b7e Binary files /dev/null and b/install-new/data/img/t/AdminHome.gif differ diff --git a/install-new/data/img/t/AdminImages.gif b/install-new/data/img/t/AdminImages.gif new file mode 100644 index 000000000..c33d0e62b Binary files /dev/null and b/install-new/data/img/t/AdminImages.gif differ diff --git a/install-new/data/img/t/AdminImport.gif b/install-new/data/img/t/AdminImport.gif new file mode 100644 index 000000000..23e376a82 Binary files /dev/null and b/install-new/data/img/t/AdminImport.gif differ diff --git a/install-new/data/img/t/AdminInformation.gif b/install-new/data/img/t/AdminInformation.gif new file mode 100644 index 000000000..c8c2fbc90 Binary files /dev/null and b/install-new/data/img/t/AdminInformation.gif differ diff --git a/install-new/data/img/t/AdminInvoices.gif b/install-new/data/img/t/AdminInvoices.gif new file mode 100644 index 000000000..f2d449b1d Binary files /dev/null and b/install-new/data/img/t/AdminInvoices.gif differ diff --git a/install-new/data/img/t/AdminLanguages.gif b/install-new/data/img/t/AdminLanguages.gif new file mode 100644 index 000000000..1d5dcd2fd Binary files /dev/null and b/install-new/data/img/t/AdminLanguages.gif differ diff --git a/install-new/data/img/t/AdminLocalization.gif b/install-new/data/img/t/AdminLocalization.gif new file mode 100644 index 000000000..c1d63637f Binary files /dev/null and b/install-new/data/img/t/AdminLocalization.gif differ diff --git a/install-new/data/img/t/AdminLogs.gif b/install-new/data/img/t/AdminLogs.gif new file mode 100644 index 000000000..e5df19aaf Binary files /dev/null and b/install-new/data/img/t/AdminLogs.gif differ diff --git a/install-new/data/img/t/AdminManufacturers.gif b/install-new/data/img/t/AdminManufacturers.gif new file mode 100644 index 000000000..659aace81 Binary files /dev/null and b/install-new/data/img/t/AdminManufacturers.gif differ diff --git a/install-new/data/img/t/AdminMessages.gif b/install-new/data/img/t/AdminMessages.gif new file mode 100644 index 000000000..2e0b0e373 Binary files /dev/null and b/install-new/data/img/t/AdminMessages.gif differ diff --git a/install-new/data/img/t/AdminMeta.gif b/install-new/data/img/t/AdminMeta.gif new file mode 100644 index 000000000..0a6f7d589 Binary files /dev/null and b/install-new/data/img/t/AdminMeta.gif differ diff --git a/install-new/data/img/t/AdminModules.gif b/install-new/data/img/t/AdminModules.gif new file mode 100644 index 000000000..3061be7d4 Binary files /dev/null and b/install-new/data/img/t/AdminModules.gif differ diff --git a/install-new/data/img/t/AdminModulesPositions.gif b/install-new/data/img/t/AdminModulesPositions.gif new file mode 100644 index 000000000..8b043ca74 Binary files /dev/null and b/install-new/data/img/t/AdminModulesPositions.gif differ diff --git a/install-new/data/img/t/AdminOrderMessage.gif b/install-new/data/img/t/AdminOrderMessage.gif new file mode 100644 index 000000000..fe8e87068 Binary files /dev/null and b/install-new/data/img/t/AdminOrderMessage.gif differ diff --git a/install-new/data/img/t/AdminOrders.gif b/install-new/data/img/t/AdminOrders.gif new file mode 100644 index 000000000..be9175d6f Binary files /dev/null and b/install-new/data/img/t/AdminOrders.gif differ diff --git a/install-new/data/img/t/AdminPDF.gif b/install-new/data/img/t/AdminPDF.gif new file mode 100644 index 000000000..d5d9488f3 Binary files /dev/null and b/install-new/data/img/t/AdminPDF.gif differ diff --git a/install-new/data/img/t/AdminPPreferences.gif b/install-new/data/img/t/AdminPPreferences.gif new file mode 100644 index 000000000..be9175d6f Binary files /dev/null and b/install-new/data/img/t/AdminPPreferences.gif differ diff --git a/install-new/data/img/t/AdminPayment.gif b/install-new/data/img/t/AdminPayment.gif new file mode 100644 index 000000000..de6b15204 Binary files /dev/null and b/install-new/data/img/t/AdminPayment.gif differ diff --git a/install-new/data/img/t/AdminPerformance.gif b/install-new/data/img/t/AdminPerformance.gif new file mode 100644 index 000000000..7d865ed9b Binary files /dev/null and b/install-new/data/img/t/AdminPerformance.gif differ diff --git a/install-new/data/img/t/AdminPreferences.gif b/install-new/data/img/t/AdminPreferences.gif new file mode 100644 index 000000000..c2e2f68e5 Binary files /dev/null and b/install-new/data/img/t/AdminPreferences.gif differ diff --git a/install-new/data/img/t/AdminProfiles.gif b/install-new/data/img/t/AdminProfiles.gif new file mode 100644 index 000000000..1b909d4a5 Binary files /dev/null and b/install-new/data/img/t/AdminProfiles.gif differ diff --git a/install-new/data/img/t/AdminQuickAccesses.gif b/install-new/data/img/t/AdminQuickAccesses.gif new file mode 100644 index 000000000..d876e5e9c Binary files /dev/null and b/install-new/data/img/t/AdminQuickAccesses.gif differ diff --git a/install-new/data/img/t/AdminRangePrice.gif b/install-new/data/img/t/AdminRangePrice.gif new file mode 100644 index 000000000..a8672a610 Binary files /dev/null and b/install-new/data/img/t/AdminRangePrice.gif differ diff --git a/install-new/data/img/t/AdminRangeWeight.gif b/install-new/data/img/t/AdminRangeWeight.gif new file mode 100644 index 000000000..3583c0303 Binary files /dev/null and b/install-new/data/img/t/AdminRangeWeight.gif differ diff --git a/install-new/data/img/t/AdminReferrers.gif b/install-new/data/img/t/AdminReferrers.gif new file mode 100644 index 000000000..b0a077d65 Binary files /dev/null and b/install-new/data/img/t/AdminReferrers.gif differ diff --git a/install-new/data/img/t/AdminReturn.gif b/install-new/data/img/t/AdminReturn.gif new file mode 100644 index 000000000..198a934a3 Binary files /dev/null and b/install-new/data/img/t/AdminReturn.gif differ diff --git a/install-new/data/img/t/AdminScenes.gif b/install-new/data/img/t/AdminScenes.gif new file mode 100644 index 000000000..4221ace66 Binary files /dev/null and b/install-new/data/img/t/AdminScenes.gif differ diff --git a/install-new/data/img/t/AdminSearch.gif b/install-new/data/img/t/AdminSearch.gif new file mode 100644 index 000000000..6ddb543b8 Binary files /dev/null and b/install-new/data/img/t/AdminSearch.gif differ diff --git a/install-new/data/img/t/AdminSearchConf.gif b/install-new/data/img/t/AdminSearchConf.gif new file mode 100644 index 000000000..63b11643c Binary files /dev/null and b/install-new/data/img/t/AdminSearchConf.gif differ diff --git a/install-new/data/img/t/AdminSearchEngines.gif b/install-new/data/img/t/AdminSearchEngines.gif new file mode 100644 index 000000000..d5dd1e7b2 Binary files /dev/null and b/install-new/data/img/t/AdminSearchEngines.gif differ diff --git a/install-new/data/img/t/AdminShipping.gif b/install-new/data/img/t/AdminShipping.gif new file mode 100644 index 000000000..482ceea3c Binary files /dev/null and b/install-new/data/img/t/AdminShipping.gif differ diff --git a/install-new/data/img/t/AdminShop.gif b/install-new/data/img/t/AdminShop.gif new file mode 100644 index 000000000..8db408186 Binary files /dev/null and b/install-new/data/img/t/AdminShop.gif differ diff --git a/install-new/data/img/t/AdminSlip.gif b/install-new/data/img/t/AdminSlip.gif new file mode 100644 index 000000000..e5df19aaf Binary files /dev/null and b/install-new/data/img/t/AdminSlip.gif differ diff --git a/install-new/data/img/t/AdminStates.gif b/install-new/data/img/t/AdminStates.gif new file mode 100644 index 000000000..1d5dcd2fd Binary files /dev/null and b/install-new/data/img/t/AdminStates.gif differ diff --git a/install-new/data/img/t/AdminStats.gif b/install-new/data/img/t/AdminStats.gif new file mode 100644 index 000000000..9102f3a81 Binary files /dev/null and b/install-new/data/img/t/AdminStats.gif differ diff --git a/install-new/data/img/t/AdminStatsConf.gif b/install-new/data/img/t/AdminStatsConf.gif new file mode 100644 index 000000000..414f98790 Binary files /dev/null and b/install-new/data/img/t/AdminStatsConf.gif differ diff --git a/install-new/data/img/t/AdminStatuses.gif b/install-new/data/img/t/AdminStatuses.gif new file mode 100644 index 000000000..f15768f13 Binary files /dev/null and b/install-new/data/img/t/AdminStatuses.gif differ diff --git a/install-new/data/img/t/AdminStock.gif b/install-new/data/img/t/AdminStock.gif new file mode 100644 index 000000000..de02a9159 Binary files /dev/null and b/install-new/data/img/t/AdminStock.gif differ diff --git a/install-new/data/img/t/AdminStockManagement.gif b/install-new/data/img/t/AdminStockManagement.gif new file mode 100644 index 000000000..d85510bed Binary files /dev/null and b/install-new/data/img/t/AdminStockManagement.gif differ diff --git a/install-new/data/img/t/AdminStockMvt.gif b/install-new/data/img/t/AdminStockMvt.gif new file mode 100644 index 000000000..1186f6030 Binary files /dev/null and b/install-new/data/img/t/AdminStockMvt.gif differ diff --git a/install-new/data/img/t/AdminStores.gif b/install-new/data/img/t/AdminStores.gif new file mode 100644 index 000000000..574ca9161 Binary files /dev/null and b/install-new/data/img/t/AdminStores.gif differ diff --git a/install-new/data/img/t/AdminSubDomains.gif b/install-new/data/img/t/AdminSubDomains.gif new file mode 100644 index 000000000..8554b38b5 Binary files /dev/null and b/install-new/data/img/t/AdminSubDomains.gif differ diff --git a/install-new/data/img/t/AdminSuppliers.gif b/install-new/data/img/t/AdminSuppliers.gif new file mode 100644 index 000000000..e5cb1f263 Binary files /dev/null and b/install-new/data/img/t/AdminSuppliers.gif differ diff --git a/install-new/data/img/t/AdminTabs.gif b/install-new/data/img/t/AdminTabs.gif new file mode 100644 index 000000000..492754058 Binary files /dev/null and b/install-new/data/img/t/AdminTabs.gif differ diff --git a/install-new/data/img/t/AdminTags.gif b/install-new/data/img/t/AdminTags.gif new file mode 100644 index 000000000..a01d9ea43 Binary files /dev/null and b/install-new/data/img/t/AdminTags.gif differ diff --git a/install-new/data/img/t/AdminTaxRulesGroup.gif b/install-new/data/img/t/AdminTaxRulesGroup.gif new file mode 100644 index 000000000..b91777ebb Binary files /dev/null and b/install-new/data/img/t/AdminTaxRulesGroup.gif differ diff --git a/install-new/data/img/t/AdminTaxes.gif b/install-new/data/img/t/AdminTaxes.gif new file mode 100644 index 000000000..b91777ebb Binary files /dev/null and b/install-new/data/img/t/AdminTaxes.gif differ diff --git a/install-new/data/img/t/AdminThemes.gif b/install-new/data/img/t/AdminThemes.gif new file mode 100644 index 000000000..1e5f79e9b Binary files /dev/null and b/install-new/data/img/t/AdminThemes.gif differ diff --git a/install-new/data/img/t/AdminTools.gif b/install-new/data/img/t/AdminTools.gif new file mode 100644 index 000000000..dd772b72c Binary files /dev/null and b/install-new/data/img/t/AdminTools.gif differ diff --git a/install-new/data/img/t/AdminTracking.gif b/install-new/data/img/t/AdminTracking.gif new file mode 100644 index 000000000..c3cbb5dfb Binary files /dev/null and b/install-new/data/img/t/AdminTracking.gif differ diff --git a/install-new/data/img/t/AdminTranslations.gif b/install-new/data/img/t/AdminTranslations.gif new file mode 100644 index 000000000..af91f09a4 Binary files /dev/null and b/install-new/data/img/t/AdminTranslations.gif differ diff --git a/install-new/data/img/t/AdminWebservice.gif b/install-new/data/img/t/AdminWebservice.gif new file mode 100644 index 000000000..a37e6ddce Binary files /dev/null and b/install-new/data/img/t/AdminWebservice.gif differ diff --git a/install-new/data/img/t/AdminZones.gif b/install-new/data/img/t/AdminZones.gif new file mode 100644 index 000000000..1d5dcd2fd Binary files /dev/null and b/install-new/data/img/t/AdminZones.gif differ diff --git a/install-new/data/iso_to_timezone.xml b/install-new/data/iso_to_timezone.xml new file mode 100644 index 000000000..c2a1fa961 --- /dev/null +++ b/install-new/data/iso_to_timezone.xml @@ -0,0 +1,244 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/install-new/data/xml/.xml b/install-new/data/xml/.xml new file mode 100644 index 000000000..a87c70177 --- /dev/null +++ b/install-new/data/xml/.xml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/install-new/data/xml/access.xml b/install-new/data/xml/access.xml new file mode 100644 index 000000000..d4cfe77b3 --- /dev/null +++ b/install-new/data/xml/access.xml @@ -0,0 +1,109 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/install-new/data/xml/address_format.xml b/install-new/data/xml/address_format.xml new file mode 100644 index 000000000..54c70aa7c --- /dev/null +++ b/install-new/data/xml/address_format.xml @@ -0,0 +1,2448 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/install-new/data/xml/carrier.xml b/install-new/data/xml/carrier.xml new file mode 100644 index 000000000..bd85830fb --- /dev/null +++ b/install-new/data/xml/carrier.xml @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/install-new/data/xml/carrier_group.xml b/install-new/data/xml/carrier_group.xml new file mode 100644 index 000000000..7061a1139 --- /dev/null +++ b/install-new/data/xml/carrier_group.xml @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/install-new/data/xml/carrier_zone.xml b/install-new/data/xml/carrier_zone.xml new file mode 100644 index 000000000..852a7ace2 --- /dev/null +++ b/install-new/data/xml/carrier_zone.xml @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/install-new/data/xml/category.xml b/install-new/data/xml/category.xml new file mode 100644 index 000000000..10969f5cf --- /dev/null +++ b/install-new/data/xml/category.xml @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/install-new/data/xml/cms.xml b/install-new/data/xml/cms.xml new file mode 100644 index 000000000..f0c67704a --- /dev/null +++ b/install-new/data/xml/cms.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/install-new/data/xml/cms_category.xml b/install-new/data/xml/cms_category.xml new file mode 100644 index 000000000..d6f61d4b4 --- /dev/null +++ b/install-new/data/xml/cms_category.xml @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/install-new/data/xml/configuration.xml b/install-new/data/xml/configuration.xml new file mode 100644 index 000000000..0b7761c16 --- /dev/null +++ b/install-new/data/xml/configuration.xml @@ -0,0 +1,628 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/install-new/data/xml/contact.xml b/install-new/data/xml/contact.xml new file mode 100644 index 000000000..56d1e19d7 --- /dev/null +++ b/install-new/data/xml/contact.xml @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/install-new/data/xml/country.xml b/install-new/data/xml/country.xml new file mode 100644 index 000000000..954b2ebab --- /dev/null +++ b/install-new/data/xml/country.xml @@ -0,0 +1,261 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/install-new/data/xml/gender.xml b/install-new/data/xml/gender.xml new file mode 100644 index 000000000..08e62efee --- /dev/null +++ b/install-new/data/xml/gender.xml @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/install-new/data/xml/group.xml b/install-new/data/xml/group.xml new file mode 100644 index 000000000..96c02e177 --- /dev/null +++ b/install-new/data/xml/group.xml @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/install-new/data/xml/hook.xml b/install-new/data/xml/hook.xml new file mode 100644 index 000000000..c87bdae66 --- /dev/null +++ b/install-new/data/xml/hook.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/install-new/data/xml/hook_alias.xml b/install-new/data/xml/hook_alias.xml new file mode 100644 index 000000000..03f125cf3 --- /dev/null +++ b/install-new/data/xml/hook_alias.xml @@ -0,0 +1,350 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/install-new/data/xml/image_type.xml b/install-new/data/xml/image_type.xml new file mode 100644 index 000000000..2a31dad33 --- /dev/null +++ b/install-new/data/xml/image_type.xml @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/install-new/data/xml/meta.xml b/install-new/data/xml/meta.xml new file mode 100644 index 000000000..063a07a02 --- /dev/null +++ b/install-new/data/xml/meta.xml @@ -0,0 +1,84 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/install-new/data/xml/operating_system.xml b/install-new/data/xml/operating_system.xml new file mode 100644 index 000000000..c602076e9 --- /dev/null +++ b/install-new/data/xml/operating_system.xml @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/install-new/data/xml/order_return_state.xml b/install-new/data/xml/order_return_state.xml new file mode 100644 index 000000000..83b4b3f3c --- /dev/null +++ b/install-new/data/xml/order_return_state.xml @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/install-new/data/xml/order_state.xml b/install-new/data/xml/order_state.xml new file mode 100644 index 000000000..09002917a --- /dev/null +++ b/install-new/data/xml/order_state.xml @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/install-new/data/xml/profile.xml b/install-new/data/xml/profile.xml new file mode 100644 index 000000000..12c8a9456 --- /dev/null +++ b/install-new/data/xml/profile.xml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/install-new/data/xml/quick_access.xml b/install-new/data/xml/quick_access.xml new file mode 100644 index 000000000..2455df73b --- /dev/null +++ b/install-new/data/xml/quick_access.xml @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/install-new/data/xml/search_engine.xml b/install-new/data/xml/search_engine.xml new file mode 100644 index 000000000..6ebe2b5d8 --- /dev/null +++ b/install-new/data/xml/search_engine.xml @@ -0,0 +1,124 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/install-new/data/xml/state.xml b/install-new/data/xml/state.xml new file mode 100644 index 000000000..a82003960 --- /dev/null +++ b/install-new/data/xml/state.xml @@ -0,0 +1,950 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/install-new/data/xml/stock_mvt_reason.xml b/install-new/data/xml/stock_mvt_reason.xml new file mode 100644 index 000000000..60eb4b1f7 --- /dev/null +++ b/install-new/data/xml/stock_mvt_reason.xml @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/install-new/data/xml/subdomain.xml b/install-new/data/xml/subdomain.xml new file mode 100644 index 000000000..7e2004623 --- /dev/null +++ b/install-new/data/xml/subdomain.xml @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/install-new/data/xml/supplier_order_state.xml b/install-new/data/xml/supplier_order_state.xml new file mode 100644 index 000000000..67ae15d53 --- /dev/null +++ b/install-new/data/xml/supplier_order_state.xml @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/install-new/data/xml/tab.xml b/install-new/data/xml/tab.xml new file mode 100644 index 000000000..c9b5e0b44 --- /dev/null +++ b/install-new/data/xml/tab.xml @@ -0,0 +1,295 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/install-new/data/xml/theme.xml b/install-new/data/xml/theme.xml new file mode 100644 index 000000000..049f231a1 --- /dev/null +++ b/install-new/data/xml/theme.xml @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/install-new/data/xml/timezone.xml b/install-new/data/xml/timezone.xml new file mode 100644 index 000000000..5a41e90a1 --- /dev/null +++ b/install-new/data/xml/timezone.xml @@ -0,0 +1,569 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/install-new/data/xml/warehouse.xml b/install-new/data/xml/warehouse.xml new file mode 100644 index 000000000..62308e738 --- /dev/null +++ b/install-new/data/xml/warehouse.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/install-new/data/xml/web_browser.xml b/install-new/data/xml/web_browser.xml new file mode 100644 index 000000000..9d56484bb --- /dev/null +++ b/install-new/data/xml/web_browser.xml @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/install-new/data/xml/zone.xml b/install-new/data/xml/zone.xml new file mode 100644 index 000000000..48a23cd62 --- /dev/null +++ b/install-new/data/xml/zone.xml @@ -0,0 +1,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/install-new/dev/index.php b/install-new/dev/index.php new file mode 100644 index 000000000..625959498 --- /dev/null +++ b/install-new/dev/index.php @@ -0,0 +1,105 @@ +type = Tools::getValue('type'); + $this->loader = new InstallXmlLoader(); + $languages = array(); + foreach (Language::getLanguages(false) as $language) + $languages[$language['id_lang']] = $language['iso_code']; + $this->loader->setLanguages($languages); + + if (Tools::getValue('submit')) + $this->synchronizeDatabase(); + + if ($this->type == 'demo') + $this->loader->setFixturesPath(); + $this->displayTemplate('index'); + } + + public function synchronizeDatabase() + { + if ($this->type == 'demo') + { + $this->loader->setDefaultPath(); + $this->loader->generateAllEntityFiles(); + $this->loader->setFixturesPath(); + } + + $tables = isset($_POST['tables']) ? (array)$_POST['tables'] : array(); + $columns = isset($_POST['columns']) ? (array)$_POST['columns'] : array(); + $relations = isset($_POST['relations']) ? (array)$_POST['relations'] : array(); + $ids = isset($_POST['id']) ? (array)$_POST['id'] : array(); + $primaries = isset($_POST['primary']) ? (array)$_POST['primary'] : array(); + $classes = isset($_POST['class']) ? (array)$_POST['class'] : array(); + $sqls = isset($_POST['sql']) ? (array)$_POST['sql'] : array(); + $images = isset($_POST['image']) ? (array)$_POST['image'] : array(); + + $entities = array(); + foreach ($tables as $table) + { + $config = array(); + if (isset($ids[$table]) && $ids[$table]) + $config['id'] = $ids[$table]; + + if (isset($primaries[$table]) && $primaries[$table]) + $config['primary'] = $primaries[$table]; + + if (isset($classes[$table]) && $classes[$table]) + $config['class'] = $classes[$table]; + + if (isset($sqls[$table]) && $sqls[$table]) + $config['sql'] = $sqls[$table]; + + if (isset($images[$table]) && $images[$table]) + $config['image'] = $images[$table]; + + $fields = array(); + if (isset($columns[$table])) + { + foreach ($columns[$table] as $column) + { + $fields[$column] = array(); + if (isset($relations[$table][$column]['check'])) + $fields[$column]['relation'] = $relations[$table][$column]; + } + } + + $entities[$table] = array( + 'config' => $config, + 'fields' => $fields, + ); + } + $this->loader->generateEntityFiles($entities); + + if ($this->type != 'demo') + { + $this->loader->setFixturesPath(); + $this->loader->generateAllEntityFiles(); + $this->loader->setDefaultPath(); + } + + $this->errors = $this->loader->getErrors(); + } +} + +new SynchronizeController('synchronize'); \ No newline at end of file diff --git a/install-new/dev/index.phtml b/install-new/dev/index.phtml new file mode 100644 index 000000000..82285bf3a --- /dev/null +++ b/install-new/dev/index.phtml @@ -0,0 +1,117 @@ + + + The Synchronizator + + + + + + + + errors): ?> + + + + + +
+ + + +
+ + \ No newline at end of file diff --git a/install-new/dev/style.css b/install-new/dev/style.css new file mode 100644 index 000000000..9e2512bd6 --- /dev/null +++ b/install-new/dev/style.css @@ -0,0 +1,8 @@ +.clear{ + clear: both; +} + +.column_left{ + float: left; + width: 250px; +} \ No newline at end of file diff --git a/install-new/fixtures/apple/data/access.xml b/install-new/fixtures/apple/data/access.xml new file mode 100644 index 000000000..ea5f18d79 --- /dev/null +++ b/install-new/fixtures/apple/data/access.xml @@ -0,0 +1,373 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/install-new/fixtures/apple/data/address.xml b/install-new/fixtures/apple/data/address.xml new file mode 100644 index 000000000..ad65dad51 --- /dev/null +++ b/install-new/fixtures/apple/data/address.xml @@ -0,0 +1,39 @@ + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+
+ + + + +
+
+
\ No newline at end of file diff --git a/install-new/fixtures/apple/data/alias.xml b/install-new/fixtures/apple/data/alias.xml new file mode 100644 index 000000000..7bc6b2275 --- /dev/null +++ b/install-new/fixtures/apple/data/alias.xml @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/install-new/fixtures/apple/data/attribute.xml b/install-new/fixtures/apple/data/attribute.xml new file mode 100644 index 000000000..90f478211 --- /dev/null +++ b/install-new/fixtures/apple/data/attribute.xml @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/install-new/fixtures/apple/data/attribute_group.xml b/install-new/fixtures/apple/data/attribute_group.xml new file mode 100644 index 000000000..eae1001e2 --- /dev/null +++ b/install-new/fixtures/apple/data/attribute_group.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/install-new/fixtures/apple/data/carrier.xml b/install-new/fixtures/apple/data/carrier.xml new file mode 100644 index 000000000..74ec8285d --- /dev/null +++ b/install-new/fixtures/apple/data/carrier.xml @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/install-new/fixtures/apple/data/carrier_group.xml b/install-new/fixtures/apple/data/carrier_group.xml new file mode 100644 index 000000000..648e97b66 --- /dev/null +++ b/install-new/fixtures/apple/data/carrier_group.xml @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/install-new/fixtures/apple/data/carrier_zone.xml b/install-new/fixtures/apple/data/carrier_zone.xml new file mode 100644 index 000000000..3ae37078b --- /dev/null +++ b/install-new/fixtures/apple/data/carrier_zone.xml @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/install-new/fixtures/apple/data/cart.xml b/install-new/fixtures/apple/data/cart.xml new file mode 100644 index 000000000..d20054356 --- /dev/null +++ b/install-new/fixtures/apple/data/cart.xml @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/install-new/fixtures/apple/data/cart_product.xml b/install-new/fixtures/apple/data/cart_product.xml new file mode 100644 index 000000000..c71d9c6d0 --- /dev/null +++ b/install-new/fixtures/apple/data/cart_product.xml @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/install-new/fixtures/apple/data/category.xml b/install-new/fixtures/apple/data/category.xml new file mode 100644 index 000000000..6e7e09e07 --- /dev/null +++ b/install-new/fixtures/apple/data/category.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/install-new/fixtures/apple/data/category_product.xml b/install-new/fixtures/apple/data/category_product.xml new file mode 100644 index 000000000..e6a2118c6 --- /dev/null +++ b/install-new/fixtures/apple/data/category_product.xml @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/install-new/fixtures/apple/data/connections.xml b/install-new/fixtures/apple/data/connections.xml new file mode 100644 index 000000000..7c71eb8f8 --- /dev/null +++ b/install-new/fixtures/apple/data/connections.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/install-new/fixtures/apple/data/customer.xml b/install-new/fixtures/apple/data/customer.xml new file mode 100644 index 000000000..0d0b3084a --- /dev/null +++ b/install-new/fixtures/apple/data/customer.xml @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/install-new/fixtures/apple/data/delivery.xml b/install-new/fixtures/apple/data/delivery.xml new file mode 100644 index 000000000..d6cc8ef93 --- /dev/null +++ b/install-new/fixtures/apple/data/delivery.xml @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/install-new/fixtures/apple/data/feature.xml b/install-new/fixtures/apple/data/feature.xml new file mode 100644 index 000000000..2571ee61c --- /dev/null +++ b/install-new/fixtures/apple/data/feature.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/install-new/fixtures/apple/data/feature_value.xml b/install-new/fixtures/apple/data/feature_value.xml new file mode 100644 index 000000000..ee5a0d291 --- /dev/null +++ b/install-new/fixtures/apple/data/feature_value.xml @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/install-new/fixtures/apple/data/guest.xml b/install-new/fixtures/apple/data/guest.xml new file mode 100644 index 000000000..199e95179 --- /dev/null +++ b/install-new/fixtures/apple/data/guest.xml @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/install-new/fixtures/apple/data/image.xml b/install-new/fixtures/apple/data/image.xml new file mode 100644 index 000000000..7812691ef --- /dev/null +++ b/install-new/fixtures/apple/data/image.xml @@ -0,0 +1,36 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/install-new/fixtures/apple/data/manufacturer.xml b/install-new/fixtures/apple/data/manufacturer.xml new file mode 100644 index 000000000..00af1ef39 --- /dev/null +++ b/install-new/fixtures/apple/data/manufacturer.xml @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/install-new/fixtures/apple/data/order_detail.xml b/install-new/fixtures/apple/data/order_detail.xml new file mode 100644 index 000000000..33b3b3c71 --- /dev/null +++ b/install-new/fixtures/apple/data/order_detail.xml @@ -0,0 +1,44 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/install-new/fixtures/apple/data/order_history.xml b/install-new/fixtures/apple/data/order_history.xml new file mode 100644 index 000000000..92dcb493b --- /dev/null +++ b/install-new/fixtures/apple/data/order_history.xml @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/install-new/fixtures/apple/data/order_message.xml b/install-new/fixtures/apple/data/order_message.xml new file mode 100644 index 000000000..562e4ad61 --- /dev/null +++ b/install-new/fixtures/apple/data/order_message.xml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/install-new/fixtures/apple/data/orders.xml b/install-new/fixtures/apple/data/orders.xml new file mode 100644 index 000000000..4b230c0c3 --- /dev/null +++ b/install-new/fixtures/apple/data/orders.xml @@ -0,0 +1,40 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/install-new/fixtures/apple/data/product.xml b/install-new/fixtures/apple/data/product.xml new file mode 100644 index 000000000..3c0fc911f --- /dev/null +++ b/install-new/fixtures/apple/data/product.xml @@ -0,0 +1,74 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/install-new/fixtures/apple/data/product_attribute.xml b/install-new/fixtures/apple/data/product_attribute.xml new file mode 100644 index 000000000..317f4e2c7 --- /dev/null +++ b/install-new/fixtures/apple/data/product_attribute.xml @@ -0,0 +1,104 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/install-new/fixtures/apple/data/product_attribute_combination.xml b/install-new/fixtures/apple/data/product_attribute_combination.xml new file mode 100644 index 000000000..fe2bf8833 --- /dev/null +++ b/install-new/fixtures/apple/data/product_attribute_combination.xml @@ -0,0 +1,61 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/install-new/fixtures/apple/data/profile.xml b/install-new/fixtures/apple/data/profile.xml new file mode 100644 index 000000000..de42ff03b --- /dev/null +++ b/install-new/fixtures/apple/data/profile.xml @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/install-new/fixtures/apple/data/range_price.xml b/install-new/fixtures/apple/data/range_price.xml new file mode 100644 index 000000000..7979b5ffc --- /dev/null +++ b/install-new/fixtures/apple/data/range_price.xml @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/install-new/fixtures/apple/data/range_weight.xml b/install-new/fixtures/apple/data/range_weight.xml new file mode 100644 index 000000000..f110657fb --- /dev/null +++ b/install-new/fixtures/apple/data/range_weight.xml @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/install-new/fixtures/apple/data/scene.xml b/install-new/fixtures/apple/data/scene.xml new file mode 100644 index 000000000..7ea3f0cc5 --- /dev/null +++ b/install-new/fixtures/apple/data/scene.xml @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/install-new/fixtures/apple/data/stock_available.xml b/install-new/fixtures/apple/data/stock_available.xml new file mode 100644 index 000000000..d578aba50 --- /dev/null +++ b/install-new/fixtures/apple/data/stock_available.xml @@ -0,0 +1,43 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/install-new/fixtures/apple/data/store.xml b/install-new/fixtures/apple/data/store.xml new file mode 100644 index 000000000..c7373f47a --- /dev/null +++ b/install-new/fixtures/apple/data/store.xml @@ -0,0 +1,68 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/install-new/fixtures/apple/data/supplier.xml b/install-new/fixtures/apple/data/supplier.xml new file mode 100644 index 000000000..79f689e53 --- /dev/null +++ b/install-new/fixtures/apple/data/supplier.xml @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/install-new/fixtures/apple/data/tag.xml b/install-new/fixtures/apple/data/tag.xml new file mode 100644 index 000000000..1a9073a88 --- /dev/null +++ b/install-new/fixtures/apple/data/tag.xml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/install-new/fixtures/apple/img/c/Accessories-category.jpg b/install-new/fixtures/apple/img/c/Accessories-category.jpg new file mode 100644 index 000000000..cf93e8c87 Binary files /dev/null and b/install-new/fixtures/apple/img/c/Accessories-category.jpg differ diff --git a/install-new/fixtures/apple/img/c/Accessories-large.jpg b/install-new/fixtures/apple/img/c/Accessories-large.jpg new file mode 100644 index 000000000..33f929178 Binary files /dev/null and b/install-new/fixtures/apple/img/c/Accessories-large.jpg differ diff --git a/install-new/fixtures/apple/img/c/Accessories-medium.jpg b/install-new/fixtures/apple/img/c/Accessories-medium.jpg new file mode 100644 index 000000000..45e6dc0b5 Binary files /dev/null and b/install-new/fixtures/apple/img/c/Accessories-medium.jpg differ diff --git a/install-new/fixtures/apple/img/c/Accessories-small.jpg b/install-new/fixtures/apple/img/c/Accessories-small.jpg new file mode 100644 index 000000000..981e037f0 Binary files /dev/null and b/install-new/fixtures/apple/img/c/Accessories-small.jpg differ diff --git a/install-new/fixtures/apple/img/c/Accessories.jpg b/install-new/fixtures/apple/img/c/Accessories.jpg new file mode 100644 index 000000000..1628a6b4f Binary files /dev/null and b/install-new/fixtures/apple/img/c/Accessories.jpg differ diff --git a/install-new/fixtures/apple/img/c/Laptops-category.jpg b/install-new/fixtures/apple/img/c/Laptops-category.jpg new file mode 100644 index 000000000..b65021440 Binary files /dev/null and b/install-new/fixtures/apple/img/c/Laptops-category.jpg differ diff --git a/install-new/fixtures/apple/img/c/Laptops-large.jpg b/install-new/fixtures/apple/img/c/Laptops-large.jpg new file mode 100644 index 000000000..f752acee9 Binary files /dev/null and b/install-new/fixtures/apple/img/c/Laptops-large.jpg differ diff --git a/install-new/fixtures/apple/img/c/Laptops-medium.jpg b/install-new/fixtures/apple/img/c/Laptops-medium.jpg new file mode 100644 index 000000000..945480537 Binary files /dev/null and b/install-new/fixtures/apple/img/c/Laptops-medium.jpg differ diff --git a/install-new/fixtures/apple/img/c/Laptops-small.jpg b/install-new/fixtures/apple/img/c/Laptops-small.jpg new file mode 100644 index 000000000..8be08be8c Binary files /dev/null and b/install-new/fixtures/apple/img/c/Laptops-small.jpg differ diff --git a/install-new/fixtures/apple/img/c/Laptops.jpg b/install-new/fixtures/apple/img/c/Laptops.jpg new file mode 100644 index 000000000..54a32b006 Binary files /dev/null and b/install-new/fixtures/apple/img/c/Laptops.jpg differ diff --git a/install-new/fixtures/apple/img/c/iPods-category.jpg b/install-new/fixtures/apple/img/c/iPods-category.jpg new file mode 100644 index 000000000..7b6e82f8a Binary files /dev/null and b/install-new/fixtures/apple/img/c/iPods-category.jpg differ diff --git a/install-new/fixtures/apple/img/c/iPods-large.jpg b/install-new/fixtures/apple/img/c/iPods-large.jpg new file mode 100644 index 000000000..3d3d24dd9 Binary files /dev/null and b/install-new/fixtures/apple/img/c/iPods-large.jpg differ diff --git a/install-new/fixtures/apple/img/c/iPods-medium.jpg b/install-new/fixtures/apple/img/c/iPods-medium.jpg new file mode 100644 index 000000000..c9692889a Binary files /dev/null and b/install-new/fixtures/apple/img/c/iPods-medium.jpg differ diff --git a/install-new/fixtures/apple/img/c/iPods-small.jpg b/install-new/fixtures/apple/img/c/iPods-small.jpg new file mode 100644 index 000000000..76c7df8e7 Binary files /dev/null and b/install-new/fixtures/apple/img/c/iPods-small.jpg differ diff --git a/install-new/fixtures/apple/img/c/iPods.jpg b/install-new/fixtures/apple/img/c/iPods.jpg new file mode 100644 index 000000000..2701f071b Binary files /dev/null and b/install-new/fixtures/apple/img/c/iPods.jpg differ diff --git a/install-new/fixtures/apple/img/m/Apple_Computer_Inc-large.jpg b/install-new/fixtures/apple/img/m/Apple_Computer_Inc-large.jpg new file mode 100644 index 000000000..6000b1be5 Binary files /dev/null and b/install-new/fixtures/apple/img/m/Apple_Computer_Inc-large.jpg differ diff --git a/install-new/fixtures/apple/img/m/Apple_Computer_Inc-medium.jpg b/install-new/fixtures/apple/img/m/Apple_Computer_Inc-medium.jpg new file mode 100644 index 000000000..373c85b79 Binary files /dev/null and b/install-new/fixtures/apple/img/m/Apple_Computer_Inc-medium.jpg differ diff --git a/install-new/fixtures/apple/img/m/Apple_Computer_Inc-small.jpg b/install-new/fixtures/apple/img/m/Apple_Computer_Inc-small.jpg new file mode 100644 index 000000000..d3fb7f964 Binary files /dev/null and b/install-new/fixtures/apple/img/m/Apple_Computer_Inc-small.jpg differ diff --git a/install-new/fixtures/apple/img/m/Apple_Computer_Inc.jpg b/install-new/fixtures/apple/img/m/Apple_Computer_Inc.jpg new file mode 100644 index 000000000..795d132c5 Binary files /dev/null and b/install-new/fixtures/apple/img/m/Apple_Computer_Inc.jpg differ diff --git a/install-new/fixtures/apple/img/m/Shure_Incorporated-large.jpg b/install-new/fixtures/apple/img/m/Shure_Incorporated-large.jpg new file mode 100644 index 000000000..ee4eb5fa8 Binary files /dev/null and b/install-new/fixtures/apple/img/m/Shure_Incorporated-large.jpg differ diff --git a/install-new/fixtures/apple/img/m/Shure_Incorporated-medium.jpg b/install-new/fixtures/apple/img/m/Shure_Incorporated-medium.jpg new file mode 100644 index 000000000..d80ee0e5e Binary files /dev/null and b/install-new/fixtures/apple/img/m/Shure_Incorporated-medium.jpg differ diff --git a/install-new/fixtures/apple/img/m/Shure_Incorporated-small.jpg b/install-new/fixtures/apple/img/m/Shure_Incorporated-small.jpg new file mode 100644 index 000000000..bdf87c651 Binary files /dev/null and b/install-new/fixtures/apple/img/m/Shure_Incorporated-small.jpg differ diff --git a/install-new/fixtures/apple/img/m/Shure_Incorporated.jpg b/install-new/fixtures/apple/img/m/Shure_Incorporated.jpg new file mode 100644 index 000000000..f64258f9a Binary files /dev/null and b/install-new/fixtures/apple/img/m/Shure_Incorporated.jpg differ diff --git a/install-new/fixtures/apple/img/p/MacBook_Air-home.jpg b/install-new/fixtures/apple/img/p/MacBook_Air-home.jpg new file mode 100644 index 000000000..5af00dd93 Binary files /dev/null and b/install-new/fixtures/apple/img/p/MacBook_Air-home.jpg differ diff --git a/install-new/fixtures/apple/img/p/MacBook_Air-large.jpg b/install-new/fixtures/apple/img/p/MacBook_Air-large.jpg new file mode 100644 index 000000000..f1c9a858d Binary files /dev/null and b/install-new/fixtures/apple/img/p/MacBook_Air-large.jpg differ diff --git a/install-new/fixtures/apple/img/p/MacBook_Air-medium.jpg b/install-new/fixtures/apple/img/p/MacBook_Air-medium.jpg new file mode 100644 index 000000000..8ac000dbe Binary files /dev/null and b/install-new/fixtures/apple/img/p/MacBook_Air-medium.jpg differ diff --git a/install-new/fixtures/apple/img/p/MacBook_Air-small.jpg b/install-new/fixtures/apple/img/p/MacBook_Air-small.jpg new file mode 100644 index 000000000..6e7b475bc Binary files /dev/null and b/install-new/fixtures/apple/img/p/MacBook_Air-small.jpg differ diff --git a/install-new/fixtures/apple/img/p/MacBook_Air-thickbox.jpg b/install-new/fixtures/apple/img/p/MacBook_Air-thickbox.jpg new file mode 100644 index 000000000..876011964 Binary files /dev/null and b/install-new/fixtures/apple/img/p/MacBook_Air-thickbox.jpg differ diff --git a/install-new/fixtures/apple/img/p/MacBook_Air.jpg b/install-new/fixtures/apple/img/p/MacBook_Air.jpg new file mode 100644 index 000000000..1960498ee Binary files /dev/null and b/install-new/fixtures/apple/img/p/MacBook_Air.jpg differ diff --git a/install-new/fixtures/apple/img/p/MacBook_Air_1-home.jpg b/install-new/fixtures/apple/img/p/MacBook_Air_1-home.jpg new file mode 100644 index 000000000..2e9c8dd22 Binary files /dev/null and b/install-new/fixtures/apple/img/p/MacBook_Air_1-home.jpg differ diff --git a/install-new/fixtures/apple/img/p/MacBook_Air_1-large.jpg b/install-new/fixtures/apple/img/p/MacBook_Air_1-large.jpg new file mode 100644 index 000000000..df53cf7e1 Binary files /dev/null and b/install-new/fixtures/apple/img/p/MacBook_Air_1-large.jpg differ diff --git a/install-new/fixtures/apple/img/p/MacBook_Air_1-medium.jpg b/install-new/fixtures/apple/img/p/MacBook_Air_1-medium.jpg new file mode 100644 index 000000000..dfd870baf Binary files /dev/null and b/install-new/fixtures/apple/img/p/MacBook_Air_1-medium.jpg differ diff --git a/install-new/fixtures/apple/img/p/MacBook_Air_1-small.jpg b/install-new/fixtures/apple/img/p/MacBook_Air_1-small.jpg new file mode 100644 index 000000000..a9b64a4b3 Binary files /dev/null and b/install-new/fixtures/apple/img/p/MacBook_Air_1-small.jpg differ diff --git a/install-new/fixtures/apple/img/p/MacBook_Air_1-thickbox.jpg b/install-new/fixtures/apple/img/p/MacBook_Air_1-thickbox.jpg new file mode 100644 index 000000000..ccb830ecf Binary files /dev/null and b/install-new/fixtures/apple/img/p/MacBook_Air_1-thickbox.jpg differ diff --git a/install-new/fixtures/apple/img/p/MacBook_Air_1.jpg b/install-new/fixtures/apple/img/p/MacBook_Air_1.jpg new file mode 100644 index 000000000..4f0877bac Binary files /dev/null and b/install-new/fixtures/apple/img/p/MacBook_Air_1.jpg differ diff --git a/install-new/fixtures/apple/img/p/MacBook_Air_2-home.jpg b/install-new/fixtures/apple/img/p/MacBook_Air_2-home.jpg new file mode 100644 index 000000000..fc80cc7f0 Binary files /dev/null and b/install-new/fixtures/apple/img/p/MacBook_Air_2-home.jpg differ diff --git a/install-new/fixtures/apple/img/p/MacBook_Air_2-large.jpg b/install-new/fixtures/apple/img/p/MacBook_Air_2-large.jpg new file mode 100644 index 000000000..34b5f88bc Binary files /dev/null and b/install-new/fixtures/apple/img/p/MacBook_Air_2-large.jpg differ diff --git a/install-new/fixtures/apple/img/p/MacBook_Air_2-medium.jpg b/install-new/fixtures/apple/img/p/MacBook_Air_2-medium.jpg new file mode 100644 index 000000000..4f7565101 Binary files /dev/null and b/install-new/fixtures/apple/img/p/MacBook_Air_2-medium.jpg differ diff --git a/install-new/fixtures/apple/img/p/MacBook_Air_2-small.jpg b/install-new/fixtures/apple/img/p/MacBook_Air_2-small.jpg new file mode 100644 index 000000000..172d1d28f Binary files /dev/null and b/install-new/fixtures/apple/img/p/MacBook_Air_2-small.jpg differ diff --git a/install-new/fixtures/apple/img/p/MacBook_Air_2-thickbox.jpg b/install-new/fixtures/apple/img/p/MacBook_Air_2-thickbox.jpg new file mode 100644 index 000000000..28e8f2bd6 Binary files /dev/null and b/install-new/fixtures/apple/img/p/MacBook_Air_2-thickbox.jpg differ diff --git a/install-new/fixtures/apple/img/p/MacBook_Air_2.jpg b/install-new/fixtures/apple/img/p/MacBook_Air_2.jpg new file mode 100644 index 000000000..29d21da77 Binary files /dev/null and b/install-new/fixtures/apple/img/p/MacBook_Air_2.jpg differ diff --git a/install-new/fixtures/apple/img/p/MacBook_Air_3-home.jpg b/install-new/fixtures/apple/img/p/MacBook_Air_3-home.jpg new file mode 100644 index 000000000..2b6d451af Binary files /dev/null and b/install-new/fixtures/apple/img/p/MacBook_Air_3-home.jpg differ diff --git a/install-new/fixtures/apple/img/p/MacBook_Air_3-large.jpg b/install-new/fixtures/apple/img/p/MacBook_Air_3-large.jpg new file mode 100644 index 000000000..25b98137c Binary files /dev/null and b/install-new/fixtures/apple/img/p/MacBook_Air_3-large.jpg differ diff --git a/install-new/fixtures/apple/img/p/MacBook_Air_3-medium.jpg b/install-new/fixtures/apple/img/p/MacBook_Air_3-medium.jpg new file mode 100644 index 000000000..c7c5c293a Binary files /dev/null and b/install-new/fixtures/apple/img/p/MacBook_Air_3-medium.jpg differ diff --git a/install-new/fixtures/apple/img/p/MacBook_Air_3-small.jpg b/install-new/fixtures/apple/img/p/MacBook_Air_3-small.jpg new file mode 100644 index 000000000..b6a562e15 Binary files /dev/null and b/install-new/fixtures/apple/img/p/MacBook_Air_3-small.jpg differ diff --git a/install-new/fixtures/apple/img/p/MacBook_Air_3-thickbox.jpg b/install-new/fixtures/apple/img/p/MacBook_Air_3-thickbox.jpg new file mode 100644 index 000000000..cb56e5a67 Binary files /dev/null and b/install-new/fixtures/apple/img/p/MacBook_Air_3-thickbox.jpg differ diff --git a/install-new/fixtures/apple/img/p/MacBook_Air_3.jpg b/install-new/fixtures/apple/img/p/MacBook_Air_3.jpg new file mode 100644 index 000000000..b29f3fe55 Binary files /dev/null and b/install-new/fixtures/apple/img/p/MacBook_Air_3.jpg differ diff --git a/install-new/fixtures/apple/img/p/MacBook_Air_4-home.jpg b/install-new/fixtures/apple/img/p/MacBook_Air_4-home.jpg new file mode 100644 index 000000000..b7e2e252f Binary files /dev/null and b/install-new/fixtures/apple/img/p/MacBook_Air_4-home.jpg differ diff --git a/install-new/fixtures/apple/img/p/MacBook_Air_4-large.jpg b/install-new/fixtures/apple/img/p/MacBook_Air_4-large.jpg new file mode 100644 index 000000000..1726b9711 Binary files /dev/null and b/install-new/fixtures/apple/img/p/MacBook_Air_4-large.jpg differ diff --git a/install-new/fixtures/apple/img/p/MacBook_Air_4-medium.jpg b/install-new/fixtures/apple/img/p/MacBook_Air_4-medium.jpg new file mode 100644 index 000000000..c6f3cf1bf Binary files /dev/null and b/install-new/fixtures/apple/img/p/MacBook_Air_4-medium.jpg differ diff --git a/install-new/fixtures/apple/img/p/MacBook_Air_4-small.jpg b/install-new/fixtures/apple/img/p/MacBook_Air_4-small.jpg new file mode 100644 index 000000000..d2835e13e Binary files /dev/null and b/install-new/fixtures/apple/img/p/MacBook_Air_4-small.jpg differ diff --git a/install-new/fixtures/apple/img/p/MacBook_Air_4-thickbox.jpg b/install-new/fixtures/apple/img/p/MacBook_Air_4-thickbox.jpg new file mode 100644 index 000000000..aa86db11a Binary files /dev/null and b/install-new/fixtures/apple/img/p/MacBook_Air_4-thickbox.jpg differ diff --git a/install-new/fixtures/apple/img/p/MacBook_Air_4.jpg b/install-new/fixtures/apple/img/p/MacBook_Air_4.jpg new file mode 100644 index 000000000..ea5e14a37 Binary files /dev/null and b/install-new/fixtures/apple/img/p/MacBook_Air_4.jpg differ diff --git a/install-new/fixtures/apple/img/p/MacBook_Air_SuperDrive-home.jpg b/install-new/fixtures/apple/img/p/MacBook_Air_SuperDrive-home.jpg new file mode 100644 index 000000000..4f45e69d5 Binary files /dev/null and b/install-new/fixtures/apple/img/p/MacBook_Air_SuperDrive-home.jpg differ diff --git a/install-new/fixtures/apple/img/p/MacBook_Air_SuperDrive-large.jpg b/install-new/fixtures/apple/img/p/MacBook_Air_SuperDrive-large.jpg new file mode 100644 index 000000000..27cc9190d Binary files /dev/null and b/install-new/fixtures/apple/img/p/MacBook_Air_SuperDrive-large.jpg differ diff --git a/install-new/fixtures/apple/img/p/MacBook_Air_SuperDrive-medium.jpg b/install-new/fixtures/apple/img/p/MacBook_Air_SuperDrive-medium.jpg new file mode 100644 index 000000000..99303fc10 Binary files /dev/null and b/install-new/fixtures/apple/img/p/MacBook_Air_SuperDrive-medium.jpg differ diff --git a/install-new/fixtures/apple/img/p/MacBook_Air_SuperDrive-small.jpg b/install-new/fixtures/apple/img/p/MacBook_Air_SuperDrive-small.jpg new file mode 100644 index 000000000..a9ef63ac8 Binary files /dev/null and b/install-new/fixtures/apple/img/p/MacBook_Air_SuperDrive-small.jpg differ diff --git a/install-new/fixtures/apple/img/p/MacBook_Air_SuperDrive-thickbox.jpg b/install-new/fixtures/apple/img/p/MacBook_Air_SuperDrive-thickbox.jpg new file mode 100644 index 000000000..f0f73e881 Binary files /dev/null and b/install-new/fixtures/apple/img/p/MacBook_Air_SuperDrive-thickbox.jpg differ diff --git a/install-new/fixtures/apple/img/p/MacBook_Air_SuperDrive.jpg b/install-new/fixtures/apple/img/p/MacBook_Air_SuperDrive.jpg new file mode 100644 index 000000000..4a53c6814 Binary files /dev/null and b/install-new/fixtures/apple/img/p/MacBook_Air_SuperDrive.jpg differ diff --git a/install-new/fixtures/apple/img/p/Shure_SE210_Sound-Isolating_Earphones_for_iPod_and_iPhone-home.jpg b/install-new/fixtures/apple/img/p/Shure_SE210_Sound-Isolating_Earphones_for_iPod_and_iPhone-home.jpg new file mode 100644 index 000000000..79f87c5a4 Binary files /dev/null and b/install-new/fixtures/apple/img/p/Shure_SE210_Sound-Isolating_Earphones_for_iPod_and_iPhone-home.jpg differ diff --git a/install-new/fixtures/apple/img/p/Shure_SE210_Sound-Isolating_Earphones_for_iPod_and_iPhone-large.jpg b/install-new/fixtures/apple/img/p/Shure_SE210_Sound-Isolating_Earphones_for_iPod_and_iPhone-large.jpg new file mode 100644 index 000000000..ee0159fa9 Binary files /dev/null and b/install-new/fixtures/apple/img/p/Shure_SE210_Sound-Isolating_Earphones_for_iPod_and_iPhone-large.jpg differ diff --git a/install-new/fixtures/apple/img/p/Shure_SE210_Sound-Isolating_Earphones_for_iPod_and_iPhone-medium.jpg b/install-new/fixtures/apple/img/p/Shure_SE210_Sound-Isolating_Earphones_for_iPod_and_iPhone-medium.jpg new file mode 100644 index 000000000..ad8a49bea Binary files /dev/null and b/install-new/fixtures/apple/img/p/Shure_SE210_Sound-Isolating_Earphones_for_iPod_and_iPhone-medium.jpg differ diff --git a/install-new/fixtures/apple/img/p/Shure_SE210_Sound-Isolating_Earphones_for_iPod_and_iPhone-small.jpg b/install-new/fixtures/apple/img/p/Shure_SE210_Sound-Isolating_Earphones_for_iPod_and_iPhone-small.jpg new file mode 100644 index 000000000..b52411168 Binary files /dev/null and b/install-new/fixtures/apple/img/p/Shure_SE210_Sound-Isolating_Earphones_for_iPod_and_iPhone-small.jpg differ diff --git a/install-new/fixtures/apple/img/p/Shure_SE210_Sound-Isolating_Earphones_for_iPod_and_iPhone-thickbox.jpg b/install-new/fixtures/apple/img/p/Shure_SE210_Sound-Isolating_Earphones_for_iPod_and_iPhone-thickbox.jpg new file mode 100644 index 000000000..d18acc958 Binary files /dev/null and b/install-new/fixtures/apple/img/p/Shure_SE210_Sound-Isolating_Earphones_for_iPod_and_iPhone-thickbox.jpg differ diff --git a/install-new/fixtures/apple/img/p/Shure_SE210_Sound-Isolating_Earphones_for_iPod_and_iPhone.jpg b/install-new/fixtures/apple/img/p/Shure_SE210_Sound-Isolating_Earphones_for_iPod_and_iPhone.jpg new file mode 100644 index 000000000..aaf80c7c1 Binary files /dev/null and b/install-new/fixtures/apple/img/p/Shure_SE210_Sound-Isolating_Earphones_for_iPod_and_iPhone.jpg differ diff --git a/install-new/fixtures/apple/img/p/housse-portefeuille-en-cuir-home.jpg b/install-new/fixtures/apple/img/p/housse-portefeuille-en-cuir-home.jpg new file mode 100644 index 000000000..1296372bc Binary files /dev/null and b/install-new/fixtures/apple/img/p/housse-portefeuille-en-cuir-home.jpg differ diff --git a/install-new/fixtures/apple/img/p/housse-portefeuille-en-cuir-large.jpg b/install-new/fixtures/apple/img/p/housse-portefeuille-en-cuir-large.jpg new file mode 100644 index 000000000..b598030d0 Binary files /dev/null and b/install-new/fixtures/apple/img/p/housse-portefeuille-en-cuir-large.jpg differ diff --git a/install-new/fixtures/apple/img/p/housse-portefeuille-en-cuir-medium.jpg b/install-new/fixtures/apple/img/p/housse-portefeuille-en-cuir-medium.jpg new file mode 100644 index 000000000..ed4a6208b Binary files /dev/null and b/install-new/fixtures/apple/img/p/housse-portefeuille-en-cuir-medium.jpg differ diff --git a/install-new/fixtures/apple/img/p/housse-portefeuille-en-cuir-small.jpg b/install-new/fixtures/apple/img/p/housse-portefeuille-en-cuir-small.jpg new file mode 100644 index 000000000..1d81d8704 Binary files /dev/null and b/install-new/fixtures/apple/img/p/housse-portefeuille-en-cuir-small.jpg differ diff --git a/install-new/fixtures/apple/img/p/housse-portefeuille-en-cuir-thickbox.jpg b/install-new/fixtures/apple/img/p/housse-portefeuille-en-cuir-thickbox.jpg new file mode 100644 index 000000000..80b3c0f55 Binary files /dev/null and b/install-new/fixtures/apple/img/p/housse-portefeuille-en-cuir-thickbox.jpg differ diff --git a/install-new/fixtures/apple/img/p/housse-portefeuille-en-cuir.jpg b/install-new/fixtures/apple/img/p/housse-portefeuille-en-cuir.jpg new file mode 100644 index 000000000..936488d1a Binary files /dev/null and b/install-new/fixtures/apple/img/p/housse-portefeuille-en-cuir.jpg differ diff --git a/install-new/fixtures/apple/img/p/iPod_Nano-home.jpg b/install-new/fixtures/apple/img/p/iPod_Nano-home.jpg new file mode 100644 index 000000000..237df68c8 Binary files /dev/null and b/install-new/fixtures/apple/img/p/iPod_Nano-home.jpg differ diff --git a/install-new/fixtures/apple/img/p/iPod_Nano-large.jpg b/install-new/fixtures/apple/img/p/iPod_Nano-large.jpg new file mode 100644 index 000000000..7bb9f9b5b Binary files /dev/null and b/install-new/fixtures/apple/img/p/iPod_Nano-large.jpg differ diff --git a/install-new/fixtures/apple/img/p/iPod_Nano-medium.jpg b/install-new/fixtures/apple/img/p/iPod_Nano-medium.jpg new file mode 100644 index 000000000..77c82cc2d Binary files /dev/null and b/install-new/fixtures/apple/img/p/iPod_Nano-medium.jpg differ diff --git a/install-new/fixtures/apple/img/p/iPod_Nano-small.jpg b/install-new/fixtures/apple/img/p/iPod_Nano-small.jpg new file mode 100644 index 000000000..1db056336 Binary files /dev/null and b/install-new/fixtures/apple/img/p/iPod_Nano-small.jpg differ diff --git a/install-new/fixtures/apple/img/p/iPod_Nano-thickbox.jpg b/install-new/fixtures/apple/img/p/iPod_Nano-thickbox.jpg new file mode 100644 index 000000000..e378c3b5b Binary files /dev/null and b/install-new/fixtures/apple/img/p/iPod_Nano-thickbox.jpg differ diff --git a/install-new/fixtures/apple/img/p/iPod_Nano.jpg b/install-new/fixtures/apple/img/p/iPod_Nano.jpg new file mode 100644 index 000000000..262687ad6 Binary files /dev/null and b/install-new/fixtures/apple/img/p/iPod_Nano.jpg differ diff --git a/install-new/fixtures/apple/img/p/iPod_Nano_1-home.jpg b/install-new/fixtures/apple/img/p/iPod_Nano_1-home.jpg new file mode 100644 index 000000000..483ad0b83 Binary files /dev/null and b/install-new/fixtures/apple/img/p/iPod_Nano_1-home.jpg differ diff --git a/install-new/fixtures/apple/img/p/iPod_Nano_1-large.jpg b/install-new/fixtures/apple/img/p/iPod_Nano_1-large.jpg new file mode 100644 index 000000000..96208b1e0 Binary files /dev/null and b/install-new/fixtures/apple/img/p/iPod_Nano_1-large.jpg differ diff --git a/install-new/fixtures/apple/img/p/iPod_Nano_1-medium.jpg b/install-new/fixtures/apple/img/p/iPod_Nano_1-medium.jpg new file mode 100644 index 000000000..4e9b86777 Binary files /dev/null and b/install-new/fixtures/apple/img/p/iPod_Nano_1-medium.jpg differ diff --git a/install-new/fixtures/apple/img/p/iPod_Nano_1-small.jpg b/install-new/fixtures/apple/img/p/iPod_Nano_1-small.jpg new file mode 100644 index 000000000..fcb936332 Binary files /dev/null and b/install-new/fixtures/apple/img/p/iPod_Nano_1-small.jpg differ diff --git a/install-new/fixtures/apple/img/p/iPod_Nano_1-thickbox.jpg b/install-new/fixtures/apple/img/p/iPod_Nano_1-thickbox.jpg new file mode 100644 index 000000000..077999b2c Binary files /dev/null and b/install-new/fixtures/apple/img/p/iPod_Nano_1-thickbox.jpg differ diff --git a/install-new/fixtures/apple/img/p/iPod_Nano_1.jpg b/install-new/fixtures/apple/img/p/iPod_Nano_1.jpg new file mode 100644 index 000000000..6ae301a6c Binary files /dev/null and b/install-new/fixtures/apple/img/p/iPod_Nano_1.jpg differ diff --git a/install-new/fixtures/apple/img/p/iPod_Nano_2-home.jpg b/install-new/fixtures/apple/img/p/iPod_Nano_2-home.jpg new file mode 100644 index 000000000..d01d08f48 Binary files /dev/null and b/install-new/fixtures/apple/img/p/iPod_Nano_2-home.jpg differ diff --git a/install-new/fixtures/apple/img/p/iPod_Nano_2-large.jpg b/install-new/fixtures/apple/img/p/iPod_Nano_2-large.jpg new file mode 100644 index 000000000..097af0de7 Binary files /dev/null and b/install-new/fixtures/apple/img/p/iPod_Nano_2-large.jpg differ diff --git a/install-new/fixtures/apple/img/p/iPod_Nano_2-medium.jpg b/install-new/fixtures/apple/img/p/iPod_Nano_2-medium.jpg new file mode 100644 index 000000000..f9855ef8c Binary files /dev/null and b/install-new/fixtures/apple/img/p/iPod_Nano_2-medium.jpg differ diff --git a/install-new/fixtures/apple/img/p/iPod_Nano_2-small.jpg b/install-new/fixtures/apple/img/p/iPod_Nano_2-small.jpg new file mode 100644 index 000000000..0ea3d1ca8 Binary files /dev/null and b/install-new/fixtures/apple/img/p/iPod_Nano_2-small.jpg differ diff --git a/install-new/fixtures/apple/img/p/iPod_Nano_2-thickbox.jpg b/install-new/fixtures/apple/img/p/iPod_Nano_2-thickbox.jpg new file mode 100644 index 000000000..782173a26 Binary files /dev/null and b/install-new/fixtures/apple/img/p/iPod_Nano_2-thickbox.jpg differ diff --git a/install-new/fixtures/apple/img/p/iPod_Nano_2.jpg b/install-new/fixtures/apple/img/p/iPod_Nano_2.jpg new file mode 100644 index 000000000..743b8289a Binary files /dev/null and b/install-new/fixtures/apple/img/p/iPod_Nano_2.jpg differ diff --git a/install-new/fixtures/apple/img/p/iPod_Nano_3-home.jpg b/install-new/fixtures/apple/img/p/iPod_Nano_3-home.jpg new file mode 100644 index 000000000..82945fe26 Binary files /dev/null and b/install-new/fixtures/apple/img/p/iPod_Nano_3-home.jpg differ diff --git a/install-new/fixtures/apple/img/p/iPod_Nano_3-large.jpg b/install-new/fixtures/apple/img/p/iPod_Nano_3-large.jpg new file mode 100644 index 000000000..e85cebc56 Binary files /dev/null and b/install-new/fixtures/apple/img/p/iPod_Nano_3-large.jpg differ diff --git a/install-new/fixtures/apple/img/p/iPod_Nano_3-medium.jpg b/install-new/fixtures/apple/img/p/iPod_Nano_3-medium.jpg new file mode 100644 index 000000000..cb3762ea1 Binary files /dev/null and b/install-new/fixtures/apple/img/p/iPod_Nano_3-medium.jpg differ diff --git a/install-new/fixtures/apple/img/p/iPod_Nano_3-small.jpg b/install-new/fixtures/apple/img/p/iPod_Nano_3-small.jpg new file mode 100644 index 000000000..daab53863 Binary files /dev/null and b/install-new/fixtures/apple/img/p/iPod_Nano_3-small.jpg differ diff --git a/install-new/fixtures/apple/img/p/iPod_Nano_3-thickbox.jpg b/install-new/fixtures/apple/img/p/iPod_Nano_3-thickbox.jpg new file mode 100644 index 000000000..007c419a2 Binary files /dev/null and b/install-new/fixtures/apple/img/p/iPod_Nano_3-thickbox.jpg differ diff --git a/install-new/fixtures/apple/img/p/iPod_Nano_3.jpg b/install-new/fixtures/apple/img/p/iPod_Nano_3.jpg new file mode 100644 index 000000000..66f4e1147 Binary files /dev/null and b/install-new/fixtures/apple/img/p/iPod_Nano_3.jpg differ diff --git a/install-new/fixtures/apple/img/p/iPod_Nano_4-home.jpg b/install-new/fixtures/apple/img/p/iPod_Nano_4-home.jpg new file mode 100644 index 000000000..3f7dc71ce Binary files /dev/null and b/install-new/fixtures/apple/img/p/iPod_Nano_4-home.jpg differ diff --git a/install-new/fixtures/apple/img/p/iPod_Nano_4-large.jpg b/install-new/fixtures/apple/img/p/iPod_Nano_4-large.jpg new file mode 100644 index 000000000..2cb0f90be Binary files /dev/null and b/install-new/fixtures/apple/img/p/iPod_Nano_4-large.jpg differ diff --git a/install-new/fixtures/apple/img/p/iPod_Nano_4-medium.jpg b/install-new/fixtures/apple/img/p/iPod_Nano_4-medium.jpg new file mode 100644 index 000000000..32bb8fcf5 Binary files /dev/null and b/install-new/fixtures/apple/img/p/iPod_Nano_4-medium.jpg differ diff --git a/install-new/fixtures/apple/img/p/iPod_Nano_4-small.jpg b/install-new/fixtures/apple/img/p/iPod_Nano_4-small.jpg new file mode 100644 index 000000000..3f030fdd3 Binary files /dev/null and b/install-new/fixtures/apple/img/p/iPod_Nano_4-small.jpg differ diff --git a/install-new/fixtures/apple/img/p/iPod_Nano_4-thickbox.jpg b/install-new/fixtures/apple/img/p/iPod_Nano_4-thickbox.jpg new file mode 100644 index 000000000..e60a7b7ae Binary files /dev/null and b/install-new/fixtures/apple/img/p/iPod_Nano_4-thickbox.jpg differ diff --git a/install-new/fixtures/apple/img/p/iPod_Nano_4.jpg b/install-new/fixtures/apple/img/p/iPod_Nano_4.jpg new file mode 100644 index 000000000..d1e35ad30 Binary files /dev/null and b/install-new/fixtures/apple/img/p/iPod_Nano_4.jpg differ diff --git a/install-new/fixtures/apple/img/p/iPod_Nano_5-home.jpg b/install-new/fixtures/apple/img/p/iPod_Nano_5-home.jpg new file mode 100644 index 000000000..f25953bd3 Binary files /dev/null and b/install-new/fixtures/apple/img/p/iPod_Nano_5-home.jpg differ diff --git a/install-new/fixtures/apple/img/p/iPod_Nano_5-large.jpg b/install-new/fixtures/apple/img/p/iPod_Nano_5-large.jpg new file mode 100644 index 000000000..3e5062ed6 Binary files /dev/null and b/install-new/fixtures/apple/img/p/iPod_Nano_5-large.jpg differ diff --git a/install-new/fixtures/apple/img/p/iPod_Nano_5-medium.jpg b/install-new/fixtures/apple/img/p/iPod_Nano_5-medium.jpg new file mode 100644 index 000000000..38e9e0443 Binary files /dev/null and b/install-new/fixtures/apple/img/p/iPod_Nano_5-medium.jpg differ diff --git a/install-new/fixtures/apple/img/p/iPod_Nano_5-small.jpg b/install-new/fixtures/apple/img/p/iPod_Nano_5-small.jpg new file mode 100644 index 000000000..92e3b4022 Binary files /dev/null and b/install-new/fixtures/apple/img/p/iPod_Nano_5-small.jpg differ diff --git a/install-new/fixtures/apple/img/p/iPod_Nano_5-thickbox.jpg b/install-new/fixtures/apple/img/p/iPod_Nano_5-thickbox.jpg new file mode 100644 index 000000000..2586677b5 Binary files /dev/null and b/install-new/fixtures/apple/img/p/iPod_Nano_5-thickbox.jpg differ diff --git a/install-new/fixtures/apple/img/p/iPod_Nano_5.jpg b/install-new/fixtures/apple/img/p/iPod_Nano_5.jpg new file mode 100644 index 000000000..331e3b93c Binary files /dev/null and b/install-new/fixtures/apple/img/p/iPod_Nano_5.jpg differ diff --git a/install-new/fixtures/apple/img/p/iPod_Nano_6-home.jpg b/install-new/fixtures/apple/img/p/iPod_Nano_6-home.jpg new file mode 100644 index 000000000..daa729998 Binary files /dev/null and b/install-new/fixtures/apple/img/p/iPod_Nano_6-home.jpg differ diff --git a/install-new/fixtures/apple/img/p/iPod_Nano_6-large.jpg b/install-new/fixtures/apple/img/p/iPod_Nano_6-large.jpg new file mode 100644 index 000000000..40feb4231 Binary files /dev/null and b/install-new/fixtures/apple/img/p/iPod_Nano_6-large.jpg differ diff --git a/install-new/fixtures/apple/img/p/iPod_Nano_6-medium.jpg b/install-new/fixtures/apple/img/p/iPod_Nano_6-medium.jpg new file mode 100644 index 000000000..d5b387d4d Binary files /dev/null and b/install-new/fixtures/apple/img/p/iPod_Nano_6-medium.jpg differ diff --git a/install-new/fixtures/apple/img/p/iPod_Nano_6-small.jpg b/install-new/fixtures/apple/img/p/iPod_Nano_6-small.jpg new file mode 100644 index 000000000..40e9cedf1 Binary files /dev/null and b/install-new/fixtures/apple/img/p/iPod_Nano_6-small.jpg differ diff --git a/install-new/fixtures/apple/img/p/iPod_Nano_6-thickbox.jpg b/install-new/fixtures/apple/img/p/iPod_Nano_6-thickbox.jpg new file mode 100644 index 000000000..cbe36c52d Binary files /dev/null and b/install-new/fixtures/apple/img/p/iPod_Nano_6-thickbox.jpg differ diff --git a/install-new/fixtures/apple/img/p/iPod_Nano_6.jpg b/install-new/fixtures/apple/img/p/iPod_Nano_6.jpg new file mode 100644 index 000000000..81795b2f9 Binary files /dev/null and b/install-new/fixtures/apple/img/p/iPod_Nano_6.jpg differ diff --git a/install-new/fixtures/apple/img/p/iPod_Nano_7-home.jpg b/install-new/fixtures/apple/img/p/iPod_Nano_7-home.jpg new file mode 100644 index 000000000..f19e48d39 Binary files /dev/null and b/install-new/fixtures/apple/img/p/iPod_Nano_7-home.jpg differ diff --git a/install-new/fixtures/apple/img/p/iPod_Nano_7-large.jpg b/install-new/fixtures/apple/img/p/iPod_Nano_7-large.jpg new file mode 100644 index 000000000..956ace051 Binary files /dev/null and b/install-new/fixtures/apple/img/p/iPod_Nano_7-large.jpg differ diff --git a/install-new/fixtures/apple/img/p/iPod_Nano_7-medium.jpg b/install-new/fixtures/apple/img/p/iPod_Nano_7-medium.jpg new file mode 100644 index 000000000..54701493a Binary files /dev/null and b/install-new/fixtures/apple/img/p/iPod_Nano_7-medium.jpg differ diff --git a/install-new/fixtures/apple/img/p/iPod_Nano_7-small.jpg b/install-new/fixtures/apple/img/p/iPod_Nano_7-small.jpg new file mode 100644 index 000000000..47c8f3bfc Binary files /dev/null and b/install-new/fixtures/apple/img/p/iPod_Nano_7-small.jpg differ diff --git a/install-new/fixtures/apple/img/p/iPod_Nano_7-thickbox.jpg b/install-new/fixtures/apple/img/p/iPod_Nano_7-thickbox.jpg new file mode 100644 index 000000000..c422fd872 Binary files /dev/null and b/install-new/fixtures/apple/img/p/iPod_Nano_7-thickbox.jpg differ diff --git a/install-new/fixtures/apple/img/p/iPod_Nano_7.jpg b/install-new/fixtures/apple/img/p/iPod_Nano_7.jpg new file mode 100644 index 000000000..96b6abb2c Binary files /dev/null and b/install-new/fixtures/apple/img/p/iPod_Nano_7.jpg differ diff --git a/install-new/fixtures/apple/img/p/iPod_shuffle-home.jpg b/install-new/fixtures/apple/img/p/iPod_shuffle-home.jpg new file mode 100644 index 000000000..bf0ae1e37 Binary files /dev/null and b/install-new/fixtures/apple/img/p/iPod_shuffle-home.jpg differ diff --git a/install-new/fixtures/apple/img/p/iPod_shuffle-large.jpg b/install-new/fixtures/apple/img/p/iPod_shuffle-large.jpg new file mode 100644 index 000000000..9ebcb82b2 Binary files /dev/null and b/install-new/fixtures/apple/img/p/iPod_shuffle-large.jpg differ diff --git a/install-new/fixtures/apple/img/p/iPod_shuffle-medium.jpg b/install-new/fixtures/apple/img/p/iPod_shuffle-medium.jpg new file mode 100644 index 000000000..fdff1e7f9 Binary files /dev/null and b/install-new/fixtures/apple/img/p/iPod_shuffle-medium.jpg differ diff --git a/install-new/fixtures/apple/img/p/iPod_shuffle-small.jpg b/install-new/fixtures/apple/img/p/iPod_shuffle-small.jpg new file mode 100644 index 000000000..0abadf72d Binary files /dev/null and b/install-new/fixtures/apple/img/p/iPod_shuffle-small.jpg differ diff --git a/install-new/fixtures/apple/img/p/iPod_shuffle-thickbox.jpg b/install-new/fixtures/apple/img/p/iPod_shuffle-thickbox.jpg new file mode 100644 index 000000000..e38056f46 Binary files /dev/null and b/install-new/fixtures/apple/img/p/iPod_shuffle-thickbox.jpg differ diff --git a/install-new/fixtures/apple/img/p/iPod_shuffle.jpg b/install-new/fixtures/apple/img/p/iPod_shuffle.jpg new file mode 100644 index 000000000..ac4676bdb Binary files /dev/null and b/install-new/fixtures/apple/img/p/iPod_shuffle.jpg differ diff --git a/install-new/fixtures/apple/img/p/iPod_shuffle_1-home.jpg b/install-new/fixtures/apple/img/p/iPod_shuffle_1-home.jpg new file mode 100644 index 000000000..fb63c3e3f Binary files /dev/null and b/install-new/fixtures/apple/img/p/iPod_shuffle_1-home.jpg differ diff --git a/install-new/fixtures/apple/img/p/iPod_shuffle_1-large.jpg b/install-new/fixtures/apple/img/p/iPod_shuffle_1-large.jpg new file mode 100644 index 000000000..67472a981 Binary files /dev/null and b/install-new/fixtures/apple/img/p/iPod_shuffle_1-large.jpg differ diff --git a/install-new/fixtures/apple/img/p/iPod_shuffle_1-medium.jpg b/install-new/fixtures/apple/img/p/iPod_shuffle_1-medium.jpg new file mode 100644 index 000000000..c4979c257 Binary files /dev/null and b/install-new/fixtures/apple/img/p/iPod_shuffle_1-medium.jpg differ diff --git a/install-new/fixtures/apple/img/p/iPod_shuffle_1-small.jpg b/install-new/fixtures/apple/img/p/iPod_shuffle_1-small.jpg new file mode 100644 index 000000000..47e09a44b Binary files /dev/null and b/install-new/fixtures/apple/img/p/iPod_shuffle_1-small.jpg differ diff --git a/install-new/fixtures/apple/img/p/iPod_shuffle_1-thickbox.jpg b/install-new/fixtures/apple/img/p/iPod_shuffle_1-thickbox.jpg new file mode 100644 index 000000000..274784a99 Binary files /dev/null and b/install-new/fixtures/apple/img/p/iPod_shuffle_1-thickbox.jpg differ diff --git a/install-new/fixtures/apple/img/p/iPod_shuffle_1.jpg b/install-new/fixtures/apple/img/p/iPod_shuffle_1.jpg new file mode 100644 index 000000000..f684926bb Binary files /dev/null and b/install-new/fixtures/apple/img/p/iPod_shuffle_1.jpg differ diff --git a/install-new/fixtures/apple/img/p/iPod_shuffle_2-home.jpg b/install-new/fixtures/apple/img/p/iPod_shuffle_2-home.jpg new file mode 100644 index 000000000..110006570 Binary files /dev/null and b/install-new/fixtures/apple/img/p/iPod_shuffle_2-home.jpg differ diff --git a/install-new/fixtures/apple/img/p/iPod_shuffle_2-large.jpg b/install-new/fixtures/apple/img/p/iPod_shuffle_2-large.jpg new file mode 100644 index 000000000..7cf5e2a83 Binary files /dev/null and b/install-new/fixtures/apple/img/p/iPod_shuffle_2-large.jpg differ diff --git a/install-new/fixtures/apple/img/p/iPod_shuffle_2-medium.jpg b/install-new/fixtures/apple/img/p/iPod_shuffle_2-medium.jpg new file mode 100644 index 000000000..7224a6f42 Binary files /dev/null and b/install-new/fixtures/apple/img/p/iPod_shuffle_2-medium.jpg differ diff --git a/install-new/fixtures/apple/img/p/iPod_shuffle_2-small.jpg b/install-new/fixtures/apple/img/p/iPod_shuffle_2-small.jpg new file mode 100644 index 000000000..a1b502ab1 Binary files /dev/null and b/install-new/fixtures/apple/img/p/iPod_shuffle_2-small.jpg differ diff --git a/install-new/fixtures/apple/img/p/iPod_shuffle_2-thickbox.jpg b/install-new/fixtures/apple/img/p/iPod_shuffle_2-thickbox.jpg new file mode 100644 index 000000000..82f8d50bc Binary files /dev/null and b/install-new/fixtures/apple/img/p/iPod_shuffle_2-thickbox.jpg differ diff --git a/install-new/fixtures/apple/img/p/iPod_shuffle_2.jpg b/install-new/fixtures/apple/img/p/iPod_shuffle_2.jpg new file mode 100644 index 000000000..67cf9de33 Binary files /dev/null and b/install-new/fixtures/apple/img/p/iPod_shuffle_2.jpg differ diff --git a/install-new/fixtures/apple/img/p/iPod_shuffle_3-home.jpg b/install-new/fixtures/apple/img/p/iPod_shuffle_3-home.jpg new file mode 100644 index 000000000..1ffe47e48 Binary files /dev/null and b/install-new/fixtures/apple/img/p/iPod_shuffle_3-home.jpg differ diff --git a/install-new/fixtures/apple/img/p/iPod_shuffle_3-large.jpg b/install-new/fixtures/apple/img/p/iPod_shuffle_3-large.jpg new file mode 100644 index 000000000..15847b088 Binary files /dev/null and b/install-new/fixtures/apple/img/p/iPod_shuffle_3-large.jpg differ diff --git a/install-new/fixtures/apple/img/p/iPod_shuffle_3-medium.jpg b/install-new/fixtures/apple/img/p/iPod_shuffle_3-medium.jpg new file mode 100644 index 000000000..4892ae73e Binary files /dev/null and b/install-new/fixtures/apple/img/p/iPod_shuffle_3-medium.jpg differ diff --git a/install-new/fixtures/apple/img/p/iPod_shuffle_3-small.jpg b/install-new/fixtures/apple/img/p/iPod_shuffle_3-small.jpg new file mode 100644 index 000000000..c6191a372 Binary files /dev/null and b/install-new/fixtures/apple/img/p/iPod_shuffle_3-small.jpg differ diff --git a/install-new/fixtures/apple/img/p/iPod_shuffle_3-thickbox.jpg b/install-new/fixtures/apple/img/p/iPod_shuffle_3-thickbox.jpg new file mode 100644 index 000000000..5f1ba4d62 Binary files /dev/null and b/install-new/fixtures/apple/img/p/iPod_shuffle_3-thickbox.jpg differ diff --git a/install-new/fixtures/apple/img/p/iPod_shuffle_3.jpg b/install-new/fixtures/apple/img/p/iPod_shuffle_3.jpg new file mode 100644 index 000000000..754de0739 Binary files /dev/null and b/install-new/fixtures/apple/img/p/iPod_shuffle_3.jpg differ diff --git a/install-new/fixtures/apple/img/p/iPod_touch-home.jpg b/install-new/fixtures/apple/img/p/iPod_touch-home.jpg new file mode 100644 index 000000000..61e14a4c6 Binary files /dev/null and b/install-new/fixtures/apple/img/p/iPod_touch-home.jpg differ diff --git a/install-new/fixtures/apple/img/p/iPod_touch-large.jpg b/install-new/fixtures/apple/img/p/iPod_touch-large.jpg new file mode 100644 index 000000000..957a11b22 Binary files /dev/null and b/install-new/fixtures/apple/img/p/iPod_touch-large.jpg differ diff --git a/install-new/fixtures/apple/img/p/iPod_touch-medium.jpg b/install-new/fixtures/apple/img/p/iPod_touch-medium.jpg new file mode 100644 index 000000000..8532093d4 Binary files /dev/null and b/install-new/fixtures/apple/img/p/iPod_touch-medium.jpg differ diff --git a/install-new/fixtures/apple/img/p/iPod_touch-small.jpg b/install-new/fixtures/apple/img/p/iPod_touch-small.jpg new file mode 100644 index 000000000..8179f3877 Binary files /dev/null and b/install-new/fixtures/apple/img/p/iPod_touch-small.jpg differ diff --git a/install-new/fixtures/apple/img/p/iPod_touch-thickbox.jpg b/install-new/fixtures/apple/img/p/iPod_touch-thickbox.jpg new file mode 100644 index 000000000..868fdd3c5 Binary files /dev/null and b/install-new/fixtures/apple/img/p/iPod_touch-thickbox.jpg differ diff --git a/install-new/fixtures/apple/img/p/iPod_touch.jpg b/install-new/fixtures/apple/img/p/iPod_touch.jpg new file mode 100644 index 000000000..8a3f0cc3c Binary files /dev/null and b/install-new/fixtures/apple/img/p/iPod_touch.jpg differ diff --git a/install-new/fixtures/apple/img/p/iPod_touch_1-home.jpg b/install-new/fixtures/apple/img/p/iPod_touch_1-home.jpg new file mode 100644 index 000000000..e18019683 Binary files /dev/null and b/install-new/fixtures/apple/img/p/iPod_touch_1-home.jpg differ diff --git a/install-new/fixtures/apple/img/p/iPod_touch_1-large.jpg b/install-new/fixtures/apple/img/p/iPod_touch_1-large.jpg new file mode 100644 index 000000000..0e2357185 Binary files /dev/null and b/install-new/fixtures/apple/img/p/iPod_touch_1-large.jpg differ diff --git a/install-new/fixtures/apple/img/p/iPod_touch_1-medium.jpg b/install-new/fixtures/apple/img/p/iPod_touch_1-medium.jpg new file mode 100644 index 000000000..1d3b8d850 Binary files /dev/null and b/install-new/fixtures/apple/img/p/iPod_touch_1-medium.jpg differ diff --git a/install-new/fixtures/apple/img/p/iPod_touch_1-small.jpg b/install-new/fixtures/apple/img/p/iPod_touch_1-small.jpg new file mode 100644 index 000000000..657960993 Binary files /dev/null and b/install-new/fixtures/apple/img/p/iPod_touch_1-small.jpg differ diff --git a/install-new/fixtures/apple/img/p/iPod_touch_1-thickbox.jpg b/install-new/fixtures/apple/img/p/iPod_touch_1-thickbox.jpg new file mode 100644 index 000000000..e37ddab82 Binary files /dev/null and b/install-new/fixtures/apple/img/p/iPod_touch_1-thickbox.jpg differ diff --git a/install-new/fixtures/apple/img/p/iPod_touch_1.jpg b/install-new/fixtures/apple/img/p/iPod_touch_1.jpg new file mode 100644 index 000000000..cf547f514 Binary files /dev/null and b/install-new/fixtures/apple/img/p/iPod_touch_1.jpg differ diff --git a/install-new/fixtures/apple/img/p/iPod_touch_2-home.jpg b/install-new/fixtures/apple/img/p/iPod_touch_2-home.jpg new file mode 100644 index 000000000..53fbe8711 Binary files /dev/null and b/install-new/fixtures/apple/img/p/iPod_touch_2-home.jpg differ diff --git a/install-new/fixtures/apple/img/p/iPod_touch_2-large.jpg b/install-new/fixtures/apple/img/p/iPod_touch_2-large.jpg new file mode 100644 index 000000000..84098b969 Binary files /dev/null and b/install-new/fixtures/apple/img/p/iPod_touch_2-large.jpg differ diff --git a/install-new/fixtures/apple/img/p/iPod_touch_2-medium.jpg b/install-new/fixtures/apple/img/p/iPod_touch_2-medium.jpg new file mode 100644 index 000000000..ab04c2c16 Binary files /dev/null and b/install-new/fixtures/apple/img/p/iPod_touch_2-medium.jpg differ diff --git a/install-new/fixtures/apple/img/p/iPod_touch_2-small.jpg b/install-new/fixtures/apple/img/p/iPod_touch_2-small.jpg new file mode 100644 index 000000000..43a581a8a Binary files /dev/null and b/install-new/fixtures/apple/img/p/iPod_touch_2-small.jpg differ diff --git a/install-new/fixtures/apple/img/p/iPod_touch_2-thickbox.jpg b/install-new/fixtures/apple/img/p/iPod_touch_2-thickbox.jpg new file mode 100644 index 000000000..d05a22039 Binary files /dev/null and b/install-new/fixtures/apple/img/p/iPod_touch_2-thickbox.jpg differ diff --git a/install-new/fixtures/apple/img/p/iPod_touch_2.jpg b/install-new/fixtures/apple/img/p/iPod_touch_2.jpg new file mode 100644 index 000000000..a09ffb565 Binary files /dev/null and b/install-new/fixtures/apple/img/p/iPod_touch_2.jpg differ diff --git a/install-new/fixtures/apple/img/p/iPod_touch_3-home.jpg b/install-new/fixtures/apple/img/p/iPod_touch_3-home.jpg new file mode 100644 index 000000000..6c0c79143 Binary files /dev/null and b/install-new/fixtures/apple/img/p/iPod_touch_3-home.jpg differ diff --git a/install-new/fixtures/apple/img/p/iPod_touch_3-large.jpg b/install-new/fixtures/apple/img/p/iPod_touch_3-large.jpg new file mode 100644 index 000000000..fe6b353f9 Binary files /dev/null and b/install-new/fixtures/apple/img/p/iPod_touch_3-large.jpg differ diff --git a/install-new/fixtures/apple/img/p/iPod_touch_3-medium.jpg b/install-new/fixtures/apple/img/p/iPod_touch_3-medium.jpg new file mode 100644 index 000000000..40f8e96aa Binary files /dev/null and b/install-new/fixtures/apple/img/p/iPod_touch_3-medium.jpg differ diff --git a/install-new/fixtures/apple/img/p/iPod_touch_3-small.jpg b/install-new/fixtures/apple/img/p/iPod_touch_3-small.jpg new file mode 100644 index 000000000..4105bcdba Binary files /dev/null and b/install-new/fixtures/apple/img/p/iPod_touch_3-small.jpg differ diff --git a/install-new/fixtures/apple/img/p/iPod_touch_3-thickbox.jpg b/install-new/fixtures/apple/img/p/iPod_touch_3-thickbox.jpg new file mode 100644 index 000000000..8c9c7acc9 Binary files /dev/null and b/install-new/fixtures/apple/img/p/iPod_touch_3-thickbox.jpg differ diff --git a/install-new/fixtures/apple/img/p/iPod_touch_3.jpg b/install-new/fixtures/apple/img/p/iPod_touch_3.jpg new file mode 100644 index 000000000..f77be18d1 Binary files /dev/null and b/install-new/fixtures/apple/img/p/iPod_touch_3.jpg differ diff --git a/install-new/fixtures/apple/img/p/iPod_touch_4-home.jpg b/install-new/fixtures/apple/img/p/iPod_touch_4-home.jpg new file mode 100644 index 000000000..fa72ad431 Binary files /dev/null and b/install-new/fixtures/apple/img/p/iPod_touch_4-home.jpg differ diff --git a/install-new/fixtures/apple/img/p/iPod_touch_4-large.jpg b/install-new/fixtures/apple/img/p/iPod_touch_4-large.jpg new file mode 100644 index 000000000..31a7f84d4 Binary files /dev/null and b/install-new/fixtures/apple/img/p/iPod_touch_4-large.jpg differ diff --git a/install-new/fixtures/apple/img/p/iPod_touch_4-medium.jpg b/install-new/fixtures/apple/img/p/iPod_touch_4-medium.jpg new file mode 100644 index 000000000..cc03e842b Binary files /dev/null and b/install-new/fixtures/apple/img/p/iPod_touch_4-medium.jpg differ diff --git a/install-new/fixtures/apple/img/p/iPod_touch_4-small.jpg b/install-new/fixtures/apple/img/p/iPod_touch_4-small.jpg new file mode 100644 index 000000000..f7d794a5e Binary files /dev/null and b/install-new/fixtures/apple/img/p/iPod_touch_4-small.jpg differ diff --git a/install-new/fixtures/apple/img/p/iPod_touch_4-thickbox.jpg b/install-new/fixtures/apple/img/p/iPod_touch_4-thickbox.jpg new file mode 100644 index 000000000..5fa11a916 Binary files /dev/null and b/install-new/fixtures/apple/img/p/iPod_touch_4-thickbox.jpg differ diff --git a/install-new/fixtures/apple/img/p/iPod_touch_4.jpg b/install-new/fixtures/apple/img/p/iPod_touch_4.jpg new file mode 100644 index 000000000..fdd92a611 Binary files /dev/null and b/install-new/fixtures/apple/img/p/iPod_touch_4.jpg differ diff --git a/install-new/fixtures/apple/img/p/iPod_touch_5-home.jpg b/install-new/fixtures/apple/img/p/iPod_touch_5-home.jpg new file mode 100644 index 000000000..88fb3e801 Binary files /dev/null and b/install-new/fixtures/apple/img/p/iPod_touch_5-home.jpg differ diff --git a/install-new/fixtures/apple/img/p/iPod_touch_5-large.jpg b/install-new/fixtures/apple/img/p/iPod_touch_5-large.jpg new file mode 100644 index 000000000..cf35df960 Binary files /dev/null and b/install-new/fixtures/apple/img/p/iPod_touch_5-large.jpg differ diff --git a/install-new/fixtures/apple/img/p/iPod_touch_5-medium.jpg b/install-new/fixtures/apple/img/p/iPod_touch_5-medium.jpg new file mode 100644 index 000000000..841730a91 Binary files /dev/null and b/install-new/fixtures/apple/img/p/iPod_touch_5-medium.jpg differ diff --git a/install-new/fixtures/apple/img/p/iPod_touch_5-small.jpg b/install-new/fixtures/apple/img/p/iPod_touch_5-small.jpg new file mode 100644 index 000000000..61ad554d0 Binary files /dev/null and b/install-new/fixtures/apple/img/p/iPod_touch_5-small.jpg differ diff --git a/install-new/fixtures/apple/img/p/iPod_touch_5-thickbox.jpg b/install-new/fixtures/apple/img/p/iPod_touch_5-thickbox.jpg new file mode 100644 index 000000000..8c6dbc048 Binary files /dev/null and b/install-new/fixtures/apple/img/p/iPod_touch_5-thickbox.jpg differ diff --git a/install-new/fixtures/apple/img/p/iPod_touch_5.jpg b/install-new/fixtures/apple/img/p/iPod_touch_5.jpg new file mode 100644 index 000000000..c66c26932 Binary files /dev/null and b/install-new/fixtures/apple/img/p/iPod_touch_5.jpg differ diff --git a/install-new/fixtures/apple/img/scenes/The_MacBooks-large_scene.jpg b/install-new/fixtures/apple/img/scenes/The_MacBooks-large_scene.jpg new file mode 100644 index 000000000..56f034133 Binary files /dev/null and b/install-new/fixtures/apple/img/scenes/The_MacBooks-large_scene.jpg differ diff --git a/install-new/fixtures/apple/img/scenes/The_MacBooks.jpg b/install-new/fixtures/apple/img/scenes/The_MacBooks.jpg new file mode 100644 index 000000000..16de52e68 Binary files /dev/null and b/install-new/fixtures/apple/img/scenes/The_MacBooks.jpg differ diff --git a/install-new/fixtures/apple/img/scenes/The_iPods-large_scene.jpg b/install-new/fixtures/apple/img/scenes/The_iPods-large_scene.jpg new file mode 100644 index 000000000..7567634e6 Binary files /dev/null and b/install-new/fixtures/apple/img/scenes/The_iPods-large_scene.jpg differ diff --git a/install-new/fixtures/apple/img/scenes/The_iPods.jpg b/install-new/fixtures/apple/img/scenes/The_iPods.jpg new file mode 100644 index 000000000..19ba0dfc8 Binary files /dev/null and b/install-new/fixtures/apple/img/scenes/The_iPods.jpg differ diff --git a/install-new/fixtures/apple/img/scenes/The_iPods_Nano-large_scene.jpg b/install-new/fixtures/apple/img/scenes/The_iPods_Nano-large_scene.jpg new file mode 100644 index 000000000..d4e31adc1 Binary files /dev/null and b/install-new/fixtures/apple/img/scenes/The_iPods_Nano-large_scene.jpg differ diff --git a/install-new/fixtures/apple/img/scenes/The_iPods_Nano.jpg b/install-new/fixtures/apple/img/scenes/The_iPods_Nano.jpg new file mode 100644 index 000000000..d5ece377f Binary files /dev/null and b/install-new/fixtures/apple/img/scenes/The_iPods_Nano.jpg differ diff --git a/install-new/fixtures/apple/img/scenes/thumbs/The_MacBooks-thumb_scene.jpg b/install-new/fixtures/apple/img/scenes/thumbs/The_MacBooks-thumb_scene.jpg new file mode 100644 index 000000000..3efcb3b59 Binary files /dev/null and b/install-new/fixtures/apple/img/scenes/thumbs/The_MacBooks-thumb_scene.jpg differ diff --git a/install-new/fixtures/apple/img/scenes/thumbs/The_iPods-thumb_scene.jpg b/install-new/fixtures/apple/img/scenes/thumbs/The_iPods-thumb_scene.jpg new file mode 100644 index 000000000..c21b53279 Binary files /dev/null and b/install-new/fixtures/apple/img/scenes/thumbs/The_iPods-thumb_scene.jpg differ diff --git a/install-new/fixtures/apple/img/scenes/thumbs/The_iPods_Nano-thumb_scene.jpg b/install-new/fixtures/apple/img/scenes/thumbs/The_iPods_Nano-thumb_scene.jpg new file mode 100644 index 000000000..d39f00884 Binary files /dev/null and b/install-new/fixtures/apple/img/scenes/thumbs/The_iPods_Nano-thumb_scene.jpg differ diff --git a/install-new/fixtures/apple/img/st/Coconut_Grove-medium.jpg b/install-new/fixtures/apple/img/st/Coconut_Grove-medium.jpg new file mode 100644 index 000000000..ad01d54a3 Binary files /dev/null and b/install-new/fixtures/apple/img/st/Coconut_Grove-medium.jpg differ diff --git a/install-new/fixtures/apple/img/st/Coconut_Grove.jpg b/install-new/fixtures/apple/img/st/Coconut_Grove.jpg new file mode 100644 index 000000000..34b45eee6 Binary files /dev/null and b/install-new/fixtures/apple/img/st/Coconut_Grove.jpg differ diff --git a/install-new/fixtures/apple/img/st/Dade_County-medium.jpg b/install-new/fixtures/apple/img/st/Dade_County-medium.jpg new file mode 100644 index 000000000..ad01d54a3 Binary files /dev/null and b/install-new/fixtures/apple/img/st/Dade_County-medium.jpg differ diff --git a/install-new/fixtures/apple/img/st/Dade_County.jpg b/install-new/fixtures/apple/img/st/Dade_County.jpg new file mode 100644 index 000000000..34b45eee6 Binary files /dev/null and b/install-new/fixtures/apple/img/st/Dade_County.jpg differ diff --git a/install-new/fixtures/apple/img/st/E_Fort_Lauderdale-medium.jpg b/install-new/fixtures/apple/img/st/E_Fort_Lauderdale-medium.jpg new file mode 100644 index 000000000..ad01d54a3 Binary files /dev/null and b/install-new/fixtures/apple/img/st/E_Fort_Lauderdale-medium.jpg differ diff --git a/install-new/fixtures/apple/img/st/E_Fort_Lauderdale.jpg b/install-new/fixtures/apple/img/st/E_Fort_Lauderdale.jpg new file mode 100644 index 000000000..34b45eee6 Binary files /dev/null and b/install-new/fixtures/apple/img/st/E_Fort_Lauderdale.jpg differ diff --git a/install-new/fixtures/apple/img/st/N_Miami_Biscayne-medium.jpg b/install-new/fixtures/apple/img/st/N_Miami_Biscayne-medium.jpg new file mode 100644 index 000000000..ad01d54a3 Binary files /dev/null and b/install-new/fixtures/apple/img/st/N_Miami_Biscayne-medium.jpg differ diff --git a/install-new/fixtures/apple/img/st/N_Miami_Biscayne.jpg b/install-new/fixtures/apple/img/st/N_Miami_Biscayne.jpg new file mode 100644 index 000000000..34b45eee6 Binary files /dev/null and b/install-new/fixtures/apple/img/st/N_Miami_Biscayne.jpg differ diff --git a/install-new/fixtures/apple/img/st/Pembroke_Pines-medium.jpg b/install-new/fixtures/apple/img/st/Pembroke_Pines-medium.jpg new file mode 100644 index 000000000..ad01d54a3 Binary files /dev/null and b/install-new/fixtures/apple/img/st/Pembroke_Pines-medium.jpg differ diff --git a/install-new/fixtures/apple/img/st/Pembroke_Pines.jpg b/install-new/fixtures/apple/img/st/Pembroke_Pines.jpg new file mode 100644 index 000000000..34b45eee6 Binary files /dev/null and b/install-new/fixtures/apple/img/st/Pembroke_Pines.jpg differ diff --git a/install-new/fixtures/apple/img/su/AppleStore-large.jpg b/install-new/fixtures/apple/img/su/AppleStore-large.jpg new file mode 100644 index 000000000..f4bbc33c2 Binary files /dev/null and b/install-new/fixtures/apple/img/su/AppleStore-large.jpg differ diff --git a/install-new/fixtures/apple/img/su/AppleStore-medium.jpg b/install-new/fixtures/apple/img/su/AppleStore-medium.jpg new file mode 100644 index 000000000..3f22b4582 Binary files /dev/null and b/install-new/fixtures/apple/img/su/AppleStore-medium.jpg differ diff --git a/install-new/fixtures/apple/img/su/AppleStore-small.jpg b/install-new/fixtures/apple/img/su/AppleStore-small.jpg new file mode 100644 index 000000000..4701b6858 Binary files /dev/null and b/install-new/fixtures/apple/img/su/AppleStore-small.jpg differ diff --git a/install-new/fixtures/apple/img/su/AppleStore.jpg b/install-new/fixtures/apple/img/su/AppleStore.jpg new file mode 100644 index 000000000..223ea51a9 Binary files /dev/null and b/install-new/fixtures/apple/img/su/AppleStore.jpg differ diff --git a/install-new/fixtures/apple/img/su/Shure_Online_Store-large.jpg b/install-new/fixtures/apple/img/su/Shure_Online_Store-large.jpg new file mode 100644 index 000000000..ee4eb5fa8 Binary files /dev/null and b/install-new/fixtures/apple/img/su/Shure_Online_Store-large.jpg differ diff --git a/install-new/fixtures/apple/img/su/Shure_Online_Store-medium.jpg b/install-new/fixtures/apple/img/su/Shure_Online_Store-medium.jpg new file mode 100644 index 000000000..d80ee0e5e Binary files /dev/null and b/install-new/fixtures/apple/img/su/Shure_Online_Store-medium.jpg differ diff --git a/install-new/fixtures/apple/img/su/Shure_Online_Store-small.jpg b/install-new/fixtures/apple/img/su/Shure_Online_Store-small.jpg new file mode 100644 index 000000000..bdf87c651 Binary files /dev/null and b/install-new/fixtures/apple/img/su/Shure_Online_Store-small.jpg differ diff --git a/install-new/fixtures/apple/img/su/Shure_Online_Store.jpg b/install-new/fixtures/apple/img/su/Shure_Online_Store.jpg new file mode 100644 index 000000000..f64258f9a Binary files /dev/null and b/install-new/fixtures/apple/img/su/Shure_Online_Store.jpg differ diff --git a/install-new/fixtures/apple/install.php b/install-new/fixtures/apple/install.php new file mode 100644 index 000000000..aaa4362cd --- /dev/null +++ b/install-new/fixtures/apple/install.php @@ -0,0 +1,37 @@ + +* @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 +*/ + +/** + * This class is only here to show the possibility of extending InstallXmlLoader, which is the + * class parsing all XML files, copying all images, etc. + * + * Please read documentation in ~/install/dev/ folder if you want to customize PrestaShop install / fixtures. + */ +class InstallFixturesApple extends InstallXmlLoader +{ + +} diff --git a/install-new/fixtures/apple/langs/de/data/attribute.xml b/install-new/fixtures/apple/langs/de/data/attribute.xml new file mode 100644 index 000000000..7f0b7e6d6 --- /dev/null +++ b/install-new/fixtures/apple/langs/de/data/attribute.xml @@ -0,0 +1,63 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/install-new/fixtures/apple/langs/de/data/attribute_group.xml b/install-new/fixtures/apple/langs/de/data/attribute_group.xml new file mode 100644 index 000000000..2719d0ad4 --- /dev/null +++ b/install-new/fixtures/apple/langs/de/data/attribute_group.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/install-new/fixtures/apple/langs/de/data/attributegroup.xml b/install-new/fixtures/apple/langs/de/data/attributegroup.xml new file mode 100644 index 000000000..6e3d46f37 --- /dev/null +++ b/install-new/fixtures/apple/langs/de/data/attributegroup.xml @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/install-new/fixtures/apple/langs/de/data/carrier.xml b/install-new/fixtures/apple/langs/de/data/carrier.xml new file mode 100644 index 000000000..f2f26ca73 --- /dev/null +++ b/install-new/fixtures/apple/langs/de/data/carrier.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/install-new/fixtures/apple/langs/de/data/category.xml b/install-new/fixtures/apple/langs/de/data/category.xml new file mode 100644 index 000000000..3ffd0f05c --- /dev/null +++ b/install-new/fixtures/apple/langs/de/data/category.xml @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/install-new/fixtures/apple/langs/de/data/feature.xml b/install-new/fixtures/apple/langs/de/data/feature.xml new file mode 100644 index 000000000..8dd5408a0 --- /dev/null +++ b/install-new/fixtures/apple/langs/de/data/feature.xml @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/install-new/fixtures/apple/langs/de/data/feature_value.xml b/install-new/fixtures/apple/langs/de/data/feature_value.xml new file mode 100644 index 000000000..68e1c4975 --- /dev/null +++ b/install-new/fixtures/apple/langs/de/data/feature_value.xml @@ -0,0 +1,45 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/install-new/fixtures/apple/langs/de/data/featurevalue.xml b/install-new/fixtures/apple/langs/de/data/featurevalue.xml new file mode 100644 index 000000000..ce6a363ca --- /dev/null +++ b/install-new/fixtures/apple/langs/de/data/featurevalue.xml @@ -0,0 +1,45 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/install-new/fixtures/apple/langs/de/data/image.xml b/install-new/fixtures/apple/langs/de/data/image.xml new file mode 100644 index 000000000..414d8f564 --- /dev/null +++ b/install-new/fixtures/apple/langs/de/data/image.xml @@ -0,0 +1,81 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/install-new/fixtures/apple/langs/de/data/manufacturer.xml b/install-new/fixtures/apple/langs/de/data/manufacturer.xml new file mode 100644 index 000000000..621ff2471 --- /dev/null +++ b/install-new/fixtures/apple/langs/de/data/manufacturer.xml @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/install-new/fixtures/apple/langs/de/data/order_message.xml b/install-new/fixtures/apple/langs/de/data/order_message.xml new file mode 100644 index 000000000..f89d5e3bd --- /dev/null +++ b/install-new/fixtures/apple/langs/de/data/order_message.xml @@ -0,0 +1,11 @@ + + + + + + + \ No newline at end of file diff --git a/install-new/fixtures/apple/langs/de/data/ordermessage.xml b/install-new/fixtures/apple/langs/de/data/ordermessage.xml new file mode 100644 index 000000000..14917657b --- /dev/null +++ b/install-new/fixtures/apple/langs/de/data/ordermessage.xml @@ -0,0 +1,7 @@ + + + + + + + diff --git a/install-new/fixtures/apple/langs/de/data/product.xml b/install-new/fixtures/apple/langs/de/data/product.xml new file mode 100644 index 000000000..2b071ec62 --- /dev/null +++ b/install-new/fixtures/apple/langs/de/data/product.xml @@ -0,0 +1,135 @@ + + + + Immer eine Kurve voraus.

+

Für all die, die gleich losrocken wollen, gibt es jetzt neun tolle Farben zur Auswahl. Aber das ist nur ein Teil der Geschichte. Mit seinem runden Design, das komplett aus Aluminium und Glas besteht, werden Sie den iPod nano nicht mehr weglegen wollen.

+

Tolles Design. Und viel Köpfchen.

+

Die neue Genius-Funktion verwandelt den iPod nano in Ihren hoch intelligenten, persönlichen DJ. Es erstellt Abspiellisten aus den Songs in Ihrer Sammlung, die gut zusammenpassen.

+

Passt sich Ihren Bewegungen an.

+

Der iPod nano jetzt mit Beschleunigungsmesser. Einmal schütteln, und Ihre Musik wird neu sortiert. Kippen Sie es zur Seite für die Cover Flow-Ansicht. Und spielen Sie mit den Bewegungen, an die Sie denken.

]]>
+ New design. New features. Now in 8GB and 16GB. iPod nano rocks like never before.

]]>
+ + + + + + + +
+ + style="font-size: small;">Gleich festmachen.

+

Tragen Sie bis zu 500 Songs am Ärmel. Oder an Ihrem Gürtel. Oder an Ihrer Sporthose. iPod shuffle ist ein Erkennungszeichen echter Musikfans. Jetzt in neuen, noch leuchtenderen Farben.

+

style="font-size: small;">Füttern Sie Ihren iPod shuffle.

+

iTunes ist Ihr Super-Store für Unterhaltung. Es ist Ihre optimal organisierte Musik-Sammlung und Jukebox. Und Sie können Ihren iPod shuffle mit einem Klick laden.

+

style="font-size: small;">Die Schöne und der Beat.

+

Das farbintensive eloxierte Aluminium ergänzt das schlichte Design des iPod shuffle. Jetzt in Blau, Grün, Rosa, Rot und klassischem Silber.

]]>
+ iPod shuffle, the world’s most wearable music player, now clips on in more vibrant blue, green, pink, and red.

]]>
+ + + + + + + +
+ + MacBook Air ist kaum dicker als Ihr Zeigefinger. Nahezu jedes Detail wurde abgeflacht. Und dabei hat es immer noch einen 13,3-Zoll-Widescreen-LED-Display, eine Tastatur in voller Größe und einen großen Multi-Touch-Trackpad. Es besitzt eine unvergleichliche Tragbarkeit, ohne die üblichen Kompromisse für ultraportable Bildschirme und Tastaturen.

Der unglaublich dünne MacBook Air ist das Ergebnis zahlreicher Innovationen zur Größen- und Gewichtsoptimierung. Die flachere Festplatte, die strategisch versteckten I/O-Ports und eine noch flachere Batterie: Alles wurde immer wieder überdacht, immer mit dem Ziel, es noch dünner zu gestalten.

Das Design und Konzept von MacBook Air ist voll auf die Vorteile der Kabelfreiheit ausgerichtet. Eine Welt, in der 802.11n WLAN heutzutage so schnell und so leicht verfügbar ist, dass die Menschen heute grenzenlos Filme online kaufen oder mieten, Software downloaden und Dateien über das Internet teilen oder speichern können.

]]>
+ + + + + + + + +
+ +
Die 2,4 GHz MacBook-Modelle haben nun 2 GB Standard-Arbeitsspeicher - ideal zum reibungslosen Abspielen Ihrer Lieblings-Anwendungen.]]>
+ + + + + + + + +
+ + Fünf neue Hands-on-Anwendungen +

Rich-HTML-E-Mails mit Fotos anzeigen sowie PDF-, Word-und Excel-Anhänge. Holen Sie sich Karten, Wegbeschreibungen und Echtzeit-Verkehrsinformationen. Sie können sich Notizen machen und Börsen- und Wetterberichte lesen.

+

Berühren Sie Ihre Musik, Filme und vieles mehr

+

Mit der revolutionären, in den wunderschönen 3,5-Zoll-Display integrierten Multi-Touch-Technologie können Sie zuziehen, zoomen, scrollen und streichen.

+

Internet in Ihrer Tasche

+

Mit dem Safari-Webbrowser sehen Sie Webseiten so, wie sie gesehen werden sollten und vergrößern und verkleinern sie mit einer Berührung.2Fügen Sie Web-Clips zu Ihrer Startseite hinzu für den Schnellzugriff auf Ihre bevorzugten Webseiten.

+

Zum Set gehören/h3> +
    +
  • der iPod touch
  • +
  • Ohrhörer
  • +
  • USB 2.0-Kabel
  • +
  • Anschluss-Adapter
  • +
  • Poliertuch
  • +
  • Basis
  • +
  • Quick Start Guide
  • +
]]> + +
  • Revolutionary Multi-Touch interface
  • +
  • 3.5-inch widescreen color display
  • +
  • Wi-Fi (802.11b/g)
  • +
  • 8 mm thin
  • +
  • Safari, YouTube, Mail, Stocks, Weather, Notes, iTunes Wi-Fi Music Store, Maps
  • +]]>
    + + + + + + + + + + Lorem ipsum

    ]]>
    + Lorem ipsum

    ]]>
    + + + + + + + +
    + + Mit ihren hochauflösenden Micro-Lautsprechern, die vollen Klang liefern und ihrem ergonomischen, leichten Design sind die SE210 Ohrhörer ideal zum mobilen Extraklasse-Musik hören auf Ihrem iPod oder iPhone. Sie bieten die genaueste Tonwiedergabe, sowohl aus tragbaren als auch aus Home-Stereo-Audio-Quellen - für ultimative präzisen Höhen und kraftvolle Bässe. Darüber hinaus ermöglicht das flexible Design optimalen Tragekomfort durch eine Vielzahl von Tragemöglichkeiten.

    Funktionen
    +
      +
    • Klangisolierendes Design
    • +
    • Hochauflösende Micro-Lautsprecher mit Single Balanced Armature-Treiber
    • +
    • Abnehmbare modulare Kabel, die Sie je nach Aktivität länger oder kürzer einstellen können
    • +
    • Kompatibler Stecker mit Kopfhörer-Anschlüssen für iPod und iPhone
    • +
    +Daten
    +
      +
    • Lautsprecher-Typ: Hochauflösende Micro-Lautsprecher
    • +
    • Frequenzbereich: 25Hz-18.5kHz
    • +
    • Impedanz (1kHz): 26 Ohm
    • +
    • Empfindlichkeit (1mW): 114 dB SPL/mW
    • +
    • Kabellänge (mit Erweiterung): 18,0 Zoll/45,0 cm (54,0 Zoll/137,1 cm)
    • +
    +Im Set enthalten
    +
      +
    • Shure SE210 Ohrhörer
    • +
    • Verlängerungskabel (36,0 Zoll/91,4 cm)
    • +
    • Drei Paar Schaumstoff-Hörmuschelhüllen (klein, mittel, groß)
    • +
    • Drei Paar weiche Flex-Hörmuschelhüllen (klein, mittel, groß)
    • +
    • Ein Paar Triple-Flange-Hörmuschelhüllen
    • +
    • Trage-Etui
    • +
    +Garantie
    Zwei Jahre
    (Einzelheiten hierzu finden Sie auf
    www.shure.com/PersonalAudio/CustomerSupport/ProductReturnsAndWarranty/index.htm).

    Mfr. Teilenummer: SE210-A-EFS

    Hinweis: Für Produkte auf dieser Website, die nicht den Markennamen Apple tragen, werden Service und Support ausschließlich von den Herstellern gemäß der den Produkten beiliegenden Nutzungsbedingungen übernommen. Die von Apple angebotene Garantiezeit gilt nicht für Produkte, die kein Apple-Markenzeichen tragen, selbst wenn diese zusammen mit Apple-Produkten verpackt oder verkauft wurden. Bitte wenden Sie sich direkt an den Hersteller für den technischen Support und Kundendienst.]]>
    + Evolved from personal monitor technology road-tested by pro musicians and perfected by Shure engineers, the lightweight and stylish SE210 delivers full-range audio that's free from outside noise.

    ]]>
    + + + + + + + +
    + \ No newline at end of file diff --git a/install-new/fixtures/apple/langs/de/data/profile.xml b/install-new/fixtures/apple/langs/de/data/profile.xml new file mode 100644 index 000000000..f2c3054d4 --- /dev/null +++ b/install-new/fixtures/apple/langs/de/data/profile.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/install-new/fixtures/apple/langs/de/data/scene.xml b/install-new/fixtures/apple/langs/de/data/scene.xml new file mode 100644 index 000000000..ae8a1db98 --- /dev/null +++ b/install-new/fixtures/apple/langs/de/data/scene.xml @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/install-new/fixtures/apple/langs/de/data/supplier.xml b/install-new/fixtures/apple/langs/de/data/supplier.xml new file mode 100644 index 000000000..07f36aeb6 --- /dev/null +++ b/install-new/fixtures/apple/langs/de/data/supplier.xml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/install-new/fixtures/apple/langs/de/fixtures.php b/install-new/fixtures/apple/langs/de/fixtures.php new file mode 100644 index 000000000..56cc6986e --- /dev/null +++ b/install-new/fixtures/apple/langs/de/fixtures.php @@ -0,0 +1,121 @@ + '

    Immer eine Kurve voraus.

    \r\n

    Für all die, die gleich losrocken wollen, gibt es jetzt neun tolle Farben zur Auswahl. Aber das ist nur ein Teil der Geschichte. Mit seinem runden Design, das komplett aus Aluminium und Glas besteht, werden Sie den iPod nano nicht mehr weglegen wollen.

    \r\n

    Tolles Design. Und viel Köpfchen.

    \r\n

    Die neue Genius-Funktion verwandelt den iPod nano in Ihren hoch intelligenten, persönlichen DJ. Es erstellt Abspiellisten aus den Songs in Ihrer Sammlung, die gut zusammenpassen.

    \r\n

    Passt sich Ihren Bewegungen an.

    \r\n

    Der iPod nano jetzt mit Beschleunigungsmesser. Einmal schütteln, und Ihre Musik wird neu sortiert. Kippen Sie es zur Seite für die Cover Flow-Ansicht. Und spielen Sie mit den Bewegungen, an die Sie denken.

    ', + 'product_ipod_nano_description_short' => '

    New design. New features. Now in 8GB and 16GB. iPod nano rocks like never before.

    ', + 'product_ipod_nano_link_rewrite' => 'ipod-nano', + 'product_ipod_nano_name' => 'iPod Nano', + 'product_ipod_nano_available_now' => 'In stock', + 'product_ipod_shuffle_description' => '

    style="font-size: small;">Gleich festmachen.

    \r\n

    Tragen Sie bis zu 500 Songs am Ärmel. Oder an Ihrem Gürtel. Oder an Ihrer Sporthose. iPod shuffle ist ein Erkennungszeichen echter Musikfans. Jetzt in neuen, noch leuchtenderen Farben.

    \r\n

    style="font-size: small;">Füttern Sie Ihren iPod shuffle.

    \r\n

    iTunes ist Ihr Super-Store für Unterhaltung. Es ist Ihre optimal organisierte Musik-Sammlung und Jukebox. Und Sie können Ihren iPod shuffle mit einem Klick laden.

    \r\n

    style="font-size: small;">Die Schöne und der Beat.

    \r\n

    Das farbintensive eloxierte Aluminium ergänzt das schlichte Design des iPod shuffle. Jetzt in Blau, Grün, Rosa, Rot und klassischem Silber.

    ', + 'product_ipod_shuffle_description_short' => '

    iPod shuffle, the world’s most wearable music player, now clips on in more vibrant blue, green, pink, and red.

    ', + 'product_ipod_shuffle_link_rewrite' => 'ipod-shuffle', + 'product_ipod_shuffle_name' => 'iPod shuffle', + 'product_ipod_shuffle_available_now' => 'In stock', + 'product_macbook_air_description' => '

    MacBook Air ist kaum dicker als Ihr Zeigefinger. Nahezu jedes Detail wurde abgeflacht. Und dabei hat es immer noch einen 13,3-Zoll-Widescreen-LED-Display, eine Tastatur in voller Größe und einen großen Multi-Touch-Trackpad. Es besitzt eine unvergleichliche Tragbarkeit, ohne die üblichen Kompromisse für ultraportable Bildschirme und Tastaturen.

    Der unglaublich dünne MacBook Air ist das Ergebnis zahlreicher Innovationen zur Größen- und Gewichtsoptimierung. Die flachere Festplatte, die strategisch versteckten I/O-Ports und eine noch flachere Batterie: Alles wurde immer wieder überdacht, immer mit dem Ziel, es noch dünner zu gestalten.

    Das Design und Konzept von MacBook Air ist voll auf die Vorteile der Kabelfreiheit ausgerichtet. Eine Welt, in der 802.11n WLAN heutzutage so schnell und so leicht verfügbar ist, dass die Menschen heute grenzenlos Filme online kaufen oder mieten, Software downloaden und Dateien über das Internet teilen oder speichern können.

    ', + 'product_macbook_air_description_short' => 'MacBook Air is ultrathin, ultraportable, and ultra unlike anything else. But you don’t lose inches and pounds overnight. It’s the result of rethinking conventions. Of multiple wireless innovations. And of breakthrough design. With MacBook Air, mobile computing suddenly has a new standard.', + 'product_macbook_air_link_rewrite' => 'macbook-Air', + 'product_macbook_air_name' => 'MacBook Air', + 'product_macbook_description' => 'Jedes MacBook verfügt über eine größere Festplatte, bis zu 250GB, zum Speichern immer größer werdender Mediensammlungen und wertvoller Daten.

    Die 2,4 GHz MacBook-Modelle haben nun 2 GB Standard-Arbeitsspeicher - ideal zum reibungslosen Abspielen Ihrer Lieblings-Anwendungen.', + 'product_macbook_description_short' => 'MacBook makes it easy to hit the road thanks to its tough polycarbonate case, built-in wireless technologies, and innovative MagSafe Power Adapter that releases automatically if someone accidentally trips on the cord.', + 'product_macbook_link_rewrite' => 'macbook', + 'product_macbook_name' => 'MacBook', + 'product_ipod_touch_description' => '

    Fünf neue Hands-on-Anwendungen

    \r\n

    Rich-HTML-E-Mails mit Fotos anzeigen sowie PDF-, Word-und Excel-Anhänge. Holen Sie sich Karten, Wegbeschreibungen und Echtzeit-Verkehrsinformationen. Sie können sich Notizen machen und Börsen- und Wetterberichte lesen.

    \r\n

    Berühren Sie Ihre Musik, Filme und vieles mehr

    \r\n

    Mit der revolutionären, in den wunderschönen 3,5-Zoll-Display integrierten Multi-Touch-Technologie können Sie zuziehen, zoomen, scrollen und streichen.

    \r\n

    Internet in Ihrer Tasche

    \r\n

    Mit dem Safari-Webbrowser sehen Sie Webseiten so, wie sie gesehen werden sollten und vergrößern und verkleinern sie mit einer Berührung.2Fügen Sie Web-Clips zu Ihrer Startseite hinzu für den Schnellzugriff auf Ihre bevorzugten Webseiten.

    \r\n

    Zum Set gehören/h3>\r\n
      \r\n
    • der iPod touch
    • \r\n
    • Ohrhörer
    • \r\n
    • USB 2.0-Kabel
    • \r\n
    • Anschluss-Adapter
    • \r\n
    • Poliertuch
    • \r\n
    • Basis
    • \r\n
    • Quick Start Guide
    • \r\n
    ', + 'product_ipod_touch_description_short' => '
      \r\n
    • Revolutionary Multi-Touch interface
    • \r\n
    • 3.5-inch widescreen color display
    • \r\n
    • Wi-Fi (802.11b/g)
    • \r\n
    • 8 mm thin
    • \r\n
    • Safari, YouTube, Mail, Stocks, Weather, Notes, iTunes Wi-Fi Music Store, Maps
    • \r\n
    ', + 'product_ipod_touch_link_rewrite' => 'iPod-Touch', + 'product_ipod_touch_name' => 'iPod touch', + 'product_folio_ipod_description' => '

    Lorem ipsum

    ', + 'product_folio_ipod_description_short' => '

    Lorem ipsum

    ', + 'product_folio_ipod_link_rewrite' => 'lederhulle-belkin-fur-ipod-nano-schwarz-schokolade', + 'product_folio_ipod_name' => 'Lederhülle Belkin für ipod nano - Schwarz/Schokolade', + 'product_earpiece_description' => '
    Mit ihren hochauflösenden Micro-Lautsprechern, die vollen Klang liefern und ihrem ergonomischen, leichten Design sind die SE210 Ohrhörer ideal zum mobilen Extraklasse-Musik hören auf Ihrem iPod oder iPhone. Sie bieten die genaueste Tonwiedergabe, sowohl aus tragbaren als auch aus Home-Stereo-Audio-Quellen - für ultimative präzisen Höhen und kraftvolle Bässe. Darüber hinaus ermöglicht das flexible Design optimalen Tragekomfort durch eine Vielzahl von Tragemöglichkeiten.

    Funktionen
    \r\n
      \r\n
    • Klangisolierendes Design
    • \r\n
    • Hochauflösende Micro-Lautsprecher mit Single Balanced Armature-Treiber
    • \r\n
    • Abnehmbare modulare Kabel, die Sie je nach Aktivität länger oder kürzer einstellen können
    • \r\n
    • Kompatibler Stecker mit Kopfhörer-Anschlüssen für iPod und iPhone
    • \r\n
    \r\nDaten
    \r\n
      \r\n
    • Lautsprecher-Typ: Hochauflösende Micro-Lautsprecher
    • \r\n
    • Frequenzbereich: 25Hz-18.5kHz
    • \r\n
    • Impedanz (1kHz): 26 Ohm
    • \r\n
    • Empfindlichkeit (1mW): 114 dB SPL/mW
    • \r\n
    • Kabellänge (mit Erweiterung): 18,0 Zoll/45,0 cm (54,0 Zoll/137,1 cm)
    • \r\n
    \r\nIm Set enthalten
    \r\n
      \r\n
    • Shure SE210 Ohrhörer
    • \r\n
    • Verlängerungskabel (36,0 Zoll/91,4 cm)
    • \r\n
    • Drei Paar Schaumstoff-Hörmuschelhüllen (klein, mittel, groß)
    • \r\n
    • Drei Paar weiche Flex-Hörmuschelhüllen (klein, mittel, groß)
    • \r\n
    • Ein Paar Triple-Flange-Hörmuschelhüllen
    • \r\n
    • Trage-Etui
    • \r\n
    \r\nGarantie
    Zwei Jahre
    (Einzelheiten hierzu finden Sie auf
    www.shure.com/PersonalAudio/CustomerSupport/ProductReturnsAndWarranty/index.htm).

    Mfr. Teilenummer: SE210-A-EFS

    Hinweis: Für Produkte auf dieser Website, die nicht den Markennamen Apple tragen, werden Service und Support ausschließlich von den Herstellern gemäß der den Produkten beiliegenden Nutzungsbedingungen übernommen. Die von Apple angebotene Garantiezeit gilt nicht für Produkte, die kein Apple-Markenzeichen tragen, selbst wenn diese zusammen mit Apple-Produkten verpackt oder verkauft wurden. Bitte wenden Sie sich direkt an den Hersteller für den technischen Support und Kundendienst.
    ', + 'product_earpiece_description_short' => '

    Evolved from personal monitor technology road-tested by pro musicians and perfected by Shure engineers, the lightweight and stylish SE210 delivers full-range audio that\'s free from outside noise.

    ', + 'product_earpiece_link_rewrite' => 'klangisolierte-ohrhorer-shure-se210-weib', + 'product_earpiece_name' => 'Shure SE210 Klangisolierte Ohrhörer für iPod und iPhone', + 'category_ipods_name' => 'iPods', + 'category_ipods_description' => 'Now that you can buy movies from the iTunes Store and sync them to your iPod, the whole world is your theater.', + 'category_ipods_link_rewrite' => 'musik-iPods', + 'category_accessories_name' => 'Zubehör', + 'category_accessories_description' => 'Wonderful accessories for your iPod', + 'category_accessories_link_rewrite' => 'zubehor-ipod', + 'category_laptops_name' => 'Laptops', + 'category_laptops_description' => 'The latest Intel processor, a bigger hard drive, plenty of memory, and even more new features all fit inside just one liberating inch. The new Mac laptops have the performance, power, and connectivity of a desktop computer. Without the desk part.', + 'category_laptops_link_rewrite' => 'laptops', + 'category_laptops_meta_title' => 'Apple laptops', + 'category_laptops_meta_keywords' => 'Apple MacBook Air-Laptops', + 'category_laptops_meta_description' => 'Powerful and chic Apple laptops', + 'scene_ipods1_name' => 'Die iPods Nano', + 'scene_ipods2_name' => 'Die iPods', + 'scene_laptops_name' => 'Die MacBooks', + 'attributegroup_capacity_name' => 'Speicherplatz', + 'attributegroup_capacity_public_name' => 'Disk space', + 'attributegroup_color_name' => 'Farbe', + 'attributegroup_color_public_name' => 'Color', + 'attributegroup_processor_name' => 'ICU', + 'attributegroup_processor_public_name' => 'Processor', + 'attribute_capacity_2gb_name' => '2GB', + 'attribute_capacity_4gb_name' => '4GB', + 'attribute_color_metal_name' => 'Metallic', + 'attribute_color_blue_name' => 'Blau', + 'attribute_color_pink_name' => 'Pink', + 'attribute_color_green_name' => 'Grün', + 'attribute_color_orange_name' => 'Orange', + 'attribute_capacity_64gb_dd_name' => 'Optionale 64 GB Solid-State-Drive', + 'attribute_capacity_80gb_dd_name' => 'Parallele ATA 80GB Drive @ 4200 rpm', + 'attribute_processor_160ghz_name' => '1.60GHz Intel Core 2 Duo', + 'attribute_processor_180ghz_name' => '1.80GHz Intel Core 2 Duo', + 'attribute_capacity_80gb_name' => '80GB: 20.000 Songs', + 'attribute_capacity_160gb_name' => '160GB: 40.000 Songs', + 'attribute_color_black_name' => 'Schwarz', + 'attribute_capacity_8gb_name' => '8Go', + 'attribute_capacity_16gb_name' => '16Go', + 'attribute_capacity_32gb_name' => '32Go', + 'attribute_color_purple_name' => 'Violett', + 'attribute_color_yellow_name' => 'Gelb', + 'attribute_color_red_name' => 'Rot', + 'ordermessage_delay_name' => 'Frist', + 'ordermessage_delay_message' => 'Hi,\n\nLeider ist einer der Artikel aus Ihrer Bestellung momentan nicht auf Lager. Dies kann zu einer leichten Lieferverzögerung führen. Wir entschuldigen uns hierfür und bemühen uns schnellstens um Abhilfe.\n\nMit freundlichen Grüßen,', + 'feature_height_name' => 'Höhe', + 'feature_width_name' => 'Breite', + 'feature_depth_name' => 'Tiefe', + 'feature_weight_name' => 'Gewicht', + 'feature_headphone_name' => 'Kopfhörer', + 'featurevalue_jack_stereo_value' => 'Jack stereo', + 'featurevalue_mini_jack_stereo_value' => 'Mini-jack stéréo', + 'featurevalue_2.75in_value' => '69.8 mm', + 'featurevalue_2.06in_value' => '52.3 mm', + 'featurevalue_49.2g_value' => '49.2 g', + 'featurevalue_0.26in_value' => '6,5 mm', + 'featurevalue_1.07in_value' => '27.3 mm', + 'featurevalue_1.62in_value' => '41.2 mm', + 'featurevalue_15.5g_value' => '15.5 g', + 'featurevalue_0.41in_value' => '10,5 mm', + 'featurevalue_4.33in_value' => '4.33 in', + 'featurevalue_2.76in_value' => '70 mm', + 'featurevalue_120g_value' => '120g', + 'featurevalue_0.31in_value' => '8 mm', + 'image_macbook_air_10_legend' => 'macbook-air-1', + 'image_macbook_air_11_legend' => 'macbook-air-2', + 'image_macbook_air_12_legend' => 'macbook-air-3', + 'image_macbook_10_legend' => 'macbook-air-4', + 'image_macbook_11_legend' => 'macbook-air-5', + 'image_macbook_12_legend' => 'superdrive-pour-macbook-air-1', + 'image_ipod_touch_19_legend' => 'iPod touch', + 'image_ipod_touch_20_legend' => 'iPod touch', + 'image_ipod_touch_21_legend' => 'iPod touch', + 'image_ipod_touch_22_legend' => 'iPod touch', + 'image_ipod_touch_23_legend' => 'iPod touch', + 'image_ipod_touch_24_legend' => 'iPod touch', + 'image_folio_ipod_4_legend' => 'housse-portefeuille-en-cuir', + 'image_earpiece_4_legend' => 'Shure SE210 Sound-Isolating Earphones for iPod and iPhone', + 'image_ipod_nano_25_legend' => 'iPod Nano', + 'image_ipod_nano_26_legend' => 'iPod Nano', + 'image_ipod_nano_27_legend' => 'iPod Nano', + 'image_ipod_nano_28_legend' => 'iPod Nano', + 'image_ipod_nano_29_legend' => 'iPod Nano', + 'image_ipod_nano_30_legend' => 'iPod Nano', + 'image_ipod_nano_31_legend' => 'iPod Nano', + 'image_ipod_nano_32_legend' => 'iPod Nano', + 'image_ipod_shuffle_13_legend' => 'iPod shuffle', + 'image_ipod_shuffle_14_legend' => 'iPod shuffle', + 'image_ipod_shuffle_15_legend' => 'iPod shuffle', + 'image_ipod_shuffle_16_legend' => 'iPod shuffle', + 'carrier_custom_delay' => 'Zustellung am nächsten Tag!', +); \ No newline at end of file diff --git a/install-new/fixtures/apple/langs/en/data/attribute.xml b/install-new/fixtures/apple/langs/en/data/attribute.xml new file mode 100644 index 000000000..350a52948 --- /dev/null +++ b/install-new/fixtures/apple/langs/en/data/attribute.xml @@ -0,0 +1,63 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/install-new/fixtures/apple/langs/en/data/attribute_group.xml b/install-new/fixtures/apple/langs/en/data/attribute_group.xml new file mode 100644 index 000000000..dc2c4a94c --- /dev/null +++ b/install-new/fixtures/apple/langs/en/data/attribute_group.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/install-new/fixtures/apple/langs/en/data/attributegroup.xml b/install-new/fixtures/apple/langs/en/data/attributegroup.xml new file mode 100644 index 000000000..977fceeb7 --- /dev/null +++ b/install-new/fixtures/apple/langs/en/data/attributegroup.xml @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/install-new/fixtures/apple/langs/en/data/carrier.xml b/install-new/fixtures/apple/langs/en/data/carrier.xml new file mode 100644 index 000000000..07d723522 --- /dev/null +++ b/install-new/fixtures/apple/langs/en/data/carrier.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/install-new/fixtures/apple/langs/en/data/category.xml b/install-new/fixtures/apple/langs/en/data/category.xml new file mode 100644 index 000000000..0b0f6c90b --- /dev/null +++ b/install-new/fixtures/apple/langs/en/data/category.xml @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/install-new/fixtures/apple/langs/en/data/feature.xml b/install-new/fixtures/apple/langs/en/data/feature.xml new file mode 100644 index 000000000..c6de30b39 --- /dev/null +++ b/install-new/fixtures/apple/langs/en/data/feature.xml @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/install-new/fixtures/apple/langs/en/data/feature_value.xml b/install-new/fixtures/apple/langs/en/data/feature_value.xml new file mode 100644 index 000000000..574f41d70 --- /dev/null +++ b/install-new/fixtures/apple/langs/en/data/feature_value.xml @@ -0,0 +1,45 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/install-new/fixtures/apple/langs/en/data/featurevalue.xml b/install-new/fixtures/apple/langs/en/data/featurevalue.xml new file mode 100644 index 000000000..d101bed96 --- /dev/null +++ b/install-new/fixtures/apple/langs/en/data/featurevalue.xml @@ -0,0 +1,45 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/install-new/fixtures/apple/langs/en/data/image.xml b/install-new/fixtures/apple/langs/en/data/image.xml new file mode 100644 index 000000000..cce2d987a --- /dev/null +++ b/install-new/fixtures/apple/langs/en/data/image.xml @@ -0,0 +1,81 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/install-new/fixtures/apple/langs/en/data/manufacturer.xml b/install-new/fixtures/apple/langs/en/data/manufacturer.xml new file mode 100644 index 000000000..621ff2471 --- /dev/null +++ b/install-new/fixtures/apple/langs/en/data/manufacturer.xml @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/install-new/fixtures/apple/langs/en/data/order_message.xml b/install-new/fixtures/apple/langs/en/data/order_message.xml new file mode 100644 index 000000000..f61aca05a --- /dev/null +++ b/install-new/fixtures/apple/langs/en/data/order_message.xml @@ -0,0 +1,12 @@ + + + + + + + \ No newline at end of file diff --git a/install-new/fixtures/apple/langs/en/data/ordermessage.xml b/install-new/fixtures/apple/langs/en/data/ordermessage.xml new file mode 100644 index 000000000..e743f5d97 --- /dev/null +++ b/install-new/fixtures/apple/langs/en/data/ordermessage.xml @@ -0,0 +1,7 @@ + + + + + + + diff --git a/install-new/fixtures/apple/langs/en/data/product.xml b/install-new/fixtures/apple/langs/en/data/product.xml new file mode 100644 index 000000000..85d13c691 --- /dev/null +++ b/install-new/fixtures/apple/langs/en/data/product.xml @@ -0,0 +1,135 @@ + + + + Curved ahead of the curve.

    +

    For those about to rock, we give you nine amazing colors. But that's only part of the story. Feel the curved, all-aluminum and glass design and you won't want to put iPod nano down.

    +

    Great looks. And brains, too.

    +

    The new Genius feature turns iPod nano into your own highly intelligent, personal DJ. It creates playlists by finding songs in your library that go great together.

    +

    Made to move with your moves.

    +

    The accelerometer comes to iPod nano. Give it a shake to shuffle your music. Turn it sideways to view Cover Flow. And play games designed with your moves in mind.

    ]]>
    + New design. New features. Now in 8GB and 16GB. iPod nano rocks like never before.

    ]]>
    + + + + + + + +
    + + Instant attachment.

    +

    Wear up to 500 songs on your sleeve. Or your belt. Or your gym shorts. iPod shuffle is a badge of musical devotion. Now in new, more brilliant colors.

    +

    Feed your iPod shuffle.

    +

    iTunes is your entertainment superstore. It’s your ultra-organized music collection and jukebox. And it’s how you load up your iPod shuffle in one click.

    +

    Beauty and the beat.

    +

    Intensely colorful anodized aluminum complements the simple design of iPod shuffle. Now in blue, green, pink, red, and original silver.

    ]]>
    + iPod shuffle, the world’s most wearable music player, now clips on in more vibrant blue, green, pink, and red.

    ]]>
    + + + + + + + +
    + + MacBook Air is nearly as thin as your index finger. Practically every detail that could be streamlined has been. Yet it still has a 13.3-inch widescreen LED display, full-size keyboard, and large multi-touch trackpad. It’s incomparably portable without the usual ultraportable screen and keyboard compromises.

    The incredible thinness of MacBook Air is the result of numerous size- and weight-shaving innovations. From a slimmer hard drive to strategically hidden I/O ports to a lower-profile battery, everything has been considered and reconsidered with thinness in mind.

    MacBook Air is designed and engineered to take full advantage of the wireless world. A world in which 802.11n Wi-Fi is now so fast and so available, people are truly living untethered — buying and renting movies online, downloading software, and sharing and storing files on the web.

    ]]>
    + + + + + + + + +
    + +
    The 2.4GHz MacBook models now include 2GB of memory standard — perfect for running more of your favorite applications smoothly.]]>
    + + + + + + + + +
    + + Five new hands-on applications

    +

    View rich HTML email with photos as well as PDF, Word, and Excel attachments. Get maps, directions, and real-time traffic information. Take notes and read stock and weather reports.

    +

    Touch your music, movies, and more

    +

    The revolutionary Multi-Touch technology built into the gorgeous 3.5-inch display lets you pinch, zoom, scroll, and flick with your fingers.

    +

    Internet in your pocket

    +

    With the Safari web browser, see websites the way they were designed to be seen and zoom in and out with a tap.2 And add Web Clips to your Home screen for quick access to favorite sites.

    +

    What's in the box

    +
      +
    • iPod touch
    • +
    • Earphones
    • +
    • USB 2.0 cable
    • +
    • Dock adapter
    • +
    • Polishing cloth
    • +
    • Stand
    • +
    • Quick Start guide
    • +
    ]]>
    + +
  • Revolutionary Multi-Touch interface
  • +
  • 3.5-inch widescreen color display
  • +
  • Wi-Fi (802.11b/g)
  • +
  • 8 mm thin
  • +
  • Safari, YouTube, Mail, Stocks, Weather, Notes, iTunes Wi-Fi Music Store, Maps
  • +]]>
    + + + + + + + +
    + + Lorem ipsum

    ]]>
    + Lorem ipsum

    ]]>
    + + + + + + + +
    + + Using Hi-Definition MicroSpeakers to deliver full-range audio, the ergonomic and lightweight design of the SE210 earphones is ideal for premium on-the-go listening on your iPod or iPhone. They offer the most accurate audio reproduction from both portable and home stereo audio sources--for the ultimate in precision highs and rich low end. In addition, the flexible design allows you to choose the most comfortable fit from a variety of wearing positions.

    Features
    +
      +
    • Sound-isolating design
    • +
    • Hi-Definition MicroSpeaker with a single balanced armature driver
    • +
    • Detachable, modular cable so you can make the cable longer or shorter depending on your activity
    • +
    • Connector compatible with earphone ports on both iPod and iPhone
    • +
    +Specifications
    +
      +
    • Speaker type: Hi-Definition MicroSpeaker
    • +
    • Frequency range: 25Hz-18.5kHz
    • +
    • Impedance (1kHz): 26 Ohms
    • +
    • Sensitivity (1mW): 114 dB SPL/mW
    • +
    • Cable length (with extension): 18.0 in./45.0 cm (54.0 in./137.1 cm)
    • +
    +In the box
    +
      +
    • Shure SE210 earphones
    • +
    • Extension cable (36.0 in./91.4 cm)
    • +
    • Three pairs foam earpiece sleeves (small, medium, large)
    • +
    • Three pairs soft flex earpiece sleeves (small, medium, large)
    • +
    • One pair triple-flange earpiece sleeves
    • +
    • Carrying case
    • +
    +Warranty
    Two-year limited
    (For details, please visit
    www.shure.com/PersonalAudio/CustomerSupport/ProductReturnsAndWarranty/index.htm.)

    Mfr. Part No.: SE210-A-EFS

    Note: Products sold through this website that do not bear the Apple Brand name are serviced and supported exclusively by their manufacturers in accordance with terms and conditions packaged with the products. Apple's Limited Warranty does not apply to products that are not Apple-branded, even if packaged or sold with Apple products. Please contact the manufacturer directly for technical support and customer service.]]>
    + Evolved from personal monitor technology road-tested by pro musicians and perfected by Shure engineers, the lightweight and stylish SE210 delivers full-range audio that's free from outside noise.

    ]]>
    + + + + + + + +
    +
    \ No newline at end of file diff --git a/install-new/fixtures/apple/langs/en/data/profile.xml b/install-new/fixtures/apple/langs/en/data/profile.xml new file mode 100644 index 000000000..017ff63fe --- /dev/null +++ b/install-new/fixtures/apple/langs/en/data/profile.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/install-new/fixtures/apple/langs/en/data/scene.xml b/install-new/fixtures/apple/langs/en/data/scene.xml new file mode 100644 index 000000000..a42697b43 --- /dev/null +++ b/install-new/fixtures/apple/langs/en/data/scene.xml @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/install-new/fixtures/apple/langs/en/data/supplier.xml b/install-new/fixtures/apple/langs/en/data/supplier.xml new file mode 100644 index 000000000..07f36aeb6 --- /dev/null +++ b/install-new/fixtures/apple/langs/en/data/supplier.xml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/install-new/fixtures/apple/langs/en/data/tag.xml b/install-new/fixtures/apple/langs/en/data/tag.xml new file mode 100644 index 000000000..38f6904b1 --- /dev/null +++ b/install-new/fixtures/apple/langs/en/data/tag.xml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/install-new/fixtures/apple/langs/en/fixtures.php b/install-new/fixtures/apple/langs/en/fixtures.php new file mode 100644 index 000000000..e861e47f2 --- /dev/null +++ b/install-new/fixtures/apple/langs/en/fixtures.php @@ -0,0 +1,122 @@ + '

    Curved ahead of the curve.

    \r\n

    For those about to rock, we give you nine amazing colors. But that\'s only part of the story. Feel the curved, all-aluminum and glass design and you won\'t want to put iPod nano down.

    \r\n

    Great looks. And brains, too.

    \r\n

    The new Genius feature turns iPod nano into your own highly intelligent, personal DJ. It creates playlists by finding songs in your library that go great together.

    \r\n

    Made to move with your moves.

    \r\n

    The accelerometer comes to iPod nano. Give it a shake to shuffle your music. Turn it sideways to view Cover Flow. And play games designed with your moves in mind.

    ', + 'product_ipod_nano_description_short' => '

    New design. New features. Now in 8GB and 16GB. iPod nano rocks like never before.

    ', + 'product_ipod_nano_link_rewrite' => 'ipod-nano', + 'product_ipod_nano_name' => 'iPod Nano', + 'product_ipod_nano_available_now' => 'In stock', + 'product_ipod_shuffle_description' => '

    Instant attachment.

    \r\n

    Wear up to 500 songs on your sleeve. Or your belt. Or your gym shorts. iPod shuffle is a badge of musical devotion. Now in new, more brilliant colors.

    \r\n

    Feed your iPod shuffle.

    \r\n

    iTunes is your entertainment superstore. It?s your ultra-organized music collection and jukebox. And it?s how you load up your iPod shuffle in one click.

    \r\n

    Beauty and the beat.

    \r\n

    Intensely colorful anodized aluminum complements the simple design of iPod shuffle. Now in blue, green, pink, red, and original silver.

    ', + 'product_ipod_shuffle_description_short' => '

    iPod shuffle, the world?s most wearable music player, now clips on in more vibrant blue, green, pink, and red.

    ', + 'product_ipod_shuffle_link_rewrite' => 'ipod-shuffle', + 'product_ipod_shuffle_name' => 'iPod shuffle', + 'product_ipod_shuffle_available_now' => 'In stock', + 'product_macbook_air_description' => '

    MacBook Air is nearly as thin as your index finger. Practically every detail that could be streamlined has been. Yet it still has a 13.3-inch widescreen LED display, full-size keyboard, and large multi-touch trackpad. It?s incomparably portable without the usual ultraportable screen and keyboard compromises.

    The incredible thinness of MacBook Air is the result of numerous size- and weight-shaving innovations. From a slimmer hard drive to strategically hidden I/O ports to a lower-profile battery, everything has been considered and reconsidered with thinness in mind.

    MacBook Air is designed and engineered to take full advantage of the wireless world. A world in which 802.11n Wi-Fi is now so fast and so available, people are truly living untethered ? buying and renting movies online, downloading software, and sharing and storing files on the web.

    ', + 'product_macbook_air_description_short' => 'MacBook Air is ultrathin, ultraportable, and ultra unlike anything else. But you don?t lose inches and pounds overnight. It?s the result of rethinking conventions. Of multiple wireless innovations. And of breakthrough design. With MacBook Air, mobile computing suddenly has a new standard.', + 'product_macbook_air_link_rewrite' => 'macbook-air', + 'product_macbook_air_name' => 'MacBook Air', + 'product_macbook_description' => 'Every MacBook has a larger hard drive, up to 250GB, to store growing media collections and valuable data.

    The 2.4GHz MacBook models now include 2GB of memory standard ? perfect for running more of your favorite applications smoothly.', + 'product_macbook_description_short' => 'MacBook makes it easy to hit the road thanks to its tough polycarbonate case, built-in wireless technologies, and innovative MagSafe Power Adapter that releases automatically if someone accidentally trips on the cord.', + 'product_macbook_link_rewrite' => 'macbook', + 'product_macbook_name' => 'MacBook', + 'product_ipod_touch_description' => '

    Five new hands-on applications

    \r\n

    View rich HTML email with photos as well as PDF, Word, and Excel attachments. Get maps, directions, and real-time traffic information. Take notes and read stock and weather reports.

    \r\n

    Touch your music, movies, and more

    \r\n

    The revolutionary Multi-Touch technology built into the gorgeous 3.5-inch display lets you pinch, zoom, scroll, and flick with your fingers.

    \r\n

    Internet in your pocket

    \r\n

    With the Safari web browser, see websites the way they were designed to be seen and zoom in and out with a tap.2 And add Web Clips to your Home screen for quick access to favorite sites.

    \r\n

    What\'s in the box

    \r\n', + 'product_ipod_touch_description_short' => '', + 'product_ipod_touch_link_rewrite' => 'ipod-touch', + 'product_ipod_touch_name' => 'iPod touch', + 'product_folio_ipod_description' => '

    Lorem ipsum

    ', + 'product_folio_ipod_description_short' => '

    Lorem ipsum

    ', + 'product_folio_ipod_link_rewrite' => 'belkin-leather-folio-for-ipod-nano-black-chocolate', + 'product_folio_ipod_name' => 'Belkin Leather Folio for iPod nano - Black / Chocolate', + 'product_earpiece_description' => '
    Using Hi-Definition MicroSpeakers to deliver full-range audio, the ergonomic and lightweight design of the SE210 earphones is ideal for premium on-the-go listening on your iPod or iPhone. They offer the most accurate audio reproduction from both portable and home stereo audio sources--for the ultimate in precision highs and rich low end. In addition, the flexible design allows you to choose the most comfortable fit from a variety of wearing positions.

    Features
    \r\n\r\nSpecifications
    \r\n\r\nIn the box
    \r\n\r\nWarranty
    Two-year limited
    (For details, please visit
    www.shure.com/PersonalAudio/CustomerSupport/ProductReturnsAndWarranty/index.htm.)

    Mfr. Part No.: SE210-A-EFS

    Note: Products sold through this website that do not bear the Apple Brand name are serviced and supported exclusively by their manufacturers in accordance with terms and conditions packaged with the products. Apple\'s Limited Warranty does not apply to products that are not Apple-branded, even if packaged or sold with Apple products. Please contact the manufacturer directly for technical support and customer service.
    ', + 'product_earpiece_description_short' => '

    Evolved from personal monitor technology road-tested by pro musicians and perfected by Shure engineers, the lightweight and stylish SE210 delivers full-range audio that\'s free from outside noise.

    ', + 'product_earpiece_link_rewrite' => 'ecouteurs-a-isolation-sonore-shure-se210-blanc', + 'product_earpiece_name' => 'Shure SE210 Sound-Isolating Earphones for iPod and iPhone', + 'category_ipods_name' => 'iPods', + 'category_ipods_description' => 'Now that you can buy movies from the iTunes Store and sync them to your iPod, the whole world is your theater.', + 'category_ipods_link_rewrite' => 'music-ipods', + 'category_accessories_name' => 'Accessories', + 'category_accessories_description' => 'Wonderful accessories for your iPod', + 'category_accessories_link_rewrite' => 'accessories-ipod', + 'category_laptops_name' => 'Laptops', + 'category_laptops_description' => 'The latest Intel processor, a bigger hard drive, plenty of memory, and even more new features all fit inside just one liberating inch. The new Mac laptops have the performance, power, and connectivity of a desktop computer. Without the desk part.', + 'category_laptops_link_rewrite' => 'laptops', + 'category_laptops_meta_title' => 'Apple laptops', + 'category_laptops_meta_keywords' => 'Apple laptops MacBook Air', + 'category_laptops_meta_description' => 'Powerful and chic Apple laptops', + 'scene_ipods1_name' => 'The iPods Nano', + 'scene_ipods2_name' => 'The iPods', + 'scene_laptops_name' => 'The MacBooks', + 'attributegroup_capacity_name' => 'Disk space', + 'attributegroup_capacity_public_name' => 'Disk space', + 'attributegroup_color_name' => 'Color', + 'attributegroup_color_public_name' => 'Color', + 'attributegroup_processor_name' => 'ICU', + 'attributegroup_processor_public_name' => 'Processor', + 'attribute_capacity_2gb_name' => '2GB', + 'attribute_capacity_4gb_name' => '4GB', + 'attribute_color_metal_name' => 'Metal', + 'attribute_color_blue_name' => 'Blue', + 'attribute_color_pink_name' => 'Pink', + 'attribute_color_green_name' => 'Green', + 'attribute_color_orange_name' => 'Orange', + 'attribute_capacity_64gb_dd_name' => 'Optional 64GB solid-state drive', + 'attribute_capacity_80gb_dd_name' => '80GB Parallel ATA Drive @ 4200 rpm', + 'attribute_processor_160ghz_name' => '1.60GHz Intel Core 2 Duo', + 'attribute_processor_180ghz_name' => '1.80GHz Intel Core 2 Duo', + 'attribute_capacity_80gb_name' => '80GB: 20,000 Songs', + 'attribute_capacity_160gb_name' => '160GB: 40,000 Songs', + 'attribute_color_black_name' => 'Black', + 'attribute_capacity_8gb_name' => '8Go', + 'attribute_capacity_16gb_name' => '16Go', + 'attribute_capacity_32gb_name' => '32Go', + 'attribute_color_purple_name' => 'Purple', + 'attribute_color_yellow_name' => 'Yellow', + 'attribute_color_red_name' => 'Red', + 'ordermessage_delay_name' => 'Delay', + 'ordermessage_delay_message' => 'Hi,\n\nUnfortunately, an item on your order is currently out of stock. This may cause a slight delay in delivery.\nPlease accept our apologies and rest assured that we are working hard to rectify this.\n\nBest regards,', + 'feature_height_name' => 'Height', + 'feature_width_name' => 'Width', + 'feature_depth_name' => 'Depth', + 'feature_weight_name' => 'Weight', + 'feature_headphone_name' => 'Headphone', + 'featurevalue_jack_stereo_value' => 'Jack stereo', + 'featurevalue_mini_jack_stereo_value' => 'Mini-jack stereo', + 'featurevalue_2.75in_value' => '2.75 in', + 'featurevalue_2.06in_value' => '2.06 in', + 'featurevalue_49.2g_value' => '49.2 g', + 'featurevalue_0.26in_value' => '0.26 in', + 'featurevalue_1.07in_value' => '1.07 in', + 'featurevalue_1.62in_value' => '1.62 in', + 'featurevalue_15.5g_value' => '15.5 g', + 'featurevalue_0.41in_value' => '0.41 in (clip included)', + 'featurevalue_4.33in_value' => '4.33 in', + 'featurevalue_2.76in_value' => '2.76 in', + 'featurevalue_120g_value' => '120g', + 'featurevalue_0.31in_value' => '0.31 in', + 'image_macbook_air_1_legend' => 'MacBook Air', + 'image_macbook_air_2_legend' => 'MacBook Air', + 'image_macbook_air_3_legend' => 'MacBook Air', + 'image_macbook_1_legend' => 'MacBook Air', + 'image_macbook_2_legend' => 'MacBook Air', + 'image_macbook_3_legend' => ' MacBook Air SuperDrive', + 'image_ipod_touch_1_legend' => 'iPod touch', + 'image_ipod_touch_2_legend' => 'iPod touch', + 'image_ipod_touch_3_legend' => 'iPod touch', + 'image_ipod_touch_4_legend' => 'iPod touch', + 'image_ipod_touch_5_legend' => 'iPod touch', + 'image_ipod_touch_6_legend' => 'iPod touch', + 'image_folio_ipod_1_legend' => 'housse-portefeuille-en-cuir', + 'image_earpiece_1_legend' => 'Shure SE210 Sound-Isolating Earphones for iPod and iPhone', + 'image_ipod_nano_1_legend' => 'iPod Nano', + 'image_ipod_nano_2_legend' => 'iPod Nano', + 'image_ipod_nano_3_legend' => 'iPod Nano', + 'image_ipod_nano_4_legend' => 'iPod Nano', + 'image_ipod_nano_5_legend' => 'iPod Nano', + 'image_ipod_nano_6_legend' => 'iPod Nano', + 'image_ipod_nano_7_legend' => 'iPod Nano', + 'image_ipod_nano_8_legend' => 'iPod Nano', + 'image_ipod_shuffle_1_legend' => 'iPod shuffle', + 'image_ipod_shuffle_2_legend' => 'iPod shuffle', + 'image_ipod_shuffle_3_legend' => 'iPod shuffle', + 'image_ipod_shuffle_4_legend' => 'iPod shuffle', + 'carrier_custom_delay' => 'Delivery next day!', +); \ No newline at end of file diff --git a/install-new/fixtures/apple/langs/es/data/attribute.xml b/install-new/fixtures/apple/langs/es/data/attribute.xml new file mode 100644 index 000000000..8c2d16be6 --- /dev/null +++ b/install-new/fixtures/apple/langs/es/data/attribute.xml @@ -0,0 +1,63 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/install-new/fixtures/apple/langs/es/data/attribute_group.xml b/install-new/fixtures/apple/langs/es/data/attribute_group.xml new file mode 100644 index 000000000..ef264772a --- /dev/null +++ b/install-new/fixtures/apple/langs/es/data/attribute_group.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/install-new/fixtures/apple/langs/es/data/attributegroup.xml b/install-new/fixtures/apple/langs/es/data/attributegroup.xml new file mode 100644 index 000000000..b529d1f45 --- /dev/null +++ b/install-new/fixtures/apple/langs/es/data/attributegroup.xml @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/install-new/fixtures/apple/langs/es/data/carrier.xml b/install-new/fixtures/apple/langs/es/data/carrier.xml new file mode 100644 index 000000000..6b914666c --- /dev/null +++ b/install-new/fixtures/apple/langs/es/data/carrier.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/install-new/fixtures/apple/langs/es/data/category.xml b/install-new/fixtures/apple/langs/es/data/category.xml new file mode 100644 index 000000000..ab963d66a --- /dev/null +++ b/install-new/fixtures/apple/langs/es/data/category.xml @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/install-new/fixtures/apple/langs/es/data/feature.xml b/install-new/fixtures/apple/langs/es/data/feature.xml new file mode 100644 index 000000000..4f185108b --- /dev/null +++ b/install-new/fixtures/apple/langs/es/data/feature.xml @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/install-new/fixtures/apple/langs/es/data/feature_value.xml b/install-new/fixtures/apple/langs/es/data/feature_value.xml new file mode 100644 index 000000000..ad4fff239 --- /dev/null +++ b/install-new/fixtures/apple/langs/es/data/feature_value.xml @@ -0,0 +1,45 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/install-new/fixtures/apple/langs/es/data/featurevalue.xml b/install-new/fixtures/apple/langs/es/data/featurevalue.xml new file mode 100644 index 000000000..ed80139f7 --- /dev/null +++ b/install-new/fixtures/apple/langs/es/data/featurevalue.xml @@ -0,0 +1,45 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/install-new/fixtures/apple/langs/es/data/image.xml b/install-new/fixtures/apple/langs/es/data/image.xml new file mode 100644 index 000000000..5a3a17132 --- /dev/null +++ b/install-new/fixtures/apple/langs/es/data/image.xml @@ -0,0 +1,81 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/install-new/fixtures/apple/langs/es/data/manufacturer.xml b/install-new/fixtures/apple/langs/es/data/manufacturer.xml new file mode 100644 index 000000000..621ff2471 --- /dev/null +++ b/install-new/fixtures/apple/langs/es/data/manufacturer.xml @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/install-new/fixtures/apple/langs/es/data/order_message.xml b/install-new/fixtures/apple/langs/es/data/order_message.xml new file mode 100644 index 000000000..a1a558c24 --- /dev/null +++ b/install-new/fixtures/apple/langs/es/data/order_message.xml @@ -0,0 +1,13 @@ + + + + + + + \ No newline at end of file diff --git a/install-new/fixtures/apple/langs/es/data/ordermessage.xml b/install-new/fixtures/apple/langs/es/data/ordermessage.xml new file mode 100644 index 000000000..97a1ad7bc --- /dev/null +++ b/install-new/fixtures/apple/langs/es/data/ordermessage.xml @@ -0,0 +1,7 @@ + + + + + + + diff --git a/install-new/fixtures/apple/langs/es/data/product.xml b/install-new/fixtures/apple/langs/es/data/product.xml new file mode 100644 index 000000000..ba7b98bcf --- /dev/null +++ b/install-new/fixtures/apple/langs/es/data/product.xml @@ -0,0 +1,111 @@ + + + + Curvas aerodinámicas.

    +

    Para los aficionados a las sensaciones fuertes, os presentamos nueve nuevos colores. ¡ Y eso no es todo ! Experimenta el diseño elíptico de aluminio y vidrio. ¡ No querrás separarte de él nunca más !

    +


    Estético e inteligente.

    +

    La nueva aplicación Genius hace de iPod nano tu discjockey personal. Genuis crea listas de lectura buscando en tu biblioteca las canciones que combinan entre si.

    +


    Hecho para moverse contigo.

    iPod nano está equipado de un acelerómetro. Muévelo para mezclar tu música. Voltéalo para mostrar Cover Flow. Y descubre juegos adaptados a tus movimientos.

    ]]>
    + Nuevo diseño. Nuevas aplicaciones. Ahora disponible en 8 y 16 Go. iPod nano, más rock que nunca.

    ]]>
    + + + + + + + +
    + + Un enlace inmediato.

    Lleva hasta 500 canciones colgadas de tu manga, de tu cinturón o de tu pantalón. Presume con tu iPod shuffle como signo exterior de tu pasión por la música. Ahora ya existen cuatro nuevos colores más llamativos.

    Llena tu iPod shuffle.

    iTunes es una enorme tienda dedicada a la diversión, una colección de música organizada perfectamente y un jukebox. Con tan solo un clic puedes llenar tu iPod shuffle con canciones.

    La música en tecnicolor.

    iPod shuffle presenta nuevos colores vivos que realzan su diseño estilizado en aluminio anodizado. Elige entre azul, verde, rosa, rojo y el plateado de origen.

    ]]>
    + iPod shuffle, el walkman más portátil del mundo, ahora en azul, verde, rosa y rojo.

    ]]>
    + + + + + + + +
    + + MacBook Air es casi tan fino como tu dedo. Se ha simplificado al máximo y a pesar de ello dispone de una pantalla panorámica de 13,3 pulgadas, de un teclado completo y de un amplio trackpad multi-touch. Portátil al 100%, te evitará tener que hacer un compromiso en lo que concierne a la pantalla y al teclado.

    La increíble sutileza de MacBook Air es el resultado de un gran número de innovaciones en materia de reducción de tamaño y peso. Desde un disco duro más fino hasta puertos E/S disimulados hábilmente pasando por una batería más plana, cada detalle se consideró para que el resultado fuera lo más fino posible.

    MacBook Air fue creado y elaborado para disfrutar plenamente del mundo inalámbrico. Un mundo en el que la norma Wi-Fi 802.11n es tan rápida y accesible que permite liberarse completamente de cualquier atadura para comprar videos en línea, descargar programas, almacenar y compartir archivos en la Red.

    ]]>
    + MacBook Air es ultra fino, ultra portátil y ultra diferente de todo el resto. Pero no se pierden kilos y centímetros en tan solo una noche. Todo esto es el resultado de un nuevo invento de normas. De un sinfín de novedades sin cable. Y de una revolución en el diseño. Con MacBook Air, la informática móvil adquiere una nueva dimensión.

    ]]>
    + + + + + + + +
    + + Cada MacBook está equipado de un disco duro más espacioso, de una capacidad de hasta 250 Go, para almacenar tus colecciones multimedia en expansión y tus datos más preciados.
    El modelo MacBook de 2,4 GHz integra 2 Go de memoria en estándar. Lo ideal para realizar sin dificultad tus aplicaciones preferidas.

    ]]>
    + MacBook te ofrece una gran libertad de movimientos gracias a su exterior resistente en policarbonato, a su tecnología sin cable y a su adaptador cargador sector innovador que se desconecta automáticamente si alguien se engancha en el cable.

    ]]>
    + + + + + + + +
    + + Cinco nuevas aplicaciones a mano

    +


    Consulta tu correo en formato HTML enriquecido, con fotos y ficheros adjuntos en formato PDF, Word y Excel. Consigue mapas, itinerarios e información sobre el estado de la carreteras en tiempo real. Escribe notas y consulta la bolsa y el tiempo.
    Alcanza con un dedo tu música y tus videos, entre otras cosas.
    La tecnología multi-touch revolucionaria integrada a la magnífica pantalla de 3,5 pulgadas te permitirá efectuar zoom hacia adelante y hacia atrás, y pasar y ojear las páginas solo con la ayuda de tus dedos.

    +

    Internet en tu bolsillo

    +

    Con el navegador Safari, podrás consultar sitios web en su compaginación de origen y efectuar un zoom hacia adelante y hacia atrás con la simple presión de un dedo en la pantalla.

    +

    Contenido del estuche
    * iPod touch
    * Auriculares
    * Cable USB 2.0
    * Adaptador Dock
    * Paño de limpieza
    * Base
    * Guía de inicio rápido
    Título
    Párrafo

    ]]>
    + Interfaz multi-touch revolucionaria
    Pantalla panorámica color de 3,5 pulgadas
    Wi-Fi (802.11b/g)
    8 mm de espesor
    Safari, YouTube, iTunes Wi-Fi Music Store, Correo, Mapas, Bolsa, El tiempo, Notas

    ]]>
    + + + + + + + +
    + + Características

    +
      +
    • Cuero suave resistente
    • +
    • Acceso a la tecla Hold
    • +
    • Cierre magnético
    • +
    • Acceso al Dock Conector
    • +
    • Salva pantallas
    • +
    ]]>
    + Este estuche de cuero de última moda garantiza una completa protección contra los arañazos y los pequeños contratiempos de la vida diaria. Su diseño elegante y compacto te permite meter tu Ipod directamente en tu bolsillo o en tu bolso.

    ]]>
    + + + + + + + +
    + + Los auriculares SE210, ligeros y elegantes, están basados en la tecnología de los monitores personales que los músicos profesionales utilizan en carretera y que los ingenieros de Shure han perfeccionado. También están provistos de una salida audio de gama extendida exenta de todo ruido exterior.

    Creado para un aislamiento sonoro

    +

    Las almohadillas provistas de un aislamiento sonoro bloquean más del 90% del ruido ambiente. Combinadas con un diseño ergonómico atractivo y un cable modular, minimizan las intrusiones del mundo exterior y te permiten concentrarte en tu música. Creados para los apasionados por la música que quieren que su aparato audio móvil evolucione, los auriculares SE210 te permitirán llevar la tecnología allí donde tú vayas.

    Micro-transductor alta definición
    Desarrollados para poder tener una audición de calidad durante los desplazamientos, los auriculares SE210 utilizan un único transductor con un armazón equilibrado para poder disfrutar de una gama audio extendida. ¿El resultado ? Un confort audio increíble que restituye cada detalle de un espectáculo en directo.

    El kit universal Deluxe incluye los siguientes elementos :
    - Almohadillas para aislamiento sonoro
    Las almohadillas para el aislamiento sonoro tienen una doble función : bloquear el ruido ambiente y garantizar una estabilidad y un confort personalizados. Como cada oreja es diferente el kit universal Deluxe incluye tres tallas (S, M, L) de almohadillas de espuma y flexibles. Elige la talla y el estilo de almohadilla que mejor te convenga : un buen aislamiento es un factor clave tanto para optimizar el aislamiento sonoro y la respuesta de los bajos como para aumentar el confort durante una audición prolongada.

    - Cable modular

    +

    Basándose en los comentarios de los numerosos usuarios, los ingenieros de Shure han creado una solución de cable separable para permitir un grado de personalización sin precedentes. El cable de 1 metro te permite adaptar el confort en función de la actividad del momento y de la aplicación.

    - Estuche para el transporte

    +

    Además de las almohadillas de aislamiento sonoro y del cable modular, los auriculares SE210 están provistos de un estuche de transporte compacto y resistente para guardar los auriculares de manera práctica y sin dificultad.
    - Garantía límite de dos años
    Cada solución SE210 tiene una garantía piezas y mano de obra de dos años.

    +


    Características técnicas

    +
      +
    • Tipo de transductor : micro-transductor alta definición
    • +
    • Sensibilidad (1 mW) : presión acústica de 114 dB/mW
    • +
    • Impedancia : (à 1 kHz) : 26 W
    • +
    • Gama de frecuencias : 25 Hz ˆ 18,5 kHz
    • +
    • Longitud del cable / con alargador : 45 cm / 136 cm
    • +
    +


    Contenido de la caja

    +
      +
    • Altavoces Shure SE210
    • +
    • Kit universal Deluxe (almohadillas de aislamiento sonoro, cable modular, estuche de transporte)
    • +
    ]]>
    + Los auriculares con aislamiento ergonómicos y ligeros ofrecen la reproducción más fiel proveniente de fuentes audio estéreo móviles o de salón.

    ]]>
    + + + + + + + +
    +
    \ No newline at end of file diff --git a/install-new/fixtures/apple/langs/es/data/profile.xml b/install-new/fixtures/apple/langs/es/data/profile.xml new file mode 100644 index 000000000..2c2a082e7 --- /dev/null +++ b/install-new/fixtures/apple/langs/es/data/profile.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/install-new/fixtures/apple/langs/es/data/scene.xml b/install-new/fixtures/apple/langs/es/data/scene.xml new file mode 100644 index 000000000..e392878f7 --- /dev/null +++ b/install-new/fixtures/apple/langs/es/data/scene.xml @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/install-new/fixtures/apple/langs/es/data/supplier.xml b/install-new/fixtures/apple/langs/es/data/supplier.xml new file mode 100644 index 000000000..07f36aeb6 --- /dev/null +++ b/install-new/fixtures/apple/langs/es/data/supplier.xml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/install-new/fixtures/apple/langs/es/data/tag.xml b/install-new/fixtures/apple/langs/es/data/tag.xml new file mode 100644 index 000000000..9d6294e02 --- /dev/null +++ b/install-new/fixtures/apple/langs/es/data/tag.xml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/install-new/fixtures/apple/langs/es/fixtures.php b/install-new/fixtures/apple/langs/es/fixtures.php new file mode 100644 index 000000000..71d9b446e --- /dev/null +++ b/install-new/fixtures/apple/langs/es/fixtures.php @@ -0,0 +1,126 @@ + '

    Curvas aerodinámicas.

    \r\n

    Para los aficionados a las sensaciones fuertes, os presentamos nueve nuevos colores. ¡ Y eso no es todo ! Experimenta el diseño elíptico de aluminio y vidrio. ¡ No querrás separarte de él nunca más !

    \r\n


    Estético e inteligente.

    \r\n

    La nueva aplicación Genius hace de iPod nano tu discjockey personal. Genuis crea listas de lectura buscando en tu biblioteca las canciones que combinan entre si.

    \r\n


    Hecho para moverse contigo.

    iPod nano está equipado de un acelerómetro. Muévelo para mezclar tu música. Voltéalo para mostrar Cover Flow. Y descubre juegos adaptados a tus movimientos.

    ', + 'product_ipod_nano_description_short' => '

    Nuevo diseño. Nuevas aplicaciones. Ahora disponible en 8 y 16 Go. iPod nano, más rock que nunca.

    ', + 'product_ipod_nano_link_rewrite' => 'ipod-nano', + 'product_ipod_nano_name' => 'iPod Nano', + 'product_ipod_nano_available_now' => 'Disponible', + 'product_ipod_shuffle_description' => '

    Un enlace inmediato.

    Lleva hasta 500 canciones colgadas de tu manga, de tu cinturón o de tu pantalón. Presume con tu iPod shuffle como signo exterior de tu pasión por la música. Ahora ya existen cuatro nuevos colores más llamativos.

    Llena tu iPod shuffle.

    iTunes es una enorme tienda dedicada a la diversión, una colección de música organizada perfectamente y un jukebox. Con tan solo un clic puedes llenar tu iPod shuffle con canciones.

    La música en tecnicolor.

    iPod shuffle presenta nuevos colores vivos que realzan su diseño estilizado en aluminio anodizado. Elige entre azul, verde, rosa, rojo y el plateado de origen.

    ', + 'product_ipod_shuffle_description_short' => '

    iPod shuffle, el walkman más portátil del mundo, ahora en azul, verde, rosa y rojo.

    ', + 'product_ipod_shuffle_link_rewrite' => 'ipod-shuffle', + 'product_ipod_shuffle_name' => 'iPod shuffle', + 'product_ipod_shuffle_available_now' => 'Disponible', + 'product_macbook_air_description' => '

    MacBook Air es casi tan fino como tu dedo. Se ha simplificado al máximo y a pesar de ello dispone de una pantalla panorámica de 13,3 pulgadas, de un teclado completo y de un amplio trackpad multi-touch. Portátil al 100%, te evitará tener que hacer un compromiso en lo que concierne a la pantalla y al teclado.

    La increíble sutileza de MacBook Air es el resultado de un gran número de innovaciones en materia de reducción de tamaño y peso. Desde un disco duro más fino hasta puertos E/S disimulados hábilmente pasando por una batería más plana, cada detalle se consideró para que el resultado fuera lo más fino posible.

    MacBook Air fue creado y elaborado para disfrutar plenamente del mundo inalámbrico. Un mundo en el que la norma Wi-Fi 802.11n es tan rápida y accesible que permite liberarse completamente de cualquier atadura para comprar videos en línea, descargar programas, almacenar y compartir archivos en la Red.

    ', + 'product_macbook_air_description_short' => '

    MacBook Air es ultra fino, ultra portátil y ultra diferente de todo el resto. Pero no se pierden kilos y centímetros en tan solo una noche. Todo esto es el resultado de un nuevo invento de normas. De un sinfín de novedades sin cable. Y de una revolución en el diseño. Con MacBook Air, la informática móvil adquiere una nueva dimensión.

    ', + 'product_macbook_air_link_rewrite' => 'macbook-air', + 'product_macbook_air_name' => 'MacBook Air', + 'product_macbook_air_available_now' => 'Disponible', + 'product_macbook_description' => '

    Cada MacBook está equipado de un disco duro más espacioso, de una capacidad de hasta 250 Go, para almacenar tus colecciones multimedia en expansión y tus datos más preciados.
    El modelo MacBook de 2,4 GHz integra 2 Go de memoria en estándar. Lo ideal para realizar sin dificultad tus aplicaciones preferidas.

    ', + 'product_macbook_description_short' => '

    MacBook te ofrece una gran libertad de movimientos gracias a su exterior resistente en policarbonato, a su tecnología sin cable y a su adaptador cargador sector innovador que se desconecta automáticamente si alguien se engancha en el cable.

    ', + 'product_macbook_link_rewrite' => 'macbook', + 'product_macbook_name' => 'MacBook', + 'product_macbook_available_now' => 'Disponible', + 'product_ipod_touch_description' => '

    Cinco nuevas aplicaciones a mano

    \r\n


    Consulta tu correo en formato HTML enriquecido, con fotos y ficheros adjuntos en formato PDF, Word y Excel. Consigue mapas, itinerarios e información sobre el estado de la carreteras en tiempo real. Escribe notas y consulta la bolsa y el tiempo.
    Alcanza con un dedo tu música y tus videos, entre otras cosas.
    La tecnología multi-touch revolucionaria integrada a la magnífica pantalla de 3,5 pulgadas te permitirá efectuar zoom hacia adelante y hacia atrás, y pasar y ojear las páginas solo con la ayuda de tus dedos.

    \r\n

    Internet en tu bolsillo

    \r\n

    Con el navegador Safari, podrás consultar sitios web en su compaginación de origen y efectuar un zoom hacia adelante y hacia atrás con la simple presión de un dedo en la pantalla.

    \r\n

    Contenido del estuche
    * iPod touch
    * Auriculares
    * Cable USB 2.0
    * Adaptador Dock
    * Paño de limpieza
    * Base
    * Guía de inicio rápido
    Título
    Párrafo

    ', + 'product_ipod_touch_description_short' => '

    Interfaz multi-touch revolucionaria
    Pantalla panorámica color de 3,5 pulgadas
    Wi-Fi (802.11b/g)
    8 mm de espesor
    Safari, YouTube, iTunes Wi-Fi Music Store, Correo, Mapas, Bolsa, El tiempo, Notas

    ', + 'product_ipod_touch_link_rewrite' => 'ipod-touch', + 'product_ipod_touch_name' => 'iPod touch', + 'product_ipod_touch_available_now' => 'Disponible', + 'product_folio_ipod_description' => '

    Características

    \r\n', + 'product_folio_ipod_description_short' => '

    Este estuche de cuero de última moda garantiza una completa protección contra los arañazos y los pequeños contratiempos de la vida diaria. Su diseño elegante y compacto te permite meter tu Ipod directamente en tu bolsillo o en tu bolso.

    ', + 'product_folio_ipod_link_rewrite' => 'funda-cuero-ipod-nano-negro-chocolate', + 'product_folio_ipod_name' => 'Leather Case (iPod nano) - Negro / Chocolate', + 'product_folio_ipod_available_now' => 'Disponible', + 'product_earpiece_description' => '

    Los auriculares SE210, ligeros y elegantes, están basados en la tecnología de los monitores personales que los músicos profesionales utilizan en carretera y que los ingenieros de Shure han perfeccionado. También están provistos de una salida audio de gama extendida exenta de todo ruido exterior.

    Creado para un aislamiento sonoro

    \r\n

    Las almohadillas provistas de un aislamiento sonoro bloquean más del 90% del ruido ambiente. Combinadas con un diseño ergonómico atractivo y un cable modular, minimizan las intrusiones del mundo exterior y te permiten concentrarte en tu música. Creados para los apasionados por la música que quieren que su aparato audio móvil evolucione, los auriculares SE210 te permitirán llevar la tecnología allí donde tú vayas.

    Micro-transductor alta definición
    Desarrollados para poder tener una audición de calidad durante los desplazamientos, los auriculares SE210 utilizan un único transductor con un armazón equilibrado para poder disfrutar de una gama audio extendida. ¿El resultado ? Un confort audio increíble que restituye cada detalle de un espectáculo en directo.

    El kit universal Deluxe incluye los siguientes elementos :
    - Almohadillas para aislamiento sonoro
    Las almohadillas para el aislamiento sonoro tienen una doble función : bloquear el ruido ambiente y garantizar una estabilidad y un confort personalizados. Como cada oreja es diferente el kit universal Deluxe incluye tres tallas (S, M, L) de almohadillas de espuma y flexibles. Elige la talla y el estilo de almohadilla que mejor te convenga : un buen aislamiento es un factor clave tanto para optimizar el aislamiento sonoro y la respuesta de los bajos como para aumentar el confort durante una audición prolongada.

    - Cable modular

    \r\n

    Basándose en los comentarios de los numerosos usuarios, los ingenieros de Shure han creado una solución de cable separable para permitir un grado de personalización sin precedentes. El cable de 1 metro te permite adaptar el confort en función de la actividad del momento y de la aplicación.

    - Estuche para el transporte

    \r\n

    Además de las almohadillas de aislamiento sonoro y del cable modular, los auriculares SE210 están provistos de un estuche de transporte compacto y resistente para guardar los auriculares de manera práctica y sin dificultad.
    - Garantía límite de dos años
    Cada solución SE210 tiene una garantía piezas y mano de obra de dos años.

    \r\n


    Características técnicas

    \r\n\r\n


    Contenido de la caja

    \r\n', + 'product_earpiece_description_short' => '

    Los auriculares con aislamiento ergonómicos y ligeros ofrecen la reproducción más fiel proveniente de fuentes audio estéreo móviles o de salón.

    ', + 'product_earpiece_link_rewrite' => 'auriculares-aislantes-del-sonido-shure-se210', + 'product_earpiece_name' => 'Auriculares aislantes del sonido Shure SE210', + 'product_earpiece_available_now' => 'Disponible', + 'category_ipods_name' => 'iPods', + 'category_ipods_description' => 'Es hora de que el mejor jugador de la música, al escenario para hacer un bis. Con el nuevo iPod, el mundo es tu escenario.', + 'category_ipods_link_rewrite' => 'musica-ipods', + 'category_accessories_name' => 'Accesorios', + 'category_accessories_description' => 'Todos los accesorios de moda para tu iPod', + 'category_accessories_link_rewrite' => 'ipod-accesorios', + 'category_laptops_name' => 'Portátiles', + 'category_laptops_description' => 'El último procesador Intel, un disco duro más grande, con profusión de memoria y otras novedades. Todo en sólo 2,59 cm libres de cualquier obstrucción. Las nuevas portátiles Mac cumplir rendimiento, potencia y conectividad de una computadora de escritorio. Sin la parte del escritorio.', + 'category_laptops_link_rewrite' => 'portatiles-apple', + 'category_laptops_meta_title' => 'Portátiles Apple', + 'category_laptops_meta_keywords' => 'portátiles apple macbook air', + 'category_laptops_meta_description' => 'portátiles apple poderoso y el diseño', + 'scene_ipods1_name' => 'El iPod Nano', + 'scene_ipods2_name' => 'El iPod', + 'scene_laptops_name' => 'El MacBook', + 'attributegroup_capacity_name' => 'Capacidad', + 'attributegroup_capacity_public_name' => 'Capacidad', + 'attributegroup_color_name' => 'Color', + 'attributegroup_color_public_name' => 'Color', + 'attributegroup_processor_name' => 'ICU', + 'attributegroup_processor_public_name' => 'Procesador', + 'attribute_capacity_2gb_name' => '2Go', + 'attribute_capacity_4gb_name' => '4Go', + 'attribute_color_metal_name' => 'Metal', + 'attribute_color_blue_name' => 'Azul', + 'attribute_color_pink_name' => 'Rosa', + 'attribute_color_green_name' => 'Verde', + 'attribute_color_orange_name' => 'Naranja', + 'attribute_capacity_64gb_dd_name' => 'SSD (solid-state drive) 64 Go ', + 'attribute_capacity_80gb_dd_name' => 'Disco duro PATA 80 Go 4 200 tr/min', + 'attribute_processor_160ghz_name' => 'Intel Core 2 Duo para 1,6 GHz', + 'attribute_processor_180ghz_name' => 'Intel Core 2 Duo para 1,8 GHz', + 'attribute_capacity_80gb_name' => '80 Go : 20 000 canciones', + 'attribute_capacity_160gb_name' => '160 Go : 40 000 canciones', + 'attribute_color_black_name' => 'Negro', + 'attribute_capacity_8gb_name' => '8Go', + 'attribute_capacity_16gb_name' => '16Go', + 'attribute_capacity_32gb_name' => '32Go', + 'attribute_color_purple_name' => 'Violeta', + 'attribute_color_yellow_name' => 'Amarillo', + 'attribute_color_red_name' => 'Rojo', + 'ordermessage_delay_name' => 'Plazo', + 'ordermessage_delay_message' => 'Hola,\n\nUno de los elementos de su solicitud se encuentra actualmente la reposición, el cual poco puede retrasar el envío.\n\nGracias por su comprensión.\n\nSaludos cordiales,', + 'feature_height_name' => 'Alto', + 'feature_width_name' => 'Ancho', + 'feature_depth_name' => 'Profundo', + 'feature_weight_name' => 'Peso', + 'feature_headphone_name' => 'Toma auriculares', + 'featurevalue_jack_stereo_value' => 'Jack stereo', + 'featurevalue_mini_jack_stereo_value' => 'Mini-jack stéréo', + 'featurevalue_2.75in_value' => '69.8 mm', + 'featurevalue_2.06in_value' => '52.3 mm', + 'featurevalue_49.2g_value' => '49,2 g', + 'featurevalue_0.26in_value' => '6,5 mm', + 'featurevalue_1.07in_value' => '27.3 mm', + 'featurevalue_1.62in_value' => '41.2 mm', + 'featurevalue_15.5g_value' => '15.5 g', + 'featurevalue_0.41in_value' => '10,5 mm (clip incluyendo)', + 'featurevalue_4.33in_value' => '110 mm', + 'featurevalue_2.76in_value' => '70 mm', + 'featurevalue_120g_value' => '120g', + 'featurevalue_0.31in_value' => '8 mm', + 'image_macbook_air_7_legend' => 'macbook-air-1', + 'image_macbook_air_8_legend' => 'macbook-air-2', + 'image_macbook_air_9_legend' => 'macbook-air-3', + 'image_macbook_7_legend' => 'macbook-air-4', + 'image_macbook_8_legend' => 'macbook-air-5', + 'image_macbook_9_legend' => 'superdrive-pour-macbook-air-1', + 'image_ipod_touch_13_legend' => 'iPod touch', + 'image_ipod_touch_14_legend' => 'iPod touch', + 'image_ipod_touch_15_legend' => 'iPod touch', + 'image_ipod_touch_16_legend' => 'iPod touch', + 'image_ipod_touch_17_legend' => 'iPod touch', + 'image_ipod_touch_18_legend' => 'iPod touch', + 'image_folio_ipod_3_legend' => 'housse-portefeuille-en-cuir', + 'image_earpiece_3_legend' => 'Auriculares aislantes del sonido Shure SE210', + 'image_ipod_nano_17_legend' => 'iPod Nano', + 'image_ipod_nano_18_legend' => 'iPod Nano', + 'image_ipod_nano_19_legend' => 'iPod Nano', + 'image_ipod_nano_20_legend' => 'iPod Nano', + 'image_ipod_nano_21_legend' => 'iPod Nano', + 'image_ipod_nano_22_legend' => 'iPod Nano', + 'image_ipod_nano_23_legend' => 'iPod Nano', + 'image_ipod_nano_24_legend' => 'iPod Nano', + 'image_ipod_shuffle_9_legend' => 'iPod shuffle', + 'image_ipod_shuffle_10_legend' => 'iPod shuffle', + 'image_ipod_shuffle_11_legend' => 'iPod shuffle', + 'image_ipod_shuffle_12_legend' => 'iPod shuffle', + 'carrier_custom_delay' => '¡Entrega día siguiente!', +); \ No newline at end of file diff --git a/install-new/fixtures/apple/langs/fr/data/attribute.xml b/install-new/fixtures/apple/langs/fr/data/attribute.xml new file mode 100644 index 000000000..9a3dd9060 --- /dev/null +++ b/install-new/fixtures/apple/langs/fr/data/attribute.xml @@ -0,0 +1,63 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/install-new/fixtures/apple/langs/fr/data/attribute_group.xml b/install-new/fixtures/apple/langs/fr/data/attribute_group.xml new file mode 100644 index 000000000..eda19821a --- /dev/null +++ b/install-new/fixtures/apple/langs/fr/data/attribute_group.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/install-new/fixtures/apple/langs/fr/data/attributegroup.xml b/install-new/fixtures/apple/langs/fr/data/attributegroup.xml new file mode 100644 index 000000000..6266c5d9a --- /dev/null +++ b/install-new/fixtures/apple/langs/fr/data/attributegroup.xml @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/install-new/fixtures/apple/langs/fr/data/carrier.xml b/install-new/fixtures/apple/langs/fr/data/carrier.xml new file mode 100644 index 000000000..b8612d40a --- /dev/null +++ b/install-new/fixtures/apple/langs/fr/data/carrier.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/install-new/fixtures/apple/langs/fr/data/category.xml b/install-new/fixtures/apple/langs/fr/data/category.xml new file mode 100644 index 000000000..5198da1b2 --- /dev/null +++ b/install-new/fixtures/apple/langs/fr/data/category.xml @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/install-new/fixtures/apple/langs/fr/data/feature.xml b/install-new/fixtures/apple/langs/fr/data/feature.xml new file mode 100644 index 000000000..d3f81071e --- /dev/null +++ b/install-new/fixtures/apple/langs/fr/data/feature.xml @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/install-new/fixtures/apple/langs/fr/data/feature_value.xml b/install-new/fixtures/apple/langs/fr/data/feature_value.xml new file mode 100644 index 000000000..2f7043dad --- /dev/null +++ b/install-new/fixtures/apple/langs/fr/data/feature_value.xml @@ -0,0 +1,45 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/install-new/fixtures/apple/langs/fr/data/featurevalue.xml b/install-new/fixtures/apple/langs/fr/data/featurevalue.xml new file mode 100644 index 000000000..2a09407c2 --- /dev/null +++ b/install-new/fixtures/apple/langs/fr/data/featurevalue.xml @@ -0,0 +1,45 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/install-new/fixtures/apple/langs/fr/data/image.xml b/install-new/fixtures/apple/langs/fr/data/image.xml new file mode 100644 index 000000000..24d096650 --- /dev/null +++ b/install-new/fixtures/apple/langs/fr/data/image.xml @@ -0,0 +1,81 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/install-new/fixtures/apple/langs/fr/data/manufacturer.xml b/install-new/fixtures/apple/langs/fr/data/manufacturer.xml new file mode 100644 index 000000000..621ff2471 --- /dev/null +++ b/install-new/fixtures/apple/langs/fr/data/manufacturer.xml @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/install-new/fixtures/apple/langs/fr/data/order_message.xml b/install-new/fixtures/apple/langs/fr/data/order_message.xml new file mode 100644 index 000000000..1e620210f --- /dev/null +++ b/install-new/fixtures/apple/langs/fr/data/order_message.xml @@ -0,0 +1,13 @@ + + + + + + + \ No newline at end of file diff --git a/install-new/fixtures/apple/langs/fr/data/ordermessage.xml b/install-new/fixtures/apple/langs/fr/data/ordermessage.xml new file mode 100644 index 000000000..1b0faba13 --- /dev/null +++ b/install-new/fixtures/apple/langs/fr/data/ordermessage.xml @@ -0,0 +1,7 @@ + + + + + + + diff --git a/install-new/fixtures/apple/langs/fr/data/product.xml b/install-new/fixtures/apple/langs/fr/data/product.xml new file mode 100644 index 000000000..478c581cd --- /dev/null +++ b/install-new/fixtures/apple/langs/fr/data/product.xml @@ -0,0 +1,164 @@ + + + + Des courbes avantageuses.

    +

    Pour les amateurs de sensations, voici neuf nouveaux coloris. Et ce n'est pas tout ! Faites l'expérience du design elliptique en aluminum et verre. Vous ne voudrez plus le lâcher.

    +

    Beau et intelligent.

    +

    La nouvelle fonctionnalité Genius fait d'iPod nano votre DJ personnel. Genius crée des listes de lecture en recherchant dans votre bibliothèque les chansons qui vont bien ensemble.

    +

    Fait pour bouger avec vous.

    +

    iPod nano est équipé de l'accéléromètre. Secouez-le pour mélanger votre musique. Basculez-le pour afficher Cover Flow. Et découvrez des jeux adaptés à vos mouvements.

    ]]>
    + Nouveau design. Nouvelles fonctionnalités. Désormais en 8 et 16 Go. iPod nano, plus rock que jamais.

    ]]>
    + + + + + + + +
    + + Un lien immédiat.

    +

    Portez jusqu'à 500 chansons accrochées à votre manche, à votre ceinture ou à votre short. Arborez votre iPod shuffle comme signe extérieur de votre passion pour la musique. Existe désormais en quatre nouveaux coloris encore plus éclatants.

    +

    Emplissez votre iPod shuffle.

    +

    iTunes est un immense magasin dédié au divertissement, une collection musicale parfaitement organisée et un jukebox. Vous pouvez en un seul clic remplir votre iPod shuffle de chansons.

    +

    La musique en technicolor.

    +

    iPod shuffle s'affiche désormais dans de nouveaux coloris intenses qui rehaussent le design épuré du boîtier en aluminium anodisé. Choisissez parmi le bleu, le vert, le rose, le rouge et l'argenté d'origine.

    ]]>
    + iPod shuffle, le baladeur le plus portable du monde, se clippe maintenant en bleu, vert, rose et rouge.

    ]]>
    + + + + + + + +
    + + MacBook Air est presque aussi fin que votre index. Pratiquement tout ce qui pouvait être simplifié l'a été. Il n'en dispose pas moins d'un écran panoramique de 13,3 pouces, d'un clavier complet et d'un vaste trackpad multi-touch. Incomparablement portable il vous évite les compromis habituels en matière d'écran et de clavier ultra-portables.

    L'incroyable finesse de MacBook Air est le résultat d'un grand nombre d'innovations en termes de réduction de la taille et du poids. D'un disque dur plus fin à des ports d'E/S habilement dissimulés en passant par une batterie plus plate, chaque détail a été considéré et reconsidéré avec la finesse à l'esprit.

    MacBook Air a été conçu et élaboré pour profiter pleinement du monde sans fil. Un monde dans lequel la norme Wi-Fi 802.11n est désormais si rapide et si accessible qu'elle permet véritablement de se libérer de toute attache pour acheter des vidéos en ligne, télécharger des logicééééiels, stocker et partager des fichiers sur le Web.

    ]]>
    + + + + + + + + +
    + +
    Le modèle MacBook à 2,4 GHz intègre désormais 2 Go de mémoire en standard. L'idéal pour exécuter en souplesse vos applications préférées.]]>
    + + + + + + + + +
    + + Titre 1 +

    Titre 2

    +

    Titre 3

    +

    Titre 4

    +
    Titre 5
    +
    Titre 6
    +
      +
    • UL
    • +
    • UL
    • +
    • UL
    • +
    • UL
    • +
    +
      +
    1. OL
    2. +
    3. OL
    4. +
    5. OL
    6. +
    7. OL
    8. +
    +

    paragraphe...

    +

    paragraphe...

    +

    paragraphe...

    + + + + + + + + + + + + + + + + + + +
    th th th
    tdtdtd
    tdtdtd
    +

    Cinq nouvelles applications sous la main

    +

    Consultez vos e-mails au format HTML enrichi, avec photos et pieces jointes au format PDF, Word et Excel. Obtenez des cartes, des itinéraires et des informations sur l'état de la circulation en temps réel. Rédigez des notes et consultez les cours de la Bourse et les bulletins météo.

    +

    Touchez du doigt votre musique et vos vidéos. Entre autres.

    +

    La technologie multi-touch révolutionnaire intégrée au superbe écran de 3,5 pouces vous permet d'effectuer des zooms avant et arrière, de faire défiler et de feuilleter des pages à l'aide de vos seuls doigts.

    +

    Internet dans votre poche

    +

    Avec le navigateur Safari, vous pouvez consulter des sites web dans leur mise en page d'origine et effectuer un zoom avant et arrière d'une simple pression sur l'écran.

    +

    Contenu du coffret

    +
      +
    • iPod touch
    • +
    • Écouteurs
    • +
    • Câble USB 2.0
    • +
    • Adaptateur Dock
    • +
    • Chiffon de nettoyage
    • +
    • Support
    • +
    • Guide de démarrage rapide
    • +
    +

     

    ]]>
    + Interface multi-touch révolutionnaire
    Écran panoramique couleur de 3,5 pouces
    Wi-Fi (802.11b/g)
    8 mm d'épaisseur
    Safari, YouTube, iTunes Wi-Fi Music Store, Courrier, Cartes, Bourse, Météo, Notes

    ]]>
    + + + + + + + +
    + + Caractéristiques

    +
  • Cuir doux résistant
  • +
  • Accès au bouton Hold
  • +
  • Fermeture magnétique
  • +
  • Accès au Dock Connector
  • +
  • Protège-écran
  • ]]>
    + Cet étui en cuir tendance assure une protection complète contre les éraflures et les petits aléas de la vie quotidienne. Sa conception élégante et compacte vous permet de glisser votre iPod directement dans votre poche ou votre sac à main.

    ]]>
    + + + + + + + +
    + + Basés sur la technologie des moniteurs personnels testée sur la route par des musiciens professionnels et perfectionnée par les ingénieurs Shure, les écouteurs SE210, légers et élégants, fournissent une sortie audio à gamme étendue exempte de tout bruit externe.


    Conception à isolation sonore
    Les embouts à isolation sonore fournis bloquent plus de 90 % du bruit ambiant. Combinés à un design ergonomique séduisant et un câble modulaire, ils minimisent les intrusions du monde extérieur, vous permettant de vous concentrer sur votre musique. Conçus pour les amoureux de la musique qui souhaitent faire évoluer leur appareil audio portable, les écouteurs SE210 vous permettent d'emmener la performance avec vous.

    Micro-transducteur haute définition
    Développés pour une écoute de qualité supérieure en déplacement, les écouteurs SE210 utilisent un seul transducteur à armature équilibrée pour bénéficier d'une gamme audio étendue. Le résultat ? Un confort d'écoute époustouflant qui restitue tous les détails d'un spectacle live.

    +

    Le kit universel Deluxe comprend les éléments suivants :
    - Embouts à isolation sonore
    Les embouts à isolation sonore inclus ont un double rôle : bloquer les bruits ambiants et garantir un maintien et un confort personnalisés. Comme chaque oreille est différente, le kit universel Deluxe comprend trois tailles (S, M, L) d'embouts mousse et flexibles. Choisissez la taille et le style d'embout qui vous conviennent le mieux : une bonne étanchéité est un facteur clé pour optimiser l'isolation sonore et la réponse des basses, ainsi que pour accroître le confort en écoute prolongée.

    - Câble modulaire
    En se basant sur les commentaires de nombreux utilisateurs, les ingénieurs de Shure ont développé une solution de câble détachable pour permettre un degré de personnalisation sans précédent. Le câble de 1 mètre fourni vous permet d'adapter votre confort en fonction de l'activité et de l'application.

    - Étui de transport
    Outre les embouts à isolation sonore et le câble modulaire, un étui de transport compact et résistant est fourni avec les écouteurs SE210 pour vous permettre de ranger vos écouteurs de manière pratique et sans encombres.

    - Garantie limitée de deux ans
    Chaque solution SE210 achetée est couverte par une garantie pièces et main-d'œuvre de deux ans.

    Caractéristiques techniques

    +
      +
    • Type de transducteur : micro-transducteur haute définition
    • +
    • Sensibilité (1 mW) : pression acoustique de 114 dB/mW
    • +
    • Impédance (à 1 kHz) : 26 W
    • +
    • Gamme de fréquences : 25 Hz – 18,5 kHz
    • +
    • Longueur de câble / avec rallonge : 45 cm / 136 cm
    • +
    +

    Contenu du coffret

    +
      +
    • Écouteurs Shure SE210
    • +
    • Kit universel Deluxe (embouts à isolation sonore, câble modulaire, étui de transport)
    • +
    ]]>
    + Les écouteurs à isolation sonore ergonomiques et légers offrent la reproduction audio la plus fidèle en provenance de sources audio stéréo portables ou de salon.

    ]]>
    + + + + + + + +
    +
    \ No newline at end of file diff --git a/install-new/fixtures/apple/langs/fr/data/profile.xml b/install-new/fixtures/apple/langs/fr/data/profile.xml new file mode 100644 index 000000000..73ef67b1a --- /dev/null +++ b/install-new/fixtures/apple/langs/fr/data/profile.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/install-new/fixtures/apple/langs/fr/data/scene.xml b/install-new/fixtures/apple/langs/fr/data/scene.xml new file mode 100644 index 000000000..931f79e2d --- /dev/null +++ b/install-new/fixtures/apple/langs/fr/data/scene.xml @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/install-new/fixtures/apple/langs/fr/data/supplier.xml b/install-new/fixtures/apple/langs/fr/data/supplier.xml new file mode 100644 index 000000000..07f36aeb6 --- /dev/null +++ b/install-new/fixtures/apple/langs/fr/data/supplier.xml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/install-new/fixtures/apple/langs/fr/data/tag.xml b/install-new/fixtures/apple/langs/fr/data/tag.xml new file mode 100644 index 000000000..e8583cab2 --- /dev/null +++ b/install-new/fixtures/apple/langs/fr/data/tag.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/install-new/fixtures/apple/langs/fr/fixtures.php b/install-new/fixtures/apple/langs/fr/fixtures.php new file mode 100644 index 000000000..f71fed856 --- /dev/null +++ b/install-new/fixtures/apple/langs/fr/fixtures.php @@ -0,0 +1,123 @@ + '

    Des courbes avantageuses.

    \r\n

    Pour les amateurs de sensations, voici neuf nouveaux coloris. Et ce n\'est pas tout ! Faites l\'expérience du design elliptique en aluminum et verre. Vous ne voudrez plus le lâcher.

    \r\n

    Beau et intelligent.

    \r\n

    La nouvelle fonctionnalité Genius fait d\'iPod nano votre DJ personnel. Genius crée des listes de lecture en recherchant dans votre bibliothèque les chansons qui vont bien ensemble.

    \r\n

    Fait pour bouger avec vous.

    \r\n

    iPod nano est équipé de l\'accéléromètre. Secouez-le pour mélanger votre musique. Basculez-le pour afficher Cover Flow. Et découvrez des jeux adaptés à vos mouvements.

    ', + 'product_ipod_nano_description_short' => '

    Nouveau design. Nouvelles fonctionnalités. Désormais en 8 et 16 Go. iPod nano, plus rock que jamais.

    ', + 'product_ipod_nano_link_rewrite' => 'ipod-nano', + 'product_ipod_nano_name' => 'iPod Nano', + 'product_ipod_nano_available_now' => 'En stock', + 'product_ipod_shuffle_description' => '

    Un lien immédiat.

    \r\n

    Portez jusqu\'à 500 chansons accrochées à votre manche, à votre ceinture ou à votre short. Arborez votre iPod shuffle comme signe extérieur de votre passion pour la musique. Existe désormais en quatre nouveaux coloris encore plus éclatants.

    \r\n

    Emplissez votre iPod shuffle.

    \r\n

    iTunes est un immense magasin dédié au divertissement, une collection musicale parfaitement organisée et un jukebox. Vous pouvez en un seul clic remplir votre iPod shuffle de chansons.

    \r\n

    La musique en technicolor.

    \r\n

    iPod shuffle s\'affiche désormais dans de nouveaux coloris intenses qui rehaussent le design épuré du boîtier en aluminium anodisé. Choisissez parmi le bleu, le vert, le rose, le rouge et l\'argenté d\'origine.

    ', + 'product_ipod_shuffle_description_short' => '

    iPod shuffle, le baladeur le plus portable du monde, se clippe maintenant en bleu, vert, rose et rouge.

    ', + 'product_ipod_shuffle_link_rewrite' => 'ipod-shuffle', + 'product_ipod_shuffle_name' => 'iPod shuffle', + 'product_ipod_shuffle_available_now' => 'En stock', + 'product_macbook_air_description' => '

    MacBook Air est presque aussi fin que votre index. Pratiquement tout ce qui pouvait être simplifié l\'a été. Il n\'en dispose pas moins d\'un écran panoramique de 13,3 pouces, d\'un clavier complet et d\'un vaste trackpad multi-touch. Incomparablement portable il vous évite les compromis habituels en matière d\'écran et de clavier ultra-portables.

    L\'incroyable finesse de MacBook Air est le résultat d\'un grand nombre d\'innovations en termes de réduction de la taille et du poids. D\'un disque dur plus fin à des ports d\'E/S habilement dissimulés en passant par une batterie plus plate, chaque détail a été considéré et reconsidéré avec la finesse à l\'esprit.

    MacBook Air a été conçu et élaboré pour profiter pleinement du monde sans fil. Un monde dans lequel la norme Wi-Fi 802.11n est désormais si rapide et si accessible qu\'elle permet véritablement de se libérer de toute attache pour acheter des vidéos en ligne, télécharger des logicééééiels, stocker et partager des fichiers sur le Web.

    ', + 'product_macbook_air_description_short' => 'MacBook Air est ultra fin, ultra portable et ultra différent de tout le reste. Mais on ne perd pas des kilos et des centimètres en une nuit. C\'est le résultat d\'une réinvention des normes. D\'une multitude d\'innovations sans fil. Et d\'une révolution dans le design. Avec MacBook Air, l\'informatique mobile prend soudain une nouvelle dimension.', + 'product_macbook_air_link_rewrite' => 'macbook-air', + 'product_macbook_air_name' => 'MacBook Air', + 'product_macbook_description' => 'Chaque MacBook est équipé d\'un disque dur plus spacieux, d\'une capacité atteignant 250 Go, pour stocker vos collections multimédia en expansion et vos données précieuses.

    Le modèle MacBook à 2,4 GHz intègre désormais 2 Go de mémoire en standard. L\'idéal pour exécuter en souplesse vos applications préférées.', + 'product_macbook_description_short' => 'MacBook vous offre la liberté de mouvement grâce à son boîtier résistant en polycarbonate, à ses technologies sans fil intégrées et à son adaptateur secteur MagSafe novateur qui se déconnecte automatiquement si quelqu\'un se prend les pieds dans le fil.', + 'product_macbook_link_rewrite' => 'macbook', + 'product_macbook_name' => 'MacBook', + 'product_ipod_touch_description' => '

    Titre 1

    \r\n

    Titre 2

    \r\n

    Titre 3

    \r\n

    Titre 4

    \r\n
    Titre 5
    \r\n
    Titre 6
    \r\n\r\n
      \r\n
    1. OL
    2. \r\n
    3. OL
    4. \r\n
    5. OL
    6. \r\n
    7. OL
    8. \r\n
    \r\n

    paragraphe...

    \r\n

    paragraphe...

    \r\n

    paragraphe...

    \r\n\r\n \r\n\r\n\r\n\r\n \r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n
    th th th
    tdtdtd
    tdtdtd
    \r\n

    Cinq nouvelles applications sous la main

    \r\n

    Consultez vos e-mails au format HTML enrichi, avec photos et pieces jointes au format PDF, Word et Excel. Obtenez des cartes, des itinéraires et des informations sur l\'état de la circulation en temps réel. Rédigez des notes et consultez les cours de la Bourse et les bulletins météo.

    \r\n

    Touchez du doigt votre musique et vos vidéos. Entre autres.

    \r\n

    La technologie multi-touch révolutionnaire intégrée au superbe écran de 3,5 pouces vous permet d\'effectuer des zooms avant et arrière, de faire défiler et de feuilleter des pages à l\'aide de vos seuls doigts.

    \r\n

    Internet dans votre poche

    \r\n

    Avec le navigateur Safari, vous pouvez consulter des sites web dans leur mise en page d\'origine et effectuer un zoom avant et arrière d\'une simple pression sur l\'écran.

    \r\n

    Contenu du coffret

    \r\n\r\n

    ', + 'product_ipod_touch_description_short' => '

    Interface multi-touch révolutionnaire
    Écran panoramique couleur de 3,5 pouces
    Wi-Fi (802.11b/g)
    8 mm d\'épaisseur
    Safari, YouTube, iTunes Wi-Fi Music Store, Courrier, Cartes, Bourse, Météo, Notes

    ', + 'product_ipod_touch_link_rewrite' => 'ipod-touch', + 'product_ipod_touch_name' => 'iPod touch', + 'product_ipod_touch_available_now' => 'En stock', + 'product_folio_ipod_description' => '

    Caractéristiques

    \r\n
  • Cuir doux résistant
  • \r\n
  • Accès au bouton Hold
  • \r\n
  • Fermeture magnétique
  • \r\n
  • Accès au Dock Connector
  • \r\n
  • Protège-écran
  • ', + 'product_folio_ipod_description_short' => '

    Cet étui en cuir tendance assure une protection complète contre les éraflures et les petits aléas de la vie quotidienne. Sa conception élégante et compacte vous permet de glisser votre iPod directement dans votre poche ou votre sac à main.

    ', + 'product_folio_ipod_link_rewrite' => 'housse-portefeuille-en-cuir-ipod-nano-noir-chocolat', + 'product_folio_ipod_name' => 'Housse portefeuille en cuir (iPod nano) - Noir/Chocolat', + 'product_earpiece_description' => '

    Basés sur la technologie des moniteurs personnels testée sur la route par des musiciens professionnels et perfectionnée par les ingénieurs Shure, les écouteurs SE210, légers et élégants, fournissent une sortie audio à gamme étendue exempte de tout bruit externe.


    Conception à isolation sonore
    Les embouts à isolation sonore fournis bloquent plus de 90 % du bruit ambiant. Combinés à un design ergonomique séduisant et un câble modulaire, ils minimisent les intrusions du monde extérieur, vous permettant de vous concentrer sur votre musique. Conçus pour les amoureux de la musique qui souhaitent faire évoluer leur appareil audio portable, les écouteurs SE210 vous permettent d\'emmener la performance avec vous.

    Micro-transducteur haute définition
    Développés pour une écoute de qualité supérieure en déplacement, les écouteurs SE210 utilisent un seul transducteur à armature équilibrée pour bénéficier d\'une gamme audio étendue. Le résultat ? Un confort d\'écoute époustouflant qui restitue tous les détails d\'un spectacle live.

    \r\n

    Le kit universel Deluxe comprend les éléments suivants :
    - Embouts à isolation sonore
    Les embouts à isolation sonore inclus ont un double rôle : bloquer les bruits ambiants et garantir un maintien et un confort personnalisés. Comme chaque oreille est différente, le kit universel Deluxe comprend trois tailles (S, M, L) d\'embouts mousse et flexibles. Choisissez la taille et le style d\'embout qui vous conviennent le mieux : une bonne étanchéité est un facteur clé pour optimiser l\'isolation sonore et la réponse des basses, ainsi que pour accroître le confort en écoute prolongée.

    - Câble modulaire
    En se basant sur les commentaires de nombreux utilisateurs, les ingénieurs de Shure ont développé une solution de câble détachable pour permettre un degré de personnalisation sans précédent. Le câble de 1 mètre fourni vous permet d\'adapter votre confort en fonction de l\'activité et de l\'application.

    - Étui de transport
    Outre les embouts à isolation sonore et le câble modulaire, un étui de transport compact et résistant est fourni avec les écouteurs SE210 pour vous permettre de ranger vos écouteurs de manière pratique et sans encombres.

    - Garantie limitée de deux ans
    Chaque solution SE210 achetée est couverte par une garantie pièces et main-d\'?uvre de deux ans.

    Caractéristiques techniques

    \r\n\r\n

    Contenu du coffret

    \r\n', + 'product_earpiece_description_short' => '

    Les écouteurs à isolation sonore ergonomiques et légers offrent la reproduction audio la plus fidèle en provenance de sources audio stéréo portables ou de salon.

    ', + 'product_earpiece_link_rewrite' => 'ecouteurs-a-isolation-sonore-shure-se210', + 'product_earpiece_name' => 'Écouteurs à isolation sonore Shure SE210', + 'category_ipods_name' => 'iPods', + 'category_ipods_description' => 'Il est temps, pour le meilleur lecteur de musique, de remonter sur scène pour un rappel. Avec le nouvel iPod, le monde est votre scène.', + 'category_ipods_link_rewrite' => 'musique-ipods', + 'category_accessories_name' => 'Accessoires', + 'category_accessories_description' => 'Tous les accessoires à la mode pour votre iPod', + 'category_accessories_link_rewrite' => 'accessoires-ipod', + 'category_laptops_name' => 'Portables', + 'category_laptops_description' => 'Le tout dernier processeur Intel, un disque dur plus spacieux, de la mémoire à profusion et d\'autres nouveautés. Le tout, dans à peine 2,59 cm qui vous libèrent de toute entrave. Les nouveaux portables Mac réunissent les performances, la puissance et la connectivité d\'un ordinateur de bureau. Sans la partie bureau.', + 'category_laptops_link_rewrite' => 'portables-apple', + 'category_laptops_meta_title' => 'Portables Apple', + 'category_laptops_meta_keywords' => 'portables apple macbook air', + 'category_laptops_meta_description' => 'portables apple puissants et design', + 'scene_ipods1_name' => 'Les iPods Nano', + 'scene_ipods2_name' => 'Les iPods', + 'scene_laptops_name' => 'Les MacBooks', + 'attributegroup_capacity_name' => 'Capacité', + 'attributegroup_capacity_public_name' => 'Capacité', + 'attributegroup_color_name' => 'Couleur', + 'attributegroup_color_public_name' => 'Couleur', + 'attributegroup_processor_name' => 'ICU', + 'attributegroup_processor_public_name' => 'Processeur', + 'attribute_capacity_2gb_name' => '2Go', + 'attribute_capacity_4gb_name' => '4Go', + 'attribute_color_metal_name' => 'Metal', + 'attribute_color_blue_name' => 'Bleu', + 'attribute_color_pink_name' => 'Rose', + 'attribute_color_green_name' => 'Vert', + 'attribute_color_orange_name' => 'Orange', + 'attribute_capacity_64gb_dd_name' => 'Disque dur SSD (solid-state drive) de 64 Go ', + 'attribute_capacity_80gb_dd_name' => 'Disque dur PATA de 80 Go à 4 200 tr/min', + 'attribute_processor_160ghz_name' => 'Intel Core 2 Duo à 1,6 GHz', + 'attribute_processor_180ghz_name' => 'Intel Core 2 Duo à 1,8 GHz', + 'attribute_capacity_80gb_name' => '80 Go : 20 000 chansons', + 'attribute_capacity_160gb_name' => '160 Go : 40 000 chansons', + 'attribute_color_black_name' => 'Noir', + 'attribute_capacity_8gb_name' => '8Go', + 'attribute_capacity_16gb_name' => '16Go', + 'attribute_capacity_32gb_name' => '32Go', + 'attribute_color_purple_name' => 'Violet', + 'attribute_color_yellow_name' => 'Jaune', + 'attribute_color_red_name' => 'Rouge', + 'ordermessage_delay_name' => 'Délai', + 'ordermessage_delay_message' => 'Bonjour,\n\nUn des éléments de votre commande est actuellement en réapprovisionnement, ce qui peut légèrement retarder son envoi.\n\nMerci de votre compréhension.\n\nCordialement,', + 'feature_height_name' => 'Hauteur', + 'feature_width_name' => 'Largeur', + 'feature_depth_name' => 'Profondeur', + 'feature_weight_name' => 'Poids', + 'feature_headphone_name' => 'Prise casque', + 'featurevalue_jack_stereo_value' => 'Jack stéréo', + 'featurevalue_mini_jack_stereo_value' => 'Mini-jack stéréo', + 'featurevalue_2.75in_value' => '69,8 mm', + 'featurevalue_2.06in_value' => '52,3 mm', + 'featurevalue_49.2g_value' => '49,2 g', + 'featurevalue_0.26in_value' => '6,5 mm', + 'featurevalue_1.07in_value' => '27,3 mm', + 'featurevalue_1.62in_value' => '41,2 mm', + 'featurevalue_15.5g_value' => '15,5 g', + 'featurevalue_0.41in_value' => '10,5 mm (clip compris)', + 'featurevalue_4.33in_value' => '110 mm', + 'featurevalue_2.76in_value' => '70 mm', + 'featurevalue_120g_value' => '120g', + 'featurevalue_0.31in_value' => '8 mm', + 'image_macbook_air_4_legend' => 'macbook-air-1', + 'image_macbook_air_5_legend' => 'macbook-air-2', + 'image_macbook_air_6_legend' => 'macbook-air-3', + 'image_macbook_4_legend' => 'macbook-air-4', + 'image_macbook_5_legend' => 'macbook-air-5', + 'image_macbook_6_legend' => 'superdrive-pour-macbook-air-1', + 'image_ipod_touch_7_legend' => 'iPod touch', + 'image_ipod_touch_8_legend' => 'iPod touch', + 'image_ipod_touch_9_legend' => 'iPod touch', + 'image_ipod_touch_10_legend' => 'iPod touch', + 'image_ipod_touch_11_legend' => 'iPod touch', + 'image_ipod_touch_12_legend' => 'iPod touch', + 'image_folio_ipod_2_legend' => 'housse-portefeuille-en-cuir-ipod-nano', + 'image_earpiece_2_legend' => 'Écouteurs à isolation sonore Shure SE210', + 'image_ipod_nano_9_legend' => 'iPod Nano', + 'image_ipod_nano_10_legend' => 'iPod Nano', + 'image_ipod_nano_11_legend' => 'iPod Nano', + 'image_ipod_nano_12_legend' => 'iPod Nano', + 'image_ipod_nano_13_legend' => 'iPod Nano', + 'image_ipod_nano_14_legend' => 'iPod Nano', + 'image_ipod_nano_15_legend' => 'iPod Nano', + 'image_ipod_nano_16_legend' => 'iPod Nano', + 'image_ipod_shuffle_5_legend' => 'iPod shuffle', + 'image_ipod_shuffle_6_legend' => 'iPod shuffle', + 'image_ipod_shuffle_7_legend' => 'iPod shuffle', + 'image_ipod_shuffle_8_legend' => 'iPod shuffle', + 'carrier_custom_delay' => 'Livraison le lendemain !', +); \ No newline at end of file diff --git a/install-new/fixtures/apple/langs/it/data/attribute.xml b/install-new/fixtures/apple/langs/it/data/attribute.xml new file mode 100644 index 000000000..99e257c0e --- /dev/null +++ b/install-new/fixtures/apple/langs/it/data/attribute.xml @@ -0,0 +1,63 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/install-new/fixtures/apple/langs/it/data/attribute_group.xml b/install-new/fixtures/apple/langs/it/data/attribute_group.xml new file mode 100644 index 000000000..99984fbb6 --- /dev/null +++ b/install-new/fixtures/apple/langs/it/data/attribute_group.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/install-new/fixtures/apple/langs/it/data/attributegroup.xml b/install-new/fixtures/apple/langs/it/data/attributegroup.xml new file mode 100644 index 000000000..90908e630 --- /dev/null +++ b/install-new/fixtures/apple/langs/it/data/attributegroup.xml @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/install-new/fixtures/apple/langs/it/data/carrier.xml b/install-new/fixtures/apple/langs/it/data/carrier.xml new file mode 100644 index 000000000..0304df8e2 --- /dev/null +++ b/install-new/fixtures/apple/langs/it/data/carrier.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/install-new/fixtures/apple/langs/it/data/category.xml b/install-new/fixtures/apple/langs/it/data/category.xml new file mode 100644 index 000000000..8ee9be136 --- /dev/null +++ b/install-new/fixtures/apple/langs/it/data/category.xml @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/install-new/fixtures/apple/langs/it/data/feature.xml b/install-new/fixtures/apple/langs/it/data/feature.xml new file mode 100644 index 000000000..65c44265a --- /dev/null +++ b/install-new/fixtures/apple/langs/it/data/feature.xml @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/install-new/fixtures/apple/langs/it/data/feature_value.xml b/install-new/fixtures/apple/langs/it/data/feature_value.xml new file mode 100644 index 000000000..bcd12e1f1 --- /dev/null +++ b/install-new/fixtures/apple/langs/it/data/feature_value.xml @@ -0,0 +1,45 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/install-new/fixtures/apple/langs/it/data/featurevalue.xml b/install-new/fixtures/apple/langs/it/data/featurevalue.xml new file mode 100644 index 000000000..fe99e073e --- /dev/null +++ b/install-new/fixtures/apple/langs/it/data/featurevalue.xml @@ -0,0 +1,45 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/install-new/fixtures/apple/langs/it/data/image.xml b/install-new/fixtures/apple/langs/it/data/image.xml new file mode 100644 index 000000000..414d8f564 --- /dev/null +++ b/install-new/fixtures/apple/langs/it/data/image.xml @@ -0,0 +1,81 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/install-new/fixtures/apple/langs/it/data/manufacturer.xml b/install-new/fixtures/apple/langs/it/data/manufacturer.xml new file mode 100644 index 000000000..621ff2471 --- /dev/null +++ b/install-new/fixtures/apple/langs/it/data/manufacturer.xml @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/install-new/fixtures/apple/langs/it/data/order_message.xml b/install-new/fixtures/apple/langs/it/data/order_message.xml new file mode 100644 index 000000000..8cef0bcff --- /dev/null +++ b/install-new/fixtures/apple/langs/it/data/order_message.xml @@ -0,0 +1,12 @@ + + + + + + + \ No newline at end of file diff --git a/install-new/fixtures/apple/langs/it/data/ordermessage.xml b/install-new/fixtures/apple/langs/it/data/ordermessage.xml new file mode 100644 index 000000000..d5e9fbe51 --- /dev/null +++ b/install-new/fixtures/apple/langs/it/data/ordermessage.xml @@ -0,0 +1,7 @@ + + + + + + + diff --git a/install-new/fixtures/apple/langs/it/data/product.xml b/install-new/fixtures/apple/langs/it/data/product.xml new file mode 100644 index 000000000..ba83eac96 --- /dev/null +++ b/install-new/fixtures/apple/langs/it/data/product.xml @@ -0,0 +1,135 @@ + + + + Curve mozzafiato.

    +

    Per te che ami le sensazioni forti, ecco nove fantastici colori. Ma non è finito qui. Accarezza il design sinuoso fatto di vetro e alluminio dell'iPod nano, e non lo lascerai più.

    +

    Bello e intelligente.

    +

    La nuova funzione Genius trasforma l'iPod nano nel tuo DJ personale. Sa creare delle playlist andando a cercare nella libreria musicale le canzoni che stanno bene insieme.

    +

    Fatto per muoversi con te.

    +

    L'accelerometro è integrato all'iPod nano. Scuotilo per dare uno shuffle alla tua musica. Ruotalo di lato per vedere il Cover Flow. E divertiti con i giochi adattati alle tue movenze.

    ]]>
    + Nuovo design. Nuove funzioni. Adesso in 8GB e 16GB. iPod nano, forte come non mai.

    ]]>
    + + + + + + + +
    + + Sempre attaccato.

    +

    Metti 500 canzoni in tasca. O nella cintura. O nei pantaloncini. iPod shuffle ti fa avere le canzoni sempre addosso. Adesso in colori più nuovi e brillanti.

    +

    Ricarica il tuo iPod shuffle.

    +

    iTunes è il tuo superstore del divertimento. La tua raccolta musicale super organizzata, il tuo juke-box. E puoi ricaricare il tuo iPod shuffle con un click.

    +

    Musica coloratissima.

    +

    Complementi dai colori intensi in alluminio anodizzato: questo è il design semplice di iPod shuffle. Adesso in blu, verde rosa, rosso, e argento originale.

    ]]>
    + iPod shuffle, il lettore musicale più indossabile del mondo, adesso anche nelle tonalità più vibranti di blu, verde, rosa e rosso.

    ]]>
    + + + + + + + +
    + + MacBook Air è sottile quasi come il tuo indice. Praticamente ogni dettaglio è stato semplificato al massimo. Eppure riesce ad avere uno schermo LED di 13,3 pollici, tastiera completa, e un ampio track-pad multi-touch. Incredibilmente portatile, non soffre dei compromessi tra schermo e tastiera.

    La sottigliezza incredibile di MacBook Air è il risultato di moltissime innovazioni nel campo della riduzione di dimensioni e peso. Un hard drive più sottile, porte I/O strategicamente nascoste, batteria più piatta: tutto è stato ben calibrato pensando sempre alla sottigliezza.

    MacBook Air è stato progettato e realizzato per godere a pieno dell'universo del wireless. In un mondo in cui la norma 802.11n Wi-Fi è ormai rapida e disponibile, le persone vivono connesse - acquistano e noleggiano film online, scaricano programmi, condividono e conservano file nel web.

    ]]>
    + + + + + + + + +
    + +
    I modelli MacBook a 2,4GHz ora includono 2GB di memoria standard — ideale per le tue applicazioni preferite.]]>
    + + + + + + + + +
    + + Cinque nuove applicazioni sotto mano +

    Consulta le tue e-mail in formato rich HTML con foto e allegati PDF, Word, e Excel. Ottieni mappe, indicazioni stradali e sul traffico in tempo reale. Prendi appunti e consulta la Borsa e le previsioni meteo.

    +

    Tocca la musica, i film e altro ancora

    +

    La rivoluzionaria tecnologia Multi-Touch integrata al bellissimo schermo da 3,5 pollici ti permette di zoomare avanti e indietro, sfogliare e far scorrere le pagine con le dita.

    +

    Internet in tasca

    +

    Con il web browser Safari, consulta i siti web nella loro impaginazione originale e usa lo zoom avanti e indietro con la sola pressione delle dita.2 Aggiungi Web Clips al tuo schermo per accedere subito ai siti preferiti.

    +

    Nella confezione

    +
      +
    • iPod touch
    • +
    • Auricolari
    • +
    • Cavo USB 2.0
    • +
    • Adattatore Dock
    • +
    • Panno per la pulizia
    • +
    • Supporto
    • +
    • Guida installazione rapida
    • +
    ]]>
    + +
  • Interfaccia Multi-Touch rivoluzionaria
  • +
  • Schermo widescreen a colori da 3,5 pollici
  • +
  • Wi-Fi (802.11b/g)
  • +
  • 8 mm di spessore
  • +
  • Safari, YouTube, Mail, Borsa, Meteo, Appunti, iTunes Wi-Fi Music Store, Mappe
  • +]]>
    + + + + + + + +
    + + Lorem ipsum

    ]]>
    + Lorem ipsum

    ]]>
    + + + + + + + +
    + + L'ascolto con la tecnologia dei Micro-Auricolari ad Alta Definizione permette l'ascolto ideale del tuo iPod o iPhone. E' quanto ti offre il design leggero, ergonomico ed elegante degli auricolari SE210. Ti garantiscono un rendimento audio ad alto livello di stereo portatili e fissi, per un livello di precisione mai raggiunto prima. Inoltre, la forma flessibile ti peremtte di scegliere la posizione migliore per indossarli.

    Caratteristiche
    +
      +
    • Design di isolamento del suono
    • +
    • Micro-speaker ad alta definizione con driver singolo ad armatura bilanciata
    • +
    • Cavo staccabile e regolabile in modo da poterlo allungare o accorciare in base alle tue attività
    • +
    • Connettore compatibile con porte auricolari sia su iPod che iPhone
    • +
    +Specifiche tecniche
    +
      +
    • Tipo speaker: MicroSpeaker ad alta definizione
    • +
    • Gamma di frequenza: 25Hz-18.5kHz
    • +
    • Impedenza (1kHz): 26 Ohms
    • +
    • Sensibilità (1mW): 114 dB SPL/mW
    • +
    • Lunghezza cavo (con prolunga): 18.0 in./45,0 cm (54.0 in./137,1 cm)
    • +
    +Nella confezione
    +
      +
    • Auricolari Shure SE210
    • +
    • Cavo prolunga (36.0 in./91,4 cm)
    • +
    • Tre paia di imbuti in spugna (small, medium, large)
    • +
    • Tre paia di imbuti morbidi (small, medium, large)
    • +
    • Un paio di imbuti a tripla aletta
    • +
    • Custodia da viaggio
    • +
    +Garanzia
    Due anni limitata
    (Per informazioni, visitare
    www.shure.com/PersonalAudio/CustomerSupport/ProductReturnsAndWarranty/index.htm.)

    Mfr. Parte N.: SE210-A-EFS

    Nota: I prodotti venduti tramite questo sito web e che non hanno il marchio Apple ricevono assistenza esclusivamente dai loro produttori con i termini e le condizioni contenute nella confezione del prodotto. La Garanzia Limitata di Apple non si applica ai prodotti che non appartengono al marchio Apple, anche se imballati o venduti con i prodotti Apple . Contatta direttamente il produttore per supporto tecnico e servizio clienti.]]>
    + Basati sulla tecnologia all'avanguardia, testati da musicisti professionisti, e messi a punto da ingegneri Shure, i leggeri ed eleganti SE210 offrono un suono nitido e privo di rumori di fondo.

    ]]>
    + + + + + + + +
    +
    \ No newline at end of file diff --git a/install-new/fixtures/apple/langs/it/data/profile.xml b/install-new/fixtures/apple/langs/it/data/profile.xml new file mode 100644 index 000000000..19e069803 --- /dev/null +++ b/install-new/fixtures/apple/langs/it/data/profile.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/install-new/fixtures/apple/langs/it/data/scene.xml b/install-new/fixtures/apple/langs/it/data/scene.xml new file mode 100644 index 000000000..cb0b6bd42 --- /dev/null +++ b/install-new/fixtures/apple/langs/it/data/scene.xml @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/install-new/fixtures/apple/langs/it/data/supplier.xml b/install-new/fixtures/apple/langs/it/data/supplier.xml new file mode 100644 index 000000000..07f36aeb6 --- /dev/null +++ b/install-new/fixtures/apple/langs/it/data/supplier.xml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/install-new/fixtures/apple/langs/it/fixtures.php b/install-new/fixtures/apple/langs/it/fixtures.php new file mode 100644 index 000000000..2fc02743b --- /dev/null +++ b/install-new/fixtures/apple/langs/it/fixtures.php @@ -0,0 +1,121 @@ + '

    Curve mozzafiato.

    \r\n

    Per te che ami le sensazioni forti, ecco nove fantastici colori. Ma non è finito qui. Accarezza il design sinuoso fatto di vetro e alluminio dell\'iPod nano, e non lo lascerai più.

    \r\n

    Bello e intelligente.

    \r\n

    La nuova funzione Genius trasforma l\'iPod nano nel tuo DJ personale. Sa creare delle playlist andando a cercare nella libreria musicale le canzoni che stanno bene insieme.

    \r\n

    Fatto per muoversi con te.

    \r\n

    L\'accelerometro è integrato all\'iPod nano. Scuotilo per dare uno shuffle alla tua musica. Ruotalo di lato per vedere il Cover Flow. E divertiti con i giochi adattati alle tue movenze.

    ', + 'product_ipod_nano_description_short' => '

    Nuovo design. Nuove funzioni. Adesso in 8GB e 16GB. iPod nano, forte come non mai.

    ', + 'product_ipod_nano_link_rewrite' => 'ipod-nano', + 'product_ipod_nano_name' => 'iPod Nano', + 'product_ipod_nano_available_now' => 'In magazzino', + 'product_ipod_shuffle_description' => '

    Sempre attaccato.

    \r\n

    Metti 500 canzoni in tasca. O nella cintura. O nei pantaloncini. iPod shuffle ti fa avere le canzoni sempre addosso. Adesso in colori più nuovi e brillanti.

    \r\n

    Ricarica il tuo iPod shuffle.

    \r\n

    iTunes è il tuo superstore del divertimento. La tua raccolta musicale super organizzata, il tuo juke-box. E puoi ricaricare il tuo iPod shuffle con un click.

    \r\n

    Musica coloratissima.

    \r\n

    Complementi dai colori intensi in alluminio anodizzato: questo è il design semplice di iPod shuffle. Adesso in blu, verde rosa, rosso, e argento originale.

    ', + 'product_ipod_shuffle_description_short' => '

    iPod shuffle, il lettore musicale più indossabile del mondo, adesso anche nelle tonalità più vibranti di blu, verde, rosa e rosso.

    ', + 'product_ipod_shuffle_link_rewrite' => 'ipod-shuffle', + 'product_ipod_shuffle_name' => 'iPod shuffle', + 'product_ipod_shuffle_available_now' => 'In magazzino', + 'product_macbook_air_description' => '

    MacBook Air è sottile quasi come il tuo indice. Praticamente ogni dettaglio è stato semplificato al massimo. Eppure riesce ad avere uno schermo LED di 13,3 pollici, tastiera completa, e un ampio track-pad multi-touch. Incredibilmente portatile, non soffre dei compromessi tra schermo e tastiera.

    La sottigliezza incredibile di MacBook Air è il risultato di moltissime innovazioni nel campo della riduzione di dimensioni e peso. Un hard drive più sottile, porte I/O strategicamente nascoste, batteria più piatta: tutto è stato ben calibrato pensando sempre alla sottigliezza.

    MacBook Air è stato progettato e realizzato per godere a pieno dell\'universo del wireless. In un mondo in cui la norma 802.11n Wi-Fi è ormai rapida e disponibile, le persone vivono connesse - acquistano e noleggiano film online, scaricano programmi, condividono e conservano file nel web.

    ', + 'product_macbook_air_description_short' => 'MacBook Air è ultra-piatto, ultra-portatile, e ultra come nient\'altro al mondo. Ma non si perdono chili e centimetri in una notte. E\' il risultato di una rielaborazione degli standard. Di moltissime innovazioni sul wireless. E di un design rivoluzionario. Con MacBook Air, l\'informatica mobile acquista una nuova dimensione.', + 'product_macbook_air_link_rewrite' => 'macbook-air', + 'product_macbook_air_name' => 'MacBook Air', + 'product_macbook_description' => 'Tutti i MacBook hanno un hard drive più ampio, fino a 250GB, per conservare le tue raccolte multimediali e i dati importanti.

    I modelli MacBook a 2,4GHz ora includono 2GB di memoria standard ? ideale per le tue applicazioni preferite.', + 'product_macbook_description_short' => 'MacBook ti offre il massimo della libertà di movimento grazie alla sua struttura resistente in policarbonato, alle tecnologie integrate wireless, e all\'innovativo MagSafe Power Adapter che si stacca automaticamente se qualcuno accidentalmente inciampa nel cavo.', + 'product_macbook_link_rewrite' => 'macbook', + 'product_macbook_name' => 'MacBook', + 'product_ipod_touch_description' => '

    Cinque nuove applicazioni sotto mano

    \r\n

    Consulta le tue e-mail in formato rich HTML con foto e allegati PDF, Word, e Excel. Ottieni mappe, indicazioni stradali e sul traffico in tempo reale. Prendi appunti e consulta la Borsa e le previsioni meteo.

    \r\n

    Tocca la musica, i film e altro ancora

    \r\n

    La rivoluzionaria tecnologia Multi-Touch integrata al bellissimo schermo da 3,5 pollici ti permette di zoomare avanti e indietro, sfogliare e far scorrere le pagine con le dita.

    \r\n

    Internet in tasca

    \r\n

    Con il web browser Safari, consulta i siti web nella loro impaginazione originale e usa lo zoom avanti e indietro con la sola pressione delle dita.2 Aggiungi Web Clips al tuo schermo per accedere subito ai siti preferiti.

    \r\n

    Nella confezione

    \r\n', + 'product_ipod_touch_description_short' => '', + 'product_ipod_touch_link_rewrite' => 'ipod-touch', + 'product_ipod_touch_name' => 'iPod touch', + 'product_folio_ipod_description' => '

    Lorem ipsum

    ', + 'product_folio_ipod_description_short' => '

    Lorem ipsum

    ', + 'product_folio_ipod_link_rewrite' => 'custodia-portafoglio-in-pelle-belkin-per-ipod-nano-nero-cioccolato', + 'product_folio_ipod_name' => 'Custodia portafoglio in pelle Belkin per iPod nano - Nero/Cioccolato', + 'product_earpiece_description' => '
    L\'ascolto con la tecnologia dei Micro-Auricolari ad Alta Definizione permette l\'ascolto ideale del tuo iPod o iPhone. E\' quanto ti offre il design leggero, ergonomico ed elegante degli auricolari SE210. Ti garantiscono un rendimento audio ad alto livello di stereo portatili e fissi, per un livello di precisione mai raggiunto prima. Inoltre, la forma flessibile ti peremtte di scegliere la posizione migliore per indossarli.

    Caratteristiche
    \r\n\r\nSpecifiche tecniche
    \r\n\r\nNella confezione
    \r\n\r\nGaranzia
    Due anni limitata
    (Per informazioni, visitare
    www.shure.com/PersonalAudio/CustomerSupport/ProductReturnsAndWarranty/index.htm.)

    Mfr. Parte N.: SE210-A-EFS

    Nota: I prodotti venduti tramite questo sito web e che non hanno il marchio Apple ricevono assistenza esclusivamente dai loro produttori con i termini e le condizioni contenute nella confezione del prodotto. La Garanzia Limitata di Apple non si applica ai prodotti che non appartengono al marchio Apple, anche se imballati o venduti con i prodotti Apple . Contatta direttamente il produttore per supporto tecnico e servizio clienti.
    ', + 'product_earpiece_description_short' => '

    Basati sulla tecnologia all\'avanguardia, testati da musicisti professionisti, e messi a punto da ingegneri Shure, i leggeri ed eleganti SE210 offrono un suono nitido e privo di rumori di fondo.

    ', + 'product_earpiece_link_rewrite' => 'ecouteurs-a-isolation-sonore-shure-se210-blanc', + 'product_earpiece_name' => 'auricolari-sound-isolating-shure-se210-per-ipod-e-iphone', + 'category_ipods_name' => 'iPods', + 'category_ipods_description' => 'Adesso che puoi acquistare film dall\'iTunes Store e inserirli nel tuo iPod, il tuo mondo è un palcoscenico.', + 'category_ipods_link_rewrite' => 'musica-ipods', + 'category_accessories_name' => 'Accessori', + 'category_accessories_description' => 'Fantastici accessori per il tuo iPod', + 'category_accessories_link_rewrite' => 'accessori-ipod', + 'category_laptops_name' => 'Laptop', + 'category_laptops_description' => 'L\'ultimissimo processore Intel, hard drive più ampio, moltissima memoria, e ancora più funzioni tutte inserite in 2,54 centimetri. I nuovi laptop Mac offrono le prestazioni, la potenza e la connettività di un computer da tavolo. Senza bisogno del tavolo.', + 'category_laptops_link_rewrite' => 'laptop', + 'category_laptops_meta_title' => 'laptop Apple', + 'category_laptops_meta_keywords' => 'laptot Apple MacBook Air', + 'category_laptops_meta_description' => 'Laptop Apple potenti ed eleganti', + 'scene_ipods1_name' => 'Gli iPod Nano', + 'scene_ipods2_name' => 'Gli iPod', + 'scene_laptops_name' => 'I MacBook', + 'attributegroup_capacity_name' => 'Spazio disco', + 'attributegroup_capacity_public_name' => 'Spazio disco', + 'attributegroup_color_name' => 'Colore', + 'attributegroup_color_public_name' => 'Colore', + 'attributegroup_processor_name' => 'ICU', + 'attributegroup_processor_public_name' => 'Processore', + 'attribute_capacity_2gb_name' => '2GB', + 'attribute_capacity_4gb_name' => '4GB', + 'attribute_color_metal_name' => 'Metallico', + 'attribute_color_blue_name' => 'Blu', + 'attribute_color_pink_name' => 'Rosa', + 'attribute_color_green_name' => 'Verde', + 'attribute_color_orange_name' => 'Arancio', + 'attribute_capacity_64gb_dd_name' => 'Opzionale solid-state drive 64GB', + 'attribute_capacity_80gb_dd_name' => '80GB Parallel ATA Drive @ 4200 rpm', + 'attribute_processor_160ghz_name' => '1.60GHz Intel Core 2 Duo', + 'attribute_processor_180ghz_name' => '1.80GHz Intel Core 2 Duo', + 'attribute_capacity_80gb_name' => '80GB: 20.000 canzoni', + 'attribute_capacity_160gb_name' => '160GB: 40,000 canzoni', + 'attribute_color_black_name' => 'Nero', + 'attribute_capacity_8gb_name' => '8Go', + 'attribute_capacity_16gb_name' => '16Go', + 'attribute_capacity_32gb_name' => '32Go', + 'attribute_color_purple_name' => 'Viola', + 'attribute_color_yellow_name' => 'Giallo', + 'attribute_color_red_name' => 'Rosso', + 'ordermessage_delay_name' => 'Ritardo', + 'ordermessage_delay_message' => 'Salve,\n\npurtroppo un articolo che hai ordinato non è al momento in magazzino. Questo potrebbe provocare un leggero ritardo nella consegna.\nTi preghiamo di scusarci; ci stiamo organizzando per ovviare a questo inconveniente.\n\nCordialmente,', + 'feature_height_name' => 'Altezza', + 'feature_width_name' => 'Larghezza', + 'feature_depth_name' => 'Profondità', + 'feature_weight_name' => 'Peso', + 'feature_headphone_name' => 'Auricolare', + 'featurevalue_jack_stereo_value' => 'Jack stereo', + 'featurevalue_mini_jack_stereo_value' => 'Mini-jack stéréo', + 'featurevalue_2.75in_value' => '69.8 mm', + 'featurevalue_2.06in_value' => '52.3 mm', + 'featurevalue_49.2g_value' => '49.2 g', + 'featurevalue_0.26in_value' => '6,5 mm', + 'featurevalue_1.07in_value' => '27.3 mm', + 'featurevalue_1.62in_value' => '41.2 mm', + 'featurevalue_15.5g_value' => '15.5 g', + 'featurevalue_0.41in_value' => '10,5 mm)', + 'featurevalue_4.33in_value' => '4.33 in', + 'featurevalue_2.76in_value' => '70 mm', + 'featurevalue_120g_value' => '120g', + 'featurevalue_0.31in_value' => '8 mm', + 'image_macbook_air_13_legend' => 'macbook-air-1', + 'image_macbook_air_14_legend' => 'macbook-air-2', + 'image_macbook_air_15_legend' => 'macbook-air-3', + 'image_macbook_13_legend' => 'macbook-air-4', + 'image_macbook_14_legend' => 'macbook-air-5', + 'image_macbook_15_legend' => 'superdrive-pour-macbook-air-1', + 'image_ipod_touch_25_legend' => 'iPod touch', + 'image_ipod_touch_26_legend' => 'iPod touch', + 'image_ipod_touch_27_legend' => 'iPod touch', + 'image_ipod_touch_28_legend' => 'iPod touch', + 'image_ipod_touch_29_legend' => 'iPod touch', + 'image_ipod_touch_30_legend' => 'iPod touch', + 'image_folio_ipod_5_legend' => 'housse-portefeuille-en-cuir', + 'image_earpiece_5_legend' => 'Shure SE210 Sound-Isolating Earphones for iPod and iPhone', + 'image_ipod_nano_33_legend' => 'iPod Nano', + 'image_ipod_nano_34_legend' => 'iPod Nano', + 'image_ipod_nano_35_legend' => 'iPod Nano', + 'image_ipod_nano_36_legend' => 'iPod Nano', + 'image_ipod_nano_37_legend' => 'iPod Nano', + 'image_ipod_nano_38_legend' => 'iPod Nano', + 'image_ipod_nano_39_legend' => 'iPod Nano', + 'image_ipod_nano_40_legend' => 'iPod Nano', + 'image_ipod_shuffle_17_legend' => 'iPod shuffle', + 'image_ipod_shuffle_18_legend' => 'iPod shuffle', + 'image_ipod_shuffle_19_legend' => 'iPod shuffle', + 'image_ipod_shuffle_20_legend' => 'iPod shuffle', + 'carrier_custom_delay' => 'Consegna il giorno dopo!', +); \ No newline at end of file diff --git a/install-new/index.php b/install-new/index.php new file mode 100644 index 000000000..9ac8d9c95 --- /dev/null +++ b/install-new/index.php @@ -0,0 +1,38 @@ + +* @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 +*/ + +require_once 'init.php'; + +try +{ + require_once _PS_INSTALL_PATH_.'classes/controllerHttp.php'; + InstallControllerHttp::execute(); +} +catch (PrestashopInstallerException $e) +{ + $e->displayMessage(); +} \ No newline at end of file diff --git a/install-new/init.php b/install-new/init.php new file mode 100644 index 000000000..53f0382ff --- /dev/null +++ b/install-new/init.php @@ -0,0 +1,52 @@ + +* @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_INSTALL_VERSION_', '1.5.0.0'); + +// Generate common constants +define('_PS_INSTALL_PATH_', dirname(__FILE__).'/'); +define('_PS_INSTALL_DATA_PATH_', _PS_INSTALL_PATH_.'data/'); +define('_PS_INSTALL_CONTROLLERS_PATH_', _PS_INSTALL_PATH_.'controllers/'); +define('_PS_INSTALL_MODELS_PATH_', _PS_INSTALL_PATH_.'models/'); +define('_PS_INSTALL_LANGS_PATH_', _PS_INSTALL_PATH_.'langs/'); +define('_PS_INSTALL_FIXTURES_PATH_', _PS_INSTALL_PATH_.'fixtures/'); +define('__PS_BASE_URI__', dirname(substr($_SERVER['REQUEST_URI'], 0, strrpos($_SERVER['REQUEST_URI'], '/'))).'/'); +define('_THEME_NAME_', 'prestashop'); +require_once dirname(_PS_INSTALL_PATH_).'/config/defines.inc.php'; +require_once dirname(_PS_INSTALL_PATH_).'/config/defines_uri.inc.php'; + +// PrestaShop autoload is used to load some helpfull classes like Tools. +// Add classes used by installer bellow. +require_once _PS_ROOT_DIR_.'/config/autoload.php'; +require_once _PS_ROOT_DIR_.'/config/alias.php'; +require_once _PS_INSTALL_PATH_.'classes/exception.php'; +require_once _PS_INSTALL_PATH_.'classes/languages.php'; +require_once _PS_INSTALL_PATH_.'classes/language.php'; +require_once _PS_INSTALL_PATH_.'classes/model.php'; +require_once _PS_INSTALL_PATH_.'classes/session.php'; +require_once _PS_INSTALL_PATH_.'classes/sqlLoader.php'; +require_once _PS_INSTALL_PATH_.'classes/xmlLoader.php'; diff --git a/install-new/langs/de/data/carrier.xml b/install-new/langs/de/data/carrier.xml new file mode 100644 index 000000000..874b3763f --- /dev/null +++ b/install-new/langs/de/data/carrier.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/install-new/langs/de/data/category.xml b/install-new/langs/de/data/category.xml new file mode 100644 index 000000000..0e14379d6 --- /dev/null +++ b/install-new/langs/de/data/category.xml @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/install-new/langs/de/data/cms.xml b/install-new/langs/de/data/cms.xml new file mode 100644 index 000000000..5b37800e3 --- /dev/null +++ b/install-new/langs/de/data/cms.xml @@ -0,0 +1,45 @@ + + + + + + + Versand und Rücknahme

    Ihre Versandverpackung

    Pakete werden normalerweise 2 Tage nach Zahlungseingang mit UPS mit Bestellverfolgemöglichkeit und Ablieferung ohne Unterschrift geliefert. Wenn Sie lieber eine UPS-Sendung per Einschreiben erhalten möchten, entstehen zusätzliche Kosten. Bitte kontaktieren Sie uns, bevor Sie dieses Liefermethode wählen. Wir senden Ihnen einen Link für die Bestellverfolgung unabhängig davon, welche Liefermethode Sie wählen.

    Die Versandkosten beinhalten Lade- und Verpackungsgebühren sowie die Portokosten. Die Verladegebühren stehen fest, wobei Transportkosten schwanken, je nach Gesamtgewicht des Pakets. Wir raten Ihnen, mehrere Artikel in einer Bestellung zusammenzufassen. Wir können zwei verschiedene Bestellungen nicht zusammenlegen, und die Versandkosten werden separat für jede Bestellung gerechnet. Ihr Paket wird auf Ihr Risiko versandt, aber zerbrechliche Ware wird besonders sorgsam behandelt.

    Die Versandschachteln sind weit geschnitten und ihre Ware wird gut geschützt verpackt.

    ]]>
    + +
    + + + + + Legal

    Credits

    Konzept und Gestaltung:

    Diese Webseite wurde hergestellt unter Verwendung von PrestaShop™ open-source software.

    ]]>
    + +
    + + + + + Your terms and conditions of use

    Rule 1

    Here is the rule 1 content

    +

    Rule 2

    Here is the rule 2 content

    +

    Rule 3

    Here is the rule 3 content

    ]]>
    + +
    + + + + + About us +

    Our company

    Our company

    +

    Our team

    Our team

    +

    Informations

    Informations

    ]]>
    + +
    + + + + + Secure payment +

    Our secure payment

    With SSL

    +

    Using Visa/Mastercard/Paypal

    About this services

    ]]>
    + +
    +
    \ No newline at end of file diff --git a/install-new/langs/de/data/cms_category.xml b/install-new/langs/de/data/cms_category.xml new file mode 100644 index 000000000..8900bb4cb --- /dev/null +++ b/install-new/langs/de/data/cms_category.xml @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/install-new/langs/de/data/configuration.xml b/install-new/langs/de/data/configuration.xml new file mode 100644 index 000000000..c9cdfd5fd --- /dev/null +++ b/install-new/langs/de/data/configuration.xml @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/install-new/langs/de/data/contact.xml b/install-new/langs/de/data/contact.xml new file mode 100644 index 000000000..12a9fcc54 --- /dev/null +++ b/install-new/langs/de/data/contact.xml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/install-new/langs/de/data/country.xml b/install-new/langs/de/data/country.xml new file mode 100644 index 000000000..dd283ed95 --- /dev/null +++ b/install-new/langs/de/data/country.xml @@ -0,0 +1,735 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/install-new/langs/de/data/gender.xml b/install-new/langs/de/data/gender.xml new file mode 100644 index 000000000..cb01d320f --- /dev/null +++ b/install-new/langs/de/data/gender.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/install-new/langs/de/data/group.xml b/install-new/langs/de/data/group.xml new file mode 100644 index 000000000..ec8411b7c --- /dev/null +++ b/install-new/langs/de/data/group.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/install-new/langs/de/data/meta.xml b/install-new/langs/de/data/meta.xml new file mode 100644 index 000000000..25b609ffd --- /dev/null +++ b/install-new/langs/de/data/meta.xml @@ -0,0 +1,153 @@ + + + + <![CDATA[Fehler 404]]> + + + + + + <![CDATA[Verkaufshits]]> + + + + + + <![CDATA[Kontaktieren Sie uns]]> + + + + + + <![CDATA[]]> + + + + + + <![CDATA[Hersteller]]> + + + + + + <![CDATA[Neue Produkte]]> + + + + + + <![CDATA[Kennwort vergessen]]> + + + + + + <![CDATA[Angebote]]> + + + + + + <![CDATA[Sitemap]]> + + + + + + <![CDATA[Zulieferer]]> + + + + + + <![CDATA[Adresse]]> + + + + + + <![CDATA[Adressen]]> + + + + + + <![CDATA[Authentifizierung]]> + + + + + + <![CDATA[Warenkorb]]> + + + + + + <![CDATA[Discount]]> + + + + + + <![CDATA[Bestellungsverlauf]]> + + + + + + <![CDATA[Kennung]]> + + + + + + <![CDATA[Mein Konto]]> + + + + + + <![CDATA[Bestellungsverfolgung]]> + + + + + + <![CDATA[Bestellschein]]> + + + + + + <![CDATA[Bestellung]]> + + + + + + <![CDATA[Suche]]> + + + + + + <![CDATA[Shops]]> + + + + + + <![CDATA[Bestellung]]> + + + + + + <![CDATA[Auftragsverfolgung Gast]]> + + + + + \ No newline at end of file diff --git a/install-new/langs/de/data/order_return_state.xml b/install-new/langs/de/data/order_return_state.xml new file mode 100644 index 000000000..e9d2d2ed9 --- /dev/null +++ b/install-new/langs/de/data/order_return_state.xml @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/install-new/langs/de/data/order_state.xml b/install-new/langs/de/data/order_state.xml new file mode 100644 index 000000000..6e1e8d491 --- /dev/null +++ b/install-new/langs/de/data/order_state.xml @@ -0,0 +1,51 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/install-new/langs/de/data/profile.xml b/install-new/langs/de/data/profile.xml new file mode 100644 index 000000000..5f24905b3 --- /dev/null +++ b/install-new/langs/de/data/profile.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/install-new/langs/de/data/quick_access.xml b/install-new/langs/de/data/quick_access.xml new file mode 100644 index 000000000..e353401be --- /dev/null +++ b/install-new/langs/de/data/quick_access.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/install-new/langs/de/data/stock_mvt_reason.xml b/install-new/langs/de/data/stock_mvt_reason.xml new file mode 100644 index 000000000..3205fa402 --- /dev/null +++ b/install-new/langs/de/data/stock_mvt_reason.xml @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/install-new/langs/de/data/supplier_order_state.xml b/install-new/langs/de/data/supplier_order_state.xml new file mode 100644 index 000000000..2aab81395 --- /dev/null +++ b/install-new/langs/de/data/supplier_order_state.xml @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/install-new/langs/de/data/tab.xml b/install-new/langs/de/data/tab.xml new file mode 100644 index 000000000..de547bfe7 --- /dev/null +++ b/install-new/langs/de/data/tab.xml @@ -0,0 +1,98 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/install-new/langs/de/flag.jpg b/install-new/langs/de/flag.jpg new file mode 100644 index 000000000..5abbc8cfa Binary files /dev/null and b/install-new/langs/de/flag.jpg differ diff --git a/install-new/langs/de/img/de-default-category.jpg b/install-new/langs/de/img/de-default-category.jpg new file mode 100644 index 000000000..27daddad2 Binary files /dev/null and b/install-new/langs/de/img/de-default-category.jpg differ diff --git a/install-new/langs/de/img/de-default-home.jpg b/install-new/langs/de/img/de-default-home.jpg new file mode 100644 index 000000000..2a3f86bfb Binary files /dev/null and b/install-new/langs/de/img/de-default-home.jpg differ diff --git a/install-new/langs/de/img/de-default-large.jpg b/install-new/langs/de/img/de-default-large.jpg new file mode 100644 index 000000000..dcc29c8f1 Binary files /dev/null and b/install-new/langs/de/img/de-default-large.jpg differ diff --git a/install-new/langs/de/img/de-default-large_scene.jpg b/install-new/langs/de/img/de-default-large_scene.jpg new file mode 100644 index 000000000..c99cfc7a6 Binary files /dev/null and b/install-new/langs/de/img/de-default-large_scene.jpg differ diff --git a/install-new/langs/de/img/de-default-medium.jpg b/install-new/langs/de/img/de-default-medium.jpg new file mode 100644 index 000000000..c0ee66646 Binary files /dev/null and b/install-new/langs/de/img/de-default-medium.jpg differ diff --git a/install-new/langs/de/img/de-default-small.jpg b/install-new/langs/de/img/de-default-small.jpg new file mode 100644 index 000000000..11e9c3688 Binary files /dev/null and b/install-new/langs/de/img/de-default-small.jpg differ diff --git a/install-new/langs/de/img/de-default-thickbox.jpg b/install-new/langs/de/img/de-default-thickbox.jpg new file mode 100644 index 000000000..c37db2680 Binary files /dev/null and b/install-new/langs/de/img/de-default-thickbox.jpg differ diff --git a/install-new/langs/de/img/de-default-thumb_scene.jpg b/install-new/langs/de/img/de-default-thumb_scene.jpg new file mode 100644 index 000000000..28702094e Binary files /dev/null and b/install-new/langs/de/img/de-default-thumb_scene.jpg differ diff --git a/install-new/langs/de/img/de.jpg b/install-new/langs/de/img/de.jpg new file mode 100644 index 000000000..43716f653 Binary files /dev/null and b/install-new/langs/de/img/de.jpg differ diff --git a/install-new/langs/de/language.xml b/install-new/langs/de/language.xml new file mode 100644 index 000000000..95dce5b3b --- /dev/null +++ b/install-new/langs/de/language.xml @@ -0,0 +1,8 @@ + + + + de + d.m.Y + d.m.Y H:i:s + false + \ No newline at end of file diff --git a/install-new/langs/en/data/carrier.xml b/install-new/langs/en/data/carrier.xml new file mode 100644 index 000000000..8dc896a3b --- /dev/null +++ b/install-new/langs/en/data/carrier.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/install-new/langs/en/data/category.xml b/install-new/langs/en/data/category.xml new file mode 100644 index 000000000..175fdd6c5 --- /dev/null +++ b/install-new/langs/en/data/category.xml @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/install-new/langs/en/data/cms.xml b/install-new/langs/en/data/cms.xml new file mode 100644 index 000000000..5539d9ad3 --- /dev/null +++ b/install-new/langs/en/data/cms.xml @@ -0,0 +1,45 @@ + + + + + + + Shipments and returns

    Your pack shipment

    Packages are generally dispatched within 2 days after receipt of payment and are shipped via UPS with tracking and drop-off without signature. If you prefer delivery by UPS Extra with required signature, an additional cost will be applied, so please contact us before choosing this method. Whichever shipment choice you make, we will provide you with a link to track your package online.

    Shipping fees include handling and packing fees as well as postage costs. Handling fees are fixed, whereas transport fees vary according to total weight of the shipment. We advise you to group your items in one order. We cannot group two distinct orders placed separately, and shipping fees will apply to each of them. Your package will be dispatched at your own risk, but special care is taken to protect fragile objects.

    Boxes are amply sized and your items are well-protected.

    ]]>
    + +
    + + + + + Legal

    Credits

    Concept and production:

    This Web site was created using PrestaShop™ open-source software.

    ]]>
    + +
    + + + + + Your terms and conditions of use

    Rule 1

    Here is the rule 1 content

    +

    Rule 2

    Here is the rule 2 content

    +

    Rule 3

    Here is the rule 3 content

    ]]>
    + +
    + + + + + About us +

    Our company

    Our company

    +

    Our team

    Our team

    +

    Informations

    Informations

    ]]>
    + +
    + + + + + Secure payment +

    Our secure payment

    With SSL

    +

    Using Visa/Mastercard/Paypal

    About this services

    ]]>
    + +
    +
    \ No newline at end of file diff --git a/install-new/langs/en/data/cms_category.xml b/install-new/langs/en/data/cms_category.xml new file mode 100644 index 000000000..1b5fde073 --- /dev/null +++ b/install-new/langs/en/data/cms_category.xml @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/install-new/langs/en/data/configuration.xml b/install-new/langs/en/data/configuration.xml new file mode 100644 index 000000000..c4cd24478 --- /dev/null +++ b/install-new/langs/en/data/configuration.xml @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/install-new/langs/en/data/contact.xml b/install-new/langs/en/data/contact.xml new file mode 100644 index 000000000..d56e32aa8 --- /dev/null +++ b/install-new/langs/en/data/contact.xml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/install-new/langs/en/data/country.xml b/install-new/langs/en/data/country.xml new file mode 100644 index 000000000..dd283ed95 --- /dev/null +++ b/install-new/langs/en/data/country.xml @@ -0,0 +1,735 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/install-new/langs/en/data/gender.xml b/install-new/langs/en/data/gender.xml new file mode 100644 index 000000000..487c50fe1 --- /dev/null +++ b/install-new/langs/en/data/gender.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/install-new/langs/en/data/group.xml b/install-new/langs/en/data/group.xml new file mode 100644 index 000000000..ec8411b7c --- /dev/null +++ b/install-new/langs/en/data/group.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/install-new/langs/en/data/meta.xml b/install-new/langs/en/data/meta.xml new file mode 100644 index 000000000..d1e0f843e --- /dev/null +++ b/install-new/langs/en/data/meta.xml @@ -0,0 +1,153 @@ + + + + <![CDATA[404 error]]> + + + + + + <![CDATA[Best sales]]> + + + + + + <![CDATA[Contact us]]> + + + + + + <![CDATA[]]> + + + + + + <![CDATA[Manufacturers]]> + + + + + + <![CDATA[New products]]> + + + + + + <![CDATA[Forgot your password]]> + + + + + + <![CDATA[Prices drop]]> + + + + + + <![CDATA[Sitemap]]> + + + + + + <![CDATA[Suppliers]]> + + + + + + <![CDATA[Address]]> + + + + + + <![CDATA[Addresses]]> + + + + + + <![CDATA[Authentication]]> + + + + + + <![CDATA[Cart]]> + + + + + + <![CDATA[Discount]]> + + + + + + <![CDATA[Order history]]> + + + + + + <![CDATA[Identity]]> + + + + + + <![CDATA[My account]]> + + + + + + <![CDATA[Order follow]]> + + + + + + <![CDATA[Order slip]]> + + + + + + <![CDATA[Order]]> + + + + + + <![CDATA[Search]]> + + + + + + <![CDATA[Stores]]> + + + + + + <![CDATA[Order]]> + + + + + + <![CDATA[Guest tracking]]> + + + + + \ No newline at end of file diff --git a/install-new/langs/en/data/order_return_state.xml b/install-new/langs/en/data/order_return_state.xml new file mode 100644 index 000000000..36435976a --- /dev/null +++ b/install-new/langs/en/data/order_return_state.xml @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/install-new/langs/en/data/order_state.xml b/install-new/langs/en/data/order_state.xml new file mode 100644 index 000000000..d80e83f67 --- /dev/null +++ b/install-new/langs/en/data/order_state.xml @@ -0,0 +1,51 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/install-new/langs/en/data/profile.xml b/install-new/langs/en/data/profile.xml new file mode 100644 index 000000000..5f24905b3 --- /dev/null +++ b/install-new/langs/en/data/profile.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/install-new/langs/en/data/quick_access.xml b/install-new/langs/en/data/quick_access.xml new file mode 100644 index 000000000..d992e2919 --- /dev/null +++ b/install-new/langs/en/data/quick_access.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/install-new/langs/en/data/stock_mvt_reason.xml b/install-new/langs/en/data/stock_mvt_reason.xml new file mode 100644 index 000000000..d7fd8d5f4 --- /dev/null +++ b/install-new/langs/en/data/stock_mvt_reason.xml @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/install-new/langs/en/data/supplier_order_state.xml b/install-new/langs/en/data/supplier_order_state.xml new file mode 100644 index 000000000..dfc4ce42e --- /dev/null +++ b/install-new/langs/en/data/supplier_order_state.xml @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/install-new/langs/en/data/tab.xml b/install-new/langs/en/data/tab.xml new file mode 100644 index 000000000..9208e2667 --- /dev/null +++ b/install-new/langs/en/data/tab.xml @@ -0,0 +1,98 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/install-new/langs/en/flag.jpg b/install-new/langs/en/flag.jpg new file mode 100644 index 000000000..72b962fa6 Binary files /dev/null and b/install-new/langs/en/flag.jpg differ diff --git a/install-new/langs/en/img/en-default-category.jpg b/install-new/langs/en/img/en-default-category.jpg new file mode 100644 index 000000000..c28c90de1 Binary files /dev/null and b/install-new/langs/en/img/en-default-category.jpg differ diff --git a/install-new/langs/en/img/en-default-home.jpg b/install-new/langs/en/img/en-default-home.jpg new file mode 100644 index 000000000..ae6658431 Binary files /dev/null and b/install-new/langs/en/img/en-default-home.jpg differ diff --git a/install-new/langs/en/img/en-default-large.jpg b/install-new/langs/en/img/en-default-large.jpg new file mode 100644 index 000000000..83f20252e Binary files /dev/null and b/install-new/langs/en/img/en-default-large.jpg differ diff --git a/install-new/langs/en/img/en-default-large_scene.jpg b/install-new/langs/en/img/en-default-large_scene.jpg new file mode 100644 index 000000000..0c8b30dbe Binary files /dev/null and b/install-new/langs/en/img/en-default-large_scene.jpg differ diff --git a/install-new/langs/en/img/en-default-medium.jpg b/install-new/langs/en/img/en-default-medium.jpg new file mode 100644 index 000000000..13546aa40 Binary files /dev/null and b/install-new/langs/en/img/en-default-medium.jpg differ diff --git a/install-new/langs/en/img/en-default-small.jpg b/install-new/langs/en/img/en-default-small.jpg new file mode 100644 index 000000000..8cb9417b6 Binary files /dev/null and b/install-new/langs/en/img/en-default-small.jpg differ diff --git a/install-new/langs/en/img/en-default-thickbox.jpg b/install-new/langs/en/img/en-default-thickbox.jpg new file mode 100644 index 000000000..6bd5603f7 Binary files /dev/null and b/install-new/langs/en/img/en-default-thickbox.jpg differ diff --git a/install-new/langs/en/img/en-default-thumb_scene.jpg b/install-new/langs/en/img/en-default-thumb_scene.jpg new file mode 100644 index 000000000..47d2def48 Binary files /dev/null and b/install-new/langs/en/img/en-default-thumb_scene.jpg differ diff --git a/install-new/langs/en/img/en.jpg b/install-new/langs/en/img/en.jpg new file mode 100644 index 000000000..7d07b871d Binary files /dev/null and b/install-new/langs/en/img/en.jpg differ diff --git a/install-new/langs/en/install.php b/install-new/langs/en/install.php new file mode 100644 index 000000000..788314d35 --- /dev/null +++ b/install-new/langs/en/install.php @@ -0,0 +1,23 @@ + array( + 'phone' => '+1 (888) 947-6543', + 'documentation' => 'http://doc.prestashop.com/display/PS14/English+documentation', + 'forum' => 'http://www.prestashop.com/forums/', + 'blog' => 'http://www.prestashop.com/blog/', + 'support' => 'http://www.prestashop.com/', + ), + 'translations' => array( + 'menu_welcome' => 'Welcome!', + 'menu_system' => 'System Compatibility', + 'menu_database' => 'System Configuration', + 'menu_configure' => 'Shop Configuration', + 'menu_process' => 'Installation process', + 'process_step_installDatabase' => 'Create database tables', + 'process_step_populateDatabase' => 'Populate database tables', + 'process_step_configureShop' => 'Configure shop informations', + 'process_step_installModules' => 'Install default modules', + 'process_step_installFixtures' => 'Install demonstration data', + 'process_step_preactivation' => 'Preactivate modules', + ), +); \ No newline at end of file diff --git a/install-new/langs/en/language.xml b/install-new/langs/en/language.xml new file mode 100644 index 000000000..611650cef --- /dev/null +++ b/install-new/langs/en/language.xml @@ -0,0 +1,8 @@ + + + + en-us + m/j/Y + m/j/Y H:i:s + false + \ No newline at end of file diff --git a/install-new/langs/es/data/carrier.xml b/install-new/langs/es/data/carrier.xml new file mode 100644 index 000000000..1626a66f1 --- /dev/null +++ b/install-new/langs/es/data/carrier.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/install-new/langs/es/data/category.xml b/install-new/langs/es/data/category.xml new file mode 100644 index 000000000..bbaf19116 --- /dev/null +++ b/install-new/langs/es/data/category.xml @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/install-new/langs/es/data/cms.xml b/install-new/langs/es/data/cms.xml new file mode 100644 index 000000000..546e1c1d7 --- /dev/null +++ b/install-new/langs/es/data/cms.xml @@ -0,0 +1,53 @@ + + + + + + + shipping & Returns +

    El transporte de su paquete

    +

    Los paquetes son generalmente enviados en 48 horas después de la recepción de su pago. La moda es el estándar expédition Colissimo seguido, entrega sin firma. Si desea una entrega con la firma, un cargo adicional, gracias al contacto con nosotros. Sea cual sea el método de envío seleccionado, vamos a presentar lo antes posible, un vínculo que le permite rastrear el envío en línea de su paquete.

    Gastos de envío incluyen el embalaje, la manipulación y envío. Pueden contener un fijo y una parte variable basado en el precio o el peso de su solicitud. Le recomendamos que para consolidar sus compras en un solo comando. No podemos grupo de dos órdenes distintos y hay que pagar gastos de envío para cada uno. Su paquete es enviado a su propio riesgo, se presta especial atención a las parcelas que contienen objetos frágiles ..

    Los paquetes son de gran tamaño y protegidas.

    ]]>
    + +
    + + + + + Pie de imprenta +

    Créditos

    +

    +


    Concepto y producción:

    Este sitio web fue creado utilizando la solución de código abierto PrestaShop™.

    ]]>
    + +
    + + + + + Sus condiciones de venta +

    Regla N º 1

    +

    Contenido de la Regla Número 1

    +

    Regla N º 2

    +

    Contenido de la Regla N º 2

    +

    Regla N º 3

    +

    Contenido de la Regla Número 3

    ]]>
    + +
    + + + + + Sobre]]> + + + + + + + Pago seguro +

    Ofrecemos pago seguro

    +

    SSL

    +

    Utilice Visa / Mastercard / Paypal

    +

    Acerca de estos servicios

    ]]>
    + +
    +
    \ No newline at end of file diff --git a/install-new/langs/es/data/cms_category.xml b/install-new/langs/es/data/cms_category.xml new file mode 100644 index 000000000..0e89969f2 --- /dev/null +++ b/install-new/langs/es/data/cms_category.xml @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/install-new/langs/es/data/configuration.xml b/install-new/langs/es/data/configuration.xml new file mode 100644 index 000000000..5d3d59cbc --- /dev/null +++ b/install-new/langs/es/data/configuration.xml @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/install-new/langs/es/data/contact.xml b/install-new/langs/es/data/contact.xml new file mode 100644 index 000000000..20b913c52 --- /dev/null +++ b/install-new/langs/es/data/contact.xml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/install-new/langs/es/data/country.xml b/install-new/langs/es/data/country.xml new file mode 100644 index 000000000..c2d1791cf --- /dev/null +++ b/install-new/langs/es/data/country.xml @@ -0,0 +1,735 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/install-new/langs/es/data/gender.xml b/install-new/langs/es/data/gender.xml new file mode 100644 index 000000000..387147a42 --- /dev/null +++ b/install-new/langs/es/data/gender.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/install-new/langs/es/data/group.xml b/install-new/langs/es/data/group.xml new file mode 100644 index 000000000..44605400c --- /dev/null +++ b/install-new/langs/es/data/group.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/install-new/langs/es/data/meta.xml b/install-new/langs/es/data/meta.xml new file mode 100644 index 000000000..b874ebe4f --- /dev/null +++ b/install-new/langs/es/data/meta.xml @@ -0,0 +1,153 @@ + + + + <![CDATA[Error 404]]> + + + + + + <![CDATA[Los más vendidos]]> + + + + + + <![CDATA[Contáctenos]]> + + + + + + <![CDATA[]]> + + + + + + <![CDATA[Fabricantes]]> + + + + + + <![CDATA[Nuevos Productos]]> + + + + + + <![CDATA[Olvidaste tu contraseña]]> + + + + + + <![CDATA[Promociones]]> + + + + + + <![CDATA[Mapa del sitio]]> + + + + + + <![CDATA[Proveedores]]> + + + + + + <![CDATA[Dirección]]> + + + + + + <![CDATA[Direcciones]]> + + + + + + <![CDATA[Autenticación]]> + + + + + + <![CDATA[Carro de la compra]]> + + + + + + <![CDATA[Descuento]]> + + + + + + <![CDATA[Historial de pedidos]]> + + + + + + <![CDATA[Identidad]]> + + + + + + <![CDATA[Mi Cuenta]]> + + + + + + <![CDATA[Devolución de productos]]> + + + + + + <![CDATA[Vales]]> + + + + + + <![CDATA[Carrito]]> + + + + + + <![CDATA[Buscar]]> + + + + + + <![CDATA[Tiendas]]> + + + + + + <![CDATA[Carrito]]> + + + + + + <![CDATA[Estado del pedido]]> + + + + + \ No newline at end of file diff --git a/install-new/langs/es/data/order_return_state.xml b/install-new/langs/es/data/order_return_state.xml new file mode 100644 index 000000000..029cd50f9 --- /dev/null +++ b/install-new/langs/es/data/order_return_state.xml @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/install-new/langs/es/data/order_state.xml b/install-new/langs/es/data/order_state.xml new file mode 100644 index 000000000..483581b89 --- /dev/null +++ b/install-new/langs/es/data/order_state.xml @@ -0,0 +1,51 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/install-new/langs/es/data/profile.xml b/install-new/langs/es/data/profile.xml new file mode 100644 index 000000000..5f24905b3 --- /dev/null +++ b/install-new/langs/es/data/profile.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/install-new/langs/es/data/quick_access.xml b/install-new/langs/es/data/quick_access.xml new file mode 100644 index 000000000..1c0c6f82a --- /dev/null +++ b/install-new/langs/es/data/quick_access.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/install-new/langs/es/data/stock_mvt_reason.xml b/install-new/langs/es/data/stock_mvt_reason.xml new file mode 100644 index 000000000..95bc378f4 --- /dev/null +++ b/install-new/langs/es/data/stock_mvt_reason.xml @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/install-new/langs/es/data/supplier_order_state.xml b/install-new/langs/es/data/supplier_order_state.xml new file mode 100644 index 000000000..2aab81395 --- /dev/null +++ b/install-new/langs/es/data/supplier_order_state.xml @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/install-new/langs/es/data/tab.xml b/install-new/langs/es/data/tab.xml new file mode 100644 index 000000000..bf02564b4 --- /dev/null +++ b/install-new/langs/es/data/tab.xml @@ -0,0 +1,98 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/install-new/langs/es/flag.jpg b/install-new/langs/es/flag.jpg new file mode 100644 index 000000000..adb6dc5d9 Binary files /dev/null and b/install-new/langs/es/flag.jpg differ diff --git a/install-new/langs/es/img/es-default-category.jpg b/install-new/langs/es/img/es-default-category.jpg new file mode 100644 index 000000000..4bf610f55 Binary files /dev/null and b/install-new/langs/es/img/es-default-category.jpg differ diff --git a/install-new/langs/es/img/es-default-home.jpg b/install-new/langs/es/img/es-default-home.jpg new file mode 100644 index 000000000..a047358b8 Binary files /dev/null and b/install-new/langs/es/img/es-default-home.jpg differ diff --git a/install-new/langs/es/img/es-default-large.jpg b/install-new/langs/es/img/es-default-large.jpg new file mode 100644 index 000000000..6683d919f Binary files /dev/null and b/install-new/langs/es/img/es-default-large.jpg differ diff --git a/install-new/langs/es/img/es-default-large_scene.jpg b/install-new/langs/es/img/es-default-large_scene.jpg new file mode 100644 index 000000000..0c8b30dbe Binary files /dev/null and b/install-new/langs/es/img/es-default-large_scene.jpg differ diff --git a/install-new/langs/es/img/es-default-medium.jpg b/install-new/langs/es/img/es-default-medium.jpg new file mode 100644 index 000000000..890436615 Binary files /dev/null and b/install-new/langs/es/img/es-default-medium.jpg differ diff --git a/install-new/langs/es/img/es-default-small.jpg b/install-new/langs/es/img/es-default-small.jpg new file mode 100644 index 000000000..b3118b097 Binary files /dev/null and b/install-new/langs/es/img/es-default-small.jpg differ diff --git a/install-new/langs/es/img/es-default-thickbox.jpg b/install-new/langs/es/img/es-default-thickbox.jpg new file mode 100644 index 000000000..3db0c85b3 Binary files /dev/null and b/install-new/langs/es/img/es-default-thickbox.jpg differ diff --git a/install-new/langs/es/img/es-default-thumb_scene.jpg b/install-new/langs/es/img/es-default-thumb_scene.jpg new file mode 100644 index 000000000..47d2def48 Binary files /dev/null and b/install-new/langs/es/img/es-default-thumb_scene.jpg differ diff --git a/install-new/langs/es/img/es.jpg b/install-new/langs/es/img/es.jpg new file mode 100644 index 000000000..28d7b8c81 Binary files /dev/null and b/install-new/langs/es/img/es.jpg differ diff --git a/install-new/langs/es/language.xml b/install-new/langs/es/language.xml new file mode 100644 index 000000000..184b6905d --- /dev/null +++ b/install-new/langs/es/language.xml @@ -0,0 +1,8 @@ + + + + es + d/m/Y + d/m/Y H:i:s + false + \ No newline at end of file diff --git a/install-new/langs/fr/README.txt b/install-new/langs/fr/README.txt new file mode 100644 index 000000000..9cca756de --- /dev/null +++ b/install-new/langs/fr/README.txt @@ -0,0 +1,67 @@ +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 +@copyright 2007-2011 PrestaShop SA +@license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +International Registered Trademark & Property of PrestaShop SA + +PREPARATION +=========== + +Pour installer PrestaShop, vous avez besoin d'un serveur web distant ou sur votre ordinateur (MAMP), avec un acc�s � une base de donn�es de type MySQL. +Vous aurez besoin d'un acc�s � PhpMyAdmin afin de cr�er un base de donn�es, et d'indiquer les informations de la base de donn�es dans l'installeur. + +Si vous n'avez pas d'h�bergeur et pas la possibilit� de cr�er votre boutique, nous vous proposons un service de boutique cl� en main, qui vous permet de cr�er votre boutique en ligne en moins de 10 minutes sans aucunes notions techniques. +Nous vous invitons � vous rendre sur: + http://www.prestabox.com/ + +INSTALLATION +============ + +Il suffit d'aller dans votre r�pertoire web PrestaShop et de lancer l'installateur (dans /install) :-) + +Si vous avez des erreurs de PHP, peut-�tre que vous n'avez pas PHP5 ou peut �tre devez vous l'activer via votre h�bergeur. +Merci de vous rendre sur notre forum pour trouver les param�tres de pr�-installation (PHP 5, htaccess) pour certains services d'h�bergement (1 & 1, Free, Lycos, OVH, Infomaniak, Amen, GoDaddy, etc.) + +Topic fran�ais sur notre forum officiel : + http://www.prestashop.com/forums/viewthread/446/installation_configuration_et_mise_a_jour/preinstallation_settings_php_5_htaccess_for_certain_hosting_services + +Si vous ne trouvez pas de solution pour lancer l'installateur, merci de vous rendre � cette adresse: + http://www.prestashop.com/forums/viewforum/7/installation_configuration___upgrade + +Il ya toujours des solutions pour vos questions ;-) + +DOCUMENTATION +============= + +Pour toute documentation suppl�mentaire (how-to), vous trouverez notre wiki � cette adresse: + http://www.prestashop.com/wiki/ + +FORUMS +====== + +Vous pouvez �galement discuter, aider et contribuer avec la communaut� PrestaShop sur nos forums: + http://www.prestashop.com/forums/ + +Merci d'avoir t�l�charger et d'utiliser PrestaShop, solution e-commerce open-source ! + +========================== += The PrestaTeam' = += www.PrestaShop.com = +========================== diff --git a/install-new/langs/fr/data/carrier.xml b/install-new/langs/fr/data/carrier.xml new file mode 100644 index 000000000..33a596d24 --- /dev/null +++ b/install-new/langs/fr/data/carrier.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/install-new/langs/fr/data/category.xml b/install-new/langs/fr/data/category.xml new file mode 100644 index 000000000..a627f818a --- /dev/null +++ b/install-new/langs/fr/data/category.xml @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/install-new/langs/fr/data/cms.xml b/install-new/langs/fr/data/cms.xml new file mode 100644 index 000000000..b28b694ba --- /dev/null +++ b/install-new/langs/fr/data/cms.xml @@ -0,0 +1,45 @@ + + + + + + + Livraisons et retours

    Le transport de votre colis

    Les colis sont généralement expédiés en 48h après réception de votre paiement. Le mode d'expédition standard est le Colissimo suivi, remis sans signature. Si vous souhaitez une remise avec signature, un coût supplémentaire s'applique, merci de nous contacter. Quel que soit le mode d'expédition choisi, nous vous fournirons dès que possible un lien qui vous permettra de suivre en ligne la livraison de votre colis.

    Les frais d'expédition comprennent l'emballage, la manutention et les frais postaux. Ils peuvent contenir une partie fixe et une partie variable en fonction du prix ou du poids de votre commande. Nous vous conseillons de regrouper vos achats en une unique commande. Nous ne pouvons pas grouper deux commandes distinctes et vous devrez vous acquitter des frais de port pour chacune d'entre elles. Votre colis est expédié à vos propres risques, un soin particulier est apporté au colis contenant des produits fragiles..

    Les colis sont surdimensionnés et protégés.

    ]]>
    + +
    + + + + + Mentions légales

    Crédits

    Concept et production :

    Ce site internet a été réalisé en utilisant la solution open-source PrestaShop™ .

    ]]>
    + +
    + + + + + Vos conditions de ventes

    Règle n°1

    Contenu de la règle numéro 1

    +

    Règle n°2

    Contenu de la règle numéro 2

    +

    Règle n°3

    Contenu de la règle numéro 3

    ]]>
    + +
    + + + + + A propos +

    Notre entreprise

    Notre entreprise

    +

    Notre équipe

    Notre équipe

    +

    Informations

    Informations

    ]]>
    + +
    + + + + + Paiement sécurisé +

    Notre offre de paiement sécurisé

    Avec SSL

    +

    Utilisation de Visa/Mastercard/Paypal

    A propos de ces services

    ]]>
    + +
    +
    \ No newline at end of file diff --git a/install-new/langs/fr/data/cms_category.xml b/install-new/langs/fr/data/cms_category.xml new file mode 100644 index 000000000..cab20e3ae --- /dev/null +++ b/install-new/langs/fr/data/cms_category.xml @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/install-new/langs/fr/data/configuration.xml b/install-new/langs/fr/data/configuration.xml new file mode 100644 index 000000000..708a483f5 --- /dev/null +++ b/install-new/langs/fr/data/configuration.xml @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/install-new/langs/fr/data/contact.xml b/install-new/langs/fr/data/contact.xml new file mode 100644 index 000000000..657905e5e --- /dev/null +++ b/install-new/langs/fr/data/contact.xml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/install-new/langs/fr/data/country.xml b/install-new/langs/fr/data/country.xml new file mode 100644 index 000000000..c75cce793 --- /dev/null +++ b/install-new/langs/fr/data/country.xml @@ -0,0 +1,735 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/install-new/langs/fr/data/gender.xml b/install-new/langs/fr/data/gender.xml new file mode 100644 index 000000000..76cb44988 --- /dev/null +++ b/install-new/langs/fr/data/gender.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/install-new/langs/fr/data/group.xml b/install-new/langs/fr/data/group.xml new file mode 100644 index 000000000..822aa29af --- /dev/null +++ b/install-new/langs/fr/data/group.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/install-new/langs/fr/data/meta.xml b/install-new/langs/fr/data/meta.xml new file mode 100644 index 000000000..ef210b0ab --- /dev/null +++ b/install-new/langs/fr/data/meta.xml @@ -0,0 +1,153 @@ + + + + <![CDATA[Erreur 404]]> + + + + + + <![CDATA[Meilleures ventes]]> + + + + + + <![CDATA[Contactez-nous]]> + + + + + + <![CDATA[]]> + + + + + + <![CDATA[Fabricants]]> + + + + + + <![CDATA[Nouveaux produits]]> + + + + + + <![CDATA[Mot de passe oublié]]> + + + + + + <![CDATA[Promotions]]> + + + + + + <![CDATA[Plan du site]]> + + + + + + <![CDATA[Fournisseurs]]> + + + + + + <![CDATA[Adresse]]> + + + + + + <![CDATA[Adresses]]> + + + + + + <![CDATA[Authentification]]> + + + + + + <![CDATA[Panier]]> + + + + + + <![CDATA[Bons de réduction]]> + + + + + + <![CDATA[Historique des commandes]]> + + + + + + <![CDATA[Identité]]> + + + + + + <![CDATA[Mon compte]]> + + + + + + <![CDATA[Détails de la commande]]> + + + + + + <![CDATA[Avoirs]]> + + + + + + <![CDATA[Commande]]> + + + + + + <![CDATA[Recherche]]> + + + + + + <![CDATA[Magasins]]> + + + + + + <![CDATA[Commande]]> + + + + + + <![CDATA[Suivi de commande invité]]> + + + + + \ No newline at end of file diff --git a/install-new/langs/fr/data/order_return_state.xml b/install-new/langs/fr/data/order_return_state.xml new file mode 100644 index 000000000..156255468 --- /dev/null +++ b/install-new/langs/fr/data/order_return_state.xml @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/install-new/langs/fr/data/order_state.xml b/install-new/langs/fr/data/order_state.xml new file mode 100644 index 000000000..169c486ba --- /dev/null +++ b/install-new/langs/fr/data/order_state.xml @@ -0,0 +1,51 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/install-new/langs/fr/data/profile.xml b/install-new/langs/fr/data/profile.xml new file mode 100644 index 000000000..5f24905b3 --- /dev/null +++ b/install-new/langs/fr/data/profile.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/install-new/langs/fr/data/quick_access.xml b/install-new/langs/fr/data/quick_access.xml new file mode 100644 index 000000000..7aa1bea7e --- /dev/null +++ b/install-new/langs/fr/data/quick_access.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/install-new/langs/fr/data/stock_mvt_reason.xml b/install-new/langs/fr/data/stock_mvt_reason.xml new file mode 100644 index 000000000..567b5fe62 --- /dev/null +++ b/install-new/langs/fr/data/stock_mvt_reason.xml @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/install-new/langs/fr/data/supplier_order_state.xml b/install-new/langs/fr/data/supplier_order_state.xml new file mode 100644 index 000000000..5ab2e5f0f --- /dev/null +++ b/install-new/langs/fr/data/supplier_order_state.xml @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/install-new/langs/fr/data/tab.xml b/install-new/langs/fr/data/tab.xml new file mode 100644 index 000000000..03f57b413 --- /dev/null +++ b/install-new/langs/fr/data/tab.xml @@ -0,0 +1,98 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/install-new/langs/fr/flag.jpg b/install-new/langs/fr/flag.jpg new file mode 100644 index 000000000..4cd7f3806 Binary files /dev/null and b/install-new/langs/fr/flag.jpg differ diff --git a/install-new/langs/fr/img/fr-default-category.jpg b/install-new/langs/fr/img/fr-default-category.jpg new file mode 100644 index 000000000..5c77b7622 Binary files /dev/null and b/install-new/langs/fr/img/fr-default-category.jpg differ diff --git a/install-new/langs/fr/img/fr-default-home.jpg b/install-new/langs/fr/img/fr-default-home.jpg new file mode 100644 index 000000000..b69c6bb70 Binary files /dev/null and b/install-new/langs/fr/img/fr-default-home.jpg differ diff --git a/install-new/langs/fr/img/fr-default-large.jpg b/install-new/langs/fr/img/fr-default-large.jpg new file mode 100644 index 000000000..a1fb7b9e6 Binary files /dev/null and b/install-new/langs/fr/img/fr-default-large.jpg differ diff --git a/install-new/langs/fr/img/fr-default-large_scene.jpg b/install-new/langs/fr/img/fr-default-large_scene.jpg new file mode 100644 index 000000000..b68f5ddca Binary files /dev/null and b/install-new/langs/fr/img/fr-default-large_scene.jpg differ diff --git a/install-new/langs/fr/img/fr-default-medium.jpg b/install-new/langs/fr/img/fr-default-medium.jpg new file mode 100644 index 000000000..485a36c72 Binary files /dev/null and b/install-new/langs/fr/img/fr-default-medium.jpg differ diff --git a/install-new/langs/fr/img/fr-default-small.jpg b/install-new/langs/fr/img/fr-default-small.jpg new file mode 100644 index 000000000..335ddd86f Binary files /dev/null and b/install-new/langs/fr/img/fr-default-small.jpg differ diff --git a/install-new/langs/fr/img/fr-default-thickbox.jpg b/install-new/langs/fr/img/fr-default-thickbox.jpg new file mode 100644 index 000000000..1f932656b Binary files /dev/null and b/install-new/langs/fr/img/fr-default-thickbox.jpg differ diff --git a/install-new/langs/fr/img/fr-default-thumb_scene.jpg b/install-new/langs/fr/img/fr-default-thumb_scene.jpg new file mode 100644 index 000000000..91d22f97f Binary files /dev/null and b/install-new/langs/fr/img/fr-default-thumb_scene.jpg differ diff --git a/install-new/langs/fr/img/fr.jpg b/install-new/langs/fr/img/fr.jpg new file mode 100644 index 000000000..ed443472f Binary files /dev/null and b/install-new/langs/fr/img/fr.jpg differ diff --git a/install-new/langs/fr/install.php b/install-new/langs/fr/install.php new file mode 100644 index 000000000..cfd5ddf27 --- /dev/null +++ b/install-new/langs/fr/install.php @@ -0,0 +1,10 @@ + array( + 'phone' => '+33 (0)1.40.18.30.04', + 'documentation' => 'http://doc.prestashop.com/pages/viewpage.action?pageId=2424836', + ), + 'translations' => array( + 'Choose the installer language:' => 'Choisissez votre langue pour l\'installation', + ), +); \ No newline at end of file diff --git a/install-new/langs/fr/language.xml b/install-new/langs/fr/language.xml new file mode 100644 index 000000000..65808606b --- /dev/null +++ b/install-new/langs/fr/language.xml @@ -0,0 +1,8 @@ + + + + fr + d/m/Y + d/m/Y H:i:s + false + \ No newline at end of file diff --git a/install-new/langs/it/data/carrier.xml b/install-new/langs/it/data/carrier.xml new file mode 100644 index 000000000..7b93a6cc2 --- /dev/null +++ b/install-new/langs/it/data/carrier.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/install-new/langs/it/data/category.xml b/install-new/langs/it/data/category.xml new file mode 100644 index 000000000..997d877a4 --- /dev/null +++ b/install-new/langs/it/data/category.xml @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/install-new/langs/it/data/cms.xml b/install-new/langs/it/data/cms.xml new file mode 100644 index 000000000..02239d87f --- /dev/null +++ b/install-new/langs/it/data/cms.xml @@ -0,0 +1,45 @@ + + + + + + + Spedizioni e resi

    Spedizione del tuo pacco

    I pacchi sono solitamente spediti entro 2 giorni dopo il ricevimento del pagamento e inviati tramite UPS con controllo e consegna senza firma. Se preferisci una consegna con UPS Extra con richiesta di firma, sarà applicato un costo aggiuntivo, pertanto contattaci prima di scegliere questo mezzo. Qualunque tipo di spedizione tu scelga, ti garantiremo un link per controllare online il percorso del tuo pacco.

    Le spese di spedizione comprendono le spese di imballaggio e affrancatura. Le spese di imballaggio sono fisse, mentre quelle di trasporto variano in base al peso totale della spedizione. Ti consigliamo di raggruppare i tuoi articoli in un unico ordine. Non possiamo raggruppare due ordini distinti eseguiti separatamente, e ad ognuno di esso saranno applicate le spese di spedizione. Il tuo pacco sarà inviato sotto la tua responsabilità, ma un'attenzione particolare è riservata agli oggetti fragili.

    Le scatole hanno dimensioni ragionevoli e i tuoi articoli sono ben protetti.

    ]]>
    + +
    + + + + + Legale

    Crediti

    Creazione e produzione:

    Questo sito web è stato realizzato usando un software open-sourcePrestaShop™.

    ]]>
    + +
    + + + + + I tuoi termini e condizioni d'uso

    Regola 1

    Ecco il contenuto della regola 1

    +

    Regola 2

    Ecco il contenuto della regola 2

    +

    Regola 3

    Ecco il contenuto della regola 3

    ]]>
    + +
    + + + + + Chi siamo +

    La nostra azienda

    La nostra azienda

    +

    Il nostro team

    Il nostro team

    +

    Informazioni

    Informazioni

    ]]>
    + +
    + + + + + Pagamento sicuro +

    Il nostro pagamento sicuro

    Con SSL

    +

    Usando Visa/Mastercard/Paypal

    Cosa sono questi servizi

    ]]>
    + +
    +
    \ No newline at end of file diff --git a/install-new/langs/it/data/cms_category.xml b/install-new/langs/it/data/cms_category.xml new file mode 100644 index 000000000..1b5fde073 --- /dev/null +++ b/install-new/langs/it/data/cms_category.xml @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/install-new/langs/it/data/configuration.xml b/install-new/langs/it/data/configuration.xml new file mode 100644 index 000000000..3a44fa49a --- /dev/null +++ b/install-new/langs/it/data/configuration.xml @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/install-new/langs/it/data/contact.xml b/install-new/langs/it/data/contact.xml new file mode 100644 index 000000000..4e0b55c85 --- /dev/null +++ b/install-new/langs/it/data/contact.xml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/install-new/langs/it/data/country.xml b/install-new/langs/it/data/country.xml new file mode 100644 index 000000000..dd283ed95 --- /dev/null +++ b/install-new/langs/it/data/country.xml @@ -0,0 +1,735 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/install-new/langs/it/data/gender.xml b/install-new/langs/it/data/gender.xml new file mode 100644 index 000000000..e1974fc87 --- /dev/null +++ b/install-new/langs/it/data/gender.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/install-new/langs/it/data/group.xml b/install-new/langs/it/data/group.xml new file mode 100644 index 000000000..ec8411b7c --- /dev/null +++ b/install-new/langs/it/data/group.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/install-new/langs/it/data/meta.xml b/install-new/langs/it/data/meta.xml new file mode 100644 index 000000000..494ca526e --- /dev/null +++ b/install-new/langs/it/data/meta.xml @@ -0,0 +1,153 @@ + + + + <![CDATA[errore 404]]> + + + + + + <![CDATA[Vendite migliori]]> + + + + + + <![CDATA[Contattaci]]> + + + + + + <![CDATA[]]> + + + + + + <![CDATA[Produttori]]> + + + + + + <![CDATA[Nuovi prodotti]]> + + + + + + <![CDATA[Hai dimenticato la password]]> + + + + + + <![CDATA[Riduzioni prezzi]]> + + + + + + <![CDATA[Mappa del sito]]> + + + + + + <![CDATA[Fornitori]]> + + + + + + <![CDATA[Indirizzo]]> + + + + + + <![CDATA[Indirizzi]]> + + + + + + <![CDATA[Autenticazione]]> + + + + + + <![CDATA[Carrello]]> + + + + + + <![CDATA[Sconto]]> + + + + + + <![CDATA[Storico ordine]]> + + + + + + <![CDATA[Identità]]> + + + + + + <![CDATA[Il mio account]]> + + + + + + <![CDATA[Seguito ordine]]> + + + + + + <![CDATA[Nota di ordine]]> + + + + + + <![CDATA[Ordine]]> + + + + + + <![CDATA[Cerca]]> + + + + + + <![CDATA[Negozi]]> + + + + + + <![CDATA[Ordine]]> + + + + + + <![CDATA[Ospite di monitoraggio]]> + + + + + \ No newline at end of file diff --git a/install-new/langs/it/data/order_return_state.xml b/install-new/langs/it/data/order_return_state.xml new file mode 100644 index 000000000..508d73ab5 --- /dev/null +++ b/install-new/langs/it/data/order_return_state.xml @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/install-new/langs/it/data/order_state.xml b/install-new/langs/it/data/order_state.xml new file mode 100644 index 000000000..308520a7b --- /dev/null +++ b/install-new/langs/it/data/order_state.xml @@ -0,0 +1,51 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/install-new/langs/it/data/profile.xml b/install-new/langs/it/data/profile.xml new file mode 100644 index 000000000..5f24905b3 --- /dev/null +++ b/install-new/langs/it/data/profile.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/install-new/langs/it/data/quick_access.xml b/install-new/langs/it/data/quick_access.xml new file mode 100644 index 000000000..4189e6e77 --- /dev/null +++ b/install-new/langs/it/data/quick_access.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/install-new/langs/it/data/stock_mvt_reason.xml b/install-new/langs/it/data/stock_mvt_reason.xml new file mode 100644 index 000000000..d398fb6d6 --- /dev/null +++ b/install-new/langs/it/data/stock_mvt_reason.xml @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/install-new/langs/it/data/supplier_order_state.xml b/install-new/langs/it/data/supplier_order_state.xml new file mode 100644 index 000000000..2aab81395 --- /dev/null +++ b/install-new/langs/it/data/supplier_order_state.xml @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/install-new/langs/it/data/tab.xml b/install-new/langs/it/data/tab.xml new file mode 100644 index 000000000..0c313495b --- /dev/null +++ b/install-new/langs/it/data/tab.xml @@ -0,0 +1,98 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/install-new/langs/it/flag.jpg b/install-new/langs/it/flag.jpg new file mode 100644 index 000000000..744eb0eef Binary files /dev/null and b/install-new/langs/it/flag.jpg differ diff --git a/install-new/langs/it/img/it-default-category.jpg b/install-new/langs/it/img/it-default-category.jpg new file mode 100644 index 000000000..add52ebb9 Binary files /dev/null and b/install-new/langs/it/img/it-default-category.jpg differ diff --git a/install-new/langs/it/img/it-default-home.jpg b/install-new/langs/it/img/it-default-home.jpg new file mode 100644 index 000000000..54c4bd95b Binary files /dev/null and b/install-new/langs/it/img/it-default-home.jpg differ diff --git a/install-new/langs/it/img/it-default-large.jpg b/install-new/langs/it/img/it-default-large.jpg new file mode 100644 index 000000000..97bf6f2f0 Binary files /dev/null and b/install-new/langs/it/img/it-default-large.jpg differ diff --git a/install-new/langs/it/img/it-default-large_scene.jpg b/install-new/langs/it/img/it-default-large_scene.jpg new file mode 100644 index 000000000..be32f833b Binary files /dev/null and b/install-new/langs/it/img/it-default-large_scene.jpg differ diff --git a/install-new/langs/it/img/it-default-medium.jpg b/install-new/langs/it/img/it-default-medium.jpg new file mode 100644 index 000000000..461031f99 Binary files /dev/null and b/install-new/langs/it/img/it-default-medium.jpg differ diff --git a/install-new/langs/it/img/it-default-small.jpg b/install-new/langs/it/img/it-default-small.jpg new file mode 100644 index 000000000..8c72ec678 Binary files /dev/null and b/install-new/langs/it/img/it-default-small.jpg differ diff --git a/install-new/langs/it/img/it-default-thickbox.jpg b/install-new/langs/it/img/it-default-thickbox.jpg new file mode 100644 index 000000000..96fc64a4e Binary files /dev/null and b/install-new/langs/it/img/it-default-thickbox.jpg differ diff --git a/install-new/langs/it/img/it-default-thumb_scene.jpg b/install-new/langs/it/img/it-default-thumb_scene.jpg new file mode 100644 index 000000000..72fddf890 Binary files /dev/null and b/install-new/langs/it/img/it-default-thumb_scene.jpg differ diff --git a/install-new/langs/it/img/it.jpg b/install-new/langs/it/img/it.jpg new file mode 100644 index 000000000..94802add7 Binary files /dev/null and b/install-new/langs/it/img/it.jpg differ diff --git a/install-new/langs/it/language.xml b/install-new/langs/it/language.xml new file mode 100644 index 000000000..048769a38 --- /dev/null +++ b/install-new/langs/it/language.xml @@ -0,0 +1,8 @@ + + + + it + d/m/Y + d/m/Y H:i:s + false + \ No newline at end of file diff --git a/install-new/models/database.php b/install-new/models/database.php new file mode 100644 index 000000000..71cb4f621 --- /dev/null +++ b/install-new/models/database.php @@ -0,0 +1,87 @@ + +* @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 InstallModelDatabase extends InstallAbstractModel +{ + /** + * Check database configuration and try a connection + * + * @param string $server + * @param string $database + * @param string $login + * @param string $password + * @param string $prefix + * @param string $engine + * @return array List of errors + */ + public function testDatabaseSettings($server, $database, $login, $password, $prefix, $engine) + { + $errors = array(); + + // Check if fields are correctly typed + if (!$server || !Validate::isUrl($server)) + $errors[] = $this->language->l('Server name is not valid'); + + if (!$database) + $errors[] = $this->language->l('You must enter a database name'); + + if (!$login) + $errors[] = $this->language->l('You must enter a database login'); + + if (!$prefix || !Validate::isTablePrefix($prefix)) + $errors[] = $this->language->l('Tables prefix is invalid'); + + if (!Validate::isMySQLEngine($engine)) + $errors[] = $this->language->l('Wrong engine chosen for MySQL'); + + if (!$errors) + { + // Try to connect to database + switch (Db::checkConnection($server, $login, $password, $database, true, $engine)) + { + case 0: + if (!Db::checkEncoding($server, $login, $password)) + $errors[] = $this->language->l('Cannot convert database data to utf-8'); + break; + + case 1: + $errors[] = $this->language->l('Database Server is not found. Please verify the login, password and server fields'); + break; + + case 2: + $errors[] = $this->language->l('Connection to MySQL server succeeded, but database "%s" not found', $database); + break; + + case 4: + $errors[] = $this->language->l('Engine innoDB is not supported by your MySQL server, please use MyISAM'); + break; + } + } + + return $errors; + } +} diff --git a/install-new/models/install.php b/install-new/models/install.php new file mode 100644 index 000000000..4e2e1bc35 --- /dev/null +++ b/install-new/models/install.php @@ -0,0 +1,629 @@ + +* @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 InstallModelInstall extends InstallAbstractModel +{ + const SETTINGS_FILE = 'config/settings.inc.php'; + + /** + * PROCESS : installDatabase + * Generate settings file and create database structure + */ + public function installDatabase($database_server, $database_login, $database_password, $database_name, $database_prefix, $database_engine, $clear_database = false) + { + // Generate settings file + $this->generateSettingsFile($database_server, $database_login, $database_password, $database_name, $database_prefix, $database_engine); + + // Clear database (only tables with same prefix) + require_once _PS_ROOT_DIR_.'/'.self::SETTINGS_FILE; + if ($clear_database) + $this->clearDatabase(); + + // Install database structure + $sql_loader = new InstallSqlLoader(); + $sql_loader->setMetaData(array( + 'PREFIX_' => _DB_PREFIX_, + 'ENGINE_TYPE' => _MYSQL_ENGINE_, + )); + + try + { + $sql_loader->parse_file(_PS_INSTALL_DATA_PATH_.'db_structure.sql'); + } + catch (PrestashopInstallerException $e) + { + $this->setError($this->language->l('Database structure file not found')); + return false; + } + + if ($errors = $sql_loader->getErrors()) + { + foreach ($errors as $error) + $this->setError($this->language->l('An SQL error occured: %1$s', $error['error'])); + return false; + } + + return true; + } + + /** + * Generate settings file + */ + public function generateSettingsFile($database_server, $database_login, $database_password, $database_name, $database_prefix, $database_engine) + { + // Check permissions for settings file + if (file_exists(_PS_ROOT_DIR_.'/'.self::SETTINGS_FILE) && !is_writable(_PS_ROOT_DIR_.'/'.self::SETTINGS_FILE)) + { + $this->setError($this->language->l('%s file is not writable (check permissions)', self::SETTINGS_FILE)); + return false; + } + else if (!file_exists(_PS_ROOT_DIR_.'/'.self::SETTINGS_FILE) && !is_writable(_PS_ROOT_DIR.'/'.dirname(self::SETTINGS_FILE))) + { + $this->setError($this->language->l('%s folder is not writable (check permissions)', dirname(self::SETTINGS_FILE))); + return false; + } + + // Generate settings content and write file + $settings_constants = array( + '_DB_SERVER_' => $database_server, + '_DB_NAME_' => $database_name, + '_DB_USER_' => $database_login, + '_DB_PASSWD_' => $database_password, + '_DB_PREFIX_' => $database_prefix, + '_MYSQL_ENGINE_' => $database_engine, + '_PS_CACHING_SYSTEM_' => 'CacheMemcache', + '_PS_CACHE_ENABLED_' => '0', + '_MEDIA_SERVER_1_' => '', + '_MEDIA_SERVER_2_' => '', + '_MEDIA_SERVER_3_' => '', + '_COOKIE_KEY_' => Tools::passwdGen(56), + '_COOKIE_IV_' => Tools::passwdGen(8), + '_PS_CREATION_DATE_' => date('Y-m-d'), + '_PS_VERSION_' => _PS_INSTALL_VERSION_, + ); + + // If mcrypt is activated, add Rijndael 128 configuration + if (function_exists('mcrypt_encrypt')) + { + $settings_constants['_RIJNDAEL_KEY_'] = Tools::passwdGen(mcrypt_get_key_size(MCRYPT_RIJNDAEL_128, MCRYPT_MODE_ECB)); + $settings_constants['_RIJNDAEL_IV_'] = base64_encode(mcrypt_create_iv(mcrypt_get_iv_size(MCRYPT_RIJNDAEL_128, MCRYPT_MODE_ECB), MCRYPT_RAND)); + } + + $settings_content = " $value) + $settings_content .= "define('$constant', '$value');\n"; + if (!@file_put_contents(_PS_ROOT_DIR_.'/'.self::SETTINGS_FILE, $settings_content)) + { + $this->setError($this->language->l('Cannot write settings file')); + return false; + } + return true; + } + + /** + * Clear database (only tables with same prefix) + * + * @param bool $truncate If true truncate the table, if false drop the table + */ + public function clearDatabase($truncate = false) + { + foreach (Db::getInstance()->executeS('SHOW TABLES') as $row) + { + $table = current($row); + if (preg_match('#^'._DB_PREFIX_.'#i', $table)) + Db::getInstance()->execute((($truncate) ? 'TRUNCATE' : 'DROP TABLE').' '.$table); + } + } + + /** + * PROCESS : populateDatabase + * Populate database with default data + */ + public function populateDatabase($clear_database = false) + { + if ($clear_database) + $this->clearDatabase(true); + + // Install first shop + if (!$this->createShop()) + return false; + + // Install languages + try + { + $languages = $this->installLanguages(); + } + catch (PrestashopInstallerException $e) + { + $this->setError($e->getMessage()); + return false; + } + + $flip_languages = array_flip($languages); + Configuration::updateGlobalValue('PS_LANG_DEFAULT', $flip_languages[$this->language->getLanguageIso()]); + + // Install XML data (data/xml/ folder) + $xml_loader = new InstallXmlLoader(); + $xml_loader->setLanguages($languages); + $xml_loader->populateFromXmlFiles(); + if ($errors = $xml_loader->getErrors()) + { + $this->setError($errors); + return false; + } + + // IDS from xmlLoader are stored in order to use them for fixtures + $this->xml_loader_ids = $xml_loader->getIds(); + + // Install custom SQL data (db_data.sql file) + if (file_exists(_PS_INSTALL_DATA_PATH_.'db_data.sql')) + { + $sql_loader = new InstallSqlLoader(); + $sql_loader->setMetaData(array( + 'PREFIX_' => _DB_PREFIX_, + 'ENGINE_TYPE' => _MYSQL_ENGINE_, + )); + + $sql_loader->parse_file(_PS_INSTALL_DATA_PATH_.'db_data.sql', false); + if ($errors = $sql_loader->getErrors()) + { + $this->setError($errors); + return false; + } + } + + // Copy language default images (we do this action after database in populated because we need image types informations) + foreach ($languages as $iso) + $this->copyLanguageImages($iso); + + return true; + } + + public function createShop() + { + // Create default group shop + $group_shop = new GroupShop(); + $group_shop->name = 'Default'; + $group_shop->active = true; + if (!$group_shop->add()) + { + $this->setError($this->language->l('Cannot create group shop')); + return false; + } + + // Create default shop + $shop = new Shop(); + $shop->active = true; + $shop->id_group_shop = $group_shop->id; + $shop->id_category = 1; + $shop->id_theme = 1; + $shop->name = 'Default'; + if (!$shop->add()) + { + $this->setError($this->language->l('Cannot create shop')); + return false; + } + Context::getContext()->shop = $shop; + + // Create default shop URL + $shop_url = new ShopUrl(); + $shop_url->domain = Tools::getHttpHost(); + $shop_url->domain_ssl = Tools::getHttpHost(); + $shop_url->physical_uri = __PS_BASE_URI__; + $shop_url->id_shop = $shop->id; + $shop_url->main = true; + $shop_url->active = true; + if (!$shop_url->add()) + { + $this->setError($this->language->l('Cannot create shop URL')); + return false; + } + + return true; + } + + /** + * Install languages + * + * @return array Association between ID and iso array(id_lang => iso, ...) + */ + public function installLanguages() + { + $languages = array(); + foreach ($this->language->getIsoList() as $iso) + { + if (!file_exists(_PS_INSTALL_LANGS_PATH_.$iso.'/language.xml')) + throw new PrestashopInstallerException($this->language->l('File "language.xml" not found for language iso "%s"', $iso)); + + if (!$xml = @simplexml_load_file(_PS_INSTALL_LANGS_PATH_.$iso.'/language.xml')) + throw new PrestashopInstallerException($this->language->l('File "language.xml" not valid for language iso "%s"', $iso)); + + // Add language in database + $language = new Language(); + $language->iso_code = $iso; + $language->active = ($iso == $this->language->getLanguageIso()) ? true : false; + $language->name = ($xml->name) ? (string)$xml->name : 'Unknown (Unknown)'; + $language->language_code = ($xml->language_code) ? (string)$xml->language_code : $iso; + $language->date_format_lite = ($xml->date_format_lite) ? (string)$xml->date_format_lite : 'm/j/Y'; + $language->date_format_full = ($xml->date_format_full) ? (string)$xml->date_format_full : 'm/j/Y H:i:s'; + $language->is_rtl = ($xml->is_rtl && ($xml->is_rtl == 'true' || $xml->is_rtl == '1')) ? 1 : 0; + if (!$language->add()) + throw new PrestashopInstallerException($this->language->l('Cannot install language "%s"', ($xml->name) ? $xml->name : $iso)); + $languages[$language->id] = $iso; + + // Copy language flag + if (is_writable(_PS_IMG_DIR_.'l/')) + copy(_PS_INSTALL_LANGS_PATH_.$iso.'/flag.jpg', _PS_IMG_DIR_.'l/'.$language->id.'.jpg'); + } + + return $languages; + } + + public function copyLanguageImages($iso) + { + $img_path = _PS_INSTALL_LANGS_PATH_.$iso.'/img/'; + if (!is_dir($img_path)) + return; + + $list = array( + 'products' => _PS_PROD_IMG_DIR_, + 'categories', _PS_CAT_IMG_DIR_, + 'manufacturers' => _PS_MANU_IMG_DIR_, + 'suppliers' => _PS_SUPP_IMG_DIR_, + 'scenes' => _PS_SCENE_IMG_DIR_, + 'stores' => _PS_STORE_IMG_DIR_, + null => _PS_IMG_DIR_.'l/', // Little trick to copy images in img/l/ path with all types + ); + + foreach ($list as $cat => $dst_path) + { + if (!is_writable($dst_path)) + continue; + + copy($img_path.$iso.'.jpg', $dst_path.$iso.'.jpg'); + + $types = ImageType::getImagesTypes($cat); + foreach ($types as $type) + { + if (file_exists($img_path.$iso.'-default-'.$type['name'].'.jpg')) + copy($img_path.$iso.'-default-'.$type['name'].'.jpg', $dst_path.$iso.'-default-'.$type['name'].'.jpg'); + else + imageResize($img_path.$iso.'.jpg', $dst_path.$iso.'-default-'.$type['name'].'.jpg', $type['width'], $type['height']); + } + } + } + + /** + * PROCESS : configureShop + * Set default shop configuration + */ + public function configureShop(array $data = array()) + { + // Clear smarty cache + $this->clearSmartyCache(); + + $default_data = array( + 'shop_name' => 'My Shop', + 'shop_activity' => '', + 'shop_country' => 'us', + 'shop_timezone' => 'US/Eastern', + 'use_smtp' => false, + 'smtp_server' => '', + 'smtp_login' => '', + 'smtp_password' => '', + 'smtp_encryption' =>'off', + 'smtp_port' => 25, + ); + + foreach ($default_data as $k => $v) + if (!isset($data[$k])) + $data[$k] = $v; + + Context::getContext()->shop = new Shop(1); + Configuration::loadConfiguration(); + + // Set default configuration + Configuration::updateGlobalValue('PS_SHOP_DOMAIN', Tools::getHttpHost()); + Configuration::updateGlobalValue('PS_SHOP_DOMAIN_SSL', Tools::getHttpHost()); + Configuration::updateGlobalValue('PS_INSTALL_VERSION', _PS_INSTALL_VERSION_); + Configuration::updateGlobalValue('PS_LOCALE_LANGUAGE', $this->language->getLanguageIso()); + Configuration::updateGlobalValue('PS_SHOP_NAME', $data['shop_name']); + Configuration::updateGlobalValue('PS_SHOP_ACTIVITY', $data['shop_activity']); + Configuration::updateGlobalValue('PS_COUNTRY_DEFAULT', Country::getByIso($data['shop_country'])); + Configuration::updateGlobalValue('PS_LOCALE_COUNTRY', $data['shop_country']); + Configuration::updateGlobalValue('PS_TIMEZONE', $data['shop_timezone']); + + // Set mails configuration + Configuration::updateGlobalValue('PS_MAIL_METHOD', ($data['use_smtp']) ? 2 : 1); + Configuration::updateGlobalValue('PS_MAIL_SERVER', $data['smtp_server']); + Configuration::updateGlobalValue('PS_MAIL_USER', $data['smtp_login']); + Configuration::updateGlobalValue('PS_MAIL_PASSWD', $data['smtp_password']); + Configuration::updateGlobalValue('PS_MAIL_SMTP_ENCRYPTION', $data['smtp_encryption']); + Configuration::updateGlobalValue('PS_MAIL_SMTP_PORT', $data['smtp_port']); + + // Activate rijndael 128 encrypt algorihtm if mcrypt is activated + if (function_exists('mcrypt_encrypt')) + Configuration::updateGlobalValue('PS_CIPHER_ALGORITHM', 1); + + // Set logo configuration + if (file_exists(_PS_IMG_DIR_.'logo.jpg')) + { + list($width, $height) = getimagesize(_PS_IMG_DIR_.'logo.jpg'); + Configuration::updateGlobalValue('SHOP_LOGO_WIDTH', round($width)); + Configuration::updateGlobalValue('SHOP_LOGO_HEIGHT', round($height)); + } + + // Set localization configuration + $localization_file = _PS_ROOT_DIR_.'/localization/default.xml'; + if (file_exists(_PS_ROOT_DIR_.'/localization/'.$data['shop_country'].'.xml')) + $localization_file = _PS_ROOT_DIR_.'/localization/'.$data['shop_country'].'.xml'; + + $locale = new LocalizationPackCore(); + $locale->loadLocalisationPack(file_get_contents($localization_file), '', true); + + // Create default employee + if (isset($data['admin_firstname']) && isset($data['admin_lastname']) && isset($data['admin_password']) && isset($data['admin_email'])) + { + $employee = new Employee(); + $employee->firstname = Tools::ucfirst($data['admin_firstname']); + $employee->lastname = Tools::ucfirst($data['admin_lastname']); + $employee->email = $data['admin_email']; + $employee->passwd = md5(_COOKIE_KEY_.$data['admin_password']); + $employee->last_passwd_gen = date('Y-m-d h:i:s', strtotime('-360 minutes')); + $employee->bo_theme = 'oldschool'; + $employee->active = true; + $employee->id_profile = 1; + $employee->id_lang = Configuration::get('PS_LANG_DEFAULT'); + $employee->bo_show_screencast = 1; + if (!$employee->add()) + { + $this->setError($this->language->l('Cannot create admin account')); + return false; + } + } + else + { + $this->setError($this->language->l('Cannot create admin account')); + return false; + } + + // Create default contact + if (isset($data['admin_email'])) + { + Configuration::updateGlobalValue('PS_SHOP_EMAIL', $data['admin_email']); + + $contact = new Contact(); + $contact->email = $data['admin_email']; + $contact->customer_service = true; + if (!$contact->add()) + { + $this->setError($this->language->l('Cannot create default contact')); + return false; + } + } + + return true; + } + + /** + * Clear smarty cache folders + */ + public function clearSmartyCache() + { + foreach (array(_PS_CACHE_DIR_.'smarty/cache', _PS_CACHE_DIR_.'smarty/compile') as $dir) + if (file_exists($dir)) + foreach (scandir($dir) as $file) + if ($file[0] != '.' && $file != 'index.php') + @unlink($dir.$file); + } + + /** + * PROCESS : installModules + * Install all modules in ~/modules/ directory + */ + public function installModules() + { + // @todo REMOVE DEV MODE + $modules = array(); + if (false) + { + foreach (scandir(_PS_MODULE_DIR_) as $module) + if ($module[0] != '.' && is_dir(_PS_MODULE_DIR_.$module) && file_exists(_PS_MODULE_DIR_.$module.'/'.$module.'.php')) + $modules[] = $module; + } + else + { + // @todo THIS CODE NEED TO BE REMOVED WHEN MODULES API IS COMMITED + $modules = array( + 'bankwire', + 'blockadvertising', + 'blockbestsellers', + 'blockcart', + 'blockcategories', + 'blockcms', + 'blockcurrencies', + 'blocklanguages', + 'blockmanufacturer', + 'blockmyaccount', + 'blocknewproducts', + 'blockpaymentlogo', + 'blockpermanentlinks', + 'blocksearch', + 'blockspecials', + 'blockstore', + 'blocktags', + 'blockuserinfo', + 'blockviewed', + 'cheque', + 'editorial', + 'graphartichow', + 'graphgooglechart', + 'graphvisifire', + 'graphxmlswfcharts', + 'gridhtml', + 'gsitemap', + 'homefeatured', + 'moneybookers', + 'pagesnotfound', + 'sekeywords', + 'statsbestcategories', + 'statsbestcustomers', + 'statsbestproducts', + 'statsbestsuppliers', + 'statsbestvouchers', + 'statscarrier', + 'statscatalog', + 'statscheckup', + 'statsdata', + 'statsequipment', + 'statsforecast', + 'statslive', + 'statsnewsletter', + 'statsorigin', + 'statspersonalinfos', + 'statsproduct', + 'statsregistrations', + 'statssales', + 'statssearch', + 'statsstock', + 'statsvisits', + ); + } + + $errors = array(); + foreach ($modules as $module_name) + { + $module = Module::getInstanceByName($module_name); + if (!$module->install()) + $errors[] = $this->language->l('Cannot install module "%s"', $module_name); + } + + if ($errors) + { + $this->setError($errors); + return false; + } + return true; + } + + /** + * PROCESS : installFixtures + * Install fixtures (E.g. demo products) + */ + public function installFixtures() + { + Db::getInstance()->delete('prefix_manufacturer'); + Db::getInstance()->delete('prefix_manufacturer_lang'); + Db::getInstance()->delete('prefix_supplier'); + Db::getInstance()->delete('prefix_supplier_lang'); + Db::getInstance()->delete('prefix_address'); + Db::getInstance()->delete('prefix_product'); + Db::getInstance()->delete('prefix_product_lang'); + Db::getInstance()->delete('prefix_category', 'id_category <> 1'); + Db::getInstance()->delete('prefix_category_product'); + Db::getInstance()->delete('prefix_category_lang', 'id_category <> 1'); + Db::getInstance()->delete('prefix_scene'); + Db::getInstance()->delete('prefix_scene_lang'); + Db::getInstance()->delete('prefix_scene_products'); + Db::getInstance()->delete('prefix_scene_category'); + Db::getInstance()->delete('prefix_attribute_group'); + Db::getInstance()->delete('prefix_attribute_group_lang'); + Db::getInstance()->delete('prefix_attribute'); + Db::getInstance()->delete('prefix_attribute_lang'); + Db::getInstance()->delete('prefix_product_attribute'); + Db::getInstance()->delete('prefix_product_attribute_combination'); + Db::getInstance()->delete('prefix_product_attribute_image'); + Db::getInstance()->delete('prefix_order_message'); + Db::getInstance()->delete('prefix_order_message_lang'); + Db::getInstance()->delete('prefix_feature'); + Db::getInstance()->delete('prefix_feature_lang'); + Db::getInstance()->delete('prefix_feature_value'); + Db::getInstance()->delete('prefix_feature_value_lang'); + Db::getInstance()->delete('prefix_feature_product'); + Db::getInstance()->delete('prefix_store'); + Db::getInstance()->delete('prefix_image'); + Db::getInstance()->delete('prefix_image_lang'); + Db::getInstance()->delete('prefix_tag'); + Db::getInstance()->delete('prefix_alias'); + Db::getInstance()->delete('prefix_customer'); + Db::getInstance()->delete('prefix_guest'); + Db::getInstance()->delete('prefix_connections'); + Db::getInstance()->delete('prefix_customer_group'); + Db::getInstance()->delete('prefix_cart'); + Db::getInstance()->delete('prefix_cart_product'); + Db::getInstance()->delete('prefix_orders'); + Db::getInstance()->delete('prefix_order_detail'); + Db::getInstance()->delete('prefix_order_history'); + Db::getInstance()->delete('prefix_range_price'); + Db::getInstance()->delete('prefix_range_weight'); + Db::getInstance()->delete('prefix_delivery'); + Db::getInstance()->delete('prefix_specific_price'); + Db::getInstance()->delete('prefix_tag'); + + // Load class (use fixture class if one exists, or use InstallXmlLoader) + if (file_exists(_PS_INSTALL_FIXTURES_PATH_.'apple/install.php')) + { + require_once _PS_INSTALL_FIXTURES_PATH_.'apple/install.php'; + $class = 'InstallFixtures'.Tools::toCamelCase('apple'); + if (!class_exists($class, false)) + { + $this->setError($this->language->l('Fixtures class "%s" not found', $class)); + return false; + } + + $xml_loader = new $class(); + if (!$xml_loader instanceof InstallXmlLoader) + { + $this->setError($this->language->l('"%s" must be an instane of "InstallXmlLoader"', $class)); + return false; + } + } + else + $xml_loader = new InstallXmlLoader(); + + // Install XML data (data/xml/ folder) + $xml_loader->setFixturesPath(); + if (isset($this->xml_loader_ids) && $this->xml_loader_ids) + $xml_loader->setIds($this->xml_loader_ids); + + $languages = array(); + foreach (Language::getLanguages(false) as $lang) + $languages[$lang['id_lang']] = $lang['iso_code']; + $xml_loader->setLanguages($languages); + $xml_loader->populateFromXmlFiles(); + if ($errors = $xml_loader->getErrors()) + { + $this->setError($errors); + return false; + } + + // Index products in search tables + Search::indexation(true); + + return true; + } +} diff --git a/install-new/models/mail.php b/install-new/models/mail.php new file mode 100644 index 000000000..93673e3f7 --- /dev/null +++ b/install-new/models/mail.php @@ -0,0 +1,73 @@ + +* @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 InstallModelMail extends InstallAbstractModel +{ + /** + * Send a test email + */ + public function sendTestMail($smtp_checked, $server, $login, $password, $port, $encryption, $email) + { + require_once(_PS_INSTALL_PATH_.'../tools/swift/Swift.php'); + require_once(_PS_INSTALL_PATH_.'../tools/swift/Swift/Connection/SMTP.php'); + require_once(_PS_INSTALL_PATH_.'../tools/swift/Swift/Connection/NativeMail.php'); + + try + { + // Test with custom SMTP connection + if ($smtp_checked) + { + + $smtp = new Swift_Connection_SMTP($server, $port, ($encryption == "off") ? Swift_Connection_SMTP::ENC_OFF : (($encryption == "tls") ? Swift_Connection_SMTP::ENC_TLS : Swift_Connection_SMTP::ENC_SSL)); + $smtp->setUsername($login); + $smtp->setpassword($password); + $smtp->setTimeout(5); + $swift = new Swift($smtp); + } + else + // Test with normal PHP mail() call + $swift = new Swift(new Swift_Connection_NativeMail()); + + $subject = $this->language->l('Test message from PrestaShop'); + $content = $this->language->l('This is a test message, your server is now available to send email'); + $message = new Swift_Message($subject, $content, 'text/html'); + + if (@$swift->send($message, $email, 'no-reply@'.Tools::getHttpHost())) + $result = true; + else + $result = 999; + + $swift->disconnect(); + } + catch (Swift_Exception $e) + { + $result = $e->getCode(); + } + + return $result; + } +} diff --git a/install-new/models/system.php b/install-new/models/system.php new file mode 100644 index 000000000..6c8608cf6 --- /dev/null +++ b/install-new/models/system.php @@ -0,0 +1,52 @@ + +* @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 InstallModelSystem extends InstallAbstractModel +{ + public function checkRequiredTests() + { + return self::checkTests(ConfigurationTest::getDefaultTests(), 'required'); + } + + public function checkOptionalTests() + { + return self::checkTests(ConfigurationTest::getDefaultTestsOp(), 'optional'); + } + + public function checkTests($list, $type) + { + $tests = ConfigurationTest::check($list); + $success = true; + foreach ($tests as $result) + $success &= ($result == 'ok') ? true : false; + + return array( + 'checks' => $tests, + 'success' => $success, + ); + } +} diff --git a/install-new/theme/img/01-gd100.png b/install-new/theme/img/01-gd100.png new file mode 100644 index 000000000..973481997 Binary files /dev/null and b/install-new/theme/img/01-gd100.png differ diff --git a/install-new/theme/img/01-pt100.png b/install-new/theme/img/01-pt100.png new file mode 100644 index 000000000..a04e370c4 Binary files /dev/null and b/install-new/theme/img/01-pt100.png differ diff --git a/install-new/theme/img/01-pt70.png b/install-new/theme/img/01-pt70.png new file mode 100644 index 000000000..ad00a8ee0 Binary files /dev/null and b/install-new/theme/img/01-pt70.png differ diff --git a/install-new/theme/img/02-gd100.png b/install-new/theme/img/02-gd100.png new file mode 100644 index 000000000..48eb1bb30 Binary files /dev/null and b/install-new/theme/img/02-gd100.png differ diff --git a/install-new/theme/img/02-pt100.png b/install-new/theme/img/02-pt100.png new file mode 100644 index 000000000..ab6a27c00 Binary files /dev/null and b/install-new/theme/img/02-pt100.png differ diff --git a/install-new/theme/img/02-pt70.png b/install-new/theme/img/02-pt70.png new file mode 100644 index 000000000..d84e1b7ec Binary files /dev/null and b/install-new/theme/img/02-pt70.png differ diff --git a/install-new/theme/img/03-gd100.png b/install-new/theme/img/03-gd100.png new file mode 100644 index 000000000..b4a20bafb Binary files /dev/null and b/install-new/theme/img/03-gd100.png differ diff --git a/install-new/theme/img/03-pt100.png b/install-new/theme/img/03-pt100.png new file mode 100644 index 000000000..1b74f7d6a Binary files /dev/null and b/install-new/theme/img/03-pt100.png differ diff --git a/install-new/theme/img/03-pt70.png b/install-new/theme/img/03-pt70.png new file mode 100644 index 000000000..7c63ad1c4 Binary files /dev/null and b/install-new/theme/img/03-pt70.png differ diff --git a/install-new/theme/img/04-gd100.png b/install-new/theme/img/04-gd100.png new file mode 100644 index 000000000..4eabafbbd Binary files /dev/null and b/install-new/theme/img/04-gd100.png differ diff --git a/install-new/theme/img/04-pt100.png b/install-new/theme/img/04-pt100.png new file mode 100644 index 000000000..317ab7c97 Binary files /dev/null and b/install-new/theme/img/04-pt100.png differ diff --git a/install-new/theme/img/04-pt70.png b/install-new/theme/img/04-pt70.png new file mode 100644 index 000000000..5bcd74e8c Binary files /dev/null and b/install-new/theme/img/04-pt70.png differ diff --git a/install-new/theme/img/05-gd100.png b/install-new/theme/img/05-gd100.png new file mode 100644 index 000000000..761328841 Binary files /dev/null and b/install-new/theme/img/05-gd100.png differ diff --git a/install-new/theme/img/05-pt100.png b/install-new/theme/img/05-pt100.png new file mode 100644 index 000000000..efede9454 Binary files /dev/null and b/install-new/theme/img/05-pt100.png differ diff --git a/install-new/theme/img/05-pt70.png b/install-new/theme/img/05-pt70.png new file mode 100644 index 000000000..97b6180de Binary files /dev/null and b/install-new/theme/img/05-pt70.png differ diff --git a/install-new/theme/img/ajax-loader-small.gif b/install-new/theme/img/ajax-loader-small.gif new file mode 100644 index 000000000..5b33f7e54 Binary files /dev/null and b/install-new/theme/img/ajax-loader-small.gif differ diff --git a/install-new/theme/img/ajax-loader.gif b/install-new/theme/img/ajax-loader.gif new file mode 100644 index 000000000..d2afc328e Binary files /dev/null and b/install-new/theme/img/ajax-loader.gif differ diff --git a/install-new/theme/img/bad.gif b/install-new/theme/img/bad.gif new file mode 100644 index 000000000..adcfa44bb Binary files /dev/null and b/install-new/theme/img/bad.gif differ diff --git a/install-new/theme/img/bg-body.png b/install-new/theme/img/bg-body.png new file mode 100644 index 000000000..ce9aa4c97 Binary files /dev/null and b/install-new/theme/img/bg-body.png differ diff --git a/install-new/theme/img/bg-contentTitle.png b/install-new/theme/img/bg-contentTitle.png new file mode 100644 index 000000000..db326df21 Binary files /dev/null and b/install-new/theme/img/bg-contentTitle.png differ diff --git a/install-new/theme/img/bg-ctnr.png b/install-new/theme/img/bg-ctnr.png new file mode 100644 index 000000000..431a99ea3 Binary files /dev/null and b/install-new/theme/img/bg-ctnr.png differ diff --git a/install-new/theme/img/bg-input-text.png b/install-new/theme/img/bg-input-text.png new file mode 100644 index 000000000..777517706 Binary files /dev/null and b/install-new/theme/img/bg-input-text.png differ diff --git a/install-new/theme/img/bg-li-headerLinks.png b/install-new/theme/img/bg-li-headerLinks.png new file mode 100644 index 000000000..da414a8dd Binary files /dev/null and b/install-new/theme/img/bg-li-headerLinks.png differ diff --git a/install-new/theme/img/bg-li-tabs-finished.png b/install-new/theme/img/bg-li-tabs-finished.png new file mode 100644 index 000000000..2a3e99d96 Binary files /dev/null and b/install-new/theme/img/bg-li-tabs-finished.png differ diff --git a/install-new/theme/img/bg-li-tabs.png b/install-new/theme/img/bg-li-tabs.png new file mode 100644 index 000000000..621237b7b Binary files /dev/null and b/install-new/theme/img/bg-li-tabs.png differ diff --git a/install-new/theme/img/bg-phone_block.png b/install-new/theme/img/bg-phone_block.png new file mode 100644 index 000000000..df8088484 Binary files /dev/null and b/install-new/theme/img/bg-phone_block.png differ diff --git a/install-new/theme/img/bg-tab.png b/install-new/theme/img/bg-tab.png new file mode 100644 index 000000000..20d2f2c1a Binary files /dev/null and b/install-new/theme/img/bg-tab.png differ diff --git a/install-new/theme/img/bg_blockInfoEnd.png b/install-new/theme/img/bg_blockInfoEnd.png new file mode 100644 index 000000000..fcc8d9a2a Binary files /dev/null and b/install-new/theme/img/bg_blockInfoEnd.png differ diff --git a/install-new/theme/img/bg_bt_blockInfoEnd.png b/install-new/theme/img/bg_bt_blockInfoEnd.png new file mode 100644 index 000000000..b23dd7c65 Binary files /dev/null and b/install-new/theme/img/bg_bt_blockInfoEnd.png differ diff --git a/install-new/theme/img/bg_field.png b/install-new/theme/img/bg_field.png new file mode 100644 index 000000000..e1f4ecc10 Binary files /dev/null and b/install-new/theme/img/bg_field.png differ diff --git a/install-new/theme/img/bg_help.png b/install-new/theme/img/bg_help.png new file mode 100644 index 000000000..f87116b86 Binary files /dev/null and b/install-new/theme/img/bg_help.png differ diff --git a/install-new/theme/img/bg_input_button.png b/install-new/theme/img/bg_input_button.png new file mode 100644 index 000000000..777517706 Binary files /dev/null and b/install-new/theme/img/bg_input_button.png differ diff --git a/install-new/theme/img/bg_li_stepList.png b/install-new/theme/img/bg_li_stepList.png new file mode 100644 index 000000000..98615f41d Binary files /dev/null and b/install-new/theme/img/bg_li_stepList.png differ diff --git a/install-new/theme/img/bg_li_title.png b/install-new/theme/img/bg_li_title.png new file mode 100644 index 000000000..86b2c833c Binary files /dev/null and b/install-new/theme/img/bg_li_title.png differ diff --git a/install-new/theme/img/bg_loaderSpace.png b/install-new/theme/img/bg_loaderSpace.png new file mode 100644 index 000000000..f9da304b5 Binary files /dev/null and b/install-new/theme/img/bg_loaderSpace.png differ diff --git a/install-new/theme/img/bg_moduleTable_th.png b/install-new/theme/img/bg_moduleTable_th.png new file mode 100644 index 000000000..3c5db2d44 Binary files /dev/null and b/install-new/theme/img/bg_moduleTable_th.png differ diff --git a/install-new/theme/img/boutonpt-disabled.png b/install-new/theme/img/boutonpt-disabled.png new file mode 100644 index 000000000..8e5a14c19 Binary files /dev/null and b/install-new/theme/img/boutonpt-disabled.png differ diff --git a/install-new/theme/img/boutonpt-on.png b/install-new/theme/img/boutonpt-on.png new file mode 100644 index 000000000..17106acfd Binary files /dev/null and b/install-new/theme/img/boutonpt-on.png differ diff --git a/install-new/theme/img/boutonpt-over.png b/install-new/theme/img/boutonpt-over.png new file mode 100644 index 000000000..851be19fe Binary files /dev/null and b/install-new/theme/img/boutonpt-over.png differ diff --git a/install-new/theme/img/bt - Copie.png b/install-new/theme/img/bt - Copie.png new file mode 100644 index 000000000..291c6f85f Binary files /dev/null and b/install-new/theme/img/bt - Copie.png differ diff --git a/install-new/theme/img/bt-dsbl - Copie.png b/install-new/theme/img/bt-dsbl - Copie.png new file mode 100644 index 000000000..cb87b5c87 Binary files /dev/null and b/install-new/theme/img/bt-dsbl - Copie.png differ diff --git a/install-new/theme/img/bt-dsbl.png b/install-new/theme/img/bt-dsbl.png new file mode 100644 index 000000000..4be0c2aef Binary files /dev/null and b/install-new/theme/img/bt-dsbl.png differ diff --git a/install-new/theme/img/bt-hover.png b/install-new/theme/img/bt-hover.png new file mode 100644 index 000000000..36859ca9b Binary files /dev/null and b/install-new/theme/img/bt-hover.png differ diff --git a/install-new/theme/img/bt.png b/install-new/theme/img/bt.png new file mode 100644 index 000000000..b877cfe9a Binary files /dev/null and b/install-new/theme/img/bt.png differ diff --git a/install-new/theme/img/bt_off.png b/install-new/theme/img/bt_off.png new file mode 100644 index 000000000..9de735db7 Binary files /dev/null and b/install-new/theme/img/bt_off.png differ diff --git a/install-new/theme/img/bt_off_hover.png b/install-new/theme/img/bt_off_hover.png new file mode 100644 index 000000000..a8507e95d Binary files /dev/null and b/install-new/theme/img/bt_off_hover.png differ diff --git a/install-new/theme/img/btn-installeur.png b/install-new/theme/img/btn-installeur.png new file mode 100644 index 000000000..cfc4709cc Binary files /dev/null and b/install-new/theme/img/btn-installeur.png differ diff --git a/install-new/theme/img/bullet.png b/install-new/theme/img/bullet.png new file mode 100644 index 000000000..1da7af138 Binary files /dev/null and b/install-new/theme/img/bullet.png differ diff --git a/install-new/theme/img/favicon.ico b/install-new/theme/img/favicon.ico new file mode 100644 index 000000000..883937325 Binary files /dev/null and b/install-new/theme/img/favicon.ico differ diff --git a/install-new/theme/img/ico_help.gif b/install-new/theme/img/ico_help.gif new file mode 100644 index 000000000..511538f8e Binary files /dev/null and b/install-new/theme/img/ico_help.gif differ diff --git a/install-new/theme/img/index.php b/install-new/theme/img/index.php new file mode 100644 index 000000000..4e2611d37 --- /dev/null +++ b/install-new/theme/img/index.php @@ -0,0 +1,36 @@ + +* @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 +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/install-new/theme/img/logo.png b/install-new/theme/img/logo.png new file mode 100644 index 000000000..8275cd876 Binary files /dev/null and b/install-new/theme/img/logo.png differ diff --git a/install-new/theme/img/noflag.jpg b/install-new/theme/img/noflag.jpg new file mode 100644 index 000000000..5e4c07cd4 Binary files /dev/null and b/install-new/theme/img/noflag.jpg differ diff --git a/install-new/theme/img/ok.gif b/install-new/theme/img/ok.gif new file mode 100644 index 000000000..113588016 Binary files /dev/null and b/install-new/theme/img/ok.gif differ diff --git a/install-new/theme/img/ombrage-bas.png b/install-new/theme/img/ombrage-bas.png new file mode 100644 index 000000000..0451e3be5 Binary files /dev/null and b/install-new/theme/img/ombrage-bas.png differ diff --git a/install-new/theme/img/ombrage-droit.png b/install-new/theme/img/ombrage-droit.png new file mode 100644 index 000000000..60cee9e05 Binary files /dev/null and b/install-new/theme/img/ombrage-droit.png differ diff --git a/install-new/theme/img/phone.png b/install-new/theme/img/phone.png new file mode 100644 index 000000000..862e85be9 Binary files /dev/null and b/install-new/theme/img/phone.png differ diff --git a/install-new/theme/img/pict_error.png b/install-new/theme/img/pict_error.png new file mode 100644 index 000000000..1995f4523 Binary files /dev/null and b/install-new/theme/img/pict_error.png differ diff --git a/install-new/theme/img/pict_h3_infos.png b/install-new/theme/img/pict_h3_infos.png new file mode 100644 index 000000000..0d027aa06 Binary files /dev/null and b/install-new/theme/img/pict_h3_infos.png differ diff --git a/install-new/theme/img/pict_info.png b/install-new/theme/img/pict_info.png new file mode 100644 index 000000000..4f8f7839a Binary files /dev/null and b/install-new/theme/img/pict_info.png differ diff --git a/install-new/theme/img/pict_ok.png b/install-new/theme/img/pict_ok.png new file mode 100644 index 000000000..429fc1656 Binary files /dev/null and b/install-new/theme/img/pict_ok.png differ diff --git a/install-new/theme/img/puce.gif b/install-new/theme/img/puce.gif new file mode 100644 index 000000000..d32f60750 Binary files /dev/null and b/install-new/theme/img/puce.gif differ diff --git a/install-new/theme/img/shadow-left.png b/install-new/theme/img/shadow-left.png new file mode 100644 index 000000000..f3122811f Binary files /dev/null and b/install-new/theme/img/shadow-left.png differ diff --git a/install-new/theme/img/visu_boBlock.png b/install-new/theme/img/visu_boBlock.png new file mode 100644 index 000000000..cf892cc2a Binary files /dev/null and b/install-new/theme/img/visu_boBlock.png differ diff --git a/install-new/theme/img/visu_foBlock.png b/install-new/theme/img/visu_foBlock.png new file mode 100644 index 000000000..8c09791dc Binary files /dev/null and b/install-new/theme/img/visu_foBlock.png differ diff --git a/install-new/theme/js/configure.js b/install-new/theme/js/configure.js new file mode 100644 index 000000000..93068add1 --- /dev/null +++ b/install-new/theme/js/configure.js @@ -0,0 +1,125 @@ +$(document).ready(function() +{ + // Change logo + $('#fileToUpload').bind('change', upload_logo); + + // When a country is changed + $('#infosCountry').change(function() + { + var iso = $(this).val(); + + // Get timezone by iso + $.ajax({ + url: 'index.php', + data: 'timezoneByIso=true&iso='+iso, + dataType: 'json', + cache: true, + success: function(json) + { + if (json.success) + $('#infosTimezone').val(json.message); + } + }); + + // Load associated partners + //load_partners(iso); + }); + + //if (default_iso) + // load_partners(default_iso); +}); + +/** + * Upload a new logo + */ +function upload_logo() +{ + $.ajaxFileUpload( + { + url: 'index.php?uploadLogo=true', + secureuri: false, + fileElementId: 'fileToUpload', + dataType: 'json', + success: function(json) + { + if (typeof(json.success) == 'undefined') + return ; + + $("#uploadedImage").slideUp('slow', function() + { + if (!json.success) + $('#resultInfosLogo').html(json.message).addClass('errorBlock').show(); + else + { + $(this).attr('src', ps_base_uri+'img/logo.jpg?'+(new Date())) + $(this).show('slow'); + $('#resultInfosLogo').html('').removeClass('errorBlock').hide(); + } + + $('#fileToUpload').bind('change', upload_logo); + }); + }, + error: function() + { + $('#uploadedImage').attr('src', ps_base_uri+'img/logo.jpg?'+(new Date())); + $('#resultInfosLogo').html('').addClass('errorBlock'); + } + }); +}; + +/** + * Load partners for a given country + * + * @param string iso + */ +function load_partners(iso) +{ + $.ajax({ + url: 'index.php', + data: 'getPartners=true&iso='+iso, + dataType: 'json', + cache: false, + success: function(json) + { + if (json.success) + { + // Display partner HTML + $('#benefitsBlock').html(json.message).show(); + + // Add event on partner checkbox to display fields if it's checked + $('.preinstall_partner').click(function() + { + var name = $(this).attr('name'); + var partner_id = name.substr(8, name.length - 9); + + if ($(this).attr('checked')) + load_partner_fields(partner_id, iso); + else + $('#partner_fields_'+partner_id).html('').hide(); + }); + } + else + $('#benefitsBlock').html(''); + } + }); +} + +/** + * Display partner fields + * + * @param string partner_id Key of partner + */ +function load_partner_fields(partner_id, iso) +{ + $.ajax({ + url: 'index.php', + data: 'getPartnersFields=true&partner_id='+partner_id+'&iso='+iso, + dataType: 'json', + cache: false, + success: function(json) + { + if (json.success) + $('#partner_fields_'+partner_id).html(json.message).show(); + } + }); +} \ No newline at end of file diff --git a/install-new/theme/js/database.js b/install-new/theme/js/database.js new file mode 100644 index 000000000..1cffc41fb --- /dev/null +++ b/install-new/theme/js/database.js @@ -0,0 +1,65 @@ +$(document).ready(function() +{ + // Check database configuration + $('#btTestDB').click(function() + { + $("#dbResultCheck").slideUp('slow'); + $.ajax({ + url: 'index.php', + data: 'checkDb=true&dbServer='+$('#dbServer').val() + +'&dbName='+$('#dbName').val() + +'&dbLogin='+$('#dbLogin').val() + +'&dbPassword='+$('#dbPassword').val() + +'&dbEngine='+$('#dbEngine').val() + +'&db_prefix='+$('#db_prefix').val(), + dataType: 'json', + cache: false, + success: function(json) + { + $("#dbResultCheck") + .addClass((json.success) ? 'okBlock' : 'errorBlock') + .removeClass((json.success) ? 'errorBlock' : 'okBlock') + .html(json.message) + .slideDown('slow'); + } + }); + }); + + // Check mails configuration + if (!$('#set_stmp').attr('checked')) + $("div#mailSMTPParam").hide(); + + $("#set_stmp").click(function() + { + if ($("input#set_stmp").attr('checked')) + $("div#mailSMTPParam").slideDown('slow'); + else + $("div#mailSMTPParam").slideUp('slow'); + }); + + // Send test email + $('#btVerifyMail').click(function() + { + $("#mailResultCheck").slideUp('slow'); + $.ajax({ + url: 'index.php', + data: 'sendMail=true&smtpSrv='+$('#smtpSrv').val() + +'&smtpEnc='+$('#smtpEnc').val() + +'&smtpPort='+$('#smtpPort').val() + +'&smtpLogin='+$('#smtpLogin').val() + +'&smtpPassword='+$('#smtpPassword').val() + +'&testEmail='+$('#testEmail').val() + +'&smtpChecked='+($('#set_stmp').attr('checked') ? 'true' : 'false'), + dataType: 'json', + cache: false, + success: function(json) + { + $("#mailResultCheck") + .addClass((json.success) ? 'infosBlock' : 'errorBlock') + .removeClass((json.success) ? 'errorBlock' : 'infosBlock') + .html(json.message) + .slideDown('slow'); + } + }); + }); +}); \ No newline at end of file diff --git a/install-new/theme/js/install.js b/install-new/theme/js/install.js new file mode 100644 index 000000000..27356163d --- /dev/null +++ b/install-new/theme/js/install.js @@ -0,0 +1,15 @@ +$(document).ready(function() +{ + // Ajax animation + $("#loaderSpace").ajaxStart(function() + { + $(this).fadeIn('slow'); + $(this).children('div').fadeIn('slow'); + }); + + $("#loaderSpace").ajaxComplete(function(e, xhr, settings) + { + $(this).fadeOut('slow'); + $(this).children('div').fadeOut('slow'); + }); +}); diff --git a/install-new/theme/js/jquery-1.4.4.min.js b/install-new/theme/js/jquery-1.4.4.min.js new file mode 100644 index 000000000..8f3ca2e2d --- /dev/null +++ b/install-new/theme/js/jquery-1.4.4.min.js @@ -0,0 +1,167 @@ +/*! + * jQuery JavaScript Library v1.4.4 + * http://jquery.com/ + * + * Copyright 2010, John Resig + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * Includes Sizzle.js + * http://sizzlejs.com/ + * Copyright 2010, The Dojo Foundation + * Released under the MIT, BSD, and GPL Licenses. + * + * Date: Thu Nov 11 19:04:53 2010 -0500 + */ +(function(E,B){function ka(a,b,d){if(d===B&&a.nodeType===1){d=a.getAttribute("data-"+b);if(typeof d==="string"){try{d=d==="true"?true:d==="false"?false:d==="null"?null:!c.isNaN(d)?parseFloat(d):Ja.test(d)?c.parseJSON(d):d}catch(e){}c.data(a,b,d)}else d=B}return d}function U(){return false}function ca(){return true}function la(a,b,d){d[0].type=a;return c.event.handle.apply(b,d)}function Ka(a){var b,d,e,f,h,l,k,o,x,r,A,C=[];f=[];h=c.data(this,this.nodeType?"events":"__events__");if(typeof h==="function")h= +h.events;if(!(a.liveFired===this||!h||!h.live||a.button&&a.type==="click")){if(a.namespace)A=RegExp("(^|\\.)"+a.namespace.split(".").join("\\.(?:.*\\.)?")+"(\\.|$)");a.liveFired=this;var J=h.live.slice(0);for(k=0;kd)break;a.currentTarget=f.elem;a.data=f.handleObj.data;a.handleObj=f.handleObj;A=f.handleObj.origHandler.apply(f.elem,arguments);if(A===false||a.isPropagationStopped()){d=f.level;if(A===false)b=false;if(a.isImmediatePropagationStopped())break}}return b}}function Y(a,b){return(a&&a!=="*"?a+".":"")+b.replace(La, +"`").replace(Ma,"&")}function ma(a,b,d){if(c.isFunction(b))return c.grep(a,function(f,h){return!!b.call(f,h,f)===d});else if(b.nodeType)return c.grep(a,function(f){return f===b===d});else if(typeof b==="string"){var e=c.grep(a,function(f){return f.nodeType===1});if(Na.test(b))return c.filter(b,e,!d);else b=c.filter(b,e)}return c.grep(a,function(f){return c.inArray(f,b)>=0===d})}function na(a,b){var d=0;b.each(function(){if(this.nodeName===(a[d]&&a[d].nodeName)){var e=c.data(a[d++]),f=c.data(this, +e);if(e=e&&e.events){delete f.handle;f.events={};for(var h in e)for(var l in e[h])c.event.add(this,h,e[h][l],e[h][l].data)}}})}function Oa(a,b){b.src?c.ajax({url:b.src,async:false,dataType:"script"}):c.globalEval(b.text||b.textContent||b.innerHTML||"");b.parentNode&&b.parentNode.removeChild(b)}function oa(a,b,d){var e=b==="width"?a.offsetWidth:a.offsetHeight;if(d==="border")return e;c.each(b==="width"?Pa:Qa,function(){d||(e-=parseFloat(c.css(a,"padding"+this))||0);if(d==="margin")e+=parseFloat(c.css(a, +"margin"+this))||0;else e-=parseFloat(c.css(a,"border"+this+"Width"))||0});return e}function da(a,b,d,e){if(c.isArray(b)&&b.length)c.each(b,function(f,h){d||Ra.test(a)?e(a,h):da(a+"["+(typeof h==="object"||c.isArray(h)?f:"")+"]",h,d,e)});else if(!d&&b!=null&&typeof b==="object")c.isEmptyObject(b)?e(a,""):c.each(b,function(f,h){da(a+"["+f+"]",h,d,e)});else e(a,b)}function S(a,b){var d={};c.each(pa.concat.apply([],pa.slice(0,b)),function(){d[this]=a});return d}function qa(a){if(!ea[a]){var b=c("<"+ +a+">").appendTo("body"),d=b.css("display");b.remove();if(d==="none"||d==="")d="block";ea[a]=d}return ea[a]}function fa(a){return c.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:false}var t=E.document,c=function(){function a(){if(!b.isReady){try{t.documentElement.doScroll("left")}catch(j){setTimeout(a,1);return}b.ready()}}var b=function(j,s){return new b.fn.init(j,s)},d=E.jQuery,e=E.$,f,h=/^(?:[^<]*(<[\w\W]+>)[^>]*$|#([\w\-]+)$)/,l=/\S/,k=/^\s+/,o=/\s+$/,x=/\W/,r=/\d/,A=/^<(\w+)\s*\/?>(?:<\/\1>)?$/, +C=/^[\],:{}\s]*$/,J=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,w=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,I=/(?:^|:|,)(?:\s*\[)+/g,L=/(webkit)[ \/]([\w.]+)/,g=/(opera)(?:.*version)?[ \/]([\w.]+)/,i=/(msie) ([\w.]+)/,n=/(mozilla)(?:.*? rv:([\w.]+))?/,m=navigator.userAgent,p=false,q=[],u,y=Object.prototype.toString,F=Object.prototype.hasOwnProperty,M=Array.prototype.push,N=Array.prototype.slice,O=String.prototype.trim,D=Array.prototype.indexOf,R={};b.fn=b.prototype={init:function(j, +s){var v,z,H;if(!j)return this;if(j.nodeType){this.context=this[0]=j;this.length=1;return this}if(j==="body"&&!s&&t.body){this.context=t;this[0]=t.body;this.selector="body";this.length=1;return this}if(typeof j==="string")if((v=h.exec(j))&&(v[1]||!s))if(v[1]){H=s?s.ownerDocument||s:t;if(z=A.exec(j))if(b.isPlainObject(s)){j=[t.createElement(z[1])];b.fn.attr.call(j,s,true)}else j=[H.createElement(z[1])];else{z=b.buildFragment([v[1]],[H]);j=(z.cacheable?z.fragment.cloneNode(true):z.fragment).childNodes}return b.merge(this, +j)}else{if((z=t.getElementById(v[2]))&&z.parentNode){if(z.id!==v[2])return f.find(j);this.length=1;this[0]=z}this.context=t;this.selector=j;return this}else if(!s&&!x.test(j)){this.selector=j;this.context=t;j=t.getElementsByTagName(j);return b.merge(this,j)}else return!s||s.jquery?(s||f).find(j):b(s).find(j);else if(b.isFunction(j))return f.ready(j);if(j.selector!==B){this.selector=j.selector;this.context=j.context}return b.makeArray(j,this)},selector:"",jquery:"1.4.4",length:0,size:function(){return this.length}, +toArray:function(){return N.call(this,0)},get:function(j){return j==null?this.toArray():j<0?this.slice(j)[0]:this[j]},pushStack:function(j,s,v){var z=b();b.isArray(j)?M.apply(z,j):b.merge(z,j);z.prevObject=this;z.context=this.context;if(s==="find")z.selector=this.selector+(this.selector?" ":"")+v;else if(s)z.selector=this.selector+"."+s+"("+v+")";return z},each:function(j,s){return b.each(this,j,s)},ready:function(j){b.bindReady();if(b.isReady)j.call(t,b);else q&&q.push(j);return this},eq:function(j){return j=== +-1?this.slice(j):this.slice(j,+j+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(N.apply(this,arguments),"slice",N.call(arguments).join(","))},map:function(j){return this.pushStack(b.map(this,function(s,v){return j.call(s,v,s)}))},end:function(){return this.prevObject||b(null)},push:M,sort:[].sort,splice:[].splice};b.fn.init.prototype=b.fn;b.extend=b.fn.extend=function(){var j,s,v,z,H,G=arguments[0]||{},K=1,Q=arguments.length,ga=false; +if(typeof G==="boolean"){ga=G;G=arguments[1]||{};K=2}if(typeof G!=="object"&&!b.isFunction(G))G={};if(Q===K){G=this;--K}for(;K0))if(q){var s=0,v=q;for(q=null;j=v[s++];)j.call(t,b);b.fn.trigger&&b(t).trigger("ready").unbind("ready")}}},bindReady:function(){if(!p){p=true;if(t.readyState==="complete")return setTimeout(b.ready,1);if(t.addEventListener){t.addEventListener("DOMContentLoaded",u,false);E.addEventListener("load",b.ready,false)}else if(t.attachEvent){t.attachEvent("onreadystatechange",u);E.attachEvent("onload", +b.ready);var j=false;try{j=E.frameElement==null}catch(s){}t.documentElement.doScroll&&j&&a()}}},isFunction:function(j){return b.type(j)==="function"},isArray:Array.isArray||function(j){return b.type(j)==="array"},isWindow:function(j){return j&&typeof j==="object"&&"setInterval"in j},isNaN:function(j){return j==null||!r.test(j)||isNaN(j)},type:function(j){return j==null?String(j):R[y.call(j)]||"object"},isPlainObject:function(j){if(!j||b.type(j)!=="object"||j.nodeType||b.isWindow(j))return false;if(j.constructor&& +!F.call(j,"constructor")&&!F.call(j.constructor.prototype,"isPrototypeOf"))return false;for(var s in j);return s===B||F.call(j,s)},isEmptyObject:function(j){for(var s in j)return false;return true},error:function(j){throw j;},parseJSON:function(j){if(typeof j!=="string"||!j)return null;j=b.trim(j);if(C.test(j.replace(J,"@").replace(w,"]").replace(I,"")))return E.JSON&&E.JSON.parse?E.JSON.parse(j):(new Function("return "+j))();else b.error("Invalid JSON: "+j)},noop:function(){},globalEval:function(j){if(j&& +l.test(j)){var s=t.getElementsByTagName("head")[0]||t.documentElement,v=t.createElement("script");v.type="text/javascript";if(b.support.scriptEval)v.appendChild(t.createTextNode(j));else v.text=j;s.insertBefore(v,s.firstChild);s.removeChild(v)}},nodeName:function(j,s){return j.nodeName&&j.nodeName.toUpperCase()===s.toUpperCase()},each:function(j,s,v){var z,H=0,G=j.length,K=G===B||b.isFunction(j);if(v)if(K)for(z in j){if(s.apply(j[z],v)===false)break}else for(;H
    a";var f=d.getElementsByTagName("*"),h=d.getElementsByTagName("a")[0],l=t.createElement("select"), +k=l.appendChild(t.createElement("option"));if(!(!f||!f.length||!h)){c.support={leadingWhitespace:d.firstChild.nodeType===3,tbody:!d.getElementsByTagName("tbody").length,htmlSerialize:!!d.getElementsByTagName("link").length,style:/red/.test(h.getAttribute("style")),hrefNormalized:h.getAttribute("href")==="/a",opacity:/^0.55$/.test(h.style.opacity),cssFloat:!!h.style.cssFloat,checkOn:d.getElementsByTagName("input")[0].value==="on",optSelected:k.selected,deleteExpando:true,optDisabled:false,checkClone:false, +scriptEval:false,noCloneEvent:true,boxModel:null,inlineBlockNeedsLayout:false,shrinkWrapBlocks:false,reliableHiddenOffsets:true};l.disabled=true;c.support.optDisabled=!k.disabled;b.type="text/javascript";try{b.appendChild(t.createTextNode("window."+e+"=1;"))}catch(o){}a.insertBefore(b,a.firstChild);if(E[e]){c.support.scriptEval=true;delete E[e]}try{delete b.test}catch(x){c.support.deleteExpando=false}a.removeChild(b);if(d.attachEvent&&d.fireEvent){d.attachEvent("onclick",function r(){c.support.noCloneEvent= +false;d.detachEvent("onclick",r)});d.cloneNode(true).fireEvent("onclick")}d=t.createElement("div");d.innerHTML="";a=t.createDocumentFragment();a.appendChild(d.firstChild);c.support.checkClone=a.cloneNode(true).cloneNode(true).lastChild.checked;c(function(){var r=t.createElement("div");r.style.width=r.style.paddingLeft="1px";t.body.appendChild(r);c.boxModel=c.support.boxModel=r.offsetWidth===2;if("zoom"in r.style){r.style.display="inline";r.style.zoom= +1;c.support.inlineBlockNeedsLayout=r.offsetWidth===2;r.style.display="";r.innerHTML="
    ";c.support.shrinkWrapBlocks=r.offsetWidth!==2}r.innerHTML="
    t
    ";var A=r.getElementsByTagName("td");c.support.reliableHiddenOffsets=A[0].offsetHeight===0;A[0].style.display="";A[1].style.display="none";c.support.reliableHiddenOffsets=c.support.reliableHiddenOffsets&&A[0].offsetHeight===0;r.innerHTML="";t.body.removeChild(r).style.display= +"none"});a=function(r){var A=t.createElement("div");r="on"+r;var C=r in A;if(!C){A.setAttribute(r,"return;");C=typeof A[r]==="function"}return C};c.support.submitBubbles=a("submit");c.support.changeBubbles=a("change");a=b=d=f=h=null}})();var ra={},Ja=/^(?:\{.*\}|\[.*\])$/;c.extend({cache:{},uuid:0,expando:"jQuery"+c.now(),noData:{embed:true,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:true},data:function(a,b,d){if(c.acceptData(a)){a=a==E?ra:a;var e=a.nodeType,f=e?a[c.expando]:null,h= +c.cache;if(!(e&&!f&&typeof b==="string"&&d===B)){if(e)f||(a[c.expando]=f=++c.uuid);else h=a;if(typeof b==="object")if(e)h[f]=c.extend(h[f],b);else c.extend(h,b);else if(e&&!h[f])h[f]={};a=e?h[f]:h;if(d!==B)a[b]=d;return typeof b==="string"?a[b]:a}}},removeData:function(a,b){if(c.acceptData(a)){a=a==E?ra:a;var d=a.nodeType,e=d?a[c.expando]:a,f=c.cache,h=d?f[e]:e;if(b){if(h){delete h[b];d&&c.isEmptyObject(h)&&c.removeData(a)}}else if(d&&c.support.deleteExpando)delete a[c.expando];else if(a.removeAttribute)a.removeAttribute(c.expando); +else if(d)delete f[e];else for(var l in a)delete a[l]}},acceptData:function(a){if(a.nodeName){var b=c.noData[a.nodeName.toLowerCase()];if(b)return!(b===true||a.getAttribute("classid")!==b)}return true}});c.fn.extend({data:function(a,b){var d=null;if(typeof a==="undefined"){if(this.length){var e=this[0].attributes,f;d=c.data(this[0]);for(var h=0,l=e.length;h-1)return true;return false},val:function(a){if(!arguments.length){var b=this[0];if(b){if(c.nodeName(b,"option")){var d=b.attributes.value;return!d||d.specified?b.value:b.text}if(c.nodeName(b,"select")){var e=b.selectedIndex;d=[];var f=b.options;b=b.type==="select-one"; +if(e<0)return null;var h=b?e:0;for(e=b?e+1:f.length;h=0;else if(c.nodeName(this,"select")){var A=c.makeArray(r);c("option",this).each(function(){this.selected=c.inArray(c(this).val(),A)>=0});if(!A.length)this.selectedIndex=-1}else this.value=r}})}});c.extend({attrFn:{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true}, +attr:function(a,b,d,e){if(!a||a.nodeType===3||a.nodeType===8)return B;if(e&&b in c.attrFn)return c(a)[b](d);e=a.nodeType!==1||!c.isXMLDoc(a);var f=d!==B;b=e&&c.props[b]||b;var h=Ta.test(b);if((b in a||a[b]!==B)&&e&&!h){if(f){b==="type"&&Ua.test(a.nodeName)&&a.parentNode&&c.error("type property can't be changed");if(d===null)a.nodeType===1&&a.removeAttribute(b);else a[b]=d}if(c.nodeName(a,"form")&&a.getAttributeNode(b))return a.getAttributeNode(b).nodeValue;if(b==="tabIndex")return(b=a.getAttributeNode("tabIndex"))&& +b.specified?b.value:Va.test(a.nodeName)||Wa.test(a.nodeName)&&a.href?0:B;return a[b]}if(!c.support.style&&e&&b==="style"){if(f)a.style.cssText=""+d;return a.style.cssText}f&&a.setAttribute(b,""+d);if(!a.attributes[b]&&a.hasAttribute&&!a.hasAttribute(b))return B;a=!c.support.hrefNormalized&&e&&h?a.getAttribute(b,2):a.getAttribute(b);return a===null?B:a}});var X=/\.(.*)$/,ia=/^(?:textarea|input|select)$/i,La=/\./g,Ma=/ /g,Xa=/[^\w\s.|`]/g,Ya=function(a){return a.replace(Xa,"\\$&")},ua={focusin:0,focusout:0}; +c.event={add:function(a,b,d,e){if(!(a.nodeType===3||a.nodeType===8)){if(c.isWindow(a)&&a!==E&&!a.frameElement)a=E;if(d===false)d=U;else if(!d)return;var f,h;if(d.handler){f=d;d=f.handler}if(!d.guid)d.guid=c.guid++;if(h=c.data(a)){var l=a.nodeType?"events":"__events__",k=h[l],o=h.handle;if(typeof k==="function"){o=k.handle;k=k.events}else if(!k){a.nodeType||(h[l]=h=function(){});h.events=k={}}if(!o)h.handle=o=function(){return typeof c!=="undefined"&&!c.event.triggered?c.event.handle.apply(o.elem, +arguments):B};o.elem=a;b=b.split(" ");for(var x=0,r;l=b[x++];){h=f?c.extend({},f):{handler:d,data:e};if(l.indexOf(".")>-1){r=l.split(".");l=r.shift();h.namespace=r.slice(0).sort().join(".")}else{r=[];h.namespace=""}h.type=l;if(!h.guid)h.guid=d.guid;var A=k[l],C=c.event.special[l]||{};if(!A){A=k[l]=[];if(!C.setup||C.setup.call(a,e,r,o)===false)if(a.addEventListener)a.addEventListener(l,o,false);else a.attachEvent&&a.attachEvent("on"+l,o)}if(C.add){C.add.call(a,h);if(!h.handler.guid)h.handler.guid= +d.guid}A.push(h);c.event.global[l]=true}a=null}}},global:{},remove:function(a,b,d,e){if(!(a.nodeType===3||a.nodeType===8)){if(d===false)d=U;var f,h,l=0,k,o,x,r,A,C,J=a.nodeType?"events":"__events__",w=c.data(a),I=w&&w[J];if(w&&I){if(typeof I==="function"){w=I;I=I.events}if(b&&b.type){d=b.handler;b=b.type}if(!b||typeof b==="string"&&b.charAt(0)==="."){b=b||"";for(f in I)c.event.remove(a,f+b)}else{for(b=b.split(" ");f=b[l++];){r=f;k=f.indexOf(".")<0;o=[];if(!k){o=f.split(".");f=o.shift();x=RegExp("(^|\\.)"+ +c.map(o.slice(0).sort(),Ya).join("\\.(?:.*\\.)?")+"(\\.|$)")}if(A=I[f])if(d){r=c.event.special[f]||{};for(h=e||0;h=0){a.type=f=f.slice(0,-1);a.exclusive=true}if(!d){a.stopPropagation();c.event.global[f]&&c.each(c.cache,function(){this.events&&this.events[f]&&c.event.trigger(a,b,this.handle.elem)})}if(!d||d.nodeType===3||d.nodeType=== +8)return B;a.result=B;a.target=d;b=c.makeArray(b);b.unshift(a)}a.currentTarget=d;(e=d.nodeType?c.data(d,"handle"):(c.data(d,"__events__")||{}).handle)&&e.apply(d,b);e=d.parentNode||d.ownerDocument;try{if(!(d&&d.nodeName&&c.noData[d.nodeName.toLowerCase()]))if(d["on"+f]&&d["on"+f].apply(d,b)===false){a.result=false;a.preventDefault()}}catch(h){}if(!a.isPropagationStopped()&&e)c.event.trigger(a,b,e,true);else if(!a.isDefaultPrevented()){var l;e=a.target;var k=f.replace(X,""),o=c.nodeName(e,"a")&&k=== +"click",x=c.event.special[k]||{};if((!x._default||x._default.call(d,a)===false)&&!o&&!(e&&e.nodeName&&c.noData[e.nodeName.toLowerCase()])){try{if(e[k]){if(l=e["on"+k])e["on"+k]=null;c.event.triggered=true;e[k]()}}catch(r){}if(l)e["on"+k]=l;c.event.triggered=false}}},handle:function(a){var b,d,e,f;d=[];var h=c.makeArray(arguments);a=h[0]=c.event.fix(a||E.event);a.currentTarget=this;b=a.type.indexOf(".")<0&&!a.exclusive;if(!b){e=a.type.split(".");a.type=e.shift();d=e.slice(0).sort();e=RegExp("(^|\\.)"+ +d.join("\\.(?:.*\\.)?")+"(\\.|$)")}a.namespace=a.namespace||d.join(".");f=c.data(this,this.nodeType?"events":"__events__");if(typeof f==="function")f=f.events;d=(f||{})[a.type];if(f&&d){d=d.slice(0);f=0;for(var l=d.length;f-1?c.map(a.options,function(e){return e.selected}).join("-"):"";else if(a.nodeName.toLowerCase()==="select")d=a.selectedIndex;return d},Z=function(a,b){var d=a.target,e,f;if(!(!ia.test(d.nodeName)||d.readOnly)){e=c.data(d,"_change_data");f=xa(d);if(a.type!=="focusout"||d.type!=="radio")c.data(d,"_change_data",f);if(!(e===B||f===e))if(e!=null||f){a.type="change";a.liveFired= +B;return c.event.trigger(a,b,d)}}};c.event.special.change={filters:{focusout:Z,beforedeactivate:Z,click:function(a){var b=a.target,d=b.type;if(d==="radio"||d==="checkbox"||b.nodeName.toLowerCase()==="select")return Z.call(this,a)},keydown:function(a){var b=a.target,d=b.type;if(a.keyCode===13&&b.nodeName.toLowerCase()!=="textarea"||a.keyCode===32&&(d==="checkbox"||d==="radio")||d==="select-multiple")return Z.call(this,a)},beforeactivate:function(a){a=a.target;c.data(a,"_change_data",xa(a))}},setup:function(){if(this.type=== +"file")return false;for(var a in V)c.event.add(this,a+".specialChange",V[a]);return ia.test(this.nodeName)},teardown:function(){c.event.remove(this,".specialChange");return ia.test(this.nodeName)}};V=c.event.special.change.filters;V.focus=V.beforeactivate}t.addEventListener&&c.each({focus:"focusin",blur:"focusout"},function(a,b){function d(e){e=c.event.fix(e);e.type=b;return c.event.trigger(e,null,e.target)}c.event.special[b]={setup:function(){ua[b]++===0&&t.addEventListener(a,d,true)},teardown:function(){--ua[b]=== +0&&t.removeEventListener(a,d,true)}}});c.each(["bind","one"],function(a,b){c.fn[b]=function(d,e,f){if(typeof d==="object"){for(var h in d)this[b](h,e,d[h],f);return this}if(c.isFunction(e)||e===false){f=e;e=B}var l=b==="one"?c.proxy(f,function(o){c(this).unbind(o,l);return f.apply(this,arguments)}):f;if(d==="unload"&&b!=="one")this.one(d,e,f);else{h=0;for(var k=this.length;h0?this.bind(b,d,e):this.trigger(b)};if(c.attrFn)c.attrFn[b]=true});E.attachEvent&&!E.addEventListener&&c(E).bind("unload",function(){for(var a in c.cache)if(c.cache[a].handle)try{c.event.remove(c.cache[a].handle.elem)}catch(b){}}); +(function(){function a(g,i,n,m,p,q){p=0;for(var u=m.length;p0){F=y;break}}y=y[g]}m[p]=F}}}var d=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,e=0,f=Object.prototype.toString,h=false,l=true;[0,0].sort(function(){l=false;return 0});var k=function(g,i,n,m){n=n||[];var p=i=i||t;if(i.nodeType!==1&&i.nodeType!==9)return[];if(!g||typeof g!=="string")return n;var q,u,y,F,M,N=true,O=k.isXML(i),D=[],R=g;do{d.exec("");if(q=d.exec(R)){R=q[3];D.push(q[1]);if(q[2]){F=q[3]; +break}}}while(q);if(D.length>1&&x.exec(g))if(D.length===2&&o.relative[D[0]])u=L(D[0]+D[1],i);else for(u=o.relative[D[0]]?[i]:k(D.shift(),i);D.length;){g=D.shift();if(o.relative[g])g+=D.shift();u=L(g,u)}else{if(!m&&D.length>1&&i.nodeType===9&&!O&&o.match.ID.test(D[0])&&!o.match.ID.test(D[D.length-1])){q=k.find(D.shift(),i,O);i=q.expr?k.filter(q.expr,q.set)[0]:q.set[0]}if(i){q=m?{expr:D.pop(),set:C(m)}:k.find(D.pop(),D.length===1&&(D[0]==="~"||D[0]==="+")&&i.parentNode?i.parentNode:i,O);u=q.expr?k.filter(q.expr, +q.set):q.set;if(D.length>0)y=C(u);else N=false;for(;D.length;){q=M=D.pop();if(o.relative[M])q=D.pop();else M="";if(q==null)q=i;o.relative[M](y,q,O)}}else y=[]}y||(y=u);y||k.error(M||g);if(f.call(y)==="[object Array]")if(N)if(i&&i.nodeType===1)for(g=0;y[g]!=null;g++){if(y[g]&&(y[g]===true||y[g].nodeType===1&&k.contains(i,y[g])))n.push(u[g])}else for(g=0;y[g]!=null;g++)y[g]&&y[g].nodeType===1&&n.push(u[g]);else n.push.apply(n,y);else C(y,n);if(F){k(F,p,n,m);k.uniqueSort(n)}return n};k.uniqueSort=function(g){if(w){h= +l;g.sort(w);if(h)for(var i=1;i0};k.find=function(g,i,n){var m;if(!g)return[];for(var p=0,q=o.order.length;p":function(g,i){var n,m=typeof i==="string",p=0,q=g.length;if(m&&!/\W/.test(i))for(i=i.toLowerCase();p=0))n||m.push(u);else if(n)i[q]=false;return false},ID:function(g){return g[1].replace(/\\/g,"")},TAG:function(g){return g[1].toLowerCase()},CHILD:function(g){if(g[1]==="nth"){var i=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(g[2]==="even"&&"2n"||g[2]==="odd"&&"2n+1"||!/\D/.test(g[2])&&"0n+"+g[2]||g[2]);g[2]=i[1]+(i[2]||1)-0;g[3]=i[3]-0}g[0]=e++;return g},ATTR:function(g,i,n, +m,p,q){i=g[1].replace(/\\/g,"");if(!q&&o.attrMap[i])g[1]=o.attrMap[i];if(g[2]==="~=")g[4]=" "+g[4]+" ";return g},PSEUDO:function(g,i,n,m,p){if(g[1]==="not")if((d.exec(g[3])||"").length>1||/^\w/.test(g[3]))g[3]=k(g[3],null,null,i);else{g=k.filter(g[3],i,n,true^p);n||m.push.apply(m,g);return false}else if(o.match.POS.test(g[0])||o.match.CHILD.test(g[0]))return true;return g},POS:function(g){g.unshift(true);return g}},filters:{enabled:function(g){return g.disabled===false&&g.type!=="hidden"},disabled:function(g){return g.disabled=== +true},checked:function(g){return g.checked===true},selected:function(g){return g.selected===true},parent:function(g){return!!g.firstChild},empty:function(g){return!g.firstChild},has:function(g,i,n){return!!k(n[3],g).length},header:function(g){return/h\d/i.test(g.nodeName)},text:function(g){return"text"===g.type},radio:function(g){return"radio"===g.type},checkbox:function(g){return"checkbox"===g.type},file:function(g){return"file"===g.type},password:function(g){return"password"===g.type},submit:function(g){return"submit"=== +g.type},image:function(g){return"image"===g.type},reset:function(g){return"reset"===g.type},button:function(g){return"button"===g.type||g.nodeName.toLowerCase()==="button"},input:function(g){return/input|select|textarea|button/i.test(g.nodeName)}},setFilters:{first:function(g,i){return i===0},last:function(g,i,n,m){return i===m.length-1},even:function(g,i){return i%2===0},odd:function(g,i){return i%2===1},lt:function(g,i,n){return in[3]-0},nth:function(g,i,n){return n[3]- +0===i},eq:function(g,i,n){return n[3]-0===i}},filter:{PSEUDO:function(g,i,n,m){var p=i[1],q=o.filters[p];if(q)return q(g,n,i,m);else if(p==="contains")return(g.textContent||g.innerText||k.getText([g])||"").indexOf(i[3])>=0;else if(p==="not"){i=i[3];n=0;for(m=i.length;n=0}},ID:function(g,i){return g.nodeType===1&&g.getAttribute("id")===i},TAG:function(g,i){return i==="*"&&g.nodeType===1||g.nodeName.toLowerCase()=== +i},CLASS:function(g,i){return(" "+(g.className||g.getAttribute("class"))+" ").indexOf(i)>-1},ATTR:function(g,i){var n=i[1];n=o.attrHandle[n]?o.attrHandle[n](g):g[n]!=null?g[n]:g.getAttribute(n);var m=n+"",p=i[2],q=i[4];return n==null?p==="!=":p==="="?m===q:p==="*="?m.indexOf(q)>=0:p==="~="?(" "+m+" ").indexOf(q)>=0:!q?m&&n!==false:p==="!="?m!==q:p==="^="?m.indexOf(q)===0:p==="$="?m.substr(m.length-q.length)===q:p==="|="?m===q||m.substr(0,q.length+1)===q+"-":false},POS:function(g,i,n,m){var p=o.setFilters[i[2]]; +if(p)return p(g,n,i,m)}}},x=o.match.POS,r=function(g,i){return"\\"+(i-0+1)},A;for(A in o.match){o.match[A]=RegExp(o.match[A].source+/(?![^\[]*\])(?![^\(]*\))/.source);o.leftMatch[A]=RegExp(/(^(?:.|\r|\n)*?)/.source+o.match[A].source.replace(/\\(\d+)/g,r))}var C=function(g,i){g=Array.prototype.slice.call(g,0);if(i){i.push.apply(i,g);return i}return g};try{Array.prototype.slice.call(t.documentElement.childNodes,0)}catch(J){C=function(g,i){var n=0,m=i||[];if(f.call(g)==="[object Array]")Array.prototype.push.apply(m, +g);else if(typeof g.length==="number")for(var p=g.length;n";n.insertBefore(g,n.firstChild);if(t.getElementById(i)){o.find.ID=function(m,p,q){if(typeof p.getElementById!=="undefined"&&!q)return(p=p.getElementById(m[1]))?p.id===m[1]||typeof p.getAttributeNode!=="undefined"&&p.getAttributeNode("id").nodeValue===m[1]?[p]:B:[]};o.filter.ID=function(m,p){var q=typeof m.getAttributeNode!=="undefined"&&m.getAttributeNode("id");return m.nodeType===1&&q&&q.nodeValue===p}}n.removeChild(g); +n=g=null})();(function(){var g=t.createElement("div");g.appendChild(t.createComment(""));if(g.getElementsByTagName("*").length>0)o.find.TAG=function(i,n){var m=n.getElementsByTagName(i[1]);if(i[1]==="*"){for(var p=[],q=0;m[q];q++)m[q].nodeType===1&&p.push(m[q]);m=p}return m};g.innerHTML="";if(g.firstChild&&typeof g.firstChild.getAttribute!=="undefined"&&g.firstChild.getAttribute("href")!=="#")o.attrHandle.href=function(i){return i.getAttribute("href",2)};g=null})();t.querySelectorAll&& +function(){var g=k,i=t.createElement("div");i.innerHTML="

    ";if(!(i.querySelectorAll&&i.querySelectorAll(".TEST").length===0)){k=function(m,p,q,u){p=p||t;m=m.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!u&&!k.isXML(p))if(p.nodeType===9)try{return C(p.querySelectorAll(m),q)}catch(y){}else if(p.nodeType===1&&p.nodeName.toLowerCase()!=="object"){var F=p.getAttribute("id"),M=F||"__sizzle__";F||p.setAttribute("id",M);try{return C(p.querySelectorAll("#"+M+" "+m),q)}catch(N){}finally{F|| +p.removeAttribute("id")}}return g(m,p,q,u)};for(var n in g)k[n]=g[n];i=null}}();(function(){var g=t.documentElement,i=g.matchesSelector||g.mozMatchesSelector||g.webkitMatchesSelector||g.msMatchesSelector,n=false;try{i.call(t.documentElement,"[test!='']:sizzle")}catch(m){n=true}if(i)k.matchesSelector=function(p,q){q=q.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!k.isXML(p))try{if(n||!o.match.PSEUDO.test(q)&&!/!=/.test(q))return i.call(p,q)}catch(u){}return k(q,null,null,[p]).length>0}})();(function(){var g= +t.createElement("div");g.innerHTML="
    ";if(!(!g.getElementsByClassName||g.getElementsByClassName("e").length===0)){g.lastChild.className="e";if(g.getElementsByClassName("e").length!==1){o.order.splice(1,0,"CLASS");o.find.CLASS=function(i,n,m){if(typeof n.getElementsByClassName!=="undefined"&&!m)return n.getElementsByClassName(i[1])};g=null}}})();k.contains=t.documentElement.contains?function(g,i){return g!==i&&(g.contains?g.contains(i):true)}:t.documentElement.compareDocumentPosition? +function(g,i){return!!(g.compareDocumentPosition(i)&16)}:function(){return false};k.isXML=function(g){return(g=(g?g.ownerDocument||g:0).documentElement)?g.nodeName!=="HTML":false};var L=function(g,i){for(var n,m=[],p="",q=i.nodeType?[i]:i;n=o.match.PSEUDO.exec(g);){p+=n[0];g=g.replace(o.match.PSEUDO,"")}g=o.relative[g]?g+"*":g;n=0;for(var u=q.length;n0)for(var h=d;h0},closest:function(a,b){var d=[],e,f,h=this[0];if(c.isArray(a)){var l,k={},o=1;if(h&&a.length){e=0;for(f=a.length;e-1:c(h).is(e))d.push({selector:l,elem:h,level:o})}h= +h.parentNode;o++}}return d}l=cb.test(a)?c(a,b||this.context):null;e=0;for(f=this.length;e-1:c.find.matchesSelector(h,a)){d.push(h);break}else{h=h.parentNode;if(!h||!h.ownerDocument||h===b)break}d=d.length>1?c.unique(d):d;return this.pushStack(d,"closest",a)},index:function(a){if(!a||typeof a==="string")return c.inArray(this[0],a?c(a):this.parent().children());return c.inArray(a.jquery?a[0]:a,this)},add:function(a,b){var d=typeof a==="string"?c(a,b||this.context): +c.makeArray(a),e=c.merge(this.get(),d);return this.pushStack(!d[0]||!d[0].parentNode||d[0].parentNode.nodeType===11||!e[0]||!e[0].parentNode||e[0].parentNode.nodeType===11?e:c.unique(e))},andSelf:function(){return this.add(this.prevObject)}});c.each({parent:function(a){return(a=a.parentNode)&&a.nodeType!==11?a:null},parents:function(a){return c.dir(a,"parentNode")},parentsUntil:function(a,b,d){return c.dir(a,"parentNode",d)},next:function(a){return c.nth(a,2,"nextSibling")},prev:function(a){return c.nth(a, +2,"previousSibling")},nextAll:function(a){return c.dir(a,"nextSibling")},prevAll:function(a){return c.dir(a,"previousSibling")},nextUntil:function(a,b,d){return c.dir(a,"nextSibling",d)},prevUntil:function(a,b,d){return c.dir(a,"previousSibling",d)},siblings:function(a){return c.sibling(a.parentNode.firstChild,a)},children:function(a){return c.sibling(a.firstChild)},contents:function(a){return c.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:c.makeArray(a.childNodes)}},function(a, +b){c.fn[a]=function(d,e){var f=c.map(this,b,d);Za.test(a)||(e=d);if(e&&typeof e==="string")f=c.filter(e,f);f=this.length>1?c.unique(f):f;if((this.length>1||ab.test(e))&&$a.test(a))f=f.reverse();return this.pushStack(f,a,bb.call(arguments).join(","))}});c.extend({filter:function(a,b,d){if(d)a=":not("+a+")";return b.length===1?c.find.matchesSelector(b[0],a)?[b[0]]:[]:c.find.matches(a,b)},dir:function(a,b,d){var e=[];for(a=a[b];a&&a.nodeType!==9&&(d===B||a.nodeType!==1||!c(a).is(d));){a.nodeType===1&& +e.push(a);a=a[b]}return e},nth:function(a,b,d){b=b||1;for(var e=0;a;a=a[d])if(a.nodeType===1&&++e===b)break;return a},sibling:function(a,b){for(var d=[];a;a=a.nextSibling)a.nodeType===1&&a!==b&&d.push(a);return d}});var za=/ jQuery\d+="(?:\d+|null)"/g,$=/^\s+/,Aa=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,Ba=/<([\w:]+)/,db=/\s]+\/)>/g,P={option:[1, +""],legend:[1,"
    ","
    "],thead:[1,"","
    "],tr:[2,"","
    "],td:[3,"","
    "],col:[2,"","
    "],area:[1,"",""],_default:[0,"",""]};P.optgroup=P.option;P.tbody=P.tfoot=P.colgroup=P.caption=P.thead;P.th=P.td;if(!c.support.htmlSerialize)P._default=[1,"div
    ","
    "];c.fn.extend({text:function(a){if(c.isFunction(a))return this.each(function(b){var d= +c(this);d.text(a.call(this,b,d.text()))});if(typeof a!=="object"&&a!==B)return this.empty().append((this[0]&&this[0].ownerDocument||t).createTextNode(a));return c.text(this)},wrapAll:function(a){if(c.isFunction(a))return this.each(function(d){c(this).wrapAll(a.call(this,d))});if(this[0]){var b=c(a,this[0].ownerDocument).eq(0).clone(true);this[0].parentNode&&b.insertBefore(this[0]);b.map(function(){for(var d=this;d.firstChild&&d.firstChild.nodeType===1;)d=d.firstChild;return d}).append(this)}return this}, +wrapInner:function(a){if(c.isFunction(a))return this.each(function(b){c(this).wrapInner(a.call(this,b))});return this.each(function(){var b=c(this),d=b.contents();d.length?d.wrapAll(a):b.append(a)})},wrap:function(a){return this.each(function(){c(this).wrapAll(a)})},unwrap:function(){return this.parent().each(function(){c.nodeName(this,"body")||c(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.appendChild(a)})}, +prepend:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(b){this.parentNode.insertBefore(b,this)});else if(arguments.length){var a=c(arguments[0]);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(b){this.parentNode.insertBefore(b, +this.nextSibling)});else if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,c(arguments[0]).toArray());return a}},remove:function(a,b){for(var d=0,e;(e=this[d])!=null;d++)if(!a||c.filter(a,[e]).length){if(!b&&e.nodeType===1){c.cleanData(e.getElementsByTagName("*"));c.cleanData([e])}e.parentNode&&e.parentNode.removeChild(e)}return this},empty:function(){for(var a=0,b;(b=this[a])!=null;a++)for(b.nodeType===1&&c.cleanData(b.getElementsByTagName("*"));b.firstChild;)b.removeChild(b.firstChild); +return this},clone:function(a){var b=this.map(function(){if(!c.support.noCloneEvent&&!c.isXMLDoc(this)){var d=this.outerHTML,e=this.ownerDocument;if(!d){d=e.createElement("div");d.appendChild(this.cloneNode(true));d=d.innerHTML}return c.clean([d.replace(za,"").replace(fb,'="$1">').replace($,"")],e)[0]}else return this.cloneNode(true)});if(a===true){na(this,b);na(this.find("*"),b.find("*"))}return b},html:function(a){if(a===B)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(za,""):null; +else if(typeof a==="string"&&!Ca.test(a)&&(c.support.leadingWhitespace||!$.test(a))&&!P[(Ba.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Aa,"<$1>");try{for(var b=0,d=this.length;b0||e.cacheable||this.length>1?h.cloneNode(true):h)}k.length&&c.each(k,Oa)}return this}});c.buildFragment=function(a,b,d){var e,f,h;b=b&&b[0]?b[0].ownerDocument||b[0]:t;if(a.length===1&&typeof a[0]==="string"&&a[0].length<512&&b===t&&!Ca.test(a[0])&&(c.support.checkClone||!Da.test(a[0]))){f=true;if(h=c.fragments[a[0]])if(h!==1)e=h}if(!e){e=b.createDocumentFragment();c.clean(a,b,e,d)}if(f)c.fragments[a[0]]=h?e:1;return{fragment:e,cacheable:f}};c.fragments={};c.each({appendTo:"append", +prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){c.fn[a]=function(d){var e=[];d=c(d);var f=this.length===1&&this[0].parentNode;if(f&&f.nodeType===11&&f.childNodes.length===1&&d.length===1){d[b](this[0]);return this}else{f=0;for(var h=d.length;f0?this.clone(true):this).get();c(d[f])[b](l);e=e.concat(l)}return this.pushStack(e,a,d.selector)}}});c.extend({clean:function(a,b,d,e){b=b||t;if(typeof b.createElement==="undefined")b=b.ownerDocument|| +b[0]&&b[0].ownerDocument||t;for(var f=[],h=0,l;(l=a[h])!=null;h++){if(typeof l==="number")l+="";if(l){if(typeof l==="string"&&!eb.test(l))l=b.createTextNode(l);else if(typeof l==="string"){l=l.replace(Aa,"<$1>");var k=(Ba.exec(l)||["",""])[1].toLowerCase(),o=P[k]||P._default,x=o[0],r=b.createElement("div");for(r.innerHTML=o[1]+l+o[2];x--;)r=r.lastChild;if(!c.support.tbody){x=db.test(l);k=k==="table"&&!x?r.firstChild&&r.firstChild.childNodes:o[1]===""&&!x?r.childNodes:[];for(o=k.length- +1;o>=0;--o)c.nodeName(k[o],"tbody")&&!k[o].childNodes.length&&k[o].parentNode.removeChild(k[o])}!c.support.leadingWhitespace&&$.test(l)&&r.insertBefore(b.createTextNode($.exec(l)[0]),r.firstChild);l=r.childNodes}if(l.nodeType)f.push(l);else f=c.merge(f,l)}}if(d)for(h=0;f[h];h++)if(e&&c.nodeName(f[h],"script")&&(!f[h].type||f[h].type.toLowerCase()==="text/javascript"))e.push(f[h].parentNode?f[h].parentNode.removeChild(f[h]):f[h]);else{f[h].nodeType===1&&f.splice.apply(f,[h+1,0].concat(c.makeArray(f[h].getElementsByTagName("script")))); +d.appendChild(f[h])}return f},cleanData:function(a){for(var b,d,e=c.cache,f=c.event.special,h=c.support.deleteExpando,l=0,k;(k=a[l])!=null;l++)if(!(k.nodeName&&c.noData[k.nodeName.toLowerCase()]))if(d=k[c.expando]){if((b=e[d])&&b.events)for(var o in b.events)f[o]?c.event.remove(k,o):c.removeEvent(k,o,b.handle);if(h)delete k[c.expando];else k.removeAttribute&&k.removeAttribute(c.expando);delete e[d]}}});var Ea=/alpha\([^)]*\)/i,gb=/opacity=([^)]*)/,hb=/-([a-z])/ig,ib=/([A-Z])/g,Fa=/^-?\d+(?:px)?$/i, +jb=/^-?\d/,kb={position:"absolute",visibility:"hidden",display:"block"},Pa=["Left","Right"],Qa=["Top","Bottom"],W,Ga,aa,lb=function(a,b){return b.toUpperCase()};c.fn.css=function(a,b){if(arguments.length===2&&b===B)return this;return c.access(this,a,b,true,function(d,e,f){return f!==B?c.style(d,e,f):c.css(d,e)})};c.extend({cssHooks:{opacity:{get:function(a,b){if(b){var d=W(a,"opacity","opacity");return d===""?"1":d}else return a.style.opacity}}},cssNumber:{zIndex:true,fontWeight:true,opacity:true, +zoom:true,lineHeight:true},cssProps:{"float":c.support.cssFloat?"cssFloat":"styleFloat"},style:function(a,b,d,e){if(!(!a||a.nodeType===3||a.nodeType===8||!a.style)){var f,h=c.camelCase(b),l=a.style,k=c.cssHooks[h];b=c.cssProps[h]||h;if(d!==B){if(!(typeof d==="number"&&isNaN(d)||d==null)){if(typeof d==="number"&&!c.cssNumber[h])d+="px";if(!k||!("set"in k)||(d=k.set(a,d))!==B)try{l[b]=d}catch(o){}}}else{if(k&&"get"in k&&(f=k.get(a,false,e))!==B)return f;return l[b]}}},css:function(a,b,d){var e,f=c.camelCase(b), +h=c.cssHooks[f];b=c.cssProps[f]||f;if(h&&"get"in h&&(e=h.get(a,true,d))!==B)return e;else if(W)return W(a,b,f)},swap:function(a,b,d){var e={},f;for(f in b){e[f]=a.style[f];a.style[f]=b[f]}d.call(a);for(f in b)a.style[f]=e[f]},camelCase:function(a){return a.replace(hb,lb)}});c.curCSS=c.css;c.each(["height","width"],function(a,b){c.cssHooks[b]={get:function(d,e,f){var h;if(e){if(d.offsetWidth!==0)h=oa(d,b,f);else c.swap(d,kb,function(){h=oa(d,b,f)});if(h<=0){h=W(d,b,b);if(h==="0px"&&aa)h=aa(d,b,b); +if(h!=null)return h===""||h==="auto"?"0px":h}if(h<0||h==null){h=d.style[b];return h===""||h==="auto"?"0px":h}return typeof h==="string"?h:h+"px"}},set:function(d,e){if(Fa.test(e)){e=parseFloat(e);if(e>=0)return e+"px"}else return e}}});if(!c.support.opacity)c.cssHooks.opacity={get:function(a,b){return gb.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?parseFloat(RegExp.$1)/100+"":b?"1":""},set:function(a,b){var d=a.style;d.zoom=1;var e=c.isNaN(b)?"":"alpha(opacity="+b*100+")",f= +d.filter||"";d.filter=Ea.test(f)?f.replace(Ea,e):d.filter+" "+e}};if(t.defaultView&&t.defaultView.getComputedStyle)Ga=function(a,b,d){var e;d=d.replace(ib,"-$1").toLowerCase();if(!(b=a.ownerDocument.defaultView))return B;if(b=b.getComputedStyle(a,null)){e=b.getPropertyValue(d);if(e===""&&!c.contains(a.ownerDocument.documentElement,a))e=c.style(a,d)}return e};if(t.documentElement.currentStyle)aa=function(a,b){var d,e,f=a.currentStyle&&a.currentStyle[b],h=a.style;if(!Fa.test(f)&&jb.test(f)){d=h.left; +e=a.runtimeStyle.left;a.runtimeStyle.left=a.currentStyle.left;h.left=b==="fontSize"?"1em":f||0;f=h.pixelLeft+"px";h.left=d;a.runtimeStyle.left=e}return f===""?"auto":f};W=Ga||aa;if(c.expr&&c.expr.filters){c.expr.filters.hidden=function(a){var b=a.offsetHeight;return a.offsetWidth===0&&b===0||!c.support.reliableHiddenOffsets&&(a.style.display||c.css(a,"display"))==="none"};c.expr.filters.visible=function(a){return!c.expr.filters.hidden(a)}}var mb=c.now(),nb=/)<[^<]*)*<\/script>/gi, +ob=/^(?:select|textarea)/i,pb=/^(?:color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,qb=/^(?:GET|HEAD)$/,Ra=/\[\]$/,T=/\=\?(&|$)/,ja=/\?/,rb=/([?&])_=[^&]*/,sb=/^(\w+:)?\/\/([^\/?#]+)/,tb=/%20/g,ub=/#.*$/,Ha=c.fn.load;c.fn.extend({load:function(a,b,d){if(typeof a!=="string"&&Ha)return Ha.apply(this,arguments);else if(!this.length)return this;var e=a.indexOf(" ");if(e>=0){var f=a.slice(e,a.length);a=a.slice(0,e)}e="GET";if(b)if(c.isFunction(b)){d=b;b=null}else if(typeof b=== +"object"){b=c.param(b,c.ajaxSettings.traditional);e="POST"}var h=this;c.ajax({url:a,type:e,dataType:"html",data:b,complete:function(l,k){if(k==="success"||k==="notmodified")h.html(f?c("
    ").append(l.responseText.replace(nb,"")).find(f):l.responseText);d&&h.each(d,[l.responseText,k,l])}});return this},serialize:function(){return c.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?c.makeArray(this.elements):this}).filter(function(){return this.name&& +!this.disabled&&(this.checked||ob.test(this.nodeName)||pb.test(this.type))}).map(function(a,b){var d=c(this).val();return d==null?null:c.isArray(d)?c.map(d,function(e){return{name:b.name,value:e}}):{name:b.name,value:d}}).get()}});c.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){c.fn[b]=function(d){return this.bind(b,d)}});c.extend({get:function(a,b,d,e){if(c.isFunction(b)){e=e||d;d=b;b=null}return c.ajax({type:"GET",url:a,data:b,success:d,dataType:e})}, +getScript:function(a,b){return c.get(a,null,b,"script")},getJSON:function(a,b,d){return c.get(a,b,d,"json")},post:function(a,b,d,e){if(c.isFunction(b)){e=e||d;d=b;b={}}return c.ajax({type:"POST",url:a,data:b,success:d,dataType:e})},ajaxSetup:function(a){c.extend(c.ajaxSettings,a)},ajaxSettings:{url:location.href,global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,xhr:function(){return new E.XMLHttpRequest},accepts:{xml:"application/xml, text/xml",html:"text/html", +script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},ajax:function(a){var b=c.extend(true,{},c.ajaxSettings,a),d,e,f,h=b.type.toUpperCase(),l=qb.test(h);b.url=b.url.replace(ub,"");b.context=a&&a.context!=null?a.context:b;if(b.data&&b.processData&&typeof b.data!=="string")b.data=c.param(b.data,b.traditional);if(b.dataType==="jsonp"){if(h==="GET")T.test(b.url)||(b.url+=(ja.test(b.url)?"&":"?")+(b.jsonp||"callback")+"=?");else if(!b.data|| +!T.test(b.data))b.data=(b.data?b.data+"&":"")+(b.jsonp||"callback")+"=?";b.dataType="json"}if(b.dataType==="json"&&(b.data&&T.test(b.data)||T.test(b.url))){d=b.jsonpCallback||"jsonp"+mb++;if(b.data)b.data=(b.data+"").replace(T,"="+d+"$1");b.url=b.url.replace(T,"="+d+"$1");b.dataType="script";var k=E[d];E[d]=function(m){if(c.isFunction(k))k(m);else{E[d]=B;try{delete E[d]}catch(p){}}f=m;c.handleSuccess(b,w,e,f);c.handleComplete(b,w,e,f);r&&r.removeChild(A)}}if(b.dataType==="script"&&b.cache===null)b.cache= +false;if(b.cache===false&&l){var o=c.now(),x=b.url.replace(rb,"$1_="+o);b.url=x+(x===b.url?(ja.test(b.url)?"&":"?")+"_="+o:"")}if(b.data&&l)b.url+=(ja.test(b.url)?"&":"?")+b.data;b.global&&c.active++===0&&c.event.trigger("ajaxStart");o=(o=sb.exec(b.url))&&(o[1]&&o[1].toLowerCase()!==location.protocol||o[2].toLowerCase()!==location.host);if(b.dataType==="script"&&h==="GET"&&o){var r=t.getElementsByTagName("head")[0]||t.documentElement,A=t.createElement("script");if(b.scriptCharset)A.charset=b.scriptCharset; +A.src=b.url;if(!d){var C=false;A.onload=A.onreadystatechange=function(){if(!C&&(!this.readyState||this.readyState==="loaded"||this.readyState==="complete")){C=true;c.handleSuccess(b,w,e,f);c.handleComplete(b,w,e,f);A.onload=A.onreadystatechange=null;r&&A.parentNode&&r.removeChild(A)}}}r.insertBefore(A,r.firstChild);return B}var J=false,w=b.xhr();if(w){b.username?w.open(h,b.url,b.async,b.username,b.password):w.open(h,b.url,b.async);try{if(b.data!=null&&!l||a&&a.contentType)w.setRequestHeader("Content-Type", +b.contentType);if(b.ifModified){c.lastModified[b.url]&&w.setRequestHeader("If-Modified-Since",c.lastModified[b.url]);c.etag[b.url]&&w.setRequestHeader("If-None-Match",c.etag[b.url])}o||w.setRequestHeader("X-Requested-With","XMLHttpRequest");w.setRequestHeader("Accept",b.dataType&&b.accepts[b.dataType]?b.accepts[b.dataType]+", */*; q=0.01":b.accepts._default)}catch(I){}if(b.beforeSend&&b.beforeSend.call(b.context,w,b)===false){b.global&&c.active--===1&&c.event.trigger("ajaxStop");w.abort();return false}b.global&& +c.triggerGlobal(b,"ajaxSend",[w,b]);var L=w.onreadystatechange=function(m){if(!w||w.readyState===0||m==="abort"){J||c.handleComplete(b,w,e,f);J=true;if(w)w.onreadystatechange=c.noop}else if(!J&&w&&(w.readyState===4||m==="timeout")){J=true;w.onreadystatechange=c.noop;e=m==="timeout"?"timeout":!c.httpSuccess(w)?"error":b.ifModified&&c.httpNotModified(w,b.url)?"notmodified":"success";var p;if(e==="success")try{f=c.httpData(w,b.dataType,b)}catch(q){e="parsererror";p=q}if(e==="success"||e==="notmodified")d|| +c.handleSuccess(b,w,e,f);else c.handleError(b,w,e,p);d||c.handleComplete(b,w,e,f);m==="timeout"&&w.abort();if(b.async)w=null}};try{var g=w.abort;w.abort=function(){w&&Function.prototype.call.call(g,w);L("abort")}}catch(i){}b.async&&b.timeout>0&&setTimeout(function(){w&&!J&&L("timeout")},b.timeout);try{w.send(l||b.data==null?null:b.data)}catch(n){c.handleError(b,w,null,n);c.handleComplete(b,w,e,f)}b.async||L();return w}},param:function(a,b){var d=[],e=function(h,l){l=c.isFunction(l)?l():l;d[d.length]= +encodeURIComponent(h)+"="+encodeURIComponent(l)};if(b===B)b=c.ajaxSettings.traditional;if(c.isArray(a)||a.jquery)c.each(a,function(){e(this.name,this.value)});else for(var f in a)da(f,a[f],b,e);return d.join("&").replace(tb,"+")}});c.extend({active:0,lastModified:{},etag:{},handleError:function(a,b,d,e){a.error&&a.error.call(a.context,b,d,e);a.global&&c.triggerGlobal(a,"ajaxError",[b,a,e])},handleSuccess:function(a,b,d,e){a.success&&a.success.call(a.context,e,d,b);a.global&&c.triggerGlobal(a,"ajaxSuccess", +[b,a])},handleComplete:function(a,b,d){a.complete&&a.complete.call(a.context,b,d);a.global&&c.triggerGlobal(a,"ajaxComplete",[b,a]);a.global&&c.active--===1&&c.event.trigger("ajaxStop")},triggerGlobal:function(a,b,d){(a.context&&a.context.url==null?c(a.context):c.event).trigger(b,d)},httpSuccess:function(a){try{return!a.status&&location.protocol==="file:"||a.status>=200&&a.status<300||a.status===304||a.status===1223}catch(b){}return false},httpNotModified:function(a,b){var d=a.getResponseHeader("Last-Modified"), +e=a.getResponseHeader("Etag");if(d)c.lastModified[b]=d;if(e)c.etag[b]=e;return a.status===304},httpData:function(a,b,d){var e=a.getResponseHeader("content-type")||"",f=b==="xml"||!b&&e.indexOf("xml")>=0;a=f?a.responseXML:a.responseText;f&&a.documentElement.nodeName==="parsererror"&&c.error("parsererror");if(d&&d.dataFilter)a=d.dataFilter(a,b);if(typeof a==="string")if(b==="json"||!b&&e.indexOf("json")>=0)a=c.parseJSON(a);else if(b==="script"||!b&&e.indexOf("javascript")>=0)c.globalEval(a);return a}}); +if(E.ActiveXObject)c.ajaxSettings.xhr=function(){if(E.location.protocol!=="file:")try{return new E.XMLHttpRequest}catch(a){}try{return new E.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}};c.support.ajax=!!c.ajaxSettings.xhr();var ea={},vb=/^(?:toggle|show|hide)$/,wb=/^([+\-]=)?([\d+.\-]+)(.*)$/,ba,pa=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];c.fn.extend({show:function(a,b,d){if(a||a===0)return this.animate(S("show", +3),a,b,d);else{d=0;for(var e=this.length;d=0;e--)if(d[e].elem===this){b&&d[e](true);d.splice(e,1)}});b||this.dequeue();return this}});c.each({slideDown:S("show",1),slideUp:S("hide",1),slideToggle:S("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){c.fn[a]=function(d,e,f){return this.animate(b, +d,e,f)}});c.extend({speed:function(a,b,d){var e=a&&typeof a==="object"?c.extend({},a):{complete:d||!d&&b||c.isFunction(a)&&a,duration:a,easing:d&&b||b&&!c.isFunction(b)&&b};e.duration=c.fx.off?0:typeof e.duration==="number"?e.duration:e.duration in c.fx.speeds?c.fx.speeds[e.duration]:c.fx.speeds._default;e.old=e.complete;e.complete=function(){e.queue!==false&&c(this).dequeue();c.isFunction(e.old)&&e.old.call(this)};return e},easing:{linear:function(a,b,d,e){return d+e*a},swing:function(a,b,d,e){return(-Math.cos(a* +Math.PI)/2+0.5)*e+d}},timers:[],fx:function(a,b,d){this.options=b;this.elem=a;this.prop=d;if(!b.orig)b.orig={}}});c.fx.prototype={update:function(){this.options.step&&this.options.step.call(this.elem,this.now,this);(c.fx.step[this.prop]||c.fx.step._default)(this)},cur:function(){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null))return this.elem[this.prop];var a=parseFloat(c.css(this.elem,this.prop));return a&&a>-1E4?a:0},custom:function(a,b,d){function e(l){return f.step(l)} +var f=this,h=c.fx;this.startTime=c.now();this.start=a;this.end=b;this.unit=d||this.unit||"px";this.now=this.start;this.pos=this.state=0;e.elem=this.elem;if(e()&&c.timers.push(e)&&!ba)ba=setInterval(h.tick,h.interval)},show:function(){this.options.orig[this.prop]=c.style(this.elem,this.prop);this.options.show=true;this.custom(this.prop==="width"||this.prop==="height"?1:0,this.cur());c(this.elem).show()},hide:function(){this.options.orig[this.prop]=c.style(this.elem,this.prop);this.options.hide=true; +this.custom(this.cur(),0)},step:function(a){var b=c.now(),d=true;if(a||b>=this.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;for(var e in this.options.curAnim)if(this.options.curAnim[e]!==true)d=false;if(d){if(this.options.overflow!=null&&!c.support.shrinkWrapBlocks){var f=this.elem,h=this.options;c.each(["","X","Y"],function(k,o){f.style["overflow"+o]=h.overflow[k]})}this.options.hide&&c(this.elem).hide();if(this.options.hide|| +this.options.show)for(var l in this.options.curAnim)c.style(this.elem,l,this.options.orig[l]);this.options.complete.call(this.elem)}return false}else{a=b-this.startTime;this.state=a/this.options.duration;b=this.options.easing||(c.easing.swing?"swing":"linear");this.pos=c.easing[this.options.specialEasing&&this.options.specialEasing[this.prop]||b](this.state,a,0,1,this.options.duration);this.now=this.start+(this.end-this.start)*this.pos;this.update()}return true}};c.extend(c.fx,{tick:function(){for(var a= +c.timers,b=0;b-1;e={};var x={};if(o)x=f.position();l=o?x.top:parseInt(l,10)||0;k=o?x.left:parseInt(k,10)||0;if(c.isFunction(b))b=b.call(a,d,h);if(b.top!=null)e.top=b.top-h.top+l;if(b.left!=null)e.left=b.left-h.left+k;"using"in b?b.using.call(a, +e):f.css(e)}};c.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),d=this.offset(),e=Ia.test(b[0].nodeName)?{top:0,left:0}:b.offset();d.top-=parseFloat(c.css(a,"marginTop"))||0;d.left-=parseFloat(c.css(a,"marginLeft"))||0;e.top+=parseFloat(c.css(b[0],"borderTopWidth"))||0;e.left+=parseFloat(c.css(b[0],"borderLeftWidth"))||0;return{top:d.top-e.top,left:d.left-e.left}},offsetParent:function(){return this.map(function(){for(var a=this.offsetParent||t.body;a&&!Ia.test(a.nodeName)&& +c.css(a,"position")==="static";)a=a.offsetParent;return a})}});c.each(["Left","Top"],function(a,b){var d="scroll"+b;c.fn[d]=function(e){var f=this[0],h;if(!f)return null;if(e!==B)return this.each(function(){if(h=fa(this))h.scrollTo(!a?e:c(h).scrollLeft(),a?e:c(h).scrollTop());else this[d]=e});else return(h=fa(f))?"pageXOffset"in h?h[a?"pageYOffset":"pageXOffset"]:c.support.boxModel&&h.document.documentElement[d]||h.document.body[d]:f[d]}});c.each(["Height","Width"],function(a,b){var d=b.toLowerCase(); +c.fn["inner"+b]=function(){return this[0]?parseFloat(c.css(this[0],d,"padding")):null};c.fn["outer"+b]=function(e){return this[0]?parseFloat(c.css(this[0],d,e?"margin":"border")):null};c.fn[d]=function(e){var f=this[0];if(!f)return e==null?null:this;if(c.isFunction(e))return this.each(function(l){var k=c(this);k[d](e.call(this,l,k[d]()))});if(c.isWindow(f))return f.document.compatMode==="CSS1Compat"&&f.document.documentElement["client"+b]||f.document.body["client"+b];else if(f.nodeType===9)return Math.max(f.documentElement["client"+ +b],f.body["scroll"+b],f.documentElement["scroll"+b],f.body["offset"+b],f.documentElement["offset"+b]);else if(e===B){f=c.css(f,d);var h=parseFloat(f);return c.isNaN(h)?f:h}else return this.css(d,typeof e==="string"?e:e+"px")}})})(window); diff --git a/install-new/theme/js/jquery.ajaxfileupload.js b/install-new/theme/js/jquery.ajaxfileupload.js new file mode 100644 index 000000000..edff89456 --- /dev/null +++ b/install-new/theme/js/jquery.ajaxfileupload.js @@ -0,0 +1,53 @@ +/* + * this file come from: + * http://www.phpletter.com/Demo/AjaxFileUpload-Demo/ + * v 1.0 + */ + +jQuery.extend({createUploadIframe:function(id,uri) +{var frameId='jUploadFrame'+id;if(window.ActiveXObject){var io=document.createElement(' + + +
    + +displayTemplate('footer') ?> \ No newline at end of file diff --git a/install-new/theme/views/system.phtml b/install-new/theme/views/system.phtml new file mode 100644 index 000000000..2c8679930 --- /dev/null +++ b/install-new/theme/views/system.phtml @@ -0,0 +1,33 @@ +displayTemplate('header') ?> + +

    l('Required set-up. Please verify the following checklist items are true.') ?>

    + +

    l('If you have any questions, please visit our documentation and community forum.', $this->getDocumentationLink(), $this->getForumLink()); ?>

    + + +tests_render as $type => $categories): ?> + + tests['required']['success']): ?> +

    l('Your configuration is valid, click next to continue!') ?>

    + +

    l('Your configuration is invalid. Please fix the issues below:') ?>

    + + +

    l('Optional set-up') ?>

    + + +
      + +
    • + $lang): ?> +
    • + +
    • + + +
    + + +

    + +displayTemplate('footer') ?> \ No newline at end of file diff --git a/install-new/theme/views/welcome.phtml b/install-new/theme/views/welcome.phtml new file mode 100644 index 000000000..7e52f4623 --- /dev/null +++ b/install-new/theme/views/welcome.phtml @@ -0,0 +1,102 @@ +displayTemplate('header') ?> + +

    l('Welcome to the PrestaShop %s Installer.', _PS_INSTALL_VERSION_) ?>

    +

    l('Please allow 5-15 minutes to complete the installation process.') ?>

    +

    l('The installation should only take a few minutes: if you need help, do not hesitate to check our documentation or to contact our support team: %2$s', $this->getDocumentationLink(), $this->getPhone()) ?> + + +language->getIsoList()) > 1): ?> +

    l('Choose the installer language:') ?>

    +
      + language->getIsoList() as $iso): ?> +
    • + +
    • + +
    + + + +

    l('Did you know?'); ?>

    +

    l('PrestaShop and community offers over 40 different languages for free directly accessible from your back-office in tools tab'); ?>

    + + +

    l('Licenses Agreement') ?>

    +
    +

    l('PrestaShop core is released under the OSL 3.0 while PrestaShop modules and themes are released under the AFL 3.0.') ?>

    +

    Core: Open Software License ("OSL") v. 3.0

    +

    This Open Software License (the "License") applies to any original work of authorship (the "Original Work") whose owner (the "Licensor") has placed the following licensing notice adjacent to the copyright notice for the Original Work:

    +

    Licensed under the Open Software License version 3.0

    +

    1. Grant of Copyright License. Licensor grants You a worldwide, royalty-free, non-exclusive, sublicensable license, for the duration of the copyright, to do the following:

    +
      +
    1. to reproduce the Original Work in copies, either alone or as part of a collective work
    2. +
    3. to translate, adapt, alter, transform, modify, or arrange the Original Work, thereby creating derivative works ("Derivative Works") based upon the Original Work
    4. +
    5. to distribute or communicate copies of the Original Work and Derivative Works to the public, with the proviso that copies of Original Work or Derivative Works that You distribute or communicate shall be licensed under this Open Software License
    6. +
    7. to perform the Original Work publicly
    8. +
    9. to display the Original Work publicly
    10. +
    +

    2. Grant of Patent License. Licensor grants You a worldwide, royalty-free, non-exclusive, sublicensable license, under patent claims owned or controlled by the Licensor that are embodied in the Original Work as furnished by the Licensor, for the duration of the patents, to make, use, sell, offer for sale, have made, and import the Original Work and Derivative Works.

    +

    3. Grant of Source Code License. The term "Source Code" means the preferred form of the Original Work for making modifications to it and all available documentation describing how to modify the Original Work. Licensor agrees to provide a machine-readable copy of the Source Code of the Original Work along with each copy of the Original Work that Licensor distributes. Licensor reserves the right to satisfy this obligation by placing a machine-readable copy of the Source Code in an information repository reasonably calculated to permit inexpensive and convenient access by You for as long as Licensor continues to distribute the Original Work.

    +

    4. Exclusions From License Grant. Neither the names of Licensor, nor the names of any contributors to the Original Work, nor any of their trademarks or service marks, may be used to endorse or promote products derived from this Original Work without express prior permission of the Licensor. Except as expressly stated herein, nothing in this License grants any license to Licensor's trademarks, copyrights, patents, trade secrets or any other intellectual property. No patent license is granted to make, use, sell, offer for sale, have made, or import embodiments of any patent claims other than the licensed claims defined in Section 2. No license is granted to the trademarks of Licensor even if such marks are included in the Original Work. Nothing in this License shall be interpreted to prohibit Licensor from licensing under terms different from this License any Original Work that Licensor otherwise would have a right to license.

    +

    5. External Deployment. The term "External Deployment" means the use, distribution, or communication of the Original Work or Derivative Works in any way such that the Original Work or Derivative Works may be used by anyone other than You, whether those works are distributed or communicated to those persons or made available as an application intended for use over a network. As an express condition for the grants of license hereunder, You must treat any External Deployment by You of the Original Work or a Derivative Work as a distribution under section 1(c).

    +

    6. Attribution Rights. You must retain, in the Source Code of any Derivative Works that You create, all copyright, patent, or trademark notices from the Source Code of the Original Work, as well as any notices of licensing and any descriptive text identified therein as an "Attribution Notice." You must cause the Source Code for any Derivative Works that You create to carry a prominent Attribution Notice reasonably calculated to inform recipients that You have modified the Original Work.

    +

    7. Warranty of Provenance and Disclaimer of Warranty. Licensor warrants that the copyright in and to the Original Work and the patent rights granted herein by Licensor are owned by the Licensor or are sublicensed to You under the terms of this License with the permission of the contributor(s) of those copyrights and patent rights. Except as expressly stated in the immediately preceding sentence, the Original Work is provided under this License on an "AS IS" BASIS and WITHOUT WARRANTY, either express or implied, including, without limitation, the warranties of non-infringement, merchantability or fitness for a particular purpose. THE ENTIRE RISK AS TO THE QUALITY OF THE ORIGINAL WORK IS WITH YOU. This DISCLAIMER OF WARRANTY constitutes an essential part of this License. No license to the Original Work is granted by this License except under this disclaimer.

    +

    8. Limitation of Liability. Under no circumstances and under no legal theory, whether in tort (including negligence), contract, or otherwise, shall the Licensor be liable to anyone for any indirect, special, incidental, or consequential damages of any character arising as a result of this License or the use of the Original Work including, without limitation, damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses. This limitation of liability shall not apply to the extent applicable law prohibits such limitation.

    +

    9. Acceptance and Termination. If, at any time, You expressly assented to this License, that assent indicates your clear and irrevocable acceptance of this License and all of its terms and conditions. If You distribute or communicate copies of the Original Work or a Derivative Work, You must make a reasonable effort under the circumstances to obtain the express assent of recipients to the terms of this License. This License conditions your rights to undertake the activities listed in Section 1, including your right to create Derivative Works based upon the Original Work, and doing so without honoring these terms and conditions is prohibited by copyright law and international treaty. Nothing in this License is intended to affect copyright exceptions and limitations (including 'fair use' or 'fair dealing'). This License shall terminate immediately and You may no longer exercise any of the rights granted to You by this License upon your failure to honor the conditions in Section 1(c).

    +

    10. Termination for Patent Action. This License shall terminate automatically and You may no longer exercise any of the rights granted to You by this License as of the date You commence an action, including a cross-claim or counterclaim, against Licensor or any licensee alleging that the Original Work infringes a patent. This termination provision shall not apply for an action alleging patent infringement by combinations of the Original Work with other software or hardware.

    +

    11. Jurisdiction, Venue and Governing Law. Any action or suit relating to this License may be brought only in the courts of a jurisdiction wherein the Licensor resides or in which Licensor conducts its primary business, and under the laws of that jurisdiction excluding its conflict-of-law provisions. The application of the United Nations Convention on Contracts for the International Sale of Goods is expressly excluded. Any use of the Original Work outside the scope of this License or after its termination shall be subject to the requirements and penalties of copyright or patent law in the appropriate jurisdiction. This section shall survive the termination of this License.

    +

    12. Attorneys Fees. In any action to enforce the terms of this License or seeking damages relating thereto, the prevailing party shall be entitled to recover its costs and expenses, including, without limitation, reasonable attorneys' fees and costs incurred in connection with such action, including any appeal of such action. This section shall survive the termination of this License.

    +

    13. Miscellaneous. If any provision of this License is held to be unenforceable, such provision shall be reformed only to the extent necessary to make it enforceable.

    +

    14. Definition of "You" in This License. "You" throughout this License, whether in upper or lower case, means an individual or a legal entity exercising rights under, and complying with all of the terms of, this License. For legal entities, "You" includes any entity that controls, is controlled by, or is under common control with you. For purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.

    +

    15. Right to Use. You may use the Original Work in all ways not otherwise restricted or conditioned by this License or by law, and Licensor promises not to interfere with or be responsible for such uses by You.

    +

    16. Modification of This License. This License is Copyright © 2005 Lawrence Rosen. Permission is granted to copy, distribute, or communicate this License without modification. Nothing in this License permits You to modify this License as applied to the Original Work or to Derivative Works. However, You may modify the text of this License and copy, distribute or communicate your modified version (the "Modified License") and apply it to other original works of authorship subject to the following conditions: (i) You may not indicate in any way that your Modified License is the "Open Software License" or "OSL" and you may not use those names in the name of your Modified License; (ii) You must replace the notice specified in the first paragraph above with the notice "Licensed under Open Software License ("OSL") v. 3.0" or with a notice of your own that is not confusingly similar to the notice in this License; and (iii) You may not claim that your original works are open source software unless your Modified License has been approved by Open Source Initiative (OSI) and You comply with its license review and certification process.

    + +

    Modules and Themes: Academic Free License ("AFL") v. 3.0

    +

    This Academic Free License (the "License") applies to any original work of authorship (the "Original Work") whose owner (the "Licensor") has placed the following licensing notice adjacent to the copyright notice for the Original Work:

    +

    Licensed under the Academic Free License version 3.0

    +

    1. Grant of Copyright License. Licensor grants You a worldwide, royalty-free, non-exclusive, sublicensable license, for the duration of the copyright, to do the following:

    +
      +
    1. to reproduce the Original Work in copies, either alone or as part of a collective work;
    2. +
    3. to translate, adapt, alter, transform, modify, or arrange the Original Work, thereby creating derivative works ("Derivative Works") based upon the Original Work;
    4. +
    5. to distribute or communicate copies of the Original Work and Derivative Works to the public, under any license of your choice that does not contradict the terms and conditions, including Licensor's reserved rights and remedies, in this Academic Free License;
    6. +
    7. to perform the Original Work publicly; and
    8. +
    9. to display the Original Work publicly.
    10. +
    +

    2. Grant of Patent License. Licensor grants You a worldwide, royalty-free, non-exclusive, sublicensable license, under patent claims owned or controlled by the Licensor that are embodied in the Original Work as furnished by the Licensor, for the duration of the patents, to make, use, sell, offer for sale, have made, and import the Original Work and Derivative Works.

    +

    3. Grant of Source Code License. The term "Source Code" means the preferred form of the Original Work for making modifications to it and all available documentation describing how to modify the Original Work. Licensor agrees to provide a machine-readable copy of the Source Code of the Original Work along with each copy of the Original Work that Licensor distributes. Licensor reserves the right to satisfy this obligation by placing a machine-readable copy of the Source Code in an information repository reasonably calculated to permit inexpensive and convenient access by You for as long as Licensor continues to distribute the Original Work.

    +

    4. Exclusions From License Grant. Neither the names of Licensor, nor the names of any contributors to the Original Work, nor any of their trademarks or service marks, may be used to endorse or promote products derived from this Original Work without express prior permission of the Licensor. Except as expressly stated herein, nothing in this License grants any license to Licensor's trademarks, copyrights, patents, trade secrets or any other intellectual property. No patent license is granted to make, use, sell, offer for sale, have made, or import embodiments of any patent claims other than the licensed claims defined in Section 2. No license is granted to the trademarks of Licensor even if such marks are included in the Original Work. Nothing in this License shall be interpreted to prohibit Licensor from licensing under terms different from this License any Original Work that Licensor otherwise would have a right to license.

    +

    5. External Deployment. The term "External Deployment" means the use, distribution, or communication of the Original Work or Derivative Works in any way such that the Original Work or Derivative Works may be used by anyone other than You, whether those works are distributed or communicated to those persons or made available as an application intended for use over a network. As an express condition for the grants of license hereunder, You must treat any External Deployment by You of the Original Work or a Derivative Work as a distribution under section 1(c).

    +

    6. Attribution Rights. You must retain, in the Source Code of any Derivative Works that You create, all copyright, patent, or trademark notices from the Source Code of the Original Work, as well as any notices of licensing and any descriptive text identified therein as an "Attribution Notice." You must cause the Source Code for any Derivative Works that You create to carry a prominent Attribution Notice reasonably calculated to inform recipients that You have modified the Original Work.

    +

    7. Warranty of Provenance and Disclaimer of Warranty. Licensor warrants that the copyright in and to the Original Work and the patent rights granted herein by Licensor are owned by the Licensor or are sublicensed to You under the terms of this License with the permission of the contributor(s) of those copyrights and patent rights. Except as expressly stated in the immediately preceding sentence, the Original Work is provided under this License on an "AS IS" BASIS and WITHOUT WARRANTY, either express or implied, including, without limitation, the warranties of non-infringement, merchantability or fitness for a particular purpose. THE ENTIRE RISK AS TO THE QUALITY OF THE ORIGINAL WORK IS WITH YOU. This DISCLAIMER OF WARRANTY constitutes an essential part of this License. No license to the Original Work is granted by this License except under this disclaimer.

    +

    8. Limitation of Liability. Under no circumstances and under no legal theory, whether in tort (including negligence), contract, or otherwise, shall the Licensor be liable to anyone for any indirect, special, incidental, or consequential damages of any character arising as a result of this License or the use of the Original Work including, without limitation, damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses. This limitation of liability shall not apply to the extent applicable law prohibits such limitation.

    +

    9. Acceptance and Termination. If, at any time, You expressly assented to this License, that assent indicates your clear and irrevocable acceptance of this License and all of its terms and conditions. If You distribute or communicate copies of the Original Work or a Derivative Work, You must make a reasonable effort under the circumstances to obtain the express assent of recipients to the terms of this License. This License conditions your rights to undertake the activities listed in Section 1, including your right to create Derivative Works based upon the Original Work, and doing so without honoring these terms and conditions is prohibited by copyright law and international treaty. Nothing in this License is intended to affect copyright exceptions and limitations (including "fair use" or "fair dealing"). This License shall terminate immediately and You may no longer exercise any of the rights granted to You by this License upon your failure to honor the conditions in Section 1(c).

    +

    10. Termination for Patent Action. This License shall terminate automatically and You may no longer exercise any of the rights granted to You by this License as of the date You commence an action, including a cross-claim or counterclaim, against Licensor or any licensee alleging that the Original Work infringes a patent. This termination provision shall not apply for an action alleging patent infringement by combinations of the Original Work with other software or hardware.

    +

    11. Jurisdiction, Venue and Governing Law. Any action or suit relating to this License may be brought only in the courts of a jurisdiction wherein the Licensor resides or in which Licensor conducts its primary business, and under the laws of that jurisdiction excluding its conflict-of-law provisions. The application of the United Nations Convention on Contracts for the International Sale of Goods is expressly excluded. Any use of the Original Work outside the scope of this License or after its termination shall be subject to the requirements and penalties of copyright or patent law in the appropriate jurisdiction. This section shall survive the termination of this License.

    +

    12. Attorneys' Fees. In any action to enforce the terms of this License or seeking damages relating thereto, the prevailing party shall be entitled to recover its costs and expenses, including, without limitation, reasonable attorneys' fees and costs incurred in connection with such action, including any appeal of such action. This section shall survive the termination of this License.

    +

    13. Miscellaneous. If any provision of this License is held to be unenforceable, such provision shall be reformed only to the extent necessary to make it enforceable.

    +

    14. Definition of "You" in This License. "You" throughout this License, whether in upper or lower case, means an individual or a legal entity exercising rights under, and complying with all of the terms of, this License. For legal entities, "You" includes any entity that controls, is controlled by, or is under common control with you. For purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.

    +

    15. Right to Use. You may use the Original Work in all ways not otherwise restricted or conditioned by this License or by law, and Licensor promises not to interfere with or be responsible for such uses by You.

    +

    16. Modification of This License. This License is Copyright © 2005 Lawrence Rosen. Permission is granted to copy, distribute, or communicate this License without modification. Nothing in this License permits You to modify this License as applied to the Original Work or to Derivative Works. However, You may modify the text of this License and copy, distribute or communicate your modified version (the "Modified License") and apply it to other original works of authorship subject to the following conditions: (i) You may not indicate in any way that your Modified License is the "Academic Free License" or "AFL" and you may not use those names in the name of your Modified License; (ii) You must replace the notice specified in the first paragraph above with the notice "Licensed under " or with a notice of your own that is not confusingly similar to the notice in this License; and (iii) You may not claim that your original works are open source software unless your Modified License has been approved by Open Source Initiative (OSI) and You comply with its license review and certification process.

    +
    + +

    + +
    + +

    + +displayTemplate('footer') ?> \ No newline at end of file diff --git a/install-new/upgrade/classes/AddConfToFile.php b/install-new/upgrade/classes/AddConfToFile.php new file mode 100644 index 000000000..86b044004 --- /dev/null +++ b/install-new/upgrade/classes/AddConfToFile.php @@ -0,0 +1,91 @@ + +* @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 AddConfToFile +{ + public $fd; + public $file; + public $mode; + public $error = false; + + public function __construct($file, $mode = 'r+') + { + $this->file = $file; + $this->mode = $mode; + $this->checkFile($file); + if ($mode == 'w' AND !$this->error) + if (!$res = @fwrite($this->fd, 'error = 6; + } + + public function __destruct() + { + if (!$this->error) + @fclose($this->fd); + } + + private function checkFile($file) + { + if (!$fd = @fopen($this->file, $this->mode)) + $this->error = 5; + elseif (!is_writable($this->file)) + $this->error = 6; + $this->fd = $fd; + } + + public function writeInFile($name, $data) + { + if (!$res = @fwrite($this->fd, + 'define(\''.$name.'\', \''.$this->checkString($data).'\');'."\n")) + { + $this->error = 6; + return false; + } + return true; + } + + public function writeEndTagPhp() + { + if (!$res = @fwrite($this->fd, '?>'."\n")) { + $this->error = 6; + return false; + } + return true; + } + + public function checkString($string) + { + if (get_magic_quotes_gpc()) + $string = stripslashes($string); + if (!is_numeric($string)) + { + $string = addslashes($string); + $string = strip_tags(nl2br($string)); + } + return $string; + } +} diff --git a/install-new/upgrade/classes/Language.php b/install-new/upgrade/classes/Language.php new file mode 100644 index 000000000..56fb7e91c --- /dev/null +++ b/install-new/upgrade/classes/Language.php @@ -0,0 +1,652 @@ + +* @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 Language extends ObjectModel +{ + public $id; + + /** @var string Name */ + public $name; + + /** @var string 2-letter iso code */ + public $iso_code; + + /** @var string 5-letter iso code */ + public $language_code; + + /** @var bool true if this language is right to left language */ + public $is_rtl = false; + + /** @var boolean Status */ + public $active = true; + + protected $fieldsRequired = array('name', 'iso_code'); + protected $fieldsSize = array('name' => 32, 'iso_code' => 2, 'language_code' => 5); + protected $fieldsValidate = array('name' => 'isGenericName', 'iso_code' => 'isLanguageIsoCode', 'language_code' => 'isLanguageCode', 'active' => 'isBool', 'is_rtl' => 'isBool'); + + protected $table = 'lang'; + protected $identifier = 'id_lang'; + + /** @var array Languages cache */ + protected static $_checkedLangs; + protected static $_LANGUAGES; + protected static $countActiveLanguages; + + protected $webserviceParameters = array( + 'objectNodeName' => 'language', + 'objectsNodeName' => 'languages', + ); + + public function __construct($id = NULL, $id_lang = NULL) + { + parent::__construct($id); + } + + public function getFields() + { + parent::validateFields(); + $fields['name'] = pSQL($this->name); + $fields['iso_code'] = pSQL(strtolower($this->iso_code)); + $fields['language_code'] = pSQL(strtolower($this->language_code)); + $fields['is_rtl'] = (int)$this->is_rtl; + if (empty($fields['language_code'])) + $fields['language_code'] = $fields['iso_code']; + $fields['active'] = (int)$this->active; + return $fields; + } + + public function add($autodate = true, $nullValues = false) + { + if (!parent::add($autodate)) + return false; + + $translationsFiles = array( + 'fields' => '_FIELDS', + 'errors' => '_ERRORS', + 'admin' => '_LANGADM', + 'pdf' => '_LANGPDF', + ); + if (!file_exists(_PS_TRANSLATIONS_DIR_.$this->iso_code)) + mkdir(_PS_TRANSLATIONS_DIR_.$this->iso_code); + foreach ($translationsFiles as $file => $var) + if (!file_exists(_PS_TRANSLATIONS_DIR_.$this->iso_code.'/'.$file.'.php')) + file_put_contents(_PS_TRANSLATIONS_DIR_.$this->iso_code.'/'.$file.'.php', ''); + + $resUpdateSQL = $this->loadUpdateSQL(); + // If url_rewrite is not enabled, we don't need to regenerate .htaccess + if(!Configuration::get('PS_REWRITING_SETTINGS')) + return $resUpdateSQL; + + return ($resUpdateSQL AND Tools::generateHtaccess(dirname(__FILE__).'/../.htaccess', + (int)(Configuration::get('PS_REWRITING_SETTINGS')), + (int)(Configuration::get('PS_HTACCESS_CACHE_CONTROL')), + '' + )); + } + + public function toggleStatus() + { + if (!parent::toggleStatus()) + return false; + + // If url_rewrite is not enabled, we don't need to regenerate .htaccess + if(!Configuration::get('PS_REWRITING_SETTINGS')) + return true; + return (Tools::generateHtaccess(dirname(__FILE__).'/../.htaccess', + (int)(Configuration::get('PS_REWRITING_SETTINGS')), + (int)(Configuration::get('PS_HTACCESS_CACHE_CONTROL')), + '' + )); + } + + public function checkFiles() + { + return self::checkFilesWithIsoCode($this->iso_code); + } + + + /** + * This functions checks if every files exists for the language $iso_code. + * Concerned files are theses located in translations/$iso_code/ + * and translations/mails/$iso_code . + * + * @param mixed $iso_code + * @returntrue if all files exists + */ + public static function checkFilesWithIsoCode($iso_code) + { + if (isset(self::$_checkedLangs[$iso_code]) AND self::$_checkedLangs[$iso_code]) + return true; + foreach (array_keys(self::getFilesList($iso_code, _THEME_NAME_, false, false, false, true)) as $key) + if (!file_exists($key)) + return false; + self::$_checkedLangs[$iso_code] = true; + return true; + } + + public static function getFilesList($iso_from, $theme_from, $iso_to = false, $theme_to = false, $select = false, $check = false, $modules = false) + { + if (empty($iso_from)) + die(Tools::displayError()); + + $copy = ($iso_to AND $theme_to) ? true : false; + + $lPath_from = _PS_TRANSLATIONS_DIR_.(string)$iso_from.'/'; + $tPath_from = _PS_ROOT_DIR_.'/themes/'.(string)$theme_from.'/'; + $mPath_from = _PS_MAIL_DIR_.(string)$iso_from.'/'; + + if ($copy) + { + $lPath_to = _PS_TRANSLATIONS_DIR_.(string)$iso_to.'/'; + $tPath_to = _PS_ROOT_DIR_.'/themes/'.(string)$theme_to.'/'; + $mPath_to = _PS_MAIL_DIR_.(string)$iso_to.'/'; + } + + $lFiles = array('admin'.'.php', 'errors'.'.php', 'fields'.'.php', 'pdf'.'.php'); + $mFiles = array( + 'account.html', 'account.txt', + 'bankwire.html', 'bankwire.txt', + 'cheque.html', 'cheque.txt', + 'contact.html', 'contact.txt', + 'contact_form.html', 'contact_form.txt', + 'credit_slip.html', 'credit_slip.txt', + 'download_product.html', 'download_product.txt', + 'download-product.tpl', + 'employee_password.html', 'employee_password.txt', + 'forward_msg.html', 'forward_msg.txt', + 'guest_to_customer.html', 'guest_to_customer.txt', + 'in_transit.html', 'in_transit.txt', + 'newsletter.html', 'newsletter.txt', + 'order_canceled.html', 'order_canceled.txt', + 'order_conf.html', 'order_conf.txt', + 'order_customer_comment.html', 'order_customer_comment.txt', + 'order_merchant_comment.html', 'order_merchant_comment.txt', + 'order_return_state.html', 'order_return_state.txt', + 'outofstock.html', 'outofstock.txt', + 'password.html', 'password.txt', + 'password_query.html', 'password_query.txt', + 'payment.html', 'payment.txt', + 'payment_error.html', 'payment_error.txt', + 'preparation.html', 'preparation.txt', + 'refund.html', 'refund.txt', + 'reply_msg.html', 'reply_msg.txt', + 'shipped.html', 'shipped.txt', + 'test.html', 'test.txt', + 'voucher.html', 'voucher.txt', + ); + + $number = -1; + + $files = array(); + $files_tr = array(); + $files_theme = array(); + $files_mail = array(); + $files_modules = array(); + + + // When a copy is made from a theme in specific language + // to an other theme for the same language, + // it's avoid to copy Translations, Mails files + // and modules files which are not override by theme. + if (!$copy OR $iso_from != $iso_to) + { + // Translations files + if (!$check OR ($check AND (string)$iso_from != 'en')) + foreach ($lFiles as $file) + $files_tr[$lPath_from.$file] = ($copy ? $lPath_to.$file : ++$number); + if ($select == 'tr') + return $files_tr; + $files = array_merge($files, $files_tr); + + // Mail files + if (!$check OR ($check AND (string)$iso_from != 'en')) + $files_mail[$mPath_from.'lang.php'] = ($copy ? $mPath_to.'lang.php' : ++$number); + foreach ($mFiles as $file) + $files_mail[$mPath_from.$file] = ($copy ? $mPath_to.$file : ++$number); + if ($select == 'mail') + return $files_mail; + $files = array_merge($files, $files_mail); + + // Modules + if ($modules) + { + $modList = Module::getModulesDirOnDisk(); + foreach ($modList as $mod) + { + $modDir = _PS_MODULE_DIR_.$mod; + // Lang file + if (file_exists($modDir.'/'.(string)$iso_from.'.php')) + $files_modules[$modDir.'/'.(string)$iso_from.'.php'] = ($copy ? $modDir.'/'.(string)$iso_to.'.php' : ++$number); + // Mails files + $modMailDirFrom = $modDir.'/mails/'.(string)$iso_from; + $modMailDirTo = $modDir.'/mails/'.(string)$iso_to; + if (file_exists($modMailDirFrom)) + { + $dirFiles = scandir($modMailDirFrom); + foreach ($dirFiles as $file) + if (file_exists($modMailDirFrom.'/'.$file) AND $file != '.' AND $file != '..' AND $file != '.svn') + $files_modules[$modMailDirFrom.'/'.$file] = ($copy ? $modMailDirTo.'/'.$file : ++$number); + } + } + if ($select == 'modules') + return $files_modules; + $files = array_merge($files, $files_modules); + } + } + else if ($select == 'mail' OR $select == 'tr') + { + return $files; + } + + // Theme files + if (!$check OR ($check AND (string)$iso_from != 'en')) + { + $files_theme[$tPath_from.'lang/'.(string)$iso_from.'.php'] = ($copy ? $tPath_to.'lang/'.(string)$iso_to.'.php' : ++$number); + $module_theme_files = (file_exists($tPath_from.'modules/') ? scandir($tPath_from.'modules/') : array()); + foreach ($module_theme_files as $module) + if ($module !== '.' AND $module != '..' AND $module !== '.svn' AND file_exists($tPath_from.'modules/'.$module.'/'.(string)$iso_from.'.php')) + $files_theme[$tPath_from.'modules/'.$module.'/'.(string)$iso_from.'.php'] = ($copy ? $tPath_to.'modules/'.$module.'/'.(string)$iso_to.'.php' : ++$number); + } + if ($select == 'theme') + return $files_theme; + $files = array_merge($files, $files_theme); + + // Return + return $files; + } + + /** + * loadUpdateSQL will create default lang values when you create a new lang, based on default id lang + * + * @return boolean true if succeed + */ + public function loadUpdateSQL() + { + $tables = Db::getInstance()->executeS('SHOW TABLES LIKE \''._DB_PREFIX_.'%_lang\' '); + $langTables = array(); + + foreach($tables as $table) + foreach($table as $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)'); + $return = true; + foreach($langTables as $name) + { + $fields = ''; + $columns = Db::getInstance()->executeS('SHOW COLUMNS FROM `'.$name.'`'); + foreach($columns as $column) + $fields .= $column['Field'].', '; + $fields = rtrim($fields, ', '); + $identifier = 'id_'.str_replace('_lang', '', str_replace(_DB_PREFIX_, '', $name)); + + $sql = 'INSERT IGNORE INTO `'.$name.'` ('.$fields.') (SELECT '; + foreach($columns as $column) { + if ($identifier != $column['Field'] and $column['Field'] != 'id_lang') + $sql .= '(SELECT `'.$column['Field'].'` FROM `'.$name.'` tl WHERE tl.`id_lang` = @id_lang_default AND tl.`'.$identifier.'` = `'.str_replace('_lang', '', $name).'`.`'.$identifier.'`), '; + else + $sql.= '`'.$column['Field'].'`, '; + } + $sql = rtrim($sql, ', '); + $sql .= ' FROM `'._DB_PREFIX_.'lang` CROSS JOIN `'.str_replace('_lang', '', $name).'`) ;'; + $return &= Db::getInstance()->execute(pSQL($sql)); + } + return $return; + } + + public static function recurseDeleteDir($dir) + { + if (!is_dir($dir)) + return false; + if ($handle = @opendir($dir)) + { + while (false !== ($file = readdir($handle))) + if ($file != '.' && $file != '..') + { + if (is_dir($dir.'/'.$file)) + self::recurseDeleteDir($dir.'/'.$file); + elseif (file_exists($dir.'/'.$file)) + @unlink($dir.'/'.$file); + } + closedir($handle); + } + rmdir($dir); + } + + public function delete() + { + if (empty($this->iso_code)) + $this->iso_code = self::getIsoById($this->id); + + // Database translations deletion + $result = Db::getInstance()->executeS('SHOW TABLES FROM `'._DB_NAME_.'`'); + foreach ($result AS $row) + if (preg_match('/_lang/', $row['Tables_in_'._DB_NAME_])) + if (!Db::getInstance()->execute('DELETE FROM `'.$row['Tables_in_'._DB_NAME_].'` WHERE `id_lang` = '.(int)($this->id))) + return false; + + // Delete tags + Db::getInstance()->execute('DELETE FROM '._DB_PREFIX_.'tag WHERE id_lang = '.(int)($this->id)); + + // Delete search words + Db::getInstance()->execute('DELETE FROM '._DB_PREFIX_.'search_word WHERE id_lang = '.(int)($this->id)); + + // Files deletion + foreach (self::getFilesList($this->iso_code, _THEME_NAME_, false, false, false, true, true) as $key => $file) + if (file_exists($key)) + unlink($key); + $modList = scandir(_PS_MODULE_DIR_); + foreach ($modList as $mod) + { + self::recurseDeleteDir(_PS_MODULE_DIR_.$mod.'/mails/'.$this->iso_code); + $files = @scandir(_PS_MODULE_DIR_.$mod.'/mails/'); + if (count($files) <= 2) + self::recurseDeleteDir(_PS_MODULE_DIR_.$mod.'/mails/'); + + if(file_exists(_PS_MODULE_DIR_.$mod.'/'.$this->iso_code.'.php')) + { + unlink(_PS_MODULE_DIR_.$mod.'/'.$this->iso_code.'.php'); + $files = @scandir(_PS_MODULE_DIR_.$mod); + if (count($files) <= 2) + self::recurseDeleteDir(_PS_MODULE_DIR_.$mod); + } + } + + if (file_exists(_PS_MAIL_DIR_.$this->iso_code)) + self::recurseDeleteDir(_PS_MAIL_DIR_.$this->iso_code); + if (file_exists(_PS_TRANSLATIONS_DIR_.$this->iso_code)) + self::recurseDeleteDir(_PS_TRANSLATIONS_DIR_.$this->iso_code); + if (!parent::delete()) + return false; + + // delete images + $files_copy = array('/en.jpg', '/en-default-thickbox.jpg', '/en-default-home.jpg', '/en-default-large.jpg', '/en-default-medium.jpg', '/en-default-small.jpg', '/en-default-large_scene.jpg'); + $tos = array(_PS_CAT_IMG_DIR_, _PS_MANU_IMG_DIR_, _PS_PROD_IMG_DIR_, _PS_SUPP_IMG_DIR_); + foreach($tos AS $to) + foreach($files_copy AS $file) + { + $name = str_replace('/en', ''.$this->iso_code, $file); + + if (file_exists($to.$name)) + unlink($to.$name); + if (file_exists(dirname(__FILE__).'/../img/l/'.$this->id.'.jpg')) + unlink(dirname(__FILE__).'/../img/l/'.$this->id.'.jpg'); + } + + // If url_rewrite is not enabled, we don't need to regenerate .htaccess + if(!Configuration::get('PS_REWRITING_SETTINGS')) + return true; + + return Tools::generateHtaccess(dirname(__FILE__).'/../.htaccess', + (int)(Configuration::get('PS_REWRITING_SETTINGS')), + (int)(Configuration::get('PS_HTACCESS_CACHE_CONTROL')), + '' + ); + } + + + public function deleteSelection($selection) + { + if (!is_array($selection) OR !Validate::isTableOrIdentifier($this->identifier) OR !Validate::isTableOrIdentifier($this->table)) + die(Tools::displayError()); + $result = true; + foreach ($selection AS $id) + { + $this->id = (int)($id); + $result = $result AND $this->delete(); + } + + // If url_rewrite is not enabled, we don't need to regenerate .htaccess + if(!Configuration::get('PS_REWRITING_SETTINGS')) + return true; + + Tools::generateHtaccess(dirname(__FILE__).'/../.htaccess', + (int)(Configuration::get('PS_REWRITING_SETTINGS')), + (int)(Configuration::get('PS_HTACCESS_CACHE_CONTROL')), + '' + ); + + return $result; + } + + /** + * Return available languages + * + * @param boolean $active Select only active languages + * @return array Languages + */ + public static function getLanguages($active = true) + { + if(!self::$_LANGUAGES) + self::loadLanguages(); + + $languages = array(); + foreach (self::$_LANGUAGES AS $language) + { + if ($active AND !$language['active']) + continue; + $languages[] = $language; + } + return $languages; + } + + public static function getLanguage($id_lang) + { + if (!array_key_exists((int)($id_lang), self::$_LANGUAGES)) + return false; + return self::$_LANGUAGES[(int)($id_lang)]; + } + + /** + * Return iso code from id + * + * @param integer $id_lang Language ID + * @return string Iso code + */ + public static function getIsoById($id_lang) + { + if (isset(self::$_LANGUAGES[(int)$id_lang]['iso_code'])) + return self::$_LANGUAGES[(int)$id_lang]['iso_code']; + return false; + } + + /** + * Return id from iso code + * + * @param string $iso_code Iso code + * @return integer Language ID + */ + public static function getIdByIso($iso_code) + { + if (!Validate::isLanguageIsoCode($iso_code)) + die(Tools::displayError('Fatal error : iso code is not correct : ').$iso_code); + + return Db::getInstance()->getValue('SELECT `id_lang` FROM `'._DB_PREFIX_.'lang` WHERE `iso_code` = \''.pSQL(strtolower($iso_code)).'\''); + } + + public static function getLanguageCodeByIso($iso_code) + { + if (!Validate::isLanguageIsoCode($iso_code)) + die(Tools::displayError('Fatal error : iso code is not correct : ').$iso_code); + + return Db::getInstance()->getValue('SELECT `language_code` FROM `'._DB_PREFIX_.'lang` WHERE `iso_code` = \''.pSQL(strtolower($iso_code)).'\''); + } + + /** + * Return array (id_lang, iso_code) + * + * @param string $iso_code Iso code + * @return array Language (id_lang, iso_code) + */ + public static function getIsoIds($active = true) + { + return Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS('SELECT `id_lang`, `iso_code` FROM `'._DB_PREFIX_.'lang` '.($active ? 'WHERE active = 1' : '')); + } + + public static function copyLanguageData($from, $to) + { + $result = Db::getInstance()->executeS('SHOW TABLES FROM `'._DB_NAME_.'`'); + foreach ($result AS $row) + if (preg_match('/_lang/', $row['Tables_in_'._DB_NAME_]) AND $row['Tables_in_'._DB_NAME_] != _DB_PREFIX_.'lang') + { + $result2 = Db::getInstance()->executeS('SELECT * FROM `'.$row['Tables_in_'._DB_NAME_].'` WHERE `id_lang` = '.(int)($from)); + if (!sizeof($result2)) + continue; + Db::getInstance()->execute('DELETE FROM `'.$row['Tables_in_'._DB_NAME_].'` WHERE `id_lang` = '.(int)($to)); + $query = 'INSERT INTO `'.$row['Tables_in_'._DB_NAME_].'` VALUES '; + foreach ($result2 AS $row2) + { + $query .= '('; + $row2['id_lang'] = $to; + foreach ($row2 AS $field) + $query .= '\''.pSQL($field, true).'\','; + $query = rtrim($query, ',').'),'; + } + $query = rtrim($query, ','); + Db::getInstance()->execute($query); + } + return true; + } + + /** + * Load all languages in memory for caching + */ + public static function loadLanguages() + { + self::$_LANGUAGES = array(); + + $result = Db::getInstance()->executeS(' + SELECT `id_lang`, `name`, `iso_code`, `active` + FROM `'._DB_PREFIX_.'lang`'); + + foreach ($result AS $row) + self::$_LANGUAGES[(int)$row['id_lang']] = array('id_lang' => (int)$row['id_lang'], 'name' => $row['name'], 'iso_code' => $row['iso_code'], 'active' => (int)$row['active']); + } + + public function update($nullValues = false) + { + if (!parent::update($nullValues)) + return false; + + // If url_rewrite is not enabled, we don't need to regenerate .htaccess + if(!Configuration::get('PS_REWRITING_SETTINGS')) + return true; + + return Tools::generateHtaccess(dirname(__FILE__).'/../.htaccess', + (int)(Configuration::get('PS_REWRITING_SETTINGS')), + (int)(Configuration::get('PS_HTACCESS_CACHE_CONTROL')), + '' + ); + } + + public static function checkAndAddLanguage($iso_code) + { + if (Language::getIdByIso($iso_code)) + return true; + else + { + if(@fsockopen('www.prestashop.com', 80)) + { + $lang = new Language(); + $lang->iso_code = $iso_code; + $lang->active = true; + + if ($lang_pack = Tools::jsonDecode(Tools::file_get_contents('http://www.prestashop.com/download/lang_packs/get_language_pack.php?version='._PS_VERSION_.'&iso_lang='.$iso_code))) + { + if (isset($lang_pack->name) + && isset($lang_pack->version) + && isset($lang_pack->iso_code)) + $lang->name = $lang_pack->name; + } + if (!$lang->name OR !$lang->add()) + return false; + $insert_id = (int)($lang->id); + + if ($lang_pack) + { + $flag = Tools::file_get_contents('http://www.prestashop.com/download/lang_packs/flags/jpeg/'.$iso_code.'.jpg'); + if ($flag != NULL && !preg_match('//', $flag)) + { + $file = fopen(dirname(__FILE__).'/../img/l/'.$insert_id.'.jpg', 'w'); + if ($file) + { + fwrite($file, $flag); + fclose($file); + } + else + self::_copyNoneFlag($insert_id); + } + else + self::_copyNoneFlag($insert_id); + } + else + self::_copyNoneFlag($insert_id); + + $files_copy = array('/en.jpg', '/en-default-thickbox.jpg', '/en-default-home.jpg', '/en-default-large.jpg', '/en-default-medium.jpg', '/en-default-small.jpg', '/en-default-large_scene.jpg'); + $tos = array(_PS_CAT_IMG_DIR_, _PS_MANU_IMG_DIR_, _PS_PROD_IMG_DIR_, _PS_SUPP_IMG_DIR_); + foreach($tos AS $to) + foreach($files_copy AS $file) + { + $name = str_replace('/en', '/'.$iso_code, $file); + copy(dirname(__FILE__).'/../img/l'.$file, $to.$name); + } + return true; + } + else + return false; + } + } + + protected static function _copyNoneFlag($id) + { + return copy(dirname(__FILE__).'/../img/l/none.jpg', dirname(__FILE__).'/../img/l/'.$id.'.jpg'); + } + + private static $_cache_language_installation = null; + public static function isInstalled($iso_code) + { + if (self::$_cache_language_installation === null) + { + self::$_cache_language_installation = array(); + $result = Db::getInstance()->executeS('SELECT `id_lang`, `iso_code` FROM `'._DB_PREFIX_.'lang`'); + foreach ($result as $row) + self::$_cache_language_installation[$row['iso_code']] = $row['id_lang']; + } + return (isset(self::$_cache_language_installation[$iso_code]) ? self::$_cache_language_installation[$iso_code] : false); + } + + public static function countActiveLanguages() + { + if (!self::$countActiveLanguages) + self::$countActiveLanguages = Db::getInstance()->getValue('SELECT COUNT(*) FROM `'._DB_PREFIX_.'lang` WHERE `active` = 1'); + return self::$countActiveLanguages; + } +} + diff --git a/install-new/upgrade/classes/Module.php b/install-new/upgrade/classes/Module.php new file mode 100644 index 000000000..181bfa992 --- /dev/null +++ b/install-new/upgrade/classes/Module.php @@ -0,0 +1,1057 @@ + +* @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 +*/ + +abstract class Module +{ + /** @var integer Module ID */ + public $id = NULL; + + /** @var float Version */ + public $version; + + /** @var string Unique name */ + public $name; + + /** @var string Human name */ + public $displayName; + + /** @var string A little description of the module */ + public $description; + + /** @var string author of the module */ + public $author; + + /** @var int need_instance */ + public $need_instance = 1; + + /** @var string Admin tab correponding to the module */ + public $tab = NULL; + + /** @var boolean Status */ + public $active = false; + + /** @var array current language translations */ + protected $_lang = array(); + + /** @var string Module web path (eg. '/shop/modules/modulename/') */ + protected $_path = NULL; + + /** @var string Fill it if the module is installed but not yet set up */ + public $warning; + + /** @var string Message display before uninstall a module */ + public $beforeUninstall = NULL; + + public $_errors = false; + + protected $table = 'module'; + + protected $identifier = 'id_module'; + + static public $_db; + + /** @var array to store the limited country */ + public $limited_countries = array(); + + /** + * Constructor + * + * @param string $name Module unique name + */ + protected static $modulesCache; + protected static $_hookModulesCache; + + protected static $_INSTANCE = array(); + + protected static $_generateConfigXmlMode = false; + + protected static $l_cache = array(); + + /** + * @var array used by AdminTab to determine which lang file to use (admin.php or module lang file) + */ + public static $classInModule = array(); + + public function __construct($name = NULL) + { + if ($this->name == NULL) + $this->name = $this->id; + if ($this->name != NULL) + { + if (self::$modulesCache == NULL AND !is_array(self::$modulesCache)) + { + self::$modulesCache = array(); + $result = Db::getInstance()->executeS('SELECT * FROM `'.pSQL(_DB_PREFIX_.$this->table).'`'); + foreach ($result as $row) + self::$modulesCache[$row['name']] = $row; + } + if (isset(self::$modulesCache[$this->name])) + { + $this->active = true; + $this->id = self::$modulesCache[$this->name]['id_module']; + foreach (self::$modulesCache[$this->name] AS $key => $value) + if (key_exists($key, $this)) + $this->{$key} = $value; + $this->_path = __PS_BASE_URI__.'modules/'.$this->name.'/'; + } + } + } + + /** + * Insert module into datable + */ + public function install() + { + if (!Validate::isModuleName($this->name)) + die(Tools::displayError()); + $result = Db::getInstance()->getRow(' + SELECT `id_module` + FROM `'._DB_PREFIX_.'module` + WHERE `name` = \''.pSQL($this->name).'\''); + if ($result) + return false; + $result = Db::getInstance()->AutoExecute(_DB_PREFIX_.$this->table, array('name' => $this->name, 'active' => 1), 'INSERT'); + if (!$result) + return false; + $this->id = Db::getInstance()->Insert_ID(); + return true; + } + + /** + * Delete module from datable + * + * @return boolean result + */ + public function uninstall() + { + if (!Validate::isUnsignedId($this->id)) + return false; + $result = Db::getInstance()->executeS(' + SELECT `id_hook` + FROM `'._DB_PREFIX_.'hook_module` hm + WHERE `id_module` = '.(int)($this->id)); + foreach ($result AS $row) + { + Db::getInstance()->execute(' + DELETE FROM `'._DB_PREFIX_.'hook_module` + WHERE `id_module` = '.(int)($this->id).' + AND `id_hook` = '.(int)($row['id_hook'])); + $this->cleanPositions($row['id_hook']); + } + return Db::getInstance()->execute(' + DELETE FROM `'._DB_PREFIX_.'module` + WHERE `id_module` = '.(int)($this->id)); + } + + /** + * This function enable module $name. If an $name is an array, + * this will enable all of them + * + * @param array|string $name + * @return true if succeed + * @since 1.4.1 + */ + public static function enableByName($name) + { + if (!is_array($name)) + $name = array($name); + + foreach ($name as $k=>$v) + $name[$k] = '"'.pSQL($v).'"'; + + return Db::getInstance()->execute(' + UPDATE `'._DB_PREFIX_.'module` + SET `active`= 1 + WHERE `name` IN ('.implode(',',$name).')'); + } + /** + * Called when module is set to active + */ + public function enable() + { + return Db::getInstance()->execute(' + UPDATE `'._DB_PREFIX_.'module` + SET `active`= 1 + WHERE `name` = \''.pSQL($this->name).'\''); + } + + /** + * This function disable module $name. If an $name is an array, + * this will disable all of them + * + * @param array|string $name + * @return true if succeed + * @since 1.4.1 + */ + public static function disableByName($name) + { + if (!is_array($name)) + $name = array($name); + + foreach ($name as $k=>$v) + $name[$k] = '"'.pSQL($v).'"'; + + return Db::getInstance()->execute(' + UPDATE `'._DB_PREFIX_.'module` + SET `active`= 0 + WHERE `name` IN ('.implode(',',$name).')'); + } + + /** + * Called when module is set to deactive + */ + public function disable() + { + return Module::disableByName($this->name); + } + + /** + * Connect module to a hook + * + * @param string $hook_name Hook name + * @return boolean result + */ + public function registerHook($hook_name) + { + if (!Validate::isHookName($hook_name)) + die(Tools::displayError()); + if (!isset($this->id) OR !is_numeric($this->id)) + return false; + + // Check if already register + $result = Db::getInstance()->getRow(' + SELECT hm.`id_module` FROM `'._DB_PREFIX_.'hook_module` hm, `'._DB_PREFIX_.'hook` h + WHERE hm.`id_module` = '.(int)($this->id).' + AND h.`name` = \''.pSQL($hook_name).'\' + AND h.`id_hook` = hm.`id_hook`'); + if ($result) + return true; + + // Get hook id + $result = Db::getInstance()->getRow(' + SELECT `id_hook` + FROM `'._DB_PREFIX_.'hook` + WHERE `name` = \''.pSQL($hook_name).'\''); + if (!isset($result['id_hook'])) + return false; + + // Get module position in hook + $result2 = Db::getInstance()->getRow(' + SELECT MAX(`position`) AS position + FROM `'._DB_PREFIX_.'hook_module` + WHERE `id_hook` = '.(int)($result['id_hook'])); + if (!$result2) + return false; + + // Register module in hook + $return = Db::getInstance()->execute(' + INSERT INTO `'._DB_PREFIX_.'hook_module` (`id_module`, `id_hook`, `position`) + VALUES ('.(int)($this->id).', '.(int)($result['id_hook']).', '.(int)($result2['position'] + 1).')'); + + $this->cleanPositions((int)($result['id_hook'])); + + return $return; + } + + /** + * Display flags in forms for translations + * + * @param array $languages All languages available + * @param integer $defaultLanguage Default language id + * @param string $ids Multilingual div ids in form + * @param string $id Current div id] + * #param boolean $return define the return way : false for a display, true for a return + */ + public function displayFlags($languages, $defaultLanguage, $ids, $id, $return = false) + { + if (sizeof($languages) == 1) + return false; + $output = ' +
    + +
    +
    + '.$this->l('Choose language:').'

    '; + foreach ($languages as $language) + $output .= ''.$language['name'].' '; + $output .= '
    '; + + if ($return) + return $output; + echo $output; + } + + /** + * Unregister module from hook + * + * @param int $id_hook Hook id + * @return boolean result + */ + public function unregisterHook($hook_id) + { + return Db::getInstance()->execute(' + DELETE + FROM `'._DB_PREFIX_.'hook_module` + WHERE `id_module` = '.(int)($this->id).' + AND `id_hook` = '.(int)($hook_id)); + } + + /** + * Unregister exceptions linked to module + * + * @param int $id_hook Hook id + * @return boolean result + */ + public function unregisterExceptions($hook_id) + { + return Db::getInstance()->execute(' + DELETE + FROM `'._DB_PREFIX_.'hook_module_exceptions` + WHERE `id_module` = '.(int)($this->id).' + AND `id_hook` = '.(int)($hook_id)); + } + + /** + * Add exceptions for module->Hook + * + * @param int $id_hook Hook id + * @param array $excepts List of file name + * @return boolean result + */ + public function registerExceptions($id_hook, $excepts) + { + foreach ($excepts AS $except) + { + if (!empty($except)) + { + $result = Db::getInstance()->execute(' + INSERT INTO `'._DB_PREFIX_.'hook_module_exceptions` (`id_module`, `id_hook`, `file_name`) + VALUES ('.(int)($this->id).', '.(int)($id_hook).', \''.pSQL(strval($except)).'\')'); + if (!$result) + return false; + } + } + return true; + } + + public function editExceptions($id_hook, $excepts) + { + // Cleaning... + Db::getInstance()->execute(' + DELETE FROM `'._DB_PREFIX_.'hook_module_exceptions` + WHERE `id_module` = '.(int)($this->id).' AND `id_hook` ='.(int)($id_hook)); + return $this->registerExceptions($id_hook, $excepts); + } + + + /** + * This function is used to determine the module name + * of an AdminTab which belongs to a module, in order to keep translation + * related to a module in its directory (instead of $_LANGADM) + * + * @param mixed $currentClass the + * @return boolean|string if the class belongs to a module, will return the module name. Otherwise, return false. + */ + public static function getModuleNameFromClass($currentClass) + { + // Module can now define AdminTab keeping the module translations method, + // i.e. in modules/[module name]/[iso_code].php + if (!isset(self::$classInModule[$currentClass])) + { + global $_MODULES; + $_MODULE = array(); + $reflectionClass = new ReflectionClass($currentClass); + $filePath = realpath($reflectionClass->getFileName()); + $realpathModuleDir = realpath(_PS_MODULE_DIR_); + if (substr(realpath($filePath), 0, strlen($realpathModuleDir)) == $realpathModuleDir) + { + self::$classInModule[$currentClass] = substr(dirname($filePath), strlen($realpathModuleDir)+1); + + $id_lang = (!isset($cookie) OR !is_object($cookie)) ? (int)(Configuration::get('PS_LANG_DEFAULT')) : (int)($cookie->id_lang); + $file = _PS_MODULE_DIR_.self::$classInModule[$currentClass].'/'.Language::getIsoById($id_lang).'.php'; + if (Tools::file_exists_cache($file) AND include_once($file)) + $_MODULES = !empty($_MODULES) ? array_merge($_MODULES, $_MODULE) : $_MODULE; + } + else + self::$classInModule[$currentClass] = false; + } + // return name of the module, or false + return self::$classInModule[$currentClass]; + } + + /** + * Return an instance of the specified module + * + * @param string $moduleName Module name + * @return Module instance + */ + static public function getInstanceByName($moduleName) + { + if (!Tools::file_exists_cache(_PS_MODULE_DIR_.$moduleName.'/'.$moduleName.'.php')) + return false; + include_once(_PS_MODULE_DIR_.$moduleName.'/'.$moduleName.'.php'); + if (!class_exists($moduleName, false)) + return false; + + if (!isset(self::$_INSTANCE[$moduleName])) + self::$_INSTANCE[$moduleName] = new $moduleName; + return self::$_INSTANCE[$moduleName]; + } + + /** + * Load modules Ids from Ids + * + * @param array|int $ids Modules ID + * @return Array of module name + */ + static public function preloadModuleNameFromId($ids) + { + static $preloadedModuleNameFromId; + if(!isset($preloadedModuleNameFromId)) { + $preloadedModuleNameFromId = array(); + } + + if(is_array($ids)) + { + foreach($ids as $id) + $preloadedModuleNameFromId[$id] = false; + + $results = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' + SELECT `name`,`id_module` + FROM `'._DB_PREFIX_.'module` + WHERE `id_module` IN ('.join(',',$ids) .');'); + foreach($results as $result) + $preloadedModuleNameFromId[$result['id_module']] = $result['name']; + } + elseif(!isset($preloadedModuleNameFromId[$ids])) + { + $result = Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow(' + SELECT `name` + FROM `'._DB_PREFIX_.'module` + WHERE `id_module` = '.(int)($ids)); + if($result) + $preloadedModuleNameFromId[$ids] = $result['name']; + else + $preloadedModuleNameFromId[$ids] = false; + } + + + if(is_array($ids)) { + return $preloadedModuleNameFromId; + } else { + if(!isset($preloadedModuleNameFromId[$ids])) + return false; + return $preloadedModuleNameFromId[$ids]; + } + } + + /** + * Return an instance of the specified module + * + * @param integer $id_module Module ID + * @return Module instance + */ + static public function getInstanceById($id_module) + { + $moduleName = Module::preloadModuleNameFromId($id_module); + return ($moduleName ? Module::getInstanceByName($moduleName) : false); + } + + /** + * Return available modules + * + * @param boolean $useConfig in order to use config.xml file in module dir + * @return array Modules + */ + public static function getModulesOnDisk($useConfig = false) + { + global $cookie, $_MODULES; + + $moduleList = array(); + $moduleListCursor = 0; + $moduleNameList = array(); + $modulesNameToCursor = array(); + $errors = array(); + $modules_dir = self::getModulesDirOnDisk(); + foreach ($modules_dir AS $module) + { + $configFile = _PS_MODULE_DIR_.$module.'/config.xml'; + $xml_exist = file_exists($configFile); + if ($xml_exist) + $needNewConfigFile = (filemtime($configFile) < filemtime(_PS_MODULE_DIR_.$module.'/'.$module.'.php')); + else + $needNewConfigFile = true; + if ($useConfig AND $xml_exist) + { + libxml_use_internal_errors(true); + $xml_module = simplexml_load_file($configFile); + foreach (libxml_get_errors() as $error) + $errors[] = '['.$module.'] '.Tools::displayError('Error found in config file:').' '.htmlentities($error->message); + libxml_clear_errors(); + + if (!count($errors) AND (int)$xml_module->need_instance == 0 AND !$needNewConfigFile) + { + $file = _PS_MODULE_DIR_.$module.'/'.Language::getIsoById($cookie->id_lang).'.php'; + if (Tools::file_exists_cache($file) AND include_once($file)) + if(isset($_MODULE) AND is_array($_MODULE)) + $_MODULES = !empty($_MODULES) ? array_merge($_MODULES, $_MODULE) : $_MODULE; + + $xml_module->displayName = Module::findTranslation($xml_module->name, $xml_module->displayName, (string)$xml_module->name); + $xml_module->description = Module::findTranslation($xml_module->name, $xml_module->description, (string)$xml_module->name); + $xml_module->author = Module::findTranslation($xml_module->name, $xml_module->author, (string)$xml_module->name); + + if(isset($xml_module->confirmUninstall)) + $xml_module->confirmUninstall = Module::findTranslation($xml_module->name, $xml_module->confirmUninstall, (string)$xml_module->name); + + + $moduleList[$moduleListCursor] = $xml_module; + $moduleNameList[$moduleListCursor] = '\''.strval($xml_module->name).'\''; + $modulesNameToCursor[strval($xml_module->name)] = $moduleListCursor; + $moduleListCursor++; + } + } + if (!$useConfig OR !$xml_exist OR (isset($xml_module->need_instance) AND (int)$xml_module->need_instance == 1) OR $needNewConfigFile) + { + $file = trim(file_get_contents(_PS_MODULE_DIR_.$module.'/'.$module.'.php')); + if (substr($file, 0, 5) == '') + $file = substr($file, 0, -2); + if (class_exists($module, false) OR eval($file) !== false) + { + $moduleList[$moduleListCursor++] = new $module; + if (!$xml_exist OR $needNewConfigFile) + { + self::$_generateConfigXmlMode = true; + $tmpModule = new $module; + $tmpModule->_generateConfigXml(); + self::$_generateConfigXmlMode = false; + } + } + else + $errors[] = $module; + } + } + + // Get modules information from database + if(!empty($moduleNameList)) + { + $results = Db::getInstance()->executeS('SELECT `id_module`, `active`, `name` FROM `'._DB_PREFIX_.'module` WHERE `name` IN ('.join(',',$moduleNameList).')'); + foreach($results as $result) + { + $moduleCursor = $modulesNameToCursor[$result['name']]; + if (isset($result['active']) AND $result['active']) + $moduleList[$moduleCursor]->active = $result['active']; + if (isset($result['id_module']) AND $result['id_module']) + $moduleList[$moduleCursor]->id = $result['id_module']; + } + } + + if (sizeof($errors)) + { + echo '

    '.Tools::displayError('Parse error(s) in module(s)').'

      '; + foreach ($errors AS $error) + echo '
    1. '.$error.'
    2. '; + echo '
    '; + } + + return $moduleList; + } + + public static function getModulesDirOnDisk() + { + $moduleList = array(); + $modules = scandir(_PS_MODULE_DIR_); + foreach ($modules AS $name) + { + if (Tools::file_exists_cache(_PS_MODULE_DIR_.$name.'/'.$name.'.php')) + { + if (!Validate::isModuleName($name)) + die(Tools::displayError().' (Module '.$name.')'); + $moduleList[] = $name; + } + } + return $moduleList; + } + + /** + * Return non native module + * + * @param int $position Take only positionnables modules + * @return array Modules + */ + public static function getNonNativeModuleList() + { + $db = Db::getInstance(); + + $module_list_xml = _PS_ROOT_DIR_.DIRECTORY_SEPARATOR.'config'.DIRECTORY_SEPARATOR.'modules_list.xml'; + $nativeModules = simplexml_load_file($module_list_xml); + $nativeModules = $nativeModules->modules; + foreach ($nativeModules as $nativeModulesType) + if (in_array($nativeModulesType['type'],array('native','partner'))) + { + $arrNativeModules[] = '""'; + foreach ($nativeModulesType->module as $module) + $arrNativeModules[] = '"'.pSQL($module['name']).'"'; + } + + return $db->executeS(' + SELECT * + FROM `'._DB_PREFIX_.'module` m + WHERE name NOT IN ('.implode(',',$arrNativeModules).') '); + } + + /** + * Return installed modules + * + * @param int $position Take only positionnables modules + * @return array Modules + */ + public static function getModulesInstalled($position = 0) + { + return Db::getInstance()->executeS(' + SELECT * + FROM `'._DB_PREFIX_.'module` m + '.($position ? ' + LEFT JOIN `'._DB_PREFIX_.'hook_module` hm ON m.`id_module` = hm.`id_module` + LEFT JOIN `'._DB_PREFIX_.'hook` k ON hm.`id_hook` = k.`id_hook` + WHERE k.`position` = 1' : '')); + } + + /* + * Execute modules for specified hook + * + * @param string $hook_name Hook Name + * @param array $hookArgs Parameters for the functions + * @return string modules output + */ + public static function hookExec($hook_name, $hookArgs = array(), $id_module = NULL) + { + global $cookie; + if ((!empty($id_module) AND !Validate::isUnsignedId($id_module)) OR !Validate::isHookName($hook_name)) + die(Tools::displayError()); + + global $cart, $cookie; + $live_edit = false; + if (!isset($hookArgs['cookie']) OR !$hookArgs['cookie']) + $hookArgs['cookie'] = $cookie; + if (!isset($hookArgs['cart']) OR !$hookArgs['cart']) + $hookArgs['cart'] = $cart; + $hook_name = strtolower($hook_name); + + if (!isset(self::$_hookModulesCache)) + { + $db = Db::getInstance(_PS_USE_SQL_SLAVE_); + $result = $db->executeS(' + SELECT h.`name` as hook, m.`id_module`, h.`id_hook`, m.`name` as module, h.`live_edit` + FROM `'._DB_PREFIX_.'module` m + LEFT JOIN `'._DB_PREFIX_.'hook_module` hm ON hm.`id_module` = m.`id_module` + LEFT JOIN `'._DB_PREFIX_.'hook` h ON hm.`id_hook` = h.`id_hook` + AND m.`active` = 1 + ORDER BY hm.`position`', false); + self::$_hookModulesCache = array(); + + if ($result) + while ($row = $db->nextRow()) + { + $row['hook'] = strtolower($row['hook']); + if (!isset(self::$_hookModulesCache[$row['hook']])) + self::$_hookModulesCache[$row['hook']] = array(); + self::$_hookModulesCache[$row['hook']][] = array('id_hook' => $row['id_hook'], 'module' => $row['module'], 'id_module' => $row['id_module'], 'live_edit' => $row['live_edit']); + } + } + + if (!isset(self::$_hookModulesCache[$hook_name])) + return; + + $altern = 0; + $output = ''; + foreach (self::$_hookModulesCache[$hook_name] AS $array) + { + if ($id_module AND $id_module != $array['id_module']) + continue; + if (!($moduleInstance = Module::getInstanceByName($array['module']))) + continue; + + $exceptions = $moduleInstance->getExceptions((int)$array['id_hook'], (int)$array['id_module']); + foreach ($exceptions AS $exception) + if (strstr(basename($_SERVER['PHP_SELF']).'?'.$_SERVER['QUERY_STRING'], $exception['file_name']) && !strstr($_SERVER['QUERY_STRING'], $exception['file_name'])) + continue 2; + + if (is_callable(array($moduleInstance, 'hook'.$hook_name))) + { + $hookArgs['altern'] = ++$altern; + + $display = call_user_func(array($moduleInstance, 'hook'.$hook_name), $hookArgs); + if ($array['live_edit'] && ((Tools::isSubmit('live_edit') AND Tools::getValue('ad') AND (Tools::getValue('liveToken') == sha1(Tools::getValue('ad')._COOKIE_KEY_))))) + { + $live_edit = true; + $output .= ' +
    + ' + .$moduleInstance->displayName.' + + + + + '.$display.'
    '; + } + else + $output .= $display; + } + } + return ($live_edit ? '
    ' : '').$output.($live_edit ? '
    ' : ''); + } + + public static function hookExecPayment() + { + global $cart, $cookie; + $hookArgs = array('cookie' => $cookie, 'cart' => $cart); + $id_customer = (int)($cookie->id_customer); + $billing = new Address((int)($cart->id_address_invoice)); + $output = ''; + + $result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' + SELECT DISTINCT h.`id_hook`, m.`name`, hm.`position` + FROM `'._DB_PREFIX_.'module_country` mc + LEFT JOIN `'._DB_PREFIX_.'module` m ON m.`id_module` = mc.`id_module` + INNER JOIN `'._DB_PREFIX_.'module_group` mg ON (m.`id_module` = mg.`id_module`) + INNER JOIN `'._DB_PREFIX_.'customer_group` cg on (cg.`id_group` = mg.`id_group` AND cg.`id_customer` = '.(int)($id_customer).') + LEFT JOIN `'._DB_PREFIX_.'hook_module` hm ON hm.`id_module` = m.`id_module` + LEFT JOIN `'._DB_PREFIX_.'hook` h ON hm.`id_hook` = h.`id_hook` + WHERE h.`name` = \'payment\' + AND mc.id_country = '.(int)($billing->id_country).' + AND m.`active` = 1 + ORDER BY hm.`position`, m.`name` DESC'); + 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; + } + + /** + * find translation from $_MODULES and put it in self::$l_cache if not already exist + * and return it. + * + * @param string $name name of the module + * @param string $string term to find + * @param string $source additional param for building translation key + * @return string + */ + public static function findTranslation($name, $string, $source) + { + global $_MODULES; + + $cache_key = $name . '|' . $string . '|' . $source; + + if (!isset(self::$l_cache[$cache_key])) + { + if (!is_array($_MODULES)) + return str_replace('"', '"', $string); + // set array key to lowercase for 1.3 compatibility + $_MODULES = array_change_key_case($_MODULES); + $currentKey = '<{'.strtolower($name).'}'.strtolower(_THEME_NAME_).'>'.strtolower($source).'_'.md5($string); + $defaultKey = '<{'.strtolower($name).'}prestashop>'.strtolower($source).'_'.md5($string); + + if (isset($_MODULES[$currentKey])) + $ret = stripslashes($_MODULES[$currentKey]); + elseif (isset($_MODULES[Tools::strtolower($currentKey)])) + $ret = stripslashes($_MODULES[Tools::strtolower($currentKey)]); + elseif (isset($_MODULES[$defaultKey])) + $ret = stripslashes($_MODULES[$defaultKey]); + elseif (isset($_MODULES[Tools::strtolower($defaultKey)])) + $ret = stripslashes($_MODULES[Tools::strtolower($defaultKey)]); + else + $ret = stripslashes($string); + + self::$l_cache[$cache_key] = str_replace('"', '"', $ret); + } + return self::$l_cache[$cache_key]; + } + /** + * Get translation for a given module text + * + * Note: $specific parameter is mandatory for library files. + * Otherwise, translation key will not match for Module library + * when module is loaded with eval() Module::getModulesOnDisk() + * + * @param string $string String to translate + * @param boolean|string $specific filename to use in translation key + * @return string Translation + */ + public function l($string, $specific = false) + { + if (self::$_generateConfigXmlMode) + return $string; + + global $_MODULES, $_MODULE, $cookie; + + $id_lang = (!isset($cookie) OR !is_object($cookie)) ? (int)(Configuration::get('PS_LANG_DEFAULT')) : (int)($cookie->id_lang); + $file = _PS_MODULE_DIR_.$this->name.'/'.Language::getIsoById($id_lang).'.php'; + if (Tools::file_exists_cache($file) AND include_once($file)) + $_MODULES = !empty($_MODULES) ? array_merge($_MODULES, $_MODULE) : $_MODULE; + + $source = $specific ? $specific : $this->name; + $string = str_replace('\'', '\\\'', $string); + $ret = $this->findTranslation($this->name, $string, $source); + return $ret; + } + + /* + * Reposition module + * + * @param boolean $id_hook Hook ID + * @param boolean $way Up (1) or Down (0) + * @param intger $position + */ + public function updatePosition($id_hook, $way, $position = NULL) + { + if (!$res = Db::getInstance()->executeS(' + SELECT hm.`id_module`, hm.`position`, hm.`id_hook` + FROM `'._DB_PREFIX_.'hook_module` hm + WHERE hm.`id_hook` = '.(int)($id_hook).' + ORDER BY hm.`position` '.((int)($way) ? 'ASC' : 'DESC'))) + return false; + foreach ($res AS $key => $values) + if ((int)($values[$this->identifier]) == (int)($this->id)) + { + $k = $key ; + break ; + } + if (!isset($k) OR !isset($res[$k]) OR !isset($res[$k + 1])) + return false; + $from = $res[$k]; + $to = $res[$k + 1]; + + if (isset($position) and !empty($position)) + $to['position'] = (int)($position); + + return (Db::getInstance()->execute(' + UPDATE `'._DB_PREFIX_.'hook_module` + SET `position`= position '.($way ? '-1' : '+1').' + WHERE position between '.(int)(min(array($from['position'], $to['position']))) .' AND '.(int)(max(array($from['position'], $to['position']))).' + AND `id_hook`='.(int)($from['id_hook'])) + AND + Db::getInstance()->execute(' + UPDATE `'._DB_PREFIX_.'hook_module` + SET `position`='.(int)($to['position']).' + WHERE `'.pSQL($this->identifier).'` = '.(int)($from[$this->identifier]).' AND `id_hook`='.(int)($to['id_hook'])) + ); + } + + /* + * Reorder modules position + * + * @param boolean $id_hook Hook ID + */ + public function cleanPositions($id_hook) + { + $result = Db::getInstance()->executeS(' + SELECT `id_module` + FROM `'._DB_PREFIX_.'hook_module` + WHERE `id_hook` = '.(int)($id_hook).' + ORDER BY `position`'); + $sizeof = sizeof($result); + for ($i = 0; $i < $sizeof; ++$i) + Db::getInstance()->execute(' + UPDATE `'._DB_PREFIX_.'hook_module` + SET `position` = '.(int)($i + 1).' + WHERE `id_hook` = '.(int)($id_hook).' + AND `id_module` = '.(int)($result[$i]['id_module'])); + return true; + } + + /* + * Return module position for a given hook + * + * @param boolean $id_hook Hook ID + * @return integer position + */ + public function getPosition($id_hook) + { + if(isset(Hook::$preloadModulesFromHooks)) + if(isset(Hook::$preloadModulesFromHooks[$id_hook])) + if(isset(Hook::$preloadModulesFromHooks[$id_hook]['module_position'][$this->id])) + return Hook::$preloadModulesFromHooks[$id_hook]['module_position'][$this->id]; + else + return 0; + $result = Db::getInstance()->getRow(' + SELECT `position` + FROM `'._DB_PREFIX_.'hook_module` + WHERE `id_hook` = '.(int)($id_hook).' + AND `id_module` = '.(int)($this->id)); + return $result['position']; + } + + public function displayError($error) + { + $output = ' +
    + '.$error.' +
    '; + $this->error = true; + return $output; + } + + public function displayConfirmation($string) + { + $output = ' +
    + '.$string.' +
    '; + return $output; + } + + /* + * Return exceptions for module in hook + * + * @param int $id_hook Hook ID + * @return array Exceptions + */ + protected static $exceptionsCache = NULL; + public function getExceptions($id_hook) + { + if (self::$exceptionsCache == NULL AND !is_array(self::$exceptionsCache)) + { + self::$exceptionsCache = array(); + $result = Db::getInstance()->executeS(' + SELECT CONCAT(id_hook, \'-\', id_module) as `key`, `file_name` as value + FROM `'._DB_PREFIX_.'hook_module_exceptions`'); + foreach ($result as $row) + { + if (empty($row['value'])) + continue; + if (!array_key_exists($row['key'], self::$exceptionsCache)) + self::$exceptionsCache[$row['key']] = array(); + self::$exceptionsCache[$row['key']][] = array('file_name' => $row['value']); + } + } + return (array_key_exists((int)($id_hook).'-'.(int)($this->id), self::$exceptionsCache) ? self::$exceptionsCache[(int)($id_hook).'-'.(int)($this->id)] : array()); + } + + public static function isInstalled($moduleName) + { + Db::getInstance()->executeS('SELECT `id_module` FROM `'._DB_PREFIX_.'module` WHERE `name` = \''.pSQL($moduleName).'\''); + return (bool)Db::getInstance()->NumRows(); + } + + public function isRegisteredInHook($hook) + { + if (!$this->id) + return false; + + return Db::getInstance()->getValue(' + SELECT COUNT(*) + FROM `'._DB_PREFIX_.'hook_module` hm + LEFT JOIN `'._DB_PREFIX_.'hook` h ON (h.`id_hook` = hm.`id_hook`) + WHERE h.`name` = \''.pSQL($hook).'\' + AND hm.`id_module` = '.(int)($this->id) + ); + } + + /* + ** Template management (display, overload, cache) + */ + protected static function _isTemplateOverloadedStatic($moduleName, $template) + { + if (Tools::file_exists_cache(_PS_THEME_DIR_.'modules/'.$moduleName.'/'.$template)) + return true; + elseif (Tools::file_exists_cache(_PS_MODULE_DIR_.$moduleName.'/'.$template)) + return false; + return NULL; + } + + protected function _isTemplateOverloaded($template) + { + return self::_isTemplateOverloadedStatic($this->name, $template); + } + + public static function display($file, $template, $cacheId = NULL, $compileId = NULL) + { + global $smarty; + + $smarty->assign('module_dir', __PS_BASE_URI__.'modules/'.basename($file, '.php').'/'); + if (($overloaded = self::_isTemplateOverloadedStatic(basename($file, '.php'), $template)) === NULL) + $result = Tools::displayError('No template found for module').' '.basename($file,'.php'); + else + { + $smarty->assign('module_template_dir', ($overloaded ? _THEME_DIR_ : __PS_BASE_URI__).'modules/'.basename($file, '.php').'/'); + $result = $smarty->fetch(($overloaded ? _PS_THEME_DIR_.'modules/'.basename($file, '.php') : _PS_MODULE_DIR_.basename($file, '.php')).'/'.$template, $cacheId, $compileId); + } + return $result; + } + + protected function _getApplicableTemplateDir($template) + { + return $this->_isTemplateOverloaded($template) ? _PS_THEME_DIR_ : _PS_MODULE_DIR_.$this->name.'/'; + } + + public function isCached($template, $cacheId = NULL, $compileId = NULL) + { + global $smarty; + + return $smarty->isCached($this->_getApplicableTemplateDir($template).$template, $cacheId, $compileId); + } + + protected function _clearCache($template, $cacheId = NULL, $compileId = NULL) + { + global $smarty; + + return $smarty->clearCache($template ? $this->_getApplicableTemplateDir($template).$template : NULL, $cacheId, $compileId); + } + + protected function _generateConfigXml() + { + $xml = ' + + '.$this->name.' + displayName).']]> + version.']]> + description).']]> + author).']]> + tab).']]>'.(isset($this->confirmUninstall) ? "\n\t".''.$this->confirmUninstall.'' : '').' + '.(int)method_exists($this, 'getContent').' + '.(int)$this->need_instance.''.(isset($this->limited_countries) ? "\n\t".''.(sizeof($this->limited_countries) == 1 ? $this->limited_countries[0] : '').'' : '').' +'; + if (is_writable(_PS_MODULE_DIR_.$this->name.'/')) + file_put_contents(_PS_MODULE_DIR_.$this->name.'/config.xml', utf8_encode($xml)); + } + + /** + * @param string $hook_name + * @return bool if module can be transplanted on hook + */ + public function isHookableOn($hook_name) + { + return is_callable(array($this, 'hook'.ucfirst($hook_name))); + } +} + diff --git a/install-new/upgrade/classes/ToolsInstall.php b/install-new/upgrade/classes/ToolsInstall.php new file mode 100644 index 000000000..a46753a3a --- /dev/null +++ b/install-new/upgrade/classes/ToolsInstall.php @@ -0,0 +1,208 @@ + +* @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 ToolsInstall +{ + /** + * checkDB will call to the + * + * @param string $srv + * @param string $login + * @param string $password + * @param string $name + * @param string $posted + * @return void + */ + public static function checkDB ($srv, $login, $password, $name, $posted = true) + { + // Don't include theses files if classes are already defined + if (!class_exists('Validate', false)) + { + include_once(INSTALL_PATH.'/../classes/Validate.php'); + eval('class Validate extends ValidateCore{}'); + } + + if (!class_exists('Db', false)) + { + include_once(INSTALL_PATH.'/../classes/db/Db.php'); + eval('abstract class Db extends DbCore{}'); + } + + if (!class_exists('MySQL', false)) + { + include_once(INSTALL_PATH.'/../classes/db/MySQL.php'); + eval('class MySQL extends MySQLCore{}'); + } + + if ($posted) + { + // Check POST data... + $data_check = array( + !isset($_GET['server']) OR empty($_GET['server']) OR !Validate::isUrl($_GET['server']), + !isset($_GET['engine']) OR empty($_GET['engine']) OR !Validate::isMySQLEngine($_GET['engine']), + !isset($_GET['name']) OR empty($_GET['name']) OR !Validate::isUnixName($_GET['name']), + !isset($_GET['login']) OR empty($_GET['login']) OR !Validate::isUnixName($_GET['login']), + !isset($_GET['password']), + (!isset($_GET['tablePrefix']) OR !Validate::isTablePrefix($_GET['tablePrefix'])) && !empty($_GET['tablePrefix']), + ); + + foreach ($data_check AS $data) + if ($data) + return 8; + } + + switch (Db::checkConnection(trim($srv), trim($login), trim($password), trim($name))) + { + case 0: + if (Db::checkEncoding(trim($srv), trim($login), trim($password))) + return true; + return 49; + break; + case 1: + return 25; + break; + case 2: + return 24; + break; + case 3: + return 50; + break; + } + } + + public static function getHttpHost($http = false, $entities = false, $ignore_port = false) + { + $host = (isset($_SERVER['HTTP_X_FORWARDED_HOST']) ? $_SERVER['HTTP_X_FORWARDED_HOST'] : $_SERVER['HTTP_HOST']); + if ($ignore_port && $pos = strpos($host, ':')) + $host = substr($host, 0, $pos); + if ($entities) + $host = htmlspecialchars($host, ENT_COMPAT, 'UTF-8'); + if ($http) + $host = 'http://'.$host; + return $host; + } + + public static function sendMail($smtpChecked, $smtpServer, $content, $subject, $type, $to, $from, $smtpLogin, $smtpPassword, $smtpPort = 25, $smtpEncryption) + { + require_once(INSTALL_PATH.'/../tools/swift/Swift.php'); + require_once(INSTALL_PATH.'/../tools/swift/Swift/Connection/SMTP.php'); + require_once(INSTALL_PATH.'/../tools/swift/Swift/Connection/NativeMail.php'); + + $swift = NULL; + $result = NULL; + try + { + if($smtpChecked) + { + + $smtp = new Swift_Connection_SMTP($smtpServer, $smtpPort, ($smtpEncryption == "off") ? Swift_Connection_SMTP::ENC_OFF : (($smtpEncryption == "tls") ? Swift_Connection_SMTP::ENC_TLS : Swift_Connection_SMTP::ENC_SSL)); + $smtp->setUsername($smtpLogin); + $smtp->setpassword($smtpPassword); + $smtp->setTimeout(5); + $swift = new Swift($smtp); + } + else + $swift = new Swift(new Swift_Connection_NativeMail()); + + $message = new Swift_Message($subject, $content, $type); + + if ($swift->send($message, $to, $from)) + $result = true; + else + $result = 999; + + $swift->disconnect(); + } + catch (Swift_Connection_Exception $e) + { + $result = $e->getCode(); + } + catch (Swift_Message_MimeException $e) + { + $result = $e->getCode(); + } + return $result; + } + + public static function getNotificationMail($shopName, $shopUrl, $shopLogo, $firstname, $lastname, $password, $email) + { + $iso_code = $_GET['isoCodeLocalLanguage']; + $pathTpl = INSTALL_PATH.'/../mails/en/employee_password.html'; + $pathTplLocal = INSTALL_PATH.'/../mails/'.$iso_code.'/employee_password.html'; + + $content = (file_exists($pathTplLocal)) ? file_get_contents($pathTplLocal) : file_get_contents($pathTpl); + $content = str_replace('{shop_name}', $shopName, $content); + $content = str_replace('{shop_url}', $shopUrl, $content); + $content = str_replace('{shop_logo}', $shopLogo, $content); + $content = str_replace('{firstname}', $firstname, $content); + $content = str_replace('{lastname}', $lastname, $content); + $content = str_replace('{passwd}', $password, $content); + $content = str_replace('{email}', $email, $content); + return $content; + } + + public static function getLangString($idLang) + { + switch ($idLang) + { + case 'en' : return 'English (English)'; + case 'fr' : return 'Français (French)'; + } + } + + static function strtolower($str) + { + if (function_exists('mb_strtolower')) + return mb_strtolower($str, 'utf-8'); + return strtolower($str); + } + + static function strtoupper($str) + { + if (function_exists('mb_strtoupper')) + return mb_strtoupper($str, 'utf-8'); + return strtoupper($str); + } + + static function ucfirst($str) + { + return self::strtoupper(self::substr($str, 0, 1)).self::substr($str, 1); + } + + static function substr($str, $start, $length = false, $encoding = 'utf-8') + { + if (function_exists('mb_substr')) + return mb_substr($str, $start, ($length === false ? self::strlen($str) : $length), $encoding); + return substr($str, $start, $length); + } + + static function strlen($str) + { + if (function_exists('mb_strlen')) + return mb_strlen($str, 'utf-8'); + return strlen($str); + } +} diff --git a/install-new/upgrade/functions/add_accounting_tab.php b/install-new/upgrade/functions/add_accounting_tab.php new file mode 100644 index 000000000..31ff6ef63 --- /dev/null +++ b/install-new/upgrade/functions/add_accounting_tab.php @@ -0,0 +1,20 @@ + +* @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 add_attribute_position() +{ + $groups = Db::getInstance()->executeS(' + SELECT `id_attribute_group` + FROM `'._DB_PREFIX_.'attribute`'); + if (sizeof($groups) && is_array($groups)) + foreach ($groups as $group) + { + $attributes = Db::getInstance()->executeS(' + SELECT * + FROM `'._DB_PREFIX_.'attribute` + WHERE `id_attribute_group` = '. (int)($group['id_attribute_group'])); + $i = 0; + if (sizeof($attributes) && is_array($attributes)) + foreach ($attributes as $attribute) + { + Db::getInstance()->execute(' + UPDATE `'._DB_PREFIX_.'attribute` + SET `position` = '.$i++.' + WHERE `id_attribute` = '.(int)$attribute['id_attribute'].' + AND `id_attribute_group` = '.(int)$attribute['id_attribute_group']); + } + } +} \ No newline at end of file diff --git a/install-new/upgrade/functions/add_carrier_position.php b/install-new/upgrade/functions/add_carrier_position.php new file mode 100644 index 000000000..f42a465e4 --- /dev/null +++ b/install-new/upgrade/functions/add_carrier_position.php @@ -0,0 +1,45 @@ + +* @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 add_carrier_position() +{ + $carriers = Db::getInstance()->executeS(' + SELECT `id_carrier` + FROM `'._DB_PREFIX_.'carrier` + WHERE `deleted` = 0'); + if (count($carriers) && is_array($carriers)) + { + $i = 0; + foreach ($carriers as $carrier) + { + Db::getInstance()->execute(' + UPDATE `'._DB_PREFIX_.'carrier` + SET `position` = '.$i++.' + WHERE `id_carrier` = '.(int)$carrier['id_carrier']); + } + } +} \ No newline at end of file diff --git a/install-new/upgrade/functions/add_default_restrictions_modules_groups.php b/install-new/upgrade/functions/add_default_restrictions_modules_groups.php new file mode 100644 index 000000000..780a576c2 --- /dev/null +++ b/install-new/upgrade/functions/add_default_restrictions_modules_groups.php @@ -0,0 +1,50 @@ + +* @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 add_default_restrictions_modules_groups() +{ + $groups = Db::getInstance()->executeS(' + SELECT `id_group` + FROM `'._DB_PREFIX_.'group`'); + $modules = Db::getInstance()->executeS(' + SELECT m.* + FROM `'._DB_PREFIX_.'module` m'); + foreach ($groups as $group) + { + if (!is_array($modules)) + return false; + else + { + $sql = 'INSERT INTO `'._DB_PREFIX_.'group_module_restriction` (`id_group`, `id_module`, `authorized`) VALUES '; + foreach ($modules as $mod) + $sql .= '("'.(int)$group['id_group'].'", "'.(int)$mod['id_module'].'", "1"),'; + // removing last comma to avoid SQL error + $sql = substr($sql, 0, strlen($sql) - 1); + Db::getInstance()->execute($sql); + } + } +} \ No newline at end of file diff --git a/install-new/upgrade/functions/add_feature_position.php b/install-new/upgrade/functions/add_feature_position.php new file mode 100644 index 000000000..6b241ae71 --- /dev/null +++ b/install-new/upgrade/functions/add_feature_position.php @@ -0,0 +1,42 @@ + +* @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 add_feature_position() +{ + $features = Db::getInstance()->executeS(' + SELECT `id_feature` + FROM `'._DB_PREFIX_.'feature`'); + $i = 0; + if (sizeof($features) && is_array($features)) + foreach ($features as $feature) + { + Db::getInstance()->execute(' + UPDATE `'._DB_PREFIX_.'feature` + SET `position` = '.$i++.' + WHERE `id_feature` = '.(int)$feature['id_feature']); + } +} \ No newline at end of file diff --git a/install-new/upgrade/functions/add_group_attribute_position.php b/install-new/upgrade/functions/add_group_attribute_position.php new file mode 100644 index 000000000..414b45671 --- /dev/null +++ b/install-new/upgrade/functions/add_group_attribute_position.php @@ -0,0 +1,42 @@ + +* @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 add_group_attribute_position() +{ + $groups = Db::getInstance()->executeS(' + SELECT * + FROM `'._DB_PREFIX_.'attribute_group`'); + $i = 0; + if (sizeof($groups) && is_array($groups)) + foreach ($groups as $group) + { + Db::getInstance()->execute(' + UPDATE `'._DB_PREFIX_.'attribute_group` + SET `position` = '.$i++.' + WHERE `id_attribute_group` = '.(int)$group['id_attribute_group']); + } +} \ No newline at end of file diff --git a/install-new/upgrade/functions/add_missing_rewrite_value.php b/install-new/upgrade/functions/add_missing_rewrite_value.php new file mode 100644 index 000000000..d7024cc60 --- /dev/null +++ b/install-new/upgrade/functions/add_missing_rewrite_value.php @@ -0,0 +1,46 @@ + +* @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 add_missing_rewrite_value() +{ + $pages = Db::getInstance()->executeS(' + SELECT * + FROM `'._DB_PREFIX_.'meta` m + LEFT JOIN `'._DB_PREFIX_.'meta_lang` ml ON (m.`id_meta` = ml.`id_meta`) + WHERE ml.`url_rewrite` = \'\' + AND m.`page` != "index" + '); + if (sizeof($pages) && is_array($pages)) + foreach ($pages as $page) + { + Db::getInstance()->execute(' + UPDATE `'._DB_PREFIX_.'meta_lang` + SET `url_rewrite` = "'.pSQL(Tools::str2url($page['title'])).'" + WHERE `id_meta` = '.(int)$page['id_meta'].' + AND `id_lang` = '.(int)$page['id_lang']); + } +} \ No newline at end of file diff --git a/install-new/upgrade/functions/add_module_to_hook.php b/install-new/upgrade/functions/add_module_to_hook.php new file mode 100644 index 000000000..1bca72d69 --- /dev/null +++ b/install-new/upgrade/functions/add_module_to_hook.php @@ -0,0 +1,58 @@ + +* @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 add_module_to_hook($module_name, $hook_name) +{ + $result = false; + + $id_module = Db::getInstance()->getValue(' + SELECT `id_module` FROM `'._DB_PREFIX_.'module` + WHERE `name` = \''.pSQL($module_name).'\'' + ); + + if ((int)$id_module > 0) + { + $id_hook = Db::getInstance()->getValue(' + SELECT `id_hook` FROM `'._DB_PREFIX_.'hook` WHERE `name` = \''.pSQL($hook_name).'\' + '); + + if ((int)$id_hook > 0) + { + $result = Db::getInstance()->execute(' + INSERT IGNORE INTO `'._DB_PREFIX_.'hook_module` (`id_module`, `id_hook`, `position`) + VALUES ( + '.(int)$id_module.', + '.(int)$id_hook.', + (SELECT IFNULL( + (SELECT max_position from (SELECT MAX(position)+1 as max_position FROM `'._DB_PREFIX_.'hook_module` WHERE `id_hook` = '.(int)$id_hook.') AS max_position), 1)) + )'); + } + } + + return $result; +} + diff --git a/install-new/upgrade/functions/add_new_tab.php b/install-new/upgrade/functions/add_new_tab.php new file mode 100644 index 000000000..7b3781f31 --- /dev/null +++ b/install-new/upgrade/functions/add_new_tab.php @@ -0,0 +1,65 @@ + +* @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 add_new_tab($className, $name, $id_parent, $returnId = false) +{ + $array = array(); + foreach (explode('|', $name) AS $item) + { + $temp = explode(':', $item); + $array[$temp[0]] = $temp[1]; + } + + if (!(int)Db::getInstance()->getValue('SELECT count(id_tab) FROM `'._DB_PREFIX_.'tab` WHERE `class_name` = \''.pSQL($className).'\' ')) + Db::getInstance()->execute('INSERT INTO `'._DB_PREFIX_.'tab` (`id_parent`, `class_name`, `module`, `position`) VALUES ('.(int)$id_parent.', \''.pSQL($className).'\', \'\', + (SELECT IFNULL(MAX(t.position),0)+ 1 FROM `'._DB_PREFIX_.'tab` t WHERE t.id_parent = '.(int)$id_parent.'))'); + + foreach (Language::getLanguages() AS $lang) + { + Db::getInstance()->execute(' + INSERT IGNORE INTO `'._DB_PREFIX_.'tab_lang` (`id_lang`, `id_tab`, `name`) + VALUES ('.(int)$lang['id_lang'].', ( + SELECT `id_tab` + FROM `'._DB_PREFIX_.'tab` + WHERE `class_name` = \''.pSQL($className).'\' LIMIT 0,1 + ), \''.pSQL(isset($array[$lang['iso_code']]) ? $array[$lang['iso_code']] : $array['en']).'\') + '); + } + + Db::getInstance()->execute('INSERT IGNORE INTO `'._DB_PREFIX_.'access` (`id_profile`, `id_tab`, `view`, `add`, `edit`, `delete`) + (SELECT `id_profile`, ( + SELECT `id_tab` + FROM `'._DB_PREFIX_.'tab` + WHERE `class_name` = \''.pSQL($className).'\' LIMIT 0,1 + ), 1, 1, 1, 1 FROM `'._DB_PREFIX_.'profile` )'); + + if($returnId) { + return (int)Db::getInstance()->getValue('SELECT `id_tab` + FROM `'._DB_PREFIX_.'tab` + WHERE `class_name` = \''.pSQL($className).'\''); + } +} diff --git a/install-new/upgrade/functions/add_order_state.php b/install-new/upgrade/functions/add_order_state.php new file mode 100644 index 000000000..2cf0c6a69 --- /dev/null +++ b/install-new/upgrade/functions/add_order_state.php @@ -0,0 +1,63 @@ + +* @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 add_order_state($conf_name, $name, $invoice, $send_email, $color, $unremovable, $logable, $delivery, $template = null) +{ + $name_lang = array(); + $template_lang = array(); + foreach (explode('|', $name) AS $item) + { + $temp = explode(':', $item); + $name_lang[$temp[0]] = $temp[1]; + } + + if ($template) + foreach (explode('|', $template) AS $item) + { + $temp = explode(':', $item); + $template_lang[$temp[0]] = $temp[1]; + } + + Db::getInstance()->execute(' + INSERT INTO `'._DB_PREFIX_.'order_state` (`invoice`, `send_email`, `color`, `unremovable`, `logable`, `delivery`) + VALUES ('.(int)$invoice.', '.(int)$send_email.', \''.pSQL($color).'\', '.(int)$unremovable.', '.(int)$logable.', '.(int)$delivery.')'); + + $id_order_state = Db::getInstance()->getValue(' + SELECT MAX(`id_order_state`) + FROM `'._DB_PREFIX_.'order_state` + '); + + foreach (Language::getLanguages() AS $lang) + { + Db::getInstance()->execute(' + INSERT IGNORE INTO `'._DB_PREFIX_.'order_state_lang` (`id_lang`, `id_order_state`, `name`, `template`) + VALUES ('.(int)$lang['id_lang'].', '.(int)$id_order_state.', \''.pSQL(isset($name_lang[$lang['iso_code']]) ? $name_lang[$lang['iso_code']] : $name_lang['en']).'\', \''.pSQL(isset($template_lang[$lang['iso_code']]) ? $template_lang[$lang['iso_code']] : (isset($template_lang['en']) ? $template_lang['en'] : '')).'\') + '); + } + + Configuration::updateValue($conf_name, $id_order_state); +} \ No newline at end of file diff --git a/install-new/upgrade/functions/add_required_customization_field_flag.php b/install-new/upgrade/functions/add_required_customization_field_flag.php new file mode 100644 index 000000000..aa2869849 --- /dev/null +++ b/install-new/upgrade/functions/add_required_customization_field_flag.php @@ -0,0 +1,44 @@ + +* @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('_CONTAINS_REQUIRED_FIELD_', 2); + +function add_required_customization_field_flag() +{ + if (($result = Db::getInstance()->executeS('SELECT `id_product` FROM `'._DB_PREFIX_.'customization_field` WHERE `required` = 1')) === false) + return false; + if (Db::getInstance()->numRows()) + { + $productIds = array(); + foreach ($result AS $row) + $productIds[] = (int)($row['id_product']); + if (!Db::getInstance()->execute('UPDATE `'._DB_PREFIX_.'product` SET `customizable` = '._CONTAINS_REQUIRED_FIELD_.' WHERE `id_product` IN ('.implode(', ', $productIds).')')) + return false; + } + return true; +} + diff --git a/install-new/upgrade/functions/alter_blocklink.php b/install-new/upgrade/functions/alter_blocklink.php new file mode 100644 index 000000000..6fa44b672 --- /dev/null +++ b/install-new/upgrade/functions/alter_blocklink.php @@ -0,0 +1,36 @@ + +* @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_blocklink() +{ + // No one will know if the table does not exist :] Thanks Damien for your solution ;) + DB::getInstance()->Execute('ALTER TABLE `'._DB_PREFIX_.'blocklink_lang` CHANGE `id_link` `id_blocklink` INT( 10 ) UNSIGNED NOT NULL'); + + DB::getInstance()->Execute('ALTER TABLE `'._DB_PREFIX_.'blocklink` CHANGE `id_link` `id_blocklink` INT( 10 ) UNSIGNED NOT NULL'); + +} + diff --git a/install-new/upgrade/functions/alter_cms_block.php b/install-new/upgrade/functions/alter_cms_block.php new file mode 100644 index 000000000..ecf0f5909 --- /dev/null +++ b/install-new/upgrade/functions/alter_cms_block.php @@ -0,0 +1,40 @@ + +* @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_cms_block() +{ + // No one will know if the table does not exist :] Thanks Damien for your solution ;) + DB::getInstance()->Execute('ALTER TABLE `'._DB_PREFIX_.'cms_block_lang` CHANGE `id_block_cms` `id_cms_block` INT( 10 ) UNSIGNED NOT NULL'); + + DB::getInstance()->Execute('ALTER TABLE `'._DB_PREFIX_.'cms_block` CHANGE `id_block_cms` `id_cms_block` INT( 10 ) UNSIGNED NOT NULL'); + + DB::getInstance()->Execute('ALTER TABLE `'._DB_PREFIX_.'cms_block_page` CHANGE `id_block_cms` `id_cms_block` INT( 10 ) UNSIGNED NOT NULL'); + + DB::getInstance()->Execute('ALTER TABLE `'._DB_PREFIX_.'cms_block_page` CHANGE `id_block_cms_page` `id_cms_block_page` INT( 10 ) UNSIGNED NOT NULL AUTO_INCREMENT'); + +} + diff --git a/install-new/upgrade/functions/alter_productcomments_guest_index.php b/install-new/upgrade/functions/alter_productcomments_guest_index.php new file mode 100644 index 000000000..56324547b --- /dev/null +++ b/install-new/upgrade/functions/alter_productcomments_guest_index.php @@ -0,0 +1,39 @@ + +* @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` (`id_guest`);'); +} + diff --git a/install-new/upgrade/functions/blocknewsletter.php b/install-new/upgrade/functions/blocknewsletter.php new file mode 100644 index 000000000..f337bbe21 --- /dev/null +++ b/install-new/upgrade/functions/blocknewsletter.php @@ -0,0 +1,33 @@ + +* @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 blocknewsletter() +{ + // No one will know if the table does not exist :] + DB::getInstance()->Execute('ALTER TABLE '._DB_PREFIX_.'newsletter ADD `http_referer` VARCHAR(255) NULL'); +} + diff --git a/install-new/upgrade/functions/check_webservice_account_table.php b/install-new/upgrade/functions/check_webservice_account_table.php new file mode 100644 index 000000000..30df841ec --- /dev/null +++ b/install-new/upgrade/functions/check_webservice_account_table.php @@ -0,0 +1,44 @@ + +* @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 +*/ + +/** + * Check if all needed columns in webservice_account table exists. + * These columns are used for the WebserviceRequest overriding. + * + * @return void + */ +function check_webservice_account_table() +{ + $sql = 'SHOW COLUMNS FROM '._DB_PREFIX_.'webservice_account'; + $return = DB::getInstance()->executeS($sql); + if (count($return) < 7) + { + $sql = 'ALTER TABLE `'._DB_PREFIX_.'webservice_account` ADD `is_module` TINYINT( 2 ) NOT NULL DEFAULT \'0\' AFTER `class_name` , + ADD `module_name` VARCHAR( 50 ) NULL DEFAULT NULL AFTER `is_module`'; + DB::getInstance()->executeS($sql); + } +} \ No newline at end of file diff --git a/install-new/upgrade/functions/cms_block.php b/install-new/upgrade/functions/cms_block.php new file mode 100644 index 000000000..a988dbd55 --- /dev/null +++ b/install-new/upgrade/functions/cms_block.php @@ -0,0 +1,33 @@ + +* @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 cms_block() +{ + if (!Db::getInstance()->execute('SELECT `display_store` FROM `'._DB_PREFIX_.'cms_block` LIMIT 1')) + return Db::getInstance()->execute('ALTER TABLE `'._DB_PREFIX_.'cms_block` ADD `display_store` TINYINT NOT NULL DEFAULT \'1\''); + return true; +} + diff --git a/install-new/upgrade/functions/configuration_double_cleaner.php b/install-new/upgrade/functions/configuration_double_cleaner.php new file mode 100644 index 000000000..d67cd15a4 --- /dev/null +++ b/install-new/upgrade/functions/configuration_double_cleaner.php @@ -0,0 +1,48 @@ + +* @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 configuration_double_cleaner() +{ + $result = Db::getInstance()->executeS(' + SELECT name, MIN(id_configuration) AS minid + FROM '._DB_PREFIX_.'configuration + GROUP BY name + HAVING count(name) > 1'); + foreach ($result as $row) + { + DB::getInstance()->Execute(' + DELETE FROM '._DB_PREFIX_.'configuration + WHERE name = \''.addslashes($row['name']).'\' + AND id_configuration != '.(int)($row['minid'])); + } + DB::getInstance()->Execute(' + DELETE FROM '._DB_PREFIX_.'configuration_lang + WHERE id_configuration NOT IN ( + SELECT id_configuration + FROM '._DB_PREFIX_.'configuration)'); +} + diff --git a/install-new/upgrade/functions/convert_product_price.php b/install-new/upgrade/functions/convert_product_price.php new file mode 100644 index 000000000..34e4ca3fa --- /dev/null +++ b/install-new/upgrade/functions/convert_product_price.php @@ -0,0 +1,50 @@ + +* @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 +*/ + +/* Convert product prices from the PS < 1.3 wrong rounding system to the new 1.3 one */ +function convert_product_price() +{ + $taxes = Tax::getTaxes(); + $taxRates = array(); + foreach ($taxes as $data) + $taxRates[$data['id_tax']] = (float)($data['rate']) / 100; + $resource = DB::getInstance()->executeS('SELECT `id_product`, `price`, `id_tax` FROM `'._DB_PREFIX_.'product`', false); + if (!$resource) + die(Db::getInstance()->getMsgError()); + while ($row = DB::getInstance()->nextRow($resource)) + if ($row['id_tax']) + { + $price = $row['price'] * (1 + $taxRates[$row['id_tax']]); + $decimalPart = $price - (int)$price; + if ($decimalPart < 0.000001) + { + $newPrice = (float)(number_format($price, 6, '.', '')); + $newPrice = Tools::floorf($newPrice / (1 + $taxRates[$row['id_tax']]), 6); + DB::getInstance()->Execute('UPDATE `'._DB_PREFIX_.'product` SET `price` = '.$newPrice.' WHERE `id_product` = '.(int)$row['id_product']); + } + } +} diff --git a/install-new/upgrade/functions/create_multistore.php b/install-new/upgrade/functions/create_multistore.php new file mode 100644 index 000000000..89e9bbe91 --- /dev/null +++ b/install-new/upgrade/functions/create_multistore.php @@ -0,0 +1,44 @@ +execute('INSERT INTO '._DB_PREFIX_.'theme (`id_theme`, `name`) VALUES(\'\', \''.pSQL($theme).'\')'); + $res &= Db::getInstance()->execute('UPDATE '._DB_PREFIX_.'shop SET id_theme = (SELECT id_theme FROM '._DB_PREFIX_.'theme WHERE name=\''.pSQL(_THEME_NAME_).'\') WHERE id_shop = 1'); + $shop_domain = Db::getInstance()->getValue('SELECT `value` + FROM `'._DB_PREFIX_.'_configuration` + WHERE `name`=\'PS_SHOP_DOMAIN\''); + $shop_domain_ssl = Db::getInstance()->getValue('SELECT `value` + FROM `'._DB_PREFIX_.'_configuration` + WHERE `name`=\'PS_SHOP_DOMAIN_SSL\''); + if(empty($shop_domain)) + { + $shop_domain = Tools::getHttpHost(); + $shop_domain_ssl = Tools::getHttpHost(); + } + + $_PS_DIRECTORY_ = trim(str_replace(' ', '%20', INSTALLER__PS_BASE_URI), '/'); + $_PS_DIRECTORY_ = ($_PS_DIRECTORY_) ? '/'.$_PS_DIRECTORY_.'/' : '/'; + $res &= Db::getInstance()->execute('INSERT INTO `'._DB_PREFIX_.'shop_url` (`id_shop`, `domain`, `domain_ssl`, `physical_uri`, `virtual_uri`, `main`, `active`) + VALUES(1, \''.pSQL($shop_domain).'\', \''.pSQL($shop_domain_ssl).'\', \''.pSQL($_PS_DIRECTORY_).'\', \'\', 1, 1)'); + + // Stock conversion + $sql = 'INSERT INTO `'._DB_PREFIX_.'.stock` (`id_product`, `id_product_attribute`, `id_group_shop`, `id_shop`, `quantity`) + VALUES (SELECT `p.id_product`, 0, 1, 1, `p.quantity` FROM `'._DB_PREFIX_.'.product` p);'; + $res &= Db::getInstance()->execute($sql); + + $sql = 'INSERT INTO `'._DB_PREFIX_.'.stock` (`id_product`, `id_product_attribute`, `id_group_shop`, `id_shop`, `quantity`) + VALUES (SELECT `id_product`, `id_product_attribute`, 1, 1, `quantity` FROM `'._DB_PREFIX_.'product_attribute` p);'; + $res &= Db::getInstance()->execute($sql); + + // Add admin tabs + $shopTabId = add_new_tab('AdminShop', 'it:Shops|es:Shops|fr:Boutiques|de:Shops|en:Shops', 0, true); + add_new_tab('AdminGroupShop', 'it:Group Shops|es:Group Shops|fr:Groupes de boutique|de:Group Shops|en:Group Shops', $shopTabId); + add_new_tab('AdminShopUrl', 'it:Shop Urls|es:Shop Urls|fr:URLs de boutique|de:Shop Urls|en:Shop Urls', $shopTabId); + + return $res; +} diff --git a/install-new/upgrade/functions/delivery_number_set.php b/install-new/upgrade/functions/delivery_number_set.php new file mode 100644 index 000000000..21bb104c8 --- /dev/null +++ b/install-new/upgrade/functions/delivery_number_set.php @@ -0,0 +1,55 @@ + +* @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 delivery_number_set() +{ + Configuration::loadConfiguration(); + $number = 1; + + // Update each order with a number + $result = Db::getInstance()->executeS(' + SELECT id_order + FROM '._DB_PREFIX_.'orders + ORDER BY id_order'); + foreach ($result as $row) + { + $order = new Order((int)($row['id_order'])); + $history = $order->getHistory(false); + foreach ($history as $row2) + { + $oS = new OrderState((int)($row2['id_order_state']), Configuration::get('PS_LANG_DEFAULT')); + if ($oS->delivery) + { + Db::getInstance()->execute('UPDATE '._DB_PREFIX_.'orders SET delivery_number = '.(int)($number++).', `delivery_date` = `date_add` WHERE id_order = '.(int)($order->id)); + break ; + } + } + } + // Add configuration var + Configuration::updateValue('PS_DELIVERY_NUMBER', (int)($number)); +} + diff --git a/install-new/upgrade/functions/desactivate_custom_modules.php b/install-new/upgrade/functions/desactivate_custom_modules.php new file mode 100644 index 000000000..d448eef0d --- /dev/null +++ b/install-new/upgrade/functions/desactivate_custom_modules.php @@ -0,0 +1,65 @@ + +* @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 desactivate_custom_modules() +{ + $db = Db::getInstance(); + $modulesDirOnDisk = Module::getModulesDirOnDisk(); + + $module_list_xml = _PS_ROOT_DIR_.DIRECTORY_SEPARATOR.'config'.DIRECTORY_SEPARATOR.'modules_list.xml'; + $nativeModules = simplexml_load_file($module_list_xml); + $nativeModules = $nativeModules->modules; + foreach ($nativeModules as $nativeModulesType) + if (in_array($nativeModulesType['type'],array('native','partner'))) + { + $arrNativeModules[] = '""'; + foreach ($nativeModulesType->module as $module) + $arrNativeModules[] = '"'.pSQL($module['name']).'"'; + } + + $arrNonNative = $db->executeS(' + SELECT * + FROM `'._DB_PREFIX_.'module` m + WHERE name NOT IN ('.implode(',',$arrNativeModules).') '); + + $uninstallMe = array("undefined-modules"); + if (is_array($arrNonNative)) + foreach($arrNonNative as $aModule) + $uninstallMe[] = $aModule['name']; + + if (!is_array($uninstallMe)) + $uninstallMe = array($uninstallMe); + + foreach ($uninstallMe as $k=>$v) + $uninstallMe[$k] = '"'.pSQL($v).'"'; + + return Db::getInstance()->execute(' + UPDATE `'._DB_PREFIX_.'module` + SET `active`= 0 + WHERE `name` IN ('.implode(',',$uninstallMe).')'); +} + diff --git a/install-new/upgrade/functions/ecotax_tax_application_fix.php b/install-new/upgrade/functions/ecotax_tax_application_fix.php new file mode 100644 index 000000000..f78b26841 --- /dev/null +++ b/install-new/upgrade/functions/ecotax_tax_application_fix.php @@ -0,0 +1,33 @@ + +* @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 ecotax_tax_application_fix() +{ + if (!Db::getInstance()->execute('SELECT `ecotax_tax_rate` FROM `'._DB_PREFIX_.'order_detail` LIMIT 1')) + return Db::getInstance()->execute('ALTER TABLE `'._DB_PREFIX_.'order_detail` ADD `ecotax_tax_rate` DECIMAL(5, 3) NOT NULL AFTER `ecotax`'); + return true; +} \ No newline at end of file diff --git a/install-new/upgrade/functions/editorial_update.php b/install-new/upgrade/functions/editorial_update.php new file mode 100644 index 000000000..8e7c05779 --- /dev/null +++ b/install-new/upgrade/functions/editorial_update.php @@ -0,0 +1,73 @@ + +* @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 editorial_update() +{ + /*Table creation*/ + + if (Db::getInstance()->getValue('SELECT `id_module` FROM `'._DB_PREFIX_.'module` WHERE `name`="editorial"')) + { + Db::getInstance()->execute(' + CREATE TABLE `'._DB_PREFIX_.'editorial` ( + `id_editorial` int(10) unsigned NOT NULL auto_increment, + `body_home_logo_link` varchar(255) NOT NULL, + PRIMARY KEY (`id_editorial`)) + ENGINE=MyISAM DEFAULT CHARSET=utf8'); + + Db::getInstance()->execute(' + CREATE TABLE `'._DB_PREFIX_.'editorial_lang` ( + `id_editorial` int(10) unsigned NOT NULL, + `id_lang` int(10) unsigned NOT NULL, + `body_title` varchar(255) NOT NULL, + `body_subheading` varchar(255) NOT NULL, + `body_paragraph` text NOT NULL, + `body_logo_subheading` varchar(255) NOT NULL, + PRIMARY KEY (`id_editorial`, `id_lang`)) + ENGINE=MyISAM DEFAULT CHARSET=utf8'); + + if (file_exists(dirname(__FILE__).'/../../modules/editorial/editorial.xml')) + { + $xml = simplexml_load_file(dirname(__FILE__).'/../../modules/editorial/editorial.xml'); + Db::getInstance()->execute(' + INSERT INTO `'._DB_PREFIX_.'editorial`(`id_editorial`, `body_home_logo_link`) VALUES(1, "'.(isset($xml->body->home_logo_link) ? pSQL($xml->body->home_logo_link) : '').'")'); + + + $languages = Db::getInstance()->executeS('SELECT * FROM `'._DB_PREFIX_.'lang`'); + foreach ($languages as $language) + Db::getInstance()->execute(' + INSERT INTO `'._DB_PREFIX_.'editorial_lang` (`id_editorial`, `id_lang`, `body_title`, `body_subheading`, `body_paragraph`, `body_logo_subheading`) + VALUES (1, '.(int)($language['id_lang']).', + "'.(isset($xml->body->{'title_'.$language['id_lang']}) ? pSQL($xml->body->{'title_'.$language['id_lang']}) : '').'", + "'.(isset($xml->body->{'subheading_'.$language['id_lang']}) ? pSQL($xml->body->{'subheading_'.$language['id_lang']}) : '').'", + "'.(isset($xml->body->{'paragraph_'.$language['id_lang']}) ? pSQL($xml->body->{'paragraph_'.$language['id_lang']}, true) : '').'", + "'.(isset($xml->body->{'logo_subheading_'.$language['id_lang']}) ? pSQL($xml->body->{'logo_subheading_'.$language['id_lang']}) : '').'")'); + + unlink(dirname(__FILE__).'/../../modules/editorial/editorial.xml'); + } + } +} + diff --git a/install-new/upgrade/functions/generate_ntree.php b/install-new/upgrade/functions/generate_ntree.php new file mode 100644 index 000000000..b988e93cc --- /dev/null +++ b/install-new/upgrade/functions/generate_ntree.php @@ -0,0 +1,31 @@ + +* @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 generate_ntree() +{ + Category::regenerateEntireNtree(); +} diff --git a/install-new/upgrade/functions/generate_tax_rules.php b/install-new/upgrade/functions/generate_tax_rules.php new file mode 100644 index 000000000..a107d12ce --- /dev/null +++ b/install-new/upgrade/functions/generate_tax_rules.php @@ -0,0 +1,87 @@ +active = 1; + $group->name = 'Rule '.$tax['rate'].'%'; + $group->save(); + $id_tax_rules_group = $group->id; + + + $countries = Db::getInstance()->executeS(' + SELECT * FROM `'._DB_PREFIX_.'country` c + LEFT JOIN `'._DB_PREFIX_.'zone` z ON (c.`id_zone` = z.`id_zone`) + LEFT JOIN `'._DB_PREFIX_.'tax_zone` tz ON (tz.`id_zone` = z.`id_zone`) + WHERE `id_tax` = '.(int)$id_tax + ); + if ($countries) + { + foreach ($countries AS $country) + { + $res = Db::getInstance()->execute(' + INSERT INTO `'._DB_PREFIX_.'tax_rule` (`id_tax_rules_group`, `id_country`, `id_state`, `state_behavior`, `id_tax`) + VALUES ( + '.(int)$group->id.', + '.(int)$country['id_country'].', + 0, + 0, + '.(int)$id_tax. + ')'); + + } + } + + $states = Db::getInstance()->executeS(' + SELECT * FROM `'._DB_PREFIX_.'states s + LEFT JOIN `'._DB_PREFIX_.'tax_state ts ON (ts.`id_state` = s.`id_state`) + WHERE `id_tax` = '.(int)$id_tax + ); + + if ($states) + { + foreach ($states AS $state) + { + if (!in_array($state['tax_behavior'], array(PS_PRODUCT_TAX, PS_STATE_TAX, PS_BOTH_TAX))) + $tax_behavior = PS_PRODUCT_TAX; + else + $tax_behavior = $state['tax_behavior']; + + $res = Db::getInstance()->execute(' + INSERT INTO `'._DB_PREFIX_.'tax_rule` (`id_tax_rules_group`, `id_country`, `id_state`, `state_behavior`, `id_tax`) + VALUES ( + '.(int)$group->id.', + '.(int)$state['id_country'].', + '.(int)$state['id_state'].', + '.(int)$tax_behavior.', + '.(int)$id_tax. + ')'); + } + } + + Db::getInstance()->execute(' + UPDATE `'._DB_PREFIX_.'product` + SET `id_tax_rules_group` = '.(int)$group->id.' + WHERE `id_tax` = '.(int)$id_tax + ); + + Db::getInstance()->execute(' + UPDATE `'._DB_PREFIX_.'carrier` + SET `id_tax_rules_group` = '.(int)$group->id.' + WHERE `id_tax` = '.(int)$id_tax + ); + + + if (Configuration::get('SOCOLISSIMO_OVERCOST_TAX') == $id_tax) + Configuration::updateValue('SOCOLISSIMO_OVERCOST_TAX', $group->id); + } +} + diff --git a/install-new/upgrade/functions/gridextjs_deprecated.php b/install-new/upgrade/functions/gridextjs_deprecated.php new file mode 100644 index 000000000..1f21b8e35 --- /dev/null +++ b/install-new/upgrade/functions/gridextjs_deprecated.php @@ -0,0 +1,47 @@ + +* @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 +*/ + +/** remove the uncompatible module gridextjs (1.4.0.8 upgrade) + */ +function gridextjs_deprecated() +{ + // if exists, use _PS_MODULE_DIR_ or _PS_ROOT_DIR_ + // instead of guessing the modules dir + if (defined('_PS_MODULE_DIR_')) + $gridextjs_path = _PS_MODULE_DIR_ . 'gridextjs'; + else + if (defined('_PS_ROOT_DIR_')) + $gridextjs_path = _PS_ROOT_DIR_ . '/modules/gridextjs'; + else + $gridextjs_path = dirname(__FILE__).'/../../modules/gridextjs'; + + if (file_exists($gridextjs_path)) + return rename($gridextjs_path, str_replace('gridextjs', 'gridextjs.deprecated', $gridextjs_path)); + + return true; +} + diff --git a/install-new/upgrade/functions/group_reduction_column_fix.php b/install-new/upgrade/functions/group_reduction_column_fix.php new file mode 100644 index 000000000..07f6eea80 --- /dev/null +++ b/install-new/upgrade/functions/group_reduction_column_fix.php @@ -0,0 +1,33 @@ + +* @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 group_reduction_column_fix() +{ + if (!Db::getInstance()->execute('SELECT `group_reduction` FROM `'._DB_PREFIX_.'order_detail` LIMIT 1')) + return Db::getInstance()->execute('ALTER TABLE `'._DB_PREFIX_.'order_detail` ADD `group_reduction` DECIMAL(10, 2) NOT NULL AFTER `reduction_amount`'); + return true; +} \ No newline at end of file diff --git a/install-new/upgrade/functions/id_currency_country_fix.php b/install-new/upgrade/functions/id_currency_country_fix.php new file mode 100644 index 000000000..80029a9e9 --- /dev/null +++ b/install-new/upgrade/functions/id_currency_country_fix.php @@ -0,0 +1,33 @@ + +* @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 id_currency_country_fix() +{ + if (!Db::getInstance()->execute('SELECT `id_currency` FROM `'._DB_PREFIX_.'country` LIMIT 1')) + return Db::getInstance()->execute('ALTER TABLE `'._DB_PREFIX_.'country` ADD `id_currency` INT NOT NULL DEFAULT \'0\' AFTER `id_zone`'); + return true; +} \ No newline at end of file diff --git a/install-new/upgrade/functions/index.php b/install-new/upgrade/functions/index.php new file mode 100644 index 000000000..4e2611d37 --- /dev/null +++ b/install-new/upgrade/functions/index.php @@ -0,0 +1,36 @@ + +* @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 +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/install-new/upgrade/functions/invoice_number_set.php b/install-new/upgrade/functions/invoice_number_set.php new file mode 100644 index 000000000..3032fc3c8 --- /dev/null +++ b/install-new/upgrade/functions/invoice_number_set.php @@ -0,0 +1,55 @@ + +* @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 invoice_number_set() +{ + Configuration::loadConfiguration(); + $number = 1; + + // Update each order with a number + $result = Db::getInstance()->executeS(' + SELECT id_order + FROM '._DB_PREFIX_.'orders + ORDER BY id_order'); + foreach ($result as $row) + { + $order = new Order((int)($row['id_order'])); + $history = $order->getHistory(false); + foreach ($history as $row2) + { + $oS = new OrderState((int)($row2['id_order_state']), Configuration::get('PS_LANG_DEFAULT')); + if ($oS->invoice) + { + Db::getInstance()->execute('UPDATE '._DB_PREFIX_.'orders SET invoice_number = '.(int)($number++).', `invoice_date` = `date_add` WHERE id_order = '.(int)($order->id)); + break ; + } + } + } + // Add configuration var + Configuration::updateValue('PS_INVOICE_NUMBER', (int)($number)); +} + diff --git a/install-new/upgrade/functions/latin1_database_to_utf8.php b/install-new/upgrade/functions/latin1_database_to_utf8.php new file mode 100644 index 000000000..b772a1904 --- /dev/null +++ b/install-new/upgrade/functions/latin1_database_to_utf8.php @@ -0,0 +1,133 @@ + +* @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 latin1_database_to_utf8() +{ + global $requests, $warningExist; + + $tables = array( + array('name' => 'address', 'id' => 'id_address', 'fields' => array('alias', 'company', 'name', 'surname', 'address1', 'address2', 'postcode', 'city', 'other', 'phone', 'phone_mobile')), + array('name' => 'alias', 'id' => 'id_alias', 'fields' => array('alias', 'search')), + array('name' => 'attribute_group_lang', 'id' => 'id_attribute_group', 'lang' => true, 'fields' => array('name', 'public_name')), + array('name' => 'attribute_lang', 'id' => 'id_attribute', 'lang' => true, 'fields' => array('name')), + array('name' => 'carrier', 'id' => 'id_carrier', 'fields' => array('name', 'url')), + array('name' => 'carrier_lang', 'id' => 'id_carrier', 'lang' => true, 'fields' => array('delay')), + array('name' => 'cart', 'id' => 'id_cart', 'fields' => array('gift_message')), + array('name' => 'category_lang', 'id' => 'id_category', 'lang' => true, 'fields' => array('name', 'description', 'link_rewrite', 'meta_title', 'meta_keywords', 'meta_description')), + array('name' => 'configuration', 'id' => 'id_configuration', 'fields' => array('name', 'value')), + array('name' => 'configuration_lang', 'id' => 'id_configuration', 'lang' => true, 'fields' => array('value')), + array('name' => 'contact', 'id' => 'id_contact', 'fields' => array('email')), + array('name' => 'contact_lang', 'id' => 'id_contact', 'lang' => true, 'fields' => array('name', 'description')), + array('name' => 'country', 'id' => 'id_country', 'fields' => array('iso_code')), + array('name' => 'country_lang', 'id' => 'id_country', 'lang' => true, 'fields' => array('name')), + array('name' => 'currency', 'id' => 'id_currency', 'fields' => array('name', 'iso_code', 'sign')), + array('name' => 'customer', 'id' => 'id_customer', 'fields' => array('email', 'passwd', 'name', 'surname')), + array('name' => 'discount', 'id' => 'id_discount', 'fields' => array('name')), + array('name' => 'discount_lang', 'id' => 'id_discount', 'lang' => true, 'fields' => array('description')), + array('name' => 'discount_type_lang', 'id' => 'id_discount_type', 'lang' => true, 'fields' => array('name')), + array('name' => 'employee', 'id' => 'id_employee', 'fields' => array('name', 'surname', 'email', 'passwd')), + array('name' => 'feature_lang', 'id' => 'id_feature', 'lang' => true, 'fields' => array('name')), + array('name' => 'feature_value_lang', 'id' => 'id_feature_value', 'lang' => true, 'fields' => array('value')), + array('name' => 'hook', 'id' => 'id_hook', 'fields' => array('name', 'title', 'description')), + array('name' => 'hook_module_exceptions', 'id' => 'id_hook_module_exceptions', 'fields' => array('file_name')), + array('name' => 'image_lang', 'id' => 'id_image', 'lang' => true, 'fields' => array('legend')), + array('name' => 'image_type', 'id' => 'id_image_type', 'fields' => array('name')), + array('name' => 'lang', 'id' => 'id_lang', 'fields' => array('name', 'iso_code')), + array('name' => 'manufacturer', 'id' => 'id_manufacturer', 'fields' => array('name')), + array('name' => 'message', 'id' => 'id_message', 'fields' => array('message')), + array('name' => 'module', 'id' => 'id_module', 'fields' => array('name')), + array('name' => 'orders', 'id' => 'id_order', 'fields' => array('payment', 'module', 'gift_message', 'shipping_number')), + array('name' => 'order_detail', 'id' => 'id_order_detail', 'fields' => array('product_name', 'product_reference', 'tax_name', 'download_hash')), + array('name' => 'order_discount', 'id' => 'id_order_discount', 'fields' => array('name')), + array('name' => 'order_state', 'id' => 'id_order_state', 'fields' => array('color')), + array('name' => 'order_state_lang', 'id' => 'id_order_state', 'lang' => true, 'fields' => array('name', 'template')), + array('name' => 'product', 'id' => 'id_product', 'fields' => array('ean13', 'reference')), + array('name' => 'product_attribute', 'id' => 'id_product_attribute', 'fields' => array('reference', 'ean13')), + array('name' => 'product_download', 'id' => 'id_product_download', 'fields' => array('display_filename', 'filename')), + array('name' => 'product_lang', 'id' => 'id_product', 'lang' => true, 'fields' => array('description', 'description_short', 'link_rewrite', 'meta_description', 'meta_keywords', 'meta_title', 'name', 'availability')), + array('name' => 'profile_lang', 'id' => 'id_profile', 'lang' => true, 'fields' => array('name')), + array('name' => 'quick_access', 'id' => 'id_quick_access', 'fields' => array('link')), + array('name' => 'quick_access_lang', 'id' => 'id_quick_access', 'lang' => true, 'fields' => array('name')), + array('name' => 'supplier', 'id' => 'id_supplier', 'fields' => array('name')), + array('name' => 'tab', 'id' => 'id_tab', 'fields' => array('class_name')), + array('name' => 'tab_lang', 'id' => 'id_tab', 'lang' => true, 'fields' => array('name')), + array('name' => 'tag', 'id' => 'id_tag', 'fields' => array('name')), + array('name' => 'tax_lang', 'id' => 'id_tax', 'lang' => true, 'fields' => array('name')), + array('name' => 'zone', 'id' => 'id_zone', 'fields' => array('name')) + ); + + foreach ($tables AS $table) + { + /* Latin1 datas' selection */ + if (!Db::getInstance()->execute('SET NAMES latin1')) + echo 'Cannot change the sql encoding to latin1!'; + $query = 'SELECT `'.$table['id'].'`'; + foreach ($table['fields'] AS $field) + $query .= ', `'.$field.'`'; + if (isset($table['lang']) AND $table['lang']) + $query .= ', `id_lang`'; + $query .= ' FROM `'._DB_PREFIX_.$table['name'].'`'; + $latin1Datas = Db::getInstance()->executeS($query); + if ($latin1Datas === false) + { + $warningExist = true; + $requests .= ' + + + getMsgError()).']]> + getNumberError()).']]> + '."\n"; + } + + if (Db::getInstance()->NumRows()) + { + /* Utf-8 datas' restitution */ + if (!Db::getInstance()->execute('SET NAMES utf8')) + echo 'Cannot change the sql encoding to utf8!'; + foreach ($latin1Datas AS $latin1Data) + { + $query = 'UPDATE `'._DB_PREFIX_.$table['name'].'` SET'; + foreach ($table['fields'] AS $field) + $query .= ' `'.$field.'` = \''.pSQL($latin1Data[$field]).'\','; + $query = rtrim($query, ','); + $query .= ' WHERE `'.$table['id'].'` = '.(int)($latin1Data[$table['id']]); + if (isset($table['lang']) AND $table['lang']) + $query .= ' AND `id_lang` = '.(int)($latin1Data['id_lang']); + if (!Db::getInstance()->execute($query)) + { + $warningExist = true; + $requests .= ' + + + getMsgError()).']]> + getNumberError()).']]> + '."\n"; + } + } + } + } +} diff --git a/install-new/upgrade/functions/migrate_block_info_to_cms_block.php b/install-new/upgrade/functions/migrate_block_info_to_cms_block.php new file mode 100644 index 000000000..faed1b848 --- /dev/null +++ b/install-new/upgrade/functions/migrate_block_info_to_cms_block.php @@ -0,0 +1,57 @@ + +* @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 migrate_block_info_to_cms_block() +{ + //get ids cms of block information + $id_blockinfos = Db::getInstance()->getValue('SELECT id_module FROM `'._DB_PREFIX_.'module` WHERE name = \'blockinfos\''); + //get ids cms of block information + $ids_cms = Db::getInstance()->executeS('SELECT * FROM `'._DB_PREFIX_.'block_cms` WHERE `id_block` = '.(int)$id_blockinfos); + //check if block info is installed and active + if (sizeof($ids_cms)) + { + //install module blockcms + if (Module::getInstanceByName('blockcms')->install()) + { + //add new block in new cms block + Db::getInstance()->execute('INSERT INTO `'._DB_PREFIX_.'cms_block` (`id_cms_category`, `name`, `location`, `position`) VALUES( 1, \'\', 0, 0)'); + $id_block = Db::getInstance()->Insert_ID(); + + $languages = Language::getLanguages(false); + foreach($languages AS $language) + Db::getInstance()->execute('INSERT INTO `'._DB_PREFIX_.'cms_block_lang` (`id_cms_block`, `id_lang`, `name`) VALUES ('.(int)$id_block.', '.(int)$language['id_lang'].', \'Information\')'); + + //save ids cms of block information in new module cms bloc + foreach($ids_cms AS $id_cms) + Db::getInstance()->execute('INSERT INTO `'._DB_PREFIX_.'cms_block_page` (`id_cms_block`, `id_cms`, `is_category`) VALUES ('.(int)$id_block.', '.(int)$id_cms['id_cms'].', 0)'); + } + else + return true; + } + else + return true; +} \ No newline at end of file diff --git a/install-new/upgrade/functions/moduleReinstaller.php b/install-new/upgrade/functions/moduleReinstaller.php new file mode 100644 index 000000000..d54c5dbfd --- /dev/null +++ b/install-new/upgrade/functions/moduleReinstaller.php @@ -0,0 +1,37 @@ + +* @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 moduleReinstaller($moduleName, $force = false) +{ + $module = Module::getInstanceByName($moduleName); + if (!is_object($module)) + die(Tools::displayError()); + if ($module->uninstall() OR $force) + return $module->install(); + return false; +} + diff --git a/install-new/upgrade/functions/move_crossselling.php b/install-new/upgrade/functions/move_crossselling.php new file mode 100644 index 000000000..53d37601d --- /dev/null +++ b/install-new/upgrade/functions/move_crossselling.php @@ -0,0 +1,14 @@ +executeS('SELECT FROM `'._DB_PREFIX_.'module` WHERE `name` = \'crossselling\'')) +{ +Db::getInstance()->execute(' +INSERT INTO `'._DB_PREFIX_.'hook_module` (`id_module`, `id_hook`, `position`) +VALUES ((SELECT `id_module` FROM `'._DB_PREFIX_.'module` WHERE `name` = \'crossselling\'), 9, (SELECT max_position FROM (SELECT MAX(position)+1 as max_position FROM `'._DB_PREFIX_.'hook_module` WHERE `id_hook` = 9) tmp))'); +} + +} + diff --git a/install-new/upgrade/functions/regenerate_level_depth.php b/install-new/upgrade/functions/regenerate_level_depth.php new file mode 100644 index 000000000..23d47cfc6 --- /dev/null +++ b/install-new/upgrade/functions/regenerate_level_depth.php @@ -0,0 +1,58 @@ + +* @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 +*/ + +/** + * Regenerate the entire category tree level_depth + */ +function regenerate_level_depth() +{ + Db::getInstance()->execute('UPDATE `'._DB_PREFIX_.'category` SET `level_depth` = 0 WHERE `id_category` = 1'); + regenerate_children_categories(1, 0); +} + +/** + * Recursively regenerate the level_depth of this category's children + * + * @param int $id_category + * @param int $level_depth + */ +function regenerate_children_categories($id_category, $level_depth) + { + $categories = Db::getInstance()->executeS('SELECT `id_category` FROM `'._DB_PREFIX_.'category` WHERE `id_parent` = '.(int)$id_category); + if (!$categories) + return; + $new_depth = (int)$level_depth + 1; + $cat_ids = ""; + foreach($categories as $category) + { + $cat_ids .= (string)$category['id_category'].','; + regenerate_children_categories($category['id_category'], $new_depth); + } + $cat_ids = substr($cat_ids, 0, -1); + + Db::getInstance()->execute('UPDATE `'._DB_PREFIX_.'category` SET `level_depth` = '.(int)$new_depth.' WHERE `id_category` IN ('.$cat_ids.')'); + } diff --git a/install-new/upgrade/functions/remove_duplicate_category_groups.php b/install-new/upgrade/functions/remove_duplicate_category_groups.php new file mode 100644 index 000000000..9cdfb1468 --- /dev/null +++ b/install-new/upgrade/functions/remove_duplicate_category_groups.php @@ -0,0 +1,52 @@ + +* @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 +*/ + +/** + * Removes duplicates from table category_group caused by a bug in category importing in PS < 1.4.2 + */ +function remove_duplicate_category_groups() +{ + $result = Db::getInstance()->executeS(' + SELECT `id_category`, `id_group`, COUNT(*) as `count` + FROM `'._DB_PREFIX_.'category_group` + GROUP BY `id_category`, `id_group` + ORDER BY `count` DESC'); + + foreach($result as $row) + { + if ((int)$row['count'] > 1) + { + $limit = (int)$row['count'] - 1; + $result = Db::getInstance()->execute(' + DELETE FROM `'._DB_PREFIX_.'category_group` + WHERE `id_category` = '.$row['id_category'].' AND `id_group` = '.$row['id_group'].' + LIMIT '.$limit); + } + else + return; + } +} \ No newline at end of file diff --git a/install-new/upgrade/functions/remove_module_from_hook.php b/install-new/upgrade/functions/remove_module_from_hook.php new file mode 100644 index 000000000..6a70c7be4 --- /dev/null +++ b/install-new/upgrade/functions/remove_module_from_hook.php @@ -0,0 +1,53 @@ + +* @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 remove_module_from_hook($module_name, $hook_name) +{ + $result = false; + + $id_module = Db::getInstance()->getValue(' + SELECT `id_module` FROM `'._DB_PREFIX_.'module` + WHERE `name` = \''.pSQL($module_name).'\'' + ); + + if ((int)$id_module > 0) + { + $id_hook = Db::getInstance()->getValue(' + SELECT `id_hook` FROM `'._DB_PREFIX_.'hook` WHERE `name` = \''.pSQL($hook_name).'\' + '); + + if ((int)$id_hook > 0) + { + $result = Db::getInstance()->execute(' + DELETE FROM `'._DB_PREFIX_.'hook_module` + WHERE `id_module` = '.(int)$id_module.' AND `id_hook` = '.(int)$id_hook); + } + } + + return $result; +} + diff --git a/install-new/upgrade/functions/remove_tab.php b/install-new/upgrade/functions/remove_tab.php new file mode 100644 index 000000000..40697d0b8 --- /dev/null +++ b/install-new/upgrade/functions/remove_tab.php @@ -0,0 +1,11 @@ +execute(' + DELETE t, l + FROM `ps_tab` t LEFT JOIN `PREFIX_tab_lang` l ON (t.id_tab = l.id_tab) + WHERE t.`class_name` = '.pSQL($tabname)); +} + diff --git a/install-new/upgrade/functions/reorderpositions.php b/install-new/upgrade/functions/reorderpositions.php new file mode 100644 index 000000000..6ac69e63a --- /dev/null +++ b/install-new/upgrade/functions/reorderpositions.php @@ -0,0 +1,75 @@ + +* @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 reorderpositions() +{ + /* Clean products positions */ + if ($cat = Category::getCategories(1, false, false)) + foreach($cat AS $i => $categ) + Product::cleanPositions((int)$categ['id_category']); + + //clean Category position and delete old position system + Language::loadLanguages(); + $language = Language::getLanguages(); + $cat_parent = Db::getInstance()->executeS('SELECT DISTINCT c.id_parent FROM `'._DB_PREFIX_.'category` c WHERE id_category != 1'); + foreach($cat_parent AS $parent) + { + $result = Db::getInstance()->executeS(' + SELECT DISTINCT c.*, cl.* + FROM `'._DB_PREFIX_.'category` c + LEFT JOIN `'._DB_PREFIX_.'category_lang` cl ON (c.`id_category` = cl.`id_category` AND `id_lang` = '.(int)(Configuration::get('PS_LANG_DEFAULT')).') + WHERE c.id_parent = '.(int)($parent['id_parent']).' + ORDER BY name ASC'); + foreach($result AS $i => $categ) + { + Db::getInstance()->execute(' + UPDATE `'._DB_PREFIX_.'category` + SET `position` = '.(int)($i).' + WHERE `id_parent` = '.(int)($categ['id_parent']).' + AND `id_category` = '.(int)($categ['id_category'])); + } + + $result = Db::getInstance()->executeS(' + SELECT DISTINCT c.*, cl.* + FROM `'._DB_PREFIX_.'category` c + LEFT JOIN `'._DB_PREFIX_.'category_lang` cl ON (c.`id_category` = cl.`id_category`) + WHERE c.id_parent = '.(int)($parent['id_parent']).' + ORDER BY name ASC'); + + // Remove number from category name + foreach($result AS $i => $categ) + Db::getInstance()->execute('UPDATE `'._DB_PREFIX_.'category` c + LEFT JOIN `'._DB_PREFIX_.'category_lang` cl ON (c.`id_category` = cl.`id_category`) + SET `name` = \''.preg_replace('/^[0-9]+\./', '',$categ['name']).'\' + WHERE c.id_category = '.(int)($categ['id_category']).' AND id_lang = \''.(int)($categ['id_lang']).'\''); + } + + /* Clean CMS positions */ + if ($cms_cat = CMSCategory::getCategories(1, false, false)) + foreach($cms_cat AS $i => $categ) + CMS::cleanPositions((int)($categ['id_cms_category'])); +} \ No newline at end of file diff --git a/install-new/upgrade/functions/setAllGroupsOnHomeCategory.php b/install-new/upgrade/functions/setAllGroupsOnHomeCategory.php new file mode 100644 index 000000000..4e250903e --- /dev/null +++ b/install-new/upgrade/functions/setAllGroupsOnHomeCategory.php @@ -0,0 +1,40 @@ + +* @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 setAllGroupsOnHomeCategory() +{ + $results = Group::getGroups(Configuration::get('PS_LANG_DEFAULT')); + $groups = array(); + foreach ($results AS $result) + $groups[] = $result['id_group']; + if (is_array($groups) && sizeof($groups)) + { + $category = new Category(1); + $category->cleanGroups(); + $category->addGroups($groups); + } +} diff --git a/install-new/upgrade/functions/set_discount_category.php b/install-new/upgrade/functions/set_discount_category.php new file mode 100644 index 000000000..aa54b5367 --- /dev/null +++ b/install-new/upgrade/functions/set_discount_category.php @@ -0,0 +1,37 @@ + +* @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 set_discount_category() +{ + $discounts = Db::getInstance()->executeS('SELECT `id_discount` FROM `'._DB_PREFIX_.'discount`'); + $categories = Db::getInstance()->executeS('SELECT `id_category` FROM `'._DB_PREFIX_.'category`'); + foreach ($discounts AS $discount) + foreach ($categories AS $category) + Db::getInstance()->execute('INSERT INTO `'._DB_PREFIX_.'discount_category` (`id_discount`,`id_category`) VALUES ('.(int)($discount['id_discount']).','.(int)($category['id_category']).')'); +} + + diff --git a/install-new/upgrade/functions/set_payment_module.php b/install-new/upgrade/functions/set_payment_module.php new file mode 100644 index 000000000..85d9ec478 --- /dev/null +++ b/install-new/upgrade/functions/set_payment_module.php @@ -0,0 +1,54 @@ + +* @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 set_payment_module() +{ + // Get all modules then select only payment ones + $modules = Module::getModulesInstalled(); + foreach ($modules AS $module) + { + $file = _PS_MODULE_DIR_.$module['name'].'/'.$module['name'].'.php'; + if (!file_exists($file)) + continue; + $fd = fopen($file, 'r'); + if (!$fd) + continue ; + $content = fread($fd, filesize($file)); + if (preg_match_all('/extends PaymentModule/U', $content, $matches)) + { + Db::getInstance()->execute(' + INSERT INTO `'._DB_PREFIX_.'module_country` (id_module, id_country) + SELECT '.(int)($module['id_module']).', id_country FROM `'._DB_PREFIX_.'country` WHERE active = 1'); + Db::getInstance()->execute(' + INSERT INTO `'._DB_PREFIX_.'module_currency` (id_module, id_currency) + SELECT '.(int)($module['id_module']).', id_currency FROM `'._DB_PREFIX_.'currency` WHERE deleted = 0'); + } + fclose($fd); + } +} + + diff --git a/install-new/upgrade/functions/set_payment_module_group.php b/install-new/upgrade/functions/set_payment_module_group.php new file mode 100644 index 000000000..4747e1415 --- /dev/null +++ b/install-new/upgrade/functions/set_payment_module_group.php @@ -0,0 +1,50 @@ + +* @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 set_payment_module_group() +{ + // Get all modules then select only payment ones + $modules = Module::getModulesInstalled(); + foreach ($modules AS $module) + { + $file = _PS_MODULE_DIR_.$module['name'].'/'.$module['name'].'.php'; + if (!file_exists($file)) + continue; + $fd = @fopen($file, 'r'); + if (!$fd) + continue ; + $content = fread($fd, filesize($file)); + if (preg_match_all('/extends PaymentModule/U', $content, $matches)) + { + Db::getInstance()->execute(' + INSERT INTO `'._DB_PREFIX_.'module_group` (id_module, id_group) + SELECT '.(int)($module['id_module']).', id_group FROM `'._DB_PREFIX_.'group`'); + } + fclose($fd); + } +} + diff --git a/install-new/upgrade/functions/shop_url.php b/install-new/upgrade/functions/shop_url.php new file mode 100644 index 000000000..d24cd5338 --- /dev/null +++ b/install-new/upgrade/functions/shop_url.php @@ -0,0 +1,35 @@ + +* @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 shop_url() +{ + if (!($host = Configuration::get('CANONICAL_URL'))) + $host = Tools::getHttpHost(); + Configuration::updateValue('PS_SHOP_DOMAIN', $host); + Configuration::updateValue('PS_SHOP_DOMAIN_SSL', $host); + return true; +} \ No newline at end of file diff --git a/install-new/upgrade/functions/update_carrier_url.php b/install-new/upgrade/functions/update_carrier_url.php new file mode 100644 index 000000000..05d1d152b --- /dev/null +++ b/install-new/upgrade/functions/update_carrier_url.php @@ -0,0 +1,43 @@ + +* @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 update_carrier_url() +{ + // Get all carriers + $sql = ' + SELECT c.`id_carrier`, c.`url` + FROM `'._DB_PREFIX_.'carrier` c'; + $carriers = Db::getInstance()->executeS($sql); + + // Check each one and erase carrier URL if not correct URL + foreach ($carriers as $carrier) + if (!Validate::isAbsoluteUrl($carrier['url'])) + Db::getInstance()->execute(' + UPDATE `'._DB_PREFIX_.'carrier` + SET `url` = \'\' + WHERE `id_carrier`= '.(int)($carrier['id_carrier'])); +} diff --git a/install-new/upgrade/functions/update_feature_detachable_cache.php b/install-new/upgrade/functions/update_feature_detachable_cache.php new file mode 100644 index 000000000..5076cbf1a --- /dev/null +++ b/install-new/upgrade/functions/update_feature_detachable_cache.php @@ -0,0 +1,38 @@ + +* @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 update_feature_detachable_cache() +{ + Configuration::updateGlobalValue('PS_SPECIFIC_PRICE_FEATURE_ACTIVE', (int)SpecificPrice::isCurrentlyUsed('specific_price')); + Configuration::updateGlobalValue('PS_SCENE_FEATURE_ACTIVE', (int)Scene::isCurrentlyUsed('scene', true)); + Configuration::updateGlobalValue('PS_VIRTUAL_PROD_FEATURE_ACTIVE', (int)ProductDownload::isCurrentlyUsed('product_download', true)); + Configuration::updateGlobalValue('PS_CUSTOMIZATION_FEATURE_ACTIVE', (int)Customization::isCurrentlyUsed()); + Configuration::updateGlobalValue('PS_DISCOUNT_FEATURE_ACTIVE', (int)Discount::isCurrentlyUsed('discount', true)); + Configuration::updateGlobalValue('PS_GROUP_FEATURE_ACTIVE', (int)Group::isCurrentlyUsed()); + Configuration::updateGlobalValue('PS_PACK_FEATURE_ACTIVE', (int)Pack::isCurrentlyUsed()); + Configuration::updateGlobalValue('PS_ALIAS_FEATURE_ACTIVE', (int)Alias::isCurrentlyUsed('alias', true)); +} diff --git a/install-new/upgrade/functions/update_for_13version.php b/install-new/upgrade/functions/update_for_13version.php new file mode 100644 index 000000000..488be28e2 --- /dev/null +++ b/install-new/upgrade/functions/update_for_13version.php @@ -0,0 +1,16 @@ += 0) + return; // if the old version is a 1.4 version + + // Disable the Smarty 3 + Configuration::updateValue('PS_FORCE_SMARTY_2', 1); + // Disable the URL rewritting + Configuration::updateValue('PS_REWRITING_SETTINGS', 0); + // Disable Canonical redirection + Configuration::updateValue('PS_CANONICAL_REDIRECT', 0); +} \ No newline at end of file diff --git a/install-new/upgrade/functions/update_image_size_in_db.php b/install-new/upgrade/functions/update_image_size_in_db.php new file mode 100644 index 000000000..396895e6c --- /dev/null +++ b/install-new/upgrade/functions/update_image_size_in_db.php @@ -0,0 +1,42 @@ + +* @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 update_image_size_in_db() +{ + if (file_exists(realpath(INSTALL_PATH.'/../img').'/logo.jpg')) + { + list($width, $height, $type, $attr) = getimagesize(realpath(INSTALL_PATH.'/../img').'/logo.jpg'); + Configuration::updateValue('SHOP_LOGO_WIDTH', (int)round($width)); + Configuration::updateValue('SHOP_LOGO_HEIGHT', (int)round($height)); + } + if (file_exists(realpath(INSTALL_PATH.'/../modules/editorial').'/homepage_logo.jpg')) + { + list($width, $height, $type, $attr) = getimagesize(realpath(INSTALL_PATH.'/../modules/editorial').'/homepage_logo.jpg'); + Configuration::updateValue('EDITORIAL_IMAGE_WIDTH', (int)round($width)); + Configuration::updateValue('EDITORIAL_IMAGE_HEIGHT', (int)round($height)); + } +} diff --git a/install-new/upgrade/functions/update_module_followup.php b/install-new/upgrade/functions/update_module_followup.php new file mode 100644 index 000000000..950e2a31e --- /dev/null +++ b/install-new/upgrade/functions/update_module_followup.php @@ -0,0 +1,37 @@ + +* @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 update_module_followup() +{ + Configuration::loadConfiguration(); + $followup = Module::getInstanceByName('followup'); + if (!$followup->id) + return; + + Db::getInstance()->execute('ALTER TABLE `'._DB_PREFIX_.'log_email` ADD INDEX `date_add`(`date_add`), ADD INDEX `id_cart`(`id_cart`);'); +} + diff --git a/install-new/upgrade/functions/update_module_loyalty.php b/install-new/upgrade/functions/update_module_loyalty.php new file mode 100644 index 000000000..3eb22d93b --- /dev/null +++ b/install-new/upgrade/functions/update_module_loyalty.php @@ -0,0 +1,45 @@ + +* @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 +*/ + +// backward compatibility vouchers should be available in all categories +function update_module_loyalty() +{ + if (Configuration::get('PS_LOYALTY_POINT_VALUE') !== false) + { + $category_list = ''; + + foreach(Category::getSimpleCategories(Configuration::get('PS_LANG_DEFAULT')) as $category) + $category_list .= $category['id_category'].','; + + if (!empty($category_list)) + { + $category_list = rtrim($category_list, ','); + Configuration::updateValue('PS_LOYALTY_VOUCHER_CATEGORY', $category_list); + } + } +} + diff --git a/install-new/upgrade/functions/update_modules_sql.php b/install-new/upgrade/functions/update_modules_sql.php new file mode 100644 index 000000000..0ea304207 --- /dev/null +++ b/install-new/upgrade/functions/update_modules_sql.php @@ -0,0 +1,41 @@ + +* @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 update_modules_sql() +{ + Configuration::loadConfiguration(); + $blocklink = Module::getInstanceByName('blocklink'); + if ($blocklink->id) + Db::getInstance()->execute('ALTER IGNORE TABLE `'._DB_PREFIX_.'blocklink_lang` ADD PRIMARY KEY (`id_link`, `id_lang`);'); + $productComments = Module::getInstanceByName('productcomments'); + if ($productComments->id) + { + Db::getInstance()->execute('ALTER IGNORE TABLE `'._DB_PREFIX_.'product_comment_grade` ADD PRIMARY KEY (`id_product_comment`, `id_product_comment_criterion`);'); + Db::getInstance()->execute('ALTER IGNORE TABLE `'._DB_PREFIX_.'product_comment_criterion` DROP PRIMARY KEY, ADD PRIMARY KEY (`id_product_comment_criterion`, `id_lang`);'); + Db::getInstance()->execute('ALTER IGNORE TABLE `'._DB_PREFIX_.'product_comment_criterion_product` ADD PRIMARY KEY(`id_product`, `id_product_comment_criterion`);'); + } +} diff --git a/install-new/upgrade/functions/update_order_detail_taxes.php b/install-new/upgrade/functions/update_order_detail_taxes.php new file mode 100644 index 000000000..2ae5f856f --- /dev/null +++ b/install-new/upgrade/functions/update_order_detail_taxes.php @@ -0,0 +1,45 @@ +executeS(' + SELECT `id_order_detail`, `tax_name`, `tax_rate` FROM `'._DB_PREFIX_.'order_detail` + '); + + foreach ($order_detail_taxes as $order_detail_tax) + { + if ($order_detail_tax['tax_rate'] == '0.000') + continue; + + $alternative_tax_name = 'Tax '.$order_detail_tax['tax_rate']; + $create_tax = true; + + if ($id_tax = (int)Tax::getTaxIdByName($order_detail_tax['tax_name'], false) || $id_tax = (int)Tax::getTaxIdByName($alternative_tax_name, false)) + { + $tax = new Tax($id_tax); + if (Validate::isLoadedObject($tax)) + if ((string)$tax->rate == (string)$order_detail_tax['tax_rate']) + $create_tax = false; + else + echo (string)$tax->rate.'!='.(string)$order_detail_tax['tax_rate']; + } + + if ($create_tax) + { + $tax = new Tax(); + $tax->rate = (float)$order_detail_tax['tax_rate']; + $tax->name[Configuration::get('PS_LANG_DEFAULT')] = (isset($order_detail_tax['tax_name']) ? $order_detail_tax['tax_name'] : $alternative_tax_name); + $tax->deleted = true; + $tax->active = false; + $tax->save(); + + $id_tax = $tax->id; + } + + Db::getInstance()->execute(' + INSERT INTO `'._DB_PREFIX_.'order_detail_tax` (`id_order_detail`, `id_tax`) + VALUES ('.(int)$order_detail_tax['id_order_detail'].','.$id_tax.') + '); + + } +} \ No newline at end of file diff --git a/install-new/upgrade/functions/update_order_details.php b/install-new/upgrade/functions/update_order_details.php new file mode 100644 index 000000000..e55ed28e9 --- /dev/null +++ b/install-new/upgrade/functions/update_order_details.php @@ -0,0 +1,39 @@ + +* @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 update_order_details() +{ + $res = Db::getInstance()->executeS('SHOW COLUMNS FROM `'._DB_PREFIX_.'order_detail` LIKE \'reduction_percent\''); + + if (sizeof($res) == 0) + { + Db::getInstance()->execute('ALTER TABLE `'._DB_PREFIX_.'order_detail` ADD `reduction_percent` DECIMAL(10, 2) NOT NULL default \'0.00\' AFTER `product_price`'); + Db::getInstance()->execute('ALTER TABLE `'._DB_PREFIX_.'order_detail` ADD `reduction_amount` DECIMAL(20, 6) NOT NULL default \'0.000000\' AFTER `reduction_percent`'); + } +} + + diff --git a/install-new/upgrade/functions/update_products_ecotax_v133.php b/install-new/upgrade/functions/update_products_ecotax_v133.php new file mode 100644 index 000000000..a15717dc9 --- /dev/null +++ b/install-new/upgrade/functions/update_products_ecotax_v133.php @@ -0,0 +1,36 @@ + +* @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 update_products_ecotax_v133() +{ + global $oldversion; + if($oldversion < '1.3.3.0') + { + Db::getInstance()->execute('UPDATE `'._DB_PREFIX_.'product` SET `ecotax` = \'0\' WHERE 1'); + Db::getInstance()->execute('UPDATE `'._DB_PREFIX_.'order_detail` SET `ecotax` = \'0\' WHERE 1;'); + } +} \ No newline at end of file diff --git a/install-new/upgrade/functions/updateproductcomments.php b/install-new/upgrade/functions/updateproductcomments.php new file mode 100644 index 000000000..8a933b323 --- /dev/null +++ b/install-new/upgrade/functions/updateproductcomments.php @@ -0,0 +1,58 @@ + +* @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 updateproductcomments() +{ + if (Db::getInstance()->executeS('SELECT * FROM '._DB_PREFIX_.'product_comment') !== false) + { + Db::getInstance()->execute('CREATE TABLE IF NOT EXISTS '._DB_PREFIX_.'product_comment_criterion_lang ( + `id_product_comment_criterion` INT( 11 ) UNSIGNED NOT NULL , + `id_lang` INT(11) UNSIGNED NOT NULL , + `name` VARCHAR(64) NOT NULL , + PRIMARY KEY ( `id_product_comment_criterion` , `id_lang` ) + ) ENGINE='._MYSQL_ENGINE_.' DEFAULT CHARSET=utf8'); + Db::getInstance()->execute('CREATE TABLE IF NOT EXISTS '._DB_PREFIX_.'product_comment_criterion_category ( + `id_product_comment_criterion` int(10) unsigned NOT NULL, + `id_category` int(10) unsigned NOT NULL, + PRIMARY KEY(`id_product_comment_criterion`, `id_category`), + KEY `id_category` (`id_category`) + ) ENGINE='._MYSQL_ENGINE_.' DEFAULT CHARSET=utf8'); + Db::getInstance()->execute('ALTER TABLE '._DB_PREFIX_.'product_comment ADD `id_guest` INT(11) NULL AFTER `id_customer`'); + Db::getInstance()->execute('ALTER TABLE '._DB_PREFIX_.'product_comment ADD `customer_name` varchar(64) NULL AFTER `content`'); + Db::getInstance()->execute('ALTER TABLE '._DB_PREFIX_.'product_comment ADD `deleted` tinyint(1) NOT NULL AFTER `validate`'); + Db::getInstance()->execute('ALTER TABLE '._DB_PREFIX_.'product_comment ADD INDEX (id_customer)'); + Db::getInstance()->execute('ALTER TABLE '._DB_PREFIX_.'product_comment ADD INDEX (id_guest)'); + Db::getInstance()->execute('ALTER TABLE '._DB_PREFIX_.'product_comment ADD INDEX (id_product)'); + Db::getInstance()->execute('ALTER TABLE '._DB_PREFIX_.'product_comment_criterion DROP `id_lang`'); + Db::getInstance()->execute('ALTER TABLE '._DB_PREFIX_.'product_comment_criterion DROP `name`'); + Db::getInstance()->execute('ALTER TABLE '._DB_PREFIX_.'product_comment_criterion ADD `id_product_comment_criterion_type` tinyint(1) NOT NULL AFTER `id_product_comment_criterion`'); + Db::getInstance()->execute('ALTER TABLE '._DB_PREFIX_.'product_comment_criterion ADD `active` tinyint(1) NOT NULL AFTER `id_product_comment_criterion_type`'); + Db::getInstance()->execute('ALTER IGNORE TABLE `'._DB_PREFIX_.'product_comment` ADD `title` VARCHAR(64) NULL AFTER `id_guest`;'); + } +} + + diff --git a/install-new/upgrade/functions/updatetabicon_from_11version.php b/install-new/upgrade/functions/updatetabicon_from_11version.php new file mode 100644 index 000000000..13a2854ca --- /dev/null +++ b/install-new/upgrade/functions/updatetabicon_from_11version.php @@ -0,0 +1,47 @@ + +* @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 updatetabicon_from_11version() +{ + global $oldversion; + if (version_compare($oldversion,'1.5.0.0','<')) + { + + $rows = Db::getInstance()->executeS('SELECT `id_tab`,`class_name` FROM '._DB_PREFIX_.'tab'); + if (sizeof($rows)) + { + $img_dir = scandir(_PS_IMG_DIR_.'/t/'); + $result = true; + foreach ($rows as $tab) + { + if (file_exists(_PS_IMG_DIR_.'/t/'.$tab['id_tab'].'.gif') + AND !file_exists(_PS_IMG_DIR_.'/t/'.$tab['class_name'].'.gif')) + $result &= rename(_PS_IMG_DIR_.'/t/'.$tab['id_tab'].'.gif',_PS_IMG_DIR_.'/t/'.$tab['class_name'].'.gif'); + } + } + } + return true; +} diff --git a/install-new/upgrade/sql/0.9.1.2.sql b/install-new/upgrade/sql/0.9.1.2.sql new file mode 100644 index 000000000..4ff1333c6 --- /dev/null +++ b/install-new/upgrade/sql/0.9.1.2.sql @@ -0,0 +1,30 @@ +/* STRUCTURE */ +CREATE TABLE `PREFIX_product_sale` ( +`id_product` INT( 10 ) UNSIGNED NOT NULL , +`quantity` INT( 10 ) UNSIGNED NOT NULL DEFAULT '0', +`nb_vente` INT( 10 ) UNSIGNED NOT NULL DEFAULT '0', +`date_upd` DATE NOT NULL , +PRIMARY KEY ( `id_product` ) +) ENGINE = MYISAM DEFAULT CHARSET=utf8; + +ALTER TABLE `PREFIX_image_type` + ADD `manufacturers` BOOL NOT NULL DEFAULT '1' AFTER `categories`; + +ALTER TABLE `PREFIX_address` + ADD `id_manufacturer` INT( 10 ) UNSIGNED NOT NULL AFTER `id_customer` ; + +ALTER TABLE `PREFIX_address` + ADD `id_supplier` INT( 10 ) UNSIGNED NOT NULL AFTER `id_manufacturer` ; + +ALTER TABLE `PREFIX_order_discount` + ADD `id_discount` INT( 10 ) UNSIGNED NOT NULL AFTER `id_order` ; + +ALTER TABLE `PREFIX_discount` + ADD `quantity_per_user` INT( 10 ) UNSIGNED NOT NULL DEFAULT '1' AFTER `quantity` ; + +ALTER TABLE `PREFIX_contact` CHANGE `position` `position` TINYINT( 2 ) UNSIGNED NOT NULL DEFAULT '0'; + +/* CONTENTS */ + +/* CONFIGURATION VARIABLE */ + diff --git a/install-new/upgrade/sql/0.9.1.sql b/install-new/upgrade/sql/0.9.1.sql new file mode 100644 index 000000000..5b0fabb09 --- /dev/null +++ b/install-new/upgrade/sql/0.9.1.sql @@ -0,0 +1,9 @@ +/* STRUCTURE */ +ALTER TABLE `PREFIX_product` CHANGE `price` `price` DECIMAL(13,6) NOT NULL DEFAULT '0.000000'; + +/* CONTENTS */ +DELETE FROM `PREFIX_carrier_lang` WHERE `id_carrier` = (SELECT c.`id_carrier` FROM `PREFIX_carrier` c WHERE c.`name` = 'My download manager' LIMIT 1); +DELETE FROM `PREFIX_carrier` WHERE `name` = 'My download manager'; + +/* Conf vars */ +INSERT INTO `PREFIX_configuration` (`name`, `value`, `date_add`, `date_upd`) VALUES ('PS_TAX_NO', '0', NOW(), NOW()); \ No newline at end of file diff --git a/install-new/upgrade/sql/0.9.5.1.sql b/install-new/upgrade/sql/0.9.5.1.sql new file mode 100644 index 000000000..31bc41c99 --- /dev/null +++ b/install-new/upgrade/sql/0.9.5.1.sql @@ -0,0 +1,66 @@ +/* STRUCTURE */ +ALTER TABLE `PREFIX_order_state` + ADD `logable` TINYINT(1) NOT NULL DEFAULT 0; +ALTER TABLE `PREFIX_product_sale` + CHANGE `nb_vente` `sale_nbr` INT(10) UNSIGNED NOT NULL DEFAULT 0; +ALTER TABLE `PREFIX_carrier` + CHANGE `tax` `id_tax` INT(10) UNSIGNED NULL DEFAULT 0 AFTER `id_carrier`; +ALTER TABLE `PREFIX_carrier` + ADD `shipping_handling` TINYINT(1) UNSIGNED NOT NULL DEFAULT 1 AFTER `deleted`; +ALTER TABLE `PREFIX_address` + CHANGE `id_country` `id_country` INT(10) UNSIGNED NOT NULL DEFAULT 0, + CHANGE `id_customer` `id_customer` INT(10) UNSIGNED NOT NULL DEFAULT 0, + CHANGE `id_manufacturer` `id_manufacturer` INT(10) UNSIGNED NOT NULL DEFAULT 0; +RENAME TABLE `PREFIX_product_attribute_combinaison` TO `PREFIX_product_attribute_combination`; +ALTER TABLE `PREFIX_product_attribute_combination` + DROP INDEX `product_attribute_combinaison_index`, + ADD PRIMARY KEY (`id_attribute`, `id_product_attribute`); + +CREATE TABLE `PREFIX_carrier_zone` ( + id_carrier int(10) unsigned NOT NULL, + id_zone int(10) unsigned NOT NULL, + INDEX carrier_zone_index(id_carrier, id_zone) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +CREATE TABLE `PREFIX_tax_zone` ( + id_tax int(10) unsigned NOT NULL, + id_zone int(10) unsigned NOT NULL, + INDEX tax_zone_index(id_tax, id_zone) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + + +/* CONTENTS */ + +/* Rename old tab */ +UPDATE `PREFIX_tab_lang` SET `name` = 'Produits' + WHERE `id_tab` = (SELECT `id_tab` FROM `PREFIX_tab` t WHERE t.class_name = 'AdminPPreferences') + AND `id_lang` = (SELECT `id_lang` FROM `PREFIX_lang` l WHERE l.iso_code = 'fr'); +UPDATE `PREFIX_tab_lang` SET `name` = 'Emails' + WHERE `id_tab` = (SELECT `id_tab` FROM `PREFIX_tab` t WHERE t.class_name = 'AdminEmails') + AND `id_lang` = (SELECT `id_lang` FROM `PREFIX_lang` l WHERE l.iso_code = 'fr'); +UPDATE `PREFIX_tab_lang` SET `name` = 'Images' + WHERE `id_tab` = (SELECT `id_tab` FROM `PREFIX_tab` t WHERE t.class_name = 'AdminImages') + AND `id_lang` = (SELECT `id_lang` FROM `PREFIX_lang` l WHERE l.iso_code = 'fr'); + +/* New BankWire state */ +UPDATE `PREFIX_order_state` SET `logable` = 1 WHERE `id_order_state` < 6 AND `id_order_state` > 1; +INSERT INTO `PREFIX_order_state` (`id_order_state`, `invoice`, `send_email`, `color`, `unremovable`, `logable`) VALUES (10, 0, 1, 'lightblue', 1, 0); +INSERT INTO `PREFIX_order_state_lang` (`id_order_state`, `id_lang`, `name`, `template`) VALUES +(10, 1, 'Awaiting bank wire payment', 'bankwire'), +(10, 2, 'En attente du paiement par virement bancaire', 'bankwire'); + +/* New hook */ +INSERT INTO `PREFIX_hook` (`name`, `title`, `description`, `position`) VALUES ('updateOrderStatus', 'Order''s status update event', 'Launch modules when the order''s status of an order change.', 0); + +/* Adding zones for tax/carrier */ +INSERT INTO `PREFIX_tax_zone` (id_tax, id_zone) (SELECT id_tax, id_zone FROM `PREFIX_tax` CROSS JOIN `PREFIX_zone`); +INSERT INTO `PREFIX_carrier_zone` (id_carrier, id_zone) (SELECT id_carrier, id_zone FROM `PREFIX_carrier` CROSS JOIN `PREFIX_zone`); + +/* CONFIGURATION VARIABLE */ + +INSERT INTO `PREFIX_configuration` (`name`, `value`, `date_add`, `date_upd`) VALUES +('PREFIX_PURCHASE_MINIMUM', '0', NOW(), NOW()), +('PREFIX_SHOP_ENABLE', '1', NOW(), NOW()); + +/* Adding tab Contact */ +/* PHP:add_new_tab(AdminContact, fr:Coordonnées|es:Datos|en:Contact Information|de:Kontaktinformation|it:Informazioni di contatto, 8); */; \ No newline at end of file diff --git a/install-new/upgrade/sql/0.9.5.2.sql b/install-new/upgrade/sql/0.9.5.2.sql new file mode 100644 index 000000000..57f9b765c --- /dev/null +++ b/install-new/upgrade/sql/0.9.5.2.sql @@ -0,0 +1,5 @@ +/* STRUCTURE */ + +/* CONTENTS */ + +/* CONFIGURATION VARIABLE */ \ No newline at end of file diff --git a/install-new/upgrade/sql/0.9.6.1.sql b/install-new/upgrade/sql/0.9.6.1.sql new file mode 100644 index 000000000..fa371d9b9 --- /dev/null +++ b/install-new/upgrade/sql/0.9.6.1.sql @@ -0,0 +1,51 @@ +/* STRUCTURE */ + +CREATE TABLE `PREFIX_alias` ( + alias varchar(255) NOT NULL, + search varchar(255) NOT NULL, + active tinyint(1) NOT NULL default 1, + id_alias int(10) NOT NULL auto_increment, + PRIMARY KEY (id_alias), + UNIQUE KEY alias (alias) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +ALTER TABLE `PREFIX_configuration` + ADD UNIQUE `name` (`name`); +ALTER TABLE `PREFIX_product` + ADD `wholesale_price` DECIMAL( 13, 6 ) NOT NULL AFTER `price`; +ALTER TABLE `PREFIX_range_weight` + CHANGE `delimiter1` `delimiter1` DECIMAL( 13, 6 ) NOT NULL DEFAULT '0.000000'; +ALTER TABLE `PREFIX_range_weight` + CHANGE `delimiter2` `delimiter2` DECIMAL( 13, 6 ) NOT NULL DEFAULT '0.000000'; + ALTER TABLE `PREFIX_discount_type_lang` + CHANGE `name` `name` VARCHAR(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL; + ALTER TABLE `PREFIX_product` + CHANGE `bargain` `on_sale` TINYINT(1) UNSIGNED NOT NULL DEFAULT 0; +ALTER TABLE `PREFIX_image_type` + ADD `suppliers` BOOL NOT NULL DEFAULT 1; + +/* CONTENTS */ + +/* Adding tab alias */ +INSERT INTO `PREFIX_tab` (`id_parent`, `class_name`, `position`) VALUES ((SELECT tmp.id_tab FROM (SELECT `id_tab` FROM `PREFIX_tab` t WHERE t.class_name = 'AdminTools' LIMIT 1) AS tmp), 'AdminAliases', 9); +INSERT INTO `PREFIX_tab_lang` (id_lang, id_tab, name) ( + SELECT id_lang, + (SELECT `id_tab` FROM `PREFIX_tab` t WHERE t.class_name = 'AdminAliases' LIMIT 1), + 'Alias' FROM `PREFIX_lang`); +INSERT INTO `PREFIX_access` (`id_profile`, `id_tab`, `view`, `add`, `edit`, `delete`) + VALUES ('1', (SELECT `id_tab` FROM `PREFIX_tab` t WHERE t.class_name = 'AdminAliases' LIMIT 1), '1', '1', '1', '1'); + +/* Adding tab import */ +INSERT INTO `PREFIX_tab` (`id_parent`, `class_name`, `position`) VALUES ((SELECT tmp.id_tab FROM (SELECT `id_tab` FROM `PREFIX_tab` t WHERE t.class_name = 'AdminTools' LIMIT 1) AS tmp), 'AdminImport', 10); +INSERT INTO `PREFIX_tab_lang` (id_lang, id_tab, name) ( + SELECT id_lang, + (SELECT `id_tab` FROM `PREFIX_tab` t WHERE t.class_name = 'AdminImport' LIMIT 1), + 'Import' FROM `PREFIX_lang`); +INSERT INTO `PREFIX_access` (`id_profile`, `id_tab`, `view`, `add`, `edit`, `delete`) + VALUES ('1', (SELECT `id_tab` FROM `PREFIX_tab` t WHERE t.class_name = 'AdminImport' LIMIT 1), '1', '1', '1', '1'); + +INSERT INTO `PREFIX_hook` (`name`, `title`, `description`) +VALUES ('adminOrder', 'Display in Back-Office, tab AdminOrder', 'Launch modules when the tab AdminOrder is displayed on back-office.'); + + +/* CONFIGURATION VARIABLE */ \ No newline at end of file diff --git a/install-new/upgrade/sql/0.9.6.2.sql b/install-new/upgrade/sql/0.9.6.2.sql new file mode 100644 index 000000000..c55fefbb8 --- /dev/null +++ b/install-new/upgrade/sql/0.9.6.2.sql @@ -0,0 +1,7 @@ +/* STRUCTURE */ + +ALTER TABLE `PREFIX_product` CHANGE `wholesale_price` `wholesale_price` DECIMAL(13, 6) NULL; + +/* CONTENTS */ + +/* CONFIGURATION VARIABLE */ \ No newline at end of file diff --git a/install-new/upgrade/sql/0.9.7.1.sql b/install-new/upgrade/sql/0.9.7.1.sql new file mode 100644 index 000000000..5a8ded7f5 --- /dev/null +++ b/install-new/upgrade/sql/0.9.7.1.sql @@ -0,0 +1,14 @@ +/* STRUCTURE */ + +ALTER TABLE `PREFIX_module` ADD INDEX (`name`); + +/* CONTENTS */ + +INSERT INTO `PREFIX_hook` (`name` , `title`, `description`, `position`) VALUES +('footer', 'Footer', 'Add block in footer', 1), +('PDFInvoice', 'PDF Invoice', 'Allow the display of extra informations into the PDF invoice', 0); +UPDATE `PREFIX_hook` SET `description` = 'Add blocks in the header', `position` = '1' WHERE `name` = 'header' LIMIT 1 ; +UPDATE `PREFIX_currency` SET `iso_code` = 'XXX' WHERE `iso_code` IS NULL; + + +/* CONFIGURATION VARIABLE */ \ No newline at end of file diff --git a/install-new/upgrade/sql/0.9.7.2.sql b/install-new/upgrade/sql/0.9.7.2.sql new file mode 100644 index 000000000..c0ebf4949 --- /dev/null +++ b/install-new/upgrade/sql/0.9.7.2.sql @@ -0,0 +1,21 @@ +/* STRUCTURE */ + +CREATE TABLE `PREFIX_discount_quantity` ( + id_discount_quantity INT UNSIGNED NOT NULL auto_increment, + id_discount_type INT UNSIGNED NOT NULL, + id_product INT UNSIGNED NOT NULL, + id_product_attribute INT UNSIGNED NULL, + quantity INT UNSIGNED NOT NULL, + value DECIMAL(10,2) UNSIGNED NOT NULL, + PRIMARY KEY (id_discount_quantity) +) ENGINE=MYISAM DEFAULT CHARSET=utf8; + +ALTER TABLE `PREFIX_product` ADD quantity_discount BOOL NULL DEFAULT 0 AFTER out_of_stock; + +/* CONTENTS */ + + +/* CONFIGURATION VARIABLE */ + +UPDATE `PREFIX_configuration` SET name = 'PS_TAX', value = 1 WHERE name = 'PS_TAX_NO' AND value = 0; +UPDATE `PREFIX_configuration` SET name = 'PS_TAX', value = 0 WHERE name = 'PS_TAX_NO' AND value = 1; \ No newline at end of file diff --git a/install-new/upgrade/sql/0.9.sql b/install-new/upgrade/sql/0.9.sql new file mode 100644 index 000000000..abef1ee07 --- /dev/null +++ b/install-new/upgrade/sql/0.9.sql @@ -0,0 +1,39 @@ +/* STRUCTURE */ + +ALTER TABLE `PREFIX_currency` ADD `iso_code` VARCHAR( 3 ) NOT NULL DEFAULT '0' AFTER `name`; +ALTER TABLE `PREFIX_product_attribute` ADD `default_on` TINYINT( 1 ) UNSIGNED NOT NULL DEFAULT '0' AFTER `weight`; +ALTER TABLE `PREFIX_carrier` ADD `tax` INT( 10 ) UNSIGNED NOT NULL DEFAULT '0' AFTER `deleted`; + +ALTER TABLE `PREFIX_order_detail` + ADD `download_hash` VARCHAR(255) default NULL AFTER `tax_rate`, + ADD `download_nb` INT(10) unsigned default 0 AFTER `tax_rate`, + ADD `download_deadline` DATETIME DEFAULT NULL AFTER `tax_rate`; + +CREATE TABLE `PREFIX_product_download` ( + `id_product_download` INT(10) unsigned NOT NULL auto_increment, + `id_product` INT(10) unsigned NOT NULL, + `display_filename` VARCHAR(255) default NULL, + `physically_filename` VARCHAR(255) default NULL, + `date_deposit` DATETIME NOT NULL, + `date_expiration` DATETIME default NULL, + `nb_days_accessible` int(10) unsigned default NULL, + `nb_downloadable` int(10) unsigned default 1, + PRIMARY KEY (`id_product_download`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + + +/* CONTENTS */ + +/* Adding tab Appearance */ +UPDATE `PREFIX_tab` SET `class_name` = 'AdminAppearance' WHERE class_name = 'AdminHomepage'; +UPDATE `PREFIX_tab_lang` SET `name` = 'Appearance' + WHERE `id_tab` = (SELECT `id_tab` FROM `PREFIX_tab` t WHERE t.class_name = 'AdminAppearance'); +UPDATE `PREFIX_tab_lang` SET `name` = 'Apparence' + WHERE `id_tab` = (SELECT `id_tab` FROM `PREFIX_tab` t WHERE t.class_name = 'AdminAppearance') + AND `id_lang` = (SELECT `id_lang` FROM `PREFIX_lang` l WHERE l.iso_code = 'fr'); + +/* Adding iso_code to currency */ +UPDATE `PREFIX_currency` SET `iso_code` = 'XXX'; + +/* Conf vars */ +INSERT INTO `PREFIX_configuration` (`name`, `value`, `date_add`, `date_upd`) VALUES ('PS_DISPLAY_QTIES', '1', NOW(), NOW()); \ No newline at end of file diff --git a/install-new/upgrade/sql/1.0.0.1.sql b/install-new/upgrade/sql/1.0.0.1.sql new file mode 100644 index 000000000..1aafc5d8f --- /dev/null +++ b/install-new/upgrade/sql/1.0.0.1.sql @@ -0,0 +1,122 @@ +/* PHP */ +/* PHP:latin1_database_to_utf8(); */; + +/* STRUCTURE */ +SET NAMES 'utf8'; + +CREATE TABLE PREFIX_attribute_impact ( + id_attribute_impact int(11) NOT NULL AUTO_INCREMENT, + id_product int(11) NOT NULL, + id_attribute int(11) NOT NULL, + weight float NOT NULL, + price decimal(10,2) NOT NULL, + PRIMARY KEY (id_attribute_impact), + UNIQUE KEY id_product (id_product,id_attribute) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +CREATE TABLE PREFIX_supplier_lang ( + id_supplier INTEGER UNSIGNED NOT NULL, + id_lang INTEGER UNSIGNED NOT NULL, + description TEXT NULL, + INDEX supplier_lang_index(id_supplier, id_lang) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +CREATE TABLE PREFIX_manufacturer_lang ( + id_manufacturer INTEGER UNSIGNED NOT NULL, + id_lang INTEGER UNSIGNED NOT NULL, + description TEXT NULL, + INDEX manufacturer_lang_index(id_manufacturer, id_lang) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +CREATE TABLE PREFIX_state ( + id_state int(10) unsigned NOT NULL AUTO_INCREMENT, + id_country int(11) NOT NULL, + name varchar(64) NOT NULL, + iso_code varchar(3) NOT NULL, + active tinyint(1) NOT NULL default 0, + PRIMARY KEY (id_state) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +ALTER TABLE PREFIX_customer ADD secure_key VARCHAR(32) NOT NULL DEFAULT '-1' AFTER id_gender; +ALTER TABLE PREFIX_orders ADD secure_key VARCHAR(32) NOT NULL DEFAULT '-1' AFTER id_address_invoice; +ALTER TABLE PREFIX_product ADD id_category_default INT NULL AFTER id_tax; +ALTER TABLE PREFIX_category_product ADD position INTEGER UNSIGNED NOT NULL DEFAULT 0 AFTER id_product; +ALTER TABLE PREFIX_product ADD INDEX (id_category_default); +ALTER TABLE PREFIX_order_detail ADD ecotax DECIMAL(10, 2) NOT NULL DEFAULT 0 AFTER tax_rate; +ALTER TABLE PREFIX_employee + CHANGE name lastname VARCHAR(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, + CHANGE surname firstname VARCHAR(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL; +ALTER TABLE PREFIX_address + CHANGE name lastname VARCHAR(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, + CHANGE surname firstname VARCHAR(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL; +ALTER TABLE PREFIX_customer + CHANGE name lastname VARCHAR(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL , + CHANGE surname firstname VARCHAR(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL; +ALTER TABLE PREFIX_quick_access ADD new_window TINYINT( 1 ) NOT NULL DEFAULT 0 AFTER id_quick_access; + +/* CONTENTS */ +UPDATE PREFIX_hook_module SET id_hook = 14 WHERE id_hook = 9; +UPDATE PREFIX_quick_access SET new_window = 1 WHERE id_quick_access = 2 LIMIT 1; +INSERT INTO PREFIX_hook (name, title, description, position) VALUES ('orderConfirmation', 'Order confirmation page', 'Called on order confirmation page', 0); +UPDATE PREFIX_order_detail odt + SET product_price = ( + odt.product_price * ( + SELECT conversion_rate FROM PREFIX_currency c, PREFIX_orders o WHERE o.id_order = odt.id_order AND c.id_currency = o.id_currency + ) +); +UPDATE PREFIX_product p SET p.id_category_default = (SELECT id_category FROM PREFIX_category_product cp WHERE cp.id_product = p.id_product GROUP BY id_product ORDER BY cp.id_category ASC); +UPDATE PREFIX_category_product cp SET cp.position= cp.id_product; + +/* NEW TABS */ + +INSERT INTO PREFIX_tab (id_parent, class_name, position) VALUES ((SELECT tmp.`id_tab` FROM (SELECT `id_tab` FROM PREFIX_tab t WHERE t.class_name = 'AdminOrders' LIMIT 1) AS tmp), 'AdminPrintPDF', (SELECT tmp.max FROM (SELECT MAX(position) max FROM `PREFIX_tab` WHERE id_parent = (SELECT tmp.`id_tab` FROM (SELECT `id_tab` FROM PREFIX_tab t WHERE t.class_name = 'AdminOrders' LIMIT 1) AS tmp )) AS tmp)); +INSERT INTO PREFIX_tab_lang (id_lang, id_tab, name) ( + SELECT id_lang, + (SELECT id_tab FROM PREFIX_tab t WHERE t.class_name = 'AdminPrintPDF' LIMIT 1), + 'Print invoices' FROM PREFIX_lang); +UPDATE `PREFIX_tab_lang` SET `name` = 'Impression factures' + WHERE `id_tab` = (SELECT `id_tab` FROM `PREFIX_tab` t WHERE t.class_name = 'AdminPrintPDF') + AND `id_lang` = (SELECT `id_lang` FROM `PREFIX_lang` l WHERE l.iso_code = 'fr'); +INSERT INTO PREFIX_access (id_profile, id_tab, `view`, `add`, edit, `delete`) VALUES ('1', (SELECT id_tab FROM PREFIX_tab t WHERE t.class_name = 'AdminPrintPDF' LIMIT 1), 1, 1, 1, 1); + +INSERT INTO PREFIX_tab (id_parent, class_name, position) VALUES (-1, 'AdminSearch', 2); +INSERT INTO PREFIX_tab_lang (id_lang, id_tab, name) ( + SELECT id_lang, + (SELECT id_tab FROM PREFIX_tab t WHERE t.class_name = 'AdminSearch' LIMIT 1), + 'Search' FROM PREFIX_lang); +UPDATE `PREFIX_tab_lang` SET `name` = 'Recherche' + WHERE `id_tab` = (SELECT `id_tab` FROM `PREFIX_tab` t WHERE t.class_name = 'AdminSearch') + AND `id_lang` = (SELECT `id_lang` FROM `PREFIX_lang` l WHERE l.iso_code = 'fr'); +INSERT INTO PREFIX_access (id_profile, id_tab, `view`, `add`, edit, `delete`) VALUES ('1', (SELECT id_tab FROM PREFIX_tab t WHERE t.class_name = 'AdminSearch' LIMIT 1), 1, 1, 1, 1); + +INSERT INTO PREFIX_tab (id_parent, class_name, position) VALUES ((SELECT tmp.`id_tab` FROM (SELECT `id_tab` FROM PREFIX_tab t WHERE t.class_name = 'AdminPreferences' LIMIT 1) AS tmp), 'AdminLocalization', (SELECT tmp.max FROM (SELECT MAX(position) max FROM `PREFIX_tab` WHERE id_parent = (SELECT tmp.`id_tab` FROM (SELECT `id_tab` FROM PREFIX_tab t WHERE t.class_name = 'AdminPreferences' LIMIT 1) AS tmp )) AS tmp)); +INSERT INTO PREFIX_tab_lang (id_lang, id_tab, name) ( + SELECT id_lang, + (SELECT id_tab FROM PREFIX_tab t WHERE t.class_name = 'AdminLocalization' LIMIT 1), + 'Localization' FROM PREFIX_lang); +UPDATE `PREFIX_tab_lang` SET `name` = 'Localisation' + WHERE `id_tab` = (SELECT `id_tab` FROM `PREFIX_tab` t WHERE t.class_name = 'AdminLocalization') + AND `id_lang` = (SELECT `id_lang` FROM `PREFIX_lang` l WHERE l.iso_code = 'fr'); +INSERT INTO PREFIX_access (id_profile, id_tab, `view`, `add`, edit, `delete`) VALUES ('1', (SELECT id_tab FROM PREFIX_tab t WHERE t.class_name = 'AdminLocalization' LIMIT 1), 1, 1, 1, 1); + +INSERT INTO PREFIX_tab (id_parent, class_name, position) VALUES ((SELECT tmp.`id_tab` FROM (SELECT `id_tab` FROM PREFIX_tab t WHERE t.class_name = 'AdminShipping' LIMIT 1) AS tmp), 'AdminStates', (SELECT tmp.max FROM (SELECT MAX(position) max FROM `PREFIX_tab` WHERE id_parent = (SELECT tmp.`id_tab` FROM (SELECT `id_tab` FROM PREFIX_tab t WHERE t.class_name = 'AdminShipping' LIMIT 1) AS tmp )) AS tmp)); +INSERT INTO PREFIX_tab_lang (id_lang, id_tab, name) ( + SELECT id_lang, + (SELECT id_tab FROM PREFIX_tab t WHERE t.class_name = 'AdminStates' LIMIT 1), + 'States' FROM PREFIX_lang); +UPDATE `PREFIX_tab_lang` SET `name` = 'Etats' + WHERE `id_tab` = (SELECT `id_tab` FROM `PREFIX_tab` t WHERE t.class_name = 'AdminStates') + AND `id_lang` = (SELECT `id_lang` FROM `PREFIX_lang` l WHERE l.iso_code = 'fr'); +INSERT INTO PREFIX_access (`id_profile`, `id_tab`, `view`, `add`, edit, `delete`) VALUES ('1', (SELECT id_tab FROM PREFIX_tab t WHERE t.class_name = 'AdminStates' LIMIT 1), 1, 1, 1, 1); + +INSERT INTO PREFIX_image_type (`name`, `width`, `height`, `products`, `categories`, `manufacturers`, `suppliers`) VALUES ('home', 129, 129, 1, 0, 0, 0); + +/* CONFIGURATION VARIABLE */ +INSERT INTO PREFIX_configuration (name, value, date_add, date_upd) VALUES ('PS_NB_DAYS_NEW_PRODUCT', 20, NOW(), NOW()); +INSERT INTO PREFIX_configuration (name, value, date_add, date_upd) VALUES ('PS_WEIGHT_UNIT', 'kg', NOW(), NOW()); +INSERT INTO PREFIX_configuration (name, value, date_add, date_upd) VALUES ('PS_BLOCK_CART_AJAX', '1', NOW(), NOW()); +INSERT INTO PREFIX_configuration (name, value, date_add, date_upd) VALUES ('PS_FO_PROTOCOL', 'http://', NOW(), NOW()); +UPDATE PREFIX_configuration SET name = 'PS_MAIL_SMTP_PORT', value = 25 WHERE name = 'PS_MAIL_SMTP_PORT' AND value = 'default'; +UPDATE PREFIX_configuration SET name = 'PS_MAIL_SMTP_PORT', value = 465 WHERE name = 'PS_MAIL_SMTP_PORT' AND value = 'secure'; + +/* PHP:add_new_tab(AdminPDF, fr:PDF|es:PDF|en:PDF|de:PDF|it:PDF, 3); */; \ No newline at end of file diff --git a/install-new/upgrade/sql/1.0.0.2.sql b/install-new/upgrade/sql/1.0.0.2.sql new file mode 100644 index 000000000..fb0c72687 --- /dev/null +++ b/install-new/upgrade/sql/1.0.0.2.sql @@ -0,0 +1,13 @@ + +/* STRUCTURE */ +SET NAMES 'utf8'; + +ALTER TABLE PREFIX_currency CHANGE COLUMN conversion_rate conversion_rate DECIMAL(10,6) NOT NULL; + +/* CONTENTS */ + +INSERT INTO PREFIX_image_type (`name`, `width`, `height`, `products`, `categories`, `manufacturers`, `suppliers`) VALUES ('thickbox', 600, 600, 1, 0, 0, 0); +INSERT INTO PREFIX_image_type (`name`, `width`, `height`, `products`, `categories`, `manufacturers`, `suppliers`) VALUES ('category', 600, 150, 0, 1, 0, 0); +INSERT INTO PREFIX_image_type (`name`, `width`, `height`, `products`, `categories`, `manufacturers`, `suppliers`) VALUES ('thickbox', 129, 129, 1, 0, 0, 0); + +/* CONFIGURATION VARIABLE */ diff --git a/install-new/upgrade/sql/1.0.0.3.sql b/install-new/upgrade/sql/1.0.0.3.sql new file mode 100644 index 000000000..e82995b59 --- /dev/null +++ b/install-new/upgrade/sql/1.0.0.3.sql @@ -0,0 +1,441 @@ +/* STRUCTURE */ +SET NAMES 'utf8'; + +ALTER TABLE PREFIX_attribute_group_lang DROP INDEX attribute_group_lang_index, ADD PRIMARY KEY (id_attribute_group, id_lang); +ALTER TABLE PREFIX_discount_lang DROP INDEX discount_lang_index, ADD PRIMARY KEY (id_discount, id_lang); +ALTER TABLE PREFIX_discount_type_lang DROP INDEX discount_type_lang_index, ADD PRIMARY KEY (id_discount_type, id_lang); +ALTER TABLE PREFIX_manufacturer_lang DROP INDEX manufacturer_lang_index, ADD PRIMARY KEY (id_manufacturer, id_lang); +ALTER TABLE PREFIX_supplier_lang DROP INDEX supplier_lang_index, ADD PRIMARY KEY (id_supplier, id_lang); +ALTER TABLE PREFIX_profile_lang DROP INDEX profile_lang_index, ADD PRIMARY KEY (id_profile, id_lang); +ALTER TABLE PREFIX_configuration_lang DROP INDEX configuration_lang_index, ADD PRIMARY KEY (id_configuration, id_lang); +ALTER TABLE PREFIX_tab_lang DROP INDEX tab_lang, ADD PRIMARY KEY (id_tab, id_lang); + +ALTER TABLE PREFIX_product ADD id_color_default INT UNSIGNED NULL AFTER id_category_default; +ALTER TABLE PREFIX_attribute_group ADD is_color_group TINYINT(1) NOT NULL DEFAULT 0; +ALTER TABLE PREFIX_attribute ADD color VARCHAR(32) NULL DEFAULT NULL; +ALTER TABLE PREFIX_currency CHANGE conversion_rate conversion_rate DECIMAL(13, 6) NOT NULL ; +ALTER TABLE PREFIX_address ADD id_state INT NULL AFTER id_country; +ALTER TABLE PREFIX_state ADD id_zone INT NULL AFTER id_country; +ALTER TABLE PREFIX_country ADD contains_states tinyint(1) NOT NULL DEFAULT 0; + +UPDATE PREFIX_customer SET secure_key = MD5(RAND()) WHERE secure_key = '-1'; +UPDATE PREFIX_orders o SET secure_key = (SELECT secure_key FROM PREFIX_customer c WHERE c.id_customer = o.id_customer); + +CREATE TABLE PREFIX_order_return ( + id_order_return INTEGER UNSIGNED NOT NULL AUTO_INCREMENT, + id_customer INTEGER UNSIGNED NOT NULL, + id_order INTEGER UNSIGNED NOT NULL, + state tinyint(1) unsigned NOT NULL DEFAULT 0, + question TEXT NOT NULL, + date_add DATETIME NOT NULL, + date_upd DATETIME NOT NULL, + PRIMARY KEY(id_order_return), + INDEX order_return_customer(id_customer) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +CREATE TABLE PREFIX_order_return_detail ( + id_order_return INTEGER UNSIGNED NOT NULL, + id_order_detail INTEGER UNSIGNED NOT NULL, + product_quantity int(10) unsigned NOT NULL DEFAULT 1, + PRIMARY KEY (id_order_return,id_order_detail) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +CREATE TABLE PREFIX_order_return_state ( + id_order_return_state int(10) unsigned NOT NULL auto_increment, + color varchar(32) default NULL, + PRIMARY KEY (`id_order_return_state`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +CREATE TABLE PREFIX_order_return_state_lang ( + id_order_return_state int(10) unsigned NOT NULL, + id_lang int(10) unsigned NOT NULL, + name varchar(64) NOT NULL, + UNIQUE KEY `order_state_lang_index` (`id_order_return_state`,`id_lang`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +CREATE TABLE PREFIX_order_slip ( + id_order_slip INTEGER UNSIGNED NOT NULL AUTO_INCREMENT, + id_customer INTEGER UNSIGNED NOT NULL, + id_order INTEGER UNSIGNED NOT NULL, + date_add DATETIME NOT NULL, + date_upd DATETIME NOT NULL, + PRIMARY KEY(id_order_slip), + INDEX order_slip_customer(id_customer) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +CREATE TABLE PREFIX_order_slip_detail ( + id_order_slip INTEGER UNSIGNED NOT NULL, + id_order_detail INTEGER UNSIGNED NOT NULL, + product_quantity int(10) unsigned NOT NULL DEFAULT 0, + PRIMARY KEY (`id_order_slip`,`id_order_detail`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +CREATE TABLE PREFIX_tax_state ( + id_tax int(10) unsigned NOT NULL, + id_state int(10) unsigned NOT NULL, + INDEX tax_state_index(id_tax, id_state) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +/* CONTENTS */ + +INSERT INTO PREFIX_order_return_state (`id_order_return_state`, `color`) VALUES +(1, '#ADD8E6'), +(2, '#EEDDFF'), +(3, '#DDFFAA'), +(4, '#FFD3D3'), +(5, '#FFFFBB'); + +INSERT INTO PREFIX_order_return_state_lang (`id_order_return_state`, `id_lang`, `name`) VALUES +(1, 1, 'Waiting for confirmation'), +(2, 1, 'Waiting for package'), +(3, 1, 'Package received'), +(4, 1, 'Return denied'), +(5, 1, 'Return completed'), +(1, 2, 'En attente de confirmation'), +(2, 2, 'En attente du colis'), +(3, 2, 'Colis reçu'), +(4, 2, 'Retour refusé'), +(5, 2, 'Retour terminé'); + +UPDATE PREFIX_country SET contains_states = 1 WHERE id_country = 21; + +INSERT INTO `PREFIX_state` (`id_state`, `id_country`, `id_zone`, `name`, `iso_code`, `active`) VALUES +(1, 21, 2, 'Alabama', 'AL', 1), +(2, 21, 2, 'Alaska', 'AK', 1), +(3, 21, 2, 'Arizona', 'AZ', 1), +(4, 21, 2, 'Arkansas', 'AR', 1), +(5, 21, 2, 'California', 'CA', 1), +(6, 21, 2, 'Colorado', 'CO', 1), +(7, 21, 2, 'Connecticut', 'CT', 1), +(8, 21, 2, 'Delaware', 'DE', 1), +(9, 21, 2, 'Florida', 'FL', 1), +(10, 21, 2, 'Georgia', 'GA', 1), +(11, 21, 2, 'Hawaii', 'HI', 1), +(12, 21, 2, 'Idaho', 'ID', 1), +(13, 21, 2, 'Illinois', 'IL', 1), +(14, 21, 2, 'Indiana', 'IN', 1), +(15, 21, 2, 'Iowa', 'IA', 1), +(16, 21, 2, 'Kansas', 'KS', 1), +(17, 21, 2, 'Kentucky', 'KY', 1), +(18, 21, 2, 'Louisiana', 'LA', 1), +(19, 21, 2, 'Maine', 'ME', 1), +(20, 21, 2, 'Maryland', 'MD', 1), +(21, 21, 2, 'Massachusetts', 'MA', 1), +(22, 21, 2, 'Michigan', 'MI', 1), +(23, 21, 2, 'Minnesota', 'MN', 1), +(24, 21, 2, 'Mississippi', 'MS', 1), +(25, 21, 2, 'Missouri', 'MO', 1), +(26, 21, 2, 'Montana', 'MT', 1), +(27, 21, 2, 'Nebraska', 'NE', 1), +(28, 21, 2, 'Nevada', 'NV', 1), +(29, 21, 2, 'New Hampshire', 'NH', 1), +(30, 21, 2, 'New Jersey', 'NJ', 1), +(31, 21, 2, 'New Mexico', 'NM', 1), +(32, 21, 2, 'New York', 'NY', 1), +(33, 21, 2, 'North Carolina', 'NC', 1), +(34, 21, 2, 'North Dakota', 'ND', 1), +(35, 21, 2, 'Ohio', 'OH', 1), +(36, 21, 2, 'Oklahoma', 'OK', 1), +(37, 21, 2, 'Oregon', 'OR', 1), +(38, 21, 2, 'Pennsylvania', 'PA', 1), +(39, 21, 2, 'Rhode Island', 'RI', 1), +(40, 21, 2, 'South Carolina', 'SC', 1), +(41, 21, 2, 'South Dakota', 'SD', 1), +(42, 21, 2, 'Tennessee', 'TN', 1), +(43, 21, 2, 'Texas', 'TX', 1), +(44, 21, 2, 'Utah', 'UT', 1), +(45, 21, 2, 'Vermont', 'VT', 1), +(46, 21, 2, 'Virginia', 'VA', 1), +(47, 21, 2, 'Washington', 'WA', 1), +(48, 21, 2, 'West Virginia', 'WV', 1), +(49, 21, 2, 'Wisconsin', 'WI', 1), +(50, 21, 2, 'Wyoming', 'WY', 1), +(51, 21, 2, 'Puerto Rico', 'PR', 1), +(52, 21, 2, 'US Virgin Islands', 'VI', 1); + +INSERT INTO `PREFIX_lang` (`name`, `active`, `iso_code`) VALUES +('Deutsch (German)', 1, 'de'), +('Español (Spanish)', 1, 'es'), +('Nederlands (Dutch)', 1, 'nl'), +('Bahasa Indonesia (Indonesian)', 1, 'id'), +('Italiano (Italian)', 1, 'it'), +('Język polski (Polish)', 1, 'pl'), +('Português (Portuguese)', 1, 'pt'), +('Čeština (Czech)', 1, 'cs'), +('Pусский язык (Russian)', 0, 'ru'), +('Türkçe (Turkish)', 0, 'tr'), +('Tiếng Việt (Vietnamese)', 0, 'vn'); + +/* NEW LANGS */ + +INSERT IGNORE INTO `PREFIX_tab_lang` (`id_tab`, `id_lang`, `name`) + (SELECT `id_tab`, id_lang, (SELECT tl.`name` + FROM `PREFIX_tab_lang` tl + WHERE tl.`id_lang` = (SELECT c.`value` + FROM `PREFIX_configuration` c + WHERE c.`name` = 'PS_LANG_DEFAULT' LIMIT 1) AND tl.`id_tab`=`PREFIX_tab`.`id_tab`) + FROM `PREFIX_lang` CROSS JOIN `PREFIX_tab`); + +INSERT IGNORE INTO `PREFIX_country_lang` (`id_country`, `id_lang`, `name`) + (SELECT `id_country`, id_lang, (SELECT tl.`name` + FROM `PREFIX_country_lang` tl + WHERE tl.`id_lang` = (SELECT c.`value` + FROM `PREFIX_configuration` c + WHERE c.`name` = 'PS_LANG_DEFAULT' LIMIT 1) AND tl.`id_country`=`PREFIX_country`.`id_country`) + FROM `PREFIX_lang` CROSS JOIN `PREFIX_country`); + +INSERT IGNORE INTO `PREFIX_quick_access_lang` (`id_quick_access`, `id_lang`, `name`) + (SELECT `id_quick_access`, id_lang, (SELECT tl.`name` + FROM `PREFIX_quick_access_lang` tl + WHERE tl.`id_lang` = (SELECT c.`value` + FROM `PREFIX_configuration` c + WHERE c.`name` = 'PS_LANG_DEFAULT' LIMIT 1) AND tl.`id_quick_access`=`PREFIX_quick_access`.`id_quick_access`) + FROM `PREFIX_lang` CROSS JOIN `PREFIX_quick_access`); + +INSERT IGNORE INTO `PREFIX_attribute_group_lang` (`id_attribute_group`, `id_lang`, `name`, `public_name`) + (SELECT `id_attribute_group`, id_lang, (SELECT tl.`name` + FROM `PREFIX_attribute_group_lang` tl + WHERE tl.`id_lang` = (SELECT c.`value` + FROM `PREFIX_configuration` c + WHERE c.`name` = 'PS_LANG_DEFAULT' LIMIT 1) AND tl.`id_attribute_group`=`PREFIX_attribute_group`.`id_attribute_group`), + (SELECT tl.`public_name` + FROM `PREFIX_attribute_group_lang` tl + WHERE tl.`id_lang` = (SELECT c.`value` + FROM `PREFIX_configuration` c + WHERE c.`name` = 'PS_LANG_DEFAULT' LIMIT 1) AND tl.`id_attribute_group`=`PREFIX_attribute_group`.`id_attribute_group`) + FROM `PREFIX_lang` CROSS JOIN `PREFIX_attribute_group`); + +INSERT IGNORE INTO `PREFIX_attribute_lang` (`id_attribute`, `id_lang`, `name`) + (SELECT `id_attribute`, id_lang, (SELECT tl.`name` + FROM `PREFIX_attribute_lang` tl + WHERE tl.`id_lang` = (SELECT c.`value` + FROM `PREFIX_configuration` c + WHERE c.`name` = 'PS_LANG_DEFAULT' LIMIT 1) AND tl.`id_attribute`=`PREFIX_attribute`.`id_attribute`) + FROM `PREFIX_lang` CROSS JOIN `PREFIX_attribute`); + +INSERT IGNORE INTO `PREFIX_carrier_lang` (`id_carrier`, `id_lang`, `delay`) + (SELECT `id_carrier`, id_lang, (SELECT tl.`delay` + FROM `PREFIX_carrier_lang` tl + WHERE tl.`id_lang` = (SELECT c.`value` + FROM `PREFIX_configuration` c + WHERE c.`name` = 'PS_LANG_DEFAULT' LIMIT 1) AND tl.`id_carrier`=`PREFIX_carrier`.`id_carrier`) + FROM `PREFIX_lang` CROSS JOIN `PREFIX_carrier`); + +INSERT IGNORE INTO `PREFIX_contact_lang` (`id_contact`, `id_lang`, `name`, `description`) + (SELECT `id_contact`, id_lang, (SELECT tl.`name` + FROM `PREFIX_contact_lang` tl + WHERE tl.`id_lang` = (SELECT c.`value` + FROM `PREFIX_configuration` c + WHERE c.`name` = 'PS_LANG_DEFAULT' LIMIT 1) AND tl.`id_contact`=`PREFIX_contact`.`id_contact`), + (SELECT tl.`description` + FROM `PREFIX_contact_lang` tl + WHERE tl.`id_lang` = (SELECT c.`value` + FROM `PREFIX_configuration` c + WHERE c.`name` = 'PS_LANG_DEFAULT' LIMIT 1) AND tl.`id_contact`=`PREFIX_contact`.`id_contact`) + FROM `PREFIX_lang` CROSS JOIN `PREFIX_contact`); + +INSERT IGNORE INTO `PREFIX_discount_lang` (`id_discount`, `id_lang`, `description`) + (SELECT `id_discount`, id_lang, (SELECT tl.`description` + FROM `PREFIX_discount_lang` tl + WHERE tl.`id_lang` = (SELECT c.`value` + FROM `PREFIX_configuration` c + WHERE c.`name` = 'PS_LANG_DEFAULT' LIMIT 1) AND tl.`id_discount`=`PREFIX_discount`.`id_discount`) + FROM `PREFIX_lang` CROSS JOIN `PREFIX_discount`); + +INSERT IGNORE INTO `PREFIX_discount_type_lang` (`id_discount_type`, `id_lang`, `name`) + (SELECT `id_discount_type`, id_lang, (SELECT tl.`name` + FROM `PREFIX_discount_type_lang` tl + WHERE tl.`id_lang` = (SELECT c.`value` + FROM `PREFIX_configuration` c + WHERE c.`name` = 'PS_LANG_DEFAULT' LIMIT 1) AND tl.`id_discount_type`=`PREFIX_discount_type`.`id_discount_type`) + FROM `PREFIX_lang` CROSS JOIN `PREFIX_discount_type`); + +INSERT IGNORE INTO `PREFIX_feature_lang` (`id_feature`, `id_lang`, `name`) + (SELECT `id_feature`, id_lang, (SELECT tl.`name` + FROM `PREFIX_feature_lang` tl + WHERE tl.`id_lang` = (SELECT c.`value` + FROM `PREFIX_configuration` c + WHERE c.`name` = 'PS_LANG_DEFAULT' LIMIT 1) AND tl.`id_feature`=`PREFIX_feature`.`id_feature`) + FROM `PREFIX_lang` CROSS JOIN `PREFIX_feature`); + +INSERT IGNORE INTO `PREFIX_feature_value_lang` (`id_feature_value`, `id_lang`, `value`) + (SELECT `id_feature_value`, id_lang, (SELECT tl.`value` + FROM `PREFIX_feature_value_lang` tl + WHERE tl.`id_lang` = (SELECT c.`value` + FROM `PREFIX_configuration` c + WHERE c.`name` = 'PS_LANG_DEFAULT' LIMIT 1) AND tl.`id_feature_value`=`PREFIX_feature_value`.`id_feature_value`) + FROM `PREFIX_lang` CROSS JOIN `PREFIX_feature_value`); + +INSERT IGNORE INTO `PREFIX_image_lang` (`id_image`, `id_lang`, `legend`) + (SELECT `id_image`, id_lang, (SELECT tl.`legend` + FROM `PREFIX_image_lang` tl + WHERE tl.`id_lang` = (SELECT c.`value` + FROM `PREFIX_configuration` c + WHERE c.`name` = 'PS_LANG_DEFAULT' LIMIT 1) AND tl.`id_image`=`PREFIX_image`.`id_image`) + FROM `PREFIX_lang` CROSS JOIN `PREFIX_image`); + +INSERT IGNORE INTO `PREFIX_manufacturer_lang` (`id_manufacturer`, `id_lang`, `description`) + (SELECT `id_manufacturer`, id_lang, (SELECT tl.`description` + FROM `PREFIX_manufacturer_lang` tl + WHERE tl.`id_lang` = (SELECT c.`value` + FROM `PREFIX_configuration` c + WHERE c.`name` = 'PS_LANG_DEFAULT' LIMIT 1) AND tl.`id_manufacturer`=`PREFIX_manufacturer`.`id_manufacturer`) + FROM `PREFIX_lang` CROSS JOIN `PREFIX_manufacturer`); + +INSERT IGNORE INTO `PREFIX_order_return_state_lang` (`id_order_return_state`, `id_lang`, `name`) + (SELECT `id_order_return_state`, id_lang, (SELECT tl.`name` + FROM `PREFIX_order_return_state_lang` tl + WHERE tl.`id_lang` = (SELECT c.`value` + FROM `PREFIX_configuration` c + WHERE c.`name` = 'PS_LANG_DEFAULT' LIMIT 1) AND tl.`id_order_return_state`=`PREFIX_order_return_state`.`id_order_return_state`) + FROM `PREFIX_lang` CROSS JOIN `PREFIX_order_return_state`); + +INSERT IGNORE INTO `PREFIX_order_state_lang` (`id_order_state`, `id_lang`, `name`, `template`) + (SELECT `id_order_state`, id_lang, (SELECT tl.`name` + FROM `PREFIX_order_state_lang` tl + WHERE tl.`id_lang` = (SELECT c.`value` + FROM `PREFIX_configuration` c + WHERE c.`name` = 'PS_LANG_DEFAULT' LIMIT 1) AND tl.`id_order_state`=`PREFIX_order_state`.`id_order_state`), + (SELECT tl.`template` + FROM `PREFIX_order_state_lang` tl + WHERE tl.`id_lang` = (SELECT c.`value` + FROM `PREFIX_configuration` c + WHERE c.`name` = 'PS_LANG_DEFAULT' LIMIT 1) AND tl.`id_order_state`=`PREFIX_order_state`.`id_order_state`) + FROM `PREFIX_lang` CROSS JOIN `PREFIX_order_state`); + +INSERT IGNORE INTO `PREFIX_profile_lang` (`id_profile`, `id_lang`, `name`) + (SELECT `id_profile`, id_lang, (SELECT tl.`name` + FROM `PREFIX_profile_lang` tl + WHERE tl.`id_lang` = (SELECT c.`value` + FROM `PREFIX_configuration` c + WHERE c.`name` = 'PS_LANG_DEFAULT' LIMIT 1) AND tl.`id_profile`=`PREFIX_profile`.`id_profile`) + FROM `PREFIX_lang` CROSS JOIN `PREFIX_profile`); + +INSERT IGNORE INTO `PREFIX_supplier_lang` (`id_supplier`, `id_lang`, `description`) + (SELECT `id_supplier`, id_lang, (SELECT tl.`description` + FROM `PREFIX_supplier_lang` tl + WHERE tl.`id_lang` = (SELECT c.`value` + FROM `PREFIX_configuration` c + WHERE c.`name` = 'PS_LANG_DEFAULT' LIMIT 1) AND tl.`id_supplier`=`PREFIX_supplier`.`id_supplier`) + FROM `PREFIX_lang` CROSS JOIN `PREFIX_supplier`); + +INSERT IGNORE INTO `PREFIX_tax_lang` (`id_tax`, `id_lang`, `name`) + (SELECT `id_tax`, id_lang, (SELECT tl.`name` + FROM `PREFIX_tax_lang` tl + WHERE tl.`id_lang` = (SELECT c.`value` + FROM `PREFIX_configuration` c + WHERE c.`name` = 'PS_LANG_DEFAULT' LIMIT 1) AND tl.`id_tax`=`PREFIX_tax`.`id_tax`) + FROM `PREFIX_lang` CROSS JOIN `PREFIX_tax`); + +/* products */ +INSERT IGNORE INTO `PREFIX_product_lang` (`id_product`, `id_lang`, `description`, `description_short`, `link_rewrite`, `meta_description`, `meta_keywords`, `meta_title`, `name`, `availability`) + (SELECT `id_product`, id_lang, + (SELECT tl.`description` + FROM `PREFIX_product_lang` tl + WHERE tl.`id_lang` = (SELECT c.`value` + FROM `PREFIX_configuration` c + WHERE c.`name` = 'PS_LANG_DEFAULT' LIMIT 1) AND tl.`id_product`=`PREFIX_product`.`id_product`), + (SELECT tl.`description_short` + FROM `PREFIX_product_lang` tl + WHERE tl.`id_lang` = (SELECT c.`value` + FROM `PREFIX_configuration` c + WHERE c.`name` = 'PS_LANG_DEFAULT' LIMIT 1) AND tl.`id_product`=`PREFIX_product`.`id_product`), + (SELECT tl.`link_rewrite` + FROM `PREFIX_product_lang` tl + WHERE tl.`id_lang` = (SELECT c.`value` + FROM `PREFIX_configuration` c + WHERE c.`name` = 'PS_LANG_DEFAULT' LIMIT 1) AND tl.`id_product`=`PREFIX_product`.`id_product`), + (SELECT tl.`meta_description` + FROM `PREFIX_product_lang` tl + WHERE tl.`id_lang` = (SELECT c.`value` + FROM `PREFIX_configuration` c + WHERE c.`name` = 'PS_LANG_DEFAULT' LIMIT 1) AND tl.`id_product`=`PREFIX_product`.`id_product`), + (SELECT tl.`meta_keywords` + FROM `PREFIX_product_lang` tl + WHERE tl.`id_lang` = (SELECT c.`value` + FROM `PREFIX_configuration` c + WHERE c.`name` = 'PS_LANG_DEFAULT' LIMIT 1) AND tl.`id_product`=`PREFIX_product`.`id_product`), + (SELECT tl.`meta_title` + FROM `PREFIX_product_lang` tl + WHERE tl.`id_lang` = (SELECT c.`value` + FROM `PREFIX_configuration` c + WHERE c.`name` = 'PS_LANG_DEFAULT' LIMIT 1) AND tl.`id_product`=`PREFIX_product`.`id_product`), + (SELECT tl.`name` + FROM `PREFIX_product_lang` tl + WHERE tl.`id_lang` = (SELECT c.`value` + FROM `PREFIX_configuration` c + WHERE c.`name` = 'PS_LANG_DEFAULT' LIMIT 1) AND tl.`id_product`=`PREFIX_product`.`id_product`), + (SELECT tl.`availability` + FROM `PREFIX_product_lang` tl + WHERE tl.`id_lang` = (SELECT c.`value` + FROM `PREFIX_configuration` c + WHERE c.`name` = 'PS_LANG_DEFAULT' LIMIT 1) AND tl.`id_product`=`PREFIX_product`.`id_product`) + FROM `PREFIX_lang` CROSS JOIN `PREFIX_product`); + +/* categories */ +INSERT IGNORE INTO `PREFIX_category_lang` (`id_category`, `id_lang`, `description`, `link_rewrite`, `meta_description`, `meta_keywords`, `meta_title`, `name`) + (SELECT `id_category`, id_lang, + (SELECT tl.`description` + FROM `PREFIX_category_lang` tl + WHERE tl.`id_lang` = (SELECT c.`value` + FROM `PREFIX_configuration` c + WHERE c.`name` = 'PS_LANG_DEFAULT' LIMIT 1) AND tl.`id_category`=`PREFIX_category`.`id_category`), + (SELECT tl.`link_rewrite` + FROM `PREFIX_category_lang` tl + WHERE tl.`id_lang` = (SELECT c.`value` + FROM `PREFIX_configuration` c + WHERE c.`name` = 'PS_LANG_DEFAULT' LIMIT 1) AND tl.`id_category`=`PREFIX_category`.`id_category`), + (SELECT tl.`meta_description` + FROM `PREFIX_category_lang` tl + WHERE tl.`id_lang` = (SELECT c.`value` + FROM `PREFIX_configuration` c + WHERE c.`name` = 'PS_LANG_DEFAULT' LIMIT 1) AND tl.`id_category`=`PREFIX_category`.`id_category`), + (SELECT tl.`meta_keywords` + FROM `PREFIX_category_lang` tl + WHERE tl.`id_lang` = (SELECT c.`value` + FROM `PREFIX_configuration` c + WHERE c.`name` = 'PS_LANG_DEFAULT' LIMIT 1) AND tl.`id_category`=`PREFIX_category`.`id_category`), + (SELECT tl.`meta_title` + FROM `PREFIX_category_lang` tl + WHERE tl.`id_lang` = (SELECT c.`value` + FROM `PREFIX_configuration` c + WHERE c.`name` = 'PS_LANG_DEFAULT' LIMIT 1) AND tl.`id_category`=`PREFIX_category`.`id_category`), + (SELECT tl.`name` + FROM `PREFIX_category_lang` tl + WHERE tl.`id_lang` = (SELECT c.`value` + FROM `PREFIX_configuration` c + WHERE c.`name` = 'PS_LANG_DEFAULT' LIMIT 1) AND tl.`id_category`=`PREFIX_category`.`id_category`) + FROM `PREFIX_lang` CROSS JOIN `PREFIX_category`); + + + +/* NEW TABS */ + +INSERT INTO PREFIX_tab (id_parent, class_name, position) VALUES ((SELECT tmp.`id_tab` FROM (SELECT `id_tab` FROM PREFIX_tab t WHERE t.class_name = 'AdminOrders' LIMIT 1) AS tmp), 'AdminReturn', (SELECT tmp.max FROM (SELECT MAX(position) max FROM `PREFIX_tab` WHERE id_parent = (SELECT tmp.`id_tab` FROM (SELECT `id_tab` FROM PREFIX_tab t WHERE t.class_name = 'AdminOrders' LIMIT 1) AS tmp )) AS tmp)); +INSERT INTO PREFIX_tab_lang (id_lang, id_tab, name) ( + SELECT id_lang, + (SELECT id_tab FROM PREFIX_tab t WHERE t.class_name = 'AdminReturn' LIMIT 1), + 'Merchandise returns (RMAs)' FROM PREFIX_lang); +UPDATE `PREFIX_tab_lang` SET `name` = 'Retours produit' + WHERE `id_tab` = (SELECT `id_tab` FROM `PREFIX_tab` t WHERE t.class_name = 'AdminReturn') + AND `id_lang` = (SELECT `id_lang` FROM `PREFIX_lang` l WHERE l.iso_code = 'fr'); +INSERT INTO PREFIX_access (id_profile, id_tab, `view`, `add`, edit, `delete`) VALUES ('1', (SELECT id_tab FROM PREFIX_tab t WHERE t.class_name = 'AdminReturn' LIMIT 1), 1, 1, 1, 1); + +INSERT INTO PREFIX_tab (id_parent, class_name, position) VALUES ((SELECT tmp.`id_tab` FROM (SELECT `id_tab` FROM PREFIX_tab t WHERE t.class_name = 'AdminOrders' LIMIT 1) AS tmp), 'AdminSlip', (SELECT tmp.max FROM (SELECT MAX(position) max FROM `PREFIX_tab` WHERE id_parent = (SELECT tmp.`id_tab` FROM (SELECT `id_tab` FROM PREFIX_tab t WHERE t.class_name = 'AdminOrders' LIMIT 1) AS tmp )) AS tmp)); +INSERT INTO PREFIX_tab_lang (id_lang, id_tab, name) ( + SELECT id_lang, + (SELECT id_tab FROM PREFIX_tab t WHERE t.class_name = 'AdminSlip' LIMIT 1), + 'Credit slips' FROM PREFIX_lang); +UPDATE `PREFIX_tab_lang` SET `name` = 'Avoirs' + WHERE `id_tab` = (SELECT `id_tab` FROM `PREFIX_tab` t WHERE t.class_name = 'AdminSlip') + AND `id_lang` = (SELECT `id_lang` FROM `PREFIX_lang` l WHERE l.iso_code = 'fr'); +INSERT INTO PREFIX_access (id_profile, id_tab, `view`, `add`, edit, `delete`) VALUES ('1', (SELECT id_tab FROM PREFIX_tab t WHERE t.class_name = 'AdminSlip' LIMIT 1), 1, 1, 1, 1); + + +/* CONFIGURATION VARIABLE */ +INSERT INTO `PREFIX_configuration` (`name`, `value`, `date_add`, `date_upd`) VALUES ('PS_ORDER_RETURN', '0', NOW(), NOW()); +INSERT INTO `PREFIX_configuration` (`name`, `value`, `date_add`, `date_upd`) VALUES ('PS_ORDER_RETURN_NB_DAYS', '7', NOW(), NOW()); +UPDATE PREFIX_configuration SET name = 'PS_SSL_ENABLED' WHERE name = 'PS_FO_PROTOCOL'; +UPDATE PREFIX_configuration SET name = 'PS_SSL_ENABLED', value = 0 WHERE name = 'PS_SSL_ENABLED' AND value = 'http://'; +UPDATE PREFIX_configuration SET name = 'PS_SSL_ENABLED', value = 1 WHERE name = 'PS_SSL_ENABLED' AND value = 'https://'; + diff --git a/install-new/upgrade/sql/1.0.0.4.sql b/install-new/upgrade/sql/1.0.0.4.sql new file mode 100644 index 000000000..1d5697ce5 --- /dev/null +++ b/install-new/upgrade/sql/1.0.0.4.sql @@ -0,0 +1,88 @@ +/* STRUCTURE */ +SET NAMES 'utf8'; + +ALTER TABLE PREFIX_order_detail + ADD product_ean13 VARCHAR(13) CHARACTER SET utf8 COLLATE utf8_general_ci NULL AFTER product_price; +ALTER TABLE PREFIX_order_detail + ADD product_quantity_return INT(10) UNSIGNED NOT NULL DEFAULT 0 AFTER product_quantity; + +ALTER TABLE PREFIX_state + ADD tax_behavior SMALLINT(1) NOT NULL DEFAULT 0 AFTER iso_code; + +ALTER TABLE PREFIX_product + ADD reduction_from DATE NOT NULL AFTER reduction_percent; +ALTER TABLE PREFIX_product + ADD reduction_to DATE NOT NULL AFTER reduction_from; + +ALTER TABLE PREFIX_range_weight + ADD id_carrier INTEGER UNSIGNED DEFAULT NULL AFTER id_range_weight; +ALTER TABLE PREFIX_range_weight + DROP INDEX range_weight_index, + ADD UNIQUE range_weight_unique (delimiter1, delimiter2, id_carrier); +ALTER TABLE PREFIX_range_price + ADD id_carrier INTEGER UNSIGNED DEFAULT NULL AFTER id_range_price; +ALTER TABLE PREFIX_range_price + DROP INDEX range_price_index, + ADD UNIQUE range_price_unique (delimiter1, delimiter2, id_carrier); + +/* CONTENTS */ +/* One request per insert, if one die, other can be inserted */ +INSERT INTO PREFIX_hook (`name`, `title`, `description`, `position`) VALUES ('adminCustomers', 'Display in Back-Office, tab AdminCustomers', 'Launch modules when the tab AdminCustomers is displayed on back-office.', 0); +INSERT INTO PREFIX_hook (`name`, `title`, `description`, `position`) VALUES ('createAccount', 'Successful customer create account', 'Called when new customer create account successfuled', 0); +INSERT INTO PREFIX_hook (`name`, `title`, `description`, `position`) VALUES ('customerAccount', 'Customer account page display in front office', 'Called when a customer access to his account.', 1); +INSERT INTO PREFIX_hook (`name`, `title`, `description`, `position`) VALUES ('orderSlip', 'Called when a order slip is created', 'Called when a quantity of one product change in an order.', 0); +INSERT INTO PREFIX_hook (`name`, `title`, `description`, `position`) VALUES ('productTab', 'Tabs on product page', 'Called on order product page tabs', 0); +INSERT INTO PREFIX_hook (`name`, `title`, `description`, `position`) VALUES ('productTabContent', 'Content of tabs on product page', 'Called on order product page tabs', 0); +INSERT INTO PREFIX_hook (`name`, `title`, `description`, `position`) VALUES ('shoppingCart', 'Shopping cart footer', 'Display some specific informations on the shopping cart page', 0); + +INSERT INTO `PREFIX_configuration` (`name`, `value`, `date_add`, `date_upd`) VALUES ('PS_MAIL_TYPE', '3', NOW(), NOW()); + +INSERT INTO `PREFIX_configuration` (`name`, `value`, `date_add`, `date_upd`) VALUES ('PS_TOKEN_ENABLE', '0', NOW(), NOW()); + +INSERT INTO `PREFIX_configuration` (`name`, `value`, `date_add`, `date_upd`) VALUES ('PS_GIFT_WRAPPING_PRICE', '0', NOW(), NOW()); + +/* NEW RANGES */ + +INSERT IGNORE INTO PREFIX_range_price ( id_carrier, delimiter1, delimiter2 ) + (SELECT c.id_carrier, rp.delimiter1, rp.delimiter2 + FROM PREFIX_range_price rp + CROSS JOIN PREFIX_carrier c + WHERE c.deleted = 0 + AND c.active = 1 + ); + +UPDATE `PREFIX_delivery` d SET d.`id_range_price` = ( + SELECT rw.`id_range_price` FROM `PREFIX_range_price` rw WHERE + rw.`id_carrier` = d.`id_carrier` AND + rw.`delimiter1` = ( + SELECT `delimiter1` FROM `PREFIX_range_price` rw2 WHERE rw2.`id_range_price` = d.`id_range_price` LIMIT 1 + ) AND + rw.`delimiter2` = ( + SELECT `delimiter2` FROM `PREFIX_range_price` rw3 WHERE rw3.`id_range_price` = d.`id_range_price` LIMIT 1 + ) +); + +INSERT IGNORE INTO PREFIX_range_weight ( id_carrier, delimiter1, delimiter2 ) + (SELECT c.id_carrier, rp.delimiter1, rp.delimiter2 + FROM PREFIX_range_weight rp + CROSS JOIN PREFIX_carrier c + WHERE c.deleted = 0 + AND c.active = 1 + ); + +UPDATE `PREFIX_delivery` d SET d.`id_range_weight` = ( + SELECT rw.`id_range_weight` FROM `PREFIX_range_weight` rw WHERE + rw.`id_carrier` = d.`id_carrier` AND + rw.`delimiter1` = ( + SELECT `delimiter1` FROM `PREFIX_range_weight` rw2 WHERE rw2.`id_range_weight` = d.`id_range_weight` LIMIT 1 + ) AND + rw.`delimiter2` = ( + SELECT `delimiter2` FROM `PREFIX_range_weight` rw3 WHERE rw3.`id_range_weight` = d.`id_range_weight` LIMIT 1 + ) +); + +DELETE FROM PREFIX_range_price WHERE id_carrier IS NULL; +DELETE FROM PREFIX_range_weight WHERE id_carrier IS NULL; + +/* CONFIGURATION VARIABLE */ + diff --git a/install-new/upgrade/sql/1.0.0.5.sql b/install-new/upgrade/sql/1.0.0.5.sql new file mode 100644 index 000000000..de1edb4bd --- /dev/null +++ b/install-new/upgrade/sql/1.0.0.5.sql @@ -0,0 +1,35 @@ +/* STRUCTURE */ +SET NAMES 'utf8'; + +ALTER TABLE PREFIX_orders + ADD total_wrapping DECIMAL(10,2) NOT NULL DEFAULT 0 AFTER total_shipping; + +ALTER TABLE PREFIX_carrier + ADD range_behavior TINYINT(1) UNSIGNED NOT NULL DEFAULT 0 AFTER shipping_handling; + +ALTER TABLE PREFIX_order_detail + ADD product_supplier_reference VARCHAR(32) NULL AFTER product_reference; + +ALTER TABLE PREFIX_product + ADD supplier_reference VARCHAR(32) NULL AFTER reference; + +ALTER TABLE PREFIX_product_attribute + ADD supplier_reference VARCHAR(32) NULL AFTER reference; + +ALTER TABLE PREFIX_customer + ADD UNIQUE customer_email(email(128)); + +ALTER TABLE PREFIX_product_download + ADD active TINYINT(1) UNSIGNED NOT NULL DEFAULT 1 AFTER nb_downloadable; + + +/* CONTENTS */ +INSERT INTO PREFIX_hook (`name`, `title`, `description`, `position`) VALUES ('createAccountForm', 'Customer account creation form', 'Display some information on the form to create a customer account', 1); + +INSERT INTO PREFIX_lang (`name`, `active`, `iso_code`) VALUES +('Română (Romanian)', 0, 'ro'), +('Νεοελληνική (Greek)', 0, 'gr'), +('Slovenčina (Slovak)', 0, 'sk'); + +/* CONFIGURATION VARIABLE */ + diff --git a/install-new/upgrade/sql/1.0.0.6.sql b/install-new/upgrade/sql/1.0.0.6.sql new file mode 100644 index 000000000..b2eb0806c --- /dev/null +++ b/install-new/upgrade/sql/1.0.0.6.sql @@ -0,0 +1,11 @@ +/* STRUCTURE */ +SET NAMES 'utf8'; + +ALTER TABLE PREFIX_order_detail + CHANGE product_price product_price DECIMAL(13, 6) NOT NULL DEFAULT '0.000000'; + + +/* CONTENTS */ + +/* CONFIGURATION VARIABLE */ + diff --git a/install-new/upgrade/sql/1.0.0.7.sql b/install-new/upgrade/sql/1.0.0.7.sql new file mode 100644 index 000000000..d7b148ca6 --- /dev/null +++ b/install-new/upgrade/sql/1.0.0.7.sql @@ -0,0 +1,21 @@ +/* PHP */ +/* PHP:AttributeGroup::cleanDeadCombinations(); */; + +/* STRUCTURE */ +SET NAMES 'utf8'; + +ALTER TABLE PREFIX_order_detail + ADD product_quantity_discount DECIMAL(13,6) NOT NULL DEFAULT 0 AFTER product_price; +ALTER TABLE PREFIX_country + ADD deleted TINYINT(1) NOT NULL DEFAULT 0; + + +/* CONTENTS */ + +INSERT INTO PREFIX_lang (`name`, `active`, `iso_code`) VALUES +('Norsk (Norwegian)', 0, 'no'), +('ภาษาไทย (Thai)', 0, 'th'), +('Dansk (Danish)', 0, 'dk'); + +/* CONFIGURATION VARIABLE */ + diff --git a/install-new/upgrade/sql/1.0.0.8.sql b/install-new/upgrade/sql/1.0.0.8.sql new file mode 100644 index 000000000..254c4f0dc --- /dev/null +++ b/install-new/upgrade/sql/1.0.0.8.sql @@ -0,0 +1,17 @@ +/* PHP */ +/* PHP:AttributeGroup::cleanDeadCombinations(); */; + +/* STRUCTURE */ +SET NAMES 'utf8'; + +/* CONTENTS */ + +INSERT INTO `PREFIX_configuration` (`name`, `value`, `date_add`, `date_upd`) VALUES +('PS_DISP_UNAVAILABLE_ATTR', '1', NOW(), NOW()); + +INSERT INTO PREFIX_lang (`name`, `active`, `iso_code`) VALUES +('Svenska (Swedish)', 0, 'se'), +('עברית (Hebrew)', 0, 'he'); + +/* CONFIGURATION VARIABLE */ + diff --git a/install-new/upgrade/sql/1.1.0.1.sql b/install-new/upgrade/sql/1.1.0.1.sql new file mode 100644 index 000000000..c00a3176e --- /dev/null +++ b/install-new/upgrade/sql/1.1.0.1.sql @@ -0,0 +1,629 @@ +/* PHP */ +/* PHP:AttributeGroup::cleanDeadCombinations(); */; +/* PHP:configuration_double_cleaner(); */; + +SET NAMES 'utf8'; + +/* ##################################### */ +/* STRUCTURE */ +/* ##################################### */ +DROP TABLE IF EXISTS PREFIX_gender; +DROP TABLE IF EXISTS PREFIX_search; +ALTER TABLE PREFIX_category_lang + ADD INDEX category_name (name); +ALTER TABLE PREFIX_order_detail + MODIFY COLUMN product_name VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL; +ALTER TABLE PREFIX_order_detail + ADD deleted TINYINT(3) UNSIGNED NOT NULL DEFAULT 0; +ALTER TABLE PREFIX_configuration + MODIFY COLUMN name VARCHAR(32) NOT NULL UNIQUE; +ALTER TABLE PREFIX_orders + ADD invoice_number INTEGER(10) UNSIGNED NOT NULL DEFAULT 0 AFTER total_wrapping; +ALTER TABLE PREFIX_orders + ADD delivery_number INTEGER(10) UNSIGNED NOT NULL DEFAULT 0 AFTER invoice_number; +ALTER TABLE PREFIX_orders + ADD invoice_date DATETIME NOT NULL AFTER delivery_number; +ALTER TABLE PREFIX_orders + ADD delivery_date DATETIME NOT NULL AFTER invoice_date; +ALTER TABLE PREFIX_order_detail + CHANGE product_price product_price DECIMAL(13, 6) NOT NULL DEFAULT 0.000000; +ALTER TABLE PREFIX_order_slip + ADD shipping_cost TINYINT UNSIGNED NOT NULL DEFAULT 0 AFTER id_order; +ALTER TABLE PREFIX_order_state + ADD delivery TINYINT(1) UNSIGNED NOT NULL DEFAULT 0 AFTER logable; +ALTER TABLE PREFIX_country + DROP deleted; +ALTER TABLE PREFIX_product + ADD customizable BOOL NOT NULL DEFAULT 0 AFTER quantity_discount; +ALTER TABLE PREFIX_product + ADD uploadable_files TINYINT NOT NULL DEFAULT 0 AFTER customizable; +ALTER TABLE PREFIX_product + ADD text_fields TINYINT NOT NULL DEFAULT 0 AFTER uploadable_files; +ALTER TABLE PREFIX_product_lang + CHANGE availability available_now VARCHAR(255) NULL; +ALTER TABLE PREFIX_product_lang + ADD available_later VARCHAR(255) NULL AFTER available_now; +ALTER TABLE PREFIX_access + DROP id_access; +ALTER TABLE PREFIX_access + DROP INDEX access_profile; +ALTER TABLE PREFIX_access + DROP INDEX access_tab; +ALTER TABLE PREFIX_access + ADD PRIMARY KEY(id_profile, id_tab); +ALTER TABLE PREFIX_currency + ADD blank TINYINT(1) UNSIGNED NOT NULL DEFAULT 0 AFTER sign; +ALTER TABLE PREFIX_currency + ADD decimals TINYINT(1) UNSIGNED NOT NULL DEFAULT 1 AFTER format; +ALTER TABLE PREFIX_product_attribute + ADD wholesale_price decimal(13,6) NOT NULL DEFAULT 0.000000 AFTER ean13; +ALTER TABLE PREFIX_employee + ADD last_passwd_gen TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP AFTER passwd; +ALTER TABLE PREFIX_customer + ADD last_passwd_gen TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP AFTER passwd; +ALTER TABLE PREFIX_customer + ADD ip_registration_newsletter VARCHAR(15) NULL DEFAULT NULL AFTER newsletter; +ALTER TABLE PREFIX_image_type + ADD scenes TINYINT(1) NOT NULL DEFAULT 1; +ALTER TABLE PREFIX_image_lang + CHANGE legend legend VARCHAR(128) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL; + +/* CMS */ +CREATE TABLE PREFIX_cms ( + id_cms INTEGER UNSIGNED NOT NULL auto_increment, + PRIMARY KEY (id_cms) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +CREATE TABLE PREFIX_cms_lang ( + id_cms INTEGER UNSIGNED NOT NULL auto_increment, + id_lang INTEGER UNSIGNED NOT NULL, + meta_title VARCHAR(128) NOT NULL, + meta_description VARCHAR(255) DEFAULT NULL, + meta_keywords VARCHAR(255) DEFAULT NULL, + content longtext NULL, + link_rewrite VARCHAR(128) NOT NULL, + PRIMARY KEY (id_cms, id_lang) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +CREATE TABLE PREFIX_block_cms ( + id_block INTEGER(10) NOT NULL, + id_cms INTEGER(10) NOT NULL +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +/* PAYMENT MODULE RESTRICTIONS */ +CREATE TABLE `PREFIX_module_country` ( + `id_module` INTEGER UNSIGNED NOT NULL, + `id_country` INTEGER UNSIGNED NOT NULL, + PRIMARY KEY (`id_module`, `id_country`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +CREATE TABLE `PREFIX_module_currency` ( + `id_module` INTEGER UNSIGNED NOT NULL, + `id_currency` INTEGER NOT NULL, + PRIMARY KEY (`id_module`, `id_currency`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +/* ORDER-MESSAGE */ +CREATE TABLE PREFIX_order_message +( + id_order_message int(10) unsigned NOT NULL auto_increment, + date_add datetime NOT NULL, + PRIMARY KEY (id_order_message) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +CREATE TABLE PREFIX_order_message_lang +( + id_order_message int(10) unsigned NOT NULL, + id_lang int(10) unsigned NOT NULL, + name varchar(128) NOT NULL, + message text NOT NULL, + PRIMARY KEY (id_order_message,id_lang) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +/* SUB-DOMAINS */ +CREATE TABLE PREFIX_subdomain ( + id_subdomain INTEGER(10) NOT NULL AUTO_INCREMENT, + name VARCHAR(16) NOT NULL, + PRIMARY KEY(id_subdomain) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +/* META-CLASS */ +CREATE TABLE PREFIX_meta ( + id_meta INTEGER UNSIGNED NOT NULL AUTO_INCREMENT, + page VARCHAR(64) NOT NULL, + PRIMARY KEY(id_meta), + KEY `meta_name` (`page`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +CREATE TABLE PREFIX_meta_lang ( + id_meta INTEGER UNSIGNED NOT NULL, + id_lang INTEGER UNSIGNED NOT NULL, + title VARCHAR(255) NULL, + description VARCHAR(255) NULL, + keywords VARCHAR(255) NULL, + PRIMARY KEY (id_meta, id_lang) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +CREATE TABLE PREFIX_discount_category ( + id_discount INTEGER(11) NOT NULL, + id_category INTEGER(11) NOT NULL +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +/* Customized products */ +CREATE TABLE PREFIX_customization ( + id_customization int(10) NOT NULL AUTO_INCREMENT, + id_product_attribute int(10) NOT NULL DEFAULT 0, + id_cart int(10) NOT NULL, + id_product int(10) NOT NULL, + PRIMARY KEY(id_customization, id_cart, id_product) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +CREATE TABLE PREFIX_customized_data ( + id_customization int(10) NOT NULL, + `type` tinyint(1) NOT NULL, + `index` int(3) NOT NULL, + `value` varchar(255) NOT NULL, + PRIMARY KEY(id_customization, `type`, `index`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +CREATE TABLE PREFIX_customization_field ( + id_customization_field int(10) NOT NULL AUTO_INCREMENT, + id_product int(10) NOT NULL, + type tinyint(1) NOT NULL, + required tinyint(1) NOT NULL, + PRIMARY KEY(id_customization_field) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +CREATE TABLE PREFIX_customization_field_lang ( + id_customization_field int(10) NOT NULL, + id_lang int(10) NOT NULL, + name varchar(255) NOT NULL, + PRIMARY KEY(id_customization_field, id_lang) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +/* Product location */ +ALTER TABLE `PREFIX_product_attribute` ADD `location` VARCHAR(64) NULL AFTER `supplier_reference`; +ALTER TABLE `PREFIX_product` ADD `location` VARCHAR(64) NULL AFTER `supplier_reference`; + +/* Paypal default e-mail fix */ +UPDATE `PREFIX_configuration` SET value = 'paypal@prestashop.com' WHERE name = 'PAYPAL_BUSINESS' AND value = 'your-address@paypal.com'; + +/* ##################################### */ +/* CONTENTS */ +/* ##################################### */ +INSERT INTO PREFIX_subdomain (id_subdomain, name) VALUES (NULL, 'www'); +UPDATE PREFIX_currency SET blank = 1 WHERE iso_code = 'EUR'; +UPDATE PREFIX_order_state SET delivery = 1 WHERE id_order_state = 3; +UPDATE PREFIX_order_state SET delivery = 1 WHERE id_order_state = 4; +UPDATE PREFIX_order_state SET delivery = 1 WHERE id_order_state = 5; + +/* IMAGE MAPPING */ +UPDATE PREFIX_image_type SET scenes = 0; +INSERT INTO `PREFIX_image_type` (`name` ,`width` ,`height` ,`products` ,`categories` ,`manufacturers` ,`suppliers` ,`scenes`) VALUES ('large_scene', '556', '200', '0', '0', '0', '0', '1'); +INSERT INTO `PREFIX_image_type` (`name` ,`width` ,`height` ,`products` ,`categories` ,`manufacturers` ,`suppliers` ,`scenes`) VALUES ('thumb_scene', '161', '58', '0', '0', '0', '0', '1'); + +/* CONFIGURATION VARIABLE */ +INSERT INTO PREFIX_configuration (name, value, date_add, date_upd) VALUES ('PS_INVOICE', '1', NOW(), NOW()); +INSERT INTO PREFIX_configuration (name, value, date_add, date_upd) VALUES ('PS_INVOICE_PREFIX', 'IN', NOW(), NOW()); +INSERT INTO PREFIX_configuration (name, value, date_add, date_upd) VALUES ('PS_DELIVERY_PREFIX', 'DE', NOW(), NOW()); +INSERT INTO PREFIX_configuration (name, value, date_add, date_upd) VALUES ('PS_PRODUCT_PICTURE_MAX_SIZE', '131072', NOW(), NOW()); +INSERT INTO PREFIX_configuration (name, value, date_add, date_upd) VALUES ('PS_PRODUCT_PICTURE_WIDTH', '64', NOW(), NOW()); +INSERT INTO PREFIX_configuration (name, value, date_add, date_upd) VALUES ('PS_PRODUCT_PICTURE_HEIGHT', '64', NOW(), NOW()); +INSERT INTO PREFIX_configuration (name, value, date_add, date_upd) VALUES ('PS_PASSWD_TIME_BACK', '360', NOW(), NOW()); +INSERT INTO PREFIX_configuration (name, value, date_add, date_upd) VALUES ('PS_PASSWD_TIME_FRONT', '360', NOW(), NOW()); + +INSERT INTO `PREFIX_configuration_lang` (`id_configuration`, `id_lang`, `value`, `date_upd`) VALUES ((SELECT id_configuration FROM PREFIX_configuration c WHERE c.name = 'PS_INVOICE_PREFIX' LIMIT 1), 1, 'IN', NOW()); +INSERT INTO `PREFIX_configuration_lang` (`id_configuration`, `id_lang`, `value`, `date_upd`) VALUES ((SELECT id_configuration FROM PREFIX_configuration c WHERE c.name = 'PS_INVOICE_PREFIX' LIMIT 1), 2, 'FA', NOW()); +INSERT INTO `PREFIX_configuration_lang` (`id_configuration`, `id_lang`, `value`, `date_upd`) VALUES ((SELECT id_configuration FROM PREFIX_configuration c WHERE c.name = 'PS_DELIVERY_PREFIX' LIMIT 1), 1, 'DE', NOW()); +INSERT INTO `PREFIX_configuration_lang` (`id_configuration`, `id_lang`, `value`, `date_upd`) VALUES ((SELECT id_configuration FROM PREFIX_configuration c WHERE c.name = 'PS_DELIVERY_PREFIX' LIMIT 1), 2, 'LI', NOW()); + +/* HOOKS/MODULES */ +UPDATE PREFIX_hook SET description = 'This hook is called when a product is deleted' WHERE name = 'deleteProduct' LIMIT 1; +UPDATE PREFIX_hook SET name = 'extraLeft', title = 'Extra actions on the product page (left column).' WHERE name = 'extra' LIMIT 1; +INSERT INTO PREFIX_hook (name, title, position, description) VALUES ('orderReturn', 'Product returned', 0, 'When an order return is made'); +INSERT INTO PREFIX_hook (name, title, position, description) VALUES ('postUpdateOrderStatus', 'Post Order\'s status update event', 0, 'Launch modules when the order\'s status was changed (enables automated workflow).'); +INSERT INTO PREFIX_hook (name, title, position, description) VALUES ('productActions', 'Product actions', 1, 'Put new action buttons on product page'); +INSERT INTO PREFIX_hook (name, title, position, description) VALUES ('cancelProduct', 'Product cancelled', 0, 'This hook is called when you cancel a product in an order'); +INSERT INTO PREFIX_hook (name, title, position) VALUES ('backOfficeHome', 'Administration panel homepage', 1); +INSERT INTO PREFIX_hook (name, title, position, description) VALUES ('extraRight', 'Extra actions on the product page (right column).', 0, NULL); +UPDATE PREFIX_hook SET position = 1 WHERE name = 'top'; +UPDATE PREFIX_hook SET position = 0 WHERE name = 'header'; + +/* ORDER MESSAGES */ +INSERT INTO `PREFIX_order_message` (`id_order_message`, `date_add`) VALUES (1, NOW()); +INSERT INTO `PREFIX_order_message_lang` (`id_order_message`, `id_lang`, `name`, `message`) VALUES +(1, 1, 'Delay', 'Hi, + +Unfortunately, an item on your order is currently out of stock. This may cause a slight delay in delivery. +Please accept our apologies and rest assured that we are working hard to rectify this. + +Best regards, +'); +INSERT INTO `PREFIX_order_message_lang` (`id_order_message`, `id_lang`, `name`, `message`) VALUES +(1, 2, 'Délai', 'Bonjour, + +Un des éléments de votre commande est actuellement en réapprovisionnement, ce qui peut légèrement retarder son envoi. + +Merci de votre compréhension. + +Cordialement, +'); + +/* META */ +INSERT INTO `PREFIX_meta` (`id_meta`, `page`) VALUES +(1, '404'), +(2, 'best-sales'), +(3, 'contact-form'), +(4, 'index'), +(5, 'manufacturer'), +(6, 'new-products'), +(7, 'password'), +(8, 'prices-drop'), +(9, 'sitemap'), +(10, 'supplier'); + +INSERT INTO `PREFIX_meta_lang` (`id_meta`, `id_lang`, `title`, `description`, `keywords`) VALUES +(1, 1, '404 error', 'This page cannot be found', 'error, 404, not found'), +(1, 2, 'Erreur 404', 'Cette page est introuvable', 'erreur, 404, introuvable'), +(2, 1, 'Best sales', 'Our best sales', 'best sales'), +(2, 2, 'Meilleurs ventes', 'Liste de nos produits les mieux vendus', 'meilleurs ventes'), +(3, 1, 'Contact us', 'Use our form to contact us', 'contact, form, e-mail'), +(3, 2, 'Contactez-nous', 'Utilisez notre formulaire pour nous contacter', 'contact, formulaire, e-mail'), +(4, 1, '', 'Shop powered by PrestaShop', 'shop, prestashop'), +(4, 2, '', 'Boutique propulsé par PrestaShop', 'boutique, prestashop'), +(5, 1, 'Manufacturers', 'Manufacturers list', 'manufacturer'), +(5, 2, 'Fabricants', 'Liste de nos fabricants', 'fabricants'), +(6, 1, 'New products', 'Our new products', 'new, products'), +(6, 2, 'Nouveaux produits', 'Liste de nos nouveaux produits', 'nouveau, produit'), +(7, 1, 'Forgot your password', 'Enter your e-mail address used to register in goal to get e-mail with your new password', 'forgot, password, e-mail, new, reset'), +(7, 2, 'Mot de passe oublié', 'Renseignez votre adresse e-mail afin de recevoir votre nouveau mot de passe.', 'mot de passe, oublié, e-mail, nouveau, regénération'), +(8, 1, 'Specials', 'Our special products', 'special, prices drop'), +(8, 2, 'Promotions', 'Nos produits en promotion', 'promotion, réduction'), +(9, 1, 'Sitemap', 'Lost ? Find what your are looking for', 'sitemap'), +(9, 2, 'Plan du site', 'Perdu ? Trouvez ce que vous cherchez', 'plan, site'), +(10, 1, 'Suppliers', 'Suppliers list', 'supplier'), +(10, 2, 'Fournisseurs', 'Liste de nos fournisseurs', 'fournisseurs'); + +/* CMS */ +INSERT INTO `PREFIX_cms` VALUES (1),(2),(3),(4),(5); +INSERT INTO `PREFIX_cms_lang` (`id_cms`, `id_lang`, `meta_title`, `meta_description`, `meta_keywords`, `content`, `link_rewrite`) VALUES +(1, 1, 'Delivery', 'Our terms and conditions of delivery', 'conditions, delivery, delay, shipment, pack', '

    Shipments and returns

    Your pack shipment

    Packages are generally dispatched within 2 days after receipt of payment and are shipped via Colissimo with tracking and drop-off without signature. If you prefer delivery by Colissimo Extra with required signature, an additional cost will be applied, so please contact us before choosing this method. Whichever shipment choice you make, we will provide you with a link to track your package online.

    Shipping fees include handling and packing fees as well as postage costs. Handling fees are fixed, whereas transport fees vary according to total weight of the shipment. We advise you to group your items in one order. We cannot group two distinct orders placed separately, and shipping fees will apply to each of them. Your package will be dispatched at your own risk, but special care is taken to protect fragile objects.

    Boxes are amply sized and your items are well-protected.

    ', 'delivery'); +INSERT INTO `PREFIX_cms_lang` (`id_cms`, `id_lang`, `meta_title`, `meta_description`, `meta_keywords`, `content`, `link_rewrite`) VALUES +(1, 2, 'Livraison', 'Nos conditions générales de livraison', 'conditions, livraison, délais, transport, colis', '

    Livraisons et retours

    Le transport de votre colis

    Les colis sont généralement expédiés en 48h après réception de votre paiement. Le mode d''expédidition standard est le Colissimo suivi, remis sans signature. Si vous souhaitez une remise avec signature, un coût supplémentaire s''applique, merci de nous contacter. Quel que soit le mode d''expédition choisi, nous vous fournirons dès que possible un lien qui vous permettra de suivre en ligne la livraison de votre colis.

    Les frais d''expédition comprennent l''emballage, la manutention et les frais postaux. Ils peuvent contenir une partie fixe et une partie variable en fonction du prix ou du poids de votre commande. Nous vous conseillons de regrouper vos achats en une unique commande. Nous ne pouvons pas grouper deux commandes distinctes et vous devrez vous acquitter des frais de port pour chacune d''entre elles. Votre colis est expédié à vos propres risques, un soin particulier est apporté au colis contenant des produits fragiles..

    Les colis sont surdimensionnés et protégés.

    ', 'livraison'); +INSERT INTO `PREFIX_cms_lang` (`id_cms`, `id_lang`, `meta_title`, `meta_description`, `meta_keywords`, `content`, `link_rewrite`) VALUES +(2, 1, 'Legal Notice', 'Legal notice', 'notice, legal, credits', '

    Legal

    Credits

    Concept and production:

    This Web site was created using PrestaShop™ open-source software.

    ', 'legal-notice'); +INSERT INTO `PREFIX_cms_lang` (`id_cms`, `id_lang`, `meta_title`, `meta_description`, `meta_keywords`, `content`, `link_rewrite`) VALUES +(2, 2, 'Mentions légales', 'Mentions légales', 'mentions, légales, crédits', '

    Mentions légales

    Crédits

    Concept et production :

    Ce site internet a été réalisé en utilisant la solution open-source PrestaShop™ .

    ', 'mentions-legales'); +INSERT INTO `PREFIX_cms_lang` (`id_cms`, `id_lang`, `meta_title`, `meta_description`, `meta_keywords`, `content`, `link_rewrite`) VALUES +(3, 1, 'Terms and conditions of use', 'Our terms and conditions of use', 'conditions, terms, use, sell', '

    Your terms and conditions of use

    Rule 1

    Here is the rule 1 content

    \r\n

    Rule 2

    Here is the rule 2 content

    \r\n

    Rule 3

    Here is the rule 3 content

    ', 'terms-and-conditions-of-use'); +INSERT INTO `PREFIX_cms_lang` (`id_cms`, `id_lang`, `meta_title`, `meta_description`, `meta_keywords`, `content`, `link_rewrite`) VALUES +(3, 2, 'Conditions d''utilisation', 'Nos conditions générales de ventes', 'conditions, utilisation, générales, ventes', '

    Vos conditions de ventes

    Règle n°1

    Contenu de la règle numéro 1

    \r\n

    Règle n°2

    Contenu de la règle numéro 2

    \r\n

    Règle n°3

    Contenu de la règle numéro 3

    ', 'conditions-generales-de-ventes'); +INSERT INTO `PREFIX_cms_lang` (`id_cms`, `id_lang`, `meta_title`, `meta_description`, `meta_keywords`, `content`, `link_rewrite`) VALUES +(4, 1, 'About us', 'Learn more about us', 'about us, informations', '

    About us

    \r\n

    Our company

    Our company

    \r\n

    Our team

    Our team

    \r\n

    Informations

    Informations

    ', 'about-us'); +INSERT INTO `PREFIX_cms_lang` (`id_cms`, `id_lang`, `meta_title`, `meta_description`, `meta_keywords`, `content`, `link_rewrite`) VALUES +(4, 2, 'A propos', 'Apprenez-en d''avantage sur nous', 'à propos, informations', '

    A propos

    \r\n

    Notre entreprise

    Notre entreprise

    \r\n

    Notre équipe

    Notre équipe

    \r\n

    Informations

    Informations

    ', 'a-propos'); +INSERT INTO `PREFIX_cms_lang` (`id_cms`, `id_lang`, `meta_title`, `meta_description`, `meta_keywords`, `content`, `link_rewrite`) VALUES +(5, 1, 'Secure payment', 'Our secure payment mean', 'secure payment, ssl, visa, mastercard, paypal', '

    Secure payment

    \r\n

    Our secure payment

    With SSL

    \r\n

    Using Visa/Mastercard/Paypal

    About this services

    ', 'secure-payment'); +INSERT INTO `PREFIX_cms_lang` (`id_cms`, `id_lang`, `meta_title`, `meta_description`, `meta_keywords`, `content`, `link_rewrite`) VALUES +(5, 2, 'Paiement sécurisé', 'Notre offre de paiement sécurisé', 'paiement sécurisé, ssl, visa, mastercard, paypal', '

    Paiement sécurisé

    \r\n

    Notre offre de paiement sécurisé

    Avec SSL

    \r\n

    Utilisation de Visa/Mastercard/Paypal

    A propos de ces services

    ', 'paiement-securise'); + +INSERT INTO PREFIX_block_cms (`id_block`, `id_cms`) VALUES (IFNULL((SELECT id_module FROM PREFIX_module m WHERE m.name = 'blockvariouslinks' LIMIT 1), 0), 3); +INSERT INTO PREFIX_block_cms (`id_block`, `id_cms`) VALUES (IFNULL((SELECT id_module FROM PREFIX_module m WHERE m.name = 'blockvariouslinks' LIMIT 1), 0), 4); +INSERT INTO PREFIX_block_cms (`id_block`, `id_cms`) VALUES (IFNULL((SELECT id_module FROM PREFIX_module m WHERE m.name = 'blockinfos' LIMIT 1), 0), 1); +INSERT INTO PREFIX_block_cms (`id_block`, `id_cms`) VALUES (IFNULL((SELECT id_module FROM PREFIX_module m WHERE m.name = 'blockinfos' LIMIT 1), 0), 2); +INSERT INTO PREFIX_block_cms (`id_block`, `id_cms`) VALUES (IFNULL((SELECT id_module FROM PREFIX_module m WHERE m.name = 'blockinfos' LIMIT 1), 0), 3); +INSERT INTO PREFIX_block_cms (`id_block`, `id_cms`) VALUES (IFNULL((SELECT id_module FROM PREFIX_module m WHERE m.name = 'blockinfos' LIMIT 1), 0), 4); +DELETE FROM PREFIX_block_cms WHERE id_block = 0; + +/* NEW TABS */ +UPDATE PREFIX_tab_lang + SET name = 'Vouchers' + WHERE id_lang = (SELECT `id_lang` FROM `PREFIX_lang` l WHERE l.iso_code = 'en' LIMIT 1) + AND id_tab = (SELECT `id_tab` FROM PREFIX_tab t WHERE t.class_name = 'AdminDiscounts' LIMIT 1); + +INSERT INTO PREFIX_tab (id_parent, class_name, position) VALUES ((SELECT tmp.`id_tab` FROM (SELECT `id_tab` FROM PREFIX_tab t WHERE t.class_name = 'AdminTools' LIMIT 1) AS tmp), 'AdminCMS', (SELECT tmp.max FROM (SELECT MAX(position) max FROM `PREFIX_tab` WHERE id_parent = (SELECT tmp.`id_tab` FROM (SELECT `id_tab` FROM PREFIX_tab t WHERE t.class_name = 'AdminTools' LIMIT 1) AS tmp )) AS tmp)); +INSERT INTO PREFIX_tab_lang (id_lang, id_tab, name) ( + SELECT id_lang, + (SELECT id_tab FROM PREFIX_tab t WHERE t.class_name = 'AdminCMS' LIMIT 1), + 'CMS' FROM PREFIX_lang); +INSERT INTO PREFIX_access (id_profile, id_tab, `view`, `add`, edit, `delete`) VALUES ('1', (SELECT id_tab FROM PREFIX_tab t WHERE t.class_name = 'AdminCMS' LIMIT 1), 1, 1, 1, 1); + +INSERT INTO PREFIX_tab (id_parent, class_name, position) VALUES ((SELECT tmp.`id_tab` FROM (SELECT `id_tab` FROM PREFIX_tab t WHERE t.class_name = 'AdminTools' LIMIT 1) AS tmp), 'AdminSubDomains', (SELECT tmp.max FROM (SELECT MAX(position) max FROM `PREFIX_tab` WHERE id_parent = (SELECT tmp.`id_tab` FROM (SELECT `id_tab` FROM PREFIX_tab t WHERE t.class_name = 'AdminTools' LIMIT 1) AS tmp )) AS tmp)); +INSERT INTO PREFIX_tab_lang (id_lang, id_tab, name) ( + SELECT id_lang, + (SELECT id_tab FROM PREFIX_tab t WHERE t.class_name = 'AdminSubDomains' LIMIT 1), + 'Subdomains' FROM PREFIX_lang); +UPDATE `PREFIX_tab_lang` SET `name` = 'Sous domaines' + WHERE `id_tab` = (SELECT `id_tab` FROM `PREFIX_tab` t WHERE t.class_name = 'AdminSubDomains') + AND `id_lang` = (SELECT `id_lang` FROM `PREFIX_lang` l WHERE l.iso_code = 'fr'); +INSERT INTO PREFIX_access (id_profile, id_tab, `view`, `add`, edit, `delete`) VALUES ('1', (SELECT id_tab FROM PREFIX_tab t WHERE t.class_name = 'AdminSubDomains' LIMIT 1), 1, 1, 1, 1); + +INSERT INTO PREFIX_tab (id_parent, class_name, position) VALUES ((SELECT tmp.`id_tab` FROM (SELECT `id_tab` FROM PREFIX_tab t WHERE t.class_name = 'AdminOrders' LIMIT 1) AS tmp), 'AdminOrderMessage', (SELECT tmp.max FROM (SELECT MAX(position) max FROM `PREFIX_tab` WHERE id_parent = (SELECT tmp.`id_tab` FROM (SELECT `id_tab` FROM PREFIX_tab t WHERE t.class_name = 'AdminOrders' LIMIT 1) AS tmp )) AS tmp)); +INSERT INTO PREFIX_tab_lang (id_lang, id_tab, name) ( + SELECT id_lang, + (SELECT id_tab FROM PREFIX_tab t WHERE t.class_name = 'AdminOrderMessage' LIMIT 1), + 'Order messages' FROM PREFIX_lang); +UPDATE `PREFIX_tab_lang` SET `name` = 'Messages prédéfinis' + WHERE `id_tab` = (SELECT `id_tab` FROM `PREFIX_tab` t WHERE t.class_name = 'AdminOrderMessage') + AND `id_lang` = (SELECT `id_lang` FROM `PREFIX_lang` l WHERE l.iso_code = 'fr'); +INSERT INTO PREFIX_access (id_profile, id_tab, `view`, `add`, edit, `delete`) VALUES ('1', (SELECT id_tab FROM PREFIX_tab t WHERE t.class_name = 'AdminOrderMessage' LIMIT 1), 1, 1, 1, 1); + +INSERT INTO PREFIX_tab (id_parent, class_name, position) VALUES ((SELECT tmp.`id_tab` FROM (SELECT `id_tab` FROM PREFIX_tab t WHERE t.class_name = 'AdminOrders' LIMIT 1) AS tmp), 'AdminDeliverySlip', (SELECT tmp.max FROM (SELECT MAX(position) max FROM `PREFIX_tab` WHERE id_parent = (SELECT tmp.`id_tab` FROM (SELECT `id_tab` FROM PREFIX_tab t WHERE t.class_name = 'AdminOrders' LIMIT 1) AS tmp )) AS tmp)); +INSERT INTO PREFIX_tab_lang (id_lang, id_tab, name) ( + SELECT id_lang, + (SELECT id_tab FROM PREFIX_tab t WHERE t.class_name = 'AdminDeliverySlip' LIMIT 1), + 'Delivery slips' FROM PREFIX_lang); +UPDATE `PREFIX_tab_lang` SET `name` = 'Bons de livraison' + WHERE `id_tab` = (SELECT `id_tab` FROM `PREFIX_tab` t WHERE t.class_name = 'AdminDeliverySlip') + AND `id_lang` = (SELECT `id_lang` FROM `PREFIX_lang` l WHERE l.iso_code = 'fr'); +INSERT INTO PREFIX_access (id_profile, id_tab, `view`, `add`, edit, `delete`) VALUES ('1', (SELECT id_tab FROM PREFIX_tab t WHERE t.class_name = 'AdminDeliverySlip' LIMIT 1), 1, 1, 1, 1); + +INSERT INTO PREFIX_tab (id_parent, class_name, position) VALUES ((SELECT tmp.`id_tab` FROM (SELECT `id_tab` FROM PREFIX_tab t WHERE t.class_name = 'AdminTools' LIMIT 1) AS tmp), 'AdminBackup', (SELECT tmp.max FROM (SELECT MAX(position) max FROM `PREFIX_tab` WHERE id_parent = (SELECT tmp.`id_tab` FROM (SELECT `id_tab` FROM PREFIX_tab t WHERE t.class_name = 'AdminTools' LIMIT 1) AS tmp )) AS tmp)); +INSERT INTO PREFIX_tab_lang (id_lang, id_tab, name) ( + SELECT id_lang, + (SELECT id_tab FROM PREFIX_tab t WHERE t.class_name = 'AdminBackup' LIMIT 1), + 'Database backup' FROM PREFIX_lang); +UPDATE `PREFIX_tab_lang` SET `name` = 'Sauvegarde BDD' + WHERE `id_tab` = (SELECT `id_tab` FROM `PREFIX_tab` t WHERE t.class_name = 'AdminBackup') + AND `id_lang` = (SELECT `id_lang` FROM `PREFIX_lang` l WHERE l.iso_code = 'fr'); +INSERT INTO PREFIX_access (id_profile, id_tab, `view`, `add`, edit, `delete`) VALUES ('1', (SELECT id_tab FROM PREFIX_tab t WHERE t.class_name = 'AdminBackup' LIMIT 1), 1, 1, 1, 1); + +INSERT INTO PREFIX_tab (id_parent, class_name, position) VALUES ((SELECT tmp.`id_tab` FROM (SELECT `id_tab` FROM PREFIX_tab t WHERE t.class_name = 'AdminPreferences' LIMIT 1) AS tmp), 'AdminMeta', (SELECT tmp.max FROM (SELECT MAX(position) max FROM `PREFIX_tab` WHERE id_parent = (SELECT tmp.`id_tab` FROM (SELECT `id_tab` FROM PREFIX_tab t WHERE t.class_name = 'AdminPreferences' LIMIT 1) AS tmp )) AS tmp)); +INSERT INTO PREFIX_tab_lang (id_lang, id_tab, name) ( + SELECT id_lang, + (SELECT id_tab FROM PREFIX_tab t WHERE t.class_name = 'AdminMeta' LIMIT 1), + 'Meta-tags' FROM PREFIX_lang); +UPDATE `PREFIX_tab_lang` SET `name` = 'Méta-Tags' + WHERE `id_tab` = (SELECT `id_tab` FROM `PREFIX_tab` t WHERE t.class_name = 'AdminMeta') + AND `id_lang` = (SELECT `id_lang` FROM `PREFIX_lang` l WHERE l.iso_code = 'fr'); +INSERT INTO PREFIX_access (id_profile, id_tab, `view`, `add`, edit, `delete`) VALUES ('1', (SELECT id_tab FROM PREFIX_tab t WHERE t.class_name = 'AdminMeta' LIMIT 1), 1, 1, 1, 1); + +INSERT INTO PREFIX_tab (id_parent, class_name, position) VALUES ((SELECT tmp.`id_tab` FROM (SELECT `id_tab` FROM PREFIX_tab t WHERE t.class_name = 'AdminCatalog' LIMIT 1) AS tmp), 'AdminScenes', (SELECT tmp.max FROM (SELECT MAX(position) max FROM `PREFIX_tab` WHERE id_parent = (SELECT tmp.`id_tab` FROM (SELECT `id_tab` FROM PREFIX_tab t WHERE t.class_name = 'AdminCatalog' LIMIT 1) AS tmp )) AS tmp)); +INSERT INTO PREFIX_tab_lang (id_lang, id_tab, name) ( + SELECT id_lang, + (SELECT id_tab FROM PREFIX_tab t WHERE t.class_name = 'AdminScenes' LIMIT 1), + 'Image mapping' FROM PREFIX_lang); +UPDATE `PREFIX_tab_lang` SET `name` = 'Scènes' + WHERE `id_tab` = (SELECT `id_tab` FROM `PREFIX_tab` t WHERE t.class_name = 'AdminScenes') + AND `id_lang` = (SELECT `id_lang` FROM `PREFIX_lang` l WHERE l.iso_code = 'fr'); +INSERT INTO PREFIX_access (id_profile, id_tab, `view`, `add`, edit, `delete`) VALUES ('1', (SELECT id_tab FROM PREFIX_tab t WHERE t.class_name = 'AdminScenes' LIMIT 1), 1, 1, 1, 1); + +/* NEW TEAM TAB */ +UPDATE PREFIX_tab SET position = 10 WHERE class_name = 'AdminTools'; +UPDATE PREFIX_tab SET position = 9 WHERE class_name = 'AdminPreferences'; +UPDATE PREFIX_tab SET position = 8, id_parent = 0 WHERE class_name = 'AdminEmployees'; +UPDATE PREFIX_tab SET position = 1, id_parent = 29 WHERE class_name = 'AdminProfiles'; +UPDATE PREFIX_tab SET position = 2, id_parent = 29 WHERE class_name = 'AdminAccess'; +UPDATE PREFIX_tab SET position = 3, id_parent = 29 WHERE class_name = 'AdminContacts'; +UPDATE PREFIX_tab SET position = 1 WHERE class_name = 'AdminLanguages'; +UPDATE PREFIX_tab SET position = 2 WHERE class_name = 'AdminTranslations'; +UPDATE PREFIX_tab SET position = 3 WHERE class_name = 'AdminTabs'; +UPDATE PREFIX_tab SET position = 4 WHERE class_name = 'AdminQuickAccesses'; +UPDATE PREFIX_tab SET position = 5 WHERE class_name = 'AdminAliases'; +UPDATE PREFIX_tab SET position = 6 WHERE class_name = 'AdminImport'; +UPDATE PREFIX_tab SET position = 7 WHERE class_name = 'AdminSubDomains'; + +/* UPDATE ORDER TABS */ +UPDATE PREFIX_tab SET class_name = 'AdminInvoices' WHERE class_name = 'AdminPrintPDF'; +UPDATE PREFIX_tab SET position = 1 WHERE class_name = 'AdminInvoices'; +UPDATE PREFIX_tab SET position = 2 WHERE class_name = 'AdminReturn'; +UPDATE PREFIX_tab SET position = 3 WHERE class_name = 'AdminSlip'; +UPDATE PREFIX_tab SET position = 4 WHERE class_name = 'AdminOrdersStates'; +UPDATE PREFIX_tab_lang SET name = 'Invoices' WHERE name = 'PDF Invoice'; +UPDATE PREFIX_tab_lang SET name = 'Factures' WHERE name = 'Facture PDF'; + +/* ##################################### */ +/* STATS */ +/* ##################################### */ +CREATE TABLE PREFIX_web_browser ( + id_web_browser INTEGER(10) UNSIGNED NOT NULL AUTO_INCREMENT, + name VARCHAR(64) NULL, + PRIMARY KEY(id_web_browser) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +CREATE TABLE PREFIX_operating_system ( + id_operating_system INTEGER(10) UNSIGNED NOT NULL AUTO_INCREMENT, + name VARCHAR(64) NULL, + PRIMARY KEY(id_operating_system) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +CREATE TABLE PREFIX_page_type ( + id_page_type INTEGER(10) UNSIGNED NOT NULL AUTO_INCREMENT, + name VARCHAR(256) NOT NULL, + PRIMARY KEY(id_page_type) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +CREATE TABLE PREFIX_date_range ( + id_date_range INTEGER UNSIGNED NOT NULL AUTO_INCREMENT, + time_start DATETIME NOT NULL, + time_end DATETIME NOT NULL, + PRIMARY KEY(id_date_range) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +CREATE TABLE PREFIX_page ( + id_page INTEGER(10) UNSIGNED NOT NULL AUTO_INCREMENT, + id_page_type INTEGER(10) UNSIGNED NOT NULL, + id_object VARCHAR(256) NULL, + PRIMARY KEY(id_page) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +CREATE TABLE PREFIX_page_viewed ( + id_page INTEGER(10) UNSIGNED NOT NULL, + id_date_range INTEGER UNSIGNED NOT NULL, + counter INTEGER UNSIGNED NOT NULL, + PRIMARY KEY(id_page, id_date_range) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +CREATE TABLE PREFIX_guest ( + id_guest INTEGER(10) UNSIGNED NOT NULL AUTO_INCREMENT, + id_operating_system INTEGER(10) UNSIGNED NULL DEFAULT NULL, + id_web_browser INTEGER(10) UNSIGNED NULL DEFAULT NULL, + id_customer INTEGER(10) UNSIGNED NULL DEFAULT NULL, + javascript BOOL NULL DEFAULT 0, + screen_resolution_x SMALLINT UNSIGNED NULL DEFAULT NULL, + screen_resolution_y SMALLINT UNSIGNED NULL DEFAULT NULL, + screen_color TINYINT UNSIGNED NULL DEFAULT NULL, + sun_java BOOL NULL DEFAULT NULL, + adobe_flash BOOL NULL DEFAULT NULL, + adobe_director BOOL NULL DEFAULT NULL, + apple_quicktime BOOL NULL DEFAULT NULL, + real_player BOOL NULL DEFAULT NULL, + windows_media BOOL NULL DEFAULT NULL, + accept_language VARCHAR(8) NULL DEFAULT NULL, + PRIMARY KEY(id_guest) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +CREATE TABLE IF NOT EXISTS `PREFIX_scene` ( + `id_scene` int(10) NOT NULL auto_increment, + `active` tinyint(1) NOT NULL default '1', + PRIMARY KEY (`id_scene`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +CREATE TABLE IF NOT EXISTS `PREFIX_scene_category` ( + `id_scene` int(10) NOT NULL, + `id_category` int(10) NOT NULL, + PRIMARY KEY (`id_scene`,`id_category`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +CREATE TABLE IF NOT EXISTS `PREFIX_scene_lang` ( + `id_scene` int(10) NOT NULL, + `id_lang` int(10) NOT NULL, + `name` varchar(100) NOT NULL, + PRIMARY KEY (`id_scene`,`id_lang`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +CREATE TABLE IF NOT EXISTS `PREFIX_scene_products` ( + `id_scene` int(10) NOT NULL, + `id_product` int(10) NOT NULL, + `x_axis` int(4) NOT NULL, + `y_axis` int(4) NOT NULL, + `zone_width` int(3) NOT NULL, + `zone_height` int(3) NOT NULL +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +INSERT INTO PREFIX_guest (id_customer) SELECT id_customer FROM PREFIX_customer; + +ALTER TABLE PREFIX_connections ADD id_guest INTEGER(10) UNSIGNED NULL AFTER id_connections; +ALTER TABLE PREFIX_connections ADD id_page INTEGER(10) UNSIGNED NOT NULL AFTER id_guest; +ALTER TABLE PREFIX_connections ADD http_referer VARCHAR(256) NULL; +ALTER TABLE PREFIX_connections CHANGE date date_add DATETIME NOT NULL; + +UPDATE PREFIX_connections, PREFIX_guest SET PREFIX_connections.id_guest=PREFIX_guest.id_guest WHERE PREFIX_connections.id_customer=PREFIX_guest.id_customer; +ALTER TABLE PREFIX_connections CHANGE id_guest id_guest INTEGER(10) UNSIGNED NOT NULL; +ALTER TABLE PREFIX_connections DROP id_customer; + +CREATE TABLE PREFIX_connections_page ( + id_connections INTEGER(10) UNSIGNED NOT NULL, + id_page INTEGER(10) UNSIGNED NOT NULL, + time_start DATETIME NOT NULL, + time_end DATETIME NULL, + PRIMARY KEY(id_connections, id_page, time_start) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +INSERT INTO `PREFIX_operating_system` (`name`) VALUES ('Windows XP'),('Windows Vista'),('MacOsX'),('Linux'); +INSERT INTO `PREFIX_web_browser` (`name`) VALUES ('Safari'),('Firefox 2.x'),('Firefox 3.x'),('Opera'),('IE 6.x'),('IE 7.x'),('IE 8.x'),('Google Chrome'); +INSERT INTO `PREFIX_page_type` (`name`) VALUES ('product.php'),('category.php'),('order.php'),('manufacturer.php'); + +INSERT INTO `PREFIX_hook` (`name`, `title`, `position`) VALUES +('AdminStatsModules', 'Stats - Modules', 1), +('GraphEngine', 'Graph Engines', 0), +('GridEngine', 'Grid Engines', 0); + +/* Temporary configuration variable used in the following query */ +INSERT INTO `PREFIX_configuration` (`name`, `value`, `date_add`, `date_upd`) VALUES ('TMP_ID_TAB_STATS', (SELECT `id_tab` FROM `PREFIX_tab` WHERE `class_name` = 'AdminStats'), NOW(), NOW()); +INSERT INTO `PREFIX_tab` (`id_parent`, `class_name`, `position`) VALUES + ((SELECT `value` FROM `PREFIX_configuration` WHERE `name` = 'TMP_ID_TAB_STATS'), 'AdminStatsModules', 1); +INSERT INTO `PREFIX_tab` (`id_parent`, `class_name`, `position`) VALUES + ((SELECT `value` FROM `PREFIX_configuration` WHERE `name` = 'TMP_ID_TAB_STATS'), 'AdminStatsConf', 2); +INSERT INTO `PREFIX_tab_lang` (`id_lang`, `id_tab`, `name`) VALUES + (1, (SELECT `id_tab` FROM `PREFIX_tab` WHERE `class_name` = 'AdminStatsModules'), 'Modules'); +INSERT INTO `PREFIX_tab_lang` (`id_lang`, `id_tab`, `name`) VALUES + (2, (SELECT `id_tab` FROM `PREFIX_tab` WHERE `class_name` = 'AdminStatsModules'), 'Modules'); +INSERT INTO `PREFIX_tab_lang` (`id_lang`, `id_tab`, `name`) VALUES + (1, (SELECT `id_tab` FROM `PREFIX_tab` WHERE `class_name` = 'AdminStatsConf'), 'Settings'); +INSERT INTO `PREFIX_tab_lang` (`id_lang`, `id_tab`, `name`) VALUES + (2, (SELECT `id_tab` FROM `PREFIX_tab` WHERE `class_name` = 'AdminStatsConf'), 'Configuration'); +INSERT INTO `PREFIX_access` (`id_profile`, `id_tab`, `view`, `add`, `edit`, `delete`) VALUES + (1, (SELECT `id_tab` FROM `PREFIX_tab` WHERE `class_name` = 'AdminStatsModules'), 1, 1, 1, 1); +INSERT INTO `PREFIX_access` (`id_profile`, `id_tab`, `view`, `add`, `edit`, `delete`) VALUES + (1, (SELECT `id_tab` FROM `PREFIX_tab` WHERE `class_name` = 'AdminStatsConf'), 1, 1, 1, 1); +DELETE FROM `PREFIX_configuration` WHERE `name` = 'TMP_ID_TAB_STATS'; + +/* ##################################### */ +/* DOUBLE LANGUAGE */ +/* ##################################### */ +INSERT IGNORE INTO `PREFIX_discount_type_lang` (`id_discount_type`, `id_lang`, `name`) + (SELECT `id_discount_type`, id_lang, (SELECT tl.`name` + FROM `PREFIX_discount_type_lang` tl + WHERE tl.`id_lang` = (SELECT c.`value` + FROM `PREFIX_configuration` c + WHERE c.`name` = 'PS_LANG_DEFAULT' LIMIT 1) AND tl.`id_discount_type`=`PREFIX_discount_type`.`id_discount_type`) + FROM `PREFIX_lang` CROSS JOIN `PREFIX_discount_type`); + +INSERT IGNORE INTO `PREFIX_cms_lang` (`id_cms`, `id_lang`, `link_rewrite`, `meta_description`, `meta_keywords`, `meta_title`, `content`) + (SELECT `id_cms`, id_lang, + (SELECT tl.`link_rewrite` + FROM `PREFIX_cms_lang` tl + WHERE tl.`id_lang` = (SELECT c.`value` + FROM `PREFIX_configuration` c + WHERE c.`name` = 'PS_LANG_DEFAULT' LIMIT 1) AND tl.`id_cms`=`PREFIX_cms`.`id_cms`), + (SELECT tl.`meta_description` + FROM `PREFIX_cms_lang` tl + WHERE tl.`id_lang` = (SELECT c.`value` + FROM `PREFIX_configuration` c + WHERE c.`name` = 'PS_LANG_DEFAULT' LIMIT 1) AND tl.`id_cms`=`PREFIX_cms`.`id_cms`), + (SELECT tl.`meta_keywords` + FROM `PREFIX_cms_lang` tl + WHERE tl.`id_lang` = (SELECT c.`value` + FROM `PREFIX_configuration` c + WHERE c.`name` = 'PS_LANG_DEFAULT' LIMIT 1) AND tl.`id_cms`=`PREFIX_cms`.`id_cms`), + (SELECT tl.`meta_title` + FROM `PREFIX_cms_lang` tl + WHERE tl.`id_lang` = (SELECT c.`value` + FROM `PREFIX_configuration` c + WHERE c.`name` = 'PS_LANG_DEFAULT' LIMIT 1) AND tl.`id_cms`=`PREFIX_cms`.`id_cms`), + (SELECT tl.`content` + FROM `PREFIX_cms_lang` tl + WHERE tl.`id_lang` = (SELECT c.`value` + FROM `PREFIX_configuration` c + WHERE c.`name` = 'PS_LANG_DEFAULT' LIMIT 1) AND tl.`id_cms`=`PREFIX_cms`.`id_cms`) + FROM `PREFIX_lang` CROSS JOIN `PREFIX_cms`); + +INSERT IGNORE INTO `PREFIX_meta_lang` (`id_meta`, `id_lang`, `description`, `keywords`, `title`) + (SELECT `id_meta`, id_lang, + (SELECT tl.`description` + FROM `PREFIX_meta_lang` tl + WHERE tl.`id_lang` = (SELECT c.`value` + FROM `PREFIX_configuration` c + WHERE c.`name` = 'PS_LANG_DEFAULT' LIMIT 1) AND tl.`id_meta`=`PREFIX_meta`.`id_meta`), + (SELECT tl.`keywords` + FROM `PREFIX_meta_lang` tl + WHERE tl.`id_lang` = (SELECT c.`value` + FROM `PREFIX_configuration` c + WHERE c.`name` = 'PS_LANG_DEFAULT' LIMIT 1) AND tl.`id_meta`=`PREFIX_meta`.`id_meta`), + (SELECT tl.`title` + FROM `PREFIX_meta_lang` tl + WHERE tl.`id_lang` = (SELECT c.`value` + FROM `PREFIX_configuration` c + WHERE c.`name` = 'PS_LANG_DEFAULT' LIMIT 1) AND tl.`id_meta`=`PREFIX_meta`.`id_meta`) + FROM `PREFIX_lang` CROSS JOIN `PREFIX_meta`); + +INSERT IGNORE INTO `PREFIX_order_message_lang` (`id_order_message`, `id_lang`, `name`, `message`) + (SELECT `id_order_message`, id_lang, + (SELECT tl.`name` + FROM `PREFIX_order_message_lang` tl + WHERE tl.`id_lang` = (SELECT c.`value` + FROM `PREFIX_configuration` c + WHERE c.`name` = 'PS_LANG_DEFAULT' LIMIT 1) AND tl.`id_order_message`=`PREFIX_order_message`.`id_order_message`), + (SELECT tl.`message` + FROM `PREFIX_order_message_lang` tl + WHERE tl.`id_lang` = (SELECT c.`value` + FROM `PREFIX_configuration` c + WHERE c.`name` = 'PS_LANG_DEFAULT' LIMIT 1) AND tl.`id_order_message`=`PREFIX_order_message`.`id_order_message`) + FROM `PREFIX_lang` CROSS JOIN `PREFIX_order_message`); + +/* PHP */ +/* PHP:invoice_number_set(); */; +/* PHP:delivery_number_set(); */; +/* PHP:set_payment_module(); */; +/* PHP:set_discount_category(); */; diff --git a/install-new/upgrade/sql/1.1.0.2.sql b/install-new/upgrade/sql/1.1.0.2.sql new file mode 100644 index 000000000..ee56776c5 --- /dev/null +++ b/install-new/upgrade/sql/1.1.0.2.sql @@ -0,0 +1,3 @@ +SET NAMES 'utf8'; + +/* ##################################### */ diff --git a/install-new/upgrade/sql/1.1.0.3.sql b/install-new/upgrade/sql/1.1.0.3.sql new file mode 100644 index 000000000..5fb70c0ab --- /dev/null +++ b/install-new/upgrade/sql/1.1.0.3.sql @@ -0,0 +1,10 @@ +SET NAMES 'utf8'; + +/* ##################################### */ +/* STRUCTURE */ +/* ##################################### */ + +DROP TABLE IF EXISTS PREFIX_product_picture; + +/* PHP */ +/* PHP:moduleReinstaller('blockmyaccount'); */; diff --git a/install-new/upgrade/sql/1.1.0.4.sql b/install-new/upgrade/sql/1.1.0.4.sql new file mode 100644 index 000000000..1bd039324 --- /dev/null +++ b/install-new/upgrade/sql/1.1.0.4.sql @@ -0,0 +1,28 @@ +SET NAMES 'utf8'; + +/* ##################################### */ +/* STRUCTURE */ +/* ##################################### */ + +ALTER TABLE PREFIX_order_detail + DROP `deleted`, + ADD product_quantity_cancelled INT(10) UNSIGNED NOT NULL AFTER product_quantity_return; + +ALTER TABLE PREFIX_customization ADD quantity INT(10) NOT NULL; + +ALTER TABLE PREFIX_order_return_detail ADD id_customization INT(10) NOT NULL DEFAULT 0 AFTER id_order_detail; +ALTER TABLE PREFIX_order_return_detail DROP PRIMARY KEY; +ALTER TABLE PREFIX_order_return_detail ADD PRIMARY KEY (id_order_return, id_order_detail, id_customization); + + +ALTER TABLE PREFIX_orders + CHANGE payment payment VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, + CHANGE module module VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL; + +/* ################################# */ +/* CONTENTS */ +/* ################################# */ + +INSERT INTO PREFIX_hook (`name`, `title`, `description`, `position`) VALUES + ('productOutOfStock', 'Product out of stock', 'Make action while product is out of stock', 1), + ('updateProductAttribute', 'Product attribute update', NULL, 1); diff --git a/install-new/upgrade/sql/1.1.0.5.sql b/install-new/upgrade/sql/1.1.0.5.sql new file mode 100644 index 000000000..08b08b3a5 --- /dev/null +++ b/install-new/upgrade/sql/1.1.0.5.sql @@ -0,0 +1,20 @@ +SET NAMES 'utf8'; + +/* ##################################### */ +/* STRUCTURE */ +/* ##################################### */ + +ALTER TABLE PREFIX_product + CHANGE customizable customizable TINYINT(2) NOT NULL DEFAULT 0; +ALTER TABLE PREFIX_connections + CHANGE ip_address ip_address VARCHAR(16) NULL; +ALTER TABLE PREFIX_customer + ADD newsletter_date_add DATETIME NULL; +ALTER TABLE PREFIX_cart_product + ADD date_add DATETIME NOT NULL; + +/* ################################# */ +/* CONTENTS */ +/* ################################# */ + +/* PHP:add_required_customization_field_flag(); */; diff --git a/install-new/upgrade/sql/1.2.0.1.sql b/install-new/upgrade/sql/1.2.0.1.sql new file mode 100644 index 000000000..b4fef836e --- /dev/null +++ b/install-new/upgrade/sql/1.2.0.1.sql @@ -0,0 +1,1071 @@ +SET NAMES 'utf8'; + +/* ##################################### */ +/* STRUCTURE */ +/* ##################################### */ + +DROP TABLE IF EXISTS PREFIX_order_customization_return; + +ALTER TABLE PREFIX_cart + ADD id_guest INT UNSIGNED NULL AFTER id_customer; + +ALTER TABLE PREFIX_tab + ADD `module` varchar(64) NULL AFTER class_name; + +ALTER TABLE PREFIX_product + ADD `indexed` tinyint(1) NOT NULL default '0' AFTER `active`; + +ALTER TABLE PREFIX_orders + DROP INDEX `orders_customer`; +ALTER TABLE PREFIX_orders + ADD INDEX id_customer (id_customer); +ALTER TABLE PREFIX_orders + ADD valid INTEGER(1) UNSIGNED NOT NULL DEFAULT '0' AFTER delivery_date; +ALTER TABLE PREFIX_orders + ADD INDEX `id_cart` (`id_cart`); + +ALTER TABLE PREFIX_customer + ADD deleted TINYINT(1) NOT NULL DEFAULT '0' AFTER active; + +ALTER TABLE PREFIX_employee + ADD stats_date_to DATE NULL DEFAULT NULL AFTER last_passwd_gen; +ALTER TABLE PREFIX_employee + ADD stats_date_from DATE NULL DEFAULT NULL AFTER last_passwd_gen; + +ALTER TABLE PREFIX_order_state + ADD hidden TINYINT(1) UNSIGNED NOT NULL DEFAULT '0' AFTER unremovable; + +ALTER TABLE PREFIX_carrier + ADD is_module TINYINT(1) UNSIGNED NOT NULL DEFAULT '0' AFTER range_behavior; +ALTER TABLE PREFIX_carrier + ADD INDEX deleted (`deleted`, `active`); + +ALTER TABLE PREFIX_state + CHANGE iso_code `iso_code` char(4) NOT NULL; + +ALTER TABLE PREFIX_order_detail + CHANGE product_quantity_cancelled product_quantity_refunded INT(10) UNSIGNED NOT NULL DEFAULT '0'; +ALTER TABLE PREFIX_order_detail + ADD INDEX product_id (product_id); + +ALTER TABLE PREFIX_attribute_lang + ADD INDEX id_lang (`id_lang`, `name`); +ALTER TABLE PREFIX_attribute_lang + ADD INDEX id_lang_2 (`id_lang`); +ALTER TABLE PREFIX_attribute_lang + ADD INDEX id_attribute (`id_attribute`); + +ALTER TABLE PREFIX_block_cms + ADD PRIMARY KEY (`id_block`, `id_cms`); + +/* IGNORE because can raise error data truncated */ +ALTER IGNORE TABLE PREFIX_connections + CHANGE `http_referer` `http_referer` VARCHAR(255) DEFAULT NULL; + +ALTER TABLE PREFIX_connections + ADD INDEX `date_add` (`date_add`); + +ALTER TABLE PREFIX_customer + DROP INDEX `customer_email`; +ALTER TABLE PREFIX_customer + ADD UNIQUE `customer_email` (`email`); + +ALTER TABLE PREFIX_delivery + ADD INDEX id_zone (`id_zone`); +ALTER TABLE PREFIX_delivery + ADD INDEX id_carrier (`id_carrier`, `id_zone`); + +ALTER TABLE PREFIX_feature_product + ADD INDEX `id_feature` (`id_feature`); + +ALTER TABLE PREFIX_hook_module + DROP INDEX `hook_module_index`; +ALTER TABLE PREFIX_hook_module + ADD PRIMARY KEY (id_module,id_hook); +ALTER TABLE PREFIX_hook_module + ADD INDEX id_module (`id_module`); +ALTER TABLE PREFIX_hook_module + ADD INDEX id_hook (`id_hook`); + +ALTER TABLE PREFIX_module + CHANGE `active` `active` TINYINT(1) UNSIGNED NOT NULL DEFAULT '0'; + +ALTER TABLE PREFIX_page + CHANGE `id_object` `id_object` INT UNSIGNED NULL DEFAULT NULL; +ALTER TABLE PREFIX_page + ADD INDEX `id_page_type` (`id_page_type`); +ALTER TABLE PREFIX_page + ADD INDEX `id_object` (`id_object`); + +ALTER TABLE PREFIX_page_type + CHANGE `name` `name` VARCHAR(255) NOT NULL; +ALTER TABLE PREFIX_page_type + ADD INDEX `name` (`name`); + +ALTER TABLE PREFIX_product_attribute + ADD INDEX reference (reference); +ALTER TABLE PREFIX_product_attribute + ADD INDEX supplier_reference (supplier_reference); + +ALTER TABLE PREFIX_product_lang + ADD INDEX id_product (id_product); +ALTER TABLE PREFIX_product_lang + ADD INDEX id_lang (id_lang); +ALTER TABLE PREFIX_product_lang + ADD INDEX `name` (`name`); +ALTER TABLE PREFIX_product_lang + ADD FULLTEXT KEY ftsname (`name`); + +ALTER TABLE PREFIX_cart_discount + ADD INDEX `id_discount` (`id_discount`); + +ALTER TABLE PREFIX_discount_category + ADD PRIMARY KEY (`id_category`,`id_discount`); + +ALTER TABLE PREFIX_image_lang + ADD INDEX id_image (id_image); + +ALTER TABLE PREFIX_range_price + CHANGE `delimiter1` `delimiter1` DECIMAL(13, 6) NOT NULL; +ALTER TABLE PREFIX_range_price + CHANGE `delimiter2` `delimiter2` DECIMAL(13, 6) NOT NULL; +ALTER TABLE PREFIX_range_price + CHANGE `id_carrier` `id_carrier` INT(10) UNSIGNED NOT NULL; +ALTER TABLE PREFIX_range_price + DROP INDEX `range_price_unique`; +ALTER TABLE PREFIX_range_price + ADD UNIQUE KEY `id_carrier` (`id_carrier`,`delimiter1`,`delimiter2`); + +ALTER TABLE PREFIX_range_weight + CHANGE `delimiter1` `delimiter1` DECIMAL(13, 6) NOT NULL; +ALTER TABLE PREFIX_range_weight + CHANGE `delimiter2` `delimiter2` DECIMAL(13, 6) NOT NULL; +ALTER TABLE PREFIX_range_weight + CHANGE `id_carrier` `id_carrier` INT(10) UNSIGNED NOT NULL; +ALTER TABLE PREFIX_range_weight + DROP INDEX `range_weight_unique`; +ALTER TABLE PREFIX_range_weight + ADD UNIQUE KEY `id_carrier` (`id_carrier`,`delimiter1`,`delimiter2`); + +ALTER TABLE PREFIX_scene_products + ADD PRIMARY KEY (`id_scene`, `id_product`, `x_axis`, `y_axis`); + +ALTER TABLE PREFIX_product_lang DROP INDEX fts; +ALTER TABLE PREFIX_product_lang DROP INDEX ftsname ; + +/* KEY management */ +ALTER TABLE PREFIX_attribute_lang DROP INDEX `id_lang_2`; +ALTER TABLE PREFIX_attribute_lang DROP INDEX `id_attribute`; +ALTER TABLE PREFIX_attribute_lang DROP INDEX `attribute_lang_index`, ADD PRIMARY KEY (`id_attribute`, `id_lang`); +ALTER TABLE PREFIX_carrier_zone DROP INDEX `carrier_zone_index`, ADD PRIMARY KEY (`id_carrier`, `id_zone`); +ALTER TABLE PREFIX_discount_category CHANGE `id_discount` `id_discount` int(11) NOT NULL AFTER `id_category`; +ALTER TABLE PREFIX_feature_product DROP INDEX `id_feature`; +ALTER TABLE PREFIX_hook_module DROP INDEX `id_module`; +ALTER TABLE PREFIX_image_lang DROP INDEX `id_image`; +ALTER TABLE PREFIX_product_lang DROP INDEX `id_product`; + +/* ############################################################ */ + +CREATE TABLE `PREFIX_customer_group` ( + `id_customer` int(10) unsigned NOT NULL, + `id_group` int(10) unsigned NOT NULL, + PRIMARY KEY (`id_customer`,`id_group`), + INDEX customer_login(id_group) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +CREATE TABLE PREFIX_category_group ( + id_category INTEGER UNSIGNED NOT NULL, + id_group INTEGER UNSIGNED NOT NULL, + INDEX category_group_index(id_category, id_group) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +CREATE TABLE `PREFIX_group` ( + id_group INTEGER UNSIGNED NOT NULL AUTO_INCREMENT, + reduction DECIMAL(10,2) NOT NULL DEFAULT 0, + date_add DATETIME NOT NULL, + date_upd DATETIME NOT NULL, + PRIMARY KEY(id_group) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +CREATE TABLE PREFIX_group_lang ( + id_group INTEGER UNSIGNED NOT NULL, + id_lang INTEGER UNSIGNED NOT NULL, + name VARCHAR(32) NOT NULL, + UNIQUE INDEX attribute_lang_index(id_group, id_lang) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +CREATE TABLE PREFIX_message_readed ( + id_message INTEGER UNSIGNED NOT NULL, + id_employee INTEGER UNSIGNED NOT NULL, + date_add DATETIME NOT NULL, + PRIMARY KEY (id_message,id_employee) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +CREATE TABLE `PREFIX_attachment` ( + `id_attachment` int(10) unsigned NOT NULL auto_increment, + `file` varchar(40) NOT NULL, + `mime` varchar(32) NOT NULL, + PRIMARY KEY (`id_attachment`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +CREATE TABLE `PREFIX_attachment_lang` ( + `id_attachment` int(10) unsigned NOT NULL auto_increment, + `id_lang` int(10) unsigned NOT NULL, + `name` varchar(32) default NULL, + `description` TEXT, + PRIMARY KEY (`id_attachment`, `id_lang`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +CREATE TABLE `PREFIX_product_attachment` ( + `id_product` int(10) NOT NULL, + `id_attachment` int(10) NOT NULL, + PRIMARY KEY (`id_product`,`id_attachment`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +CREATE TABLE IF NOT EXISTS `PREFIX_connections_source` ( + id_connections_source INTEGER UNSIGNED NOT NULL AUTO_INCREMENT, + id_connections INTEGER UNSIGNED NOT NULL, + http_referer VARCHAR(255) NULL, + request_uri VARCHAR(255) NULL, + keywords VARCHAR(255) NULL, + date_add DATETIME NOT NULL, + PRIMARY KEY (id_connections_source), + INDEX connections (id_connections), + INDEX orderby (date_add), + INDEX http_referer (`http_referer`), + INDEX request_uri(`request_uri`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +CREATE TABLE `PREFIX_referrer` ( + `id_referrer` int(10) unsigned NOT NULL auto_increment, + `name` varchar(64) NOT NULL, + `passwd` varchar(32) default NULL, + `http_referer_regexp` varchar(64) default NULL, + `http_referer_like` varchar(64) default NULL, + `request_uri_regexp` varchar(64) default NULL, + `request_uri_like` varchar(64) default NULL, + `http_referer_regexp_not` varchar(64) default NULL, + `http_referer_like_not` varchar(64) default NULL, + `request_uri_regexp_not` varchar(64) default NULL, + `request_uri_like_not` varchar(64) default NULL, + `base_fee` decimal(5,2) NOT NULL default '0.00', + `percent_fee` decimal(5,2) NOT NULL default '0.00', + `click_fee` decimal(5,2) NOT NULL default '0.00', + `cache_visitors` int(11) default NULL, + `cache_visits` int(11) default NULL, + `cache_pages` int(11) default NULL, + `cache_registrations` int(11) default NULL, + `cache_orders` int(11) default NULL, + `cache_sales` decimal(10,2) default NULL, + `cache_reg_rate` decimal(5,4) default NULL, + `cache_order_rate` decimal(5,4) default NULL, + `date_add` datetime NOT NULL, + PRIMARY KEY (`id_referrer`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +CREATE TABLE `PREFIX_referrer_cache` ( + `id_connections_source` int(11) NOT NULL, + `id_referrer` int(11) NOT NULL, + PRIMARY KEY (`id_connections_source`, `id_referrer`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +CREATE TABLE IF NOT EXISTS `PREFIX_search_engine` ( + id_search_engine INTEGER UNSIGNED NOT NULL AUTO_INCREMENT, + server VARCHAR(64) NOT NULL, + getvar VARCHAR(16) NOT NULL, + PRIMARY KEY(id_search_engine) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +CREATE TABLE `PREFIX_module_group` ( + `id_module` INTEGER UNSIGNED NOT NULL, + `id_group` INTEGER NOT NULL, + PRIMARY KEY (`id_module`, `id_group`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +CREATE TABLE `PREFIX_product_attribute_image` ( + `id_product_attribute` int(10) NOT NULL, + `id_image` int(10) NOT NULL, + PRIMARY KEY (`id_product_attribute`,`id_image`), + KEY `id_image` (`id_image`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +CREATE TABLE `PREFIX_search_index` ( + `id_product` int(11) NOT NULL, + `id_word` int(11) NOT NULL, + `weight` tinyint(4) NOT NULL default '1', + PRIMARY KEY (`id_word`, `id_product`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +CREATE TABLE `PREFIX_search_word` ( + `id_word` int(10) unsigned NOT NULL auto_increment, + `id_lang` int(10) unsigned NOT NULL, + `word` varchar(15) NOT NULL, + PRIMARY KEY (`id_word`), + UNIQUE KEY `id_lang` (`id_lang`,`word`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +CREATE TABLE PREFIX_timezone ( + id_timezone INTEGER UNSIGNED NOT NULL auto_increment, + name VARCHAR(32) NOT NULL, + PRIMARY KEY timezone_index(`id_timezone`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +/* ##################################### */ +/* CONTENTS */ +/* ##################################### */ + +INSERT INTO `PREFIX_order_state` (`id_order_state`, `invoice`, `send_email`, `color`, `unremovable`, `logable`, `delivery`) VALUES + (11, 0, 0, 'lightblue', 1, 0, 0); + +INSERT INTO `PREFIX_order_state_lang` (`id_order_state`, `id_lang`, `name`, `template`) VALUES + (11, 1, 'Awaiting PayPal payment', ''); +INSERT INTO `PREFIX_order_state_lang` (`id_order_state`, `id_lang`, `name`, `template`) VALUES + (11, 2, 'En attente du paiement par PayPal', ''); + +INSERT INTO `PREFIX_configuration` (`name`, `value`, `date_add`, `date_upd`) VALUES + ('PS_SEARCH_MINWORDLEN', '3', NOW(), NOW()); +INSERT INTO `PREFIX_configuration` (`name`, `value`, `date_add`, `date_upd`) VALUES + ('PS_SEARCH_WEIGHT_PNAME', '6', NOW(), NOW()); +INSERT INTO `PREFIX_configuration` (`name`, `value`, `date_add`, `date_upd`) VALUES + ('PS_SEARCH_WEIGHT_REF', '10', NOW(), NOW()); +INSERT INTO `PREFIX_configuration` (`name`, `value`, `date_add`, `date_upd`) VALUES + ('PS_SEARCH_WEIGHT_SHORTDESC', '1', NOW(), NOW()); +INSERT INTO `PREFIX_configuration` (`name`, `value`, `date_add`, `date_upd`) VALUES + ('PS_SEARCH_WEIGHT_DESC', '1', NOW(), NOW()); +INSERT INTO `PREFIX_configuration` (`name`, `value`, `date_add`, `date_upd`) VALUES + ('PS_SEARCH_WEIGHT_CNAME', '3', NOW(), NOW()); +INSERT INTO `PREFIX_configuration` (`name`, `value`, `date_add`, `date_upd`) VALUES + ('PS_SEARCH_WEIGHT_MNAME', '3', NOW(), NOW()); +INSERT INTO `PREFIX_configuration` (`name`, `value`, `date_add`, `date_upd`) VALUES + ('PS_SEARCH_WEIGHT_TAG', '4', NOW(), NOW()); +INSERT INTO `PREFIX_configuration` (`name`, `value`, `date_add`, `date_upd`) VALUES + ('PS_SEARCH_WEIGHT_ATTRIBUTE', '2', NOW(), NOW()); +INSERT INTO `PREFIX_configuration` (`name`, `value`, `date_add`, `date_upd`) VALUES + ('PS_SEARCH_WEIGHT_FEATURE', '2', NOW(), NOW()); +INSERT INTO `PREFIX_configuration` (`name`, `value`, `date_add`, `date_upd`) VALUES + ('PS_SEARCH_AJAX', '1', NOW(), NOW()); +INSERT INTO `PREFIX_configuration` (`name`, `value`, `date_add`, `date_upd`) VALUES + ('PS_TIMEZONE', '374', NOW(), NOW()); +INSERT INTO `PREFIX_configuration` (`name`, `value`, `date_add`, `date_upd`) VALUES + ('BLOCKTAGS_NBR', '10', NOW(), NOW()); + +INSERT INTO PREFIX_hook (`name`, `title`, `description`, `position`) VALUES + ('extraCarrier', 'Extra carrier (module mode)', NULL, 0); +INSERT INTO PREFIX_hook (`name`, `title`, `description`, `position`) VALUES + ('shoppingCartExtra', 'Shopping cart extra button', 'Display some specific informations', 1); +INSERT INTO PREFIX_hook (`name`, `title`, `description`, `position`) VALUES + ('search', 'Search', NULL, 0); +INSERT INTO PREFIX_hook (`name`, `title`, `description`, `position`) VALUES + ('backBeforePayment', 'Redirect in order process', 'Redirect user to the module instead of displaying payment modules', 0); + +UPDATE PREFIX_orders o SET o.valid = IFNULL(( + SELECT os.logable + FROM PREFIX_order_history oh + LEFT JOIN PREFIX_order_state os ON os.id_order_state = oh.id_order_state + WHERE oh.id_order = o.id_order + ORDER BY oh.date_add DESC, oh.id_order_history DESC + LIMIT 1 +), 0); + +INSERT INTO `PREFIX_search_engine` (`id_search_engine`, `server`,`getvar`) VALUES + (1, 'google','q'), + (2, 'search.aol','query'), + (3, 'yandex.ru','text'), + (4, 'ask.com','q'), + (5, 'nhl.com','q'), + (6, 'search.yahoo','p'), + (7, 'baidu.com','wd'), + (8, 'search.lycos','query'), + (9, 'exalead','q'), + (10, 'search.live.com','q'), + (11, 'search.ke.voila','rdata'), + (12, 'altavista','q') + ON DUPLICATE KEY UPDATE server = server; + +/* GROUPS, CUSTOMERS GROUPS, & CATEGORY GROUPS */ +INSERT INTO `PREFIX_group` (`reduction`, `date_add`, `date_upd`) VALUES (0, NOW(), NOW()); +INSERT INTO `PREFIX_group_lang` (`id_lang`, `id_group`, `name`) ( + SELECT `id_lang`, + (SELECT `id_group` FROM `PREFIX_group` LIMIT 1), + 'Default' FROM `PREFIX_lang`); +UPDATE `PREFIX_group_lang` SET `name` = 'Défaut' + WHERE `id_group` = (SELECT `id_group` FROM `PREFIX_group` LIMIT 1) + AND `id_lang` = (SELECT `id_lang` FROM `PREFIX_lang` l WHERE l.iso_code = 'fr'); +INSERT INTO `PREFIX_customer_group` (`id_customer`, `id_group`) + (SELECT `id_customer`, + (SELECT `id_group` FROM `PREFIX_group` LIMIT 1) FROM `PREFIX_customer`); +INSERT INTO `PREFIX_category_group` (`id_category`, `id_group`) + (SELECT `id_category`, + (SELECT `id_group` FROM `PREFIX_group` LIMIT 1) FROM `PREFIX_category`); + +/* NEW TABS */ +INSERT INTO PREFIX_tab (id_parent, class_name, position) VALUES ((SELECT tmp.`id_tab` FROM (SELECT `id_tab` FROM PREFIX_tab t WHERE t.class_name = 'AdminOrders' LIMIT 1) AS tmp), 'AdminMessages', (SELECT tmp.max FROM (SELECT MAX(position) max FROM `PREFIX_tab` WHERE id_parent = (SELECT tmp.`id_tab` FROM (SELECT `id_tab` FROM PREFIX_tab t WHERE t.class_name = 'AdminOrders' LIMIT 1) AS tmp )) AS tmp)); +INSERT INTO PREFIX_tab_lang (id_lang, id_tab, name) ( + SELECT id_lang, + (SELECT id_tab FROM PREFIX_tab t WHERE t.class_name = 'AdminMessages' LIMIT 1), + 'Customer messages' FROM PREFIX_lang); +UPDATE `PREFIX_tab_lang` SET `name` = 'Messages clients' + WHERE `id_tab` = (SELECT `id_tab` FROM `PREFIX_tab` t WHERE t.class_name = 'AdminMessages') + AND `id_lang` = (SELECT `id_lang` FROM `PREFIX_lang` l WHERE l.iso_code = 'fr'); +INSERT INTO PREFIX_access (id_profile, id_tab, `view`, `add`, edit, `delete`) VALUES ('1', (SELECT id_tab FROM PREFIX_tab t WHERE t.class_name = 'AdminMessages' LIMIT 1), 1, 1, 1, 1); + +INSERT INTO PREFIX_tab (id_parent, class_name, position) VALUES ((SELECT tmp.`id_tab` FROM (SELECT `id_tab` FROM PREFIX_tab t WHERE t.class_name = 'AdminCatalog' LIMIT 1) AS tmp), 'AdminTracking', (SELECT tmp.max FROM (SELECT MAX(position) max FROM `PREFIX_tab` WHERE id_parent = (SELECT tmp.`id_tab` FROM (SELECT `id_tab` FROM PREFIX_tab t WHERE t.class_name = 'AdminCatalog' LIMIT 1) AS tmp )) AS tmp)); +INSERT INTO PREFIX_tab_lang (id_lang, id_tab, name) ( + SELECT id_lang, + (SELECT id_tab FROM PREFIX_tab t WHERE t.class_name = 'AdminTracking' LIMIT 1), + 'Tracking' FROM PREFIX_lang); +UPDATE `PREFIX_tab_lang` SET `name` = 'Suivi' + WHERE `id_tab` = (SELECT `id_tab` FROM `PREFIX_tab` t WHERE t.class_name = 'AdminTracking') + AND `id_lang` = (SELECT `id_lang` FROM `PREFIX_lang` l WHERE l.iso_code = 'fr'); +INSERT INTO PREFIX_access (id_profile, id_tab, `view`, `add`, edit, `delete`) VALUES ('1', (SELECT id_tab FROM PREFIX_tab t WHERE t.class_name = 'AdminTracking' LIMIT 1), 1, 1, 1, 1); + +INSERT INTO PREFIX_tab (id_parent, class_name, position) VALUES ((SELECT tmp.`id_tab` FROM (SELECT `id_tab` FROM PREFIX_tab t WHERE t.class_name = 'AdminStats' LIMIT 1) AS tmp), 'AdminSearchEngines', (SELECT tmp.max FROM (SELECT MAX(position) max FROM `PREFIX_tab` WHERE id_parent = (SELECT tmp.`id_tab` FROM (SELECT `id_tab` FROM PREFIX_tab t WHERE t.class_name = 'AdminStats' LIMIT 1) AS tmp )) AS tmp)); +INSERT INTO PREFIX_tab_lang (id_lang, id_tab, name) ( + SELECT id_lang, + (SELECT id_tab FROM PREFIX_tab t WHERE t.class_name = 'AdminSearchEngines' LIMIT 1), + 'Search Engines' FROM PREFIX_lang); +UPDATE `PREFIX_tab_lang` SET `name` = 'Moteurs de recherche' + WHERE `id_tab` = (SELECT `id_tab` FROM `PREFIX_tab` t WHERE t.class_name = 'AdminSearchEngines') + AND `id_lang` = (SELECT `id_lang` FROM `PREFIX_lang` l WHERE l.iso_code = 'fr'); +INSERT INTO PREFIX_access (id_profile, id_tab, `view`, `add`, edit, `delete`) VALUES ('1', (SELECT id_tab FROM PREFIX_tab t WHERE t.class_name = 'AdminSearchEngines' LIMIT 1), 1, 1, 1, 1); + +INSERT INTO PREFIX_tab (id_parent, class_name, position) VALUES ((SELECT tmp.`id_tab` FROM (SELECT `id_tab` FROM PREFIX_tab t WHERE t.class_name = 'AdminStats' LIMIT 1) AS tmp), 'AdminReferrers', (SELECT tmp.max FROM (SELECT MAX(position) max FROM `PREFIX_tab` WHERE id_parent = (SELECT tmp.`id_tab` FROM (SELECT `id_tab` FROM PREFIX_tab t WHERE t.class_name = 'AdminStats' LIMIT 1) AS tmp )) AS tmp)); +INSERT INTO PREFIX_tab_lang (id_lang, id_tab, name) ( + SELECT id_lang, + (SELECT id_tab FROM PREFIX_tab t WHERE t.class_name = 'AdminReferrers' LIMIT 1), + 'Referrers' FROM PREFIX_lang); +UPDATE `PREFIX_tab_lang` SET `name` = 'Sites affluents' + WHERE `id_tab` = (SELECT `id_tab` FROM `PREFIX_tab` t WHERE t.class_name = 'AdminReferrers') + AND `id_lang` = (SELECT `id_lang` FROM `PREFIX_lang` l WHERE l.iso_code = 'fr'); +INSERT INTO PREFIX_access (id_profile, id_tab, `view`, `add`, edit, `delete`) VALUES ('1', (SELECT id_tab FROM PREFIX_tab t WHERE t.class_name = 'AdminReferrers' LIMIT 1), 1, 1, 1, 1); + +INSERT INTO PREFIX_tab (id_parent, class_name, position) VALUES ((SELECT tmp.`id_tab` FROM (SELECT `id_tab` FROM PREFIX_tab t WHERE t.class_name = 'AdminCustomers' LIMIT 1) AS tmp), 'AdminGroups', (SELECT tmp.max FROM (SELECT MAX(position) max FROM `PREFIX_tab` WHERE id_parent = (SELECT tmp.`id_tab` FROM (SELECT `id_tab` FROM PREFIX_tab t WHERE t.class_name = 'AdminCustomers' LIMIT 1) AS tmp )) AS tmp)); +INSERT INTO PREFIX_tab_lang (id_lang, id_tab, name) ( + SELECT id_lang, + (SELECT id_tab FROM PREFIX_tab t WHERE t.class_name = 'AdminGroups' LIMIT 1), + 'Groups' FROM PREFIX_lang); +UPDATE `PREFIX_tab_lang` SET `name` = 'Groupes' + WHERE `id_tab` = (SELECT `id_tab` FROM `PREFIX_tab` t WHERE t.class_name = 'AdminGroups') + AND `id_lang` = (SELECT `id_lang` FROM `PREFIX_lang` l WHERE l.iso_code = 'fr'); +INSERT INTO PREFIX_access (id_profile, id_tab, `view`, `add`, edit, `delete`) VALUES ('1', (SELECT id_tab FROM PREFIX_tab t WHERE t.class_name = 'AdminGroups' LIMIT 1), 1, 1, 1, 1); + +INSERT INTO PREFIX_tab (id_parent, class_name, position) VALUES ((SELECT tmp.`id_tab` FROM (SELECT `id_tab` FROM PREFIX_tab t WHERE t.class_name = 'AdminCustomers' LIMIT 1) AS tmp), 'AdminCarts', (SELECT tmp.max FROM (SELECT MAX(position) max FROM `PREFIX_tab` WHERE id_parent = (SELECT tmp.`id_tab` FROM (SELECT `id_tab` FROM PREFIX_tab t WHERE t.class_name = 'AdminCustomers' LIMIT 1) AS tmp )) AS tmp)); +INSERT INTO PREFIX_tab_lang (id_lang, id_tab, name) ( + SELECT id_lang, + (SELECT id_tab FROM PREFIX_tab t WHERE t.class_name = 'AdminCarts' LIMIT 1), + 'Carts' FROM PREFIX_lang); +UPDATE `PREFIX_tab_lang` SET `name` = 'Paniers' + WHERE `id_tab` = (SELECT `id_tab` FROM `PREFIX_tab` t WHERE t.class_name = 'AdminCarts') + AND `id_lang` = (SELECT `id_lang` FROM `PREFIX_lang` l WHERE l.iso_code = 'fr'); +INSERT INTO PREFIX_access (id_profile, id_tab, `view`, `add`, edit, `delete`) VALUES ('1', (SELECT id_tab FROM PREFIX_tab t WHERE t.class_name = 'AdminCarts' LIMIT 1), 1, 1, 1, 1); + +INSERT INTO PREFIX_tab (id_parent, class_name, position) VALUES ((SELECT tmp.`id_tab` FROM (SELECT `id_tab` FROM PREFIX_tab t WHERE t.class_name = 'AdminCatalog' LIMIT 1) AS tmp), 'AdminTags', (SELECT tmp.max FROM (SELECT MAX(position) max FROM `PREFIX_tab` WHERE id_parent = (SELECT tmp.`id_tab` FROM (SELECT `id_tab` FROM PREFIX_tab t WHERE t.class_name = 'AdminCatalog' LIMIT 1) AS tmp )) AS tmp)); +INSERT INTO PREFIX_tab_lang (id_lang, id_tab, name) ( + SELECT id_lang, + (SELECT id_tab FROM PREFIX_tab t WHERE t.class_name = 'AdminTags' LIMIT 1), + 'Tags' FROM PREFIX_lang); +INSERT INTO PREFIX_access (id_profile, id_tab, `view`, `add`, edit, `delete`) VALUES ('1', (SELECT id_tab FROM PREFIX_tab t WHERE t.class_name = 'AdminTags' LIMIT 1), 1, 1, 1, 1); + +INSERT INTO PREFIX_tab (id_parent, class_name, position) VALUES ((SELECT tmp.`id_tab` FROM (SELECT `id_tab` FROM PREFIX_tab t WHERE t.class_name = 'AdminPreferences' LIMIT 1) AS tmp), 'AdminSearchConf', (SELECT tmp.max FROM (SELECT MAX(position) max FROM `PREFIX_tab` WHERE id_parent = (SELECT tmp.`id_tab` FROM (SELECT `id_tab` FROM PREFIX_tab t WHERE t.class_name = 'AdminPreferences' LIMIT 1) AS tmp )) AS tmp)); +INSERT INTO PREFIX_tab_lang (id_lang, id_tab, name) ( + SELECT id_lang, + (SELECT id_tab FROM PREFIX_tab t WHERE t.class_name = 'AdminSearchConf' LIMIT 1), + 'Search' FROM PREFIX_lang); +UPDATE `PREFIX_tab_lang` SET `name` = 'Recherche' + WHERE `id_tab` = (SELECT `id_tab` FROM `PREFIX_tab` t WHERE t.class_name = 'AdminSearchConf') + AND `id_lang` = (SELECT `id_lang` FROM `PREFIX_lang` l WHERE l.iso_code = 'fr'); +INSERT INTO PREFIX_access (id_profile, id_tab, `view`, `add`, edit, `delete`) VALUES ('1', (SELECT id_tab FROM PREFIX_tab t WHERE t.class_name = 'AdminSearchConf' LIMIT 1), 1, 1, 1, 1); + +INSERT INTO PREFIX_tab (id_parent, class_name, position) VALUES ((SELECT tmp.`id_tab` FROM (SELECT `id_tab` FROM PREFIX_tab t WHERE t.class_name = 'AdminCatalog' LIMIT 1) AS tmp), 'AdminAttachments', (SELECT tmp.max FROM (SELECT MAX(position) max FROM `PREFIX_tab` WHERE id_parent = (SELECT tmp.`id_tab` FROM (SELECT `id_tab` FROM PREFIX_tab t WHERE t.class_name = 'AdminCatalog' LIMIT 1) AS tmp )) AS tmp)); +INSERT INTO PREFIX_tab_lang (id_lang, id_tab, name) ( + SELECT id_lang, + (SELECT id_tab FROM PREFIX_tab t WHERE t.class_name = 'AdminAttachments' LIMIT 1), + 'Attachments' FROM PREFIX_lang); +UPDATE `PREFIX_tab_lang` SET `name` = 'Documents joints' + WHERE `id_tab` = (SELECT `id_tab` FROM `PREFIX_tab` t WHERE t.class_name = 'AdminAttachments') + AND `id_lang` = (SELECT `id_lang` FROM `PREFIX_lang` l WHERE l.iso_code = 'fr'); +INSERT INTO PREFIX_access (id_profile, id_tab, `view`, `add`, edit, `delete`) VALUES ('1', (SELECT id_tab FROM PREFIX_tab t WHERE t.class_name = 'AdminAttachments' LIMIT 1), 1, 1, 1, 1); + +/* CHANGE TABS */ +UPDATE `PREFIX_tab` SET `class_name` = 'AdminStatuses' WHERE `class_name` = 'AdminOrdersStates'; +UPDATE `PREFIX_tab_lang` SET `name` = 'Statuses' + WHERE `id_tab` = (SELECT `id_tab` FROM `PREFIX_tab` t WHERE t.class_name = 'AdminStatuses') + AND `id_lang` = (SELECT `id_lang` FROM `PREFIX_lang` l WHERE l.iso_code = 'en'); +UPDATE `PREFIX_tab_lang` SET `name` = 'Statuts' + WHERE `id_tab` = (SELECT `id_tab` FROM `PREFIX_tab` t WHERE t.class_name = 'AdminStatuses') + AND `id_lang` = (SELECT `id_lang` FROM `PREFIX_lang` l WHERE l.iso_code = 'fr'); + +INSERT IGNORE INTO PREFIX_product_attribute_image (id_image, id_product_attribute) + (SELECT id_image, id_product_attribute FROM PREFIX_product_attribute WHERE id_image IS NOT NULL); +/* ALTER query must stay here (right after the INSERT INTO PREFIX_product_attribute_image)! */ +ALTER TABLE PREFIX_product_attribute DROP id_image; + +UPDATE PREFIX_category_lang SET link_rewrite = 'home' WHERE id_category = 1; + +/* TIMEZONES */ + +INSERT INTO `PREFIX_timezone` (`id_timezone`, `name`) VALUES +(1, 'Africa/Abidjan'), +(2, 'Africa/Accra'), +(3, 'Africa/Addis_Ababa'), +(4, 'Africa/Algiers'), +(5, 'Africa/Asmara'), +(6, 'Africa/Asmera'), +(7, 'Africa/Bamako'), +(8, 'Africa/Bangui'), +(9, 'Africa/Banjul'), +(10, 'Africa/Bissau'), +(11, 'Africa/Blantyre'), +(12, 'Africa/Brazzaville'), +(13, 'Africa/Bujumbura'), +(14, 'Africa/Cairo'), +(15, 'Africa/Casablanca'), +(16, 'Africa/Ceuta'), +(17, 'Africa/Conakry'), +(18, 'Africa/Dakar'), +(19, 'Africa/Dar_es_Salaam'), +(20, 'Africa/Djibouti'), +(21, 'Africa/Douala'), +(22, 'Africa/El_Aaiun'), +(23, 'Africa/Freetown'), +(24, 'Africa/Gaborone'), +(25, 'Africa/Harare'), +(26, 'Africa/Johannesburg'), +(27, 'Africa/Kampala'), +(28, 'Africa/Khartoum'), +(29, 'Africa/Kigali'), +(30, 'Africa/Kinshasa'), +(31, 'Africa/Lagos'), +(32, 'Africa/Libreville'), +(33, 'Africa/Lome'), +(34, 'Africa/Luanda'), +(35, 'Africa/Lubumbashi'), +(36, 'Africa/Lusaka'), +(37, 'Africa/Malabo'), +(38, 'Africa/Maputo'), +(39, 'Africa/Maseru'), +(40, 'Africa/Mbabane'), +(41, 'Africa/Mogadishu'), +(42, 'Africa/Monrovia'), +(43, 'Africa/Nairobi'), +(44, 'Africa/Ndjamena'), +(45, 'Africa/Niamey'), +(46, 'Africa/Nouakchott'), +(47, 'Africa/Ouagadougou'), +(48, 'Africa/Porto-Novo'), +(49, 'Africa/Sao_Tome'), +(50, 'Africa/Timbuktu'), +(51, 'Africa/Tripoli'), +(52, 'Africa/Tunis'), +(53, 'Africa/Windhoek'), +(54, 'America/Adak'), +(55, 'America/Anchorage '), +(56, 'America/Anguilla'), +(57, 'America/Antigua'), +(58, 'America/Araguaina'), +(59, 'America/Argentina/Buenos_Aires'), +(60, 'America/Argentina/Catamarca'), +(61, 'America/Argentina/ComodRivadavia'), +(62, 'America/Argentina/Cordoba'), +(63, 'America/Argentina/Jujuy'), +(64, 'America/Argentina/La_Rioja'), +(65, 'America/Argentina/Mendoza'), +(66, 'America/Argentina/Rio_Gallegos'), +(67, 'America/Argentina/Salta'), +(68, 'America/Argentina/San_Juan'), +(69, 'America/Argentina/San_Luis'), +(70, 'America/Argentina/Tucuman'), +(71, 'America/Argentina/Ushuaia'), +(72, 'America/Aruba'), +(73, 'America/Asuncion'), +(74, 'America/Atikokan'), +(75, 'America/Atka'), +(76, 'America/Bahia'), +(77, 'America/Barbados'), +(78, 'America/Belem'), +(79, 'America/Belize'), +(80, 'America/Blanc-Sablon'), +(81, 'America/Boa_Vista'), +(82, 'America/Bogota'), +(83, 'America/Boise'), +(84, 'America/Buenos_Aires'), +(85, 'America/Cambridge_Bay'), +(86, 'America/Campo_Grande'), +(87, 'America/Cancun'), +(88, 'America/Caracas'), +(89, 'America/Catamarca'), +(90, 'America/Cayenne'), +(91, 'America/Cayman'), +(92, 'America/Chicago'), +(93, 'America/Chihuahua'), +(94, 'America/Coral_Harbour'), +(95, 'America/Cordoba'), +(96, 'America/Costa_Rica'), +(97, 'America/Cuiaba'), +(98, 'America/Curacao'), +(99, 'America/Danmarkshavn'), +(100, 'America/Dawson'), +(101, 'America/Dawson_Creek'), +(102, 'America/Denver'), +(103, 'America/Detroit'), +(104, 'America/Dominica'), +(105, 'America/Edmonton'), +(106, 'America/Eirunepe'), +(107, 'America/El_Salvador'), +(108, 'America/Ensenada'), +(109, 'America/Fort_Wayne'), +(110, 'America/Fortaleza'), +(111, 'America/Glace_Bay'), +(112, 'America/Godthab'), +(113, 'America/Goose_Bay'), +(114, 'America/Grand_Turk'), +(115, 'America/Grenada'), +(116, 'America/Guadeloupe'), +(117, 'America/Guatemala'), +(118, 'America/Guayaquil'), +(119, 'America/Guyana'), +(120, 'America/Halifax'), +(121, 'America/Havana'), +(122, 'America/Hermosillo'), +(123, 'America/Indiana/Indianapolis'), +(124, 'America/Indiana/Knox'), +(125, 'America/Indiana/Marengo'), +(126, 'America/Indiana/Petersburg'), +(127, 'America/Indiana/Tell_City'), +(128, 'America/Indiana/Vevay'), +(129, 'America/Indiana/Vincennes'), +(130, 'America/Indiana/Winamac'), +(131, 'America/Indianapolis'), +(132, 'America/Inuvik'), +(133, 'America/Iqaluit'), +(134, 'America/Jamaica'), +(135, 'America/Jujuy'), +(136, 'America/Juneau'), +(137, 'America/Kentucky/Louisville'), +(138, 'America/Kentucky/Monticello'), +(139, 'America/Knox_IN'), +(140, 'America/La_Paz'), +(141, 'America/Lima'), +(142, 'America/Los_Angeles'), +(143, 'America/Louisville'), +(144, 'America/Maceio'), +(145, 'America/Managua'), +(146, 'America/Manaus'), +(147, 'America/Marigot'), +(148, 'America/Martinique'), +(149, 'America/Mazatlan'), +(150, 'America/Mendoza'), +(151, 'America/Menominee'), +(152, 'America/Merida'), +(153, 'America/Mexico_City'), +(154, 'America/Miquelon'), +(155, 'America/Moncton'), +(156, 'America/Monterrey'), +(157, 'America/Montevideo'), +(158, 'America/Montreal'), +(159, 'America/Montserrat'), +(160, 'America/Nassau'), +(161, 'America/New_York'), +(162, 'America/Nipigon'), +(163, 'America/Nome'), +(164, 'America/Noronha'), +(165, 'America/North_Dakota/Center'), +(166, 'America/North_Dakota/New_Salem'), +(167, 'America/Panama'), +(168, 'America/Pangnirtung'), +(169, 'America/Paramaribo'), +(170, 'America/Phoenix'), +(171, 'America/Port-au-Prince'), +(172, 'America/Port_of_Spain'), +(173, 'America/Porto_Acre'), +(174, 'America/Porto_Velho'), +(175, 'America/Puerto_Rico'), +(176, 'America/Rainy_River'), +(177, 'America/Rankin_Inlet'), +(178, 'America/Recife'), +(179, 'America/Regina'), +(180, 'America/Resolute'), +(181, 'America/Rio_Branco'), +(182, 'America/Rosario'), +(183, 'America/Santarem'), +(184, 'America/Santiago'), +(185, 'America/Santo_Domingo'), +(186, 'America/Sao_Paulo'), +(187, 'America/Scoresbysund'), +(188, 'America/Shiprock'), +(189, 'America/St_Barthelemy'), +(190, 'America/St_Johns'), +(191, 'America/St_Kitts'), +(192, 'America/St_Lucia'), +(193, 'America/St_Thomas'), +(194, 'America/St_Vincent'), +(195, 'America/Swift_Current'), +(196, 'America/Tegucigalpa'), +(197, 'America/Thule'), +(198, 'America/Thunder_Bay'), +(199, 'America/Tijuana'), +(200, 'America/Toronto'), +(201, 'America/Tortola'), +(202, 'America/Vancouver'), +(203, 'America/Virgin'), +(204, 'America/Whitehorse'), +(205, 'America/Winnipeg'), +(206, 'America/Yakutat'), +(207, 'America/Yellowknife'), +(208, 'Antarctica/Casey'), +(209, 'Antarctica/Davis'), +(210, 'Antarctica/DumontDUrville'), +(211, 'Antarctica/Mawson'), +(212, 'Antarctica/McMurdo'), +(213, 'Antarctica/Palmer'), +(214, 'Antarctica/Rothera'), +(215, 'Antarctica/South_Pole'), +(216, 'Antarctica/Syowa'), +(217, 'Antarctica/Vostok'), +(218, 'Arctic/Longyearbyen'), +(219, 'Asia/Aden'), +(220, 'Asia/Almaty'), +(221, 'Asia/Amman'), +(222, 'Asia/Anadyr'), +(223, 'Asia/Aqtau'), +(224, 'Asia/Aqtobe'), +(225, 'Asia/Ashgabat'), +(226, 'Asia/Ashkhabad'), +(227, 'Asia/Baghdad'), +(228, 'Asia/Bahrain'), +(229, 'Asia/Baku'), +(230, 'Asia/Bangkok'), +(231, 'Asia/Beirut'), +(232, 'Asia/Bishkek'), +(233, 'Asia/Brunei'), +(234, 'Asia/Calcutta'), +(235, 'Asia/Choibalsan'), +(236, 'Asia/Chongqing'), +(237, 'Asia/Chungking'), +(238, 'Asia/Colombo'), +(239, 'Asia/Dacca'), +(240, 'Asia/Damascus'), +(241, 'Asia/Dhaka'), +(242, 'Asia/Dili'), +(243, 'Asia/Dubai'), +(244, 'Asia/Dushanbe'), +(245, 'Asia/Gaza'), +(246, 'Asia/Harbin'), +(247, 'Asia/Ho_Chi_Minh'), +(248, 'Asia/Hong_Kong'), +(249, 'Asia/Hovd'), +(250, 'Asia/Irkutsk'), +(251, 'Asia/Istanbul'), +(252, 'Asia/Jakarta'), +(253, 'Asia/Jayapura'), +(254, 'Asia/Jerusalem'), +(255, 'Asia/Kabul'), +(256, 'Asia/Kamchatka'), +(257, 'Asia/Karachi'), +(258, 'Asia/Kashgar'), +(259, 'Asia/Kathmandu'), +(260, 'Asia/Katmandu'), +(261, 'Asia/Kolkata'), +(262, 'Asia/Krasnoyarsk'), +(263, 'Asia/Kuala_Lumpur'), +(264, 'Asia/Kuching'), +(265, 'Asia/Kuwait'), +(266, 'Asia/Macao'), +(267, 'Asia/Macau'), +(268, 'Asia/Magadan'), +(269, 'Asia/Makassar'), +(270, 'Asia/Manila'), +(271, 'Asia/Muscat'), +(272, 'Asia/Nicosia'), +(273, 'Asia/Novosibirsk'), +(274, 'Asia/Omsk'), +(275, 'Asia/Oral'), +(276, 'Asia/Phnom_Penh'), +(277, 'Asia/Pontianak'), +(278, 'Asia/Pyongyang'), +(279, 'Asia/Qatar'), +(280, 'Asia/Qyzylorda'), +(281, 'Asia/Rangoon'), +(282, 'Asia/Riyadh'), +(283, 'Asia/Saigon'), +(284, 'Asia/Sakhalin'), +(285, 'Asia/Samarkand'), +(286, 'Asia/Seoul'), +(287, 'Asia/Shanghai'), +(288, 'Asia/Singapore'), +(289, 'Asia/Taipei'), +(290, 'Asia/Tashkent'), +(291, 'Asia/Tbilisi'), +(292, 'Asia/Tehran'), +(293, 'Asia/Tel_Aviv'), +(294, 'Asia/Thimbu'), +(295, 'Asia/Thimphu'), +(296, 'Asia/Tokyo'), +(297, 'Asia/Ujung_Pandang'), +(298, 'Asia/Ulaanbaatar'), +(299, 'Asia/Ulan_Bator'), +(300, 'Asia/Urumqi'), +(301, 'Asia/Vientiane'), +(302, 'Asia/Vladivostok'), +(303, 'Asia/Yakutsk'), +(304, 'Asia/Yekaterinburg'), +(305, 'Asia/Yerevan'), +(306, 'Atlantic/Azores'), +(307, 'Atlantic/Bermuda'), +(308, 'Atlantic/Canary'), +(309, 'Atlantic/Cape_Verde'), +(310, 'Atlantic/Faeroe'), +(311, 'Atlantic/Faroe'), +(312, 'Atlantic/Jan_Mayen'), +(313, 'Atlantic/Madeira'), +(314, 'Atlantic/Reykjavik'), +(315, 'Atlantic/South_Georgia'), +(316, 'Atlantic/St_Helena'), +(317, 'Atlantic/Stanley'), +(318, 'Australia/ACT'), +(319, 'Australia/Adelaide'), +(320, 'Australia/Brisbane'), +(321, 'Australia/Broken_Hill'), +(322, 'Australia/Canberra'), +(323, 'Australia/Currie'), +(324, 'Australia/Darwin'), +(325, 'Australia/Eucla'), +(326, 'Australia/Hobart'), +(327, 'Australia/LHI'), +(328, 'Australia/Lindeman'), +(329, 'Australia/Lord_Howe'), +(330, 'Australia/Melbourne'), +(331, 'Australia/North'), +(332, 'Australia/NSW'), +(333, 'Australia/Perth'), +(334, 'Australia/Queensland'), +(335, 'Australia/South'), +(336, 'Australia/Sydney'), +(337, 'Australia/Tasmania'), +(338, 'Australia/Victoria'), +(339, 'Australia/West'), +(340, 'Australia/Yancowinna'), +(341, 'Europe/Amsterdam'), +(342, 'Europe/Andorra'), +(343, 'Europe/Athens'), +(344, 'Europe/Belfast'), +(345, 'Europe/Belgrade'), +(346, 'Europe/Berlin'), +(347, 'Europe/Bratislava'), +(348, 'Europe/Brussels'), +(349, 'Europe/Bucharest'), +(350, 'Europe/Budapest'), +(351, 'Europe/Chisinau'), +(352, 'Europe/Copenhagen'), +(353, 'Europe/Dublin'), +(354, 'Europe/Gibraltar'), +(355, 'Europe/Guernsey'), +(356, 'Europe/Helsinki'), +(357, 'Europe/Isle_of_Man'), +(358, 'Europe/Istanbul'), +(359, 'Europe/Jersey'), +(360, 'Europe/Kaliningrad'), +(361, 'Europe/Kiev'), +(362, 'Europe/Lisbon'), +(363, 'Europe/Ljubljana'), +(364, 'Europe/London'), +(365, 'Europe/Luxembourg'), +(366, 'Europe/Madrid'), +(367, 'Europe/Malta'), +(368, 'Europe/Mariehamn'), +(369, 'Europe/Minsk'), +(370, 'Europe/Monaco'), +(371, 'Europe/Moscow'), +(372, 'Europe/Nicosia'), +(373, 'Europe/Oslo'), +(374, 'Europe/Paris'), +(375, 'Europe/Podgorica'), +(376, 'Europe/Prague'), +(377, 'Europe/Riga'), +(378, 'Europe/Rome'), +(379, 'Europe/Samara'), +(380, 'Europe/San_Marino'), +(381, 'Europe/Sarajevo'), +(382, 'Europe/Simferopol'), +(383, 'Europe/Skopje'), +(384, 'Europe/Sofia'), +(385, 'Europe/Stockholm'), +(386, 'Europe/Tallinn'), +(387, 'Europe/Tirane'), +(388, 'Europe/Tiraspol'), +(389, 'Europe/Uzhgorod'), +(390, 'Europe/Vaduz'), +(391, 'Europe/Vatican'), +(392, 'Europe/Vienna'), +(393, 'Europe/Vilnius'), +(394, 'Europe/Volgograd'), +(395, 'Europe/Warsaw'), +(396, 'Europe/Zagreb'), +(397, 'Europe/Zaporozhye'), +(398, 'Europe/Zurich'), +(399, 'Indian/Antananarivo'), +(400, 'Indian/Chagos'), +(401, 'Indian/Christmas'), +(402, 'Indian/Cocos'), +(403, 'Indian/Comoro'), +(404, 'Indian/Kerguelen'), +(405, 'Indian/Mahe'), +(406, 'Indian/Maldives'), +(407, 'Indian/Mauritius'), +(408, 'Indian/Mayotte'), +(409, 'Indian/Reunion'), +(410, 'Pacific/Apia'), +(411, 'Pacific/Auckland'), +(412, 'Pacific/Chatham'), +(413, 'Pacific/Easter'), +(414, 'Pacific/Efate'), +(415, 'Pacific/Enderbury'), +(416, 'Pacific/Fakaofo'), +(417, 'Pacific/Fiji'), +(418, 'Pacific/Funafuti'), +(419, 'Pacific/Galapagos'), +(420, 'Pacific/Gambier'), +(421, 'Pacific/Guadalcanal'), +(422, 'Pacific/Guam'), +(423, 'Pacific/Honolulu'), +(424, 'Pacific/Johnston'), +(425, 'Pacific/Kiritimati'), +(426, 'Pacific/Kosrae'), +(427, 'Pacific/Kwajalein'), +(428, 'Pacific/Majuro'), +(429, 'Pacific/Marquesas'), +(430, 'Pacific/Midway'), +(431, 'Pacific/Nauru'), +(432, 'Pacific/Niue'), +(433, 'Pacific/Norfolk'), +(434, 'Pacific/Noumea'), +(435, 'Pacific/Pago_Pago'), +(436, 'Pacific/Palau'), +(437, 'Pacific/Pitcairn'), +(438, 'Pacific/Ponape'), +(439, 'Pacific/Port_Moresby'), +(440, 'Pacific/Rarotonga'), +(441, 'Pacific/Saipan'), +(442, 'Pacific/Samoa'), +(443, 'Pacific/Tahiti'), +(444, 'Pacific/Tarawa'), +(445, 'Pacific/Tongatapu'), +(446, 'Pacific/Truk'), +(447, 'Pacific/Wake'), +(448, 'Pacific/Wallis'), +(449, 'Pacific/Yap'), +(450, 'Brazil/Acre'), +(451, 'Brazil/DeNoronha'), +(452, 'Brazil/East'), +(453, 'Brazil/West'), +(454, 'Canada/Atlantic'), +(455, 'Canada/Central'), +(456, 'Canada/East-Saskatchewan'), +(457, 'Canada/Eastern'), +(458, 'Canada/Mountain'), +(459, 'Canada/Newfoundland'), +(460, 'Canada/Pacific'), +(461, 'Canada/Saskatchewan'), +(462, 'Canada/Yukon'), +(463, 'CET'), +(464, 'Chile/Continental'), +(465, 'Chile/EasterIsland'), +(466, 'CST6CDT'), +(467, 'Cuba'), +(468, 'EET'), +(469, 'Egypt'), +(470, 'Eire'), +(471, 'EST'), +(472, 'EST5EDT'), +(473, 'Etc/GMT'), +(474, 'Etc/GMT+0'), +(475, 'Etc/GMT+1'), +(476, 'Etc/GMT+10'), +(477, 'Etc/GMT+11'), +(478, 'Etc/GMT+12'), +(479, 'Etc/GMT+2'), +(480, 'Etc/GMT+3'), +(481, 'Etc/GMT+4'), +(482, 'Etc/GMT+5'), +(483, 'Etc/GMT+6'), +(484, 'Etc/GMT+7'), +(485, 'Etc/GMT+8'), +(486, 'Etc/GMT+9'), +(487, 'Etc/GMT-0'), +(488, 'Etc/GMT-1'), +(489, 'Etc/GMT-10'), +(490, 'Etc/GMT-11'), +(491, 'Etc/GMT-12'), +(492, 'Etc/GMT-13'), +(493, 'Etc/GMT-14'), +(494, 'Etc/GMT-2'), +(495, 'Etc/GMT-3'), +(496, 'Etc/GMT-4'), +(497, 'Etc/GMT-5'), +(498, 'Etc/GMT-6'), +(499, 'Etc/GMT-7'), +(500, 'Etc/GMT-8'), +(501, 'Etc/GMT-9'), +(502, 'Etc/GMT0'), +(503, 'Etc/Greenwich'), +(504, 'Etc/UCT'), +(505, 'Etc/Universal'), +(506, 'Etc/UTC'), +(507, 'Etc/Zulu'), +(508, 'Factory'), +(509, 'GB'), +(510, 'GB-Eire'), +(511, 'GMT'), +(512, 'GMT+0'), +(513, 'GMT-0'), +(514, 'GMT0'), +(515, 'Greenwich'), +(516, 'Hongkong'), +(517, 'HST'), +(518, 'Iceland'), +(519, 'Iran'), +(520, 'Israel'), +(521, 'Jamaica'), +(522, 'Japan'), +(523, 'Kwajalein'), +(524, 'Libya'), +(525, 'MET'), +(526, 'Mexico/BajaNorte'), +(527, 'Mexico/BajaSur'), +(528, 'Mexico/General'), +(529, 'MST'), +(530, 'MST7MDT'), +(531, 'Navajo'), +(532, 'NZ'), +(533, 'NZ-CHAT'), +(534, 'Poland'), +(535, 'Portugal'), +(536, 'PRC'), +(537, 'PST8PDT'), +(538, 'ROC'), +(539, 'ROK'), +(540, 'Singapore'), +(541, 'Turkey'), +(542, 'UCT'), +(543, 'Universal'), +(544, 'US/Alaska'), +(545, 'US/Aleutian'), +(546, 'US/Arizona'), +(547, 'US/Central'), +(548, 'US/East-Indiana'), +(549, 'US/Eastern'), +(550, 'US/Hawaii'), +(551, 'US/Indiana-Starke'), +(552, 'US/Michigan'), +(553, 'US/Mountain'), +(554, 'US/Pacific'), +(555, 'US/Pacific-New'), +(556, 'US/Samoa'), +(557, 'UTC'), +(558, 'W-SU'), +(559, 'WET'), +(560, 'Zulu'); + +/* PHP:blocknewsletter(); */; +/* PHP:set_payment_module_group(); */; +/* PHP:add_new_tab(AdminGenerator, fr:Générateurs|es:Generadores|en:Generators|de:Generatoren|it:Generatori, 9); */; diff --git a/install-new/upgrade/sql/1.2.0.2.sql b/install-new/upgrade/sql/1.2.0.2.sql new file mode 100644 index 000000000..605edb065 --- /dev/null +++ b/install-new/upgrade/sql/1.2.0.2.sql @@ -0,0 +1,610 @@ +SET NAMES 'utf8'; + +/* ##################################### */ +/* STRUCTURE */ +/* ##################################### */ + +CREATE TABLE `PREFIX_pack` ( + `id_product_pack` int(10) unsigned NOT NULL, + `id_product_item` int(10) unsigned NOT NULL, + `quantity` int(10) unsigned NOT NULL DEFAULT 1, + PRIMARY KEY (`id_product_pack`,`id_product_item`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +ALTER TABLE `PREFIX_manufacturer_lang` + ADD `short_description` VARCHAR( 254 ) NULL DEFAULT NULL; +ALTER TABLE `PREFIX_manufacturer_lang` + ADD `meta_title` VARCHAR( 254 ) NULL DEFAULT NULL; +ALTER TABLE `PREFIX_manufacturer_lang` + ADD `meta_keywords` VARCHAR( 254 ) NULL DEFAULT NULL; +ALTER TABLE `PREFIX_manufacturer_lang` + ADD `meta_description` VARCHAR( 254 ) NULL DEFAULT NULL; + +ALTER TABLE `PREFIX_supplier_lang` + ADD `meta_title` VARCHAR( 254 ) NULL DEFAULT NULL; +ALTER TABLE `PREFIX_supplier_lang` + ADD `meta_keywords` VARCHAR( 254 ) NULL DEFAULT NULL; +ALTER TABLE `PREFIX_supplier_lang` + ADD `meta_description` VARCHAR( 254 ) NULL DEFAULT NULL; + +/* ##################################### */ +/* CONTENTS */ +/* ##################################### */ + +TRUNCATE TABLE `PREFIX_timezone`; +INSERT INTO `PREFIX_timezone` (`name`) VALUES + ('Africa/Abidjan'), + ('Africa/Accra'), + ('Africa/Addis_Ababa'), + ('Africa/Algiers'), + ('Africa/Asmara'), + ('Africa/Asmera'), + ('Africa/Bamako'), + ('Africa/Bangui'), + ('Africa/Banjul'), + ('Africa/Bissau'), + ('Africa/Blantyre'), + ('Africa/Brazzaville'), + ('Africa/Bujumbura'), + ('Africa/Cairo'), + ('Africa/Casablanca'), + ('Africa/Ceuta'), + ('Africa/Conakry'), + ('Africa/Dakar'), + ('Africa/Dar_es_Salaam'), + ('Africa/Djibouti'), + ('Africa/Douala'), + ('Africa/El_Aaiun'), + ('Africa/Freetown'), + ('Africa/Gaborone'), + ('Africa/Harare'), + ('Africa/Johannesburg'), + ('Africa/Kampala'), + ('Africa/Khartoum'), + ('Africa/Kigali'), + ('Africa/Kinshasa'), + ('Africa/Lagos'), + ('Africa/Libreville'), + ('Africa/Lome'), + ('Africa/Luanda'), + ('Africa/Lubumbashi'), + ('Africa/Lusaka'), + ('Africa/Malabo'), + ('Africa/Maputo'), + ('Africa/Maseru'), + ('Africa/Mbabane'), + ('Africa/Mogadishu'), + ('Africa/Monrovia'), + ('Africa/Nairobi'), + ('Africa/Ndjamena'), + ('Africa/Niamey'), + ('Africa/Nouakchott'), + ('Africa/Ouagadougou'), + ('Africa/Porto-Novo'), + ('Africa/Sao_Tome'), + ('Africa/Timbuktu'), + ('Africa/Tripoli'), + ('Africa/Tunis'), + ('Africa/Windhoek'), + ('America/Adak'), + ('America/Anchorage '), + ('America/Anguilla'), + ('America/Antigua'), + ('America/Araguaina'), + ('America/Argentina/Buenos_Aires'), + ('America/Argentina/Catamarca'), + ('America/Argentina/ComodRivadavia'), + ('America/Argentina/Cordoba'), + ('America/Argentina/Jujuy'), + ('America/Argentina/La_Rioja'), + ('America/Argentina/Mendoza'), + ('America/Argentina/Rio_Gallegos'), + ('America/Argentina/Salta'), + ('America/Argentina/San_Juan'), + ('America/Argentina/San_Luis'), + ('America/Argentina/Tucuman'), + ('America/Argentina/Ushuaia'), + ('America/Aruba'), + ('America/Asuncion'), + ('America/Atikokan'), + ('America/Atka'), + ('America/Bahia'), + ('America/Barbados'), + ('America/Belem'), + ('America/Belize'), + ('America/Blanc-Sablon'), + ('America/Boa_Vista'), + ('America/Bogota'), + ('America/Boise'), + ('America/Buenos_Aires'), + ('America/Cambridge_Bay'), + ('America/Campo_Grande'), + ('America/Cancun'), + ('America/Caracas'), + ('America/Catamarca'), + ('America/Cayenne'), + ('America/Cayman'), + ('America/Chicago'), + ('America/Chihuahua'), + ('America/Coral_Harbour'), + ('America/Cordoba'), + ('America/Costa_Rica'), + ('America/Cuiaba'), + ('America/Curacao'), + ('America/Danmarkshavn'), + ('America/Dawson'), + ('America/Dawson_Creek'), + ('America/Denver'), + ('America/Detroit'), + ('America/Dominica'), + ('America/Edmonton'), + ('America/Eirunepe'), + ('America/El_Salvador'), + ('America/Ensenada'), + ('America/Fort_Wayne'), + ('America/Fortaleza'), + ('America/Glace_Bay'), + ('America/Godthab'), + ('America/Goose_Bay'), + ('America/Grand_Turk'), + ('America/Grenada'), + ('America/Guadeloupe'), + ('America/Guatemala'), + ('America/Guayaquil'), + ('America/Guyana'), + ('America/Halifax'), + ('America/Havana'), + ('America/Hermosillo'), + ('America/Indiana/Indianapolis'), + ('America/Indiana/Knox'), + ('America/Indiana/Marengo'), + ('America/Indiana/Petersburg'), + ('America/Indiana/Tell_City'), + ('America/Indiana/Vevay'), + ('America/Indiana/Vincennes'), + ('America/Indiana/Winamac'), + ('America/Indianapolis'), + ('America/Inuvik'), + ('America/Iqaluit'), + ('America/Jamaica'), + ('America/Jujuy'), + ('America/Juneau'), + ('America/Kentucky/Louisville'), + ('America/Kentucky/Monticello'), + ('America/Knox_IN'), + ('America/La_Paz'), + ('America/Lima'), + ('America/Los_Angeles'), + ('America/Louisville'), + ('America/Maceio'), + ('America/Managua'), + ('America/Manaus'), + ('America/Marigot'), + ('America/Martinique'), + ('America/Mazatlan'), + ('America/Mendoza'), + ('America/Menominee'), + ('America/Merida'), + ('America/Mexico_City'), + ('America/Miquelon'), + ('America/Moncton'), + ('America/Monterrey'), + ('America/Montevideo'), + ('America/Montreal'), + ('America/Montserrat'), + ('America/Nassau'), + ('America/New_York'), + ('America/Nipigon'), + ('America/Nome'), + ('America/Noronha'), + ('America/North_Dakota/Center'), + ('America/North_Dakota/New_Salem'), + ('America/Panama'), + ('America/Pangnirtung'), + ('America/Paramaribo'), + ('America/Phoenix'), + ('America/Port-au-Prince'), + ('America/Port_of_Spain'), + ('America/Porto_Acre'), + ('America/Porto_Velho'), + ('America/Puerto_Rico'), + ('America/Rainy_River'), + ('America/Rankin_Inlet'), + ('America/Recife'), + ('America/Regina'), + ('America/Resolute'), + ('America/Rio_Branco'), + ('America/Rosario'), + ('America/Santarem'), + ('America/Santiago'), + ('America/Santo_Domingo'), + ('America/Sao_Paulo'), + ('America/Scoresbysund'), + ('America/Shiprock'), + ('America/St_Barthelemy'), + ('America/St_Johns'), + ('America/St_Kitts'), + ('America/St_Lucia'), + ('America/St_Thomas'), + ('America/St_Vincent'), + ('America/Swift_Current'), + ('America/Tegucigalpa'), + ('America/Thule'), + ('America/Thunder_Bay'), + ('America/Tijuana'), + ('America/Toronto'), + ('America/Tortola'), + ('America/Vancouver'), + ('America/Virgin'), + ('America/Whitehorse'), + ('America/Winnipeg'), + ('America/Yakutat'), + ('America/Yellowknife'), + ('Antarctica/Casey'), + ('Antarctica/Davis'), + ('Antarctica/DumontDUrville'), + ('Antarctica/Mawson'), + ('Antarctica/McMurdo'), + ('Antarctica/Palmer'), + ('Antarctica/Rothera'), + ('Antarctica/South_Pole'), + ('Antarctica/Syowa'), + ('Antarctica/Vostok'), + ('Arctic/Longyearbyen'), + ('Asia/Aden'), + ('Asia/Almaty'), + ('Asia/Amman'), + ('Asia/Anadyr'), + ('Asia/Aqtau'), + ('Asia/Aqtobe'), + ('Asia/Ashgabat'), + ('Asia/Ashkhabad'), + ('Asia/Baghdad'), + ('Asia/Bahrain'), + ('Asia/Baku'), + ('Asia/Bangkok'), + ('Asia/Beirut'), + ('Asia/Bishkek'), + ('Asia/Brunei'), + ('Asia/Calcutta'), + ('Asia/Choibalsan'), + ('Asia/Chongqing'), + ('Asia/Chungking'), + ('Asia/Colombo'), + ('Asia/Dacca'), + ('Asia/Damascus'), + ('Asia/Dhaka'), + ('Asia/Dili'), + ('Asia/Dubai'), + ('Asia/Dushanbe'), + ('Asia/Gaza'), + ('Asia/Harbin'), + ('Asia/Ho_Chi_Minh'), + ('Asia/Hong_Kong'), + ('Asia/Hovd'), + ('Asia/Irkutsk'), + ('Asia/Istanbul'), + ('Asia/Jakarta'), + ('Asia/Jayapura'), + ('Asia/Jerusalem'), + ('Asia/Kabul'), + ('Asia/Kamchatka'), + ('Asia/Karachi'), + ('Asia/Kashgar'), + ('Asia/Kathmandu'), + ('Asia/Katmandu'), + ('Asia/Kolkata'), + ('Asia/Krasnoyarsk'), + ('Asia/Kuala_Lumpur'), + ('Asia/Kuching'), + ('Asia/Kuwait'), + ('Asia/Macao'), + ('Asia/Macau'), + ('Asia/Magadan'), + ('Asia/Makassar'), + ('Asia/Manila'), + ('Asia/Muscat'), + ('Asia/Nicosia'), + ('Asia/Novosibirsk'), + ('Asia/Omsk'), + ('Asia/Oral'), + ('Asia/Phnom_Penh'), + ('Asia/Pontianak'), + ('Asia/Pyongyang'), + ('Asia/Qatar'), + ('Asia/Qyzylorda'), + ('Asia/Rangoon'), + ('Asia/Riyadh'), + ('Asia/Saigon'), + ('Asia/Sakhalin'), + ('Asia/Samarkand'), + ('Asia/Seoul'), + ('Asia/Shanghai'), + ('Asia/Singapore'), + ('Asia/Taipei'), + ('Asia/Tashkent'), + ('Asia/Tbilisi'), + ('Asia/Tehran'), + ('Asia/Tel_Aviv'), + ('Asia/Thimbu'), + ('Asia/Thimphu'), + ('Asia/Tokyo'), + ('Asia/Ujung_Pandang'), + ('Asia/Ulaanbaatar'), + ('Asia/Ulan_Bator'), + ('Asia/Urumqi'), + ('Asia/Vientiane'), + ('Asia/Vladivostok'), + ('Asia/Yakutsk'), + ('Asia/Yekaterinburg'), + ('Asia/Yerevan'), + ('Atlantic/Azores'), + ('Atlantic/Bermuda'), + ('Atlantic/Canary'), + ('Atlantic/Cape_Verde'), + ('Atlantic/Faeroe'), + ('Atlantic/Faroe'), + ('Atlantic/Jan_Mayen'), + ('Atlantic/Madeira'), + ('Atlantic/Reykjavik'), + ('Atlantic/South_Georgia'), + ('Atlantic/St_Helena'), + ('Atlantic/Stanley'), + ('Australia/ACT'), + ('Australia/Adelaide'), + ('Australia/Brisbane'), + ('Australia/Broken_Hill'), + ('Australia/Canberra'), + ('Australia/Currie'), + ('Australia/Darwin'), + ('Australia/Eucla'), + ('Australia/Hobart'), + ('Australia/LHI'), + ('Australia/Lindeman'), + ('Australia/Lord_Howe'), + ('Australia/Melbourne'), + ('Australia/North'), + ('Australia/NSW'), + ('Australia/Perth'), + ('Australia/Queensland'), + ('Australia/South'), + ('Australia/Sydney'), + ('Australia/Tasmania'), + ('Australia/Victoria'), + ('Australia/West'), + ('Australia/Yancowinna'), + ('Europe/Amsterdam'), + ('Europe/Andorra'), + ('Europe/Athens'), + ('Europe/Belfast'), + ('Europe/Belgrade'), + ('Europe/Berlin'), + ('Europe/Bratislava'), + ('Europe/Brussels'), + ('Europe/Bucharest'), + ('Europe/Budapest'), + ('Europe/Chisinau'), + ('Europe/Copenhagen'), + ('Europe/Dublin'), + ('Europe/Gibraltar'), + ('Europe/Guernsey'), + ('Europe/Helsinki'), + ('Europe/Isle_of_Man'), + ('Europe/Istanbul'), + ('Europe/Jersey'), + ('Europe/Kaliningrad'), + ('Europe/Kiev'), + ('Europe/Lisbon'), + ('Europe/Ljubljana'), + ('Europe/London'), + ('Europe/Luxembourg'), + ('Europe/Madrid'), + ('Europe/Malta'), + ('Europe/Mariehamn'), + ('Europe/Minsk'), + ('Europe/Monaco'), + ('Europe/Moscow'), + ('Europe/Nicosia'), + ('Europe/Oslo'), + ('Europe/Paris'), + ('Europe/Podgorica'), + ('Europe/Prague'), + ('Europe/Riga'), + ('Europe/Rome'), + ('Europe/Samara'), + ('Europe/San_Marino'), + ('Europe/Sarajevo'), + ('Europe/Simferopol'), + ('Europe/Skopje'), + ('Europe/Sofia'), + ('Europe/Stockholm'), + ('Europe/Tallinn'), + ('Europe/Tirane'), + ('Europe/Tiraspol'), + ('Europe/Uzhgorod'), + ('Europe/Vaduz'), + ('Europe/Vatican'), + ('Europe/Vienna'), + ('Europe/Vilnius'), + ('Europe/Volgograd'), + ('Europe/Warsaw'), + ('Europe/Zagreb'), + ('Europe/Zaporozhye'), + ('Europe/Zurich'), + ('Indian/Antananarivo'), + ('Indian/Chagos'), + ('Indian/Christmas'), + ('Indian/Cocos'), + ('Indian/Comoro'), + ('Indian/Kerguelen'), + ('Indian/Mahe'), + ('Indian/Maldives'), + ('Indian/Mauritius'), + ('Indian/Mayotte'), + ('Indian/Reunion'), + ('Pacific/Apia'), + ('Pacific/Auckland'), + ('Pacific/Chatham'), + ('Pacific/Easter'), + ('Pacific/Efate'), + ('Pacific/Enderbury'), + ('Pacific/Fakaofo'), + ('Pacific/Fiji'), + ('Pacific/Funafuti'), + ('Pacific/Galapagos'), + ('Pacific/Gambier'), + ('Pacific/Guadalcanal'), + ('Pacific/Guam'), + ('Pacific/Honolulu'), + ('Pacific/Johnston'), + ('Pacific/Kiritimati'), + ('Pacific/Kosrae'), + ('Pacific/Kwajalein'), + ('Pacific/Majuro'), + ('Pacific/Marquesas'), + ('Pacific/Midway'), + ('Pacific/Nauru'), + ('Pacific/Niue'), + ('Pacific/Norfolk'), + ('Pacific/Noumea'), + ('Pacific/Pago_Pago'), + ('Pacific/Palau'), + ('Pacific/Pitcairn'), + ('Pacific/Ponape'), + ('Pacific/Port_Moresby'), + ('Pacific/Rarotonga'), + ('Pacific/Saipan'), + ('Pacific/Samoa'), + ('Pacific/Tahiti'), + ('Pacific/Tarawa'), + ('Pacific/Tongatapu'), + ('Pacific/Truk'), + ('Pacific/Wake'), + ('Pacific/Wallis'), + ('Pacific/Yap'), + ('Brazil/Acre'), + ('Brazil/DeNoronha'), + ('Brazil/East'), + ('Brazil/West'), + ('Canada/Atlantic'), + ('Canada/Central'), + ('Canada/East-Saskatchewan'), + ('Canada/Eastern'), + ('Canada/Mountain'), + ('Canada/Newfoundland'), + ('Canada/Pacific'), + ('Canada/Saskatchewan'), + ('Canada/Yukon'), + ('CET'), + ('Chile/Continental'), + ('Chile/EasterIsland'), + ('CST6CDT'), + ('Cuba'), + ('EET'), + ('Egypt'), + ('Eire'), + ('EST'), + ('EST5EDT'), + ('Etc/GMT'), + ('Etc/GMT+0'), + ('Etc/GMT+1'), + ('Etc/GMT+10'), + ('Etc/GMT+11'), + ('Etc/GMT+12'), + ('Etc/GMT+2'), + ('Etc/GMT+3'), + ('Etc/GMT+4'), + ('Etc/GMT+5'), + ('Etc/GMT+6'), + ('Etc/GMT+7'), + ('Etc/GMT+8'), + ('Etc/GMT+9'), + ('Etc/GMT-0'), + ('Etc/GMT-1'), + ('Etc/GMT-10'), + ('Etc/GMT-11'), + ('Etc/GMT-12'), + ('Etc/GMT-13'), + ('Etc/GMT-14'), + ('Etc/GMT-2'), + ('Etc/GMT-3'), + ('Etc/GMT-4'), + ('Etc/GMT-5'), + ('Etc/GMT-6'), + ('Etc/GMT-7'), + ('Etc/GMT-8'), + ('Etc/GMT-9'), + ('Etc/GMT0'), + ('Etc/Greenwich'), + ('Etc/UCT'), + ('Etc/Universal'), + ('Etc/UTC'), + ('Etc/Zulu'), + ('Factory'), + ('GB'), + ('GB-Eire'), + ('GMT'), + ('GMT+0'), + ('GMT-0'), + ('GMT0'), + ('Greenwich'), + ('Hongkong'), + ('HST'), + ('Iceland'), + ('Iran'), + ('Israel'), + ('Jamaica'), + ('Japan'), + ('Kwajalein'), + ('Libya'), + ('MET'), + ('Mexico/BajaNorte'), + ('Mexico/BajaSur'), + ('Mexico/General'), + ('MST'), + ('MST7MDT'), + ('Navajo'), + ('NZ'), + ('NZ-CHAT'), + ('Poland'), + ('Portugal'), + ('PRC'), + ('PST8PDT'), + ('ROC'), + ('ROK'), + ('Singapore'), + ('Turkey'), + ('UCT'), + ('Universal'), + ('US/Alaska'), + ('US/Aleutian'), + ('US/Arizona'), + ('US/Central'), + ('US/East-Indiana'), + ('US/Eastern'), + ('US/Hawaii'), + ('US/Indiana-Starke'), + ('US/Michigan'), + ('US/Mountain'), + ('US/Pacific'), + ('US/Pacific-New'), + ('US/Samoa'), + ('UTC'), + ('W-SU'), + ('WET'), + ('Zulu'); + +DELETE FROM `PREFIX_discount_category` +WHERE `id_discount` IN ( + SELECT `id_discount` FROM ( + SELECT dc.`id_discount` + FROM `PREFIX_discount_category` dc + LEFT JOIN `PREFIX_discount`d ON (d.`id_discount` = dc.`id_discount`) + WHERE d.`id_discount` IS NULL + GROUP BY dc.`id_discount`) discount_category_tmp + ); + +DELETE FROM `PREFIX_configuration` WHERE `name` = 'PS_DISPLAY_WITHOUT_TAX'; + +INSERT INTO PREFIX_hook (`name`, `title`, `description`, `position`) VALUES + ('updateCarrier', 'Carrier update', 'This hook is called when a carrier is updated', 0); diff --git a/install-new/upgrade/sql/1.2.0.3.sql b/install-new/upgrade/sql/1.2.0.3.sql new file mode 100644 index 000000000..9f6f078ee --- /dev/null +++ b/install-new/upgrade/sql/1.2.0.3.sql @@ -0,0 +1,33 @@ +SET NAMES 'utf8'; + +/* ##################################### */ +/* STRUCTURE */ +/* ##################################### */ + +ALTER TABLE `PREFIX_customization` + ADD `quantity_refunded` INT NOT NULL DEFAULT '0'; +ALTER TABLE `PREFIX_customization` + ADD `quantity_returned` INT NOT NULL DEFAULT '0'; + +ALTER TABLE `PREFIX_alias` + CHANGE `id_alias` `id_alias` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT; +ALTER TABLE `PREFIX_attribute_impact` + CHANGE `id_attribute_impact` `id_attribute_impact` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT; +ALTER TABLE `PREFIX_customization` + CHANGE `id_customization` `id_customization` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT; +ALTER TABLE `PREFIX_customization_field` + CHANGE `id_customization_field` `id_customization_field` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT; +ALTER TABLE `PREFIX_subdomain` + CHANGE `id_subdomain` `id_subdomain` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT; + + +/* ##################################### */ +/* CONTENTS */ +/* ##################################### */ + +INSERT INTO `PREFIX_search_engine` (`server`,`getvar`) VALUES + ('bing.com','q'); + +INSERT INTO `PREFIX_hook_module` (`id_module`, `id_hook`, `position`) VALUES + (19, 9, 1); + diff --git a/install-new/upgrade/sql/1.2.0.4.sql b/install-new/upgrade/sql/1.2.0.4.sql new file mode 100644 index 000000000..2b4f66a32 --- /dev/null +++ b/install-new/upgrade/sql/1.2.0.4.sql @@ -0,0 +1,10 @@ +SET NAMES 'utf8'; + +/* ##################################### */ +/* STRUCTURE */ +/* ##################################### */ + +/* ##################################### */ +/* CONTENTS */ +/* ##################################### */ + diff --git a/install-new/upgrade/sql/1.2.0.5.sql b/install-new/upgrade/sql/1.2.0.5.sql new file mode 100644 index 000000000..7512ab24a --- /dev/null +++ b/install-new/upgrade/sql/1.2.0.5.sql @@ -0,0 +1,17 @@ +SET NAMES 'utf8'; + +/* ##################################### */ +/* STRUCTURE */ +/* ##################################### */ + +/* ##################################### */ +/* CONTENTS */ +/* ##################################### */ + +UPDATE `PREFIX_order_state_lang` +SET `name` = 'Shipped' +WHERE `id_order_state` = 4 AND `id_lang` = 1; + +UPDATE `PREFIX_order_state_lang` SET `template` = 'shipped' WHERE `id_order_state` = 4 AND `template` = 'shipping'; + +/* PHP:reorderpositions(); */; \ No newline at end of file diff --git a/install-new/upgrade/sql/1.2.0.6.sql b/install-new/upgrade/sql/1.2.0.6.sql new file mode 100644 index 000000000..fc88820b8 --- /dev/null +++ b/install-new/upgrade/sql/1.2.0.6.sql @@ -0,0 +1,14 @@ +SET NAMES 'utf8'; + +/* ##################################### */ +/* STRUCTURE */ +/* ##################################### */ + +ALTER TABLE `PREFIX_configuration` DROP INDEX `configuration_name`; +ALTER TABLE `PREFIX_order_detail` ADD `product_quantity_in_stock` INT(10) NOT NULL DEFAULT 0 AFTER `product_quantity`; +ALTER TABLE `PREFIX_order_detail` ADD `product_quantity_reinjected` INT(10) UNSIGNED NOT NULL DEFAULT 0 AFTER `product_quantity_return`; + +/* ##################################### */ +/* CONTENTS */ +/* ##################################### */ +UPDATE `PREFIX_product` SET `out_of_stock` = 0 WHERE `id_product` IN ((SELECT `id_product` FROM `PREFIX_product_download`)); diff --git a/install-new/upgrade/sql/1.2.0.7.sql b/install-new/upgrade/sql/1.2.0.7.sql new file mode 100644 index 000000000..5cd1d4109 --- /dev/null +++ b/install-new/upgrade/sql/1.2.0.7.sql @@ -0,0 +1,12 @@ +SET NAMES 'utf8'; + +/* ##################################### */ +/* STRUCTURE */ +/* ##################################### */ + + +/* ##################################### */ +/* CONTENTS */ +/* ##################################### */ + +/* PHP:update_modules_sql(); */; diff --git a/install-new/upgrade/sql/1.2.0.8.sql b/install-new/upgrade/sql/1.2.0.8.sql new file mode 100644 index 000000000..eeda18cd2 --- /dev/null +++ b/install-new/upgrade/sql/1.2.0.8.sql @@ -0,0 +1,10 @@ +SET NAMES 'utf8'; + +/* ##################################### */ +/* STRUCTURE */ +/* ##################################### */ + + +/* ##################################### */ +/* CONTENTS */ +/* ##################################### */ diff --git a/install-new/upgrade/sql/1.2.1.0.sql b/install-new/upgrade/sql/1.2.1.0.sql new file mode 100644 index 000000000..d11032a29 --- /dev/null +++ b/install-new/upgrade/sql/1.2.1.0.sql @@ -0,0 +1,16 @@ +SET NAMES 'utf8'; + +/* ##################################### */ +/* STRUCTURE */ +/* ##################################### */ + + +/* ##################################### */ +/* CONTENTS */ +/* ##################################### */ + +INSERT INTO PREFIX_configuration (name, value, date_add, date_upd) VALUES ('PS_THEME_V11', 0, NOW(), NOW()); + +/* PHP */ +/* PHP:update_carrier_url(); */; +/* PHP:moduleReinstaller('blocksearch'); */; diff --git a/install-new/upgrade/sql/1.2.2.0.sql b/install-new/upgrade/sql/1.2.2.0.sql new file mode 100644 index 000000000..27e0498df --- /dev/null +++ b/install-new/upgrade/sql/1.2.2.0.sql @@ -0,0 +1,6 @@ +SET NAMES 'utf8'; + +ALTER TABLE `PREFIX_discount_category` ADD INDEX ( `id_discount` ); + +DELETE FROM `PREFIX_delivery` WHERE `id_range_weight` != NULL AND `id_range_weight` NOT IN (SELECT `id_range_weight` FROM `PREFIX_range_weight`); +DELETE FROM `PREFIX_delivery` WHERE `id_range_price` != NULL AND `id_range_weight` NOT IN (SELECT `id_range_price` FROM `PREFIX_range_price`); diff --git a/install-new/upgrade/sql/1.2.3.0.sql b/install-new/upgrade/sql/1.2.3.0.sql new file mode 100644 index 000000000..3f288763f --- /dev/null +++ b/install-new/upgrade/sql/1.2.3.0.sql @@ -0,0 +1,3 @@ +SET NAMES 'utf8'; + +ALTER TABLE `PREFIX_category_product` ADD INDEX (`id_product`); diff --git a/install-new/upgrade/sql/1.2.4.0.sql b/install-new/upgrade/sql/1.2.4.0.sql new file mode 100644 index 000000000..0b4cf1b2f --- /dev/null +++ b/install-new/upgrade/sql/1.2.4.0.sql @@ -0,0 +1 @@ +SET NAMES 'utf8'; diff --git a/install-new/upgrade/sql/1.2.5.0.sql b/install-new/upgrade/sql/1.2.5.0.sql new file mode 100644 index 000000000..0b4cf1b2f --- /dev/null +++ b/install-new/upgrade/sql/1.2.5.0.sql @@ -0,0 +1 @@ +SET NAMES 'utf8'; diff --git a/install-new/upgrade/sql/1.3.0.1.sql b/install-new/upgrade/sql/1.3.0.1.sql new file mode 100644 index 000000000..b043fd51b --- /dev/null +++ b/install-new/upgrade/sql/1.3.0.1.sql @@ -0,0 +1,92 @@ +SET NAMES 'utf8'; + +/* ##################################### */ +/* STRUCTURE */ +/* ##################################### */ + +ALTER TABLE `PREFIX_product` +CHANGE `reduction_from` `reduction_from` DATE NOT NULL DEFAULT '1970-01-01', +CHANGE `reduction_to` `reduction_to` DATE NOT NULL DEFAULT '1970-01-01'; + +ALTER TABLE `PREFIX_order_detail` CHANGE `tax_rate` `tax_rate` DECIMAL(10, 3) NOT NULL DEFAULT '0.000'; +ALTER TABLE `PREFIX_group` ADD `price_display_method` TINYINT NOT NULL DEFAULT 0 AFTER `reduction`; + +CREATE TABLE `PREFIX_carrier_group` ( + `id_carrier` int(10) unsigned NOT NULL, + `id_group` int(10) unsigned NOT NULL, + UNIQUE KEY `id_carrier` (`id_carrier`,`id_group`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +ALTER TABLE `PREFIX_country` ADD `need_identification_number` TINYINT( 1 ) NOT NULL; +ALTER TABLE `PREFIX_customer` ADD `dni` VARCHAR( 16 ) NULL AFTER `firstname`; + +ALTER TABLE `PREFIX_image` ADD INDEX `product_position` (`id_product`, `position`); +ALTER TABLE `PREFIX_hook_module` ADD INDEX `id_module` (`id_module`); +ALTER TABLE `PREFIX_customer` ADD INDEX `id_customer_passwd` (`id_customer`, `passwd`); +ALTER TABLE `PREFIX_tag` ADD INDEX `id_lang` (`id_lang`); +ALTER TABLE `PREFIX_customer_group` ADD INDEX `id_customer` (`id_customer`); +ALTER TABLE `PREFIX_category_group` ADD INDEX `id_category` (`id_category`); +ALTER TABLE `PREFIX_image` ADD INDEX `id_product_cover` (`id_product`, `cover`); +ALTER TABLE `PREFIX_employee` ADD INDEX `id_employee_passwd` (`id_employee`, `passwd`); +ALTER TABLE `PREFIX_product_attribute` ADD INDEX `product_default` (`id_product`, `default_on`); +ALTER TABLE `PREFIX_product_download` ADD INDEX `product_active` (`id_product`, `active`); +ALTER TABLE `PREFIX_tab` ADD INDEX `class_name` (`class_name`); +ALTER TABLE `PREFIX_module_currency` ADD INDEX `id_module` (`id_module`); +ALTER TABLE `PREFIX_product_attribute_combination` ADD INDEX `id_product_attribute` (`id_product_attribute`); +ALTER TABLE `PREFIX_orders` ADD INDEX `invoice_number` (`invoice_number`); +ALTER TABLE `PREFIX_product_tag` ADD INDEX `id_tag` (`id_tag`); +ALTER TABLE `PREFIX_cms_lang` CHANGE `id_cms` `id_cms` INT(10) UNSIGNED NOT NULL; +ALTER TABLE `PREFIX_tax` CHANGE `rate` `rate` DECIMAL(10, 3) NOT NULL; + +ALTER TABLE `PREFIX_order_detail` ADD `discount_quantity_applied` TINYINT(1) NOT NULL DEFAULT 0 AFTER `ecotax`; +ALTER TABLE `PREFIX_orders` ADD `total_products_wt` DECIMAL(10, 2) NOT NULL AFTER `total_products`; + +/* ##################################### */ +/* CONTENTS */ +/* ##################################### */ + +UPDATE IGNORE `PREFIX_group` SET `price_display_method` = IFNULL((SELECT `value` FROM `PREFIX_configuration` WHERE `name` = 'PS_PRICE_DISPLAY'), 0); + +UPDATE `PREFIX_configuration` +SET `value` = ROUND(value / (1 + ( + SELECT rate FROM ( + SELECT t.`rate`, COUNT(*) n + FROM `PREFIX_orders` o + LEFT JOIN `PREFIX_carrier` c ON (o.`id_carrier` = c.`id_carrier`) + LEFT JOIN `PREFIX_tax` t ON (t.`id_tax` = c.`id_tax`) + WHERE c.`deleted` = 0 + AND c.`shipping_handling` = 1 + GROUP BY o.`id_carrier` + ORDER BY n DESC + LIMIT 1 + ) myrate +) / 100), 6) +WHERE `name` = 'PS_SHIPPING_HANDLING'; + +DELETE FROM `PREFIX_configuration` WHERE `name` = 'PS_PRICE_DISPLAY'; +DELETE FROM `PREFIX_product_attachment` WHERE `id_product` NOT IN (SELECT `id_product` FROM `PREFIX_product`); +DELETE FROM `PREFIX_discount_quantity` WHERE `id_product` NOT IN (SELECT `id_product` FROM `PREFIX_product`); +DELETE FROM `PREFIX_pack` WHERE `id_product_pack` NOT IN (SELECT `id_product` FROM `PREFIX_product`) OR `id_product_item` NOT IN (SELECT `id_product` FROM `PREFIX_product`); +DELETE FROM `PREFIX_product_sale` WHERE `id_product` NOT IN (SELECT `id_product` FROM `PREFIX_product`); +DELETE FROM `PREFIX_scene_products` WHERE `id_product` NOT IN (SELECT `id_product` FROM `PREFIX_product`); +DELETE FROM `PREFIX_search_index` WHERE `id_product` NOT IN (SELECT `id_product` FROM `PREFIX_product`); +DELETE FROM `PREFIX_search_word` WHERE `id_word` NOT IN (SELECT `id_word` FROM `PREFIX_search_index`); +DELETE FROM `PREFIX_tag` WHERE `id_lang` NOT IN (SELECT `id_lang` FROM `PREFIX_lang`); +DELETE FROM `PREFIX_search_word` WHERE `id_lang` NOT IN (SELECT `id_lang` FROM `PREFIX_lang`); + +INSERT INTO `PREFIX_configuration` (`name`, `value`, `date_add`, `date_upd`) VALUES +('PRESTASTORE_LIVE', 1, NOW(), NOW()), +('PS_SHOW_ALL_MODULES', 0, NOW(), NOW()), +('PS_BACKUP_ALL', 0, NOW(), NOW()), +('PS_1_3_UPDATE_DATE', NOW(), NOW(), NOW()), +('PS_PRICE_ROUND_MODE', 2, NOW(), NOW()); +INSERT INTO `PREFIX_hook` (`name`, `title`, `description`, `position`) VALUES +('createAccountTop', 'Block above the form for create an account', NULL , '1'), +('backOfficeHeader', 'Administration panel header', NULL , '0'), +('backOfficeTop', 'Administration panel top hover the tabs', NULL , '1'), +('backOfficeFooter', 'Administration panel footer', NULL , '1'); + +INSERT INTO `PREFIX_carrier_group` (id_carrier, id_group) (SELECT id_carrier, id_group FROM `PREFIX_carrier` c, `PREFIX_group` g WHERE c.active = 1); + +/* PHP */ +/* PHP:convert_product_price(); */; diff --git a/install-new/upgrade/sql/1.3.0.10.sql b/install-new/upgrade/sql/1.3.0.10.sql new file mode 100644 index 000000000..5354e7131 --- /dev/null +++ b/install-new/upgrade/sql/1.3.0.10.sql @@ -0,0 +1,5 @@ +SET NAMES 'utf8'; + +ALTER TABLE `PREFIX_order_detail` ADD INDEX `id_order_id_order_detail` (`id_order`, `id_order_detail`); +ALTER TABLE `PREFIX_category_group` ADD INDEX `id_group` (`id_group`); +ALTER TABLE `PREFIX_product` ADD INDEX `date_add` (`date_add`); \ No newline at end of file diff --git a/install-new/upgrade/sql/1.3.0.2.sql b/install-new/upgrade/sql/1.3.0.2.sql new file mode 100644 index 000000000..9069781e8 --- /dev/null +++ b/install-new/upgrade/sql/1.3.0.2.sql @@ -0,0 +1,147 @@ +SET NAMES 'utf8'; + +/* ##################################### */ +/* STRUCTURE */ +/* ##################################### */ + +ALTER TABLE `PREFIX_product_attachment` +CHANGE `id_product` `id_product` INT(10) UNSIGNED NOT NULL, +CHANGE `id_attachment` `id_attachment` INT(10) UNSIGNED NOT NULL; + +ALTER TABLE `PREFIX_attribute_impact` +CHANGE `id_product` `id_product` INT(11) UNSIGNED NOT NULL, +CHANGE `id_attribute` `id_attribute` INT(11) UNSIGNED NOT NULL; + +ALTER TABLE `PREFIX_block_cms` +CHANGE `id_block` `id_block` INT(10) UNSIGNED NOT NULL, +CHANGE `id_cms` `id_cms` INT(10) UNSIGNED NOT NULL; + +ALTER TABLE `PREFIX_customization` +CHANGE `id_cart` `id_cart` int(10) unsigned NOT NULL, +CHANGE `id_product_attribute` `id_product_attribute` int(10) unsigned NOT NULL default '0'; + +ALTER TABLE `PREFIX_customization_field` +CHANGE `id_product` `id_product` int(10) unsigned NOT NULL; + +ALTER TABLE `PREFIX_customization_field_lang` +CHANGE `id_customization_field` `id_customization_field` int(10) unsigned NOT NULL, +CHANGE `id_lang` `id_lang` int(10) unsigned NOT NULL; + +ALTER TABLE `PREFIX_customized_data` +CHANGE `id_customization` `id_customization` int(10) unsigned NOT NULL; + +ALTER TABLE `PREFIX_discount_category` +CHANGE `id_category` `id_category` int(11) unsigned NOT NULL, +CHANGE `id_discount` `id_discount` int(11) unsigned NOT NULL; + +ALTER TABLE `PREFIX_module_group` +CHANGE `id_group` `id_group` int(11) unsigned NOT NULL; + +ALTER TABLE `PREFIX_order_return_detail` +CHANGE `id_customization` `id_customization` int(10) unsigned NOT NULL default '0'; + +ALTER TABLE `PREFIX_product_attribute_image` +CHANGE `id_product_attribute` `id_product_attribute` int(10) unsigned NOT NULL, +CHANGE `id_image` `id_image` int(10) unsigned NOT NULL; + +ALTER TABLE `PREFIX_referrer_cache` +CHANGE `id_connections_source` `id_connections_source` int(11) unsigned NOT NULL, +CHANGE `id_referrer` `id_referrer` int(11) unsigned NOT NULL; + +ALTER TABLE `PREFIX_scene_category` +CHANGE `id_scene` `id_scene` int(10) unsigned NOT NULL, +CHANGE `id_category` `id_category` int(10) unsigned NOT NULL; + +ALTER TABLE `PREFIX_scene_lang` +CHANGE `id_scene` `id_scene` int(10) unsigned NOT NULL, +CHANGE `id_lang` `id_lang` int(10) unsigned NOT NULL; + +ALTER TABLE `PREFIX_scene_products` +CHANGE `id_scene` `id_scene` int(10) unsigned NOT NULL, +CHANGE `id_product` `id_product` int(10) unsigned NOT NULL; + +ALTER TABLE `PREFIX_search_index` +CHANGE `id_product` `id_product` int(11) unsigned NOT NULL, +CHANGE `id_word` `id_word` int(11) unsigned NOT NULL; + +ALTER TABLE `PREFIX_state` +CHANGE `id_country` `id_country` int(11) unsigned NOT NULL, +CHANGE `id_zone` `id_zone` int(11) unsigned NOT NULL; + +ALTER TABLE `PREFIX_category_lang` +CHANGE `meta_keywords` `meta_keywords` VARCHAR( 255 ) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, +CHANGE `meta_description` `meta_description` VARCHAR( 255 ) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL ; + +ALTER TABLE `PREFIX_supplier_lang` +CHANGE `meta_title` `meta_title` VARCHAR( 128 ) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, +CHANGE `meta_keywords` `meta_keywords` VARCHAR( 255 ) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, +CHANGE `meta_description` `meta_description` VARCHAR( 255 ) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL ; + +ALTER TABLE `PREFIX_manufacturer_lang` +CHANGE `meta_title` `meta_title` VARCHAR( 128 ) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, +CHANGE `meta_keywords` `meta_keywords` VARCHAR( 255 ) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, +CHANGE `meta_description` `meta_description` VARCHAR( 255 ) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL ; + +ALTER TABLE `PREFIX_meta_lang` +CHANGE `title` `title` VARCHAR( 128 ) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL ; + +/* ##################################### */ +/* PRICE RANGE */ +/* ##################################### */ + +ALTER TABLE `PREFIX_attribute_impact` CHANGE `price` `price` DECIMAL(17, 2) NOT NULL; + +ALTER TABLE `PREFIX_delivery` CHANGE `price` `price` DECIMAL(17, 2) NOT NULL; + +ALTER TABLE `PREFIX_discount` CHANGE `value` `value` DECIMAL(17, 2) NOT NULL DEFAULT '0.00', +CHANGE `minimal` `minimal` DECIMAL(17, 2) NULL DEFAULT NULL; + +ALTER TABLE `PREFIX_discount_quantity` CHANGE `value` `value` DECIMAL(17, 2) UNSIGNED NOT NULL; + +ALTER TABLE `PREFIX_group` CHANGE `reduction` `reduction` DECIMAL(17, 2) NOT NULL DEFAULT '0.00'; + +ALTER TABLE `PREFIX_orders` CHANGE `total_discounts` `total_discounts` DECIMAL(17, 2) NOT NULL DEFAULT '0.00', +CHANGE `total_paid` `total_paid` DECIMAL(17, 2) NOT NULL DEFAULT '0.00', +CHANGE `total_paid_real` `total_paid_real` DECIMAL(17, 2) NOT NULL DEFAULT '0.00', +CHANGE `total_products` `total_products` DECIMAL(17, 2) NOT NULL DEFAULT '0.00', +CHANGE `total_products_wt` `total_products_wt` DECIMAL(17, 2) NOT NULL DEFAULT '0.00', +CHANGE `total_shipping` `total_shipping` DECIMAL(17, 2) NOT NULL DEFAULT '0.00', +CHANGE `total_wrapping` `total_wrapping` DECIMAL(17, 2) NOT NULL DEFAULT '0.00'; + +ALTER TABLE `PREFIX_order_detail` CHANGE `product_price` `product_price` DECIMAL(20, 6) NOT NULL DEFAULT '0.000000', +CHANGE `product_quantity_discount` `product_quantity_discount` DECIMAL(20, 6) NOT NULL DEFAULT '0.000000', +CHANGE `ecotax` `ecotax` decimal(17,2) NOT NULL default '0.00'; + +ALTER TABLE `PREFIX_order_discount` CHANGE `value` `value` DECIMAL(17, 2) NOT NULL DEFAULT '0.00'; + +ALTER TABLE `PREFIX_product` CHANGE `price` `price` DECIMAL(20, 6) NOT NULL DEFAULT '0.000000', +CHANGE `wholesale_price` `wholesale_price` DECIMAL(20, 6) NOT NULL DEFAULT '0.000000', +CHANGE `ecotax` `ecotax` DECIMAL(17, 2) NOT NULL DEFAULT '0.00', +CHANGE `reduction_price` `reduction_price` DECIMAL(17, 2) NULL DEFAULT NULL; + +ALTER TABLE `PREFIX_product_attribute` CHANGE `wholesale_price` `wholesale_price` DECIMAL(20, 6) NOT NULL DEFAULT '0.000000', +CHANGE `price` `price` DECIMAL(17, 2) NOT NULL DEFAULT '0.00', +CHANGE `ecotax` `ecotax` DECIMAL(17, 2) NOT NULL DEFAULT '0.00'; + +ALTER TABLE `PREFIX_range_price` CHANGE `delimiter1` `delimiter1` DECIMAL(20, 6) NOT NULL, +CHANGE `delimiter2` `delimiter2` DECIMAL(20, 6) NOT NULL; + +ALTER TABLE `PREFIX_range_weight` CHANGE `delimiter1` `delimiter1` DECIMAL(20, 6) NOT NULL, +CHANGE `delimiter2` `delimiter2` DECIMAL(20, 6) NOT NULL; + +ALTER TABLE `PREFIX_referrer` CHANGE `cache_sales` `cache_sales` DECIMAL(17, 2) NULL DEFAULT NULL; + +UPDATE `PREFIX_configuration` +SET `value` = IFNULL(ROUND(value / (1 + ( + SELECT `rate` + FROM `PREFIX_tax` + WHERE `id_tax` = ( + SELECT `value` + FROM ( + SELECT `value` + FROM `PREFIX_configuration` + WHERE `name` = 'PS_GIFT_WRAPPING_TAX' + )tmp + ) +) / 100), 2), 0) +WHERE `name` = 'PS_GIFT_WRAPPING_PRICE'; diff --git a/install-new/upgrade/sql/1.3.0.3.sql b/install-new/upgrade/sql/1.3.0.3.sql new file mode 100644 index 000000000..7adb283eb --- /dev/null +++ b/install-new/upgrade/sql/1.3.0.3.sql @@ -0,0 +1,15 @@ +SET NAMES 'utf8'; + +ALTER TABLE `PREFIX_tab` CHANGE `id_parent` `id_parent` INT(11) NOT NULL; +INSERT INTO `PREFIX_tab` (`id_tab`, `class_name`, `id_parent`, `position`) +VALUES (43, 'AdminSearch', -1, 0) +ON DUPLICATE KEY +UPDATE `id_parent` = -1; + +ALTER TABLE `PREFIX_search_engine` ADD UNIQUE (`server`,`getvar`); +REPLACE INTO `PREFIX_search_engine` (`server`,`getvar`) +VALUES ('google','q'),('aol','q'),('yandex','text'),('ask.com','q'),('nhl.com','q'),('yahoo','p'),('baidu','wd'), +('lycos','query'),('exalead','q'),('search.live','q'),('voila','rdata'),('altavista','q'),('bing','q'),('daum','q'), +('eniro','search_word'),('naver','query'),('msn','q'),('netscape','query'),('cnn','query'),('about','terms'),('mamma','query'), +('alltheweb','q'),('virgilio','qs'),('alice','qs'),('najdi','q'),('mama','query'),('seznam','q'),('onet','qt'),('szukacz','q'), +('yam','k'),('pchome','q'),('kvasir','q'),('sesam','q'),('ozu','q'),('terra','query'),('mynet','q'),('ekolay','q'),('rambler','words'); \ No newline at end of file diff --git a/install-new/upgrade/sql/1.3.0.4.sql b/install-new/upgrade/sql/1.3.0.4.sql new file mode 100644 index 000000000..46ad8ccb4 --- /dev/null +++ b/install-new/upgrade/sql/1.3.0.4.sql @@ -0,0 +1,83 @@ +SET NAMES 'utf8'; + +DELETE FROM `PREFIX_tax_state` WHERE `id_tax` NOT IN (SELECT `id_tax` FROM `PREFIX_tax`); + +ALTER TABLE `PREFIX_product` CHANGE `reduction_from` `reduction_from` DATETIME NOT NULL DEFAULT '1970-01-01 00:00:00', +CHANGE `reduction_to` `reduction_to` DATETIME NOT NULL DEFAULT '1970-01-01 00:00:00'; + +UPDATE `PREFIX_product` +SET `reduction_to` = DATE_ADD(reduction_to, INTERVAL 1 DAY) +WHERE `reduction_from` != `reduction_to`; + +ALTER TABLE `PREFIX_discount` ADD `id_currency` INT UNSIGNED NOT NULL DEFAULT 0 AFTER `id_customer`; +UPDATE `PREFIX_discount` SET `id_currency` = (SELECT `value` FROM `PREFIX_configuration` WHERE `name` = 'PS_CURRENCY_DEFAULT' LIMIT 1) WHERE `id_discount_type` = 2; + +ALTER TABLE `PREFIX_address` ADD INDEX (id_country); +ALTER TABLE `PREFIX_address` ADD INDEX (id_state); +ALTER TABLE `PREFIX_address` ADD INDEX (id_manufacturer); +ALTER TABLE `PREFIX_address` ADD INDEX (id_supplier); +ALTER TABLE `PREFIX_carrier` ADD INDEX (id_tax); +ALTER TABLE `PREFIX_cart` ADD INDEX (id_address_delivery); +ALTER TABLE `PREFIX_cart` ADD INDEX (id_address_invoice); +ALTER TABLE `PREFIX_cart` ADD INDEX (id_carrier); +ALTER TABLE `PREFIX_cart` ADD INDEX (id_lang); +ALTER TABLE `PREFIX_cart` ADD INDEX (id_currency); +ALTER TABLE `PREFIX_cart_product` ADD INDEX (id_product_attribute); +ALTER TABLE `PREFIX_connections` ADD INDEX (id_page); +ALTER TABLE `PREFIX_customer` ADD INDEX (id_gender); +ALTER TABLE `PREFIX_customization` ADD INDEX (id_product_attribute); +ALTER TABLE `PREFIX_customization_field` ADD INDEX (id_product); +ALTER TABLE `PREFIX_delivery` ADD INDEX (id_range_price); +ALTER TABLE `PREFIX_delivery` ADD INDEX (id_range_weight); +ALTER TABLE `PREFIX_discount` ADD INDEX (id_discount_type); +ALTER TABLE `PREFIX_discount_quantity` ADD INDEX (id_discount_type); +ALTER TABLE `PREFIX_discount_quantity` ADD INDEX (id_product); +ALTER TABLE `PREFIX_discount_quantity` ADD INDEX (id_product_attribute); +ALTER TABLE `PREFIX_employee` ADD INDEX (id_profile); +ALTER TABLE `PREFIX_feature_product` ADD INDEX (id_feature_value); +ALTER TABLE `PREFIX_guest` ADD INDEX (id_operating_system); +ALTER TABLE `PREFIX_guest` ADD INDEX (id_web_browser); +ALTER TABLE `PREFIX_hook_module_exceptions` ADD INDEX (id_module); +ALTER TABLE `PREFIX_hook_module_exceptions` ADD INDEX (id_hook); +ALTER TABLE `PREFIX_message` ADD INDEX (id_cart); +ALTER TABLE `PREFIX_message` ADD INDEX (id_customer); +ALTER TABLE `PREFIX_message` ADD INDEX (id_employee); +ALTER TABLE `PREFIX_order_detail` ADD INDEX (product_attribute_id); +ALTER TABLE `PREFIX_order_discount` ADD INDEX (id_discount); +ALTER TABLE `PREFIX_order_history` ADD INDEX (id_employee); +ALTER TABLE `PREFIX_order_history` ADD INDEX (id_order_state); +ALTER TABLE `PREFIX_order_return` ADD INDEX (id_order); +ALTER TABLE `PREFIX_order_slip` ADD INDEX (id_order); +ALTER TABLE `PREFIX_orders` ADD INDEX (id_carrier); +ALTER TABLE `PREFIX_orders` ADD INDEX (id_lang); +ALTER TABLE `PREFIX_orders` ADD INDEX (id_currency); +ALTER TABLE `PREFIX_orders` ADD INDEX (id_address_delivery); +ALTER TABLE `PREFIX_orders` ADD INDEX (id_address_invoice); +ALTER TABLE `PREFIX_product` ADD INDEX (id_tax); +ALTER TABLE `PREFIX_product` ADD INDEX (id_category_default); +ALTER TABLE `PREFIX_product` ADD INDEX (id_color_default); +ALTER TABLE `PREFIX_state` ADD INDEX (id_country); +ALTER TABLE `PREFIX_state` ADD INDEX (id_zone); +ALTER TABLE `PREFIX_tab` ADD INDEX (id_parent); +ALTER TABLE `PREFIX_cart` ADD INDEX (id_guest); + +INSERT INTO `PREFIX_configuration` (`name`, `value`, `date_add`, `date_upd`) +( + SELECT 'MA_LAST_QTIES', '3', NOW(), NOW() + FROM `PREFIX_module` WHERE `name` = 'mailalerts' +); + +ALTER TABLE `PREFIX_customer` ADD `id_default_group` INT UNSIGNED NOT NULL DEFAULT '1' AFTER `id_gender`; + +UPDATE `PREFIX_customer` c SET `id_default_group` = ( + SELECT ( + IFNULL( + (SELECT g.`id_group` + FROM `PREFIX_group` g + LEFT JOIN `PREFIX_customer_group` cg ON (cg.`id_group` = g.`id_group`) + WHERE g.`reduction` > 0 AND cg.`id_customer` = c.`id_customer` + ORDER BY g.`reduction` + LIMIT 1) + , 1) + ) +); diff --git a/install-new/upgrade/sql/1.3.0.5.sql b/install-new/upgrade/sql/1.3.0.5.sql new file mode 100644 index 000000000..0b4cf1b2f --- /dev/null +++ b/install-new/upgrade/sql/1.3.0.5.sql @@ -0,0 +1 @@ +SET NAMES 'utf8'; diff --git a/install-new/upgrade/sql/1.3.0.6.sql b/install-new/upgrade/sql/1.3.0.6.sql new file mode 100644 index 000000000..0b4cf1b2f --- /dev/null +++ b/install-new/upgrade/sql/1.3.0.6.sql @@ -0,0 +1 @@ +SET NAMES 'utf8'; diff --git a/install-new/upgrade/sql/1.3.0.7.sql b/install-new/upgrade/sql/1.3.0.7.sql new file mode 100644 index 000000000..158212ef5 --- /dev/null +++ b/install-new/upgrade/sql/1.3.0.7.sql @@ -0,0 +1,3 @@ +SET NAMES 'utf8'; + +/* PHP:setAllGroupsOnHomeCategory(); */; diff --git a/install-new/upgrade/sql/1.3.0.8.sql b/install-new/upgrade/sql/1.3.0.8.sql new file mode 100644 index 000000000..e988c8279 --- /dev/null +++ b/install-new/upgrade/sql/1.3.0.8.sql @@ -0,0 +1,5 @@ +SET NAMES 'utf8'; + +ALTER TABLE `PREFIX_product_attribute` ADD INDEX `id_product_id_product_attribute` (`id_product_attribute` , `id_product`); +ALTER TABLE `PREFIX_image_lang` ADD INDEX `id_image` (`id_image`); + diff --git a/install-new/upgrade/sql/1.3.0.9.sql b/install-new/upgrade/sql/1.3.0.9.sql new file mode 100644 index 000000000..0b4cf1b2f --- /dev/null +++ b/install-new/upgrade/sql/1.3.0.9.sql @@ -0,0 +1 @@ +SET NAMES 'utf8'; diff --git a/install-new/upgrade/sql/1.3.1.1.sql b/install-new/upgrade/sql/1.3.1.1.sql new file mode 100644 index 000000000..0b4cf1b2f --- /dev/null +++ b/install-new/upgrade/sql/1.3.1.1.sql @@ -0,0 +1 @@ +SET NAMES 'utf8'; diff --git a/install-new/upgrade/sql/1.3.2.1.sql b/install-new/upgrade/sql/1.3.2.1.sql new file mode 100644 index 000000000..da21b32f2 --- /dev/null +++ b/install-new/upgrade/sql/1.3.2.1.sql @@ -0,0 +1,3 @@ +SET NAMES 'utf8'; + + diff --git a/install-new/upgrade/sql/1.3.2.2.sql b/install-new/upgrade/sql/1.3.2.2.sql new file mode 100644 index 000000000..180ac77b6 --- /dev/null +++ b/install-new/upgrade/sql/1.3.2.2.sql @@ -0,0 +1,27 @@ +SET NAMES 'utf8'; + +ALTER TABLE `PREFIX_order_detail` ADD `reduction_percent` DECIMAL(10, 2) NOT NULL AFTER `product_price`; +ALTER TABLE `PREFIX_order_detail` ADD `reduction_amount` DECIMAL(20, 6) NOT NULL AFTER `reduction_percent`; + +ALTER TABLE `PREFIX_country` CHANGE `need_identification_number` `need_identification_number` TINYINT(1) NOT NULL DEFAULT '0'; + +INSERT INTO `PREFIX_configuration` (`name`, `value`, `date_add`, `date_upd`) VALUES +('PS_1_3_2_UPDATE_DATE', NOW(), NOW(), NOW()); + +ALTER TABLE `PREFIX_search_index` CHANGE `weight` `weight` SMALLINT(4) unsigned NOT NULL DEFAULT '1'; + +ALTER TABLE `PREFIX_image` DROP INDEX `product_position`, ADD UNIQUE `product_position` (`id_product`, `position`); + +ALTER TABLE `PREFIX_zone` DROP `enabled`; + +SET @id_hook = (SELECT id_hook FROM PREFIX_hook WHERE name = 'backOfficeHeader'); +SET @position = (SELECT IFNULL(MAX(position),0)+1 FROM PREFIX_hook_module WHERE id_hook = @id_hook); +INSERT IGNORE INTO PREFIX_hook_module (id_hook, id_module, position) VALUES (@id_hook, (SELECT id_module FROM PREFIX_module WHERE name = 'statsbestcustomers'), @position); +SET @position = @position + 1; +INSERT IGNORE INTO PREFIX_hook_module (id_hook, id_module, position) VALUES (@id_hook, (SELECT id_module FROM PREFIX_module WHERE name = 'statsbestproducts'), @position); +SET @position = @position + 1; +INSERT IGNORE INTO PREFIX_hook_module (id_hook, id_module, position) VALUES (@id_hook, (SELECT id_module FROM PREFIX_module WHERE name = 'statsbestvouchers'), @position); +SET @position = @position + 1; +INSERT IGNORE INTO PREFIX_hook_module (id_hook, id_module, position) VALUES (@id_hook, (SELECT id_module FROM PREFIX_module WHERE name = 'statsbestcategories'), @position); +SET @position = @position + 1; +INSERT IGNORE INTO PREFIX_hook_module (id_hook, id_module, position) VALUES (@id_hook, (SELECT id_module FROM PREFIX_module WHERE name = 'statsbestcarriers'), @position); diff --git a/install-new/upgrade/sql/1.3.2.3.sql b/install-new/upgrade/sql/1.3.2.3.sql new file mode 100644 index 000000000..0b4cf1b2f --- /dev/null +++ b/install-new/upgrade/sql/1.3.2.3.sql @@ -0,0 +1 @@ +SET NAMES 'utf8'; diff --git a/install-new/upgrade/sql/1.3.3.0.sql b/install-new/upgrade/sql/1.3.3.0.sql new file mode 100644 index 000000000..a8c43bb44 --- /dev/null +++ b/install-new/upgrade/sql/1.3.3.0.sql @@ -0,0 +1,8 @@ +SET NAMES 'utf8'; + +ALTER TABLE `PREFIX_order_detail` ADD `group_reduction` DECIMAL(10, 2) NOT NULL AFTER `reduction_amount`; +ALTER TABLE `PREFIX_order_detail` ADD `ecotax_tax_rate` DECIMAL(5, 3) NOT NULL AFTER `ecotax`; +ALTER TABLE `PREFIX_product` CHANGE `ecotax` `ecotax` DECIMAL(21, 6) NOT NULL DEFAULT '0.00'; + +INSERT INTO `PREFIX_configuration` (`name`, `value`, `date_add`, `date_upd`) SELECT 'PS_LOCALE_LANGUAGE', l.`iso_code`, NOW(), NOW() FROM `PREFIX_configuration` c INNER JOIN `PREFIX_lang` l ON (l.`id_lang` = c.`value`) WHERE c.`name` = 'PS_LANG_DEFAULT'; +INSERT INTO `PREFIX_configuration` (`name`, `value`, `date_add`, `date_upd`) SELECT 'PS_LOCALE_COUNTRY', co.`iso_code`, NOW(), NOW() FROM `PREFIX_configuration` c INNER JOIN `PREFIX_country` co ON (co.`id_country` = c.`value`) WHERE c.`name` = 'PS_COUNTRY_DEFAULT'; diff --git a/install-new/upgrade/sql/1.3.4.0.sql b/install-new/upgrade/sql/1.3.4.0.sql new file mode 100644 index 000000000..22c382dd4 --- /dev/null +++ b/install-new/upgrade/sql/1.3.4.0.sql @@ -0,0 +1 @@ +SET NAMES 'utf8'; \ No newline at end of file diff --git a/install-new/upgrade/sql/1.3.5.0.sql b/install-new/upgrade/sql/1.3.5.0.sql new file mode 100644 index 000000000..22c382dd4 --- /dev/null +++ b/install-new/upgrade/sql/1.3.5.0.sql @@ -0,0 +1 @@ +SET NAMES 'utf8'; \ No newline at end of file diff --git a/install-new/upgrade/sql/1.3.6.0.sql b/install-new/upgrade/sql/1.3.6.0.sql new file mode 100644 index 000000000..083171282 --- /dev/null +++ b/install-new/upgrade/sql/1.3.6.0.sql @@ -0,0 +1,3 @@ +SET NAMES 'utf8'; + +/* PHP:update_products_ecotax_v133(); */; diff --git a/install-new/upgrade/sql/1.3.7.0.sql b/install-new/upgrade/sql/1.3.7.0.sql new file mode 100644 index 000000000..0b4cf1b2f --- /dev/null +++ b/install-new/upgrade/sql/1.3.7.0.sql @@ -0,0 +1 @@ +SET NAMES 'utf8'; diff --git a/install-new/upgrade/sql/1.4.0.1.sql b/install-new/upgrade/sql/1.4.0.1.sql new file mode 100644 index 000000000..525c317c0 --- /dev/null +++ b/install-new/upgrade/sql/1.4.0.1.sql @@ -0,0 +1,2 @@ +SET NAMES 'utf8'; + diff --git a/install-new/upgrade/sql/1.4.0.10.sql b/install-new/upgrade/sql/1.4.0.10.sql new file mode 100644 index 000000000..64833005c --- /dev/null +++ b/install-new/upgrade/sql/1.4.0.10.sql @@ -0,0 +1,20 @@ +SET NAMES 'utf8'; + +INSERT INTO `PREFIX_configuration` (`name`, `value`, `date_add`, `date_upd`) VALUES ('PS_CATALOG_MODE', '0', NOW(), NOW()); + +ALTER TABLE `PREFIX_specific_price` DROP `priority`; + +INSERT INTO `PREFIX_configuration` (`name`, `value`, `date_add`, `date_upd`) VALUES +('PS_GEOLOCATION_WHITELIST', '209.185.108;209.185.253;209.85.238;209.85.238.11;209.85.238.4;216.239.33.96;216.239.33.97;216.239.33.98;216.239.33.99;216.239.37.98;216.239.37.99;216.239.39.98;216.239.39.99;216.239.41.96;216.239.41.97;216.239.41.98;216.239.41.99;216.239.45.4;216.239.46;216.239.51.96;216.239.51.97;216.239.51.98;216.239.51.99;216.239.53.98;216.239.53.99;216.239.57.96;216.239.57.97;216.239.57.98;216.239.57.99;216.239.59.98;216.239.59.99;216.33.229.163;64.233.173.193;64.233.173.194;64.233.173.195;64.233.173.196;64.233.173.197;64.233.173.198;64.233.173.199;64.233.173.200;64.233.173.201;64.233.173.202;64.233.173.203;64.233.173.204;64.233.173.205;64.233.173.206;64.233.173.207;64.233.173.208;64.233.173.209;64.233.173.210;64.233.173.211;64.233.173.212;64.233.173.213;64.233.173.214;64.233.173.215;64.233.173.216;64.233.173.217;64.233.173.218;64.233.173.219;64.233.173.220;64.233.173.221;64.233.173.222;64.233.173.223;64.233.173.224;64.233.173.225;64.233.173.226;64.233.173.227;64.233.173.228;64.233.173.229;64.233.173.230;64.233.173.231;64.233.173.232;64.233.173.233;64.233.173.234;64.233.173.235;64.233.173.236;64.233.173.237;64.233.173.238;64.233.173.239;64.233.173.240;64.233.173.241;64.233.173.242;64.233.173.243;64.233.173.244;64.233.173.245;64.233.173.246;64.233.173.247;64.233.173.248;64.233.173.249;64.233.173.250;64.233.173.251;64.233.173.252;64.233.173.253;64.233.173.254;64.233.173.255;64.68.80;64.68.81;64.68.82;64.68.83;64.68.84;64.68.85;64.68.86;64.68.87;64.68.88;64.68.89;64.68.90.1;64.68.90.10;64.68.90.11;64.68.90.12;64.68.90.129;64.68.90.13;64.68.90.130;64.68.90.131;64.68.90.132;64.68.90.133;64.68.90.134;64.68.90.135;64.68.90.136;64.68.90.137;64.68.90.138;64.68.90.139;64.68.90.14;64.68.90.140;64.68.90.141;64.68.90.142;64.68.90.143;64.68.90.144;64.68.90.145;64.68.90.146;64.68.90.147;64.68.90.148;64.68.90.149;64.68.90.15;64.68.90.150;64.68.90.151;64.68.90.152;64.68.90.153;64.68.90.154;64.68.90.155;64.68.90.156;64.68.90.157;64.68.90.158;64.68.90.159;64.68.90.16;64.68.90.160;64.68.90.161;64.68.90.162;64.68.90.163;64.68.90.164;64.68.90.165;64.68.90.166;64.68.90.167;64.68.90.168;64.68.90.169;64.68.90.17;64.68.90.170;64.68.90.171;64.68.90.172;64.68.90.173;64.68.90.174;64.68.90.175;64.68.90.176;64.68.90.177;64.68.90.178;64.68.90.179;64.68.90.18;64.68.90.180;64.68.90.181;64.68.90.182;64.68.90.183;64.68.90.184;64.68.90.185;64.68.90.186;64.68.90.187;64.68.90.188;64.68.90.189;64.68.90.19;64.68.90.190;64.68.90.191;64.68.90.192;64.68.90.193;64.68.90.194;64.68.90.195;64.68.90.196;64.68.90.197;64.68.90.198;64.68.90.199;64.68.90.2;64.68.90.20;64.68.90.200;64.68.90.201;64.68.90.202;64.68.90.203;64.68.90.204;64.68.90.205;64.68.90.206;64.68.90.207;64.68.90.208;64.68.90.21;64.68.90.22;64.68.90.23;64.68.90.24;64.68.90.25;64.68.90.26;64.68.90.27;64.68.90.28;64.68.90.29;64.68.90.3;64.68.90.30;64.68.90.31;64.68.90.32;64.68.90.33;64.68.90.34;64.68.90.35;64.68.90.36;64.68.90.37;64.68.90.38;64.68.90.39;64.68.90.4;64.68.90.40;64.68.90.41;64.68.90.42;64.68.90.43;64.68.90.44;64.68.90.45;64.68.90.46;64.68.90.47;64.68.90.48;64.68.90.49;64.68.90.5;64.68.90.50;64.68.90.51;64.68.90.52;64.68.90.53;64.68.90.54;64.68.90.55;64.68.90.56;64.68.90.57;64.68.90.58;64.68.90.59;64.68.90.6;64.68.90.60;64.68.90.61;64.68.90.62;64.68.90.63;64.68.90.64;64.68.90.65;64.68.90.66;64.68.90.67;64.68.90.68;64.68.90.69;64.68.90.7;64.68.90.70;64.68.90.71;64.68.90.72;64.68.90.73;64.68.90.74;64.68.90.75;64.68.90.76;64.68.90.77;64.68.90.78;64.68.90.79;64.68.90.8;64.68.90.80;64.68.90.9;64.68.91;64.68.92;66.249.64;66.249.65;66.249.66;66.249.67;66.249.68;66.249.69;66.249.70;66.249.71;66.249.72;66.249.73;66.249.78;66.249.79;72.14.199;8.6.48', NOW(), NOW()); + +ALTER TABLE `PREFIX_address` ADD `dni` VARCHAR(16) NULL AFTER `vat_number`; + +UPDATE `PREFIX_address` a SET `dni` = ( + SELECT `dni` + FROM `PREFIX_customer` c + WHERE c.`id_customer` = a.`id_customer` +); + +ALTER TABLE `PREFIX_customer` DROP `dni`; + +INSERT INTO `PREFIX_hook` (`name`, `title`, `description`, `position`) VALUES ('paymentTop', 'Top of payment page', 'Top of payment page', 0); diff --git a/install-new/upgrade/sql/1.4.0.11.sql b/install-new/upgrade/sql/1.4.0.11.sql new file mode 100644 index 000000000..f0ea8d56a --- /dev/null +++ b/install-new/upgrade/sql/1.4.0.11.sql @@ -0,0 +1,35 @@ +CREATE TEMPORARY TABLE `PREFIX_tab_tmp` ( + `position` int(10) +); + +INSERT INTO `PREFIX_tab_tmp` (SELECT * FROM (SELECT `position` FROM `PREFIX_tab` WHERE `class_name` = 'AdminTaxes') AS tmp); +UPDATE `PREFIX_tab` SET `position` = (SELECT position FROM PREFIX_tab_tmp tmp) + 1 WHERE `class_name` = 'AdminTaxRulesGroup'; +DROP TABLE PREFIX_tab_tmp; + +DELETE FROM `PREFIX_configuration` WHERE `name` = 'PS_INVOICE_NUMBER'; + +CREATE TABLE `PREFIX_log` ( + `id_log` int(10) unsigned NOT NULL AUTO_INCREMENT, + `severity` tinyint(1) NOT NULL, + `error_code` int(11) DEFAULT NULL, + `message` text NOT NULL, + `object_type` varchar(32) DEFAULT NULL, + `object_id` int(10) unsigned DEFAULT NULL, + `date_add` datetime NOT NULL, + `date_upd` datetime NOT NULL, + PRIMARY KEY (`id_log`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +INSERT INTO `PREFIX_configuration` (`name`, `value`, `date_add`, `date_upd`) VALUES ('PS_LOGS_BY_EMAIL', '5', NOW(), NOW()); + +ALTER TABLE `PREFIX_tax_rules_group` CHANGE `name` `name` VARCHAR( 50 ) NOT NULL; + +CREATE TABLE `PREFIX_import_match` ( + `id_import_match` int(10) NOT NULL AUTO_INCREMENT, + `name` varchar(32) NOT NULL, + `match` text NOT NULL, + `skip` int(2) NOT NULL, + PRIMARY KEY (`id_import_match`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +/* PHP:add_new_tab(AdminLogs, en:Log|fr:Log|es:Log|de:Log|it:Log, 9); */; diff --git a/install-new/upgrade/sql/1.4.0.12.sql b/install-new/upgrade/sql/1.4.0.12.sql new file mode 100644 index 000000000..9af34e070 --- /dev/null +++ b/install-new/upgrade/sql/1.4.0.12.sql @@ -0,0 +1,7 @@ +ALTER TABLE `PREFIX_product` CHANGE `ecotax` `ecotax` DECIMAL( 17, 6 ) NOT NULL DEFAULT '0.00'; + +INSERT INTO `PREFIX_configuration` (`name`, `value`, `date_add`, `date_upd`) VALUES ('PS_LAST_SHOP_UPDATE', NOW(), NOW(), NOW()); + +INSERT INTO `PREFIX_configuration` (`name`, `value`, `date_add`, `date_upd`) VALUES ('PS_STORES_DISPLAY_SITEMAP', 1, NOW(), NOW()); + +INSERT INTO `PREFIX_configuration` (`name`, `value`, `date_add`, `date_upd`) VALUES ('PS_COOKIE_CHECKIP', 1, NOW(), NOW()); \ No newline at end of file diff --git a/install-new/upgrade/sql/1.4.0.13.sql b/install-new/upgrade/sql/1.4.0.13.sql new file mode 100644 index 000000000..22c382dd4 --- /dev/null +++ b/install-new/upgrade/sql/1.4.0.13.sql @@ -0,0 +1 @@ +SET NAMES 'utf8'; \ No newline at end of file diff --git a/install-new/upgrade/sql/1.4.0.14.sql b/install-new/upgrade/sql/1.4.0.14.sql new file mode 100644 index 000000000..959066ac0 --- /dev/null +++ b/install-new/upgrade/sql/1.4.0.14.sql @@ -0,0 +1,24 @@ +SET NAMES 'utf8'; + +ALTER TABLE `PREFIX_tax_rule` DROP PRIMARY KEY ; +ALTER TABLE `PREFIX_tax_rule` ADD `id_tax_rule` INT NOT NULL AUTO_INCREMENT PRIMARY KEY FIRST ; +ALTER TABLE `PREFIX_tax_rule` ADD INDEX ( `id_tax` ) ; +ALTER TABLE `PREFIX_tax_rule` ADD INDEX ( `id_tax_rules_group` ) ; + +ALTER TABLE `PREFIX_address` MODIFY `dni` VARCHAR(16) NULL AFTER `vat_number`; + +INSERT INTO `PREFIX_configuration` (`name`, `value`, `date_add`, `date_upd`) VALUES +('BLOCKSTORE_IMG', 'store.jpg', NOW(), NOW()), +('PS_STORES_CENTER_LAT', '25.948969', NOW(), NOW()), +('PS_STORES_CENTER_LONG', '-80.226439', NOW(), NOW()); + +/* PHP:add_new_tab(AdminInformation, en:Configuration Information|fr:Informations|es:Informations|it:Informazioni di configurazione|de:Konfigurationsinformationen, 9); */; +/* PHP:add_new_tab(AdminPerformance, de:Leistung|en:Performance|it:Performance|fr:Performances|es:Rendimiento, 8); */; +/* PHP:add_new_tab(AdminCustomerThreads, en:Customer Service|de:Kundenservice|fr:SAV|es:Servicio al cliente|it:Servizio clienti, 29); */; +/* PHP:add_new_tab(AdminWebservice, fr:Service web|es:Web service|en:Webservice|de:Webservice|it:Webservice, 9); */; +/* PHP:add_new_tab(AdminAddonsCatalog, fr:Catalogue de modules et thèmes|de:Module und Themenkatalog|en:Modules & Themes Catalog|it:Moduli & Temi catalogo, 7); */; +/* PHP:add_new_tab(AdminAddonsMyAccount, it:Il mio Account|de:Mein Konto|fr:Mon compte|en:My Account, 7); */; +/* PHP:add_new_tab(AdminThemes, es:Temas|it:Temi|de:Themen|en:Themes|fr:Thèmes, 7); */; +/* PHP:add_new_tab(AdminGeolocation, es:Geolocalización|it:Geolocalizzazione|en:Geolocation|de:Geotargeting|fr:Géolocalisation, 8); */; +/* PHP:add_new_tab(AdminTaxRulesGroup, it:Regimi fiscali|es:Reglas de Impuestos|fr:Règles de taxes|de:Steuerregeln|en:Tax Rules, 4); */; +/* PHP:add_new_tab(AdminLogs, en:Log|fr:Log|es:Log|de:Log|it:Log, 9); */; diff --git a/install-new/upgrade/sql/1.4.0.15.sql b/install-new/upgrade/sql/1.4.0.15.sql new file mode 100644 index 000000000..f58669a52 --- /dev/null +++ b/install-new/upgrade/sql/1.4.0.15.sql @@ -0,0 +1,41 @@ +/* PHP:add_new_tab(AdminCounty, fr:Comtés|es:Condados|en:Counties|de:Counties|it:Counties, 5); */; + +ALTER TABLE `PREFIX_tax_rule` ADD `county_behavior` INT NOT NULL AFTER `state_behavior`; +ALTER TABLE `PREFIX_tax_rule` ADD `id_county` INT NOT NULL AFTER `id_country`; + +ALTER TABLE `PREFIX_tax_rule` ADD UNIQUE ( +`id_tax_rules_group` , +`id_country` , +`id_state` , +`id_county` +); + +CREATE TABLE `PREFIX_county` ( + `id_county` int(11) NOT NULL AUTO_INCREMENT, + `name` varchar(64) NOT NULL, + `id_state` int(11) NOT NULL, + `active` tinyint(1) NOT NULL, + PRIMARY KEY (`id_county`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8 ; + + +CREATE TABLE `PREFIX_county_zip_code` ( + `id_county` INT NOT NULL , + `from_zip_code` INT NOT NULL , + `to_zip_code` INT NOT NULL , + PRIMARY KEY ( `id_county` , `from_zip_code` , `to_zip_code` ) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + + +INSERT INTO `PREFIX_configuration` (`name`, `value`, `date_add`, `date_upd`) VALUES ('PS_HOMEPAGE_PHP_SELF', 'index.php', NOW(), NOW()); + + +INSERT INTO `PREFIX_configuration` (`name`, `value`, `date_add`, `date_upd`) +VALUES ('PS_USE_ECOTAX', + (SELECT IF((SELECT `ecotax` FROM `PREFIX_product` WHERE `ecotax` != 0 LIMIT 1),'1','0')), + NOW(), + NOW()); + +ALTER TABLE `PREFIX_hook` ADD `live_edit` TINYINT NOT NULL DEFAULT '0'; + +UPDATE `PREFIX_hook` SET `live_edit` = '1' WHERE `PREFIX_hook`.`name` IN ('rightColumn', 'leftColumn', 'home'); diff --git a/install-new/upgrade/sql/1.4.0.16.sql b/install-new/upgrade/sql/1.4.0.16.sql new file mode 100644 index 000000000..ed45cf3d2 --- /dev/null +++ b/install-new/upgrade/sql/1.4.0.16.sql @@ -0,0 +1,38 @@ +INSERT INTO `PREFIX_hook` (`id_hook`, `name`, `title`, `description`, `position`) +VALUES (NULL, 'afterCreateHtaccess', 'After htaccess creation', 'After htaccess creation', 0); + +UPDATE `PREFIX_meta_lang` SET `url_rewrite` = 'kontaktieren-sie-uns' WHERE id_meta = 3 AND id_lang = 4 AND url_rewrite = 'Kontaktieren Sie uns'; +UPDATE `PREFIX_meta_lang` SET `url_rewrite` = 'kennwort-wiederherstellung' WHERE id_meta = 7 AND id_lang = 4 AND url_rewrite = 'Kennwort Wiederherstellung'; +UPDATE `PREFIX_meta_lang` SET `url_rewrite` = 'il-mio-account' WHERE id_meta = 18 AND id_lang = 5 AND url_rewrite = 'il mio-account'; +UPDATE `PREFIX_meta_lang` SET `url_rewrite` = 'nota-di-ordine' WHERE id_meta = 20 AND id_lang = 5 AND url_rewrite = 'nota di-ordine'; + +INSERT INTO `PREFIX_meta` (`page`) VALUES ('order-opc'); +INSERT INTO `PREFIX_meta_lang` (`id_lang`, `id_meta`, `title`, `url_rewrite`) +( + SELECT `id_lang`, (SELECT `id_meta` FROM `PREFIX_meta` WHERE `page` = 'order-opc'), 'Order', 'quick-order' + FROM `PREFIX_lang` +); +INSERT INTO `PREFIX_meta` (`page`) VALUES ('guest-tracking'); +INSERT INTO `PREFIX_meta_lang` (`id_lang`, `id_meta`, `title`, `url_rewrite`) +( + SELECT `id_lang`, (SELECT `id_meta` FROM `PREFIX_meta` WHERE `page` = 'guest-tracking'), 'Guest tracking', 'guest-tracking' + FROM `PREFIX_lang` +); + +UPDATE `PREFIX_hook` SET `live_edit` = '1' WHERE `PREFIX_hook`.`name` IN ('productfooter', 'payment'); + +UPDATE `PREFIX_configuration` SET name = 'PS_GEOLOCATION_ENABLED' WHERE name = 'PS_GEOLOCALIZATION_ENABLED'; +UPDATE `PREFIX_configuration` SET name = 'PS_GEOLOCATION_BEHAVIOR' WHERE name = 'PS_GEOLOCALIZATION_BEHAVIOR'; +UPDATE `PREFIX_configuration` SET name = 'PS_GEOLOCATION_WHITELIST' WHERE name = 'PS_GEOLOCALIZATION_WHITELIST'; +UPDATE `PREFIX_tab` SET class_name = 'AdminGeolocation' WHERE class_name = 'AdminGeolocalization'; + +INSERT INTO `PREFIX_configuration` (`name`, `value`, `date_add`, `date_upd`) VALUES +('PS_CANONICAL_REDIRECT', '0', NOW(), NOW()); + +ALTER TABLE `PREFIX_webservice_account` ADD `class_name` VARCHAR( 50 ) NOT NULL DEFAULT 'WebserviceRequest' AFTER `key`; +ALTER TABLE `PREFIX_webservice_account` ADD `description` text NULL AFTER `key`; + +/* PHP:add_new_tab(AdminHome, en:Home|fr:Accueil|es:Home|de:Home|it:Home, -1); */; +/* PHP:add_new_tab(AdminStockMvt, de:Lagerbewegungen|fr:Mouvements de Stock|it:Movimenti magazzino|en:Stock Movements, 1); */; +/* PHP:update_for_13version(); */; + diff --git a/install-new/upgrade/sql/1.4.0.17.sql b/install-new/upgrade/sql/1.4.0.17.sql new file mode 100644 index 000000000..bf8cb320f --- /dev/null +++ b/install-new/upgrade/sql/1.4.0.17.sql @@ -0,0 +1,22 @@ +SET NAMES 'utf8'; + +ALTER TABLE `PREFIX_stock_mvt_reason` ADD `sign` TINYINT(1) NOT NULL DEFAULT '1' AFTER `id_stock_mvt_reason`; +UPDATE `PREFIX_stock_mvt_reason` SET `sign`=-1; +UPDATE `PREFIX_stock_mvt_reason` SET `sign`=1 WHERE `id_stock_mvt_reason`=3; +UPDATE `PREFIX_stock_mvt_reason` SET `id_stock_mvt_reason`=`id_stock_mvt_reason`+2 ORDER BY `id_stock_mvt_reason` DESC; +UPDATE `PREFIX_stock_mvt` SET `id_stock_mvt_reason`=`id_stock_mvt_reason`+2; +UPDATE `PREFIX_stock_mvt_reason_lang` SET `id_stock_mvt_reason`=`id_stock_mvt_reason`+2 ORDER BY `id_stock_mvt_reason` DESC; +INSERT INTO `PREFIX_stock_mvt_reason` (`id_stock_mvt_reason` ,`sign` ,`date_add` ,`date_upd`) VALUES ('1', '1', NOW(), NOW()), ('2', '-1', NOW(), NOW()); + +INSERT INTO `PREFIX_stock_mvt_reason_lang` (`id_stock_mvt_reason` ,`id_lang` ,`name`) VALUES +('1', '1', 'Increase'), +('1', '2', 'Augmenter'), +('1', '3', 'Aumentar'), +('1', '4', 'Erhöhen'), +('1', '5', 'Aumento'), +('2', '1', 'Decrease'), +('2', '2', 'Diminuer'), +('2', '3', 'Disminuir'), +('2', '4', 'Reduzieren'), +('2', '5', 'Diminuzione'); + diff --git a/install-new/upgrade/sql/1.4.0.2.sql b/install-new/upgrade/sql/1.4.0.2.sql new file mode 100644 index 000000000..b3f9ab89f --- /dev/null +++ b/install-new/upgrade/sql/1.4.0.2.sql @@ -0,0 +1,694 @@ +SET NAMES 'utf8'; + +ALTER TABLE `PREFIX_employee` ADD `bo_color` varchar(32) default NULL AFTER `stats_date_to`; +ALTER TABLE `PREFIX_employee` ADD `bo_theme` varchar(32) default NULL AFTER `bo_color`; +ALTER TABLE `PREFIX_employee` ADD `bo_uimode` ENUM('hover','click') default 'click' AFTER `bo_theme`; +ALTER TABLE `PREFIX_employee` ADD `id_lang` int(10) unsigned NOT NULL default 0 AFTER `id_profile`; + +ALTER TABLE `PREFIX_cms` ADD `id_cms_category` int(10) unsigned NOT NULL default '0' AFTER `id_cms`; +ALTER TABLE `PREFIX_cms` ADD `position` int(10) unsigned NOT NULL default '0' AFTER `id_cms_category`; + +CREATE TABLE `PREFIX_cms_category` ( + `id_cms_category` int(10) unsigned NOT NULL AUTO_INCREMENT, + `id_parent` int(10) unsigned NOT NULL, + `level_depth` tinyint(3) unsigned NOT NULL DEFAULT '0', + `active` tinyint(1) unsigned NOT NULL DEFAULT '0', + `date_add` datetime NOT NULL, + `date_upd` datetime NOT NULL, + `position` int(10) unsigned NOT NULL default '0', + PRIMARY KEY (`id_cms_category`), + KEY `category_parent` (`id_parent`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +CREATE TABLE `PREFIX_cms_category_lang` ( + `id_cms_category` int(10) unsigned NOT NULL, + `id_lang` int(10) unsigned NOT NULL, + `name` varchar(128) NOT NULL, + `description` text, + `link_rewrite` varchar(128) NOT NULL, + `meta_title` varchar(128) DEFAULT NULL, + `meta_keywords` varchar(255) DEFAULT NULL, + `meta_description` varchar(255) DEFAULT NULL, + UNIQUE KEY `category_lang_index` (`id_cms_category`,`id_lang`), + KEY `category_name` (`name`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +INSERT INTO `PREFIX_cms_category_lang` VALUES(1, 1, 'Home', '', 'home', NULL, NULL, NULL); +INSERT INTO `PREFIX_cms_category_lang` VALUES(1, 2, 'Accueil', '', 'home', NULL, NULL, NULL); +INSERT INTO `PREFIX_cms_category_lang` VALUES(1, 3, 'Inicio', '', 'home', NULL, NULL, NULL); + +INSERT INTO `PREFIX_cms_category` VALUES(1, 0, 0, 1, NOW(), NOW(),0); + +UPDATE `PREFIX_cms_category` SET `position` = 0; +UPDATE `PREFIX_cms` SET `position` = 0; +UPDATE `PREFIX_cms` SET `id_cms_category` = 0; + +ALTER TABLE `PREFIX_category` ADD `position` int(10) unsigned NOT NULL default '0' AFTER `date_upd`; + +UPDATE `PREFIX_employee` SET `id_lang` = (SELECT `value` FROM `PREFIX_configuration` WHERE `name` LIKE "PS_LANG_DEFAULT"); + +ALTER TABLE `PREFIX_customer` ADD `note` text AFTER `secure_key`; + +ALTER TABLE `PREFIX_contact` ADD `customer_service` tinyint(1) NOT NULL DEFAULT 0 AFTER `email`; + +CREATE TABLE `PREFIX_customer_thread` ( + `id_customer_thread` int(11) unsigned NOT NULL auto_increment, + `id_lang` int(10) unsigned NOT NULL, + `id_contact` int(10) unsigned NOT NULL, + `id_customer` int(10) unsigned default NULL, + `id_order` int(10) unsigned default NULL, + `id_product` int(10) unsigned default NULL, + `status` enum('open','closed','pending1','pending2') NOT NULL default 'open', + `email` varchar(128) NOT NULL, + `token` varchar(12) default NULL, + `date_add` datetime NOT NULL, + `date_upd` datetime NOT NULL, + PRIMARY KEY (`id_customer_thread`), + KEY `id_customer_thread` (`id_customer_thread`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +CREATE TABLE `PREFIX_customer_message` ( + `id_customer_message` int(10) unsigned NOT NULL auto_increment, + `id_customer_thread` int(11) default NULL, + `id_employee` int(10) unsigned default NULL, + `message` text NOT NULL, + `file_name` varchar(18) DEFAULT NULL, + `ip_address` int(11) default NULL, + `user_agent` varchar(128) default NULL, + `date_add` datetime NOT NULL, + PRIMARY KEY (`id_customer_message`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +CREATE TABLE `PREFIX_payment_cc` ( + `id_payment_cc` INT NOT NULL auto_increment, + `id_order` INT UNSIGNED NULL, + `id_currency` INT UNSIGNED NOT NULL, + `amount` DECIMAL(10,2) NOT NULL, + `transaction_id` VARCHAR(254) NULL, + `card_number` VARCHAR(254) NULL, + `card_brand` VARCHAR(254) NULL, + `card_expiration` CHAR(7) NULL, + `card_holder` VARCHAR(254) NULL, + `date_add` DATETIME NOT NULL, + PRIMARY KEY (`id_payment_cc`), + KEY `id_order` (`id_order`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +CREATE TABLE `PREFIX_specific_price` ( + `id_specific_price` INT UNSIGNED NOT NULL AUTO_INCREMENT, + `id_product` INT UNSIGNED NOT NULL, + `id_shop` TINYINT UNSIGNED NOT NULL, + `id_currency` INT UNSIGNED NOT NULL, + `id_country` INT UNSIGNED NOT NULL, + `id_group` INT UNSIGNED NOT NULL, + `priority` SMALLINT UNSIGNED NOT NULL, + `price` DECIMAL(20, 6) NOT NULL, + `from_quantity` SMALLINT UNSIGNED NOT NULL, + `reduction` DECIMAL(20, 6) NOT NULL, + `reduction_type` ENUM('amount', 'percentage') NOT NULL, + `from` DATETIME NOT NULL, + `to` DATETIME NOT NULL, + PRIMARY KEY(`id_specific_price`), + KEY (`id_product`, `id_shop`, `id_currency`, `id_country`, `id_group`, `from_quantity`, `from`, `to`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +INSERT INTO `PREFIX_specific_price` (`id_product`, `id_shop`, `id_currency`, `id_country`, `id_group`, `priority`, `price`, `from_quantity`, `reduction`, `reduction_type`, `from`, `to`) + ( SELECT dq.`id_product`, 1, 1, 0, 1, 0, 0.00, dq.`quantity`, IF(dq.`id_discount_type` = 2, dq.`value`, dq.`value` / 100), IF (dq.`id_discount_type` = 2, 'amount', 'percentage'), '0000-00-00 00:00:00', '0000-00-00 00:00:00' + FROM `PREFIX_discount_quantity` dq + INNER JOIN `PREFIX_product` p ON (p.`id_product` = dq.`id_product`) + ); +DROP TABLE `PREFIX_discount_quantity`; + +INSERT INTO `PREFIX_specific_price` (`id_product`, `id_shop`, `id_currency`, `id_country`, `id_group`, `priority`, `price`, `from_quantity`, `reduction`, `reduction_type`, `from`, `to`) ( + SELECT + p.`id_product`, + 1, + 0, + 0, + 0, + 0, + 0.00, + 1, + IF(p.`reduction_price` > 0, p.`reduction_price`, p.`reduction_percent` / 100), + IF(p.`reduction_price` > 0, 'amount', 'percentage'), + IF (p.`reduction_from` = p.`reduction_to`, '0000-00-00 00:00:00', p.`reduction_from`), + IF (p.`reduction_from` = p.`reduction_to`, '0000-00-00 00:00:00', p.`reduction_to`) + FROM `PREFIX_product` p + WHERE p.`reduction_price` OR p.`reduction_percent` +); +ALTER TABLE `PREFIX_product` + DROP `reduction_price`, + DROP `reduction_percent`, + DROP `reduction_from`, + DROP `reduction_to`; + +INSERT INTO `PREFIX_configuration` (`name`, `value`, `date_add`, `date_upd`) VALUES +('PS_SPECIFIC_PRICE_PRIORITIES', 'id_shop;id_currency;id_country;id_group', NOW(), NOW()), +('PS_TAX_DISPLAY', 0, NOW(), NOW()), +('PS_SMARTY_FORCE_COMPILE', 1, NOW(), NOW()), +('PS_DISTANCE_UNIT', 'km', NOW(), NOW()), +('PS_STORES_DISPLAY_CMS', 0, NOW(), NOW()), +('PS_STORES_DISPLAY_FOOTER', 0, NOW(), NOW()), +('PS_STORES_SIMPLIFIED', 0, NOW(), NOW()), +('PS_STATSDATA_CUSTOMER_PAGESVIEWS', 1, NOW(), NOW()), +('PS_STATSDATA_PAGESVIEWS', 1, NOW(), NOW()), +('PS_STATSDATA_PLUGINS', 1, NOW(), NOW()); + +CREATE TABLE `PREFIX_group_reduction` ( + `id_group_reduction` MEDIUMINT UNSIGNED NOT NULL AUTO_INCREMENT, + `id_group` INT(10) UNSIGNED NOT NULL, + `id_category` INT(10) UNSIGNED NOT NULL, + `reduction` DECIMAL(4, 3) NOT NULL, + PRIMARY KEY(`id_group_reduction`), + UNIQUE KEY(`id_group`, `id_category`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +CREATE TABLE `PREFIX_product_group_reduction_cache` ( + `id_product` INT UNSIGNED NOT NULL, + `id_group` INT UNSIGNED NOT NULL, + `reduction` DECIMAL(4, 3) NOT NULL, + PRIMARY KEY(`id_product`, `id_group`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +ALTER TABLE `PREFIX_currency` ADD `iso_code_num` varchar(3) NOT NULL default '0' AFTER `iso_code`; +UPDATE `PREFIX_currency` SET iso_code_num = '978' WHERE iso_code LIKE 'EUR' LIMIT 1; +UPDATE `PREFIX_currency` SET iso_code_num = '840' WHERE iso_code LIKE 'USD' LIMIT 1; +UPDATE `PREFIX_currency` SET iso_code_num = '826' WHERE iso_code LIKE 'GBP' LIMIT 1; + +ALTER TABLE `PREFIX_country` ADD `call_prefix` int(10) NOT NULL default '0' AFTER `iso_code`; + +UPDATE `PREFIX_country` SET `call_prefix` = 49 WHERE `iso_code` = 'DE' LIMIT 1; +UPDATE `PREFIX_country` SET `call_prefix` = 43 WHERE `iso_code` = 'AT' LIMIT 1; +UPDATE `PREFIX_country` SET `call_prefix` = 32 WHERE `iso_code` = 'BE' LIMIT 1; +UPDATE `PREFIX_country` SET `call_prefix` = 1 WHERE `iso_code` = 'CA' LIMIT 1; +UPDATE `PREFIX_country` SET `call_prefix` = 86 WHERE `iso_code` = 'CN' LIMIT 1; +UPDATE `PREFIX_country` SET `call_prefix` = 34 WHERE `iso_code` = 'ES' LIMIT 1; +UPDATE `PREFIX_country` SET `call_prefix` = 358 WHERE `iso_code` = 'FI' LIMIT 1; +UPDATE `PREFIX_country` SET `call_prefix` = 33 WHERE `iso_code` = 'FR' LIMIT 1; +UPDATE `PREFIX_country` SET `call_prefix` = 30 WHERE `iso_code` = 'GR' LIMIT 1; +UPDATE `PREFIX_country` SET `call_prefix` = 39 WHERE `iso_code` = 'IT' LIMIT 1; +UPDATE `PREFIX_country` SET `call_prefix` = 81 WHERE `iso_code` = 'JP' LIMIT 1; +UPDATE `PREFIX_country` SET `call_prefix` = 352 WHERE `iso_code` = 'LU' LIMIT 1; +UPDATE `PREFIX_country` SET `call_prefix` = 31 WHERE `iso_code` = 'NL' LIMIT 1; +UPDATE `PREFIX_country` SET `call_prefix` = 48 WHERE `iso_code` = 'PL' LIMIT 1; +UPDATE `PREFIX_country` SET `call_prefix` = 351 WHERE `iso_code` = 'PT' LIMIT 1; +UPDATE `PREFIX_country` SET `call_prefix` = 420 WHERE `iso_code` = 'CZ' LIMIT 1; +UPDATE `PREFIX_country` SET `call_prefix` = 44 WHERE `iso_code` = 'GB' LIMIT 1; +UPDATE `PREFIX_country` SET `call_prefix` = 46 WHERE `iso_code` = 'SE' LIMIT 1; +UPDATE `PREFIX_country` SET `call_prefix` = 41 WHERE `iso_code` = 'CH' LIMIT 1; +UPDATE `PREFIX_country` SET `call_prefix` = 45 WHERE `iso_code` = 'DK' LIMIT 1; +UPDATE `PREFIX_country` SET `call_prefix` = 1 WHERE `iso_code` = 'US' LIMIT 1; +UPDATE `PREFIX_country` SET `call_prefix` = 852 WHERE `iso_code` = 'HK' LIMIT 1; +UPDATE `PREFIX_country` SET `call_prefix` = 47 WHERE `iso_code` = 'NO' LIMIT 1; +UPDATE `PREFIX_country` SET `call_prefix` = 61 WHERE `iso_code` = 'AU' LIMIT 1; +UPDATE `PREFIX_country` SET `call_prefix` = 65 WHERE `iso_code` = 'SG' LIMIT 1; +UPDATE `PREFIX_country` SET `call_prefix` = 353 WHERE `iso_code` = 'IE' LIMIT 1; +UPDATE `PREFIX_country` SET `call_prefix` = 64 WHERE `iso_code` = 'NZ' LIMIT 1; +UPDATE `PREFIX_country` SET `call_prefix` = 82 WHERE `iso_code` = 'KR' LIMIT 1; +UPDATE `PREFIX_country` SET `call_prefix` = 972 WHERE `iso_code` = 'IL' LIMIT 1; +UPDATE `PREFIX_country` SET `call_prefix` = 27 WHERE `iso_code` = 'ZA' LIMIT 1; +UPDATE `PREFIX_country` SET `call_prefix` = 234 WHERE `iso_code` = 'NG' LIMIT 1; +UPDATE `PREFIX_country` SET `call_prefix` = 225 WHERE `iso_code` = 'CI' LIMIT 1; +UPDATE `PREFIX_country` SET `call_prefix` = 228 WHERE `iso_code` = 'TG' LIMIT 1; +UPDATE `PREFIX_country` SET `call_prefix` = 591 WHERE `iso_code` = 'BO' LIMIT 1; +UPDATE `PREFIX_country` SET `call_prefix` = 230 WHERE `iso_code` = 'MU' LIMIT 1; +UPDATE `PREFIX_country` SET `call_prefix` = 40 WHERE `iso_code` = 'RO' LIMIT 1; +UPDATE `PREFIX_country` SET `call_prefix` = 421 WHERE `iso_code` = 'SK' LIMIT 1; +UPDATE `PREFIX_country` SET `call_prefix` = 213 WHERE `iso_code` = 'DZ' LIMIT 1; +UPDATE `PREFIX_country` SET `call_prefix` = 376 WHERE `iso_code` = 'AD' LIMIT 1; +UPDATE `PREFIX_country` SET `call_prefix` = 244 WHERE `iso_code` = 'AO' LIMIT 1; +UPDATE `PREFIX_country` SET `call_prefix` = 54 WHERE `iso_code` = 'AR' LIMIT 1; +UPDATE `PREFIX_country` SET `call_prefix` = 374 WHERE `iso_code` = 'AM' LIMIT 1; +UPDATE `PREFIX_country` SET `call_prefix` = 297 WHERE `iso_code` = 'AW' LIMIT 1; +UPDATE `PREFIX_country` SET `call_prefix` = 994 WHERE `iso_code` = 'AZ' LIMIT 1; +UPDATE `PREFIX_country` SET `call_prefix` = 973 WHERE `iso_code` = 'BH' LIMIT 1; +UPDATE `PREFIX_country` SET `call_prefix` = 880 WHERE `iso_code` = 'BD' LIMIT 1; +UPDATE `PREFIX_country` SET `call_prefix` = 501 WHERE `iso_code` = 'BZ' LIMIT 1; +UPDATE `PREFIX_country` SET `call_prefix` = 229 WHERE `iso_code` = 'BJ' LIMIT 1; +UPDATE `PREFIX_country` SET `call_prefix` = 975 WHERE `iso_code` = 'BT' LIMIT 1; +UPDATE `PREFIX_country` SET `call_prefix` = 267 WHERE `iso_code` = 'BW' LIMIT 1; +UPDATE `PREFIX_country` SET `call_prefix` = 55 WHERE `iso_code` = 'BR' LIMIT 1; +UPDATE `PREFIX_country` SET `call_prefix` = 673 WHERE `iso_code` = 'BN' LIMIT 1; +UPDATE `PREFIX_country` SET `call_prefix` = 226 WHERE `iso_code` = 'BF' LIMIT 1; +UPDATE `PREFIX_country` SET `call_prefix` = 95 WHERE `iso_code` = 'MM' LIMIT 1; +UPDATE `PREFIX_country` SET `call_prefix` = 257 WHERE `iso_code` = 'BI' LIMIT 1; +UPDATE `PREFIX_country` SET `call_prefix` = 855 WHERE `iso_code` = 'KH' LIMIT 1; +UPDATE `PREFIX_country` SET `call_prefix` = 237 WHERE `iso_code` = 'CM' LIMIT 1; +UPDATE `PREFIX_country` SET `call_prefix` = 238 WHERE `iso_code` = 'CV' LIMIT 1; +UPDATE `PREFIX_country` SET `call_prefix` = 236 WHERE `iso_code` = 'CF' LIMIT 1; +UPDATE `PREFIX_country` SET `call_prefix` = 235 WHERE `iso_code` = 'TD' LIMIT 1; +UPDATE `PREFIX_country` SET `call_prefix` = 56 WHERE `iso_code` = 'CL' LIMIT 1; +UPDATE `PREFIX_country` SET `call_prefix` = 57 WHERE `iso_code` = 'CO' LIMIT 1; +UPDATE `PREFIX_country` SET `call_prefix` = 269 WHERE `iso_code` = 'KM' LIMIT 1; +UPDATE `PREFIX_country` SET `call_prefix` = 242 WHERE `iso_code` = 'CD' LIMIT 1; +UPDATE `PREFIX_country` SET `call_prefix` = 243 WHERE `iso_code` = 'CG' LIMIT 1; +UPDATE `PREFIX_country` SET `call_prefix` = 506 WHERE `iso_code` = 'CR' LIMIT 1; +UPDATE `PREFIX_country` SET `call_prefix` = 385 WHERE `iso_code` = 'HR' LIMIT 1; +UPDATE `PREFIX_country` SET `call_prefix` = 53 WHERE `iso_code` = 'CU' LIMIT 1; +UPDATE `PREFIX_country` SET `call_prefix` = 357 WHERE `iso_code` = 'CY' LIMIT 1; +UPDATE `PREFIX_country` SET `call_prefix` = 253 WHERE `iso_code` = 'DJ' LIMIT 1; +UPDATE `PREFIX_country` SET `call_prefix` = 670 WHERE `iso_code` = 'TL' LIMIT 1; +UPDATE `PREFIX_country` SET `call_prefix` = 593 WHERE `iso_code` = 'EC' LIMIT 1; +UPDATE `PREFIX_country` SET `call_prefix` = 20 WHERE `iso_code` = 'EG' LIMIT 1; +UPDATE `PREFIX_country` SET `call_prefix` = 503 WHERE `iso_code` = 'SV' LIMIT 1; +UPDATE `PREFIX_country` SET `call_prefix` = 240 WHERE `iso_code` = 'GQ' LIMIT 1; +UPDATE `PREFIX_country` SET `call_prefix` = 291 WHERE `iso_code` = 'ER' LIMIT 1; +UPDATE `PREFIX_country` SET `call_prefix` = 372 WHERE `iso_code` = 'EE' LIMIT 1; +UPDATE `PREFIX_country` SET `call_prefix` = 251 WHERE `iso_code` = 'ET' LIMIT 1; +UPDATE `PREFIX_country` SET `call_prefix` = 298 WHERE `iso_code` = 'FO' LIMIT 1; +UPDATE `PREFIX_country` SET `call_prefix` = 679 WHERE `iso_code` = 'FJ' LIMIT 1; +UPDATE `PREFIX_country` SET `call_prefix` = 241 WHERE `iso_code` = 'GA' LIMIT 1; +UPDATE `PREFIX_country` SET `call_prefix` = 220 WHERE `iso_code` = 'GM' LIMIT 1; +UPDATE `PREFIX_country` SET `call_prefix` = 995 WHERE `iso_code` = 'GE' LIMIT 1; +UPDATE `PREFIX_country` SET `call_prefix` = 233 WHERE `iso_code` = 'GH' LIMIT 1; +UPDATE `PREFIX_country` SET `call_prefix` = 299 WHERE `iso_code` = 'GL' LIMIT 1; +UPDATE `PREFIX_country` SET `call_prefix` = 350 WHERE `iso_code` = 'GI' LIMIT 1; +UPDATE `PREFIX_country` SET `call_prefix` = 590 WHERE `iso_code` = 'GP' LIMIT 1; +UPDATE `PREFIX_country` SET `call_prefix` = 502 WHERE `iso_code` = 'GT' LIMIT 1; +UPDATE `PREFIX_country` SET `call_prefix` = 224 WHERE `iso_code` = 'GN' LIMIT 1; +UPDATE `PREFIX_country` SET `call_prefix` = 245 WHERE `iso_code` = 'GW' LIMIT 1; +UPDATE `PREFIX_country` SET `call_prefix` = 592 WHERE `iso_code` = 'GY' LIMIT 1; +UPDATE `PREFIX_country` SET `call_prefix` = 509 WHERE `iso_code` = 'HT' LIMIT 1; +UPDATE `PREFIX_country` SET `call_prefix` = 379 WHERE `iso_code` = 'VA' LIMIT 1; +UPDATE `PREFIX_country` SET `call_prefix` = 504 WHERE `iso_code` = 'HN' LIMIT 1; +UPDATE `PREFIX_country` SET `call_prefix` = 354 WHERE `iso_code` = 'IS' LIMIT 1; +UPDATE `PREFIX_country` SET `call_prefix` = 91 WHERE `iso_code` = 'IN' LIMIT 1; +UPDATE `PREFIX_country` SET `call_prefix` = 62 WHERE `iso_code` = 'ID' LIMIT 1; +UPDATE `PREFIX_country` SET `call_prefix` = 98 WHERE `iso_code` = 'IR' LIMIT 1; +UPDATE `PREFIX_country` SET `call_prefix` = 964 WHERE `iso_code` = 'IQ' LIMIT 1; +UPDATE `PREFIX_country` SET `call_prefix` = 962 WHERE `iso_code` = 'JO' LIMIT 1; +UPDATE `PREFIX_country` SET `call_prefix` = 7 WHERE `iso_code` = 'KZ' LIMIT 1; +UPDATE `PREFIX_country` SET `call_prefix` = 254 WHERE `iso_code` = 'KE' LIMIT 1; +UPDATE `PREFIX_country` SET `call_prefix` = 686 WHERE `iso_code` = 'KI' LIMIT 1; +UPDATE `PREFIX_country` SET `call_prefix` = 850 WHERE `iso_code` = 'KP' LIMIT 1; +UPDATE `PREFIX_country` SET `call_prefix` = 965 WHERE `iso_code` = 'KW' LIMIT 1; +UPDATE `PREFIX_country` SET `call_prefix` = 996 WHERE `iso_code` = 'KG' LIMIT 1; +UPDATE `PREFIX_country` SET `call_prefix` = 856 WHERE `iso_code` = 'LA' LIMIT 1; +UPDATE `PREFIX_country` SET `call_prefix` = 371 WHERE `iso_code` = 'LV' LIMIT 1; +UPDATE `PREFIX_country` SET `call_prefix` = 961 WHERE `iso_code` = 'LB' LIMIT 1; +UPDATE `PREFIX_country` SET `call_prefix` = 266 WHERE `iso_code` = 'LS' LIMIT 1; +UPDATE `PREFIX_country` SET `call_prefix` = 231 WHERE `iso_code` = 'LR' LIMIT 1; +UPDATE `PREFIX_country` SET `call_prefix` = 218 WHERE `iso_code` = 'LY' LIMIT 1; +UPDATE `PREFIX_country` SET `call_prefix` = 423 WHERE `iso_code` = 'LI' LIMIT 1; +UPDATE `PREFIX_country` SET `call_prefix` = 370 WHERE `iso_code` = 'LT' LIMIT 1; +UPDATE `PREFIX_country` SET `call_prefix` = 853 WHERE `iso_code` = 'MO' LIMIT 1; +UPDATE `PREFIX_country` SET `call_prefix` = 389 WHERE `iso_code` = 'MK' LIMIT 1; +UPDATE `PREFIX_country` SET `call_prefix` = 261 WHERE `iso_code` = 'MG' LIMIT 1; +UPDATE `PREFIX_country` SET `call_prefix` = 265 WHERE `iso_code` = 'MW' LIMIT 1; +UPDATE `PREFIX_country` SET `call_prefix` = 60 WHERE `iso_code` = 'MY' LIMIT 1; +UPDATE `PREFIX_country` SET `call_prefix` = 960 WHERE `iso_code` = 'MV' LIMIT 1; +UPDATE `PREFIX_country` SET `call_prefix` = 223 WHERE `iso_code` = 'ML' LIMIT 1; +UPDATE `PREFIX_country` SET `call_prefix` = 356 WHERE `iso_code` = 'MT' LIMIT 1; +UPDATE `PREFIX_country` SET `call_prefix` = 692 WHERE `iso_code` = 'MH' LIMIT 1; +UPDATE `PREFIX_country` SET `call_prefix` = 596 WHERE `iso_code` = 'MQ' LIMIT 1; +UPDATE `PREFIX_country` SET `call_prefix` = 222 WHERE `iso_code` = 'MR' LIMIT 1; +UPDATE `PREFIX_country` SET `call_prefix` = 36 WHERE `iso_code` = 'HU' LIMIT 1; +UPDATE `PREFIX_country` SET `call_prefix` = 262 WHERE `iso_code` = 'YT' LIMIT 1; +UPDATE `PREFIX_country` SET `call_prefix` = 52 WHERE `iso_code` = 'MX' LIMIT 1; +UPDATE `PREFIX_country` SET `call_prefix` = 691 WHERE `iso_code` = 'FM' LIMIT 1; +UPDATE `PREFIX_country` SET `call_prefix` = 373 WHERE `iso_code` = 'MD' LIMIT 1; +UPDATE `PREFIX_country` SET `call_prefix` = 377 WHERE `iso_code` = 'MC' LIMIT 1; +UPDATE `PREFIX_country` SET `call_prefix` = 976 WHERE `iso_code` = 'MN' LIMIT 1; +UPDATE `PREFIX_country` SET `call_prefix` = 382 WHERE `iso_code` = 'ME' LIMIT 1; +UPDATE `PREFIX_country` SET `call_prefix` = 212 WHERE `iso_code` = 'MA' LIMIT 1; +UPDATE `PREFIX_country` SET `call_prefix` = 258 WHERE `iso_code` = 'MZ' LIMIT 1; +UPDATE `PREFIX_country` SET `call_prefix` = 264 WHERE `iso_code` = 'NA' LIMIT 1; +UPDATE `PREFIX_country` SET `call_prefix` = 674 WHERE `iso_code` = 'NR' LIMIT 1; +UPDATE `PREFIX_country` SET `call_prefix` = 977 WHERE `iso_code` = 'NP' LIMIT 1; +UPDATE `PREFIX_country` SET `call_prefix` = 599 WHERE `iso_code` = 'AN' LIMIT 1; +UPDATE `PREFIX_country` SET `call_prefix` = 687 WHERE `iso_code` = 'NC' LIMIT 1; +UPDATE `PREFIX_country` SET `call_prefix` = 505 WHERE `iso_code` = 'NI' LIMIT 1; +UPDATE `PREFIX_country` SET `call_prefix` = 227 WHERE `iso_code` = 'NE' LIMIT 1; +UPDATE `PREFIX_country` SET `call_prefix` = 683 WHERE `iso_code` = 'NU' LIMIT 1; +UPDATE `PREFIX_country` SET `call_prefix` = 968 WHERE `iso_code` = 'OM' LIMIT 1; +UPDATE `PREFIX_country` SET `call_prefix` = 92 WHERE `iso_code` = 'PK' LIMIT 1; +UPDATE `PREFIX_country` SET `call_prefix` = 680 WHERE `iso_code` = 'PW' LIMIT 1; +UPDATE `PREFIX_country` SET `call_prefix` = 507 WHERE `iso_code` = 'PA' LIMIT 1; +UPDATE `PREFIX_country` SET `call_prefix` = 675 WHERE `iso_code` = 'PG' LIMIT 1; +UPDATE `PREFIX_country` SET `call_prefix` = 595 WHERE `iso_code` = 'PY' LIMIT 1; +UPDATE `PREFIX_country` SET `call_prefix` = 51 WHERE `iso_code` = 'PE' LIMIT 1; +UPDATE `PREFIX_country` SET `call_prefix` = 63 WHERE `iso_code` = 'PH' LIMIT 1; +UPDATE `PREFIX_country` SET `call_prefix` = 974 WHERE `iso_code` = 'QA' LIMIT 1; +UPDATE `PREFIX_country` SET `call_prefix` = 262 WHERE `iso_code` = 'RE' LIMIT 1; +UPDATE `PREFIX_country` SET `call_prefix` = 7 WHERE `iso_code` = 'RU' LIMIT 1; +UPDATE `PREFIX_country` SET `call_prefix` = 250 WHERE `iso_code` = 'RW' LIMIT 1; +UPDATE `PREFIX_country` SET `call_prefix` = 508 WHERE `iso_code` = 'PM' LIMIT 1; +UPDATE `PREFIX_country` SET `call_prefix` = 685 WHERE `iso_code` = 'WS' LIMIT 1; +UPDATE `PREFIX_country` SET `call_prefix` = 378 WHERE `iso_code` = 'SM' LIMIT 1; +UPDATE `PREFIX_country` SET `call_prefix` = 239 WHERE `iso_code` = 'ST' LIMIT 1; +UPDATE `PREFIX_country` SET `call_prefix` = 966 WHERE `iso_code` = 'SA' LIMIT 1; +UPDATE `PREFIX_country` SET `call_prefix` = 221 WHERE `iso_code` = 'SN' LIMIT 1; +UPDATE `PREFIX_country` SET `call_prefix` = 381 WHERE `iso_code` = 'RS' LIMIT 1; +UPDATE `PREFIX_country` SET `call_prefix` = 248 WHERE `iso_code` = 'SC' LIMIT 1; +UPDATE `PREFIX_country` SET `call_prefix` = 232 WHERE `iso_code` = 'SL' LIMIT 1; +UPDATE `PREFIX_country` SET `call_prefix` = 386 WHERE `iso_code` = 'SI' LIMIT 1; +UPDATE `PREFIX_country` SET `call_prefix` = 677 WHERE `iso_code` = 'SB' LIMIT 1; +UPDATE `PREFIX_country` SET `call_prefix` = 252 WHERE `iso_code` = 'SO' LIMIT 1; +UPDATE `PREFIX_country` SET `call_prefix` = 94 WHERE `iso_code` = 'LK' LIMIT 1; +UPDATE `PREFIX_country` SET `call_prefix` = 249 WHERE `iso_code` = 'SD' LIMIT 1; +UPDATE `PREFIX_country` SET `call_prefix` = 597 WHERE `iso_code` = 'SR' LIMIT 1; +UPDATE `PREFIX_country` SET `call_prefix` = 268 WHERE `iso_code` = 'SZ' LIMIT 1; +UPDATE `PREFIX_country` SET `call_prefix` = 963 WHERE `iso_code` = 'SY' LIMIT 1; +UPDATE `PREFIX_country` SET `call_prefix` = 886 WHERE `iso_code` = 'TW' LIMIT 1; +UPDATE `PREFIX_country` SET `call_prefix` = 992 WHERE `iso_code` = 'TJ' LIMIT 1; +UPDATE `PREFIX_country` SET `call_prefix` = 255 WHERE `iso_code` = 'TZ' LIMIT 1; +UPDATE `PREFIX_country` SET `call_prefix` = 66 WHERE `iso_code` = 'TH' LIMIT 1; +UPDATE `PREFIX_country` SET `call_prefix` = 690 WHERE `iso_code` = 'TK' LIMIT 1; +UPDATE `PREFIX_country` SET `call_prefix` = 676 WHERE `iso_code` = 'TO' LIMIT 1; +UPDATE `PREFIX_country` SET `call_prefix` = 216 WHERE `iso_code` = 'TN' LIMIT 1; +UPDATE `PREFIX_country` SET `call_prefix` = 90 WHERE `iso_code` = 'TR' LIMIT 1; +UPDATE `PREFIX_country` SET `call_prefix` = 993 WHERE `iso_code` = 'TM' LIMIT 1; +UPDATE `PREFIX_country` SET `call_prefix` = 688 WHERE `iso_code` = 'TV' LIMIT 1; +UPDATE `PREFIX_country` SET `call_prefix` = 256 WHERE `iso_code` = 'UG' LIMIT 1; +UPDATE `PREFIX_country` SET `call_prefix` = 380 WHERE `iso_code` = 'UA' LIMIT 1; +UPDATE `PREFIX_country` SET `call_prefix` = 971 WHERE `iso_code` = 'AE' LIMIT 1; +UPDATE `PREFIX_country` SET `call_prefix` = 598 WHERE `iso_code` = 'UY' LIMIT 1; +UPDATE `PREFIX_country` SET `call_prefix` = 998 WHERE `iso_code` = 'UZ' LIMIT 1; +UPDATE `PREFIX_country` SET `call_prefix` = 678 WHERE `iso_code` = 'VU' LIMIT 1; +UPDATE `PREFIX_country` SET `call_prefix` = 58 WHERE `iso_code` = 'VE' LIMIT 1; +UPDATE `PREFIX_country` SET `call_prefix` = 84 WHERE `iso_code` = 'VN' LIMIT 1; +UPDATE `PREFIX_country` SET `call_prefix` = 681 WHERE `iso_code` = 'WF' LIMIT 1; +UPDATE `PREFIX_country` SET `call_prefix` = 967 WHERE `iso_code` = 'YE' LIMIT 1; +UPDATE `PREFIX_country` SET `call_prefix` = 260 WHERE `iso_code` = 'ZM' LIMIT 1; +UPDATE `PREFIX_country` SET `call_prefix` = 263 WHERE `iso_code` = 'ZW' LIMIT 1; +UPDATE `PREFIX_country` SET `call_prefix` = 355 WHERE `iso_code` = 'AL' LIMIT 1; +UPDATE `PREFIX_country` SET `call_prefix` = 93 WHERE `iso_code` = 'AF' LIMIT 1; +UPDATE `PREFIX_country` SET `call_prefix` = 387 WHERE `iso_code` = 'BA' LIMIT 1; +UPDATE `PREFIX_country` SET `call_prefix` = 359 WHERE `iso_code` = 'BG' LIMIT 1; +UPDATE `PREFIX_country` SET `call_prefix` = 682 WHERE `iso_code` = 'CK' LIMIT 1; +UPDATE `PREFIX_country` SET `call_prefix` = 594 WHERE `iso_code` = 'GF' LIMIT 1; +UPDATE `PREFIX_country` SET `call_prefix` = 689 WHERE `iso_code` = 'PF' LIMIT 1; + +INSERT INTO `PREFIX_configuration` (`name`, `value`, `date_add`, `date_upd`) VALUES ('PS_CONDITIONS_CMS_ID', IFNULL((SELECT `id_cms` FROM `PREFIX_cms` WHERE `id_cms` = 3), 0), NOW(), NOW()); +CREATE TEMPORARY TABLE `PREFIX_configuration_tmp` ( + `value` text +); +INSERT INTO `PREFIX_configuration_tmp` (SELECT value FROM (SELECT `value` FROM `PREFIX_configuration` WHERE `name` = 'PREFIX_CONDITIONS_CMS_ID') AS tmp); + +UPDATE `PREFIX_configuration` SET `value` = IF((SELECT value FROM PREFIX_configuration_tmp), 1, 0) WHERE `name` = 'PREFIX_CONDITIONS'; +DROP TABLE PREFIX_configuration_tmp; + +INSERT INTO `PREFIX_configuration` (`name`, `value`, `date_add`, `date_upd`) VALUES ('PS_CIPHER_ALGORITHM', 0, NOW(), NOW()); +INSERT INTO `PREFIX_configuration` (`name`, `value`, `date_add`, `date_upd`) VALUES ('PS_ORDER_PROCESS_TYPE', 0, NOW(), NOW()); + +ALTER TABLE `PREFIX_product` ADD `minimal_quantity` INT NOT NULL DEFAULT '1' AFTER `quantity`; +ALTER TABLE `PREFIX_product` ADD `cache_default_attribute` int(10) unsigned default NULL AFTER `indexed`; +ALTER TABLE `PREFIX_product` ADD `cache_has_attachments` TINYINT(1) NOT NULL default '0' AFTER `indexed`; +ALTER TABLE `PREFIX_product` ADD `cache_is_pack` TINYINT(1) NOT NULL default '0' AFTER `indexed`; +ALTER TABLE `PREFIX_product` ADD `available_for_order` TINYINT(1) NOT NULL DEFAULT '1' AFTER `active`; +ALTER TABLE `PREFIX_product` ADD `show_price` TINYINT(1) NOT NULL DEFAULT '1' AFTER `available_for_order`; +ALTER TABLE `PREFIX_product` ADD `online_only` TINYINT(1) NOT NULL DEFAULT '0' AFTER `on_sale`; +ALTER TABLE `PREFIX_product` ADD `condition` ENUM('new', 'used', 'refurbished') NOT NULL DEFAULT 'new' AFTER `available_for_order`; +ALTER TABLE `PREFIX_product` ADD `upc` VARCHAR( 12 ) NULL AFTER `ean13`; + +ALTER TABLE `PREFIX_product_attribute` ADD `upc` VARCHAR( 12 ) NULL AFTER `ean13`; + +SET @defaultOOS = (SELECT value FROM `PREFIX_configuration` WHERE name = 'PS_ORDER_OUT_OF_STOCK'); +/* Set 0 for every non-attribute product */ +UPDATE `PREFIX_product` p SET `cache_default_attribute` = 0 WHERE `id_product` NOT IN (SELECT `id_product` FROM `PREFIX_product_attribute`); +/* First default attribute in stock */ +UPDATE `PREFIX_product` p SET `cache_default_attribute` = (SELECT `id_product_attribute` FROM `PREFIX_product_attribute` WHERE `id_product` = p.`id_product` AND default_on = 1 AND quantity > 0 LIMIT 1) WHERE `cache_default_attribute` IS NULL; +/* Then default attribute without stock if we don't care */ +UPDATE `PREFIX_product` p SET `cache_default_attribute` = (SELECT `id_product_attribute` FROM `PREFIX_product_attribute` WHERE `id_product` = p.`id_product` AND default_on = 1 LIMIT 1) WHERE `cache_default_attribute` IS NULL AND `out_of_stock` = 1 OR `out_of_stock` = IF(@defaultOOS = 1, 2, 1); +/* Next, the default attribute can be any attribute with stock */ +UPDATE `PREFIX_product` p SET `cache_default_attribute` = (SELECT `id_product_attribute` FROM `PREFIX_product_attribute` WHERE `id_product` = p.`id_product` AND quantity > 0 LIMIT 1) WHERE `cache_default_attribute` IS NULL; +/* If there is still no default attribute, then we go back to the default one */ +UPDATE `PREFIX_product` p SET `cache_default_attribute` = (SELECT `id_product_attribute` FROM `PREFIX_product_attribute` WHERE `id_product` = p.`id_product` AND default_on = 1 LIMIT 1) WHERE `cache_default_attribute` IS NULL; + +UPDATE `PREFIX_product` p SET +cache_is_pack = (SELECT IF(COUNT(*) > 0, 1, 0) FROM `PREFIX_pack` pp WHERE pp.`id_product_pack` = p.`id_product`), +cache_has_attachments = (SELECT IF(COUNT(*) > 0, 1, 0) FROM `PREFIX_product_attachment` pa WHERE pa.`id_product` = p.`id_product`); + +INSERT INTO `PREFIX_hook` (`name`, `title`, `description`, `position`) VALUES ('deleteProductAttribute', 'Product Attribute Deletion', NULL, 0); +INSERT INTO `PREFIX_hook` (`name` ,`title` ,`description` ,`position`) VALUES ('beforeCarrier', 'Before carrier list', 'This hook is display before the carrier list on Front office', 1); +INSERT INTO `PREFIX_hook` (`name`, `title`, `description`, `position`) VALUES ('orderDetailDisplayed', 'Order detail displayed', 'Displayed on order detail on front office', 1); + +INSERT INTO `PREFIX_hook_module` (`id_module`, `id_hook`, `position`) VALUES +((SELECT IFNULL((SELECT `id_module` FROM `PREFIX_module` WHERE `name` = 'mailalerts'), 0)), +(SELECT `id_hook` FROM `PREFIX_hook` WHERE `name` = 'deleteProductAttribute'), 1); + +DELETE FROM `PREFIX_hook_module` WHERE `id_module` = 0; + +ALTER TABLE `PREFIX_country` ADD `need_zip_code` TINYINT(1) NOT NULL DEFAULT '1'; +ALTER TABLE `PREFIX_country` ADD `zip_code_format` VARCHAR(12) NOT NULL DEFAULT ''; + +ALTER TABLE `PREFIX_product` ADD `unit_price` DECIMAL(20,6) NOT NULL DEFAULT '0.000000' AFTER `wholesale_price`; +ALTER TABLE `PREFIX_product` ADD `unity` VARCHAR(10) NOT NULL DEFAULT '0.000000' AFTER `unit_price` ; +ALTER TABLE `PREFIX_product_attribute` ADD `unit_price_impact`DECIMAL(17,2) NOT NULL DEFAULT '0.00' AFTER `weight`; + +INSERT INTO `PREFIX_configuration` (`name`, `value`, `date_add`, `date_upd`) VALUES ('PS_VOLUME_UNIT', 'cl', NOW(), NOW()); + +ALTER TABLE `PREFIX_carrier` ADD `shipping_external` TINYINT( 1 ) UNSIGNED NOT NULL; +ALTER TABLE `PREFIX_carrier` ADD `external_module_name` varchar(64) DEFAULT NULL; +ALTER TABLE `PREFIX_carrier` ADD `need_range` TINYINT( 1 ) UNSIGNED NOT NULL; + +INSERT INTO `PREFIX_hook` (`name`, `title`, `description`, `position`) VALUES ('processCarrier', 'Carrier Process', NULL, 0); +INSERT INTO `PREFIX_hook` (`name`, `title`, `description`, `position`) VALUES ('orderDetail', 'Order Detail', 'To set the follow-up in smarty when order detail is called', 0); +INSERT INTO `PREFIX_hook` (`name`, `title`, `description`, `position`) VALUES ('paymentCCAdded', 'Payment CC added', 'Payment CC added', '0'); +INSERT INTO `PREFIX_hook` (`name`, `title`, `description`, `position`) VALUES ('extraProductComparison', 'Extra Product Comparison', 'Extra Product Comparison', '0'); + +ALTER TABLE `PREFIX_address` ADD `vat_number` varchar(32) NULL DEFAULT NULL AFTER `phone_mobile`; +INSERT INTO `PREFIX_configuration` (`name`, `value`, `date_add`, `date_upd`) VALUES ('PS_TAX_ADDRESS_TYPE', 'id_address_delivery', NOW(), NOW()); + + +/* PHP:add_module_to_hook(blockpaymentlogo, header); */; +/* PHP:add_module_to_hook(blockpermanentlinks, header); */; +/* PHP:add_module_to_hook(blockviewed, header); */; +/* PHP:add_module_to_hook(blockcart, header); */; +/* PHP:add_module_to_hook(editorial, header); */; +/* PHP:add_module_to_hook(blockbestsellers, header); */; +/* PHP:add_module_to_hook(blockcategories, header); */; +/* PHP:add_module_to_hook(blockspecials, header); */; +/* PHP:add_module_to_hook(blockcurrencies, header); */; +/* PHP:add_module_to_hook(blocknewproducts, header); */; +/* PHP:add_module_to_hook(blockuserinfo, header); */; +/* PHP:migrate_block_info_to_cms_block(); */; +/* PHP:add_module_to_hook(blockcms, header); */; +/* PHP:add_module_to_hook(blocklanguages, header); */; +/* PHP:add_module_to_hook(blockmanufacturer, header); */; +/* PHP:add_module_to_hook(blockadvertising, header); */; +/* PHP:add_module_to_hook(blocktags, header); */; +/* PHP:add_module_to_hook(blockmyaccount, header); */; + +ALTER TABLE `PREFIX_product` ADD `additional_shipping_cost` DECIMAL(20,2) NOT NULL DEFAULT '0.000000' AFTER `unit_price`; + +ALTER TABLE `PREFIX_currency` ADD `active` TINYINT(1) NOT NULL DEFAULT '1'; +ALTER TABLE `PREFIX_tax` ADD `active` TINYINT(1) NOT NULL DEFAULT '1'; + +INSERT INTO `PREFIX_configuration` (`name`, `value`, `date_add`, `date_upd`) VALUES ('PS_ATTRIBUTE_CATEGORY_DISPLAY', 1, NOW(), NOW()); + +ALTER TABLE `PREFIX_discount` ADD `cart_display` TINYINT( 4 ) NOT NULL AFTER `active` , ADD `date_add` DATETIME NOT NULL AFTER `cart_display` , ADD `date_upd` DATETIME NOT NULL AFTER `date_add` ; + +ALTER TABLE `PREFIX_carrier` ADD `shipping_method` INT( 2 ) NOT NULL DEFAULT '0'; + +CREATE TABLE `PREFIX_stock_mvt` ( + `id_stock_mvt` int(11) unsigned NOT NULL AUTO_INCREMENT, + `id_product` int(11) unsigned DEFAULT NULL, + `id_product_attribute` int(11) unsigned DEFAULT NULL, + `id_order` int(11) unsigned DEFAULT NULL, + `id_stock_mvt_reason` int(11) unsigned NOT NULL, + `id_employee` int(11) unsigned NOT NULL, + `quantity` int(11) NOT NULL, + `date_add` datetime NOT NULL, + `date_upd` datetime NOT NULL, + PRIMARY KEY (`id_stock_mvt`), + KEY `id_order` (`id_order`), + KEY `id_product` (`id_product`), + KEY `id_product_attribute` (`id_product_attribute`), + KEY `id_stock_mvt_reason` (`id_stock_mvt_reason`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +CREATE TABLE `PREFIX_stock_mvt_reason` ( + `id_stock_mvt_reason` int(11) NOT NULL AUTO_INCREMENT, + `date_add` datetime NOT NULL, + `date_upd` datetime NOT NULL, + PRIMARY KEY (`id_stock_mvt_reason`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + + +ALTER TABLE `PREFIX_product` CHANGE `quantity` `quantity` INT( 10 ) NOT NULL DEFAULT '0'; +ALTER TABLE `PREFIX_product_attribute` CHANGE `quantity` `quantity` INT( 10 ) NOT NULL DEFAULT '0'; + +CREATE TABLE `PREFIX_stock_mvt_reason_lang` ( + `id_stock_mvt_reason` int(11) NOT NULL, + `id_lang` int(11) NOT NULL, + `name` varchar(255) CHARACTER SET utf8 NOT NULL, + PRIMARY KEY (`id_stock_mvt_reason`,`id_lang`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +INSERT INTO `PREFIX_stock_mvt_reason` (`id_stock_mvt_reason`, `date_add`, `date_upd`) VALUES +(1, NOW(), NOW()), (2, NOW(), NOW()), (3, NOW(), NOW()); + +INSERT INTO `PREFIX_stock_mvt_reason_lang` (`id_stock_mvt_reason`, `id_lang`, `name`) VALUES +(1, 1, 'Order'), +(1, 2, 'Commande'), +(2, 1, 'Missing Stock Movement'), +(2, 2, 'Mouvement de stock manquant'), +(3, 1, 'Restocking'), +(3, 2, 'Réassort'); + +INSERT INTO `PREFIX_configuration` (`name`, `value`, `date_add`, `date_upd`) VALUES ('PS_COMPARATOR_MAX_ITEM', 0, NOW(), NOW()); + +ALTER TABLE `PREFIX_meta_lang` ADD `url_rewrite` VARCHAR( 255 ) NOT NULL , ADD INDEX ( `url_rewrite` ); +INSERT INTO `PREFIX_meta` (`page`) VALUES ('address'); +INSERT INTO `PREFIX_meta_lang` (`id_lang`, `id_meta`, `title`, `url_rewrite`) VALUES +(1, (SELECT `id_meta` FROM `PREFIX_meta` WHERE `page` = 'address'), 'Address', 'address'), +(2, (SELECT `id_meta` FROM `PREFIX_meta` WHERE `page` = 'address'), 'Adresse', 'adresse'), +(3, (SELECT `id_meta` FROM `PREFIX_meta` WHERE `page` = 'address'), 'Dirección', 'direccion'); +INSERT INTO `PREFIX_meta` (`page`) VALUES ('addresses'); +INSERT INTO `PREFIX_meta_lang` (`id_lang`, `id_meta`, `title`, `url_rewrite`) VALUES +(1, (SELECT `id_meta` FROM `PREFIX_meta` WHERE `page` = 'addresses'), 'Addresses', 'addresses'), +(2, (SELECT `id_meta` FROM `PREFIX_meta` WHERE `page` = 'addresses'), 'Adresses', 'adresses'), +(3, (SELECT `id_meta` FROM `PREFIX_meta` WHERE `page` = 'addresses'), 'Direcciones', 'direcciones'); +INSERT INTO `PREFIX_meta` (`page`) VALUES ('authentication'); +INSERT INTO `PREFIX_meta_lang` (`id_lang`, `id_meta`, `title`, `url_rewrite`) VALUES +(1, (SELECT `id_meta` FROM `PREFIX_meta` WHERE `page` = 'authentication'), 'Authentication', 'authentication'), +(2, (SELECT `id_meta` FROM `PREFIX_meta` WHERE `page` = 'authentication'), 'Authentification', 'authentification'), +(3, (SELECT `id_meta` FROM `PREFIX_meta` WHERE `page` = 'authentication'), 'Autenticación', 'autenticacion'); +INSERT INTO `PREFIX_meta` (`page`) VALUES ('cart'); +INSERT INTO `PREFIX_meta_lang` (`id_lang`, `id_meta`, `title`, `url_rewrite`) VALUES +(1, (SELECT `id_meta` FROM `PREFIX_meta` WHERE `page` = 'cart'), 'Cart', 'cart'), +(2, (SELECT `id_meta` FROM `PREFIX_meta` WHERE `page` = 'cart'), 'Panier', 'panier'), +(3, (SELECT `id_meta` FROM `PREFIX_meta` WHERE `page` = 'cart'), 'Carro de la compra', 'carro-de-la-compra'); +INSERT INTO `PREFIX_meta` (`page`) VALUES ('discount'); +INSERT INTO `PREFIX_meta_lang` (`id_lang`, `id_meta`, `title`, `url_rewrite`) VALUES +(1, (SELECT `id_meta` FROM `PREFIX_meta` WHERE `page` = 'discount'), 'Discount', 'discount'), +(2, (SELECT `id_meta` FROM `PREFIX_meta` WHERE `page` = 'discount'), 'Bons de réduction', 'bons-de-reduction'), +(3, (SELECT `id_meta` FROM `PREFIX_meta` WHERE `page` = 'discount'), 'Descuento', 'descuento'); +INSERT INTO `PREFIX_meta` (`page`) VALUES ('history'); +INSERT INTO `PREFIX_meta_lang` (`id_lang`, `id_meta`, `title`, `url_rewrite`) VALUES +(1, (SELECT `id_meta` FROM `PREFIX_meta` WHERE `page` = 'history'), 'Order history', 'order-history'), +(2, (SELECT `id_meta` FROM `PREFIX_meta` WHERE `page` = 'history'), 'Historique des commandes', 'historique-des-commandes'), +(3, (SELECT `id_meta` FROM `PREFIX_meta` WHERE `page` = 'history'), 'Historial de pedidos', 'historial-de-pedidos'); +INSERT INTO `PREFIX_meta` (`page`) VALUES ('identity'); +INSERT INTO `PREFIX_meta_lang` (`id_lang`, `id_meta`, `title`, `url_rewrite`) VALUES +(1, (SELECT `id_meta` FROM `PREFIX_meta` WHERE `page` = 'identity'), 'Identity', 'identity'), +(2, (SELECT `id_meta` FROM `PREFIX_meta` WHERE `page` = 'identity'), 'Identité', 'identite'), +(3, (SELECT `id_meta` FROM `PREFIX_meta` WHERE `page` = 'identity'), 'Identidad', 'identidad'); +INSERT INTO `PREFIX_meta` (`page`) VALUES ('my-account'); +INSERT INTO `PREFIX_meta_lang` (`id_lang`, `id_meta`, `title`, `url_rewrite`) VALUES +(1, (SELECT `id_meta` FROM `PREFIX_meta` WHERE `page` = 'my-account'), 'My account', 'my-account'), +(2, (SELECT `id_meta` FROM `PREFIX_meta` WHERE `page` = 'my-account'), 'Mon compte', 'mon-compte'), +(3, (SELECT `id_meta` FROM `PREFIX_meta` WHERE `page` = 'my-account'), 'Mi Cuenta', 'mi-cuenta'); +INSERT INTO `PREFIX_meta` (`page`) VALUES ('order-follow'); +INSERT INTO `PREFIX_meta_lang` (`id_lang`, `id_meta`, `title`, `url_rewrite`) VALUES +(1, (SELECT `id_meta` FROM `PREFIX_meta` WHERE `page` = 'order-follow'), 'Order follow', 'order-follow'), +(2, (SELECT `id_meta` FROM `PREFIX_meta` WHERE `page` = 'order-follow'), 'Détails de la commande', 'details-de-la-commande'), +(3, (SELECT `id_meta` FROM `PREFIX_meta` WHERE `page` = 'order-follow'), 'Devolución de productos', 'devolucion-de-productos'); +INSERT INTO `PREFIX_meta` (`page`) VALUES ('order-slip'); +INSERT INTO `PREFIX_meta_lang` (`id_lang`, `id_meta`, `title`, `url_rewrite`) VALUES +(1, (SELECT `id_meta` FROM `PREFIX_meta` WHERE `page` = 'order-slip'), 'Order slip', 'order-slip'), +(2, (SELECT `id_meta` FROM `PREFIX_meta` WHERE `page` = 'order-slip'), 'Avoirs', 'avoirs'), +(3, (SELECT `id_meta` FROM `PREFIX_meta` WHERE `page` = 'order-slip'), 'Vales', 'vales'); +INSERT INTO `PREFIX_meta` (`page`) VALUES ('order'); +INSERT INTO `PREFIX_meta_lang` (`id_lang`, `id_meta`, `title`, `url_rewrite`) VALUES +(1, (SELECT `id_meta` FROM `PREFIX_meta` WHERE `page` = 'order'), 'Order', 'order'), +(2, (SELECT `id_meta` FROM `PREFIX_meta` WHERE `page` = 'order'), 'Commande', 'commande'), +(3, (SELECT `id_meta` FROM `PREFIX_meta` WHERE `page` = 'order'), 'Carrito', 'carrito'); +INSERT INTO `PREFIX_meta` (`page`) VALUES ('search'); +INSERT INTO `PREFIX_meta_lang` (`id_lang`, `id_meta`, `title`, `url_rewrite`) VALUES +(1, (SELECT `id_meta` FROM `PREFIX_meta` WHERE `page` = 'search' LIMIT 1), 'Search', 'search'), +(2, (SELECT `id_meta` FROM `PREFIX_meta` WHERE `page` = 'search' LIMIT 1), 'Recherche', 'recherche'), +(3, (SELECT `id_meta` FROM `PREFIX_meta` WHERE `page` = 'search' LIMIT 1), 'Buscar', 'buscar'); +INSERT INTO `PREFIX_meta` (`page`) VALUES ('stores'); +INSERT INTO `PREFIX_meta_lang` (`id_lang`, `id_meta`, `title`, `url_rewrite`) VALUES +(1, (SELECT `id_meta` FROM `PREFIX_meta` WHERE `page` = 'stores'), 'Stores', 'stores'), +(2, (SELECT `id_meta` FROM `PREFIX_meta` WHERE `page` = 'stores'), 'Magagins', 'magasins'), +(3, (SELECT `id_meta` FROM `PREFIX_meta` WHERE `page` = 'stores'), 'Tiendas', 'tiendas'); + +ALTER TABLE `PREFIX_manufacturer` ADD `active` tinyint(1) NOT NULL default 0; +ALTER TABLE `PREFIX_supplier` ADD `active` tinyint(1) NOT NULL default 0; +UPDATE `PREFIX_manufacturer` SET `active` = 1; +UPDATE `PREFIX_supplier` SET `active` = 1; +ALTER TABLE `PREFIX_cms` ADD `active` tinyint(1) unsigned NOT NULL default 0; +UPDATE `PREFIX_cms` SET `active` = 1; + +ALTER TABLE `PREFIX_cart` ADD `secure_key` varchar(32) NOT NULL default '-1' AFTER `id_guest`; + +ALTER TABLE `PREFIX_order_detail` ADD `product_upc` varchar(12) default NULL AFTER `product_ean13`; + +ALTER TABLE `PREFIX_discount` ADD `id_group` int(10) unsigned NOT NULL default 0; + +CREATE TABLE `PREFIX_store` ( + `id_store` int(10) unsigned NOT NULL AUTO_INCREMENT, + `id_country` int(10) unsigned NOT NULL, + `id_state` int(10) unsigned DEFAULT NULL, + `name` varchar(128) NOT NULL, + `address1` varchar(128) NOT NULL, + `address2` varchar(128) DEFAULT NULL, + `city` varchar(64) NOT NULL, + `postcode` varchar(12) NOT NULL, + `latitude` float(10,6) DEFAULT NULL, + `longitude` float(10,6) DEFAULT NULL, + `hours` varchar(254) DEFAULT NULL, + `phone` varchar(16) DEFAULT NULL, + `fax` varchar(16) DEFAULT NULL, + `email` varchar(128) DEFAULT NULL, + `note` text, + `active` tinyint(1) unsigned NOT NULL DEFAULT '0', + `date_add` datetime NOT NULL, + `date_upd` datetime NOT NULL, + PRIMARY KEY (`id_store`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +INSERT INTO `PREFIX_hook` (`name`, `title`, `description`, `position`) VALUES +('categoryAddition', '', 'Temporary hook. Must NEVER be used. Will soon be replaced by a generic CRUD hook system.', 0), +('categoryUpdate', '', 'Temporary hook. Must NEVER be used. Will soon be replaced by a generic CRUD hook system.', 0), +('categoryDeletion', '', 'Temporary hook. Must NEVER be used. Will soon be replaced by a generic CRUD hook system.', 0); + + +/* PHP:add_module_to_hook(blockcategories, categoryAddition); */; +/* PHP:add_module_to_hook(blockcategories, categoryUpdate); */; +/* PHP:add_module_to_hook(blockcategories, categoryDeletion); */; + +DELETE FROM `PREFIX_hook_module` WHERE `id_module` = 0; + +CREATE TABLE `PREFIX_required_field` ( + `id_required_field` int(11) NOT NULL AUTO_INCREMENT, + `object_name` varchar(32) NOT NULL, + `field_name` varchar(32) NOT NULL, + PRIMARY KEY (`id_required_field`), + KEY `object_name` (`object_name`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +CREATE TABLE `PREFIX_memcached_servers` ( +`id_memcached_server` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY , +`ip` VARCHAR( 254 ) NOT NULL , +`port` INT(11) UNSIGNED NOT NULL , +`weight` INT(11) UNSIGNED NOT NULL +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +CREATE TABLE `PREFIX_webservice_account` ( + `id_webservice_account` int(11) NOT NULL AUTO_INCREMENT, + `key` varchar(32) NOT NULL, + `active` tinyint(2) NOT NULL, + PRIMARY KEY (`id_webservice_account`), + KEY `key` (`key`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +CREATE TABLE `PREFIX_webservice_permission` ( + `id_webservice_permission` int(11) NOT NULL AUTO_INCREMENT, + `resource` varchar(50) NOT NULL, + `method` enum('GET','POST','PUT','DELETE') NOT NULL, + `id_webservice_account` int(11) NOT NULL, + PRIMARY KEY (`id_webservice_permission`), + UNIQUE KEY `resource_2` (`resource`,`method`,`id_webservice_account`), + KEY `resource` (`resource`), + KEY `method` (`method`), + KEY `id_webservice_account` (`id_webservice_account`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + + +/* PHP */ +/* PHP:editorial_update(); */; +/* PHP:reorderpositions(); */; +/* PHP:update_image_size_in_db(); */; +/* PHP:update_order_details(); */; +/* PHP:add_new_tab(AdminInformation, en:Configuration Information|fr:Informations|es:Informations|it:Informazioni di configurazione|de:Konfigurationsinformationen, 9); */; +/* PHP:add_new_tab(AdminCustomerThreads, en:Customer Service|de:Kundenservice|fr:SAV|es:Servicio al cliente|it:Servizio clienti, 29); */; +/* PHP:add_new_tab(AdminAddonsCatalog, fr:Catalogue de modules et thèmes|de:Module und Themenkatalog|en:Modules & Themes Catalog|it:Moduli & Temi catalogo, 7); */; +/* PHP:add_new_tab(AdminAddonsMyAccount, it:Il mio Account|de:Mein Konto|fr:Mon compte|en:My Account, 7); */; +/* PHP:add_new_tab(AdminPerformance, de:Leistung|en:Performance|it:Performance|fr:Performances|es:Rendimiento, 8); */; +/* PHP:add_new_tab(AdminThemes, es:Temas|it:Temi|de:Themen|en:Themes|fr:Thèmes, 7); */; +/* PHP:add_new_tab(AdminWebservice, fr:Service web|es:Web service|en:Webservice|de:Webservice|it:Webservice, 9); */; + diff --git a/install-new/upgrade/sql/1.4.0.3.sql b/install-new/upgrade/sql/1.4.0.3.sql new file mode 100644 index 000000000..1df6fd470 --- /dev/null +++ b/install-new/upgrade/sql/1.4.0.3.sql @@ -0,0 +1,67 @@ +SET NAMES 'utf8'; + +CREATE TABLE IF NOT EXISTS `PREFIX_country_tax` ( + `id_country_tax` int(11) NOT NULL AUTO_INCREMENT, + `id_country` int(11) NOT NULL, + `id_tax` int(11) NOT NULL, + PRIMARY KEY (`id_country_tax`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +CREATE TABLE IF NOT EXISTS `PREFIX_product_country_tax` ( + `id_product` int(11) NOT NULL, + `id_country` int(11) NOT NULL, + `id_tax` int(11) NOT NULL, + UNIQUE KEY `id_product` (`id_product`,`id_country`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +DELETE FROM `PREFIX_tab` WHERE `class_name` = 'AdminStatsModules' LIMIT 1; +DELETE FROM `PREFIX_tab_lang` WHERE `id_tab` NOT IN (SELECT id_tab FROM `PREFIX_tab`); +DELETE FROM `PREFIX_access` WHERE `id_tab` NOT IN (SELECT id_tab FROM `PREFIX_tab`); + +INSERT INTO `PREFIX_module` (`name`, `active`) VALUES ('statsforecast', 1); +INSERT INTO `PREFIX_hook_module` (`id_module`, `id_hook` , `position`) (SELECT id_module, 32, (SELECT max_position from (SELECT MAX(position)+1 as max_position FROM `PREFIX_hook_module` WHERE `id_hook` = 32) tmp) FROM `PREFIX_module` WHERE `name` = 'statsforecast'); + +INSERT INTO `PREFIX_configuration` (`name`, `value`, `date_add`, `date_upd`) VALUES +('PS_GEOLOCATION_ENABLED', '0', NOW(), NOW()), +('PS_ALLOWED_COUNTRIES', +'AF;ZA;AX;AL;DZ;DE;AD;AO;AI;AQ;AG;AN;SA;AR;AM;AW;AU;AT;AZ;BS;BH;BD;BB;BY;BE;BZ;BJ;BM;BT;BO;BA;BW;BV;BR;BN;BG;BF;MM;BI;KY;KH;CM;CA;CV;CF;CL;CN;CX;CY;CC;CO;KM;CG;CD;CK;KR;KP;CR;CI;HR;CU;DK;DJ;DM;EG;IE;SV;AE;EC;ER;ES;EE;ET;FK;FO;FJ;FI;FR;GA;GM;GE;GS;GH;GI;GR;GD;GL;GP;GU;GT;GG;GN;GQ;GW;GY;GF;HT;HM;HN;HK;HU;IM;MU;VG;VI;IN;ID;IR;IQ;IS;IL;IT;JM;JP;JE;JO;KZ;KE;KG;KI;KW;LA;LS;LV;LB;LR;LY;LI;LT;LU;MO;MK;MG;MY;MW;MV;ML;MT;MP;MA;MH;MQ;MR;YT;MX;FM;MD;MC;MN;ME;MS;MZ;NA;NR;NP;NI;NE;NG;NU;NF;NO;NC;NZ;IO;OM;UG;UZ;PK;PW;PS;PA;PG;PY;NL;PE;PH;PN;PL;PF;PR;PT;QA;DO;CZ;RE;RO;UK;RU;RW;EH;BL;KN;SM;MF;PM;VA;VC;LC;SB;WS;AS;ST;SN;RS;SC;SL;SG;SK;SI;SO;SD;LK;SE;CH;SR;SJ;SZ;SY;TJ;TW;TZ;TD;TF;TH;TL;TG;TK;TO;TT;TN;TM;TC;TR;TV;UA;UY;US;VU;VE;VN;WF;YE;ZM;ZW', NOW(), NOW()), +('PS_GEOLOCATION_BEHAVIOR', '0', NOW(), NOW()); + +ALTER TABLE `PREFIX_orders` ADD `conversion_rate` decimal(13,6) NOT NULL default 1 AFTER `payment`; +UPDATE `PREFIX_orders` o SET o.`conversion_rate` = IFNULL(( + SELECT c.`conversion_rate` + FROM `PREFIX_currency` c + WHERE c.`id_currency` = o.`id_currency` + LIMIT 1), 0 +); + +ALTER TABLE `PREFIX_order_slip` ADD `conversion_rate` decimal(13,6) NOT NULL default 1 AFTER `id_order`; +UPDATE `PREFIX_order_slip` os SET os.`conversion_rate` = IFNULL(( + SELECT o.`conversion_rate` + FROM `PREFIX_orders` o + WHERE os.`id_order` = o.`id_order` + LIMIT 1), 0 +); + +UPDATE `PREFIX_configuration` SET `value` = 'gridhtml' WHERE `name` = 'PS_STATS_GRID_RENDER' LIMIT 1; +UPDATE `PREFIX_module` SET `name` = 'gridhtml' WHERE `name` = 'gridextjs' LIMIT 1; + +ALTER TABLE `PREFIX_attachment` CHANGE `mime` `mime` varchar(64) NOT NULL; +ALTER TABLE `PREFIX_attachment` ADD `file_name` varchar(128) NOT NULL default '' AFTER `file`; +UPDATE `PREFIX_attachment` a SET `file_name` = ( + SELECT `name` FROM `PREFIX_attachment_lang` al WHERE al.`id_attachment` = a.`id_attachment` AND al.`id_lang` = ( + SELECT `value` FROM `PREFIX_configuration` WHERE `name` = 'PS_LANG_DEFAULT') + ); + +UPDATE `PREFIX_tab` SET `class_name` = 'AdminCMSContent' WHERE `class_name` = 'AdminCMS' LIMIT 1; + +SET @id_timezone = (SELECT `name` FROM `PREFIX_timezone` WHERE `id_timezone` = (SELECT `value` FROM `PREFIX_configuration` WHERE `name` = 'PS_TIMEZONE' LIMIT 1) LIMIT 1); +UPDATE `PREFIX_configuration` SET `value` = @id_timezone WHERE `name` = "PS_TIMEZONE" LIMIT 1; + +ALTER TABLE `PREFIX_country` ADD `id_currency` INT NOT NULL DEFAULT '0' AFTER `id_zone`; + +/* PHP */ +/* PHP:group_reduction_column_fix(); */; +/* PHP:ecotax_tax_application_fix(); */; +/* PHP:cms_block(); */; +/* PHP:add_new_tab(AdminGeolocation, es:Geolocalización|it:Geolocalizzazione|en:Geolocation|de:Geotargeting|fr:Géolocalisation, 8); */; diff --git a/install-new/upgrade/sql/1.4.0.4.sql b/install-new/upgrade/sql/1.4.0.4.sql new file mode 100644 index 000000000..4ad45113c --- /dev/null +++ b/install-new/upgrade/sql/1.4.0.4.sql @@ -0,0 +1,21 @@ +SET NAMES 'utf8'; +ALTER TABLE `PREFIX_product` CHANGE `ecotax` `ecotax` DECIMAL(21, 6) NOT NULL DEFAULT '0.00'; +/* PHP:move_crossselling(); */; + +UPDATE `PREFIX_cms` SET `id_cms_category` = 1; + +/* PHP:add_new_tab(AdminStores, fr:Magasins|es:Tiendas|en:Stores|de:Shops|it:Negozi, 9); */; + +INSERT IGNORE INTO `PREFIX_configuration` (`name`, `value`, `date_add`, `date_upd`) SELECT 'PS_LOCALE_LANGUAGE', l.`iso_code`, NOW(), NOW() FROM `PREFIX_configuration` c INNER JOIN `PREFIX_lang` l ON (l.`id_lang` = c.`value`) WHERE c.`name` = 'PS_LANG_DEFAULT'; +INSERT IGNORE INTO `PREFIX_configuration` (`name`, `value`, `date_add`, `date_upd`) SELECT 'PS_LOCALE_COUNTRY', co.`iso_code`, NOW(), NOW() FROM `PREFIX_configuration` c INNER JOIN `PREFIX_country` co ON (co.`id_country` = c.`value`) WHERE c.`name` = 'PS_COUNTRY_DEFAULT'; +/* PHP:reorderpositions(); */; + +ALTER TABLE `PREFIX_webservice_permission` CHANGE `method` `method` ENUM( 'GET', 'POST', 'PUT', 'DELETE', 'HEAD' ) NOT NULL; + +INSERT INTO `PREFIX_configuration` (`name`, `value`, `date_add`, `date_upd`) VALUES +('PS_ATTACHMENT_MAXIMUM_SIZE', '2', NOW(), NOW()), +('PS_SMARTY_CACHE', '1', NOW(), NOW()); + +ALTER TABLE `PREFIX_product_attribute` CHANGE `price` `price` decimal(20,6) NOT NULL default '0.000000'; +UPDATE `PREFIX_product_attribute` pa SET pa.`price` = pa.`price` / (1 + IFNULL((SELECT t.`rate` FROM `PREFIX_tax` t INNER JOIN `PREFIX_product` p ON (p.`id_tax` = t.`id_tax`) WHERE p.`id_product` = pa.`id_product`) ,0) / 100); + diff --git a/install-new/upgrade/sql/1.4.0.5.sql b/install-new/upgrade/sql/1.4.0.5.sql new file mode 100644 index 000000000..42a62d345 --- /dev/null +++ b/install-new/upgrade/sql/1.4.0.5.sql @@ -0,0 +1,73 @@ +SET NAMES 'utf8'; + +SET @alias = (SELECT IFNULL((SELECT `id_tab` FROM `PREFIX_tab` WHERE `class_name` = "AdminAliases" LIMIT 1), '0')); +UPDATE `PREFIX_tab` SET `id_parent` = 8 WHERE `id_tab` = @alias LIMIT 1; +SET @stores = (SELECT IFNULL((SELECT `id_tab` FROM `PREFIX_tab` WHERE `class_name` = "AdminStores" LIMIT 1), '0')); +UPDATE `PREFIX_tab` SET `id_parent` = 9 WHERE `id_tab` = @stores LIMIT 1; +SET @pdf = (SELECT IFNULL((SELECT `id_tab` FROM `PREFIX_tab` WHERE `class_name` = "AdminPDF" LIMIT 1), '0')); +UPDATE `PREFIX_tab` SET `id_parent` = 3 WHERE `id_tab` = @pdf LIMIT 1; +SET @tabs = (SELECT IFNULL((SELECT `id_tab` FROM `PREFIX_tab` WHERE `class_name` = "AdminTabs" LIMIT 1), '0')); +UPDATE `PREFIX_tab` SET `id_parent` = 29 WHERE `id_tab` = @tabs LIMIT 1; + +ALTER TABLE `PREFIX_image_type` ADD `stores` tinyint(1) NOT NULL default '1'; + +INSERT INTO `PREFIX_configuration` (`name`, `value`, `date_add`, `date_upd`) VALUES +('PS_FORCE_SMARTY_2', '0', NOW(), NOW()), +('PS_DIMENSION_UNIT', 'cm', NOW(), NOW()); + +ALTER TABLE `PREFIX_product` +ADD `width` FLOAT NOT NULL AFTER `location`, +ADD `height` FLOAT NOT NULL AFTER `width`, +ADD `depth` FLOAT NOT NULL AFTER `height`; + +SET @id_module = (SELECT IFNULL((SELECT `id_module` FROM `PREFIX_module` WHERE `name` = "statshome" LIMIT 1), '0')); +DELETE FROM `PREFIX_module` WHERE `id_module` = @id_module; +DELETE FROM `PREFIX_hook_module` WHERE `id_module` = @id_module; + +ALTER TABLE `PREFIX_customer` ADD `is_guest` TINYINT(1) NOT NULL DEFAULT '0' AFTER `deleted`; +INSERT INTO `PREFIX_configuration` (`name`, `value`, `date_add`, `date_upd`) VALUES ('PS_GUEST_CHECKOUT_ENABLED', '0', NOW(), NOW()); + +ALTER TABLE `PREFIX_category` ADD `nleft` INT UNSIGNED NOT NULL DEFAULT '0' AFTER `level_depth`; +ALTER TABLE `PREFIX_category` ADD `nright` INT UNSIGNED NOT NULL DEFAULT '0' AFTER `nleft`; +ALTER TABLE `PREFIX_category` ADD INDEX `nleftright` (`nleft`, `nright`); + +ALTER TABLE `PREFIX_product` ADD `id_tax_rules_group` int(10) unsigned NOT NULL AFTER `id_tax`; +ALTER TABLE `PREFIX_carrier` ADD `id_tax_rules_group` int(10) unsigned NOT NULL AFTER `id_tax`; +ALTER TABLE `PREFIX_carrier` ADD INDEX ( `id_tax_rules_group` ) ; + +CREATE TABLE `PREFIX_tax_rule` ( +`id_tax_rules_group` INT NOT NULL , +`id_country` INT NOT NULL , +`id_state` INT NOT NULL , +`id_tax` INT NOT NULL , +`state_behavior` INT NOT NULL , +PRIMARY KEY ( `id_tax_rules_group`, `id_country` , `id_state` ) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +CREATE TABLE `PREFIX_tax_rules_group` ( +`id_tax_rules_group` INT NOT NULL AUTO_INCREMENT PRIMARY KEY , +`name` VARCHAR( 32 ) NOT NULL , +`active` INT NOT NULL +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +CREATE TABLE IF NOT EXISTS `PREFIX_help_access` ( + `id_help_access` int(11) NOT NULL AUTO_INCREMENT, + `label` varchar(45) NOT NULL, + `version` varchar(8) NOT NULL, + PRIMARY KEY (`id_help_access`), + UNIQUE KEY `label` (`label`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +/* PHP:add_new_tab(AdminTaxRulesGroup, it:Regimi fiscali|es:Reglas de Impuestos|fr:Règles de taxes|de:Steuerregeln|en:Tax Rules, 4); */; +/* PHP:generate_ntree(); */; +/* PHP:generate_tax_rules(); */; +/* PHP:id_currency_country_fix(); */; +/* PHP:update_modules_sql(); */; + +ALTER TABLE `PREFIX_product` DROP `id_tax`; +ALTER TABLE `PREFIX_carrier` DROP `id_tax`; + +DROP TABLE `PREFIX_tax_state`, `PREFIX_tax_zone`, `PREFIX_country_tax`; +ALTER TABLE `PREFIX_orders` ADD `carrier_tax_rate` DECIMAL(10, 3) NOT NULL default '0.00' AFTER `total_shipping`; + +INSERT INTO `PREFIX_hook` (`id_hook`, `name`, `title`, `description`, `position`) VALUES (NULL, 'beforeAuthentication', 'Before Authentication', 'Before authentication', 0); diff --git a/install-new/upgrade/sql/1.4.0.6.sql b/install-new/upgrade/sql/1.4.0.6.sql new file mode 100644 index 000000000..f3b33b76d --- /dev/null +++ b/install-new/upgrade/sql/1.4.0.6.sql @@ -0,0 +1,12 @@ +SET NAMES 'utf8'; + +ALTER TABLE `PREFIX_customer` DROP INDEX `customer_email`; +ALTER TABLE `PREFIX_customer` ADD INDEX `customer_email` (`email`); + +ALTER TABLE `PREFIX_lang` ADD `language_code` char(5) NULL AFTER `iso_code`; +UPDATE `PREFIX_lang` SET language_code = iso_code; +ALTER TABLE `PREFIX_lang` MODIFY `language_code` char(5) NOT NULL; + +DELETE FROM `PREFIX_module` WHERE `name` = 'gridextjs' LIMIT 1; +DELETE FROM `PREFIX_hook_module` WHERE `id_module` NOT IN (SELECT id_module FROM `PREFIX_module`); +UPDATE `PREFIX_configuration` SET `value` = 'gridhtml' WHERE `name` = 'PS_STATS_GRID_RENDER' AND `value` = 'gridextjs' LIMIT 1; diff --git a/install-new/upgrade/sql/1.4.0.7.sql b/install-new/upgrade/sql/1.4.0.7.sql new file mode 100644 index 000000000..1edfbdac1 --- /dev/null +++ b/install-new/upgrade/sql/1.4.0.7.sql @@ -0,0 +1,10 @@ +SET NAMES 'utf8'; + +ALTER TABLE `PREFIX_product_attribute` ADD `minimal_quantity` int(10) unsigned NOT NULL DEFAULT '1' AFTER `default_on`; + +ALTER TABLE `PREFIX_orders` ADD `reference` VARCHAR(14) NOT NULL AFTER `id_address_invoice`; + +INSERT INTO `PREFIX_configuration` (`name`, `value`, `date_add`, `date_upd`) VALUES('PS_DISPLAY_SUPPLIERS', '1', NOW(), NOW()); + +/* PHP:update_products_ecotax_v133(); */; + diff --git a/install-new/upgrade/sql/1.4.0.8.sql b/install-new/upgrade/sql/1.4.0.8.sql new file mode 100644 index 000000000..da0a17fcf --- /dev/null +++ b/install-new/upgrade/sql/1.4.0.8.sql @@ -0,0 +1,35 @@ +SET NAMES 'utf8'; + +CREATE TEMPORARY TABLE `PREFIX_tab_tmp1` ( + `id_parent` int(11) +); +INSERT INTO `PREFIX_tab_tmp1` (SELECT * FROM (SELECT `id_parent` FROM `PREFIX_tab` WHERE `class_name` = 'AdminTaxes') AS tmp); + +CREATE TEMPORARY TABLE `PREFIX_tab_tmp2` ( + `position` int(10) +); + +INSERT INTO `PREFIX_tab_tmp2` (SELECT * FROM (SELECT `position` FROM `PREFIX_tab` WHERE `class_name` = 'AdminTaxes') AS tmp2); + +UPDATE `PREFIX_tab` SET `position` = `position` + 1 WHERE `id_parent` = (SELECT id_parent FROM PREFIX_tab_tmp1 AS tmp) AND `position` > (SELECT position FROM PREFIX_tab_tmp2 AS tmp2); +DROP TABLE PREFIX_tab_tmp1; +DROP TABLE PREFIX_tab_tmp2; + +CREATE TEMPORARY TABLE `PREFIX_tab_tmp` ( + `position` int(10) +); + +INSERT INTO `PREFIX_tab_tmp` (SELECT * FROM (SELECT `position` FROM `PREFIX_tab` WHERE `class_name` = 'AdminTaxes') AS tmp); +UPDATE `PREFIX_tab` SET `position` = (SELECT position FROM PREFIX_tab_tmp tmp) + 1 WHERE `class_name` = 'AdminTaxRulesGroup'; +DROP TABLE PREFIX_tab_tmp; + +UPDATE `PREFIX_hook` SET `title` = 'Category creation', description = '' WHERE `name` = 'categoryAddition' LIMIT 1; +UPDATE `PREFIX_hook` SET `title` = 'Category modification', description = '' WHERE `name` = 'categoryUpdate' LIMIT 1; +UPDATE `PREFIX_hook` SET `title` = 'Category removal', description = '' WHERE `name` = 'categoryDeletion' LIMIT 1; + +DELETE FROM `PREFIX_module` WHERE `name` = 'canonicalurl' LIMIT 1; +DELETE FROM `PREFIX_hook_module` WHERE `id_module` NOT IN (SELECT id_module FROM `PREFIX_module`); + +/* PHP:gridextjs_deprecated(); */; +/* PHP:shop_url(); */; +/* PHP:updateproductcomments(); */; \ No newline at end of file diff --git a/install-new/upgrade/sql/1.4.0.9.sql b/install-new/upgrade/sql/1.4.0.9.sql new file mode 100644 index 000000000..a975b0927 --- /dev/null +++ b/install-new/upgrade/sql/1.4.0.9.sql @@ -0,0 +1,16 @@ +SET NAMES 'utf8'; + +CREATE TABLE `PREFIX_specific_price_priority` ( +`id_specific_price_priority` INT NOT NULL AUTO_INCREMENT , +`id_product` INT NOT NULL , +`priority` VARCHAR( 80 ) NOT NULL , +PRIMARY KEY ( `id_specific_price_priority` , `id_product` ) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +ALTER TABLE `PREFIX_product` ADD `unit_price_ratio` DECIMAL(20, 6) NOT NULL default '0.00' AFTER `unit_price`; + +UPDATE `PREFIX_product` SET `unit_price_ratio` = IF (`unit_price` != 0, `price` / `unit_price`, 0); + +ALTER TABLE `PREFIX_product` DROP `unit_price`; + +ALTER TABLE `PREFIX_discount` ADD `behavior_not_exhausted` TINYINT(3) DEFAULT '1' AFTER `id_discount_type`; diff --git a/install-new/upgrade/sql/1.4.1.0.sql b/install-new/upgrade/sql/1.4.1.0.sql new file mode 100644 index 000000000..fb914c24a --- /dev/null +++ b/install-new/upgrade/sql/1.4.1.0.sql @@ -0,0 +1,43 @@ +SET NAMES 'utf8'; + +INSERT INTO `PREFIX_hook` (`name`, `title`, `description`, `position`, `live_edit`) VALUES ('afterSaveAdminMeta', 'After save configuration in AdminMeta', 'After save configuration in AdminMeta', 0, 0); + +ALTER TABLE `PREFIX_webservice_account` ADD `is_module` TINYINT( 2 ) NOT NULL DEFAULT '0' AFTER `class_name` , +ADD `module_name` VARCHAR( 50 ) NULL DEFAULT NULL AFTER `is_module`; + +INSERT INTO `PREFIX_configuration` (`name`, `value`, `date_add`, `date_upd`) VALUES +('PS_IMG_UPDATE_TIME', UNIX_TIMESTAMP(), NOW(), NOW()); + +UPDATE `PREFIX_cms_lang` set link_rewrite = "uber-uns" where link_rewrite like "%ber-uns"; + +ALTER TABLE `PREFIX_connections` CHANGE `ip_address` `ip_address` BIGINT NULL DEFAULT NULL; + + +UPDATE `PREFIX_meta_lang` +SET `title` = 'Angebote', `keywords` = 'besonders, Angebote', `url_rewrite` = 'angebote' WHERE url_rewrite = 'preise-fallen'; + +ALTER TABLE `PREFIX_country` ADD `display_tax_label` BOOLEAN NOT NULL DEFAULT '1'; +DROP TABLE IF EXISTS `PREFIX_country_tax`; + +ALTER TABLE `PREFIX_order_detail` +CHANGE `product_quantity_in_stock` `product_quantity_in_stock` INT(10) NOT NULL DEFAULT '0'; + +CREATE TABLE `PREFIX_address_format` ( + `id_country` int(10) unsigned NOT NULL, + `format` varchar(255) NOT NULL DEFAULT '', + KEY `country` (`id_country`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +INSERT INTO `PREFIX_address_format` (`id_country`, `format`) +(SELECT `id_country` as id_country, 'firstname lastname\ncompany\nvat_number\naddress1\naddress2\npostcode city\ncountry\nphone' as format FROM PREFIX_country); + +UPDATE `PREFIX_address_format` set `format`='firstname lastname +company +address1 +address2 +city State:name postcode +country +phone' where `id_country`=21; + +/* PHP:alter_cms_block(); */; +/* PHP:add_module_to_hook(blockcategories, afterSaveAdminMeta); */; diff --git a/install-new/upgrade/sql/1.4.2.0.sql b/install-new/upgrade/sql/1.4.2.0.sql new file mode 100644 index 000000000..b4920b207 --- /dev/null +++ b/install-new/upgrade/sql/1.4.2.0.sql @@ -0,0 +1,20 @@ +SET NAMES 'utf8'; + +ALTER TABLE `PREFIX_tab_lang` MODIFY `id_lang` int(10) unsigned NOT NULL AFTER `id_tab`; +ALTER TABLE `PREFIX_carrier` ADD `is_free` tinyint(1) unsigned NOT NULL DEFAULT '0' AFTER `is_module`; + +UPDATE `PREFIX_address_format` SET `format`=REPLACE(REPLACE(`format`, 'state_iso', 'State:name'), 'country', 'Country:name'); + +ALTER TABLE `PREFIX_orders` ADD INDEX `date_add`(`date_add`); + +/* PHP:update_module_followup(); */; + +INSERT IGNORE INTO `PREFIX_configuration` (`name`, `value`, `date_add`, `date_upd`) VALUES +('PS_STOCK_MVT_REASON_DEFAULT', 3, NOW(), NOW()); + +/* PHP:add_order_state(PS_OS_WS_PAYMENT, en:Payment remotely accepted|fr:Paiement à distance accepté, 1, 0, #DDEEFF, 1, 1, 0); */; +/* PHP:alter_blocklink(); */; +/* PHP:update_module_loyalty(); */; +/* PHP:remove_module_from_hook(blockcategories, afterCreateHtaccess); */; +/* PHP:updatetabicon_from_11version(); */; + diff --git a/install-new/upgrade/sql/1.4.2.1.sql b/install-new/upgrade/sql/1.4.2.1.sql new file mode 100644 index 000000000..bb1503351 --- /dev/null +++ b/install-new/upgrade/sql/1.4.2.1.sql @@ -0,0 +1,3 @@ +SET NAMES 'utf8'; + +DELETE FROM `PREFIX_configuration_lang` WHERE 1 AND `value` is NULL AND `date_upd` is NULL; diff --git a/install-new/upgrade/sql/1.4.2.2.sql b/install-new/upgrade/sql/1.4.2.2.sql new file mode 100644 index 000000000..35f908ba5 --- /dev/null +++ b/install-new/upgrade/sql/1.4.2.2.sql @@ -0,0 +1,11 @@ +SET NAMES 'utf8'; + +UPDATE `PREFIX_country` SET `display_tax_label` = '1' WHERE `id_country` = 21; + +/* PHP:check_webservice_account_table(); */; +/* PHP:add_module_to_hook(blockcms, leftColumn); */; +/* PHP:add_module_to_hook(blockcms, rightColumn); */; +/* PHP:add_module_to_hook(blockcms, footer); */; + +UPDATE `PREFIX_cart` ca SET `secure_key` = IFNULL((SELECT `secure_key` from `PREFIX_customer` `cu` WHERE `cu`.`id_customer` = `ca`.`id_customer`), -1) WHERE `ca`.`secure_key` = -1; + diff --git a/install-new/upgrade/sql/1.4.2.3.sql b/install-new/upgrade/sql/1.4.2.3.sql new file mode 100644 index 000000000..6022be885 --- /dev/null +++ b/install-new/upgrade/sql/1.4.2.3.sql @@ -0,0 +1,30 @@ +SET NAMES 'utf8'; + +UPDATE `PREFIX_address_format` SET `format`=REPLACE(`format`, 'state', 'State:name'); + +SET @defaultOOS = (SELECT value FROM `PREFIX_configuration` WHERE name = 'PS_ORDER_OUT_OF_STOCK'); +/* Set 0 for every non-attribute product */ +UPDATE `PREFIX_product` p SET `cache_default_attribute` = 0 WHERE `id_product` NOT IN (SELECT `id_product` FROM `PREFIX_product_attribute`); +/* First default attribute in stock */ +UPDATE `PREFIX_product` p SET `cache_default_attribute` = (SELECT `id_product_attribute` FROM `PREFIX_product_attribute` WHERE `id_product` = p.`id_product` AND default_on = 1 AND quantity > 0 LIMIT 1) WHERE `cache_default_attribute` IS NULL; +/* Then default attribute without stock if we don't care */ +UPDATE `PREFIX_product` p SET `cache_default_attribute` = (SELECT `id_product_attribute` FROM `PREFIX_product_attribute` WHERE `id_product` = p.`id_product` AND default_on = 1 LIMIT 1) WHERE `cache_default_attribute` IS NULL AND `out_of_stock` = 1 OR `out_of_stock` = IF(@defaultOOS = 1, 2, 1); +/* Next, the default attribute can be any attribute with stock */ +UPDATE `PREFIX_product` p SET `cache_default_attribute` = (SELECT `id_product_attribute` FROM `PREFIX_product_attribute` WHERE `id_product` = p.`id_product` AND quantity > 0 LIMIT 1) WHERE `cache_default_attribute` IS NULL; +/* If there is still no default attribute, then we go back to the default one */ +UPDATE `PREFIX_product` p SET `cache_default_attribute` = (SELECT `id_product_attribute` FROM `PREFIX_product_attribute` WHERE `id_product` = p.`id_product` AND default_on = 1 LIMIT 1) WHERE `cache_default_attribute` IS NULL; + +UPDATE `PREFIX_order_state_lang` SET `name` = 'Zahlung eingegangen' WHERE `PREFIX_order_state_lang`.`id_order_state` =2 AND `PREFIX_order_state_lang`.`id_lang` = (SELECT id_lang FROM `PREFIX_lang` WHERE `iso_code` = 'de'); +UPDATE `PREFIX_order_state_lang` SET `name` = 'Bestellung eingegangen' WHERE `PREFIX_order_state_lang`.`id_order_state` =3 AND `PREFIX_order_state_lang`.`id_lang` = (SELECT id_lang FROM `PREFIX_lang` WHERE `iso_code` = 'de'); +UPDATE `PREFIX_order_state_lang` SET `name` = 'Versendet' WHERE `PREFIX_order_state_lang`.`id_order_state` =4 AND `PREFIX_order_state_lang`.`id_lang` = (SELECT id_lang FROM `PREFIX_lang` WHERE `iso_code` = 'de'); +UPDATE `PREFIX_order_state_lang` SET `name` = 'Erfolgreich abgeschlossen' WHERE `PREFIX_order_state_lang`.`id_order_state` =5 AND `PREFIX_order_state_lang`.`id_lang` = (SELECT id_lang FROM `PREFIX_lang` WHERE `iso_code` = 'de'); +UPDATE `PREFIX_order_state_lang` SET `name` = 'Storniert' WHERE `PREFIX_order_state_lang`.`id_order_state` =6 AND `PREFIX_order_state_lang`.`id_lang` = (SELECT id_lang FROM `PREFIX_lang` WHERE `iso_code` = 'de'); +UPDATE `PREFIX_order_state_lang` SET `name` = 'Fehler bei der Bezahlung' WHERE `PREFIX_order_state_lang`.`id_order_state` =8 AND `PREFIX_order_state_lang`.`id_lang` = (SELECT id_lang FROM `PREFIX_lang` WHERE `iso_code` = 'de'); +UPDATE `PREFIX_order_state_lang` SET `name` = 'Artikel erwartet' WHERE `PREFIX_order_state_lang`.`id_order_state` =9 AND `PREFIX_order_state_lang`.`id_lang` = (SELECT id_lang FROM `PREFIX_lang` WHERE `iso_code` = 'de'); +UPDATE `PREFIX_order_state_lang` SET `name` = 'Warten auf Zahlungseingang' WHERE `PREFIX_order_state_lang`.`id_order_state` =10 AND `PREFIX_order_state_lang`.`id_lang` = (SELECT id_lang FROM `PREFIX_lang` WHERE `iso_code` = 'de'); +UPDATE `PREFIX_order_state_lang` SET `name` = 'Warten auf Zahlungseingang von PayPal' WHERE `PREFIX_order_state_lang`.`id_order_state` =11 AND `PREFIX_order_state_lang`.`id_lang` = (SELECT id_lang FROM `PREFIX_lang` WHERE `iso_code` = 'de'); +UPDATE `PREFIX_order_state_lang` SET `name` = 'PayPal Anmeldung erfolgreich' WHERE `PREFIX_order_state_lang`.`id_order_state` =12 AND `PREFIX_order_state_lang`.`id_lang` = (SELECT id_lang FROM `PREFIX_lang` WHERE `iso_code` = 'de'); + +UPDATE `PREFIX_meta_lang` SET `url_rewrite` = 'identita' WHERE `url_rewrite` = 'Identità'; + +/* PHP:add_missing_rewrite_value(); */; diff --git a/install-new/upgrade/sql/1.4.2.4.sql b/install-new/upgrade/sql/1.4.2.4.sql new file mode 100644 index 000000000..1d5c1fd1c --- /dev/null +++ b/install-new/upgrade/sql/1.4.2.4.sql @@ -0,0 +1,10 @@ +SET NAMES 'utf8'; + +INSERT IGNORE INTO `PREFIX_configuration` (`name`, `value`, `date_add`, `date_upd`) VALUES ('PS_BACKUP_DROP_TABLE', 1, NOW(), NOW()); + +UPDATE `PREFIX_tab_lang` SET `name` = 'SEO & URLs' WHERE `id_tab` = (SELECT `id_tab` FROM `PREFIX_tab` WHERE `class_name` = 'AdminMeta' LIMIT 1) AND `id_lang` IN (SELECT `id_lang` FROM `PREFIX_lang` WHERE `iso_code` IN ('en','fr','es','de','it')); + +/* These 3 lines (remove_duplicate, drop index, add unique) MUST stay together in this order */ +/* PHP:remove_duplicate_category_groups(); */; +ALTER TABLE `PREFIX_category_group` DROP INDEX `category_group_index`; +ALTER TABLE `PREFIX_category_group` ADD UNIQUE `category_group_index` (`id_category`,`id_group`); \ No newline at end of file diff --git a/install-new/upgrade/sql/1.4.2.5.sql b/install-new/upgrade/sql/1.4.2.5.sql new file mode 100644 index 000000000..a5787c654 --- /dev/null +++ b/install-new/upgrade/sql/1.4.2.5.sql @@ -0,0 +1,4 @@ +SET NAMES 'utf8'; + +/* Fix wrong category level_depth caused by bug in 1.4.0.13 upgrade script */ +/* PHP:regenerate_level_depth(); */; \ No newline at end of file diff --git a/install-new/upgrade/sql/1.4.3.0.sql b/install-new/upgrade/sql/1.4.3.0.sql new file mode 100644 index 000000000..e5be50568 --- /dev/null +++ b/install-new/upgrade/sql/1.4.3.0.sql @@ -0,0 +1,16 @@ +SET NAMES 'utf8'; + +UPDATE `PREFIX_address_format` SET `format`='firstname lastname +company +address1 +address2 +city +State:name +postcode +Country:name' +WHERE `id_country` = (SELECT `id_country` FROM `PREFIX_country` WHERE `iso_code`='GB'); + +UPDATE `PREFIX_country` SET `contains_states` = 1 WHERE `id_country` = 145; + +INSERT INTO `PREFIX_configuration` (`name`, `value`, `date_add`, `date_upd`) VALUES +('PS_LEGACY_IMAGES', '1', NOW(), NOW()); \ No newline at end of file diff --git a/install-new/upgrade/sql/1.4.4.0.sql b/install-new/upgrade/sql/1.4.4.0.sql new file mode 100644 index 000000000..1c632dd83 --- /dev/null +++ b/install-new/upgrade/sql/1.4.4.0.sql @@ -0,0 +1,79 @@ +SET NAMES 'utf8'; + +ALTER TABLE `PREFIX_image` MODIFY COLUMN `position` SMALLINT(2) UNSIGNED NOT NULL DEFAULT 0; + +INSERT IGNORE INTO `PREFIX_configuration` (`name`, `value`, `date_add`, `date_upd`) VALUES +('PS_OS_CHEQUE', '1', NOW(), NOW()), +('PS_OS_PAYMENT', '2', NOW(), NOW()), +('PS_OS_PREPARATION', '3', NOW(), NOW()), +('PS_OS_SHIPPING', '4', NOW(), NOW()), +('PS_OS_DELIVERED', '5', NOW(), NOW()), +('PS_OS_CANCELED', '6', NOW(), NOW()), +('PS_OS_REFUND', '7', NOW(), NOW()), +('PS_OS_ERROR', '8', NOW(), NOW()), +('PS_OS_OUTOFSTOCK', '9', NOW(), NOW()), +('PS_OS_BANKWIRE', '10', NOW(), NOW()), +('PS_OS_PAYPAL', '11', NOW(), NOW()), +('PS_OS_WS_PAYMENT', '12', NOW(), NOW()), +('PS_IMAGE_QUALITY', 'jpg', NOW(), NOW()), +('PS_PNG_QUALITY', '7', NOW(), NOW()), +('PS_JPEG_QUALITY', '90', NOW(), NOW()), +('PS_COOKIE_LIFETIME_FO', '480', NOW(), NOW()), +('PS_COOKIE_LIFETIME_BO', '480', NOW(), NOW()); + +ALTER TABLE `PREFIX_lang` ADD `is_rtl` TINYINT(1) NOT NULL DEFAULT '0'; + +UPDATE `PREFIX_country_lang` +SET `name` = 'United States' +WHERE `name` = 'USA' +AND `id_lang` = ( + SELECT `id_lang` + FROM `PREFIX_lang` + WHERE `iso_code` = 'en' + LIMIT 1 +); + +UPDATE `PREFIX_hook` +SET `live_edit` = 1 +WHERE `name` = 'leftColumn' +OR `name` = 'home' +OR `name` = 'rightColumn' +OR `name` = 'productfooter' +OR `name` = 'payment'; + +ALTER TABLE `PREFIX_stock_mvt_reason` MODIFY `sign` TINYINT(1) NOT NULL DEFAULT '1' AFTER `id_stock_mvt_reason`; + +UPDATE `PREFIX_tab_lang` +SET `name` = 'Geolocation' +WHERE `name` = 'Geolocalization'; + +UPDATE `PREFIX_tab_lang` +SET `name` = 'Counties' +WHERE `name` = 'County'; + +ALTER TABLE `PREFIX_tax_rule` MODIFY `id_county` INT NOT NULL AFTER `id_country`; + +UPDATE `PREFIX_address_format` set `format`='firstname lastname +company +address1 address2 +city, State:name postcode +Country:name +phone' +WHERE `id_country` = (SELECT `id_country` FROM `PREFIX_country` WHERE `iso_code`='US'); + +ALTER TABLE `PREFIX_attachment` CHANGE `mime` `mime` VARCHAR(128) NOT NULL; + +CREATE TABLE IF NOT EXISTS `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; + +DELETE FROM `PREFIX_configuration` WHERE name = 'PS_LAYERED_NAVIGATION_CHECKBOXES' LIMIT 1; + +/* PHP:alter_productcomments_guest_index(); */; + diff --git a/install-new/upgrade/sql/1.4.4.1.sql b/install-new/upgrade/sql/1.4.4.1.sql new file mode 100644 index 000000000..0b4cf1b2f --- /dev/null +++ b/install-new/upgrade/sql/1.4.4.1.sql @@ -0,0 +1 @@ +SET NAMES 'utf8'; diff --git a/install-new/upgrade/sql/1.4.5.0.sql b/install-new/upgrade/sql/1.4.5.0.sql new file mode 100644 index 000000000..f5d05001a --- /dev/null +++ b/install-new/upgrade/sql/1.4.5.0.sql @@ -0,0 +1,55 @@ +SET NAMES 'utf8'; + +INSERT IGNORE INTO `PREFIX_configuration` (`name`, `value`, `date_add`, `date_upd`) VALUES +('PS_RESTRICT_DELIVERED_COUNTRIES', '0', NOW(), NOW()); + +UPDATE `PREFIX_country_lang` SET `name` = 'United States' WHERE `name` = 'United State'; + +ALTER TABLE `PREFIX_discount` ADD `include_tax` TINYINT(1) NOT NULL DEFAULT '0'; + +UPDATE `PREFIX_order_detail` SET `product_price` = `product_price` /( 1-(`group_reduction`/100)); + +DELETE FROM `PREFIX_configuration` WHERE name IN ('PS_LAYERED_BITLY_USERNAME', 'PS_LAYERED_BITLY_API_KEY', 'PS_LAYERED_SHARE') LIMIT 3; + +ALTER TABLE `PREFIX_delivery` CHANGE `price` `price` DECIMAL(20, 6) NOT NULL; + +ALTER TABLE `PREFIX_store` CHANGE `latitude` `latitude` DECIMAL(10, 8) NULL DEFAULT NULL; +ALTER TABLE `PREFIX_store` CHANGE `longitude` `longitude` DECIMAL(10, 8) NULL DEFAULT NULL; + +INSERT INTO `PREFIX_hook` (`name`, `title`, `description`, `position`, `live_edit`) VALUES +('attributeGroupForm', 'Add fields to the form "attribute group"', 'Add fields to the form "attribute group"', 0, 0), +('afterSaveAttributeGroup', 'On saving attribute group', 'On saving attribute group', 0, 0), +('afterDeleteAttributeGroup', 'On deleting attribute group', 'On deleting "attribute group', 0, 0), +('featureForm', 'Add fields to the form "feature"', 'Add fields to the form "feature"', 0, 0), +('afterSaveFeature', 'On saving attribute feature', 'On saving attribute feature', 0, 0), +('afterDeleteFeature', 'On deleting attribute feature', 'On deleting attribute feature', 0, 0), +('afterSaveProduct', 'On saving products', 'On saving products', 0, 0), +('productListAssign', 'Assign product list to a category', 'Assign product list to a category', 0, 0), +('postProcessAttributeGroup', 'On post-process in admin attribute group', 'On post-process in admin attribute group', 0, 0), +('postProcessFeature', 'On post-process in admin feature', 'On post-process in admin feature', 0, 0), +('featureValueForm', 'Add fields to the form "feature value"', 'Add fields to the form "feature value"', 0, 0), +('postProcessFeatureValue', 'On post-process in admin feature value', 'On post-process in admin feature value', 0, 0), +('afterDeleteFeatureValue', 'On deleting attribute feature value', 'On deleting attribute feature value', 0, 0), +('afterSaveFeatureValue', 'On saving attribute feature value', 'On saving attribute feature value', 0, 0), +('attributeForm', 'Add fields to the form "feature value"', 'Add fields to the form "feature value"', 0, 0), +('postProcessAttribute', 'On post-process in admin feature value', 'On post-process in admin feature value', 0, 0), +('afterDeleteAttribute', 'On deleting attribute feature value', 'On deleting attribute feature value', 0, 0), +('afterSaveAttribute', 'On saving attribute feature value', 'On saving attribute feature value', 0, 0); + +ALTER TABLE `PREFIX_employee` ADD `bo_show_screencast` TINYINT(1) NOT NULL DEFAULT '1' AFTER `bo_uimode`; + +UPDATE `PREFIX_country` SET id_zone = (SELECT id_zone FROM `PREFIX_zone` WHERE name = 'Oceania' LIMIT 1) WHERE iso_code = 'KI' LIMIT 1; + +ALTER TABLE `PREFIX_lang` ADD `date_format_lite` char(32) NOT NULL DEFAULT 'Y-m-d' AFTER language_code; +ALTER TABLE `PREFIX_lang` ADD `date_format_full` char(32) NOT NULL DEFAULT 'Y-m-d H:i:s' AFTER date_format_lite; +UPDATE `PREFIX_lang` SET `date_format_lite` = 'd/m/Y' WHERE `iso_code` IN ('fr', 'es', 'it'); +UPDATE `PREFIX_lang` SET `date_format_full` = 'd/m/Y H:i:s' WHERE `iso_code` IN ('fr', 'es', 'it'); +UPDATE `PREFIX_lang` SET `date_format_lite` = 'd.m.Y' WHERE `iso_code` = 'de'; +UPDATE `PREFIX_lang` SET `date_format_full` = 'd.m.Y H:i:s' WHERE `iso_code` = 'de'; +UPDATE `PREFIX_lang` SET `date_format_lite` = 'm/d/Y' WHERE `iso_code` = 'en'; +UPDATE `PREFIX_lang` SET `date_format_full` = 'm/d/Y H:i:s' WHERE `iso_code` = 'en'; + +ALTER IGNORE TABLE `PREFIX_specific_price_priority` ADD UNIQUE ( +`id_product` +); + diff --git a/install-new/upgrade/sql/1.4.5.1.sql b/install-new/upgrade/sql/1.4.5.1.sql new file mode 100644 index 000000000..0b4cf1b2f --- /dev/null +++ b/install-new/upgrade/sql/1.4.5.1.sql @@ -0,0 +1 @@ +SET NAMES 'utf8'; diff --git a/install-new/upgrade/sql/1.5.0.0.sql b/install-new/upgrade/sql/1.5.0.0.sql new file mode 100644 index 000000000..c96d511aa --- /dev/null +++ b/install-new/upgrade/sql/1.5.0.0.sql @@ -0,0 +1,324 @@ +SET NAMES 'utf8'; +CREATE TABLE IF NOT EXISTS `PREFIX_group_shop` ( + `id_group_shop` int(11) unsigned NOT NULL AUTO_INCREMENT, + `name` varchar(64) CHARACTER SET utf8 NOT NULL, + `share_customer` TINYINT(1) NOT NULL, + `share_order` TINYINT(1) NOT NULL, + `share_stock` TINYINT(1) NOT NULL, + `active` tinyint(1) NOT NULL DEFAULT '1', + `deleted` tinyint(1) NOT NULL DEFAULT '0', + PRIMARY KEY (`id_group_shop`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; +INSERT INTO `PREFIX_group_shop` (`id_group_shop`, `name`, `active`, `deleted`, `share_stock`, `share_customer`, `share_order`) VALUES (1, 'Default', 1, 0, 0, 0, 0); + +CREATE TABLE IF NOT EXISTS `PREFIX_shop` ( + `id_shop` int(11) unsigned NOT NULL AUTO_INCREMENT, + `id_group_shop` int(11) unsigned NOT NULL, + `name` varchar(64) CHARACTER SET utf8 NOT NULL, + `id_category` INT(11) UNSIGNED NOT NULL DEFAULT '1', + `id_theme` INT(1) UNSIGNED NOT NULL, + `active` tinyint(1) NOT NULL DEFAULT '1', + `deleted` tinyint(1) NOT NULL DEFAULT '0', + PRIMARY KEY (`id_shop`), + KEY `id_group_shop` (`id_group_shop`), + KEY `id_category` (`id_category`), + KEY `id_theme` (`id_theme`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; +INSERT INTO `PREFIX_shop` (`id_shop`, `id_group_shop`, `name`, `id_category`, `active`) VALUES (1, 1, 'Default', 1, 1); + +ALTER TABLE `PREFIX_configuration` ADD `id_group_shop` INT(11) UNSIGNED DEFAULT NULL AFTER `id_configuration` , ADD `id_shop` INT(11) UNSIGNED DEFAULT NULL AFTER `id_group_shop`; +ALTER TABLE `PREFIX_configuration` DROP INDEX `name` , ADD INDEX `name` ( `name` ) ; +ALTER TABLE `PREFIX_configuration` ADD INDEX (`id_group_shop`); +ALTER TABLE `PREFIX_configuration` ADD INDEX (`id_shop`); +INSERT INTO `PREFIX_configuration` (`id_configuration`, `name`, `value`, `date_add`, `date_upd`) VALUES (NULL, 'PS_SHOP_DEFAULT', '1', NOW(), NOW()); + +CREATE TABLE IF NOT EXISTS `PREFIX_shop_url` ( + `id_shop_url` int(11) unsigned NOT NULL AUTO_INCREMENT, + `id_shop` int(11) unsigned NOT NULL, + `domain` varchar(255) NOT NULL, + `domain_ssl` varchar(255) NOT NULL, + `physical_uri` varchar(64) NOT NULL, + `virtual_uri` varchar(64) NOT NULL, + `main` TINYINT(1) NOT NULL, + `active` TINYINT(1) NOT NULL, + PRIMARY KEY (`id_shop_url`), + KEY `id_shop` (`id_shop`), + UNIQUE KEY `shop_url` (`domain`, `virtual_uri`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +CREATE TABLE IF NOT EXISTS `PREFIX_theme` ( + `id_theme` int(11) NOT NULL AUTO_INCREMENT, + `name` varchar(64) NOT NULL, + PRIMARY KEY (`id_theme`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; +INSERT INTO `PREFIX_theme` (`id_theme`, `name`) VALUES (1, 'prestashop'); + +CREATE TABLE IF NOT EXISTS `PREFIX_theme_specific` ( + `id_theme` int(11) unsigned NOT NULL, + `id_shop` INT(11) UNSIGNED NOT NULL, + `entity` int(11) unsigned NOT NULL, + `id_object` int(11) unsigned NOT NULL, + PRIMARY KEY (`id_theme`,`id_shop`, `entity`,`id_object`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +CREATE TABLE `PREFIX_stock` ( +`id_stock` INT( 11 ) UNSIGNED NOT NULL AUTO_INCREMENT, +`id_product` INT( 11 ) UNSIGNED NOT NULL, +`id_product_attribute` INT( 11 ) UNSIGNED NOT NULL, +`id_shop` INT(11) UNSIGNED NOT NULL, +`quantity` INT(11) NOT NULL, + PRIMARY KEY (`id_stock`), + KEY `id_product` (`id_product`), + KEY `id_product_attribute` (`id_product_attribute`), + KEY `id_shop` (`id_shop`), + UNIQUE KEY `product_stock` (`id_product` ,`id_product_attribute` ,`id_shop`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +INSERT INTO `PREFIX_stock` (id_product, id_product_attribute, id_shop, quantity) (SELECT id_product, id_product_attribute, 1, quantity FROM PREFIX_product_attribute); +INSERT INTO `PREFIX_stock` (id_product, id_product_attribute, id_shop, quantity) (SELECT id_product, 0, 1, IF( + (SELECT COUNT(*) FROM PREFIX_product_attribute pa WHERE p.id_product = pa.id_product) > 0, + (SELECT SUM(pa2.quantity) FROM PREFIX_product_attribute pa2 WHERE p.id_product = pa2.id_product), + quantity +) FROM PREFIX_product p); + +ALTER TABLE PREFIX_stock_mvt ADD id_stock INT UNSIGNED NOT NULL AFTER id_stock_mvt; +UPDATE PREFIX_stock_mvt sm SET sm.id_stock = (SELECT s.id_stock FROM PREFIX_stock s WHERE s.id_product = sm.id_product AND s.id_product_attribute = sm.id_product_attribute ORDER BY s.id_shop LIMIT 1); +ALTER TABLE PREFIX_stock_mvt DROP id_product, DROP id_product_attribute; + +CREATE TABLE `PREFIX_country_shop` ( +`id_country` INT( 11 ) UNSIGNED NOT NULL, +`id_shop` INT( 11 ) UNSIGNED NOT NULL , + PRIMARY KEY (`id_country`, `id_shop`), + KEY `id_shop` (`id_shop`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; +INSERT INTO `PREFIX_country_shop` (id_shop, id_country) (SELECT 1, id_country FROM PREFIX_country); + +CREATE TABLE `PREFIX_carrier_shop` ( +`id_carrier` INT( 11 ) UNSIGNED NOT NULL , +`id_shop` INT( 11 ) UNSIGNED NOT NULL , + PRIMARY KEY (`id_carrier`, `id_shop`), + KEY `id_shop` (`id_shop`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; +INSERT INTO `PREFIX_carrier_shop` (id_shop, id_carrier) (SELECT 1, id_carrier FROM PREFIX_carrier); + +CREATE TABLE `PREFIX_cms_shop` ( +`id_cms` INT( 11 ) UNSIGNED NOT NULL, +`id_shop` INT( 11 ) UNSIGNED NOT NULL , + PRIMARY KEY (`id_cms`, `id_shop`), + KEY `id_shop` (`id_shop`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; +INSERT INTO `PREFIX_cms_shop` (id_shop, id_cms) (SELECT 1, id_cms FROM PREFIX_cms); + +ALTER TABLE `PREFIX_cms_block` ADD `id_shop` INT(11) UNSIGNED NOT NULL DEFAULT '1' AFTER `id_cms_block`; + +CREATE TABLE `PREFIX_lang_shop` ( +`id_lang` INT( 11 ) UNSIGNED NOT NULL, +`id_shop` INT( 11 ) UNSIGNED NOT NULL, + PRIMARY KEY (`id_lang`, `id_shop`), + KEY `id_shop` (`id_shop`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; +INSERT INTO `PREFIX_lang_shop` (id_shop, id_lang) (SELECT 1, id_lang FROM PREFIX_lang); + +CREATE TABLE `PREFIX_currency_shop` ( +`id_currency` INT( 11 ) UNSIGNED NOT NULL, +`id_shop` INT( 11 ) UNSIGNED NOT NULL, + PRIMARY KEY (`id_currency`, `id_shop`), + KEY `id_shop` (`id_shop`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; +INSERT INTO `PREFIX_currency_shop` (id_shop, id_currency) (SELECT 1, id_currency FROM PREFIX_currency); + +ALTER TABLE `PREFIX_cart` ADD `id_group_shop` INT(11) UNSIGNED NOT NULL DEFAULT '1' AFTER `id_cart` , ADD `id_shop` INT(11) UNSIGNED NOT NULL DEFAULT '1' AFTER `id_group_shop`, ADD INDEX `id_group_shop` (`id_group_shop`), ADD INDEX `id_shop` (`id_shop`); + +ALTER TABLE `PREFIX_customer` ADD `id_group_shop` INT(11) UNSIGNED NOT NULL DEFAULT '1' AFTER `id_customer` , ADD `id_shop` INT(11) UNSIGNED NOT NULL DEFAULT '1' AFTER `id_group_shop`, ADD INDEX `id_group_shop` (`id_group_shop`), ADD INDEX `id_shop` (`id_shop`); + +ALTER TABLE `PREFIX_orders` ADD `id_group_shop` INT(11) UNSIGNED NOT NULL DEFAULT '1' AFTER `id_order` , ADD `id_shop` INT(11) UNSIGNED NOT NULL DEFAULT '1' AFTER `id_group_shop`, ADD INDEX `id_group_shop` (`id_group_shop`), ADD INDEX `id_shop` (`id_shop`); + +ALTER TABLE `PREFIX_customer_thread` ADD `id_shop` INT(11) UNSIGNED NOT NULL DEFAULT '1' AFTER `id_customer_thread`; +ALTER TABLE `PREFIX_customer_thread` ADD INDEX `id_shop` (`id_shop`), ADD INDEX `id_lang` (`id_lang`), ADD INDEX `id_contact` (`id_contact`), ADD INDEX `id_customer` (`id_customer`), ADD INDEX `id_order` (`id_order`), ADD INDEX `id_product` (`id_product`); + +ALTER TABLE `PREFIX_customer_message` ADD INDEX `id_employee` (`id_employee`); + +ALTER TABLE `PREFIX_meta_lang` ADD `id_shop` INT(11) UNSIGNED NOT NULL DEFAULT '1' AFTER `id_meta`; +ALTER TABLE `PREFIX_meta_lang` DROP PRIMARY KEY, ADD PRIMARY KEY (`id_meta`, `id_shop`, `id_lang`), ADD INDEX `id_shop` (`id_shop`), ADD INDEX `id_lang` (`id_lang`); + +CREATE TABLE `PREFIX_contact_shop` ( + `id_contact` INT(11) UNSIGNED NOT NULL, + `id_shop` INT(11) UNSIGNED NOT NULL, + PRIMARY KEY (`id_contact`, `id_shop`), + KEY `id_shop` (`id_shop`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; +INSERT INTO `PREFIX_contact_shop` (id_shop, id_contact) (SELECT 1, id_contact FROM `PREFIX_contact`); + +CREATE TABLE `PREFIX_image_shop` ( +`id_image` INT( 11 ) UNSIGNED NOT NULL, +`id_shop` INT( 11 ) UNSIGNED NOT NULL, + PRIMARY KEY (`id_image`, `id_shop`), + KEY `id_shop` (`id_shop`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; +INSERT INTO `PREFIX_image_shop` (id_shop, id_image) (SELECT 1, id_image FROM PREFIX_image); + +CREATE TABLE `PREFIX_attribute_group_shop` ( +`id_attribute` INT(11) UNSIGNED NOT NULL, +`id_group_shop` INT(11) UNSIGNED NOT NULL, + PRIMARY KEY (`id_attribute`, `id_group_shop`), + KEY `id_group_shop` (`id_group_shop`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; +INSERT INTO `PREFIX_attribute_group_shop` (id_group_shop, id_attribute) (SELECT 1, id_attribute FROM PREFIX_attribute); + +CREATE TABLE `PREFIX_feature_group_shop` ( +`id_feature` INT(11) UNSIGNED NOT NULL, +`id_group_shop` INT(11) UNSIGNED NOT NULL , + PRIMARY KEY (`id_feature`, `id_group_shop`), + KEY `id_group_shop` (`id_group_shop`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; +INSERT INTO `PREFIX_feature_group_shop` (id_group_shop, id_feature) (SELECT 1, id_feature FROM PREFIX_feature); + +CREATE TABLE `PREFIX_group_group_shop` ( +`id_group` INT( 11 ) UNSIGNED NOT NULL, +`id_group_shop` INT( 11 ) UNSIGNED NOT NULL, + PRIMARY KEY (`id_group`, `id_group_shop`), + KEY `id_group_shop` (`id_group_shop`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; +INSERT INTO `PREFIX_group_group_shop` (id_group_shop, id_group) (SELECT 1, id_group FROM PREFIX_group); + +CREATE TABLE `PREFIX_attribute_group_group_shop` ( +`id_attribute_group` INT( 11 ) UNSIGNED NOT NULL , +`id_group_shop` INT( 11 ) UNSIGNED NOT NULL , + PRIMARY KEY (`id_attribute_group`, `id_group_shop`), + KEY `id_group_shop` (`id_group_shop`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; +INSERT INTO `PREFIX_attribute_group_group_shop` (id_group_shop, id_attribute_group) (SELECT 1, id_attribute_group FROM PREFIX_attribute_group); + +CREATE TABLE `PREFIX_tax_rules_group_group_shop` ( + `id_tax_rules_group` INT( 11 ) UNSIGNED NOT NULL, + `id_group_shop` INT( 11 ) UNSIGNED NOT NULL, + PRIMARY KEY (`id_tax_rules_group`, `id_group_shop`), + KEY `id_group_shop` (`id_group_shop`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; +INSERT INTO `PREFIX_tax_rules_group_group_shop` (`id_tax_rules_group`, `id_group_shop`) (SELECT `id_tax_rules_group`, 1 FROM `PREFIX_tax_rules_group`); + +CREATE TABLE `PREFIX_zone_group_shop` ( +`id_zone` INT( 11 ) UNSIGNED NOT NULL , +`id_group_shop` INT( 11 ) UNSIGNED NOT NULL , + PRIMARY KEY (`id_zone`, `id_group_shop`), + KEY `id_group_shop` (`id_group_shop`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; +INSERT INTO `PREFIX_zone_group_shop` (id_group_shop, id_zone) (SELECT 1, id_zone FROM PREFIX_zone); + +CREATE TABLE `PREFIX_manufacturer_group_shop` ( +`id_manufacturer` INT( 11 ) UNSIGNED NOT NULL , +`id_group_shop` INT( 11 ) UNSIGNED NOT NULL , + PRIMARY KEY (`id_manufacturer`, `id_group_shop`), + KEY `id_group_shop` (`id_group_shop`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; +INSERT INTO `PREFIX_manufacturer_group_shop` (id_group_shop, id_manufacturer) (SELECT 1, id_manufacturer FROM PREFIX_manufacturer); + +CREATE TABLE `PREFIX_supplier_group_shop` ( +`id_supplier` INT( 11 ) UNSIGNED NOT NULL, +`id_group_shop` INT( 11 ) UNSIGNED NOT NULL, +PRIMARY KEY (`id_supplier`, `id_group_shop`), + KEY `id_group_shop` (`id_group_shop`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; +INSERT INTO `PREFIX_supplier_group_shop` (id_group_shop, id_supplier) (SELECT 1, id_supplier FROM PREFIX_supplier); + +CREATE TABLE `PREFIX_store_shop` ( +`id_store` INT( 11 ) UNSIGNED NOT NULL , +`id_shop` INT( 11 ) UNSIGNED NOT NULL, +PRIMARY KEY (`id_store`, `id_shop`), + KEY `id_shop` (`id_shop`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; +INSERT INTO `PREFIX_store_shop` (id_shop, id_store) (SELECT 1, id_store FROM PREFIX_store); + +CREATE TABLE `PREFIX_product_shop` ( +`id_product` INT( 11 ) UNSIGNED NOT NULL, +`id_shop` INT( 11 ) UNSIGNED NOT NULL, +PRIMARY KEY ( `id_shop` , `id_product` ), + KEY `id_shop` (`id_shop`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; +INSERT INTO `PREFIX_product_shop` (id_shop, id_product) (SELECT 1, id_product FROM PREFIX_product); + +ALTER TABLE `PREFIX_category_lang` ADD `id_shop` INT( 11 ) UNSIGNED NOT NULL DEFAULT '1' AFTER `id_category`; +ALTER TABLE `PREFIX_category_lang` DROP INDEX `category_lang_index`; +ALTER TABLE `PREFIX_category_lang` ADD UNIQUE KEY( `id_category`, `id_shop`, `id_lang`); + +ALTER TABLE `PREFIX_product_lang` ADD `id_shop` INT( 11 ) UNSIGNED NOT NULL DEFAULT '1' AFTER `id_product`; +ALTER TABLE `PREFIX_product_lang` DROP INDEX `product_lang_index` ; +ALTER TABLE `PREFIX_product_lang` ADD UNIQUE KEY ( `id_product`, `id_shop` , `id_lang`); + +ALTER TABLE `PREFIX_specific_price` CHANGE `id_shop` `id_shop` INT(11) UNSIGNED NOT NULL DEFAULT '1'; + +ALTER TABLE `PREFIX_hook_module` ADD `id_shop` INT(11) UNSIGNED NOT NULL DEFAULT '1' AFTER `id_hook`; +ALTER TABLE `PREFIX_hook_module` DROP PRIMARY KEY; +ALTER TABLE `PREFIX_hook_module` ADD PRIMARY KEY (`id_module`,`id_hook`,`id_shop` ); +ALTER TABLE `PREFIX_hook_module_exceptions` ADD `id_shop` INT(11) UNSIGNED NOT NULL DEFAULT '1' AFTER `id_hook`; + +ALTER TABLE `PREFIX_connections` ADD `id_group_shop` INT(11) UNSIGNED NOT NULL DEFAULT '1', ADD `id_shop` INT(11) UNSIGNED NOT NULL DEFAULT '1'; +ALTER TABLE `PREFIX_page_viewed` ADD `id_group_shop` INT UNSIGNED NOT NULL DEFAULT '1' AFTER `id_page`, ADD `id_shop` INT UNSIGNED NOT NULL DEFAULT '1' AFTER `id_group_shop`; +ALTER TABLE `PREFIX_page_viewed` DROP PRIMARY KEY, ADD PRIMARY KEY (`id_page`, `id_date_range`, `id_shop`); + +CREATE TABLE `PREFIX_module_shop` ( +`id_module` INT( 11 ) UNSIGNED NOT NULL, +`id_shop` INT( 11 ) UNSIGNED NOT NULL, +PRIMARY KEY (`id_module` , `id_shop`), + KEY `id_shop` (`id_shop`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; +INSERT INTO `PREFIX_module_shop` (`id_module`, `id_shop`) (SELECT `id_module`, 1 FROM `PREFIX_module`); + +ALTER TABLE `PREFIX_module_currency` ADD `id_shop` INT(11) UNSIGNED NOT NULL DEFAULT '1' AFTER `id_module`; +ALTER TABLE `PREFIX_module_currency` DROP PRIMARY KEY; +ALTER TABLE `PREFIX_module_currency` ADD PRIMARY KEY (`id_module`, `id_shop`, `id_currency`); + +ALTER TABLE `PREFIX_module_country` ADD `id_shop` INT(11) UNSIGNED NOT NULL DEFAULT '1' AFTER `id_module`; +ALTER TABLE `PREFIX_module_country` DROP PRIMARY KEY; +ALTER TABLE `PREFIX_module_country` ADD PRIMARY KEY (`id_module`, `id_shop`, `id_country`); + +ALTER TABLE `PREFIX_module_group` ADD `id_shop` INT(11) UNSIGNED NOT NULL DEFAULT '1' AFTER `id_module`; +ALTER TABLE `PREFIX_module_group` DROP PRIMARY KEY; +ALTER TABLE `PREFIX_module_group` ADD PRIMARY KEY (`id_module`, `id_shop`, `id_group`); + +ALTER TABLE `PREFIX_carrier_lang` ADD `id_shop` INT(11) UNSIGNED NOT NULL DEFAULT '1' AFTER `id_carrier`; +ALTER TABLE `PREFIX_carrier_lang` DROP INDEX `shipper_lang_index`; +ALTER TABLE `PREFIX_carrier_lang` ADD UNIQUE `shipper_lang_index` (`id_carrier`, `id_shop`, `id_lang`); + +ALTER TABLE `PREFIX_search_word` ADD `id_shop` INT(11) NOT NULL DEFAULT '1' AFTER `id_word`; +ALTER TABLE `PREFIX_search_word` DROP INDEX `id_lang`, ADD UNIQUE `id_lang` (`id_lang`,`id_shop`,`word`); + +CREATE TABLE `PREFIX_referrer_shop` ( + `id_referrer` int(10) unsigned NOT NULL auto_increment, + `id_shop` int(10) unsigned NOT NULL default '1', + `cache_visitors` int(11) default NULL, + `cache_visits` int(11) default NULL, + `cache_pages` int(11) default NULL, + `cache_registrations` int(11) default NULL, + `cache_orders` int(11) default NULL, + `cache_sales` decimal(17,2) default NULL, + `cache_reg_rate` decimal(5,4) default NULL, + `cache_order_rate` decimal(5,4) default NULL, + PRIMARY KEY (`id_referrer`, `id_shop`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; +INSERT INTO `PREFIX_referrer_shop` (`id_referrer`, `id_shop`) SELECT `id_referrer`, 1 FROM `PREFIX_referrer`; +ALTER TABLE `PREFIX_referrer` DROP `cache_visitors`, DROP `cache_visits`, DROP `cache_pages`, DROP `cache_registrations`, DROP `cache_orders`, DROP `cache_sales`, DROP `cache_reg_rate`, DROP `cache_order_rate`; + +ALTER TABLE `PREFIX_cart_product` ADD `id_shop` INT NOT NULL DEFAULT '1' AFTER `id_product`; + +ALTER TABLE `PREFIX_customization` ADD `in_cart` TINYINT(1) UNSIGNED NOT NULL DEFAULT '0'; + +CREATE TABLE `PREFIX_scene_shop` ( +`id_scene` INT( 11 ) UNSIGNED NOT NULL , +`id_shop` INT( 11 ) UNSIGNED NOT NULL, +PRIMARY KEY (`id_scene`, `id_shop`), + KEY `id_shop` (`id_shop`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; +INSERT INTO `PREFIX_scene_shop` (id_shop, id_scene) (SELECT 1, id_scene FROM PREFIX_scene); + +CREATE TABLE `PREFIX_discount_shop` ( +`id_discount` INT( 11 ) UNSIGNED NOT NULL , +`id_shop` INT( 11 ) UNSIGNED NOT NULL, +PRIMARY KEY (`id_discount`, `id_shop`), + KEY `id_shop` (`id_shop`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; +INSERT INTO `PREFIX_discount_shop` (id_shop, id_discount) (SELECT 1, id_discount FROM PREFIX_discount); + +ALTER TABLE `PREFIX_delivery` ADD `id_shop` INT UNSIGNED NULL DEFAULT NULL AFTER `id_delivery`, ADD `id_group_shop` INT UNSIGNED NULL DEFAULT NULL AFTER `id_shop`; + +/* PHP:create_multistore(); */; diff --git a/install-new/upgrade/sql/1.5.0.1.sql b/install-new/upgrade/sql/1.5.0.1.sql new file mode 100644 index 000000000..41a35141d --- /dev/null +++ b/install-new/upgrade/sql/1.5.0.1.sql @@ -0,0 +1,498 @@ +SET NAMES 'utf8'; + +CREATE TABLE IF NOT EXISTS `PREFIX_accounting_zone_shop` ( + `id_accounting_zone_shop` int(11) NOT NULL AUTO_INCREMENT, + `id_zone` int(11) NOT NULL, + `id_shop` int(11) NOT NULL, + `account_number` varchar(64) NOT NULL, + PRIMARY KEY (`id_accounting_zone_shop`), + UNIQUE KEY `id_zone` (`id_zone`,`id_shop`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +CREATE TABLE IF NOT EXISTS `PREFIX_accounting_product_zone_shop` ( + `id_accounting_product_zone_shop` int(11) NOT NULL AUTO_INCREMENT, + `id_product` int(11) NOT NULL, + `id_shop` int(11) NOT NULL, + `id_zone` int(11) NOT NULL, + `account_number` varchar(64) NOT NULL, + PRIMARY KEY (`id_accounting_product_zone_shop`), + UNIQUE KEY `id_product` (`id_product`,`id_shop`,`id_zone`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +/* PHP:add_accounting_tab(); */; + +CREATE TABLE IF NOT EXISTS `PREFIX_module_access` ( + `id_profile` int(10) unsigned NOT NULL, + `id_module` int(10) unsigned NOT NULL, + `view` tinyint(1) NOT NULL, + `configure` tinyint(1) NOT NULL, + PRIMARY KEY (`id_profile`,`id_module`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +INSERT INTO `PREFIX_module_access` (`id_profile`, `id_module`, `configure`, `view`) ( + SELECT id_profile, id_module, 0, 1 + FROM PREFIX_access a, PREFIX_module m + WHERE id_tab = (SELECT `id_tab` FROM PREFIX_tab WHERE class_name = 'AdminModules' LIMIT 1) + AND a.`view` = 0 +); + +INSERT INTO `PREFIX_module_access` (`id_profile`, `id_module`, `configure`, `view`) ( + SELECT id_profile, id_module, 1, 1 + FROM PREFIX_access a, PREFIX_module m + WHERE id_tab = (SELECT `id_tab` FROM PREFIX_tab WHERE class_name = 'AdminModules' LIMIT 1) + AND a.`view` = 1 +); + +UPDATE `PREFIX_tab` SET `class_name` = 'AdminThemes' WHERE `class_name` = 'AdminAppearance'; + +INSERT INTO `PREFIX_hook` ( +`name` , +`title` , +`description` , +`position` , +`live_edit` +) +VALUES ('taxmanager', 'taxmanager', NULL , '1', '0'); + +ALTER TABLE `PREFIX_tax_rule` + ADD `zipcode_from` INT NOT NULL AFTER `id_state` , + ADD `zipcode_to` INT NOT NULL AFTER `zipcode_from` , + ADD `behavior` INT NOT NULL AFTER `zipcode_to`, + ADD `description` VARCHAR( 100 ) NOT NULL AFTER `id_tax`; + +ALTER TABLE `PREFIX_tax_rule` DROP INDEX tax_rule; + +INSERT INTO `PREFIX_tax_rule` (`id_tax_rules_group`, `id_country`, `id_state`, `id_tax`, `behavior`, `zipcode_from`, `zipcode_to`) + SELECT r.`id_tax_rules_group`, r.`id_country`, r.`id_state`, r.`id_tax`, 0, z.`from_zip_code`, z.`to_zip_code` + FROM `PREFIX_tax_rule` r INNER JOIN `PREFIX_county_zip_code` z ON (z.`id_county` = r.`id_county`); + +UPDATE `PREFIX_tax_rule` SET `behavior` = GREATEST(`state_behavior`, `county_behavior`); + +DELETE FROM `PREFIX_tax_rule` +WHERE `id_county` != 0 +AND `zipcode_from` = 0; + +ALTER TABLE `PREFIX_tax_rule` + DROP `id_county`, + DROP `state_behavior`, + DROP `county_behavior`; + +/* PHP:remove_tab(AdminCounty); */; +DROP TABLE `PREFIX_county_zip_code`; +DROP TABLE `PREFIX_county`; + +ALTER TABLE `PREFIX_employee` + ADD `id_last_order` tinyint(1) unsigned NOT NULL default '0', + ADD `id_last_message` tinyint(1) unsigned NOT NULL default '0', + ADD `id_last_customer` tinyint(1) unsigned NOT NULL default '0'; + +INSERT INTO `PREFIX_configuration` (`name`, `value`, `date_add`, `date_upd`) VALUES +('PS_SHOW_NEW_ORDERS', '1', NOW(), NOW()), +('PS_SHOW_NEW_CUSTOMERS', '1', NOW(), NOW()), +('PS_SHOW_NEW_MESSAGES', '1', NOW(), NOW()), +('PS_FEATURE_FEATURE_ACTIVE', '1', NOW(), NOW()), +('PS_COMBINATION_FEATURE_ACTIVE', '1', NOW(), NOW()), +('PS_ADMINREFRESH_NOTIFICATION', '1', NOW(), NOW()); + +/* PHP:update_feature_detachable_cache(); */; + +ALTER TABLE `PREFIX_product` ADD `available_date` DATE NOT NULL AFTER `available_for_order`; + +ALTER TABLE `PREFIX_product_attribute` ADD `available_date` DATE NOT NULL; + +/* Index was only used by deprecated function Image::positionImage() */ +ALTER TABLE `PREFIX_image` DROP INDEX `product_position`; + +CREATE TABLE IF NOT EXISTS `PREFIX_gender` ( + `id_gender` int(11) NOT NULL AUTO_INCREMENT, + `type` tinyint(1) NOT NULL, + PRIMARY KEY (`id_gender`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +CREATE TABLE IF NOT EXISTS `PREFIX_gender_lang` ( + `id_gender` int(10) unsigned NOT NULL, + `id_lang` int(10) unsigned NOT NULL, + `name` varchar(20) NOT NULL, + PRIMARY KEY (`id_gender`,`id_lang`), + KEY `id_gender` (`id_gender`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +INSERT INTO `PREFIX_gender` (`id_gender`, `type`) VALUES +(1, 0), +(2, 1), +(3, 1); + +INSERT INTO `PREFIX_gender_lang` (`id_gender`, `id_lang`, `name`) VALUES +(1, 1, 'Mr.'), +(1, 2, 'M.'), +(1, 3, 'Sr.'), +(1, 4, 'Herr'), +(1, 5, 'Sig.'), +(2, 1, 'Ms.'), +(2, 2, 'Mme'), +(2, 3, 'Sra.'), +(2, 4, 'Frau'), +(2, 5, 'Sig.ra'), +(3, 1, 'Miss'), +(3, 2, 'Melle'), +(3, 3, 'Miss'), +(3, 4, 'Miss'), +(3, 5, 'Miss'); + +DELETE FROM `PREFIX_configuration` WHERE `name` = 'PS_FORCE_SMARTY_2'; + +CREATE TABLE IF NOT EXISTS `PREFIX_order_detail_tax` ( +`id_order_detail` INT NOT NULL , +`id_tax` INT NOT NULL +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +ALTER TABLE `PREFIX_tax` ADD `deleted` INT NOT NULL AFTER `active`; + +/* PHP:update_order_detail_taxes(); */; + +ALTER TABLE `PREFIX_order_detail` + DROP `tax_name`, + DROP `tax_rate`; + +CREATE TABLE `PREFIX_customer_message_sync_imap` ( + `md5_header` varbinary(32) NOT NULL, + KEY `md5_header_index` (`md5_header`(4)) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +ALTER TABLE `PREFIX_customer_message` ADD `private` TINYINT NOT NULL DEFAULT '0' AFTER `user_agent`; + +/* PHP:add_new_tab(AdminGenders, fr:Genres|es:Genders|en:Genders|de:Genders|it:Genders, 2); */; + +ALTER TABLE `PREFIX_attribute` ADD `position` INT( 10 ) UNSIGNED NOT NULL DEFAULT '0'; + +/* PHP:add_attribute_position(); */; + +ALTER TABLE `PREFIX_product_download` CHANGE `date_deposit` `date_add` DATETIME NOT NULL ; +ALTER TABLE `PREFIX_product_download` CHANGE `physically_filename` `filename` VARCHAR( 255 ) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL; +ALTER TABLE `PREFIX_product_download` ADD `id_product_attribute` INT( 10 ) UNSIGNED NOT NULL AFTER `id_product` , ADD INDEX ( `id_product_attribute` ); +ALTER TABLE `PREFIX_product_download` ADD `is_shareable` TINYINT( 1 ) UNSIGNED NOT NULL DEFAULT '0' AFTER `active`; + +ALTER TABLE `PREFIX_attribute_group` ADD `position` INT( 10 ) UNSIGNED NOT NULL DEFAULT '0'; + +ALTER TABLE `PREFIX_attribute_group` ADD `group_type` ENUM('select', 'radio', 'color') NOT NULL DEFAULT 'select'; +UPDATE `PREFIX_attribute_group` SET `group_type`='color' WHERE `is_color_group` = 1; +ALTER TABLE `PREFIX_product` DROP `id_color_default`; + +/* PHP:add_group_attribute_position(); */; + +ALTER TABLE `PREFIX_feature` ADD `position` INT( 10 ) UNSIGNED NOT NULL DEFAULT '0'; + +/* PHP:add_feature_position(); */; + +CREATE TABLE IF NOT EXISTS `PREFIX_request_sql` ( + `id_request_sql` int(11) NOT NULL AUTO_INCREMENT, + `name` varchar(200) NOT NULL, + `sql` text NOT NULL, + PRIMARY KEY (`id_request_sql`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +/* PHP:add_new_tab(AdminRequestSql, fr:SQL Manager|es:SQL Manager|en:SQL Manager|de:Wunsh|it:SQL Manager, 9); */; + + +ALTER TABLE `PREFIX_carrier` ADD COLUMN `id_reference` int(10) NOT NULL AFTER `id_carrier`; +UPDATE `PREFIX_carrier` SET id_reference = id_carrier; + +ALTER TABLE `PREFIX_product` ADD `is_virtual` TINYINT( 1 ) NOT NULL DEFAULT '0' AFTER `cache_has_attachments`; + +/* PHP:add_new_tab(AdminProducts, fr:Products|es:Products|en:Products|de:Products|it:Products, 1); */; +/* PHP:add_new_tab(AdminCategories, fr:Categories|es:Categories|en:Categories|de:Categories|it:Categories, 1); */; +/* PHP:add_new_tab(AdminStocks, fr:Stocks|es:Stocks|en:Stocks|de:Stocks|it:Stocks, 1); */; +/* PHP:add_default_restrictions_modules_groups(); */; + + + +CREATE TABLE IF NOT EXISTS `PREFIX_employee_shop` ( +`id_employee` INT( 11 ) UNSIGNED NOT NULL , +`id_shop` INT( 11 ) UNSIGNED NOT NULL , +PRIMARY KEY ( `id_employee` , `id_shop` ) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +INSERT INTO `PREFIX_employee_shop` (`id_employee`, `id_shop`) (SELECT `id_employee`, 1 FROM `PREFIX_employee`); + +UPDATE `PREFIX_access` SET `view` = 0, `add` = 0, `edit` = 0, `delete` = 0 WHERE `id_tab` = 88 AND `id_profile` != 1; + +INSERT INTO `PREFIX_profile` (`id_profile`) VALUES (5); + +UPDATE `PREFIX_profile_lang` SET `id_profile` = 5 WHERE `id_profile` = 4; +UPDATE `PREFIX_profile_lang` SET `id_profile` = 4 WHERE `id_profile` = 3; +UPDATE `PREFIX_profile_lang` SET `id_profile` = 3 WHERE `id_profile` = 2; +UPDATE `PREFIX_profile_lang` SET `id_profile` = 2 WHERE `id_profile` = 1; + +INSERT INTO `PREFIX_profile_lang` (`id_profile`, `id_lang`, `name`) VALUES (1, 1, 'SuperAdmin'),(1, 2, 'SuperAdmin'),(1, 3, 'SuperAdmin'),(1, 4, 'SuperAdmin'),(1, 5, 'SuperAdmin'); + +UPDATE `PREFIX_access` SET `id_profile` = 5 WHERE `id_profile` = 4; +UPDATE `PREFIX_access` SET `id_profile` = 4 WHERE `id_profile` = 3; +UPDATE `PREFIX_access` SET `id_profile` = 3 WHERE `id_profile` = 2; +UPDATE `PREFIX_access` SET `id_profile` = 2 WHERE `id_profile` = 1; + +UPDATE `PREFIX_module_access` SET `id_profile` = 5 WHERE `id_profile` = 4; +UPDATE `PREFIX_module_access` SET `id_profile` = 4 WHERE `id_profile` = 3; +UPDATE `PREFIX_module_access` SET `id_profile` = 3 WHERE `id_profile` = 2; +UPDATE `PREFIX_module_access` SET `id_profile` = 2 WHERE `id_profile` = 1; + +INSERT INTO `PREFIX_module_access` (`id_profile`, `id_module`, `configure`, `view`) (SELECT 1, `id_module`, 1, 1 FROM `PREFIX_module`); + +ALTER TABLE `PREFIX_carrier` ADD `position` INT( 10 ) UNSIGNED NOT NULL DEFAULT '0'; + +/* PHP:add_carrier_position();*/ + +ALTER TABLE `PREFIX_order_state` ADD COLUMN `shipped` TINYINT(1) UNSIGNED NOT NULL DEFAULT 0 AFTER `delivery`; +UPDATE `PREFIX_order_state` SET `shipped` = 1 WHERE id_order_states IN (4, 5); + + +CREATE TABLE `PREFIX_cart_rule` ( + `id_cart_rule` int(10) unsigned NOT NULL auto_increment, + `id_customer` int unsigned NOT NULL default 0, + `date_from` datetime NOT NULL, + `date_to` datetime NOT NULL, + `description` text, + `quantity` int(10) unsigned NOT NULL default 0, + `quantity_per_user` int(10) unsigned NOT NULL default 0, + `priority` int(10) unsigned NOT NULL default 1, + `code` varchar(254) NOT NULL, + `minimum_amount` decimal(17,2) NOT NULL default 0, + `minimum_amount_tax` tinyint(1) NOT NULL default 0, + `minimum_amount_currency` int unsigned NOT NULL default 0, + `minimum_amount_shipping` tinyint(1) NOT NULL default 0, + `country_restriction` tinyint(1) unsigned NOT NULL default 0, + `carrier_restriction` tinyint(1) unsigned NOT NULL default 0, + `group_restriction` tinyint(1) unsigned NOT NULL default 0, + `cart_rule_restriction` tinyint(1) unsigned NOT NULL default 0, + `product_restriction` tinyint(1) unsigned NOT NULL default 0, + `free_shipping` tinyint(1) NOT NULL default 0, + `reduction_percent` decimal(4,2) NOT NULL default 0, + `reduction_amount` decimal(17,2) NOT NULL default 0, + `reduction_tax` tinyint(1) unsigned NOT NULL default 0, + `reduction_currency` int(10) unsigned NOT NULL default 0, + `reduction_product` int(10) NOT NULL default 0, + `gift_product` int(10) unsigned NOT NULL default 0, + `active` tinyint(1) unsigned NOT NULL default 0, + `date_add` datetime NOT NULL, + `date_upd` datetime NOT NULL, + PRIMARY KEY (`id_cart_rule`) +); + +CREATE TABLE `PREFIX_cart_rule_country` ( + `id_cart_rule` int(10) unsigned NOT NULL, + `id_country` int(10) unsigned NOT NULL, + PRIMARY KEY (`id_cart_rule`, `id_country`) +); + +CREATE TABLE `PREFIX_cart_rule_group` ( + `id_cart_rule` int(10) unsigned NOT NULL, + `id_group` int(10) unsigned NOT NULL, + PRIMARY KEY (`id_cart_rule`, `id_group`) +); + +CREATE TABLE `PREFIX_cart_rule_carrier` ( + `id_cart_rule` int(10) unsigned NOT NULL, + `id_carrier` int(10) unsigned NOT NULL, + PRIMARY KEY (`id_cart_rule`, `id_carrier`) +); + +CREATE TABLE `PREFIX_cart_rule_combination` ( + `id_cart_rule_1` int(10) unsigned NOT NULL, + `id_cart_rule_2` int(10) unsigned NOT NULL, + PRIMARY KEY (`id_cart_rule_1`, `id_cart_rule_2`) +); + +CREATE TABLE `PREFIX_cart_rule_product_rule` ( + `id_product_rule` int(10) unsigned NOT NULL auto_increment, + `id_cart_rule` int(10) unsigned NOT NULL, + `quantity` int(10) unsigned NOT NULL default 1, + `type` ENUM('products', 'categories', 'attributes') NOT NULL, + PRIMARY KEY (`id_product_rule`) +); + +SET @id_currency_default = (SELECT value FROM `PREFIX_configuration` WHERE name = 'PS_CURRENCY_DEFAULT' LIMIT 1); +INSERT INTO `PREFIX_cart_rule` ( + `id_cart_rule`, + `id_customer`, + `date_from`, + `date_to`, + `description`, + `quantity`, + `quantity_per_user`, + `priority`, + `code`, + `minimum_amount`, + `minimum_amount_tax`, + `minimum_amount_currency`, + `minimum_amount_shipping`, + `country_restriction`, + `carrier_restriction`, + `group_restriction`, + `cart_rule_restriction`, + `product_restriction`, + `free_shipping`, + `reduction_percent`, + `reduction_amount`, + `reduction_tax`, + `reduction_currency`, + `reduction_product`, + `gift_product`, + `active`, + `date_add`, + `date_upd` +) ( + SELECT + `id_discount`, + `id_customer`, + `date_from`, + `date_to`, + `name`, + `quantity`, + `quantity_per_user`, + 1, + `name`, + `minimal`, + 1, + @id_currency_default, + 1, + 0, + 0, + IF(id_group = 0, 0, 1), + IF(cumulable = 1, 0, 1), + 0, + IF(id_discount_type = 3, 1, 0), + IF(id_discount_type = 1, value, 0), + IF(id_discount_type = 2, value, 0), + 1, + `id_currency`, + 0, + 0, + `active`, + `date_add`, + `date_upd` + FROM `PREFIX_discount` +); + +RENAME TABLE `PREFIX_discount_lang` TO `PREFIX_cart_rule_lang`; +ALTER TABLE `PREFIX_discount_lang` CHANGE `id_discount` `id_cart_rule` int(10) unsigned NOT NULL; +ALTER TABLE `PREFIX_discount_lang` CHANGE `description` `name` varchar(254) NOT NULL; +RENAME TABLE `PREFIX_discount_category` TO `PREFIX_cart_rule_product_rule_value`; +ALTER TABLE `PREFIX_cart_rule_product_rule_value` CHANGE `id_category` `id_item` int(10) unsigned NOT NULL; +ALTER TABLE `PREFIX_cart_rule_product_rule_value` CHANGE `id_discount` `id_product_rule` int(10) unsigned NOT NULL; +INSERT INTO `PREFIX_cart_rule_product_rule` (`id_product_rule`, `id_cart_rule`, `quantity`, `type`) ( + SELECT DISTINCT `id_product_rule`, `id_product_rule`, 1, 'categories' FROM `PREFIX_cart_rule_product_rule_value` +); +UPDATE `PREFIX_cart_rule` SET product_restriction = 1 WHERE `id_cart_rule` IN (SELECT `id_cart_rule` FROM `PREFIX_cart_rule_product_rule`); + +ALTER TABLE `PREFIX_cart_discount` CHANGE `id_discount` `id_cart_rule` int(10) unsigned NOT NULL; +ALTER TABLE `PREFIX_order_discount` CHANGE `id_discount` `id_cart_rule` int(10) unsigned NOT NULL; +ALTER TABLE `PREFIX_order_discount` CHANGE `id_order_discount` `id_order_cart_rule` int(10) unsigned NOT NULL; + +RENAME TABLE `PREFIX_order_discount` TO `PREFIX_order_cart_rule`; +RENAME TABLE `PREFIX_cart_discount` TO `PREFIX_cart_cart_rule`; + +CREATE VIEW `PREFIX_order_discount` AS SELECT *, id_cart_rule as id_discount FROM `PREFIX_order_cart_rule`; +CREATE VIEW `PREFIX_cart_discount` AS SELECT *, id_cart_rule as id_discount FROM `PREFIX_cart_cart_rule`; + +INSERT INTO `PREFIX_configuration` (`name`, `value`, `date_add`, `date_upd`) ( + SELECT 'PS_CART_RULE_FEATURE_ACTIVE', `value`, NOW(), NOW() FROM `PREFIX_configuration` WHERE `name` = 'PS_DISCOUNT_FEATURE_ACTIVE' LIMIT 1 +); + +UPDATE `PREFIX_tab` SET class_name = 'AdminCartRules' WHERE class_name = 'AdminDiscounts'; + + + + + +UPDATE `PREFIX_hook` SET `name` = 'displayPayment' WHERE `name` = 'payment'; +UPDATE `PREFIX_hook` SET `name` = 'actionValidateOrder' WHERE `name` = 'newOrder'; +UPDATE `PREFIX_hook` SET `name` = 'actionPaymentConfirmation' WHERE `name` = 'paymentConfirm'; +UPDATE `PREFIX_hook` SET `name` = 'displayPaymentReturn' WHERE `name` = 'paymentReturn'; +UPDATE `PREFIX_hook` SET `name` = 'actionUpdateQuantity' WHERE `name` = 'updateQuantity'; +UPDATE `PREFIX_hook` SET `name` = 'displayRightColumn' WHERE `name` = 'rightColumn'; +UPDATE `PREFIX_hook` SET `name` = 'displayLeftColumn' WHERE `name` = 'leftColumn'; +UPDATE `PREFIX_hook` SET `name` = 'displayHome' WHERE `name` = 'home'; +UPDATE `PREFIX_hook` SET `name` = 'displayHeader' WHERE `name` = 'header'; +UPDATE `PREFIX_hook` SET `name` = 'actionCartSave' WHERE `name` = 'cart'; +UPDATE `PREFIX_hook` SET `name` = 'actionAuthentication' WHERE `name` = 'authentication'; +UPDATE `PREFIX_hook` SET `name` = 'actionProductAdd' WHERE `name` = 'addproduct'; +UPDATE `PREFIX_hook` SET `name` = 'actionProductUpdate' WHERE `name` = 'updateproduct'; +UPDATE `PREFIX_hook` SET `name` = 'displayTop' WHERE `name` = 'top'; +UPDATE `PREFIX_hook` SET `name` = 'displayRightColumnProduct' WHERE `name` = 'extraRight'; +UPDATE `PREFIX_hook` SET `name` = 'actionProductDelete' WHERE `name` = 'deleteproduct'; +UPDATE `PREFIX_hook` SET `name` = 'displayFooterProduct' WHERE `name` = 'productfooter'; +UPDATE `PREFIX_hook` SET `name` = 'displayInvoice' WHERE `name` = 'invoice'; +UPDATE `PREFIX_hook` SET `name` = 'actionOrderStatusUpdate' WHERE `name` = 'updateOrderStatus'; +UPDATE `PREFIX_hook` SET `name` = 'displayAdminOrder' WHERE `name` = 'adminOrder'; +UPDATE `PREFIX_hook` SET `name` = 'displayFooter' WHERE `name` = 'footer'; +UPDATE `PREFIX_hook` SET `name` = 'displayPDFInvoice' WHERE `name` = 'PDFInvoice'; +UPDATE `PREFIX_hook` SET `name` = 'displayAdminCustomers' WHERE `name` = 'adminCustomers'; +UPDATE `PREFIX_hook` SET `name` = 'displayOrderConfirmation' WHERE `name` = 'orderConfirmation'; +UPDATE `PREFIX_hook` SET `name` = 'actionCustomerAccountAdd' WHERE `name` = 'createAccount'; +UPDATE `PREFIX_hook` SET `name` = 'displayCustomerAccount' WHERE `name` = 'customerAccount'; +UPDATE `PREFIX_hook` SET `name` = 'actionOrderSlipAdd' WHERE `name` = 'orderSlip'; +UPDATE `PREFIX_hook` SET `name` = 'displayProductTab' WHERE `name` = 'productTab'; +UPDATE `PREFIX_hook` SET `name` = 'displayProductTabContent' WHERE `name` = 'productTabContent'; +UPDATE `PREFIX_hook` SET `name` = 'displayShoppingCartFooter' WHERE `name` = 'shoppingCart'; +UPDATE `PREFIX_hook` SET `name` = 'displayCustomerAccountForm' WHERE `name` = 'createAccountForm'; +UPDATE `PREFIX_hook` SET `name` = 'displayAdminStatsModules' WHERE `name` = 'AdminStatsModules'; +UPDATE `PREFIX_hook` SET `name` = 'displayAdminStatsGraphEngine' WHERE `name` = 'GraphEngine'; +UPDATE `PREFIX_hook` SET `name` = 'actionOrderReturn' WHERE `name` = 'orderReturn'; +UPDATE `PREFIX_hook` SET `name` = 'displayProductButtons' WHERE `name` = 'productActions'; +UPDATE `PREFIX_hook` SET `name` = 'displayBackOfficeHome' WHERE `name` = 'backOfficeHome'; +UPDATE `PREFIX_hook` SET `name` = 'displayAdminStatsGridEngine' WHERE `name` = 'GridEngine'; +UPDATE `PREFIX_hook` SET `name` = 'actionWatermark' WHERE `name` = 'watermark'; +UPDATE `PREFIX_hook` SET `name` = 'actionProductCancel' WHERE `name` = 'cancelProduct'; +UPDATE `PREFIX_hook` SET `name` = 'displayLeftColumnProduct' WHERE `name` = 'extraLeft'; +UPDATE `PREFIX_hook` SET `name` = 'actionProductOutOfStock' WHERE `name` = 'productOutOfStock'; +UPDATE `PREFIX_hook` SET `name` = 'actionProductAttributeUpdate' WHERE `name` = 'updateProductAttribute'; +UPDATE `PREFIX_hook` SET `name` = 'displayCarrierList' WHERE `name` = 'extraCarrier'; +UPDATE `PREFIX_hook` SET `name` = 'displayShoppingCart' WHERE `name` = 'shoppingCartExtra'; +UPDATE `PREFIX_hook` SET `name` = 'actionSearch' WHERE `name` = 'search'; +UPDATE `PREFIX_hook` SET `name` = 'displayBeforePayment' WHERE `name` = 'backBeforePayment'; +UPDATE `PREFIX_hook` SET `name` = 'actionCarrierUpdate' WHERE `name` = 'updateCarrier'; +UPDATE `PREFIX_hook` SET `name` = 'actionOrderStatusPostUpdate' WHERE `name` = 'postUpdateOrderStatus'; +UPDATE `PREFIX_hook` SET `name` = 'displayCustomerAccountFormTop' WHERE `name` = 'createAccountTop'; +UPDATE `PREFIX_hook` SET `name` = 'displayBackOfficeHeader' WHERE `name` = 'backOfficeHeader'; +UPDATE `PREFIX_hook` SET `name` = 'displayBackOfficeTop' WHERE `name` = 'backOfficeTop'; +UPDATE `PREFIX_hook` SET `name` = 'displayBackOfficeFooter' WHERE `name` = 'backOfficeFooter'; +UPDATE `PREFIX_hook` SET `name` = 'actionProductAttributeDelete' WHERE `name` = 'deleteProductAttribute'; +UPDATE `PREFIX_hook` SET `name` = 'actionCarrierProcess' WHERE `name` = 'processCarrier'; +UPDATE `PREFIX_hook` SET `name` = 'actionOrderDetail' WHERE `name` = 'orderDetail'; +UPDATE `PREFIX_hook` SET `name` = 'displayBeforeCarrier' WHERE `name` = 'beforeCarrier'; +UPDATE `PREFIX_hook` SET `name` = 'displayOrderDetail' WHERE `name` = 'orderDetailDisplayed'; +UPDATE `PREFIX_hook` SET `name` = 'actionPaymentCCAdd' WHERE `name` = 'paymentCCAdded'; +UPDATE `PREFIX_hook` SET `name` = 'displayProductComparison' WHERE `name` = 'extraProductComparison'; +UPDATE `PREFIX_hook` SET `name` = 'actionCategoryAdd' WHERE `name` = 'categoryAddition'; +UPDATE `PREFIX_hook` SET `name` = 'actionCategoryUpdate' WHERE `name` = 'categoryUpdate'; +UPDATE `PREFIX_hook` SET `name` = 'actionCategoryDelete' WHERE `name` = 'categoryDeletion'; +UPDATE `PREFIX_hook` SET `name` = 'actionBeforeAuthentication' WHERE `name` = 'beforeAuthentication'; +UPDATE `PREFIX_hook` SET `name` = 'displayPaymentTop' WHERE `name` = 'paymentTop'; +UPDATE `PREFIX_hook` SET `name` = 'actionHtaccessCreate' WHERE `name` = 'afterCreateHtaccess'; +UPDATE `PREFIX_hook` SET `name` = 'actionAdminMetaSave' WHERE `name` = 'afterSaveAdminMeta'; +UPDATE `PREFIX_hook` SET `name` = 'displayAttributeGroupForm' WHERE `name` = 'attributeGroupForm'; +UPDATE `PREFIX_hook` SET `name` = 'actionAttributeGroupSave' WHERE `name` = 'afterSaveAttributeGroup'; +UPDATE `PREFIX_hook` SET `name` = 'actionAttributeGroupDelete' WHERE `name` = 'afterDeleteAttributeGroup'; +UPDATE `PREFIX_hook` SET `name` = 'displayFeatureForm' WHERE `name` = 'featureForm'; +UPDATE `PREFIX_hook` SET `name` = 'actionFeatureSave' WHERE `name` = 'afterSaveFeature'; +UPDATE `PREFIX_hook` SET `name` = 'actionFeatureDelete' WHERE `name` = 'afterDeleteFeature'; +UPDATE `PREFIX_hook` SET `name` = 'actionProductSave' WHERE `name` = 'afterSaveProduct'; +UPDATE `PREFIX_hook` SET `name` = 'actionProductListOverride' WHERE `name` = 'productListAssign'; +UPDATE `PREFIX_hook` SET `name` = 'displayAttributeGroupPostProcess' WHERE `name` = 'postProcessAttributeGroup'; +UPDATE `PREFIX_hook` SET `name` = 'displayFeaturePostProcess' WHERE `name` = 'postProcessFeature'; +UPDATE `PREFIX_hook` SET `name` = 'displayFeatureValueForm' WHERE `name` = 'featureValueForm'; +UPDATE `PREFIX_hook` SET `name` = 'displayFeatureValuePostProcess' WHERE `name` = 'postProcessFeatureValue'; +UPDATE `PREFIX_hook` SET `name` = 'actionFeatureValueDelete' WHERE `name` = 'afterDeleteFeatureValue'; +UPDATE `PREFIX_hook` SET `name` = 'actionFeatureValueSave' WHERE `name` = 'afterSaveFeatureValue'; +UPDATE `PREFIX_hook` SET `name` = 'displayAttributeForm' WHERE `name` = 'attributeForm'; +UPDATE `PREFIX_hook` SET `name` = 'actionAttributePostProcess' WHERE `name` = 'postProcessAttribute'; +UPDATE `PREFIX_hook` SET `name` = 'actionAttributeDelete' WHERE `name` = 'afterDeleteAttribute'; +UPDATE `PREFIX_hook` SET `name` = 'actionAttributeSave' WHERE `name` = 'afterSaveAttribute'; +UPDATE `PREFIX_hook` SET `name` = 'actionTaxManager' WHERE `name` = 'taxManager'; + +ALTER TABLE `PREFIX_specific_price` ADD `id_product_attribute` INT UNSIGNED NOT NULL AFTER `id_product`; +ALTER TABLE `PREFIX_specific_price` DROP INDEX `id_product`; +ALTER TABLE `PREFIX_specific_price` ADD INDEX `id_product` (`id_product`, `id_product_attribute`, `id_shop`, `id_currency`, `id_country`, `id_group`, `from_quantity`, `from`, `to`); + +ALTER TABLE `PREFIX_hook` ADD `is_native` TINYINT( 1 ) NOT NULL DEFAULT '0'; + +/* PHP:add_new_tab(AdminAttributeGenerator, fr:Générateur de combinaisons|es:Combinations generator|en:Combinations generator|de:Combinations generator|it:Combinations generator, 1); */; diff --git a/install-new/upgrade/xml/checkConfig.php b/install-new/upgrade/xml/checkConfig.php new file mode 100644 index 000000000..f1d6240b1 --- /dev/null +++ b/install-new/upgrade/xml/checkConfig.php @@ -0,0 +1,89 @@ + +* @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 +*/ +header("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1 +header("Expires: Sat, 26 Jul 1997 05:00:00 GMT"); // Date dans le passé +if (!class_exists('ConfigurationTest',false)) + require_once(INSTALL_PATH.'/../classes/ConfigurationTest.php'); + +// Functions list to test with 'test_system' +$funcs = array('fopen', 'fclose', 'fread', 'fwrite', 'rename', 'file_exists', 'unlink', 'rmdir', 'mkdir', 'getcwd', 'chdir', 'chmod'); + +// Test list to execute (function/args) +$tests = array( + 'phpversion' => false, + 'upload' => false, + 'system' => $funcs, + 'gd' => false, + 'mysql_support' => false, + 'config_dir' => 'config', + 'cache_dir' => 'cache', + 'sitemap' => 'sitemap.xml', + 'log_dir' => 'log', + 'img_dir' => 'img', + 'mails_dir' => 'mails/', + 'module_dir' => 'modules/', + 'theme_lang_dir' => 'themes/prestashop/lang', + 'theme_cache_dir' => 'themes/prestashop/cache', + 'translations_dir' => 'translations', + 'customizable_products_dir' => 'upload', + 'virtual_products_dir' => 'download', +); +$tests_op = array( + 'fopen' => false, + 'register_globals' => false, + 'gz' => false, + 'mcrypt' => false, + 'magicquotes' => false, + 'dom' => false, +); + +// Execute tests +$res = ConfigurationTest::check($tests); +$res_op = ConfigurationTest::check($tests_op); + +$has_error = false; + +// Building XML Tree... +echo ''."\n"; + echo ''."\n"; + echo ''."\n"; + foreach ($res AS $key => $line) + { + if ($line == 'fail') $has_error = true; + echo ''."\n"; + } + echo ''."\n"; + echo ''."\n"; + foreach ($res_op AS $key => $line) + { + if ($line == 'fail') $has_error = true; + echo ''."\n"; + } + echo ''."\n"; +echo ''; + + diff --git a/install-new/upgrade/xml/checkDB.php b/install-new/upgrade/xml/checkDB.php new file mode 100644 index 000000000..3c35a9760 --- /dev/null +++ b/install-new/upgrade/xml/checkDB.php @@ -0,0 +1,29 @@ + +* @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 +*/ +include_once(INSTALL_PATH.'/classes/ToolsInstall.php'); +$resultDB = ToolsInstall::checkDB($_GET['server'], $_GET['login'], $_GET['password'], $_GET['name'], true, $_GET['engine']); +die("\n"); diff --git a/install-new/upgrade/xml/checkMail.php b/install-new/upgrade/xml/checkMail.php new file mode 100644 index 000000000..52d8d42bb --- /dev/null +++ b/install-new/upgrade/xml/checkMail.php @@ -0,0 +1,44 @@ + +* @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 +*/ + +include_once(INSTALL_PATH.'/classes/ToolsInstall.php'); + +$smtpChecked = (trim($_GET['mailMethod']) == 'smtp'); +$smtpServer = $_GET['smtpSrv']; +$content = $_GET['testMsg']; +$subject = $_GET['testSubject']; +$type = 'text/html'; +$to = $_GET['testEmail']; +$from = 'no-reply@'.ToolsInstall::getHttpHost(false, true, true); +$smtpLogin = $_GET['smtpLogin']; +$smtpPassword = $_GET['smtpPassword']; +$smtpPort = $_GET['smtpPort']; +$smtpEncryption = $_GET['smtpEnc']; + +$result = ToolsInstall::sendMail($smtpChecked, $smtpServer, $content, $subject, $type, $to, $from, $smtpLogin, $smtpPassword, $smtpPort, $smtpEncryption); +die($result ? '' : ''); + diff --git a/install-new/upgrade/xml/checkShopInfos.php b/install-new/upgrade/xml/checkShopInfos.php new file mode 100644 index 000000000..1ddfa0afc --- /dev/null +++ b/install-new/upgrade/xml/checkShopInfos.php @@ -0,0 +1,294 @@ + +* @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 +*/ + +if (function_exists('date_default_timezone_set')) + date_default_timezone_set('Europe/Paris'); + +define('_PS_MAGIC_QUOTES_GPC_', get_magic_quotes_gpc()); + +require_once(INSTALL_PATH.'/classes/AddConfToFile.php'); +require_once(INSTALL_PATH.'/../classes/Validate.php'); +require_once(INSTALL_PATH.'/../classes/db/Db.php'); +require_once(INSTALL_PATH.'/../classes/Tools.php'); +require_once(INSTALL_PATH.'/../config/settings.inc.php'); + +Context::getContext()->shop = Shop::initialize(); +define('_THEME_NAME_', Context::getContext()->shop->getTheme()); +define('__PS_BASE_URI__', Context::getContext()->shop->getBaseURI()); + +function isFormValid() +{ + global $error; + + foreach ($error as $anError) + if ($anError != '') + return false; + return true; +} + +$error = array(); +foreach ($_GET AS &$var) +{ + if (is_string($var)) + $var = html_entity_decode($var, ENT_COMPAT, 'UTF-8'); + elseif (is_array($var)) + foreach ($var AS &$row) + $row = html_entity_decode($row, ENT_COMPAT, 'UTF-8'); +} + +if(!isset($_GET['infosShop']) OR empty($_GET['infosShop'])) + $error['infosShop'] = '0'; +else + $error['infosShop'] = ''; + +if(!isset($_GET['infosFirstname']) OR empty($_GET['infosFirstname'])) + $error['infosFirstname'] = '0'; +else + $error['infosFirstname'] = ''; + +if(!isset($_GET['infosName']) OR empty($_GET['infosName'])) + $error['infosName'] = '0'; +else + $error['infosName'] = ''; + +if(isset($_GET['infosEmail']) AND !Validate::isEmail($_GET['infosEmail'])) + $error['infosEmail'] = '3'; +else + $error['infosEmail'] = ''; + +if (isset($_GET['infosShop']) AND !Validate::isGenericName($_GET['infosShop'])) + $error['validateShop'] = '46'; +else + $error['validateShop'] = ''; + +if (!isset($_GET['infosCountry']) OR empty($_GET['infosCountry'])) + $error['infosCountry'] = '0'; +else + $error['infosCountry'] = ''; + +if (!isset($_GET['infosTimezone']) OR empty($_GET['infosTimezone'])) + $error['infosTimezone'] = '0'; +else + $error['infosTimezone'] = ''; + +if (isset($_GET['infosFirstname']) AND !Validate::isName($_GET['infosFirstname'])) + $error['validateFirstname'] = '47'; +else + $error['validateFirstname'] = ''; + +if (isset($_GET['infosName']) AND !Validate::isName($_GET['infosName'])) + $error['validateName'] = '48'; +else + $error['validateName'] = ''; + +if (isset($_GET['catalogMode']) AND !Validate::isInt($_GET['catalogMode'])) + $error['validateCatalogMode'] = '52'; +else + $error['validateCatalogMode'] = ''; + +if(!isset($_GET['infosEmail']) OR empty($_GET['infosEmail'])) + $error['infosEmail'] = '0'; + +if (!isset($_GET['infosPassword']) OR empty($_GET['infosPassword'])) + $error['infosPassword'] = '0'; +else + $error['infosPassword'] = ''; + +if (!isset($_GET['infosPasswordRepeat']) OR empty($_GET['infosPasswordRepeat'])) + $error['infosPasswordRepeat'] = '0'; +else + $error['infosPasswordRepeat'] = ''; + +if($error['infosPassword'] == '' AND $_GET['infosPassword'] != $_GET['infosPasswordRepeat']) + $error['infosPassword'] = '2'; + +if($error['infosPassword'] == '' AND (Tools::strlen($_GET['infosPassword']) < 8 OR !Validate::isPasswdAdmin($_GET['infosPassword']))) + $error['infosPassword'] = '12'; + +///////////////////////////// +// IF ALL IS OK DO THE NEXT// +///////////////////////////// + +include_once(INSTALL_PATH.'/classes/ToolsInstall.php'); +$dbInstance = Db::getInstance(); +// set Languages +$error['infosLanguages'] = ''; +if(isFormValid()) +{ + /*$idDefault = array_search($_GET['infosDL'][0], $_GET['infosWL']) + 1; + //prepare the requests + $sqlLanguages = array(); + + $sqlLanguages[] = "UPDATE `"._DB_PREFIX_."configuration` SET `value` = '".$idDefault."' WHERE `"._DB_PREFIX_."configuration`.`id_configuration` =1"; + $sqlLanguages[] = "TRUNCATE TABLE `"._DB_PREFIX_."lang`"; + + foreach ($_GET['infosWL'] AS $wl) + $sqlLanguages[] = "INSERT INTO `"._DB_PREFIX_."lang` (`id_lang` ,`name` ,`active` ,`iso_code`)VALUES (NULL , '".ToolsInstall::getLangString($wl)."', '1', '".pSQL($wl)."')"; + foreach($sqlLanguages AS $query) + if(!Db::getInstance()->execute($query)) + $error['infosLanguages'] = '11'; + + // Flags copy + if(!$languagesId = Db::getInstance()->executeS('SELECT `id_lang`, `iso_code` FROM `'._DB_PREFIX_.'lang`')) + $error['infosLanguages'] = '11'; + + unset($dbInstance);*/ +} + +// Mail Notification +$error['infosNotification'] = ''; +if (isFormValid()) +{ + if (isset($_GET['infosNotification']) AND $_GET['infosNotification'] == 'on') { + include_once(INSTALL_PATH.'/classes/ToolsInstall.php'); + $smtpChecked = (trim($_GET['infosMailMethod']) == 'smtp'); + $smtpServer = $_GET['smtpSrv']; + $subject = $_GET['infosShop']." - " . $_GET['mailSubject']; + $type = 'text/html'; + $to = $_GET['infosEmail']; + $from = "no-reply@".ToolsInstall::getHttpHost(false, true, true); + $smtpLogin = $_GET['smtpLogin']; + $smtpPassword = $_GET['smtpPassword']; + $smtpPort = $_GET['smtpPort'];//'default','secure' + $smtpEncryption = $_GET['smtpEnc'];//"tls","ssl","off" + $content = ToolsInstall::getNotificationMail($_GET['infosShop'], INSTALLER__PS_BASE_URI_ABSOLUTE, INSTALLER__PS_BASE_URI_ABSOLUTE."img/logo.jpg", ToolsInstall::strtoupper($_GET['infosFirstname']), $_GET['infosName'], $_GET['infosPassword'], $_GET['infosEmail']); + + $result = @ToolsInstall::sendMail($smtpChecked, $smtpServer, $content, $subject, $type, $to, $from, $smtpLogin, $smtpPassword, $smtpPort, $smtpEncryption); + } +} + +//Insert configuration parameters into the database +$error['infosInsertSQL'] = ''; +if (isFormValid()) +{ + $sqlParams = array(); + $sqlParams[] = "INSERT IGNORE INTO "._DB_PREFIX_."configuration (name, value, date_add, date_upd) VALUES ('PS_SHOP_DOMAIN', '".Tools::getHttpHost()."', NOW(), NOW())"; + $sqlParams[] = "INSERT IGNORE INTO "._DB_PREFIX_."configuration (name, value, date_add, date_upd) VALUES ('PS_SHOP_DOMAIN_SSL', '".Tools::getHttpHost()."', NOW(), NOW())"; + $sqlParams[] = "INSERT IGNORE INTO "._DB_PREFIX_."configuration (name, value, date_add, date_upd) VALUES ('PS_INSTALL_VERSION', '".pSQL(INSTALL_VERSION)."', NOW(), NOW())"; + $sqlParams[] = "INSERT IGNORE INTO "._DB_PREFIX_."configuration (name, value, date_add, date_upd) VALUES ('PS_SHOP_NAME', '".pSQL($_GET['infosShop'])."', NOW(), NOW())"; + $sqlParams[] = "INSERT IGNORE INTO "._DB_PREFIX_."configuration (name, value, date_add, date_upd) VALUES ('PS_SHOP_EMAIL', '".pSQL($_GET['infosEmail'])."', NOW(), NOW())"; + $sqlParams[] = "INSERT IGNORE INTO "._DB_PREFIX_."configuration (name, value, date_add, date_upd) VALUES ('PS_MAIL_METHOD', '".pSQL($_GET['infosMailMethod'] == "smtp" ? "2": "1")."', NOW(), NOW())"; + $sqlParams[] = 'UPDATE '._DB_PREFIX_.'configuration SET value = \''.pSQL($_GET['isoCode']).'\' WHERE name = \'PS_LOCALE_LANGUAGE\''; + $sqlParams[] = 'UPDATE '._DB_PREFIX_.'configuration SET value = \''.(int)$_GET['catalogMode'].'\' WHERE name = \'PS_CATALOG_MODE\''; + $sqlParams[] = "INSERT IGNORE INTO "._DB_PREFIX_."configuration (name, value, date_add, date_upd) VALUES ('PS_SHOP_ACTIVITY', '".(int)($_GET['infosActivity'])."', NOW(), NOW())"; + if ((int)($_GET['infosCountry']) != 0) + { + $sqlParams[] = 'UPDATE '._DB_PREFIX_.'configuration SET value = '.(int)($_GET['infosCountry']).' WHERE name = \'PS_COUNTRY_DEFAULT\''; + $sqlParams[] = 'UPDATE '._DB_PREFIX_.'configuration SET value = "'.pSQL($_GET['infosTimezone']).'" WHERE name = \'PS_TIMEZONE\''; + $sql_isocode = Db::getInstance()->getValue('SELECT `iso_code` FROM `'._DB_PREFIX_.'country` WHERE `id_country` = '.(int)($_GET['infosCountry'])); + $sqlParams[] = 'UPDATE '._DB_PREFIX_.'configuration SET value = \''.pSQL($sql_isocode).'\' WHERE name = \'PS_LOCALE_COUNTRY\''; + + } + Language::loadLanguages(); + Configuration::loadConfiguration(); + require_once(DEFINES_FILE); + require_once(INSTALL_PATH.'/../classes/LocalizationPack.php'); + + + $stream_context = @stream_context_create(array('http' => array('timeout' => 5))); + $localization_file = @Tools::file_get_contents('http://www.prestashop.com/download/localization_pack.php?country='.$_GET['countryName'], false, $stream_context); + if (!$localization_file AND file_exists(dirname(__FILE__).'/../../localization/'.strtolower($_GET['countryName']).'.xml')) + $localization_file = @file_get_contents(dirname(__FILE__).'/../../localization/'.strtolower($_GET['countryName']).'.xml'); + if ($localization_file) + { + $localizationPack = new LocalizationPackCore(); + $localizationPack->loadLocalisationPack($localization_file, '', true); + + if (Configuration::get('PS_LANG_DEFAULT') == 1) + { + $sqlParams[] = 'UPDATE `'._DB_PREFIX_.'configuration` SET `value` = (SELECT id_lang FROM '._DB_PREFIX_.'lang WHERE iso_code = \''.pSQL($_GET['isoCode']).'\') WHERE name = \'PS_LANG_DEFAULT\''; + // This request is used when _PS_MODE_DEV_ is set to true + $sqlParams[] = 'UPDATE `'._DB_PREFIX_.'lang` SET `active` = 0 WHERE `iso_code` != \''.pSQL($_GET['isoCode']).'\''; + } + else + $sqlParams[] = 'UPDATE `'._DB_PREFIX_.'lang` SET `active` = 0 WHERE `id_lang` != '.Configuration::get('PS_LANG_DEFAULT'); + } + if (isset($_GET['infosMailMethod']) AND $_GET['infosMailMethod'] == "smtp") + { + $sqlParams[] = "INSERT INTO "._DB_PREFIX_."configuration (name, value, date_add, date_upd) VALUES ('PS_MAIL_SERVER', '".pSQL($_GET['smtpSrv'])."', NOW(), NOW())"; + $sqlParams[] = "INSERT INTO "._DB_PREFIX_."configuration (name, value, date_add, date_upd) VALUES ('PS_MAIL_USER', '".pSQL($_GET['smtpLogin'])."', NOW(), NOW())"; + $sqlParams[] = "INSERT INTO "._DB_PREFIX_."configuration (name, value, date_add, date_upd) VALUES ('PS_MAIL_PASSWD', '".pSQL($_GET['smtpPassword'])."', NOW(), NOW())"; + $sqlParams[] = "INSERT INTO "._DB_PREFIX_."configuration (name, value, date_add, date_upd) VALUES ('PS_MAIL_SMTP_ENCRYPTION', '".pSQL($_GET['smtpEnc'])."', NOW(), NOW())"; + $sqlParams[] = "INSERT INTO "._DB_PREFIX_."configuration (name, value, date_add, date_upd) VALUES ('PS_MAIL_SMTP_PORT', '".pSQL($_GET['smtpPort'])."', NOW(), NOW())"; + } + $sqlParams[] = 'INSERT INTO '._DB_PREFIX_.'employee (id_employee, lastname, firstname, email, passwd, last_passwd_gen, bo_theme, active, id_profile, id_lang, bo_show_screencast) VALUES (NULL, \''.pSQL(ToolsInstall::ucfirst($_GET['infosName'])).'\', \''.pSQL(ToolsInstall::ucfirst($_GET['infosFirstname'])).'\', \''.pSQL($_GET['infosEmail']).'\', \''.md5(pSQL(_COOKIE_KEY_.$_GET['infosPassword'])).'\', \''.date('Y-m-d h:i:s', strtotime('-360 minutes')).'\', \'oldschool\', 1, 1, (SELECT `value` FROM `'._DB_PREFIX_.'configuration` WHERE `name` = \'PS_LANG_DEFAULT\' LIMIT 1), 1)'; + $sqlParams[] = 'INSERT INTO '._DB_PREFIX_.'employee_shop (id_employee, id_shop) VALUES (1 ,1)'; + $sqlParams[] = 'INSERT INTO '._DB_PREFIX_.'contact (id_contact, email, customer_service) VALUES (NULL, \''.pSQL($_GET['infosEmail']).'\', 1), (NULL, \''.pSQL($_GET['infosEmail']).'\', 1)'; + + if (function_exists('mcrypt_encrypt')) + { + $settings = file_get_contents(dirname(__FILE__).'/../../config/settings.inc.php'); + if (!strstr($settings, '_RIJNDAEL_KEY_')) + { + $key_size = mcrypt_get_key_size(MCRYPT_RIJNDAEL_128, MCRYPT_MODE_ECB); + $key = Tools::passwdGen($key_size); + $settings = preg_replace('/define\(\'_COOKIE_KEY_\', \'([a-z0-9=\/+-_]+)\'\);/i', 'define(\'_COOKIE_KEY_\', \'\1\');'."\n".'define(\'_RIJNDAEL_KEY_\', \''.$key.'\');', $settings); + } + if (!strstr($settings, '_RIJNDAEL_IV_')) + { + $iv_size = mcrypt_get_iv_size(MCRYPT_RIJNDAEL_128, MCRYPT_MODE_ECB); + $iv = base64_encode(mcrypt_create_iv($iv_size, MCRYPT_RAND)); + $settings = preg_replace('/define\(\'_COOKIE_IV_\', \'([a-z0-9=\/+-_]+)\'\);/i', 'define(\'_COOKIE_IV_\', \'\1\');'."\n".'define(\'_RIJNDAEL_IV_\', \''.$iv.'\');', $settings); + } + if (file_put_contents(dirname(__FILE__).'/../../config/settings.inc.php', $settings)) + $sqlParams[] = 'UPDATE '._DB_PREFIX_.'configuration SET value = 1 WHERE name = \'PS_CIPHER_ALGORITHM\''; + } + + if (file_exists(realpath(INSTALL_PATH.'/../img').'/logo.jpg')) + { + list($width, $height, $type, $attr) = getimagesize(realpath(INSTALL_PATH.'/../img').'/logo.jpg'); + $sqlParams[] = 'UPDATE '._DB_PREFIX_.'configuration SET value = '.(int)round($width).' WHERE name = \'SHOP_LOGO_WIDTH\''; + $sqlParams[] = 'UPDATE '._DB_PREFIX_.'configuration SET value = '.(int)round($height).' WHERE name = \'SHOP_LOGO_HEIGHT\''; + } + + if ((int)$_GET['catalogMode'] == 1) + { + $sqlParams[] = 'DELETE c, cl FROM `'._DB_PREFIX_.'cms` AS c LEFT JOIN `'._DB_PREFIX_.'cms_lang` AS cl ON c.id_cms = cl.id_cms WHERE 1 AND c.`id_cms` IN (1, 5)'; + } + + $dbInstance = Db::getInstance(); + foreach($sqlParams as $query) + if(!$dbInstance->Execute($query)) + $error['infosInsertSQL'] = '11'; + unset($dbInstance); +} + +////////////////////////// +// Building XML Response// +////////////////////////// + +global $logger; +echo ''."\n"; +foreach ($error AS $key => $line) +{ + if ($line != '') + $logger->logError($key.' => '.$line); + + echo ''."\n"; +} +echo ''; + diff --git a/install-new/upgrade/xml/createDB.php b/install-new/upgrade/xml/createDB.php new file mode 100644 index 000000000..d41b815e2 --- /dev/null +++ b/install-new/upgrade/xml/createDB.php @@ -0,0 +1,242 @@ + +* @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 +*/ + +if (!defined('_PS_MAGIC_QUOTES_GPC_')) + define('_PS_MAGIC_QUOTES_GPC_', get_magic_quotes_gpc()); + +if (function_exists('date_default_timezone_set')) + date_default_timezone_set('Europe/Paris'); + +//delete settings file if it exist +if (file_exists(SETTINGS_FILE)) + if (!unlink(SETTINGS_FILE)) + die(''."\n"); + +require_once(INSTALL_PATH.'/classes/AddConfToFile.php'); +require_once(INSTALL_PATH.'/../classes/Validate.php'); +require_once(INSTALL_PATH.'/../classes/db/Db.php'); +require_once(INSTALL_PATH.'/../classes/Tools.php'); + +global $logger; + +//check db access +include_once(INSTALL_PATH.'/classes/ToolsInstall.php'); +$resultDB = ToolsInstall::checkDB($_GET['server'], $_GET['login'], $_GET['password'], $_GET['name'], true); +if ($resultDB !== true) +{ + $logger->logError('Invalid database configuration'); + die("\n"); +} + +if (!isset($_GET['mode']) OR ($_GET['mode'] != "full" AND $_GET['mode'] != "lite")) + die(''."\n"); + +// Writing data in settings file +$oldLevel = error_reporting(E_ALL); +$_PS_DIRECTORY_ = trim(str_replace(' ', '%20', INSTALLER__PS_BASE_URI), '/'); +$_PS_DIRECTORY_ = ($_PS_DIRECTORY_) ? '/'.$_PS_DIRECTORY_.'/' : '/'; +$datas = array( + array('_DB_SERVER_', trim($_GET['server'])), + array('_DB_TYPE_', 'MySQL'), + array('_DB_NAME_', trim($_GET['name'])), + array('_DB_USER_', trim($_GET['login'])), + array('_DB_PASSWD_', trim($_GET['password'])), + array('_DB_PREFIX_', trim($_GET['tablePrefix'])), + array('_MYSQL_ENGINE_', trim($_GET['engine'])), + array('_PS_CACHING_SYSTEM_', 'CacheMemcache'), + array('_PS_CACHE_ENABLED_', '0'), + array('_MEDIA_SERVER_1_', ''), + array('_MEDIA_SERVER_2_', ''), + array('_MEDIA_SERVER_3_', ''), + array('_COOKIE_KEY_', Tools::passwdGen(56)), + array('_COOKIE_IV_', Tools::passwdGen(8)), + array('_PS_CREATION_DATE_', date('Y-m-d')), + array('_PS_VERSION_', INSTALL_VERSION) +); +error_reporting($oldLevel); +$confFile = new AddConfToFile(SETTINGS_FILE, 'w'); +if ($confFile->error) + die(''."\n"); + +foreach ($datas AS $data){ + $confFile->writeInFile($data[0], $data[1]); +} +$confFile->writeEndTagPhp(); + +// Settings updated, compile and cache directories must be emptied +foreach (array(INSTALL_PATH.'/../tools/smarty/cache/', INSTALL_PATH.'/../tools/smarty/compile/', INSTALL_PATH.'/../tools/smarty_v2/cache/', INSTALL_PATH.'/../tools/smarty_v2/compile/') as $dir) + if (file_exists($dir)) + foreach (scandir($dir) as $file) + if ($file[0] != '.' AND $file != 'index.php') + unlink($dir.$file); + +if ($confFile->error != false) + die(''."\n"); + +//load new settings, and fatal error if you can't +require_once(SETTINGS_FILE); + +//----------- +//import SQL data +//----------- +switch (_DB_TYPE_) +{ + case 'MySQL': + + $filePrefix = 'PREFIX_'; + $engineType = 'ENGINE_TYPE'; + //send the SQL structure file requests + $structureFile = dirname(__FILE__).'/../sql/db.sql'; + if(!file_exists($structureFile)) + { + $logger->logError('Impossible to access to a MySQL content file. ('.$structureFile.')'); + die(''."\n"); + } + $db_structure_settings = ''; + if ( !$db_structure_settings .= file_get_contents($structureFile) ) + { + $logger->logError('Impossible to read the content of a MySQL content file. ('.$structureFile.')'); + die(''."\n"); + } + $db_structure_settings = str_replace(array($filePrefix, $engineType), array($_GET['tablePrefix'], $_GET['engine']), $db_structure_settings); + $db_structure_settings = preg_split("/;\s*[\r\n]+/",$db_structure_settings); + if (isset($_GET['dropAndCreate']) && $_GET['dropAndCreate'] == 'true') + { + array_unshift($db_structure_settings, 'USE `'.trim($_GET['name']).'`;'); + array_unshift($db_structure_settings, 'CREATE DATABASE `'.trim($_GET['name']).'`;'); + array_unshift($db_structure_settings, 'DROP DATABASE `'.trim($_GET['name']).'`;'); + } + foreach ($db_structure_settings as $query) + { + $query = trim($query); + if (!empty($query)) + { + if (!Db::getInstance()->Execute($query)) + { + if (Db::getInstance()->getNumberError() == 1050) + { + $logger->logError('A Prestashop database already exists, please drop it or change the prefix.'); + die(''."\n"); + } + else + { + $logger->logError('SQL query: '."\r\n".$query); + $logger->logError('SQL error: '."\r\n".Db::getInstance()->getMsgError()); + die( + '' + ); + } + } + } + } + + //send the SQL data file requests + $db_data_settings = ''; + + $liteFile = dirname(__FILE__).'/../sql/db_settings_lite.sql'; + if(!file_exists($liteFile)) + die(''."\n"); + if ( !$db_data_settings .= file_get_contents( $liteFile ) ) + die(''."\n"); + + if ($_GET['mode'] == 'full') + { + $fullFile = dirname(__FILE__).'/../sql/db_settings_extends.sql'; + if(!file_exists($fullFile)) + { + $logger->logError('Impossible to access to a MySQL content file. ('.$fullFile.')'); + die(''."\n"); + } + if (!$db_data_settings .= file_get_contents($fullFile)) + { + $logger->logError('Impossible to read the content of a MySQL content file. ('.$fullFile.')'); + die(''."\n"); + } + } + $db_data_settings .= "\n".'INSERT INTO `PREFIX_shop_url` (`id_shop`, `domain`, `domain_ssl`, `physical_uri`, `virtual_uri`, `main`, `active`) VALUES(1, \''.pSQL(Tools::getHttpHost()).'\', \''.pSQL(Tools::getHttpHost()).'\', \''.pSQL($_PS_DIRECTORY_).'\', \'\', 1, 1);'; + $db_data_settings .= "\n".'UPDATE `PREFIX_customer` SET `passwd` = \''.md5(_COOKIE_KEY_.'123456789').'\' WHERE `id_customer` =1;'; + $db_data_settings .= "\n".'INSERT INTO `PREFIX_configuration` (name, value, date_add, date_upd) VALUES (\'PS_VERSION_DB\', \'' . INSTALL_VERSION . '\', NOW(), NOW());'; + $db_data_settings = str_replace(array($filePrefix, $engineType), array($_GET['tablePrefix'], $_GET['engine']), $db_data_settings); + $db_data_settings = preg_split("/;\s*[\r\n]+/",$db_data_settings); + /* UTF-8 support */ + array_unshift($db_data_settings, 'SET NAMES \'utf8\';'); + foreach ($db_data_settings as $query) + { + $query = trim($query); + if (!empty($query)) + { + if (!Db::getInstance()->Execute($query)) + { + if (Db::getInstance()->getNumberError() == 1050) + die(''."\n"); + else + { + $logger->logError('SQL query: '."\r\n".$query); + $logger->logError('SQL error: '."\r\n".Db::getInstance()->getMsgError()); + die( + '' + ); + } + } + } + } + break; +} + +$xml = ''."\n"; + +$countries = Db::getInstance()->executeS(' +SELECT c.`id_country`, cl.`name`, c.`iso_code` FROM `'.$_GET['tablePrefix'].'country` c +INNER JOIN `'.$_GET['tablePrefix'].'country_lang` cl ON (c.`id_country` = cl.`id_country`) +WHERE cl.`id_lang` = '.(int)($_GET['language'] + 1).' +ORDER BY cl.`name`'); + +$timezones = Db::getInstance()->executeS(' +SELECT * FROM `'.$_GET['tablePrefix'].'timezone` +ORDER BY `name`'); + +$xml .= ''."\n"; +foreach ($countries as $country) + $xml .= "\t".''."\n"; +$xml .= ''."\n".''."\n"; +foreach ($timezones as $timezone) + $xml .= "\t".''."\n"; +$xml .= ''."\n"; + +die($xml); \ No newline at end of file diff --git a/install-new/upgrade/xml/doUpgrade.php b/install-new/upgrade/xml/doUpgrade.php new file mode 100644 index 000000000..57ae16e84 --- /dev/null +++ b/install-new/upgrade/xml/doUpgrade.php @@ -0,0 +1,329 @@ + +* @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('UPGRADE_PATH', INSTALL_PATH.'/upgrade/'); + +$filePrefix = 'PREFIX_'; +$engineType = 'ENGINE_TYPE'; + +if (function_exists('date_default_timezone_set')) + date_default_timezone_set('Europe/Paris'); + +// if _PS_ROOT_DIR_ is defined, use it instead of "guessing" the module dir. +if (defined('_PS_ROOT_DIR_') AND !defined('_PS_MODULE_DIR_')) + define('_PS_MODULE_DIR_', _PS_ROOT_DIR_.'/modules/'); +else if (!defined('_PS_MODULE_DIR_')) + define('_PS_MODULE_DIR_', INSTALL_PATH.'/../modules/'); + +if(!defined('_PS_INSTALLER_PHP_UPGRADE_DIR_')) + define('_PS_INSTALLER_PHP_UPGRADE_DIR_', UPGRADE_PATH.'functions/'); + +// No more infinite require_once on functions ! +foreach (scandir(_PS_INSTALLER_PHP_UPGRADE_DIR_) as $file) + if ($file[0] != '.' && $file != 'index.php' && preg_match('#\.php$#i', $file)) + require_once _PS_INSTALLER_PHP_UPGRADE_DIR_.$file; + +//old version detection +global $oldversion, $logger; +$oldversion = false; +if (file_exists(SETTINGS_FILE) AND file_exists(DEFINES_FILE)) +{ + include_once(SETTINGS_FILE); + include_once(DEFINES_FILE); + $oldversion = _PS_VERSION_; +} +else +{ + $logger->logError('The config/settings.inc.php file was not found.'); + die(''."\n"); +} + +if (!file_exists(DEFINES_FILE)) +{ + $logger->logError('The config/settings.inc.php file was not found.'); + die(''."\n"); +} +include_once(SETTINGS_FILE); + +if (!defined('_THEMES_DIR_')) + define('_THEMES_DIR_', __PS_BASE_URI__.'themes/'); +if (!defined('_PS_IMG_')) + define('_PS_IMG_', __PS_BASE_URI__.'img/'); +if (!defined('_PS_JS_DIR_')) + define('_PS_JS_DIR_', __PS_BASE_URI__.'js/'); +if (!defined('_PS_CSS_DIR_')) + define('_PS_CSS_DIR_', __PS_BASE_URI__.'css/'); +include_once(DEFINES_FILE); + +$oldversion = _PS_VERSION_; + +$versionCompare = version_compare(INSTALL_VERSION, $oldversion); + +if ($versionCompare == '-1') +{ + $logger->logError('This installer is too old.'); + die(''."\n"); +} +elseif ($versionCompare == 0) +{ + $logger->logError(sprintf('You already have the %s version.',INSTALL_VERSION)); + die(''."\n"); +} +elseif ($versionCompare === false) +{ + $logger->logError('There is no older version. Did you delete or rename the config/settings.inc.php file?'); + die(''."\n"); +} + +//check DB access +include_once(UPGRADE_PATH.'classes/ToolsInstall.php'); +$resultDB = ToolsInstall::checkDB(_DB_SERVER_, _DB_USER_, _DB_PASSWD_, _DB_NAME_, false); +if ($resultDB !== true) +{ + $logger->logError('Invalid database configuration.'); + die("\n"); +} + +//custom sql file creation +$upgradeFiles = array(); +if ($handle = opendir(UPGRADE_PATH.'sql')) +{ + while (false !== ($file = readdir($handle))) + if ($file != '.' AND $file != '..') + $upgradeFiles[] = str_replace(".sql", "", $file); + closedir($handle); +} +if (empty($upgradeFiles)) +{ + $logger->logError('Can\'t find the sql upgrade files. Please verify that the /install/sql/upgrade folder is not empty)'); + die(''."\n"); +} +natcasesort($upgradeFiles); +$neededUpgradeFiles = array(); + +// fix : complete version number if there is not all 4 numbers +// for example replace 1.4.3 by 1.4.3.0 +// consequences : file 1.4.3.0.sql will be skipped if oldversion = 1.4.3 +// @since 1.4.4.0 +$arrayVersion = preg_split('#\.#', $oldversion); +$versionNumbers = sizeof($arrayVersion); + +if ($versionNumbers != 4) + $arrayVersion = array_pad($arrayVersion, 4, '0'); + +$oldversion = implode('.', $arrayVersion); +// end of fix + +foreach ($upgradeFiles AS $version) +{ + + if (version_compare($version, $oldversion) == 1 AND version_compare(INSTALL_VERSION, $version) != -1) + $neededUpgradeFiles[] = $version; +} + +if (empty($neededUpgradeFiles)) +{ + $logger->logError('No upgrade is possible.'); + die(''."\n"); +} + + +//refresh conf file +require_once(UPGRADE_PATH.'classes/AddConfToFile.php'); +$oldLevel = error_reporting(E_ALL); +$mysqlEngine = (defined('_MYSQL_ENGINE_') ? _MYSQL_ENGINE_ : 'MyISAM'); +$datas = array( + array('_DB_SERVER_', _DB_SERVER_), + array('_DB_TYPE_', _DB_TYPE_), + array('_DB_NAME_', _DB_NAME_), + array('_DB_USER_', _DB_USER_), + array('_DB_PASSWD_', _DB_PASSWD_), + array('_DB_PREFIX_', _DB_PREFIX_), + array('_MYSQL_ENGINE_', $mysqlEngine), + array('_PS_CACHING_SYSTEM_', (defined('_PS_CACHING_SYSTEM_') AND _PS_CACHING_SYSTEM_ != 'CacheMemcache') ? _PS_CACHING_SYSTEM_ : 'CacheMemcache'), + array('_PS_CACHE_ENABLED_', defined('_PS_CACHE_ENABLED_') ? _PS_CACHE_ENABLED_ : '0'), + array('_MEDIA_SERVER_1_', defined('_MEDIA_SERVER_1_') ? _MEDIA_SERVER_1_ : ''), + array('_MEDIA_SERVER_2_', defined('_MEDIA_SERVER_2_') ? _MEDIA_SERVER_2_ : ''), + array('_MEDIA_SERVER_3_', defined('_MEDIA_SERVER_3_') ? _MEDIA_SERVER_3_ : ''), + array('_PS_DIRECTORY_', __PS_BASE_URI__), + array('_COOKIE_KEY_', _COOKIE_KEY_), + array('_COOKIE_IV_', _COOKIE_IV_), + array('_PS_CREATION_DATE_', defined("_PS_CREATION_DATE_") ? _PS_CREATION_DATE_ : date('Y-m-d')), + array('_PS_VERSION_', INSTALL_VERSION) +); +if (defined('_RIJNDAEL_KEY_')) + $datas[] = array('_RIJNDAEL_KEY_', _RIJNDAEL_KEY_); +if (defined('_RIJNDAEL_IV_')) + $datas[] = array('_RIJNDAEL_IV_', _RIJNDAEL_IV_); +if(!defined('_PS_CACHE_ENABLED_')) + define('_PS_CACHE_ENABLED_', '0'); +if(!defined('_MYSQL_ENGINE_')) + define('_MYSQL_ENGINE_', 'MyISAM'); + +$sqlContent = ''; +if(isset($_GET['customModule']) AND $_GET['customModule'] == 'desactivate') + desactivate_custom_modules(); + +foreach($neededUpgradeFiles AS $version) +{ + $file = UPGRADE_PATH.'sql/'.$version.'.sql'; + if (!file_exists($file)) + { + $logger->logError('Error while loading sql upgrade file.'); + die(''."\n"); + } + if (!$sqlContent .= file_get_contents($file)) + { + $logger->logError('Error while loading sql upgrade file.'); + die(''."\n"); + } + $sqlContent .= "\n"; +} + +$sqlContent = str_replace(array($filePrefix, $engineType), array(_DB_PREFIX_, $mysqlEngine), $sqlContent); +$sqlContent = preg_split("/;\s*[\r\n]+/",$sqlContent); + +error_reporting($oldLevel); +$confFile = new AddConfToFile(SETTINGS_FILE, 'w'); +if ($confFile->error) +{ + $logger->logError($confFile->error); + die(''."\n"); +} + +foreach ($datas AS $data){ + $confFile->writeInFile($data[0], $data[1]); +} + +if ($confFile->error != false) +{ + $logger->logError($confFile->error); + die(''."\n"); +} + +// Settings updated, compile and cache directories must be emptied +$arrayToClean = array( + _PS_CACHE_DIR_.'smarty/cache/', + _PS_CACHE_DIR_.'smarty/compile/', +); +foreach ($arrayToClean as $dir) + if (!file_exists($dir)) + $logger->logError('directory '.$dir." doesn't exist and can't be emptied.\r\n"); + else + foreach (scandir($dir) as $file) + if ($file[0] != '.' AND $file != 'index.php' AND $file != '.htaccess') + unlink($dir.$file); + +// delete cache filesystem if activated +$depth = Configuration::get('PS_CACHEFS_DIRECTORY_DEPTH'); +if($depth) +{ + CacheFs::deleteCacheDirectory(); + CacheFs::createCacheDirectories((int)$depth); +} + +//sql file execution +global $requests, $warningExist; +$requests = ''; +$warningExist = false; + +Configuration::loadConfiguration(); + +foreach($sqlContent as $query) +{ + $query = trim($query); + if(!empty($query)) + { + /* If php code have to be executed */ + if (strpos($query, '/* PHP:') !== false) + { + /* Parsing php code */ + $pos = strpos($query, '/* PHP:') + strlen('/* PHP:'); + $phpString = substr($query, $pos, strlen($query) - $pos - strlen(' */;')); + $php = explode('::', $phpString); + preg_match('/\((.*)\)/', $phpString, $pattern); + $paramsString = trim($pattern[0], '()'); + preg_match_all('/([^,]+),? ?/', $paramsString, $parameters); + if (isset($parameters[1])) + $parameters = $parameters[1]; + else + $parameters = array(); + if (is_array($parameters)) + foreach ($parameters AS &$parameter) + $parameter = str_replace('\'', '', $parameter); + + /* Call a simple function */ + if (strpos($phpString, '::') === false) + $phpRes = call_user_func_array(str_replace($pattern[0], '', $php[0]), $parameters); + /* Or an object method */ + else + $phpRes = call_user_func_array(array($php[0], str_replace($pattern[0], '', $php[1])), $parameters); + if ((is_array($phpRes) AND !empty($phpRes['error'])) OR $phpRes === false ) + { + $logger->logError('PHP error: '.$query."\r\n".(empty($phpRes['msg'])?'':' - '.$phpRes['msg'])); + $logger->logError(empty($phpRes['error'])?'':$phpRes['error']); + if (!isset($request)) + $request = ''; + $request .= +' + + + + '."\n"; + } + else + $requests .= +' + + '."\n"; + } + elseif(!Db::getInstance()->execute($query)) + { + $logger->logError('SQL query: '."\r\n".$query); + $logger->logError('SQL error: '."\r\n".Db::getInstance()->getMsgError()); + $warningExist = true; + $requests .= +' + + getMsgError()).']]> + getNumberError()).']]> + '."\n"; + } + else + $requests .= +' + + '."\n"; + } +} +Configuration::updateValue('PS_HIDE_OPTIMIZATION_TIPS', 0); +Configuration::updateValue('PS_NEED_REBUILD_INDEX', 1); +Configuration::updateValue('PS_VERSION_DB', INSTALL_VERSION); +$result = $warningExist ? ''."\n" : ''."\n"; +$result .= $requests; +die($result.''."\n"); + diff --git a/install-new/upgrade/xml/getVersionFromDb.php b/install-new/upgrade/xml/getVersionFromDb.php new file mode 100644 index 000000000..7cdac1c2f --- /dev/null +++ b/install-new/upgrade/xml/getVersionFromDb.php @@ -0,0 +1,85 @@ + +* @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 +*/ + +require_once(SETTINGS_FILE); +require_once(INSTALL_PATH.'/classes/GetVersionFromDb.php'); + +require_once(INSTALL_PATH.'/classes/LanguagesManager.php'); +$lm = new LanguageManager(INSTALL_PATH.'/langs/list.xml'); +$_LANG = array(); +$_LIST_WORDS = array(); +function lang($txt) { + global $_LANG , $_LIST_WORDS; + return (isset($_LANG[$txt]) ? $_LANG[$txt] : $txt); +} +if ($lm->getIncludeTradFilename()) + include_once($lm->getIncludeTradFilename()); + +$dbVersion = new GetVersionFromDb(); +$versions = $dbVersion->getVersions(); +$psVersionDb = Configuration::get('PS_VERSION_DB'); + +// Usefull debug +/* echo ''; +print_r($versions); +print_r($dbVersion->getErrors()); +exit;*/ + +if (!$versions) +{ + // Desactivate this case temporary + die('<action result="ok" />'); + + $message = lang('Warning, the installer was unable to detect what is your current PrestaShop version from a database structure analysis. This means some fields or tables are missing, and upgrade is under your own risk.'); + if ($psVersionDb) + { + $message .= '<br /><br />' . sprintf(lang('However the installer has detected that the version stored in your configuration table is %1$s'), '<span class="versionInfo">' . $psVersionDb . '</span>'); + } + die('<action result="ko" lang="' . htmlspecialchars($message) . '" />'); +} + +foreach ($versions as $version) +{ + if (version_compare(_PS_VERSION_, $version) == 0) + { + die('<action result="ok" />'); + } +} + +if (count($versions) == 1) +{ + die('<action result="ko" lang="' . htmlspecialchars(sprintf(lang('Warning, we detected that the version specified in your config/settings.inc.php does not match your SQL database structure.<br />File config/settings.inc.php indicates: %1$s<br />Our automatic detection tool has detected version: %2$s<br /><br />You should edit your config/settings.inc.php file to replace %1$s by %2$s.<br />Failure to fix this issue before upgrading may result in severe complications.<br />Do not forget to relaunch the installer after this modification by pressing F5 on your web browser.'), '<span class="versionInfo">' . _PS_VERSION_ . '</span>', '<span class="versionInfo">' . $versions[0] . '</span>')) . '" />'); +} + +if ($psVersionDb && in_array($psVersionDb, $versions)) +{ + die('<action result="ko" lang="' . htmlspecialchars(sprintf(lang('Warning, we detected that the version specified in your config/settings.inc.php does not match your SQL database structure.<br />File config/settings.inc.php indicates: %1$s<br />Our automatic detection tool has detected version: %2$s<br /><br />You should edit your config/settings.inc.php file to replace %1$s by %2$s.<br />Failure to fix this issue before upgrading may result in severe complications.<br />Do not forget to relaunch the installer after this modification by pressing F5 on your web browser.'), '<span class="versionInfo">' . _PS_VERSION_ . '</span>', '<span class="versionInfo">' . $psVersionDb . '</span>')) . '" />'); +} +else +{ + die('<action result="ko" lang="' . htmlspecialchars(sprintf(lang('Warning, we detected that the version specified in your config/settings.inc.php does not match your SQL database structure.<br />File config/settings.inc.php indicates: %1$s<br />Our automatic detection tool has detected a version between %2$s and %3$s<br /><br />You should edit your config/settings.inc.php file to replace %1$s by your real shop version.<br />Failure to fix this issue before upgrading may result in severe complications.<br />Do not forget to relaunch the installer after this modification by pressing F5 on your web browser.'), '<span class="versionInfo">' . _PS_VERSION_ . '</span>', '<span class="versionInfo">' . $versions[count($versions) - 1] . '</span>', '<span class="versionInfo">' . $versions[0] . '</span>')) . '" />'); +} diff --git a/install-new/upgrade/xml/index.php b/install-new/upgrade/xml/index.php new file mode 100644 index 000000000..4e2611d37 --- /dev/null +++ b/install-new/upgrade/xml/index.php @@ -0,0 +1,36 @@ +<?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 +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file