Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

Display All Subcat Products in Parent Cat

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #11  
Old 02-21-2009, 10:24 AM
 
ChristineP ChristineP is offline
 

eXpert
  
Join Date: Jul 2008
Posts: 310
 

Default Re: Display All Subcat Products in Parent Cat

I tried the first portion you have for our cart. I want to have the root category in my flyout menu showing, and to eliminate the page that goes with that root category that has the list of sub category names and number of products in each category. This may be an issue for our flyout mod as we don't want the root category to return a page, but only the sub-category and sub-sub category as clickable that returns a page.

Do you have any suggestions?



Quote:
Originally Posted by shorelineoftahoe
Actually, it's really easy.

in products.php modify this line:
$search_data["products"]["search_in_subcategories"] = "";

to

$search_data["products"]["search_in_subcategories"] = "Y";

If you want to show all products in all subcategories on the home page you need to modify these lines in home.php:

if (!empty($cat))
include "./products.php";

to

#if (!empty($cat))
include "./products.php";

That's all. I haven't tested this too much so I don't know about unforeseen consequences. I'll refer back if there is a problem.
__________________
______________
version 4.1.9 Gold
Reply With Quote
  #12  
Old 04-11-2009, 09:30 AM
 
rshandel rshandel is offline
 

Senior Member
  
Join Date: Feb 2009
Posts: 125
 

Default Re: Display All Subcat Products in Parent Cat

I tried shorelineaftahoe's suggestion but I can't to seem to get it to work. My page just shows the subcats listed, but not the subcat products listed underneath them.

Any suggestions?
__________________
x-cart 4.1.12
x-cart 4.2
Reply With Quote
  #13  
Old 04-26-2009, 05:50 AM
  AusNetIT's Avatar 
AusNetIT AusNetIT is offline
 

Senior Member
  
Join Date: Apr 2009
Posts: 152
 

Default Re: Display All Subcat Products in Parent Cat

HI,

I try to put product into home but no luck?

home.php

#
# $Id: home.php,v 1.10.2.3 2008/04/11 18:09:11 osipov Exp $
#
define('OFFERS_DONT_SHOW_NEW',1);
require "./auth.php";
require $xcart_dir."/include/categories.php";
if ($active_modules["Manufacturers"])
include $xcart_dir."/modules/Manufacturers/customer_manufacturers.php";
#if (!empty($cat))
include "./products.php";

if (empty($products))
include "./featured_products.php";
if ($active_modules["Bestsellers"])
include $xcart_dir."/modules/Bestsellers/bestsellers.php";

if (!empty($current_category) and is_array($current_category["category_location"])) {
foreach ($current_category["category_location"] as $k => $v)
$location[] = $v;
}
if (!empty($active_modules["Special_Offers"])) {
include $xcart_dir."/modules/Special_Offers/category_offers.php";
}
# Deleting the previously saved user information received from PayPal (Is performed when the user exits the checkout process)
if (x_session_is_registered("paypal_token") || x_session_is_registered("paypal_express_details")) {
x_session_unregister('paypal_token');
x_session_unregister("paypal_express_details");
}
#
# Assign Smarty variables and show template
#
$smarty->assign("main","catalog");
# Assign the current location line
$smarty->assign("location", $location);
func_display("customer/home.tpl",$smarty);
?>
__________________
Melbourne website design | SEO in Melbourne

Installed Ver 4.6.0
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 02:13 PM.

   

 
X-Cart forums © 2001-2020