Skip to content

Commit

Permalink
fixed broken configuration for displaying the first category by defau…
Browse files Browse the repository at this point in the history
…lt in the storefront
  • Loading branch information
illiphilli committed Jul 25, 2011
1 parent 33ad300 commit b7357ca
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions framework/modules/ecommerce/controllers/storeController.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@ class storeController extends expController {
'showFullTree'=>'Categories - Show Full Tree',
'showallSubcategories'=>'Categories - Subcategories of current category',
'upcoming_events'=>'Event Registration - Upcomming Events',
'events_calendar'=>'Event Registration - Calendar View',
'events_calendar'=>'Event Registration - Calendar View',
'ecom_search'=>'Search - Autocomplete',
'search_by_model_form'=>'Search - By Model',
'quicklinks'=>'Links - Users Links',
'showall_category_featured_products' => 'Show Featured Products under the current category'
'showall_category_featured_products' => 'Show Featured Products under the current category'
);

// hide the configs we don't need
Expand Down Expand Up @@ -98,7 +98,11 @@ function __construct($src=null,$params=array()) {
expSession::set('catid',$default_id);
}
} elseif (isset($this->config['show_first_category']) || (!expTheme::inAction() && $section==SITE_DEFAULT_SECTION)) {
$default_id = $db->selectValue('storeCategories', 'id', 'lft=1');
if (!empty($this->config['show_first_category'])) {
$default_id = $db->selectValue('storeCategories', 'id', 'lft=1');
} else {
$default_id = 0;
}
expSession::set('catid',$default_id);
} elseif (!isset($this->config['show_first_category']) && !expTheme::inAction()) {
expSession::set('catid',0);
Expand Down

0 comments on commit b7357ca

Please sign in to comment.