Jump to content
Sign in to follow this  

Net Terms troubled code

Recommended Posts

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



"To the man who only has a hammer in the toolkit, every problem looks like a nail."


Abraham Maslow

Share this post

Link to post
Share on other sites

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


run the credit module code


checkout according to payment method chosen...


Can someone help write this statement? I am no programmer.

Greyson Schwing

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