Results 1 to 7 of 7

Hybrid View

  1. #1
    Join Date
    Dec 2010
    Location
    NYC
    Posts
    104
    Plugin Contributions
    4

    Default importing product description with easy populate and line breaks without HTML tags

    Hi Zenners,

    The text is set with line breaks to create space and paragraphs in the product description cell, however, without HTML tags. Once uploaded within the system, the text looks fine in the online catalog/store website, however, the text appears as a single block with no breaks in the admin section. the site has the CKeditor installed.

    In admin, once I edit a product and save it, the text then readjusts and appears also as a single block with no breaks in the online catalog/website-store..

    Other than adding HTML tags to product description prior to upload, is there another solution to this issue?

    Please advise...

    A.

  2. #2
    Join Date
    Jul 2012
    Posts
    16,816
    Plugin Contributions
    17

    Default Re: importing product description with easy populate and line breaks without HTML tag

    Quote Originally Posted by eranariel View Post
    Hi Zenners,

    The text is set with line breaks to create space and paragraphs in the product description cell, however, without HTML tags. Once uploaded within the system, the text looks fine in the online catalog/store website, however, the text appears as a single block with no breaks in the admin section. the site has the CKeditor installed.

    In admin, once I edit a product and save it, the text then readjusts and appears also as a single block with no breaks in the online catalog/website-store..

    Other than adding HTML tags to product description prior to upload, is there another solution to this issue?

    Please advise...

    A.
    Couple of things. I've tried to read the above a few times, but I don't see whaat the problem is. Perhaps it could be restated? What is happening that is undesirable? What would be desired to occur?

    The other thing might be to ask questions related to a plugin in perhaps in the forum about that plugin so that perhaps the individuals with the most experience with that issue may quickly resolve the trouble.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  3. #3
    Join Date
    Aug 2007
    Location
    Gijón, Asturias, Spain
    Posts
    2,829
    Plugin Contributions
    31

    Default Re: importing product description with easy populate and line breaks without HTML tag

    Other than adding HTML tags to product description prior to upload, is there another solution to this issue?
    No.
    If you want text to be formatted on an html page, you have to use html tags.
    Use any WSYIWYG html editor to work on the text then copy the block of source code containing the text and tags into the EP field.
    Steve
    github.com/torvista: BackupMySQL, Structured Data, Multiple Copy-Move-Delete, Google reCaptcha, Image Checker, Spanish Language Pack and more...

  4. #4
    Join Date
    Dec 2010
    Location
    NYC
    Posts
    104
    Plugin Contributions
    4

    Default Re: importing product description with easy populate and line breaks without HTML tag

    what is happening is that if I have text with line breaks added into the database using easy populate, the line breaks appear in the catalog product description but not in the admin when I edit the product - if i edit a product in the admin, the line breaks disappear on the catalog side as well

  5. #5
    Join Date
    Jul 2012
    Posts
    16,816
    Plugin Contributions
    17

    Default Re: importing product description with easy populate and line breaks without HTML tag

    Quote Originally Posted by eranariel View Post
    what is happening is that if I have text with line breaks added into the database using easy populate, the line breaks appear in the catalog product description but not in the admin when I edit the product - if i edit a product in the admin, the line breaks disappear on the catalog side as well
    Then, if not following torvista's advice the. Issue is with ckeditor converting/removing the line breaks when in html editor mode before saving the content... Or the line break should maybe be a carriage return line break...
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  6. #6
    Join Date
    Dec 2010
    Location
    NYC
    Posts
    104
    Plugin Contributions
    4

    Default Re: importing product description with easy populate and line breaks without HTML tag

    here is the solution:
    =SUBSTITUTE(A1, CHAR(10), "<br>")
    This little function will substitute the line break with a <br> tag in each cell. The CKEeditor does not recognize a line break if a line break is part of the product_description and uploaded directly to the database using easy-populate...my database collation is UTF-8

  7. #7
    Join Date
    Aug 2007
    Location
    Gijón, Asturias, Spain
    Posts
    2,829
    Plugin Contributions
    31

    Default Re: importing product description with easy populate and line breaks without HTML tag

    =SUBSTITUTE(A1, CHAR(10), "<br>")
    So this is the next column in the spreadsheet after the product description....to "convert" the text to text-with-html-tags?
    This is on a hiding to nothing.
    While this may "solve" the "problem", the "problem" is in fact a feature!

    Text is stored in the db as text. When edited in the admin, SHOULD strip out line-breaks or other invisible/potential problem-causing/risky characters during the saving process, it's good practice from a DB sanitation point of view.

    I stand by my post#3:
    text in a product description may require all sorts of things to jazz it up apart from just line breaks...exotic things like headings and paragraphs, video links, pdf links, language-specific-images links, highlighted text or even marquee (god forbid), so should be written in a suitable html editor to generate valid html code, then pasted into the spreadsheet field for import.
    It is the only way to ensure it will maintain the same structure across all browsers, and will not get mangled by any html editor you choose to plug into the admin every time you wish to edit it.
    Steve
    github.com/torvista: BackupMySQL, Structured Data, Multiple Copy-Move-Delete, Google reCaptcha, Image Checker, Spanish Language Pack and more...

 

 

Similar Threads

  1. Adding html tables to product description adds extra line breaks
    By ndknsrln in forum Templates, Stylesheets, Page Layout
    Replies: 17
    Last Post: 4 Mar 2013, 12:35 AM
  2. Easy Populate dropping product name and description only
    By robertm18 in forum All Other Contributions/Addons
    Replies: 1
    Last Post: 19 May 2011, 02:12 AM
  3. How Do I Format A Product Description to include line breaks and bullet points?
    By mike373 in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 21 Apr 2011, 07:44 PM
  4. Replies: 4
    Last Post: 12 May 2008, 10:52 AM
  5. Missing product name and description in Easy Populate
    By rikko101 in forum All Other Contributions/Addons
    Replies: 0
    Last Post: 17 May 2007, 05:20 AM

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