Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

One Page Checkout Support


Guest

Recommended Posts

I've noticed 3 major bugs with this contribution (1.05) so far...

 

 

1st) : At first on my test PC i had a problem with the billing / shipping address becoming blank, but now it seems fine??

 

2nd) : Second problem i notice is that the update cart button does not work and will error with "There was an error updating shopping cart, please inform IT Web Experts about this error." but if you supress this error by commenting it out in catalog/checkout.php around line 662 it will give you the pre_confirmation check error instead, which of course is the real error.....

 

3rd: If you fill out all your details and get to your payment gateway page, then hit the browsers back button, you can then see the price change not to include shipping, click update again, or even the update cart cart button and you will be took back to the payment gateway page with the new price not including postage or surcharges!

 

I also found to change the state/county pulldown from the 3 character zone code, to actual zone names FIND around line 189 of includes/classes/onepage_checkout.php:

 

	  function getAjaxStateField(){
	  $country = $_GET['cID'];
	  $name = $_GET['fieldName'];
	  if ($name == 'billing_state'){
		  $key = 'billing';
	  }else{
		  $key = 'delivery';
	  }
	  $html = '';
	  $check_query = tep_db_query("select count(*) as total from " . TABLE_ZONES . " where zone_country_id = '" . (int)$country . "'");
	  $check = tep_db_fetch_array($check_query);
	  if ($check['total'] > 0) {
		  $zones_array = array();
		  $zones_query = tep_db_query("select zone_id, zone_code from " . TABLE_ZONES . " where zone_country_id = '" . (int)$country . "' order by zone_name");
		  $selected = '';
		  while ($zones_values = tep_db_fetch_array($zones_query)) {
			  if (isset($_SESSION['onepage'][$key]['zone_id']) && $_SESSION['onepage'][$key]['zone_id'] == $zones_values['zone_id']){
				  $selected = $zones_values['zone_code'];
			  }
			  $zones_array[] = array('id' => $zones_values['zone_code'], 'text' => $zones_values['zone_code']);
		  }
		  $html .= tep_draw_pull_down_menu($name, $zones_array, $selected, 'style="width:80%"');
	  } else {
		  $html .= tep_draw_input_field($name, (isset($_SESSION['onepage'][$key]['state']) ? $_SESSION['onepage'][$key]['state']: ''), 'style="width:80%"');
	  }
	  if (tep_not_null(ENTRY_STATE_TEXT)){
		  $html .= ' <span class="inputRequirement">' . ENTRY_STATE_TEXT . '</span>';
	  }
	return $html;
  }

 

 

 

REPLACE with:

 

	  function getAjaxStateField(){
	  $country = $_GET['cID'];
	  $name = $_GET['fieldName'];
	  if ($name == 'billing_state'){
		  $key = 'billing';
	  }else{
		  $key = 'delivery';
	  }
	  $html = '';
	  $check_query = tep_db_query("select count(*) as total from " . TABLE_ZONES . " where zone_country_id = '" . (int)$country . "'");
	  $check = tep_db_fetch_array($check_query);
	  if ($check['total'] > 0) {
		  $zones_array = array();
		  $zones_query = tep_db_query("select zone_id, zone_name, zone_code from " . TABLE_ZONES . " where zone_country_id = '" . (int)$country . "' order by zone_name");
		  $selected = '';
		  while ($zones_values = tep_db_fetch_array($zones_query)) {
			  if (isset($_SESSION['onepage'][$key]['zone_id']) && $_SESSION['onepage'][$key]['zone_id'] == $zones_values['zone_id']){
				  $selected = $zones_values['zone_code'];
			  }
			  $zones_array[] = array('id' => $zones_values['zone_name'], 'text' => $zones_values['zone_name']);
		  }
		  $html .= tep_draw_pull_down_menu($name, $zones_array, $selected, 'style="width:80%"');
	  } else {
		  $html .= tep_draw_input_field($name, (isset($_SESSION['onepage'][$key]['state']) ? $_SESSION['onepage'][$key]['state']: ''), 'style="width:80%"');
	  }
	  if (tep_not_null(ENTRY_STATE_TEXT)){
		  $html .= ' <span class="inputRequirement">' . ENTRY_STATE_TEXT . '</span>';
	  }
	return $html;
  }

 

However you may need to modify the main catalog/checkout.php design layout of that field as you may find the names are quite long, depending on how wide etc your store is..

 

 

