Jump to content
NimaP

One Page Checkout Support

Recommended Posts

Hi,

 

Are you using a ajax country/state selector?

 

if so change the first if country/state selector checkout_shipping_address.php to

 

 // +Country-State Selector
require(DIR_WS_FUNCTIONS . 'ajax.php');
if (isset($_POST['action']) && $_POST['action'] == 'getStates' && (isset($_POST['country'])) && (isset($_SESSION['customer_id']))) {
   ajax_get_zones_html(tep_db_prepare_input($_POST['country']), true);
   echo tep_address_label($_SESSION['customer_id'], $_SESSION['sendto'], true, ' ', '<br>');
} else {

// -Country-State Selector

 

 

 

Steve

 

Thank you.

I have no idea if it's ajax or not - I'm just using what was included in the oscommerce code and the add-on's code. Will changing this code fix not only the issue when a registered customer is trying to purchase, but also that issue with the email address too you think?

 

Liz

Share this post


Link to post
Share on other sites

Apologies in advance if this is a repeat. I've tried googling the issue, as well as digging through pages and pages on the forum and unable to find exactly the issue i'm having. Seem to be able to find lots of similar information, but can't quite seem to extrapolate that to mine.

 

I have installed the module and am getting the below error when entering "http://memetic.com.au/shop/checkout.php"

Fatal error: Class 'infoBoxHeading' not found in /home/mem46894/public_html/shop/checkout.php on line 192

 

If I remove this line of code I then get

 

Fatal error: Class 'infoBox' not found in /home/mem46894/public_html/shop/checkout.php on line 194

 

The offending code seems to be contained within

$breadcrumb->add(NAVBAR_TITLE_1, tep_href_link(FILENAME_CHECKOUT, '', $request_type));

 function buildInfobox($header, $contents){
  $info_box_contents = array();
  $info_box_contents[] = array('text' => utf8_encode($header));
  new infoBoxHeading($info_box_contents, false, false);

  $info_box_contents = array();
  $info_box_contents[] = array('text' => utf8_encode($contents));
  new infoBox($info_box_contents);

 

If I then remove that it loads the page minus the heading, and the boxes where I can place in needed information.

 

I have been doing my best to try and figure out PHP a bit better, as I believe that I've done something to this class on some other page. I just don't quite know what it is that I've done. I would greatly appreciate any assistance.

Share this post


Link to post
Share on other sites

This is a support thread for the contribution http://addons.oscommerce.com/info/6646

 

When I start checkout there are no “required” or “success” icons. Field checking doesn’t work either. Only field that shows icon is country listbox. I managed to bring “success” icons in shipping address to life but that’s all.

I’m desperate because I have triple checked all scripts and files, tried older versions too but field checking still doesn’t work. I can even checkout without filling email address. Contribution itself works fine.

 

It’s definitely something with jscript.

I’m using version 1.08 and I had to modify checkout.js because I was getting error on line 32, same as one stated before, so I had simply excluded bindAutoFill function.

Share this post


Link to post
Share on other sites

Ok....getting closer.

 

I have Free Shipping for orders over X.xx installed.

Sometimes it will show the Free Shipping selection along with the other UPS selections...sometimes it will not

If it does show Free Shipping then if any other UPS method is choosen the Proces do not update.

 

Getting JS error on the page for checkout.js file for this line:

 

this.setModuleMethod('shipping', $button.val(), function (data){

 

okay....so I think i found the beginnings of my issues.

 

I ONLY get the JS error on the page IF i hit refresh in the browser....besides that it seems to be working.

Share this post


Link to post
Share on other sites

Hi,

 

Are you using a ajax country/state selector?

 

if so change the first if country/state selector checkout_shipping_address.php to

 

 // +Country-State Selector
require(DIR_WS_FUNCTIONS . 'ajax.php');
if (isset($_POST['action']) && $_POST['action'] == 'getStates' && (isset($_POST['country'])) && (isset($_SESSION['customer_id']))) {
   ajax_get_zones_html(tep_db_prepare_input($_POST['country']), true);
   echo tep_address_label($_SESSION['customer_id'], $_SESSION['sendto'], true, ' ', '<br>');
} else {

// -Country-State Selector

 

 

 

Steve

 

Steve,

I cannot find where to enter this in the code. Which checkout_shipping_address.php file is it? I need to know which directory.

 

Also, the shipping is not the only problem - there is an issue with the email address box, when you go to sign in, sign up, etc. After installing I never had these issues.

 

Please help me fix - anybody! I'm going to have to reinstall without this add-on if I can't get this to work soon, it's hurting sales! Or at least figure out another one to use.

 

Liz

Share this post


Link to post
Share on other sites

Steve,

I cannot find where to enter this in the code. Which checkout_shipping_address.php file is it? I need to know which directory.

 

Also, the shipping is not the only problem - there is an issue with the email address box, when you go to sign in, sign up, etc. After installing I never had these issues.

 

Please help me fix - anybody! I'm going to have to reinstall without this add-on if I can't get this to work soon, it's hurting sales! Or at least figure out another one to use.

 

Liz

Hi LIz

At the top of includes/checkout/shipping_address.php replace the if statement with:

 

if (isset($_SESSION['customer_id'])){

echo tep_address_label($_SESSION['customer_id'], $_SESISON['sendto'], true, ' ', '<br>');

}else{

 

i made my change in catalog/checkout_shipping_address.php

 

Open checkout.js and find:

checkoutClass.updateShippingMethods();

this.updateFinalProductListing();

this.updateOrderTotals();

 

 

 

Change it to:

 

this.updateFinalProductListing();

this.updateOrderTotals();

 

Steve

Edited by steve_s

Share this post


Link to post
Share on other sites

When I start checkout there are no “required” or “success” icons. Field checking doesn’t work either. Only field that shows icon is country listbox. I managed to bring “success” icons in shipping address to life but that’s all.

I’m desperate because I have triple checked all scripts and files, tried older versions too but field checking still doesn’t work. I can even checkout without filling email address. Contribution itself works fine.

 

It’s definitely something with jscript.

I’m using version 1.08 and I had to modify checkout.js because I was getting error on line 32, same as one stated before, so I had simply excluded bindAutoFill function.

Hi

 

Follow instruction on install if upgrading from <= 1.0.6 version

 

Steve

Share this post


Link to post
Share on other sites

Apologies in advance if this is a repeat. I've tried googling the issue, as well as digging through pages and pages on the forum and unable to find exactly the issue i'm having. Seem to be able to find lots of similar information, but can't quite seem to extrapolate that to mine.

 

I have installed the module and am getting the below error when entering "http://memetic.com.au/shop/checkout.php"

Fatal error: Class 'infoBoxHeading' not found in /home/mem46894/public_html/shop/checkout.php on line 192

 

If I remove this line of code I then get

 

Fatal error: Class 'infoBox' not found in /home/mem46894/public_html/shop/checkout.php on line 194

 

The offending code seems to be contained within

$breadcrumb->add(NAVBAR_TITLE_1, tep_href_link(FILENAME_CHECKOUT, '', $request_type));

 function buildInfobox($header, $contents){
  $info_box_contents = array();
  $info_box_contents[] = array('text' => utf8_encode($header));
  new infoBoxHeading($info_box_contents, false, false);

  $info_box_contents = array();
  $info_box_contents[] = array('text' => utf8_encode($contents));
  new infoBox($info_box_contents);

 

If I then remove that it loads the page minus the heading, and the boxes where I can place in needed information.

 

I have been doing my best to try and figure out PHP a bit better, as I believe that I've done something to this class on some other page. I just don't quite know what it is that I've done. I would greatly appreciate any assistance.

 

Hi

 

Is includes/classes/onepage_checkout.php uploaded also that function function should be in includes/functions/html_output.php and general.php it is a stock osc function

 

Steve

Share this post


Link to post
Share on other sites

Hi

 

Follow instruction on install if upgrading from <= 1.0.6 version

 

Steve

 

Actually I was not upgrading to 1.08 but installed it to new eshop. I just tried other versions too when the new version doesn’t work for me.

Share this post


Link to post
Share on other sites

Hi,

 

After installing v 1.08 on an heavily modified RC2 shop (STS, PWA, Ultimate SEO...), I get the following error:

 

1054 - Unknown column '2' in 'where clause'

 

select customers_email_address, customers_telephone from customers where customers_id = "2"

 

Any idea?

 

Thanks

Sébastien

Share this post


Link to post
Share on other sites

I tried that, and got the same error.....maybe its something with the new version. Its works fine with the demo provided. I'll try one of the payment.php files from a older version, and keep my eye on the forum....Peace!

 

Thanks! You the man!

Share this post


Link to post
Share on other sites

Hi,

 

After installing v 1.08 on an heavily modified RC2 shop (STS, PWA, Ultimate SEO...), I get the following error:

 

1054 - Unknown column '2' in 'where clause'

 

select customers_email_address, customers_telephone from customers where customers_id = "2"

 

Any idea?

 

Thanks

Sébastien

Hi Sébastien

 

check your customers table and check what the name of them fields are in the table and amend the sql accordingly

 

Steve

Share this post


Link to post
Share on other sites

Hi Sébastien

 

check your customers table and check what the name of them fields are in the table and amend the sql accordingly

 

Steve

 

Hi Steve

 

I had to change all $Qxxx queries in includes/classes/onepage_checkout.php to make it work:

 

From (line 80):

$QcustomerEmail = tep_db_query('select customers_email_address, customers_telephone from ' . TABLE_CUSTOMERS . ' where customers_id = "' . $customer_id . '"');

 

to:

$QcustomerEmail = tep_db_query("select customers_email_address, customers_telephone from " . TABLE_CUSTOMERS . " where customers_id = '" . $customer_id . "'");

 

 

From (line 208):

$Qcheck = tep_db_query('select customers_id from ' . TABLE_CUSTOMERS . ' where customers_email_address = "' . tep_db_prepare_input($emailAddress) . '"');

 

to:

$Qcheck = tep_db_query("select customers_id from " . TABLE_CUSTOMERS . " where customers_email_address = '" . tep_db_prepare_input($emailAddress) . "'");

 

 

From (line 524)

$QcInfo = tep_db_query('select * from ' . TABLE_COUNTRIES . ' where countries_id = "' . $country . '"');

 

to:

$QcInfo = tep_db_query("select * from " . TABLE_COUNTRIES . " where countries_id = '" . $country . "'");

 

 

From (line 588):

$Qaddress = tep_db_query('select ab.entry_firstname, ab.entry_lastname, ab.entry_company, ab.entry_street_address, ab.entry_suburb, ab.entry_postcode, ab.entry_city, ab.entry_zone_id, z.zone_name, ab.entry_country_id, c.countries_id, c.countries_name, c.countries_iso_code_2, c.countries_iso_code_3, c.address_format_id, ab.entry_state from ' . TABLE_ADDRESS_BOOK . ' ab left join ' . TABLE_ZONES . ' z on (ab.entry_zone_id = z.zone_id) left join ' . TABLE_COUNTRIES . ' c on (ab.entry_country_id = c.countries_id) where ab.customers_id = "' . (int)$customer_id . '" and ab.address_book_id = "' . (int)$addressID . '"');

 

to:

$Qaddress = tep_db_query("select ab.entry_firstname, ab.entry_lastname, ab.entry_company, ab.entry_street_address, ab.entry_suburb, ab.entry_postcode, ab.entry_city, ab.entry_zone_id, z.zone_name, ab.entry_country_id, c.countries_id, c.countries_name, c.countries_iso_code_2, c.countries_iso_code_3, c.address_format_id, ab.entry_state from " . TABLE_ADDRESS_BOOK . " ab left join " . TABLE_ZONES . " z on (ab.entry_zone_id = z.zone_id) left join " . TABLE_COUNTRIES . " c on (ab.entry_country_id = c.countries_id) where ab.customers_id = '" . (int)$customer_id . "' and ab.address_book_id = '" . (int)$addressID . "'");

 

 

From (line 664):

$Qcheck = tep_db_query('select address_book_id from ' . TABLE_ADDRESS_BOOK . ' where address_book_id = "' . $_POST['address_id'] . '" and customers_id = "' . $customer_id . '"');

 

to:

$Qcheck = tep_db_query("select address_book_id from " . TABLE_ADDRESS_BOOK . " where address_book_id = '" . $_POST['address_id'] . "' and customers_id = '" . $customer_id . "'");

 

 

and from (line 875):

$Qcustomer = tep_db_query('select customers_firstname, customers_lastname, customers_email_address from ' . TABLE_CUSTOMERS . ' where customers_id = "' . $customer_id . '"');

 

to:

$Qcustomer = tep_db_query("select customers_firstname, customers_lastname, customers_email_address from " . TABLE_CUSTOMERS . " where customers_id = '" . $customer_id . "'");

 

Sébastien

Share this post


Link to post
Share on other sites

Hi LIz

At the top of includes/checkout/shipping_address.php replace the if statement with:

 

if (isset($_SESSION['customer_id'])){

echo tep_address_label($_SESSION['customer_id'], $_SESISON['sendto'], true, ' ', '<br>');

}else{

 

i made my change in catalog/checkout_shipping_address.php

 

Open checkout.js and find:

checkoutClass.updateShippingMethods();

this.updateFinalProductListing();

this.updateOrderTotals();

 

 

 

Change it to:

 

this.updateFinalProductListing();

this.updateOrderTotals();

 

Steve

 

Hi Steve,

I was able to make the change to "includes/checkout/shipping_address.php" but I could not find in the "catalog/checkout_shipping_address.php" file where I was supposed to make the change. Is there a way you can show me what the file is supposed to look like? I think this file may have code in it that is different from what you are working with and that may be the problem.

 

I also could not find in the "checkout.js" file the exact three lines of code that you want me to replace.

 

I'll await your comments! Thanks!

Liz

Share this post


Link to post
Share on other sites

Here is a new bug I found:

 

I am using the cc_cvv payment module that just captures the customer CC info and stores in the database.

 

If the person has a typo in the CC number - for example not enough digits they get an error when processing and pushed back to /checkout.php?payment_error=cc_cvc&error=

Which is fine. The error I found is that the State Drop down in the Billing Address is now still selected - but has the required icon next to it and you have to select another State and then reselect your State again to make the Payment Methods appear.

 

Hope this makes sense.

Share this post


Link to post
Share on other sites

Here is a new bug I found:

 

I am using the cc_cvv payment module that just captures the customer CC info and stores in the database.

 

If the person has a typo in the CC number - for example not enough digits they get an error when processing and pushed back to /checkout.php?payment_error=cc_cvc&error=

Which is fine. The error I found is that the State Drop down in the Billing Address is now still selected - but has the required icon next to it and you have to select another State and then reselect your State again to make the Payment Methods appear.

 

Hope this makes sense.

 

 

I went back to the demo site and tried it and the same error occurs using their CC payment method:

 

http://www.itwebexperts.com/onepagecheckout/checkout.php

Share this post


Link to post
Share on other sites

Hi Steve,

I was able to make the change to "includes/checkout/shipping_address.php" but I could not find in the "catalog/checkout_shipping_address.php" file where I was supposed to make the change. Is there a way you can show me what the file is supposed to look like? I think this file may have code in it that is different from what you are working with and that may be the problem.

 

I also could not find in the "checkout.js" file the exact three lines of code that you want me to replace.

 

I'll await your comments! Thanks!

Liz

Hi Liz

 

What version are you using?,

you could paste the first if statement you find in catalog/checkout_shipping_address.php it will be near the top of the file and paste the next 5 lines after it

 

Steve

Share this post


Link to post
Share on other sites

Hi Liz

 

What version are you using?,

you could paste the first if statement you find in catalog/checkout_shipping_address.php it will be near the top of the file and paste the next 5 lines after it

 

Steve

 

Hi Steve,

It's version 2.2 RC2a that I'm using, and he's the first few lines of the code from catalog/checkout_shipping_address.php:

require('includes/application_top.php');

 

// if the customer is not logged on, redirect them to the login page

if (!tep_session_is_registered('customer_id')) {

$navigation->set_snapshot();

tep_redirect(tep_href_link(FILENAME_LOGIN, '', 'SSL'));

}

 

// if there is nothing in the customers cart, redirect them to the shopping cart page

if ($cart->count_contents() < 1) {

tep_redirect(tep_href_link(FILENAME_SHOPPING_CART));

}

 

Liz

Share this post


Link to post
Share on other sites

Hi

 

have you sent an email to them, telling them of the bug?

 

Steve

 

not sure what the email address is.....for a few days there I thought you were with them steve.....by how much you have been helping people!!!!

Share this post


Link to post
Share on other sites

not sure what the email address is.....for a few days there I thought you were with them steve.....by how much you have been helping people!!!!

Hi Monk,

 

Nope i'm not with them, just helping out where i can :)

email is kjavitz @ itwebexperts.com

just piece it together

 

Steve

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×