Merge branch 'add-LogPaybox' into develop
This commit is contained in:
commit
96cb372568
@ -19,7 +19,6 @@ foreach(Db::getInstance()->ExecuteS('
|
||||
') as $c){
|
||||
$categories[] = $c['id_category'];
|
||||
}
|
||||
|
||||
foreach ($categories as $key => $id_category) {
|
||||
$products = Db::getInstance()->ExecuteS('
|
||||
SELECT cp.`id_product`
|
||||
@ -29,7 +28,7 @@ foreach ($categories as $key => $id_category) {
|
||||
WHERE cp.id_category ='.(int)$id_category.' AND p.quantity != 0
|
||||
ORDER BY cp.`position`
|
||||
');
|
||||
|
||||
if($products){
|
||||
foreach ($products as $key => $product) {
|
||||
Db::getInstance()->Execute('
|
||||
UPDATE `'._DB_PREFIX_.'category_product`
|
||||
@ -38,17 +37,19 @@ foreach ($categories as $key => $id_category) {
|
||||
AND `id_category`='.(int)$id_category
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
$products_zero = Db::getInstance()->ExecuteS('
|
||||
SELECT cp.`id_product`
|
||||
FROM `'._DB_PREFIX_.'category_product` cp
|
||||
RIGHT JOIN `'._DB_PREFIX_.'product` p ON (p.id_product=cp.id_product)
|
||||
LEFT JOIN `'._DB_PREFIX_.'product_lang` pl ON (pl.id_product=p.id_product AND pl.`id_lang` = 1)
|
||||
WHERE cp.id_category ='.(int)$id_category.' AND p.quantity == 0
|
||||
WHERE cp.id_category ='.(int)$id_category.' AND p.quantity = 0
|
||||
ORDER BY cp.`position`
|
||||
');
|
||||
if($products_zero){
|
||||
$position = count($products);
|
||||
foreach ($$products_zero as $key => $product) {
|
||||
foreach ($products_zero as $key => $product) {
|
||||
Db::getInstance()->Execute('
|
||||
UPDATE `'._DB_PREFIX_.'category_product`
|
||||
SET `position` = '. (int)($position) .'
|
||||
@ -58,3 +59,4 @@ foreach ($categories as $key => $id_category) {
|
||||
$position++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -117,6 +117,16 @@ if (in_array($_SERVER['REMOTE_ADDR'], $authorized_ip)) {
|
||||
mail('marion@antadis.com', '[BBB] Envoi paybox direct', $trame);
|
||||
}
|
||||
|
||||
// log
|
||||
$content = '';
|
||||
if (file_exists('logs.txt')) {
|
||||
$content = file_get_contents('logs.txt');
|
||||
}
|
||||
$line = 'SEND ['.(int)$cart->id.']['.$num_question.'] '.date('Y-m-d H:i:s').': '.$trame."\n";
|
||||
$content .= $line;
|
||||
file_put_contents('logs.txt', $content);
|
||||
// end log
|
||||
|
||||
curl_setopt($curl, CURLOPT_POST, true);
|
||||
curl_setopt($curl, CURLOPT_HTTPHEADER, array('Content-Type: application/x-www-form-urlencoded'));
|
||||
curl_setopt($curl, CURLOPT_POSTFIELDS, $trame);
|
||||
@ -124,6 +134,16 @@ curl_setopt($curl, CURLOPT_POSTFIELDS, $trame);
|
||||
$response = curl_exec($curl);
|
||||
curl_close($curl);
|
||||
|
||||
// log
|
||||
$content = '';
|
||||
if (file_exists('logs.txt')) {
|
||||
$content = file_get_contents('logs.txt');
|
||||
}
|
||||
$line = 'RESPONSE ['.(int)$cart->id.']['.$num_question.'] '.date('Y-m-d H:i:s').': '.$response."\n";
|
||||
$content .= $line;
|
||||
file_put_contents('logs.txt', $content);
|
||||
// end log
|
||||
|
||||
$data = explode('&', $response);
|
||||
foreach ($data as $d) {
|
||||
$d = explode('=', $d);
|
||||
|
@ -953,7 +953,7 @@ div#editorial_block_center p a:first-child{
|
||||
}
|
||||
.footer_img img{ width: 70%; }
|
||||
.footer_social {
|
||||
max-width: 300px;
|
||||
max-width: 350px;
|
||||
margin: auto;
|
||||
margin-top: 20px;
|
||||
margin-bottom: 50px;
|
||||
@ -1446,7 +1446,7 @@ body#index #columns #privatesales_block ul li .short_desc .date{
|
||||
body#index #columns #privatesales_block ul li .links,
|
||||
body#trailer #columns .links {
|
||||
position: relative;
|
||||
overflow: auto;
|
||||
overflow: hidden;
|
||||
}
|
||||
body#index #columns #privatesales_block ul li .links .short_desc,
|
||||
body#trailer #columns .links .short_desc {
|
||||
@ -1479,6 +1479,9 @@ body#trailer #columns .links {
|
||||
line-height: 15px;
|
||||
display: block;
|
||||
}
|
||||
body#index #columns #privatesales_block ul#futuresales_list li .links .short_desc .small_title{
|
||||
min-height: 30px;
|
||||
}
|
||||
body#index #columns #privatesales_block ul li .links .short_desc .percent { display: none; }
|
||||
body#index #columns #privatesales_block ul li .links .actions,
|
||||
body#trailer #columns .links .actions {
|
||||
|
@ -464,14 +464,14 @@ $(document).ready(function()
|
||||
}
|
||||
|
||||
//add a link on the span 'view full size' and on the big image
|
||||
$('span#view_full_size, div#image-block img').click(function(){
|
||||
$('#views_block li a.shown').click().fancybox({
|
||||
'hideOnContentClick': true,
|
||||
'transitionIn' : 'elastic',
|
||||
'transitionOut' : 'elastic',
|
||||
'onComplete' : function(){$('#views_block li a.shown').unbind('click.fb');}
|
||||
});
|
||||
});
|
||||
// $('span#view_full_size, div#image-block img').click(function(){
|
||||
// $('#views_block li a.shown').click().fancybox({
|
||||
// 'hideOnContentClick': true,
|
||||
// 'transitionIn' : 'elastic',
|
||||
// 'transitionOut' : 'elastic',
|
||||
// 'onComplete' : function(){$('#views_block li a.shown').unbind('click.fb');}
|
||||
// });
|
||||
// });
|
||||
|
||||
|
||||
//catch the click on the "more infos" button at the top of the page
|
||||
@ -503,6 +503,7 @@ $(document).ready(function()
|
||||
|
||||
|
||||
$('#product #thumbs_list_frame a').click(function(e) {
|
||||
e.preventDefault();
|
||||
return false;
|
||||
});
|
||||
|
||||
|
@ -105,7 +105,7 @@ var oneQuantityAvailableSentence = '{l s='Warning: 1 item in stock!' js=1}';
|
||||
<a href="{$smarty.server.HTTP_REFERER|escape:'htmlall':'UTF-8'|secureReferrer}" class="button_small back" title="{l s='Back'}">{l s='Back'}</a>
|
||||
</span>
|
||||
{/if}
|
||||
<span>{$product->name|escape:'htmlall':'UTF-8'|truncate:28:'...':true:false}</span>
|
||||
<span>{$product->name|truncate:30:'...':true:false}</span>
|
||||
</h1>
|
||||
</div>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user