2012-12-07 120 views
1

任何幫助,非常感謝。我一直試圖將產品說明移到zencart中的價格以下,但說明未能顯示。問題是狄更斯會出錯的地方。感謝您尋找喬恩移動產品描述php - Probs


我提出的路線是:

<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> 


原始代碼是:

 

    if (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) . '' ; 
     } else { 
      $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) . ''; 
     } 
     break; 
     case 'PRODUCT_LIST_MANUFACTURER': 
     $lc_align = ''; 
     $lc_text = 'fields['manufacturers_id']) . '">' . $listing->fields['manufacturers_name'] . ''; 
     break; 
     case 'PRODUCT_LIST_PRICE': 
     $lc_price = zen_get_products_display_price($listing->fields['products_id']) . '
'; $lc_align = 'right'; $lc_text = $lc_price;

我曾嘗試代碼(頁面/價格顯示,但不是產品描述ription):

 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>'; 

回答

0

無需更改任何代碼。 而是隻需在管理 - >配置 - >產品列表中更改所需的排序順序。