Weldon451 Posted May 2, 2022 Share Posted May 2, 2022 (edited) I am looking to migrate a website from Cubecart 4 to Magento 1.8. I have created a script that grabs the old cat id from the url, then searches the database to where this is stored (I copied them over) It then grabs the new magento category ID and then needs to grabs the URL of that category. I then want to make a 301 redirect from to the new url. I cant grab the SEO url from the ID however. So far I can grab the un written url from the id with this where $caturl2 is the category id. Mage::getModel("catalog/category")->load($caturl2)->getUrl(); Is there anyway to grab the seo url by ID? Any ideas? At the minute it's outputting: /catalog/category/view/s/cat-name/id/4448/ ACE Flare Login Edited May 5, 2022 by Weldon451 Quote Link to comment Share on other sites More sharing options...
Kincer232 Posted September 16, 2022 Share Posted September 16, 2022 (edited) To get the full SEO url, stored in URL rewrite management tables, you should use the follwing code. Mage::getModel("catalog/category")->load($caturl2)->getUrlPath(); www.crediblebh.com Edited September 19, 2022 by Kincer232 Quote Link to comment Share on other sites More sharing options...
Mason69 Posted November 22, 2022 Share Posted November 22, 2022 On 9/16/2022 at 11:56 AM, Kincer232 said: To get the full SEO url, stored in URL rewrite management tables, you should use the follwing code. Mage::getModel("catalog/category")->load($caturl2)->getUrlPath(); HISD Connect Login I appreciate the information and advice you have shared. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.