I need an extension that would find "ABC" in the description field of ALL or selected products and replace it with "XYZ"
sort of like a find and replace
sort of like a find and replace
Could you tell me what you are trying to achieve? Are you wanting to do this one time or more then once?
If you wish to change ABC to XYZ in the description you could do that with a sql command through phpmyadmin.
Mike
If you wish to change ABC to XYZ in the description you could do that with a sql command through phpmyadmin.
Mike
cue4cheap not cheap quality
Hey, what I'm trying to achieve exactly is what you're saying.Cue4cheap wrote:Could you tell me what you are trying to achieve? Are you wanting to do this one time or more then once?
If you wish to change ABC to XYZ in the description you could do that with a sql command through phpmyadmin.
Mike
Finding ABC in EVERY product's description, and changing it to XYZ. If you can give me the SQL command for that it'd be appreciated. Thanks!
I'll try it when I get home. Thanks for the great help.
Last edited by ClosedCart on Tue Aug 25, 2015 10:17 pm, edited 1 time in total.
Hey, I have another request if you dont mind. This time, I need to update all product descriptions. For example, find "Free Shipping" in every single title and remove it.Cue4cheap wrote:Go into phpmyadmin, select your database for your store and run:
UPDATE product_description SET description = replace(description,"ABC","XYZ");
Mike
Would it be
Code: Select all
UPDATE oc_product_title SET title = delete(title,"Free Shipping");
ClosedCart wrote:Hey, I have another request if you dont mind. This time, I need to update all product descriptions. For example, find "Free Shipping" in every single title and remove it.Cue4cheap wrote:Go into phpmyadmin, select your database for your store and run:
UPDATE product_description SET description = replace(description,"ABC","XYZ");
Mike
Would it be
? (even though I cant find the oc_product_title on my database listCode: Select all
UPDATE oc_product_title SET title = delete(title,"Free Shipping");
Ummmm.... I read what you wrote as apples and oranges and confused me a bit....
You write "update all product descriptions" .... and find "Free Shipping" in every title.... Do you mean "Custom title" or is it actually still in the product description that has "Free Shipping"?
If the later then it would be the same code as I put before but:
UPDATE product_description SET description = replace(description,"Free Shipping","");
The warning here is again to back up before you do this AND to see what the pattern is. IF you have a space before and after "Free Shipping" and you run the code like it put it then your descriptions will have two spaces still but no longer "Free Shipping". So maybe:
UPDATE product_description SET description = replace(description," Free Shipping","");
If that isn't what you wanted (i.e. you meant the "Custom tile" to be adjusted) please let me know....
Mike
EDIT: PS Maybe you were referring to "Product Name" as the title you refer to where you want the change?
cue4cheap not cheap quality
Hey sorry for the late reply. I think what you gave me first solved my problem (finding x and replacing it with y in the description)Cue4cheap wrote:Hey sorry for the late reply.ClosedCart wrote:Hey, I have another request if you dont mind. This time, I need to update all product descriptions. For example, find "Free Shipping" in every single title and remove it.Cue4cheap wrote:Go into phpmyadmin, select your database for your store and run:
UPDATE product_description SET description = replace(description,"ABC","XYZ");
Mike
Would it be
? (even though I cant find the oc_product_title on my database listCode: Select all
UPDATE oc_product_title SET title = delete(title,"Free Shipping");
Ummmm.... I read what you wrote as apples and oranges and confused me a bit....
You write "update all product descriptions" .... and find "Free Shipping" in every title.... Do you mean "Custom title" or is it actually still in the product description that has "Free Shipping"?
If the later then it would be the same code as I put before but:
UPDATE product_description SET description = replace(description,"Free Shipping","");
The warning here is again to back up before you do this AND to see what the pattern is. IF you have a space before and after "Free Shipping" and you run the code like it put it then your descriptions will have two spaces still but no longer "Free Shipping". So maybe:
UPDATE product_description SET description = replace(description," Free Shipping","");
If that isn't what you wanted (i.e. you meant the "Custom tile" to be adjusted) please let me know....
Mike
EDIT: PS Maybe you were referring to "Product Name" as the title you refer to where you want the change?
My new question was finding x in the products title/name/what it's called and deleting it.
Reason being is that initially I put "free shipping" in all the titles like
"Red colored printed boys shirt free shipping"
But now I'm not offering free shipping, so it would be decieving/not accurate to have free shipping in the name. And I can't manually do it for so much products.
Hope you understand now.
Thanks for the help
The product "titles" are actually the "Product name" when you edit the product. You can validate this by going into your store admin and editing a product and you should see your "free shipping" in the "Product Name:" under the general tab. So that being the case, and please verify it before moving forward you can run this sql command in PHPMyadmin:
UPDATE product_description SET name = replace(name,"free shipping","");
Two things to remember:
1) back up before doing anything directly on your database
2) This will act on it and will leave a - if you put it in front from "free shipping" or it will leave two spaces if you have "free shipping" in between other words. And IF it wasn't entered in consistently then you will get 'leftovers'.
Examples of the Product Name (made up):
Big green frog statue - free shipping. Running that command you will end up with "Big green frog statue - "
Big green frog statue - free shipping - GREAT for your lawn. Running that command you will end up with "Big green frog statue - - GREAT for your lawn."
Big green frog statue - free shipping for all products. Running that command you will end up with "Big green frog statue - for all products."
So do a check and see how "free shipping" was entered and adjust the SQL command above to adjust.
Using the 2nd example:
Big green frog statue - free shipping - GREAT for your lawn.
The SQL would end up being:
UPDATE product_description SET name = replace(name," - free shipping -","");
That will get rid of the space before and after the -, the -, the words free shipping, and the space before the 2nd dash and the 2nd dash.
IF whoever put in "free shipping" wasn't consistent then you may need to run that command a few times and adjusting it to how free shipping was put in.
Mike
UPDATE product_description SET name = replace(name,"free shipping","");
Two things to remember:
1) back up before doing anything directly on your database
2) This will act on it and will leave a - if you put it in front from "free shipping" or it will leave two spaces if you have "free shipping" in between other words. And IF it wasn't entered in consistently then you will get 'leftovers'.
Examples of the Product Name (made up):
Big green frog statue - free shipping. Running that command you will end up with "Big green frog statue - "
Big green frog statue - free shipping - GREAT for your lawn. Running that command you will end up with "Big green frog statue - - GREAT for your lawn."
Big green frog statue - free shipping for all products. Running that command you will end up with "Big green frog statue - for all products."
So do a check and see how "free shipping" was entered and adjust the SQL command above to adjust.
Using the 2nd example:
Big green frog statue - free shipping - GREAT for your lawn.
The SQL would end up being:
UPDATE product_description SET name = replace(name," - free shipping -","");
That will get rid of the space before and after the -, the -, the words free shipping, and the space before the 2nd dash and the 2nd dash.
IF whoever put in "free shipping" wasn't consistent then you may need to run that command a few times and adjusting it to how free shipping was put in.
Mike
cue4cheap not cheap quality
Hey, suberb reply. Thanks a lot for being concise and super clear, I appreciate it. And sorry for replying late again. That's about all I need now and this thread can now die or live on for whoever else needs help in the future with the asme thing. Everything worked fantastically.Cue4cheap wrote:The product "titles" are actually the "Product name" when you edit the product. You can validate this by going into your store admin and editing a product and you should see your "free shipping" in the "Product Name:" under the general tab. So that being the case, and please verify it before moving forward you can run this sql command in PHPMyadmin:
UPDATE product_description SET name = replace(name,"free shipping","");
Two things to remember:
1) back up before doing anything directly on your database
2) This will act on it and will leave a - if you put it in front from "free shipping" or it will leave two spaces if you have "free shipping" in between other words. And IF it wasn't entered in consistently then you will get 'leftovers'.
Examples of the Product Name (made up):
Big green frog statue - free shipping. Running that command you will end up with "Big green frog statue - "
Big green frog statue - free shipping - GREAT for your lawn. Running that command you will end up with "Big green frog statue - - GREAT for your lawn."
Big green frog statue - free shipping for all products. Running that command you will end up with "Big green frog statue - for all products."
So do a check and see how "free shipping" was entered and adjust the SQL command above to adjust.
Using the 2nd example:
Big green frog statue - free shipping - GREAT for your lawn.
The SQL would end up being:
UPDATE product_description SET name = replace(name," - free shipping -","");
That will get rid of the space before and after the -, the -, the words free shipping, and the space before the 2nd dash and the 2nd dash.
IF whoever put in "free shipping" wasn't consistent then you may need to run that command a few times and adjusting it to how free shipping was put in.
Mike
Cheers
-Moe
Who is online
Users browsing this forum: No registered users and 3 guests