Zen Cart custom software development, Zen Cart modules, Zen Cart Expert eCommerce with Zen Cart!

Zen Cart Kitbuilder

Zen Cart Kitbuilder

Kitbuilder for Zen Cart allows you to build "kits" of related products (without attributes), which are all sold together with a single click.

Relevance: Zen Cart™ 1.3.9, 1.5.x You must have JavaScript enabled in your browser.

Current Version: 1.0.1a (version history)

Support Thread: My commercial software is not supported on the Zen Cart forum. Please email me questions instead.

Cost: $60 (Note: this low price covers software only for self-installation.)

Buy Now

Would you like to ask me questions before buying? I'm happy to help likely purchasers make the right decision. Please use my contact form.

Installed Cost: $300.00 (Professional installation by That Software Guy)

Installation Difficulty: Moderate-High

Installation Instructions: click here for installation instructions

Common Installation Issues: click here for installation issues

Buy: Buy Kitbuilder!
Pre-purchase questions? No problem! Just Please contact me with your question.

FAQ: click here for FAQ

Configuration: Configuration of Kitbuilder is done by the built-in admin panel.

Video: You may watch this cross sell being created in Kitbuilder v1.0 Admin panel in this video:

Restrictions: click here for restrictions. Please read this section carefully; if you have questions, please contact me before purchasing.

Add-Ons: A free module called Kitbuilder Centerbox is available to help you show off your kits on the front page of your store.

Incompatibilities: This software will not work with AJAX add-to-cart mods.


Kitbuilder allows you to specify that a product is composed of a set of other products.
In the product edit screen (Admin > Catalog > Categories/Products > Edit), you set the "Is Product Kit" flag to Yes, and then save.

Configure a Product as a Kit(step 1)

Zen Cart Kitbuilder Admin Panel

Once you have done this and saved, on your next edit, you'll see two links. These allow you to view or edit the kit.

Configure a Product as a Kit (step 2)

Zen Cart Kitbuilder Admin Panel

Pressing Edit shows you the screen for kit creation and editing.

Kitbuilder Initial Screen

Zen Cart Kitbuilder Admin Panel

You then add products (using the + sign to add rows) to configure your kit. In case your kit needs more than 1 of a particular item, a count field is provided.
For example, the configuration below shows that product 192 is a kit, comprised of a keyboard, a mouse, and two monitors.

Kitbuilder Kit Creation

Zen Cart Kitbuilder Admin Panel

When you press the Submit button, the kit gets created, and you are put into a mode where you can view the kit. In this case, it looks like this:

Kitbuilder Kit Creation

Zen Cart Kitbuilder Admin Panel
You can see the status and quantity of each product in the kit, and you have a link to edit that product if needed.

On the catalog side, on the product info page for the kit product, the component products of the kit are shown and the kit savings is shown at the bottom of the list. (Note: this behavior is switchable; the flag "Show Kit Components?" determines if the product list is shown.)

A Kit in the Catalog

Zen Cart Kitbuilder

Pressing the Add button on the kit adds the kit to the cart - the customer is not able to modify the kit components.
At the time the order is placed, the contents of the kit are written to a new table called orders_kit_products. In this way, modifying the contents of a kit will not affect prior orders.

Sorting the Kit Components

The list of components on the product info page is randomized by default, but can be sorted by product specific fields, (alphabetically by name, by price low to high, or by price high to low) or by count if desired. The sort setting is configured on Admin > Configuration > Kitbuilder. Here's a kit of action movies sorted by name

Zen Cart Kitbuilder Product Info Page

Processing a Kit Order

The packingslip shows the component products of a kit. All other views of the order show only the kit. Here's an order of the action movie kit shown above.

Zen Cart Kitbuilder order

