Listing all categories automatically in Zen Cart

Using this free module for Zen Cart (Categories Center Box), I wanted to be able to automatically pick up every category I have without having to type in every single one. So, here is a very simple solution for this – I present to you, automatically load up every category you have. To incorporate, you have to modify the following file: /includes/modules/category_center_box.php. After “$top_array = array();”, you can add the following mod:

if(array_values($allowed_categories[0]) == "") {
 foreach($categories_array as $category_array) {
   array_push($allowed_categories, $category_array['id']);

 And that’s it! On your front-end, simply leave the “Categories CenterBox List” as blank, and you should be good to go.

Leave a Reply

Your email address will not be published. Required fields are marked *

* Copy This Password *

* Type Or Paste Password Here *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>