Jump to content

[FIXED - 1.3.9] Friendly URL (Link rewritten) is missing in import tool for Products


Recommended Posts

I found out that the code to import a friendly url is already present in the php file (/admin/tabs/AdminImport.php) at lines 660-669.
Here is the code:

$link_rewrite = is_array($product->link_rewrite) ? $product->link_rewrite[$defaultLanguageId] : '';
           $valid_link = Validate::isLinkRewrite($link_rewrite);

           $bak = $product->link_rewrite;
           if ((isset($product->link_rewrite[$defaultLanguageId]) AND empty($product->link_rewrite[$defaultLanguageId])) OR !$valid_link)
               $link_rewrite = Tools::link_rewrite($product->name[$defaultLanguageId]);
           if (!$valid_link)
               $this->_warnings[] = Tools::displayError('Rewrited link for'). ' '.$bak.(isset($info['id']) ? ' (ID '.$info['id'].') ' : '').' '.Tools::displayError('was re-written as').' '.$link_rewrite;

           $product->link_rewrite = self::createMultiLangField($link_rewrite);



But in the back-end you cannot select this url and when i changed some code, it will not import but give the error :
URL Rewritten : Default Language is empty.... blah blah

Obviously this worked before, how else could this code be there?

Link to comment
Share on other sites

  • 1 year later...

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
×
×
  • Create New...