♥raiwa Posted August 16, 2020 Share Posted August 16, 2020 Uploaded with the above fix Sloppy Words Cleaner 3.3.2 Requires Phoenix 1.0.7.7+ Changes versus Sloppy Words Cleaner 3.3.1 - updated for Phoenix 1.0.7.7+ - updated code in cfgm_store.php module. Thanks to @artfulweb Quote About Me: http://www.oscommerce.com/forums/user/249059-raiwa/ Need help? How To Get The Help You Need Is your version of osC up to date? You'll find the latest osC community version CE Phoenix here. Public Phoenix Change Log Cheat Set on Google Sheets Link to comment Share on other sites More sharing options...
♥14steve14 Posted November 23, 2020 Share Posted November 23, 2020 @raiwa Rainer Am I right in saying that if I want the entered City text to be all in capitals when creating an account and when updating the address details I should change (isset($customer_details['city'])) $customer_details['city'] = $this->RemoveShouting($customer_details['city']); to if (isset($customer_details['city'])) $customer_details['city'] = strtoupper($customer_details['city']); and the same change in the delivery address bit of code. Cheers Quote REMEMBER BACKUP, BACKUP AND BACKUP Link to comment Share on other sites More sharing options...
♥raiwa Posted November 23, 2020 Share Posted November 23, 2020 Yes Quote About Me: http://www.oscommerce.com/forums/user/249059-raiwa/ Need help? How To Get The Help You Need Is your version of osC up to date? You'll find the latest osC community version CE Phoenix here. Public Phoenix Change Log Cheat Set on Google Sheets Link to comment Share on other sites More sharing options...
♥14steve14 Posted November 23, 2020 Share Posted November 23, 2020 Just now, raiwa said: Yes Many thanks Quote REMEMBER BACKUP, BACKUP AND BACKUP Link to comment Share on other sites More sharing options...
♥raiwa Posted December 8, 2020 Share Posted December 8, 2020 Uploaded new version: Sloppy Words Cleaner 3.4.0 Requires Phoenix 1.0.7.7+ Compatibility: OSCOM Phoenix CE 1.0.7.7+ Tested with Phoenix 1.0.7.11 PHP: 7.0-7.4 Changes versus Sloppy Words Cleaner 3.3.2 - updated store module to abstract executable module - added missing hook warning - updated code to match current core standards Quote About Me: http://www.oscommerce.com/forums/user/249059-raiwa/ Need help? How To Get The Help You Need Is your version of osC up to date? You'll find the latest osC community version CE Phoenix here. Public Phoenix Change Log Cheat Set on Google Sheets Link to comment Share on other sites More sharing options...
♥raiwa Posted December 12, 2020 Share Posted December 12, 2020 Uploaded new version 3.4.1 with an error fix in the store module's config entries. Sloppy Words Cleaner 3.4.1 Requires Phoenix 1.0.7.7+ Compatibility: OSCOM Phoenix CE 1.0.7.7+ Tested with Phoenix 1.0.7.11 PHP: 7.0-7.4 Changes versus Sloppy Words Cleaner 3.4.0 - fixed error in store module configuration entry. Thanks to @gritsop Changes versus Sloppy Words Cleaner 3.3.2 - updated store module to abstract executable module - added missing hook warning - updated code to match current core standards Quote About Me: http://www.oscommerce.com/forums/user/249059-raiwa/ Need help? How To Get The Help You Need Is your version of osC up to date? You'll find the latest osC community version CE Phoenix here. Public Phoenix Change Log Cheat Set on Google Sheets Link to comment Share on other sites More sharing options...
♥14steve14 Posted January 5, 2021 Share Posted January 5, 2021 Rainer Not updated to the latest version just yet, but have had a few customers sign up with a company name and it does not come out formatted with capitals for every word. The line for the company is if (isset($customer_details['company']) && MODULE_STORE_SWCLEANER_CLEAN_COMPANY == 'True') $customer_details['company'] = RemoveShouting($customer_details['company'], 'company'); Should this be capitalising every word in the company name. If not, what changes are required. Quote REMEMBER BACKUP, BACKUP AND BACKUP Link to comment Share on other sites More sharing options...
♥raiwa Posted January 5, 2021 Share Posted January 5, 2021 4 hours ago, 14steve14 said: Rainer Not updated to the latest version just yet, but have had a few customers sign up with a company name and it does not come out formatted with capitals for every word. The line for the company is if (isset($customer_details['company']) && MODULE_STORE_SWCLEANER_CLEAN_COMPANY == 'True') $customer_details['company'] = RemoveShouting($customer_details['company'], 'company'); Should this be capitalising every word in the company name. If not, what changes are required. Hy Steve, "RemoveShouting" does what it says: it converts all upper case (shouting) to first letter upper and the rest lower case. To convert it to all upper case just replace "RemoveShouting" with "strtoupper". But be advised that there are company names which have a specific upper lower case pattern. Like "osCommerce", "WordPress", "YouTube". I therefore recommend not to touch the Company input at all. Quote About Me: http://www.oscommerce.com/forums/user/249059-raiwa/ Need help? How To Get The Help You Need Is your version of osC up to date? You'll find the latest osC community version CE Phoenix here. Public Phoenix Change Log Cheat Set on Google Sheets Link to comment Share on other sites More sharing options...
♥ecartz Posted January 5, 2021 Share Posted January 5, 2021 25 minutes ago, raiwa said: To convert it to all upper case just replace "RemoveShouting" with "strtoupper". I don't think that's what he wants. I read it as wanting REMOVE SHOUTING to become Remove Shouting. What is often called Title Cased. So he may want ucwords to wrap either RemoveShouting or strtolower. if (isset($customer_details['company']) && MODULE_STORE_SWCLEANER_CLEAN_COMPANY == 'True') { $customer_details['company'] = ucwords(RemoveShouting($customer_details['company'], 'company')); } I.e. his problem is "INTERNATIONAL BUSINESS MACHINES" is becoming "International business machines" when he wants "International Business Machines". I guess he's all right with IBM becoming Ibm. Quote Always back up before making changes. Link to comment Share on other sites More sharing options...
♥raiwa Posted January 5, 2021 Share Posted January 5, 2021 12 minutes ago, ecartz said: I don't think that's what he wants. I read it as wanting REMOVE SHOUTING to become Remove Shouting. What is often called Title Cased. So he may want ucwords to wrap either RemoveShouting or strtolower. if (isset($customer_details['company']) && MODULE_STORE_SWCLEANER_CLEAN_COMPANY == 'True') { $customer_details['company'] = ucwords(RemoveShouting($customer_details['company'], 'company')); } I.e. his problem is "INTERNATIONAL BUSINESS MACHINES" is becoming "International business machines" when he wants "International Business Machines". I guess he's all right with IBM becoming Ibm. You are right I understood wrong. This is already done like you say in the RemoveShouting function with more options than ucwords and special character support: // captialize all first letters $str = mb_convert_case($string, MB_CASE_TITLE, CHARSET); I do not know why it doesn't work for him. @14steve14, do you have the setting "MODULE_STORE_SWCLEANER_CLEAN_COMPANY" set to "true"? Are this accounts created in the store or the data imported from PayPal by PayPAl express? Quote About Me: http://www.oscommerce.com/forums/user/249059-raiwa/ Need help? How To Get The Help You Need Is your version of osC up to date? You'll find the latest osC community version CE Phoenix here. Public Phoenix Change Log Cheat Set on Google Sheets Link to comment Share on other sites More sharing options...
♥14steve14 Posted January 5, 2021 Share Posted January 5, 2021 (edited) @ecartz @raiwa Sorry been away getting orders out. I should have been a bit clearer. I have had two customers since Christmas enter a company name and both times the first letter of the company name is capitalised and every other word in the name after that is lower case including one ltd on the end. So its like 'International business machines ltd' when I think it should be 'International Business Machines Ltd'. Company name setting in admin is set to true even though advice is not too. I have just uploaded the latest package and after testing with company name set to true everything seems to be working as I would hope. Edited January 5, 2021 by 14steve14 raiwa 1 Quote REMEMBER BACKUP, BACKUP AND BACKUP Link to comment Share on other sites More sharing options...
♥14steve14 Posted March 3, 2021 Share Posted March 3, 2021 Rainer Bit of another silly question. Is there a way to remove any spaces in the phone number. We have customers contact us and leave a phone number on the answer machine but no names. We have search added to the telephone number module but some customers have been adding spaces in the numbers which makes searching very difficlt. Wanting no spaces for any new signed up customers as can remove older ones using sql I hope. Quote REMEMBER BACKUP, BACKUP AND BACKUP Link to comment Share on other sites More sharing options...
♥raiwa Posted March 3, 2021 Share Posted March 3, 2021 (edited) Phone number is not cleaned in the hook. You can copy any line for example: if (isset($customer_details['email_address'])) $customer_details['email_address'] = strtolower($customer_details['email_address']); Then change "email_address" to "customers_telephone" and for just spaces use that function: $string = str_replace(' ', '', $string); Edited March 3, 2021 by raiwa Quote About Me: http://www.oscommerce.com/forums/user/249059-raiwa/ Need help? How To Get The Help You Need Is your version of osC up to date? You'll find the latest osC community version CE Phoenix here. Public Phoenix Change Log Cheat Set on Google Sheets 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.