Post by jonghwa » Thu Jan 17, 2013 5:23 pm

Hi all,


I was modifying two files:

checkout/payment_method.tpl
checkout/shipping_method.tpl

It works with the following code.

Code: Select all

<textarea name="comment" rows="8" style="width: 98%;"><?php echo $comment; ?></textarea>
However, the following code doesn't pass the $_POST variable to PHP page.

Code: Select all

<input type="text" name="comment" style="width: 98%;" value="<?php echo $comment; ?>" />
It occurs the notice warning: "Undefined index comment"

I don't understand why it doesn't work due to the difference between textarea and input type=text

Help me...

핀코인 (http://pincoin.co.kr)

extensions by pincoin


User avatar
New member

Posts

Joined
Thu Oct 25, 2012 12:29 pm
Location - Seoul

Post by jonghwa » Thu Jan 17, 2013 5:54 pm

I got the answer.

The variables were passed by "ajax", and "textarea" type has been fixed.

FROM:

Code: Select all

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

Code: Select all

data: $('#shipping-method input[type=\'radio\']:checked, #shipping-method input[type=\'text\']'),
FROM:

Code: Select all

data: $('#payment-method input[type=\'radio\']:checked, #payment-method input[type=\'checkbox\']:checked, #payment-method textarea'),
TO:

Code: Select all

data: $('#payment-method input[type=\'radio\']:checked, #payment-method input[type=\'checkbox\']:checked, #payment-method input[type=\'text\']'),

핀코인 (http://pincoin.co.kr)

extensions by pincoin


User avatar
New member

Posts

Joined
Thu Oct 25, 2012 12:29 pm
Location - Seoul
Who is online

Users browsing this forum: No registered users and 72 guests