Okay, here goes...
First create a new php script called cat1.php
Code:
<?php
// Gets product data for category and stores it into $prodcat1 array
$catshow = 1; // set this to the categoryid of the category to show
$search_query = "($sql_tbl[products].categoryid='$catshow' or $sql_tbl[products].categoryid1='$catshow' or $sql_tbl[products].categoryid2='$catshow' or $sql_tbl[products].categoryid3='$cat'show) and $sql_tbl[products].forsale='Y'";
$products= func_search_products($search_query, $user_account['membership']);
if (count($products) ==0) $products="";
// need to change this for each category script
$smarty->assign("prodcat1",$products);
?>
Then 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 ""}
{include file="customer/main/welcome.tpl" f_products=$f_products}
with
Code:
{elseif $main eq "catalog" and $current_category.category eq ""}
{include file="customer/main/welcome.tpl" prodcat1=prodcat1 prodcat2=prodcat2}
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}
with:
Code:
{include file="customer/main/products.tpl" products=$prodcat1}
Keep repeating this include statement for each category.
This should do it but will probably require some tweaking.
