to display the first page of new products on the homepage
/modules/Whats_New/module.php
replace
Code:
if ($WhatsNew == "Y"){
if ($config["Whats_New"]["cheat"]) $products=array();
include $xcart_dir."/products.php";
$config["Whats_New"]["products"] = $total_items;
$smarty->clear_assign("f_products");
$smarty->assign("navigation_script", "home.php?WhatsNew=Y");
$smarty->clear_assign("sort_fields");
$smarty->clear_assign("products_sort_url");
$current_category["category_location"][] = array(func_get_langvar_by_name("lbl_wnmod_title"), "home.php?WhatsNew=Y");
}
with
Code:
if ($WhatsNew == "Y"){
if ($config["Whats_New"]["cheat"]) $products=array();
include $xcart_dir."/products.php";
$config["Whats_New"]["products"] = $total_items;
$smarty->clear_assign("f_products");
$smarty->assign("navigation_script", "home.php?WhatsNew=Y");
$smarty->clear_assign("sort_fields");
$smarty->clear_assign("products_sort_url");
$current_category["category_location"][] = array(func_get_langvar_by_name("lbl_wnmod_title"), "home.php?WhatsNew=Y");
} elseif ($cat==0){
if ($config["Whats_New"]["cheat"]) $products=array();
include $xcart_dir."/products.php";
$config["Whats_New"]["products"] = $total_items;
$current_category["category_location"][] = array(func_get_langvar_by_name("lbl_wnmod_title"), "home.php?WhatsNew=Y");
}
and add into your
skin1/customer/main/welcome.tpl
Code:
{capture name=dialog}
{include file="customer/main/products.tpl"}
{/capture}
{include file="customer/dialog.tpl" title=$lng.lbl_products content=`$smarty.capture.dialog` products_sort_url="home.php?cat=`$cat`&"}
For a certain category check this post
http://forum.x-cart.com/showpost.php?p=266341&postcount=50