4

I am working on Rojudeal website. I am not using any other third party module for checkout because i am using default onepagecheckout of magento. When i tried to checkout, steps are not calling by clicks on continue for continue as guest and by register as well as logged in customer from the Billing information step.

Note:

I have installed the following patches:

SUPEE-5994, SUPEE-6237, SUPEE-6285, SUPEE-6482, SUPEE-7616, SUPEE-8167, SUPEE-8967, SUPEE-9652, SUPEE-10336_v1.14.2.4

Same issue is happening with base, default theme also.

So, finally i figured out this is happened due to js and css only.

Error in console :

prototype.js:1 Uncaught TypeError: e is not a function
    at t.initialize (prototype.js:1)
    at new t (prototype.js:1)
    at t.save (opcheckout.js:372)
    at HTMLButtonElement.onclick ((index):696)

My billing.phtml file path is :

/app/design/frontend/smartwave/porto/template/persistent/checkout/onepage/billing.phtml

billing.phtml file is as follows :

<form id="co-billing-form" action="">
<?php echo $this->getBlockHtml('formkey'); ?>
<div class="fieldset">
    <p class="required"><?php echo $this->__('* Required Fields') ?></p>
    <ul class="form-list">
    <?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; ?>
    <li id="billing-new-address-form"<?php if ($this->customerHasAddresses()): ?> style="display:none;"<?php endif; ?> class="scaffold-form">
        <div class="fieldset">
            <input type="hidden" name="billing[address_id]" value="<?php echo $this->getAddress()->getId() ?>" id="billing:address_id" />
            <ul>
                <li class="fields"><?php echo $this->getLayout()->createBlock('customer/widget_name')->setObject($this->getAddress()->getFirstname() ? $this->getAddress() : $this->getQuote()->getCustomer())->setForceUseCustomerRequiredAttributes(!$this->isCustomerLoggedIn())->setFieldIdFormat('billing:%s')->setFieldNameFormat('billing[%s]')->toHtml() ?></li>
                <li class="fields">
                    <div class="field">
                        <label for="billing:company"><?php echo $this->__('Company') ?></label>
                        <div class="input-box">
                            <input type="text" id="billing:company" name="billing[company]" value="<?php echo $this->escapeHtml($this->getAddress()->getCompany()) ?>" title="<?php echo $this->__('Company') ?>" class="input-text <?php echo $this->helper('customer/address')->getAttributeValidationClass('company') ?>" />
                        </div>
                    </div>
        <?php if(!$this->isCustomerLoggedIn()): ?>
                    <div class="field">
                        <label for="billing:email" class="required"><em>*</em><?php echo $this->__('Email Address') ?></label>
                        <div class="input-box">
                            <input type="email" autocapitalize="off" autocorrect="off" spellcheck="false" name="billing[email]" id="billing:email" value="<?php echo $this->escapeHtml($this->getAddress()->getEmail()) ?>" title="<?php echo $this->__('Email Address') ?>" class="input-text validate-email required-entry" />
                        </div>
                    </div>
        <?php endif; ?>
                </li>
        <?php $_streetValidationClass = $this->helper('customer/address')->getAttributeValidationClass('street'); ?>
                <li class="wide">
                    <label for="billing:street1" class="required"><em>*</em><?php echo $this->__('Address') ?></label>
                    <div class="input-box">
                        <input type="text" title="<?php echo $this->__('Street Address') ?>" name="billing[street][]" id="billing:street1" value="<?php echo $this->escapeHtml($this->getAddress()->getStreet(1)) ?>" class="input-text <?php echo $_streetValidationClass ?>" />
                    </div>
                </li>
        <?php $_streetValidationClass = trim(str_replace('required-entry', '', $_streetValidationClass)); ?>
        <?php for ($_i = 2, $_n = $this->helper('customer/address')->getStreetLines(); $_i <= $_n; $_i++): ?>
                <li class="wide">
                    <label for="billing:street<?php echo $_i ?>"><?php echo $this->__('Street Address %s', $_i) ?></label>
                    <div class="input-box">
                        <input type="text" title="<?php echo $this->__('Street Address %s', $_i) ?>" name="billing[street][]" id="billing:street<?php echo $_i ?>" value="<?php echo $this->escapeHtml($this->getAddress()->getStreet($_i)) ?>" class="input-text <?php echo $_streetValidationClass ?>" />
                    </div>
                </li>
        <?php endfor; ?>
                <?php if ($this->helper('customer/address')->isVatAttributeVisible()) : ?>
                <li class="wide">
                    <label for="billing:vat_id"><?php echo $this->__('VAT Number') ?></label>
                    <div class="input-box">
                        <input type="text" id="billing:vat_id" name="billing[vat_id]" value="<?php echo $this->escapeHtml($this->getAddress()->getVatId()) ?>" title="<?php echo $this->__('VAT Number') ?>" class="input-text <?php echo $this->helper('customer/address')->getAttributeValidationClass('vat_id') ?>" />
                    </div>
                </li>
                <?php endif; ?>
                <li class="fields">
                    <div class="field">
                        <label for="billing:city" class="required"><em>*</em><?php echo $this->__('City') ?></label>
                        <div class="input-box">
                            <input type="text" title="<?php echo $this->__('City') ?>" name="billing[city]" value="<?php echo $this->escapeHtml($this->getAddress()->getCity()) ?>" class="input-text <?php echo $this->helper('customer/address')->getAttributeValidationClass('city') ?>" id="billing:city" />
                        </div>
                    </div>
                    <div class="field">
                        <label for="billing:region_id" class="required"><em>*</em><?php echo $this->__('State/Province') ?></label>
                        <div class="input-box">
                            <select id="billing:region_id" name="billing[region_id]" title="<?php echo $this->__('State/Province') ?>" class="validate-select" style="display:none;">
                                <option value=""><?php echo $this->__('Please select region, state or province') ?></option>
                            </select>
                            <script type="text/javascript">
                            //<![CDATA[
                                $('billing:region_id').setAttribute('defaultValue',  "<?php echo $this->getAddress()->getRegionId() ?>");
                            //]]>
                            </script>
                            <input type="text" id="billing:region" name="billing[region]" value="<?php echo $this->escapeHtml($this->getAddress()->getRegion()) ?>"  title="<?php echo $this->__('State/Province') ?>" class="input-text <?php echo $this->helper('customer/address')->getAttributeValidationClass('region') ?>" style="display:none;" />
                        </div>
                    </div>
                </li>
                <li class="fields">
                    <div class="field">
                        <label for="billing:postcode" class="required"><em>*</em><?php echo $this->__('Zip/Postal Code') ?></label>
                        <div class="input-box">
                            <input type="text" title="<?php echo $this->__('Zip/Postal Code') ?>" name="billing[postcode]" id="billing:postcode" value="<?php echo $this->escapeHtml($this->getAddress()->getPostcode()) ?>" class="input-text validate-zip-international <?php echo $this->helper('customer/address')->getAttributeValidationClass('postcode') ?>" />
                        </div>
                    </div>
                    <div class="field">
                        <label for="billing:country_id" class="required"><em>*</em><?php echo $this->__('Country') ?></label>
                        <div class="input-box">
                            <?php echo $this->getCountryHtmlSelect('billing') ?>
                        </div>
                    </div>
                </li>
                <li class="fields">
                    <div class="field">
                        <label for="billing:telephone" class="required"><em>*</em><?php echo $this->__('Telephone') ?></label>
                        <div class="input-box">
                            <input type="tel" name="billing[telephone]" value="<?php echo $this->escapeHtml($this->getAddress()->getTelephone()) ?>" title="<?php echo $this->__('Telephone') ?>" class="input-text <?php echo $this->helper('customer/address')->getAttributeValidationClass('telephone') ?>" id="billing:telephone" />
                        </div>
                    </div>
                    <div class="field">
                        <label for="billing:fax"><?php echo $this->__('Fax') ?></label>
                        <div class="input-box">
                            <input type="tel" name="billing[fax]" value="<?php echo $this->escapeHtml($this->getAddress()->getFax()) ?>" title="<?php echo $this->__('Fax') ?>" class="input-text <?php echo $this->helper('customer/address')->getAttributeValidationClass('fax') ?>" id="billing:fax" />
                        </div>
                    </div>
                </li>

                <?php if(!$this->isCustomerLoggedIn()): ?>

        <?php $_dob = $this->getLayout()->createBlock('customer/widget_dob') ?>
        <?php $_gender = $this->getLayout()->createBlock('customer/widget_gender') ?>
            <?php if ($_dob->isEnabled() || $_gender->isEnabled()): ?>
                <li class="fields">
                <?php if ($_dob->isEnabled()): ?>
                    <div class="field">
                        <?php echo $_dob->setDate($this->getQuote()->getCustomerDob())->setFieldIdFormat('billing:%s')->setFieldNameFormat('billing[%s]')->toHtml() ?>
                    </div>
                <?php endif; ?>
                <?php if ($_gender->isEnabled()): ?>
                    <div class="field">
                        <?php echo $_gender->setGender($this->getQuote()->getCustomerGender())->setFieldIdFormat('billing:%s')->setFieldNameFormat('billing[%s]')->toHtml() ?>
                    </div>
                <?php endif ?>
                </li>
            <?php endif ?>

            <?php if ($this->isTaxvatEnabled()):?>
                <li><?php echo $this->getTaxvatHtml() ?></li>
            <?php endif; ?>

                <li class="fields" id="register-customer-password">
                    <div class="field">
                        <label for="billing:customer_password" class="required"><em>*</em><?php echo $this->__('Password') ?></label>
                        <div class="input-box">
                            <input type="password" name="billing[customer_password]" id="billing:customer_password" title="<?php echo $this->__('Password') ?>" class="input-text required-entry validate-password" />
                        </div>
                    </div>
                    <div class="field">
                        <label for="billing:confirm_password" class="required"><em>*</em><?php echo $this->__('Confirm Password') ?></label>
                        <div class="input-box">
                            <input type="password" name="billing[confirm_password]" title="<?php echo $this->__('Confirm Password') ?>" id="billing:confirm_password" class="input-text required-entry validate-cpassword" />
                        </div>
                    </div>
                </li>
                <?php echo $this->getChildHtml('persistent.remember.me'); ?>
                <?php endif; ?>
                <?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; ?>
                <?php echo $this->getChildHtml('form.additional.info'); ?>
            </ul>
            <?php echo $this->getChildHtml('persistent.remember.me.tooltip'); ?>
        </div>
     </li>
    <?php if ($this->canShip()): ?>
        <li class="control">
            <input type="radio" name="billing[use_for_shipping]" id="billing:use_for_shipping_yes" value="1"<?php if ($this->isUseBillingAddressForShipping()) {?> checked="checked"<?php }?> title="<?php echo  $this->__('Ship to this address') ?>" onclick="$('shipping:same_as_billing').checked = true;" class="radio" /><label for="billing:use_for_shipping_yes"><?php echo  $this->__('Ship to this address') ?></label></li>
        <li class="control">
            <input type="radio" name="billing[use_for_shipping]" id="billing:use_for_shipping_no" value="0"<?php if (!$this->isUseBillingAddressForShipping()) {?> checked="checked"<?php }?> title="<?php echo $this->__('Ship to different address') ?>" onclick="$('shipping:same_as_billing').checked = false;" class="radio" /><label for="billing:use_for_shipping_no"><?php echo $this->__('Ship to different address') ?></label>
        </li>
    <?php endif; ?>
    </ul>
    <?php if (!$this->canShip()): ?>
        <input type="hidden" name="billing[use_for_shipping]" value="1" />
    <?php endif; ?>
    <div class="buttons-set" id="billing-buttons-container">
        <button type="button" title="<?php echo $this->__('Continue') ?>" class="button" onclick="billing.save()"><span><span><?php echo $this->__('Continue') ?></span></span></button>
        <span class="please-wait" id="billing-please-wait" style="display:none;">
            <img src="<?php echo $this->getSkinUrl('images/opc-ajax-loader.gif') ?>" alt="<?php echo $this->__('Loading next step...') ?>" title="<?php echo $this->__('Loading next step...') ?>" class="v-middle" /> <?php echo $this->__('Loading next step...') ?>
        </span>
    </div>