Regards

 

Chris

That works a treat except when you click change address then edit an address you still get the code :(

Edited by steve_s
Link to comment
Share on other sites

While that's somewhat true, I actually removed the leave comment / order summary at the bottom because I felt that was more redundant than the editable cart at the top. I prefer the one at the top as it allows you to still adjust your order in case you missed something, instead of going back to your cart to have to adjust it, which is REALLY nice- one less button to click. Customers may accidentally add more of an item without realizing it and then when they are double checking the order total they realize their mistake. Without having to go back to the shopping cart they can just modify their order at the top. The little summary down at the bottom (while for most it's a good idea, a final double check if you will) I felt it was only taking up space. :)

 

So I'm really interested in a solution! :) Hope it gets solved soon.

Eve with update cart bug fixed, the bug of products never being removed from customers_basket table and always remaining there is a big bug

Link to comment
Share on other sites

Hi all,

 

not withstanding any other issues there may be with this contribution, I had a quick look at the Update Cart issue tonight and have found that the following works for me.

 

If you change this in checkout.php:

 

if (tep_not_null($_GET)){

foreach($_GET as $var => $val){

$_GET[$var] = utf8_decode($val);

}

}

 

 

to this:

 

if (tep_not_null($_GET)){

foreach($_GET as $var => $val){

if (($var != 'qty') && ($var != 'id')) $_GET[$var] = utf8_decode($val);

}

}

 

then I found the update cart button now works. The utf8_decode on $_GET was screwing up the arrays sent in the AJAX request.

Link to comment
Share on other sites

Nice contribution.

 

I hope it is soon usable for production.

 

I have the following problems:

 

1. On the first time not all payment options are displayed. When I click the country again then I see all payment options.

 

2. We use the contributions ship2pay see http://addons.oscommerce.com/info/1042 So customers must choose a shipping method and then payment method but the page does not refresh when I choose another shipping method. How can I make that the page does a refresh?

Link to comment
Share on other sites

That works a treat except when you click change address then edit an address you still get the code :(

 

Hiya this should fix it ;)

 

Find around line 73 in includes/checkout/edit_address.php

 

