Zen Cart V1.5.5 Add Extra Text at Category Footer

  1. Modify mysql database, add a field called ‘categories_footer’ at the table of ‘categories_description’, same field names and description of the field called ‘categories_description’.
  2. Add the function at admin panel, to create or modify a category, we need to modify categories.php which is under the admin fold. Within this file we need to add an extra field so that we can fill in the extra text of footer. Take care there are several places need to modify or add.
  3. We need to create a function called “zen_get_category_footer()”, same as  the function of “zen_get_category_description()”, add it within the file called general.php, which is under “admin/includes/functions/”.
  4. We also need to add the new extra block name with categories.php, say “define(‘TEXT_CATEGORIES_FOOTER’, ‘Categories Footer Description:’);”, just let this line under “define(‘TEXT_CATEGORIES_DESCRIPTION’, ‘Categories Description:’);”, which will be added within the file called  categories.php which is under “admin/includes/languages/english/”.
  5.  Now let’s share how to let the  extra text at footer display at front page of a category. We need to modify 2 files. Let modify the first file which is called “tpl_index_product_list.php”, just under “includes/templates/responsive_classic/templates/”. Add the following code just above the last </div> at the end of the file:
    <?php
    // categories_description
    if ($current_categories_footer != ”) {
    ?>
    <div id=”indexProductListCatDescription” class=”content”><?php echo $current_categories_footer;  ?></div>
    <?php } // categories_description ?>
    </div>
  6. Modify the last file called “main_template_vars.php”, which is under “includes/modules/pages/index/”. Modify $sql, and add the new field, so that we can  use “$current_categories_footer” at “tpl_index_product_list.php”.