Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / HTML in product_listing.php v1.5x

HTML in product_listing.php v1.5x

Views: 1,687

Results 1 to 11 of 11
15 Mar 2013, 10:05 PM
#1
littlepunk29 avatar

littlepunk29

New Zenner

Join Date:
Nov 2007
Posts:
16
Plugin Contributions:
0

HTML in product_listing.php v1.5x

I have read old threads that tell me to remove the two 'zen_clean_html' instances from just before the description. However, in v1.5, there only seems to be one instance of it, and when I remove it, the entire description disappears.

I am trying to add links to MSDS and Tech Data sheets. I have the tech data sheet as a link in the description, but I would also like to know how to bring in the website URL field as well, because that is where I have put my MSDS links.

Thanks!

15 Mar 2013, 11:19 PM
#2
stevesh avatar

stevesh

Black Belt

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

Re: HTML in product_listing.php v1.5x

There are two instances in includes/modules/product_listing.php in 1.5.1., lines 96 and 187. Those are the ones you want to comment out.

15 Mar 2013, 11:19 PM
#3
kobra avatar

kobra

Black Belt

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

Re: HTML in product_listing.php v1.5x

Why in the product listing page and not in the product info page??

18 Mar 2013, 3:39 PM
#4
littlepunk29 avatar

littlepunk29

New Zenner

Join Date:
Nov 2007
Posts:
16
Plugin Contributions:
0

Re: HTML in product_listing.php v1.5x

Yes, I comment both of those out, and then only the title shows up, and the entire description disappears. Forgive me for leaving this piece of info out.

Why in the product listing? Because my client isn't actually using the shopping cart part of the store, just the storefront, so it would be nice to have links to the MSDS and Tech sheets available without having to click on the product.

18 Mar 2013, 4:19 PM
#5
littlepunk29 avatar

littlepunk29

New Zenner

Join Date:
Nov 2007
Posts:
16
Plugin Contributions:
0

Re: HTML in product_listing.php v1.5x

Also, the second instance of it is in a block of code that was commented out by default.

18 Mar 2013, 4:21 PM
#6
littlepunk29 avatar

littlepunk29

New Zenner

Join Date:
Nov 2007
Posts:
16
Plugin Contributions:
0

Re: HTML in product_listing.php v1.5x

Attachment #12196

This is my file with the areas commented out. It is saved in STORE/includes/modules/TEMPLATE_NAME/product_listing.php

18 Mar 2013, 4:45 PM
#7
littlepunk29 avatar

littlepunk29

New Zenner

Join Date:
Nov 2007
Posts:
16
Plugin Contributions:
0

Re: HTML in product_listing.php v1.5x

Before with red circle denoting link
Attachment 12197

After I comment out the single clean code.
Attachment 12198

18 Mar 2013, 6:25 PM
#8
stevesh avatar

stevesh

Black Belt

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

Re: HTML in product_listing.php v1.5x

Also check Admin - Configuration - Product Listing - Display Product Description. You may need to make it larger.

18 Mar 2013, 8:05 PM
#9
littlepunk29 avatar

littlepunk29

New Zenner

Join Date:
Nov 2007
Posts:
16
Plugin Contributions:
0

Re: HTML in product_listing.php v1.5x

Thanks for the suggestion, but it only disappears when I change the code to try to get the links to show up. The length of the description didn't change, and it is not very long. I did notice that the next product jumped to the right, indicating that cutting out that bit of code left a tag open somewhere in the html. I dunno

18 Mar 2013, 11:10 PM
#10
gjh42 avatar

gjh42

Black Belt

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

Re: HTML in product_listing.php v1.5x

What is your product description length setting for product listing? If it is not longer than any description you have, and you enable HTML, you will probably get a cut-off tag and some error. This error may or may not cause significant problems... but eliminate that cause first.

19 Mar 2013, 4:47 PM
#11
littlepunk29 avatar

littlepunk29

New Zenner

Join Date:
Nov 2007
Posts:
16
Plugin Contributions:
0

Re: HTML in product_listing.php v1.5x

Well thanks for arguing back with my stubborn self, I made the description length longer, and it worked. I forgot to consider all of the html tags that would be brought in.

I also would like it if the URL field could be in the description area, and am not sure how to make this happen. Each product I have will have an MSDS, so I am using the URL field for that, and if it requires a tech sheet, then I am inline coding that into the description. So if I could display the URL in the description that would be awesome!