29 lines
841 B
PHP
29 lines
841 B
PHP
<?php
|
|
|
|
class HistoryController extends HistoryControllerCore
|
|
{
|
|
|
|
|
|
public static function getUrlToReorder($id_order, $context)
|
|
{
|
|
$url_to_reorder = '';
|
|
|
|
$ord = new Order($id_order);
|
|
$date =
|
|
$date = explode(" ",$ord->date_add);
|
|
$date1 = explode("-",$date[0]);
|
|
$date2 = explode(":",$date[1]);
|
|
$dd = mktime($date2[0],$date2[1],$date2[2],$date1[1],$date1[2],$date1[0]);
|
|
//echo $context->cart->date_add."//".$dd.'-<br>';
|
|
$dateest = 1537308000; //19/09/2018 00:00:00
|
|
if (!(bool) Configuration::get('PS_DISALLOW_HISTORY_REORDERING')) {
|
|
if ($dd>=$dateest) {
|
|
$url_to_reorder = $context->link->getPageLink('order', TRUE, NULL, 'submitReorder&id_order=' . (int) $id_order);
|
|
}
|
|
}
|
|
|
|
return $url_to_reorder;
|
|
}
|
|
|
|
}
|