// Merge -> revision 8014

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8021 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
rMalie committed 2011-08-11 12:00:05 +00:00
1 parent d1d4d57eca
commit 52d1d13891
136 files changed
+700 -352

No files matched your search

+1 -1
View File
@@ -179,7 +179,7 @@ class AdminGenerator extends AdminTab
$tab = array(); $tab = array();
// Directories // Directories
$tab['Directories'] = array('classes/', 'config/', 'download/', 'mails/', 'modules/', 'translations/', 'tools/', 'lang-'.Language::getIsoById(Configuration::get('PS_LANG_DEFAULT')).'/'); $tab['Directories'] = array('classes/', 'config/', 'download/', 'mails/', 'modules/', 'translations/', 'tools/', Language::getIsoById(Configuration::get('PS_LANG_DEFAULT')).'/');
// Files // Files
$tab['Files'] = array('addresses.php', 'address.php', 'authentication.php', 'cart.php', 'discount.php', 'footer.php', $tab['Files'] = array('addresses.php', 'address.php', 'authentication.php', 'cart.php', 'discount.php', 'footer.php',
+3
View File
@@ -147,6 +147,7 @@ class AdminGroups extends AdminTab
foreach ($categories AS $category) foreach ($categories AS $category)
echo ' <option value="'.(int)($category['id_category']).'">'.Tools::htmlentitiesUTF8($category['name']).'</option>'; echo ' <option value="'.(int)($category['id_category']).'">'.Tools::htmlentitiesUTF8($category['name']).'</option>';
echo ' </select><sup>*</sup> echo ' </select><sup>*</sup>
<p>'.$this->l('Only products that have this category as default category will be affected').'.</p>
</div> </div>
<label>'.$this->l('Discount (in %):').' </label> <label>'.$this->l('Discount (in %):').' </label>
<div class="margin-form"> <div class="margin-form">
@@ -334,6 +335,7 @@ class AdminGroups extends AdminTab
$id_group_reductions = Tools::getValue('gr_id_group_reduction'); $id_group_reductions = Tools::getValue('gr_id_group_reduction');
$reductions = Tools::getValue('gr_reduction'); $reductions = Tools::getValue('gr_reduction');
if ($id_group_reductions) if ($id_group_reductions)
{
foreach ($id_group_reductions AS $key => $id_group_reduction) foreach ($id_group_reductions AS $key => $id_group_reduction)
if (!Validate::isUnsignedId($id_group_reductions[$key]) OR !Validate::isPrice($reductions[$key])) if (!Validate::isUnsignedId($id_group_reductions[$key]) OR !Validate::isPrice($reductions[$key]))
$this->_errors[] = Tools::displayError(); $this->_errors[] = Tools::displayError();
@@ -344,6 +346,7 @@ class AdminGroups extends AdminTab
if (!$groupReduction->update()) if (!$groupReduction->update())
$this->_errors[] = Tools::displayError('Cannot update group reductions'); $this->_errors[] = Tools::displayError('Cannot update group reductions');
} }
}
if (!sizeof($this->_errors)) if (!sizeof($this->_errors))
parent::postProcess(); parent::postProcess();
} }
+7 -1
View File
@@ -93,7 +93,6 @@ class AdminLanguages extends AdminTab
} }
unlink($tmpName); unlink($tmpName);
} }
} }
/** /**
@@ -122,6 +121,13 @@ class AdminLanguages extends AdminTab
return !sizeof($this->_errors) ? true : false; return !sizeof($this->_errors) ? true : false;
} }
protected function copyFromPost(&$object, $table)
{
if($object->id AND ($object->iso_code != $_POST['iso_code']))
if(Validate::isLanguageIsoCode($_POST['iso_code']))
$object->moveToIso($_POST['iso_code']);
parent::copyFromPost($object, $table);
}
public function postProcess() public function postProcess()
{ {
+2
View File
@@ -160,6 +160,8 @@ class GroupCore extends ObjectModel
{ {
Db::getInstance()->Execute('DELETE FROM `'._DB_PREFIX_.'customer_group` WHERE `id_group` = '.(int)($this->id)); Db::getInstance()->Execute('DELETE FROM `'._DB_PREFIX_.'customer_group` WHERE `id_group` = '.(int)($this->id));
Db::getInstance()->Execute('DELETE FROM `'._DB_PREFIX_.'category_group` WHERE `id_group` = '.(int)($this->id)); Db::getInstance()->Execute('DELETE FROM `'._DB_PREFIX_.'category_group` WHERE `id_group` = '.(int)($this->id));
Db::getInstance()->Execute('DELETE FROM `'._DB_PREFIX_.'group_reduction` WHERE `id_group` = '.(int)($this->id));
Db::getInstance()->Execute('DELETE FROM `'._DB_PREFIX_.'product_group_reduction_cache` WHERE `id_group` = '.(int)($this->id));
Discount::deleteByIdGroup((int)($this->id)); Discount::deleteByIdGroup((int)($this->id));
return true; return true;
} }
+25 -23
View File
@@ -61,10 +61,9 @@ class GroupReductionCore extends ObjectModel
public function delete() public function delete()
{ {
$resource = Db::getInstance(_PS_USE_SQL_SLAVE_)->ExecuteS(' $resource = Db::getInstance(_PS_USE_SQL_SLAVE_)->ExecuteS('
SELECT cp.`id_product` SELECT p.`id_product`
FROM `'._DB_PREFIX_.'category_product` cp FROM `'._DB_PREFIX_.'product` p
INNER JOIN `'._DB_PREFIX_.'product` p ON (p.`id_product` = cp.`id_product`) WHERE p.`id_category_default` = '.(int)($this->id_category)
WHERE cp.`id_category` = '.(int)($this->id_category)
, false); , false);
while ($row = Db::getInstance()->nextRow($resource)) while ($row = Db::getInstance()->nextRow($resource))
@@ -73,7 +72,7 @@ class GroupReductionCore extends ObjectModel
if (Db::getInstance()->Execute($query) === false) if (Db::getInstance()->Execute($query) === false)
return false; return false;
} }
return ($this->_clearCache() AND parent::delete()); return (parent::delete());
} }
protected function _clearCache() protected function _clearCache()
@@ -84,10 +83,9 @@ class GroupReductionCore extends ObjectModel
protected function _setCache() protected function _setCache()
{ {
$resource = Db::getInstance(_PS_USE_SQL_SLAVE_)->ExecuteS(' $resource = Db::getInstance(_PS_USE_SQL_SLAVE_)->ExecuteS('
SELECT cp.`id_product` SELECT p.`id_product`
FROM `'._DB_PREFIX_.'category_product` cp FROM `'._DB_PREFIX_.'product` p
INNER JOIN `'._DB_PREFIX_.'product` p ON (p.`id_product` = cp.`id_product`) WHERE p.`id_category_default` = '.(int)($this->id_category)
WHERE cp.`id_category` = '.(int)($this->id_category)
, false); , false);
$query = 'INSERT INTO `'._DB_PREFIX_.'product_group_reduction_cache` (`id_product`, `id_group`, `reduction`) VALUES '; $query = 'INSERT INTO `'._DB_PREFIX_.'product_group_reduction_cache` (`id_product`, `id_group`, `reduction`) VALUES ';
@@ -106,15 +104,16 @@ class GroupReductionCore extends ObjectModel
protected function _updateCache() protected function _updateCache()
{ {
$resource = Db::getInstance(_PS_USE_SQL_SLAVE_)->ExecuteS(' $resource = Db::getInstance(_PS_USE_SQL_SLAVE_)->ExecuteS('
SELECT cp.`id_product` SELECT p.`id_product`
FROM `'._DB_PREFIX_.'category_product` cp FROM `'._DB_PREFIX_.'product` p
INNER JOIN `'._DB_PREFIX_.'product` p ON (p.`id_product` = cp.`id_product`) WHERE p.`id_category_default` = '.(int)($this->id_category)
WHERE cp.`id_category` = '.(int)($this->id_category)
, false); , false);
while ($row = Db::getInstance()->nextRow($resource)) while ($row = Db::getInstance()->nextRow($resource))
{ {
$query = 'UPDATE `'._DB_PREFIX_.'product_group_reduction_cache` SET `reduction` = '.(float)($this->reduction).' WHERE `id_product` = '.(int)($row['id_product']).' AND `id_group` = '.(int)($this->id_group); $query = 'UPDATE `'._DB_PREFIX_.'product_group_reduction_cache`
SET `reduction` = '.(float)($this->reduction).'
WHERE `id_product` = '.(int)($row['id_product']).' AND `id_group` = '.(int)($this->id_group);
if (Db::getInstance()->Execute($query) === false) if (Db::getInstance()->Execute($query) === false)
return false; return false;
} }
@@ -134,13 +133,17 @@ class GroupReductionCore extends ObjectModel
public static function getValueForProduct($id_product, $id_group) public static function getValueForProduct($id_product, $id_group)
{ {
if (!isset(self::$reductionCache[$id_product.'-'.$id_group])) if (!isset(self::$reductionCache[$id_product.'-'.$id_group]))
self::$reductionCache[$id_product.'-'.$id_group] = Db::getInstance()->getValue('SELECT `reduction` FROM `'._DB_PREFIX_.'product_group_reduction_cache` WHERE `id_product` = '.(int)($id_product).' AND `id_group` = '.(int)($id_group)); self::$reductionCache[$id_product.'-'.$id_group] = Db::getInstance()->getValue('SELECT `reduction`
FROM `'._DB_PREFIX_.'product_group_reduction_cache`
WHERE `id_product` = '.(int)($id_product).' AND `id_group` = '.(int)($id_group));
return self::$reductionCache[$id_product.'-'.$id_group]; return self::$reductionCache[$id_product.'-'.$id_group];
} }
public static function doesExist($id_group, $id_category) public static function doesExist($id_group, $id_category)
{ {
return (bool)Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue('SELECT `id_group` FROM `'._DB_PREFIX_.'group_reduction` WHERE `id_group` = '.(int)($id_group).' AND `id_category` = '.(int)($id_category)); return (bool)Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue('SELECT `id_group`
FROM `'._DB_PREFIX_.'group_reduction`
WHERE `id_group` = '.(int)($id_group).' AND `id_category` = '.(int)($id_category));
} }
public function getGroupByCategoryId($id_category) public function getGroupByCategoryId($id_category)
@@ -170,12 +173,13 @@ class GroupReductionCore extends ObjectModel
); );
if (Db::getInstance()->NumRows() == 0) if (Db::getInstance()->NumRows() == 0)
{ $query = 'INSERT INTO `'._DB_PREFIX_.'product_group_reduction_cache` (`id_product`, `id_group`, `reduction`)
$query = 'INSERT INTO `'._DB_PREFIX_.'product_group_reduction_cache` (`id_product`, `id_group`, `reduction`) VALUES '; VALUES ('.(int)($id_product).', '.(int)($id_group).', '.(float)($reduction).')';
$query .= '('.(int)($id_product).', '.(int)($id_group).', '.(float)($reduction).')';
}
else else
$query = 'UPDATE `'._DB_PREFIX_.'product_group_reduction_cache` SET `reduction` = '.(float)($reduction).' WHERE `id_product` = '.(int)($id_product).' AND `id_group` = '.(int)($id_group); $query = 'UPDATE `'._DB_PREFIX_.'product_group_reduction_cache`
SET `reduction` = '.(float)($reduction).'
WHERE `id_product` = '.(int)($id_product).' AND `id_group` = '.(int)($id_group);
return (Db::getInstance()->Execute($query)); return (Db::getInstance()->Execute($query));
} }
@@ -210,5 +214,3 @@ class GroupReductionCore extends ObjectModel
return true; return true;
} }
} }
+51 -14
View File
@@ -61,6 +61,13 @@ class LanguageCore extends ObjectModel
'objectsNodeName' => 'languages', 'objectsNodeName' => 'languages',
); );
protected $translationsFilesAndVars = array(
'fields' => '_FIELDS',
'errors' => '_ERRORS',
'admin' => '_LANGADM',
'pdf' => '_LANGPDF',
);
public function __construct($id = NULL, $id_lang = NULL) public function __construct($id = NULL, $id_lang = NULL)
{ {
parent::__construct($id); parent::__construct($id);
@@ -79,25 +86,53 @@ class LanguageCore extends ObjectModel
return $fields; return $fields;
} }
/**
* Generate traslations files
*
*/
private function _generateFiles($newIso){
$iso_code = $newIso?$newIso:$this->iso_code;
if (!file_exists(_PS_TRANSLATIONS_DIR_.$iso_code))
mkdir(_PS_TRANSLATIONS_DIR_.$iso_code);
foreach ($this->translationsFilesAndVars as $file => $var)
if (!file_exists(_PS_TRANSLATIONS_DIR_.$iso_code.'/'.$file.'.php'))
file_put_contents(_PS_TRANSLATIONS_DIR_.$iso_code.'/'.$file.'.php', '<?php
global $'.$var.';
$'.$var.' = array();
?>');
}
/**
* Move translations files after editiing language iso code
*/
public function moveToIso($newIso)
{
if($newIso == $this->iso_code)
return true;
if (file_exists(_PS_TRANSLATIONS_DIR_.$this->iso_code))
rename(_PS_TRANSLATIONS_DIR_.$this->iso_code, _PS_TRANSLATIONS_DIR_.$newIso);
if (file_exists(_PS_MAIL_DIR_.$this->iso_code))
rename(_PS_MAIL_DIR_.$this->iso_code, _PS_MAIL_DIR_.$newIso);
foreach (Module::getModulesDirOnDisk() as $moduleDir) {
if (file_exists(_PS_MODULE_DIR_.$moduleDir.'/mails/'.$this->iso_code))
rename(_PS_MODULE_DIR_.$moduleDir.'/mails/'.$this->iso_code, _PS_MODULE_DIR_.$moduleDir.'/mails/'.$newIso);
if (file_exists(_PS_MODULE_DIR_.$moduleDir.'/'.$this->iso_code.'.php'))
rename(_PS_MODULE_DIR_.$moduleDir.'/'.$this->iso_code.'.php', _PS_MODULE_DIR_.$moduleDir.'/'.$newIso.'.php');
}
}
public function add($autodate = true, $nullValues = false) public function add($autodate = true, $nullValues = false)
{ {
if (!parent::add($autodate)) if (!parent::add($autodate))
return false; return false;
$translationsFiles = array( // create empty files if they not exists
'fields' => '_FIELDS', $this->_generateFiles();
'errors' => '_ERRORS',
'admin' => '_LANGADM',
'pdf' => '_LANGPDF',
);
if (!file_exists(_PS_TRANSLATIONS_DIR_.$this->iso_code))
mkdir(_PS_TRANSLATIONS_DIR_.$this->iso_code);
foreach ($translationsFiles as $file => $var)
if (!file_exists(_PS_TRANSLATIONS_DIR_.$this->iso_code.'/'.$file.'.php'))
file_put_contents(_PS_TRANSLATIONS_DIR_.$this->iso_code.'/'.$file.'.php', '<?php
global $'.$var.';
$'.$var.' = array();
?>');
$resUpdateSQL = $this->loadUpdateSQL(); $resUpdateSQL = $this->loadUpdateSQL();
// If url_rewrite is not enabled, we don't need to regenerate .htaccess // If url_rewrite is not enabled, we don't need to regenerate .htaccess
@@ -565,6 +600,8 @@ class LanguageCore extends ObjectModel
public function update($nullValues = false) public function update($nullValues = false)
{ {
if (!parent::update($nullValues)) if (!parent::update($nullValues))
return false; return false;
+1 -1
View File
@@ -347,7 +347,7 @@ class LocalizationPackCore
{ {
if ($lang_pack = Tools::jsonDecode(Tools::file_get_contents('http://www.prestashop.com/download/lang_packs/get_language_pack.php?version='._PS_VERSION_.'&iso_lang='.$attributes['iso_code']))) if ($lang_pack = Tools::jsonDecode(Tools::file_get_contents('http://www.prestashop.com/download/lang_packs/get_language_pack.php?version='._PS_VERSION_.'&iso_lang='.$attributes['iso_code'])))
{ {
if ($content = file_get_contents('http://www.prestashop.com/download/lang_packs/gzip/'.$lang_pack->version.'/'.$attributes['iso_code'].'.gzip')) if ($content = Tools::file_get_contents('http://www.prestashop.com/download/lang_packs/gzip/'.$lang_pack->version.'/'.$attributes['iso_code'].'.gzip'))
{ {
$file = _PS_TRANSLATIONS_DIR_.$attributes['iso_code'].'.gzip'; $file = _PS_TRANSLATIONS_DIR_.$attributes['iso_code'].'.gzip';
if (file_put_contents($file, $content)) if (file_put_contents($file, $content))
+4 -1
View File
@@ -296,7 +296,7 @@ abstract class PaymentModuleCore extends Module
$shrunk = false; $shrunk = false;
foreach ($discounts AS $discount) foreach ($discounts AS $discount)
{ {
$objDiscount = new Discount((int)$discount['id_discount'], $order->id_lang); $objDiscount = new Discount((int)$discount['id_discount']);
$value = $objDiscount->getValue(sizeof($discounts), $cart->getOrderTotal(true, Cart::ONLY_PRODUCTS), $order->total_shipping, $cart->id); $value = $objDiscount->getValue(sizeof($discounts), $cart->getOrderTotal(true, Cart::ONLY_PRODUCTS), $order->total_shipping, $cart->id);
if ($objDiscount->id_discount_type == 2 AND in_array($objDiscount->behavior_not_exhausted, array(1,2))) if ($objDiscount->id_discount_type == 2 AND in_array($objDiscount->behavior_not_exhausted, array(1,2)))
$shrunk = true; $shrunk = true;
@@ -314,6 +314,9 @@ abstract class PaymentModuleCore extends Module
$voucher->add(); $voucher->add();
$params['{voucher_amount}'] = Tools::displayPrice($voucher->value, $currency, false); $params['{voucher_amount}'] = Tools::displayPrice($voucher->value, $currency, false);
$params['{voucher_num}'] = $voucher->name; $params['{voucher_num}'] = $voucher->name;
$params['{firstname}'] = $customer->firstname;
$params['{lastname}'] = $customer->lastname;
$params['{id_order}'] = $order->id;
@Mail::Send((int)$order->id_lang, 'voucher', Mail::l('New voucher regarding your order #').$order->id, $params, $customer->email, $customer->firstname.' '.$customer->lastname); @Mail::Send((int)$order->id_lang, 'voucher', Mail::l('New voucher regarding your order #').$order->id, $params, $customer->email, $customer->firstname.' '.$customer->lastname);
} }
} }
+5 -14
View File
@@ -686,7 +686,7 @@ class ProductCore extends ObjectModel
if (!$this->addToCategories($categories)) if (!$this->addToCategories($categories))
return false; return false;
if (!$this->setGroupReduction($categories)) if (!$this->setGroupReduction())
return false; return false;
return true; return true;
@@ -3427,26 +3427,17 @@ class ProductCore extends ObjectModel
/** /**
* Set Group reduction if needed * Set Group reduction if needed
* @param string $productCategories Categories the product belongs to
*/ */
public function setGroupReduction($categories) public function setGroupReduction()
{ {
if (sizeof($categories) > 1) // Use category_default id if more than 1 category $row = GroupReduction::getGroupByCategoryId($this->id_category_default);
$row = GroupReduction::getGroupByCategoryId((int)$this->id_category_default); if (!$row) // Remove
else
$row = GroupReduction::getGroupByCategoryId((int)array_pop($categories));
if (!$row)
{ {
// Then Remove
if (!GroupReduction::deleteProductReduction($this->id)) if (!GroupReduction::deleteProductReduction($this->id))
return false; return false;
} }
else else if (!GroupReduction::setProductReduction($this->id, $row['id_group'], $this->id_category_default, (float)$row['reduction']))
{
if (!GroupReduction::setProductReduction($this->id, $row['id_group'], $category, $row['reduction'])) // Add or Edit
return false; return false;
}
return true; return true;
} }
} }
Binary file not shown.

After

Width:  |  Height:  |  Size: 126 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 2.4 KiB

+8 -8
View File
@@ -433,13 +433,13 @@ if ($lm->getIncludeTradFilename())
<h3 id="resultConfig"></h3> <h3 id="resultConfig"></h3>
<ul id="required"> <ul id="required">
<li class="title"><?php echo lang('PHP parameters:')?></li> <li class="title"><?php echo lang('PHP parameters:')?></li>
<li class="required"><?php echo lang('PHP 5.0 or later installed')?></li> <li class="required first"><?php echo lang('PHP 5.0 or later installed')?></li>
<li class="required"><?php echo lang('File upload allowed')?></li> <li class="required"><?php echo lang('File upload allowed')?></li>
<li class="required"><?php echo lang('Create new files and folders allowed')?></li> <li class="required"><?php echo lang('Create new files and folders allowed')?></li>
<li class="required"><?php echo lang('GD Library installed')?></li> <li class="required"><?php echo lang('GD Library installed')?></li>
<li class="required"><?php echo lang('MySQL support is on')?></li> <li class="required"><?php echo lang('MySQL support is on')?></li>
<li class="title"><?php echo lang('Write permissions on files and folders:')?></li> <li class="title"><?php echo lang('Write permissions on files and folders:')?></li>
<li class="required">/config</li> <li class="required first">/config</li>
<li class="required">/tools/smarty/compile</li> <li class="required">/tools/smarty/compile</li>
<li class="required">/tools/smarty/cache</li> <li class="required">/tools/smarty/cache</li>
<li class="required">/tools/smarty_v2/compile</li> <li class="required">/tools/smarty_v2/compile</li>
@@ -447,7 +447,7 @@ if ($lm->getIncludeTradFilename())
<li class="required">/sitemap.xml</li> <li class="required">/sitemap.xml</li>
<li class="required">/log</li> <li class="required">/log</li>
<li class="title"><?php echo lang('Write permissions on folders (and subfolders):')?></li> <li class="title"><?php echo lang('Write permissions on folders (and subfolders):')?></li>
<li class="required">/img</li> <li class="required first">/img</li>
<li class="required">/mails</li> <li class="required">/mails</li>
<li class="required">/modules</li> <li class="required">/modules</li>
<li class="required">/themes/prestashop/lang</li> <li class="required">/themes/prestashop/lang</li>
@@ -519,7 +519,7 @@ if ($lm->getIncludeTradFilename())
<p class="aligned"> <p class="aligned">
<input id="btTestDB" class="button" type="submit" value="<?php echo lang('Verify now!')?>"/> <input id="btTestDB" class="button" type="submit" value="<?php echo lang('Verify now!')?>"/>
</p> </p>
<p id="dbResultCheck"></p> <p id="dbResultCheck" style="display:none;"></p>
</form> </form>
</div> </div>
@@ -802,7 +802,7 @@ if ($lm->getIncludeTradFilename())
echo ' echo '
<table cellpadding="0" callspacing="0" border="0" class="moduleTable"> <table cellpadding="0" callspacing="0" border="0" class="moduleTable">
<tr> <tr>
<td valign="top" style="text-align: center; padding-top:10px; width: 30px; background: #FFF;"> <td valign="top" style="text-align: center; padding-top:10px; width: 30px;">
<span style="padding: 12px 4px 6px 2px;"> <span style="padding: 12px 4px 6px 2px;">
<input type="checkbox" id="preInstallModules_'.$country_iso_code.'_'.$module.'" value="'.$module.'" class="'.$module.' preInstallModules_'.$country_iso_code.'" style="vertical-align: middle;" /> <input type="checkbox" id="preInstallModules_'.$country_iso_code.'_'.$module.'" value="'.$module.'" class="'.$module.' preInstallModules_'.$country_iso_code.'" style="vertical-align: middle;" />
</span> </span>
@@ -1214,13 +1214,13 @@ if ($lm->getIncludeTradFilename())
<h3 id="resultConfig_update"></h3> <h3 id="resultConfig_update"></h3>
<ul id="required_update"> <ul id="required_update">
<li class="title"><?php echo lang('PHP parameters:')?></li> <li class="title"><?php echo lang('PHP parameters:')?></li>
<li class="required"><?php echo lang('PHP 5.0 or later installed')?></li> <li class="required first"><?php echo lang('PHP 5.0 or later installed')?></li>
<li class="required"><?php echo lang('File upload allowed')?></li> <li class="required"><?php echo lang('File upload allowed')?></li>
<li class="required"><?php echo lang('Create new files and folders allowed')?></li> <li class="required"><?php echo lang('Create new files and folders allowed')?></li>
<li class="required"><?php echo lang('GD Library installed')?></li> <li class="required"><?php echo lang('GD Library installed')?></li>
<li class="required"><?php echo lang('MySQL support is on')?></li> <li class="required"><?php echo lang('MySQL support is on')?></li>
<li class="title"><?php echo lang('Write permissions on folders:')?></li> <li class="title"><?php echo lang('Write permissions on folders:')?></li>
<li class="required">/config</li> <li class="required first">/config</li>
<li class="required">/tools/smarty/compile</li> <li class="required">/tools/smarty/compile</li>
<li class="required">/tools/smarty/cache</li> <li class="required">/tools/smarty/cache</li>
<li class="required">/tools/smarty_v2/compile</li> <li class="required">/tools/smarty_v2/compile</li>
@@ -1228,7 +1228,7 @@ if ($lm->getIncludeTradFilename())
<li class="required">/sitemap.xml</li> <li class="required">/sitemap.xml</li>
<li class="required">/log</li> <li class="required">/log</li>
<li class="title"><?php echo lang('Write permissions on folders (and subfolders):')?></li> <li class="title"><?php echo lang('Write permissions on folders (and subfolders):')?></li>
<li class="required">/img</li> <li class="required first">/img</li>
<li class="required">/mails</li> <li class="required">/mails</li>
<li class="required">/modules</li> <li class="required">/modules</li>
<li class="required">/themes/prestashop/lang</li> <li class="required">/themes/prestashop/lang</li>
+27 -11
View File
@@ -203,7 +203,7 @@ select {
div.field { div.field {
padding:10px 0; padding:10px 0;
border-bottom:1px solid #ccc; background:url(img/bg_field.png) repeat-x 0 100% transparent;
} }
div.field label { div.field label {
display:inline-block; display:inline-block;
@@ -220,10 +220,13 @@ div.field {
display:inline-block; display:inline-block;
width:200px; width:200px;
font-size:11px; font-size:11px;
font-family:Georgia;
font-style:italic; font-style:italic;
color:#999; color:#999;
} }
#uploadedImage {border:1px solid #ccc;}
.okBlock { .okBlock {
padding:20px 20px 20px 38px; padding:20px 20px 20px 38px;
background:#b7e2a7 url(img/pict_ok.png) no-repeat 15px 21px; background:#b7e2a7 url(img/pict_ok.png) no-repeat 15px 21px;
@@ -376,11 +379,13 @@ ul#footer a:link, ul#footer a:active, ul#footer a:visited {
} }
.sheet .contentTitle .stepList li { .sheet .contentTitle .stepList li {
float:left; float:left;
margin:0 0 0 5px;
height:42px; height:42px;
width:42px; width:42px;
text-indent:-5000px; text-indent:-5000px;
background:transparent url(img/bg_li_stepList.png) no-repeat 0 0; background:transparent url(img/bg_li_stepList.png) no-repeat 0 0;
} }
.sheet .contentTitle .stepList li.ok {background-position:0 -50px;} .sheet .contentTitle .stepList li.ok {background-position:0 -50px;}
.sheet .contentTitle .stepList li.ko {background-position:0 -100px;} .sheet .contentTitle .stepList li.ko {background-position:0 -100px;}
.sheet .contentTitle h1 {text-shadow:0 1px 0 #fff;} .sheet .contentTitle h1 {text-shadow:0 1px 0 #fff;}
@@ -409,16 +414,21 @@ ul#langList {list-style-type:none;}
}*/ }*/
ul#required, ul#required,
ul#optional {list-style-type:none;} ul#optional {
list-style-type: none;
margin: 0;
}
ul#required li, ul#required li,
ul#optional li { ul#optional li {
padding:6px 8px 4px 8px; padding:6px 8px 4px 8px;
font-size:12px;
background:#f8f8f8; background:#f8f8f8;
} }
ul#required li.title, ul#required li.title,
ul#optional li.title { ul#optional li.title {
margin-top: 20px; margin-top: 20px;
padding:4px 8px; padding:4px 8px;
font-size:13px;
background:#f8f8f8 url(img/bg_li_title.png) repeat-x 0 0; background:#f8f8f8 url(img/bg_li_title.png) repeat-x 0 0;
} }
ul#required li.required , ul#required li.required ,
@@ -428,11 +438,11 @@ ul#optional {list-style-type:none;}
} }
ul#required li.ok, ul#required li.ok,
ul#optional li.ok{ ul#optional li.ok{
background:#f8f8f8 url(img/pict_ok.png) no-repeat 100% 10px; background:#f8f8f8 url(img/pict_ok.png) no-repeat 99% 10px
} }
ul#required li.fail, ul#required li.fail,
ul#optional li.fail { ul#optional li.fail {
background:#f8f8f8 url(img/pict_error.png) no-repeat 100% 8px; background:#f8f8f8 url(img/pict_error.png) no-repeat 99% 8px;
} }
/* ETAPE 3 - DB ************************************************************* */ /* ETAPE 3 - DB ************************************************************* */
@@ -443,15 +453,22 @@ ul#optional {list-style-type:none;}
#formCheckSQL p, #formCheckSQL p,
#mailSMTPParam p { #mailSMTPParam p {
/*
USELESS
padding:10px 0; padding:10px 0;
border-top:1px solid #fff; background:url(img/bg_field.png) repeat-x 0 100% transparent;
border-bottom:1px solid #ccc;*/
} }
#formCheckSQL p.first {border-top:none;} #formCheckSQL p.first {border-top:none;}
#formCheckSQL p.last {border-bottom:none;} #formCheckSQL p.last {border-bottom:none;}
/*USELESS #formCheckSQL p#dbResultCheck {border:none;}*/ #formCheckSQL p#dbResultCheck {background:none;}
#formCheckSQL p#dbResultCheck.errorBlock {
background: url("img/pict_error.png") no-repeat scroll 15px 21px #FFEBE8;
border: 1px solid #CC0000;
padding: 20px 20px 20px 38px;
}
#formCheckSQL p#dbResultCheck.okBlock {
padding:20px 20px 20px 38px;
background:#b7e2a7 url(img/pict_ok.png) no-repeat 15px 21px;
border:1px solid #85c10c;
}
#formCheckSQL p label, #formCheckSQL p label,
#mailSMTPParam p label { #mailSMTPParam p label {
display:inline-block; display:inline-block;
@@ -477,7 +494,7 @@ ul#optional {list-style-type:none;}
#mailPart .userInfos { #mailPart .userInfos {
padding-left:18px; padding-left:18px;
font: 11px Georgia, Arial, Sans-serif italic; font:italic 11px Georgia, Arial, Sans-serif italic;
color:#999; color:#999;
} }
@@ -509,7 +526,6 @@ ul#optional {list-style-type:none;}
.moduleTable { .moduleTable {
padding: 5px; padding: 5px;
width: 650px; width: 650px;
background:#fff;
border: 1px solid #CCC; border: 1px solid #CCC;
border-bottom:none; border-bottom:none;
} }
+1 -1
View File
@@ -25,7 +25,7 @@
* International Registered Trademark & Property of PrestaShop SA * International Registered Trademark & Property of PrestaShop SA
*/ */
if (!defined('_CAN_LOAD_FILES_')) if (!defined('_PS_VERSION_'))
exit; exit;
class authorizeAIM extends PaymentModule class authorizeAIM extends PaymentModule
+1 -1
View File
@@ -25,7 +25,7 @@
* International Registered Trademark & Property of PrestaShop SA * International Registered Trademark & Property of PrestaShop SA
*/ */
if (!defined('_CAN_LOAD_FILES_')) if (!defined('_PS_VERSION_'))
exit; exit;
class BankWire extends PaymentModule class BankWire extends PaymentModule
+1 -1
View File
@@ -25,7 +25,7 @@
* International Registered Trademark & Property of PrestaShop SA * International Registered Trademark & Property of PrestaShop SA
*/ */
if (!defined('_CAN_LOAD_FILES_')) if (!defined('_PS_VERSION_'))
exit; exit;
class BirthdayPresent extends Module class BirthdayPresent extends Module
@@ -25,7 +25,7 @@
* International Registered Trademark & Property of PrestaShop SA * International Registered Trademark & Property of PrestaShop SA
*/ */
if (!defined('_CAN_LOAD_FILES_')) if (!defined('_PS_VERSION_'))
exit; exit;
class BlockAdvertising extends Module class BlockAdvertising extends Module
@@ -25,7 +25,7 @@
* International Registered Trademark & Property of PrestaShop SA * International Registered Trademark & Property of PrestaShop SA
*/ */
if (!defined('_CAN_LOAD_FILES_')) if (!defined('_PS_VERSION_'))
exit; exit;
class BlockBestSellers extends Module class BlockBestSellers extends Module
+1 -1
View File
@@ -25,7 +25,7 @@
* International Registered Trademark & Property of PrestaShop SA * International Registered Trademark & Property of PrestaShop SA
*/ */
if (!defined('_CAN_LOAD_FILES_')) if (!defined('_PS_VERSION_'))
exit; exit;
class BlockCart extends Module class BlockCart extends Module
+1 -1
View File
@@ -25,7 +25,7 @@
* International Registered Trademark & Property of PrestaShop SA * International Registered Trademark & Property of PrestaShop SA
*/ */
if (!defined('_CAN_LOAD_FILES_')) if (!defined('_PS_VERSION_'))
exit; exit;
class BlockCategories extends Module class BlockCategories extends Module
+14 -1
View File
@@ -24,7 +24,8 @@
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA * International Registered Trademark & Property of PrestaShop SA
*/ */
if (!defined('_CAN_LOAD_FILES_'))
if (!defined('_PS_VERSION_'))
exit; exit;
class BlockCms extends Module class BlockCms extends Module
@@ -110,8 +111,14 @@ class BlockCms extends Module
LEFT JOIN `'._DB_PREFIX_.'cms_block_lang` cbl ON (cbl.`id_cms_block` = cb.`id_cms_block`) LEFT JOIN `'._DB_PREFIX_.'cms_block_lang` cbl ON (cbl.`id_cms_block` = cb.`id_cms_block`)
WHERE cb.`id_cms_block` = '.(int)$id_cms_block); WHERE cb.`id_cms_block` = '.(int)$id_cms_block);
$store_display_update = array(0, $size = count($cmsBlocks), $display = Configuration::get('PS_STORES_DISPLAY_FOOTER'));
foreach ($cmsBlocks AS $cmsBlock) foreach ($cmsBlocks AS $cmsBlock)
{
$cmsBlocks['name'][(int)$cmsBlock['id_lang']] = $cmsBlock['name']; $cmsBlocks['name'][(int)$cmsBlock['id_lang']] = $cmsBlock['name'];
if ($store_display_update['0'] < $store_display_update['1'])
$cmsBlocks[$store_display_update['0']]['display_store'] = $store_display_update['2'];
++$store_display_update['0'];
}
return $cmsBlocks; return $cmsBlocks;
} }
@@ -589,6 +596,10 @@ class BlockCms extends Module
INSERT INTO `'._DB_PREFIX_.'cms_block_lang` (`id_cms_block`, `id_lang`, `name`) INSERT INTO `'._DB_PREFIX_.'cms_block_lang` (`id_cms_block`, `id_lang`, `name`)
VALUES('.(int)$id_cms_block.', '.(int)$language['id_lang'].', VALUES('.(int)$id_cms_block.', '.(int)$language['id_lang'].',
"'.pSQL(Tools::getValue('block_name_'.$language['id_lang'])).'")'); "'.pSQL(Tools::getValue('block_name_'.$language['id_lang'])).'")');
Db::getInstance()->Execute('
UPDATE `'._DB_PREFIX_.'cms_block
SET `display_store` = '.Configuration::get('PS_STORES_DISPLAY_FOOTER'));
} }
elseif (Tools::isSubmit('editBlockCMS')) elseif (Tools::isSubmit('editBlockCMS'))
{ {
@@ -619,6 +630,8 @@ class BlockCms extends Module
`display_store` = '.(int)(Tools::getValue('PS_STORES_DISPLAY_CMS')).' `display_store` = '.(int)(Tools::getValue('PS_STORES_DISPLAY_CMS')).'
WHERE `id_cms_block` = '.(int)($id_cms_block)); WHERE `id_cms_block` = '.(int)($id_cms_block));
Configuration::updateValue('PS_STORES_DISPLAY_FOOTER', (int)(Tools::getValue('PS_STORES_DISPLAY_CMS')));
foreach ($languages as $language) foreach ($languages as $language)
Db::getInstance()->Execute(' Db::getInstance()->Execute('
UPDATE `'._DB_PREFIX_.'cms_block_lang` UPDATE `'._DB_PREFIX_.'cms_block_lang`
+1 -1
View File
@@ -25,7 +25,7 @@
* International Registered Trademark & Property of PrestaShop SA * International Registered Trademark & Property of PrestaShop SA
*/ */
if (!defined('_CAN_LOAD_FILES_')) if (!defined('_PS_VERSION_'))
exit; exit;
class BlockCurrencies extends Module class BlockCurrencies extends Module
@@ -25,7 +25,7 @@
* International Registered Trademark & Property of PrestaShop SA * International Registered Trademark & Property of PrestaShop SA
*/ */
if (!defined('_CAN_LOAD_FILES_')) if (!defined('_PS_VERSION_'))
exit; exit;
class blockcustomerprivacy extends Module class blockcustomerprivacy extends Module
+1 -1
View File
@@ -25,7 +25,7 @@
* International Registered Trademark & Property of PrestaShop SA * International Registered Trademark & Property of PrestaShop SA
*/ */
if (!defined('_CAN_LOAD_FILES_')) if (!defined('_PS_VERSION_'))
exit; exit;
class BlockLanguages extends Module class BlockLanguages extends Module
+1 -1
View File
@@ -170,9 +170,9 @@ function reloadContent(params_plus)
reloadContent(); reloadContent();
return false; return false;
}); });
ajaxCart.overrideButtonsInThePage();
} }
}); });
ajaxQueries.push(ajaxQuery); ajaxQueries.push(ajaxQuery);
} }
+1 -1
View File
@@ -25,7 +25,7 @@
* International Registred Trademark & Property of PrestaShop SA * International Registred Trademark & Property of PrestaShop SA
*/ */
if (!defined('_CAN_LOAD_FILES_')) if (!defined('_PS_VERSION_'))
exit; exit;
class BlockLayered extends Module class BlockLayered extends Module
+164 -147
View File
@@ -25,7 +25,7 @@
* International Registered Trademark & Property of PrestaShop SA * International Registered Trademark & Property of PrestaShop SA
*/ */
if (!defined('_CAN_LOAD_FILES_')) if (!defined('_PS_VERSION_'))
exit; exit;
class BlockLink extends Module class BlockLink extends Module
@@ -35,56 +35,56 @@ class BlockLink extends Module
public function __construct() public function __construct()
{ {
$this->name = 'blocklink'; $this->name = 'blocklink';
$this->tab = 'front_office_features'; $this->tab = 'front_office_features';
$this->version = '1.5'; $this->version = '1.5';
$this->author = 'PrestaShop'; $this->author = 'PrestaShop';
$this->need_instance = 0; $this->need_instance = 0;
parent::__construct(); parent::__construct();
$this->displayName = $this->l('Link block'); $this->displayName = $this->l('Link block');
$this->description = $this->l('Adds a block with additional links.'); $this->description = $this->l('Adds a block with additional links.');
$this->confirmUninstall = $this->l('Are you sure you want to delete all your links ?'); $this->confirmUninstall = $this->l('Are you sure you want to delete all your links ?');
} }
public function install() public function install()
{ {
if (!parent::install() OR if (!parent::install() OR
!$this->registerHook('leftColumn') OR !$this->registerHook('leftColumn') OR
!Db::getInstance()->Execute(' !Db::getInstance()->Execute('
CREATE TABLE '._DB_PREFIX_.'blocklink ( CREATE TABLE '._DB_PREFIX_.'blocklink (
`id_blocklink` int(2) NOT NULL AUTO_INCREMENT, `id_blocklink` int(2) NOT NULL AUTO_INCREMENT,
`url` varchar(255) NOT NULL, `url` varchar(255) NOT NULL,
`new_window` TINYINT(1) NOT NULL, `new_window` TINYINT(1) NOT NULL,
PRIMARY KEY(`id_blocklink`)) PRIMARY KEY(`id_blocklink`))
ENGINE='._MYSQL_ENGINE_.' default CHARSET=utf8') OR ENGINE='._MYSQL_ENGINE_.' default CHARSET=utf8') OR
!Db::getInstance()->Execute(' !Db::getInstance()->Execute('
CREATE TABLE '._DB_PREFIX_.'blocklink_lang ( CREATE TABLE '._DB_PREFIX_.'blocklink_lang (
`id_blocklink` int(2) NOT NULL, `id_blocklink` int(2) NOT NULL,
`id_lang` int(2) NOT NULL, `id_lang` int(2) NOT NULL,
`text` varchar(64) NOT NULL, `text` varchar(64) NOT NULL,
PRIMARY KEY(`id_blocklink`, `id_lang`)) PRIMARY KEY(`id_blocklink`, `id_lang`))
ENGINE='._MYSQL_ENGINE_.' default CHARSET=utf8') OR ENGINE='._MYSQL_ENGINE_.' default CHARSET=utf8') OR
!Configuration::updateValue('PS_BLOCKLINK_TITLE', array('1' => 'Block link', '2' => 'Bloc lien'))) !Configuration::updateValue('PS_BLOCKLINK_TITLE', array('1' => 'Block link', '2' => 'Bloc lien')))
return false; return false;
return true; return true;
} }
public function uninstall() public function uninstall()
{ {
if (!parent::uninstall() OR if (!parent::uninstall() OR
!Db::getInstance()->Execute('DROP TABLE '._DB_PREFIX_.'blocklink') OR !Db::getInstance()->Execute('DROP TABLE '._DB_PREFIX_.'blocklink') OR
!Db::getInstance()->Execute('DROP TABLE '._DB_PREFIX_.'blocklink_lang') OR !Db::getInstance()->Execute('DROP TABLE '._DB_PREFIX_.'blocklink_lang') OR
!Configuration::deleteByName('PS_BLOCKLINK_TITLE') OR !Configuration::deleteByName('PS_BLOCKLINK_TITLE') OR
!Configuration::deleteByName('PS_BLOCKLINK_URL')) !Configuration::deleteByName('PS_BLOCKLINK_URL'))
return false; return false;
return true; return true;
} }
public function hookLeftColumn($params) public function hookLeftColumn($params)
{ {
$links = $this->getLinks(); $links = $this->getLinks();
$this->context->smarty->assign(array( $this->context->smarty->assign(array(
'blocklink_links' => $links, 'blocklink_links' => $links,
@@ -92,7 +92,7 @@ class BlockLink extends Module
'url' => Configuration::get('PS_BLOCKLINK_URL'), 'url' => Configuration::get('PS_BLOCKLINK_URL'),
'lang' => 'text_'.$this->context->language->id 'lang' => 'text_'.$this->context->language->id
)); ));
if (!$links) if (!$links)
return false; return false;
return $this->display(__FILE__, 'blocklink.tpl'); return $this->display(__FILE__, 'blocklink.tpl');
} }
@@ -104,14 +104,14 @@ class BlockLink extends Module
public function getLinks() public function getLinks()
{ {
$result = array(); $result = array();
/* Get id and url */ /* Get id and url */
if (!$links = Db::getInstance()->ExecuteS('SELECT `id_blocklink`, `url`, `new_window` FROM '._DB_PREFIX_.'blocklink'.((int)(Configuration::get('PS_BLOCKLINK_ORDERWAY')) == 1 ? ' ORDER BY `id_blocklink` DESC' : ''))) if (!$links = Db::getInstance()->ExecuteS('SELECT `id_blocklink`, `url`, `new_window` FROM '._DB_PREFIX_.'blocklink'.((int)(Configuration::get('PS_BLOCKLINK_ORDERWAY')) == 1 ? ' ORDER BY `id_blocklink` DESC' : '')))
return false; return false;
$i = 0; $i = 0;
foreach ($links AS $link) foreach ($links AS $link)
{ {
$result[$i]['id'] = $link['id_blocklink']; $result[$i]['id'] = $link['id_blocklink'];
$result[$i]['url'] = $link['url']; $result[$i]['url'] = $link['url'];
$result[$i]['newWindow'] = $link['new_window']; $result[$i]['newWindow'] = $link['new_window'];
/* Get multilingual text */ /* Get multilingual text */
@@ -121,58 +121,58 @@ class BlockLink extends Module
$result[$i]['text_'.$text['id_lang']] = $text['text']; $result[$i]['text_'.$text['id_lang']] = $text['text'];
$i++; $i++;
} }
return $result; return $result;
} }
public function addLink() public function addLink()
{ {
/* Url registration */ /* Url registration */
if (!Db::getInstance()->Execute('INSERT INTO '._DB_PREFIX_.'blocklink VALUES (NULL, \''.pSQL($_POST['url']).'\', '.((isset($_POST['newWindow']) AND $_POST['newWindow']) == 'on' ? 1 : 0).')') OR !$lastId = Db::getInstance()->Insert_ID()) if (!Db::getInstance()->Execute('INSERT INTO '._DB_PREFIX_.'blocklink VALUES (NULL, \''.pSQL($_POST['url']).'\', '.((isset($_POST['newWindow']) AND $_POST['newWindow']) == 'on' ? 1 : 0).')') OR !$lastId = Db::getInstance()->Insert_ID())
return false; return false;
/* Multilingual text */ /* Multilingual text */
$languages = Language::getLanguages(); $languages = Language::getLanguages();
$defaultLanguage = (int)(Configuration::get('PS_LANG_DEFAULT')); $defaultLanguage = (int)(Configuration::get('PS_LANG_DEFAULT'));
if (!$languages) if (!$languages)
return false; return false;
foreach ($languages AS $language) foreach ($languages AS $language)
if (!empty($_POST['text_'.$language['id_lang']])) if (!empty($_POST['text_'.$language['id_lang']]))
{ {
if (!Db::getInstance()->Execute('INSERT INTO '._DB_PREFIX_.'blocklink_lang VALUES ('.(int)($lastId).', '.(int)($language['id_lang']).', \''.pSQL($_POST['text_'.$language['id_lang']]).'\')')) if (!Db::getInstance()->Execute('INSERT INTO '._DB_PREFIX_.'blocklink_lang VALUES ('.(int)($lastId).', '.(int)($language['id_lang']).', \''.pSQL($_POST['text_'.$language['id_lang']]).'\')'))
return false; return false;
} }
else else
if (!Db::getInstance()->Execute('INSERT INTO '._DB_PREFIX_.'blocklink_lang VALUES ('.(int)($lastId).', '.(int)($language['id_lang']).', \''.pSQL($_POST['text_'.$defaultLanguage]).'\')')) if (!Db::getInstance()->Execute('INSERT INTO '._DB_PREFIX_.'blocklink_lang VALUES ('.(int)($lastId).', '.(int)($language['id_lang']).', \''.pSQL($_POST['text_'.$defaultLanguage]).'\')'))
return false; return false;
return true; return true;
} }
public function updateLink() public function updateLink()
{ {
/* Url registration */ /* Url registration */
if (!Db::getInstance()->Execute('UPDATE '._DB_PREFIX_.'blocklink SET `url`=\''.pSQL($_POST['url']).'\', `new_window`='.(isset($_POST['newWindow']) ? 1 : 0).' WHERE `id_blocklink`='.(int)($_POST['id']))) if (!Db::getInstance()->Execute('UPDATE '._DB_PREFIX_.'blocklink SET `url`=\''.pSQL($_POST['url']).'\', `new_window`='.(isset($_POST['newWindow']) ? 1 : 0).' WHERE `id_blocklink`='.(int)($_POST['id'])))
return false; return false;
/* Multilingual text */ /* Multilingual text */
$languages = Language::getLanguages(); $languages = Language::getLanguages();
$defaultLanguage = (int)(Configuration::get('PS_LANG_DEFAULT')); $defaultLanguage = (int)(Configuration::get('PS_LANG_DEFAULT'));
if (!$languages) if (!$languages)
return false; return false;
if (!Db::getInstance()->Execute('DELETE FROM '._DB_PREFIX_.'blocklink_lang WHERE `id_blocklink` = '.(int)($_POST['id']))) if (!Db::getInstance()->Execute('DELETE FROM '._DB_PREFIX_.'blocklink_lang WHERE `id_blocklink` = '.(int)($_POST['id'])))
return false ; return false ;
foreach ($languages AS $language) foreach ($languages AS $language)
if (!empty($_POST['text_'.$language['id_lang']])) if (!empty($_POST['text_'.$language['id_lang']]))
{ {
if (!Db::getInstance()->Execute('INSERT INTO '._DB_PREFIX_.'blocklink_lang VALUES ('.(int)($_POST['id']).', '.(int)($language['id_lang']).', \''.pSQL($_POST['text_'.$language['id_lang']]).'\')')) if (!Db::getInstance()->Execute('INSERT INTO '._DB_PREFIX_.'blocklink_lang VALUES ('.(int)($_POST['id']).', '.(int)($language['id_lang']).', \''.pSQL($_POST['text_'.$language['id_lang']]).'\')'))
return false; return false;
} }
else else
if (!Db::getInstance()->Execute('INSERT INTO '._DB_PREFIX_.'blocklink_lang VALUES ('.(int)($_POST['id']).', '.$language['id_lang'].', \''.pSQL($_POST['text_'.$defaultLanguage]).'\')')) if (!Db::getInstance()->Execute('INSERT INTO '._DB_PREFIX_.'blocklink_lang VALUES ('.(int)($_POST['id']).', '.$language['id_lang'].', \''.pSQL($_POST['text_'.$defaultLanguage]).'\')'))
return false; return false;
return true; return true;
} }
public function deleteLink() public function deleteLink()
{ {
return Db::getInstance()->Execute('DELETE FROM '._DB_PREFIX_.'blocklink WHERE `id_blocklink`='.(int)($_GET['id'])); return Db::getInstance()->Execute('DELETE FROM '._DB_PREFIX_.'blocklink WHERE `id_blocklink`='.(int)($_GET['id']));
} }
public function updateTitle() public function updateTitle()
@@ -181,92 +181,98 @@ class BlockLink extends Module
$result = array(); $result = array();
foreach ($languages AS $language) foreach ($languages AS $language)
$result[$language['id_lang']] = $_POST['title_'.$language['id_lang']]; $result[$language['id_lang']] = $_POST['title_'.$language['id_lang']];
if (!Configuration::updateValue('PS_BLOCKLINK_TITLE', $result)) if (!Configuration::updateValue('PS_BLOCKLINK_TITLE', $result))
return false; return false;
return Configuration::updateValue('PS_BLOCKLINK_URL', $_POST['title_url']); return Configuration::updateValue('PS_BLOCKLINK_URL', $_POST['title_url']);
} }
public function getContent() public function getContent()
{ {
$this->_html = '<h2>'.$this->displayName.'</h2> $this->_html = '<h2>'.$this->displayName.'</h2>
<script type="text/javascript" src="'.$this->_path.'blocklink.js"></script>'; <script type="text/javascript" src="'.$this->_path.'blocklink.js"></script>';
/* Add a link */ /* Add a link */
if (isset($_POST['submitLinkAdd'])) if (isset($_POST['submitLinkAdd']))
{ {
if (empty($_POST['text_'.Configuration::get('PS_LANG_DEFAULT')]) OR empty($_POST['url'])) if (empty($_POST['text_'.Configuration::get('PS_LANG_DEFAULT')]) OR empty($_POST['url']))
$this->_html .= $this->displayError($this->l('You must fill in all fields')); $this->_html .= $this->displayError($this->l('You must fill in all fields'));
elseif (!Validate::isUrl(str_replace('http://', '', $_POST['url']))) elseif (!Validate::isUrl(str_replace('http://', '', $_POST['url'])))
$this->_html .= $this->displayError($this->l('Bad URL')); $this->_html .= $this->displayError($this->l('Bad URL'));
else else
if ($this->addLink()) if ($this->addLink())
$this->_html .= $this->displayConfirmation($this->l('The link has been added.')); $this->_html .= $this->displayConfirmation($this->l('The link has been added.'));
else else
$this->_html .= $this->displayError($this->l('An error occurred during link creation.')); $this->_html .= $this->displayError($this->l('An error occurred during link creation.'));
} }
/* Update a link */ /* Update a link */
elseif (isset($_POST['submitLinkUpdate'])) elseif (isset($_POST['submitLinkUpdate']))
{
if (empty($_POST['text_'.Configuration::get('PS_LANG_DEFAULT')]) OR empty($_POST['url']))
$this->_html .= $this->displayError($this->l('You must fill in all fields'));
elseif (!Validate::isUrl(str_replace('http://', '', $_POST['url'])))
$this->_html .= $this->displayError($this->l('Bad URL'));
else
if (empty($_POST['id']) OR !is_numeric($_POST['id']) OR !$this->updateLink())
$this->_html .= $this->displayError($this->l('An error occurred during link updating.'));
else
$this->_html .= $this->displayConfirmation($this->l('The link has been updated.'));
}
/* Update the block title */
elseif (isset($_POST['submitTitle']))
{
if (empty($_POST['title_'.Configuration::get('PS_LANG_DEFAULT')]))
$this->_html .= $this->displayError($this->l('"title" field cannot be empty.'));
elseif (!empty($_POST['title_url']) AND !Validate::isUrl(str_replace('http://', '', $_POST['title_url'])))
$this->_html .= $this->displayError($this->l('The \'title\' field is invalid'));
elseif (!Validate::isGenericName($_POST['title_'.Configuration::get('PS_LANG_DEFAULT')]))
$this->_html .= $this->displayError($this->l('The \'title\' field is invalid'));
elseif (!$this->updateTitle())
$this->_html .= $this->displayError($this->l('An error occurred during title updating.'));
else
$this->_html .= $this->displayConfirmation($this->l('The block title has been updated.'));
}
/* Delete a link*/
elseif (isset($_GET['id']))
{
if (!is_numeric($_GET['id']) OR !$this->deleteLink())
$this->_html .= $this->displayError($this->l('An error occurred during link deletion.'));
else
$this->_html .= $this->displayConfirmation($this->l('The link has been deleted.'));
}
if (isset($_POST['submitOrderWay']))
{ {
if (Configuration::updateValue('PS_BLOCKLINK_ORDERWAY', (int)Tools::getValue('orderWay')))
if (empty($_POST['text_'.Configuration::get('PS_LANG_DEFAULT')]) OR empty($_POST['url']))
$this->_html .= $this->displayError($this->l('You must fill in all fields'));
elseif (!Validate::isUrl(str_replace('http://', '', $_POST['url'])))
$this->_html .= $this->displayError($this->l('Bad URL'));
else
if (empty($_POST['id']) OR !is_numeric($_POST['id']) OR !$this->updateLink())
$this->_html .= $this->displayError($this->l('An error occurred during link updating.'));
else
$this->_html .= $this->displayConfirmation($this->l('The link has been updated.'));
}
/* Update the block title */
elseif (isset($_POST['submitTitle']))
{
if (empty($_POST['title_'.Configuration::get('PS_LANG_DEFAULT')]))
$this->_html .= $this->displayError($this->l('"title" field cannot be empty.'));
elseif (!empty($_POST['title_url']) AND !Validate::isUrl(str_replace('http://', '', $_POST['title_url'])))
$this->_html .= $this->displayError($this->l('The \'title\' field is invalid'));
elseif (!Validate::isGenericName($_POST['title_'.Configuration::get('PS_LANG_DEFAULT')]))
$this->_html .= $this->displayError($this->l('The \'title\' field is invalid'));
elseif (!$this->updateTitle())
$this->_html .= $this->displayError($this->l('An error occurred during title updating.'));
else
$this->_html .= $this->displayConfirmation($this->l('The block title has been updated.'));
}
/* Delete a link*/
elseif (isset($_GET['id']))
{
if (!is_numeric($_GET['id']) OR !$this->deleteLink())
$this->_html .= $this->displayError($this->l('An error occurred during link deletion.'));
else
$this->_html .= $this->displayConfirmation($this->l('The link has been deleted.'));
}
if (isset($_POST['submitOrderWay']))
{
if (Configuration::updateValue('PS_BLOCKLINK_ORDERWAY', (int)(Tools::getValue('orderWay'))))
$this->_html .= $this->displayConfirmation($this->l('Sort order updated')); $this->_html .= $this->displayConfirmation($this->l('Sort order updated'));
else else
$this->_html .= $this->displayError($this->l('An error occurred during sort order set-up.')); $this->_html .= $this->displayError($this->l('An error occurred during sort order set-up.'));
} }
$this->_displayForm(); $this->_displayForm();
$this->_list(); $this->_list();
return $this->_html; return $this->_html;
} }
private function _displayForm() private function _displayForm()
{ {
/* Language */ /* Language */
$defaultLanguage = (int)(Configuration::get('PS_LANG_DEFAULT')); $defaultLanguage = (int)(Configuration::get('PS_LANG_DEFAULT'));
$languages = Language::getLanguages(false); $languages = Language::getLanguages(false);
$divLangName = 'text¤title'; $divLangName = 'text¤title';
/* Title */ /* Title */
$title_url = Configuration::get('PS_BLOCKLINK_URL'); $title_url = Configuration::get('PS_BLOCKLINK_URL');
$this->_html .= ' $this->_html .= '
<script type="text/javascript"> <script type="text/javascript">
id_language = Number('.$defaultLanguage.'); id_language = Number('.$defaultLanguage.');
</script> </script>
<fieldset> <fieldset>
<legend><img src="'.$this->_path.'add.png" alt="" title="" /> '.$this->l('Add a new link').'</legend> <legend><img src="'.$this->_path.'add.png" alt="" title="" /> '.$this->l('Add a new link').'</legend>
<form method="post" action="'.$_SERVER['REQUEST_URI'].'"> <form method="post" action="'.$_SERVER['REQUEST_URI'].'">
<label>'.$this->l('Text:').'</label> <label>'.$this->l('Text:').'</label>
@@ -287,7 +293,7 @@ class BlockLink extends Module
<div class="margin-form"> <div class="margin-form">
<input type="hidden" name="id" id="id" value="'.($this->error AND isset($_POST['id']) ? $_POST['id'] : '').'" /> <input type="hidden" name="id" id="id" value="'.($this->error AND isset($_POST['id']) ? $_POST['id'] : '').'" />
<input type="submit" class="button" name="submitLinkAdd" value="'.$this->l('Add this link').'" /> <input type="submit" class="button" name="submitLinkAdd" value="'.$this->l('Add this link').'" />
<input type="submit" class="button disable" name="submitLinkUpdate" value="'.$this->l('Edit this link').'" disabled="disabled" id="submitLinkUpdate" /> <input type="submit" class="button disable" name="submitLinkUpdate" value="'.$this->l('Edit this link').'" id="submitLinkUpdate" />
</div> </div>
</form> </form>
</fieldset> </fieldset>
@@ -327,29 +333,29 @@ class BlockLink extends Module
private function _list() private function _list()
{ {
$links = $this->getLinks(); $links = $this->getLinks();
$languages = Language::getLanguages(); $languages = Language::getLanguages();
if ($links) if ($links)
{ {
$this->_html .= ' $this->_html .= '
<script type="text/javascript"> <script type="text/javascript">
var currentUrl = \''.AdminTab::$currentIndex.'&configure='.$this->name.'\'; var currentUrl = \''.AdminTab::$currentIndex.'&configure='.$this->name.'\';
var token=\''.Tools::getValue('token').'\'; var token=\''.Tools::getValue('token').'\';
var links = new Array();'; var links = new Array();';
foreach ($links AS $link) foreach ($links AS $link)
{ {
$this->_html .= 'links['.$link['id'].'] = new Array(\''.addslashes($link['url']).'\', '.$link['newWindow']; $this->_html .= 'links['.$link['id'].'] = new Array(\''.addslashes($link['url']).'\', '.$link['newWindow'];
foreach ($languages AS $language) foreach ($languages AS $language)
if (isset($link['text_'.$language['id_lang']])) if (isset($link['text_'.$language['id_lang']]))
$this->_html .= ', \''.addslashes($link['text_'.$language['id_lang']]).'\''; $this->_html .= ', \''.addslashes($link['text_'.$language['id_lang']]).'\'';
else else
$this->_html .= ', \'\''; $this->_html .= ', \'\'';
$this->_html .= ');'; $this->_html .= ');';
} }
$this->_html .= '</script>'; $this->_html .= '</script>';
} }
$this->_html .= ' $this->_html .= '
<h3 class="blue space">'.$this->l('Link list').'</h3> <h3 class="blue space">'.$this->l('Link list').'</h3>
<table class="table"> <table class="table">
<tr> <tr>
<th>'.$this->l('ID').'</th> <th>'.$this->l('ID').'</th>
@@ -375,6 +381,17 @@ class BlockLink extends Module
<img src="../img/admin/delete.gif" alt="" title="" onclick="linkDeletion('.$link['id'].')" style="cursor: pointer" /> <img src="../img/admin/delete.gif" alt="" title="" onclick="linkDeletion('.$link['id'].')" style="cursor: pointer" />
</td> </td>
</tr>'; </tr>';
$i = 0;
$nb = count($languages);
$idLng = 0;
while($i < $nb)
{
if ($languages[$i]['id_lang'] == (int)Configuration::get('PS_LANG_DEFAULT'))
{
$idLng = $i;
}
$i++;
}
$this->_html .= ' $this->_html .= '
</table> </table>
<input type="hidden" id="languageFirst" value="'.$languages[0]['id_lang'].'" /> <input type="hidden" id="languageFirst" value="'.$languages[0]['id_lang'].'" />
@@ -25,7 +25,7 @@
* International Registered Trademark & Property of PrestaShop SA * International Registered Trademark & Property of PrestaShop SA
*/ */
if (!defined('_CAN_LOAD_FILES_')) if (!defined('_PS_VERSION_'))
exit; exit;
class BlockManufacturer extends Module class BlockManufacturer extends Module
+1 -1
View File
@@ -25,7 +25,7 @@
* International Registered Trademark & Property of PrestaShop SA * International Registered Trademark & Property of PrestaShop SA
*/ */
if (!defined('_CAN_LOAD_FILES_')) if (!defined('_PS_VERSION_'))
exit; exit;
class BlockMyAccount extends Module class BlockMyAccount extends Module
@@ -25,7 +25,7 @@
* International Registered Trademark & Property of PrestaShop SA * International Registered Trademark & Property of PrestaShop SA
*/ */
if (!defined('_CAN_LOAD_FILES_')) if (!defined('_PS_VERSION_'))
exit; exit;
class BlockNewProducts extends Module class BlockNewProducts extends Module
+1 -1
View File
@@ -25,7 +25,7 @@
* International Registered Trademark & Property of PrestaShop SA * International Registered Trademark & Property of PrestaShop SA
*/ */
if (!defined('_CAN_LOAD_FILES_')) if (!defined('_PS_VERSION_'))
exit; exit;
class Blocknewsletter extends Module class Blocknewsletter extends Module
@@ -25,7 +25,7 @@
* International Registered Trademark & Property of PrestaShop SA * International Registered Trademark & Property of PrestaShop SA
*/ */
if (!defined('_CAN_LOAD_FILES_')) if (!defined('_PS_VERSION_'))
exit; exit;
class BlockPaymentLogo extends Module class BlockPaymentLogo extends Module
@@ -25,7 +25,7 @@
* International Registered Trademark & Property of PrestaShop SA * International Registered Trademark & Property of PrestaShop SA
*/ */
if (!defined('_CAN_LOAD_FILES_')) if (!defined('_PS_VERSION_'))
exit; exit;
class BlockPermanentLinks extends Module class BlockPermanentLinks extends Module
+1 -1
View File
@@ -25,7 +25,7 @@
* International Registered Trademark & Property of PrestaShop SA * International Registered Trademark & Property of PrestaShop SA
*/ */
if (!defined('_CAN_LOAD_FILES_')) if (!defined('_PS_VERSION_'))
exit; exit;
include_once(_PS_CLASS_DIR_.'../tools/pear/PEAR.php'); include_once(_PS_CLASS_DIR_.'../tools/pear/PEAR.php');
+1 -1
View File
@@ -25,7 +25,7 @@
* International Registered Trademark & Property of PrestaShop SA * International Registered Trademark & Property of PrestaShop SA
*/ */
if (!defined('_CAN_LOAD_FILES_')) if (!defined('_PS_VERSION_'))
exit; exit;
class BlockSearch extends Module class BlockSearch extends Module
+2 -1
View File
@@ -24,7 +24,8 @@
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA * International Registered Trademark & Property of PrestaShop SA
*/ */
if (!defined('_CAN_LOAD_FILES_'))
if (!defined('_PS_VERSION_'))
exit; exit;
class BlockSpecials extends Module class BlockSpecials extends Module
+1 -1
View File
@@ -25,7 +25,7 @@
* International Registered Trademark & Property of PrestaShop SA * International Registered Trademark & Property of PrestaShop SA
*/ */
if (!defined('_CAN_LOAD_FILES_')) if (!defined('_PS_VERSION_'))
exit; exit;
class BlockStore extends Module class BlockStore extends Module
+1 -1
View File
@@ -25,7 +25,7 @@
* International Registered Trademark & Property of PrestaShop SA * International Registered Trademark & Property of PrestaShop SA
*/ */
if (!defined('_CAN_LOAD_FILES_')) if (!defined('_PS_VERSION_'))
exit; exit;
class BlockSupplier extends Module class BlockSupplier extends Module
+1 -1
View File
@@ -25,7 +25,7 @@
* International Registered Trademark & Property of PrestaShop SA * International Registered Trademark & Property of PrestaShop SA
*/ */
if (!defined('_CAN_LOAD_FILES_')) if (!defined('_PS_VERSION_'))
exit; exit;
define('BLOCKTAGS_MAX_LEVEL', 3); define('BLOCKTAGS_MAX_LEVEL', 3);
+1 -1
View File
@@ -25,7 +25,7 @@
* International Registered Trademark & Property of PrestaShop SA * International Registered Trademark & Property of PrestaShop SA
*/ */
if (!defined('_CAN_LOAD_FILES_')) if (!defined('_PS_VERSION_'))
exit; exit;
class BlockUserInfo extends Module class BlockUserInfo extends Module
+1 -1
View File
@@ -25,7 +25,7 @@
* International Registered Trademark & Property of PrestaShop SA * International Registered Trademark & Property of PrestaShop SA
*/ */
if (!defined('_CAN_LOAD_FILES_')) if (!defined('_PS_VERSION_'))
exit; exit;
class BlockViewed extends Module class BlockViewed extends Module
+1 -1
View File
@@ -25,7 +25,7 @@
* International Registered Trademark & Property of PrestaShop SA * International Registered Trademark & Property of PrestaShop SA
*/ */
if (!defined('_CAN_LOAD_FILES_')) if (!defined('_PS_VERSION_'))
exit; exit;
class WishList extends ObjectModel class WishList extends ObjectModel
+1 -1
View File
@@ -25,7 +25,7 @@
* International Registered Trademark & Property of PrestaShop SA * International Registered Trademark & Property of PrestaShop SA
*/ */
if (!defined('_CAN_LOAD_FILES_')) if (!defined('_PS_VERSION_'))
exit; exit;
class BlockWishList extends Module class BlockWishList extends Module
+2 -1
View File
@@ -24,7 +24,8 @@
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA * International Registered Trademark & Property of PrestaShop SA
*/ */
if (!defined('_CAN_LOAD_FILES_'))
if (!defined('_PS_VERSION_'))
exit; exit;
class CanadaPost extends CarrierModule class CanadaPost extends CarrierModule
+1 -1
View File
@@ -25,7 +25,7 @@
* International Registered Trademark & Property of PrestaShop SA * International Registered Trademark & Property of PrestaShop SA
*/ */
if (!defined('_CAN_LOAD_FILES_')) if (!defined('_PS_VERSION_'))
exit; exit;
class CarrierCompare extends Module class CarrierCompare extends Module
+1 -1
View File
@@ -25,7 +25,7 @@
* International Registered Trademark & Property of PrestaShop SA * International Registered Trademark & Property of PrestaShop SA
*/ */
if (!defined('_CAN_LOAD_FILES_')) if (!defined('_PS_VERSION_'))
exit; exit;
class CashOnDelivery extends PaymentModule class CashOnDelivery extends PaymentModule
+2 -1
View File
@@ -24,7 +24,8 @@
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA * International Registered Trademark & Property of PrestaShop SA
*/ */
if (!defined('_CAN_LOAD_FILES_'))
if (!defined('_PS_VERSION_'))
exit; exit;
if (!in_array('PrepaidServices', get_declared_classes())) include_once(_PS_MODULE_DIR_.'cashticket/PrepaidServices.php'); if (!in_array('PrepaidServices', get_declared_classes())) include_once(_PS_MODULE_DIR_.'cashticket/PrepaidServices.php');
+1 -1
View File
@@ -25,7 +25,7 @@
* International Registered Trademark & Property of PrestaShop SA * International Registered Trademark & Property of PrestaShop SA
*/ */
if (!defined('_CAN_LOAD_FILES_')) if (!defined('_PS_VERSION_'))
exit; exit;
class Cheque extends PaymentModule class Cheque extends PaymentModule
+1 -1
View File
@@ -25,7 +25,7 @@
* International Registered Trademark & Property of PrestaShop SA * International Registered Trademark & Property of PrestaShop SA
*/ */
if (!defined('_CAN_LOAD_FILES_')) if (!defined('_PS_VERSION_'))
exit; exit;
class Criteo extends Module class Criteo extends Module
+1 -1
View File
@@ -25,7 +25,7 @@
* International Registered Trademark & Property of PrestaShop SA * International Registered Trademark & Property of PrestaShop SA
*/ */
if (!defined('_CAN_LOAD_FILES_')) if (!defined('_PS_VERSION_'))
exit; exit;
class CrossSelling extends Module class CrossSelling extends Module
+2 -1
View File
@@ -24,7 +24,8 @@
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA * International Registered Trademark & Property of PrestaShop SA
*/ */
if (!defined('_CAN_LOAD_FILES_'))
if (!defined('_PS_VERSION_'))
exit; exit;
class DateOfDelivery extends Module class DateOfDelivery extends Module
+26 -1
View File
@@ -1,6 +1,31 @@
<?php <?php
/*
* 2007-2011 PrestaShop
*
* 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 license@prestashop.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information.
*
* @author PrestaShop SA <contact@prestashop.com>
* @copyright 2007-2011 PrestaShop SA
* @version Release: $Revision$
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*/
if (!defined('_CAN_LOAD_FILES_')) if (!defined('_PS_VERSION_'))
exit; exit;
require_once(_PS_MODULE_DIR_ . "dejala/dejalaconfig.php"); require_once(_PS_MODULE_DIR_ . "dejala/dejalaconfig.php");
+3 -1
View File
@@ -5,8 +5,10 @@
* DejalaCart class, dejalacart.php * DejalaCart class, dejalacart.php
* Manage cart information related to dejala.fr carrier * Manage cart information related to dejala.fr carrier
**/ **/
if (!defined('_CAN_LOAD_FILES_'))
if (!defined('_PS_VERSION_'))
exit; exit;
class DejalaCart extends ObjectModel class DejalaCart extends ObjectModel
{ {
public $id; public $id;
+2 -1
View File
@@ -24,7 +24,8 @@
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA * International Registered Trademark & Property of PrestaShop SA
*/ */
if (!defined('_CAN_LOAD_FILES_'))
if (!defined('_PS_VERSION_'))
exit; exit;
class dibs extends PaymentModule class dibs extends PaymentModule
+100 -5
View File
@@ -89,7 +89,7 @@ class eBayRequest
$this->apiUrl = 'https://api.ebay.com/ws/api.dll'; $this->apiUrl = 'https://api.ebay.com/ws/api.dll';
$this->apiCall = $apiCall; $this->apiCall = $apiCall;
$this->compatibilityLevel = 719; $this->compatibilityLevel = 741;
$this->runame = 'Prestashop-Prestash-70a5-4-pepwa'; $this->runame = 'Prestashop-Prestash-70a5-4-pepwa';
@@ -355,7 +355,7 @@ class eBayRequest
/******************************************************************/ /******************************************************************/
/** Add Product Methods *******************************************/ /** Add / Update / End Product Methods ****************************/
/******************************************************************/ /******************************************************************/
@@ -374,7 +374,7 @@ class eBayRequest
$requestXml .= ' <ErrorLanguage>fr_FR</ErrorLanguage>'."\n"; $requestXml .= ' <ErrorLanguage>fr_FR</ErrorLanguage>'."\n";
$requestXml .= ' <WarningLevel>High</WarningLevel>'."\n"; $requestXml .= ' <WarningLevel>High</WarningLevel>'."\n";
$requestXml .= ' <Item>'."\n"; $requestXml .= ' <Item>'."\n";
$requestXml .= ' <SKU>prestashop-'.$datas['id_product'].(isset($datas['reference']) ? '-'.$datas['reference'] : '').'</SKU>'; $requestXml .= ' <SKU>prestashop-'.$datas['id_product'].'</SKU>';
$requestXml .= ' <Title>'.substr($datas['name'], 0, 55).'</Title>'."\n"; $requestXml .= ' <Title>'.substr($datas['name'], 0, 55).'</Title>'."\n";
if (isset($datas['pictures'])) if (isset($datas['pictures']))
{ {
@@ -503,7 +503,7 @@ class eBayRequest
$requestXml .= ' <WarningLevel>High</WarningLevel>'."\n"; $requestXml .= ' <WarningLevel>High</WarningLevel>'."\n";
$requestXml .= ' <Item>'."\n"; $requestXml .= ' <Item>'."\n";
$requestXml .= ' <ItemID>'.$datas['itemID'].'</ItemID>'."\n"; $requestXml .= ' <ItemID>'.$datas['itemID'].'</ItemID>'."\n";
$requestXml .= ' <SKU>prestashop-'.$datas['id_product'].(isset($datas['reference']) ? '-'.$datas['reference'] : '').'</SKU>'; $requestXml .= ' <SKU>prestashop-'.$datas['id_product'].'</SKU>';
$requestXml .= ' <Quantity>'.$datas['quantity'].'</Quantity>'."\n"; $requestXml .= ' <Quantity>'.$datas['quantity'].'</Quantity>'."\n";
$requestXml .= ' <StartPrice>'.$datas['price'].'</StartPrice>'."\n"; $requestXml .= ' <StartPrice>'.$datas['price'].'</StartPrice>'."\n";
if (Configuration::get('EBAY_SYNC_OPTION_RESYNC') != 1) if (Configuration::get('EBAY_SYNC_OPTION_RESYNC') != 1)
@@ -579,6 +579,86 @@ class eBayRequest
function endFixedPriceItem($datas = array())
{
// Check data
if (!$datas)
return false;
// Set Api Call
$this->apiCall = 'EndFixedPriceItem';
// Build the request Xml string
$requestXml = '<?xml version="1.0" encoding="utf-8"?>'."\n";
$requestXml .= '<EndFixedPriceItemRequest xmlns="urn:ebay:apis:eBLBaseComponents">'."\n";
$requestXml .= ' <ErrorLanguage>fr_FR</ErrorLanguage>'."\n";
$requestXml .= ' <WarningLevel>High</WarningLevel>'."\n";
$requestXml .= ' <ItemID>'.$datas['itemID'].'</ItemID>'."\n";
$requestXml .= ' <SKU>prestashop-'.$datas['id_product'].'</SKU>';
$requestXml .= ' <EndingReason>NotAvailable</EndingReason>'."\n";
$requestXml .= ' <RequesterCredentials>'."\n";
$requestXml .= ' <eBayAuthToken>'.Configuration::get('EBAY_API_TOKEN').'</eBayAuthToken>'."\n";
$requestXml .= ' </RequesterCredentials>'."\n";
$requestXml .= ' <WarningLevel>High</WarningLevel>'."\n";
$requestXml .= '</EndFixedPriceItemRequest>'."\n";
// Send the request and get response
$responseXml = $this->makeRequest($requestXml);
if (stristr($responseXml, 'HTTP 404') || $responseXml == '')
{
$this->error = 'Error sending '.$this->apiCall.' request';
return false;
}
// Loading XML tree in array
$this->response = simplexml_load_string($responseXml);
// Checking Errors
$this->error = '';
$this->errorCode = '';
if (isset($this->response->Errors) && isset($this->response->Ack) && (string)$this->response->Ack != 'Success' && (string)$this->response->Ack != 'Warning')
foreach ($this->response->Errors as $e)
{
// if product no longer on eBay, we log the error code
if ((int)$e->ErrorCode == 291)
$this->errorCode = (int)$e->ErrorCode;
// We log error message
if ($e->SeverityCode == 'Error')
{
if ($this->error != '')
$this->error .= '<br />';
$this->error .= (string)$e->LongMessage;
if (isset($e->ErrorParameters->Value))
$this->error .= '<br />'.(string)$e->ErrorParameters->Value;
}
}
// Checking Success
$this->itemID = 0;
if (isset($this->response->Ack) && ((string)$this->response->Ack == 'Success' || (string)$this->response->Ack == 'Warning'))
{
$this->fees = 0;
$this->itemID = (string)$this->response->ItemID;
if (isset($this->response->Fees->Fee))
foreach ($this->response->Fees->Fee as $f)
$this->fees += (float)$f->Fee;
}
elseif ($this->error == '')
$this->error = 'Sorry, technical problem, try again later.';
if (!empty($this->error))
return false;
return true;
}
@@ -653,7 +733,7 @@ class eBayRequest
foreach ($datas['variations'] as $key => $variation) foreach ($datas['variations'] as $key => $variation)
{ {
$requestXml .= ' <Variation>'."\n"; $requestXml .= ' <Variation>'."\n";
$requestXml .= ' <SKU>prestashop-'.$key.(isset($variation['reference']) ? '-'.$variation['reference'] : '').'</SKU>'."\n"; $requestXml .= ' <SKU>prestashop-'.$key.'</SKU>'."\n";
$requestXml .= ' <StartPrice>'.$variation['price'].'</StartPrice>'."\n"; $requestXml .= ' <StartPrice>'.$variation['price'].'</StartPrice>'."\n";
$requestXml .= ' <Quantity>'.$variation['quantity'].'</Quantity>'."\n"; $requestXml .= ' <Quantity>'.$variation['quantity'].'</Quantity>'."\n";
$requestXml .= ' <VariationSpecifics>'."\n"; $requestXml .= ' <VariationSpecifics>'."\n";
@@ -929,6 +1009,18 @@ class eBayRequest
} }
/******************************************************************/ /******************************************************************/
/** Order Methods *************************************************/ /** Order Methods *************************************************/
/******************************************************************/ /******************************************************************/
@@ -1068,6 +1160,9 @@ class eBayRequest
'shippingServiceCost' => (string)$order->ShippingServiceSelected->ShippingServiceCost, 'shippingServiceCost' => (string)$order->ShippingServiceSelected->ShippingServiceCost,
'email' => (string)$order->TransactionArray->Transaction[0]->Buyer->Email, 'email' => (string)$order->TransactionArray->Transaction[0]->Buyer->Email,
'product_list' => $itemList, 'product_list' => $itemList,
'payment_method' => (string)$order->CheckoutStatus->PaymentMethod,
'id_order_seller' => (string)$order->ShippingDetails->SellingManagerSalesRecordNumber,
'date_add' => substr((string)$order->CreatedTime, 0, 10).' '.substr((string)$order->CreatedTime, 11, 8),
//'object' => $order //'object' => $order
); );
} }
+33 -3
View File
@@ -25,6 +25,9 @@
* International Registered Trademark & Property of PrestaShop SA * International Registered Trademark & Property of PrestaShop SA
*/ */
// Security
if (!defined('_PS_VERSION_'))
exit;
// Loading eBay Class Request // Loading eBay Class Request
if (file_exists(dirname(__FILE__).'/eBayRequest.php')) if (file_exists(dirname(__FILE__).'/eBayRequest.php'))
@@ -420,9 +423,12 @@ class Ebay extends Module
// Validate order // Validate order
$paiement = new eBayPayment(); $paiement = new eBayPayment();
$paiement->validateOrder(intval($cartAdd->id), Configuration::get('PS_OS_PAYMENT'), floatval($cartAdd->getOrderTotal(true, 3)), 'Paypal eBay', NULL, array(), intval($cartAdd->id_currency)); $paiement->validateOrder(intval($cartAdd->id), Configuration::get('PS_OS_PAYMENT'), floatval($cartAdd->getOrderTotal(true, 3)), 'eBay '.$order['payment_method'].' '.$order['id_order_seller'], NULL, array(), intval($cartAdd->id_currency));
$id_order = $paiement->currentOrder; $id_order = $paiement->currentOrder;
// Fix on date
Db::getInstance()->autoExecute(_DB_PREFIX_.'orders', array('date_add' => pSQL($order['date_add'])), 'UPDATE', '`id_order` = '.(int)$id_order);
// Fix on sending e-mail // Fix on sending e-mail
Db::getInstance()->autoExecute(_DB_PREFIX_.'customer', array('email' => pSQL($order['email'])), 'UPDATE', '`id_customer` = '.(int)$id_customer); Db::getInstance()->autoExecute(_DB_PREFIX_.'customer', array('email' => pSQL($order['email'])), 'UPDATE', '`id_customer` = '.(int)$id_customer);
@@ -1514,8 +1520,19 @@ class Ebay extends Module
$itemID = Db::getInstance()->getValue('SELECT `id_product_ref` FROM `'._DB_PREFIX_.'ebay_product` WHERE `id_product` = '.(int)$product->id.' AND `id_attribute` = '.(int)$datasTmp['id_attribute']); $itemID = Db::getInstance()->getValue('SELECT `id_product_ref` FROM `'._DB_PREFIX_.'ebay_product` WHERE `id_product` = '.(int)$product->id.' AND `id_attribute` = '.(int)$datasTmp['id_attribute']);
if ($itemID) if ($itemID)
{ {
// Update // Get Item ID
$datasTmp['itemID'] = $itemID; $datasTmp['itemID'] = $itemID;
// Delete or Update
if ($datasTmp['quantity'] < 1)
{
// Delete
if ($ebay->endFixedPriceItem($datasTmp))
Db::getInstance()->Execute('DELETE FROM `'._DB_PREFIX_.'ebay_product` WHERE `id_product_ref` = \''.pSQL($datasTmp['itemID']).'\'');
}
else
{
// Update
if ($ebay->reviseFixedPriceItem($datasTmp)) if ($ebay->reviseFixedPriceItem($datasTmp))
Db::getInstance()->autoExecute(_DB_PREFIX_.'ebay_product', array('date_upd' => pSQL($date)), 'UPDATE', '`id_product_ref` = '.(int)$itemID); Db::getInstance()->autoExecute(_DB_PREFIX_.'ebay_product', array('date_upd' => pSQL($date)), 'UPDATE', '`id_product_ref` = '.(int)$itemID);
@@ -1529,6 +1546,7 @@ class Ebay extends Module
Db::getInstance()->autoExecute(_DB_PREFIX_.'ebay_product', array('id_country' => 8, 'id_product' => (int)$product->id, 'id_attribute' => (int)$datasTmp['id_attribute'], 'id_product_ref' => pSQL($ebay->itemID), 'date_add' => pSQL($date), 'date_upd' => pSQL($date)), 'INSERT'); Db::getInstance()->autoExecute(_DB_PREFIX_.'ebay_product', array('id_country' => 8, 'id_product' => (int)$product->id, 'id_attribute' => (int)$datasTmp['id_attribute'], 'id_product_ref' => pSQL($ebay->itemID), 'date_add' => pSQL($date), 'date_upd' => pSQL($date)), 'INSERT');
} }
} }
}
else else
{ {
// Add // Add
@@ -1562,8 +1580,19 @@ class Ebay extends Module
if ($itemID) if ($itemID)
{ {
// Update // Get Item ID
$datas['itemID'] = $itemID; $datas['itemID'] = $itemID;
// Delete or Update
if ($datas['quantity'] < 1)
{
// Delete
if ($ebay->endFixedPriceItem($datas))
Db::getInstance()->Execute('DELETE FROM `'._DB_PREFIX_.'ebay_product` WHERE `id_product_ref` = \''.pSQL($datas['itemID']).'\'');
}
else
{
// Update
if ($ebay->reviseFixedPriceItem($datas)) if ($ebay->reviseFixedPriceItem($datas))
Db::getInstance()->autoExecute(_DB_PREFIX_.'ebay_product', array('date_upd' => pSQL($date)), 'UPDATE', '`id_product_ref` = '.(int)$itemID); Db::getInstance()->autoExecute(_DB_PREFIX_.'ebay_product', array('date_upd' => pSQL($date)), 'UPDATE', '`id_product_ref` = '.(int)$itemID);
@@ -1577,6 +1606,7 @@ class Ebay extends Module
Db::getInstance()->autoExecute(_DB_PREFIX_.'ebay_product', array('id_country' => 8, 'id_product' => (int)$product->id, 'id_attribute' => 0, 'id_product_ref' => pSQL($ebay->itemID), 'date_add' => pSQL($date), 'date_upd' => pSQL($date)), 'INSERT'); Db::getInstance()->autoExecute(_DB_PREFIX_.'ebay_product', array('id_country' => 8, 'id_product' => (int)$product->id, 'id_attribute' => 0, 'id_product_ref' => pSQL($ebay->itemID), 'date_add' => pSQL($date), 'date_upd' => pSQL($date)), 'INSERT');
} }
} }
}
else else
{ {
// Add // Add
+1 -1
View File
@@ -25,7 +25,7 @@
* International Registered Trademark & Property of PrestaShop SA * International Registered Trademark & Property of PrestaShop SA
*/ */
if (!defined('_CAN_LOAD_FILES_')) if (!defined('_PS_VERSION_'))
exit; exit;
class Editorial extends Module class Editorial extends Module
+2 -1
View File
@@ -24,7 +24,8 @@
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA * International Registered Trademark & Property of PrestaShop SA
*/ */
if (!defined('_CAN_LOAD_FILES_'))
if (!defined('_PS_VERSION_'))
exit; exit;
class Ekomi extends Module class Ekomi extends Module
+2 -1
View File
@@ -24,7 +24,8 @@
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA * International Registered Trademark & Property of PrestaShop SA
*/ */
if (!defined('_CAN_LOAD_FILES_'))
if (!defined('_PS_VERSION_'))
exit; exit;
class Envoimoinscher extends Module class Envoimoinscher extends Module
+2 -1
View File
@@ -24,7 +24,8 @@
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA * International Registered Trademark & Property of PrestaShop SA
*/ */
if (!defined('_CAN_LOAD_FILES_'))
if (!defined('_PS_VERSION_'))
exit; exit;
class FedexCarrier extends CarrierModule class FedexCarrier extends CarrierModule
+1 -1
View File
@@ -25,7 +25,7 @@
* International Registered Trademark & Property of PrestaShop SA * International Registered Trademark & Property of PrestaShop SA
*/ */
if (!defined('_CAN_LOAD_FILES_')) if (!defined('_PS_VERSION_'))
exit; exit;
class Feeder extends Module class Feeder extends Module
+2 -1
View File
@@ -24,7 +24,8 @@
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA * International Registered Trademark & Property of PrestaShop SA
*/ */
if (!defined('_CAN_LOAD_FILES_'))
if (!defined('_PS_VERSION_'))
exit; exit;
if ((basename(__FILE__) == 'fianetfraud.php')) if ((basename(__FILE__) == 'fianetfraud.php'))
+2 -1
View File
@@ -24,7 +24,8 @@
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA * International Registered Trademark & Property of PrestaShop SA
*/ */
if (!defined('_CAN_LOAD_FILES_'))
if (!defined('_PS_VERSION_'))
exit; exit;
class FianetSceau extends Module class FianetSceau extends Module
+1 -1
View File
@@ -25,7 +25,7 @@
* International Registered Trademark & Property of PrestaShop SA * International Registered Trademark & Property of PrestaShop SA
*/ */
if (!defined('_CAN_LOAD_FILES_')) if (!defined('_PS_VERSION_'))
exit; exit;
class Followup extends Module class Followup extends Module
+1 -1
View File
@@ -25,7 +25,7 @@
* International Registered Trademark & Property of PrestaShop SA * International Registered Trademark & Property of PrestaShop SA
*/ */
if (!defined('_CAN_LOAD_FILES_')) if (!defined('_PS_VERSION_'))
exit; exit;
class GAdsense extends Module class GAdsense extends Module
+26 -1
View File
@@ -1,6 +1,31 @@
<?php <?php
/*
* 2007-2011 PrestaShop
*
* 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 license@prestashop.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information.
*
* @author PrestaShop SA <contact@prestashop.com>
* @copyright 2007-2011 PrestaShop SA
* @version Release: $Revision$
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*/
if (!defined('_CAN_LOAD_FILES_')) if (!defined('_PS_VERSION_'))
exit; exit;
class GAnalytics extends Module class GAnalytics extends Module
+1 -1
View File
@@ -25,7 +25,7 @@
* International Registered Trademark & Property of PrestaShop SA * International Registered Trademark & Property of PrestaShop SA
*/ */
if (!defined('_CAN_LOAD_FILES_')) if (!defined('_PS_VERSION_'))
exit; exit;
class GCheckout extends PaymentModule class GCheckout extends PaymentModule
+1 -1
View File
@@ -25,7 +25,7 @@
* International Registered Trademark & Property of PrestaShop SA * International Registered Trademark & Property of PrestaShop SA
*/ */
if (!defined('_CAN_LOAD_FILES_')) if (!defined('_PS_VERSION_'))
exit; exit;
class GraphArtichow extends ModuleGraphEngine class GraphArtichow extends ModuleGraphEngine
@@ -25,7 +25,7 @@
* International Registered Trademark & Property of PrestaShop SA * International Registered Trademark & Property of PrestaShop SA
*/ */
if (!defined('_CAN_LOAD_FILES_')) if (!defined('_PS_VERSION_'))
exit; exit;
class GraphGoogleChart extends ModuleGraphEngine class GraphGoogleChart extends ModuleGraphEngine
+1 -1
View File
@@ -25,7 +25,7 @@
* International Registered Trademark & Property of PrestaShop SA * International Registered Trademark & Property of PrestaShop SA
*/ */
if (!defined('_CAN_LOAD_FILES_')) if (!defined('_PS_VERSION_'))
exit; exit;
class GraphVisifire extends ModuleGraphEngine class GraphVisifire extends ModuleGraphEngine
@@ -35,7 +35,7 @@
* @version 1.4 * @version 1.4
*/ */
if (!defined('_CAN_LOAD_FILES_')) if (!defined('_PS_VERSION_'))
exit; exit;
class GraphXmlSwfCharts extends ModuleGraphEngine class GraphXmlSwfCharts extends ModuleGraphEngine
+1 -1
View File
@@ -25,7 +25,7 @@
* International Registered Trademark & Property of PrestaShop SA * International Registered Trademark & Property of PrestaShop SA
*/ */
if (!defined('_CAN_LOAD_FILES_')) if (!defined('_PS_VERSION_'))
exit; exit;
class GridHtml extends ModuleGridEngine class GridHtml extends ModuleGridEngine
+1 -1
View File
@@ -25,7 +25,7 @@
* International Registered Trademark & Property of PrestaShop SA * International Registered Trademark & Property of PrestaShop SA
*/ */
if (!defined('_CAN_LOAD_FILES_')) if (!defined('_PS_VERSION_'))
exit; exit;
class Gsitemap extends Module class Gsitemap extends Module
+1 -1
View File
@@ -25,7 +25,7 @@
* International Registered Trademark & Property of PrestaShop SA * International Registered Trademark & Property of PrestaShop SA
*/ */
if (!defined('_CAN_LOAD_FILES_')) if (!defined('_PS_VERSION_'))
exit; exit;
class Hipay extends PaymentModule class Hipay extends PaymentModule
+1 -1
View File
@@ -25,7 +25,7 @@
* International Registered Trademark & Property of PrestaShop SA * International Registered Trademark & Property of PrestaShop SA
*/ */
if (!defined('_CAN_LOAD_FILES_')) if (!defined('_PS_VERSION_'))
exit; exit;
class HomeFeatured extends Module class HomeFeatured extends Module
+2 -1
View File
@@ -24,7 +24,8 @@
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA * International Registered Trademark & Property of PrestaShop SA
*/ */
if (!defined('_CAN_LOAD_FILES_'))
if (!defined('_PS_VERSION_'))
exit; exit;
class iAdvize extends Module class iAdvize extends Module
+27 -1
View File
@@ -1,5 +1,31 @@
<?php <?php
if (!defined('_CAN_LOAD_FILES_')) /*
* 2007-2011 PrestaShop
*
* 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 license@prestashop.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information.
*
* @author PrestaShop SA <contact@prestashop.com>
* @copyright 2007-2011 PrestaShop SA
* @version Release: $Revision$
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*/
if (!defined('_PS_VERSION_'))
exit; exit;
class importerosc extends ImportModule class importerosc extends ImportModule
+1 -1
View File
@@ -25,7 +25,7 @@
* International Registered Trademark & Property of PrestaShop SA * International Registered Trademark & Property of PrestaShop SA
*/ */
if (!defined('_CAN_LOAD_FILES_')) if (!defined('_PS_VERSION_'))
exit; exit;
class LiveZilla extends Module class LiveZilla extends Module
+1 -1
View File
@@ -25,7 +25,7 @@
* International Registered Trademark & Property of PrestaShop SA * International Registered Trademark & Property of PrestaShop SA
*/ */
if (!defined('_CAN_LOAD_FILES_')) if (!defined('_PS_VERSION_'))
exit; exit;
class LoyaltyModule extends ObjectModel class LoyaltyModule extends ObjectModel
+1 -1
View File
@@ -25,7 +25,7 @@
* International Registered Trademark & Property of PrestaShop SA * International Registered Trademark & Property of PrestaShop SA
*/ */
if (!defined('_CAN_LOAD_FILES_')) if (!defined('_PS_VERSION_'))
exit; exit;
class LoyaltyStateModule extends ObjectModel class LoyaltyStateModule extends ObjectModel
+1 -1
View File
@@ -25,7 +25,7 @@
* International Registered Trademark & Property of PrestaShop SA * International Registered Trademark & Property of PrestaShop SA
*/ */
if (!defined('_CAN_LOAD_FILES_')) if (!defined('_PS_VERSION_'))
exit; exit;
/* /*
+1 -1
View File
@@ -25,7 +25,7 @@
* International Registered Trademark & Property of PrestaShop SA * International Registered Trademark & Property of PrestaShop SA
*/ */
if (!defined('_CAN_LOAD_FILES_')) if (!defined('_PS_VERSION_'))
exit; exit;
class MailAlerts extends Module class MailAlerts extends Module
+1 -1
View File
@@ -25,7 +25,7 @@
* International Registered Trademark & Property of PrestaShop SA * International Registered Trademark & Property of PrestaShop SA
*/ */
if (!defined('_CAN_LOAD_FILES_')) if (!defined('_PS_VERSION_'))
exit; exit;
require_once(_PS_MODULE_DIR_.'mondialrelay/classes/MondialRelayClass.php'); require_once(_PS_MODULE_DIR_.'mondialrelay/classes/MondialRelayClass.php');
+1 -1
View File
@@ -25,7 +25,7 @@
* International Registered Trademark & Property of PrestaShop SA * International Registered Trademark & Property of PrestaShop SA
*/ */
if (!defined('_CAN_LOAD_FILES_')) if (!defined('_PS_VERSION_'))
exit; exit;
class MoneyBookers extends PaymentModule class MoneyBookers extends PaymentModule
+1 -1
View File
@@ -25,7 +25,7 @@
* International Registered Trademark & Property of PrestaShop SA * International Registered Trademark & Property of PrestaShop SA
*/ */
if (!defined('_CAN_LOAD_FILES_')) if (!defined('_PS_VERSION_'))
exit; exit;
class Newsletter extends Module class Newsletter extends Module
+3
View File
@@ -25,6 +25,9 @@
* International Registered Trademark & Property of PrestaShop SA * International Registered Trademark & Property of PrestaShop SA
*/ */
if (!defined('_PS_VERSION_'))
exit;
class Ogone extends PaymentModule class Ogone extends PaymentModule
{ {
private $_ignoreKeyList = array('secure_key'); private $_ignoreKeyList = array('secure_key');
+1 -1
View File
@@ -25,7 +25,7 @@
* International Registered Trademark & Property of PrestaShop SA * International Registered Trademark & Property of PrestaShop SA
*/ */
if (!defined('_CAN_LOAD_FILES_')) if (!defined('_PS_VERSION_'))
exit; exit;
class Pagesnotfound extends Module class Pagesnotfound extends Module
+2 -1
View File
@@ -24,7 +24,8 @@
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA * International Registered Trademark & Property of PrestaShop SA
*/ */
if (!defined('_CAN_LOAD_FILES_'))
if (!defined('_PS_VERSION_'))
exit; exit;
define('_PAYPAL_INTEGRAL_', 0); define('_PAYPAL_INTEGRAL_', 0);
+2 -1
View File
@@ -24,7 +24,8 @@
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA * International Registered Trademark & Property of PrestaShop SA
*/ */
if (!defined('_CAN_LOAD_FILES_'))
if (!defined('_PS_VERSION_'))
exit; exit;
include_once(_PS_MODULE_DIR_.'paysafecard/PrepaidServices.php'); include_once(_PS_MODULE_DIR_.'paysafecard/PrepaidServices.php');
+2 -1
View File
@@ -25,7 +25,8 @@
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registred Trademark & Property of PrestaShop SA * International Registred Trademark & Property of PrestaShop SA
*/ */
if (!defined('_CAN_LOAD_FILES_'))
if (!defined('_PS_VERSION_'))
exit; exit;
class PrestaFraud extends Module class PrestaFraud extends Module
+1 -1
View File
@@ -26,7 +26,7 @@
* International Registered Trademark & Property of PrestaShop SA * International Registered Trademark & Property of PrestaShop SA
*/ */
if (!defined('_CAN_LOAD_FILES_')) if (!defined('_PS_VERSION_'))
exit; exit;
class ProductComment extends ObjectModel class ProductComment extends ObjectModel
+1 -1
View File
@@ -25,7 +25,7 @@
* International Registered Trademark & Property of PrestaShop SA * International Registered Trademark & Property of PrestaShop SA
*/ */
if (!defined('_CAN_LOAD_FILES_')) if (!defined('_PS_VERSION_'))
exit; exit;
class ProductComments extends Module class ProductComments extends Module
@@ -25,7 +25,7 @@
* International Registered Trademark & Property of PrestaShop SA * International Registered Trademark & Property of PrestaShop SA
*/ */
if (!defined('_CAN_LOAD_FILES_')) if (!defined('_PS_VERSION_'))
exit; exit;
class productsCategory extends Module class productsCategory extends Module
+1 -1
View File
@@ -25,7 +25,7 @@
* International Registered Trademark & Property of PrestaShop SA * International Registered Trademark & Property of PrestaShop SA
*/ */
if (!defined('_CAN_LOAD_FILES_')) if (!defined('_PS_VERSION_'))
exit; exit;
class ProductToolTip extends Module class ProductToolTip extends Module
@@ -25,7 +25,7 @@
* International Registered Trademark & Property of PrestaShop SA * International Registered Trademark & Property of PrestaShop SA
*/ */
if (!defined('_CAN_LOAD_FILES_')) if (!defined('_PS_VERSION_'))
exit; exit;
class ReferralProgramModule extends ObjectModel class ReferralProgramModule extends ObjectModel
+1 -1
View File
@@ -25,7 +25,7 @@
* International Registered Trademark & Property of PrestaShop SA * International Registered Trademark & Property of PrestaShop SA
*/ */
if (!defined('_CAN_LOAD_FILES_')) if (!defined('_PS_VERSION_'))
exit; exit;
class ReferralProgram extends Module class ReferralProgram extends Module
+1 -1
View File
@@ -25,7 +25,7 @@
* International Registered Trademark & Property of PrestaShop SA * International Registered Trademark & Property of PrestaShop SA
*/ */
if (!defined('_CAN_LOAD_FILES_')) if (!defined('_PS_VERSION_'))
exit; exit;
class Reverso extends Module class Reverso extends Module
+2 -1
View File
@@ -24,7 +24,8 @@
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA * International Registered Trademark & Property of PrestaShop SA
*/ */
if (!defined('_CAN_LOAD_FILES_'))
if (!defined('_PS_VERSION_'))
exit; exit;
class Secuvad extends Module class Secuvad extends Module
+1 -1
View File
@@ -25,7 +25,7 @@
* International Registered Trademark & Property of PrestaShop SA * International Registered Trademark & Property of PrestaShop SA
*/ */
if (!defined('_CAN_LOAD_FILES_')) if (!defined('_PS_VERSION_'))
exit; exit;
class SEKeywords extends ModuleGraph class SEKeywords extends ModuleGraph
+1 -1
View File
@@ -25,7 +25,7 @@
* International Registered Trademark & Property of PrestaShop SA * International Registered Trademark & Property of PrestaShop SA
*/ */
if (!defined('_CAN_LOAD_FILES_')) if (!defined('_PS_VERSION_'))
exit; exit;
class sendToAFriend extends Module class sendToAFriend extends Module
Loaded 100 of 136 files, more files were not shown because too many files have changed in this diff. Show more