Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email

Magento Forum

Help with database manipulations (inserting data in the database..)
Jr. Member
Total Posts:  9
Joined:  2008-05-01


Ok so im strolling through the code to learn how it works, i like it a lot, but now im really stuck.

I need to modify the product adding code so that when it saves, it adds automatically a url_rewrite specific to my needs.  Now, i got the event observer to work right, and i really like that way of doing overrides and customizations.

But when i wanted to add the code to insert a new url_rewrite, i got completely stuck.  I tried to pin down where the product saving procedure inserts the rewrite with the proudct name, but i found out that its an attribute of the product which is rewritten with formatURLKey in the beforeSave method of this attribute, so everything goes in the database according to a configuration i didnt find yet.

The thing i’d like to know is, is there any place, site, wiki, doc, source code i can read to understand what is the procedure to write in the database, where are the configurations and such?  Especially if an example with this url_key thing could be made, that would really help, because i cant seem to find out where the configuration which take this attribute and put it in the good table is.

Thanks a lot for any help.

Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top