Force saving date

This commit is contained in:
Michael RICOIS 2017-11-07 14:36:27 +01:00
parent 33617461b8
commit e382b75a7c
2 changed files with 24 additions and 18 deletions

View File

@ -121,17 +121,28 @@ class OrderController extends OrderControllerCore
}
}
}
if (empty(Tools::getValue('date-carrier')) && $echantillons == false) {
Tools::redirect('index.php?controller=order&step=1');
}
if(Tools::isSubmit('processAddress'))
if(Tools::isSubmit('processAddress')) {
$this->processAddress();
if (Tools::isSubmit('processCarrier')) {
$this->_updateMessage(Tools::getValue('message'));
}
$message = "Je vous prie de me livrer le ".Tools::getValue('date-carrier');
$realMessage = Tools::getValue('message', '');
$message.= (empty($realMessage) ? '' : " ".$realMessage);
$this->_updateMessage($message);
/*if (Tools::isSubmit('processCarrier')) {
$message = "Je vous prie de me livrer le ".Tools::getValue('date-carrier');
$realMessage = Tools::getValue('message', '');
$message.= (empty($realMessage) ? '' : $realMessage);
echo " - ".$message;
$this->_updateMessage($message);
}*/
if ($know = strtolower(Tools::getValue('howknowus'))) {
if (!empty($know)) {
$id_customer = $this->context->customer->id;

View File

@ -207,11 +207,6 @@ $(function() {
return [true, ''];
}
}});
//$('#date-carrier').datepicker({dateFormat: "dd/mm/yy"});
$('#date-carrier').change(function(){
var dateVal = $('#date-carrier').val();
$('#ordermsg .form-control').val(dateSentence + dateVal);
});
});
</script>
{/literal}