Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / HTML not working in product listing description

HTML not working in product listing description

Views: 3,070

Results 1 to 17 of 17
17 Nov 2012, 1:12 AM
#1
nealt900 avatar

nealt900

New Zenner

Join Date:
Sep 2012
Posts:
10
Plugin Contributions:
0

HTML not working in product listing description

Ok, So I've been crawling the forum for the past few hours about zen_clean_html and am still having issues with getting an html table to work properly in the description.

here is the code from my inlcludes/modules/theme/product_listing.php:

$lc_text = '<h3 class="itemTitle"><a href="' . zen_href_link(zen_get_info_page($listing->fields['products_id']), 'cPath=' . (($_GET['manufacturers_id'] > 0 and $_GET['filter_id'] > 0) ?  zen_get_generated_category_path_rev($_GET['filter_id']) : ($_GET['cPath'] > 0 ? zen_get_generated_category_path_rev($_GET['cPath']) : zen_get_generated_category_path_rev($listing->fields['master_categories_id']))) . '&products_id=' . $listing->fields['products_id']) . '">' . $listing->fields['products_name'] . '</a></h3><div class="listingDescription">' . zen_trunc_string(/*zen_clean_html*/(stripslashes(zen_get_products_description($listing->fields['products_id'], $_SESSION['languages_id']))), PRODUCT_LIST_DESCRIPTION) . '</div>';

the only other time "zen_clean_html" is used is in a section commented out near the bottom at line 186 with a comment "add description and match alternating colors".

Below are screen shots of what I'm seeing.

What the product looks like in the category list:
Attachment 11462
What the product looks like on the product page:
Attachment 11463
What the table looks like(and should look like) in the product preview on the admin page:
Attachment 11464

17 Nov 2012, 1:17 AM
#2
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: HTML not working in product listing description

So can you elaborate on what the issue is??

Product listing appears to have the table as does the product info page???

Zen-Venom Get Bitten

17 Nov 2012, 1:25 AM
#3
nealt900 avatar

nealt900

New Zenner

Join Date:
Sep 2012
Posts:
10
Plugin Contributions:
0

Re: HTML not working in product listing description

The html is not showing up correctly on the product page. It has a boarder for the left side of the table, but not the right (this is the case whether I comment out zen_clean_html or not). Also, the table displayed in the category list seems to have been stretched vertically.

The html table in the category list is killed completely when I don't comment out zen_clean_html, so I know it's at least partially working.

17 Nov 2012, 10:35 AM
#4
stevesh avatar

stevesh

Black Belt

Join Date:
Feb 2005
Location:
Lansing, Michigan USA
Posts:
19,793
Plugin Contributions:
2

Re: HTML not working in product listing description

A link to the site itself would help.

17 Nov 2012, 3:55 PM
#5
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: HTML not working in product listing description

The zen_clean_html fix is working exactly right - that is not your issue at all. It's impossible to say for sure without seeing the site live, but I expect there is some styling that applies to the product description and overrides default HTML table styling (which, by the way, is but t-ugly and should be customized from default). The preview has no stylesheet rules affecting it and will show the table raw.

17 Nov 2012, 4:00 PM
#6
nealt900 avatar

nealt900

New Zenner

Join Date:
Sep 2012
Posts:
10
Plugin Contributions:
0

Re: HTML not working in product listing description

Ok. That is what I need to hear. The default html table isn't my end result, but I wanted to get to that point so I know nothing else is interfering with the table, then build it from there.

I'd post a live example but the site isn't live yet. I could give you the IP to where the site is, but you would have to make a change in your host file.

17 Nov 2012, 4:08 PM
#7
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: HTML not working in product listing description

A "change in my host file"?? What kind of change, in what file? I'll look at it if I can. I haven't done a lot of styling of HTML tables, but I know some aspects of them can't be affected by CSS but need to be set in the <table> tags.

17 Nov 2012, 4:20 PM
#8
nealt900 avatar

nealt900

New Zenner

Join Date:
Sep 2012
Posts:
10
Plugin Contributions:
0

Re: HTML not working in product listing description

Wow, thanks for your help. I didn't expect anyone to bother with it that much. Ok, there is an old version of this site currently hosted on the live server that will be brought up if you simply type it in your URL. to get to the test server's site, you need to add this line to your host file:

174.121.95.149 bargainbookswholesale.com www.bargainbookswholesale.com

then close your browser and reopen it and go to www.bargainbookswholesale.com. That will bring you to the site I am working on.

Here is a link to a category page to show what the tables are looking like there: http://www.bargainbookswholesale.com/store/index.php?main_page=index&cPath=48

Here is a link showing a product page: http://www.bargainbookswholesale.com/store/index.php?main_page=product_info&cPath=48&products_id=13372

17 Nov 2012, 4:26 PM
#10
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: HTML not working in product listing description

I don't know what "host file" you are talking about. Where would I find it, and what would it be called?

OK, looking at it...

17 Nov 2012, 4:31 PM
#11
nealt900 avatar

nealt900

New Zenner

Join Date:
Sep 2012
Posts:
10
Plugin Contributions:
0

Re: HTML not working in product listing description

It's a file in your OS folder that overrides the DNS for a website. When I type in https://www.zen-cart.com, my browser finds the site based on the name-server that directs it there. If I made an entry in my host file like the one I posted above, it would tell my browser to instead use the IP address in the host file to find the site, which is how I typically work on websites that are not yet ready for the public.

17 Nov 2012, 5:25 PM
#12
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: HTML not working in product listing description

Huh... my computer won't let me save the hosts file even though I am the administrator. I can't find any place to affect that, and Help is no help at all. A search for secpol.msc to look at/change? "Group Policy" is showing nothing so far, on my entire C drive...

17 Nov 2012, 5:33 PM
#13
nealt900 avatar

nealt900

New Zenner

Join Date:
Sep 2012
Posts:
10
Plugin Contributions:
0

Re: HTML not working in product listing description

Oh, you will probably need to open notepad as administrator (meaning right click on then select "run as administrator") then open the host file from inside notepad. I remember having trouble saving it when trying to open it by it self.

17 Nov 2012, 5:51 PM
#14
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: HTML not working in product listing description

"Run as administrator" worked (after I changed the file lookup type from .txt to all), but I still can't look at the site, as I get 403 forbidden.

17 Nov 2012, 6:15 PM
#15
nealt900 avatar

nealt900

New Zenner

Join Date:
Sep 2012
Posts:
10
Plugin Contributions:
0

Re: HTML not working in product listing description

at the moment you may have to go to http://www.bargainbookswholesale.com/store and browse from there. Pretty much every product has the description table at the moment.

17 Nov 2012, 7:19 PM
#17
nealt900 avatar

nealt900

New Zenner

Join Date:
Sep 2012
Posts:
10
Plugin Contributions:
0

Re: HTML not working in product listing description

I'll probably be making the site live later today, I'll post an update to this thread when it's live. Thanks again for your help.