Jump to content
Sign in to follow this  
bmcewan

Purchase Without Account Updated & Admin Functionality

Recommended Posts

OK I am lost.....where do we stand now?

 

We need to figure out the problem with customers creating an account during checkout? please explain what is going on?

 

here is how it should go:

 

1. Guest adds product to their cart.

2. Customer clicks checkout

3. Customer clicks create account from login.php

4. Customer fills in account details.

5. Click create account button

6. ends up on create_account_success.php and clicks continue

7. goes to checkout_shipping.

 

lildog

Share this post


Link to post
Share on other sites
OK I am lost.....where do we stand now?

 

We need to figure out the problem with customers creating an account during checkout? please explain what is going on?

 

here is how it should go:

 

1. Guest adds product to their cart.

2. Customer clicks checkout

3. Customer clicks create account from login.php

4. Customer fills in account details.

5. Click create account button

6. ends up on create_account_success.php and clicks continue

7. goes to checkout_shipping.

 

lildog

have just tried putting items into the shopping cart going to login.php and being a returning customer when I clicked sign in I was sent back to index.php. (It did acknowledge I was logged in with the appropriate welcome message)

Thought I would let you know as it's the same as the create_account problem

Cheers

Joyces.

Share this post


Link to post
Share on other sites

Is your create account modified except by PWA? Although I suspect it is in login.php since it affects more than just create_account.php.

 

 

have just tried putting items into the shopping cart going to login.php and being a returning customer when I clicked sign in I was sent back to index.php. (It did acknowledge I was logged in with the appropriate welcome message)

Thought I would let you know as it's the same as the create_account problem

Cheers

Joyces.

Edited by lildog

Share this post


Link to post
Share on other sites

Is anyone else experiencing the login/create account going to index.php?

 

lildog

Share this post


Link to post
Share on other sites
Is your login modified except by PWA?

 

No I dont think so the only major cont that I have added is easy populate.

I've been playing about with it and it seems there is loop now where you can't log in as you keep going back to index.php either as a new customer or returning customer.

I will go through all my old back up files to check that I haven't made any other alterations to login.php in the past and will let you know but i'm fairly sure that it was untouched.

joyces

Share this post


Link to post
Share on other sites

I believe this is the problem: in login.php. I am pretty sure PWA doesn't affect any of this though. The Filename_Default is index.php. Somewhere it looks like $navigation->snapshot is getting modified. This looks like it gets modified from the navigation_history.php class.

 

lildog

 

 

 

// restore cart contents

$cart->restore_contents();

 

if (sizeof($navigation->snapshot) > 0) {

$origin_href = tep_href_link($navigation->snapshot['page'], tep_array_to_string($navigation->snapshot['get'], array(tep_session_name())), $navigation->snapshot['mode']);

$navigation->clear_snapshot();

tep_redirect($origin_href);

} else {

tep_redirect(tep_href_link(FILENAME_DEFAULT));

}

}

}

}

 

 

 

 

No I dont think so the only major cont that I have added is easy populate.

I've been playing about with it and it seems there is loop now where you can't log in as you keep going back to index.php either as a new customer or returning customer.

I will go through all my old back up files to check that I haven't made any other alterations to login.php in the past and will let you know but i'm fairly sure that it was untouched.

joyces

Share this post


Link to post
Share on other sites
I believe this is the problem: in login.php. I am pretty sure PWA doesn't affect any of this though. The Filename_Default is index.php. Somewhere it looks like $navigation->snapshot is getting modified. This looks like it gets modified from the navigation_history.php class.

 

lildog

 

 

 

// restore cart contents

$cart->restore_contents();

 

if (sizeof($navigation->snapshot) > 0) {

$origin_href = tep_href_link($navigation->snapshot['page'], tep_array_to_string($navigation->snapshot['get'], array(tep_session_name())), $navigation->snapshot['mode']);

$navigation->clear_snapshot();

tep_redirect($origin_href);

} else {

tep_redirect(tep_href_link(FILENAME_DEFAULT));

}

}

}

}

 

Sorry Lildog thats a bit above me.

I have checked my code in login and it reads as above. I have also checked all my backup files and create_account.php and login.php haven't been altered by any other mods or conts.

Is this something i've done in error? and any ideas what I need to do to sort it out? I wonder if anyone else is having the same problem.

Cheers

Joyces

Share this post


Link to post
Share on other sites

I thought I had all of my issues worked out, but apparently not. Lil dog, I made the edits that you suggested yesterday in the private message, and it seemed to fix everything.

 

Now when I try to login as a registered user, Im getting this unknown column error. Any ideas why or where to start looking for a fix?

 

1054 - Unknown column 'ab.entry_email_address' in 'field list'

 

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, ab.entry_email_address from address_book ab left join zones z on (ab.entry_zone_id = z.zone_id) left join countries c on (ab.entry_country_id = c.countries_id) where ab.customers_id = '4' and ab.address_book_id = '4'

Share this post


Link to post
Share on other sites

Well, it is telling you entry_email_address column in the address_book table doesn't exist. Check in your phpadmin to make sure it is there. There is no ab.entry_email_address in my install or in the current version of osCommerce. That looks like a custom query possibly from another contrib.

 

lildog

 

 

I thought I had all of my issues worked out, but apparently not. Lil dog, I made the edits that you suggested yesterday in the private message, and it seemed to fix everything.

 

Now when I try to login as a registered user, Im getting this unknown column error. Any ideas why or where to start looking for a fix?

Share this post


Link to post
Share on other sites
I believe this is the problem: in login.php. I am pretty sure PWA doesn't affect any of this though. The Filename_Default is index.php. Somewhere it looks like $navigation->snapshot is getting modified. This looks like it gets modified from the navigation_history.php class.

 

lildog

 

 

 

// restore cart contents

$cart->restore_contents();

 

if (sizeof($navigation->snapshot) > 0) {

$origin_href = tep_href_link($navigation->snapshot['page'], tep_array_to_string($navigation->snapshot['get'], array(tep_session_name())), $navigation->snapshot['mode']);

$navigation->clear_snapshot();

tep_redirect($origin_href);

} else {

tep_redirect(tep_href_link(FILENAME_DEFAULT));

}

}

}

}

 

Hi Lildog

Been back to the beginning and re-installed contribution but still have the problem of not being able to log in as I keep getting sent back to the index page.

My code is as above in login.php do you know how I can stop the modification that is happening to send me back to the index.php page?

Thanks

Joyces

Share this post


Link to post
Share on other sites

joyces,

what page are you coming from? Is this only happening after pwa is installed? Or did it happen before? on the page before login.php add this somewhere after the body tag:

 

Make sure this code is in checkout shipping. This is where your $navigation is getting set. Make sure this is working. Put an echo or something in there to check. Then on login.php print_r($navigation) to see if is set. I assume this is working since you get redirected to login.

 

 

// 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'));

}

Share this post


Link to post
Share on other sites

First install the newest version. And try that. You are right when the order is inserted into the order table, dummy account should be 1.

 

lildog

 

 

Hello.

 

I had posted a question by error (stupid noob error) in the root of threads. I had asked some moderator to move it here. I dont want to make cross posting, so If meanwhile somebody could have a look it is on:

 

http://forums.oscommerce.com/index.php?showtopic=310869

 

Thanks in advance and sorry again.

Share this post


Link to post
Share on other sites

Hi Lildog

I'm really sorry this is all my fault. I added a new box to column_right.php which was for a direct link to login.php for customers who didn't want to go into shopping_cart.php first. I now realise that it is this link that is causing all the problems as everything works great if you use either the checkout link in the shopping cart or the checkout link in the header.php.

I realise I need to add code to account for PWA to the checkout link in column_right and I have been playing about with it all day but i can't seem to get it to work. I have been trying to add code from the changes to shopping_cart.php and header.php as they appear in your contribution to see if I could get the right bit but I think I'm going to admit defeat. The easiest thing would be to remove the link from column_right.php.

I checked the code and it does appear checkout shipping as it should.

cheers

joyces

Share this post


Link to post
Share on other sites

Well, you can try this. Modify the link in your box to go to checkout_shipping. That way if the customer is not logged in it will set the navigation variable and redirect to login.php. Depending on how fast you want to get this done, You can also post your link and maybe we can work it out.

 

lildog

 

Hi Lildog

I'm really sorry this is all my fault. I added a new box to column_right.php which was for a direct link to login.php for customers who didn't want to go into shopping_cart.php first. I now realise that it is this link that is causing all the problems as everything works great if you use either the checkout link in the shopping cart or the checkout link in the header.php.

I realise I need to add code to account for PWA to the checkout link in column_right and I have been playing about with it all day but i can't seem to get it to work. I have been trying to add code from the changes to shopping_cart.php and header.php as they appear in your contribution to see if I could get the right bit but I think I'm going to admit defeat. The easiest thing would be to remove the link from column_right.php.

I checked the code and it does appear checkout shipping as it should.

cheers

joyces

Share this post


Link to post
Share on other sites

Hi Lildog

Yipeeeeeeeeeeeeeeeeeeee. Changing the link to checkout_shipping worked YOU ARE AWESOME!!!

One last thing I want to do is add another box to the column_right.php which is a login box. I'm off to read all the postings to see if this is possible.

Thanks again, really appreciate the time you have taken helping me.

Cheers

Joyces

Share this post


Link to post
Share on other sites

joyces,

Great! I am sorry it took so long to track down. this should work I have it installed.

 

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

 

lildog

 

Hi Lildog

Yipeeeeeeeeeeeeeeeeeeee. Changing the link to checkout_shipping worked YOU ARE AWESOME!!!

One last thing I want to do is add another box to the column_right.php which is a login box. I'm off to read all the postings to see if this is possible.

Thanks again, really appreciate the time you have taken helping me.

Cheers

Joyces

Share this post


Link to post
Share on other sites
Well, it is telling you entry_email_address column in the address_book table doesn't exist. Check in your phpadmin to make sure it is there. There is no ab.entry_email_address in my install or in the current version of osCommerce. That looks like a custom query possibly from another contrib.

 

lildog

 

Thank you for your help lildog, you were right, it was a missing table in the db from another contribution. I added the tables, and all is good now, except one thing, and I think this is a PWA issue. Nafri had the same issue from June 1, 2008 and posted on here, but i never saw a response from anyone.

 

When I am in the admin panel and click on customers...i get the customers screen, but i also have the following warnings at the top of the page....

 

Warning: array_merge() [function.array-merge]: Argument #1 is not an array in public_html/admin/customers.php on line 765

 

Warning: array_merge() [function.array-merge]: Argument #2 is not an array in /public_html/admin/customers.php on line 767

 

Warning: reset() [function.reset]: Passed variable is not an array or object in /public_html/admin/includes/classes/object_info.php on line 17

 

Warning: Variable passed to each() is not an array or object in /public_html/admin/includes/classes/object_info.php on line 18

 

 

Anyone else seen this...LilDog?

Share this post


Link to post
Share on other sites

I don't think this is a pwa issue. The code below is causing your problem, in customers.php in admin. For some reason the first and second variable in the parenthesis is not an array. I will ook into the pwa code again...but I would suspect another contrib.

 

$customer_info = array_merge($country, $info, $reviews);

 

$cInfo_array = array_merge($customers, $customer_info);

 

lildog

Share this post


Link to post
Share on other sites
I don't think this is a pwa issue. The code below is causing your problem, in customers.php in admin. For some reason the first and second variable in the parenthesis is not an array. I will ook into the pwa code again...but I would suspect another contrib.

 

$customer_info = array_merge($country, $info, $reviews);

 

$cInfo_array = array_merge($customers, $customer_info);

 

lildog

 

 

Lil dog I fixed the error I think, but im not sure that it is permanent, if that makes sense. Basically, this error was appearing when a customer was selected in the admin that was created before I made the edits to the $guestaccount=null to $guestaccount=0 line. So this customer was still in the db, but had null for an address. When the function tried to merge the columns for that customer, I got the error. So, I went into the db and deleted this customer, and the error disappeared.

 

Im just hoping that it is permanent. Does this make sense to you?

 

LilDog you are great, and I appreciate the excellent advice you have supplied so far. Im learning slowly, but its members like you that help us less experienced coders to learn.

 

Thank you again!

Share this post


Link to post
Share on other sites

Oh yeah.....that should do it. That null really threw me for a loop. I had to do the same thing as you. I guess I need to fix that in the contrib. Good catch. And thank you guys for pointing out the errors so they can be fixed for future generations of oscommercers!

 

lildog

 

 

Lil dog I fixed the error I think, but im not sure that it is permanent, if that makes sense. Basically, this error was appearing when a customer was selected in the admin that was created before I made the edits to the $guestaccount=null to $guestaccount=0 line. So this customer was still in the db, but had null for an address. When the function tried to merge the columns for that customer, I got the error. So, I went into the db and deleted this customer, and the error disappeared.

 

Im just hoping that it is permanent. Does this make sense to you?

 

LilDog you are great, and I appreciate the excellent advice you have supplied so far. Im learning slowly, but its members like you that help us less experienced coders to learn.

 

Thank you again!

Share this post


Link to post
Share on other sites

I just spent the last 2.5 hours doing the PWA install for the first time to my sandbox server only to see NOTHING.

 

I'm sure there's something I'm overlooking, but there is no PWA functionality at all. When I put items in the cart and click checkout, it shows the shipping page, but redirects me to the login page. I don't see any way to checkout without creating an account or logging in.

 

Can someone help?

 

Thanks,

 

JamminJimE

owner

Edited by Jan Zonjee

Share this post


Link to post
Share on other sites

Hi Everyone,

 

I have installed this contrib and it works fine - the problem I have is that my login page displays a chunk of white space at the top of the page. I have tried messing around with the tables in login.php but haven't been able to fix it.

Any ideas? The site is http://www.redrockoutdoor.com.au/login.php?

 

Thanks,

Jim

Share this post


Link to post
Share on other sites

You are missing an entire box in that space it should say: Go back and check through your code for login.php

 

Do you want to go straight to the checkout process?

 

Would like like to check out without creating a customer account? Please note that all of our services will not be available to customers that do not wish to create an account. Also, you cannot view the status of your order, and each time you shop with us you will have to re-enter all of your data.

 

Creating an account is free. If you still wish to continue to checkout please click the checkout button to your right.

 

 

 

 

 

 

Hi Everyone,

 

I have installed this contrib and it works fine - the problem I have is that my login page displays a chunk of white space at the top of the page. I have tried messing around with the tables in login.php but haven't been able to fix it.

Any ideas? The site is http://www.redrockoutdoor.com.au/login.php?

 

Thanks,

Jim

Share this post


Link to post
Share on other sites

it should take you to login first...

 

 

I just spent the last 2.5 hours doing the PWA install for the first time to my sandbox server only to see NOTHING.

 

I'm sure there's something I'm overlooking, but there is no PWA functionality at all. When I put items in the cart and click checkout, it shows the shipping page, but redirects me to the login page. I don't see any way to checkout without creating an account or logging in.

 

Can someone help?

 

Thanks,

 

JamminJimE

owner

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  

×