Guest Posted March 25, 2003 Share Posted March 25, 2003 I think I posted in the wrong place so forgive me this is not intended as a cross post but should be better suited here. I istalled Net terms and it won't permit a customer to choose any other method of payment. this code seems to be the problem // Check If Customer Has Credit (If That Option Is Chosen) $customer_credit = false; $check_credit = tep_db_query("select customers_credit_status, customers_credit_left from " . TABLE_CUSTOMERS . " where customers_id ='" . $customer_id . "'"); $credit = tep_db_fetch_array($check_credit); if ($credit['customers_credit_status'] == "enabled" || $credit['customers_credit_status'] == "suspended"){ $credit_allowed = 'true'; } else { $credit_allowed = 'false'; } if ($credit_allowed == 'false'){ echo '<script>alert("We're Sorry You Don't Seem To Have An Account With Us, Please Choose A Different Payment Method.");</script>'; echo '<script>history.go(-1);</script>'; } if ($credit_allowed == 'true') { if ($order->info['total'] > $credit['customers_credit_left']){ echo '<script>alert("Not Enough Store Credit In Your Account");</script>'; echo '<script>history.go(-1);</script>'; } if ($credit['customers_credit_status'] == "suspended"){ echo '<script>alert("Sorry Your Account Seems To Be Suspended Please Contact Us To Straighten Out This Matter.");</script>'; echo '<script>history.go(-1);</script>'; } } any suggestions thanks Russ Quote Link to comment Share on other sites More sharing options...
greytek Posted August 28, 2003 Share Posted August 28, 2003 I am getting the same problem. No matter what payment the customer chooses, it says either "..... you do not have an account" if the customer's credit is disabled, and ".....you do not have enough credit..." if the customers credit is enabled with no balance. This code, I think needs to be contained in an if....then type of statement that says: If (chosen payment option) is net30 / net60 then run the credit module code else checkout according to payment method chosen... Can someone help write this statement? I am no programmer. Quote Greyson Schwing 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.
Note: Your post will require moderator approval before it will be visible.