Guest Rick@GDLA Posted May 15, 2012 Share Posted May 15, 2012 CubeCart 5.0.9 Why cannot I not do an advanced search and filter by manufacturer without having to type in a keyword? I wrote a hack to catalogue.class.php to add this rather obvious functionality classes/catalogue.class.php add at Line 1095 //hack else{ $whereString = (isset($where) && is_array($where)) ? implode(' AND ', $where) : ''; if (!empty($whereString)) $whereString = ' AND '.$whereString; $query=sprintf("SELECT I.* FROM %1\$sCubeCart_inventory AS I WHERE I.status = 1 %2\$s ",$GLOBALS['config']->get('config', 'dbprefix') , $whereString); $search = $GLOBALS['db']->query($query); if ( $search !== false) { $q2=sprintf($query.' '.$limit,$GLOBALS['config']->get('config', 'dbprefix') , $whereString); $count = $GLOBALS['db']->query($q2, false, 0); $this->_category_count = (int)count($count); $this->_category_products = $search; return true; } } // end hack Quote Link to comment Share on other sites More sharing options...
Dirty Butter Posted May 15, 2012 Share Posted May 15, 2012 This looks interesting! There is a place for sharing Hacks and Tweaks on the 3rd party forum. More people may see this if you share it there as well. Quote Link to comment Share on other sites More sharing options...
Toucan Web Design Posted May 16, 2012 Share Posted May 16, 2012 Funny thing is, there originally was some code to handle things like that (it needed a little adapting to handle the manufacturers still mind), but they commented it out in a later version with a note that said something like // Can't see why this would ever be needed I found that a little bizarre when I had to re-fix a manufacturer search mod I'd done for a friend Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.