I'm writing a product importer for PrestaShop. This importer should connect to server using SOAP API.
Generally everything works fine, but I need to generate a string for link_rewrite
column in ps_product_lang
table to insert it correctly. The problem is that imported string, which I want to use for generating linkRewrite
parameter contains Polish sings like ó,ł,ż etc.
I found a method called updateLinkRewrite()
which generates SEO friendly URL and replace Polish chars on English chars in admin page but this is a JS method.
Does a similar method to updateLinkRewrite()
exist in PrestaShop admin controllers in PHP-part?
Actually there is a simple solution in PHP inside Prestashop :
Tools::str2url($string);
Works since 1.5 and still in 1.7.