You are here:  » Case Sensitive Product Mappings


Case Sensitive Product Mappings

Submitted by paddyman on Wed, 2009-11-25 08:11 in

Hi David,

Just wondering how would I change my code (new distribution) to stop product mappings being case sensitive ?

Many thanks

Adrian

Submitted by support on Wed, 2009-11-25 09:38

Hi Adrian,

In includes/admin.php look for the following code on line 255:

      if (strpos($importRecord["name"],$word) !== FALSE) $found++;

...and REPLACE with:

      if (strpos(strtolower($importRecord["name"]),strtolower($word)) !== FALSE) $found++;

...that should do the trick!

Cheers,
David.

Submitted by davidn on Wed, 2009-11-25 10:17

Hi David,

isn't a better way to change strpos function to stripos, which does exactly the same while being case-insensitive?

Submitted by support on Wed, 2009-11-25 10:23

Hi David,

stripos is PHP5 only; whereas the above method will work across all versions of PHP, that's the only reason I didn't use it...

Cheers,
David.