</div>
</form>
  • check the js error in console. – Qaisar Satti Oct 26 '17 at 5:55
  • maybe conflict between jquery and prototype solved that you issue will be fixed or something else but it is related to js. – Qaisar Satti Oct 26 '17 at 9:22
  • I have not worked with the porto theme or any of the theme from SW-THEMES . I keep seeing errors in both css and js. Can you test your site using the default theme of magento? – fja3omega Oct 30 '17 at 5:40
  • Your magento version ?? – Murtuza Zabuawala Oct 30 '17 at 7:58
  • try by reverting security patch 9767, and tell me what happened – Murtuza Zabuawala Oct 30 '17 at 9:34
1
+50

I figured out that this is not js or CSS issue, this issue because of your environment.

Your actual error is

 Warning: A non-numeric value encountered in /app/code/core/Mage/Shipping/Model/Carrier/Abstract.php on line 466 

Your site is running on 7.1 and we know that Magento 1.9 directly not support php 7.0 or 7.1 we need to modify some code for that

here in your case this the error

https://github.com/Inchoo/Inchoo_PHP7/issues/97

as mentioned in above thread you can set handling fee 0 in your system config

Or disable the fixed charges in system config of your shipping method

and this error will go, that is the simplest solution for you to solve this error

Or

this is just warning you can stop error_reporting and your error will be gone

