Zen Cart Logo
Forums / All Other Contributions/Addons / Ban Customers (by email address).

Ban Customers (by email address).

Locked

Views: 10,848

Results 1 to 20 of 53
This thread is locked. New replies are disabled.
19 May 2007, 6:11 PM
#1
theoracle avatar

theoracle

Suspended

Join Date:
Aug 2004
Posts:
3,180
Plugin Contributions:
1

Ban Customers (by email address).

Greetings,

some users from this related topic:

http://www.zen-cart.com/forum/showthread.php?t=63484

has asked for a MOD that could ban customers by email addresses. I have just finished with this contribution.

Donations to the Zen Cart team would be greatly appreciated. You will find my paypal email address under the installation file of the package. That said, it has been a pleasure coding this MOD and if you have any questions / suggestions for either features that are already inside or features you'd like to have, please state them and, if they make sense, I will try to code this up as soon as possible. :wink2:

You may download it from my website.

Regards.

TheOracle.

MODERATOR NOTE: This mod is apparently no longer available nor supported by its author. The reasons given on the author's website are only half the story. This discussion thread remains available for reference for those who have already downloaded and attempted to use the contribution.

22 May 2007, 8:39 PM
#2
theoracle avatar

theoracle

Suspended

Join Date:
Aug 2004
Posts:
3,180
Plugin Contributions:
1

Re: Ban Customers (by email address).

I assume that everything is under control for this contribution ? If so, glad to hear it, since there doesn't seem to have much posts regarding any problematic issues. :cool:

23 May 2007, 4:52 AM
#3
tamya avatar

tamya

Zen Follower

Join Date:
Feb 2007
Posts:
336
Plugin Contributions:
0

Re: Ban Customers (by email address).

TheOracle, Is there more details on how the "ban customers" works?

I read the installation.txt which is the only document i could find with some details on this contribution but still not clear to me.

To ban the customer , you have to have his email address, the customer has to be register in the database, he/she can browse but can not login after they get band, correct? if so, what is the difference between this contribution and just changing the Customers Authorization Status to

ApprovedPending Approval - Must be Authorized to Browse

Thank you in advance for clearing this for me

23 May 2007, 7:26 AM
#4
samad64 avatar

samad64

Totally Zenned

Join Date:
May 2006
Location:
Texas
Posts:
554
Plugin Contributions:
2

Re: Ban Customers (by email address).

TamyA:

TheOracle, Is there more details on how the "ban customers" works?

I read the installation.txt which is the only document i could find with some details on this contribution but still not clear to me.

To ban the customer , you have to have his email address, the customer has to be register in the database, he/she can browse but can not login after they get band, correct? if so, what is the difference between this contribution and just changing the Customers Authorization Status to

ApprovedPending Approval - Must be Authorized to Browse

Thank you in advance for clearing this for me

(Purely assumption from what it sounds like) - this allows you to keep you from having to authorize each and every customer.. you can have an open store where people can freely register and purchase at will. However if a customer abuses something on your site, etc, you can ban just that specific email address. In the standard ZC, just "disabling" the customer by making the green switch red doesn't do anything.. supposedly there may be future implementation for it but nothing right now. From what it sounds like, this brings that future implementation today

23 May 2007, 8:30 AM
#5
peekay avatar

peekay

Zen Follower

Join Date:
Jun 2006
Location:
U.K.
Posts:
103
Plugin Contributions:
0

Re: Ban Customers (by email address).

Hi TheOracle.

I downloaded and installed the mod on 1.3.7. I have a few issues.

Firstly, I am using MySQL 3.23.58 and the SQL patch hangs on 'ENGINE = MYISAM'. I removed that entry from both table definitions and it installed the two tables o.k. MyISAM is a default table type anyway and I expect this may not be a prob in later versions of MySQL.

It looks very smart, although the tooltip intended for the 'edit status' button has a language definition missing I think, on mouseover it shows:

ENTRY_CUSTOMERS_BANNED_STATUS_EDIT_ALT

More of a problem, when I add a user or change a user's ban 'status' I get an error:

Warning: Invalid argument supplied for foreach() in c:\inetpub\wwwroot\zencart\includes\functions\functions_email.php on line 387

Email Error: Could not instantiate mail function.

I have PHP as mail transport method. My test site is set up on a PC running JANA as both SMTP and POP server for testing. Other notification emails from Zen Cart work O.K. so I'm not sure what that could be. What is it trying to do, send an email to the user?

I followed the instructions to edit

'includes/modules/my_template/pages/login/header_php.php'

but unfortunately, I can still log in as the banned customer. Also, my homepage heading, log-off page heading and some others now reads 'Account Status'.

To be fair, it is late and I need to double-check my overrides. Also, I am using UK date formats in the cart and admin so I don't know if that would affect anything.

23 May 2007, 11:48 AM
#6
theoracle avatar

theoracle

Suspended

