fix conflict

This commit is contained in:
Marion Muszynski 2016-11-22 11:53:24 +01:00
commit 60577f145a
5 changed files with 71 additions and 46 deletions

View File

@ -1767,6 +1767,7 @@ RewriteRule ^invite/(.*)$ '.__PS_BASE_URI__.'modules/invite/sponsor.php?sponsor=
}
private function _send_credit_mail($params) {
if(!preg_match("/bebeboutik.com/i", $params['email'])) {
Mail::Send(
$params['id_lang'],
'invite-credit',
@ -1785,6 +1786,7 @@ RewriteRule ^invite/(.*)$ '.__PS_BASE_URI__.'modules/invite/sponsor.php?sponsor=
dirname(__FILE__).'/mails/'
);
}
}
private function _send_loyalty_mail($params) {
Mail::Send(

View File

@ -654,6 +654,15 @@ class AdminPrivateSalesSales extends AdminTab {
$employees[(int) $row['id_employee']] = $row['firstname'].' '.$row['lastname'];
}
$sale_shipping = array();
foreach(Db::getInstance()->ExecuteS('
SELECT *
FROM `'._DB_PREFIX_.'privatesale_shipping_sale`
WHERE 1
') as $ss) {
$sale_shipping[$ss['id_sale']] = $ss['id_shipping'];
}
//ANTADIS
echo '<fieldset class="bg-grey" style="margin-top:15px">';
echo '<legend>Tri des ventes</legend>';
@ -757,7 +766,7 @@ class AdminPrivateSalesSales extends AdminTab {
type: "GET",
data: "id_sale=" + id_sale + "&position=" + diff +"&updatePositionDrag",
success: function(html) {
var loader = "<p class=\"text-align:center\"><img src=\"../img/loader.gif\" /></p>";
var loader = "<p style=\"text-align:center\"><img style=\"display:inline-block;\" src=\"../img/loader_payment.gif\" /></p>";
$(".list_vente").html(loader);
ajax_query();
}
@ -789,6 +798,7 @@ class AdminPrivateSalesSales extends AdminTab {
<th>'.$this->l('Employee').'</th>
<th>'.$this->l('FR').'</th>
<th>'.$this->l('ES').'</th>
<th>'.$this->l('Shipping').'</th>
<th>'.$this->l('News').'</th>
<th>'.$this->l('Position').'</th>
<th style="width: '.($export? '68': '55').'px;">'.$this->l('Actions').'</th>
@ -828,6 +838,8 @@ class AdminPrivateSalesSales extends AdminTab {
<td '.(in_array('fr', $sale->versions) ? 'class="green"' : 'class="red"').'>FR</td>
<td '.(in_array('es', $sale->versions) ? 'class="green"' : 'class="red"').'>ES</td>
<td>'.(isset($sale_shipping[(int) $sale->id])? ($sale_shipping[(int) $sale->id] == 1? 'Philea': ''): '').'</td>
<td>'. $sale->forward_news .'</td>
<td class="position">';

View File

@ -1,6 +1,12 @@
<h4>{l s='Delivery Delay' mod='privatesales_delay'}</h4>
{foreach from=$delivery_date item=date}
{foreach from=$delivery_date key=k item=date}
{if $k == 5}
<p>
<b style="color: #e26ea2;">{$date.name}</b> : {l s='Date de réception prévue avant le' mod='privatesales_delay'} <b>24/12/{$date.date_start|date_format:'%Y'}</b>
</p>
{else}
<p>
<b style="color: #e26ea2;">{$date.name}</b> : {l s='Date de réception prévue entre le' mod='privatesales_delay'} <b>{$date.date_start|date_format:'%d/%m/%Y'}</b> {l s='et le' mod='privatesales_delay'} <b>{$date.date_end|date_format:'%d/%m/%Y'}</b>
</p>
{/if}
{/foreach}

View File

@ -163,7 +163,12 @@ class PrivateSales_Delay extends Module
$products = $order->getProducts();
$products = SaleDelay::associateDelay($products);
$delays = array_keys($products);
$delivery_date = SaleDelay::getDeliveryDate($delays, $cookie->id_lang, null, true);
if ($order!=null) {
$date = new DateTime($order->date_add);
} else {
$date = new DateTime();
}
$delivery_date = SaleDelay::getDeliveryDate($delays, $cookie->id_lang, $date, true);
$smarty->assign(array(
'delivery_date' => $delivery_date

View File

@ -10,14 +10,14 @@ $_SERVER['SERVER_NAME'] = 'www.bebeboutik.com';
include dirname(__FILE__).'/../../config/config.inc.php';
include dirname(__FILE__).'/../../modules/privatesales/Sale.php';
Db::getInstance()->ExecuteS('
INSERT IGNORE INTO `'._DB_PREFIX_.'product_ps_cache` (
SELECT `id_product`, `id_sale`
FROM `'._DB_PREFIX_.'product` p
LEFT JOIN `'._DB_PREFIX_.'privatesale_category` c
ON p.`id_category_default` = c.`id_category`
)
');
// Db::getInstance()->ExecuteS('
// INSERT IGNORE INTO `'._DB_PREFIX_.'product_ps_cache` (
// SELECT `id_product`, `id_sale`
// FROM `'._DB_PREFIX_.'product` p
// LEFT JOIN `'._DB_PREFIX_.'privatesale_category` c
// ON p.`id_category_default` = c.`id_category`
// )
// ');
// echo date('Y-m-d', strtotime(date('Y-m-d 00:00:00').' - '.(int) $argv[1].' day'))."\n";