hope this will help you to solve your problem

  • @TejabhagavanKollepara I can see shipping method section in your site and I assume your problem solved – Murtuza Zabuawala Oct 31 '17 at 5:44
  • @TejabhagavanKollepara set handle fee 0 – Murtuza Zabuawala Dec 7 '17 at 17:32
  • @TejabhagavanKollepara I had face some soap request issue in fedex if you have fedex enable try to disable it , i still need to figure out what exact issue with fedex, right now I dont have time to solve that issue – Murtuza Zabuawala Dec 10 '17 at 16:59
  • @TejabhagavanKollepara check apache log – Murtuza Zabuawala Dec 21 '17 at 3:11
  • @TejabhagavanKollepara I dont know why its coming right now check your apache log – Murtuza Zabuawala Dec 21 '17 at 8:16
0

I had a same problem, this may work for you...If you are using RWD theme please add the formkey to app\design\frontend\rwd\default\template\persistent\checkout\onepage\billing.phtml

in billing.phtml Inside the <form> tag add following code

<?php echo $this->getBlockHtml('formkey'); ?>
  • Find the path of the billing address file by enable the template path hints from backend...syetm->configuration->developer->debug->Template Path Hints , Note:Current configuration scope should be Main website...And then reload the checkout page to see the file path..then add the above form key to billing form – Ranganathan Oct 23 '17 at 4:15
  • I have checked in your website - if you added the form key in correct path....Then the billing form will have <input name="form_key" type="hidden" value="dgdfgdsfdsgdf" />....I think you have edited wrong file... – Ranganathan Oct 26 '17 at 6:06
  • What you edited? – Ranganathan Oct 26 '17 at 10:17
  • Please add the formkey to shpping address form too – Ranganathan Oct 26 '17 at 10:55

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.