Results 1 to 3 of 3
  1. #1
    Join Date
    Jan 2009
    Posts
    2,123
    Plugin Contributions
    0

    Default phpDesigner - MYSQL - v- Easy Populate - Fixing html Errors in Product Descriptions

    When we started our website, as completel novices, we were uploading product descriptions in html but inadvertantly had <html></html> tags, with <head></head> and <body></body> tags in the descriptions as well. Now, after 18 months we've realised that these tags need to come out. Mainly, because they're affecting the page layout in certain ads with a drop down menu for attributes and additional images in the same ad. Remove these pointless tags and the problem is cured.

    So, we've been trying different ways of bulk editing 4,000 products. Nothing seems to be working though. The first thing we tried (after backing up the BD) was logging into phpMyAdmin and opening the products_description table. Then, we export the sql file for that table and edit it using software, phpDesigner8. CTRL+F all the garbage html with empty space and repeat for all other unwanted tags, save the file and then import. Problem with this is it would take a lifetime. There's just so much of it and I'm sure there will be mistakes along the way which will render the effort pointless.

    So, we started to look at Easy Populate. Installed it and downloaded the products as .csv.... After removing all the unwanted <tags> with CTRL+F replace, we try to upload it but it just seems to time out. No error messages, just an egg timer which eventually stops and then nothing, the <tags> are all still there?

    Does anyone have a suggestion on how to remove all these unwated html tags?

  2. #2
    Join Date
    Oct 2007
    Posts
    143
    Plugin Contributions
    0

    Default Re: phpDesigner - MYSQL - v- Easy Populate - Fixing html Errors in Product Descriptio

    My first suggestion would have been to try easypopulate, but sounds like you're having trouble getting that working. (we routinely do imports for 6000+ items, so I feel your pain, but thankfully we've had pretty good success with EP).

    An alternative (not the most elegant) could be a mysql update to remove the unwanted junk. On a test copy of the database, run something like:
    Code:
    update products_description set products_description = REPLACE(products_description,'<html>','')
    It works for me on a few quick tests.. although you'd need to run one query for each tag you want to remove (and then the closing tag) as unfortunately I don't think REPLACE accepts a % (wildcard) character.. This of course assumes you know all the tags you want to remove, and there aren't a ton of different ones. If you really wanted to you could write something to loop through and find all the values in <>, then loop back through and run the update for each of them - but this would probably be overkill unless you have a ton of unknown tags..

    Might be an option for you.. if it works on the test database, save the queries you performed to a notepad, then copy/paste them into phpmyadmin and run on your live db. Of course, if you plan on doing much bulk editing in the future - I would strongly suggest troubleshooting EP and/or trying to find out what your phpmyadmin imports are choking on. I've run into timeout/filesize errors importing entire db's, but usually not just when importing table.

  3. #3
    Join Date
    Jan 2009
    Posts
    2,123
    Plugin Contributions
    0

    Default Re: phpDesigner - MYSQL - v- Easy Populate - Fixing html Errors in Product Descriptio

    Thank you, thank you, thank you! It worked an absolute treat! I'll be keeping this thread bookmarked in case I need to make any more mass-changes. A really good trick!

 

 

Similar Threads

  1. Replies: 6
    Last Post: 18 Apr 2015, 12:03 AM
  2. easy populate csv not exporting descriptions or prices
    By irishshopper in forum All Other Contributions/Addons
    Replies: 1
    Last Post: 7 May 2011, 05:59 PM
  3. Advice needed for daily product import (Easy Populate, PHP + MySQL or ??)
    By yourguide in forum Setting Up Categories, Products, Attributes
    Replies: 1
    Last Post: 19 Aug 2010, 01:22 AM
  4. I need help fixing HTML validation errors
    By Exalt in forum General Questions
    Replies: 2
    Last Post: 29 Jan 2008, 08:42 PM
  5. Easy Populate Product Descriptions
    By adventurer in forum Setting Up Categories, Products, Attributes
    Replies: 3
    Last Post: 21 Oct 2007, 10:59 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg