| | |

Zen Cart – Audio player button broken; bare HTML code displayed instead

Problem: Embedded audio player’s bare HTML code gets displayed in the Product description on the Home page under Featured Products, as well as on the Store page. However, the product description displays the audio button correctly on the Product “info” page.

Using Zen Cart: v1.3.9h; Theme: Music Store #25001 from TemplateMonster (http://www.templatemonster.com/zencart-templates/25001.html)

Diagnosis: Truncated version of the product description strips out the HTML, which causes the embedded audio player code to be displayed instead of the actual player button.

Solution:

1. Edit: root/includes/modules/theme245/featured_products.php

Lines 89 & 90: comment out “strip_tags,” like so /* strip_tags */

2. Edit: root/includes/templates/theme245/templates/tpl_modules_products_all_listing.php

Lines 133-136

Change:
if (PRODUCT_ALL_LIST_DESCRIPTION != ‘0’) {
$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, ‘<br /><div align=”right”><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></div>’));

To:
if (PRODUCT_ALL_LIST_DESCRIPTION != ‘0’) {
$disp_text = zen_get_products_description($products_all->fields[‘products_id’]);

$display_products_description = stripslashes($disp_text, PRODUCT_ALL_LIST_DESCRIPTION, ‘<br /><div align=”right”><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></div>’);

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *