// 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:
@@ -179,7 +179,7 @@ class AdminGenerator extends AdminTab
|
||||
$tab = array();
|
||||
|
||||
// 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
|
||||
$tab['Files'] = array('addresses.php', 'address.php', 'authentication.php', 'cart.php', 'discount.php', 'footer.php',
|
||||
|
||||
@@ -147,6 +147,7 @@ class AdminGroups extends AdminTab
|
||||
foreach ($categories AS $category)
|
||||
echo ' <option value="'.(int)($category['id_category']).'">'.Tools::htmlentitiesUTF8($category['name']).'</option>';
|
||||
echo ' </select><sup>*</sup>
|
||||
<p>'.$this->l('Only products that have this category as default category will be affected').'.</p>
|
||||
</div>
|
||||
<label>'.$this->l('Discount (in %):').' </label>
|
||||
<div class="margin-form">
|
||||
@@ -334,6 +335,7 @@ class AdminGroups extends AdminTab
|
||||
$id_group_reductions = Tools::getValue('gr_id_group_reduction');
|
||||
$reductions = Tools::getValue('gr_reduction');
|
||||
if ($id_group_reductions)
|
||||
{
|
||||
foreach ($id_group_reductions AS $key => $id_group_reduction)
|
||||
if (!Validate::isUnsignedId($id_group_reductions[$key]) OR !Validate::isPrice($reductions[$key]))
|
||||
$this->_errors[] = Tools::displayError();
|
||||
@@ -344,6 +346,7 @@ class AdminGroups extends AdminTab
|
||||
if (!$groupReduction->update())
|
||||
$this->_errors[] = Tools::displayError('Cannot update group reductions');
|
||||
}
|
||||
}
|
||||
if (!sizeof($this->_errors))
|
||||
parent::postProcess();
|
||||
}
|
||||
|
||||
@@ -93,7 +93,6 @@ class AdminLanguages extends AdminTab
|
||||
}
|
||||
unlink($tmpName);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -122,6 +121,13 @@ class AdminLanguages extends AdminTab
|
||||
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()
|
||||
{
|
||||
|
||||
@@ -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_.'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));
|
||||
return true;
|
||||
}
|
||||
|
||||
+26
-24
@@ -61,10 +61,9 @@ class GroupReductionCore extends ObjectModel
|
||||
public function delete()
|
||||
{
|
||||
$resource = Db::getInstance(_PS_USE_SQL_SLAVE_)->ExecuteS('
|
||||
SELECT cp.`id_product`
|
||||
FROM `'._DB_PREFIX_.'category_product` cp
|
||||
INNER JOIN `'._DB_PREFIX_.'product` p ON (p.`id_product` = cp.`id_product`)
|
||||
WHERE cp.`id_category` = '.(int)($this->id_category)
|
||||
SELECT p.`id_product`
|
||||
FROM `'._DB_PREFIX_.'product` p
|
||||
WHERE p.`id_category_default` = '.(int)($this->id_category)
|
||||
, false);
|
||||
|
||||
while ($row = Db::getInstance()->nextRow($resource))
|
||||
@@ -73,7 +72,7 @@ class GroupReductionCore extends ObjectModel
|
||||
if (Db::getInstance()->Execute($query) === false)
|
||||
return false;
|
||||
}
|
||||
return ($this->_clearCache() AND parent::delete());
|
||||
return (parent::delete());
|
||||
}
|
||||
|
||||
protected function _clearCache()
|
||||
@@ -84,10 +83,9 @@ class GroupReductionCore extends ObjectModel
|
||||
protected function _setCache()
|
||||
{
|
||||
$resource = Db::getInstance(_PS_USE_SQL_SLAVE_)->ExecuteS('
|
||||
SELECT cp.`id_product`
|
||||
FROM `'._DB_PREFIX_.'category_product` cp
|
||||
INNER JOIN `'._DB_PREFIX_.'product` p ON (p.`id_product` = cp.`id_product`)
|
||||
WHERE cp.`id_category` = '.(int)($this->id_category)
|
||||
SELECT p.`id_product`
|
||||
FROM `'._DB_PREFIX_.'product` p
|
||||
WHERE p.`id_category_default` = '.(int)($this->id_category)
|
||||
, false);
|
||||
|
||||
$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()
|
||||
{
|
||||
$resource = Db::getInstance(_PS_USE_SQL_SLAVE_)->ExecuteS('
|
||||
SELECT cp.`id_product`
|
||||
FROM `'._DB_PREFIX_.'category_product` cp
|
||||
INNER JOIN `'._DB_PREFIX_.'product` p ON (p.`id_product` = cp.`id_product`)
|
||||
WHERE cp.`id_category` = '.(int)($this->id_category)
|
||||
SELECT p.`id_product`
|
||||
FROM `'._DB_PREFIX_.'product` p
|
||||
WHERE p.`id_category_default` = '.(int)($this->id_category)
|
||||
, false);
|
||||
|
||||
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)
|
||||
return false;
|
||||
}
|
||||
@@ -134,13 +133,17 @@ class GroupReductionCore extends ObjectModel
|
||||
public static function getValueForProduct($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];
|
||||
}
|
||||
|
||||
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)
|
||||
@@ -170,12 +173,13 @@ class GroupReductionCore extends ObjectModel
|
||||
);
|
||||
|
||||
if (Db::getInstance()->NumRows() == 0)
|
||||
{
|
||||
$query = 'INSERT INTO `'._DB_PREFIX_.'product_group_reduction_cache` (`id_product`, `id_group`, `reduction`) VALUES ';
|
||||
$query .= '('.(int)($id_product).', '.(int)($id_group).', '.(float)($reduction).')';
|
||||
}
|
||||
$query = 'INSERT INTO `'._DB_PREFIX_.'product_group_reduction_cache` (`id_product`, `id_group`, `reduction`)
|
||||
VALUES ('.(int)($id_product).', '.(int)($id_group).', '.(float)($reduction).')';
|
||||
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));
|
||||
}
|
||||
|
||||
@@ -209,6 +213,4 @@ class GroupReductionCore extends ObjectModel
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
+51
-14
@@ -61,6 +61,13 @@ class LanguageCore extends ObjectModel
|
||||
'objectsNodeName' => 'languages',
|
||||
);
|
||||
|
||||
protected $translationsFilesAndVars = array(
|
||||
'fields' => '_FIELDS',
|
||||
'errors' => '_ERRORS',
|
||||
'admin' => '_LANGADM',
|
||||
'pdf' => '_LANGPDF',
|
||||
);
|
||||
|
||||
public function __construct($id = NULL, $id_lang = NULL)
|
||||
{
|
||||
parent::__construct($id);
|
||||
@@ -79,25 +86,53 @@ class LanguageCore extends ObjectModel
|
||||
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)
|
||||
{
|
||||
if (!parent::add($autodate))
|
||||
return false;
|
||||
|
||||
$translationsFiles = array(
|
||||
'fields' => '_FIELDS',
|
||||
'errors' => '_ERRORS',
|
||||
'admin' => '_LANGADM',
|
||||
'pdf' => '_LANGPDF',
|
||||
);
|
||||
if (!file_exists(_PS_TRANSLATIONS_DIR_.$this->iso_code))
|
||||
mkdir(_PS_TRANSLATIONS_DIR_.$this->iso_code);
|
||||
foreach ($translationsFiles as $file => $var)
|
||||
if (!file_exists(_PS_TRANSLATIONS_DIR_.$this->iso_code.'/'.$file.'.php'))
|
||||
file_put_contents(_PS_TRANSLATIONS_DIR_.$this->iso_code.'/'.$file.'.php', '<?php
|
||||
global $'.$var.';
|
||||
$'.$var.' = array();
|
||||
?>');
|
||||
// create empty files if they not exists
|
||||
$this->_generateFiles();
|
||||
|
||||
$resUpdateSQL = $this->loadUpdateSQL();
|
||||
// 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)
|
||||
{
|
||||
|
||||
|
||||
if (!parent::update($nullValues))
|
||||
return false;
|
||||
|
||||
|
||||
@@ -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 ($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';
|
||||
if (file_put_contents($file, $content))
|
||||
|
||||
@@ -296,7 +296,7 @@ abstract class PaymentModuleCore extends Module
|
||||
$shrunk = false;
|
||||
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);
|
||||
if ($objDiscount->id_discount_type == 2 AND in_array($objDiscount->behavior_not_exhausted, array(1,2)))
|
||||
$shrunk = true;
|
||||
@@ -314,6 +314,9 @@ abstract class PaymentModuleCore extends Module
|
||||
$voucher->add();
|
||||
$params['{voucher_amount}'] = Tools::displayPrice($voucher->value, $currency, false);
|
||||
$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);
|
||||
}
|
||||
}
|
||||
|
||||
+5
-14
@@ -686,7 +686,7 @@ class ProductCore extends ObjectModel
|
||||
if (!$this->addToCategories($categories))
|
||||
return false;
|
||||
|
||||
if (!$this->setGroupReduction($categories))
|
||||
if (!$this->setGroupReduction())
|
||||
return false;
|
||||
|
||||
return true;
|
||||
@@ -3427,26 +3427,17 @@ class ProductCore extends ObjectModel
|
||||
|
||||
/**
|
||||
* 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((int)$this->id_category_default);
|
||||
else
|
||||
$row = GroupReduction::getGroupByCategoryId((int)array_pop($categories));
|
||||
|
||||
if (!$row)
|
||||
$row = GroupReduction::getGroupByCategoryId($this->id_category_default);
|
||||
if (!$row) // Remove
|
||||
{
|
||||
// Then Remove
|
||||
if (!GroupReduction::deleteProductReduction($this->id))
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!GroupReduction::setProductReduction($this->id, $row['id_group'], $category, $row['reduction'])) // Add or Edit
|
||||
else if (!GroupReduction::setProductReduction($this->id, $row['id_group'], $this->id_category_default, (float)$row['reduction']))
|
||||
return false;
|
||||
}
|
||||
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 |
@@ -433,13 +433,13 @@ if ($lm->getIncludeTradFilename())
|
||||
<h3 id="resultConfig"></h3>
|
||||
<ul id="required">
|
||||
<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('Create new files and folders allowed')?></li>
|
||||
<li class="required"><?php echo lang('GD Library installed')?></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="required">/config</li>
|
||||
<li class="required first">/config</li>
|
||||
<li class="required">/tools/smarty/compile</li>
|
||||
<li class="required">/tools/smarty/cache</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">/log</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">/modules</li>
|
||||
<li class="required">/themes/prestashop/lang</li>
|
||||
@@ -519,7 +519,7 @@ if ($lm->getIncludeTradFilename())
|
||||
<p class="aligned">
|
||||
<input id="btTestDB" class="button" type="submit" value="<?php echo lang('Verify now!')?>"/>
|
||||
</p>
|
||||
<p id="dbResultCheck"></p>
|
||||
<p id="dbResultCheck" style="display:none;"></p>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
@@ -802,7 +802,7 @@ if ($lm->getIncludeTradFilename())
|
||||
echo '
|
||||
<table cellpadding="0" callspacing="0" border="0" class="moduleTable">
|
||||
<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;">
|
||||
<input type="checkbox" id="preInstallModules_'.$country_iso_code.'_'.$module.'" value="'.$module.'" class="'.$module.' preInstallModules_'.$country_iso_code.'" style="vertical-align: middle;" />
|
||||
</span>
|
||||
@@ -1214,13 +1214,13 @@ if ($lm->getIncludeTradFilename())
|
||||
<h3 id="resultConfig_update"></h3>
|
||||
<ul id="required_update">
|
||||
<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('Create new files and folders allowed')?></li>
|
||||
<li class="required"><?php echo lang('GD Library installed')?></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="required">/config</li>
|
||||
<li class="required first">/config</li>
|
||||
<li class="required">/tools/smarty/compile</li>
|
||||
<li class="required">/tools/smarty/cache</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">/log</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">/modules</li>
|
||||
<li class="required">/themes/prestashop/lang</li>
|
||||
|
||||
+27
-11
@@ -203,7 +203,7 @@ select {
|
||||
|
||||
div.field {
|
||||
padding:10px 0;
|
||||
border-bottom:1px solid #ccc;
|
||||
background:url(img/bg_field.png) repeat-x 0 100% transparent;
|
||||
}
|
||||
div.field label {
|
||||
display:inline-block;
|
||||
@@ -220,10 +220,13 @@ div.field {
|
||||
display:inline-block;
|
||||
width:200px;
|
||||
font-size:11px;
|
||||
font-family:Georgia;
|
||||
font-style:italic;
|
||||
color:#999;
|
||||
}
|
||||
|
||||
#uploadedImage {border:1px solid #ccc;}
|
||||
|
||||
.okBlock {
|
||||
padding:20px 20px 20px 38px;
|
||||
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 {
|
||||
float:left;
|
||||
margin:0 0 0 5px;
|
||||
height:42px;
|
||||
width:42px;
|
||||
text-indent:-5000px;
|
||||
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.ko {background-position:0 -100px;}
|
||||
.sheet .contentTitle h1 {text-shadow:0 1px 0 #fff;}
|
||||
@@ -409,16 +414,21 @@ ul#langList {list-style-type:none;}
|
||||
}*/
|
||||
|
||||
ul#required,
|
||||
ul#optional {list-style-type:none;}
|
||||
ul#optional {
|
||||
list-style-type: none;
|
||||
margin: 0;
|
||||
}
|
||||
ul#required li,
|
||||
ul#optional li {
|
||||
padding:6px 8px 4px 8px;
|
||||
font-size:12px;
|
||||
background:#f8f8f8;
|
||||
}
|
||||
ul#required li.title,
|
||||
ul#optional li.title {
|
||||
margin-top: 20px;
|
||||
padding:4px 8px;
|
||||
font-size:13px;
|
||||
background:#f8f8f8 url(img/bg_li_title.png) repeat-x 0 0;
|
||||
}
|
||||
ul#required li.required ,
|
||||
@@ -428,11 +438,11 @@ ul#optional {list-style-type:none;}
|
||||
}
|
||||
ul#required 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#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 ************************************************************* */
|
||||
@@ -443,15 +453,22 @@ ul#optional {list-style-type:none;}
|
||||
|
||||
#formCheckSQL p,
|
||||
#mailSMTPParam p {
|
||||
/*
|
||||
USELESS
|
||||
padding:10px 0;
|
||||
border-top:1px solid #fff;
|
||||
border-bottom:1px solid #ccc;*/
|
||||
background:url(img/bg_field.png) repeat-x 0 100% transparent;
|
||||
}
|
||||
#formCheckSQL p.first {border-top: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,
|
||||
#mailSMTPParam p label {
|
||||
display:inline-block;
|
||||
@@ -477,7 +494,7 @@ ul#optional {list-style-type:none;}
|
||||
|
||||
#mailPart .userInfos {
|
||||
padding-left:18px;
|
||||
font: 11px Georgia, Arial, Sans-serif italic;
|
||||
font:italic 11px Georgia, Arial, Sans-serif italic;
|
||||
color:#999;
|
||||
}
|
||||
|
||||
@@ -509,7 +526,6 @@ ul#optional {list-style-type:none;}
|
||||
.moduleTable {
|
||||
padding: 5px;
|
||||
width: 650px;
|
||||
background:#fff;
|
||||
border: 1px solid #CCC;
|
||||
border-bottom:none;
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
if (!defined('_CAN_LOAD_FILES_'))
|
||||
if (!defined('_PS_VERSION_'))
|
||||
exit;
|
||||
|
||||
class authorizeAIM extends PaymentModule
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
if (!defined('_CAN_LOAD_FILES_'))
|
||||
if (!defined('_PS_VERSION_'))
|
||||
exit;
|
||||
|
||||
class BankWire extends PaymentModule
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
if (!defined('_CAN_LOAD_FILES_'))
|
||||
if (!defined('_PS_VERSION_'))
|
||||
exit;
|
||||
|
||||
class BirthdayPresent extends Module
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
if (!defined('_CAN_LOAD_FILES_'))
|
||||
if (!defined('_PS_VERSION_'))
|
||||
exit;
|
||||
|
||||
class BlockAdvertising extends Module
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
if (!defined('_CAN_LOAD_FILES_'))
|
||||
if (!defined('_PS_VERSION_'))
|
||||
exit;
|
||||
|
||||
class BlockBestSellers extends Module
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
if (!defined('_CAN_LOAD_FILES_'))
|
||||
if (!defined('_PS_VERSION_'))
|
||||
exit;
|
||||
|
||||
class BlockCart extends Module
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
if (!defined('_CAN_LOAD_FILES_'))
|
||||
if (!defined('_PS_VERSION_'))
|
||||
exit;
|
||||
|
||||
class BlockCategories extends Module
|
||||
|
||||
@@ -24,7 +24,8 @@
|
||||
* @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;
|
||||
|
||||
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`)
|
||||
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)
|
||||
{
|
||||
$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;
|
||||
}
|
||||
|
||||
@@ -589,6 +596,10 @@ class BlockCms extends Module
|
||||
INSERT INTO `'._DB_PREFIX_.'cms_block_lang` (`id_cms_block`, `id_lang`, `name`)
|
||||
VALUES('.(int)$id_cms_block.', '.(int)$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'))
|
||||
{
|
||||
@@ -619,6 +630,8 @@ class BlockCms extends Module
|
||||
`display_store` = '.(int)(Tools::getValue('PS_STORES_DISPLAY_CMS')).'
|
||||
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)
|
||||
Db::getInstance()->Execute('
|
||||
UPDATE `'._DB_PREFIX_.'cms_block_lang`
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
if (!defined('_CAN_LOAD_FILES_'))
|
||||
if (!defined('_PS_VERSION_'))
|
||||
exit;
|
||||
|
||||
class BlockCurrencies extends Module
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
if (!defined('_CAN_LOAD_FILES_'))
|
||||
if (!defined('_PS_VERSION_'))
|
||||
exit;
|
||||
|
||||
class blockcustomerprivacy extends Module
|
||||
@@ -157,4 +157,4 @@ class blockcustomerprivacy extends Module
|
||||
));
|
||||
return $this->display(__FILE__, 'blockcustomerprivacy.tpl');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
if (!defined('_CAN_LOAD_FILES_'))
|
||||
if (!defined('_PS_VERSION_'))
|
||||
exit;
|
||||
|
||||
class BlockLanguages extends Module
|
||||
|
||||
@@ -170,9 +170,9 @@ function reloadContent(params_plus)
|
||||
reloadContent();
|
||||
return false;
|
||||
});
|
||||
ajaxCart.overrideButtonsInThePage();
|
||||
}
|
||||
});
|
||||
|
||||
ajaxQueries.push(ajaxQuery);
|
||||
}
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
* International Registred Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
if (!defined('_CAN_LOAD_FILES_'))
|
||||
if (!defined('_PS_VERSION_'))
|
||||
exit;
|
||||
|
||||
class BlockLayered extends Module
|
||||
@@ -1491,4 +1491,4 @@ if (!isset($doneCategories[(int)$id_category]['p']))
|
||||
else
|
||||
return $share_url;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+165
-148
@@ -25,7 +25,7 @@
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
if (!defined('_CAN_LOAD_FILES_'))
|
||||
if (!defined('_PS_VERSION_'))
|
||||
exit;
|
||||
|
||||
class BlockLink extends Module
|
||||
@@ -35,56 +35,56 @@ class BlockLink extends Module
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->name = 'blocklink';
|
||||
$this->tab = 'front_office_features';
|
||||
$this->version = '1.5';
|
||||
$this->name = 'blocklink';
|
||||
$this->tab = 'front_office_features';
|
||||
$this->version = '1.5';
|
||||
$this->author = 'PrestaShop';
|
||||
$this->need_instance = 0;
|
||||
|
||||
parent::__construct();
|
||||
|
||||
$this->displayName = $this->l('Link block');
|
||||
$this->description = $this->l('Adds a block with additional links.');
|
||||
$this->displayName = $this->l('Link block');
|
||||
$this->description = $this->l('Adds a block with additional links.');
|
||||
$this->confirmUninstall = $this->l('Are you sure you want to delete all your links ?');
|
||||
}
|
||||
|
||||
public function install()
|
||||
{
|
||||
if (!parent::install() OR
|
||||
!$this->registerHook('leftColumn') OR
|
||||
!Db::getInstance()->Execute('
|
||||
CREATE TABLE '._DB_PREFIX_.'blocklink (
|
||||
`id_blocklink` int(2) NOT NULL AUTO_INCREMENT,
|
||||
`url` varchar(255) NOT NULL,
|
||||
`new_window` TINYINT(1) NOT NULL,
|
||||
PRIMARY KEY(`id_blocklink`))
|
||||
ENGINE='._MYSQL_ENGINE_.' default CHARSET=utf8') OR
|
||||
!Db::getInstance()->Execute('
|
||||
CREATE TABLE '._DB_PREFIX_.'blocklink_lang (
|
||||
`id_blocklink` int(2) NOT NULL,
|
||||
`id_lang` int(2) NOT NULL,
|
||||
`text` varchar(64) NOT NULL,
|
||||
PRIMARY KEY(`id_blocklink`, `id_lang`))
|
||||
ENGINE='._MYSQL_ENGINE_.' default CHARSET=utf8') OR
|
||||
!Configuration::updateValue('PS_BLOCKLINK_TITLE', array('1' => 'Block link', '2' => 'Bloc lien')))
|
||||
return false;
|
||||
return true;
|
||||
if (!parent::install() OR
|
||||
!$this->registerHook('leftColumn') OR
|
||||
!Db::getInstance()->Execute('
|
||||
CREATE TABLE '._DB_PREFIX_.'blocklink (
|
||||
`id_blocklink` int(2) NOT NULL AUTO_INCREMENT,
|
||||
`url` varchar(255) NOT NULL,
|
||||
`new_window` TINYINT(1) NOT NULL,
|
||||
PRIMARY KEY(`id_blocklink`))
|
||||
ENGINE='._MYSQL_ENGINE_.' default CHARSET=utf8') OR
|
||||
!Db::getInstance()->Execute('
|
||||
CREATE TABLE '._DB_PREFIX_.'blocklink_lang (
|
||||
`id_blocklink` int(2) NOT NULL,
|
||||
`id_lang` int(2) NOT NULL,
|
||||
`text` varchar(64) NOT NULL,
|
||||
PRIMARY KEY(`id_blocklink`, `id_lang`))
|
||||
ENGINE='._MYSQL_ENGINE_.' default CHARSET=utf8') OR
|
||||
!Configuration::updateValue('PS_BLOCKLINK_TITLE', array('1' => 'Block link', '2' => 'Bloc lien')))
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
public function uninstall()
|
||||
{
|
||||
if (!parent::uninstall() OR
|
||||
!Db::getInstance()->Execute('DROP TABLE '._DB_PREFIX_.'blocklink') OR
|
||||
!Db::getInstance()->Execute('DROP TABLE '._DB_PREFIX_.'blocklink_lang') OR
|
||||
!Configuration::deleteByName('PS_BLOCKLINK_TITLE') OR
|
||||
!Configuration::deleteByName('PS_BLOCKLINK_URL'))
|
||||
return false;
|
||||
return true;
|
||||
if (!parent::uninstall() OR
|
||||
!Db::getInstance()->Execute('DROP TABLE '._DB_PREFIX_.'blocklink') OR
|
||||
!Db::getInstance()->Execute('DROP TABLE '._DB_PREFIX_.'blocklink_lang') OR
|
||||
!Configuration::deleteByName('PS_BLOCKLINK_TITLE') OR
|
||||
!Configuration::deleteByName('PS_BLOCKLINK_URL'))
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
public function hookLeftColumn($params)
|
||||
{
|
||||
$links = $this->getLinks();
|
||||
$links = $this->getLinks();
|
||||
|
||||
$this->context->smarty->assign(array(
|
||||
'blocklink_links' => $links,
|
||||
@@ -92,7 +92,7 @@ class BlockLink extends Module
|
||||
'url' => Configuration::get('PS_BLOCKLINK_URL'),
|
||||
'lang' => 'text_'.$this->context->language->id
|
||||
));
|
||||
if (!$links)
|
||||
if (!$links)
|
||||
return false;
|
||||
return $this->display(__FILE__, 'blocklink.tpl');
|
||||
}
|
||||
@@ -104,14 +104,14 @@ class BlockLink extends Module
|
||||
|
||||
public function getLinks()
|
||||
{
|
||||
$result = array();
|
||||
/* 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' : '')))
|
||||
return false;
|
||||
$i = 0;
|
||||
foreach ($links AS $link)
|
||||
{
|
||||
$result[$i]['id'] = $link['id_blocklink'];
|
||||
$result = array();
|
||||
/* 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' : '')))
|
||||
return false;
|
||||
$i = 0;
|
||||
foreach ($links AS $link)
|
||||
{
|
||||
$result[$i]['id'] = $link['id_blocklink'];
|
||||
$result[$i]['url'] = $link['url'];
|
||||
$result[$i]['newWindow'] = $link['new_window'];
|
||||
/* Get multilingual text */
|
||||
@@ -121,58 +121,58 @@ class BlockLink extends Module
|
||||
$result[$i]['text_'.$text['id_lang']] = $text['text'];
|
||||
$i++;
|
||||
}
|
||||
return $result;
|
||||
return $result;
|
||||
}
|
||||
|
||||
public function addLink()
|
||||
{
|
||||
/* 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())
|
||||
return false;
|
||||
/* Multilingual text */
|
||||
$languages = Language::getLanguages();
|
||||
$defaultLanguage = (int)(Configuration::get('PS_LANG_DEFAULT'));
|
||||
if (!$languages)
|
||||
return false;
|
||||
foreach ($languages AS $language)
|
||||
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']]).'\')'))
|
||||
return false;
|
||||
}
|
||||
else
|
||||
if (!Db::getInstance()->Execute('INSERT INTO '._DB_PREFIX_.'blocklink_lang VALUES ('.(int)($lastId).', '.(int)($language['id_lang']).', \''.pSQL($_POST['text_'.$defaultLanguage]).'\')'))
|
||||
return false;
|
||||
return true;
|
||||
/* 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())
|
||||
return false;
|
||||
/* Multilingual text */
|
||||
$languages = Language::getLanguages();
|
||||
$defaultLanguage = (int)(Configuration::get('PS_LANG_DEFAULT'));
|
||||
if (!$languages)
|
||||
return false;
|
||||
foreach ($languages AS $language)
|
||||
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']]).'\')'))
|
||||
return false;
|
||||
}
|
||||
else
|
||||
if (!Db::getInstance()->Execute('INSERT INTO '._DB_PREFIX_.'blocklink_lang VALUES ('.(int)($lastId).', '.(int)($language['id_lang']).', \''.pSQL($_POST['text_'.$defaultLanguage]).'\')'))
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
public function updateLink()
|
||||
{
|
||||
/* 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'])))
|
||||
return false;
|
||||
/* Multilingual text */
|
||||
$languages = Language::getLanguages();
|
||||
$defaultLanguage = (int)(Configuration::get('PS_LANG_DEFAULT'));
|
||||
if (!$languages)
|
||||
/* 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'])))
|
||||
return false;
|
||||
/* Multilingual text */
|
||||
$languages = Language::getLanguages();
|
||||
$defaultLanguage = (int)(Configuration::get('PS_LANG_DEFAULT'));
|
||||
if (!$languages)
|
||||
return false;
|
||||
if (!Db::getInstance()->Execute('DELETE FROM '._DB_PREFIX_.'blocklink_lang WHERE `id_blocklink` = '.(int)($_POST['id'])))
|
||||
return false ;
|
||||
foreach ($languages AS $language)
|
||||
if (!empty($_POST['text_'.$language['id_lang']]))
|
||||
foreach ($languages AS $language)
|
||||
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']]).'\')'))
|
||||
return false;
|
||||
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;
|
||||
}
|
||||
else
|
||||
else
|
||||
if (!Db::getInstance()->Execute('INSERT INTO '._DB_PREFIX_.'blocklink_lang VALUES ('.(int)($_POST['id']).', '.$language['id_lang'].', \''.pSQL($_POST['text_'.$defaultLanguage]).'\')'))
|
||||
return false;
|
||||
return true;
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
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()
|
||||
@@ -181,92 +181,98 @@ class BlockLink extends Module
|
||||
$result = array();
|
||||
foreach ($languages AS $language)
|
||||
$result[$language['id_lang']] = $_POST['title_'.$language['id_lang']];
|
||||
if (!Configuration::updateValue('PS_BLOCKLINK_TITLE', $result))
|
||||
return false;
|
||||
return Configuration::updateValue('PS_BLOCKLINK_URL', $_POST['title_url']);
|
||||
if (!Configuration::updateValue('PS_BLOCKLINK_TITLE', $result))
|
||||
return false;
|
||||
return Configuration::updateValue('PS_BLOCKLINK_URL', $_POST['title_url']);
|
||||
}
|
||||
|
||||
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>';
|
||||
|
||||
/* Add a link */
|
||||
if (isset($_POST['submitLinkAdd']))
|
||||
/* Add a link */
|
||||
if (isset($_POST['submitLinkAdd']))
|
||||
{
|
||||
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 ($this->addLink())
|
||||
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 ($this->addLink())
|
||||
$this->_html .= $this->displayConfirmation($this->l('The link has been added.'));
|
||||
else
|
||||
$this->_html .= $this->displayError($this->l('An error occurred during link creation.'));
|
||||
else
|
||||
$this->_html .= $this->displayError($this->l('An error occurred during link creation.'));
|
||||
}
|
||||
/* Update a link */
|
||||
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']))
|
||||
/* Update a link */
|
||||
elseif (isset($_POST['submitLinkUpdate']))
|
||||
{
|
||||
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'));
|
||||
else
|
||||
$this->_html .= $this->displayError($this->l('An error occurred during sort order set-up.'));
|
||||
}
|
||||
|
||||
$this->_displayForm();
|
||||
$this->_list();
|
||||
$this->_displayForm();
|
||||
$this->_list();
|
||||
|
||||
return $this->_html;
|
||||
}
|
||||
return $this->_html;
|
||||
}
|
||||
|
||||
private function _displayForm()
|
||||
{
|
||||
/* Language */
|
||||
$defaultLanguage = (int)(Configuration::get('PS_LANG_DEFAULT'));
|
||||
$defaultLanguage = (int)(Configuration::get('PS_LANG_DEFAULT'));
|
||||
$languages = Language::getLanguages(false);
|
||||
$divLangName = 'text¤title';
|
||||
/* Title */
|
||||
$title_url = Configuration::get('PS_BLOCKLINK_URL');
|
||||
$title_url = Configuration::get('PS_BLOCKLINK_URL');
|
||||
|
||||
$this->_html .= '
|
||||
$this->_html .= '
|
||||
<script type="text/javascript">
|
||||
id_language = Number('.$defaultLanguage.');
|
||||
</script>
|
||||
<fieldset>
|
||||
<fieldset>
|
||||
<legend><img src="'.$this->_path.'add.png" alt="" title="" /> '.$this->l('Add a new link').'</legend>
|
||||
<form method="post" action="'.$_SERVER['REQUEST_URI'].'">
|
||||
<label>'.$this->l('Text:').'</label>
|
||||
@@ -287,7 +293,7 @@ class BlockLink extends Module
|
||||
<div class="margin-form">
|
||||
<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 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>
|
||||
</form>
|
||||
</fieldset>
|
||||
@@ -327,29 +333,29 @@ class BlockLink extends Module
|
||||
|
||||
private function _list()
|
||||
{
|
||||
$links = $this->getLinks();
|
||||
$languages = Language::getLanguages();
|
||||
if ($links)
|
||||
$links = $this->getLinks();
|
||||
$languages = Language::getLanguages();
|
||||
if ($links)
|
||||
{
|
||||
$this->_html .= '
|
||||
$this->_html .= '
|
||||
<script type="text/javascript">
|
||||
var currentUrl = \''.AdminTab::$currentIndex.'&configure='.$this->name.'\';
|
||||
var token=\''.Tools::getValue('token').'\';
|
||||
var links = new Array();';
|
||||
foreach ($links AS $link)
|
||||
foreach ($links AS $link)
|
||||
{
|
||||
$this->_html .= 'links['.$link['id'].'] = new Array(\''.addslashes($link['url']).'\', '.$link['newWindow'];
|
||||
foreach ($languages AS $language)
|
||||
$this->_html .= 'links['.$link['id'].'] = new Array(\''.addslashes($link['url']).'\', '.$link['newWindow'];
|
||||
foreach ($languages AS $language)
|
||||
if (isset($link['text_'.$language['id_lang']]))
|
||||
$this->_html .= ', \''.addslashes($link['text_'.$language['id_lang']]).'\'';
|
||||
else
|
||||
$this->_html .= ', \'\'';
|
||||
$this->_html .= ');';
|
||||
$this->_html .= ');';
|
||||
}
|
||||
$this->_html .= '</script>';
|
||||
$this->_html .= '</script>';
|
||||
}
|
||||
$this->_html .= '
|
||||
<h3 class="blue space">'.$this->l('Link list').'</h3>
|
||||
$this->_html .= '
|
||||
<h3 class="blue space">'.$this->l('Link list').'</h3>
|
||||
<table class="table">
|
||||
<tr>
|
||||
<th>'.$this->l('ID').'</th>
|
||||
@@ -375,9 +381,20 @@ class BlockLink extends Module
|
||||
<img src="../img/admin/delete.gif" alt="" title="" onclick="linkDeletion('.$link['id'].')" style="cursor: pointer" />
|
||||
</td>
|
||||
</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 .= '
|
||||
</table>
|
||||
<input type="hidden" id="languageFirst" value="'.$languages[0]['id_lang'].'" />
|
||||
<input type="hidden" id="languageNb" value="'.sizeof($languages).'" />';
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -25,7 +25,7 @@
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
if (!defined('_CAN_LOAD_FILES_'))
|
||||
if (!defined('_PS_VERSION_'))
|
||||
exit;
|
||||
|
||||
class BlockManufacturer extends Module
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
if (!defined('_CAN_LOAD_FILES_'))
|
||||
if (!defined('_PS_VERSION_'))
|
||||
exit;
|
||||
|
||||
class BlockMyAccount extends Module
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
if (!defined('_CAN_LOAD_FILES_'))
|
||||
if (!defined('_PS_VERSION_'))
|
||||
exit;
|
||||
|
||||
class BlockNewProducts extends Module
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
if (!defined('_CAN_LOAD_FILES_'))
|
||||
if (!defined('_PS_VERSION_'))
|
||||
exit;
|
||||
|
||||
class Blocknewsletter extends Module
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
if (!defined('_CAN_LOAD_FILES_'))
|
||||
if (!defined('_PS_VERSION_'))
|
||||
exit;
|
||||
|
||||
class BlockPaymentLogo extends Module
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
if (!defined('_CAN_LOAD_FILES_'))
|
||||
if (!defined('_PS_VERSION_'))
|
||||
exit;
|
||||
|
||||
class BlockPermanentLinks extends Module
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
if (!defined('_CAN_LOAD_FILES_'))
|
||||
if (!defined('_PS_VERSION_'))
|
||||
exit;
|
||||
|
||||
include_once(_PS_CLASS_DIR_.'../tools/pear/PEAR.php');
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
if (!defined('_CAN_LOAD_FILES_'))
|
||||
if (!defined('_PS_VERSION_'))
|
||||
exit;
|
||||
|
||||
class BlockSearch extends Module
|
||||
|
||||
@@ -24,7 +24,8 @@
|
||||
* @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;
|
||||
|
||||
class BlockSpecials extends Module
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
if (!defined('_CAN_LOAD_FILES_'))
|
||||
if (!defined('_PS_VERSION_'))
|
||||
exit;
|
||||
|
||||
class BlockStore extends Module
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
if (!defined('_CAN_LOAD_FILES_'))
|
||||
if (!defined('_PS_VERSION_'))
|
||||
exit;
|
||||
|
||||
class BlockSupplier extends Module
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
if (!defined('_CAN_LOAD_FILES_'))
|
||||
if (!defined('_PS_VERSION_'))
|
||||
exit;
|
||||
|
||||
define('BLOCKTAGS_MAX_LEVEL', 3);
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
if (!defined('_CAN_LOAD_FILES_'))
|
||||
if (!defined('_PS_VERSION_'))
|
||||
exit;
|
||||
|
||||
class BlockUserInfo extends Module
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
if (!defined('_CAN_LOAD_FILES_'))
|
||||
if (!defined('_PS_VERSION_'))
|
||||
exit;
|
||||
|
||||
class BlockViewed extends Module
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
if (!defined('_CAN_LOAD_FILES_'))
|
||||
if (!defined('_PS_VERSION_'))
|
||||
exit;
|
||||
|
||||
class WishList extends ObjectModel
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
if (!defined('_CAN_LOAD_FILES_'))
|
||||
if (!defined('_PS_VERSION_'))
|
||||
exit;
|
||||
|
||||
class BlockWishList extends Module
|
||||
|
||||
@@ -24,7 +24,8 @@
|
||||
* @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;
|
||||
|
||||
class CanadaPost extends CarrierModule
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
if (!defined('_CAN_LOAD_FILES_'))
|
||||
if (!defined('_PS_VERSION_'))
|
||||
exit;
|
||||
|
||||
class CarrierCompare extends Module
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
if (!defined('_CAN_LOAD_FILES_'))
|
||||
if (!defined('_PS_VERSION_'))
|
||||
exit;
|
||||
|
||||
class CashOnDelivery extends PaymentModule
|
||||
|
||||
@@ -24,7 +24,8 @@
|
||||
* @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;
|
||||
|
||||
if (!in_array('PrepaidServices', get_declared_classes())) include_once(_PS_MODULE_DIR_.'cashticket/PrepaidServices.php');
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
if (!defined('_CAN_LOAD_FILES_'))
|
||||
if (!defined('_PS_VERSION_'))
|
||||
exit;
|
||||
|
||||
class Cheque extends PaymentModule
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
if (!defined('_CAN_LOAD_FILES_'))
|
||||
if (!defined('_PS_VERSION_'))
|
||||
exit;
|
||||
|
||||
class Criteo extends Module
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
if (!defined('_CAN_LOAD_FILES_'))
|
||||
if (!defined('_PS_VERSION_'))
|
||||
exit;
|
||||
|
||||
class CrossSelling extends Module
|
||||
@@ -146,4 +146,4 @@ class CrossSelling extends Module
|
||||
}
|
||||
return $this->display(__FILE__, 'crossselling.tpl');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,7 +24,8 @@
|
||||
* @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;
|
||||
|
||||
class DateOfDelivery extends Module
|
||||
@@ -515,4 +516,4 @@ class DateOfDelivery extends Module
|
||||
$date_maximal_string
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,31 @@
|
||||
<?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;
|
||||
|
||||
require_once(_PS_MODULE_DIR_ . "dejala/dejalaconfig.php");
|
||||
|
||||
@@ -5,8 +5,10 @@
|
||||
* DejalaCart class, dejalacart.php
|
||||
* Manage cart information related to dejala.fr carrier
|
||||
**/
|
||||
if (!defined('_CAN_LOAD_FILES_'))
|
||||
|
||||
if (!defined('_PS_VERSION_'))
|
||||
exit;
|
||||
|
||||
class DejalaCart extends ObjectModel
|
||||
{
|
||||
public $id;
|
||||
|
||||
@@ -24,7 +24,8 @@
|
||||
* @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;
|
||||
|
||||
class dibs extends PaymentModule
|
||||
|
||||
@@ -89,7 +89,7 @@ class eBayRequest
|
||||
|
||||
$this->apiUrl = 'https://api.ebay.com/ws/api.dll';
|
||||
$this->apiCall = $apiCall;
|
||||
$this->compatibilityLevel = 719;
|
||||
$this->compatibilityLevel = 741;
|
||||
|
||||
$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 .= ' <WarningLevel>High</WarningLevel>'."\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";
|
||||
if (isset($datas['pictures']))
|
||||
{
|
||||
@@ -503,7 +503,7 @@ class eBayRequest
|
||||
$requestXml .= ' <WarningLevel>High</WarningLevel>'."\n";
|
||||
$requestXml .= ' <Item>'."\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 .= ' <StartPrice>'.$datas['price'].'</StartPrice>'."\n";
|
||||
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)
|
||||
{
|
||||
$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 .= ' <Quantity>'.$variation['quantity'].'</Quantity>'."\n";
|
||||
$requestXml .= ' <VariationSpecifics>'."\n";
|
||||
@@ -929,6 +1009,18 @@ class eBayRequest
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/******************************************************************/
|
||||
/** Order Methods *************************************************/
|
||||
/******************************************************************/
|
||||
@@ -1068,6 +1160,9 @@ class eBayRequest
|
||||
'shippingServiceCost' => (string)$order->ShippingServiceSelected->ShippingServiceCost,
|
||||
'email' => (string)$order->TransactionArray->Transaction[0]->Buyer->Email,
|
||||
'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
|
||||
);
|
||||
}
|
||||
|
||||
+33
-3
@@ -25,6 +25,9 @@
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
// Security
|
||||
if (!defined('_PS_VERSION_'))
|
||||
exit;
|
||||
|
||||
// Loading eBay Class Request
|
||||
if (file_exists(dirname(__FILE__).'/eBayRequest.php'))
|
||||
@@ -420,9 +423,12 @@ class Ebay extends Module
|
||||
|
||||
// Validate order
|
||||
$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;
|
||||
|
||||
// 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
|
||||
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']);
|
||||
if ($itemID)
|
||||
{
|
||||
// Update
|
||||
// Get Item ID
|
||||
$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))
|
||||
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');
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// Add
|
||||
@@ -1562,8 +1580,19 @@ class Ebay extends Module
|
||||
|
||||
if ($itemID)
|
||||
{
|
||||
// Update
|
||||
// Get Item ID
|
||||
$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))
|
||||
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');
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// Add
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
if (!defined('_CAN_LOAD_FILES_'))
|
||||
if (!defined('_PS_VERSION_'))
|
||||
exit;
|
||||
|
||||
class Editorial extends Module
|
||||
|
||||
@@ -24,7 +24,8 @@
|
||||
* @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;
|
||||
|
||||
class Ekomi extends Module
|
||||
|
||||
@@ -24,7 +24,8 @@
|
||||
* @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;
|
||||
|
||||
class Envoimoinscher extends Module
|
||||
|
||||
@@ -24,7 +24,8 @@
|
||||
* @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;
|
||||
|
||||
class FedexCarrier extends CarrierModule
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
if (!defined('_CAN_LOAD_FILES_'))
|
||||
if (!defined('_PS_VERSION_'))
|
||||
exit;
|
||||
|
||||
class Feeder extends Module
|
||||
|
||||
@@ -24,7 +24,8 @@
|
||||
* @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;
|
||||
|
||||
if ((basename(__FILE__) == 'fianetfraud.php'))
|
||||
|
||||
@@ -24,7 +24,8 @@
|
||||
* @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;
|
||||
|
||||
class FianetSceau extends Module
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
if (!defined('_CAN_LOAD_FILES_'))
|
||||
if (!defined('_PS_VERSION_'))
|
||||
exit;
|
||||
|
||||
class Followup extends Module
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
if (!defined('_CAN_LOAD_FILES_'))
|
||||
if (!defined('_PS_VERSION_'))
|
||||
exit;
|
||||
|
||||
class GAdsense extends Module
|
||||
|
||||
@@ -1,6 +1,31 @@
|
||||
<?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;
|
||||
|
||||
class GAnalytics extends Module
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
if (!defined('_CAN_LOAD_FILES_'))
|
||||
if (!defined('_PS_VERSION_'))
|
||||
exit;
|
||||
|
||||
class GCheckout extends PaymentModule
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
if (!defined('_CAN_LOAD_FILES_'))
|
||||
if (!defined('_PS_VERSION_'))
|
||||
exit;
|
||||
|
||||
class GraphArtichow extends ModuleGraphEngine
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
if (!defined('_CAN_LOAD_FILES_'))
|
||||
if (!defined('_PS_VERSION_'))
|
||||
exit;
|
||||
|
||||
class GraphGoogleChart extends ModuleGraphEngine
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
if (!defined('_CAN_LOAD_FILES_'))
|
||||
if (!defined('_PS_VERSION_'))
|
||||
exit;
|
||||
|
||||
class GraphVisifire extends ModuleGraphEngine
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
* @version 1.4
|
||||
*/
|
||||
|
||||
if (!defined('_CAN_LOAD_FILES_'))
|
||||
if (!defined('_PS_VERSION_'))
|
||||
exit;
|
||||
|
||||
class GraphXmlSwfCharts extends ModuleGraphEngine
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
if (!defined('_CAN_LOAD_FILES_'))
|
||||
if (!defined('_PS_VERSION_'))
|
||||
exit;
|
||||
|
||||
class GridHtml extends ModuleGridEngine
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
if (!defined('_CAN_LOAD_FILES_'))
|
||||
if (!defined('_PS_VERSION_'))
|
||||
exit;
|
||||
|
||||
class Gsitemap extends Module
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
if (!defined('_CAN_LOAD_FILES_'))
|
||||
if (!defined('_PS_VERSION_'))
|
||||
exit;
|
||||
|
||||
class Hipay extends PaymentModule
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
if (!defined('_CAN_LOAD_FILES_'))
|
||||
if (!defined('_PS_VERSION_'))
|
||||
exit;
|
||||
|
||||
class HomeFeatured extends Module
|
||||
|
||||
@@ -24,7 +24,8 @@
|
||||
* @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;
|
||||
|
||||
class iAdvize extends Module
|
||||
@@ -156,4 +157,4 @@ class iAdvize extends Module
|
||||
</script>
|
||||
<!-- /End - iAdvize - Live chat -->'."\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,31 @@
|
||||
<?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;
|
||||
|
||||
class importerosc extends ImportModule
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
if (!defined('_CAN_LOAD_FILES_'))
|
||||
if (!defined('_PS_VERSION_'))
|
||||
exit;
|
||||
|
||||
class LiveZilla extends Module
|
||||
@@ -118,4 +118,4 @@ class LiveZilla extends Module
|
||||
{
|
||||
return $this->displayBlock();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
if (!defined('_CAN_LOAD_FILES_'))
|
||||
if (!defined('_PS_VERSION_'))
|
||||
exit;
|
||||
|
||||
class LoyaltyModule extends ObjectModel
|
||||
@@ -240,4 +240,4 @@ class LoyaltyModule extends ObjectModel
|
||||
VALUES ('.(int)($this->id).', '.(int)($this->id_loyalty_state).', '.(int)($this->points).', NOW())');
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
if (!defined('_CAN_LOAD_FILES_'))
|
||||
if (!defined('_PS_VERSION_'))
|
||||
exit;
|
||||
|
||||
class LoyaltyStateModule extends ObjectModel
|
||||
@@ -90,4 +90,4 @@ class LoyaltyStateModule extends ObjectModel
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
if (!defined('_CAN_LOAD_FILES_'))
|
||||
if (!defined('_PS_VERSION_'))
|
||||
exit;
|
||||
|
||||
/*
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
if (!defined('_CAN_LOAD_FILES_'))
|
||||
if (!defined('_PS_VERSION_'))
|
||||
exit;
|
||||
|
||||
class MailAlerts extends Module
|
||||
@@ -580,4 +580,4 @@ class MailAlerts extends Module
|
||||
WHERE `id_product_attribute` = '.(int)$params['id_product_attribute'].'
|
||||
AND `id_product` = '.(int)$params['id_product']);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
if (!defined('_CAN_LOAD_FILES_'))
|
||||
if (!defined('_PS_VERSION_'))
|
||||
exit;
|
||||
|
||||
require_once(_PS_MODULE_DIR_.'mondialrelay/classes/MondialRelayClass.php');
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
if (!defined('_CAN_LOAD_FILES_'))
|
||||
if (!defined('_PS_VERSION_'))
|
||||
exit;
|
||||
|
||||
class MoneyBookers extends PaymentModule
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
if (!defined('_CAN_LOAD_FILES_'))
|
||||
if (!defined('_PS_VERSION_'))
|
||||
exit;
|
||||
|
||||
class Newsletter extends Module
|
||||
|
||||
@@ -25,6 +25,9 @@
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
if (!defined('_PS_VERSION_'))
|
||||
exit;
|
||||
|
||||
class Ogone extends PaymentModule
|
||||
{
|
||||
private $_ignoreKeyList = array('secure_key');
|
||||
@@ -213,4 +216,4 @@ class Ogone extends PaymentModule
|
||||
$pcc->add();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
if (!defined('_CAN_LOAD_FILES_'))
|
||||
if (!defined('_PS_VERSION_'))
|
||||
exit;
|
||||
|
||||
class Pagesnotfound extends Module
|
||||
|
||||
@@ -24,7 +24,8 @@
|
||||
* @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;
|
||||
|
||||
define('_PAYPAL_INTEGRAL_', 0);
|
||||
|
||||
@@ -24,7 +24,8 @@
|
||||
* @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;
|
||||
|
||||
include_once(_PS_MODULE_DIR_.'paysafecard/PrepaidServices.php');
|
||||
|
||||
@@ -25,7 +25,8 @@
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registred Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
if (!defined('_CAN_LOAD_FILES_'))
|
||||
|
||||
if (!defined('_PS_VERSION_'))
|
||||
exit;
|
||||
|
||||
class PrestaFraud extends Module
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
if (!defined('_CAN_LOAD_FILES_'))
|
||||
if (!defined('_PS_VERSION_'))
|
||||
exit;
|
||||
|
||||
class ProductComment extends ObjectModel
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
if (!defined('_CAN_LOAD_FILES_'))
|
||||
if (!defined('_PS_VERSION_'))
|
||||
exit;
|
||||
|
||||
class ProductComments extends Module
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
if (!defined('_CAN_LOAD_FILES_'))
|
||||
if (!defined('_PS_VERSION_'))
|
||||
exit;
|
||||
|
||||
class productsCategory extends Module
|
||||
@@ -177,4 +177,4 @@ class productsCategory extends Module
|
||||
$this->context->controller->addCSS($this->_path.'productscategory.css', 'all');
|
||||
$this->context->controller->addJS(array($this->_path.'productscategory.js', _PS_JS_DIR_.'jquery/jquery.serialScroll-1.2.2-min.js'));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
if (!defined('_CAN_LOAD_FILES_'))
|
||||
if (!defined('_PS_VERSION_'))
|
||||
exit;
|
||||
|
||||
class ProductToolTip extends Module
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
if (!defined('_CAN_LOAD_FILES_'))
|
||||
if (!defined('_PS_VERSION_'))
|
||||
exit;
|
||||
|
||||
class ReferralProgramModule extends ObjectModel
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
if (!defined('_CAN_LOAD_FILES_'))
|
||||
if (!defined('_PS_VERSION_'))
|
||||
exit;
|
||||
|
||||
class ReferralProgram extends Module
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
if (!defined('_CAN_LOAD_FILES_'))
|
||||
if (!defined('_PS_VERSION_'))
|
||||
exit;
|
||||
|
||||
class Reverso extends Module
|
||||
|
||||
@@ -24,7 +24,8 @@
|
||||
* @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;
|
||||
|
||||
class Secuvad extends Module
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
if (!defined('_CAN_LOAD_FILES_'))
|
||||
if (!defined('_PS_VERSION_'))
|
||||
exit;
|
||||
|
||||
class SEKeywords extends ModuleGraph
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
if (!defined('_CAN_LOAD_FILES_'))
|
||||
if (!defined('_PS_VERSION_'))
|
||||
exit;
|
||||
|
||||
class sendToAFriend extends Module
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user