I'm try to make a module
i have a hook hookDisplayBeforeCarrier
here. I created a input
<input type="date" value="2017-02-14">
How can i get the this input value?
My codes:
public function hookDisplayBeforeCarrier()
{
$output = $this->context->smarty->fetch($this->local_path.'views/templates/frontend/delivery.tpl');
return $output;
}
Tpl file:
<div class="deliverydate">
<p> {l s='Select Delivery Date' mod='selectdeliverydate'} : <input type="date" value="2017-02-14"></p>
</div>
First of all add name="your_variable" to the input tag.
To save its value you can add a button with this input and on clicking that button you have to send an ajax request to fetch its value and take appropriate action.
I hope this helps.
You can try it with this module https://www.prestashop.com/forums/topic/589259-m%C3%B3dulo-selector-fecha-en-pedido/