Our SEO department had recently made a request to implement CEON URI mapping module on one of our leading furniture retailer store in the UK. The module was implemented by the developer assigned to the project in a couple of hours and the website was handed over to the concerned department so they could continue adding the SEO friendly URLs to the e-commerce website.
Now the website had over 5,000 products and if they had to go by the default way of going into each product edit page and updating that product page to generate the URL then it would have taken quite some time to complete this task and then continue on with their main job of actually optimizing the website.
I decided on using Fast Updates for this purpose. I added an input box on the page where the user could add his own version of the URL or he could leave it empty and let the system generate it for him. To generate the SEO friendly URL I had to use the concerned functions from the CEON URI mapping module. After some search I found the function needed for this purpose.
The actual function which generates the SEO friendly URL can be found in the following class file
The name of the function which does the job is
The function expects the following parameters in the order given
id – product id of the product
type – category or product. As we are generating the URLs for the products I will just enter ‘product’ here
category – the category id against which this product is associated
name – the product name of the product
language code – just enter ‘en‘ here as it is for an English language website
language id – the Zen Cart language id for the website. In my case it will be 1 as it is for an English language website
The function returns the URL which I saved into the ceon_uri_mappings table and the problem was resolved. I handed it over to SEO department and they generated all the URLs within a couple of hours.