12792 - change orders history labels, order warning popup, display the correct "other delay" info
This commit is contained in:
parent
2a0058a24c
commit
ff92e381b9
@ -127,7 +127,7 @@ class BlockPaymentLogo extends Module
|
||||
$this->smarty->assign('delivery_date_end', $period['end']->getTimestamp());
|
||||
}
|
||||
elseif ($period == SaleCore::DATE_RANGE_OTHER_DELAY) {
|
||||
$this->smarty->assign('is_other_delay', true);
|
||||
$this->smarty->assign('delivery_other_delay_title', $this->context->cart->checkProductOtherDeliveryDelai(true));
|
||||
}
|
||||
}
|
||||
return $this->display(__FILE__, 'blockpaymentlogo-right.tpl');
|
||||
|
@ -797,7 +797,7 @@ class Cart extends CartCore
|
||||
* @Adding
|
||||
* @return false OR $title if there's another delay
|
||||
*/
|
||||
public function checkProductOtherDeliveryDelai()
|
||||
public function checkProductOtherDeliveryDelai($force_return_otherdelay=false)
|
||||
{
|
||||
if (Configuration::get('PS_CATALOG_MODE')) {
|
||||
return false;
|
||||
@ -816,6 +816,11 @@ class Cart extends CartCore
|
||||
}
|
||||
$count++;
|
||||
}
|
||||
|
||||
if ($force_return_otherdelay && !empty($title)) {
|
||||
return $title;
|
||||
}
|
||||
|
||||
//echo "<pre>";var_dump($otherdelay,$count,$title);echo "</pre>";die();
|
||||
if ($count != count($otherdelay) && !empty($title)) {
|
||||
return $title;
|
||||
|
@ -61,7 +61,7 @@ class HistoryController extends HistoryControllerCore
|
||||
$order['delivery_date_end'] = $delivery_dates['end']->getTimestamp();
|
||||
}
|
||||
elseif ($delivery_dates === SaleCore::DATE_RANGE_OTHER_DELAY) {
|
||||
$order['other_delay'] = true;
|
||||
$order['other_delay'] = $cart->checkProductOtherDeliveryDelai(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -203,7 +203,7 @@ class OrderController extends OrderControllerCore
|
||||
|
||||
/** @Override [ticket 9073] */
|
||||
$otherDelay = $this->context->cart->checkProductOtherDeliveryDelai();
|
||||
if ($otherDelay) {
|
||||
if ($otherDelay!==false) {
|
||||
$this->context->smarty->assign('isOtherDelay', true);
|
||||
$this->context->smarty->assign('otherDelayTitle', $otherDelay);
|
||||
}
|
||||
|
@ -8084,4 +8084,4 @@ padding: 10px 14px;
|
||||
.current_sales .carrier_discount_ctn p {
|
||||
font-family: BrandonGrotesque; }
|
||||
|
||||
/************************************/
|
||||
/************************************/
|
||||
|
@ -1899,6 +1899,11 @@ label{
|
||||
.landingpage #columns{
|
||||
background : none;
|
||||
}
|
||||
.fancybox-error.delivery_box {
|
||||
white-space: normal;
|
||||
width:360px;
|
||||
padding:24px 14px 24px 14px;
|
||||
}
|
||||
}
|
||||
.columns-container #columns.container{
|
||||
padding-bottom: 50px;
|
||||
@ -2341,7 +2346,7 @@ label{
|
||||
#order .fancybox-error {
|
||||
white-space: normal;
|
||||
}
|
||||
|
||||
|
||||
.fancybox-iframe #cms.cms-17.content_only{
|
||||
margin : 0;
|
||||
}
|
||||
|
@ -95,7 +95,7 @@
|
||||
<th class="first_item" data-sort-ignore="true">{l s='Order reference'}</th>
|
||||
<th class="item tablehide">{l s='Date'}</th>
|
||||
<th class="item">{l s='Total price'}</th>
|
||||
<th data-sort-ignore="true" data-hide="phone,tablet" class="item">{l s='Livraison estimée'}</th>
|
||||
<th data-sort-ignore="true" data-hide="phone,tablet" class="item">{l s='Livraison prévue'}</th>
|
||||
<th data-hide="phone" class="item tablehide">{l s='Status'}</th>
|
||||
<th data-sort-ignore="true" data-hide="phone,tablet" class="item tablehide">{l s='Invoice'}</th>
|
||||
<th data-sort-ignore="true" data-hide="phone,tablet" class="last_item tablehide"> </th>
|
||||
@ -126,7 +126,7 @@
|
||||
{l s='Entre le'} {$order.delivery_date_start|date_format:"%d/%m"}
|
||||
{l s='et le'} {$order.delivery_date_end|date_format:"%d/%m"}
|
||||
{elseif isset($order.other_delay) && $order.other_delay}
|
||||
{l s='Sous 48H'}
|
||||
{l s='Expédition sous '}{$order.other_delay}
|
||||
{else}
|
||||
-
|
||||
{/if}
|
||||
|
@ -56,12 +56,11 @@ $(document).ready(function(){
|
||||
$.fancybox.open([
|
||||
{
|
||||
type: 'inline',
|
||||
autoScale: false,
|
||||
autoScale: true,
|
||||
minHeight: 30,
|
||||
padding:15,
|
||||
width: 600,
|
||||
padding:20,
|
||||
autoCenter: true,
|
||||
content: '<p class="fancybox-error text-center clearfix">'+txtOtherdelay+'<br />'+txtOtherdelayPlus+'<br><br><a href="'+$(this).attr('href')+'" class="button-grey center" title="Je valide ma commande"> <span>Je valide ma commande</span> </a></p>'
|
||||
content: '<p class="fancybox-error delivery_box text-center clearfix">'+txtOtherdelay+'<br />'+txtOtherdelayPlus+'<br><br><a href="'+$(this).attr('href')+'" class="button-grey center" title="Je valide ma commande"> <span>Je valide ma commande</span> </a></p>'
|
||||
}],
|
||||
{
|
||||
padding: 0
|
||||
|
@ -44,8 +44,8 @@
|
||||
<br />{l s='et le' mod='blockpaymentlogo'}
|
||||
<br /><span class="block-delivery">{$delivery_date_end|date_format:"%A %d/%m"}</span>
|
||||
</li>
|
||||
{elseif isset($is_other_delay) && $is_other_delay}
|
||||
<li>{l s='Nous mettons tout en oeuvre pour expédier vos produits sous 48H' mod='blockpaymentlogo'}</li>
|
||||
{elseif isset($delivery_other_delay_title)}
|
||||
<li>{l s='Nous mettons tout en oeuvre pour expédier vos produits sous %s' sprintf=[$delivery_other_delay_title] mod='blockpaymentlogo'}</li>
|
||||
{else}
|
||||
{*
|
||||
<li>
|
||||
|
@ -534,7 +534,7 @@
|
||||
{addJsDef otherDelayTitle=$otherDelayTitle}
|
||||
{addJsDefL name=txtOtherdelay}{l s='Attention, dans votre panier figure un ou plusieurs produits qui ne bénéficient pas de la livraison %s,' sprintf=[$otherDelayTitle] js=1}{/addJsDefL}
|
||||
{if isset($delivery_date_start)}
|
||||
{addJsDefL name=txtOtherdelayPlus}{l s=' votre commande sera donc expédiée entre le <span style="color:#f05349">%s et le %s</span>.' sprintf=[$delivery_date_start|date_format:"%A %d/%m",$delivery_date_end|date_format:"%A %d/%m"] js=1}{/addJsDefL}
|
||||
{addJsDefL name=txtOtherdelayPlus}{l s=' votre commande sera donc expédiée<br />entre le <span style="color:#f05349">%s</span> et le <span style="color:#f05349">%s</span>.' sprintf=[$delivery_date_start|date_format:"%A %d/%m",$delivery_date_end|date_format:"%A %d/%m"] js=1}{/addJsDefL}
|
||||
{else}
|
||||
{addJsDefL name=txtOtherdelayPlus}{l s=' votre commande sera donc expédiée dans les délais habituels de 15 à 35 jours.' js=1}{/addJsDefL}
|
||||
{/if}
|
||||
|
Loading…
Reference in New Issue
Block a user