Merge branch 'fix-OnCustomerRemoving' into develop

This commit is contained in:
Marion Muszynski 2017-06-01 10:53:25 +02:00
commit dc0ff8e9b6
9 changed files with 50 additions and 11 deletions

View File

@ -1231,7 +1231,7 @@ class AdminBulkUpdate extends AdminTab {
$id_lang = Tools::getValue('id_lang', $cookie->id_lang);
$order_states = explode(',', Configuration::get('PS_IT_OF_ORDER_STATES'));
if ($id_category = (int) Tools::getValue('category')) {
if ((int)Tools::getValue('category')!=0 && $id_category = (int) Tools::getValue('category')) {
$c = new Category($id_category, $cookie->id_lang);
$children = $c->recurseLiteCategTree(5, 0, $id_lang);
$ids = $this->_recurse_array(array($children));
@ -1921,6 +1921,10 @@ class AdminBulkUpdate extends AdminTab {
}
$option_sales = array();
$option_sales[] = array(
'value' => 0,
'label' => 'Selectionner une vente'
);
foreach(Db::getInstance()->ExecuteS('
SELECT c.`id_category`, l.`name`
FROM `'._DB_PREFIX_.'category_lang` l

View File

@ -19,17 +19,18 @@ if(($sponsor = Tools::getValue('sponsor')) && strlen($sponsor) > 12) {
}
$url = parse_url($_SERVER['REQUEST_URI']);
$gclid = Tools::getIsset('gclid')?'&gclid='.Tools::getValue('gclid'):'';
if(Tools::getIsset('lpes')) {
$lp = Tools::getValue('lpes');
if( _THEME_NAME_ !== 'site_mobile') {
Tools::redirect('?sponsor='.rawurlencode($cipherTool->encrypt('1|'.$email.'|')).(isset($lp)? '&lpes='.$lp: ''));
Tools::redirect('?sponsor='.rawurlencode($cipherTool->encrypt('1|'.$email.'|')).(isset($lp)? '&lpes='.$lp: '').$gclid);
}
}
if(Tools::getIsset('lp')) {
$lp = Tools::getValue('lp');
}
Tools::redirectLink($link->getPageLink('authentication.php').'?create_account=1&sponsor='.rawurlencode($cipherTool->encrypt('1|'.$email.'|')).(isset($url['query'])? '&'.$url['query']: '').(isset($lp)? '&lp='.$lp: ''));
Tools::redirectLink($link->getPageLink('authentication.php').'?create_account=1&sponsor='.rawurlencode($cipherTool->encrypt('1|'.$email.'|')).(isset($url['query'])? '&'.$url['query']: '').(isset($lp)? '&lp='.$lp: '').$gclid);
// Tools::redirectLink($link->getPageLink('authentication.php').'?create_account=1&sponsor='.rawurlencode($cipherTool->encrypt('1|'.$email.'|')).(isset($url['query'])? '&'.$url['query']: ''));
}
}

View File

@ -5,12 +5,22 @@
background-position: center 99px;
background-repeat: no-repeat;
}
@media screen and (max-width:767px){
body#authentication {
background-image: none !important;
}
}
{else}
body#authentication {
background-image: url("{$base_dir_ssl}modules/landingpages/img/default.jpg");
background-position: center 99px;
background-repeat: no-repeat;
}
@media screen and (max-width:767px){
body#authentication {
background-image: none !important;
}
}
{/if}
</style>
<div class="hidden" style="display: none !important;">

View File

