Guest Posted July 29, 2003 Share Posted July 29, 2003 In catalog/Order_Info_Process.php: Around line 21 find: require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_CREATE_ACCOUNT_PROCESS); Change to: require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_CREATE_ACCOUNT); ----------------------------------------------------------------------------- Around line 301 find: $check_country_query = tep_db_query("select entry_country_id, entry_zone_id from " . TABLE_ADDRESS_BOOK . " where customers_id = '" . $check_customer['customers_id'] . "' and address_book_id = '1'"); $check_country = tep_db_fetch_array($check_country_query); $customer_id = $check_customer['customers_id']; $customer_default_address_id = $check_customer['customers_default_address_id']; $customer_first_name = $check_customer['customers_firstname']; $customer_country_id = $check_country['entry_country_id']; $customer_zone_id = $check_country['entry_zone_id']; tep_session_register('customer_id'); 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'); } // if-else $pass_ok Change to: $check_country_query = tep_db_query("select entry_country_id, entry_zone_id from " . TABLE_ADDRESS_BOOK . " where customers_id = '" . $check_customer['customers_id'] . "' and address_book_id = '[address_book_id]'"); $check_country = tep_db_fetch_array($check_country_query); $customer_id = $check_customer['customers_id']; // $customer_default_address_id = $check_customer['customers_default_address_id']; $customer_first_name = $check_customer['customers_firstname']; $customer_country_id = $check_country['entry_country_id']; $customer_zone_id = $check_country['entry_zone_id']; tep_session_register('customer_id'); // 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'); } // if-else $pass_ok ------------------------------------------------------------------------------------ Around line 340 find: 'customers_password' => crypt_password($password), 'customers_default_address_id' => 1); Change to: 'customers_password' => tep_encrypt_password($password)); // 'customers_default_address_id' => 1); ------------------------------------------------------------------------------------- Around line 351 find: 'address_book_id' => 1, Change to: 'address_book_id' => $address_id, ------------------------------------------------------------------------------------- Around line 372 find: 'address_book_id' => 1, tep_db_perform(TABLE_ADDRESS_BOOK, $sql_data_array); tep_db_query("insert into " . TABLE_CUSTOMERS_INFO . " (customers_info_id, customers_info_number_of_logons, customers_info_date_account_created) values ('" . tep_db_input($customer_id) . "', '0', now())"); $customer_first_name = $firstname; $customer_default_address_id = 1; Change to: tep_db_perform(TABLE_ADDRESS_BOOK, $sql_data_array); $address_id = tep_db_insert_id(); tep_db_query("update " . TABLE_CUSTOMERS . " set customers_default_address_id = '" . (int)$address_id . "' where customers_id = '" . (int)$customer_id . "'"); tep_db_query("insert into " . TABLE_CUSTOMERS_INFO . " (customers_info_id, customers_info_number_of_logons, customers_info_date_account_created) values ('" . (int)$customer_id . "', '0', now())"); // tep_db_query("insert into " . TABLE_CUSTOMERS_INFO . " (customers_info_id, customers_info_number_of_logons, customers_info_date_account_created) values ('" . tep_db_input($customer_id) . "', '0', now())"); $customer_first_name = $firstname; $customer_default_address_id = $address_id; I am sure there is a better way to do this...I just needed for it to work properly for more than one transaction without having to delete accounts from the address_book. Quote Link to comment Share on other sites More sharing options...
mcbsolutions Posted August 6, 2003 Share Posted August 6, 2003 I can't remember who the original author if this was, but this seems to be a fix... this mod clears out the account on checkout, so it fixes the problem of if they purchase something and come back. Well, whoever the original poster of this fix was, sorry I forgot to write down your name. Here's that person's fix: Posted: Thu Jul 03, 2003 11:13 pm Post subject: -------------------------------------------------------------------------------- I had the same problem, when I did some test purchases without creating an account. I was able to go back and click on 'Password Forgotten?' link and get a new password and of course get access to the account, which this is not the way it is supposed to work. Here is the way I fixed it: in /catalog/checkout_success.php insert the following code right before the HTML code but within the php tags. Code: // Added a check for a Guest checkout and cleared the session - 030411 if (tep_session_is_registered('noaccount')) { tep_db_query("delete from " . TABLE_ADDRESS_BOOK . " where customers_id = '" . tep_db_input($customer_id) . "'"); tep_db_query("delete from " . TABLE_CUSTOMERS . " where customers_id = '" . tep_db_input($customer_id) . "'"); tep_db_query("delete from " . TABLE_CUSTOMERS_INFO . " where customers_info_id = '" . tep_db_input($customer_id) . "'"); tep_db_query("delete from " . TABLE_CUSTOMERS_BASKET . " where customers_id = '" . tep_db_input($customer_id) . "'"); tep_db_query("delete from " . TABLE_CUSTOMERS_BASKET_ATTRIBUTES . " where customers_id = '" . tep_db_input($customer_id) . "'"); tep_db_query("delete from " . TABLE_WHOS_ONLINE . " where customer_id = '" . tep_db_input($customer_id) . "'"); tep_session_destroy(); } this will get rid of the customer account information, therefore the customer will not have access to the account nor the order history but you will keep the order information. If you have any problems just let me know. The only thing this doesn't take care of is if the customer closes his / her browser or leaves your site after putting in their information in the Order_Info.php, but before completing their checkout.... then obviously the customer information is still saved... I haven't been able to think of any logical or easy way to fix this. Shouldn't be a problem most of the time though. Hi, this fix was originally posted here by phelan http://www.oscommerce.com/forums/viewtopic.php?t=45604 I went ahead and implemented this change and all seems to be working fine, except when I do a test order USING an account, after I confirm the order, on checkout_success.php when I hit continue, nothing happens. Normally it would bring me back to the default.php page. Anyone encounter this? I'm not sure if this is related to what I changed on checkout_success.php or not. Thanks for helping. Steve Quote Link to comment Share on other sites More sharing options...
Guest Posted August 7, 2003 Share Posted August 7, 2003 This whole process worked great until the end. Then I got the following error. Parse error: parse error, unexpected $ in /var/www/html/shop/catalog/checkout_success.php on line 161 Any ideas? Thanks Quote Link to comment Share on other sites More sharing options...
Guest Posted August 7, 2003 Share Posted August 7, 2003 What does line 161 and the surrounding lines look like? Quote Link to comment Share on other sites More sharing options...
Guest Posted August 7, 2003 Share Posted August 7, 2003 that was the interesting thing. the file stopped at line 154. Quote Link to comment Share on other sites More sharing options...
♥lorax Posted August 8, 2003 Share Posted August 8, 2003 Hey JB, First - thank you for those edits - they help. The only issue I have is that once I submit the form I get the error "Error: No match for E-Mail Address and/or Password." Does this ring a bell or do I need to do some digging? Quote Apathy is a dominant gene - mutate. Link to comment Share on other sites More sharing options...
myg- Posted August 11, 2003 Share Posted August 11, 2003 Hey, I'm getting this error when I'm trying to checkout. (With the PWA system) Fatal error: Call to a member function on a non-object in /home/******/public_html/catalog/login.php on line 62 has anyone ever had this problem before? Quote Link to comment Share on other sites More sharing options...
roberth12345 Posted August 14, 2003 Share Posted August 14, 2003 Whenever I change FILENAME_CREATE_ACCOUNT_PROCESS to FILENAME_CREATE_ACCOUNT I get the following error from the login.php page...Error: No match for E-Mail Address and/or Password. Any ideas????? :) I've been knocking my head against a wall for the last 2 days trying to work out this error: Fatal error: Failed opening required 'includes/languages/english/FILENAME_CREATE_ACCOUNT_PROCESS' (include_path='.:/php/includes:/usr/share/php') in /home/virtual/site2/fst/var/www/html/OSCOMMERCETEST/catalog/Order_Info_Process.php on line 21 when I change the code so it reads creaate account.php rather than the non existant create_account_process.php and it works sort of . . . but i get this : 1062 - Duplicate entry '1' for key 1 insert into address_book (customers_id, address_book_id, entry_firstname, entry_lastname, entry_street_address, entry_postcode, entry_city, entry_country_id, entry_gender, entry_company, entry_suburb, entry_zone_id, entry_state) values ('11', '1', 'czvbxcvb', 'xcvbxcvb', 'vbcxvbc', 'bxcvbxcb', 'cxvbbfgf', '238', 'm', 'z', 'xcbxc', '0', 'gsdgf') I have tried several thing and to no avail - except this : (SEE BELOW) and it works ! ! ! ! so a BIG thanks to JB Justin for helping keep my hair! :) Joined: 09 Dec 2002 Posts: 175 TEN wrote: i change the create_account_process.php to create_account.php and seems working. However, when i try to order second time with different info, it said the address_book_id was duplicated 1062 - Duplicate entry '1' for key 1 any idea? Thanks, TEN This comes from the PWA contribution trying to always set the address_id="1" in the database instead of auto-incrementing the number as it should. I found that the code by DM to checkout_success.php eliminated this error unless someone tried to pay via Paypal using the Paypal IPN contribution. If they do not make it all the way back to the site and hit the checkout_success.php page the same problem would occur the next time someone tried to checkout w/o an account because there would already be an address_id=1 in the db. Anyway, I went through my files (MS2) and changed it so the address_id would auto-increment and the problem has been removed. The only problem that still remains is that if Paypal IPN is used then an account is created in the db. I have yet to figure out where to add the code that DM posted to the Paypal IPN contribution so that it will delete the customers info and address_book. So far if I delete the info it does not get passed to Paypal for obvious reasons. At the moment, I just figure for all orders that have the status "Paypal Processing" -meaning they did not click "return to site" button at Paypal I just need to delete that customers info. If anyone wants to give this a whirl with MS2 using the Paypal IPNv0981 contribution as well you can download my files from here: http://www.diyreef.com/PWA_MS2.zip If it works for several of you, with the exception of the Paypal IPN problem I mentioned above I will go ahead and contribute it since it contains DMs code as well as the add-on fixes that have been posted here and in the contributions section, along with being done on MS2 files. Quote Link to comment Share on other sites More sharing options...
Leonardo Posted August 14, 2003 Share Posted August 14, 2003 Why are you trying to change the file name. Thats why you're getting the error. Quote turtle power! Link to comment Share on other sites More sharing options...
Guest Posted August 14, 2003 Share Posted August 14, 2003 I've looked all over the place, but can't seem to find what I'm looking for. I'm hoping that all of you that have been using Purchase Without Account will be able to help me. My client accepts political donations. No need for a customer to setup an account and no need for checkout shipping. All thats needed is the credit card info. I have Purchase Without Account setup and functional so that it takes the customer directly to the order_info page which collects their personal info, then redirects them right to the Checkout Payment page. So far I have been able to accomplish all of this without a problem... accept when the customer gets to the Checkout Payment page. I am unable to get the Billing Address info to appear. Is that the way its supposed to be? I am assuming no, but I wanted to verify it with all of you. So what in the world am I missing that will allow the Billing Address info to be correctly displayed. Any help or advise would be appreciated. Thanks. -R Quote Link to comment Share on other sites More sharing options...
roberth12345 Posted August 15, 2003 Share Posted August 15, 2003 I'm changing the filename because that was a solution someone had offered in an earlier post for my problem. Have you had any similiar problems with this module? Why are you trying to change the file name. Thats why you're getting the error. Quote Link to comment Share on other sites More sharing options...
Otto Posted August 17, 2003 Share Posted August 17, 2003 Hi. I'm interested in trying out oscommerce for paypal but before I install it and try editing the php code as many have shown here, I'd like to know whether it's possible to completely bypass/delete customer account sign-up. Because I will be using paypal where customers have to sign up anyway, the shopping cart itself has to have no sign-up procedures at all (unless I want to annoy and lose customers). So, will this "Purchase Without Account" mod really do what I need (even with lots of code editing)? Quote Link to comment Share on other sites More sharing options...
♥lorax Posted August 18, 2003 Share Posted August 18, 2003 Otto, It is possible to do nearly anything with osC (aside from making your morning coffee). Since you're new to osC, you should count on it taking some time to get up to speed with how the cart is built and where everything is before you are able to edit it. Unless you're very comfortable with PHP and wrapping your head around someone else's code. The Purchase Without An Account contribution simply offers the visitor yet another method to check out. It does not disable the login or account sign up procedures. Think of it as an end run around them. HTH Quote Apathy is a dominant gene - mutate. Link to comment Share on other sites More sharing options...
♥lorax Posted August 18, 2003 Share Posted August 18, 2003 BTW - welcome to the Board! Quote Apathy is a dominant gene - mutate. Link to comment Share on other sites More sharing options...
nukleuz9 Posted September 7, 2003 Share Posted September 7, 2003 on my login.php page the font size for the first two options is small, whereas the last option (go directly to checkout) is in a larger font. how do i change the font size to suit the others? Quote Link to comment Share on other sites More sharing options...
nukleuz9 Posted September 9, 2003 Share Posted September 9, 2003 on my login.php page the font size for the first two options is small, whereas the last option (go directly to checkout) is in a larger font. how do i change the font size to suit the others? Quote Link to comment Share on other sites More sharing options...
BadSHOT Posted September 10, 2003 Share Posted September 10, 2003 JB, Can you repost to the contribution downloads area an updated PWA? I've read so many posts that involve having to make changes to the existing one that there is no way I could ever do them all. Quote __________________________ David McGuffin Web Designer Link to comment Share on other sites More sharing options...
Guest Posted September 10, 2003 Share Posted September 10, 2003 And what changes would those be? Basically all of the changes listed in this thread were incorporated into the newest version that is in the contributions section v0.60b There was a problem with someone else being thrown back to the login page instead of checkout_success, but that turned out to be a problem with the authorize.net module and not this contribution. So far, when properly installed I have had no one complain that this does not work. There are the known issues of someone leaving before completing checkout or not returning from the Paypal site, but so far there has been no fix for those unless someone wants to re-write the whole checkout process. Quote Link to comment Share on other sites More sharing options...
BadSHOT Posted September 10, 2003 Share Posted September 10, 2003 JB, I was specifically referring to the problem of being thrown back to the login page. It was doing this with my store, and I didn't have the Authorizenet module installed. Do you per chance have an updated PWA download available with all the fixes from the previous "threads" I could get from you??? Thanks. Quote __________________________ David McGuffin Web Designer Link to comment Share on other sites More sharing options...
Guest Posted September 10, 2003 Share Posted September 10, 2003 If I sent it to you it would just be a copy of v0.60b since that is the one that contained the known fixes from the other threads already in it. Did you load v0.60b onto MS2? If so, do you have a url I could look at? If you don't want to post it here just PM it to me...as that is how we figured out it was a problem with authorize.net module in the previous thread. Quote Link to comment Share on other sites More sharing options...
ScrltOTara Posted September 12, 2003 Share Posted September 12, 2003 Hi: I love the purchase without account, but I'm suddenly getting a javascript error on the form, and it takes me back to the "login.php" page with this url: https://beautysurg.com/catalog/login.php/login/fail The error is this: form.elements is null or not an object I did start editing the pages, but all I did was take out the left column, add my own stylesheet and change the body tag. I even tried reuploading the original pages, but still get this error. Anyone have any ideas? Thanks, Quote Tara Lang Link to comment Share on other sites More sharing options...
ScrltOTara Posted September 13, 2003 Share Posted September 13, 2003 I figured out the javascript error goes away if I call the page insecurely, it has something to do with that, but I'm still sent back to the login page when I try to checkout without creating an account. I can't figure out why. Quote Tara Lang Link to comment Share on other sites More sharing options...
rickyb Posted September 19, 2003 Share Posted September 19, 2003 1) I'm unsure as how to prohibit shoppers that are using the "Purchase Without Account" checkout method from having access to "My Account" It seems confusing if they opt NOT to create an account yet still have access to one. 2) How to eliminate the "log off" option located in the header. I saw the note in the install readme regarding the "log off" scenario, but wasn't clear to me on how to implement. 3) Why, if a "Purchase Without Account" user completes the the Order_info.php page, yet doesn't complete the transaction for whatever reason. They appear to still have an account and are listed as a Cusomer in the admin? This seems an error. Any answers / solutions etc would be greatly appreciated. [ Pwa_0.60b / oscommerce-2.2ms2 ] Thanks for anyones time and knowledge. Quote Link to comment Share on other sites More sharing options...
Dr. DK Posted September 29, 2003 Share Posted September 29, 2003 Hello all! Great Contribution by the way! Lovin' It! My question is, on the checkout page, the 3 boxes are probably 80% of the space in main page! Why is there so much space, why isn't it filled in? Here's the code for login_pwa: <td> <?php //EOF: MaxiDVD New Account Sign Up SECTION //=========================================================== //BOF: MaxiDVD Purchase With-Out An Account SECTION //=========================================================== $pwa_checkout_title = HEADING_CHECKOUT; $pwa_checkout_info = "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"border-collapse: collapse\" bordercolor=\"#111111\" width=\"100%\" id=\"AutoNumber1\"> <tr> <td width=\"100%\" class=\"main\" colspan=\"3\">" . TEXT_CHECKOUT_INTRODUCTION . "</td> </tr> <tr> <td width=\"100%\" class=\"main\" colspan=\"3\">" . tep_draw_separator('pixel_trans.gif', '100%', '10') . "</td> </tr> <tr> <td width=\"33%\" class=\"main\"></td> <td width=\"33%\"></td> <td width=\"34%\" rowspan=\"3\" align=\"center\">" . '<a href="' . tep_href_link(FILENAME_CHECKOUT, '', 'SSL') . '">' . tep_image_button('button_checkout.gif', IMAGE_BUTTON_CHECKOUT) . '</a>' . "<br><br></td> </tr> </table>"; //=========================================================== ?> <?php echo tep_draw_separator('pixel_trans.gif', '100%', '15'); ?> <table width="100%" cellpadding="5" cellspacing="0" border="0"> <tr> <td class="main" width=100% valign="top" align="center"> <?php $info_box_contents = array(); $info_box_contents[] = array('align' => 'left', 'text' => $pwa_checkout_title ); new infoBoxHeading($info_box_contents, true, true); $info_box_contents = array(); $info_box_contents[] = array('align' => 'left', 'text' => $pwa_checkout_info); new infoBox($info_box_contents); ?> </td> </tr> </table> <?php //BOF: MaxiDVD Returning Customer Info SECTION //=========================================================== $returning_customer_title = TEXT_RETURNING_CUSTOMER; $returning_customer_info = "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"border-collapse: collapse\" bordercolor=\"#111111\" width=\"100%\" id=\"AutoNumber1\"> <tr> <td width=\"100%\" class=\"main\" colspan=\"3\">" . HEADING_RETURNING_CUSTOMER . "</td> </tr> <tr> <td width=\"100%\" class=\"main\" colspan=\"3\">" . tep_draw_separator('pixel_trans.gif', '100%', '10') . "</td> </tr> <tr> <td class=\"main\"> <table width=\"70%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" align=\"left\"> <tr> <td class=\"main\">" . ENTRY_EMAIL_ADDRESS . "</td> <td>" . tep_draw_input_field('email_address') . "</td> </tr> <tr> <td class=\"main\">" . ENTRY_PASSWORD . "<br><br></td> <td>" . tep_draw_password_field('password') . "<br><br></td> </tr> </table> <table width=\"30%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" align=\"right\"> <tr> <td align=\"center\" class=\"smalltext\">" . tep_image_submit('button_login.gif', IMAGE_BUTTON_LOGIN) . "<br><br>" . '<a href="' . tep_href_link(FILENAME_PASSWORD_FORGOTTEN, '', 'SSL') . '">' . TEXT_PASSWORD_FORGOTTEN . '</a>' . "<br><br></td> </tr> </table> </td> </tr> </table> "; //=========================================================== ?> <table width="100%" cellpadding="5" cellspacing="0" border="0"> <tr> <td class="main" width=100% valign="top" align="center"> <?php $info_box_contents = array(); $info_box_contents[] = array('align' => 'left', 'text' => $returning_customer_title ); new infoBoxHeading($info_box_contents, true, true); $info_box_contents = array(); $info_box_contents[] = array('align' => 'left', 'text' => $returning_customer_info); new infoBox($info_box_contents); ?> </td> </tr> </table> <?php //EOF: MaxiDVD Returning Customer Info SECTION //=========================================================== //MaxiDVD New Account Sign Up SECTION //=========================================================== $create_account_title = HEADING_NEW_CUSTOMER; $create_account_info = "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"border-collapse: collapse\" bordercolor=\"#111111\" width=\"100%\" id=\"AutoNumber1\"> <tr> <td width=\"100%\" class=\"main\" colspan=\"3\">" . TEXT_NEW_CUSTOMER_INTRODUCTION . "</td> </tr> <tr> <td width=\"100%\" class=\"main\" colspan=\"3\">" . tep_draw_separator('pixel_trans.gif', '100%', '10') . "</td> </tr> <tr> <td width=\"33%\" class=\"main\"></td> <td width=\"33%\"></td> <td width=\"34%\" rowspan=\"3\" align=\"center\">" . '<a href="' . tep_href_link(FILENAME_CREATE_ACCOUNT, '', 'SSL') . '">' . tep_image_button('button_create_account.gif', IMAGE_BUTTON_CREATE_ACCOUNT) . '</a>' . "<br><br></td> </tr> </table>"; //=========================================================== ?> <?php echo tep_draw_separator('pixel_trans.gif', '100%', '15'); ?> <table width="100%" cellpadding="5" cellspacing="0" border="0"> <tr> <td class="main" width=100% valign="top" align="center"> <?php $info_box_contents = array(); $info_box_contents[] = array('align' => 'left', 'text' => $create_account_title ); new infoBoxHeading($info_box_contents, true, true); $info_box_contents = array(); $info_box_contents[] = array('align' => 'left', 'text' => $create_account_info); new infoBox($info_box_contents); ?> </td> </tr> </table> <?php //EOF: MaxiDVD Purchase With-Out An Account SECTION //=========================================================== ?> </td> Thanks for all the help in advance! :blink: Sincerely, Dr. DK Quote ----------------------------------------------------------------------- Sincerely, Dr. DK Link to comment Share on other sites More sharing options...
Dr. DK Posted September 29, 2003 Share Posted September 29, 2003 Any help would be greatly appreciated! Thanks. Sincerely, Dr. DK Quote ----------------------------------------------------------------------- Sincerely, Dr. DK Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.