prestashop v1
51
Adapter/Adapter_AddressFactory.php
Normal file
@ -0,0 +1,51 @@
|
||||
<?php
|
||||
/**
|
||||
* 2007-2015 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-2015 PrestaShop SA
|
||||
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
class Adapter_AddressFactory
|
||||
{
|
||||
/**
|
||||
* Initilize an address corresponding to the specified id address or if empty to the
|
||||
* default shop configuration
|
||||
* @param null $id_address
|
||||
* @param bool $with_geoloc
|
||||
* @return Address
|
||||
*/
|
||||
public function findOrCreate($id_address = null, $with_geoloc = false)
|
||||
{
|
||||
$func_args = func_get_args();
|
||||
return call_user_func_array(array('Address', 'initialize'), $func_args);
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if an address exists depending on given $id_address
|
||||
* @param $id_address
|
||||
* @return bool
|
||||
*/
|
||||
public function addressExists($id_address)
|
||||
{
|
||||
return Address::addressExists($id_address);
|
||||
}
|
||||
}
|
44
Adapter/Adapter_Configuration.php
Normal file
@ -0,0 +1,44 @@
|
||||
<?php
|
||||
/**
|
||||
* 2007-2015 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-2015 PrestaShop SA
|
||||
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
class Adapter_Configuration implements Core_Business_ConfigurationInterface
|
||||
{
|
||||
|
||||
/**
|
||||
* Returns constant defined by given $key if exists or check directly into PrestaShop
|
||||
* Configuration
|
||||
* @param $key
|
||||
* @return mixed
|
||||
*/
|
||||
public function get($key)
|
||||
{
|
||||
if (defined($key)) {
|
||||
return constant($key);
|
||||
} else {
|
||||
return Configuration::get($key);
|
||||
}
|
||||
}
|
||||
}
|
52
Adapter/Adapter_Database.php
Normal file
@ -0,0 +1,52 @@
|
||||
<?php
|
||||
/**
|
||||
* 2007-2015 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-2015 PrestaShop SA
|
||||
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
class Adapter_Database implements Core_Foundation_Database_DatabaseInterface
|
||||
{
|
||||
/**
|
||||
* Perform a SELECT sql statement
|
||||
* @param $sqlString
|
||||
* @return array|false
|
||||
* @throws PrestaShopDatabaseException
|
||||
*/
|
||||
public function select($sqlString)
|
||||
{
|
||||
return Db::getInstance()->executeS($sqlString);
|
||||
}
|
||||
|
||||
/**
|
||||
* Escape $unsafe to be used into a SQL statement
|
||||
* @param $unsafeData
|
||||
* @return string
|
||||
*/
|
||||
public function escape($unsafeData)
|
||||
{
|
||||
// Prepare required params
|
||||
$html_ok = true;
|
||||
$bq_sql = true;
|
||||
return Db::getInstance()->escape($unsafeData, $html_ok, $bq_sql);
|
||||
}
|
||||
}
|
107
Adapter/Adapter_EntityMapper.php
Normal file
@ -0,0 +1,107 @@
|
||||
<?php
|
||||
/**
|
||||
* 2007-2015 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-2015 PrestaShop SA
|
||||
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
class Adapter_EntityMapper {
|
||||
|
||||
/**
|
||||
* Load ObjectModel
|
||||
* @param $id
|
||||
* @param $id_lang
|
||||
* @param $entity ObjectModel
|
||||
* @param $entity_defs
|
||||
* @param $id_shop
|
||||
* @param $should_cache_objects
|
||||
* @throws PrestaShopDatabaseException
|
||||
*/
|
||||
public function load($id, $id_lang, $entity, $entity_defs, $id_shop, $should_cache_objects)
|
||||
{
|
||||
// Load object from database if object id is present
|
||||
$cache_id = 'objectmodel_' . $entity_defs['classname'] . '_' . (int)$id . '_' . (int)$id_shop . '_' . (int)$id_lang;
|
||||
if (!$should_cache_objects || !Cache::isStored($cache_id)) {
|
||||
$sql = new DbQuery();
|
||||
$sql->from($entity_defs['table'], 'a');
|
||||
$sql->where('a.`' . bqSQL($entity_defs['primary']) . '` = ' . (int)$id);
|
||||
|
||||
// Get lang informations
|
||||
if ($id_lang && isset($entity_defs['multilang']) && $entity_defs['multilang']) {
|
||||
|
||||
$sql->leftJoin($entity_defs['table'] . '_lang', 'b', 'a.`' . bqSQL($entity_defs['primary']) . '` = b.`' . bqSQL($entity_defs['primary']) . '` AND b.`id_lang` = ' . (int)$id_lang);
|
||||
if ($id_shop && !empty($entity_defs['multilang_shop'])) {
|
||||
$sql->where('b.`id_shop` = ' . (int)$id_shop);
|
||||
}
|
||||
}
|
||||
|
||||
// Get shop informations
|
||||
if (Shop::isTableAssociated($entity_defs['table'])) {
|
||||
$sql->leftJoin($entity_defs['table'] . '_shop', 'c', 'a.`' . bqSQL($entity_defs['primary']) . '` = c.`' . bqSQL($entity_defs['primary']) . '` AND c.`id_shop` = ' . (int)$id_shop);
|
||||
}
|
||||
|
||||
if ($object_datas = Db::getInstance()->getRow($sql)) {
|
||||
if (!$id_lang && isset($entity_defs['multilang']) && $entity_defs['multilang']) {
|
||||
|
||||
$sql = 'SELECT *
|
||||
FROM `' . bqSQL(_DB_PREFIX_ . $entity_defs['table']) . '_lang`
|
||||
WHERE `' . bqSQL($entity_defs['primary']) . '` = ' . (int)$id
|
||||
.(($id_shop && $entity->isLangMultishop()) ? ' AND `id_shop` = ' . (int)$id_shop : '');
|
||||
|
||||
if ($object_datas_lang = Db::getInstance()->executeS($sql)) {
|
||||
|
||||
foreach ($object_datas_lang as $row) {
|
||||
foreach ($row as $key => $value) {
|
||||
if ($key != $entity_defs['primary'] && array_key_exists($key, $entity)) {
|
||||
if (!isset($object_datas[$key]) || !is_array($object_datas[$key]))
|
||||
$object_datas[$key] = array();
|
||||
|
||||
$object_datas[$key][$row['id_lang']] = $value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
$entity->id = (int)$id;
|
||||
foreach ($object_datas as $key => $value) {
|
||||
if (array_key_exists($key, $entity)) {
|
||||
$entity->{$key} = $value;
|
||||
} else {
|
||||
unset($object_datas[$key]);
|
||||
}
|
||||
}
|
||||
if ($should_cache_objects) {
|
||||
Cache::store($cache_id, $object_datas);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$object_datas = Cache::retrieve($cache_id);
|
||||
if ($object_datas) {
|
||||
$entity->id = (int)$id;
|
||||
foreach ($object_datas as $key => $value) {
|
||||
$entity->{$key} = $value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
51
Adapter/Adapter_EntityMetaDataRetriever.php
Normal file
@ -0,0 +1,51 @@
|
||||
<?php
|
||||
/**
|
||||
* 2007-2015 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-2015 PrestaShop SA
|
||||
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
class Adapter_EntityMetaDataRetriever
|
||||
{
|
||||
public function getEntityMetaData($className)
|
||||
{
|
||||
$metaData = new Core_Foundation_Database_EntityMetaData;
|
||||
|
||||
$metaData->setEntityClassName($className);
|
||||
|
||||
if (property_exists($className, 'definition')) {
|
||||
// Legacy entity
|
||||
$classVars = get_class_vars($className);
|
||||
$metaData->setTableName($classVars['definition']['table']);
|
||||
$metaData->setPrimaryKeyFieldNames(array($classVars['definition']['primary']));
|
||||
} else {
|
||||
throw new Adapter_Exception(
|
||||
sprintf(
|
||||
'Cannot get metadata for entity `%s`.',
|
||||
$className
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
return $metaData;
|
||||
}
|
||||
}
|
29
Adapter/Adapter_Exception.php
Normal file
@ -0,0 +1,29 @@
|
||||
<?php
|
||||
/**
|
||||
* 2007-2015 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-2015 PrestaShop SA
|
||||
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
class Adapter_Exception extends Core_Foundation_Exception_Exception
|
||||
{
|
||||
}
|
69
Adapter/Adapter_ProductPriceCalculator.php
Normal file
@ -0,0 +1,69 @@
|
||||
<?php
|
||||
/**
|
||||
* 2007-2015 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-2015 PrestaShop SA
|
||||
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
class Adapter_ProductPriceCalculator
|
||||
{
|
||||
public function getProductPrice(
|
||||
$id_product,
|
||||
$usetax = true,
|
||||
$id_product_attribute = null,
|
||||
$decimals = 6,
|
||||
$divisor = null,
|
||||
$only_reduc = false,
|
||||
$usereduc = true,
|
||||
$quantity = 1,
|
||||
$force_associated_tax = false,
|
||||
$id_customer = null,
|
||||
$id_cart = null,
|
||||
$id_address = null,
|
||||
&$specific_price_output = null,
|
||||
$with_ecotax = true,
|
||||
$use_group_reduction = true,
|
||||
Context $context = null,
|
||||
$use_customer_price = true
|
||||
)
|
||||
{
|
||||
return Product::getPriceStatic(
|
||||
$id_product,
|
||||
$usetax,
|
||||
$id_product_attribute,
|
||||
$decimals,
|
||||
$divisor,
|
||||
$only_reduc,
|
||||
$usereduc,
|
||||
$quantity,
|
||||
$force_associated_tax,
|
||||
$id_customer,
|
||||
$id_cart,
|
||||
$id_address,
|
||||
$specific_price_output,
|
||||
$with_ecotax,
|
||||
$use_group_reduction,
|
||||
$context,
|
||||
$use_customer_price
|
||||
);
|
||||
}
|
||||
}
|
54
Adapter/Adapter_ServiceLocator.php
Normal file
@ -0,0 +1,54 @@
|
||||
<?php
|
||||
/**
|
||||
* 2007-2015 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-2015 PrestaShop SA
|
||||
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
class Adapter_ServiceLocator
|
||||
{
|
||||
/**
|
||||
* Set a service container Instance
|
||||
* @var Core_Foundation_IoC_Container
|
||||
*/
|
||||
private static $service_container;
|
||||
|
||||
public static function setServiceContainerInstance(Core_Foundation_IoC_Container $container)
|
||||
{
|
||||
self::$service_container = $container;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a service depending on its given $serviceName
|
||||
* @param $serviceName
|
||||
* @return mixed|object
|
||||
* @throws Adapter_Exception
|
||||
*/
|
||||
public static function get($serviceName)
|
||||
{
|
||||
if (empty(self::$service_container) || is_null(self::$service_container)) {
|
||||
throw new Adapter_Exception('Service container is not set.');
|
||||
}
|
||||
|
||||
return self::$service_container->make($serviceName);
|
||||
}
|
||||
}
|
49
CONTRIBUTING.md
Normal file
@ -0,0 +1,49 @@
|
||||
Contributing to PrestaShop
|
||||
--------------------------
|
||||
|
||||
PrestaShop is an open-source e-commerce solution. Everyone is welcome and even encouraged to contribute with their own improvements.
|
||||
|
||||
PrestaShop 1.6 is written mostly in PHP. Other languages used throughout are JavaScript, HTML, CSS, the Smarty templating language, SQL, and XML.
|
||||
|
||||
To contribute to the project, you should ideally be familiar with Git, the source code management system that PrestaShop uses, with the official repository being hosted on Github:
|
||||
* You can learn more about Git here: http://try.github.io/ (there are many tutorials available on the Web).
|
||||
* You can get help on Github here: https://help.github.com/.
|
||||
* Windows users can get a nice interface for Git by installing TortoiseGit: http://code.google.com/p/tortoisegit/
|
||||
|
||||
Contributors should follow the following process:
|
||||
|
||||
1. Create your Github account, if you do not have one already.
|
||||
2. Fork the PrestaShop project to your Github account.
|
||||
3. Clone your fork to your local machine. Be sure to make a recursive clone (use "git clone --recursive git://github.com/username/PrestaShop.git" or check the "Recursive" box in TortoiseGit) in order to have all the PrestaShop modules cloned too!
|
||||
4. Create a branch in your local clone for your changes.
|
||||
5. Change the files in your branch. Be sure to follow [the coding standards][1].
|
||||
6. Push your changed branch to your fork in your Github account.
|
||||
7. Create a pull request for your changes on the PrestaShop project. Be sure to follow [the commit message norm][2] in your pull request. If you need help to make a pull request, read the [Github help page about creating pull requests][3].
|
||||
8. Wait for one of the core developers either to include your change in the codebase, or to comment on possible improvements you should make to your code.
|
||||
|
||||
That's it: you have contributed to this open source project! Congratulations!
|
||||
|
||||
The PrestaShop documentation features a thorough explanation of the [complete process to your first pull request][4].
|
||||
|
||||
If you don't feel comfortable forking the project or using Git, you can also either:
|
||||
* Edit a file directly within Github: browse to the target file, click the "Edit" button, make your changes in the editor then click on "Propose File Change". Github will automatically create a new fork and branch on your own Github account, then suggest to create a pull request to PrestaShop. Once the pull request is submitted, you just have to wait for a core developer to answer you.
|
||||
* Submit an issue using the Forge: [PrestaShop Forge][5] is the official ticket-tracker for PrestaShop, and the best place to write a bug ticket or request an improvement, while not having to be a developer at all. You will need to create an account on the Forge: [follow these instructions][6], then wait for a core developer to answer you.
|
||||
|
||||
Thank you for your help in making PrestaShop even better!
|
||||
|
||||
|
||||
### About licenses
|
||||
|
||||
* All core files you commit in your pull request must respect/use the [Open Software License (OSL 3.0)][7].
|
||||
* All modules files you commit in your pull request must respect/use the [Academic Free License (AFL 3.0)][8].
|
||||
|
||||
|
||||
[1]: http://doc.prestashop.com/display/PS16/Coding+Standards
|
||||
[2]: http://doc.prestashop.com/display/PS16/How+to+write+a+commit+message
|
||||
[3]: https://help.github.com/articles/using-pull-requests
|
||||
[4]: http://doc.prestashop.com/display/PS16/Contributing+code+to+PrestaShop
|
||||
[5]: http://forge.prestashop.com/
|
||||
[6]: http://doc.prestashop.com/display/PS16/How+to+use+the+Forge+to+contribute+to+PrestaShop
|
||||
[7]: http://opensource.org/licenses/OSL-3.0
|
||||
[8]: http://opensource.org/licenses/AFL-3.0
|
||||
|
407
CONTRIBUTORS.md
Normal file
@ -0,0 +1,407 @@
|
||||
GitHub contributors:
|
||||
--------------------------------
|
||||
- (d)oekia
|
||||
- 123monsite-regis
|
||||
- 1RV34
|
||||
- Adonis Karavokyros
|
||||
- Adrien
|
||||
- Adrien Astier
|
||||
- Agence CINS
|
||||
- Aleksander Palyan
|
||||
- Alessandro Corbelli
|
||||
- Alex Even
|
||||
- Alexander Grosul
|
||||
- Alexander Otchenashev
|
||||
- Alexandra Even
|
||||
- AlexEven
|
||||
- Alexey Svistunov
|
||||
- alexey-svistunov
|
||||
- alexsimple
|
||||
- Alfakom-MK
|
||||
- Alfonso Jimenez
|
||||
- Alphacom IT Solutions - Macedonia
|
||||
- amatosg
|
||||
- anat
|
||||
- Anatole
|
||||
- Andrew
|
||||
- Antonino Di Bella
|
||||
- antoniofr
|
||||
- AntonLejon
|
||||
- Arnaud Lemercier
|
||||
- axi
|
||||
- Axome
|
||||
- Balestrino
|
||||
- bellini13
|
||||
- Benjamin PONGY
|
||||
- bercik999
|
||||
- Bersam Karbasion
|
||||
- BigZ
|
||||
- BluTiGeS
|
||||
- Bruno Desprez
|
||||
- Bruno Leveque
|
||||
- bumbu
|
||||
- Burhan
|
||||
- Caleydon Media
|
||||
- cam.lafit
|
||||
- Captain FLAM
|
||||
- Captain-FLAM
|
||||
- ccauw
|
||||
- cedricfontaine
|
||||
- cedricgeffroy
|
||||
- Chen.Zhidong
|
||||
- Chris
|
||||
- Chris Gurk
|
||||
- ChristopheBoucaut
|
||||
- CINS
|
||||
- cippest
|
||||
- cmouleyre
|
||||
- codvir
|
||||
- Comkwatt
|
||||
- Corentin Delcourt
|
||||
- Cosmin Hutanu
|
||||
- Cedric Mouleyre
|
||||
- damien
|
||||
- Damien Metzger
|
||||
- Damien PIQUET
|
||||
- DamienMetzger
|
||||
- Damon Skelhorn
|
||||
- Dan Hlavenka
|
||||
- danidomen
|
||||
- Daniel
|
||||
- Daniele Giachino
|
||||
- danoosh
|
||||
- Danoosh Mir
|
||||
- David Gasperoni
|
||||
- David Sivocha
|
||||
- David-Julian BUCH
|
||||
- Davy Rolink
|
||||
- Denver Prophit Jr.
|
||||
- Desbouche Christophe
|
||||
- DevNet
|
||||
- Dh42
|
||||
- Dimitrios Karvounaris
|
||||
- Dinis Lage
|
||||
- djbuch
|
||||
- djfm
|
||||
- dlage
|
||||
- doekia
|
||||
- DOEO
|
||||
- Dragan Skrbic
|
||||
- Dream me up
|
||||
- dreammeup
|
||||
- DrySs
|
||||
- DrySs'
|
||||
- dSevere
|
||||
- Dustin
|
||||
- Dvir Julius
|
||||
- Dvir-Julius
|
||||
- edamart
|
||||
- Edouard Gaulue
|
||||
- el-tenkova
|
||||
- elationbase
|
||||
- eleazar
|
||||
- Elitius
|
||||
- Emilien Puget
|
||||
- emilien-puget
|
||||
- emily-d
|
||||
- Eric Le Lay
|
||||
- Eric Rouvier
|
||||
- erickturcios
|
||||
- Etienne Samson
|
||||
- Fabio Chelly
|
||||
- fchellypresta
|
||||
- Felipe Uribe
|
||||
- fetis
|
||||
- fird
|
||||
- flashmaestro
|
||||
- Florian Kwakkenbos
|
||||
- fram
|
||||
- Francois Gaillard
|
||||
- Francois-Marie de Jouvencel
|
||||
- François Gaillard
|
||||
- Frederic BENOIST
|
||||
- Gabriel Schwardy
|
||||
- Gaelle ITZKOVITZ
|
||||
- Gamesh
|
||||
- ggedamed
|
||||
- Giant Leap Lab
|
||||
- Gordon Coubrough
|
||||
- gr4devel
|
||||
- Granger Kevin
|
||||
- Gregory Roussac
|
||||
- gRoussac
|
||||
- Gregoire Belorgey
|
||||
- gskema
|
||||
- Guillaume DELOINCE
|
||||
- Guillaume Lafarge
|
||||
- Guillaume Leseur
|
||||
- Gytis
|
||||
- Gytis SkÄ—ma
|
||||
- Ha!*!*y
|
||||
- ha99y
|
||||
- harelguy
|
||||
- hiousi
|
||||
- htrex
|
||||
- indesign47
|
||||
- iNem0o
|
||||
- ironwo0d
|
||||
- ITBpro.com
|
||||
- Ivan
|
||||
- ivancasasempere
|
||||
- J. Danse
|
||||
- janisVincent
|
||||
- Javsmile
|
||||
- JEAN
|
||||
- jeanbe
|
||||
- jeckyl
|
||||
- Jeroen Dewaele
|
||||
- Jerome Nadaud
|
||||
- jeromenadaud
|
||||
- jessylenne
|
||||
- Joan
|
||||
- Joan Juvanteny
|
||||
- joce
|
||||
- Joe Siwiak
|
||||
- joemartin247
|
||||
- Joep Hendrix
|
||||
- Jonadabe
|
||||
- Jonathan Danse
|
||||
- Jonathan SAHM
|
||||
- Jorge Vargas
|
||||
- joseantgv
|
||||
- jtogrul
|
||||
- Julien
|
||||
- Julien Bouchez
|
||||
- Julien Bourdeau
|
||||
- Julien Deniau
|
||||
- Julien Martin
|
||||
- julienbourdeau
|
||||
- Jachym Tousek
|
||||
- Kamil Szymański
|
||||
- Kelly Karnetsky
|
||||
- kermes
|
||||
- Kevin Granger
|
||||
- kiropowered
|
||||
- kpodemski
|
||||
- Krystian Podemski
|
||||
- Kevin Dunglas
|
||||
- Ladel
|
||||
- ldecoker
|
||||
- Lesley Paone
|
||||
- LOIC ROSSET ltd
|
||||
- luc
|
||||
- Luc Vandesype
|
||||
- Luca T.
|
||||
- Lucas CERDAN
|
||||
- LucasC
|
||||
- Lyo Nick
|
||||
- LyoNick
|
||||
- Leo
|
||||
- M-Mommsen
|
||||
- Madef
|
||||
- Madman
|
||||
- Mainmich
|
||||
- makk1ntosh
|
||||
- marcinsz101
|
||||
- Marco Cervellin
|
||||
- Marcos
|
||||
- matiasiglesias
|
||||
- Mats Rynge
|
||||
- Matteo
|
||||
- MatthieuB
|
||||
- MaX3315
|
||||
- Maxence
|
||||
- Maxime
|
||||
- Maxime Biloe
|
||||
- Maxime Vasse
|
||||
- mchelh
|
||||
- mchojnacki
|
||||
- mdomenjoud
|
||||
- Michael Hjulskov
|
||||
- Michel Courtade
|
||||
- Mickael Desgranges
|
||||
- Mikael Blotin
|
||||
- Mikko Hellsing
|
||||
- Milow
|
||||
- Mingsong Hu
|
||||
- minic studio
|
||||
- misthero
|
||||
- moncef102
|
||||
- montes
|
||||
- mplh
|
||||
- MustangZhong
|
||||
- natrim
|
||||
- neemzy
|
||||
- nezenmoins
|
||||
- Nicolas Sorosac
|
||||
- Niklas Ekman
|
||||
- Niko Wicaksono
|
||||
- Nils-Helge Garli Hegvik
|
||||
- NinjaOfWeb
|
||||
- Nino Uzelac
|
||||
- nodexpl
|
||||
- nturato
|
||||
- oleacorner
|
||||
- Otto Nascarella
|
||||
- Pan P.
|
||||
- Panagiotis Tigas
|
||||
- panesarsandeep
|
||||
- Patanock
|
||||
- Patrick Mettraux
|
||||
- Pavel Novitsky
|
||||
- pbirnzain
|
||||
- Pedro J. Parra
|
||||
- Per Lejontand
|
||||
- Peter Schaeffer
|
||||
- peterept
|
||||
- Petyuska
|
||||
- PhpMadman
|
||||
- Pierre
|
||||
- Piotr Kaczor
|
||||
- Piotr Moćko
|
||||
- PrestaEdit
|
||||
- PrestaLab
|
||||
- prestamodule
|
||||
- PrestanceDesign
|
||||
- prestarocket
|
||||
- Prestaspirit
|
||||
- Priyank Bolia
|
||||
- Profileo
|
||||
- Pronux
|
||||
- proydsl
|
||||
- pxls
|
||||
- quadrateam
|
||||
- Quentin Leonetti
|
||||
- Quentin Montant
|
||||
- Quetzacoalt91
|
||||
- Racochejl
|
||||
- Rafael Cunha
|
||||
- Raphael Malie
|
||||
- raulgundin
|
||||
- rGaillard
|
||||
- Rhys
|
||||
- Richard LT
|
||||
- Rimas Kudelis
|
||||
- robert
|
||||
- Roland Schütz
|
||||
- romainberger
|
||||
- runningz
|
||||
- Remi Gaillard
|
||||
- s-duval
|
||||
- Sacha
|
||||
- Sacha FROMENT
|
||||
- sadlyblue
|
||||
- sagaradonis
|
||||
- Sam Sanchez
|
||||
- Samir Shah
|
||||
- Samy Rabih
|
||||
- Sarah Lorenzini
|
||||
- Seb
|
||||
- SebSept
|
||||
- Seynaeve
|
||||
- sfroment42
|
||||
- shaffe-fr
|
||||
- Shagshag
|
||||
- Shipow
|
||||
- Shudrum
|
||||
- sidhujag
|
||||
- sjousse
|
||||
- sLorenzini
|
||||
- smartdatasoft
|
||||
- snamor
|
||||
- soufyan
|
||||
- soware
|
||||
- Staging
|
||||
- Stanislav Yordanov
|
||||
- Stefano Kowalke
|
||||
- Stephan Obadia
|
||||
- Steven "SDF" Sulley
|
||||
- Steven Sulley
|
||||
- Studio Kiwik
|
||||
- Sumh
|
||||
- svensson_david
|
||||
- Sylvain Gougouzian
|
||||
- Sylvain WITMEYER
|
||||
- Sebastien
|
||||
- Sebastien Bareyre
|
||||
- Sebastien Bocahu
|
||||
- Sebastien Monterisi
|
||||
- Tanguy JACQUET
|
||||
- tchauviere
|
||||
- Thibaud Chauviere
|
||||
- thoma202
|
||||
- Thomas
|
||||
- Thomas Blanc
|
||||
- Thomas N
|
||||
- Thomas Nabord
|
||||
- thomas-aw
|
||||
- Threef
|
||||
- timsit
|
||||
- tmackay
|
||||
- TMMeilleur
|
||||
- Tom Panier
|
||||
- Tomasz Slominski
|
||||
- Tomas Votruba
|
||||
- tucoinfo
|
||||
- Tung Dao
|
||||
- unlocomqx
|
||||
- Valerii Savchenko
|
||||
- vAugagneur
|
||||
- Vincent Augagneur
|
||||
- Vincent Schoener
|
||||
- Vincent Terenti
|
||||
- vinvin27
|
||||
- vinzter
|
||||
- vitekj
|
||||
- Wayann
|
||||
- web-plus
|
||||
- webbax
|
||||
- Wojciech Grzebieniowski
|
||||
- Xavier
|
||||
- Xavier Borderie
|
||||
- Xavier Gouley
|
||||
- Xavier POITAU
|
||||
- xitromedia
|
||||
- xKnut
|
||||
- yanngarras
|
||||
- Yoozio
|
||||
- zimmi1
|
||||
- ZiZuu.com
|
||||
- Zollner Robert
|
||||
|
||||
SVN contributors:
|
||||
--------------------------------
|
||||
- aFolletete
|
||||
- aKorczak
|
||||
- aNiassy
|
||||
- bLeveque
|
||||
- bMancone
|
||||
- dMetzger
|
||||
- dSevere
|
||||
- fBrignoli
|
||||
- Francois Gaillard
|
||||
- fSerny
|
||||
- gBrunier
|
||||
- gCharmes
|
||||
- gPoulain
|
||||
- hAitmansour
|
||||
- jBreux
|
||||
- jmCollin
|
||||
- jObregon
|
||||
- lBrieu
|
||||
- lCherifi
|
||||
- lLefevre
|
||||
- mBertholino
|
||||
- mDeflotte
|
||||
- mMarinetti
|
||||
- nPellicari
|
||||
- rGaillard
|
||||
- rMalie
|
||||
- rMontagne
|
||||
- sLorenzini
|
||||
- sThiebaut
|
||||
- tDidierjean
|
||||
- vAugagneur
|
||||
- vChabot
|
||||
- vKham
|
||||
- vSchoener
|
80
Core/Business/CMS/Core_Business_CMS_CMSRepository.php
Normal file
@ -0,0 +1,80 @@
|
||||
<?php
|
||||
/**
|
||||
* 2007-2015 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-2015 PrestaShop SA
|
||||
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
class Core_Business_CMS_CMSRepository extends Core_Foundation_Database_EntityRepository
|
||||
{
|
||||
/**
|
||||
* Return CMSRepository lang associative table name
|
||||
* @return string
|
||||
*/
|
||||
private function getLanguageTableNameWithPrefix()
|
||||
{
|
||||
return $this->getTableNameWithPrefix() . '_lang';
|
||||
}
|
||||
|
||||
/**
|
||||
* Return all CMSRepositories depending on $id_lang/$id_shop tuple
|
||||
* @param $id_lang
|
||||
* @param $id_shop
|
||||
* @return array|null
|
||||
*/
|
||||
public function i10nFindAll($id_lang, $id_shop)
|
||||
{
|
||||
$sql = '
|
||||
SELECT *
|
||||
FROM `'.$this->getTableNameWithPrefix().'` c
|
||||
JOIN `'.$this->getPrefix().'cms_lang` cl ON c.`id_cms`= cl.`id_cms`
|
||||
WHERE cl.`id_lang` = '.(int)$id_lang.'
|
||||
AND cl.`id_shop` = '.(int)$id_shop.'
|
||||
|
||||
';
|
||||
|
||||
return $this->hydrateMany($this->db->select($sql));
|
||||
}
|
||||
|
||||
/**
|
||||
* Return all CMSRepositories depending on $id_lang/$id_shop tuple
|
||||
* @param $id_cms
|
||||
* @param $id_lang
|
||||
* @param $id_shop
|
||||
* @return CMS|null
|
||||
* @throws Core_Foundation_Database_Exception
|
||||
*/
|
||||
public function i10nFindOneById($id_cms, $id_lang, $id_shop)
|
||||
{
|
||||
$sql = '
|
||||
SELECT *
|
||||
FROM `'.$this->getTableNameWithPrefix().'` c
|
||||
JOIN `'.$this->getPrefix().'cms_lang` cl ON c.`id_cms`= cl.`id_cms`
|
||||
WHERE c.`id_cms` = '.(int)$id_cms.'
|
||||
AND cl.`id_lang` = '.(int)$id_lang.'
|
||||
AND cl.`id_shop` = '.(int)$id_shop.'
|
||||
LIMIT 0 , 1
|
||||
';
|
||||
|
||||
return $this->hydrateOne($this->db->select($sql));
|
||||
}
|
||||
}
|
44
Core/Business/CMS/Core_Business_CMS_CMSRoleRepository.php
Normal file
@ -0,0 +1,44 @@
|
||||
<?php
|
||||
/**
|
||||
* 2007-2015 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-2015 PrestaShop SA
|
||||
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
class Core_Business_CMS_CMSRoleRepository extends Core_Foundation_Database_EntityRepository
|
||||
{
|
||||
/**
|
||||
* Return all CMSRoles which are already associated
|
||||
* @return array|null
|
||||
*/
|
||||
public function getCMSRolesAssociated()
|
||||
{
|
||||
$sql = '
|
||||
SELECT *
|
||||
FROM `'.$this->getTableNameWithPrefix().'`
|
||||
WHERE `id_cms` != 0';
|
||||
|
||||
return $this->hydrateMany($this->db->select($sql));
|
||||
}
|
||||
|
||||
|
||||
}
|
30
Core/Business/Core_Business_ConfigurationInterface.php
Normal file
@ -0,0 +1,30 @@
|
||||
<?php
|
||||
/**
|
||||
* 2007-2015 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-2015 PrestaShop SA
|
||||
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
interface Core_Business_ConfigurationInterface
|
||||
{
|
||||
public function get($key);
|
||||
}
|
43
Core/Business/Core_Business_ContainerBuilder.php
Normal file
@ -0,0 +1,43 @@
|
||||
<?php
|
||||
/**
|
||||
* 2007-2015 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-2015 PrestaShop SA
|
||||
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
class Core_Business_ContainerBuilder
|
||||
{
|
||||
/**
|
||||
* Construct PrestaShop Core Service container
|
||||
* @return Core_Foundation_IoC_Container
|
||||
* @throws Core_Foundation_IoC_Exception
|
||||
*/
|
||||
public function build()
|
||||
{
|
||||
$container = new Core_Foundation_IoC_Container;
|
||||
|
||||
$container->bind('Core_Business_ConfigurationInterface', 'Adapter_Configuration', true);
|
||||
$container->bind('Core_Foundation_Database_DatabaseInterface', 'Adapter_Database', true);
|
||||
|
||||
return $container;
|
||||
}
|
||||
}
|
92
Core/Business/Email/Core_Business_Email_EmailLister.php
Normal file
@ -0,0 +1,92 @@
|
||||
<?php
|
||||
/**
|
||||
* 2007-2015 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-2015 PrestaShop SA
|
||||
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
class Core_Business_Email_EmailLister
|
||||
{
|
||||
private $filesystem;
|
||||
|
||||
public function __construct(Core_Foundation_FileSystem_FileSystem $fs)
|
||||
{
|
||||
// Register dependencies
|
||||
$this->filesystem = $fs;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the list of available mails
|
||||
* @param null $lang
|
||||
* @param null $dir
|
||||
* @return array|null
|
||||
*/
|
||||
public function getAvailableMails($dir)
|
||||
{
|
||||
if (!is_dir($dir)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
$mail_directory = $this->filesystem->listEntriesRecursively($dir);
|
||||
$mail_list = array();
|
||||
|
||||
// Remove unwanted .html / .txt / .tpl / .php / . / ..
|
||||
foreach ($mail_directory as $mail) {
|
||||
|
||||
if (strpos($mail->getFilename(), '.') !== false) {
|
||||
$tmp = explode('.', $mail->getFilename());
|
||||
|
||||
// Check for filename existence (left part) and if extension is html (right part)
|
||||
if ( ($tmp === false || !isset($tmp[0])) || (isset($tmp[1]) && $tmp[1] !== 'html')) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$mail_name_no_ext = $tmp[0];
|
||||
if (!in_array($mail_name_no_ext, $mail_list)) {
|
||||
$mail_list[] = $mail_name_no_ext;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return $mail_list;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Give in input getAvailableMails(), will output a human readable and proper string name
|
||||
* @return string
|
||||
*/
|
||||
public function getCleanedMailName($mail_name)
|
||||
{
|
||||
if (strpos($mail_name, '.') !== false) {
|
||||
$tmp = explode('.', $mail_name);
|
||||
|
||||
if ($tmp === false || !isset($tmp[0])) {
|
||||
return $mail_name;
|
||||
}
|
||||
|
||||
$mail_name = $tmp[0];
|
||||
}
|
||||
|
||||
return ucfirst(str_replace(array('_', '-'), ' ', $mail_name));
|
||||
}
|
||||
}
|
214
Core/Business/Payment/Core_Business_Payment_PaymentOption.php
Normal file
@ -0,0 +1,214 @@
|
||||
<?php
|
||||
/**
|
||||
* 2007-2015 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-2015 PrestaShop SA
|
||||
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
class Core_Business_Payment_PaymentOption
|
||||
{
|
||||
private $callToActionText;
|
||||
private $logo;
|
||||
private $action;
|
||||
private $method;
|
||||
private $inputs;
|
||||
private $form;
|
||||
private $moduleName;
|
||||
|
||||
/**
|
||||
* Return Call to Action Text
|
||||
* @return string
|
||||
*/
|
||||
public function getCallToActionText()
|
||||
{
|
||||
return $this->callToActionText;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set Call To Action Text
|
||||
* @param $callToActionText
|
||||
* @return $this
|
||||
*/
|
||||
public function setCallToActionText($callToActionText)
|
||||
{
|
||||
$this->callToActionText = $callToActionText;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return logo path
|
||||
* @return string
|
||||
*/
|
||||
public function getLogo()
|
||||
{
|
||||
return $this->logo;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set logo path
|
||||
* @param $logo
|
||||
* @return $this
|
||||
*/
|
||||
public function setLogo($logo)
|
||||
{
|
||||
$this->logo = $logo;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return action to perform (POST/GET)
|
||||
* @return string
|
||||
*/
|
||||
public function getAction()
|
||||
{
|
||||
return $this->action;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Set action to be performed by this option
|
||||
* @param $action
|
||||
* @return $this
|
||||
*/
|
||||
public function setAction($action)
|
||||
{
|
||||
$this->action = $action;
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getMethod()
|
||||
{
|
||||
return $this->method;
|
||||
}
|
||||
|
||||
public function setMethod($method)
|
||||
{
|
||||
$this->method = $method;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return inputs contained in this payment option
|
||||
* @return mixed
|
||||
*/
|
||||
public function getInputs()
|
||||
{
|
||||
return $this->inputs;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set inputs for this payment option
|
||||
* @param $inputs
|
||||
* @return $this
|
||||
*/
|
||||
public function setInputs($inputs)
|
||||
{
|
||||
$this->inputs = $inputs;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get payment option form
|
||||
* @return mixed
|
||||
*/
|
||||
public function getForm()
|
||||
{
|
||||
return $this->form;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set payment option form
|
||||
* @param $form
|
||||
* @return $this
|
||||
*/
|
||||
public function setForm($form)
|
||||
{
|
||||
$this->form = $form;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get related module name to this payment option
|
||||
* @return string
|
||||
*/
|
||||
public function getModuleName()
|
||||
{
|
||||
return $this->moduleName;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set related module name to this payment option
|
||||
* @param $moduleName
|
||||
* @return $this
|
||||
*/
|
||||
public function setModuleName($moduleName)
|
||||
{
|
||||
$this->moduleName = $moduleName;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Legacy options were specified this way:
|
||||
* - either an array with a top level property 'cta_text'
|
||||
* and then the other properties
|
||||
* - or a numerically indexed array or arrays as described above
|
||||
* Since this was a mess, this method is provided to convert them.
|
||||
* It takes as input a legacy option (in either form) and always
|
||||
* returns an array of instances of Core_Business_Payment_PaymentOption
|
||||
*/
|
||||
public static function convertLegacyOption(array $legacyOption)
|
||||
{
|
||||
if (!$legacyOption)
|
||||
return;
|
||||
|
||||
if (array_key_exists('cta_text', $legacyOption)) {
|
||||
$legacyOption = array($legacyOption);
|
||||
}
|
||||
|
||||
$newOptions = array();
|
||||
|
||||
$defaults = array(
|
||||
'action' => null,
|
||||
'form' => null,
|
||||
'method' => null,
|
||||
'inputs' => array(),
|
||||
'logo' => null
|
||||
);
|
||||
|
||||
foreach ($legacyOption as $option) {
|
||||
|
||||
$option = array_merge($defaults, $option);
|
||||
|
||||
$newOption = new Core_Business_Payment_PaymentOption();
|
||||
$newOption->setCallToActionText($option['cta_text'])
|
||||
->setAction($option['action'])
|
||||
->setForm($option['form'])
|
||||
->setInputs($option['inputs'])
|
||||
->setLogo($option['logo'])
|
||||
->setMethod($option['method']);
|
||||
|
||||
$newOptions[] = $newOption;
|
||||
}
|
||||
|
||||
return $newOptions;
|
||||
}
|
||||
}
|
@ -0,0 +1,31 @@
|
||||
<?php
|
||||
/**
|
||||
* 2007-2015 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-2015 PrestaShop SA
|
||||
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
interface Core_Foundation_Database_DatabaseInterface
|
||||
{
|
||||
public function select($sqlString);
|
||||
public function escape($unsafeData);
|
||||
}
|
@ -0,0 +1,42 @@
|
||||
<?php
|
||||
/**
|
||||
* 2007-2015 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-2015 PrestaShop SA
|
||||
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
interface Core_Foundation_Database_EntityInterface
|
||||
{
|
||||
/**
|
||||
* Returns the name of the repository class for this entity.
|
||||
* If unspecified, a generic repository will be used for the entity.
|
||||
*
|
||||
* @return string or falsey value
|
||||
*/
|
||||
public static function getRepositoryClassName();
|
||||
|
||||
public function save();
|
||||
|
||||
public function delete();
|
||||
|
||||
public function hydrate(array $keyValueData);
|
||||
}
|
@ -0,0 +1,115 @@
|
||||
<?php
|
||||
/**
|
||||
* 2007-2015 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-2015 PrestaShop SA
|
||||
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
class Core_Foundation_Database_EntityManager
|
||||
{
|
||||
private $db;
|
||||
private $configuration;
|
||||
|
||||
private $entityMetaData = array();
|
||||
|
||||
public function __construct(
|
||||
Core_Foundation_Database_DatabaseInterface $db,
|
||||
Core_Business_ConfigurationInterface $configuration
|
||||
)
|
||||
{
|
||||
$this->db = $db;
|
||||
$this->configuration = $configuration;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return current database object used
|
||||
* @return Core_Foundation_Database_DatabaseInterface
|
||||
*/
|
||||
public function getDatabase()
|
||||
{
|
||||
return $this->db;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return current repository used
|
||||
* @param $className
|
||||
* @return mixed
|
||||
*/
|
||||
public function getRepository($className)
|
||||
{
|
||||
if (is_callable(array($className, 'getRepositoryClassName'))) {
|
||||
$repositoryClass = call_user_func(array($className, 'getRepositoryClassName'));
|
||||
} else {
|
||||
$repositoryClass = null;
|
||||
}
|
||||
|
||||
if (!$repositoryClass) {
|
||||
$repositoryClass = 'Core_Foundation_Database_EntityRepository';
|
||||
}
|
||||
|
||||
$repository = new $repositoryClass(
|
||||
$this,
|
||||
$this->configuration->get('_DB_PREFIX_'),
|
||||
$this->getEntityMetaData($className)
|
||||
);
|
||||
|
||||
return $repository;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return entity's meta data
|
||||
* @param $className
|
||||
* @return mixed
|
||||
* @throws Adapter_Exception
|
||||
*/
|
||||
public function getEntityMetaData($className)
|
||||
{
|
||||
if (!array_key_exists($className, $this->entityMetaData)) {
|
||||
$metaDataRetriever = new Adapter_EntityMetaDataRetriever;
|
||||
$this->entityMetaData[$className] = $metaDataRetriever->getEntityMetaData($className);
|
||||
}
|
||||
|
||||
return $this->entityMetaData[$className];
|
||||
}
|
||||
|
||||
/**
|
||||
* Flush entity to DB
|
||||
* @param Core_Foundation_Database_EntityInterface $entity
|
||||
* @return $this
|
||||
*/
|
||||
public function save(Core_Foundation_Database_EntityInterface $entity)
|
||||
{
|
||||
$entity->save();
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* DElete entity from DB
|
||||
* @param Core_Foundation_Database_EntityInterface $entity
|
||||
* @return $this
|
||||
*/
|
||||
public function delete(Core_Foundation_Database_EntityInterface $entity)
|
||||
{
|
||||
$entity->delete();
|
||||
return $this;
|
||||
}
|
||||
}
|
@ -0,0 +1,64 @@
|
||||
<?php
|
||||
/**
|
||||
* 2007-2015 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-2015 PrestaShop SA
|
||||
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
class Core_Foundation_Database_EntityMetaData
|
||||
{
|
||||
private $tableName;
|
||||
private $primaryKeyFieldnames;
|
||||
|
||||
public function setTableName($name)
|
||||
{
|
||||
$this->tableName = $name;
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getTableName()
|
||||
{
|
||||
return $this->tableName;
|
||||
}
|
||||
|
||||
public function setPrimaryKeyFieldNames(array $primaryKeyFieldnames)
|
||||
{
|
||||
$this->primaryKeyFieldnames = $primaryKeyFieldnames;
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getPrimaryKeyFieldnames()
|
||||
{
|
||||
return $this->primaryKeyFieldnames;
|
||||
}
|
||||
|
||||
public function setEntityClassName($entityClassName)
|
||||
{
|
||||
$this->entityClassName = $entityClassName;
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getEntityClassName()
|
||||
{
|
||||
return $this->entityClassName;
|
||||
}
|
||||
}
|
@ -0,0 +1,221 @@
|
||||
<?php
|
||||
/**
|
||||
* 2007-2015 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-2015 PrestaShop SA
|
||||
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
class Core_Foundation_Database_EntityRepository
|
||||
{
|
||||
protected $entityManager;
|
||||
protected $db;
|
||||
protected $tablesPrefix;
|
||||
protected $entityMetaData;
|
||||
protected $queryBuilder;
|
||||
|
||||
public function __construct(
|
||||
Core_Foundation_Database_EntityManager $entityManager,
|
||||
$tablesPrefix,
|
||||
Core_Foundation_Database_EntityMetaData $entityMetaData
|
||||
)
|
||||
{
|
||||
$this->entityManager = $entityManager;
|
||||
$this->db = $this->entityManager->getDatabase();
|
||||
$this->tablesPrefix = $tablesPrefix;
|
||||
$this->entityMetaData = $entityMetaData;
|
||||
$this->queryBuilder = new Core_Foundation_Database_EntityManager_QueryBuilder($this->db);
|
||||
}
|
||||
|
||||
public function __call($method, $arguments)
|
||||
{
|
||||
if (0 === strpos($method, 'findOneBy')) {
|
||||
$one = true;
|
||||
$by = substr($method, 9);
|
||||
} else if (0 === strpos($method, 'findBy')) {
|
||||
$one = false;
|
||||
$by = substr($method, 6);
|
||||
} else {
|
||||
throw new Core_Foundation_Database_Exception(sprintf('Undefind method %s.', $method));
|
||||
}
|
||||
|
||||
if (count($arguments) !== 1) {
|
||||
throw new Core_Foundation_Database_Exception(sprintf('Method %s takes exactly one argument.', $method));
|
||||
}
|
||||
|
||||
if (!$by) {
|
||||
$where = $arguments[0];
|
||||
} else {
|
||||
$where = array();
|
||||
$by = $this->convertToDbFieldName($by);
|
||||
$where[$by] = $arguments[0];
|
||||
}
|
||||
|
||||
return $this->doFind($one, $where);
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert a camelCase field name to a snakeCase one
|
||||
* e.g.: findAllByIdCMS => id_cms
|
||||
* @param $camel_case_field_name
|
||||
* @return string
|
||||
*/
|
||||
private function convertToDbFieldName($camel_case_field_name)
|
||||
{
|
||||
return strtolower(preg_replace('/([a-z])([A-Z])/', '$1_$2', $camel_case_field_name));
|
||||
}
|
||||
|
||||
/**
|
||||
* Return ID field name
|
||||
* @return mixed
|
||||
* @throws Core_Foundation_Database_Exception
|
||||
*/
|
||||
protected function getIdFieldName()
|
||||
{
|
||||
$primary = $this->entityMetaData->getPrimaryKeyFieldnames();
|
||||
|
||||
if (count($primary) === 0) {
|
||||
throw new Core_Foundation_Database_Exception(
|
||||
sprintf(
|
||||
'No primary key defined in entity `%s`.',
|
||||
$this->entityMetaData->getEntityClassName()
|
||||
)
|
||||
);
|
||||
} else if (count($primary) > 1) {
|
||||
throw new Core_Foundation_Database_Exception(
|
||||
sprintf(
|
||||
'Entity `%s` has a composite primary key, which is not supported by entity repositories.',
|
||||
$this->entityMetaData->getEntityClassName()
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
return $primary[0];
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns escaped+prefixed current table name
|
||||
* @return mixed
|
||||
*/
|
||||
protected function getTableNameWithPrefix()
|
||||
{
|
||||
return $this->db->escape($this->tablesPrefix . $this->entityMetaData->getTableName());
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns escaped DB table prefix
|
||||
* @return mixed
|
||||
*/
|
||||
protected function getPrefix()
|
||||
{
|
||||
return $this->db->escape($this->tablesPrefix);
|
||||
}
|
||||
|
||||
/**
|
||||
* Return a new empty Entity depending on current Repository selected
|
||||
* @return mixed
|
||||
*/
|
||||
public function getNewEntity()
|
||||
{
|
||||
$entityClassName = $this->entityMetaData->getEntityClassName();
|
||||
return new $entityClassName;
|
||||
}
|
||||
|
||||
/**
|
||||
* This function takes an array of database rows as input
|
||||
* and returns an hydrated entity if there is one row only.
|
||||
*
|
||||
* Null is returned when there are no rows, and an exception is thrown
|
||||
* if there are too many rows.
|
||||
*
|
||||
* @param array $rows Database rows
|
||||
*/
|
||||
protected function hydrateOne(array $rows)
|
||||
{
|
||||
if (count($rows) === 0) {
|
||||
return null;
|
||||
} else if (count($rows) > 1) {
|
||||
throw new Core_Foundation_Database_Exception('Too many rows returned.');
|
||||
} else {
|
||||
$data = $rows[0];
|
||||
$entity = $this-> getNewEntity();
|
||||
$entity->hydrate($data);
|
||||
return $entity;
|
||||
}
|
||||
}
|
||||
|
||||
protected function hydrateMany(array $rows)
|
||||
{
|
||||
$entities = array();
|
||||
foreach ($rows as $row) {
|
||||
$entity = $this->getNewEntity();
|
||||
$entity->hydrate($row);
|
||||
$entities[] = $entity;
|
||||
}
|
||||
return $entities;
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs and performs 'SELECT' in DB
|
||||
* @param $one
|
||||
* @param array $cumulativeConditions
|
||||
* @return array|mixed|null
|
||||
* @throws Core_Foundation_Database_Exception
|
||||
*/
|
||||
private function doFind($one, array $cumulativeConditions)
|
||||
{
|
||||
$whereClause = $this->queryBuilder->buildWhereConditions('AND', $cumulativeConditions);
|
||||
|
||||
$sql = 'SELECT * FROM ' . $this->getTableNameWithPrefix() . ' WHERE ' . $whereClause;
|
||||
|
||||
$rows = $this->db->select($sql);
|
||||
|
||||
if ($one) {
|
||||
return $this->hydrateOne($rows);
|
||||
} else {
|
||||
return $this->hydrateMany($rows);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Find one entity in DB
|
||||
* @param $id
|
||||
* @return array|mixed|null
|
||||
* @throws Core_Foundation_Database_Exception
|
||||
*/
|
||||
public function findOne($id)
|
||||
{
|
||||
$conditions = array();
|
||||
$conditions[$this->getIdFieldName()] = $id;
|
||||
|
||||
return $this->doFind(true, $conditions);
|
||||
}
|
||||
|
||||
/**
|
||||
* Find all entities in DB
|
||||
* @return array
|
||||
*/
|
||||
public function findAll()
|
||||
{
|
||||
$sql = 'SELECT * FROM ' . $this->getTableNameWithPrefix();
|
||||
return $this->hydrateMany($this->db->select($sql));
|
||||
}
|
||||
}
|
@ -0,0 +1,29 @@
|
||||
<?php
|
||||
/**
|
||||
* 2007-2015 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-2015 PrestaShop SA
|
||||
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
class Core_Foundation_Database_Exception extends Core_Foundation_Exception_Exception
|
||||
{
|
||||
}
|
@ -0,0 +1,71 @@
|
||||
<?php
|
||||
/**
|
||||
* 2007-2015 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-2015 PrestaShop SA
|
||||
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
class Core_Foundation_Database_EntityManager_QueryBuilder
|
||||
{
|
||||
private $db;
|
||||
|
||||
public function __construct(Core_Foundation_Database_DatabaseInterface $db)
|
||||
{
|
||||
$this->db = $db;
|
||||
}
|
||||
|
||||
public function quote($value)
|
||||
{
|
||||
$escaped = $this->db->escape($value);
|
||||
|
||||
if (is_string($value)) {
|
||||
return "'" . $escaped . "'";
|
||||
} else {
|
||||
return $escaped;
|
||||
}
|
||||
}
|
||||
|
||||
public function buildWhereConditions($andOrOr, array $conditions)
|
||||
{
|
||||
$operator = strtoupper($andOrOr);
|
||||
|
||||
if ($operator !== 'AND' && $operator !== 'OR') {
|
||||
throw new Core_Foundation_Database_Exception(sprintf('Invalid operator %s - must be "and" or "or".', $andOrOr));
|
||||
}
|
||||
|
||||
$parts = array();
|
||||
|
||||
foreach ($conditions as $key => $value) {
|
||||
if (is_scalar($value)) {
|
||||
$parts[] = $key . ' = ' . $this->quote($value);
|
||||
} else {
|
||||
$list = array();
|
||||
foreach ($value as $item) {
|
||||
$list[] = $this->quote($item);
|
||||
}
|
||||
$parts[] = $key . ' IN (' . implode(', ', $list) . ')';
|
||||
}
|
||||
}
|
||||
|
||||
return implode(" $operator ", $parts);
|
||||
}
|
||||
}
|
@ -0,0 +1,33 @@
|
||||
<?php
|
||||
/**
|
||||
* 2007-2015 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-2015 PrestaShop SA
|
||||
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
class Core_Foundation_Exception_Exception extends Exception
|
||||
{
|
||||
public function __construct($message = null, $code = 0, Exception $previous = null)
|
||||
{
|
||||
parent::__construct($message, $code, $previous);
|
||||
}
|
||||
}
|
@ -0,0 +1,29 @@
|
||||
<?php
|
||||
/**
|
||||
* 2007-2015 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-2015 PrestaShop SA
|
||||
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
class Core_Foundation_FileSystem_Exception extends Core_Foundation_Exception_Exception
|
||||
{
|
||||
}
|
@ -0,0 +1,134 @@
|
||||
<?php
|
||||
/**
|
||||
* 2007-2015 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-2015 PrestaShop SA
|
||||
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
class Core_Foundation_FileSystem_FileSystem
|
||||
{
|
||||
/**
|
||||
* Replaces directory separators with the system's native one
|
||||
* and trims the trailing separator.
|
||||
*/
|
||||
public function normalizePath($path)
|
||||
{
|
||||
return rtrim(
|
||||
str_replace(array('/', '\\'), DIRECTORY_SEPARATOR, $path),
|
||||
DIRECTORY_SEPARATOR
|
||||
);
|
||||
}
|
||||
|
||||
private function joinTwoPaths($a, $b)
|
||||
{
|
||||
return $this->normalizePath($a) . DIRECTORY_SEPARATOR . $this->normalizePath($b);
|
||||
}
|
||||
|
||||
/**
|
||||
* Joins an arbitrary number of paths, normalizing them along the way.
|
||||
*/
|
||||
public function joinPaths()
|
||||
{
|
||||
if (func_num_args() < 2) {
|
||||
throw new Core_Foundation_FileSystem_Exception('joinPaths requires at least 2 arguments.');
|
||||
} else if (func_num_args() === 2) {
|
||||
return $this->joinTwoPaths(func_get_arg(0), func_get_arg(1));
|
||||
} else if (func_num_args() > 2) {
|
||||
return $this->joinPaths(
|
||||
func_get_arg(0),
|
||||
call_user_func_array(
|
||||
array($this, 'joinPaths'),
|
||||
array_slice(func_get_args(), 1)
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Performs a depth first listing of directory entries.
|
||||
* Throws exception if $path is not a file.
|
||||
* If $path is a file and not a directory, just gets the file info for it
|
||||
* and return it in an array.
|
||||
* @return an array of SplFileInfo object indexed by file path
|
||||
*/
|
||||
public function listEntriesRecursively($path)
|
||||
{
|
||||
if (!file_exists($path)) {
|
||||
throw new Core_Foundation_FileSystem_Exception(
|
||||
sprintf(
|
||||
'No such file or directory: %s',
|
||||
$path
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
if (!is_dir($path)) {
|
||||
throw new Core_Foundation_FileSystem_Exception(
|
||||
sprintf(
|
||||
'%s is not a directory',
|
||||
$path
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
$entries = array();
|
||||
|
||||
foreach (scandir($path) as $entry) {
|
||||
if ($entry === '.' || $entry === '..') {
|
||||
continue;
|
||||
}
|
||||
|
||||
$newPath = $this->joinPaths($path, $entry);
|
||||
$info = new SplFileInfo($newPath);
|
||||
|
||||
$entries[$newPath] = $info;
|
||||
|
||||
if ($info->isDir()) {
|
||||
$entries = array_merge(
|
||||
$entries,
|
||||
$this->listEntriesRecursively($newPath)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
return $entries;
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter used by listFilesRecursively.
|
||||
*/
|
||||
private function matchOnlyFiles(SplFileInfo $info)
|
||||
{
|
||||
return $info->isFile();
|
||||
}
|
||||
|
||||
/**
|
||||
* Same as listEntriesRecursively but returns only files.
|
||||
*/
|
||||
public function listFilesRecursively($path)
|
||||
{
|
||||
return array_filter(
|
||||
$this->listEntriesRecursively($path),
|
||||
array($this, 'matchOnlyFiles')
|
||||
);
|
||||
}
|
||||
}
|
172
Core/Foundation/IoC/Core_Foundation_IoC_Container.php
Normal file
@ -0,0 +1,172 @@
|
||||
<?php
|
||||
/**
|
||||
* 2007-2015 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-2015 PrestaShop SA
|
||||
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
class Core_Foundation_IoC_Container
|
||||
{
|
||||
private $bindings = array();
|
||||
private $instances = array();
|
||||
private $namespaceAliases = array();
|
||||
|
||||
public function knows($serviceName)
|
||||
{
|
||||
return array_key_exists($serviceName, $this->bindings);
|
||||
}
|
||||
|
||||
private function knowsNamespaceAlias($alias)
|
||||
{
|
||||
return array_key_exists($alias, $this->namespaceAliases);
|
||||
}
|
||||
|
||||
public function bind($serviceName, $constructor, $shared = false)
|
||||
{
|
||||
if ($this->knows($serviceName)) {
|
||||
throw new Core_Foundation_IoC_Exception(
|
||||
sprintf('Cannot bind `%s` again. A service name can only be bound once.', $serviceName)
|
||||
);
|
||||
}
|
||||
|
||||
$this->bindings[$serviceName] = array(
|
||||
'constructor' => $constructor,
|
||||
'shared' => $shared
|
||||
);
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function aliasNamespace($alias, $namespacePrefix)
|
||||
{
|
||||
if ($this->knowsNamespaceAlias($alias)) {
|
||||
throw new Core_Foundation_IoC_Exception(
|
||||
sprintf(
|
||||
'Namespace alias `%1$s` already exists and points to `%2$s`',
|
||||
$alias, $this->namespaceAliases[$alias]
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
$this->namespaceAliases[$alias] = $namespacePrefix;
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function resolveClassName($className)
|
||||
{
|
||||
$colonPos = strpos($className, ':');
|
||||
if (0 !== $colonPos) {
|
||||
$alias = substr($className, 0, $colonPos);
|
||||
if ($this->knowsNamespaceAlias($alias)) {
|
||||
$class = ltrim(substr($className, $colonPos + 1), '\\');
|
||||
return $this->namespaceAliases[$alias] . '\\' . $class;
|
||||
}
|
||||
}
|
||||
|
||||
return $className;
|
||||
}
|
||||
|
||||
private function makeInstanceFromClassName($className, array $alreadySeen)
|
||||
{
|
||||
$className = $this->resolveClassName($className);
|
||||
|
||||
try {
|
||||
$refl = new ReflectionClass($className);
|
||||
} catch (ReflectionException $re) {
|
||||
throw new Core_Foundation_IoC_Exception(sprintf('This doesn\'t seem to be a class name: `%s`.', $className));
|
||||
}
|
||||
|
||||
$args = array();
|
||||
|
||||
if ($refl->isAbstract()) {
|
||||
throw new Core_Foundation_IoC_Exception(sprintf('Cannot build abstract class: `%s`.', $className));
|
||||
}
|
||||
|
||||
$classConstructor = $refl->getConstructor();
|
||||
|
||||
if ($classConstructor) {
|
||||
foreach ($classConstructor->getParameters() as $param) {
|
||||
$paramClass = $param->getClass();
|
||||
if ($paramClass) {
|
||||
$args[] = $this->doMake($param->getClass()->getName(), $alreadySeen);
|
||||
} else if ($param->isDefaultValueAvailable()) {
|
||||
$args[] = $param->getDefaultValue();
|
||||
} else {
|
||||
throw new Core_Foundation_IoC_Exception(sprintf('Cannot build a `%s`.', $className));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (count($args) > 0) {
|
||||
return $refl->newInstanceArgs($args);
|
||||
} else {
|
||||
// newInstanceArgs with empty array fails in PHP 5.3 when the class
|
||||
// doesn't have an explicitly defined constructor
|
||||
return $refl->newInstance();
|
||||
}
|
||||
}
|
||||
|
||||
private function doMake($serviceName, array $alreadySeen = array())
|
||||
{
|
||||
if (array_key_exists($serviceName, $alreadySeen)) {
|
||||
throw new Core_Foundation_IoC_Exception(sprintf(
|
||||
'Cyclic dependency detected while building `%s`.',
|
||||
$serviceName
|
||||
));
|
||||
}
|
||||
|
||||
$alreadySeen[$serviceName] = true;
|
||||
|
||||
if (!$this->knows($serviceName)) {
|
||||
$this->bind($serviceName, $serviceName);
|
||||
}
|
||||
|
||||
$binding = $this->bindings[$serviceName];
|
||||
|
||||
if ($binding['shared'] && array_key_exists($serviceName, $this->instances)) {
|
||||
return $this->instances[$serviceName];
|
||||
} else {
|
||||
$constructor = $binding['constructor'];
|
||||
|
||||
if (is_callable($constructor)) {
|
||||
$service = call_user_func($constructor);
|
||||
} else if (!is_string($constructor)) {
|
||||
// user already provided the value, no need to construct it.
|
||||
$service = $constructor;
|
||||
} else {
|
||||
// assume the $constructor is a class name
|
||||
$service = $this->makeInstanceFromClassName($constructor, $alreadySeen);
|
||||
}
|
||||
|
||||
if ($binding['shared']) {
|
||||
$this->instances[$serviceName] = $service;
|
||||
}
|
||||
|
||||
return $service;
|
||||
}
|
||||
}
|
||||
|
||||
public function make($serviceName)
|
||||
{
|
||||
return $this->doMake($serviceName, array());
|
||||
}
|
||||
}
|
29
Core/Foundation/IoC/Core_Foundation_IoC_Exception.php
Normal file
@ -0,0 +1,29 @@
|
||||
<?php
|
||||
/**
|
||||
* 2007-2015 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-2015 PrestaShop SA
|
||||
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
class Core_Foundation_IoC_Exception extends Core_Foundation_Exception_Exception
|
||||
{
|
||||
}
|
113
README.md
@ -0,0 +1,113 @@
|
||||
About PrestaShop
|
||||
--------
|
||||
|
||||
PrestaShop is a free and open-source e-commerce web application, committed to providing the best shopping cart experience for both merchants and customers. It is written in PHP, is highly customizable, supports all the major payment services, is translated in many languages and localized for many countries, has a fully responsive design (both front and back office), etc. [See all the available features][1].
|
||||
|
||||
<p align="center">
|
||||
<img src="http://www.prestashop.com/images/banners/general/ps16-screenshot-github.png" alt="PrestaShop's back office dashboard"/>
|
||||
</p>
|
||||
|
||||
To download the latest stable public version of PrestaShop, please go to [the download page][2] on the official PrestaShop site.
|
||||
|
||||
|
||||
About this repository
|
||||
--------
|
||||
|
||||
This repository contains the source code for the latest version of PrestaShop 1.6.
|
||||
|
||||
Clicking the "Download ZIP" button from the root of this repository will download the current state of PrestaShop 1.6 -- which is in active development, and cannot be considered stable. If you want the latest stable version, go to [the download page][2].
|
||||
|
||||
Note that the ZIP file does not contain the default modules: you need to make a recursive clone using your local Git client in order to download their files too. See [CONTRIBUTING.md][7] for more information about using Git and GitHub.
|
||||
|
||||
Also, the ZIP file contains resources for developers and designers that are not in the public archive, for instance the SCSS sources files for the default themes (in the /default-bootstrap/sass folder) or the unit testing files (in the /tests folder).
|
||||
|
||||
|
||||
Server configuration
|
||||
--------
|
||||
|
||||
To install PrestaShop, you need a web server running PHP 5.2+ and any flavor of MySQL 5.0+ (MySQL, MariaDB, Percona Server, etc.).
|
||||
You will also need a database administration tool, such as phpMyAdmin, in order to create a database for PrestaShop.
|
||||
We recommend the Apache or Nginx web servers.
|
||||
You can find more information on the [System Administrator Guide][19].
|
||||
|
||||
If your host does not offer PHP 5 by default, [here are a few explanations][3] about PHP 5 or the `.htaccess` file for certain hosting services (1&1, Free.fr, OVH, Infomaniak, Amen, GoDaddy, etc.).
|
||||
|
||||
If you want your own store with nothing to download and install, you should use [PrestaShop Cloud][4], our 100% free and fully-hosted PrestaShop service: it lets you create your online store in less than 10 minutes without any technical knowledge. Learn more about the [difference between PrestaShop Cloud and PrestaShop Download][10].
|
||||
|
||||
|
||||
Installation
|
||||
--------
|
||||
|
||||
Once the files in the PrestaShop archive have been decompressed and uploaded on your hosting space, go to the root of your PrestaShop directory with your web browser, and the PrestaShop installer will start automatically. Follow the instructions until PrestaShop is installed.
|
||||
|
||||
If you get any PHP error, it might be that you do not have PHP 5 on your web server, or that you need to activate it. See [this page for explanations about PHP 5][3], or contact your web host directly.
|
||||
If you do not find any solution to start the installer, please post about your issue on [the PrestaShop forums][5].
|
||||
|
||||
|
||||
User documentation
|
||||
--------
|
||||
|
||||
The official PrestaShop documentation is available online [on its own website][6]
|
||||
|
||||
First-time users will be particularly interested in the following guides:
|
||||
* [Getting Started][13]: How to install PrestaShop, and what you need to know.
|
||||
* [User Guide][14]: All there is to know to put PrestaShop to good use.
|
||||
* [Updating Guide][15]: Switching to the newest version is not trivial. Make sure you do it right.
|
||||
* [Merchant's Guide][16]: Tips and tricks for first-time online sellers.
|
||||
* The [FAQ][17] and the [Troubleshooting][18] pages should also be of tremendous help to you.
|
||||
|
||||
|
||||
Contributing
|
||||
--------
|
||||
|
||||
If you want to contribute code to PrestaShop, read the [CONTRIBUTING.md][7] file in this repository or read the [tutorials about contribution][8] on the documentation site.
|
||||
|
||||
Current [Travis](https://travis-ci.org/) status: [![Travis](https://travis-ci.org/PrestaShop/PrestaShop.svg?branch=1.6)](https://travis-ci.org/PrestaShop/PrestaShop) (The Unit Tests are being implemented, so the status might be broken).
|
||||
|
||||
If you want to help translate PrestaShop in your language, [join us on Crowdin][9]!
|
||||
|
||||
Current Crowdin status (for 69 registered languages): [![Crowdin](https://crowdin.net/badges/prestashop-official/localized.png)](https://crowdin.net/project/prestashop-official)
|
||||
|
||||
|
||||
Extending PrestaShop
|
||||
--------
|
||||
|
||||
PrestaShop is a very extensible e-commerce platform, both through modules and themes. Developers can even override the default components and behaviors. Learn more about this using the [Developer Guide][11] and the [Designer Guide][12].
|
||||
|
||||
Themes and modules can be obtained (and sold!) from [PrestaShop Addons][20], the official marketplace for PrestaShop.
|
||||
|
||||
|
||||
Community forums
|
||||
--------
|
||||
|
||||
You can discuss about e-commerce, help other merchants and get help, and contribute to improving PrestaShop together with the PrestaShop community on [the PrestaShop forums][5].
|
||||
|
||||
|
||||
Getting support
|
||||
--------
|
||||
|
||||
If you need help using PrestaShop 1.6, contact the PrestaShop support team: http://support.prestashop.com/.
|
||||
|
||||
|
||||
Thank you for downloading and using the PrestaShop open-source e-commerce solution!
|
||||
|
||||
[1]: https://www.prestashop.com/en/online-store-builder
|
||||
[2]: http://www.prestashop.com/en/download
|
||||
[3]: http://doc.prestashop.com/display/PS16/Misc.+information#Misc.information-ActivatingPHP5
|
||||
[4]: http://www.prestashop.com
|
||||
[5]: http://www.prestashop.com/forums/
|
||||
[6]: http://doc.prestashop.com
|
||||
[7]: CONTRIBUTING.md
|
||||
[8]: http://doc.prestashop.com/display/PS16/Contributing+to+PrestaShop
|
||||
[9]: https://crowdin.net/project/prestashop-official
|
||||
[10]: https://www.prestashop.com/en/ecommerce-software
|
||||
[11]: http://doc.prestashop.com/display/PS16/Developer+Guide
|
||||
[12]: http://doc.prestashop.com/display/PS16/Designer+Guide
|
||||
[13]: http://doc.prestashop.com/display/PS16/Getting+Started
|
||||
[14]: http://doc.prestashop.com/display/PS16/User+Guide
|
||||
[15]: http://doc.prestashop.com/display/PS16/Updating+PrestaShop
|
||||
[16]: http://doc.prestashop.com/display/PS16/Merchant%27s+Guide
|
||||
[17]: http://doc.prestashop.com/display/PS16/FAQ
|
||||
[18]: http://doc.prestashop.com/display/PS16/Troubleshooting
|
||||
[19]: http://doc.prestashop.com/display/PS16/System+Administrator+Guide
|
||||
[20]: http://addons.prestashop.com/
|
166
_install/classes/controllerConsole.php
Normal file
@ -0,0 +1,166 @@
|
||||
<?php
|
||||
/*
|
||||
* 2007-2015 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-2015 PrestaShop SA
|
||||
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
abstract class InstallControllerConsole
|
||||
{
|
||||
/**
|
||||
* @var array List of installer steps
|
||||
*/
|
||||
protected static $steps = array('process');
|
||||
|
||||
protected static $instances = array();
|
||||
|
||||
/**
|
||||
* @var string Current step
|
||||
*/
|
||||
public $step;
|
||||
|
||||
/**
|
||||
* @var array List of errors
|
||||
*/
|
||||
public $errors = array();
|
||||
|
||||
public $controller;
|
||||
|
||||
/**
|
||||
* @var InstallSession
|
||||
*/
|
||||
public $session;
|
||||
|
||||
/**
|
||||
* @var InstallLanguages
|
||||
*/
|
||||
public $language;
|
||||
|
||||
/**
|
||||
* @var InstallAbstractModel
|
||||
*/
|
||||
public $model;
|
||||
|
||||
/**
|
||||
* Validate current step
|
||||
*/
|
||||
abstract public function validate();
|
||||
|
||||
final public static function execute($argc, $argv)
|
||||
{
|
||||
if (!($argc-1))
|
||||
{
|
||||
$available_arguments = Datas::getInstance()->getArgs();
|
||||
echo 'Arguments available:'."\n";
|
||||
foreach ($available_arguments as $key => $arg)
|
||||
{
|
||||
$name = isset($arg['name']) ? $arg['name'] : $key;
|
||||
echo '--'.$name."\t".(isset($arg['help']) ? $arg['help'] : '').(isset($arg['default']) ? "\t".'(Default: '.$arg['default'].')' : '')."\n";
|
||||
}
|
||||
exit;
|
||||
}
|
||||
|
||||
$errors = Datas::getInstance()->getAndCheckArgs($argv);
|
||||
if (Datas::getInstance()->show_license)
|
||||
{
|
||||
echo strip_tags(file_get_contents(_PS_INSTALL_PATH_.'theme/views/license_content.phtml'));
|
||||
exit;
|
||||
}
|
||||
|
||||
if ($errors !== true)
|
||||
{
|
||||
if (count($errors))
|
||||
foreach ($errors as $error)
|
||||
echo $error."\n";
|
||||
exit;
|
||||
}
|
||||
|
||||
if (!file_exists(_PS_INSTALL_CONTROLLERS_PATH_.'console/process.php'))
|
||||
throw new PrestashopInstallerException("Controller file 'console/process.php' not found");
|
||||
|
||||
require_once _PS_INSTALL_CONTROLLERS_PATH_.'console/process.php';
|
||||
$classname = 'InstallControllerConsoleProcess';
|
||||
self::$instances['process'] = new InstallControllerConsoleProcess('process');
|
||||
|
||||
$datas = Datas::getInstance();
|
||||
|
||||
/* redefine HTTP_HOST */
|
||||
$_SERVER['HTTP_HOST'] = $datas->http_host;
|
||||
|
||||
@date_default_timezone_set($datas->timezone);
|
||||
|
||||
self::$instances['process']->process();
|
||||
}
|
||||
|
||||
final public function __construct($step)
|
||||
{
|
||||
$this->step = $step;
|
||||
$this->datas = Datas::getInstance();
|
||||
|
||||
// Set current language
|
||||
$this->language = InstallLanguages::getInstance();
|
||||
if (!$this->datas->language)
|
||||
die('No language defined');
|
||||
$this->language->setLanguage($this->datas->language);
|
||||
|
||||
$this->init();
|
||||
}
|
||||
|
||||
/**
|
||||
* Initialize model
|
||||
*/
|
||||
public function init()
|
||||
{
|
||||
}
|
||||
|
||||
public function printErrors()
|
||||
{
|
||||
$errors = $this->model_install->getErrors();
|
||||
if (count($errors))
|
||||
{
|
||||
if (!is_array($errors))
|
||||
$errors = array($errors);
|
||||
echo 'Errors :'."\n";
|
||||
foreach ($errors as $error_process)
|
||||
foreach ($error_process as $error)
|
||||
echo (is_string($error) ? $error : print_r($error, true))."\n";
|
||||
die;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 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();
|
||||
return call_user_func_array(array($this->language, 'l'), $args);
|
||||
}
|
||||
|
||||
public function process()
|
||||
{
|
||||
}
|
||||
}
|
469
_install/classes/controllerHttp.php
Normal file
@ -0,0 +1,469 @@
|
||||
<?php
|
||||
/*
|
||||
* 2007-2015 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-2015 PrestaShop SA
|
||||
* @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', 'license', 'system', 'configure', 'database', 'process');
|
||||
protected $phone;
|
||||
protected static $instances = array();
|
||||
|
||||
/**
|
||||
* @var string Current step
|
||||
*/
|
||||
public $step;
|
||||
|
||||
/**
|
||||
* @var array List of errors
|
||||
*/
|
||||
public $errors = array();
|
||||
|
||||
public $controller;
|
||||
|
||||
/**
|
||||
* @var InstallSession
|
||||
*/
|
||||
public $session;
|
||||
|
||||
/**
|
||||
* @var InstallLanguages
|
||||
*/
|
||||
public $language;
|
||||
|
||||
/**
|
||||
* @var bool If false, disable next button access
|
||||
*/
|
||||
public $next_button = true;
|
||||
|
||||
/**
|
||||
* @var bool If false, disable previous button access
|
||||
*/
|
||||
public $previous_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()
|
||||
{
|
||||
if (Tools::getValue('compile_templates'))
|
||||
{
|
||||
require_once (_PS_INSTALL_CONTROLLERS_PATH_.'http/smarty_compile.php');
|
||||
exit;
|
||||
}
|
||||
|
||||
$session = InstallSession::getInstance();
|
||||
if (!$session->last_step || $session->last_step == 'welcome')
|
||||
Tools::generateIndex();
|
||||
|
||||
// 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);
|
||||
}
|
||||
|
||||
if (!$session->last_step || !in_array($session->last_step, self::$steps))
|
||||
$session->last_step = self::$steps[0];
|
||||
|
||||
// Set timezone
|
||||
if ($session->shop_timezone)
|
||||
@date_default_timezone_set($session->shop_timezone);
|
||||
|
||||
// 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();
|
||||
$detect_language = $this->language->detectLanguage();
|
||||
if (isset($this->session->lang))
|
||||
$lang = $this->session->lang;
|
||||
else
|
||||
$lang = (isset($detect_language['primarytag'])) ? $detect_language['primarytag'] : false;
|
||||
|
||||
if (!in_array($lang, $this->language->getIsoList()))
|
||||
$lang = 'en';
|
||||
$this->language->setLanguage($lang);
|
||||
|
||||
$this->init();
|
||||
}
|
||||
|
||||
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)
|
||||
{
|
||||
$args = func_get_args();
|
||||
return call_user_func_array(array($this->language, 'l'), $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()
|
||||
{
|
||||
$nextStep = (isset(self::$steps[$this->getStepOffset($this->step) + 1])) ? self::$steps[$this->getStepOffset($this->step) + 1] : false;
|
||||
if ($nextStep == 'system' && self::$instances[$nextStep]->validate())
|
||||
$nextStep = self::$instances[$nextStep]->findNextStep();
|
||||
return $nextStep;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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()
|
||||
{
|
||||
if (InstallSession::getInstance()->support_phone != null)
|
||||
return InstallSession::getInstance()->support_phone;
|
||||
if ($this->phone === null)
|
||||
{
|
||||
$this->phone = $this->language->getInformation('phone', false);
|
||||
if ($iframe = Tools::file_get_contents('http://api.prestashop.com/iframe/install.php?lang='.$this->language->getLanguageIso(), false, null, 3))
|
||||
if (preg_match('/<img.+alt="([^"]+)".*>/Ui', $iframe, $matches) && isset($matches[1]))
|
||||
$this->phone = $matches[1];
|
||||
}
|
||||
InstallSession::getInstance()->support_phone = $this->phone;
|
||||
return $this->phone;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get link to documentation for this language
|
||||
*
|
||||
* Enter description here ...
|
||||
*/
|
||||
public function getDocumentationLink()
|
||||
{
|
||||
return $this->language->getInformation('documentation');
|
||||
}
|
||||
|
||||
/**
|
||||
* Get link to tutorial video for this language
|
||||
*
|
||||
* Enter description here ...
|
||||
*/
|
||||
public function getTutorialLink()
|
||||
{
|
||||
return $this->language->getInformation('tutorial');
|
||||
}
|
||||
|
||||
/**
|
||||
* Get link to tailored help for this language
|
||||
*
|
||||
* Enter description here ...
|
||||
*/
|
||||
public function getTailoredHelp()
|
||||
{
|
||||
return $this->language->getInformation('tailored_help');
|
||||
}
|
||||
|
||||
/**
|
||||
* 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');
|
||||
}
|
||||
|
||||
public function getDocumentationUpgradeLink()
|
||||
{
|
||||
return $this->language->getInformation('documentation_upgrade', true);
|
||||
}
|
||||
|
||||
/**
|
||||
* Send AJAX response in JSON format {success: bool, message: string}
|
||||
*
|
||||
* @param bool $success
|
||||
* @param string $message
|
||||
*/
|
||||
public function ajaxJsonAnswer($success, $message = '')
|
||||
{
|
||||
if (!$success && empty($message))
|
||||
$message = print_r(@error_get_last(), true);
|
||||
die(Tools::jsonEncode(array(
|
||||
'success' => (bool)$success,
|
||||
'message' => $message,
|
||||
// 'memory' => round(memory_get_peak_usage()/1024/1024, 2).' Mo',
|
||||
)));
|
||||
}
|
||||
|
||||
/**
|
||||
* 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();
|
||||
if (ob_get_level() && ob_get_length() > 0)
|
||||
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]);
|
||||
}
|
||||
}
|
229
_install/classes/datas.php
Normal file
@ -0,0 +1,229 @@
|
||||
<?php
|
||||
/*
|
||||
* 2007-2015 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-2015 PrestaShop SA
|
||||
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
class Datas
|
||||
{
|
||||
private static $instance = null;
|
||||
protected static $available_args = array(
|
||||
'step' => array(
|
||||
'name' => 'step',
|
||||
'default' => 'all',
|
||||
'validate' => 'isGenericName',
|
||||
'help' => 'all / database,fixtures,theme,modules,addons_modules',
|
||||
),
|
||||
'language' => array(
|
||||
'default' => 'en',
|
||||
'validate' => 'isLanguageIsoCode',
|
||||
'alias' => 'l',
|
||||
'help' => 'language iso code',
|
||||
),
|
||||
'all_languages' => array(
|
||||
'default' => '0',
|
||||
'validate' => 'isInt',
|
||||
'alias' => 'l',
|
||||
'help' => 'install all available languages',
|
||||
),
|
||||
'timezone' => array(
|
||||
'default' => 'Europe/Paris',
|
||||
'alias' => 't',
|
||||
),
|
||||
'base_uri' => array(
|
||||
'name' => 'base_uri',
|
||||
'validate' => 'isUrl',
|
||||
'default' => '/',
|
||||
),
|
||||
'http_host' => array(
|
||||
'name' => 'domain',
|
||||
'validate' => 'isGenericName',
|
||||
'default' => 'localhost',
|
||||
),
|
||||
'database_server' => array(
|
||||
'name' => 'db_server',
|
||||
'default' => 'localhost',
|
||||
'validate' => 'isGenericName',
|
||||
'alias' => 'h',
|
||||
),
|
||||
'database_login' => array(
|
||||
'name' => 'db_user',
|
||||
'alias' => 'u',
|
||||
'default' => 'root',
|
||||
'validate' => 'isGenericName',
|
||||
),
|
||||
'database_password' => array(
|
||||
'name' => 'db_password',
|
||||
'alias' => 'p',
|
||||
'default' => '',
|
||||
),
|
||||
'database_name' => array(
|
||||
'name' => 'db_name',
|
||||
'alias' => 'd',
|
||||
'default' => 'prestashop',
|
||||
'validate' => 'isGenericName',
|
||||
),
|
||||
'database_clear' => array(
|
||||
'name' => 'db_clear',
|
||||
'default' => '1',
|
||||
'validate' => 'isInt',
|
||||
'help' => 'Drop existing tables'
|
||||
),
|
||||
'database_create' => array(
|
||||
'name' => 'db_create',
|
||||
'default' => '0',
|
||||
'validate' => 'isInt',
|
||||
'help' => 'Create the database if not exist'
|
||||
),
|
||||
'database_prefix' => array(
|
||||
'name' => 'prefix',
|
||||
'default' => 'ps_',
|
||||
'validate' => 'isGenericName',
|
||||
),
|
||||
'database_engine' => array(
|
||||
'name' => 'engine',
|
||||
'validate' => 'isMySQLEngine',
|
||||
'default' => 'InnoDB',
|
||||
'help' => 'InnoDB/MyISAM',
|
||||
),
|
||||
'shop_name' => array(
|
||||
'name' => 'name',
|
||||
'validate' => 'isGenericName',
|
||||
'default' => 'PrestaShop',
|
||||
),
|
||||
'shop_activity' => array(
|
||||
'name' => 'activity',
|
||||
'default' => 0,
|
||||
'validate' => 'isInt',
|
||||
),
|
||||
'shop_country' => array(
|
||||
'name' => 'country',
|
||||
'validate' => 'isLanguageIsoCode',
|
||||
'default' => 'fr',
|
||||
),
|
||||
'admin_firstname' => array(
|
||||
'name' => 'firstname',
|
||||
'validate' => 'isName',
|
||||
'default' => 'John',
|
||||
),
|
||||
'admin_lastname' => array(
|
||||
'name' => 'lastname',
|
||||
'validate' => 'isName',
|
||||
'default' => 'Doe',
|
||||
),
|
||||
'admin_password' => array(
|
||||
'name' => 'password',
|
||||
'validate' => 'isPasswd',
|
||||
'default' => '0123456789',
|
||||
),
|
||||
'admin_email' => array(
|
||||
'name' => 'email',
|
||||
'validate' => 'isEmail',
|
||||
'default' => 'pub@prestashop.com'
|
||||
),
|
||||
'show_license' => array(
|
||||
'name' => 'license',
|
||||
'default' => 0,
|
||||
'help' => 'show PrestaShop license'
|
||||
),
|
||||
'newsletter' => array(
|
||||
'name' => 'newsletter',
|
||||
'default' => 1,
|
||||
'help' => 'get news from PrestaShop',
|
||||
),
|
||||
'send_email' => array(
|
||||
'name' => 'send_email',
|
||||
'default' => 1,
|
||||
'help' => 'send an email to the administrator after installation',
|
||||
),
|
||||
);
|
||||
|
||||
protected $datas = array();
|
||||
|
||||
public function __get($key)
|
||||
{
|
||||
if (isset($this->datas[$key]))
|
||||
return $this->datas[$key];
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public function __set($key, $value)
|
||||
{
|
||||
$this->datas[$key] = $value;
|
||||
}
|
||||
|
||||
public static function getInstance()
|
||||
{
|
||||
if (Datas::$instance === null)
|
||||
Datas::$instance = new Datas();
|
||||
return Datas::$instance;
|
||||
}
|
||||
|
||||
public static function getArgs()
|
||||
{
|
||||
return Datas::$available_args;
|
||||
}
|
||||
|
||||
public function getAndCheckArgs($argv)
|
||||
{
|
||||
if (!$argv)
|
||||
return false;
|
||||
|
||||
$args_ok = array();
|
||||
foreach ($argv as $arg)
|
||||
{
|
||||
if (!preg_match('/^--([^=\'"><|`]+)(?:=([^=><|`]+)|(?!license))/i', trim($arg), $res))
|
||||
continue;
|
||||
|
||||
if ($res[1] == 'license' && !isset($res[2]))
|
||||
$res[2] = 1;
|
||||
elseif (!isset($res[2]))
|
||||
continue;
|
||||
|
||||
$args_ok[$res[1]] = $res[2];
|
||||
}
|
||||
|
||||
$errors = array();
|
||||
foreach (Datas::getArgs() as $key => $row)
|
||||
{
|
||||
if (isset($row['name']))
|
||||
$name = $row['name'];
|
||||
else
|
||||
$name = $key;
|
||||
if (!isset($args_ok[$name]))
|
||||
{
|
||||
if (!isset($row['default']))
|
||||
$errors[] = 'Field '.$row['name'].' is empty';
|
||||
else
|
||||
$this->$key = $row['default'];
|
||||
}
|
||||
elseif (isset($row['validate']) && !call_user_func(array('Validate', $row['validate']), $args_ok[$name]))
|
||||
$errors[] = 'Field '.$key.' is not valid';
|
||||
else
|
||||
$this->$key = $args_ok[$name];
|
||||
}
|
||||
|
||||
return count($errors) ? $errors : true;
|
||||
}
|
||||
}
|
29
_install/classes/exception.php
Normal file
@ -0,0 +1,29 @@
|
||||
<?php
|
||||
/*
|
||||
* 2007-2015 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-2015 PrestaShop SA
|
||||
* @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
|
||||
{
|
||||
}
|
35
_install/classes/index.php
Normal file
@ -0,0 +1,35 @@
|
||||
<?php
|
||||
/*
|
||||
* 2007-2015 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-2015 PrestaShop SA
|
||||
* @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;
|
113
_install/classes/language.php
Normal file
@ -0,0 +1,113 @@
|
||||
<?php
|
||||
/*
|
||||
* 2007-2015 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-2015 PrestaShop SA
|
||||
* @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 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;
|
||||
}
|
||||
}
|
216
_install/classes/languages.php
Normal file
@ -0,0 +1,216 @@
|
||||
<?php
|
||||
/*
|
||||
* 2007-2015 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-2015 PrestaShop SA
|
||||
* @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 && file_exists(_PS_INSTALL_LANGS_PATH_.$lang.'/install.php'))
|
||||
$this->languages[$lang] = new InstallLanguage($lang);
|
||||
uasort($this->languages, 'ps_usort_languages');
|
||||
}
|
||||
|
||||
/**
|
||||
* 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;
|
||||
if(count($args) > 1)
|
||||
return call_user_func_array('sprintf', $args);
|
||||
else
|
||||
return $translation;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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 $information;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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];
|
||||
}
|
||||
asort($countries);
|
||||
}
|
||||
|
||||
return $countries;
|
||||
}
|
||||
|
||||
/**
|
||||
* Parse HTTP_ACCEPT_LANGUAGE and get first data matching list of available languages
|
||||
*
|
||||
* @return bool|array
|
||||
*/
|
||||
public function detectLanguage()
|
||||
{
|
||||
// This code is from a php.net comment : http://www.php.net/manual/fr/reserved.variables.server.php#94237
|
||||
$split_languages = explode(',', $_SERVER['HTTP_ACCEPT_LANGUAGE']);
|
||||
if (!is_array($split_languages))
|
||||
return false;
|
||||
|
||||
foreach ($split_languages as $lang)
|
||||
{
|
||||
$pattern = '/^(?P<primarytag>[a-zA-Z]{2,8})'.
|
||||
'(?:-(?P<subtag>[a-zA-Z]{2,8}))?(?:(?:;q=)'.
|
||||
'(?P<quantifier>\d\.\d))?$/';
|
||||
if (preg_match($pattern, $lang, $m))
|
||||
if (in_array($m['primarytag'], $this->getIsoList()))
|
||||
return $m;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
function ps_usort_languages($a, $b)
|
||||
{
|
||||
$aname = $a->getMetaInformation('name');
|
||||
$bname = $b->getMetaInformation('name');
|
||||
if ($aname == $bname)
|
||||
return 0;
|
||||
return ($aname < $bname) ? -1 : 1;
|
||||
}
|
56
_install/classes/model.php
Normal file
@ -0,0 +1,56 @@
|
||||
<?php
|
||||
/*
|
||||
* 2007-2015 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-2015 PrestaShop SA
|
||||
* @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);
|
||||
|
||||
$this->errors[] = $errors;
|
||||
}
|
||||
|
||||
public function getErrors()
|
||||
{
|
||||
return $this->errors;
|
||||
}
|
||||
}
|
119
_install/classes/session.php
Normal file
@ -0,0 +1,119 @@
|
||||
<?php
|
||||
/*
|
||||
* 2007-2015 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-2015 PrestaShop SA
|
||||
* @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;
|
||||
protected static $_cookie_mode = false;
|
||||
protected static $_cookie = false;
|
||||
|
||||
public static function getInstance()
|
||||
{
|
||||
if (!self::$_instance)
|
||||
self::$_instance = new self();
|
||||
return self::$_instance;
|
||||
}
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
session_name('install_'.substr(md5($_SERVER['HTTP_HOST']), 0, 12));
|
||||
$session_started = session_start();
|
||||
if (!($session_started)
|
||||
|| (!isset($_SESSION['session_mode']) && (isset($_GET['_']) || isset($_POST['submitNext']) || isset($_POST['submitPrevious']) || isset($_POST['language']))))
|
||||
{
|
||||
InstallSession::$_cookie_mode = true;
|
||||
InstallSession::$_cookie = new Cookie('ps_install', null, time() + 7200, null, true);
|
||||
}
|
||||
if ($session_started && !isset($_SESSION['session_mode']))
|
||||
{
|
||||
$_SESSION['session_mode'] = 'session';
|
||||
session_write_close();
|
||||
}
|
||||
}
|
||||
|
||||
public function clean()
|
||||
{
|
||||
if (InstallSession::$_cookie_mode)
|
||||
InstallSession::$_cookie->logout();
|
||||
else
|
||||
foreach ($_SESSION as $k => $v)
|
||||
unset($_SESSION[$k]);
|
||||
}
|
||||
|
||||
public function &__get($varname)
|
||||
{
|
||||
if (InstallSession::$_cookie_mode)
|
||||
{
|
||||
$ref = InstallSession::$_cookie->{$varname};
|
||||
if (0 === strncmp($ref, 'serialized_array:', strlen('serialized_array:')))
|
||||
$ref = unserialize(substr($ref, strlen('serialized_array:')));
|
||||
}
|
||||
else
|
||||
{
|
||||
if (isset($_SESSION[$varname]))
|
||||
$ref = &$_SESSION[$varname];
|
||||
else
|
||||
{
|
||||
$null = null;
|
||||
$ref = &$null;
|
||||
}
|
||||
}
|
||||
return $ref;
|
||||
}
|
||||
|
||||
public function __set($varname, $value)
|
||||
{
|
||||
if (InstallSession::$_cookie_mode)
|
||||
{
|
||||
if ($varname == 'xml_loader_ids')
|
||||
return;
|
||||
if (is_array($value))
|
||||
$value = 'serialized_array:'.serialize($value);
|
||||
InstallSession::$_cookie->{$varname} = $value;
|
||||
}
|
||||
else
|
||||
$_SESSION[$varname] = $value;
|
||||
}
|
||||
|
||||
public function __isset($varname)
|
||||
{
|
||||
if (InstallSession::$_cookie_mode)
|
||||
return isset(InstallSession::$_cookie->{$varname});
|
||||
else
|
||||
return isset($_SESSION[$varname]);
|
||||
}
|
||||
|
||||
public function __unset($varname)
|
||||
{
|
||||
if (InstallSession::$_cookie_mode)
|
||||
unset(InstallSession::$_cookie->{$varname});
|
||||
else
|
||||
unset($_SESSION[$varname]);
|
||||
}
|
||||
}
|
71
_install/classes/simplexml.php
Normal file
@ -0,0 +1,71 @@
|
||||
<?php
|
||||
/*
|
||||
* 2007-2015 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-2015 PrestaShop SA
|
||||
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
class InstallSimplexmlElement extends SimpleXMLElement
|
||||
{
|
||||
/**
|
||||
* Can add SimpleXMLElement values in XML tree
|
||||
*
|
||||
* @see SimpleXMLElement::addChild()
|
||||
*/
|
||||
public function addChild($name, $value = null, $namespace = null)
|
||||
{
|
||||
if ($value instanceof SimplexmlElement)
|
||||
{
|
||||
$content = trim((string)$value);
|
||||
if (strlen($content) > 0)
|
||||
$new_element = parent::addChild($name, str_replace('&', '&', $content), $namespace);
|
||||
else
|
||||
{
|
||||
$new_element = parent::addChild($name);
|
||||
foreach ($value->attributes() as $k => $v)
|
||||
$new_element->addAttribute($k, $v);
|
||||
}
|
||||
|
||||
foreach ($value->children() as $child)
|
||||
$new_element->addChild($child->getName(), $child);
|
||||
}
|
||||
else
|
||||
return parent::addChild($name, str_replace('&', '&', $value), $namespace);
|
||||
}
|
||||
|
||||
/**
|
||||
* Generate nice and sweet XML
|
||||
*
|
||||
* @see SimpleXMLElement::asXML()
|
||||
*/
|
||||
public function asXML($filename = null)
|
||||
{
|
||||
$dom = new DOMDocument('1.0');
|
||||
$dom->preserveWhiteSpace = false;
|
||||
$dom->formatOutput = true;
|
||||
$dom->loadXML(parent::asXML());
|
||||
|
||||
if ($filename)
|
||||
return (bool)file_put_contents($filename, $dom->saveXML());
|
||||
return $dom->saveXML();
|
||||
}
|
||||
}
|
122
_install/classes/sqlLoader.php
Normal file
@ -0,0 +1,122 @@
|
||||
<?php
|
||||
/*
|
||||
* 2007-2015 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-2015 PrestaShop SA
|
||||
* @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;
|
||||
}
|
||||
}
|
1285
_install/classes/xmlLoader.php
Normal file
35
_install/controllers/console/index.php
Normal file
@ -0,0 +1,35 @@
|
||||
<?php
|
||||
/*
|
||||
* 2007-2015 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-2015 PrestaShop SA
|
||||
* @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;
|
318
_install/controllers/console/process.php
Normal file
@ -0,0 +1,318 @@
|
||||
<?php
|
||||
/*
|
||||
* 2007-2015 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-2015 PrestaShop SA
|
||||
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
class InstallControllerConsoleProcess extends InstallControllerConsole
|
||||
{
|
||||
const SETTINGS_FILE = 'config/settings.inc.php';
|
||||
|
||||
protected $model_install;
|
||||
public $process_steps = array();
|
||||
public $previous_button = false;
|
||||
|
||||
public function init()
|
||||
{
|
||||
require_once _PS_INSTALL_MODELS_PATH_.'install.php';
|
||||
require_once _PS_INSTALL_MODELS_PATH_.'database.php';
|
||||
$this->model_install = new InstallModelInstall();
|
||||
$this->model_database = new InstallModelDatabase();
|
||||
}
|
||||
|
||||
/**
|
||||
* @see InstallAbstractModel::processNextStep()
|
||||
*/
|
||||
public function processNextStep()
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* @see InstallAbstractModel::validate()
|
||||
*/
|
||||
public function validate()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
public function initializeContext()
|
||||
{
|
||||
global $smarty;
|
||||
|
||||
// Clean all cache values
|
||||
Cache::clean('*');
|
||||
|
||||
Context::getContext()->shop = new Shop(1);
|
||||
Shop::setContext(Shop::CONTEXT_SHOP, 1);
|
||||
Configuration::loadConfiguration();
|
||||
if (!isset(Context::getContext()->language) || !Validate::isLoadedObject(Context::getContext()->language))
|
||||
if ($id_lang = (int)Configuration::get('PS_LANG_DEFAULT'))
|
||||
Context::getContext()->language = new Language($id_lang);
|
||||
if (!isset(Context::getContext()->country) || !Validate::isLoadedObject(Context::getContext()->country))
|
||||
if ($id_country = (int)Configuration::get('PS_COUNTRY_DEFAULT'))
|
||||
Context::getContext()->country = new Country((int)$id_country);
|
||||
if (!isset(Context::getContext()->currency) || !Validate::isLoadedObject(Context::getContext()->currency))
|
||||
if ($id_currency = (int)Configuration::get('PS_CURRENCY_DEFAULT'))
|
||||
Context::getContext()->currency = new Currency((int)$id_currency);
|
||||
|
||||
Context::getContext()->cart = new Cart();
|
||||
Context::getContext()->employee = new Employee(1);
|
||||
if (!defined('_PS_SMARTY_FAST_LOAD_'))
|
||||
define('_PS_SMARTY_FAST_LOAD_', true);
|
||||
require_once _PS_ROOT_DIR_.'/config/smarty.config.inc.php';
|
||||
|
||||
Context::getContext()->smarty = $smarty;
|
||||
}
|
||||
|
||||
public function process()
|
||||
{
|
||||
$steps = explode(',', $this->datas->step);
|
||||
if (in_array('all', $steps))
|
||||
$steps = array('database','fixtures','theme','modules','addons_modules');
|
||||
|
||||
if (in_array('database', $steps))
|
||||
{
|
||||
if (!$this->processGenerateSettingsFile())
|
||||
$this->printErrors();
|
||||
|
||||
if ($this->datas->database_create)
|
||||
$this->model_database->createDatabase($this->datas->database_server, $this->datas->database_name, $this->datas->database_login, $this->datas->database_password);
|
||||
|
||||
if (!$this->model_database->testDatabaseSettings($this->datas->database_server, $this->datas->database_name, $this->datas->database_login, $this->datas->database_password, $this->datas->database_prefix, $this->datas->database_engine, $this->datas->database_clear))
|
||||
$this->printErrors();
|
||||
if (!$this->processInstallDatabase())
|
||||
$this->printErrors();
|
||||
if (!$this->processInstallDefaultData())
|
||||
$this->printErrors();
|
||||
if (!$this->processPopulateDatabase())
|
||||
$this->printErrors();
|
||||
if (!$this->processConfigureShop())
|
||||
$this->printErrors();
|
||||
}
|
||||
|
||||
if (in_array('fixtures', $steps))
|
||||
if (!$this->processInstallFixtures())
|
||||
$this->printErrors();
|
||||
|
||||
if (in_array('modules', $steps))
|
||||
if (!$this->processInstallModules())
|
||||
$this->printErrors();
|
||||
|
||||
if (in_array('addons_modules', $steps))
|
||||
if (!$this->processInstallAddonsModules())
|
||||
$this->printErrors();
|
||||
|
||||
if (in_array('theme', $steps))
|
||||
if (!$this->processInstallTheme())
|
||||
$this->printErrors();
|
||||
|
||||
if ($this->datas->newsletter)
|
||||
{
|
||||
$params = http_build_query(array(
|
||||
'email' => $this->datas->admin_email,
|
||||
'method' => 'addMemberToNewsletter',
|
||||
'language' => $this->datas->lang,
|
||||
'visitorType' => 1,
|
||||
'source' => 'installer'
|
||||
));
|
||||
Tools::file_get_contents('http://www.prestashop.com/ajax/controller.php?'.$params);
|
||||
}
|
||||
|
||||
if ($this->datas->send_email)
|
||||
if (!$this->processSendEmail())
|
||||
$this->printErrors();
|
||||
}
|
||||
|
||||
/**
|
||||
* PROCESS : generateSettingsFile
|
||||
*/
|
||||
public function processGenerateSettingsFile()
|
||||
{
|
||||
return $this->model_install->generateSettingsFile(
|
||||
$this->datas->database_server,
|
||||
$this->datas->database_login,
|
||||
$this->datas->database_password,
|
||||
$this->datas->database_name,
|
||||
$this->datas->database_prefix,
|
||||
$this->datas->database_engine
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* PROCESS : installDatabase
|
||||
* Create database structure
|
||||
*/
|
||||
public function processInstallDatabase()
|
||||
{
|
||||
return $this->model_install->installDatabase($this->datas->database_clear);
|
||||
}
|
||||
|
||||
/**
|
||||
* PROCESS : installDefaultData
|
||||
* Create default shop and languages
|
||||
*/
|
||||
public function processInstallDefaultData()
|
||||
{
|
||||
$this->initializeContext();
|
||||
if (!$res = $this->model_install->installDefaultData($this->datas->shop_name, $this->datas->shop_country, (int)$this->datas->all_languages, true))
|
||||
return false;
|
||||
|
||||
if ($this->datas->base_uri != '/')
|
||||
{
|
||||
$shop_url = new ShopUrl(1);
|
||||
$shop_url->physical_uri = $this->datas->base_uri;
|
||||
$shop_url->save();
|
||||
}
|
||||
|
||||
return $res;
|
||||
}
|
||||
|
||||
/**
|
||||
* PROCESS : populateDatabase
|
||||
* Populate database with default data
|
||||
*/
|
||||
public function processPopulateDatabase()
|
||||
{
|
||||
$this->initializeContext();
|
||||
|
||||
$this->model_install->xml_loader_ids = $this->datas->xml_loader_ids;
|
||||
$result = $this->model_install->populateDatabase();
|
||||
$this->datas->xml_loader_ids = $this->model_install->xml_loader_ids;
|
||||
Configuration::updateValue('PS_INSTALL_XML_LOADERS_ID', Tools::jsonEncode($this->datas->xml_loader_ids));
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* PROCESS : configureShop
|
||||
* Set default shop configuration
|
||||
*/
|
||||
public function processConfigureShop()
|
||||
{
|
||||
$this->initializeContext();
|
||||
|
||||
return $this->model_install->configureShop(array(
|
||||
'shop_name' => $this->datas->shop_name,
|
||||
'shop_activity' => $this->datas->shop_activity,
|
||||
'shop_country' => $this->datas->shop_country,
|
||||
'shop_timezone' => $this->datas->timezone,
|
||||
'use_smtp' => false,
|
||||
'admin_firstname' => $this->datas->admin_firstname,
|
||||
'admin_lastname' => $this->datas->admin_lastname,
|
||||
'admin_password' => $this->datas->admin_password,
|
||||
'admin_email' => $this->datas->admin_email,
|
||||
'configuration_agrement' => true,
|
||||
'send_informations' => true,
|
||||
));
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* PROCESS : installModules
|
||||
* Install all modules in ~/modules/ directory
|
||||
*/
|
||||
public function processInstallModules()
|
||||
{
|
||||
$this->initializeContext();
|
||||
|
||||
return $this->model_install->installModules();
|
||||
}
|
||||
|
||||
/**
|
||||
* PROCESS : installFixtures
|
||||
* Install fixtures (E.g. demo products)
|
||||
*/
|
||||
public function processInstallFixtures()
|
||||
{
|
||||
$this->initializeContext();
|
||||
|
||||
if ((!$this->datas->xml_loader_ids || !is_array($this->datas->xml_loader_ids)) && ($xml_ids = Tools::jsonDecode(Configuration::get('PS_INSTALL_XML_LOADERS_ID'), true)))
|
||||
$this->datas->xml_loader_ids = $xml_ids;
|
||||
|
||||
$this->model_install->xml_loader_ids = $this->datas->xml_loader_ids;
|
||||
$result = $this->model_install->installFixtures(null, array('shop_activity' => $this->datas->shop_activity, 'shop_country' => $this->datas->shop_country));
|
||||
$this->datas->xml_loader_ids = $this->model_install->xml_loader_ids;
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* PROCESS : installTheme
|
||||
* Install theme
|
||||
*/
|
||||
public function processInstallTheme()
|
||||
{
|
||||
$this->initializeContext();
|
||||
|
||||
return $this->model_install->installTheme();
|
||||
}
|
||||
|
||||
/**
|
||||
* PROCESS : installModulesAddons
|
||||
* Install modules from addons
|
||||
*/
|
||||
public function processInstallAddonsModules()
|
||||
{
|
||||
return $this->model_install->installModulesAddons();
|
||||
}
|
||||
|
||||
/**
|
||||
* PROCESS : sendEmail
|
||||
* Send information e-mail
|
||||
*/
|
||||
public function processSendEmail()
|
||||
{
|
||||
require_once _PS_INSTALL_MODELS_PATH_.'mail.php';
|
||||
$mail = new InstallModelMail(
|
||||
false,
|
||||
$this->datas->smtp_server,
|
||||
$this->datas->smtp_login,
|
||||
$this->datas->smtp_password,
|
||||
$this->datas->smtp_port,
|
||||
$this->datas->smtp_encryption,
|
||||
$this->datas->admin_email
|
||||
);
|
||||
|
||||
if (file_exists(_PS_INSTALL_LANGS_PATH_.$this->language->getLanguageIso().'/mail_identifiers.txt'))
|
||||
$content = file_get_contents(_PS_INSTALL_LANGS_PATH_.$this->language->getLanguageIso().'/mail_identifiers.txt');
|
||||
else
|
||||
$content = file_get_contents(_PS_INSTALL_LANGS_PATH_.InstallLanguages::DEFAULT_ISO.'/mail_identifiers.txt');
|
||||
|
||||
$vars = array(
|
||||
'{firstname}' => $this->datas->admin_firstname,
|
||||
'{lastname}' => $this->datas->admin_lastname,
|
||||
'{shop_name}' => $this->datas->shop_name,
|
||||
'{passwd}' => $this->datas->admin_password,
|
||||
'{email}' => $this->datas->admin_email,
|
||||
'{shop_url}' => Tools::getHttpHost(true).__PS_BASE_URI__,
|
||||
);
|
||||
$content = str_replace(array_keys($vars), array_values($vars), $content);
|
||||
|
||||
$mail->send(
|
||||
$this->l('%s Login information', $this->datas->shop_name),
|
||||
$content
|
||||
);
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
304
_install/controllers/http/configure.php
Normal file
@ -0,0 +1,304 @@
|
||||
<?php
|
||||
/*
|
||||
* 2007-2015 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-2015 PrestaShop SA
|
||||
* @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 and admin access
|
||||
*/
|
||||
class InstallControllerHttpConfigure extends InstallControllerHttp
|
||||
{
|
||||
|
||||
public $list_countries = array();
|
||||
|
||||
/**
|
||||
* @see InstallAbstractModel::processNextStep()
|
||||
*/
|
||||
public function processNextStep()
|
||||
{
|
||||
if (Tools::isSubmit('shop_name'))
|
||||
{
|
||||
// Save shop configuration
|
||||
$this->session->shop_name = trim(Tools::getValue('shop_name'));
|
||||
$this->session->shop_activity = Tools::getValue('shop_activity');
|
||||
$this->session->install_type = Tools::getValue('db_mode');
|
||||
$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 ($this->session->send_informations)
|
||||
{
|
||||
$params = http_build_query(array(
|
||||
'email' => $this->session->admin_email,
|
||||
'method' => 'addMemberToNewsletter',
|
||||
'language' => $this->language->getLanguageIso(),
|
||||
'visitorType' => 1,
|
||||
'source' => 'installer'
|
||||
));
|
||||
Tools::file_get_contents('http://www.prestashop.com/ajax/controller.php?'.$params);
|
||||
}
|
||||
|
||||
// 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'));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @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');
|
||||
else if (strlen($this->session->shop_name) > 64)
|
||||
$this->errors['shop_name'] = $this->l('The field %s is limited to %d characters', $this->l('shop name'), 64);
|
||||
|
||||
// Check admin name
|
||||
if ($this->session->admin_firstname && !Validate::isName($this->session->admin_firstname))
|
||||
$this->errors['admin_firstname'] = $this->l('Your firstname contains some invalid characters');
|
||||
else if (strlen($this->session->admin_firstname) > 32)
|
||||
$this->errors['admin_firstname'] = $this->l('The field %s is limited to %d characters', $this->l('firstname'), 32);
|
||||
|
||||
if ($this->session->admin_lastname && !Validate::isName($this->session->admin_lastname))
|
||||
$this->errors['admin_lastname'] = $this->l('Your lastname contains some invalid characters');
|
||||
else if (strlen($this->session->admin_lastname) > 32)
|
||||
$this->errors['admin_lastname'] = $this->l('The field %s is limited to %d characters', $this->l('lastname'), 32);
|
||||
|
||||
// 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 with 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();
|
||||
}
|
||||
|
||||
/**
|
||||
* Process the upload of new logo
|
||||
*/
|
||||
public function processUploadLogo()
|
||||
{
|
||||
$error = '';
|
||||
if (isset($_FILES['fileToUpload']['tmp_name']) && $_FILES['fileToUpload']['tmp_name'])
|
||||
{
|
||||
$file = $_FILES['fileToUpload'];
|
||||
$error = ImageManager::validateUpload($file, 300000);
|
||||
if (!strlen($error))
|
||||
{
|
||||
$tmp_name = tempnam(_PS_TMP_IMG_DIR_, 'PS');
|
||||
if (!$tmp_name || !move_uploaded_file($file['tmp_name'], $tmp_name))
|
||||
return false;
|
||||
|
||||
list($width, $height, $type) = getimagesize($tmp_name);
|
||||
|
||||
$newheight = ($height > 500) ? 500 : $height;
|
||||
$percent = $newheight / $height;
|
||||
$newwidth = $width * $percent;
|
||||
$newheight = $height * $percent;
|
||||
|
||||
if (!is_writable(_PS_ROOT_DIR_.'/img/'))
|
||||
$error = $this->l('Image folder %s is not writable', _PS_ROOT_DIR_.'/img/');
|
||||
if (!$error)
|
||||
{
|
||||
list($src_width, $src_height, $type) = getimagesize($tmp_name);
|
||||
$src_image = ImageManager::create($type, $tmp_name);
|
||||
$dest_image = imagecreatetruecolor($src_width, $src_height);
|
||||
$white = imagecolorallocate($dest_image, 255, 255, 255);
|
||||
imagefilledrectangle($dest_image, 0, 0, $src_width, $src_height, $white);
|
||||
imagecopyresampled($dest_image, $src_image, 0, 0, 0, 0, $src_width, $src_height, $src_width, $src_height);
|
||||
if (!imagejpeg($dest_image, _PS_ROOT_DIR_.'/img/logo.jpg', 95))
|
||||
$error = $this->l('An error occurred during logo copy.');
|
||||
else
|
||||
{
|
||||
imagedestroy($dest_image);
|
||||
@chmod($filename, 0664);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
$error = $this->l('An error occurred during logo upload.');
|
||||
}
|
||||
|
||||
$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);
|
||||
}
|
||||
|
||||
/**
|
||||
* 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(
|
||||
1 => $this->l('Lingerie and Adult'),
|
||||
2 => $this->l('Animals and Pets'),
|
||||
3 => $this->l('Art and Culture'),
|
||||
4 => $this->l('Babies'),
|
||||
5 => $this->l('Beauty and Personal Care'),
|
||||
6 => $this->l('Cars'),
|
||||
7 => $this->l('Computer Hardware and Software'),
|
||||
8 => $this->l('Download'),
|
||||
9 => $this->l('Fashion and accessories'),
|
||||
10 => $this->l('Flowers, Gifts and Crafts'),
|
||||
11 => $this->l('Food and beverage'),
|
||||
12 => $this->l('HiFi, Photo and Video'),
|
||||
13 => $this->l('Home and Garden'),
|
||||
14 => $this->l('Home Appliances'),
|
||||
15 => $this->l('Jewelry'),
|
||||
16 => $this->l('Mobile and Telecom'),
|
||||
17 => $this->l('Services'),
|
||||
18 => $this->l('Shoes and accessories'),
|
||||
19 => $this->l('Sports and Entertainment'),
|
||||
20 => $this->l('Travel'),
|
||||
);
|
||||
|
||||
asort($list_activities);
|
||||
$this->list_activities = $list_activities;
|
||||
|
||||
// Countries list
|
||||
$this->list_countries = array();
|
||||
$countries = $this->language->getCountries();
|
||||
$top_countries = array(
|
||||
'fr', 'es', 'us',
|
||||
'gb', 'it', 'de',
|
||||
'nl', 'pl', 'id',
|
||||
'be', 'br', 'se',
|
||||
'ca', 'ru', 'cn',
|
||||
);
|
||||
|
||||
foreach ($top_countries as $iso)
|
||||
$this->list_countries[] = array('iso' => $iso, 'name' => $countries[$iso]);
|
||||
$this->list_countries[] = array('iso' => 0, 'name' => '-----------------');
|
||||
|
||||
foreach ($countries as $iso => $lang)
|
||||
if (!in_array($iso, $top_countries))
|
||||
$this->list_countries[] = array('iso' => $iso, 'name' => $lang);
|
||||
|
||||
// Try to detect default country
|
||||
if (!$this->session->shop_country)
|
||||
{
|
||||
$detect_language = $this->language->detectLanguage();
|
||||
if (isset($detect_language['primarytag']))
|
||||
{
|
||||
$this->session->shop_country = strtolower(isset($detect_language['subtag']) ? $detect_language['subtag'] : $detect_language['primarytag']);
|
||||
$this->session->shop_timezone = $this->getTimezoneByIso($this->session->shop_country);
|
||||
}
|
||||
}
|
||||
|
||||
// Install type
|
||||
$this->install_type = ($this->session->install_type) ? $this->session->install_type : 'full';
|
||||
|
||||
$this->displayTemplate('configure');
|
||||
}
|
||||
|
||||
/**
|
||||
* Helper to display error for a field
|
||||
*
|
||||
* @param string $field
|
||||
* @return string|void
|
||||
*/
|
||||
public function displayError($field)
|
||||
{
|
||||
if (!isset($this->errors[$field]))
|
||||
return;
|
||||
|
||||
return '<span class="result aligned errorTxt">'.$this->errors[$field].'</span>';
|
||||
}
|
||||
}
|
184
_install/controllers/http/database.php
Normal file
@ -0,0 +1,184 @@
|
||||
<?php
|
||||
/*
|
||||
* 2007-2015 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-2015 PrestaShop SA
|
||||
* @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();
|
||||
}
|
||||
|
||||
/**
|
||||
* @see InstallAbstractModel::processNextStep()
|
||||
*/
|
||||
public function processNextStep()
|
||||
{
|
||||
// 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_clear = Tools::getValue('database_clear');
|
||||
|
||||
$this->session->rewrite_engine = Tools::getValue('rewrite_engine');
|
||||
}
|
||||
|
||||
/**
|
||||
* 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,
|
||||
// We do not want to validate table prefix if we are already in install process
|
||||
($this->session->step == 'process') ? true : $this->session->database_clear
|
||||
);
|
||||
if (count($this->errors))
|
||||
return false;
|
||||
|
||||
if (!isset($this->session->database_engine))
|
||||
$this->session->database_engine = $this->model_database->getBestEngine($this->session->database_server, $this->session->database_name, $this->session->database_login, $this->session->database_password);
|
||||
return true;
|
||||
}
|
||||
|
||||
public function process()
|
||||
{
|
||||
if (Tools::getValue('checkDb'))
|
||||
$this->processCheckDb();
|
||||
elseif (Tools::getValue('createDb'))
|
||||
$this->processCreateDb();
|
||||
}
|
||||
|
||||
/**
|
||||
* 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');
|
||||
$clear = Tools::getValue('clear');
|
||||
|
||||
$errors = $this->model_database->testDatabaseSettings($server, $database, $login, $password, $prefix, $clear);
|
||||
|
||||
$this->ajaxJsonAnswer(
|
||||
(count($errors)) ? false : true,
|
||||
(count($errors)) ? implode('<br />', $errors) : $this->l('Database is connected')
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Attempt to create the database
|
||||
*/
|
||||
public function processCreateDb()
|
||||
{
|
||||
$server = Tools::getValue('dbServer');
|
||||
$database = Tools::getValue('dbName');
|
||||
$login = Tools::getValue('dbLogin');
|
||||
$password = Tools::getValue('dbPassword');
|
||||
|
||||
$success = $this->model_database->createDatabase($server, $database, $login, $password);
|
||||
|
||||
$this->ajaxJsonAnswer(
|
||||
$success,
|
||||
$success ? $this->l('Database is created') : $this->l('Cannot create the database automatically')
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @see InstallAbstractModel::display()
|
||||
*/
|
||||
public function display()
|
||||
{
|
||||
if (!$this->session->database_server)
|
||||
{
|
||||
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->use_smtp = false;
|
||||
$this->smtp_encryption = 'off';
|
||||
$this->smtp_port = 25;
|
||||
}
|
||||
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->use_smtp = $this->session->use_smtp;
|
||||
$this->smtp_encryption = $this->session->smtp_encryption;
|
||||
$this->smtp_port = $this->session->smtp_port;
|
||||
}
|
||||
|
||||
$this->displayTemplate('database');
|
||||
}
|
||||
}
|
||||
|
35
_install/controllers/http/index.php
Normal file
@ -0,0 +1,35 @@
|
||||
<?php
|
||||
/*
|
||||
* 2007-2015 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-2015 PrestaShop SA
|
||||
* @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;
|
65
_install/controllers/http/license.php
Normal file
@ -0,0 +1,65 @@
|
||||
<?php
|
||||
/*
|
||||
* 2007-2015 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-2015 PrestaShop SA
|
||||
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
/**
|
||||
* Step 2 : display license form
|
||||
*/
|
||||
class InstallControllerHttpLicense extends InstallControllerHttp
|
||||
{
|
||||
/**
|
||||
* Process license 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;
|
||||
}
|
||||
|
||||
public function process()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Display license step
|
||||
*/
|
||||
public function display()
|
||||
{
|
||||
$this->displayTemplate('license');
|
||||
}
|
||||
}
|
344
_install/controllers/http/process.php
Normal file
@ -0,0 +1,344 @@
|
||||
<?php
|
||||
/*
|
||||
* 2007-2015 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-2015 PrestaShop SA
|
||||
* @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';
|
||||
|
||||
protected $model_install;
|
||||
public $process_steps = array();
|
||||
public $previous_button = false;
|
||||
|
||||
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 initializeContext()
|
||||
{
|
||||
global $smarty;
|
||||
|
||||
Context::getContext()->shop = new Shop(1);
|
||||
Shop::setContext(Shop::CONTEXT_SHOP, 1);
|
||||
Configuration::loadConfiguration();
|
||||
Context::getContext()->language = new Language(Configuration::get('PS_LANG_DEFAULT'));
|
||||
Context::getContext()->country = new Country(Configuration::get('PS_COUNTRY_DEFAULT'));
|
||||
Context::getContext()->currency = new Currency(Configuration::get('PS_CURRENCY_DEFAULT'));
|
||||
Context::getContext()->cart = new Cart();
|
||||
Context::getContext()->employee = new Employee(1);
|
||||
define('_PS_SMARTY_FAST_LOAD_', true);
|
||||
require_once _PS_ROOT_DIR_.'/config/smarty.config.inc.php';
|
||||
|
||||
Context::getContext()->smarty = $smarty;
|
||||
}
|
||||
|
||||
public function process()
|
||||
{
|
||||
if (file_exists(_PS_ROOT_DIR_.'/'.self::SETTINGS_FILE))
|
||||
require_once _PS_ROOT_DIR_.'/'.self::SETTINGS_FILE;
|
||||
|
||||
if (!$this->session->process_validated)
|
||||
$this->session->process_validated = array();
|
||||
|
||||
if (Tools::getValue('generateSettingsFile'))
|
||||
$this->processGenerateSettingsFile();
|
||||
elseif (Tools::getValue('installDatabase') && !empty($this->session->process_validated['generateSettingsFile']))
|
||||
$this->processInstallDatabase();
|
||||
elseif (Tools::getValue('installDefaultData'))
|
||||
$this->processInstallDefaultData();
|
||||
elseif (Tools::getValue('populateDatabase') && !empty($this->session->process_validated['installDatabase']))
|
||||
$this->processPopulateDatabase();
|
||||
elseif (Tools::getValue('configureShop') && !empty($this->session->process_validated['populateDatabase']))
|
||||
$this->processConfigureShop();
|
||||
elseif (Tools::getValue('installFixtures') && !empty($this->session->process_validated['configureShop']))
|
||||
$this->processInstallFixtures();
|
||||
elseif (Tools::getValue('installModules') && (!empty($this->session->process_validated['installFixtures']) || $this->session->install_type != 'full'))
|
||||
$this->processInstallModules();
|
||||
elseif (Tools::getValue('installModulesAddons') && !empty($this->session->process_validated['installModules']))
|
||||
$this->processInstallAddonsModules();
|
||||
elseif (Tools::getValue('installTheme') && !empty($this->session->process_validated['installModulesAddons']))
|
||||
$this->processInstallTheme();
|
||||
elseif (Tools::getValue('sendEmail') && !empty($this->session->process_validated['installTheme']))
|
||||
$this->processSendEmail();
|
||||
else
|
||||
{
|
||||
// With no parameters, we consider that we are doing a new install, so session where the last process step
|
||||
// was stored can be cleaned
|
||||
if (Tools::getValue('restart'))
|
||||
{
|
||||
$this->session->process_validated = array();
|
||||
$this->session->database_clear = true;
|
||||
if (Tools::getSafeModeStatus())
|
||||
$this->session->safe_mode = true;
|
||||
}
|
||||
elseif (!Tools::getValue('submitNext'))
|
||||
{
|
||||
$this->session->step = 'configure';
|
||||
$this->session->last_step = 'configure';
|
||||
Tools::redirect('index.php');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* PROCESS : generateSettingsFile
|
||||
*/
|
||||
public function processGenerateSettingsFile()
|
||||
{
|
||||
$success = $this->model_install->generateSettingsFile(
|
||||
$this->session->database_server,
|
||||
$this->session->database_login,
|
||||
$this->session->database_password,
|
||||
$this->session->database_name,
|
||||
$this->session->database_prefix,
|
||||
$this->session->database_engine
|
||||
);
|
||||
|
||||
if (!$success)
|
||||
$this->ajaxJsonAnswer(false);
|
||||
$this->session->process_validated = array_merge($this->session->process_validated, array('generateSettingsFile' => true));
|
||||
$this->ajaxJsonAnswer(true);
|
||||
}
|
||||
|
||||
/**
|
||||
* PROCESS : installDatabase
|
||||
* Create database structure
|
||||
*/
|
||||
public function processInstallDatabase()
|
||||
{
|
||||
if (!$this->model_install->installDatabase($this->session->database_clear) || $this->model_install->getErrors())
|
||||
$this->ajaxJsonAnswer(false, $this->model_install->getErrors());
|
||||
$this->session->process_validated = array_merge($this->session->process_validated, array('installDatabase' => true));
|
||||
$this->ajaxJsonAnswer(true);
|
||||
}
|
||||
|
||||
/**
|
||||
* PROCESS : installDefaultData
|
||||
* Create default shop and languages
|
||||
*/
|
||||
public function processInstallDefaultData()
|
||||
{
|
||||
// @todo remove true in populateDatabase for 1.5.0 RC version
|
||||
$result = $this->model_install->installDefaultData($this->session->shop_name, $this->session->shop_country, false, true);
|
||||
|
||||
if (!$result || $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();
|
||||
|
||||
$this->model_install->xml_loader_ids = $this->session->xml_loader_ids;
|
||||
$result = $this->model_install->populateDatabase(Tools::getValue('entity'));
|
||||
if (!$result || $this->model_install->getErrors())
|
||||
$this->ajaxJsonAnswer(false, $this->model_install->getErrors());
|
||||
$this->session->xml_loader_ids = $this->model_install->xml_loader_ids;
|
||||
$this->session->process_validated = array_merge($this->session->process_validated, array('populateDatabase' => true));
|
||||
$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,
|
||||
'admin_firstname' => $this->session->admin_firstname,
|
||||
'admin_lastname' => $this->session->admin_lastname,
|
||||
'admin_password' => $this->session->admin_password,
|
||||
'admin_email' => $this->session->admin_email,
|
||||
'send_informations' => $this->session->send_informations,
|
||||
'configuration_agrement' => $this->session->configuration_agrement,
|
||||
'rewrite_engine' => $this->session->rewrite_engine,
|
||||
));
|
||||
|
||||
if (!$success || $this->model_install->getErrors())
|
||||
$this->ajaxJsonAnswer(false, $this->model_install->getErrors());
|
||||
|
||||
$this->session->process_validated = array_merge($this->session->process_validated, array('configureShop' => true));
|
||||
$this->ajaxJsonAnswer(true);
|
||||
}
|
||||
|
||||
/**
|
||||
* PROCESS : installModules
|
||||
* Install all modules in ~/modules/ directory
|
||||
*/
|
||||
public function processInstallModules()
|
||||
{
|
||||
$this->initializeContext();
|
||||
|
||||
$result = $this->model_install->installModules(Tools::getValue('module'));
|
||||
if (!$result || $this->model_install->getErrors())
|
||||
$this->ajaxJsonAnswer(false, $this->model_install->getErrors());
|
||||
$this->session->process_validated = array_merge($this->session->process_validated, array('installModules' => true));
|
||||
$this->ajaxJsonAnswer(true);
|
||||
}
|
||||
|
||||
/**
|
||||
* PROCESS : installModulesAddons
|
||||
* Install modules from addons
|
||||
*/
|
||||
public function processInstallAddonsModules()
|
||||
{
|
||||
$this->initializeContext();
|
||||
if (($module = Tools::getValue('module')) && $id_module = Tools::getValue('id_module'))
|
||||
$result = $this->model_install->installModulesAddons(array('name' => $module, 'id_module' => $id_module));
|
||||
else
|
||||
$result = $this->model_install->installModulesAddons();
|
||||
if (!$result || $this->model_install->getErrors())
|
||||
$this->ajaxJsonAnswer(false, $this->model_install->getErrors());
|
||||
$this->session->process_validated = array_merge($this->session->process_validated, array('installModulesAddons' => true));
|
||||
$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(Tools::getValue('entity', null), array('shop_activity' => $this->session->shop_activity, 'shop_country' => $this->session->shop_country)) || $this->model_install->getErrors())
|
||||
$this->ajaxJsonAnswer(false, $this->model_install->getErrors());
|
||||
$this->session->xml_loader_ids = $this->model_install->xml_loader_ids;
|
||||
$this->session->process_validated = array_merge($this->session->process_validated, array('installFixtures' => true));
|
||||
$this->ajaxJsonAnswer(true);
|
||||
}
|
||||
|
||||
/**
|
||||
* PROCESS : installTheme
|
||||
* Install theme
|
||||
*/
|
||||
public function processInstallTheme()
|
||||
{
|
||||
$this->initializeContext();
|
||||
|
||||
$this->model_install->installTheme();
|
||||
if ($this->model_install->getErrors())
|
||||
$this->ajaxJsonAnswer(false, $this->model_install->getErrors());
|
||||
|
||||
$this->session->process_validated = array_merge($this->session->process_validated, array('installTheme' => true));
|
||||
$this->ajaxJsonAnswer(true);
|
||||
}
|
||||
|
||||
/**
|
||||
* @see InstallAbstractModel::display()
|
||||
*/
|
||||
public function display()
|
||||
{
|
||||
// The installer SHOULD take less than 32M, but may take up to 35/36M sometimes. So 42M is a good value :)
|
||||
$low_memory = Tools::getMemoryLimit() < Tools::getOctets('42M');
|
||||
|
||||
// We fill the process step used for Ajax queries
|
||||
$this->process_steps[] = array('key' => 'generateSettingsFile', 'lang' => $this->l('Create settings.inc file'));
|
||||
$this->process_steps[] = array('key' => 'installDatabase', 'lang' => $this->l('Create database tables'));
|
||||
$this->process_steps[] = array('key' => 'installDefaultData', 'lang' => $this->l('Create default shop and languages'));
|
||||
|
||||
// If low memory, create subtasks for populateDatabase step (entity per entity)
|
||||
$populate_step = array('key' => 'populateDatabase', 'lang' => $this->l('Populate database tables'));
|
||||
if ($low_memory)
|
||||
{
|
||||
$populate_step['subtasks'] = array();
|
||||
$xml_loader = new InstallXmlLoader();
|
||||
foreach ($xml_loader->getSortedEntities() as $entity)
|
||||
$populate_step['subtasks'][] = array('entity' => $entity);
|
||||
}
|
||||
|
||||
$this->process_steps[] = $populate_step;
|
||||
$this->process_steps[] = array('key' => 'configureShop', 'lang' => $this->l('Configure shop information'));
|
||||
|
||||
if ($this->session->install_type == 'full')
|
||||
{
|
||||
// If low memory, create subtasks for installFixtures step (entity per entity)
|
||||
$fixtures_step = array('key' => 'installFixtures', 'lang' => $this->l('Install demonstration data'));
|
||||
if ($low_memory)
|
||||
{
|
||||
$fixtures_step['subtasks'] = array();
|
||||
$xml_loader = new InstallXmlLoader();
|
||||
$xml_loader->setFixturesPath();
|
||||
foreach ($xml_loader->getSortedEntities() as $entity)
|
||||
$fixtures_step['subtasks'][] = array('entity' => $entity);
|
||||
}
|
||||
$this->process_steps[] = $fixtures_step;
|
||||
}
|
||||
|
||||
$install_modules = array('key' => 'installModules', 'lang' => $this->l('Install modules'));
|
||||
if ($low_memory)
|
||||
foreach ($this->model_install->getModulesList() as $module)
|
||||
$install_modules['subtasks'][] = array('module' => $module);
|
||||
$this->process_steps[] = $install_modules;
|
||||
|
||||
$install_modules = array('key' => 'installModulesAddons', 'lang' => $this->l('Install Addons modules'));
|
||||
|
||||
$params = array(
|
||||
'iso_lang' => $this->language->getLanguageIso(),
|
||||
'iso_country' => $this->session->shop_country,
|
||||
'email' => $this->session->admin_email,
|
||||
'shop_url' => Tools::getHttpHost(),
|
||||
'version' => _PS_INSTALL_VERSION_
|
||||
);
|
||||
|
||||
if ($low_memory)
|
||||
foreach ($this->model_install->getAddonsModulesList($params) as $module)
|
||||
$install_modules['subtasks'][] = array('module' => (string)$module['name'], 'id_module' => (string)$module['id_module']);
|
||||
$this->process_steps[] = $install_modules;
|
||||
|
||||
$this->process_steps[] = array('key' => 'installTheme', 'lang' => $this->l('Install theme'));
|
||||
|
||||
$this->displayTemplate('process');
|
||||
}
|
||||
}
|
44
_install/controllers/http/smarty_compile.php
Normal file
@ -0,0 +1,44 @@
|
||||
<?php
|
||||
/*
|
||||
* 2007-2015 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-2015 PrestaShop SA
|
||||
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
define('_PS_DO_NOT_LOAD_CONFIGURATION_', true);
|
||||
if (Tools::getValue('bo'))
|
||||
{
|
||||
if (!is_dir(_PS_ROOT_DIR_.'/admin/'))
|
||||
exit;
|
||||
define('_PS_ADMIN_DIR_', _PS_ROOT_DIR_.'/admin/');
|
||||
$directory = _PS_ADMIN_DIR_.'themes/default/';
|
||||
}
|
||||
else
|
||||
$directory = _PS_THEME_DIR_;
|
||||
|
||||
require_once(_PS_ROOT_DIR_.'/config/smarty.config.inc.php');
|
||||
|
||||
$smarty->setTemplateDir($directory);
|
||||
ob_start();
|
||||
$smarty->compileAllTemplates('.tpl', false);
|
||||
if (ob_get_level() && ob_get_length() > 0)
|
||||
ob_end_clean();
|
150
_install/controllers/http/system.php
Normal file
@ -0,0 +1,150 @@
|
||||
<?php
|
||||
/*
|
||||
* 2007-2015 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-2015 PrestaShop SA
|
||||
* @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();
|
||||
|
||||
if (!is_callable('getenv') || !($user = @getenv('APACHE_RUN_USER')))
|
||||
$user = 'Apache';
|
||||
|
||||
// Generate display array
|
||||
$this->tests_render = array(
|
||||
'required' => array(
|
||||
array(
|
||||
'title' => $this->l('Required PHP parameters'),
|
||||
'success' => 1,
|
||||
'checks' => array(
|
||||
'phpversion' => $this->l('PHP 5.1.2 or later is not enabled'),
|
||||
'upload' => $this->l('Cannot upload files'),
|
||||
'system' => $this->l('Cannot create new files and folders'),
|
||||
'gd' => $this->l('GD library is not installed'),
|
||||
'mysql_support' => $this->l('MySQL support is not activated')
|
||||
)
|
||||
),
|
||||
array(
|
||||
'title' => $this->l('Files'),
|
||||
'success' => 1,
|
||||
'checks' => array(
|
||||
'files' => $this->l('Not all files were successfully uploaded on your server')
|
||||
)
|
||||
),
|
||||
array(
|
||||
'title' => $this->l('Permissions on files and folders'),
|
||||
'success' => 1,
|
||||
'checks' => array(
|
||||
'config_dir' => $this->l('Recursive write permissions for %1$s user on %2$s', $user, '~/config/'),
|
||||
'cache_dir' => $this->l('Recursive write permissions for %1$s user on %2$s', $user, '~/cache/'),
|
||||
'log_dir' => $this->l('Recursive write permissions for %1$s user on %2$s', $user, '~/log/'),
|
||||
'img_dir' => $this->l('Recursive write permissions for %1$s user on %2$s', $user, '~/img/'),
|
||||
'mails_dir' => $this->l('Recursive write permissions for %1$s user on %2$s', $user, '~/mails/'),
|
||||
'module_dir' => $this->l('Recursive write permissions for %1$s user on %2$s', $user, '~/modules/'),
|
||||
'theme_lang_dir' => $this->l('Recursive write permissions for %1$s user on %2$s', $user, '~/themes/default-bootstrap/lang/'),
|
||||
'theme_pdf_lang_dir' => $this->l('Recursive write permissions for %1$s user on %2$s', $user, '~/themes/default-bootstrap/pdf/lang/'),
|
||||
'theme_cache_dir' => $this->l('Recursive write permissions for %1$s user on %2$s', $user, '~/themes/default-bootstrap/cache/'),
|
||||
'translations_dir' => $this->l('Recursive write permissions for %1$s user on %2$s', $user, '~/translations/'),
|
||||
'customizable_products_dir' => $this->l('Recursive write permissions for %1$s user on %2$s', $user, '~/upload/'),
|
||||
'virtual_products_dir' => $this->l('Recursive write permissions for %1$s user on %2$s', $user, '~/download/')
|
||||
)
|
||||
),
|
||||
),
|
||||
'optional' => array(
|
||||
array(
|
||||
'title' => $this->l('Recommended PHP parameters'),
|
||||
'success' => $this->tests['optional']['success'],
|
||||
'checks' => array(
|
||||
'new_phpversion' => sprintf($this->l('You are using PHP %s version. Soon, the latest PHP version supported by PrestaShop will be PHP 5.4. To make sure you’re ready for the future, we recommend you to upgrade to PHP 5.4 now!'), phpversion()),
|
||||
'fopen' => $this->l('Cannot open external URLs'),
|
||||
'register_globals' => $this->l('PHP register_globals option is enabled'),
|
||||
'gz' => $this->l('GZIP compression is not activated'),
|
||||
'mcrypt' => $this->l('Mcrypt extension is not enabled'),
|
||||
'mbstring' => $this->l('Mbstring extension is not enabled'),
|
||||
'magicquotes' => $this->l('PHP magic quotes option is enabled'),
|
||||
'dom' => $this->l('Dom extension is not loaded'),
|
||||
'pdo_mysql' => $this->l('PDO MySQL extension is not loaded')
|
||||
)
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
foreach ($this->tests_render['required'] as &$category)
|
||||
foreach ($category['checks'] as $id => $check)
|
||||
if ($this->tests['required']['checks'][$id] != 'ok')
|
||||
$category['success'] = 0;
|
||||
|
||||
// If required tests failed, disable next button
|
||||
if (!$this->tests['required']['success'])
|
||||
$this->next_button = false;
|
||||
|
||||
$this->displayTemplate('system');
|
||||
}
|
||||
}
|
72
_install/controllers/http/welcome.php
Normal file
@ -0,0 +1,72 @@
|
||||
<?php
|
||||
/*
|
||||
* 2007-2015 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-2015 PrestaShop SA
|
||||
* @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 language form
|
||||
*/
|
||||
class InstallControllerHttpWelcome extends InstallControllerHttp
|
||||
{
|
||||
public function processNextStep()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public function validate()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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->can_upgrade = false;
|
||||
if (file_exists(_PS_ROOT_DIR_.'/config/settings.inc.php'))
|
||||
{
|
||||
@include_once(_PS_ROOT_DIR_.'/config/settings.inc.php');
|
||||
if (version_compare(_PS_VERSION_, _PS_INSTALL_VERSION_, '<'))
|
||||
{
|
||||
$this->can_upgrade = true;
|
||||
$this->ps_version = _PS_VERSION_;
|
||||
}
|
||||
}
|
||||
|
||||
$this->displayTemplate('welcome');
|
||||
}
|
||||
}
|
35
_install/controllers/index.php
Normal file
@ -0,0 +1,35 @@
|
||||
<?php
|
||||
/*
|
||||
* 2007-2015 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-2015 PrestaShop SA
|
||||
* @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;
|
2657
_install/data/db_structure.sql
Normal file
BIN
_install/data/img/genders/Mr.jpg
Normal file
After Width: | Height: | Size: 482 B |
BIN
_install/data/img/genders/Mrs.jpg
Normal file
After Width: | Height: | Size: 470 B |
BIN
_install/data/img/genders/Unknown.jpg
Normal file
After Width: | Height: | Size: 466 B |
35
_install/data/img/genders/index.php
Normal file
@ -0,0 +1,35 @@
|
||||
<?php
|
||||
/*
|
||||
* 2007-2015 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-2015 PrestaShop SA
|
||||
* @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;
|
35
_install/data/img/index.php
Normal file
@ -0,0 +1,35 @@
|
||||
<?php
|
||||
/*
|
||||
* 2007-2015 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-2015 PrestaShop SA
|
||||
* @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;
|
BIN
_install/data/img/os/Awaiting_PayPal_payment.gif
Normal file
After Width: | Height: | Size: 608 B |
BIN
_install/data/img/os/Awaiting_bank_wire_payment.gif
Normal file
After Width: | Height: | Size: 1.0 KiB |
BIN
_install/data/img/os/Awaiting_cheque_payment.gif
Normal file
After Width: | Height: | Size: 356 B |
BIN
_install/data/img/os/Awaiting_cod_validation.gif
Normal file
After Width: | Height: | Size: 1.0 KiB |
BIN
_install/data/img/os/Canceled.gif
Normal file
After Width: | Height: | Size: 378 B |
BIN
_install/data/img/os/Delivered.gif
Normal file
After Width: | Height: | Size: 580 B |
BIN
_install/data/img/os/On_backorder_paid.gif
Normal file
After Width: | Height: | Size: 1.0 KiB |
BIN
_install/data/img/os/On_backorder_unpaid.gif
Normal file
After Width: | Height: | Size: 1.0 KiB |
BIN
_install/data/img/os/Payment_accepted.gif
Normal file
After Width: | Height: | Size: 334 B |
BIN
_install/data/img/os/Payment_error.gif
Normal file
After Width: | Height: | Size: 386 B |
BIN
_install/data/img/os/Payment_remotely_accepted.gif
Normal file
After Width: | Height: | Size: 576 B |
BIN
_install/data/img/os/Preparation_in_progress.gif
Normal file
After Width: | Height: | Size: 1.0 KiB |
BIN
_install/data/img/os/Refund.gif
Normal file
After Width: | Height: | Size: 390 B |
BIN
_install/data/img/os/Shipped.gif
Normal file
After Width: | Height: | Size: 613 B |
35
_install/data/img/os/index.php
Normal file
@ -0,0 +1,35 @@
|
||||
<?php
|
||||
/*
|
||||
* 2007-2015 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-2015 PrestaShop SA
|
||||
* @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;
|
BIN
_install/data/img/os/order_state_1.gif
Normal file
After Width: | Height: | Size: 356 B |
BIN
_install/data/img/os/order_state_10.gif
Normal file
After Width: | Height: | Size: 1.0 KiB |
BIN
_install/data/img/os/order_state_11.gif
Normal file
After Width: | Height: | Size: 608 B |
BIN
_install/data/img/os/order_state_12.gif
Normal file
After Width: | Height: | Size: 576 B |
BIN
_install/data/img/os/order_state_2.gif
Normal file
After Width: | Height: | Size: 334 B |
BIN
_install/data/img/os/order_state_3.gif
Normal file
After Width: | Height: | Size: 1.0 KiB |
BIN
_install/data/img/os/order_state_4.gif
Normal file
After Width: | Height: | Size: 613 B |
BIN
_install/data/img/os/order_state_5.gif
Normal file
After Width: | Height: | Size: 580 B |
BIN
_install/data/img/os/order_state_6.gif
Normal file
After Width: | Height: | Size: 378 B |
BIN
_install/data/img/os/order_state_7.gif
Normal file
After Width: | Height: | Size: 390 B |
BIN
_install/data/img/os/order_state_8.gif
Normal file
After Width: | Height: | Size: 386 B |
BIN
_install/data/img/os/order_state_9.gif
Normal file
After Width: | Height: | Size: 1.0 KiB |
35
_install/data/index.php
Normal file
@ -0,0 +1,35 @@
|
||||
<?php
|
||||
/*
|
||||
* 2007-2015 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-2015 PrestaShop SA
|
||||
* @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;
|
244
_install/data/iso_to_timezone.xml
Normal file
@ -0,0 +1,244 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<iso_to_timezone>
|
||||
<relation iso="ci" zone="Africa/Abidjan" />
|
||||
<relation iso="gh" zone="Africa/Accra" />
|
||||
<relation iso="et" zone="Africa/Addis_Ababa" />
|
||||
<relation iso="dz" zone="Africa/Algiers" />
|
||||
<relation iso="er" zone="Africa/Asmara" />
|
||||
<relation iso="ml" zone="Africa/Bamako" />
|
||||
<relation iso="cf" zone="Africa/Bangui" />
|
||||
<relation iso="gm" zone="Africa/Banjul" />
|
||||
<relation iso="gw" zone="Africa/Bissau" />
|
||||
<relation iso="mw" zone="Africa/Blantyre" />
|
||||
<relation iso="cg" zone="Africa/Brazzaville" />
|
||||
<relation iso="bi" zone="Africa/Bujumbura" />
|
||||
<relation iso="eg" zone="Africa/Cairo" />
|
||||
<relation iso="ma" zone="Africa/Casablanca" />
|
||||
<relation iso="gn" zone="Africa/Conakry" />
|
||||
<relation iso="sn" zone="Africa/Dakar" />
|
||||
<relation iso="tz" zone="Africa/Dar_es_Salaam" />
|
||||
<relation iso="dj" zone="Africa/Djibouti" />
|
||||
<relation iso="cm" zone="Africa/Douala" />
|
||||
<relation iso="eh" zone="Africa/El_Aaiun" />
|
||||
<relation iso="sl" zone="Africa/Freetown" />
|
||||
<relation iso="bw" zone="Africa/Gaborone" />
|
||||
<relation iso="zw" zone="Africa/Harare" />
|
||||
<relation iso="za" zone="Africa/Johannesburg" />
|
||||
<relation iso="ug" zone="Africa/Kampala" />
|
||||
<relation iso="sd" zone="Africa/Khartoum" />
|
||||
<relation iso="rw" zone="Africa/Kigali" />
|
||||
<relation iso="cd" zone="Africa/Kinshasa" />
|
||||
<relation iso="ng" zone="Africa/Lagos" />
|
||||
<relation iso="ga" zone="Africa/Libreville" />
|
||||
<relation iso="tg" zone="Africa/Lome" />
|
||||
<relation iso="ao" zone="Africa/Luanda" />
|
||||
<relation iso="zm" zone="Africa/Lusaka" />
|
||||
<relation iso="gq" zone="Africa/Malabo" />
|
||||
<relation iso="mz" zone="Africa/Maputo" />
|
||||
<relation iso="ls" zone="Africa/Maseru" />
|
||||
<relation iso="sz" zone="Africa/Mbabane" />
|
||||
<relation iso="so" zone="Africa/Mogadishu" />
|
||||
<relation iso="lr" zone="Africa/Monrovia" />
|
||||
<relation iso="ke" zone="Africa/Nairobi" />
|
||||
<relation iso="td" zone="Africa/Ndjamena" />
|
||||
<relation iso="ne" zone="Africa/Niamey" />
|
||||
<relation iso="mr" zone="Africa/Nouakchott" />
|
||||
<relation iso="bf" zone="Africa/Ouagadougou" />
|
||||
<relation iso="bj" zone="Africa/Porto-Novo" />
|
||||
<relation iso="st" zone="Africa/Sao_Tome" />
|
||||
<relation iso="ly" zone="Africa/Tripoli" />
|
||||
<relation iso="tn" zone="Africa/Tunis" />
|
||||
<relation iso="na" zone="Africa/Windhoek" />
|
||||
<relation iso="ai" zone="America/Anguilla" />
|
||||
<relation iso="ag" zone="America/Antigua" />
|
||||
<relation iso="ar" zone="America/Argentina/Buenos_Aires" />
|
||||
<relation iso="aw" zone="America/Aruba" />
|
||||
<relation iso="py" zone="America/Asuncion" />
|
||||
<relation iso="bb" zone="America/Barbados" />
|
||||
<relation iso="bz" zone="America/Belize" />
|
||||
<relation iso="co" zone="America/Bogota" />
|
||||
<relation iso="ve" zone="America/Caracas" />
|
||||
<relation iso="gf" zone="America/Cayenne" />
|
||||
<relation iso="ky" zone="America/Cayman" />
|
||||
<relation iso="cr" zone="America/Costa_Rica" />
|
||||
<relation iso="an" zone="America/Curacao" />
|
||||
<relation iso="dm" zone="America/Dominica" />
|
||||
<relation iso="sv" zone="America/El_Salvador" />
|
||||
<relation iso="gl" zone="America/Godthab" />
|
||||
<relation iso="tc" zone="America/Grand_Turk" />
|
||||
<relation iso="gd" zone="America/Grenada" />
|
||||
<relation iso="gp" zone="America/Guadeloupe" />
|
||||
<relation iso="gt" zone="America/Guatemala" />
|
||||
<relation iso="ec" zone="America/Guayaquil" />
|
||||
<relation iso="gy" zone="America/Guyana" />
|
||||
<relation iso="cu" zone="America/Havana" />
|
||||
<relation iso="jm" zone="America/Jamaica" />
|
||||
<relation iso="bo" zone="America/La_Paz" />
|
||||
<relation iso="pe" zone="America/Lima" />
|
||||
<relation iso="ni" zone="America/Managua" />
|
||||
<relation iso="mf" zone="America/Marigot" />
|
||||
<relation iso="mq" zone="America/Martinique" />
|
||||
<relation iso="mx" zone="America/Mexico_City" />
|
||||
<relation iso="pm" zone="America/Miquelon" />
|
||||
<relation iso="uy" zone="America/Montevideo" />
|
||||
<relation iso="ms" zone="America/Montserrat" />
|
||||
<relation iso="bs" zone="America/Nassau" />
|
||||
<relation iso="br" zone="America/Noronha" />
|
||||
<relation iso="pa" zone="America/Panama" />
|
||||
<relation iso="sr" zone="America/Paramaribo" />
|
||||
<relation iso="ht" zone="America/Port-au-Prince" />
|
||||
<relation iso="tt" zone="America/Port_of_Spain" />
|
||||
<relation iso="pr" zone="America/Puerto_Rico" />
|
||||
<relation iso="cl" zone="America/Santiago" />
|
||||
<relation iso="do" zone="America/Santo_Domingo" />
|
||||
<relation iso="bl" zone="America/St_Barthelemy" />
|
||||
<relation iso="kn" zone="America/St_Kitts" />
|
||||
<relation iso="lc" zone="America/St_Lucia" />
|
||||
<relation iso="vi" zone="America/St_Thomas" />
|
||||
<relation iso="vc" zone="America/St_Vincent" />
|
||||
<relation iso="hn" zone="America/Tegucigalpa" />
|
||||
<relation iso="ca" zone="America/Toronto" />
|
||||
<relation iso="vg" zone="America/Tortola" />
|
||||
<relation iso="aq" zone="Antarctica/McMurdo" />
|
||||
<relation iso="sj" zone="Arctic/Longyearbyen" />
|
||||
<relation iso="ye" zone="Asia/Aden" />
|
||||
<relation iso="kz" zone="Asia/Almaty" />
|
||||
<relation iso="jo" zone="Asia/Amman" />
|
||||
<relation iso="tm" zone="Asia/Ashgabat" />
|
||||
<relation iso="iq" zone="Asia/Baghdad" />
|
||||
<relation iso="bh" zone="Asia/Bahrain" />
|
||||
<relation iso="az" zone="Asia/Baku" />
|
||||
<relation iso="th" zone="Asia/Bangkok" />
|
||||
<relation iso="lb" zone="Asia/Beirut" />
|
||||
<relation iso="kg" zone="Asia/Bishkek" />
|
||||
<relation iso="bn" zone="Asia/Brunei" />
|
||||
<relation iso="lk" zone="Asia/Colombo" />
|
||||
<relation iso="sy" zone="Asia/Damascus" />
|
||||
<relation iso="bd" zone="Asia/Dhaka" />
|
||||
<relation iso="tl" zone="Asia/Dili" />
|
||||
<relation iso="ae" zone="Asia/Dubai" />
|
||||
<relation iso="tj" zone="Asia/Dushanbe" />
|
||||
<relation iso="ps" zone="Asia/Gaza" />
|
||||
<relation iso="hk" zone="Asia/Hong_Kong" />
|
||||
<relation iso="vn" zone="Asia/Ho_Chi_Minh" />
|
||||
<relation iso="id" zone="Asia/Jakarta" />
|
||||
<relation iso="il" zone="Asia/Jerusalem" />
|
||||
<relation iso="af" zone="Asia/Kabul" />
|
||||
<relation iso="pk" zone="Asia/Karachi" />
|
||||
<relation iso="np" zone="Asia/Kathmandu" />
|
||||
<relation iso="in" zone="Asia/Kolkata" />
|
||||
<relation iso="my" zone="Asia/Kuala_Lumpur" />
|
||||
<relation iso="kw" zone="Asia/Kuwait" />
|
||||
<relation iso="mo" zone="Asia/Macau" />
|
||||
<relation iso="ph" zone="Asia/Manila" />
|
||||
<relation iso="om" zone="Asia/Muscat" />
|
||||
<relation iso="cy" zone="Asia/Nicosia" />
|
||||
<relation iso="kh" zone="Asia/Phnom_Penh" />
|
||||
<relation iso="kp" zone="Asia/Pyongyang" />
|
||||
<relation iso="qa" zone="Asia/Qatar" />
|
||||
<relation iso="mm" zone="Asia/Rangoon" />
|
||||
<relation iso="sa" zone="Asia/Riyadh" />
|
||||
<relation iso="uz" zone="Asia/Samarkand" />
|
||||
<relation iso="kr" zone="Asia/Seoul" />
|
||||
<relation iso="cn" zone="Asia/Shanghai" />
|
||||
<relation iso="sg" zone="Asia/Singapore" />
|
||||
<relation iso="tw" zone="Asia/Taipei" />
|
||||
<relation iso="ge" zone="Asia/Tbilisi" />
|
||||
<relation iso="ir" zone="Asia/Tehran" />
|
||||
<relation iso="bt" zone="Asia/Thimphu" />
|
||||
<relation iso="jp" zone="Asia/Tokyo" />
|
||||
<relation iso="mn" zone="Asia/Ulaanbaatar" />
|
||||
<relation iso="la" zone="Asia/Vientiane" />
|
||||
<relation iso="am" zone="Asia/Yerevan" />
|
||||
<relation iso="bm" zone="Atlantic/Bermuda" />
|
||||
<relation iso="cv" zone="Atlantic/Cape_Verde" />
|
||||
<relation iso="fo" zone="Atlantic/Faroe" />
|
||||
<relation iso="is" zone="Atlantic/Reykjavik" />
|
||||
<relation iso="gs" zone="Atlantic/South_Georgia" />
|
||||
<relation iso="fk" zone="Atlantic/Stanley" />
|
||||
<relation iso="au" zone="Australia/Lord_Howe" />
|
||||
<relation iso="nl" zone="Europe/Amsterdam" />
|
||||
<relation iso="ad" zone="Europe/Andorra" />
|
||||
<relation iso="gr" zone="Europe/Athens" />
|
||||
<relation iso="rs" zone="Europe/Belgrade" />
|
||||
<relation iso="de" zone="Europe/Berlin" />
|
||||
<relation iso="sk" zone="Europe/Bratislava" />
|
||||
<relation iso="be" zone="Europe/Brussels" />
|
||||
<relation iso="ro" zone="Europe/Bucharest" />
|
||||
<relation iso="hu" zone="Europe/Budapest" />
|
||||
<relation iso="md" zone="Europe/Chisinau" />
|
||||
<relation iso="dk" zone="Europe/Copenhagen" />
|
||||
<relation iso="ie" zone="Europe/Dublin" />
|
||||
<relation iso="gi" zone="Europe/Gibraltar" />
|
||||
<relation iso="gg" zone="Europe/Guernsey" />
|
||||
<relation iso="fi" zone="Europe/Helsinki" />
|
||||
<relation iso="im" zone="Europe/Isle_of_Man" />
|
||||
<relation iso="tr" zone="Europe/Istanbul" />
|
||||
<relation iso="je" zone="Europe/Jersey" />
|
||||
<relation iso="ua" zone="Europe/Kiev" />
|
||||
<relation iso="pt" zone="Europe/Lisbon" />
|
||||
<relation iso="si" zone="Europe/Ljubljana" />
|
||||
<relation iso="gb" zone="Europe/London" />
|
||||
<relation iso="lu" zone="Europe/Luxembourg" />
|
||||
<relation iso="es" zone="Europe/Madrid" />
|
||||
<relation iso="mt" zone="Europe/Malta" />
|
||||
<relation iso="ax" zone="Europe/Mariehamn" />
|
||||
<relation iso="by" zone="Europe/Minsk" />
|
||||
<relation iso="mc" zone="Europe/Monaco" />
|
||||
<relation iso="ru" zone="Europe/Moscow" />
|
||||
<relation iso="no" zone="Europe/Oslo" />
|
||||
<relation iso="fr" zone="Europe/Paris" />
|
||||
<relation iso="me" zone="Europe/Podgorica" />
|
||||
<relation iso="cz" zone="Europe/Prague" />
|
||||
<relation iso="lv" zone="Europe/Riga" />
|
||||
<relation iso="it" zone="Europe/Rome" />
|
||||
<relation iso="sm" zone="Europe/San_Marino" />
|
||||
<relation iso="ba" zone="Europe/Sarajevo" />
|
||||
<relation iso="mk" zone="Europe/Skopje" />
|
||||
<relation iso="bg" zone="Europe/Sofia" />
|
||||
<relation iso="se" zone="Europe/Stockholm" />
|
||||
<relation iso="ee" zone="Europe/Tallinn" />
|
||||
<relation iso="al" zone="Europe/Tirane" />
|
||||
<relation iso="li" zone="Europe/Vaduz" />
|
||||
<relation iso="va" zone="Europe/Vatican" />
|
||||
<relation iso="at" zone="Europe/Vienna" />
|
||||
<relation iso="lt" zone="Europe/Vilnius" />
|
||||
<relation iso="pl" zone="Europe/Warsaw" />
|
||||
<relation iso="hr" zone="Europe/Zagreb" />
|
||||
<relation iso="ch" zone="Europe/Zurich" />
|
||||
<relation iso="mg" zone="Indian/Antananarivo" />
|
||||
<relation iso="io" zone="Indian/Chagos" />
|
||||
<relation iso="cx" zone="Indian/Christmas" />
|
||||
<relation iso="cc" zone="Indian/Cocos" />
|
||||
<relation iso="km" zone="Indian/Comoro" />
|
||||
<relation iso="tf" zone="Indian/Kerguelen" />
|
||||
<relation iso="sc" zone="Indian/Mahe" />
|
||||
<relation iso="mv" zone="Indian/Maldives" />
|
||||
<relation iso="mu" zone="Indian/Mauritius" />
|
||||
<relation iso="yt" zone="Indian/Mayotte" />
|
||||
<relation iso="re" zone="Indian/Reunion" />
|
||||
<relation iso="ws" zone="Pacific/Apia" />
|
||||
<relation iso="nz" zone="Pacific/Auckland" />
|
||||
<relation iso="vu" zone="Pacific/Efate" />
|
||||
<relation iso="tk" zone="Pacific/Fakaofo" />
|
||||
<relation iso="fj" zone="Pacific/Fiji" />
|
||||
<relation iso="tv" zone="Pacific/Funafuti" />
|
||||
<relation iso="sb" zone="Pacific/Guadalcanal" />
|
||||
<relation iso="gu" zone="Pacific/Guam" />
|
||||
<relation iso="mh" zone="Pacific/Majuro" />
|
||||
<relation iso="nr" zone="Pacific/Nauru" />
|
||||
<relation iso="nu" zone="Pacific/Niue" />
|
||||
<relation iso="nf" zone="Pacific/Norfolk" />
|
||||
<relation iso="nc" zone="Pacific/Noumea" />
|
||||
<relation iso="as" zone="Pacific/Pago_Pago" />
|
||||
<relation iso="pw" zone="Pacific/Palau" />
|
||||
<relation iso="pn" zone="Pacific/Pitcairn" />
|
||||
<relation iso="pg" zone="Pacific/Port_Moresby" />
|
||||
<relation iso="ck" zone="Pacific/Rarotonga" />
|
||||
<relation iso="mp" zone="Pacific/Saipan" />
|
||||
<relation iso="pf" zone="Pacific/Tahiti" />
|
||||
<relation iso="ki" zone="Pacific/Tarawa" />
|
||||
<relation iso="to" zone="Pacific/Tongatapu" />
|
||||
<relation iso="wf" zone="Pacific/Wallis" />
|
||||
<relation iso="us" zone="US/Eastern" />
|
||||
</iso_to_timezone>
|
190
_install/data/theme.sql
Normal file
@ -0,0 +1,190 @@
|
||||
SET NAMES 'utf8';
|
||||
|
||||
UPDATE `PREFIX_configuration` SET value = '1' WHERE name = 'PS_CONDITIONS';
|
||||
UPDATE `PREFIX_configuration` SET value = '12' WHERE name = 'PS_PRODUCTS_PER_PAGE';
|
||||
UPDATE `PREFIX_configuration` SET value = '0' WHERE name = 'PS_PRODUCTS_ORDER_WAY';
|
||||
UPDATE `PREFIX_configuration` SET value = '4' WHERE name = 'PS_PRODUCTS_ORDER_BY';
|
||||
UPDATE `PREFIX_configuration` SET value = '1' WHERE name = 'PS_DISPLAY_QTIES';
|
||||
UPDATE `PREFIX_configuration` SET value = '20' WHERE name = 'PS_NB_DAYS_NEW_PRODUCT';
|
||||
UPDATE `PREFIX_configuration` SET value = '1' WHERE name = 'PS_BLOCK_CART_AJAX';
|
||||
UPDATE `PREFIX_configuration` SET value = '8388608' WHERE name = 'PS_PRODUCT_PICTURE_MAX_SIZE';
|
||||
UPDATE `PREFIX_configuration` SET value = '64' WHERE name = 'PS_PRODUCT_PICTURE_WIDTH';
|
||||
UPDATE `PREFIX_configuration` SET value = '64' WHERE name = 'PS_PRODUCT_PICTURE_HEIGHT';
|
||||
UPDATE `PREFIX_configuration` SET value = '3' WHERE name = 'PS_SEARCH_MINWORDLEN';
|
||||
UPDATE `PREFIX_configuration` SET value = '6' WHERE name = 'PS_SEARCH_WEIGHT_PNAME';
|
||||
UPDATE `PREFIX_configuration` SET value = '10' WHERE name = 'PS_SEARCH_WEIGHT_REF';
|
||||
UPDATE `PREFIX_configuration` SET value = '1' WHERE name = 'PS_SEARCH_WEIGHT_SHORTDESC';
|
||||
UPDATE `PREFIX_configuration` SET value = '1' WHERE name = 'PS_SEARCH_WEIGHT_DESC';
|
||||
UPDATE `PREFIX_configuration` SET value = '3' WHERE name = 'PS_SEARCH_WEIGHT_CNAME';
|
||||
UPDATE `PREFIX_configuration` SET value = '3' WHERE name = 'PS_SEARCH_WEIGHT_MNAME';
|
||||
UPDATE `PREFIX_configuration` SET value = '4' WHERE name = 'PS_SEARCH_WEIGHT_TAG';
|
||||
UPDATE `PREFIX_configuration` SET value = '2' WHERE name = 'PS_SEARCH_WEIGHT_ATTRIBUTE';
|
||||
UPDATE `PREFIX_configuration` SET value = '2' WHERE name = 'PS_SEARCH_WEIGHT_FEATURE';
|
||||
UPDATE `PREFIX_configuration` SET value = '1' WHERE name = 'PS_SEARCH_AJAX';
|
||||
UPDATE `PREFIX_configuration` SET value = '0' WHERE name = 'PS_DISPLAY_JQZOOM';
|
||||
UPDATE `PREFIX_configuration` SET value = '0' WHERE name = 'PS_BLOCK_BESTSELLERS_DISPLAY';
|
||||
UPDATE `PREFIX_configuration` SET value = '0' WHERE name = 'PS_BLOCK_NEWPRODUCTS_DISPLAY';
|
||||
UPDATE `PREFIX_configuration` SET value = '0' WHERE name = 'PS_BLOCK_SPECIALS_DISPLAY';
|
||||
UPDATE `PREFIX_configuration` SET value = '1' WHERE name = 'PS_STORES_DISPLAY_CMS';
|
||||
UPDATE `PREFIX_configuration` SET value = '1' WHERE name = 'PS_STORES_DISPLAY_FOOTER';
|
||||
UPDATE `PREFIX_configuration` SET value = '350' WHERE name = 'SHOP_LOGO_WIDTH';
|
||||
UPDATE `PREFIX_configuration` SET value = '99' WHERE name = 'SHOP_LOGO_HEIGHT';
|
||||
UPDATE `PREFIX_configuration` SET value = '1' WHERE name = 'PS_DISPLAY_SUPPLIERS';
|
||||
UPDATE `PREFIX_configuration` SET value = '1' WHERE name = 'PS_DISPLAY_BEST_SELLERS';
|
||||
UPDATE `PREFIX_configuration` SET value = '0' WHERE name = 'PS_LEGACY_IMAGES';
|
||||
UPDATE `PREFIX_configuration` SET value = 'jpg' WHERE name = 'PS_IMAGE_QUALITY';
|
||||
UPDATE `PREFIX_configuration` SET value = '7' WHERE name = 'PS_PNG_QUALITY';
|
||||
UPDATE `PREFIX_configuration` SET value = '90' WHERE name = 'PS_JPEG_QUALITY';
|
||||
UPDATE `PREFIX_configuration` SET value = '2' WHERE name = 'PRODUCTS_VIEWED_NBR';
|
||||
UPDATE `PREFIX_configuration` SET value = '1' WHERE name = 'BLOCK_CATEG_DHTML';
|
||||
UPDATE `PREFIX_configuration` SET value = '4' WHERE name = 'BLOCK_CATEG_MAX_DEPTH';
|
||||
UPDATE `PREFIX_configuration` SET value = '1' WHERE name = 'MANUFACTURER_DISPLAY_FORM';
|
||||
UPDATE `PREFIX_configuration` SET value = '1' WHERE name = 'MANUFACTURER_DISPLAY_TEXT';
|
||||
UPDATE `PREFIX_configuration` SET value = '5' WHERE name = 'MANUFACTURER_DISPLAY_TEXT_NB';
|
||||
UPDATE `PREFIX_configuration` SET value = '8' WHERE name = 'NEW_PRODUCTS_NBR';
|
||||
UPDATE `PREFIX_configuration` SET value = '10' WHERE name = 'BLOCKTAGS_NBR';
|
||||
UPDATE `PREFIX_configuration` SET value = '0_3|0_4' WHERE name = 'FOOTER_CMS';
|
||||
UPDATE `PREFIX_configuration` SET value = '0_3|0_4' WHERE name = 'FOOTER_BLOCK_ACTIVATION';
|
||||
UPDATE `PREFIX_configuration` SET value = '1' WHERE name = 'FOOTER_POWEREDBY';
|
||||
UPDATE `PREFIX_configuration` SET value = 'http://www.prestashop.com' WHERE name = 'BLOCKADVERT_LINK';
|
||||
UPDATE `PREFIX_configuration` SET value = 'store.jpg' WHERE name = 'BLOCKSTORE_IMG';
|
||||
UPDATE `PREFIX_configuration` SET value = 'jpg' WHERE name = 'BLOCKADVERT_IMG_EXT';
|
||||
UPDATE `PREFIX_configuration` SET value = 'CAT3,CAT8,CAT5,LNK1' WHERE name = 'MOD_BLOCKTOPMENU_ITEMS';
|
||||
UPDATE `PREFIX_configuration` SET value = '0' WHERE name = 'MOD_BLOCKTOPMENU_SEARCH';
|
||||
UPDATE `PREFIX_configuration` SET value = 'http://www.facebook.com/prestashop' WHERE name = 'BLOCKSOCIAL_FACEBOOK';
|
||||
UPDATE `PREFIX_configuration` SET value = 'http://www.twitter.com/prestashop' WHERE name = 'BLOCKSOCIAL_TWITTER';
|
||||
UPDATE `PREFIX_configuration` SET value = 'http://www.prestashop.com/blog/en/' WHERE name = 'BLOCKSOCIAL_RSS';
|
||||
UPDATE `PREFIX_configuration` SET value = 'https://www.google.com/+prestashop' WHERE name = 'BLOCKSOCIAL_GOOGLE_PLUS';
|
||||
UPDATE `PREFIX_configuration` SET value = 'My Company' WHERE name = 'BLOCKCONTACTINFOS_COMPANY';
|
||||
UPDATE `PREFIX_configuration` SET value = '42 avenue des Champs Elysées\n75000 Paris\nFrance' WHERE name = 'BLOCKCONTACTINFOS_ADDRESS';
|
||||
UPDATE `PREFIX_configuration` SET value = '0123-456-789' WHERE name = 'BLOCKCONTACTINFOS_PHONE';
|
||||
UPDATE `PREFIX_configuration` SET value = 'sales@yourcompany.com' WHERE name = 'BLOCKCONTACTINFOS_EMAIL';
|
||||
UPDATE `PREFIX_configuration` SET value = '0123-456-789' WHERE name = 'BLOCKCONTACT_TELNUMBER';
|
||||
UPDATE `PREFIX_configuration` SET value = 'sales@yourcompany.com' WHERE name = 'BLOCKCONTACT_EMAIL';
|
||||
UPDATE `PREFIX_configuration` SET value = '1' WHERE name = 'SUPPLIER_DISPLAY_TEXT';
|
||||
UPDATE `PREFIX_configuration` SET value = '5' WHERE name = 'SUPPLIER_DISPLAY_TEXT_NB';
|
||||
UPDATE `PREFIX_configuration` SET value = '1' WHERE name = 'SUPPLIER_DISPLAY_FORM';
|
||||
UPDATE `PREFIX_configuration` SET value = '1' WHERE name = 'BLOCK_CATEG_NBR_COLUMN_FOOTER';
|
||||
UPDATE `PREFIX_configuration` SET value = '' WHERE name = 'UPGRADER_BACKUPDB_FILENAME';
|
||||
UPDATE `PREFIX_configuration` SET value = '' WHERE name = 'UPGRADER_BACKUPFILES_FILENAME';
|
||||
UPDATE `PREFIX_configuration` SET value = '40' WHERE name = 'CONF_AVERAGE_PRODUCT_MARGIN';
|
||||
UPDATE `PREFIX_configuration` SET value = '1' WHERE name = 'PS_DASHBOARD_SIMULATION';
|
||||
|
||||
/* No right column */
|
||||
DELETE FROM `PREFIX_hook_module` WHERE id_hook = (SELECT id_hook FROM `PREFIX_hook` WHERE name = 'displayRightColumn');
|
||||
|
||||
/* displayHome */
|
||||
SET @id_hook = (SELECT id_hook FROM `PREFIX_hook` WHERE name = 'displayHome');
|
||||
UPDATE `PREFIX_hook_module` SET position = 1
|
||||
WHERE id_module = (SELECT id_module FROM `PREFIX_module` WHERE name = 'themeconfigurator')
|
||||
AND id_hook = @id_hook;
|
||||
|
||||
UPDATE `PREFIX_hook_module` SET position = 2
|
||||
WHERE id_module = (SELECT id_module FROM `PREFIX_module` WHERE name = 'blockfacebook')
|
||||
AND id_hook = @id_hook;
|
||||
|
||||
UPDATE `PREFIX_hook_module` SET position = 3
|
||||
WHERE id_module = (SELECT id_module FROM `PREFIX_module` WHERE name = 'blockcmsinfo')
|
||||
AND id_hook = @id_hook;
|
||||
|
||||
/* displayNav */
|
||||
SET @id_hook = (SELECT id_hook FROM `PREFIX_hook` WHERE name = 'displayNav');
|
||||
UPDATE `PREFIX_hook_module` SET position = 1
|
||||
WHERE id_module = (SELECT id_module FROM `PREFIX_module` WHERE name = 'blockuserinfo')
|
||||
AND id_hook = @id_hook;
|
||||
|
||||
UPDATE `PREFIX_hook_module` SET position = 2
|
||||
WHERE id_module = (SELECT id_module FROM `PREFIX_module` WHERE name = 'blockcurrencies')
|
||||
AND id_hook = @id_hook;
|
||||
|
||||
UPDATE `PREFIX_hook_module` SET position = 3
|
||||
WHERE id_module = (SELECT id_module FROM `PREFIX_module` WHERE name = 'blocklanguages')
|
||||
AND id_hook = @id_hook;
|
||||
|
||||
UPDATE `PREFIX_hook_module` SET position = 4
|
||||
WHERE id_module = (SELECT id_module FROM `PREFIX_module` WHERE name = 'blockcontact')
|
||||
AND id_hook = @id_hook;
|
||||
|
||||
/* displayTop */
|
||||
SET @id_hook = (SELECT id_hook FROM `PREFIX_hook` WHERE name = 'displayTop');
|
||||
UPDATE `PREFIX_hook_module` SET position = 1
|
||||
WHERE id_module = (SELECT id_module FROM `PREFIX_module` WHERE name = 'blocksearch')
|
||||
AND id_hook = @id_hook;
|
||||
|
||||
UPDATE `PREFIX_hook_module` SET position = 2
|
||||
WHERE id_module = (SELECT id_module FROM `PREFIX_module` WHERE name = 'blockcart')
|
||||
AND id_hook = @id_hook;
|
||||
|
||||
UPDATE `PREFIX_hook_module` SET position = 3
|
||||
WHERE id_module = (SELECT id_module FROM `PREFIX_module` WHERE name = 'blocktopmenu')
|
||||
AND id_hook = @id_hook;
|
||||
|
||||
UPDATE `PREFIX_hook_module` SET position = 4
|
||||
WHERE id_module = (SELECT id_module FROM `PREFIX_module` WHERE name = 'themeconfigurator')
|
||||
AND id_hook = @id_hook;
|
||||
|
||||
UPDATE `PREFIX_hook_module` SET position = 5
|
||||
WHERE id_module = (SELECT id_module FROM `PREFIX_module` WHERE name = 'blockwhislist')
|
||||
AND id_hook = @id_hook;
|
||||
|
||||
/* displayHomeTab && displayHomeTabContent */
|
||||
SET @id_hook = (SELECT id_hook FROM `PREFIX_hook` WHERE name = 'displayHomeTab');
|
||||
SET @id_hook2 = (SELECT id_hook FROM `PREFIX_hook` WHERE name = 'displayHomeTabContent');
|
||||
|
||||
UPDATE `PREFIX_hook_module` SET position = 1
|
||||
WHERE id_module = (SELECT id_module FROM `PREFIX_module` WHERE name = 'blocknewproducts')
|
||||
AND id_hook IN (@id_hook, @id_hook2);
|
||||
|
||||
UPDATE `PREFIX_hook_module` SET position = 2
|
||||
WHERE id_module = (SELECT id_module FROM `PREFIX_module` WHERE name = 'homefeatured')
|
||||
AND id_hook IN (@id_hook, @id_hook2);
|
||||
|
||||
UPDATE `PREFIX_hook_module` SET position = 3
|
||||
WHERE id_module = (SELECT id_module FROM `PREFIX_module` WHERE name = 'blockbestsellers')
|
||||
AND id_hook IN (@id_hook, @id_hook2);
|
||||
|
||||
/* displayFooter */
|
||||
SET @id_hook = (SELECT id_hook FROM `PREFIX_hook` WHERE name = 'displayFooter');
|
||||
UPDATE `PREFIX_hook_module` SET position = 1
|
||||
WHERE id_module = (SELECT id_module FROM `PREFIX_module` WHERE name = 'blocknewsletter')
|
||||
AND id_hook = @id_hook;
|
||||
|
||||
UPDATE `PREFIX_hook_module` SET position = 2
|
||||
WHERE id_module = (SELECT id_module FROM `PREFIX_module` WHERE name = 'blocksocial')
|
||||
AND id_hook = @id_hook;
|
||||
|
||||
UPDATE `PREFIX_hook_module` SET position = 3
|
||||
WHERE id_module = (SELECT id_module FROM `PREFIX_module` WHERE name = 'blockcategories')
|
||||
AND id_hook = @id_hook;
|
||||
|
||||
UPDATE `PREFIX_hook_module` SET position = 4
|
||||
WHERE id_module = (SELECT id_module FROM `PREFIX_module` WHERE name = 'blockcms')
|
||||
AND id_hook = @id_hook;
|
||||
|
||||
UPDATE `PREFIX_hook_module` SET position = 5
|
||||
WHERE id_module = (SELECT id_module FROM `PREFIX_module` WHERE name = 'blockmyaccountfooter')
|
||||
AND id_hook = @id_hook;
|
||||
|
||||
UPDATE `PREFIX_hook_module` SET position = 6
|
||||
WHERE id_module = (SELECT id_module FROM `PREFIX_module` WHERE name = 'blockcontactinfos')
|
||||
AND id_hook = @id_hook;
|
||||
|
||||
/* displayProductButtons */
|
||||
SET @id_hook = (SELECT id_hook FROM `PREFIX_hook` WHERE name = 'displayProductButtons');
|
||||
UPDATE `PREFIX_hook_module` SET position = 1
|
||||
WHERE id_module = (SELECT id_module FROM `PREFIX_module` WHERE name = 'blockwishlist')
|
||||
AND id_hook = @id_hook;
|
||||
UPDATE `PREFIX_hook_module` SET position = 2
|
||||
WHERE id_module = (SELECT id_module FROM `PREFIX_module` WHERE name = 'productpaymentlogos')
|
||||
AND id_hook = @id_hook;
|
||||
|
||||
INSERT INTO `PREFIX_hook_module_exceptions` (`id_shop`, `id_module`, `id_hook`, `file_name`)
|
||||
(
|
||||
SELECT 1, m.id_module, h.id_hook, 'category'
|
||||
FROM `PREFIX_hook` h
|
||||
JOIN `PREFIX_hook_module` hm ON (hm.id_hook = h.id_hook)
|
||||
JOIN `PREFIX_module` m ON (m.id_module = hm.id_module)
|
||||
WHERE
|
||||
h.name='displayLeftColumn' AND m.name IN ('blockbestsellers', 'blockmanufacturer', 'blocksupplier', 'blockmyaccount', 'blockpaymentlogo')
|
||||
GROUP BY m.id_module
|
||||
);
|
102
_install/data/xml/access.xml
Normal file
@ -0,0 +1,102 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<entity_access>
|
||||
<fields primary="id_profile, id_tab" sql="a.id_profile = 1">
|
||||
<field name="id_profile" relation="profile"/>
|
||||
<field name="id_tab" relation="tab"/>
|
||||
<field name="view"/>
|
||||
<field name="add"/>
|
||||
<field name="edit"/>
|
||||
<field name="delete"/>
|
||||
</fields>
|
||||
<entities>
|
||||
<access id="access_1_0" id_profile="SuperAdmin" id_tab="" view="1" add="1" edit="1" delete="1"/>
|
||||
<access id="access_1_1" id_profile="SuperAdmin" id_tab="Home" view="1" add="1" edit="1" delete="1"/>
|
||||
<access id="access_1_2" id_profile="SuperAdmin" id_tab="CMS_pages" view="1" add="1" edit="1" delete="1"/>
|
||||
<access id="access_1_3" id_profile="SuperAdmin" id_tab="CMS_categories" view="1" add="1" edit="1" delete="1"/>
|
||||
<access id="access_1_4" id_profile="SuperAdmin" id_tab="Combinations_generator" view="1" add="1" edit="1" delete="1"/>
|
||||
<access id="access_1_5" id_profile="SuperAdmin" id_tab="Search" view="1" add="1" edit="1" delete="1"/>
|
||||
<access id="access_1_7" id_profile="SuperAdmin" id_tab="Shops" view="1" add="1" edit="1" delete="1"/>
|
||||
<access id="access_1_8" id_profile="SuperAdmin" id_tab="Shop_Urls" view="1" add="1" edit="1" delete="1"/>
|
||||
<access id="access_1_9" id_profile="SuperAdmin" id_tab="Catalog" view="1" add="1" edit="1" delete="1"/>
|
||||
<access id="access_1_10" id_profile="SuperAdmin" id_tab="Orders" view="1" add="1" edit="1" delete="1"/>
|
||||
<access id="access_1_11" id_profile="SuperAdmin" id_tab="Customers" view="1" add="1" edit="1" delete="1"/>
|
||||
<access id="access_1_13" id_profile="SuperAdmin" id_tab="Shipping" view="1" add="1" edit="1" delete="1"/>
|
||||
<access id="access_1_14" id_profile="SuperAdmin" id_tab="Localization" view="1" add="1" edit="1" delete="1"/>
|
||||
<access id="access_1_15" id_profile="SuperAdmin" id_tab="Modules" view="1" add="1" edit="1" delete="1"/>
|
||||
<access id="access_1_16" id_profile="SuperAdmin" id_tab="Preferences" view="1" add="1" edit="1" delete="1"/>
|
||||
<access id="access_1_19" id_profile="SuperAdmin" id_tab="Stats" view="1" add="1" edit="1" delete="1"/>
|
||||
<access id="access_1_20" id_profile="SuperAdmin" id_tab="Stock" view="1" add="1" edit="1" delete="1"/>
|
||||
<access id="access_1_21" id_profile="SuperAdmin" id_tab="Products" view="1" add="1" edit="1" delete="1"/>
|
||||
<access id="access_1_22" id_profile="SuperAdmin" id_tab="Categories" view="1" add="1" edit="1" delete="1"/>
|
||||
<access id="access_1_23" id_profile="SuperAdmin" id_tab="Monitoring" view="1" add="1" edit="1" delete="1"/>
|
||||
<access id="access_1_24" id_profile="SuperAdmin" id_tab="Attributes_and_Values" view="1" add="1" edit="1" delete="1"/>
|
||||
<access id="access_1_25" id_profile="SuperAdmin" id_tab="Features" view="1" add="1" edit="1" delete="1"/>
|
||||
<access id="access_1_26" id_profile="SuperAdmin" id_tab="Manufacturers" view="1" add="1" edit="1" delete="1"/>
|
||||
<access id="access_1_27" id_profile="SuperAdmin" id_tab="Suppliers" view="1" add="1" edit="1" delete="1"/>
|
||||
<access id="access_1_29" id_profile="SuperAdmin" id_tab="Tags" view="1" add="1" edit="1" delete="1"/>
|
||||
<access id="access_1_30" id_profile="SuperAdmin" id_tab="Attachments" view="1" add="1" edit="1" delete="1"/>
|
||||
<access id="access_1_32" id_profile="SuperAdmin" id_tab="Invoices" view="1" add="1" edit="1" delete="1"/>
|
||||
<access id="access_1_33" id_profile="SuperAdmin" id_tab="Merchandise_Returns" view="1" add="1" edit="1" delete="1"/>
|
||||
<access id="access_1_34" id_profile="SuperAdmin" id_tab="Delivery_Slips" view="1" add="1" edit="1" delete="1"/>
|
||||
<access id="access_1_35" id_profile="SuperAdmin" id_tab="Credit_Slips" view="1" add="1" edit="1" delete="1"/>
|
||||
<access id="access_1_36" id_profile="SuperAdmin" id_tab="Statuses" view="1" add="1" edit="1" delete="1"/>
|
||||
<access id="access_1_37" id_profile="SuperAdmin" id_tab="Order_Messages" view="1" add="1" edit="1" delete="1"/>
|
||||
<access id="access_1_39" id_profile="SuperAdmin" id_tab="Addresses" view="1" add="1" edit="1" delete="1"/>
|
||||
<access id="access_1_40" id_profile="SuperAdmin" id_tab="Groups" view="1" add="1" edit="1" delete="1"/>
|
||||
<access id="access_1_41" id_profile="SuperAdmin" id_tab="Shopping_Carts" view="1" add="1" edit="1" delete="1"/>
|
||||
<access id="access_1_42" id_profile="SuperAdmin" id_tab="Customer_Service" view="1" add="1" edit="1" delete="1"/>
|
||||
<access id="access_1_43" id_profile="SuperAdmin" id_tab="Contacts" view="1" add="1" edit="1" delete="1"/>
|
||||
<access id="access_1_44" id_profile="SuperAdmin" id_tab="Genders" view="1" add="1" edit="1" delete="1"/>
|
||||
<access id="access_1_45" id_profile="SuperAdmin" id_tab="Outstanding" view="1" add="1" edit="1" delete="1"/>
|
||||
<access id="access_1_46" id_profile="SuperAdmin" id_tab="Cart_Rules" view="1" add="1" edit="1" delete="1"/>
|
||||
<access id="access_1_47" id_profile="SuperAdmin" id_tab="Catalog_price_rules" view="1" add="1" edit="1" delete="1"/>
|
||||
<access id="access_1_49" id_profile="SuperAdmin" id_tab="CarrierWizard" view="1" add="1" edit="1" delete="1"/>
|
||||
<access id="access_1_49" id_profile="SuperAdmin" id_tab="Carriers" view="1" add="1" edit="1" delete="1"/>
|
||||
<access id="access_1_50" id_profile="SuperAdmin" id_tab="Price_Ranges" view="1" add="1" edit="1" delete="1"/>
|
||||
<access id="access_1_51" id_profile="SuperAdmin" id_tab="Weight_Ranges" view="1" add="1" edit="1" delete="1"/>
|
||||
<access id="access_1_53" id_profile="SuperAdmin" id_tab="Languages" view="1" add="1" edit="1" delete="1"/>
|
||||
<access id="access_1_54" id_profile="SuperAdmin" id_tab="Zones" view="1" add="1" edit="1" delete="1"/>
|
||||
<access id="access_1_55" id_profile="SuperAdmin" id_tab="Countries" view="1" add="1" edit="1" delete="1"/>
|
||||
<access id="access_1_56" id_profile="SuperAdmin" id_tab="States" view="1" add="1" edit="1" delete="1"/>
|
||||
<access id="access_1_57" id_profile="SuperAdmin" id_tab="Currencies" view="1" add="1" edit="1" delete="1"/>
|
||||
<access id="access_1_58" id_profile="SuperAdmin" id_tab="Tax_Rules" view="1" add="1" edit="1" delete="1"/>
|
||||
<access id="access_1_59" id_profile="SuperAdmin" id_tab="Taxes" view="1" add="1" edit="1" delete="1"/>
|
||||
<access id="access_1_60" id_profile="SuperAdmin" id_tab="Translations" view="1" add="1" edit="1" delete="1"/>
|
||||
<access id="access_1_62" id_profile="SuperAdmin" id_tab="Modules_Themes_Catalog" view="1" add="1" edit="1" delete="1"/>
|
||||
<access id="access_1_63" id_profile="SuperAdmin" id_tab="Positions" view="1" add="1" edit="1" delete="1"/>
|
||||
<access id="access_1_64" id_profile="SuperAdmin" id_tab="Payment" view="1" add="1" edit="1" delete="1"/>
|
||||
<access id="access_1_67" id_profile="SuperAdmin" id_tab="Products_1" view="1" add="1" edit="1" delete="1"/>
|
||||
<access id="access_1_68" id_profile="SuperAdmin" id_tab="Customers_2" view="1" add="1" edit="1" delete="1"/>
|
||||
<access id="access_1_69" id_profile="SuperAdmin" id_tab="Themes" view="1" add="1" edit="1" delete="1"/>
|
||||
<access id="access_1_70" id_profile="SuperAdmin" id_tab="SEO_URLs" view="1" add="1" edit="1" delete="1"/>
|
||||
<access id="access_1_71" id_profile="SuperAdmin" id_tab="CMS" view="1" add="1" edit="1" delete="1"/>
|
||||
<access id="access_1_72" id_profile="SuperAdmin" id_tab="Images" view="1" add="1" edit="1" delete="1"/>
|
||||
<access id="access_1_73" id_profile="SuperAdmin" id_tab="Contact_stores" view="1" add="1" edit="1" delete="1"/>
|
||||
<access id="access_1_74" id_profile="SuperAdmin" id_tab="Search_1" view="1" add="1" edit="1" delete="1"/>
|
||||
<access id="access_1_75" id_profile="SuperAdmin" id_tab="Maintenance" view="1" add="1" edit="1" delete="1"/>
|
||||
<access id="access_1_76" id_profile="SuperAdmin" id_tab="Geolocation" view="1" add="1" edit="1" delete="1"/>
|
||||
<access id="access_1_77" id_profile="SuperAdmin" id_tab="Configuration_Information" view="1" add="1" edit="1" delete="1"/>
|
||||
<access id="access_1_78" id_profile="SuperAdmin" id_tab="Performance" view="1" add="1" edit="1" delete="1"/>
|
||||
<access id="access_1_79" id_profile="SuperAdmin" id_tab="E-mail" view="1" add="1" edit="1" delete="1"/>
|
||||
<access id="access_1_81" id_profile="SuperAdmin" id_tab="CSV_Import" view="1" add="1" edit="1" delete="1"/>
|
||||
<access id="access_1_82" id_profile="SuperAdmin" id_tab="DB_Backup" view="1" add="1" edit="1" delete="1"/>
|
||||
<access id="access_1_83" id_profile="SuperAdmin" id_tab="SQL_Manager" view="1" add="1" edit="1" delete="1"/>
|
||||
<access id="access_1_84" id_profile="SuperAdmin" id_tab="Logs" view="1" add="1" edit="1" delete="1"/>
|
||||
<access id="access_1_85" id_profile="SuperAdmin" id_tab="Webservice" view="1" add="1" edit="1" delete="1"/>
|
||||
<access id="access_1_87" id_profile="SuperAdmin" id_tab="Quick_Access" view="1" add="1" edit="1" delete="1"/>
|
||||
<access id="access_1_88" id_profile="SuperAdmin" id_tab="Employees" view="1" add="1" edit="1" delete="1"/>
|
||||
<access id="access_1_89" id_profile="SuperAdmin" id_tab="Profiles" view="1" add="1" edit="1" delete="1"/>
|
||||
<access id="access_1_90" id_profile="SuperAdmin" id_tab="Permissions" view="1" add="1" edit="1" delete="1"/>
|
||||
<access id="access_1_91" id_profile="SuperAdmin" id_tab="Tabs" view="1" add="1" edit="1" delete="1"/>
|
||||
<access id="access_1_93" id_profile="SuperAdmin" id_tab="Search_Engines" view="1" add="1" edit="1" delete="1"/>
|
||||
<access id="access_1_94" id_profile="SuperAdmin" id_tab="Referrers" view="1" add="1" edit="1" delete="1"/>
|
||||
<access id="access_1_95" id_profile="SuperAdmin" id_tab="Warehouses" view="1" add="1" edit="1" delete="1"/>
|
||||
<access id="access_1_96" id_profile="SuperAdmin" id_tab="Stock_Management" view="1" add="1" edit="1" delete="1"/>
|
||||
<access id="access_1_97" id_profile="SuperAdmin" id_tab="Stock_Movement" view="1" add="1" edit="1" delete="1"/>
|
||||
<access id="access_1_98" id_profile="SuperAdmin" id_tab="Stock_instant_state" view="1" add="1" edit="1" delete="1"/>
|
||||
<access id="access_1_99" id_profile="SuperAdmin" id_tab="Stock_cover" view="1" add="1" edit="1" delete="1"/>
|
||||
<access id="access_1_100" id_profile="SuperAdmin" id_tab="Supply_orders" view="1" add="1" edit="1" delete="1"/>
|
||||
<access id="access_1_101" id_profile="SuperAdmin" id_tab="Configuration" view="1" add="1" edit="1" delete="1"/>
|
||||
<access id="access_1_102" id_profile="SuperAdmin" id_tab="Dashboard" view="1" add="1" edit="1" delete="1"/>
|
||||
</entities>
|
||||
</entity_access>
|
2696
_install/data/xml/address_format.xml
Normal file
27
_install/data/xml/carrier.xml
Normal file
@ -0,0 +1,27 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<entity_carrier>
|
||||
<fields id="name" class="Carrier" sql="a.id_carrier = 1">
|
||||
<field name="id_reference"/>
|
||||
<field name="id_tax_rules_group"/>
|
||||
<field name="name"/>
|
||||
<field name="url"/>
|
||||
<field name="active"/>
|
||||
<field name="shipping_handling"/>
|
||||
<field name="range_behavior"/>
|
||||
<field name="is_free"/>
|
||||
<field name="shipping_external"/>
|
||||
<field name="need_range"/>
|
||||
<field name="shipping_method"/>
|
||||
<field name="max_width"/>
|
||||
<field name="max_height"/>
|
||||
<field name="max_depth"/>
|
||||
<field name="max_weight"/>
|
||||
<field name="grade"/>
|
||||
</fields>
|
||||
<entities>
|
||||
<carrier id="carrier_1" id_reference="1" id_tax_rules_group="0" active="1" shipping_handling="0" range_behavior="0" is_free="1" shipping_external="0" need_range="0" shipping_method="0" max_width="0" max_height="0" max_depth="0" max_weight="0" grade="0">
|
||||
<name>0</name>
|
||||
<url/>
|
||||
</carrier>
|
||||
</entities>
|
||||
</entity_carrier>
|
12
_install/data/xml/carrier_group.xml
Normal file
@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<entity_carrier_group>
|
||||
<fields primary="id_carrier, id_group" sql="a.id_carrier = 1">
|
||||
<field name="id_carrier" relation="carrier"/>
|
||||
<field name="id_group" relation="group"/>
|
||||
</fields>
|
||||
<entities>
|
||||
<carrier_group id="carrier_group_1_1" id_carrier="carrier_1" id_group="Visitor"/>
|
||||
<carrier_group id="carrier_group_1_2" id_carrier="carrier_1" id_group="Guest"/>
|
||||
<carrier_group id="carrier_group_1_3" id_carrier="carrier_1" id_group="Customer"/>
|
||||
</entities>
|
||||
</entity_carrier_group>
|
11
_install/data/xml/carrier_tax_rules_group_shop.xml
Normal file
@ -0,0 +1,11 @@
|
||||
<?xml version="1.0"?>
|
||||
<entity_carrier_tax_rules_group_shop>
|
||||
<fields primary="id_carrier,id_tax_rules_group,id_shop">
|
||||
<field name="id_carrier" relation="carrier"/>
|
||||
<field name="id_tax_rules_group"/>
|
||||
<field name="id_shop"/>
|
||||
</fields>
|
||||
<entities>
|
||||
<carrier_tax_rules_group_shop id="carrier_tax_rules_group_shop_1_1_1" id_carrier="carrier_1" id_tax_rules_group="1" id_shop="1"/>
|
||||
</entities>
|
||||
</entity_carrier_tax_rules_group_shop>
|
10
_install/data/xml/carrier_zone.xml
Normal file
@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<entity_carrier_zone>
|
||||
<fields primary="id_carrier, id_zone" sql="a.id_carrier = 1">
|
||||
<field name="id_carrier" relation="carrier"/>
|
||||
<field name="id_zone" relation="zone"/>
|
||||
</fields>
|
||||
<entities>
|
||||
<carrier_zone id="carrier_zone_1_1" id_carrier="carrier_1" id_zone="Europe"/>
|
||||
</entities>
|
||||
</entity_carrier_zone>
|
11
_install/data/xml/category.xml
Normal file
@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<entity_category>
|
||||
<fields id="name" class="Category" sql="a.id_category <= 2">
|
||||
<field name="id_parent" relation="category"/>
|
||||
<field name="active"/>
|
||||
</fields>
|
||||
<entities>
|
||||
<category id="Root" id_parent="" active="1"/>
|
||||
<category id="Home" id_parent="Root" active="1" is_root_category="1" />
|
||||
</entities>
|
||||
</entity_category>
|
12
_install/data/xml/category_group.xml
Normal file
@ -0,0 +1,12 @@
|
||||
<?xml version="1.0"?>
|
||||
<entity_category_group>
|
||||
<fields primary="id_category, id_group" sql="a.id_category = 1">
|
||||
<field name="id_category" relation="category"/>
|
||||
<field name="id_group" relation="group"/>
|
||||
</fields>
|
||||
<entities>
|
||||
<category_group id="category_group_1_1" id_category="Home" id_group="Visitor"/>
|
||||
<category_group id="category_group_1_2" id_category="Home" id_group="Guest"/>
|
||||
<category_group id="category_group_1_3" id_category="Home" id_group="Customer"/>
|
||||
</entities>
|
||||
</entity_category_group>
|
14
_install/data/xml/cms.xml
Normal file
@ -0,0 +1,14 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<entity_cms>
|
||||
<fields id="meta_title" class="CMS">
|
||||
<field name="id_cms_category" relation="cms_category"/>
|
||||
<field name="active"/>
|
||||
</fields>
|
||||
<entities>
|
||||
<cms id="Delivery" id_cms_category="Home" active="1"/>
|
||||
<cms id="Legal_Notice" id_cms_category="Home" active="1"/>
|
||||
<cms id="Terms_and_conditions_of_use" id_cms_category="Home" active="1"/>
|
||||
<cms id="About_us" id_cms_category="Home" active="1"/>
|
||||
<cms id="Secure_payment" id_cms_category="Home" active="1"/>
|
||||
</entities>
|
||||
</entity_cms>
|
10
_install/data/xml/cms_category.xml
Normal file
@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<entity_cms_category>
|
||||
<fields id="name" class="CMSCategory">
|
||||
<field name="id_parent" relation="cms_category"/>
|
||||
<field name="active"/>
|
||||
</fields>
|
||||
<entities>
|
||||
<cms_category id="Home" id_parent="" active="1"/>
|
||||
</entities>
|
||||
</entity_cms_category>
|
851
_install/data/xml/configuration.xml
Normal file
@ -0,0 +1,851 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<entity_configuration>
|
||||
<fields id="name" sql="a.name <> 'PS_LANG_DEFAULT' AND a.id_shop IS NULL AND a.id_shop_group IS NULL" null="1">
|
||||
<field name="name"/>
|
||||
<field name="value"/>
|
||||
</fields>
|
||||
<entities>
|
||||
<configuration id="PS_SEARCH_INDEXATION" name="PS_SEARCH_INDEXATION">
|
||||
<value>1</value>
|
||||
</configuration>
|
||||
<configuration id="PS_ONE_PHONE_AT_LEAST" name="PS_ONE_PHONE_AT_LEAST">
|
||||
<value>1</value>
|
||||
</configuration>
|
||||
<configuration id="PS_CARRIER_DEFAULT" name="PS_CARRIER_DEFAULT">
|
||||
<value>1</value>
|
||||
</configuration>
|
||||
<configuration id="PS_GROUP_FEATURE_ACTIVE" name="PS_GROUP_FEATURE_ACTIVE">
|
||||
<value>0</value>
|
||||
</configuration>
|
||||
<configuration id="PS_CURRENCY_DEFAULT" name="PS_CURRENCY_DEFAULT">
|
||||
<value>1</value>
|
||||
</configuration>
|
||||
<configuration id="PS_COUNTRY_DEFAULT" name="PS_COUNTRY_DEFAULT">
|
||||
<value>8</value>
|
||||
</configuration>
|
||||
<configuration id="PS_REWRITING_SETTINGS" name="PS_REWRITING_SETTINGS">
|
||||
<value>0</value>
|
||||
</configuration>
|
||||
<configuration id="PS_ORDER_OUT_OF_STOCK" name="PS_ORDER_OUT_OF_STOCK">
|
||||
<value>0</value>
|
||||
</configuration>
|
||||
<configuration id="PS_LAST_QTIES" name="PS_LAST_QTIES">
|
||||
<value>3</value>
|
||||
</configuration>
|
||||
<configuration id="PS_CART_REDIRECT" name="PS_CART_REDIRECT">
|
||||
<value>1</value>
|
||||
</configuration>
|
||||
<configuration id="PS_CONDITIONS" name="PS_CONDITIONS">
|
||||
<value>1</value>
|
||||
</configuration>
|
||||
<configuration id="PS_RECYCLABLE_PACK" name="PS_RECYCLABLE_PACK">
|
||||
<value>0</value>
|
||||
</configuration>
|
||||
<configuration id="PS_GIFT_WRAPPING" name="PS_GIFT_WRAPPING">
|
||||
<value>0</value>
|
||||
</configuration>
|
||||
<configuration id="PS_GIFT_WRAPPING_PRICE" name="PS_GIFT_WRAPPING_PRICE">
|
||||
<value>0</value>
|
||||
</configuration>
|
||||
<configuration id="PS_STOCK_MANAGEMENT" name="PS_STOCK_MANAGEMENT">
|
||||
<value>1</value>
|
||||
</configuration>
|
||||
<configuration id="PS_NAVIGATION_PIPE" name="PS_NAVIGATION_PIPE">
|
||||
<value>></value>
|
||||
</configuration>
|
||||
<configuration id="PS_PRODUCTS_PER_PAGE" name="PS_PRODUCTS_PER_PAGE">
|
||||
<value>12</value>
|
||||
</configuration>
|
||||
<configuration id="PS_PURCHASE_MINIMUM" name="PS_PURCHASE_MINIMUM">
|
||||
<value>0</value>
|
||||
</configuration>
|
||||
<configuration id="PS_PRODUCTS_ORDER_WAY" name="PS_PRODUCTS_ORDER_WAY">
|
||||
<value>0</value>
|
||||
</configuration>
|
||||
<configuration id="PS_PRODUCTS_ORDER_BY" name="PS_PRODUCTS_ORDER_BY">
|
||||
<value>4</value>
|
||||
</configuration>
|
||||
<configuration id="PS_DISPLAY_QTIES" name="PS_DISPLAY_QTIES">
|
||||
<value>1</value>
|
||||
</configuration>
|
||||
<configuration id="PS_SHIPPING_HANDLING" name="PS_SHIPPING_HANDLING">
|
||||
<value>2</value>
|
||||
</configuration>
|
||||
<configuration id="PS_SHIPPING_FREE_PRICE" name="PS_SHIPPING_FREE_PRICE">
|
||||
<value>0</value>
|
||||
</configuration>
|
||||
<configuration id="PS_SHIPPING_FREE_WEIGHT" name="PS_SHIPPING_FREE_WEIGHT">
|
||||
<value>0</value>
|
||||
</configuration>
|
||||
<configuration id="PS_SHIPPING_METHOD" name="PS_SHIPPING_METHOD">
|
||||
<value>1</value>
|
||||
</configuration>
|
||||
<configuration id="PS_TAX" name="PS_TAX">
|
||||
<value>1</value>
|
||||
</configuration>
|
||||
<configuration id="PS_SHOP_ENABLE" name="PS_SHOP_ENABLE">
|
||||
<value>1</value>
|
||||
</configuration>
|
||||
<configuration id="PS_NB_DAYS_NEW_PRODUCT" name="PS_NB_DAYS_NEW_PRODUCT">
|
||||
<value>20</value>
|
||||
</configuration>
|
||||
<configuration id="PS_SSL_ENABLED" name="PS_SSL_ENABLED">
|
||||
<value>0</value>
|
||||
</configuration>
|
||||
<configuration id="PS_WEIGHT_UNIT" name="PS_WEIGHT_UNIT">
|
||||
<value>kg</value>
|
||||
</configuration>
|
||||
<configuration id="PS_BLOCK_CART_AJAX" name="PS_BLOCK_CART_AJAX">
|
||||
<value>1</value>
|
||||
</configuration>
|
||||
<configuration id="PS_ORDER_RETURN" name="PS_ORDER_RETURN">
|
||||
<value>0</value>
|
||||
</configuration>
|
||||
<configuration id="PS_ORDER_RETURN_NB_DAYS" name="PS_ORDER_RETURN_NB_DAYS">
|
||||
<value>14</value>
|
||||
</configuration>
|
||||
<configuration id="PS_MAIL_TYPE" name="PS_MAIL_TYPE">
|
||||
<value>3</value>
|
||||
</configuration>
|
||||
<configuration id="PS_PRODUCT_PICTURE_MAX_SIZE" name="PS_PRODUCT_PICTURE_MAX_SIZE">
|
||||
<value>8388608</value>
|
||||
</configuration>
|
||||
<configuration id="PS_PRODUCT_PICTURE_WIDTH" name="PS_PRODUCT_PICTURE_WIDTH">
|
||||
<value>64</value>
|
||||
</configuration>
|
||||
<configuration id="PS_PRODUCT_PICTURE_HEIGHT" name="PS_PRODUCT_PICTURE_HEIGHT">
|
||||
<value>64</value>
|
||||
</configuration>
|
||||
<configuration id="PS_INVOICE_PREFIX" name="PS_INVOICE_PREFIX">
|
||||
<value>#IN</value>
|
||||
</configuration>
|
||||
<configuration id="PS_INVCE_INVOICE_ADDR_RULES" name="PS_INVCE_INVOICE_ADDR_RULES">
|
||||
<value>{"avoid":["vat_number","phone","phone_mobile"]}</value>
|
||||
</configuration>
|
||||
<configuration id="PS_INVCE_DELIVERY_ADDR_RULES" name="PS_INVCE_DELIVERY_ADDR_RULES">
|
||||
<value>{"avoid":["vat_number","phone","phone_mobile"]}</value>
|
||||
</configuration>
|
||||
<configuration id="PS_DELIVERY_PREFIX" name="PS_DELIVERY_PREFIX">
|
||||
<value>#DE</value>
|
||||
</configuration>
|
||||
<configuration id="PS_DELIVERY_NUMBER" name="PS_DELIVERY_NUMBER">
|
||||
<value>1</value>
|
||||
</configuration>
|
||||
<configuration id="PS_RETURN_PREFIX" name="PS_RETURN_PREFIX">
|
||||
<value>#RE</value>
|
||||
</configuration>
|
||||
<configuration id="PS_INVOICE" name="PS_INVOICE">
|
||||
<value>1</value>
|
||||
</configuration>
|
||||
<configuration id="PS_PASSWD_TIME_BACK" name="PS_PASSWD_TIME_BACK">
|
||||
<value>360</value>
|
||||
</configuration>
|
||||
<configuration id="PS_PASSWD_TIME_FRONT" name="PS_PASSWD_TIME_FRONT">
|
||||
<value>360</value>
|
||||
</configuration>
|
||||
<configuration id="PS_DISP_UNAVAILABLE_ATTR" name="PS_DISP_UNAVAILABLE_ATTR">
|
||||
<value>1</value>
|
||||
</configuration>
|
||||
<configuration id="PS_SEARCH_MINWORDLEN" name="PS_SEARCH_MINWORDLEN">
|
||||
<value>3</value>
|
||||
</configuration>
|
||||
<configuration id="PS_SEARCH_BLACKLIST" name="PS_SEARCH_BLACKLIST">
|
||||
<value/>
|
||||
</configuration>
|
||||
<configuration id="PS_SEARCH_WEIGHT_PNAME" name="PS_SEARCH_WEIGHT_PNAME">
|
||||
<value>6</value>
|
||||
</configuration>
|
||||
<configuration id="PS_SEARCH_WEIGHT_REF" name="PS_SEARCH_WEIGHT_REF">
|
||||
<value>10</value>
|
||||
</configuration>
|
||||
<configuration id="PS_SEARCH_WEIGHT_SHORTDESC" name="PS_SEARCH_WEIGHT_SHORTDESC">
|
||||
<value>1</value>
|
||||
</configuration>
|
||||
<configuration id="PS_SEARCH_WEIGHT_DESC" name="PS_SEARCH_WEIGHT_DESC">
|
||||
<value>1</value>
|
||||
</configuration>
|
||||
<configuration id="PS_SEARCH_WEIGHT_CNAME" name="PS_SEARCH_WEIGHT_CNAME">
|
||||
<value>3</value>
|
||||
</configuration>
|
||||
<configuration id="PS_SEARCH_WEIGHT_MNAME" name="PS_SEARCH_WEIGHT_MNAME">
|
||||
<value>3</value>
|
||||
</configuration>
|
||||
<configuration id="PS_SEARCH_WEIGHT_TAG" name="PS_SEARCH_WEIGHT_TAG">
|
||||
<value>4</value>
|
||||
</configuration>
|
||||
<configuration id="PS_SEARCH_WEIGHT_ATTRIBUTE" name="PS_SEARCH_WEIGHT_ATTRIBUTE">
|
||||
<value>2</value>
|
||||
</configuration>
|
||||
<configuration id="PS_SEARCH_WEIGHT_FEATURE" name="PS_SEARCH_WEIGHT_FEATURE">
|
||||
<value>2</value>
|
||||
</configuration>
|
||||
<configuration id="PS_SEARCH_AJAX" name="PS_SEARCH_AJAX">
|
||||
<value>1</value>
|
||||
</configuration>
|
||||
<configuration id="PS_TIMEZONE" name="PS_TIMEZONE">
|
||||
<value>Europe/Paris</value>
|
||||
</configuration>
|
||||
<configuration id="PS_THEME_V11" name="PS_THEME_V11">
|
||||
<value>0</value>
|
||||
</configuration>
|
||||
<configuration id="PRESTASTORE_LIVE" name="PRESTASTORE_LIVE">
|
||||
<value>1</value>
|
||||
</configuration>
|
||||
<configuration id="PS_TIN_ACTIVE" name="PS_TIN_ACTIVE">
|
||||
<value>0</value>
|
||||
</configuration>
|
||||
<configuration id="PS_SHOW_ALL_MODULES" name="PS_SHOW_ALL_MODULES">
|
||||
<value>0</value>
|
||||
</configuration>
|
||||
<configuration id="PS_BACKUP_ALL" name="PS_BACKUP_ALL">
|
||||
<value>0</value>
|
||||
</configuration>
|
||||
<configuration id="PS_1_3_UPDATE_DATE" name="PS_1_3_UPDATE_DATE">
|
||||
<value>2011-12-27 10:20:42</value>
|
||||
</configuration>
|
||||
<configuration id="PS_PRICE_ROUND_MODE" name="PS_PRICE_ROUND_MODE">
|
||||
<value>2</value>
|
||||
</configuration>
|
||||
<configuration id="PS_1_3_2_UPDATE_DATE" name="PS_1_3_2_UPDATE_DATE">
|
||||
<value>2011-12-27 10:20:42</value>
|
||||
</configuration>
|
||||
<configuration id="PS_CONDITIONS_CMS_ID" name="PS_CONDITIONS_CMS_ID">
|
||||
<value>3</value>
|
||||
</configuration>
|
||||
<configuration id="TRACKING_DIRECT_TRAFFIC" name="TRACKING_DIRECT_TRAFFIC">
|
||||
<value>0</value>
|
||||
</configuration>
|
||||
<configuration id="PS_META_KEYWORDS" name="PS_META_KEYWORDS">
|
||||
<value>0</value>
|
||||
</configuration>
|
||||
<configuration id="PS_DISPLAY_JQZOOM" name="PS_DISPLAY_JQZOOM">
|
||||
<value>0</value>
|
||||
</configuration>
|
||||
<configuration id="PS_VOLUME_UNIT" name="PS_VOLUME_UNIT">
|
||||
<value>cl</value>
|
||||
</configuration>
|
||||
<configuration id="PS_CIPHER_ALGORITHM" name="PS_CIPHER_ALGORITHM">
|
||||
<value>1</value>
|
||||
</configuration>
|
||||
<configuration id="PS_ATTRIBUTE_CATEGORY_DISPLAY" name="PS_ATTRIBUTE_CATEGORY_DISPLAY">
|
||||
<value>1</value>
|
||||
</configuration>
|
||||
<configuration id="PS_CUSTOMER_SERVICE_FILE_UPLOAD" name="PS_CUSTOMER_SERVICE_FILE_UPLOAD">
|
||||
<value>1</value>
|
||||
</configuration>
|
||||
<configuration id="PS_CUSTOMER_SERVICE_SIGNATURE" name="PS_CUSTOMER_SERVICE_SIGNATURE">
|
||||
<value/>
|
||||
</configuration>
|
||||
<configuration id="PS_BLOCK_BESTSELLERS_DISPLAY" name="PS_BLOCK_BESTSELLERS_DISPLAY">
|
||||
<value>0</value>
|
||||
</configuration>
|
||||
<configuration id="PS_BLOCK_NEWPRODUCTS_DISPLAY" name="PS_BLOCK_NEWPRODUCTS_DISPLAY">
|
||||
<value>0</value>
|
||||
</configuration>
|
||||
<configuration id="PS_BLOCK_SPECIALS_DISPLAY" name="PS_BLOCK_SPECIALS_DISPLAY">
|
||||
<value>0</value>
|
||||
</configuration>
|
||||
<configuration id="PS_STOCK_MVT_REASON_DEFAULT" name="PS_STOCK_MVT_REASON_DEFAULT">
|
||||
<value>3</value>
|
||||
</configuration>
|
||||
<configuration id="PS_COMPARATOR_MAX_ITEM" name="PS_COMPARATOR_MAX_ITEM">
|
||||
<value>3</value>
|
||||
</configuration>
|
||||
<configuration id="PS_ORDER_PROCESS_TYPE" name="PS_ORDER_PROCESS_TYPE">
|
||||
<value>0</value>
|
||||
</configuration>
|
||||
<configuration id="PS_SPECIFIC_PRICE_PRIORITIES" name="PS_SPECIFIC_PRICE_PRIORITIES">
|
||||
<value>id_shop;id_currency;id_country;id_group</value>
|
||||
</configuration>
|
||||
<configuration id="PS_TAX_DISPLAY" name="PS_TAX_DISPLAY">
|
||||
<value>0</value>
|
||||
</configuration>
|
||||
<configuration id="PS_SMARTY_FORCE_COMPILE" name="PS_SMARTY_FORCE_COMPILE">
|
||||
<value>1</value>
|
||||
</configuration>
|
||||
<configuration id="PS_DISTANCE_UNIT" name="PS_DISTANCE_UNIT">
|
||||
<value>km</value>
|
||||
</configuration>
|
||||
<configuration id="PS_STORES_DISPLAY_CMS" name="PS_STORES_DISPLAY_CMS">
|
||||
<value>1</value>
|
||||
</configuration>
|
||||
<configuration id="PS_STORES_DISPLAY_FOOTER" name="PS_STORES_DISPLAY_FOOTER">
|
||||
<value>1</value>
|
||||
</configuration>
|
||||
<configuration id="PS_STORES_SIMPLIFIED" name="PS_STORES_SIMPLIFIED">
|
||||
<value>0</value>
|
||||
</configuration>
|
||||
<configuration id="SHOP_LOGO_WIDTH" name="SHOP_LOGO_WIDTH">
|
||||
<value>209</value>
|
||||
</configuration>
|
||||
<configuration id="SHOP_LOGO_HEIGHT" name="SHOP_LOGO_HEIGHT">
|
||||
<value>52</value>
|
||||
</configuration>
|
||||
<configuration id="EDITORIAL_IMAGE_WIDTH" name="EDITORIAL_IMAGE_WIDTH">
|
||||
<value>530</value>
|
||||
</configuration>
|
||||
<configuration id="EDITORIAL_IMAGE_HEIGHT" name="EDITORIAL_IMAGE_HEIGHT">
|
||||
<value>228</value>
|
||||
</configuration>
|
||||
<configuration id="PS_STATSDATA_CUSTOMER_PAGESVIEWS" name="PS_STATSDATA_CUSTOMER_PAGESVIEWS">
|
||||
<value>0</value>
|
||||
</configuration>
|
||||
<configuration id="PS_STATSDATA_PAGESVIEWS" name="PS_STATSDATA_PAGESVIEWS">
|
||||
<value>0</value>
|
||||
</configuration>
|
||||
<configuration id="PS_STATSDATA_PLUGINS" name="PS_STATSDATA_PLUGINS">
|
||||
<value>0</value>
|
||||
</configuration>
|
||||
<configuration id="PS_GEOLOCATION_ENABLED" name="PS_GEOLOCATION_ENABLED">
|
||||
<value>0</value>
|
||||
</configuration>
|
||||
<configuration id="PS_ALLOWED_COUNTRIES" name="PS_ALLOWED_COUNTRIES">
|
||||
<value>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;GB;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</value>
|
||||
</configuration>
|
||||
<configuration id="PS_GEOLOCATION_BEHAVIOR" name="PS_GEOLOCATION_BEHAVIOR">
|
||||
<value>0</value>
|
||||
</configuration>
|
||||
<configuration id="PS_LOCALE_LANGUAGE" name="PS_LOCALE_LANGUAGE">
|
||||
<value>fr</value>
|
||||
</configuration>
|
||||
<configuration id="PS_LOCALE_COUNTRY" name="PS_LOCALE_COUNTRY">
|
||||
<value>fr</value>
|
||||
</configuration>
|
||||
<configuration id="PS_ATTACHMENT_MAXIMUM_SIZE" name="PS_ATTACHMENT_MAXIMUM_SIZE">
|
||||
<value>8</value>
|
||||
</configuration>
|
||||
<configuration id="PS_SMARTY_CACHE" name="PS_SMARTY_CACHE">
|
||||
<value>1</value>
|
||||
</configuration>
|
||||
<configuration id="PS_DIMENSION_UNIT" name="PS_DIMENSION_UNIT">
|
||||
<value>cm</value>
|
||||
</configuration>
|
||||
<configuration id="PS_GUEST_CHECKOUT_ENABLED" name="PS_GUEST_CHECKOUT_ENABLED">
|
||||
<value>0</value>
|
||||
</configuration>
|
||||
<configuration id="PS_DISPLAY_SUPPLIERS" name="PS_DISPLAY_SUPPLIERS">
|
||||
<value>1</value>
|
||||
</configuration>
|
||||
<configuration id="PS_DISPLAY_BEST_SELLERS" name="PS_DISPLAY_BEST_SELLERS">
|
||||
<value>1</value>
|
||||
</configuration>
|
||||
<configuration id="PS_CATALOG_MODE" name="PS_CATALOG_MODE">
|
||||
<value>0</value>
|
||||
</configuration>
|
||||
<configuration id="PS_GEOLOCATION_WHITELIST" name="PS_GEOLOCATION_WHITELIST">
|
||||
<value>127;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;91.240.109;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</value>
|
||||
</configuration>
|
||||
<configuration id="PS_LOGS_BY_EMAIL" name="PS_LOGS_BY_EMAIL">
|
||||
<value>5</value>
|
||||
</configuration>
|
||||
<configuration id="PS_COOKIE_CHECKIP" name="PS_COOKIE_CHECKIP">
|
||||
<value>1</value>
|
||||
</configuration>
|
||||
<configuration id="PS_STORES_CENTER_LAT" name="PS_STORES_CENTER_LAT">
|
||||
<value>25.948969</value>
|
||||
</configuration>
|
||||
<configuration id="PS_STORES_CENTER_LONG" name="PS_STORES_CENTER_LONG">
|
||||
<value>-80.226439</value>
|
||||
</configuration>
|
||||
<configuration id="PS_USE_ECOTAX" name="PS_USE_ECOTAX">
|
||||
<value>0</value>
|
||||
</configuration>
|
||||
<configuration id="PS_CANONICAL_REDIRECT" name="PS_CANONICAL_REDIRECT">
|
||||
<value>1</value>
|
||||
</configuration>
|
||||
<configuration id="PS_IMG_UPDATE_TIME" name="PS_IMG_UPDATE_TIME">
|
||||
<value>1324977642</value>
|
||||
</configuration>
|
||||
<configuration id="PS_BACKUP_DROP_TABLE" name="PS_BACKUP_DROP_TABLE">
|
||||
<value>1</value>
|
||||
</configuration>
|
||||
<configuration id="PS_OS_CHEQUE" name="PS_OS_CHEQUE">
|
||||
<value>1</value>
|
||||
</configuration>
|
||||
<configuration id="PS_OS_PAYMENT" name="PS_OS_PAYMENT">
|
||||
<value>2</value>
|
||||
</configuration>
|
||||
<configuration id="PS_OS_PREPARATION" name="PS_OS_PREPARATION">
|
||||
<value>3</value>
|
||||
</configuration>
|
||||
<configuration id="PS_OS_SHIPPING" name="PS_OS_SHIPPING">
|
||||
<value>4</value>
|
||||
</configuration>
|
||||
<configuration id="PS_OS_DELIVERED" name="PS_OS_DELIVERED">
|
||||
<value>5</value>
|
||||
</configuration>
|
||||
<configuration id="PS_OS_CANCELED" name="PS_OS_CANCELED">
|
||||
<value>6</value>
|
||||
</configuration>
|
||||
<configuration id="PS_OS_REFUND" name="PS_OS_REFUND">
|
||||
<value>7</value>
|
||||
</configuration>
|
||||
<configuration id="PS_OS_ERROR" name="PS_OS_ERROR">
|
||||
<value>8</value>
|
||||
</configuration>
|
||||
<configuration id="PS_OS_OUTOFSTOCK" name="PS_OS_OUTOFSTOCK">
|
||||
<value>9</value>
|
||||
</configuration>
|
||||
<configuration id="PS_OS_BANKWIRE" name="PS_OS_BANKWIRE">
|
||||
<value>10</value>
|
||||
</configuration>
|
||||
<configuration id="PS_OS_PAYPAL" name="PS_OS_PAYPAL">
|
||||
<value>11</value>
|
||||
</configuration>
|
||||
<configuration id="PS_OS_WS_PAYMENT" name="PS_OS_WS_PAYMENT">
|
||||
<value>12</value>
|
||||
</configuration>
|
||||
<configuration id="PS_OS_OUTOFSTOCK_PAID" name="PS_OS_OUTOFSTOCK_PAID">
|
||||
<value>9</value>
|
||||
</configuration>
|
||||
<configuration id="PS_OS_OUTOFSTOCK_UNPAID" name="PS_OS_OUTOFSTOCK_UNPAID">
|
||||
<value>13</value>
|
||||
</configuration>
|
||||
<configuration id="PS_OS_COD_VALIDATION" name="PS_OS_COD_VALIDATION">
|
||||
<value>14</value>
|
||||
</configuration>
|
||||
<configuration id="PS_LEGACY_IMAGES" name="PS_LEGACY_IMAGES">
|
||||
<value>0</value>
|
||||
</configuration>
|
||||
<configuration id="PS_IMAGE_QUALITY" name="PS_IMAGE_QUALITY">
|
||||
<value>jpg</value>
|
||||
</configuration>
|
||||
<configuration id="PS_PNG_QUALITY" name="PS_PNG_QUALITY">
|
||||
<value>7</value>
|
||||
</configuration>
|
||||
<configuration id="PS_JPEG_QUALITY" name="PS_JPEG_QUALITY">
|
||||
<value>90</value>
|
||||
</configuration>
|
||||
<configuration id="PS_COOKIE_LIFETIME_FO" name="PS_COOKIE_LIFETIME_FO">
|
||||
<value>480</value>
|
||||
</configuration>
|
||||
<configuration id="PS_COOKIE_LIFETIME_BO" name="PS_COOKIE_LIFETIME_BO">
|
||||
<value>480</value>
|
||||
</configuration>
|
||||
<configuration id="PS_RESTRICT_DELIVERED_COUNTRIES" name="PS_RESTRICT_DELIVERED_COUNTRIES">
|
||||
<value>0</value>
|
||||
</configuration>
|
||||
<configuration id="PS_SHOW_NEW_ORDERS" name="PS_SHOW_NEW_ORDERS">
|
||||
<value>1</value>
|
||||
</configuration>
|
||||
<configuration id="PS_SHOW_NEW_CUSTOMERS" name="PS_SHOW_NEW_CUSTOMERS">
|
||||
<value>1</value>
|
||||
</configuration>
|
||||
<configuration id="PS_SHOW_NEW_MESSAGES" name="PS_SHOW_NEW_MESSAGES">
|
||||
<value>1</value>
|
||||
</configuration>
|
||||
<configuration id="PS_FEATURE_FEATURE_ACTIVE" name="PS_FEATURE_FEATURE_ACTIVE">
|
||||
<value>1</value>
|
||||
</configuration>
|
||||
<configuration id="PS_COMBINATION_FEATURE_ACTIVE" name="PS_COMBINATION_FEATURE_ACTIVE">
|
||||
<value>1</value>
|
||||
</configuration>
|
||||
<configuration id="PS_SPECIFIC_PRICE_FEATURE_ACTIVE" name="PS_SPECIFIC_PRICE_FEATURE_ACTIVE">
|
||||
<value>1</value>
|
||||
</configuration>
|
||||
<configuration id="PS_SCENE_FEATURE_ACTIVE" name="PS_SCENE_FEATURE_ACTIVE">
|
||||
<value>1</value>
|
||||
</configuration>
|
||||
<configuration id="PS_VIRTUAL_PROD_FEATURE_ACTIVE" name="PS_VIRTUAL_PROD_FEATURE_ACTIVE">
|
||||
<value>0</value>
|
||||
</configuration>
|
||||
<configuration id="PS_CUSTOMIZATION_FEATURE_ACTIVE" name="PS_CUSTOMIZATION_FEATURE_ACTIVE">
|
||||
<value>0</value>
|
||||
</configuration>
|
||||
<configuration id="PS_CART_RULE_FEATURE_ACTIVE" name="PS_CART_RULE_FEATURE_ACTIVE">
|
||||
<value>0</value>
|
||||
</configuration>
|
||||
<configuration id="PS_PACK_FEATURE_ACTIVE" name="PS_PACK_FEATURE_ACTIVE">
|
||||
<value>0</value>
|
||||
</configuration>
|
||||
<configuration id="PS_ALIAS_FEATURE_ACTIVE" name="PS_ALIAS_FEATURE_ACTIVE">
|
||||
<value>1</value>
|
||||
</configuration>
|
||||
<configuration id="PS_TAX_ADDRESS_TYPE" name="PS_TAX_ADDRESS_TYPE">
|
||||
<value>id_address_delivery</value>
|
||||
</configuration>
|
||||
<configuration id="PS_SHOP_DEFAULT" name="PS_SHOP_DEFAULT">
|
||||
<value>1</value>
|
||||
</configuration>
|
||||
<configuration id="PS_CARRIER_DEFAULT_SORT" name="PS_CARRIER_DEFAULT_SORT">
|
||||
<value>0</value>
|
||||
</configuration>
|
||||
<configuration id="PS_STOCK_MVT_INC_REASON_DEFAULT" name="PS_STOCK_MVT_INC_REASON_DEFAULT">
|
||||
<value>1</value>
|
||||
</configuration>
|
||||
<configuration id="PS_STOCK_MVT_DEC_REASON_DEFAULT" name="PS_STOCK_MVT_DEC_REASON_DEFAULT">
|
||||
<value>2</value>
|
||||
</configuration>
|
||||
<configuration id="PS_ADVANCED_STOCK_MANAGEMENT" name="PS_ADVANCED_STOCK_MANAGEMENT">
|
||||
<value>0</value>
|
||||
</configuration>
|
||||
<configuration id="PS_ADMINREFRESH_NOTIFICATION" name="PS_ADMINREFRESH_NOTIFICATION">
|
||||
<value>1</value>
|
||||
</configuration>
|
||||
<configuration id="PS_STOCK_MVT_TRANSFER_TO" name="PS_STOCK_MVT_TRANSFER_TO">
|
||||
<value>7</value>
|
||||
</configuration>
|
||||
<configuration id="PS_STOCK_MVT_TRANSFER_FROM" name="PS_STOCK_MVT_TRANSFER_FROM">
|
||||
<value>6</value>
|
||||
</configuration>
|
||||
<configuration id="PS_CARRIER_DEFAULT_ORDER" name="PS_CARRIER_DEFAULT_ORDER">
|
||||
<value>0</value>
|
||||
</configuration>
|
||||
<configuration id="PS_STOCK_MVT_SUPPLY_ORDER" name="PS_STOCK_MVT_SUPPLY_ORDER">
|
||||
<value>8</value>
|
||||
</configuration>
|
||||
<configuration id="PS_STOCK_CUSTOMER_ORDER_REASON" name="PS_STOCK_CUSTOMER_ORDER_REASON">
|
||||
<value>3</value>
|
||||
</configuration>
|
||||
<configuration id="PS_UNIDENTIFIED_GROUP" name="PS_UNIDENTIFIED_GROUP">
|
||||
<value>1</value>
|
||||
</configuration>
|
||||
<configuration id="PS_GUEST_GROUP" name="PS_GUEST_GROUP">
|
||||
<value>2</value>
|
||||
</configuration>
|
||||
<configuration id="PS_CUSTOMER_GROUP" name="PS_CUSTOMER_GROUP">
|
||||
<value>3</value>
|
||||
</configuration>
|
||||
<configuration id="PS_SMARTY_CONSOLE" name="PS_SMARTY_CONSOLE">
|
||||
<value>0</value>
|
||||
</configuration>
|
||||
<configuration id="PS_INVOICE_MODEL" name="PS_INVOICE_MODEL">
|
||||
<value>invoice</value>
|
||||
</configuration>
|
||||
<configuration id="PS_LIMIT_UPLOAD_IMAGE_VALUE" name="PS_LIMIT_UPLOAD_IMAGE_VALUE">
|
||||
<value>2</value>
|
||||
</configuration>
|
||||
<configuration id="PS_LIMIT_UPLOAD_FILE_VALUE" name="PS_LIMIT_UPLOAD_FILE_VALUE">
|
||||
<value>2</value>
|
||||
</configuration>
|
||||
<configuration id="MB_PAY_TO_EMAIL" name="MB_PAY_TO_EMAIL">
|
||||
<value/>
|
||||
</configuration>
|
||||
<configuration id="MB_SECRET_WORD" name="MB_SECRET_WORD">
|
||||
<value/>
|
||||
</configuration>
|
||||
<configuration id="MB_HIDE_LOGIN" name="MB_HIDE_LOGIN">
|
||||
<value>1</value>
|
||||
</configuration>
|
||||
<configuration id="MB_ID_LOGO" name="MB_ID_LOGO">
|
||||
<value>1</value>
|
||||
</configuration>
|
||||
<configuration id="MB_ID_LOGO_WALLET" name="MB_ID_LOGO_WALLET">
|
||||
<value>1</value>
|
||||
</configuration>
|
||||
<configuration id="MB_PARAMETERS" name="MB_PARAMETERS">
|
||||
<value>0</value>
|
||||
</configuration>
|
||||
<configuration id="MB_PARAMETERS_2" name="MB_PARAMETERS_2">
|
||||
<value>0</value>
|
||||
</configuration>
|
||||
<configuration id="MB_DISPLAY_MODE" name="MB_DISPLAY_MODE">
|
||||
<value>0</value>
|
||||
</configuration>
|
||||
<configuration id="MB_CANCEL_URL" name="MB_CANCEL_URL">
|
||||
<value>http://www.yoursite.com</value>
|
||||
</configuration>
|
||||
<configuration id="MB_LOCAL_METHODS" name="MB_LOCAL_METHODS">
|
||||
<value>2</value>
|
||||
</configuration>
|
||||
<configuration id="MB_INTER_METHODS" name="MB_INTER_METHODS">
|
||||
<value>5</value>
|
||||
</configuration>
|
||||
<configuration id="BANK_WIRE_CURRENCIES" name="BANK_WIRE_CURRENCIES">
|
||||
<value>2,1</value>
|
||||
</configuration>
|
||||
<configuration id="CHEQUE_CURRENCIES" name="CHEQUE_CURRENCIES">
|
||||
<value>2,1</value>
|
||||
</configuration>
|
||||
<configuration id="PRODUCTS_VIEWED_NBR" name="PRODUCTS_VIEWED_NBR">
|
||||
<value>2</value>
|
||||
</configuration>
|
||||
<configuration id="BLOCK_CATEG_DHTML" name="BLOCK_CATEG_DHTML">
|
||||
<value>1</value>
|
||||
</configuration>
|
||||
<configuration id="BLOCK_CATEG_MAX_DEPTH" name="BLOCK_CATEG_MAX_DEPTH">
|
||||
<value>4</value>
|
||||
</configuration>
|
||||
<configuration id="MANUFACTURER_DISPLAY_FORM" name="MANUFACTURER_DISPLAY_FORM">
|
||||
<value>1</value>
|
||||
</configuration>
|
||||
<configuration id="MANUFACTURER_DISPLAY_TEXT" name="MANUFACTURER_DISPLAY_TEXT">
|
||||
<value>1</value>
|
||||
</configuration>
|
||||
<configuration id="MANUFACTURER_DISPLAY_TEXT_NB" name="MANUFACTURER_DISPLAY_TEXT_NB">
|
||||
<value>5</value>
|
||||
</configuration>
|
||||
<configuration id="NEW_PRODUCTS_NBR" name="NEW_PRODUCTS_NBR">
|
||||
<value>5</value>
|
||||
</configuration>
|
||||
<configuration id="PS_TOKEN_ENABLE" name="PS_TOKEN_ENABLE">
|
||||
<value>1</value>
|
||||
</configuration>
|
||||
<configuration id="PS_STATS_RENDER" name="PS_STATS_RENDER">
|
||||
<value>graphnvd3</value>
|
||||
</configuration>
|
||||
<configuration id="PS_STATS_OLD_CONNECT_AUTO_CLEAN" name="PS_STATS_OLD_CONNECT_AUTO_CLEAN">
|
||||
<value>never</value>
|
||||
</configuration>
|
||||
<configuration id="PS_STATS_GRID_RENDER" name="PS_STATS_GRID_RENDER">
|
||||
<value>gridhtml</value>
|
||||
</configuration>
|
||||
<configuration id="BLOCKTAGS_NBR" name="BLOCKTAGS_NBR">
|
||||
<value>10</value>
|
||||
</configuration>
|
||||
<configuration id="CHECKUP_DESCRIPTIONS_LT" name="CHECKUP_DESCRIPTIONS_LT">
|
||||
<value>100</value>
|
||||
</configuration>
|
||||
<configuration id="CHECKUP_DESCRIPTIONS_GT" name="CHECKUP_DESCRIPTIONS_GT">
|
||||
<value>400</value>
|
||||
</configuration>
|
||||
<configuration id="CHECKUP_IMAGES_LT" name="CHECKUP_IMAGES_LT">
|
||||
<value>1</value>
|
||||
</configuration>
|
||||
<configuration id="CHECKUP_IMAGES_GT" name="CHECKUP_IMAGES_GT">
|
||||
<value>2</value>
|
||||
</configuration>
|
||||
<configuration id="CHECKUP_SALES_LT" name="CHECKUP_SALES_LT">
|
||||
<value>1</value>
|
||||
</configuration>
|
||||
<configuration id="CHECKUP_SALES_GT" name="CHECKUP_SALES_GT">
|
||||
<value>2</value>
|
||||
</configuration>
|
||||
<configuration id="CHECKUP_STOCK_LT" name="CHECKUP_STOCK_LT">
|
||||
<value>1</value>
|
||||
</configuration>
|
||||
<configuration id="CHECKUP_STOCK_GT" name="CHECKUP_STOCK_GT">
|
||||
<value>3</value>
|
||||
</configuration>
|
||||
<configuration id="FOOTER_CMS" name="FOOTER_CMS">
|
||||
<value>0_3|0_4</value>
|
||||
</configuration>
|
||||
<configuration id="FOOTER_BLOCK_ACTIVATION" name="FOOTER_BLOCK_ACTIVATION">
|
||||
<value>0_3|0_4</value>
|
||||
</configuration>
|
||||
<configuration id="FOOTER_POWEREDBY" name="FOOTER_POWEREDBY">
|
||||
<value>1</value>
|
||||
</configuration>
|
||||
<configuration id="BLOCKADVERT_LINK" name="BLOCKADVERT_LINK">
|
||||
<value>http://www.prestashop.com</value>
|
||||
</configuration>
|
||||
<configuration id="BLOCKSTORE_IMG" name="BLOCKSTORE_IMG">
|
||||
<value>store.jpg</value>
|
||||
</configuration>
|
||||
<configuration id="BLOCKADVERT_IMG_EXT" name="BLOCKADVERT_IMG_EXT">
|
||||
<value>jpg</value>
|
||||
</configuration>
|
||||
<configuration id="MOD_BLOCKTOPMENU_ITEMS" name="MOD_BLOCKTOPMENU_ITEMS">
|
||||
<value>CAT2,CAT3,CAT4</value>
|
||||
</configuration>
|
||||
<configuration id="MOD_BLOCKTOPMENU_SEARCH" name="MOD_BLOCKTOPMENU_SEARCH">
|
||||
<value/>
|
||||
</configuration>
|
||||
<configuration id="blocksocial_facebook" name="BLOCKSOCIAL_FACEBOOK">
|
||||
<value>http://www.facebook.com/prestashop</value>
|
||||
</configuration>
|
||||
<configuration id="blocksocial_twitter" name="BLOCKSOCIAL_TWITTER">
|
||||
<value>http://www.twitter.com/prestashop</value>
|
||||
</configuration>
|
||||
<configuration id="blocksocial_rss" name="BLOCKSOCIAL_RSS">
|
||||
<value>http://www.prestashop.com/blog/en/feed/</value>
|
||||
</configuration>
|
||||
<configuration id="blockcontactinfos_company" name="BLOCKCONTACTINFOS_COMPANY">
|
||||
<value>Your company</value>
|
||||
</configuration>
|
||||
<configuration id="blockcontactinfos_address" name="BLOCKCONTACTINFOS_ADDRESS">
|
||||
<value>Address line 1
|
||||
City
|
||||
Country</value>
|
||||
</configuration>
|
||||
<configuration id="blockcontactinfos_phone" name="BLOCKCONTACTINFOS_PHONE">
|
||||
<value>0123-456-789</value>
|
||||
</configuration>
|
||||
<configuration id="blockcontactinfos_email" name="BLOCKCONTACTINFOS_EMAIL">
|
||||
<value>pub@prestashop.com</value>
|
||||
</configuration>
|
||||
<configuration id="blockcontact_telnumber" name="BLOCKCONTACT_TELNUMBER">
|
||||
<value>0123-456-789</value>
|
||||
</configuration>
|
||||
<configuration id="blockcontact_email" name="BLOCKCONTACT_EMAIL">
|
||||
<value>pub@prestashop.com</value>
|
||||
</configuration>
|
||||
<configuration id="SUPPLIER_DISPLAY_TEXT" name="SUPPLIER_DISPLAY_TEXT">
|
||||
<value>1</value>
|
||||
</configuration>
|
||||
<configuration id="SUPPLIER_DISPLAY_TEXT_NB" name="SUPPLIER_DISPLAY_TEXT_NB">
|
||||
<value>5</value>
|
||||
</configuration>
|
||||
<configuration id="SUPPLIER_DISPLAY_FORM" name="SUPPLIER_DISPLAY_FORM">
|
||||
<value>1</value>
|
||||
</configuration>
|
||||
<configuration id="BLOCK_CATEG_NBR_COLUMN_FOOTER" name="BLOCK_CATEG_NBR_COLUMN_FOOTER">
|
||||
<value>1</value>
|
||||
</configuration>
|
||||
<configuration id="UPGRADER_BACKUPDB_FILENAME" name="UPGRADER_BACKUPDB_FILENAME">
|
||||
<value/>
|
||||
</configuration>
|
||||
<configuration id="UPGRADER_BACKUPFILES_FILENAME" name="UPGRADER_BACKUPFILES_FILENAME">
|
||||
<value/>
|
||||
</configuration>
|
||||
<configuration id="BLOCKREINSURANCE_NBBLOCKS" name="BLOCKREINSURANCE_NBBLOCKS">
|
||||
<value>5</value>
|
||||
</configuration>
|
||||
<configuration id="HOMESLIDER_WIDTH" name="HOMESLIDER_WIDTH">
|
||||
<value>535</value>
|
||||
</configuration>
|
||||
<configuration id="HOMESLIDER_SPEED" name="HOMESLIDER_SPEED">
|
||||
<value>1300</value>
|
||||
</configuration>
|
||||
<configuration id="HOMESLIDER_PAUSE" name="HOMESLIDER_PAUSE">
|
||||
<value>7700</value>
|
||||
</configuration>
|
||||
<configuration id="HOMESLIDER_LOOP" name="HOMESLIDER_LOOP">
|
||||
<value>1</value>
|
||||
</configuration>
|
||||
<configuration id="PS_BASE_DISTANCE_UNIT" name="PS_BASE_DISTANCE_UNIT">
|
||||
<value>m</value>
|
||||
</configuration>
|
||||
<configuration id="PS_SHOP_DOMAIN" name="PS_SHOP_DOMAIN">
|
||||
<value>localhost</value>
|
||||
</configuration>
|
||||
<configuration id="PS_SHOP_DOMAIN_SSL" name="PS_SHOP_DOMAIN_SSL">
|
||||
<value>localhost</value>
|
||||
</configuration>
|
||||
<configuration id="PS_SHOP_NAME" name="PS_SHOP_NAME">
|
||||
<value>PrestaShop</value>
|
||||
</configuration>
|
||||
<configuration id="PS_SHOP_EMAIL" name="PS_SHOP_EMAIL">
|
||||
<value>pub@prestashop.com</value>
|
||||
</configuration>
|
||||
<configuration id="PS_MAIL_METHOD" name="PS_MAIL_METHOD">
|
||||
<value>1</value>
|
||||
</configuration>
|
||||
<configuration id="PS_SHOP_ACTIVITY" name="PS_SHOP_ACTIVITY">
|
||||
<value>Animaux</value>
|
||||
</configuration>
|
||||
<configuration id="PS_LOGO" name="PS_LOGO">
|
||||
<value>logo.jpg</value>
|
||||
</configuration>
|
||||
<configuration id="PS_FAVICON" name="PS_FAVICON">
|
||||
<value>favicon.ico</value>
|
||||
</configuration>
|
||||
<configuration id="PS_STORES_ICON" name="PS_STORES_ICON">
|
||||
<value>logo_stores.png</value>
|
||||
</configuration>
|
||||
<configuration id="PS_ROOT_CATEGORY" name="PS_ROOT_CATEGORY">
|
||||
<value>1</value>
|
||||
</configuration>
|
||||
<configuration id="PS_HOME_CATEGORY" name="PS_HOME_CATEGORY">
|
||||
<value>2</value>
|
||||
</configuration>
|
||||
<configuration id="PS_CONFIGURATION_AGREMENT" name="PS_CONFIGURATION_AGREMENT">
|
||||
<value>0</value>
|
||||
</configuration>
|
||||
<configuration id="PS_MAIL_SERVER" name="PS_MAIL_SERVER">
|
||||
<value>smtp.</value>
|
||||
</configuration>
|
||||
<configuration id="PS_MAIL_USER" name="PS_MAIL_USER">
|
||||
<value/>
|
||||
</configuration>
|
||||
<configuration id="PS_MAIL_PASSWD" name="PS_MAIL_PASSWD">
|
||||
<value/>
|
||||
</configuration>
|
||||
<configuration id="PS_MAIL_SMTP_ENCRYPTION" name="PS_MAIL_SMTP_ENCRYPTION">
|
||||
<value>off</value>
|
||||
</configuration>
|
||||
<configuration id="PS_MAIL_SMTP_PORT" name="PS_MAIL_SMTP_PORT">
|
||||
<value>25</value>
|
||||
</configuration>
|
||||
<configuration id="PS_MAIL_COLOR" name="PS_MAIL_COLOR">
|
||||
<value>#db3484</value>
|
||||
</configuration>
|
||||
<configuration id="NW_SALT" name="NW_SALT">
|
||||
<value>nK4KJP7jOsnzWMpo</value>
|
||||
</configuration>
|
||||
<configuration id="PS_PAYMENT_LOGO_CMS_ID" name="PS_PAYMENT_LOGO_CMS_ID">
|
||||
<value>0</value>
|
||||
</configuration>
|
||||
<configuration id="HOME_FEATURED_NBR" name="HOME_FEATURED_NBR">
|
||||
<value>8</value>
|
||||
</configuration>
|
||||
<configuration id="SEK_MIN_OCCURENCES" name="SEK_MIN_OCCURENCES">
|
||||
<value>1</value>
|
||||
</configuration>
|
||||
<configuration id="SEK_FILTER_KW" name="SEK_FILTER_KW">
|
||||
<value/>
|
||||
</configuration>
|
||||
<configuration id="PS_ALLOW_MOBILE_DEVICE" name="PS_ALLOW_MOBILE_DEVICE">
|
||||
<value>1</value>
|
||||
</configuration>
|
||||
<configuration id="PS_CUSTOMER_CREATION_EMAIL" name="PS_CUSTOMER_CREATION_EMAIL">
|
||||
<value>1</value>
|
||||
</configuration>
|
||||
<configuration id="PS_SMARTY_CONSOLE_KEY" name="PS_SMARTY_CONSOLE_KEY">
|
||||
<value>SMARTY_DEBUG</value>
|
||||
</configuration>
|
||||
<configuration id="PS_DASHBOARD_USE_PUSH" name="PS_DASHBOARD_USE_PUSH">
|
||||
<value>0</value>
|
||||
</configuration>
|
||||
<configuration id="PS_ATTRIBUTE_ANCHOR_SEPARATOR" name="PS_ATTRIBUTE_ANCHOR_SEPARATOR">
|
||||
<value>-</value>
|
||||
</configuration>
|
||||
<configuration id="CONF_AVERAGE_PRODUCT_MARGIN" name="CONF_AVERAGE_PRODUCT_MARGIN">
|
||||
<value>40</value>
|
||||
</configuration>
|
||||
<configuration id="PS_DASHBOARD_SIMULATION" name="PS_DASHBOARD_SIMULATION">
|
||||
<value>1</value>
|
||||
</configuration>
|
||||
<configuration id="PS_QUICK_VIEW" name="PS_QUICK_VIEW">
|
||||
<value>1</value>
|
||||
</configuration>
|
||||
<configuration id="PS_USE_HTMLPURIFIER" name="PS_USE_HTMLPURIFIER">
|
||||
<value>1</value>
|
||||
</configuration>
|
||||
<configuration id="PS_SMARTY_CACHING_TYPE" name="PS_SMARTY_CACHING_TYPE">
|
||||
<value>filesystem</value>
|
||||
</configuration>
|
||||
<configuration id="PS_SMARTY_CLEAR_CACHE" name="PS_SMARTY_CLEAR_CACHE">
|
||||
<value>everytime</value>
|
||||
</configuration>
|
||||
<configuration id="PS_DETECT_LANG" name="PS_DETECT_LANG">
|
||||
<value>1</value>
|
||||
</configuration>
|
||||
<configuration id="PS_DETECT_COUNTRY" name="PS_DETECT_COUNTRY">
|
||||
<value>1</value>
|
||||
</configuration>
|
||||
<configuration id="PS_ROUND_TYPE" name="PS_ROUND_TYPE">
|
||||
<value>2</value>
|
||||
</configuration>
|
||||
<configuration id="PS_PRICE_DISPLAY_PRECISION" name="PS_PRICE_DISPLAY_PRECISION">
|
||||
<value>2</value>
|
||||
</configuration>
|
||||
<configuration id="PS_LOG_EMAILS" name="PS_LOG_EMAILS">
|
||||
<value>1</value>
|
||||
</configuration>
|
||||
<configuration id="PS_CUSTOMER_NWSL" name="PS_CUSTOMER_NWSL">
|
||||
<value>1</value>
|
||||
</configuration>
|
||||
<configuration id="PS_CUSTOMER_OPTIN" name="PS_CUSTOMER_OPTIN">
|
||||
<value>1</value>
|
||||
</configuration>
|
||||
<configuration id="PS_PACK_STOCK_TYPE" name="PS_PACK_STOCK_TYPE">
|
||||
<value>0</value>
|
||||
</configuration>
|
||||
<configuration id="PS_LOG_MODULE_PERFS_MODULO" name="PS_LOG_MODULE_PERFS_MODULO">
|
||||
<value>0</value>
|
||||
</configuration>
|
||||
<configuration id="PS_DISALLOW_HISTORY_REORDERING" name="PS_DISALLOW_HISTORY_REORDERING">
|
||||
<value>0</value>
|
||||
</configuration>
|
||||
<configuration id="PS_DISPLAY_PRODUCT_WEIGHT" name="PS_DISPLAY_PRODUCT_WEIGHT">
|
||||
<value>0</value>
|
||||
</configuration>
|
||||
<configuration id="PS_PRODUCT_WEIGHT_PRECISION" name="PS_PRODUCT_WEIGHT_PRECISION">
|
||||
<value>2</value>
|
||||
</configuration>
|
||||
<configuration id="PS_ADVANCED_PAYMENT_API" name="PS_ADVANCED_PAYMENT_API">
|
||||
<value>0</value>
|
||||
</configuration>
|
||||
</entities>
|
||||
</entity_configuration>
|
10
_install/data/xml/contact.xml
Normal file
@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<entity_contact>
|
||||
<fields id="name" class="Contact">
|
||||
<field name="customer_service"/>
|
||||
</fields>
|
||||
<entities>
|
||||
<contact id="Webmaster" customer_service="1"/>
|
||||
<contact id="Customer_service" customer_service="1"/>
|
||||
</entities>
|
||||
</entity_contact>
|