![]() |
How to Show All Categories on Home Page?
My client has a very small store (11 items currently) with 4 main categories. He would like to show all items in their respective categories on the home page - not just having links to the categories on the left menu.
I could do this by adding them all to the Featured Products list, but that defeats the purpose of featured products and it doesn't display their associated categories. What I would like to do is find some way to display the orange dialog box (that typically surrounds the products in a category) for each category and listing their products inside. Example: Orange Box with Category#1 as title Contents displays 3 items Orange Box with Category#2 as title Contents displays 2 items Orange Box with Category#3 as title Contents displays 3 items You get the picture. Has anyone been able to do anything like this? Any help would be appreciated! |
Okay, here goes...
First create a new php script called cat1.php Code:
<?phpThen copy this and amend the last assign statement for each category so create a copy called cat2.php and change the last bit to prodcat2 etc... Then add the following into home.php for each of the scripts/categories. Code:
require "./cat1.php"; Then in home_main.tpl replace: Code:
{elseif $main eq "catalog" and $current_category.category eq ""}with Code:
{elseif $main eq "catalog" and $current_category.category eq ""}keep adding the prodcat's until all your categories are included. Then in welcome.tpl replace: Code:
{include file="customer/main/featured.tpl" f_products=$f_products}Code:
{include file="customer/main/products.tpl" products=$prodcat1}This should do it but will probably require some tweaking. :D |
Thanks...
Thanks, that looks like it should help :-)
|
| All times are GMT -8. The time now is 09:41 PM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.