Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / Can I enable product html in listing pages?

Can I enable product html in listing pages?

Views: 913

Results 1 to 6 of 6
28 Jun 2013, 10:32 AM
#1
rayo avatar

rayo

New Zenner

Join Date:
Jun 2013
Location:
Sydney
Posts:
25
Plugin Contributions:
0

Can I enable product html in listing pages?

This is discussed in some length in this topic -

http://www.zen-cart.com/showthread.php?61925-listingDescription-amp-column_layout_grid

but this refers to 1.3.8 and from what I can see the product_listing.php code has changed because there is now only one instance of zen_clean_html in the file not two as is stated.

I cannot get this to work and it just shows the text straight after it


http://veganmealsdelivered.com.au/demo/index.php?main_page=index&cPath=63

Any ideas what I am missing?

28 Jun 2013, 10:58 AM
#2
stevesh avatar

stevesh

Black Belt

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

Re: Can I enable product html in listing pages?

My stock copy of that file (v. 1.5.1) has two instances of zen_clean_html, on lines 96 and 185.

28 Jun 2013, 11:47 AM
#3
rayo avatar

rayo

New Zenner

Join Date:
Jun 2013
Location:
Sydney
Posts:
25
Plugin Contributions:
0

Re: Can I enable product html in listing pages?

I see the 2nd on line 185 but that is commented out already. The original post had this and you can see where zen_clean_html is commented out twice -

       case 'PRODUCT_LIST_NAME':
        $lc_align = '';
        if (isset($_GET['manufacturers_id'])) {
          $lc_text = '<h3 class="itemTitle"><a href="' . zen_href_link(zen_get_info_page($listing->fields['products_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>' ;
        } else {
          $lc_text = '<h3 class="itemTitle"><a href="' . zen_href_link(zen_get_info_page($listing->fields['products_id']), ($_GET['cPath'] > 0 ? 'cPath=' . $_GET['cPath'] . '&' : '') . '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>';
        }
        break;  
28 Jun 2013, 11:59 AM
#4
stevesh avatar

stevesh

Black Belt

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

Re: Can I enable product html in listing pages?

You're right. I commented out the first instance then added a bold tag to part of the top product's description here: http://www.stevesh.com/demo/index.php?main_page=index&cPath=1_4 and it seemed to work.

It's not clear from your post exactly what you're expecting. You've added <span> tags with their own ids, but haven't given those ids any styling in the stylesheet.

28 Jun 2013, 12:53 PM
#5
rayo avatar

rayo

New Zenner

Join Date:
Jun 2013
Location:
Sydney
Posts:
25
Plugin Contributions:
0

Re: Can I enable product html in listing pages?

I'm trying to move blocks of text under the picture ie
[pic]
Ingredient.etc etc etc a
Nutrition etc etc

The 2nd post here
http://www.zen-cart.com/showthread.php?74016-Customizing-Product-Description-Text-Formatting-on-Category-Page

better explains what I am trying to and I should have added that in the first post. Once I can move the text I will think about the formatting.

5 Jul 2013, 9:09 AM
#6
rayo avatar

rayo

New Zenner

Join Date:
Jun 2013
Location:
Sydney
Posts:
25
Plugin Contributions:
0

Re: Can I enable product html in listing pages?

I sorted this. Thanks to 'stevesh' I checked whether html code was active and it was so I was barking up the wrong tree. Turns out I hadn't edited the stylesheet properly.