Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / Changing layout of Product_listing Description

Changing layout of Product_listing Description

Views: 1,436

Results 1 to 3 of 3
11 Jun 2014, 9:37 AM
#1
storeowner avatar

storeowner

New Zenner

Join Date:
Jun 2014
Location:
United States
Posts:
60
Plugin Contributions:
0

Changing layout of Product_listing Description

I want the description on the product_listing page to look the same as on the product_listing page

how would i do this (without the tabs ofc, as shown in image)

this is what my product listing looks like now, I dont care if the title is still in the same spot I just want the description changed

this is what my product info page looks like:

ex: this is what I want my product description to look like:

Thanks zen cart :)

11 Jun 2014, 10:21 AM
#2
balihr avatar

balihr

Totally Zenned

Join Date:
Oct 2008
Location:
Croatia
Posts:
1,770
Plugin Contributions:
20

Re: Changing layout of Product_listing Description

You'll need to edit your includes/modules/product_listing.php (OR if you have an override, includes/modules/YOUR_TEMPLATE/product_listing.php).

Find:

case 'PRODUCT_LIST_NAME':
        $lc_align = '';
        $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>';
        break;

and replace with:

case 'PRODUCT_LIST_NAME':
        $lc_align = '';
        $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_get_products_description($listing->fields['products_id'], $_SESSION['languages_id']) . '</div>';
        break;

This will keep the title using product name. If you want to omit the product's name any ONLY show the description (as in your mockup), you'll be editing the same lines, but will replace it with this:

case 'PRODUCT_LIST_NAME':
        $lc_align = '';
        $lc_text = '<div class="listingDescription">' . zen_get_products_description($listing->fields['products_id'], $_SESSION['languages_id']) . '</div>';
        break;
11 Jun 2014, 5:52 PM
#3
storeowner avatar

storeowner

New Zenner

Join Date:
Jun 2014
Location:
United States
Posts:
60
Plugin Contributions:
0

Re: Changing layout of Product_listing Description

balihr:

You'll need to edit your includes/modules/product_listing.php (OR if you have an override, includes/modules/YOUR_TEMPLATE/product_listing.php).

Find:

case 'PRODUCT_LIST_NAME':
$lc_align = '';
$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>';
break;

> and replace with:
> ```
case 'PRODUCT_LIST_NAME':
        $lc_align = '';
        $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_get_products_description($listing->fields['products_id'], $_SESSION['languages_id']) . '</div>';
        break;

This will keep the title using product name. If you want to omit the product's name any ONLY show the description (as in your mockup), you'll be editing the same lines, but will replace it with this:

case 'PRODUCT_LIST_NAME':
$lc_align = '';
$lc_text = '<div class="listingDescription">' . zen_get_products_description($listing->fields['products_id'], $_SESSION['languages_id']) . '</div>';
break;


Thanks looks great <3