Jump to content

Decoding problem with html entities


pedluis

Recommended Posts

Hi guys , i'm having problem with import some products, specifically inside the product description there are HTML entity like this one

<!-- full description -->
<div id="idTab1" class="rte">
- Borsa in pelle saffiano&lt;br /&gt;- Dettagli dorati&lt;br /&gt;- Tracolla regolabile con catena&lt;br /&gt;- Dimensioni: 16x20x5 cm
</div>

and this is generated by the product.tpl with this

<!-- full description -->
<div id="idTab1" class="rte">{$product->description}</div>

There is any solution to get the html instead these entities?

Link to comment
Share on other sites

1) From what I can see, you are not importing html entities, but already predefined classes... (ID-TAB, rte). Pre-defined classes code you cannot import at all.

 

2) For HTML-entities: HTML-entities you cannot import as per default Prestashop native import. You should consider to strip html-entities entirely from the source, by adding only text, or to use another import tool. I use Presta Store Manger, but also there you cannot strip all html entities, why the first way I told you is better (strip them from the text)

 

Afterwards, so after you imported your text you can format it with Prestashop tinyMCE editor.

Edited by selectshop.at (see edit history)
Link to comment
Share on other sites

I don't know what do you mean, maybe i was not be clear. I my db the description of my product look in this way 

 

- Sandalo in camoscio con listino a T&lt;br /&gt;- Listino regolabile&lt;br /&gt;- Tacco in plexi sfumato trasparente 9 cm&lt;br /&gt;- Fondo cuoio

 

So characters like & i new to transform in html.. what do you think will be the solution?

Link to comment
Share on other sites

You are trying to import classes:

 

 

<!-- full description -->
<div id="idTab1" class="rte">

</div>

<!-- full description -->
<div id="idTab1" class="rte">{$product->description}</div>

 

 

For to strip the incorrect charset (this is what you mean with " &lt;br /&gt;" you should verify the method you are trying to import your csv-file. You should save your file as UTF-8 encoding and import it by the same encoding. Your database should be also encoded correctly by using correct charset and collation - for this please ask your provider, perhaps database is not correct configured.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...