showing delivery delay estimation on product tpl
This commit is contained in:
parent
2b9fd29308
commit
02af220b58
@ -12,6 +12,15 @@ class ProductController extends ProductControllerCore {
|
||||
'HOOK_PRIVATESALES_PRODUCT' => Module::hookExec('privatesales_product', array('sale' => $sale)),
|
||||
'is_sale_home' => ($sale? $sale->id_category == $id_category: FALSE),
|
||||
));
|
||||
|
||||
// assign date estimation from sale delay
|
||||
if (Module::isInstalled('privatesales_delay')) {
|
||||
if (!class_exists('SaleDelay')) {
|
||||
require_once _PS_ROOT_DIR_.'/modules/privatesales_delay/saledelay.php';
|
||||
}
|
||||
$date = new DateTime();
|
||||
$delivery_date = SaleDelay::getDeliveryDate(array($sale->delivery_delay), null, $date);
|
||||
}
|
||||
}
|
||||
|
||||
$bestSaleCart = Module::hookExec('bestSaleCart');
|
||||
@ -19,6 +28,7 @@ class ProductController extends ProductControllerCore {
|
||||
'bestSaleCart' => $bestSaleCart,
|
||||
'product' => $this->product,
|
||||
'coverImage' => Product::getCover($this->product->id),
|
||||
'delivery_date' => (!empty($delivery_date)?$delivery_date:null),
|
||||
));
|
||||
}
|
||||
|
||||
|
@ -6571,6 +6571,24 @@ table#carrierTable tbody td {
|
||||
text-align:center;
|
||||
}
|
||||
|
||||
/**** product page show delivery date estimation ****/
|
||||
.delivery-delay-estimation h4{
|
||||
display: inline-block;
|
||||
border: 3px dashed #514C8B;
|
||||
border-left: 0px;
|
||||
border-right: 0px;
|
||||
border-top: 0px;
|
||||
margin: 10px 0 5px 0;
|
||||
font-size: 16px;
|
||||
border-style: double;
|
||||
}
|
||||
.delivery-delay-estimation p b{
|
||||
color: #fb66a9;
|
||||
}
|
||||
#product .product_info .info .pink {
|
||||
color: #fb66a9;
|
||||
}
|
||||
|
||||
@keyframes slideInDown {
|
||||
0% {
|
||||
-webkit-transform: translateY(-500px);
|
||||
|
@ -482,6 +482,16 @@ var fieldRequired = '{l s='Please fill in all required fields, then save the cus
|
||||
{l s='Paiement'} <span class="pink">{l s='sécurisé'}</span> <br />
|
||||
{l s='Paypal & CB'}
|
||||
</div>
|
||||
{if isset($delivery_date)}
|
||||
<div class="delivery-delay-estimation">
|
||||
<h4>{l s='Delivery Delay Estimation'}</h4>
|
||||
{foreach from=$delivery_date item=date}
|
||||
<p>
|
||||
<b>{$date.name}</b> : {l s='Date de réception prévue entre le'} <strong>{$date.date_start|date_format:'%d/%m/%Y'}</strong> {l s='et le'} <strong>{$date.date_end|date_format:'%d/%m/%Y'}</strong>
|
||||
</p>
|
||||
{/foreach}
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
{if !empty($product->description_delivery)}
|
||||
{$product->description_delivery}
|
||||
|
Loading…
Reference in New Issue
Block a user