pad420 Posted April 19, 2023 Share Posted April 19, 2023 Hello. Im trying to allow the = character in product titles but to no avail. 🥲 I already tried editing the isCatalogName function in validate.php changing it from: /** * Check for product or category name validity. * * @param string $name Product or category name to validate * * @return bool Validity is ok or not */ public static function isCatalogName($name) { return preg_match(Tools::cleanNonUnicodeSupport('/^[^<>;=#{}]*$/u'), $name); } To: /** * Check for product or category name validity. * * @param string $name Product or category name to validate * * @return bool Validity is ok or not */ public static function isCatalogName($name) { return preg_match(Tools::cleanNonUnicodeSupport('/^[^<>;#{}]*$/u'), $name); } I also tried this: https://stackoverflow.com/questions/44946288/how-do-i-override-prestashop-1-7-to-allow-in-product-titles/45613632#45613632 I could not find the /cache/class_index.php file, I found it in /var/cache removed it but it didn't work too. Any suggestions? Can't find anything about it online 😐 Link to comment Share on other sites More sharing options...
Eutanasio Posted April 22, 2023 Share Posted April 22, 2023 in classes/Validate.php locate the line: const NAME_REGEX = '/^[^<>={}]*$/u'; characters inside this are defined as non allowed for specific fields, which include the product title. By removing = from this line you may be able to use it in the product titles. Don't forget to clear cache after saving changes Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now