Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Net Terms troubled code


Guest

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

Link to comment
Share on other sites

  • 5 months later...

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.

Greyson Schwing

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.
Note: Your post will require moderator approval before it will be visible.

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