@ -193,7 +193,7 @@ $values = array(
// payment success
if ((!isset($autorisation[1]) || empty($autorisation[1])))
if ((!isset($autorisation) || empty($autorisation)))
{
if (in_array($_SERVER['REMOTE_ADDR'], $authorized_ip)) {
mail('marion@antadis.com', '[BBB] ERREUR Reponse paybox direct', http_build_query($data, '', '&'));
@ -202,7 +202,7 @@ if ((!isset($autorisation[1]) || empty($autorisation[1])))
die('No autorisation number');
}
// Wrong authorization number in live mode
if ($autorisation[1] == 'XXXXXX' && $test_mode === 1) {
if ($autorisation == 'XXXXXX' && $test_mode === 1) {
$error .= '- error payment - wrong authorization number <br>'."\n";
}
@ -257,7 +257,7 @@ $total_paid = $values['m'] / 100;
if ($test_mode === 0)
{
if (empty($error) && $code_reponse[1] == '00000')
if (empty($error) && $code_reponse == '00000')
{
$error = '***TEST*** : Validated Payment <br>'."\n";
$statut = _PS_OS_PAYMENT_;
@ -270,7 +270,7 @@ if ($test_mode === 0)
}
elseif ($test_mode === 1)
{
if ($code_reponse[1] == '00000' && empty($error)){
if ($code_reponse == '00000' && empty($error)){
$statut = _PS_OS_PAYMENT_;
}
else
@ -279,7 +279,7 @@ elseif ($test_mode === 1)
}
}
switch ($code_reponse[1])
switch ($code_reponse)
{
case '00001':
$error .= 'Connection to the authorization center failed or an internal error occurred <br>'."\n";
@ -308,6 +308,9 @@ switch ($code_reponse[1])
case '00015':
$error .= 'Payment already done<br>'."\n";
break;
case '00105':
$error .= 'Error 00105<br>'."\n";
break;
case '00016':
$error .= 'Subscriber already exists<br>'."\n";
break;

View File

@ -296,6 +296,9 @@ switch ($pbx_error)
case '00138':
$error .= 'Too many attempts at secret code.<br>'."\n";
break;
case '00151':
$error .= 'provision insuffisante.<br>'."\n";
break;
case '00159':
$error .= 'Suspicion of fraud.<br>'."\n";
break;

View File

@ -1,7 +1,7 @@
<?php
class Customer extends CustomerCore
class Customer extends CustomerCore
{
public function printVersion($value, $params)
public function printVersion($value, $params)
{
$versions = array(
'en' => 1,
@ -11,4 +11,18 @@ class Customer extends CustomerCore
);
return '<img src="/img/l/'.(int) $versions[$value].'.jpg" alt="" />';
}
public function delete()
{
$addresses = $this->getAddresses((int)(Configuration::get('PS_LANG_DEFAULT')));
foreach ($addresses AS $address)
{
$obj = new Address((int)($address['id_address']));
$obj->delete();
}
Db::getInstance()->Execute('DELETE FROM `'._DB_PREFIX_.'customer_group` WHERE `id_customer` = '.(int)($this->id));
Db::getInstance()->Execute('UPDATE `'._DB_PREFIX_.'customer_thread` SET `id_customer` = 0 WHERE `id_customer` = '.(int)($this->id));
Discount::deleteByIdCustomer((int)($this->id));
return parent::delete();
}
}

View File

@ -18,6 +18,10 @@ class OrderReturn extends OrderReturnCore {
SELECT SUM(`quantity`)
FROM `'._DB_PREFIX_.'mondialrelay_parcel`
WHERE `id_order_detail` = '.(int) $product['id_order_detail'].'
') + (int) Db::getInstance()->getValue('
SELECT SUM(`quantity`)
FROM `'._DB_PREFIX_.'philea_parcel`
WHERE `id_order_detail` = '.(int) $product['id_order_detail'].'
') - max($product['product_quantity_return'], $product['product_quantity_refunded']);
}
$qty -= (int) Db::getInstance()->getValue('

Binary file not shown.

Before

Width:  |  Height:  |  Size: 368 KiB

After

Width:  |  Height:  |  Size: 125 KiB

View File

@ -18,7 +18,7 @@ $(document).ready(function() {
if(window.matchMedia("(max-width:1199px)").matches) {
var nameProduct = $(this).text();
if(nameProduct.length > 20) {
nameProduct = nameProduct.substring(0,22)+"...";
nameProduct = nameProduct.substring(0,17)+"...";
$(this).text(nameProduct);
}
}