I created previously custom payment methods.For that I added successfully extra fields using following code in my model logic.

protected $_formBlockType = 'newmodule/purchaseorder';
protected $_infoBlockType = 'newmodule/purchaseorderinfo';

But magento didn't provide any logic for creating forms in shipping module. Please give me some direction to this?


It's not intended. If you look at the template app/design/frontend/base/default/template/checkout/onepage/shipping_method/available.phtml which shows the available shipping methods, no additional blocks are loaded and there is no kind of hook to change the HTML either. You would have to replace this template and implement something on your own.

Another possibility is to add custom fields to the shipping_method form that are not related to a specific shipping method, in the block checkout.onepage.shipping_method.additional. Unfortunately this one doesn't render its children by default, like I would expect from an "additional" block, but this requires only little change:

Copy app/design/frontend/base/default/template/checkout/onepage/shipping_method/additional.phtml, add echo $this->getChildHtml() at the end and replace it in your modules layout XML file.

Then you can add new blocks inside it with anything you want. You could also use JavaScript to display the form only if a specific shipping method is selected.


Now we can create brst_shipping.xml:

<?xml version="1.0"?>
                <Mage_Shipping />

let’s make our module configurable in the admin panel by copying the following into app/code/local/Brst/Shipping/etc/system.xml: Smashing Magazine Carrier text 2 1 1 1

                        This shipping carrier abstract checks
                        this value to determine whether
                        the carrier should be shown.
                    <active translate="label">
                        This value can be used to specify a
                        custom title for our method.
                    <title translate="label">
                        The sort order is used in Magento
                        to determine what order the carrier
                        will appear in relative to the
                        other carriers available.
                    <sort_order translate="label">
                        <label>Sort Order</label>
                        This value is used to specify whether
                        the carrier is available only for
                        specific countries or all countries
                        available in the current Magento
                    <sallowspecific translate="label">
                        <label>Ship to Applicable Countries</label>
                        If 'specific countries' is chosen
                        in the previous option, then this field
                        allows the administrator to specify
                        which specific countries this carrier
                        should be available for.
                    <specificcountry translate="label">
                        <label>Ship to Specific Countries</label>

You can creating forms in shipping module by the above system.xml file. Hope this will help you.

  • thanks for your response.But you misunderstood my question.I'm asking custom form fields at shipping method(checkout) in front end – sivakumar Jul 10 '14 at 14:30

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.