【问题标题】:Move Product Description php - Probs移动产品描述 php - Probs
【发布时间】:2012-11-25 17:16:36
【问题描述】:

非常感谢任何帮助。我一直在尝试将产品描述移至 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>';

【问题讨论】:

    标签: php zen-cart


    【解决方案1】:

    无需更改任何代码。 相反,只需在管理->配置->产品列表中更改所需的排序顺序。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-07-18
      • 2019-07-29
      • 1970-01-01
      • 2018-07-27
      • 1970-01-01
      相关资源
      最近更新 更多