I just finished getting the php include concept to work on all the various pages (featured, specials, new products etc.)
The basic idea is to eval() the product description first into a variable (using output buffering), and then perform whatever string cleaning and truncation is normally done on the results of that eval(). It's basically the same mod in each spot, just sometimes the code or variables are a bit different.
I'm not going to detail each mod, because this was a bunch of work and I'm not sure anyone really wants to go through this, it will be extremely helpful for me, but maybe not for anyone else to work in this fashion. But here's the basic idea:
includes/templates/CUSTOM/common/tpl_tabular_display.php
replace:
$list_box_contents[$rows]['description'] = zen_trunc_string(zen_clean_html(stripslashes(zen_get_products_description($listing->fields['products_id'], $_SESSION['languages_id']))), PRODUCT_LIST_DESCRIPTION);
...with:
ob_start();
eval(stripslashes('?>'.zen_get_products_description($listing->fields['products_id'], $_SESSION['languages_id'])));
$contents = ob_get_contents();
ob_end_clean();
$list_box_contents[$rows]['description'] = zen_trunc_string(zen_clean_html($contents), PRODUCT_LIST_DESCRIPTION);
includes/templates/CUSTOM/templates/tpl_modules_products_all_listing.php
replace:
$disp_text = zen_get_products_description($products_all->fields['products_id']);
$disp_text = zen_clean_html($disp_text);
$display_products_description = stripslashes(zen_trunc_string($disp_text, PRODUCT_ALL_LIST_DESCRIPTION, '<a href="' . zen_href_link(zen_get_info_page($products_all->fields['products_id']), 'cPath=' . zen_get_generated_category_path_rev($products_all->fields['master_categories_id']) . '&products_id=' . $products_all->fields['products_id']) . '"> ' . MORE_INFO_TEXT . '</a>'));
...with:
$disp_text = zen_get_products_description($products_all->fields['products_id']);
ob_start();
eval(stripslashes('?>'.$disp_text));
$contents = ob_get_contents();
ob_end_clean();
$contents = zen_clean_html($contents);
$display_products_description = zen_trunc_string($contents, PRODUCT_ALL_LIST_DESCRIPTION, '<a href="' . zen_href_link(zen_get_info_page($products_all->fields['products_id']), 'cPath=' . zen_get_generated_category_path_rev($products_all->fields['master_categories_id']) . '&products_id=' . $products_all->fields['products_id']) . '"> ' . MORE_INFO_TEXT . '</a>');
includes/templates/CUSTOM/templates/tpl_modules_products_featured_listing.php
includes/templates/CUSTOM/templates/tpl_modules_products_new_listing.php
includes/templates/CUSTOM/templates/tpl_specials_default.php
...these are all virtually identical to the one above for products_all_listing.
One caveat: I'm already using a custom theme that has some modifications, so I cannot guarantee that this will match 100%. But the concept behind it is clear, for anyone who understands a bit of php.
Hope that helps anyone who wants to have the freedom of having every single product description reside on the server as a separate HTML file. :wink: