0

I am using Magento 1.9.1.0. Below mentioned error happen after payment made by using paypal express checkout.

Steps 1: Register and add a product to cart

Steps 2: Give the Billing Information & Payment Information -Paypal Express Checkout

Steps 3: Make payment

after Pay now button click page shows like this:-

Fatal error: Call to a member function getTelephone() on boolean in /app/code/core/Mage/Sales/Model/Order.php on line 1293

Refresh

Unable to initialize Express Checkout.

Error occurred line in this function:-

    public function getShippingCarrier()
{
    $carrierModel = $this->getData('shipping_carrier');
    if (is_null($carrierModel)) {
        $carrierModel = false;
        /**
         * $method - carrier_method
         */
        $method = $this->getShippingMethod(true);
        if ($method instanceof Varien_Object) {
            $className = Mage::getStoreConfig('carriers/' . $method->getCarrierCode() . '/model');
            if ($className) {
                $carrierModel = Mage::getModel($className);
            }  // error occured line
        }
        $this->setData('shipping_carrier', $carrierModel);
    }
    return $carrierModel;
}

how to rectify this issue?

0

I tried lot and finally find a solution. Already existing user doesn't happen in this error (Fatal error: Call to a member function getTelephone() on boolean in

/app/code/core/Mage/Sales/Model/Order.php

on line 1293) Newly registered user with first order only failed after that next orders working properly.

In registration page:

  • First Name
  • Last Name
  • Email Address
  • Password & Confirm password.

Solution:-

Additionally, I added Billing address after that it's newly added user with first order and next orders working fine.

How to add billing addressing in registration page.

There are two methods:-

Method 1:- Steps:

/app/design/frontend/{packagetheme}/default/template/persistent/customer/form/registration.phtml

Add the below given code

<?php $this->setShowAddressFields(true); ?> //for billing address show

before,

<?php if($this->getShowAddressFields()): ?>

Now,look like this,

 <?php $this->setShowAddressFields(true); ?>  
 <?php if($this->getShowAddressFields()): ?>

Method 2:-

Steps:

/app/design/frontend/{packagetheme}/default/layout/customer.xml

– Add inside customer_account_create node:

<action method="setShowAddressFields"><value>true</value></action>

Now,look like this in xml page,

<customer_account_create translate="label"> <label>Customer Account Registration Form</label> <!-- Mage_Customer --> <remove name="right"/> <remove name="left"/>   <reference name="root">
<action method="setTemplate"><template>page/1column.phtml</template></action> </reference> <reference name="content">
<block type="customer/form_register" name="customer_form_register" template="customer/form/register.phtml">
<action method="setShowAddressFields"><value>true</value></action>
<block type="page/html_wrapper" name="customer.form.register.fields.before" as="form_fields_before" translate="label">
<label>Form Fields Before</label>
</block>
</block> 
</reference> </customer_account_create>

By anyone method you can add billing address in registration page.

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.