Force saving date
This commit is contained in:
parent
33617461b8
commit
e382b75a7c
@ -114,24 +114,35 @@ class OrderController extends OrderControllerCore
|
|||||||
|
|
||||||
$echantillons = false;
|
$echantillons = false;
|
||||||
if ($this->nbProducts == 1) {
|
if ($this->nbProducts == 1) {
|
||||||
$products = $this->context->cart->getProducts();
|
$products = $this->context->cart->getProducts();
|
||||||
foreach($products as $p) {
|
foreach($products as $p) {
|
||||||
if ($p['id_product'] == 193) {
|
if ($p['id_product'] == 193) {
|
||||||
$echantillons = true;
|
$echantillons = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (empty(Tools::getValue('date-carrier')) && $echantillons == false) {
|
if (empty(Tools::getValue('date-carrier')) && $echantillons == false) {
|
||||||
Tools::redirect('index.php?controller=order&step=1');
|
Tools::redirect('index.php?controller=order&step=1');
|
||||||
}
|
}
|
||||||
|
|
||||||
if(Tools::isSubmit('processAddress'))
|
if(Tools::isSubmit('processAddress')) {
|
||||||
$this->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 ($know = strtolower(Tools::getValue('howknowus'))) {
|
||||||
if (!empty($know)) {
|
if (!empty($know)) {
|
||||||
$id_customer = $this->context->customer->id;
|
$id_customer = $this->context->customer->id;
|
||||||
|
@ -206,12 +206,7 @@ $(function() {
|
|||||||
} else {
|
} else {
|
||||||
return [true, ''];
|
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>
|
</script>
|
||||||
{/literal}
|
{/literal}
|
||||||
|
Loading…
Reference in New Issue
Block a user