X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   Product Details (https://forum.x-cart.com/showthread.php?t=2304)

jgkiefer 04-15-2003 11:27 AM

Product Details
 
Can I use HTML in the detailed description? I would like to use a 2 column table to display lists however when I try to add the html in the detailed product field it dosen't display correctly. The table is to far down and has unknown spaces.

funkydunk 04-15-2003 01:37 PM

To do this, you would need to edit the php code that inserts the product description into the database. Probably product_modify.php is the file to change.

jgkiefer 04-16-2003 05:37 AM

In product_modify.tpl I forund the code snippet:
Code:

  <td valign="top" class=ProductDetails>
    <textarea name="fulldescr" cols="45" rows="10">
{ $product.fulldescr|replace:"
":"\n"|escape:"html"}</textarea>
  </td>


I want to use html in both the short and long description. Can I safely remove
Code:

|escape:"html"

So I am left with:
Code:

<td valign="top" class=ProductDetails>
    <textarea name="fulldescr" cols="45" rows="10">
{ $product.fulldescr|replace:"
":"\n"}</textarea>
  </td>

This seems like the solution for allowing html and having the break tag replaced with a space. I just need some assurance that this is correct as I am not sure what all is dependent on this code.

jgkiefer 04-16-2003 06:03 AM

Well it was a good try, but that dosen't seem to work. Any ideas?

jgkiefer 04-16-2003 07:46 AM

I have isolated the problem to be the br tag. If I put the html all on one line all is well, but using standard html from my html editor xcart puts a br tag at the beginning of every line. I want to be able to copy and paste the html from my editor into the full description area. How do I set this up?

Azkar 06-07-2003 09:25 AM

well ... I am having the same problem ...

say, I insert a table into the descriptions. The output has some funny white spaces as jgkiefer reported. If I had three cols in the table, only one col shows with original cols listed as in rows. Something is not right here .. please help....

jgkiefer 06-07-2003 09:32 PM

I found the way around this problem. It is not the prettiest hack but it works. Just make sure your html is on one line and everything will be fine. This can be time consuming but you will get the hang of it. :wink:
I wish they would fix this but I am not expecting it anytime soon.

Azkar 06-07-2003 10:47 PM

works for me .. thanks for your help .. ... but yeah .. they should fix it ....

moshguy 11-21-2003 06:43 AM

Same Problem
 
Yeah, I just wanted to say that I'm in the same boat. I'm not using tables but I'm trying to space things out using
in the detailed description. Xcart wants nothing to do with the
. It turns the
into a new line. So I can only edit the detailed description once and if I change anything, I have to add in all the
's again or it looks like crap. This needs to be fixed with the next version.

moshguy 11-21-2003 07:19 AM

Might have an answer
 
I got mad and decided to get down and dirty with PHP. Here's the way to just insert HTML into the detailed description field.

Open include/product_modify.php

Look for some code that looks like this.

Code:

if ($fulldescr == strip_tags($fulldescr))
$fulldescr = str_replace("\n", "
", $fulldescr);


change it to this

Code:

$fulldescr = str_replace("\n", "
", $fulldescr);


Now it interprets your HTML code literally. With the exception of the \n character it turns it into a
. If you want it to leave \n alone. Erase the code completely instead of changing it.

-Jeremy


All times are GMT -8. The time now is 06:56 PM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.