nana Posted January 13, 2006 Author Share Posted January 13, 2006 //fast easy checkout start $check_status_query = tep_db_query("select customers_name, ,customers_id, createaccount from " . TABLE_CUSTOMERS . " where customers_id = '" . (int)$cID . "'"); $check_status = tep_db_fetch_array($check_status_query); //fast easy checkout end ..and to post it Created Account: <?php echo $check_status['createaccount']; ?> havent tested at all but i think it should work any where that cID is available it is customers_id Quote Link to comment Share on other sites More sharing options...
Guest Posted January 13, 2006 Share Posted January 13, 2006 i have: //fast easy checkout start $check_status_query = tep_db_query("select customers_name, customers_company, customers_email_address, customers_id, orders_status, date_purchased, ipaddy, ipisp, customers_referer_url, createaccount from " . TABLE_ORDERS . " where orders_id = '" . (int)$oID . "'"); $check_status = tep_db_fetch_array($check_status_query); $cust_id = $check_status['customers_id']; //fast easy checkout end & <?php echo $check_status['createaccount']; ?> nothing shows :( and when i try to update: 1054 - Unknown column 'createaccount' in 'field list' select customers_name, customers_company, customers_email_address, customers_id, orders_status, date_purchased, ipaddy, ipisp, customers_referer_url, createaccount from orders where orders_id = '61273' [TEP STOP] Quote Link to comment Share on other sites More sharing options...
nana Posted January 13, 2006 Author Share Posted January 13, 2006 first i have changed the code a little also where are you using the code you must make sure cID is available or use $customers_id instead if available or you have to get it Quote Link to comment Share on other sites More sharing options...
Guest Posted January 13, 2006 Share Posted January 13, 2006 first i have changed the code a little ? make sure cID is available or use $customers_id instead if available or you have to get it how do i know if it's available or not? Quote Link to comment Share on other sites More sharing options...
dbria Posted January 13, 2006 Share Posted January 13, 2006 Hi, In checkout_account3.php I have same problem akmac in post 809 had when no account creation was selected by user- yet application still needs password -error message was a popup with : "password must contain 5 characters etc" I see that he got the issue resolved but I was unable to find the solution in the thread. I did download and install the latest contribution for hiding the password. I updated checkout_account3.php, account_box.php and form_check.js.php. Check out with account works great. So the problem is only when an account is not created. It sound's like the problem is in form_check.js.php. Here is what I have: (test site is: roominakit.com/home-decor-shop/index.php Thanks for your help. Dee <?php /* $Id: form_check.js.php,v 1.9 2003/05/19 19:50:14 hpdl Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2003 osCommerce Released under the GNU General Public License */ ?> <script language="javascript"><!-- var form = ""; var submitted = false; var error = false; var error_message = ""; function check_input(field_name, field_size, message) { if (form.elements[field_name] && (form.elements[field_name].type != "hidden")) { var field_value = form.elements[field_name].value; if (field_value == '' || field_value.length < field_size) { error_message = error_message + "* " + message + "\n"; error = true; } } } function check_radio(field_name, message) { var isChecked = false; if (form.elements[field_name] && (form.elements[field_name].type != "hidden")) { var radio = form.elements[field_name]; for (var i=0; i<radio.length; i++) { if (radio[i].checked == true) { isChecked = true; break; } } if (isChecked == false) { error_message = error_message + "* " + message + "\n"; error = true; } } } function check_select(field_name, field_default, message) { if (form.elements[field_name] && (form.elements[field_name].type != "hidden")) { var field_value = form.elements[field_name].value; if (field_value == field_default) { error_message = error_message + "* " + message + "\n"; error = true; } } } function check_password(field_name_1, field_name_2, field_size, message_1, message_2) { if (form.elements[field_name_1] && (form.elements[field_name_1].type != "hidden")) { var password = form.elements[field_name_1].value; var confirmation = form.elements[field_name_2].value; if (password == '' || password.length < field_size) { error_message = error_message + "* " + message_1 + "\n"; error = true; } else if (password != confirmation) { error_message = error_message + "* " + message_2 + "\n"; error = true; } } } function check_password_new(field_name_1, field_name_2, field_name_3, field_size, message_1, message_2, message_3) { if (form.elements[field_name_1] && (form.elements[field_name_1].type != "hidden")) { var password_current = form.elements[field_name_1].value; var password_new = form.elements[field_name_2].value; var password_confirmation = form.elements[field_name_3].value; if (password_current == '' || password_current.length < field_size) { error_message = error_message + "* " + message_1 + "\n"; error = true; } else if (password_new == '' || password_new.length < field_size) { error_message = error_message + "* " + message_2 + "\n"; error = true; } else if (password_new != password_confirmation) { error_message = error_message + "* " + message_3 + "\n"; error = true; } } } function check_form(form_name) { if (submitted == true) { alert("<?php echo JS_ERROR_SUBMITTED; ?>"); return false; } error = false; form = form_name; error_message = "<?php echo JS_ERROR; ?>"; <?php if (ACCOUNT_GENDER == 'true') echo ' check_radio("gender", "' . ENTRY_GENDER_ERROR . '");' . "\n"; ?> check_input("firstname", <?php echo ENTRY_FIRST_NAME_MIN_LENGTH; ?>, "<?php echo ENTRY_FIRST_NAME_ERROR; ?>"); check_input("lastname", <?php echo ENTRY_LAST_NAME_MIN_LENGTH; ?>, "<?php echo ENTRY_LAST_NAME_ERROR; ?>"); <?php if (ACCOUNT_DOB == 'true') echo ' check_input("dob", ' . ENTRY_DOB_MIN_LENGTH . ', "' . ENTRY_DATE_OF_BIRTH_ERROR . '");' . "\n"; ?> check_input("email_address", <?php echo ENTRY_EMAIL_ADDRESS_MIN_LENGTH; ?>, "<?php echo ENTRY_EMAIL_ADDRESS_ERROR; ?>"); check_input("street_address", <?php echo ENTRY_STREET_ADDRESS_MIN_LENGTH; ?>, "<?php echo ENTRY_STREET_ADDRESS_ERROR; ?>"); check_input("postcode", <?php echo ENTRY_POSTCODE_MIN_LENGTH; ?>, "<?php echo ENTRY_POST_CODE_ERROR; ?>"); check_input("city", <?php echo ENTRY_CITY_MIN_LENGTH; ?>, "<?php echo ENTRY_CITY_ERROR; ?>"); <?php if (ACCOUNT_STATE == 'true') echo ' check_input("state", ' . ENTRY_STATE_MIN_LENGTH . ', "' . ENTRY_STATE_ERROR . '");' . "\n"; ?> check_select("country", "", "<?php echo ENTRY_COUNTRY_ERROR; ?>"); check_input("telephone", <?php echo ENTRY_TELEPHONE_MIN_LENGTH; ?>, "<?php echo ENTRY_TELEPHONE_NUMBER_ERROR; ?>"); check_password("password", "confirmation", <?php echo ENTRY_PASSWORD_MIN_LENGTH; ?>, "<?php echo ENTRY_PASSWORD_ERROR; ?>", "<?php echo ENTRY_PASSWORD_ERROR_NOT_MATCHING; ?>"); check_password_new("password_current", "password_new", "password_confirmation", <?php echo ENTRY_PASSWORD_MIN_LENGTH; ?>, "<?php echo ENTRY_PASSWORD_ERROR; ?>", "<?php echo ENTRY_PASSWORD_NEW_ERROR; ?>", "<?php echo ENTRY_PASSWORD_NEW_ERROR_NOT_MATCHING; ?>"); if (error == true) { alert(error_message); return false; } else { submitted = true; return true; } } //--></script> <script type="text/javascript"> if (document.getElementById) onload = function () { document.getElementById ('toggle').onclick = function () {document.getElementById ('lorem').className = this.checked ? 'show' : 'hide'} document.getElementById ('lorem').className = 'hide' } </script> <style type="text/css"> .hide {display:none} .show {display:block} </style> Quote Link to comment Share on other sites More sharing options...
dbria Posted January 13, 2006 Share Posted January 13, 2006 Frank, I added a conditional check in form check file to test if account was created. Works now. Amazing what one can accomplish when they get some sleep:) Again thanks for the contributions and your incredible support. Dee Quote Link to comment Share on other sites More sharing options...
safoo Posted January 13, 2006 Share Posted January 13, 2006 ?how do i know if it's available or not? 'Echo' it and see if some text shows up on the page. Unknown column 'createaccount' in 'field list' This means there is no 'createaccount' column in your orders table. Quote Link to comment Share on other sites More sharing options...
Guest Posted January 13, 2006 Share Posted January 13, 2006 i just checked the database, you're right. i just noticed i had accidentally had: <?php echo $order['createaccount']; ?> trying to display it. i commented it out and tried nana's suggestion again. still nothing shows :( Quote Link to comment Share on other sites More sharing options...
nana Posted January 13, 2006 Author Share Posted January 13, 2006 eww what file are you using it in Quote Link to comment Share on other sites More sharing options...
Guest Posted January 13, 2006 Share Posted January 13, 2006 admin/orders.php Quote Link to comment Share on other sites More sharing options...
mrgtec Posted January 13, 2006 Share Posted January 13, 2006 Hi, I installed this file the other day, but one prob, it says one-off purchase under the Create an Account?, how would I change this to say one time purchase?? Thank you, Michael Quote Michael Link to comment Share on other sites More sharing options...
nana Posted January 14, 2006 Author Share Posted January 14, 2006 eww from the top of my head you have to do you need two sql querries one from table orders for customers_id when orders_id is oID and second from table customers and use that value for customers_id Michael try includes/languages/english/fast_account.php Quote Link to comment Share on other sites More sharing options...
Guest Posted January 14, 2006 Share Posted January 14, 2006 Hi, I installed this file the other day, but one prob, it says one-off purchase under the Create an Account?, how would I change this to say one time purchase?? Thank you, Michael edit: catalog/includes/languages/english/fast_account.php look for: define('NO_ACCOUNT', 'No thanks, this is a one-off purchase.'); and change define('NO_ACCOUNT', 'whatever you want here'); Quote Link to comment Share on other sites More sharing options...
mrgtec Posted January 14, 2006 Share Posted January 14, 2006 Thank you both so much, that was puzzling me, lol. Thank you, Michael Quote Michael Link to comment Share on other sites More sharing options...
Guest Posted January 14, 2006 Share Posted January 14, 2006 Great Contrib, although I may have a bug. When creating an account, with no cookies. When you press the continue button after filling in details about your account your passed to the login page, logging in just brings you back to the create account page. I think this only happens if user does not allow cookies. rgds Paul Quote Link to comment Share on other sites More sharing options...
Guest Posted January 14, 2006 Share Posted January 14, 2006 eww from the top of my head you have to do you need two sql querries one from table orders for customers_id when orders_id is oID and second from table customers and use that value for customers_id how would i be able to do that? Quote Link to comment Share on other sites More sharing options...
mrgtec Posted January 15, 2006 Share Posted January 15, 2006 Hi, Eww, You login to PhPMyAdmin, in CPanel (I dont know about the other control panels, just that one (b/c I have used it all my life.)) its called MySQL Databases go down to the bottom of the page & click PhPMyAdmin, then when the next screen comes up, select your db from the drop down & then at the top where it says SQL click that, & put in the sql code. Thank you, Michael Quote Michael Link to comment Share on other sites More sharing options...
mrgtec Posted January 15, 2006 Share Posted January 15, 2006 (edited) Hi, Eww Again, I found this in a file, I am going to be running, this may help you Eww. SSH up to your server/site, using putty. cd /tmp mysql -u USER -p OSCOMMERCE_DATABASE < ./WHAT_EVER_FILE_YOUR_SQL'ING.SQL Thank you, Michael Edited January 15, 2006 by mrgtec Quote Michael Link to comment Share on other sites More sharing options...
redrum Posted January 15, 2006 Share Posted January 15, 2006 Great Contrib, although I may have a bug. When creating an account, with no cookies. When you press the continue button after filling in details about your account your passed to the login page, logging in just brings you back to the create account page. I think this only happens if user does not allow cookies. rgds Paul I tested my shop in Firefox with cookies disabled, and could checkout whitout any problems. I haven't merged checkout_shipping.php and checkout_payment.php though. // Fredrik Quote Link to comment Share on other sites More sharing options...
jcubero Posted January 16, 2006 Share Posted January 16, 2006 One more question - I'm trying to use fec and osCommerce paypal IPN v1.1. It all works fine until the point I hit "back to merchant" on paypal. It brings me back to a login screen. When I log in, it takes me to the page right before I place the order. The order shows up in my order history as placed, but all the items are still in my shopping cart. Help! I'm currently going to the paypal sandbox, so I can put in dummy transactions until it's working right. I'm searching all IPN threads as well, but so far I'm not finding a solution to this problem. Quote Link to comment Share on other sites More sharing options...
Guest Posted January 16, 2006 Share Posted January 16, 2006 Hi, Eww, You login to PhPMyAdmin, in CPanel (I dont know about the other control panels, just that one (b/c I have used it all my life.)) its called MySQL Databases go down to the bottom of the page & click PhPMyAdmin, then when the next screen comes up, select your db from the drop down & then at the top where it says SQL click that, & put in the sql code. Thank you, Michael i'm not sure what you mean? i have already run the sql query from this contribution. the problem i'm having is i cannot pull the info from the database to post on admin/orders.php to tell me whether or not the customer has an account Quote Link to comment Share on other sites More sharing options...
mrgtec Posted January 16, 2006 Share Posted January 16, 2006 (edited) Sorry eww. I thought thats what you meant. Edited January 16, 2006 by mrgtec Quote Michael Link to comment Share on other sites More sharing options...
Guest Posted January 16, 2006 Share Posted January 16, 2006 do you happen to know how to post the info on admin/orders.php? :) Quote Link to comment Share on other sites More sharing options...
Guest Posted January 16, 2006 Share Posted January 16, 2006 redrum, In config set goto > sessions and set everything to false. Then turn off your cookies and let me know what happens. Basically i test everything on my xp laptop, and for some reason, i cannot carry the session id in a cookie on localhost, i have to pass the session ID in the URL to enable checking out etc. When on this setting, it gives the errors I explain above, however when i send up the entire shop to my live *nix server, it works fine. Quote Link to comment Share on other sites More sharing options...
nana Posted January 16, 2006 Author Share Posted January 16, 2006 (edited) paul your problem most probably is from incorrect information in your configure.php i do not use cookies myself and do not have a problem eww try something like this to get the customer id before the block of code that you used before and the other code to get the value of createaccount and then echo the value $check_my_query = tep_db_query("select customers_name, customers_id, from " . TABLE_ORDERS . " where orders_id = '" . (int)$oID . "'"); $my_querry_result = tep_db_fetch_array($check_my_query); $cID = $my_querry_result['customers_id']; Edited January 16, 2006 by nana Quote 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.