<?php
 if (ACCOUNT_STATE == 'true') {
  if (tep_not_null($address['entry_zone_id'])){
	  $zones_array = array();
	  $zones_query = tep_db_query("select zone_code from " . TABLE_ZONES . " where zone_country_id = '" . $address['entry_country_id'] . "' order by zone_code");
	  while ($zones_values = tep_db_fetch_array($zones_query)) {
		  $zones_array[] = array('id' => $zones_values['zone_code'], 'text' => $zones_values['zone_code']);
	  }

	  $QzoneName = tep_db_query('select zone_code from ' . TABLE_ZONES . ' where zone_id = "' . $address['entry_zone_id'] . '"');
	  $zoneName = tep_db_fetch_array($QzoneName);
	  $input = tep_draw_pull_down_menu('state', $zones_array, $zoneName['zone_code']);
  }else{
	  $input = tep_draw_input_field('state', $address['entry_state']);
  }
?>

 

Replace with:

 

<?php
 if (ACCOUNT_STATE == 'true') {
  if (tep_not_null($address['entry_zone_id'])){
	  $zones_array = array();
	  $zones_query = tep_db_query("select zone_name from " . TABLE_ZONES . " where zone_country_id = '" . $address['entry_country_id'] . "' order by zone_name");
	  while ($zones_values = tep_db_fetch_array($zones_query)) {
		  $zones_array[] = array('id' => $zones_values['zone_name'], 'text' => $zones_values['zone_name']);
	  }

	  $QzoneName = tep_db_query('select zone_name from ' . TABLE_ZONES . ' where zone_id = "' . $address['entry_zone_id'] . '"');
	  $zoneName = tep_db_fetch_array($QzoneName);
	  $input = tep_draw_pull_down_menu('state', $zones_array, $zoneName['zone_name']);
  }else{
	  $input = tep_draw_input_field('state', $address['entry_state']);
  }
?>

Link to comment
Share on other sites

Eve with update cart bug fixed, the bug of products never being removed from customers_basket table and always remaining there is a big bug

 

Strangely enough I'm not having this bug- unless you mean that if the product goes out of stock it is never removed from the basket and can be bought. As all of my products never go out of stock, I'll never have this problem, I think. I am thinking of removing the cart at the top as you suggested, simply because it seems to be causing too much trouble right now. I have about 2-3 weeks before my store goes live, so I'm not in a panic yet and I'm thinking if I keep working on the bugs they can be solved by then. :)

 

 

 

Hi all,

 

not withstanding any other issues there may be with this contribution, I had a quick look at the Update Cart issue tonight and have found that the following works for me.

 

If you change this in checkout.php:

 

if (tep_not_null($_GET)){

foreach($_GET as $var => $val){

$_GET[$var] = utf8_decode($val);

}

}

 

 

to this:

 

if (tep_not_null($_GET)){

foreach($_GET as $var => $val){

if (($var != 'qty') && ($var != 'id')) $_GET[$var] = utf8_decode($val);

}

}

 

then I found the update cart button now works. The utf8_decode on $_GET was screwing up the arrays sent in the AJAX request.

 

Strangely enough this doesn't work for me. While qty is now an Array, I don't think it contains anything and id is still NULL no matter what I do.

 

Perhaps you could take a look at this since you seem to really know your stuff- When outputting the raw query ajax data below:

 data: $('input', $('#shoppingCart')).serialize(),

 

Using this line to debug it:

 errorMsg: $('input', $('#shoppingCart')).serialize() + '  There was an error updating shopping cart, please inform IT Web Experts about this error.'

 

 

I get the following output:

 

qty%5B28%5D=1  There was an error updating shopping cart, please inform IT Web Experts about this error.

 

Does qty%5B28%5D=1 even look correct? Are there two arrays in there? I just can't make sense of it.

 

 

ALSO: While I still get the error message and nothing updates, if I refresh the page after clicking the update button, the shopping cart actually updates with the correct numbers! Go figure. :angry:

Link to comment
Share on other sites

Strangely enough I'm not having this bug- unless you mean that if the product goes out of stock it is never removed from the basket and can be bought. As all of my products never go out of stock, I'll never have this problem, I think. I am thinking of removing the cart at the top as you suggested, simply because it seems to be causing too much trouble right now. I have about 2-3 weeks before my store goes live, so I'm not in a panic yet and I'm thinking if I keep working on the bugs they can be solved by then. :)

 

 

 

 

 

Strangely enough this doesn't work for me. While qty is now an Array, I don't think it contains anything and id is still NULL no matter what I do.

 

Perhaps you could take a look at this since you seem to really know your stuff- When outputting the raw query ajax data below:

 data: $('input', $('#shoppingCart')).serialize(),

 

Using this line to debug it:

 errorMsg: $('input', $('#shoppingCart')).serialize() + '  There was an error updating shopping cart, please inform IT Web Experts about this error.'

 

 

I get the following output:

 

qty%5B28%5D=1  There was an error updating shopping cart, please inform IT Web Experts about this error.

 

Does qty%5B28%5D=1 even look correct? Are there two arrays in there? I just can't make sense of it.

 

 

ALSO: While I still get the error message and nothing updates, if I refresh the page after clicking the update button, the shopping cart actually updates with the correct numbers! Go figure. :angry:

It works fine for me im using v1.0.5, i think you need to add at top of checkout.php

after

  Released under the GNU General Public License
*/

 

add

  define('CHARSET', 'UTF-8');

Edited by steve_s
Link to comment
Share on other sites

Ok as I said before this mod is just not ready for anyone to use, and they will not help without payment. I have tried every single checkout and nothing works as it is suppose too.

 

However, I did find something very close, and in fact I like it much better then either one of the one pages I tried,

 

try this mod, it is easy to install and works like a charm,

 

http://addons.oscommerce.com/info/6595 2 simple page checkout - checkout page has the cart, login if you have an account, billing address, shipping address, payment, and comments on the page too, I do not see why none of the coupon code mods wouldnt work either. That will be my next install, coupon mod. Then it gives you the confirmation page, after all that we have been through with this mod, that isnt so bad is it?

 

I am tickled to death this mod works without a hitch, you all should try it.

http://addons.oscommerce.com/info/6595

 

There is a screenshot included as well so you can see if it is something you would like,

Edited by staradmire
Link to comment
Share on other sites

Ok as I said before this mod is just not ready for anyone to use, and they will not help without payment. I have tried every single checkout and nothing works as it is suppose too.

 

However, I did find something very close, and in fact I like it much better then either one of the one pages I tried,

 

