任何帮助深表感谢。我一直试图将产品描述移至 zencart 中的价格以下,但描述无法显示。问题是我哪里错了。感谢您寻找乔恩
我移动的行是:
<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>
原始代码是:
如果(isset($_GET['manufacturers_id'])){ $lc_text = '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'] . '' . zen_trunc_string(zen_clean_html(stripslashes(zen_get_products_description($listing->fields['products_id'], $_SESSION['languages_id']))), PRODUCT_LIST_DESCRIPTION ) . '' ; } 别的 { $lc_text = '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'] . '' . zen_trunc_string(zen_clean_html(stripslashes(zen_get_products_description($listing->fields['products_id'], $_SESSION['languages_id']))), PRODUCT_LIST_DESCRIPTION ) . ''; } 休息; 案例“PRODUCT_LIST_MANUFACTURER”: $lc_align = ''; $lc_text = 'fields['manufacturers_id']) 。'">' . $listing->fields['manufacturers_name'] . ''; 休息; 案例“PRODUCT_LIST_PRICE”: $lc_price = zen_get_products_display_price($listing->fields['products_id']) 。'
'; $lc_align = '对'; $lc_text = $lc_price;
我尝试过的代码(页面/价格显示,但不是产品描述):
if (isset($_GET['manufacturers_id'])) {
$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>' ;
} else {
$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>';
}
break;
case 'PRODUCT_LIST_MANUFACTURER':
$lc_align = '';
$lc_text = '<a href="' . zen_href_link(FILENAME_DEFAULT, 'manufacturers_id=' . $listing->fields['manufacturers_id']) . '">' . $listing->fields['manufacturers_name'] . '</a>';
break;
case 'PRODUCT_LIST_PRICE':
$lc_price = zen_get_products_display_price($listing->fields['products_id']) . '';
$lc_align = 'right';
$lc_text = "<div style='font-size: 22px;'>".$lc_price. "</div>";
break;
case 'PRODUCT_LIST_DESCRIPTION':
$lc_align = '';
$lc_text = '<div class="listingDescription">' . zen_trunc_string(zen_clean_html(stripslashes(zen_get_products_description($listing->fields['products_id'], $_SESSION['languages_id']))), PRODUCT_LIST_DESCRIPTION) . '<br></div>';