forked from FabienSerny/sellermania-prestashop
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinit.php
More file actions
73 lines (64 loc) · 2.46 KB
/
init.php
File metadata and controls
73 lines (64 loc) · 2.46 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
<?php
/*
* 2010-2020 Sellermania / Froggy Commerce / 23Prod SARL
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/afl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to [email protected] so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade your module to newer
* versions in the future.
*
* @author Froggy Commerce <[email protected]>
* @copyright 2010-2020 Sellermania / Froggy Commerce / 23Prod SARL
* @version 1.0
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
*/
/*
* Security
*/
if (!defined('_PS_VERSION_')) {
exit;
}
// Load Pear
if (!class_exists('PEAR')) {
require_once(dirname(__FILE__).'/../../tools/pear/PEAR.php');
}
// Require installer and loader classes
require_once(dirname(__FILE__).'/classes/SellermaniaInstaller.php');
require_once(dirname(__FILE__).'/classes/SellermaniaLoader.php');
require_once(dirname(__FILE__).'/classes/SellermaniaTestAPI.php');
// Require Db requests class
$db_requests_class_file = 'SellermaniaProduct15.php';
if (version_compare(_PS_VERSION_, '1.5') < 0) {
$db_requests_class_file = 'SellermaniaProduct14.php';
}
require_once(dirname(__FILE__).'/classes/'.$db_requests_class_file);
require_once(dirname(__FILE__).'/classes/SellermaniaExportExtraFields.php');
// Request Froggy lib
require_once(dirname(__FILE__).'/classes/FroggyLib.php');
// Load ObjectModel and PaymentModule classes
require_once(dirname(__FILE__).'/classes/SellermaniaOrder.php');
require_once(dirname(__FILE__).'/classes/SellermaniaOrderConfirmation.php');
require_once(dirname(__FILE__).'/classes/SellermaniaPaymentModule.php');
// Load the Sellermania API Client
if (version_compare(PHP_VERSION, '5.3.0') >= 0) {
require_once(dirname(__FILE__).'/lib/sellermania/Sellermania.php');
}
// Set time limit
@set_time_limit(1200);
@ini_set('memory_limit', '512M');
// Debug Sellermania mode can be enabled only adding _SELLERMANIA_DEBUG_ define to your settings file
if (defined('_SELLERMANIA_DEBUG_')) {
if (Tools::getValue('sellermania') == 'deleteOrders') {
Db::getInstance()->execute('TRUNCATE `ps_sellermania_order`');
}
}