0

I basically want to disable this section where it asks the logged in user whether "Select a billing address from your address book or enter a new address."

I have tried removing the condition in billing.phtml but then it will just appear blank. I need it to take the logged in user to the exact same process as guest users (display the billing form automatically).

Here is the condition in billing.phtml:

<?php if ($this->customerHasAddresses()): ?>
        <li class="wide">
            <label for="billing-address-select"><?php echo $this->__('Select a billing address from your address book or enter a new address.') ?></label>
            <div class="input-box">
                <?php echo $this->getAddressesHtmlSelect('billing') ?>
            </div>
        </li>
    <?php endif; ?>

I'm sure there is more than just removing this block of code...

  • Hello Jnsn_ Can you write same thing for magento 2 ??? – SURENDER SINGH Dec 6 '17 at 12:17
1

Try this solution it will help you... Go to file "checkout/onepage/billing.phtml" Remove bellow code at line 30

<?php if ($this->customerHasAddresses()): ?>
    <li class="wide">
        <label for="billing-address-select"><?php echo $this->__('Select a billing address from your address book or enter a new address.') ?></label>
        <div class="input-box">
            <?php echo $this->getAddressesHtmlSelect('billing') ?>
        </div>
    </li>
<?php endif; ?>

and remove if condition at line 38 <?php if ($this->customerHasAddresses()): ?> style="display:none;"<?php endif; ?>

Also Remove below code at Line 173 :

<?php if ($this->isCustomerLoggedIn() && $this->customerHasAddresses()):?>
                <li class="control">
                    <input type="checkbox" name="billing[save_in_address_book]" value="1" title="<?php echo $this->__('Save in address book') ?>" id="billing:save_in_address_book" onchange="if(window.shipping) shipping.setSameAsBilling(false);"<?php if ($this->getAddress()->getSaveInAddressBook()):?> checked="checked"<?php endif;?> class="checkbox" /><label for="billing:save_in_address_book"><?php echo $this->__('Save in address book') ?></label>
                </li>
            <?php else:?>
                <li class="no-display"><input type="hidden" name="billing[save_in_address_book]" value="1" /></li>
            <?php endif; ?>

Note : Must have a backup of billing.phtml before editing.

  • PERFECT!!!! I'm sure someone else down the road will want this too – Jnsn_ Nov 23 '15 at 16:00

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.