Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Blacklist


Jack_mcs

Recommended Posts

On 3/26/2022 at 9:48 PM, Supertex said:

I assume it wouldn't be too complicated to add some code in the create_account.php

You are correct, it would not take much. Before this line

if ($error == false) {

and add this above it. You will need to replace all of the $order... parts with the variable used in that file.

    /*** BEGIN Blacklist ***/
    //check for blacklisted address
    $blacklist_query = tep_db_query("SELECT b.customers_id, b.ban_customer, b.description, b.entry_street_address, b.entry_suburb, b.entry_postcode, b.entry_city, b.entry_state FROM blacklist b ");
    while($blacklisted = tep_db_fetch_array($blacklist_query)) {   
    
        if (strcasecmp($blacklisted['entry_street_address']. $order->delivery['street_address'] == 0) && 
            strcasecmp($blacklisted['entry_suburb'], $order->delivery['suburb'] == 0) && 
            strcasecmp($blacklisted['entry_city'], $order->delivery['city'] == 0) && 
            strcasecmp($blacklisted['entry_postcode'], $order->delivery['postcode'] == 0) && 
            strcasecmp($blacklisted['entry_state'], $order->delivery['state'] == 0))
        { 
            tep_mail(STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS, 'Order placed using Blacklisted address', $email_order, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);
            $error = true;
            break;
        }     
    }
    /*** END Blacklist ***/

 The above has not been tested so make a backup. :)

On 3/27/2022 at 2:29 AM, Supertex said:

returns zero or non-zero, rather than true of false.

Correct again. So much for me making changes from memory.  :)

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

  • 4 weeks later...

Hi Jack:

In our system, we wrote code that checks the users address, IP addresses, email addresses, their telephone number.  The program checks this against our blacklist.    We have found that some idiots will use a phony name or a different email as an example.   However some of their information is always the same.   
 Also in our program we have special notes that are associated to each  customers in the database.  We can add or edit these notes.    You might want to add this into your code.   

Edited by steve60
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.

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