Jump to content
Top_Speed

[CONTRIBUTION] Sloppy Words Cleaner

Recommended Posts

Lets try again:

Sloppy Words Cleaner 3.0 BS.zip

This one seems to be ok only for older EDGE versions using $HTTP_POST_VARS

Edited by raiwa

Share this post


Link to post
Share on other sites

Just found a bug for the installation if it's the newest 2.3.4 EDGE version with $_POST.

Please use this one if your EDGE is new and uses superglobals:

 

Sloppy Words Cleaner 3.0 BS_$_POST.zip

Share this post


Link to post
Share on other sites

The first version, I need to install 2 times to install it.

The language for title in box modules are missing

When install, shows this error

Quote

 There was an error encountered when trying to add the sloppy words cleaner hook code to the file: "account_pwa.php".
Please check the file and recover the backup file: "/swcleaner_backups/account_pwa.php.bak" to apply the required modifications manually.

Now, I upload the new version

Share this post


Link to post
Share on other sites

@PiLLaO, Gustavo, do you have the file "account_pwa.php" in your store?

Share this post


Link to post
Share on other sites

After uninstall the first version to install the new version, I have this errors:

Quote
Advertencia There was an error encountered when trying to add the sloppy words cleaner hook code to the file: "create_account.php".
Please check the file and recover the backup file: "/swcleaner_backups/create_account.php.bak" to apply the required modifications manually.
Éxito Sloppy words cleaner hook codes have been successfully added to the file: "account_pwa.php"
Advertencia There was an error encountered when trying to add the sloppy words cleaner hook code to the file: "account_edit.php".
Please check the file and recover the backup file: "/swcleaner_backups/account_edit.php.bak" to apply the required modifications manually.
Advertencia There was an error encountered when trying to add the sloppy words cleaner hook code to the file: "address_book_process.php".
Please check the file and recover the backup file: "/swcleaner_backups/address_book_process.php.bak" to apply the required modifications manually.
Advertencia There was an error encountered when trying to add the sloppy words cleaner hook code to the file: "checkout_shipping_address.php".
Please check the file and recover the backup file: "/swcleaner_backups/checkout_shipping_address.php.bak" to apply the required modifications manually.
Advertencia There was an error encountered when trying to add the sloppy words cleaner hook code to the file: "checkout_payment_address.php".
Please check the file and recover the backup file: "/swcleaner_backups/checkout_payment_address.php.bak" to apply the required modifications manually.

And if I look the files, it contains

// SWC Sloppy Words Cleaner
  $OSCOM_Hooks->register('swc');

 

Share this post


Link to post
Share on other sites

Gustavo you should first recover unmodified files. if you have the older sloppy words cleaner modifications in place remove them

Use the correct version for your store and try again with new unmodified files.

Share this post


Link to post
Share on other sites

I only using the version that you upload today.

I must to recover the files on backup files directory and reinstall

Share this post


Link to post
Share on other sites

I uploaded 2 versions, the first one for older stores using $HTTP_POST_VARS and a second one for newer stores using $_POST. I'm working on a universal version which will do it for both. Please use the correct one for now.

 

Share this post


Link to post
Share on other sites

Ok, I think I must to use the $HTTP_POST_VARS because I dont update this commit to my web.

I hope that $_POST that will be changed don't make issues

 

Share this post


Link to post
Share on other sites

@PiLLaO, Gustavo here is the promised universal version which should do it for both:

 

Sloppy Words Cleaner 3.0 BS - universal.zip

Share this post


Link to post
Share on other sites

Hello Loic @Gyakutsuki,

Not the same , that one removes special characters from a string. Sloppy words cleaner normalizes/filters customer input in oscommerce account fields.

Share this post


Link to post
Share on other sites
46 minutes ago, raiwa said:

ppy words cleaner normalizes/filters customer input in oscommerce account fiel

ok :)



Regards
-----------------------------------------
Loïc

Contact me by skype for business
Contact me @gyakutsuki for an answer on the forum

 

Share this post


Link to post
Share on other sites

New version Sloppy Words Cleaner reloaded 3.0 uploaded:

Sloppy Words Cleaner reloaded

I did this as an exercice for future OsC 2.4 Apps and included auto installation and update scripts in the store module.

So update from previous versions, hook support for older 2.3.4 EDGE and 2.3x Standard versions and core file changes (hook register and hook call) are automatically executed when installing the store module.

Like this installation consists in copying new files and installing the module, that's all.

If the auto install fails, which may only happen for older, heavy modified stores, optional manual instructions are also included.

Compatibility: OsC 2.3.4 Bootstrap Community Editions GOLD and EDGE at least up to 2017/05/14 OsC 2.3. to 2.3.4 Standard - ISO and UTF-8 encodings supported PHP: 5.3, 5.4, 5.5, 5.6, 7.0 Filenames, Database Table Names and paths hardcoded. Superglobal variables used.

 

