Siguana Posted December 4, 2023 Share Posted December 4, 2023 In my PrestaShop 8 installation, I am using an API to import products with Japanese characters through code in my store. The issue arises with the creation of the friendly URL, which I need to be saved with Western characters. If I manually add the product from the administration, there is no problem because the conversion from Japanese characters to Western characters is automatically performed when saving the product. If I am not mistaken, PrestaShop uses the str2url() function to perform this operation, but this function is in the \js\admin.js file, and the API I am working with is accessed from PHP. How could I perform this conversion from PHP? Link to comment Share on other sites More sharing options...
musicmaster Posted December 4, 2023 Share Posted December 4, 2023 /classes/Tools.php has a str2url function for PHP. 1 Link to comment Share on other sites More sharing options...
Siguana Posted December 4, 2023 Author Share Posted December 4, 2023 You saved my life! Thank you so much! 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