Check time
This commit is contained in:
parent
6915872212
commit
645d3bd0a1
@ -42,14 +42,25 @@ class OrderConfirmationController extends OrderConfirmationControllerCore
|
||||
require_once _PS_ROOT_DIR_.'/modules/privatesales_delay/saledelay.php';
|
||||
$products = SaleDelay::associateDelay($products);
|
||||
}
|
||||
|
||||
|
||||
// check date order if page is refresh and not affect analytics
|
||||
$timestamp_check = new DateTime();
|
||||
$timestamp_check->createFromFormat('Y-m-d H:i:s', $order->date_add);
|
||||
$timestamp_check->add(new DateInterval('PT1H'));
|
||||
$timestamp = $timestamp_check->getTimestamp();
|
||||
$analytics_timeover = 0;
|
||||
if (time() > $timestamp) {
|
||||
$analytics_timeover = 1;
|
||||
}
|
||||
|
||||
self::$smarty->assign(
|
||||
array(
|
||||
'customer' => $customer,
|
||||
'order' => $order,
|
||||
'address_delivery' => $address_delivery,
|
||||
'address_invoice' => $address_invoice,
|
||||
'products' => $products
|
||||
'products' => $products,
|
||||
'analytics_timeover' => $analytics_timeover,
|
||||
)
|
||||
);
|
||||
self::$smarty->display(_PS_THEME_DIR_.'order-confirmation.tpl');
|
||||
|
Loading…
Reference in New Issue
Block a user