Join Date:
Aug 2004
Posts:
3,180
Plugin Contributions:
1

Re: Ban Customers (by email address).

Sorry for the late response. My internet connection was lost again yesterday night.

In the standard ZC, just "disabling" the customer by making the green switch red doesn't do anything.. supposedly there may be future implementation for it but nothing right now. From what it sounds like, this brings that future implementation today.

Sorry, I don't quite understand what you mean by that. The red and green switch works perfectly fine. When enabling (green) the banning feature, the customer gets notified. When the red button is checked, it means that the customer is not banned but, to make sure that other admins to not report this customer twice, the master admin(s) already are aware of their customer's situation. Which is why, reasons are an obligation to be stated when a regular admin wishes to report customers regarding issues they might of had noticed.

irstly, I am using MySQL 3.23.58 and the SQL patch hangs on 'ENGINE = MYISAM'. I removed that entry from both table definitions and it installed the two tables o.k. MyISAM is a default table type anyway and I expect this may not be a prob in later versions of MySQL.

Yes, that is correct. I will update my installation guide for this. I forgot to state that my contributions are tested under mySQL v4.1+ (and not under mySQL v3+ nor mySQL v5+). Regarding the myISAM engine, that is also correct. I do not have any modulations handling for InnoDB engines yet. This has already been planned to be implemented in one of the future releases.

ENTRY_CUSTOMERS_BANNED_STATUS_EDIT_ALT

ahHA ! 'three bugs' in one block. Very well, I will make the corrections immediately and notify on this topic when the updated version will be posted. Thanks for the catch. :smile:

but unfortunately, I can still log in as the banned customer. Also, my homepage heading, log-off page heading and some others now reads 'Account Status'.

Also, I am using UK date formats in the cart and admin so I don't know if that would affect anything.

This is also an instruction I forgot to state since it was also late from my end. The reason why you can still log is because, even when using the zen_session_destroy() function, the customer's cookies must first be cleared out from the site (even cleared out entirely when the browser is closed period). The good news is, you can ajust your expiration session time to a shorter time in case there would be banned users involved. Right now, the unfortunite thing is that this has to be handled globally for everyone. However, I do plan, in one of the future releases, to reduce the expiration time for banned users.

As for the UK date, as long as your server date corresponds well with your central date, I don't think there should be any problems. Besides, this would be up to your related web hosting party to assure this particular functionnality. :wink2:

Email Error: Could not instantiate mail function.

Check your mail error logs to see what might be the cause precisely.

23 May 2007, 12:33 PM
#7
theoracle avatar

theoracle

Suspended

Join Date:
Aug 2004
Posts:
3,180
Plugin Contributions:
1

Re: Ban Customers (by email address).

Update:

For those who downloaded v1.0, v1.0.1 is now ready from my site as only a single file is required to be replaced, in this case, due of this bug:

ENTRY_CUSTOMERS_BANNED_STATUS_EDIT_ALT

A changelog.txt file has been added for further instructions.

23 May 2007, 1:29 PM
#8
theoracle avatar

theoracle

Suspended

Join Date:
Aug 2004
Posts:
3,180
Plugin Contributions:
1

Re: Ban Customers (by email address).

unfortunately, I can still log in as the banned customer.

Update: Research complete. A patch will be applied for the next release. :cool:

24 May 2007, 2:43 PM
#9
theoracle avatar

theoracle

Suspended

Join Date:
Aug 2004
Posts:
3,180
Plugin Contributions:
1

Re: Ban Customers (by email address).

Update:

Good news. Some bug fixes has been applied to this MOD. You may now download it from my site without any problems. As for users who already installed it before, read the upgrade and changelog documentation inside the package. Nothing serious has been modified as it should only take a min or two to test this out. :wink2:

24 May 2007, 2:49 PM
#10
merlinpa1969 avatar

merlinpa1969

Totally Zenned

Join Date:
Mar 2004
Posts:
13,031
Plugin Contributions:
4

Re: Ban Customers (by email address).

Oracle, you may want to revise this line on your website

These MODs may NOT be reselled.

this is open source, they can do with it what they want

24 May 2007, 3:21 PM
#11
merlinpa1969 avatar

merlinpa1969

Totally Zenned

Join Date:
Mar 2004
Posts:
13,031
Plugin Contributions:
4

Re: Ban Customers (by email address).

when trying this out I get an error on the admin side when I try to change the status of the ban

1054 Unknown column 'customers_banned' in 'field list'

it actually sets just fine

and in the catalog side when I try to login I get this

1054 Unknown column 'ci.customers_banned' in 'field list'

when you hit the back button you are logged in as the banned user,

Also NO emails were sent out,

24 May 2007, 3:25 PM
#12
theoracle avatar

theoracle

Suspended

Join Date:
Aug 2004
Posts:
3,180
Plugin Contributions:
1

Re: Ban Customers (by email address).

