SwissUpLabs Logo

Housenumber field

Firecheckout can convert the second street line field into housenumber. All you need is to call the javascript initialization from firecheckout page.

  1. Create custom.js file - Using custom.css and custom.js
  2. Add the following code inside created custom.js

    document.observe('dom:loaded', function() {
        var addressTypes = ['billing', 'shipping'];
        addressTypes.each(function(addressType) {
            if (!$(addressType + '-new-address-form')) {
                return;
            }
            new FC.Housenumber(addressType, {
                required: ['IE', 'CH'],
                optional: ['*'],
                label: Translator.translate('House Number')
            });
        });
    });
    
  3. Let’s translate the field! Create custom.phtml file - Using custom.phtml
  4. Add the following content into this file:

    <script>
        Translator.add('House Number', "<?php echo $this->__('House Number') ?>");
    </script>
    
  5. Add translations to your theme csv file - app/design/frontend/argento/default/locale/de_DE/translate.csv:

    "House Number","Hausnummer"
    

Result:

Housenumber

Edit this Page