Changes versus previous versions:

- complete recoded and packed in a store module and hook

- easiest install, just copy files and install store module

- no manual edits at all

- unicode/utf-8 support added to all preg_replace_callback functions (/u modifier)

- all functions rewritten to class functions and joined into on e function with variable passed for different subjects

- auto add hook register and calls to all files

- auto check for hook support and auto install if needed - auto update from previous versions

- all configuration entries and exeption arrays are included in the store module and can be modified in your admin area.

- support for PWA Checkout add-on and other additional input fields included

 

Hope you like it. Any reports - suggestions very welcome.

Rainer

Share this post


Link to post
Share on other sites

Hi Rainer,

I installed this module  on  the latest Installed Version: osCommerce Online Merchant v2.3.4 

Success Hook support found, Great!"
Success Sloppy words cleaner hook codes have been successfully added to the file: "create_account.php"
Success Sloppy words cleaner hook codes have been successfully added to the file: "account_edit.php"
Success Sloppy words cleaner hook codes have been successfully added to the file: "address_book_process.php"
Success Sloppy words cleaner hook codes have been successfully added to the file: "checkout_shipping_address.php"
Success Sloppy words cleaner hook codes have been successfully added to the file: "checkout_payment_address.php"
Success Sloppy words cleaner hook codes have been successfully added to the file: "ext/modules/payment/paypal/express.php"
Success Sloppy words cleaner hook codes have been successfully added to the file: "ext/modules/payment/paypal/express_payflow.php"

When enabled I get the following result:

Fatal error: Call to undefined function mb_convert_case() in /home/artisanw/public_html/includes/hooks/shop/swc/swc_hooks.php on line 75

Your help in resolving the issue will be greatly appreciated

Regards

Tom

Share this post


Link to post
Share on other sites

Hello  Tom @Artisanf,

 

If you are under local test environment under windows, check your php.ini that this line is uncommented:

extension=php_mbstring.dll

Otherwise, if you are running this on a hosted server and you have no access to php settings, check this with your hosting service.

rgds

Rainer

Edited by raiwa

Share this post


Link to post
Share on other sites

Hi Rainer,

Thanks for your swift response.

My hosting company have replied and stated that: mbstring is not commented out on my server.

I assume this is correct and it still does not work.

Does it need to be commented out?

Thanks Tom

Share this post


Link to post
Share on other sites

Hello @Artisanf,

 

No it musn't be commented out. The mb string library must be loaded. Please double check this with your hosting and tell them the error message you get. It is the only explanation. The mb convert string library is part of php 4,5 and 7. I never got any problem reported with this.

 

rgds

Rainer

Share this post


Link to post
Share on other sites

Hi Rainer,

The hosting company now seem to have got their act together and it is now working perfectly.
Thanks for a great contibution.
& Thanks for all your help
Regards Tom

Share this post


Link to post
Share on other sites

Uploaded update:

Sloppy Words Cleaner 3.1

Compatibility:

OsC 2.3.4.1. CE Frozen, OsC 2.3.4.(1.) Bootstrap Community Editions GOLD and EDGE

OsC 2.3. to 2.3.4 Standard - ISO and UTF-8 encodings supported

PHP: 5.3 - 7.2

================================================================

Changes versus Sloppy Words Cleaner 3.0

- fixed code for PayPal express and espress payflow

- tested with 2.3.4.1 CE Frozen and PHP 7.2

Share this post


Link to post
Share on other sites

Interesting contribution I do get a number of people who have trouble... however we need a modification where any accents in a name or address must be removed otherwise our shipping service gets annoyed. FedEx, UPS, and Canada Post (!) do not like accents in names or addresses. Is there any way to strip them out using your contribution?

Thank you!

Share this post


Link to post
Share on other sites
16 hours ago, Pinball said:

Interesting contribution I do get a number of people who have trouble... however we need a modification where any accents in a name or address must be removed otherwise our shipping service gets annoyed. FedEx, UPS, and Canada Post (!) do not like accents in names or addresses. Is there any way to strip them out using your contribution?

Thank you!

Hello John,

It should not be difficult to add this conversion.

You could use "iconv" for this purpose. Have a look here:

https://stackoverflow.com/questions/6206132/how-to-convert-special-chars-to-standard-chars

But thinking about, if you use scripts in admin  to create the shipping labels, it might be better to use it there only in the shippinglabels/shipping information and leave the Customer data in the database with accents.

Share this post


Link to post
Share on other sites

Uploaded update for Phoenix:

Sloppy Words Cleaner 3.2

Compatibility:

OSCOM Phoenix CE 1.0.2.x


PHP: 7.0-7.3

Changes versus Sloppy Words Cleaner 3.1

- Removed legacy code for older OsCommerce versions


- Added option to convert all special characters to standard ASCII

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×