Jack_mcs Posted September 2, 2007 Author Share Posted September 2, 2007 The code change should probably be made in create_account.php and/or checkout_process.php, depending on the ban level. In the checkout_process.php, where there is code like this if ($blacklisted['entry_street_address'] === $order->delivery['street_address'] && it would need to be changed to something that would check the various parts. For example (this is just being typed here and may not work) $streetBL = explode($blacklisted' ',['entry_street_address']); $street = expload(' ', $order->delivery['street_address']); $notBL = false; for ($i - 0; $i < count($streetBL); ++$i) { if (strpos($streetBL[$i], $street[$i]) === FALSE) //no match was found { $notBL = true; break; } } if ($notBL) echo 'This customer is OK'; else echo 'This customer should be blacklisted.'; The other parts would have to be checked too. Jack Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
Guest Posted September 3, 2007 Share Posted September 3, 2007 here is what i tried: $streetBL = explode($blacklisted['entry_street_address']);$street = explode(' ', $order->delivery['street_address']); $notBL = false; for ($i - 0; $i < count($streetBL); ++$i) { if (strpos($streetBL[$i], $street[$i]) === FALSE) //no match was found { $notBL = true; break; } } if ($notBL){ #this customer is OK }else{ tep_redirect(index.php); break; } it seemed to work, but it interpreted everyone as blacklisted. can you spot my errors? (i was getting an error for: $streetBL = explode($blacklisted' ',['entry_street_address']); ..so i moved things around. not sure if my edits there is what may have messed it up.) Quote Link to comment Share on other sites More sharing options...
Jack_mcs Posted September 3, 2007 Author Share Posted September 3, 2007 That should have been $streetBL = explode("",$blacklisted['entry_street_address']); Jack Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
Guest Posted September 3, 2007 Share Posted September 3, 2007 still interpreting everybody as blacklisted. any other bugs?: $streetBL = explode("",$blacklisted['entry_street_address']); $street = explode(' ', $order->delivery['street_address']); $notBL = false; for ($i - 0; $i < count($streetBL); ++$i) { if (strpos($streetBL[$i], $street[$i]) === FALSE) //no match was found { $notBL = true; break; } } if ($notBL){ #this customer is OK }else{ tep_redirect(index.php); break; } Quote Link to comment Share on other sites More sharing options...
Jack_mcs Posted September 3, 2007 Author Share Posted September 3, 2007 You will have to print out each result in the loop to see why it is failing. The code will most liekly not work correctly as it is anyway though since it is assuming the addresses contain the same number of items, which they won't in every case. So one address might 123 Apple and another might be 234 Pear Apt C. Jack Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
gimmin Posted February 2, 2010 Share Posted February 2, 2010 Hi, i know this thread is old. How can I input a search-function into the blacklist, that allows me to search a customer in the shop. My plan: I whrite a Lastname into a textfield, after I klicked a button, the names listed in the dropdown menü. is it possible? Quote Link to comment Share on other sites More sharing options...
Jack_mcs Posted February 2, 2010 Author Share Posted February 2, 2010 I don't understand what it is you are asking for. There is already a list of names in the Blacklist section in admin. Is that not what you want? Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
gimmin Posted February 2, 2010 Share Posted February 2, 2010 I know, sure i want this but I need a searchfunction for customers, i want to insert an extra field into the blacklist like a textfield or simething, that searching for customer wich I wrote in this textfield, and show him in the Drop down menu. sry for that english ._. Quote Link to comment Share on other sites More sharing options...
Jack_mcs Posted February 2, 2010 Author Share Posted February 2, 2010 I'm sorry but I'm still not following. But it doesn't matter since what you are asking for is new code, which I don't provide in support threads due to the amount of time it would take. Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
Top_Speed Posted May 18, 2011 Share Posted May 18, 2011 Hi Jack! Installed your contrib as it looks very useful. Didn't know if I missed a lang file or update? I checked in your admin/incl/lang/eng/blacklist.php and couldn't find theme. (In the Admin Blacklist Controllers Screen) all language is defined correctly except: TEXT_INFO_DATE_BAN05/18/2011 TEXT_INFO_DATE_BAN_MEMBER Thanks Jack, hope all has been going well w you and your family :) KJ Quote define('PROJECTS', 'Something that goes on forever!'); Link to comment Share on other sites More sharing options...
Top_Speed Posted May 18, 2011 Share Posted May 18, 2011 (edited) *Plus* 1) Any reason why I have a name on the banned list twice? I looked and the customer only has one acct setup. 2) (in the Banned customer right side box) "Attempted Use: (If checked, trying to connect)" does not seem to work for me. If checked it won't stay. Also shouldn't this be on the other side when you create the banned person. (ie) you may only want to be notified if the person tries to login but not ban him? I edited the lang file to define the above... TEXT_INFO_DATE_BAN05/18/2011 TEXT_INFO_DATE_BAN_MEMBER define('TEXT_INFO_DATE_BAN', 'Date: '); define('TEXT_INFO_DATE_BAN_MEMBER', 'Date Banned: '); ^^ But not sure on you verbiage you wanted ^^ Thanks Jack :) Edited May 18, 2011 by Top_Speed Quote define('PROJECTS', 'Something that goes on forever!'); Link to comment Share on other sites More sharing options...
Jack_mcs Posted May 22, 2011 Author Share Posted May 22, 2011 *Plus* 1) Any reason why I have a name on the banned list twice? I looked and the customer only has one acct setup. 2) (in the Banned customer right side box) "Attempted Use: (If checked, trying to connect)" does not seem to work for me. If checked it won't stay. Also shouldn't this be on the other side when you create the banned person. (ie) you may only want to be notified if the person tries to login but not ban him? I edited the lang file to define the above... TEXT_INFO_DATE_BAN05/18/2011 TEXT_INFO_DATE_BAN_MEMBER define('TEXT_INFO_DATE_BAN', 'Date: '); define('TEXT_INFO_DATE_BAN_MEMBER', 'Date Banned: '); ^^ But not sure on you verbiage you wanted ^^ Thanks Jack :) I haven't upgraded this conribution is six years so there are problably problems such as you found. It still works though and I do have plans to upgrade it but I can't seem to find the time for it rihgt now. Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
Supertex Posted July 23, 2015 Share Posted July 23, 2015 1) Any reason why I have a name on the banned list twice? I looked and the customer only has one acct setup. I've recently installed this in my 2.3.1, and also noticed the multiple appearances of the same name. It's because of multiple address book entries for the customer. It really threw me at first, because I'd entered some customers' addresses as my own for testing. I couldn't figure out where it was getting them, until I looked closer. I know the thread is old, but someone (such as myself) may also run into this. Quote osC v2.3.1 MySQL v8.0.32 PHP v5.6.40 Installed addons: . Attribute Sets Plus .. Create Account & Manual Order Maker .. Customer Testimonials 2.3.4 .. Customer Blacklist .. Dynamic Info Pages .. FedEx Web Svcs v9 .. Filtered Sales Report .. Generic Box .. Google XML Sitemap SEO .. Maximum Order Value .. Modular Front Page .. Monthly Sales & Tax Report .. Multiple Products Manager .. Must Accept Terms & Conditions .. Order Editior .. PDF Customer Invoice .. Price in Cart Only .. Product Sort/Order .. Product Sort in Cart .. Quantity Discounts .. Restrict Delivery Methods .. SEO Header Tags - Reloaded .. Separate Pricing Per Customer .. Simpler Admin Session Length Control .. Sitemap SEO .. Show Free Ship + Modules .. Specials by Category for SPPC .. Store Mode (open|closed|maintenance) .. Store Pickup Shipping .. Theme Switcher .. Ultimate SEO URLs 5 Pro .. UPS XML Rates & Svcs 1.4 .. USPS methods 7.3.1 .. Who's Online Dashboard . Fixes: Add to cart -> 'product not found' : FIX Login issues with IE 11 : FIX Tools: Incredibly Handy: osC Xref Link to comment Share on other sites More sharing options...
Jack_mcs Posted July 24, 2015 Author Share Posted July 24, 2015 Thanks for posting that. Yes, the entries from the address book table are added to the ban list and that would generate duplicate names. There probably should be something added to show they are different addresses for the same person. Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
Jack_mcs Posted August 20, 2016 Author Share Posted August 20, 2016 A new version has been uploaded with these changes: Now compatible with all 2.3 shops. Changed many aspects of the GUI. Fixed a problem where customers with three or more names failed. Fixed problem where comments would not show up when blacklisting a customer if he were the frist customer. Added Index to SQL table. Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
Supertex Posted August 25, 2016 Share Posted August 25, 2016 @@Jack_mcs Just got the new version up and running and 3+ part names works beautifully. I have one minor(?) problem: Once you add someone to the ban list, their name no longer appears in the "all customers" list. If I blacklist, but do not ban completely, and later decide to ban completely, I have to remove them from the 'blacklist' before I can edit their status. I changed the query from : $customers_query = tep_db_query("SELECT customers_id, customers_lastname FROM customers where customers_id NOT IN (select customers_id from blacklist) ORDER by " . $sort_order . " ASC"); to: $customers_query = tep_db_query("SELECT customers_id, customers_lastname FROM customers ORDER by " . $sort_order . " ASC"); It appears to work this way, but I wanted to make sure this wouldn't cause a problem I'm not immediately seeing...? Quote osC v2.3.1 MySQL v8.0.32 PHP v5.6.40 Installed addons: . Attribute Sets Plus .. Create Account & Manual Order Maker .. Customer Testimonials 2.3.4 .. Customer Blacklist .. Dynamic Info Pages .. FedEx Web Svcs v9 .. Filtered Sales Report .. Generic Box .. Google XML Sitemap SEO .. Maximum Order Value .. Modular Front Page .. Monthly Sales & Tax Report .. Multiple Products Manager .. Must Accept Terms & Conditions .. Order Editior .. PDF Customer Invoice .. Price in Cart Only .. Product Sort/Order .. Product Sort in Cart .. Quantity Discounts .. Restrict Delivery Methods .. SEO Header Tags - Reloaded .. Separate Pricing Per Customer .. Simpler Admin Session Length Control .. Sitemap SEO .. Show Free Ship + Modules .. Specials by Category for SPPC .. Store Mode (open|closed|maintenance) .. Store Pickup Shipping .. Theme Switcher .. Ultimate SEO URLs 5 Pro .. UPS XML Rates & Svcs 1.4 .. USPS methods 7.3.1 .. Who's Online Dashboard . Fixes: Add to cart -> 'product not found' : FIX Login issues with IE 11 : FIX Tools: Incredibly Handy: osC Xref Link to comment Share on other sites More sharing options...
Jack_mcs Posted August 26, 2016 Author Share Posted August 26, 2016 That is the correct change for what you want. It was that way in the last version but I added the code to only load those not in the blacklist since I thought it would be less confusing. If you see a name in the customer list and thought you had blacklisted that customer, you may need to look at the blacklist to be sure you did. A better way to go might be to leave the blacklisted customers in the customers list but highlight them to show they have been blacklisted. But that is not a quick change so maybe I'll add it in the next version. Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
Jack_mcs Posted December 29, 2019 Author Share Posted December 29, 2019 A new version has been uploaded with these changes: Changed the code to work with Phoenix. Changed the code to install into Frozen without any code changes required. Replaced the GUI in admin. Provided by member @Demitry. Removed code for pre-Frozen versions. My thanks to Demitry for the rewritten gui in admin. Demitry and valquiria23 1 1 Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
valquiria23 Posted December 30, 2019 Share Posted December 30, 2019 Thank you very much Jack for your contributions to the community! Fantastic work!! Quote Community Oscommerce fan You'll find the latest osC community version here. Link to comment Share on other sites More sharing options...
Supertex Posted March 24, 2022 Share Posted March 24, 2022 (edited) Hi Jack, Recently had an issue where a banned customer came back and created a new account with a different email (he'd made no attempt to login with his original email recently), and used the same address as he'd used before. Originally though, his city entry used all caps. When he created the new account, only the first letter of the city was cap'd, so his street address was not 'strictly' the same. There was no email sent to notify that an order on the new account had occurred. Am I correct in assuming the difference in caps usage is why? I noticed this in the code of checkout_process.php: $blacklisted['entry_street_address'] === $order->delivery['street_address'] Would changing the "===" to "==" solve the issue, or would the address string require 'scrubbing' or normalization before comparison? Please forgive my ignorance, I know just enough to be dangerous, heh. Edited March 24, 2022 by Supertex changed 'street address' to 'city' Quote osC v2.3.1 MySQL v8.0.32 PHP v5.6.40 Installed addons: . Attribute Sets Plus .. Create Account & Manual Order Maker .. Customer Testimonials 2.3.4 .. Customer Blacklist .. Dynamic Info Pages .. FedEx Web Svcs v9 .. Filtered Sales Report .. Generic Box .. Google XML Sitemap SEO .. Maximum Order Value .. Modular Front Page .. Monthly Sales & Tax Report .. Multiple Products Manager .. Must Accept Terms & Conditions .. Order Editior .. PDF Customer Invoice .. Price in Cart Only .. Product Sort/Order .. Product Sort in Cart .. Quantity Discounts .. Restrict Delivery Methods .. SEO Header Tags - Reloaded .. Separate Pricing Per Customer .. Simpler Admin Session Length Control .. Sitemap SEO .. Show Free Ship + Modules .. Specials by Category for SPPC .. Store Mode (open|closed|maintenance) .. Store Pickup Shipping .. Theme Switcher .. Ultimate SEO URLs 5 Pro .. UPS XML Rates & Svcs 1.4 .. USPS methods 7.3.1 .. Who's Online Dashboard . Fixes: Add to cart -> 'product not found' : FIX Login issues with IE 11 : FIX Tools: Incredibly Handy: osC Xref Link to comment Share on other sites More sharing options...
Jack_mcs Posted March 26, 2022 Author Share Posted March 26, 2022 @SupertexThanks for posting this. I haven't looked at that in years and no one has ever mentioned it before. The === won't do a proper comparison. To fix this, change this code if ($blacklisted['entry_street_address'] === $order->delivery['street_address'] && $blacklisted['entry_suburb'] === $order->delivery['suburb'] && $blacklisted['entry_city'] === $order->delivery['city'] && $blacklisted['entry_postcode'] === $order->delivery['postcode'] && $blacklisted['entry_state'] === $order->delivery['state']) { to if (strcasecmp($blacklisted['entry_street_address']. $order->delivery['street_address']) && strcasecmp($blacklisted['entry_suburb'], $order->delivery['suburb']) && strcasecmp($blacklisted['entry_city'], $order->delivery['city']) && strcasecmp($blacklisted['entry_postcode'], $order->delivery['postcode']) && strcasecmp($blacklisted['entry_state'], $order->delivery['state'])) { Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
Supertex Posted March 27, 2022 Share Posted March 27, 2022 Thanks Jack. We do appreciate ya, sir. Quote osC v2.3.1 MySQL v8.0.32 PHP v5.6.40 Installed addons: . Attribute Sets Plus .. Create Account & Manual Order Maker .. Customer Testimonials 2.3.4 .. Customer Blacklist .. Dynamic Info Pages .. FedEx Web Svcs v9 .. Filtered Sales Report .. Generic Box .. Google XML Sitemap SEO .. Maximum Order Value .. Modular Front Page .. Monthly Sales & Tax Report .. Multiple Products Manager .. Must Accept Terms & Conditions .. Order Editior .. PDF Customer Invoice .. Price in Cart Only .. Product Sort/Order .. Product Sort in Cart .. Quantity Discounts .. Restrict Delivery Methods .. SEO Header Tags - Reloaded .. Separate Pricing Per Customer .. Simpler Admin Session Length Control .. Sitemap SEO .. Show Free Ship + Modules .. Specials by Category for SPPC .. Store Mode (open|closed|maintenance) .. Store Pickup Shipping .. Theme Switcher .. Ultimate SEO URLs 5 Pro .. UPS XML Rates & Svcs 1.4 .. USPS methods 7.3.1 .. Who's Online Dashboard . Fixes: Add to cart -> 'product not found' : FIX Login issues with IE 11 : FIX Tools: Incredibly Handy: osC Xref Link to comment Share on other sites More sharing options...
Supertex Posted March 27, 2022 Share Posted March 27, 2022 BTW...I assume it wouldn't be too complicated to add some code in the create_account.php that would look for name, phone, and make that same comparison on address book entries? Quote osC v2.3.1 MySQL v8.0.32 PHP v5.6.40 Installed addons: . Attribute Sets Plus .. Create Account & Manual Order Maker .. Customer Testimonials 2.3.4 .. Customer Blacklist .. Dynamic Info Pages .. FedEx Web Svcs v9 .. Filtered Sales Report .. Generic Box .. Google XML Sitemap SEO .. Maximum Order Value .. Modular Front Page .. Monthly Sales & Tax Report .. Multiple Products Manager .. Must Accept Terms & Conditions .. Order Editior .. PDF Customer Invoice .. Price in Cart Only .. Product Sort/Order .. Product Sort in Cart .. Quantity Discounts .. Restrict Delivery Methods .. SEO Header Tags - Reloaded .. Separate Pricing Per Customer .. Simpler Admin Session Length Control .. Sitemap SEO .. Show Free Ship + Modules .. Specials by Category for SPPC .. Store Mode (open|closed|maintenance) .. Store Pickup Shipping .. Theme Switcher .. Ultimate SEO URLs 5 Pro .. UPS XML Rates & Svcs 1.4 .. USPS methods 7.3.1 .. Who's Online Dashboard . Fixes: Add to cart -> 'product not found' : FIX Login issues with IE 11 : FIX Tools: Incredibly Handy: osC Xref Link to comment Share on other sites More sharing options...
Supertex Posted March 27, 2022 Share Posted March 27, 2022 (edited) That seems to have broken it. Im seeing this in the error log: [26-Mar-2022 20:53:45 America/Chicago] PHP Warning: strcasecmp() expects exactly 2 parameters, 1 given in /home/public_html/checkout_process.php on line 363 Edit: NVM...found it. There was a period between the street address comparisons...I just copy/pasted from your post. It works Edited March 27, 2022 by Supertex Quote osC v2.3.1 MySQL v8.0.32 PHP v5.6.40 Installed addons: . Attribute Sets Plus .. Create Account & Manual Order Maker .. Customer Testimonials 2.3.4 .. Customer Blacklist .. Dynamic Info Pages .. FedEx Web Svcs v9 .. Filtered Sales Report .. Generic Box .. Google XML Sitemap SEO .. Maximum Order Value .. Modular Front Page .. Monthly Sales & Tax Report .. Multiple Products Manager .. Must Accept Terms & Conditions .. Order Editior .. PDF Customer Invoice .. Price in Cart Only .. Product Sort/Order .. Product Sort in Cart .. Quantity Discounts .. Restrict Delivery Methods .. SEO Header Tags - Reloaded .. Separate Pricing Per Customer .. Simpler Admin Session Length Control .. Sitemap SEO .. Show Free Ship + Modules .. Specials by Category for SPPC .. Store Mode (open|closed|maintenance) .. Store Pickup Shipping .. Theme Switcher .. Ultimate SEO URLs 5 Pro .. UPS XML Rates & Svcs 1.4 .. USPS methods 7.3.1 .. Who's Online Dashboard . Fixes: Add to cart -> 'product not found' : FIX Login issues with IE 11 : FIX Tools: Incredibly Handy: osC Xref Link to comment Share on other sites More sharing options...
Supertex Posted March 27, 2022 Share Posted March 27, 2022 Well...thought it worked, but it was sending the email for every transaction. Did a little digging, and it appears that strcasecmp returns zero or non-zero, rather than true of false. This made it work, as far as I can tell: 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)) { Quote osC v2.3.1 MySQL v8.0.32 PHP v5.6.40 Installed addons: . Attribute Sets Plus .. Create Account & Manual Order Maker .. Customer Testimonials 2.3.4 .. Customer Blacklist .. Dynamic Info Pages .. FedEx Web Svcs v9 .. Filtered Sales Report .. Generic Box .. Google XML Sitemap SEO .. Maximum Order Value .. Modular Front Page .. Monthly Sales & Tax Report .. Multiple Products Manager .. Must Accept Terms & Conditions .. Order Editior .. PDF Customer Invoice .. Price in Cart Only .. Product Sort/Order .. Product Sort in Cart .. Quantity Discounts .. Restrict Delivery Methods .. SEO Header Tags - Reloaded .. Separate Pricing Per Customer .. Simpler Admin Session Length Control .. Sitemap SEO .. Show Free Ship + Modules .. Specials by Category for SPPC .. Store Mode (open|closed|maintenance) .. Store Pickup Shipping .. Theme Switcher .. Ultimate SEO URLs 5 Pro .. UPS XML Rates & Svcs 1.4 .. USPS methods 7.3.1 .. Who's Online Dashboard . Fixes: Add to cart -> 'product not found' : FIX Login issues with IE 11 : FIX Tools: Incredibly Handy: osC Xref Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.