showing the category in the featured product/search result
i was looking a long time for a possibility to show the category of a product on the featured product page or in the search results. while there are some solutions around, they are all for older versions of x-cart. this mod works with 4.0.11 and is multilanguage-capable:
add the following code to '/include/func.php': Code:
### START pwx addition, 050211 then add the following code to 'featured_products.php' after the following line (probably line 69): Code:
$smarty->clear_assign("products"); add the same code to the file '/include/search.php' before the $products variable is assigned to $smarty. then you can modify your template file '/customer/main/products_t.tpl'. add the variable at the place where you would like to show the category of the current product. it must be in the correct {section} tag: Code:
{section name=product loop=$products} hope this helps... regards, lukas. |
Thanks for posting. I added code as suggested. Everything worked as stated with one exception.
Quote:
Quote:
Code:
if (!empty($active_modules["Special_Offers"]) && empty($search_data["products"]["show_special_prices"])) { |
All times are GMT -8. The time now is 03:06 PM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.