Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Purchase Without Account Updated & Admin Functionality


Guest

Recommended Posts

Here is the best solution i think:

 

in create account:

find:

// PWA BOF 2

// $check_email_query = tep_db_query("select count(*) as total from " . TABLE_CUSTOMERS . " where customers_email_address = '" . tep_db_input($email_address) . "'");

// PWA BOF 2b

$check_email_query = tep_db_query("select count(*) as total from " . TABLE_CUSTOMERS . " where customers_email_address = '" . tep_db_input($email_address) . "' and guest_account != '1'");

// PWA EOF 2b

// PWA EOF 2

$check_email = tep_db_fetch_array($check_email_query);

if ($check_email['total'] > 0) {

$error = true;

$messageStack->add('create_account', ENTRY_EMAIL_ADDRESS_ERROR_EXISTS);

}

}

 

 

CHANGE to:

// PWA BOF 2

if (!isset($HTTP_GET_VARS['guest']) && !isset($HTTP_POST_VARS['guest'])) {

$check_email_query = tep_db_query("select count(*) as total from " . TABLE_CUSTOMERS . " where customers_email_address = '" . tep_db_input($email_address) . "' and guest_account != '1'");

// PWA EOF 2b

$check_email = tep_db_fetch_array($check_email_query);

if ($check_email['total'] > 0) {

$error = true;

$messageStack->add('create_account', ENTRY_EMAIL_ADDRESS_ERROR_EXISTS);

}

}

// PWA BOF 2

}

// PWA EOF 2

Link to comment
Share on other sites

I installed PWA 2.0c on a RC2a site with little no problem. However, when the customer goes to checkout and STILL has to complete the registration form then clicks continue.......the customer returns back to the login.php screen and is asked to choose again. So, I have a loop........has anyone else experienced this ???

Link to comment
Share on other sites

... when the customer goes to checkout and STILL has to complete the registration form then clicks continue.......the customer returns back to the login.php screen and is asked to choose again. So, I have a loop........has anyone else experienced this ???

 

I just installed PWA2.0c today, and am testing it. I do not have the loop you mention. Sorry I can't tell you what's causing it, but I'm sure someone here can.

Link to comment
Share on other sites

I also just noticed that I have duplicate lines in the admin area: Purchase without account and Purchase without account shipping address lines are duplicated......so, I must have done something wrong..........going to recheck it.

Link to comment
Share on other sites

Hi Lildog :-)

 

Thanks for that fast reply, wow!

 

I tried it the next day and it seemed to be working which had me scratching my head, as I hadnt changed anything other than remove all customers from the table and then shut the browser down, clear the cache, cookies etc. and then retry, but I had this with the older version too and seemed to remember clearing the customers did the trick. Of course, its a new build so I can afford to remove the "new" customers as they are only test customers :-D

 

One thing I noticed is that now if I go through the checkout, instead of giving the "E-Mail exists" it now works and creates a duplicate customer (if I enter fred bloggs again with the same email address), showing him twice in the homepage of admin for RC2 which I am using, so I guess it works from that point of view. B)

 

I have another shop build to add PWA to, and I will do it word for word as in the install doc, apply the patch up to 2.0c from 2.0b and then do the bit below and let you know and report here for everyone :P

 

Regards,

Paul

 

Here is the best solution i think:

 

in create account:

find:

// PWA BOF 2

// $check_email_query = tep_db_query("select count(*) as total from " . TABLE_CUSTOMERS . " where customers_email_address = '" . tep_db_input($email_address) . "'");

// PWA BOF 2b

$check_email_query = tep_db_query("select count(*) as total from " . TABLE_CUSTOMERS . " where customers_email_address = '" . tep_db_input($email_address) . "' and guest_account != '1'");

// PWA EOF 2b

// PWA EOF 2

$check_email = tep_db_fetch_array($check_email_query);

if ($check_email['total'] > 0) {

$error = true;

$messageStack->add('create_account', ENTRY_EMAIL_ADDRESS_ERROR_EXISTS);

}

}

 

 

CHANGE to:

// PWA BOF 2

if (!isset($HTTP_GET_VARS['guest']) && !isset($HTTP_POST_VARS['guest'])) {

$check_email_query = tep_db_query("select count(*) as total from " . TABLE_CUSTOMERS . " where customers_email_address = '" . tep_db_input($email_address) . "' and guest_account != '1'");

// PWA EOF 2b

$check_email = tep_db_fetch_array($check_email_query);

if ($check_email['total'] > 0) {

$error = true;

$messageStack->add('create_account', ENTRY_EMAIL_ADDRESS_ERROR_EXISTS);

}

}

// PWA BOF 2

}

// PWA EOF 2

Link to comment
Share on other sites

hmm, maybe the old customers 'dummy account' are not set to 'true' or 'false' maybe null? which technically is different. The 2nd fix I posted could be correct as !1 maybe different that 0 too. The third fix should work too by just bypassing the email check....basically it just say blah blah blah They don't have an account so I don't care what their email addy is blah blah blah. If anyone else experiences this problem please report in and I will look into it.

 

lildog

 

 

Hi Lildog :-)

 

Thanks for that fast reply, wow!

 

I tried it the next day and it seemed to be working which had me scratching my head, as I hadnt changed anything other than remove all customers from the table and then shut the browser down, clear the cache, cookies etc. and then retry, but I had this with the older version too and seemed to remember clearing the customers did the trick. Of course, its a new build so I can afford to remove the "new" customers as they are only test customers :-D

 

One thing I noticed is that now if I go through the checkout, instead of giving the "E-Mail exists" it now works and creates a duplicate customer (if I enter fred bloggs again with the same email address), showing him twice in the homepage of admin for RC2 which I am using, so I guess it works from that point of view. B)

Link to comment
Share on other sites

I've this problem with version 2.0e and RC2a.

 

It was a vanilla install and I simply uploaded your files, but when I create an account it says: 1048 - Column 'guest_account' cannot be null.

 

I already found this solution: http://www.oscommerce.com/forums/index.php?s=&...t&p=1282724

 

but I don't know if it is good.

I love oscommerce and OS software! I'm not a programmer, I'm only a learning boy and a translator :) I love full contribution packages!

Link to comment
Share on other sites

i have installed this contribution and it works fine when i try to pruchse without an account, however, if i try to create an account i get the following error:

 

insert into customers (customers_firstname, customers_lastname, customers_email_address, customers_telephone, customers_fax, customers_newsletter, customers_password, guest_account) values ('Test', 'user', [email protected], '919-999-9999', '', '1', '1e5888abfbcbf75319ed2fe5cc72fd86:c1', null)

 

has anyone ever run across this?

Link to comment
Share on other sites

I just installed this contribution and now I get the following error when clicking on the checkout button from the shopping cart:

 

Parse error: syntax error, unexpected '}' in /catalog/login.php on line 175

 

If my editor program is correct...

 

<script language="javascript"><!--


function session_win() {


 window.open("<?php echo tep_href_link(FILENAME_INFO_SHOPPING_CART); ?>","info_shopping_cart","height=460,width=430,toolbar=no,statusbar=no,scrollbars=yes").focus();


}


//--></script>

 

function session_win() { is the line with the parse error. Before I added the PWA code I didn't have a problem, now I do.

Edited by Maxwell Smart
Link to comment
Share on other sites

Ok, fixed the problem above. It wasn't the line I thought it was. I forgot to paste a <?php line into the page.

 

Now I've got another problem....

 

When clicking on the checkout button in the shopping cart I'm getting the same 2 options I had before... New Customer or Login

Link to comment
Share on other sites

OK...for those of you getting the guest accountcannot be null. Go into your phpmyadmin and choose the guest account column in customers table. Make sure the settings are:

 

 Field  Type Collation Attributes Null Default Extra

guest_account  tinyint(3)     No  0 

 

 

Please let me know if this works for you so I can fix the problem in the contrib.

 

lildog

Edited by lildog
Link to comment
Share on other sites

Maxwell, you are not getting the checkout without account option in login? Check login.php for the pwa code. In my shopping cart I have continue shopping and checkout.

 

lildog

 

Ok, fixed the problem above. It wasn't the line I thought it was. I forgot to paste a <?php line into the page.

 

Now I've got another problem....

 

When clicking on the checkout button in the shopping cart I'm getting the same 2 options I had before... New Customer or Login

Link to comment
Share on other sites

OK...for those of you getting the guest accountcannot be null. Go into your phpmyadmin and choose the guest account column in customers table. Make sure the settings are:

 

 Field  Type Collation Attributes Null Default Extra

guest_account  tinyint(3)     No  0 

 

 

Please let me know if this works for you so I can fix the problem in the contrib.

 

lildog

 

Hi

all posts on this problem refer to 'customer_account" cannot be null. My error message is 'customer_password' cannot be null. I have checked the settings above but still the same error.

I'm sure I have read all the posts here as well as going through the install guide 3 times now - what am i doing wrong?

Cheers

Andrea

Link to comment
Share on other sites

Hi

all posts on this problem refer to 'customer_account" cannot be null. My error message is 'customer_password' cannot be null. I have checked the settings above but still the same error.

I'm sure I have read all the posts here as well as going through the install guide 3 times now - what am i doing wrong?

Cheers

Andrea

 

I know you're not meant to reply to your own posts but I think I have sorted it

customer_password cannot be null is sorted if you amend the database for customer_password to 'Null' I'm not sure if thats going to cause problems so going to try putting in test orders to see. If anyone knows that this is going to cause problems would be really grateful if you could let me know - cheers.

Then had the problem with customer_account cannot be null and customer_block but "deivid I am also getting this errors, I don't know ve... Jul 25 2008, 08:32 AM" post sorts those out.

Now need to sort out how to get customers setting up a new account in 'Check Out' to stay in check out once the account has been set up so they can continue with the check out proceedure without having to log in. Think I've seen a post on this so it looks like a bit more reading to do!!

Is this stuff really hard or am I just thick?

Link to comment
Share on other sites

I know you're not meant to reply to your own posts but I think I have sorted it

customer_password cannot be null is sorted if you amend the database for customer_password to 'Null' I'm not sure if thats going to cause problems so going to try putting in test orders to see. If anyone knows that this is going to cause problems would be really grateful if you could let me know - cheers.

Then had the problem with customer_account cannot be null and customer_block but "deivid I am also getting this errors, I don't know ve... Jul 25 2008, 08:32 AM" post sorts those out.

Now need to sort out how to get customers setting up a new account in 'Check Out' to stay in check out once the account has been set up so they can continue with the check out proceedure without having to log in. Think I've seen a post on this so it looks like a bit more reading to do!!

Is this stuff really hard or am I just thick?

 

Im getting the same errors you are with the null settings. I just checked the tables in the DB and the only difference was mine was set at Tiny(4) and not Tiny(3) but I dont think that has anything to do with the errors.

 

Lildog, if you have seen this before, please let me know.

Link to comment
Share on other sites

I also just noticed that I have duplicate lines in the admin area: Purchase without account and Purchase without account shipping address lines are duplicated......so, I must have done something wrong..........going to recheck it.

 

 

dun i had the same issue as you from your post. if you havent figured it out by now, heres the answer:

 

you have run the sql query to insert two new lines into the configure table twice. You simply told the database twice to add these lines. Just go into phpmyadmin and search the configure table. Do a browse, and youll see the two extra rows in that table. You should be able to delete them from there.

 

I hope that answers your question.

 

And by the way LilDog, I wiped my store started from scratch, and have only installed the Register Globals contribution and the Master Products Contribution, then I added PWA2.0b and I still get the guest account cannot be null error, even though its a new install, and the column in the db is not set to null.

 

Im on a tight deadline with this store, and this is the only thing holding us up. Anyone with ideas, Id greatly appreciate them!

 

Thanks

Link to comment
Share on other sites

Joyces,

all in all it is not that hard. The hard part is making it work for all installations. I know it works on my install but I have alot of contribs installed. I will try to help sort these out and get it working for evryone.

 

lildog

 

I know you're not meant to reply to your own posts but I think I have sorted it

customer_password cannot be null is sorted if you amend the database for customer_password to 'Null' I'm not sure if thats going to cause problems so going to try putting in test orders to see. If anyone knows that this is going to cause problems would be really grateful if you could let me know - cheers.

Then had the problem with customer_account cannot be null and customer_block but "deivid I am also getting this errors, I don't know ve... Jul 25 2008, 08:32 AM" post sorts those out.

Now need to sort out how to get customers setting up a new account in 'Check Out' to stay in check out once the account has been set up so they can continue with the check out proceedure without having to log in. Think I've seen a post on this so it looks like a bit more reading to do!!

Is this stuff really hard or am I just thick?

Link to comment
Share on other sites

First of all...everyone:

 

1.in catalog/login.php

 

***FIND:

$check_customer_query = tep_db_query( "select customers_id, customers_firstname, customers_password, customers_email_address, customers_default_address_id, customers_block, guest_account from " . TABLE_CUSTOMERS . " where customers_email_address = '" . tep_db_input($email_address). "' and guest_account='0'");

 

***REPLACE WITH:

$check_customer_query = tep_db_query( "select customers_id, customers_firstname, customers_password, customers_email_address, customers_default_address_id, guest_account from " . TABLE_CUSTOMERS . " where customers_email_address = '" . tep_db_input($email_address). "' and guest_account='0'");

Link to comment
Share on other sites

EVERYONE!!!

 

2. catalog/create_account.php

 

***FIND:

$guestaccount = 'null';

OR

$guestaccount = 'guestaccount';

 

***REPLACE WITH:

$guestaccount = '0';

Edited by lildog
Link to comment
Share on other sites

here are the settings for customer password in my db: if you have other contribs installed it may have changed.

 Field  Type Collation Attributes Null Default Extra

 customers_password  varchar(40) latin1_swedish_ci   Yes  NULL 

 

 

 

Im getting the same errors you are with the null settings. I just checked the tables in the DB and the only difference was mine was set at Tiny(4) and not Tiny(3) but I dont think that has anything to do with the errors.

 

Lildog, if you have seen this before, please let me know.

Link to comment
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

Edited by lildog
Link to comment
Share on other sites

Joyces,

all in all it is not that hard. The hard part is making it work for all installations. I know it works on my install but I have alot of contribs installed. I will try to help sort these out and get it working for evryone.

 

lildog

 

 

Sorry lildog if I gave the wrong impression, I think the contribution is brilliant and I'm in awe of you, and all the others that contribute and like everyone else, very grateful.

Thanks for all you are doing

Joyces

Link to comment
Share on other sites

No offense was taken.....it really is not that hard just time consuming. So how is your installation now? I have a couple of extra days and would like to sort this contrib out.

 

lildog

 

Sorry lildog if I gave the wrong impression, I think the contribution is brilliant and I'm in awe of you, and all the others that contribute and like everyone else, very grateful.

Thanks for all you are doing

Joyces

Link to comment
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

 

Hi Lildog

Have added on the 2 updates for login.php and create_account.php and all seems good. Thanks for making the database settings for customer_password clear that's now great.

With reference to above all is as it should be until step 7 when the continue button after create_account_sucess.php takes you to index.php so the customer would have to return to the checkout and log in.

Well thats what happens for me anyway. Just wanted to thank you for all your hard work it is much appreciated

Joyces

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...