Showing results for 
Search instead for 
Did you mean: 

Search & Replace Product Titles

Search & Replace Product Titles

A programmer told me that it was almost impossible to make changes directly to the Magento 1x SQL database. 


I'm working on getting my database ready for variances in Google Product feed. Right now we just list one item for each live page in our feed. I want to use variances so that my titles will reflect the correct color and size to show up for more searches in my Google Shopping ads.


I have one update that will find a configurable product and get the title then make sure that each simple product associated with it matches it exactly. Several people have worked on the site over the years and they updated the configurable title without changing the associated products title and they would not match and Google does not like that plus I want them to match.


After that is done I want to find every simple product that is associated with a configurable product and insert the color or size into the simple product title so that the title is the same as the configurable title except that the color or size is added to the title. 


I don't need the code to do this. I just want to know if I do this it won't break the database like I was told it would. If it is possible are there any things I need to watch out for?


Re: Search & Replace Product Titles

Is there a reason why you would avoid doing this for product spreadsheet export and import?


I would export, update titles for products that you need, delete most of the columns that you don't need to change and keep the required ones and the ones that you're changing and then reimport. This is much safer than trying to update via the database. 


Otherwise, yes, it would be possible to write code that went through each configurable product, then went through each associated product and updated the product name as needed. 

If you've found one of my answers useful, please give "Kudos" or "Accept as Solution" as appropriate. Thanks!

Re: Search & Replace Product Titles

That is what I might do.

I do want an automated process. I may just write a script to do it.

I was thinking I would dump the feed data into its own DB then fix it like I want then have a daily script that merges them and makes sure it follows my rules. I would then use another script to output a txt file for merchant center.