Post by matrix4495 » Fri Jun 08, 2012 11:52 pm

I am trying to convert comment box of Delivery Method into a drop down menu for time selection

and i am getting this error

SyntaxError: JSON.parse: unexpected character

OK

Notice: Undefined index: comment in/catalog/controller/checkout/shipping_method.php on line 151

can somebody please help me.
i am running 1.5.3.1

Newbie

Posts

Joined
Mon May 14, 2012 9:03 pm

Post by inactiveaccount9912 » Sat Jun 09, 2012 5:58 am

Here is how I just tested it and it works:

Edit catalog/view/theme/yourtheme/template/checkout/shipping_method.tpl
and find:

Code: Select all

<textarea name="comment" rows="8" style="width: 98%;"><?php echo $comment; ?></textarea>
and replace it with something like:

Code: Select all

<select name="comment">
<?php if ($comment == 'After 12pm') { ?>
      <option value="After 12pm" selected="selected">After 12pm</option>
      <?php } else { ?>
      <option value="After 12pm">After 12pm</option>
      <?php } ?>
<?php if ($comment == 'After 17pm') { ?>
      <option value="After 17pm" selected="selected">After 17pm</option>
      <?php } else { ?>
      <option value="After 17pm">After 17pm</option>
      <?php } ?>	  

</select>
Then edit catalog/view/theme/yourtheme/template/checkout/checkout.tpl and find the line:

Code: Select all

data: $('#shipping-method input[type=\'radio\']:checked, #shipping-method textarea'),
and replace it with:

Code: Select all

data: $('#shipping-method input[type=\'radio\']:checked, #shipping-method textarea, #shipping-method select'),
Then you might also want to delete the comment from payment method step.

Expert Member

Posts

Joined
Fri May 14, 2010 2:36 am

Post by matrix4495 » Sat Jun 09, 2012 10:37 pm

thanks man.... worked! :)

Newbie

Posts

Joined
Mon May 14, 2012 9:03 pm
Who is online

Users browsing this forum: Majestic-12 [Bot] and 70 guests