when trying this out I get an error on the admin side when I try to change the status of the ban

1054 Unknown column 'customers_banned' in 'field list'

You did not followed the installation / upgrade instructions regarding the table alteration towards TABLE_CUSTOMERS_INFO. There's a specific instruction where this field needs to be added under your Install SQL Patches from the admin - > tools.

24 May 2007, 3:31 PM
#13
merlinpa1969 avatar

merlinpa1969

Totally Zenned

Join Date:
Mar 2004
Posts:
13,031
Plugin Contributions:
4

Re: Ban Customers (by email address).

this is the ONLY sql information in the install
CREATE TABLE customers_banned_logs (
field_id INT( 11 ) NOT NULL AUTO_INCREMENT PRIMARY KEY,
admin_id INT( 11 ) NOT NULL,
action_name VARCHAR( 255 ) NOT NULL,
events_date VARCHAR( 32 ) NOT NULL,
events_time VARCHAR( 32 ) NOT NULL
) ENGINE = MYISAM;

CREATE TABLE customers_banned (
field_id int(11) NOT NULL auto_increment,
customers_id int(11) NOT NULL default '0',
admin_id int(11) NOT NULL default '0',
admin_edit_id int(11) NOT NULL default '0',
customers_ip varchar(100) NOT NULL default '',
customers_status int(1) NOT NULL default '0',
customers_banned_date varchar(32) NOT NULL default '0000-00-00',
customers_banned_time varchar(32) NOT NULL default '',
customers_unbanned_time varchar(32) NOT NULL default '',
customers_unbanned_date date NOT NULL default '0000-00-00',
banned_reasons text NOT NULL,
tryouts int(11) NOT NULL default '0',
random_query varchar(32) NOT NULL default '',
PRIMARY KEY (field_id)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1;

that was all that was in the install,

I see the alter in the upgrade however this was a fresh install,

never occured to LOOK in the UPGRADE file

24 May 2007, 3:36 PM
#14
theoracle avatar

theoracle

Suspended

Join Date:
Aug 2004
Posts:
3,180
Plugin Contributions:
1

Re: Ban Customers (by email address).

Another strange thing today ... on my own local end, it didn't saved the file even though I saved it. :blink:

Very well, installation guide updated. :mellow:

24 May 2007, 3:42 PM
#15
merlinpa1969 avatar

merlinpa1969

Totally Zenned

Join Date:
Mar 2004
Posts:
13,031
Plugin Contributions:
4

Re: Ban Customers (by email address).

thanx,

looks like it works pretty god,

now on to figure out WHY emails are not working,

will keep testing,

24 May 2007, 3:45 PM
#16
theoracle avatar

theoracle

Suspended

Join Date:
Aug 2004
Posts:
3,180
Plugin Contributions:
1

Re: Ban Customers (by email address).

now on to figure out WHY emails are not working,

The registration validates all identical emails (already programmed by the DEV team). Meaning, if you already have an identical email - found under your TABLE_CUSTOMERS table, it will not proceed with the UPDATE statement with bindVars. It will simply decline the registration process and ask the customer to re-enter another valid email address.

This particular MOD as it's advantage against that since email accounts will still be under the database + validate the account status (as per the reasons has been stated for each customers under the admin section). :wink2:

24 May 2007, 3:53 PM
#17
theoracle avatar

theoracle

Suspended

Join Date:
Aug 2004
Posts:
3,180
Plugin Contributions:
1

Re: Ban Customers (by email address).

Additionally to the above, if you're talking about the email status utility from the MOD itself (under the admin), I'm currently investigating this problem as I think I did not used the zen_mail function properly (which is why it has been temporarily disable from this MOD for the moment - which is also stated from the upgrade documentation under the downloaded package). :wink2:

24 May 2007, 3:58 PM
#18
merlinpa1969 avatar

merlinpa1969

Totally Zenned

Join Date:
Mar 2004
Posts:
13,031
Plugin Contributions:
4

Re: Ban Customers (by email address).

Ok new issue on a brand new install

Cannot modify header information - headers already sent by (output started at /home/camelot/public_html/zen137/admin/ban_customers.php:44) in /home/camelot/public_html/zen137/admin/includes/functions/general.php on line 34

24 May 2007, 4:00 PM
#19
theoracle avatar

theoracle

Suspended

Join Date:
Aug 2004
Posts:
3,180
Plugin Contributions:
1

Re: Ban Customers (by email address).

And when exacly does this problem occurs ? There are more than a single action in this MOD you know. :wink2:

24 May 2007, 4:05 PM
#20
merlinpa1969 avatar

merlinpa1969

Totally Zenned

Join Date:
Mar 2004
Posts:
13,031
Plugin Contributions:
4

Re: Ban Customers (by email address).

this occures when setting the Banned Customers - Status

also I am getting the new customer emails, however NO emails about banning are being sent

if you would like access to thei test account please PM me and I will shoot you access