Jump to content
Sign in to follow this  
nana

fast easy checkout

Recommended Posts

eww

are you using a contribution or the stock module.

which one?

does the correct choices of shipping shows up with correct price?

am i to assume that you are using stock create_account?

 

shot in the dark here

in create_account.php

after

if (SESSION_RECREATE == 'True') {
	tep_session_recreate();
  }

add

 
	 $sendto =$address_id;
	  tep_session_unregister('sendto');
	  tep_session_register('sendto');
	 $sendto =$address_id;

Share this post


Link to post
Share on other sites

that seemed to do the trick :) i just tested using a canada and germany address, both went smoothly.

thank you!

 

 

are you using a contribution or the stock module.

which one?

not sure what you're asking?

 

does the correct choices of shipping shows up with correct price?

before, no they were not. they were showing the overseas costs for canada, but your fix straigtened that out.

 

am i to assume that you are using stock create_account?

i only have fast easy checkout at the moment

Share this post


Link to post
Share on other sites

Hi Frank,

Registered domestic customers buying items from my shop are being shown an incorrect shipping charge when buying items that have weight.

The process is happening like this:

 

Add to cart

Click Checkout Button

create_account.php

Click Sign In Button

checkout_shipping.php

 

Postal rates 2.05kg ?17.50 (incorrect)

 

Hitting refresh or proceeding to the payment page:

 

Postal rates 2.05kg ?0.00 (correct)

 

I am using the zones.php shipping module. I hadn't noticed it before because most of the products are free delivery worldwide.

 

I thought I had made all the changes listed in the forum but maybe I have msised one. What should I do?

 

Thanks

David

Share this post


Link to post
Share on other sites

hi david i think i might have done something in one of my fixes that is causing this

this could be the solution

in checkout_shipping.php around the line 22 i have this block of code

 

$total_weight = $cart->show_weight();
$total_count = $cart->count_contents();


require(DIR_WS_CLASSES . 'shipping.php');
$shipping_modules = new shipping;

move all of it to around line 82 before this block of code

// if the order contains only virtual products, forward the customer to the billing page as
// a shipping address is not needed
if ($order->content_type == 'virtual') {
if (!tep_session_is_registered('shipping')) tep_session_register('shipping');
$shipping = false;
$sendto = false;
tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL'));
}

if problem is not resolved you can see if you have the code i recommended eww a few posts before yours

 

if neither works then i need to know

1-is this only with new customers

2-could this be related to a cache setting in your computer or cookies if this is happening when you are testing?

let me know of the result please

thx

Share this post


Link to post
Share on other sites
tonia this is the code straight from my demo

i can edit and have bo errors see if this works

 

Thanks very much!!!

That fixes the order page problem. However, I notice that when I go to my site and select login that the create an account page still pops up. Is it supposed to do this? Where do I change it so that selecting login only brings up the login boxes.

 

Other than that, this is a terrific contribution. It is starting to make my site look similar to the big boys!

Share this post


Link to post
Share on other sites

where do you click login?

if you mean the regular login & create account boxes i left this intact for some reason that is beyound me now but you can just remove that box in login.php

if you mean that the link akes you to create account then tell me which link and i will give you the code to direct it to login.php

Share this post


Link to post
Share on other sites
where do you click login?

if you mean the regular login & create account boxes i left this intact for some reason that is beyound me now but you can just remove that box in login.php

if you mean that the link akes you to create account then tell me which link and i will give you the code to direct it to login.php

 

 

Hi, sorry I wasn't detailed enough. I actually meant the login at the right top of the page where you see

Login | Cart Contents | Checkout

 

If I click on "Login" here it sends me to the create account page without the existing customer login. I need it to have the existing customer login as it does when you click "Checkout" or "My Account". I don't want customers to decide they want to login and then they can't.

 

I apologize if this has nothing to do with your contribution code. If so, just let me know and I'll try to post this somewhere else.

 

Just want to say I have really appreciated your time. For a person new to php this has been a frustrating yet interesting experience. I have really appreciated contributors such as yourself that try and understand how difficult it is for us novices. I think a lot of people with the expertise forget how difficult it is for us "newbies". Thanks, thanks again!

Share this post


Link to post
Share on other sites

no problem

look in includes/header.php

find

?><a href="<?php echo tep_href_link(FILENAME_CREATE_ACCOUNT, 'fromlogin=1', 'SSL'); ?>" class="headerNavigation"><?php echo HEADER_TITLE_LOGIN;
?></a>

change to

?><a href="<?php echo tep_href_link(FILENAME_LOGIN, '', 'SSL'); ?>" class="headerNavigation"><?php echo HEADER_TITLE_LOGIN;
?></a>

Share this post


Link to post
Share on other sites
2-could this be related to a cache setting in your computer or cookies if this is happening when you are testing?

let me know of the result please

thx

 

Hi Frank

 

I made the change you suggested. I think I hadn't done it before because I didn't have any virtual products.

The first time I teested I had the same problem but once I had cleared the cache and retested it seemed to work fine.

 

Thanks

David

Share this post


Link to post
Share on other sites

i think this is caused when we test going from one customer to another in the same computer maybe you want to unregister the shipping