Installation Instructions:

  1. Back up everything! Try this in a test environment prior to installing it on a live shop.
  2. Copy the contents of this unzipped file to the root directory of your shop. NOTE that these files assume your template name is "custom," so any file with "custom" in its name will need to be renamed if you are using a different template name.
  3. Run the kitbuilder.sql file against your database, using Admin > Tools > Install SQL Patches.
  4. Add the is_kit radio button to the product editing screens, as shown in Adding a Radio Button Field to the Zen Cart Products Table. (Note that step A, adding the field to the products table in the database, was already done in the previous step; you just have to do the file edits.)
  5. Modify the file admin/includes/modules/product/collect_info.php with reference to the "Adding a New Field" step above),
    • For 1.5.6 and above, look for the the second last </div> that closes the is_kit block.
    • For 1.5.5, look for the the </td> that closes the is_kit block.
    Below this, add
    <?php require 'includes/modules/product/kitbuilder.php'; ?>
  6. You will need to simlilarly add two more flags to this file. Here's the code for 1.5.7:
    show_kit_components==1)) . ' ' . TEXT_YES . '  ' . zen_draw_radio_field('show_kit_components', '0', ($pInfo->show_kit_components==0)) . ' ' . TEXT_NO; ?>
    show_kit_breakout==1)) . ' ' . TEXT_YES . '  ' . zen_draw_radio_field('show_kit_breakout', '0', ($pInfo->show_kit_breakout==0)) . ' ' . TEXT_NO; ?>
  7. Add the text definitions for these flags to ./admin/includes/languages/english/product.php the way you added TEXT_IS_KIT:
    define('TEXT_SHOW_KIT_COMPONENTS', '(Kits Only) Show Kit Components?');
    define('TEXT_SHOW_KIT_BREAKOUT', '(Kits Only) Show Kit Breakout?');
  8. Add these flags to admin/includes/modules/update_product.php the same way you added is_kit:
        'show_kit_components' => zen_db_prepare_input((int)$_POST['show_kit_components']),
        'show_kit_breakout' => zen_db_prepare_input((int)$_POST['show_kit_breakout']),
  9. In admin/packingslip.php, right above the for loop for $order->products, add this line:
            include 'kitbuilder_packingslip.php';
    So your code now looks like:
        include 'kitbuilder_packingslip.php'; 
        for ($i=0, $n=sizeof($order->products); $i<$n; $i++) {
  10. Modify includes/templates/YOUR_TEMPLATE/templates/tpl_product_info_display.php as follows:
    Below the main image and add to cart buttons, place
    <!-- bof Kitbuilder Module -->
      include($template->get_template_dir('/tpl_kitbuilder.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_kitbuilder.php');
    <!-- eof Kitbuilder Module -->
    A good spot in most templates is right above
    <!--bof Quantity Discounts table -->
  11. Edit includes/classes/order.php Below
          $order_products_id = $db->insert_ID();
          handle_kit($order_products_id, $zf_insert_id, $this->products[$i], $this);  
    So your code looks like:
          $order_products_id = $db->insert_ID();
          handle_kit($order_products_id, $zf_insert_id, $this->products[$i], $this);  
    (In Zen Cart 1.5.5 and prior, the function name was spelled Insert_ID().)
  12. Only required on Zen Cart 1.5.4 or below - modify admin/kitbuilder.php and at the bottom, uncomment out the block that pulls in jQuery and jQueryUI. (BTW, You should really be upgrading.)

Installation Problems:

The most common installation problems for this module are as follows:
  1. Unfamiliarity with installing mods. Please review my Guide to Mod Installation on Zen Cart.
  2. Attempting to add products to a kit which do not conform to the restrictions of Kitbuilder.
  3. Some hosts require scripts which are run from a URL - for example,
    to have permissions 644. You may see a message like
    HTTP 500: Internal Server Error
    The server encountered an internal error or misconfiguration and was unable to complete your request.
    when running Kitbuilder Admin if this is the case with your host. Simply set the permissions of admin/kitbuilder.php and admin/kitbuilder_backend.php to 644 using your FTP client (or perhaps your cPanel File Manager).
  4. If try to run the Admin Panel and get an error like
    1146 Table 'yourdb.zen_kits' doesn't exist
    [SELECT * FROM zen_kits ORDER BY id DESC ]
    If you were entering information, press the BACK button in your browser and re-check the information you had entered to be sure you left no blank fields.
    this means you ran the sql script in phpMyAdmin without adding the prefix manually. You can avoid this problem by running SQL scripts in Admin > Tools > Install SQL Patches.
  5. If you are granting access to Kitbuilder to a non-superuser in Zen Cart 1.5.x, you must make a change to a core file. In admin/includes/init_includes/init_admin_auth.php, add FILENAME_KITBUILDER_BACKEND to the list of files checked on line 49.
  6. If you are pulling in jQuery and/or jQueryUI already in your admin panel, you will need to comment out the require statements that do that in admin/kitbuilder.php.
  7. If you are running 1.3.9 or prior with the Admin Profiles contribution, there are a few more steps. you must install the software, then go to Admin > Tools > Admin Settings, and check 'Kitbuilder' under the tools menu. Then go to Admin > Tools > Kitbuilder, and you'll get an error message in the form where cross sells are entered. Go back to Admin > Tools > Admin Settings, and check 'Kitbuilder backend'. Now Admin > Tools > Kitbuilder will work.
  8. Got a blank page? Review the guidelines for Debugging a blank page in Zen Cart
If you are having trouble installing this module, you should also refer to my Guide to Mod Installation on Zen Cart. I'm also happy to install most of my mods for a fee.


Items which are eligible to be in a kit must meet these criteria:
  • They must be individual products (categories are not allowed).
  • They must not have attributes (even defaultable attributes).
  • They must not themselves be kits; only regular (non-kit) products are allowed.

In addition:
  • Kit purchases will reduce stock of the components of a kit (assuming Admin > Configuration > Stock > Subtract stock = true), but will not be flagged on the shopping cart or prevented from completing even if stock is insufficient. In other words, the settings Admin > Configuration > Stock > Check stock level = true and Admin > Configuration > Stock > Allow Checkout = false are not applied to components of a kit.
  • Kit component products using "Product Qty Min/Unit Mix" = Yes in a kit do not contribute to the total product quantity (either to meet minimums or for discounts).
  • Kit component products with quantity discounts (either native or using my contribution) are not counted towards meeting thresholds.


A free module called Kitbuilder Centerbox is available to help you show off your kits on the front page of your store. It creates a centerbox that looks like this on your home page:
Kitbuilder Centerbox

Major Versions

  • 1.0.1a 03/21/2021 - Fixes for SQL creation script
  • 1.0.1 07/19/2020 - Updates for 1.5.6 and 1.5.7
  • 1.0 09/01/2017 - First release


Q: What's the difference between Kitbuilder, Extended Family, Checkbox Cross Sell and Impulse Buy?
A: They are all bundle-building plugins for Zen Cart, but they each do different things.
  • Extended Family builds a list of cross sells that show on the checkout page, and if they are products without attributes, a checkbox to purchase them is provided. Kitbuilder has no checkboxes because the products are all part of the kit (so the kit can't be modified by a customer).
  • Impulse Buy appears only on the checkout shipping page and has its own configuration, which is hardcoded in PHP. Kitbuilder kits appear as products with the usual product info page, and Kitbuilder as its own admin page.
  • Checkbox Cross Sell uses the Better Together configuration to determine what should be shown - either the original configuration in PHP in Better Together, or the Better Together Admin Panel configuration. As noted before, Kitbuilder has its own configuration, which is created using the built-in admin panel.

Q: I'd like to copy products which are kits, and have the resultant product have the same kit components. How do I do this?
A: Change the file admin/includes/modules/copy_to_confirm.php (or, in Zen Cart 1.5.6 and above, admin/includes/modules/copy_product_confirm.php) as follows:
Look for the line
$products_id = $dup_products_id;
Add below that line:
$db->Execute("INSERT INTO " . TABLE_KITS . " (kit_products_id, count, component_category_id, component_products_id) (SELECT '" . $products_id . "', count, component_category_id, component_products_id FROM " . TABLE_KITS . " WHERE kit_products_id = " . $old_products_id . ")"); 
Then add the is_kit field to the SELECT and INSERT statements that build the product.

Q: When I'm deleting a product, I want the rows from the kits table to be removed as well. How do I do this?
A: Update admin/includes/functions/general.php. Change zen_remove_product() to select is_kit in the $product_image query. Then below this, add
    if ($product_image->fields['is_kit']) {
       $db->Execute("DELETE FROM " . TABLE_KITS . " WHERE kit_products_id = " . (int)$product_id); 

I charge a fee of $60 for the Kitbuilder. Buy Kitbuilder.
The fee covers software only; installation is extra if you require help.