You are here:  » Where is the HTML tags?

Support Forum



Where is the HTML tags?

Submitted by zynemart on Thu, 2007-01-18 04:30 in

Dear David:

I bought the script today. It's really easy to use, and works great. Thanks for your great works!

But I got a little problem:

The product description part in my datafeed is HTML format. After I imported it to Price Tapestry, all the HTML tags in the description are gone. The product description is plain text now, which is not very easy to read as before.

Is there a way to keep the original html effect?

Thanks!

Submitted by support on Thu, 2007-01-18 06:32

Hi,

Firstly, the tags are removed for 2 reasons. In some cases, erroneous tags can break the formatting of your site; but secondly because the description as shown on the search results page is cropped; if there were HTML within the description then it may be broken by this cropping and again break the formatting of the page.

It's easy to remove the tag stripping. In includes/admin.php, you will find the following code on line 161-163:

$record[$admin_importFeed["field_description"]] = strip_tags($record[$admin_importFeed["field_description"]]);
$record[$admin_importFeed["field_description"]] = tapestry_normalise($record[$admin_importFeed["field_description"]],",'\'\.%!");

Simply delete or comment out these lines to allow the description field to be imported into the database without any changes.

If you subsequently find any problems regarding the cropping of the description field mid-HTML; you can remove the crop so that the entire description is displayed. In html/searchresults.php you will find the following code on line 20:

<p><?php print substr($product["description"],0,250); ?></p>

Simply change this as follows:

<p><?php print $product["description"]; ?></p>

Hope this helps!
Cheers,
David.