php - Custom option for delivery date not display in Magento checkout page as desired -


i add custom option product select delivery date in magento 1.9.0.1. it's input type date.( if use type date & time, dropdown box come select time. need select time picker) set

 var calendarsetupobject = {                 inputfield  : "' . $this->getid() . '",                 ifformat: "%y-%m-%e %h:%m:%s", //changed line                 showstime: true,               //changed line                 button      : "' . $this->getid() . '_trig",                 align       : "bl",                 singleclick : true, 

in app/code/core/mage/core/block/html/date.php can select both date , time. picture below enter image description here

but in checkout page delivery date shows date not time. please refer below image enter image description here

also in backend sales->order details page shows only date, need both date , time.

please me..

first of apology delayed reply. followed below approach rid of problem.

1 .first of override core files local\mage\core\block\html\date.php following changes.(as mentioned).

2.added following js script modify hour , time field.

jquery(document).ready(function() {    var datefield = jquery('#product-options-wrapper').find('.input-text');    jquery(datefield).on('change',function(){         var _self = jquery(this).attr('id');         var datetime = jquery(this).val();         var temp=  _self.split('date');         datetime = datetime.split(' ');         var ctime =datetime[1];         var selected_time = ctime.split(':');         jquery('#'+temp[0]+'hour').val(parseint(selected_time[0]));         jquery('#'+temp[0]+'minute').val(parseint(selected_time[1]));     }); }); 

please make sure type should date time of custom option.if want hide hour , minute field, please set visibility hidden of span class time-picker on date.phtml page.

<span class="time-picker" style="visibility: hidden"> 

Comments

Popular posts from this blog

php - failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request -

java - How to filter a backspace keyboard input -

java - Show Soft Keyboard when EditText Appears -