try this mod, it is easy to install and works like a charm,

 

http://addons.oscommerce.com/info/6595 2 simple page checkout - checkout page has the cart, login if you have an account, billing address, shipping address, payment, and comments on the page too, I do not see why none of the coupon code mods wouldnt work either. That will be my next install, coupon mod. Then it gives you the confirmation page, after all that we have been through with this mod, that isnt so bad is it?

 

I am tickled to death this mod works without a hitch, you all should try it.

http://addons.oscommerce.com/info/6595

 

There is a screenshot included as well so you can see if it is something you would like,

 

Yeah that mod is great!! much less hard work than this one!! except a problem for me, i have 2 tax classes one at 0% for the channel islands etc, and one at UK 15% and the checkout page at first will always show 0% tax until registered and/or logged in.. if i could get this to correctly show the price with the inc vat ex vat mod im using it would be great!

Link to comment
Share on other sites

@steve: Thanks! I'll give that a shot.

 

Everyone keeps saying this mod isn't ready for use... so I have to ask, What all is wrong with it?

 

The only bug I've experienced is the Update problem, but that's not even an issue now.

I understand there's a bug where items can be bought that are out of stock, but is that it? And that it doesn't work with a few other contributions?

 

I really want to use this mod. ;)

Link to comment
Share on other sites

Hi,

I installed this contribution and have the issue where it kicks you back to the checkout page

if no password is specified. Has anyone come up with a solution for this?

 

Also, the borders for my boxes are gone, and I'm not sure how to get them back. That should

be an easy fix for anyone who know this stuff better than I do.

 

Have a look at my test environ here: www.thelynk.com/catalog

 

 

Thanks in advance.

Jos

Link to comment
Share on other sites

Hi,

I installed this contribution and have the issue where it kicks you back to the checkout page

if no password is specified. Has anyone come up with a solution for this?

 

Also, the borders for my boxes are gone, and I'm not sure how to get them back. That should

be an easy fix for anyone who know this stuff better than I do.

 

Have a look at my test environ here: www.thelynk.com/catalog

 

 

Thanks in advance.

Jos

site borders are fine in firefox

Link to comment
Share on other sites

for those using this and have state/country entries ie country/state selector mod or something similar, when you change address the address book still shows the zone code

 

ie in account and shipping/billing address to fix this to zone name find in includes/functions/general.php

////
// Returns the zone (State/Province) code
// TABLES: zones
 function tep_get_zone_code($country_id, $zone_id, $default_zone) {
$zone_query = tep_db_query("select zone_code from " . TABLE_ZONES . " where zone_country_id = '" . (int)$country_id . "' and zone_id = '" . (int)$zone_id . "'");
if (tep_db_num_rows($zone_query)) {
  $zone = tep_db_fetch_array($zone_query);
  return $zone['zone_code'];
} else {
  return $default_zone;
}
 }

 

 

 

change it to

////
// Returns the zone (State/Province) code
// TABLES: zones
 function tep_get_zone_code($country_id, $zone_id, $default_zone) {
$zone_query = tep_db_query("select zone_name from " . TABLE_ZONES . " where zone_country_id = '" . (int)$country_id . "' and zone_id = '" . (int)$zone_id . "'");
if (tep_db_num_rows($zone_query)) {
  $zone = tep_db_fetch_array($zone_query);
  return $zone['zone_name'];
} else {
  return $default_zone;
}
 }

Edited by steve_s
Link to comment
Share on other sites

Ive also found on my site if customer logins in at one page checkout products are left in customer_basket table and never removed cause cust_id is 0 no customer assigned, but if i make them have to login first customer id is assigned

 

Weird

Link to comment
Share on other sites

Ive also found on my site if customer logins in at one page checkout products are left in customer_basket table and never removed cause cust_id is 0 no customer assigned, but if i make them have to login first customer id is assigned

 

Weird

 

My database is showing the same thing, too. Items in the customers_basket table with customers_id of zero.

 

Something is going wrong with the login on checkout.php as this problem does not occur when using the 'normal' login.php and then moving forward to use One Page Checkout.

 

- Andrea

Link to comment
Share on other sites

Hi,

Thanks for your best contribution.

My store is on USA , Zone is Georgia . The tax on Georgia is 7.00%.

 

Georgia7.00%

 

why does it charge tax before you put in your address. Should charge tax only for purchases in your own state. If you haven't put that in yet, it shouldn't add taxes.

 

Would you please help to give one advice asap?

 

Thanks & Best Regards,

SunrisePHP

Link to comment
Share on other sites

David this code fixes the Updating Product Quantities Error message (THANKS MARK just found this one and it does fix the error):

 

Hi all,

 

not withstanding any other issues there may be with this contribution, I had a quick look at the Update Cart issue tonight and have found that the following works for me.

 

If you change this in checkout.php:

 

if (tep_not_null($_GET)){

foreach($_GET as $var => $val){

$_GET[$var] = utf8_decode($val);

}

}

 

 

to this:

 

if (tep_not_null($_GET)){

foreach($_GET as $var => $val){

if (($var != 'qty') && ($var != 'id')) $_GET[$var] = utf8_decode($val);

}

}

 

then I found the update cart button now works. The utf8_decode on $_GET was screwing up the arrays sent in the AJAX request.

Link to comment
Share on other sites

Hi I am using this contribution version 1.03, with a slight modification to make the change address felds to work when using sts.

 

I have since installed sppc and to my surprise it appears to work with no problems at all, I have several payment options installed.

 

Now my store was rc2.2a with safebuy, before i started installing the mods, so I am verypleased that things seem to be working well.

 

I do have a minor issue, in that I cant use the auto account setup yet/ order without creating an account manually and if I change the invoice address on an order it is changing the account address, rather than just the invoice address on the order.

 

also I need to get rid of the progress bar from the old checkout system(checkout success) I think the file is.

 

Thanks

Johnny

Getting better with mods but no programmer am I.

Link to comment
Share on other sites

Is everyone using this contribution unsecured? I have been asking how to secure the page and there is still no solution. AM I ALONE? Is the onepage checkout secured for everyone else or are customers expected to type their name and address into an unsecured page?

Link to comment
Share on other sites

Is everyone using this contribution unsecured? I have been asking how to secure the page and there is still no solution. AM I ALONE? Is the onepage checkout secured for everyone else or are customers expected to type their name and address into an unsecured page?

Hi Sophia,

 

That has been directed to itwebexperts.com so there will be a fix, will just have to wait i guess.

 

For all that post bugs here please report them to www.itwebexperts.com if they don't know about the bugs they cant fix them. ok it wont be fixed there and then you will have to wait for next release but at least it will get fixed

 

So please inform www.itwebexperts.com

Link to comment
Share on other sites

I looked through posts - I might miss something.

 

One page checkout is useful to us.

 

I do not see any solution regarding login dialog pop up.

When you click "login" (if you are a existing customer), the login dialog will pop up.

When I attempted to log in, it simply stays there without processing or anything.

Cannot log in at all.

 

submit and close buttons hover - it doesn't make sense that they hover when mouse over them.

 

Also, after I filled out the form and submit without inputting password, (with Paypal Standard) it took me to

Paypal page and price and qty are recorded fine, except description or name of the products.

 

so please let me know if there is a solution to these?

 

thank you in advance for help.

Edited by dreamlex
Link to comment
Share on other sites

This looks like it could be a real winner - if the various standard shipping methods (UPS/FedEx etc) get worked out, if it stops throwing errors, if it stops stomping on non-standard templates, if it stops...

 

Seriously - if I had time, I'd dig into this one. Wish I did. I'll check back on it in a few months and see how it's progressed. I'm really looking forward to seeing it grow.

Link to comment
Share on other sites

If your using ajax country/state selector and this contribution, when you login and billing/shipping address doesn't populate with default address,

All credits to itwebexperts.com for this solution

 

checkout_shipping_address.php find

  if (isset($HTTP_POST_VARS['action']) && $HTTP_POST_VARS['action'] == 'getStates' && isset($HTTP_POST_VARS['country'])) {
ajax_get_zones_html(tep_db_prepare_input($HTTP_POST_VARS['country']), true);

 

replace with

  if (isset($HTTP_POST_VARS['action']) && $HTTP_POST_VARS['action'] == 'getStates' && isset($HTTP_POST_VARS['country']) && (isset($_SESSION['customer_id']))) {
ajax_get_zones_html(tep_db_prepare_input($HTTP_POST_VARS['country']), true);
echo tep_address_label($_SESSION['customer_id'], $_SESISON['sendto'], true, ' ', '<br>');

Edited by steve_s
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...