0
votes

Hi to all magento experts. I have problem on custom payment method in magento system. On payment information step in checkout progress i need to show radio button list under my payment method. Here is code:

<ul class="form-list" id="payment_form_<?php echo $_code ?>" style="display:none;">
<li>
<?php echo $this->getMethod()->getConfigData('message');?>
</li>
 <li>
    <span class="input-box">
        <input type="radio" title="<?php echo $this->__('option1') ?>" id="<?php echo $_code ?>_option1" name="payment[]" value="1" checked="true"><?php echo $this->__('option1') ?></input>
    </span>
</li>   
<li>        
    <span class="input-box">
        <input type="radio" title="<?php echo $this->__('option2') ?>" id="<?php echo $_code ?>_option2" name="payment[]" value="2" ><?php echo $this->__('option2') ?></input>
    </span>
</li>   
    <li>
    <span class="input-box">
        <input type="radio" title="<?php echo $this->__('option3') ?>" id="<?php echo $_code ?>_option3" name="payment[]" value="3" ><?php echo $this->__('option3') ?></input>
    </span>
</li>   

The problem is that I can't continue my process. Something is wrong and I suspect on validation. Please look at name attributes. They must all be equal so I can only chehk one of radio button, but I am not sure is it OK with magento?

Can please someone help me with this? I am new in magento world.

Thank you!

2

2 Answers

1
votes

Hope this will help. You can download the 'WebShopApps MatrixRate – #1 Multiple Table Rates Extension' which is free and check how it has been developed. Here's the link.

http://www.magentocommerce.com/magento-connect/webshopapps-matrixrate-1-multiple-table-rates-extension-certified-bug-free.html

0
votes

Your first input field has the attribute "checked" but with the wrong value. If you use HTML5 you only need to write "checked" - without an attribute value. If you prefer the XHTML style the correct value to use is "checked".

HTML5: <input type="radio" checked />

XHTML: <input type="radio" checked="checked" />

Hope this helps!