Merge remote-tracking branch 'origin/ticket/r14810-dropshipping-tracking' into develop
This commit is contained in:
commit
99c9fad462
@ -184,7 +184,7 @@ class OrderCore extends ObjectModel
|
||||
/* MySQL does not allow 'order' for a table name */
|
||||
protected $table = 'orders';
|
||||
protected $identifier = 'id_order';
|
||||
protected $_taxCalculationMethod = PS_TAX_EXC;
|
||||
protected $_taxCalculationMethod = PS_TAX_EXC;
|
||||
|
||||
protected static $_historyCache = array();
|
||||
|
||||
@ -449,9 +449,9 @@ class OrderCore extends ObjectModel
|
||||
if ($row['group_reduction'] > 0)
|
||||
{
|
||||
if ($this->_taxCalculationMethod == PS_TAX_EXC)
|
||||
$row['product_price'] = $row['product_price'] * $group_reduction;
|
||||
$row['product_price'] = $row['product_price'] * $group_reduction;
|
||||
else
|
||||
$row['product_price_wt'] = Tools::ps_round($row['product_price_wt'] * $group_reduction , 2);
|
||||
$row['product_price_wt'] = Tools::ps_round($row['product_price_wt'] * $group_reduction , 2);
|
||||
}
|
||||
|
||||
if (($row['reduction_percent'] OR $row['reduction_amount'] OR $row['group_reduction']) AND $this->_taxCalculationMethod == PS_TAX_EXC)
|
||||
@ -526,7 +526,7 @@ class OrderCore extends ObjectModel
|
||||
|
||||
/**
|
||||
* Check if order contains (only) virtual products
|
||||
*
|
||||
*
|
||||
* @param boolean $strict If false return true if there are at least one product virtual
|
||||
* @return boolean true if is a virtual order or false
|
||||
*
|
||||
@ -922,7 +922,7 @@ class OrderCore extends ObjectModel
|
||||
// I use mysql 4, I can't make sub query in FROM
|
||||
$number = Order::getLastInvoiceNumber() + 1;
|
||||
}
|
||||
else
|
||||
else
|
||||
$number = '(SELECT `invoice_number`
|
||||
FROM (
|
||||
SELECT MAX(`invoice_number`) + 1 AS `invoice_number`
|
||||
|
@ -145,7 +145,7 @@ class OrderDetailControllerCore extends FrontController
|
||||
'messages' => Message::getMessagesByOrderId((int)($order->id)),
|
||||
'CUSTOMIZE_FILE' => _CUSTOMIZE_FILE_,
|
||||
'CUSTOMIZE_TEXTFIELD' => _CUSTOMIZE_TEXTFIELD_,
|
||||
'isRecyclable' => Configuration::get('PS_RECYCLABLE_PACK'),
|
||||
'isRecyclable' => Configuration::get('PS_RECYCLABLE_PACK'),
|
||||
'use_tax' => Configuration::get('PS_TAX'),
|
||||
'group_use_tax' => (Group::getPriceDisplayMethod($customer->id_default_group) == PS_TAX_INC),
|
||||
'customizedDatas' => $customizedDatas));
|
||||
|
51
mails/en/in_transit_dropshipping_noinfo.html
Normal file
51
mails/en/in_transit_dropshipping_noinfo.html
Normal file
@ -0,0 +1,51 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/1999/REC-html401-19991224/strict.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<title>Message de {shop_name}</title>
|
||||
</head>
|
||||
<body>
|
||||
<table style="font-family: tahoma,arial,sans-serif; font-size: 12px; color:#000000; width: 550px;">
|
||||
<tr>
|
||||
<td align="left">
|
||||
<a href="{shop_url}" title="{shop_name}"><img alt="{shop_name}" src="{shop_logo}" style="border:none;" ></a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr><td> </td></tr>
|
||||
<tr>
|
||||
<td align="left">Bonjour <strong>{firstname} {lastname}</strong>,</td>
|
||||
</tr>
|
||||
<tr><td> </td></tr>
|
||||
<tr>
|
||||
<td align="left">
|
||||
Vous avez passé commande récemment sur notre site Bébé Boutik.
|
||||
Nous vous informons que le/les produits de la marque {sale} pour votre commande n°{id_order} vient d'être envoyé directement de chez notre fournisseur.
|
||||
</td>
|
||||
</tr>
|
||||
<tr><td> </td></tr>
|
||||
<tr>
|
||||
<td align="left">
|
||||
Vous recevrez votre commande prochainement.
|
||||
</td>
|
||||
</tr>
|
||||
<tr><td> </td></tr>
|
||||
<tr>
|
||||
<td align="left">
|
||||
A très vite sur Bébé Boutik !
|
||||
</td>
|
||||
</tr>
|
||||
<tr><td> </td></tr>
|
||||
<tr>
|
||||
<td align="left">
|
||||
Cordialement,
|
||||
</td>
|
||||
</tr>
|
||||
<tr><td> </td></tr>
|
||||
<tr>
|
||||
<td align="center" style="font-size: 12px; border-top: 1px solid #cccccc; padding-top: 5px;">
|
||||
{shop_name} - <a href="{shop_url}" style="color: #e26ea2;">{shop_url}</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
11
mails/en/in_transit_dropshipping_noinfo.txt
Normal file
11
mails/en/in_transit_dropshipping_noinfo.txt
Normal file
@ -0,0 +1,11 @@
|
||||
Bonjour {firstname} {lastname}
|
||||
|
||||
Vous avez passé commande récemment sur notre site Bébé Boutik. Nous vous informons que le/les produits de la marque {sale} pour votre commande n°{id_order} vient d'être envoyé directement de chez notre fournisseur.
|
||||
|
||||
Vous recevrez votre commande prochainement.
|
||||
|
||||
A très vite sur Bébé Boutik !
|
||||
|
||||
Cordialement,
|
||||
|
||||
{shop_name} - {shop_url}
|
44
mails/es/in_transit_dropshipping_noinfo.html
Normal file
44
mails/es/in_transit_dropshipping_noinfo.html
Normal file
@ -0,0 +1,44 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/1999/REC-html401-19991224/strict.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<title>Message de {shop_name}</title>
|
||||
</head>
|
||||
<body>
|
||||
<table style="font-family: tahoma,arial,sans-serif; font-size: 12px; color:#000000; width: 550px;">
|
||||
<tr>
|
||||
<td align="left">
|
||||
<a href="{shop_url}" title="{shop_name}"><img alt="{shop_name}" src="{shop_logo}" style="border:none;" ></a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr><td> </td></tr>
|
||||
<tr>
|
||||
<td align="left">Buenos días <strong>{firstname} {lastname},</strong>,</td>
|
||||
</tr>
|
||||
<tr><td> </td></tr>
|
||||
<tr>
|
||||
<td align="left">
|
||||
Te informamos de que el/los producto(s) de la marca {sale} de tu pedido nº{id_order}, te los ha enviado directamente el proveedor a la dirección que nos has indicado.
|
||||
</td>
|
||||
</tr>
|
||||
<tr><td> </td></tr>
|
||||
<tr>
|
||||
<td align="left">
|
||||
Recibirás tu pedido en breve.
|
||||
</td>
|
||||
</tr>
|
||||
<tr><td> </td></tr>
|
||||
<tr>
|
||||
<td align="left">
|
||||
¡Hasta pronto! ¡Nos vemos en Bébé Boutik!
|
||||
</td>
|
||||
</tr>
|
||||
<tr><td> </td></tr>
|
||||
<tr>
|
||||
<td align="center" style="font-size: 12px; border-top: 1px solid #cccccc; padding-top: 5px;">
|
||||
{shop_name} - <a href="{shop_url}" style="color: #e26ea2;">{shop_url}</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
11
mails/es/in_transit_dropshipping_noinfo.txt
Normal file
11
mails/es/in_transit_dropshipping_noinfo.txt
Normal file
@ -0,0 +1,11 @@
|
||||
Buenos días {firstname} {lastname},
|
||||
|
||||
Recientemente has pasado pedido en Bébé Boutik y te damos las gracias.
|
||||
|
||||
Te informamos de que el/los producto(s) de la marca {sale} de tu pedido nº{id_order}, te los ha enviado directamente el proveedor a la dirección que nos has indicado.
|
||||
|
||||
Recibirás tu pedido en breve.
|
||||
|
||||
¡Hasta pronto! ¡Nos vemos en Bébé Boutik!
|
||||
|
||||
{shop_name} - {shop_url}
|
@ -18,7 +18,8 @@
|
||||
<tr><td> </td></tr>
|
||||
<tr>
|
||||
<td align="left">
|
||||
Vous avez passé commande récemment sur notre site Bébé Boutik. Nous vous informons que le/les produits de la marque {sale} pour votre commande n°{id_order} vient d'être envoyé directement de chez notre fournisseur par le transporteur {carrier}.
|
||||
Vous avez passé commande récemment sur notre site Bébé Boutik.
|
||||
Nous vous informons que le/les produits de la marque {sale} pour votre commande n°{id_order} vient d'être envoyé directement de chez notre fournisseur par le transporteur {carrier}.
|
||||
</td>
|
||||
</tr>
|
||||
<tr><td> </td></tr>
|
||||
@ -30,7 +31,7 @@
|
||||
<tr><td> </td></tr>
|
||||
<tr>
|
||||
<td align="left">
|
||||
Vous pourrez consulter l'acheminnement de votre colis à l'adresse suivante : <a href="{followup}" style="color: #e26ea2;">{followup}</a>
|
||||
Vous pourrez consulter l'acheminement de votre colis à l'adresse suivante : <a href="{followup}" style="color: #e26ea2;">{followup}</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr><td> </td></tr>
|
||||
|
@ -4,7 +4,7 @@ Vous avez passé commande récemment sur notre site Bébé Boutik. Nous vous inf
|
||||
|
||||
Voici votre numéro de suivi : {tracking_number}
|
||||
|
||||
Vous pourrez consulter l'acheminnement de votre colis à l'adresse suivante : {followup}
|
||||
Vous pourrez consulter l'acheminement de votre colis à l'adresse suivante : {followup}
|
||||
|
||||
A très vite sur Bébé Boutik !
|
||||
|
||||
|
51
mails/fr/in_transit_dropshipping_noinfo.html
Normal file
51
mails/fr/in_transit_dropshipping_noinfo.html
Normal file
@ -0,0 +1,51 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/1999/REC-html401-19991224/strict.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<title>Message de {shop_name}</title>
|
||||
</head>
|
||||
<body>
|
||||
<table style="font-family: tahoma,arial,sans-serif; font-size: 12px; color:#000000; width: 550px;">
|
||||
<tr>
|
||||
<td align="left">
|
||||
<a href="{shop_url}" title="{shop_name}"><img alt="{shop_name}" src="{shop_logo}" style="border:none;" ></a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr><td> </td></tr>
|
||||
<tr>
|
||||
<td align="left">Bonjour <strong>{firstname} {lastname}</strong>,</td>
|
||||
</tr>
|
||||
<tr><td> </td></tr>
|
||||
<tr>
|
||||
<td align="left">
|
||||
Vous avez passé commande récemment sur notre site Bébé Boutik.
|
||||
Nous vous informons que le/les produits de la marque {sale} pour votre commande n°{id_order} vient d'être envoyé directement de chez notre fournisseur.
|
||||
</td>
|
||||
</tr>
|
||||
<tr><td> </td></tr>
|
||||
<tr>
|
||||
<td align="left">
|
||||
Vous recevrez votre commande prochainement.
|
||||
</td>
|
||||
</tr>
|
||||
<tr><td> </td></tr>
|
||||
<tr>
|
||||
<td align="left">
|
||||
A très vite sur Bébé Boutik !
|
||||
</td>
|
||||
</tr>
|
||||
<tr><td> </td></tr>
|
||||
<tr>
|
||||
<td align="left">
|
||||
Cordialement,
|
||||
</td>
|
||||
</tr>
|
||||
<tr><td> </td></tr>
|
||||
<tr>
|
||||
<td align="center" style="font-size: 12px; border-top: 1px solid #cccccc; padding-top: 5px;">
|
||||
{shop_name} - <a href="{shop_url}" style="color: #e26ea2;">{shop_url}</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
11
mails/fr/in_transit_dropshipping_noinfo.txt
Normal file
11
mails/fr/in_transit_dropshipping_noinfo.txt
Normal file
@ -0,0 +1,11 @@
|
||||
Bonjour {firstname} {lastname}
|
||||
|
||||
Vous avez passé commande récemment sur notre site Bébé Boutik. Nous vous informons que le/les produits de la marque {sale} pour votre commande n°{id_order} vient d'être envoyé directement de chez notre fournisseur.
|
||||
|
||||
Vous recevrez votre commande prochainement.
|
||||
|
||||
A très vite sur Bébé Boutik !
|
||||
|
||||
Cordialement,
|
||||
|
||||
{shop_name} - {shop_url}
|
@ -293,8 +293,8 @@ class AdminAntDropshippingtracking extends AdminTab
|
||||
$history->id_employee = 0;
|
||||
$history->add();
|
||||
|
||||
// Send Mail with tracking info
|
||||
if ($infosTrackingEnable == 1) {
|
||||
|
||||
Db::getInstance()->ExecuteS('
|
||||
INSERT INTO `'._DB_PREFIX_.'shipping_history`
|
||||
VALUES (
|
||||
@ -324,6 +324,23 @@ class AdminAntDropshippingtracking extends AdminTab
|
||||
$errors++;
|
||||
}
|
||||
}
|
||||
|
||||
// Send Mail without tracking info
|
||||
if ($infosTrackingDisable == 1) {
|
||||
$subject = 'Package in transit';
|
||||
$customer = new Customer((int) $order->id_customer);
|
||||
$templateVars = array(
|
||||
'{sale}' => $sale_names[(int)$order->id_lang],
|
||||
'{firstname}' => $customer->firstname,
|
||||
'{lastname}' => $customer->lastname,
|
||||
'{id_order}' => (int) $order->id,
|
||||
);
|
||||
if (!Mail::Send(intval($order->id_lang), 'in_transit_dropshipping_noinfo',
|
||||
((is_array($_LANGMAIL) && key_exists($subject, $_LANGMAIL)) ? $_LANGMAIL[$subject] : $subject),
|
||||
$templateVars, $customer->email, $customer->firstname.' '.$customer->lastname)) {
|
||||
$errors++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ($errors == 0) {
|
||||
@ -392,11 +409,12 @@ class AdminAntDropshippingtracking extends AdminTab
|
||||
</div>
|
||||
<div class="panel-content">
|
||||
<form action="'.Tools::safeOutput($_SERVER['REQUEST_URI']).'" method="post" enctype="multipart/form-data">
|
||||
<div class="col-md-5 col-md-offset-4">';
|
||||
<div class="col-md-12">';
|
||||
$help = '<br>
|
||||
<p class="help-block">'.$this->l('Format: id_order;tracking_number;carrier;tracking_link').'</p>
|
||||
<p class="help-block">'.$this->l('The subsequent columns and the first line are ignored.').'</p>
|
||||
<p class="help-block">'.$this->l('Without tracking infos, .').'</p>
|
||||
<p class="help-block">'.$this->l('With tracking infos, all columns must be set.').'</p>
|
||||
<p class="help-block">'.$this->l('Without tracking infos, use the same format but columns tracking_number, carrier and tracking_link must be empty.').'</p>
|
||||
';
|
||||
$input = array(
|
||||
'label' => $this->l('Sale: '),
|
||||
|
Loading…
Reference in New Issue
Block a user