0

I'm trying to add a custom form for cash on delivery in checkout page for a theme called 'radius'.

I tried by adding cashondelivery.phtml with my custom fields to app\design\frontend\radius\default\template\payment\form path.

But the fields added are not showing in checkout page when i select "cash on delivery" method.

Please suggest me a way.

Thanks in advance.

1

Make sure cash on delivery form coming at file path

app\design\frontend\base\default\template\payment\form\cashondelivery.phtml

So please copy base file to your theme at path app\design\frontend\radius\default\template\payment\form\cashondelivery.phtml and replace code from

<?php if ($this->getInstructions()): ?>
    <ul class="form-list checkout-agreements" id="payment_form_<?php echo $this->getMethodCode() ?>" style="display:none;">
        <li>
            <div class="<?php echo $this->getMethodCode() ?>-instructions-content agreement-content">
                <?php echo nl2br($this->getInstructions()) ?>
            </div>
        </li>
    </ul>
<?php endif; ?>

To

<?php $_code=$this->getMethodCode() ?>
<ul class="form-list" id="payment_form_<?php echo $_code ?>" style="display:none;">
    <li>
        <?php echo  'add custom form code here....'?>
    </li>
<?php if ($this->getInstructions()): ?>
    <li>
        <div class="<?php echo $_code ?>-instructions-content agreement-content">
                <?php echo nl2br($this->getInstructions()) ?>
        </div>  
    </li>
<?php endif; ?>
</ul>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.