Created
June 25, 2012 22:46
-
-
Save DevJohnC/2991930 to your computer and use it in GitHub Desktop.
Filtering specials
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| // in functions.php? | |
| Hooks::addFilter('specials_filter', 'filterTheSpecials'); | |
| function filterTheSpecials($filter) | |
| { | |
| // limit to physical products only | |
| $filter->limitTo('PhysicalProduct'); | |
| // or limit to the Computer category | |
| $filter->limitTo('Category', 'Computer'); | |
| return $filter; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment