Jump to content

[Ssolved] HTML and line breaks in csv import files


Recommended Posts

I have been breaking my head on this. Anybody can help me, or point me in the right direction?

 

For example this description :

 

 

My dear lord. Why are you not visible to my eyes.

I want to see you. I really want to see you.

 

 

And when i do i will take you in my heart.

 

 

When you import it as a category it will insert the linebreak.

When you import it as a product it will not.

 

This has been driving me crazy. Where to look in AdminImport????

Link to comment
Share on other sites

The code that imports the description (multilanguagefields) strips out all html stuff, as far that i can see it.
I tried using opcodes (like [ b ] [ /b ] ). These do not get stripped, but also not interpreted..
it seems that all < > and between gets removed

What i dont understand is the difference between the import between a category and product in terms of the description.

Link to comment
Share on other sites

I'm also having a problem with HTML in my imported product descriptions...but in my case, they actually do work without making any changes to the products at all. Yet when I do make changes, the HTML elements (tooltip) quit working (?) Not only that, but then my product images start failing. I'm yet to get a response to this issue (Thread).

Link to comment
Share on other sites

I know that unless you change the configuration of the MCE editor it will strip out all dubious code like [ embed ] and [ script ] and others...
So you might want to allow these kind of codes. You can do that in the settings.

By default iframe and other html codes are not allowed by CMS (grrrr)

Edit /admin/Tabs/AdminCMS.php
Find this line
convert_urls : false,
Add this code directly behind it :
extended_valid_elements : "iframe[src|width|height|name
|align|style]object[classid|codebase|width|height|
align],param[name|value],embed[quality|type|pluginspage|width|height|src|align]",

Link to comment
Share on other sites

  • 4 weeks later...

Here is a questions that i received lately :


Hi,


You are an import-expert ;-)

I have a question;

When i import product descriptions with Notepad++ and CSV (with UTF-8 code) it will be a success, but it looses the layout (no white lines, bold, larger font).


Is there a solution?

Regards,


King cheetah



The answer is that html and other styling will be generally* removed during import.

*Generally : During the import of categories white lines can be imported. During import of products all styling is removed.

Link to comment
Share on other sites

Hi uddhava,

Thanks for your reply.

It seems that it is a bug. Or someone else can fix this?
I hope so because it saves much time to import 10,000 product descriptions, but without retaining layout, you have nothing. You can't read the descriptions.

Change code in adminImport.php ?? How?

With regards,

King Cheetah

Link to comment
Share on other sites

I've been looking for a solution.
You can import pictures from a URL, so why not import the text WITH layout?
It failed to convert CSV to HTML, all the white lines, returns, bold letters are lost.

Possible solution: save text in word document, convert a map with word documents into HTML with a program (for instance http://www.softinterface.com/Convert-Doc/Convert-Doc.htm) and upload it to a server. Put a URL in CSV file to catch this HTML-file, just like photos.
Change the code in adminImport just like photos (which I can not because I do not know php language)
The question is whether it succeeds. Prestashop has, I think, a built-in WYSIWYG, so while importing prestashop will change text to HTML, but what if it's already in HTML format?

A good idea??

Link to comment
Share on other sites

  • 4 months later...
  • 2 months later...

I tried to use html code when importing with PS 1.4.4.0. And it looks like the <br> code is supported!!!

That is great news. What more html codes are allowed?

 

So far i tried :

<br>

<b></b>

 

anybody can add to this list?

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...