Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Control loging customer.php problem


mom2marc

Recommended Posts

I am following the instructions included in the README in the "Control Login" contrib. In the readme it says about adding case 'setflag' in admin/customers.php :

find: case 'update':

before case 'update'; and below switch ($HTTP_GET_VARS['action']) {

add the following in between:

Yet there is plenty of coding between "['action']){ and case 'update' !! I can't seem to figure out exectly where to put the needed code !! So right now I am left with a completely empty page if I click on "customers" in the Admin part of my site.

 

I have now put it here :

require('includes/application_top.php');

 $action = (isset($HTTP_GET_VARS['action']) ? $HTTP_GET_VARS['action'] : '');

 $error = false;
 $processed = false;

 if (tep_not_null($action)) {
switch ($action) {
case 'setflag':
	if ( ($HTTP_GET_VARS['flag'] == '0') || ($HTTP_GET_VARS['flag'] == '1') ) {
		  if ($HTTP_GET_VARS['cID']) {
		tep_set_customers_status($HTTP_GET_VARS['cID'], $HTTP_GET_VARS['flag']);
}
	  }

	tep_redirect(tep_href_link(FILENAME_CUSTOMERS, '', 'NONSSL'));
	break;
  case 'update':
	$customers_id = tep_db_prepare_input($HTTP_GET_VARS['cID']);

Can anyone tell me if this is right and if not - where to put it then ?? Thank you !!

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