i have to think about it

Share this post


Link to post
Share on other sites

Hi Frank,

Yes it could be. The problem is back again exactly as before. I shall try your other fix. It happens with existing customers who put things in their cart without logging in. Then they hit the button in the header to checkout. They are taken to checkout_shipping then create_account then go back to checkout_shipping.

 

I have this possibly because I do have to log in as different customers during the day to process telephone orders. Not sure why the shipping should take on such a high value though, as it was zero for the previous customer.

Share this post


Link to post
Share on other sites

david

if i understand correctly this is when a registered customer login then

i think this would solve the problem

in login.php right after

 if (isset($HTTP_GET_VARS['action']) && ($HTTP_GET_VARS['action'] == 'process')) {

 

   if (tep_session_is_registered('billto'))  tep_session_unregister('billto');
if (tep_session_is_registered('sendto'))  tep_session_unregister('sendto');

i am at office and have no way of testing

you might have to set them to the default_address_id a little furthur down in the file but i don't think so

Share this post


Link to post
Share on other sites

Hi Frank,

Yes either that or when a registered customer doesn't log in but adds things to his cart and checks out. I guess in that case that login.php is called in the background.

 

I tried the change but shill it shows the wrong shipping charges.

 

Thanks anyway.

Share this post


Link to post
Share on other sites

Hey Frank-

 

I'm back to using part 1 of your contribution, but I'm noticing a strange bug involving FedEx- fairly often the error "Invalid recipient country" is coming back. This a pretty interesting error, and it goes away on refreshing the page. It only happens when the user is directed to checkout_shipping.php directly after logging in.

 

Stew


Do, or do not. There is no try.

 

Order Editor 5.0.6 "Ultra Violet" is now available!

For support or to post comments, suggestions, etc, please visit the Order Editor support thread.

Share this post


Link to post
Share on other sites

david please remove the two lines of code

david and stew

try this

in login.php

around line 50

after

  tep_session_register('customer_first_name');
	tep_session_register('customer_country_id');
	tep_session_register('customer_zone_id');

add this

if (tep_session_is_registered('shipto')) tep_session_unregister('shipto');
if (tep_session_is_registered('billto')) tep_session_unregister('billto');
$billto= $customer_default_address_id;
$shipto= $customer_default_address_id;
if (!tep_session_is_registered('shipto')) tep_session_register('shipto');
if (!tep_session_is_registered('billto')) tep_session_register('billto');
$billto= $customer_default_address_id;
$shipto= $customer_default_address_id;

i think this would do it

i can not reproduce this and if this does not work i need a link to check it out

Share this post


Link to post
Share on other sites
david please remove the two lines of code

david and stew

try this

in login.php

around line 50

after

  tep_session_register('customer_first_name');
	tep_session_register('customer_country_id');
	tep_session_register('customer_zone_id');

add this

if (tep_session_is_registered('shipto')) tep_session_unregister('shipto');
if (tep_session_is_registered('billto')) tep_session_unregister('billto');
$billto= $customer_default_address_id;
$shipto= $customer_default_address_id;
if (!tep_session_is_registered('shipto')) tep_session_register('shipto');
if (!tep_session_is_registered('billto')) tep_session_register('billto');
$billto= $customer_default_address_id;
$shipto= $customer_default_address_id;

i think this would do it

i can not reproduce this and if this does not work i need a link to check it out

 

 

No that doesn't do it- I'll PM you with the link.

 

Cheers

Stew


Do, or do not. There is no try.

 

Order Editor 5.0.6 "Ultra Violet" is now available!

For support or to post comments, suggestions, etc, please visit the Order Editor support thread.

Share this post


Link to post
Share on other sites

and login.php and checkout_shipping.php

i will take a look at it tommorrow and get back to you guys.

this can not have anything with the cache of your browser !can it? since you are using diffrent addresses and customers?

Share this post


Link to post
Share on other sites

Hi Frank,

 

It is not that here is old shipping country code in there. It is that there is no country code in there at all hence:

 

shipping to: ?5.00

 

and on refresh

 

shipping to GB: ?0.00

 

hth

David

Share this post


Link to post
Share on other sites

Removing those two additional lines means that instead of it happening all the time it is now back to happening just when the visitors cart and the members cart are merged (afaict).

 

So the culprit seems to be a rogue line of code something like this:

 

if (tep_session_is_registered('sendto')) tep_session_unregister('sendto');

Share this post


Link to post
Share on other sites

david you found the problem

i might have a solution but i am having a hell of a time trying to test it but i think it works

in login.php right after

		tep_session_register('customer_default_address_id');
	tep_session_register('customer_first_name');
	tep_session_register('customer_country_id');
	tep_session_register('customer_zone_id');

add

$sendto = $customer_default_address_id;
tep_session_register('sendto');
$sendto = $customer_default_address_id;

stew i think this would also solve your problem

Share this post


Link to post
Share on other sites

H Frank,

 

$sendto = $customer_default_address_id;

tep_session_register('sendto')

 

Does the trick!

 

Many thanks

Share this post


Link to post
Share on other sites

stew i think your issue would be solve your problem also. try it please and let me know

Edited by nana

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
Sign in to follow this  

×