Zen Cart Combination Discounts Admin Panel
Combination Discounts Admin simplifies the process of adding discounts to
Combination Discounts.
Background: See the
Zen Cart Matrix-o-discounts for a perspective on Combination Discounts.
Relevance: Zen Cart™ 1.3.5 and forward. You must have JavaScript enabled in your browser.
Cost: $60. This is a separate fee from the fee for Combination Discounts.
Buy Now!
Current Version: 1.0.1
Support Thread: My commercial software is not supported on the Zen Cart forum. Please email me questions instead.
FAQ: click here
Installation: click here
Installation Difficulty: Moderate
Bugs: click here
Incompatibilities: This software is believed to be incompatible
with
Simple SEO URL by Numinix.
Please do not order this software if you are using this mod.
Overview:
This pages assumes a basic familiarity with
Combination Discounts.
Combination Discounts is a very popular module, but many people
have told me they dislike need to edit a file in order to
add "linkages" (the term I used to describe associating
one product with another for the purpose of discounting).
So I created an admin panel which allows you to add linkages in a way which will be familiar to
users of the Zen Cart admin system.
Combination Discounts Admin Panel
The page is broken into two areas: on the top, a list of existing
discounts, and on the bottom, a form to allow you to add new linkages
to create new discounts.
Discounts are listed in the order they were created. Discounts can currenly be deleted but not edited directly;
instead, to edit a discount, delete the existing one and create a new one.
Creating discounts is done in two steps. First, you specify the
product to be discounted: the selector PROD, CAT or PRICE,
the category id, product id or price to
be discounted, and the count of items which may be discounted.
Then you specify the number of conditions, i.e. the number of
other things which must be done in order to get this discount.
For instance, the example from the Combination Discounts help
page is
$this->add_linkage(PROD,26,1,PROD,25,1,PROD,27,1,"$", 30);
This is read, "get $30 off one product 27 if you buy one product 25 and one product 26." There are two conditions to this discount;
a product 26 purchase (quantity one), and a product 25 purchase
(quantity one).
Combination Discounts Admin - Add a new linkage - step 1
Once you select a selector type, the appropriate fields are filled in
for the discounted product, category or price.
- When selector is set to "Product,"
the "Buy" dropdown is automatically populated with a complete list of
categories, with a list of products for the selected category. Select
the category you wish to use and then the product under it.
- When selector is set to "Category,"
the "Buy" dropdown is automatically populated with a complete list of
categories. Select
the category you wish to use and then the product under it.
- When selector is set to "Price,"
a text entry box is presented; enter the price you wish to match against.
For instance, in this example, selector type "Product" is used.
Category 5 products include product 27, the product to be discounted.
You then select the discount units (% or $ off), fill in the amount,
and set the number of conditions. Then press "Add Conditions."
Combination Discounts Admin - Add a new linkage - step 2
This takes you to the next page. We selected 2 conditions, so we have
two places to specify the product, category or price we need to match
in order to get the discount.
Combination Discounts Admin - Add a new linkage - step 2
We will select products 25 and 26, with quantity one for each.
To create this discount, press the "Create Discount button.
Combination Discounts Admin - Add a new linkage - complete
The page refreshes, and you see your new linkage at the top of the list.
If you decide you don't want to offer one of your discounts, you
have two options: you may permanently delete the discount with the
"Delete" button, or you may temporarily suspend the discount with the
"Set Inactive" button. When you set a discount inactive, the notation
"INACTIVE" is painted next to the discount in red letters.
This discount will not be applied at checkout, nor will it show up
in the
Combination Discounts marketing text, on the
Combination Discounts Promotional Page, or in
Checkout Candy for Combination Discounts
on your shopping cart and shipping page.
Combination Discounts Admin - set linkage inactive
When you inactivate a discount, the "Set Inactive" button changes
to say "Set Active."
To reactivate this discount, simply press the "Set Active" button.
Installation Instructions:
Prior to Installation:
- Go into Admin -> Tools -> Store Manager, and click on "Reset ALL
Products Master Categories ID".
Installation
- Back up everything! Try this in a test environment prior to installing
it on a live shop.
- Two zip files are provided. Unzip both, and copy the contents of the two unzipped folders to the root directory of your
shop. Note that the zip file "cd_admin_xajax.zip" is identical to
the file "bt_admin_xajax.zip" from Better Together Admin; there is no
need to reinstall it if you have Better Together Admin.
- Run the cd_admin.sql file against your database.
You can do this in phpMyAdmin or you can
use your Zen Cart admin panel under Tools->Install SQL patches.
If you are using phpMyAdmin and have used
a prefix in your database, modify cd_admin.sql to reflect this (i.e.
change "combination_discounts_purchase" to "zen_combination_discounts_purchase" if your prefix is "zen_", and make the same change for "combination_discounts_required").
- Edit the file
includes/modules/order_total/ot_combination_discounts.php
Go to the bottom of file to the setup() function.
Change it so it looks like this:
function setup() {
if (!IS_ADMIN_FLAG) {
require(DIR_WS_MODULES . 'combination_discounts_admin.php');
}
}
You should delete all manually entered discounts here so that all your
discounts will be visible through the admin panel.
- Combination Discounts Admin will now be available in the admin panel under Tools.
Installation Problems:
The most common installation problems for this module are as follows:
- Forgetting to modify
includes/modules/order_total/ot_combination_discounts.php
as described above.
- Installing Buy The Set, which changes
includes/modules/order_total/ot_combination_discounts.php
and forgetting to reapply the modification noted above.
- One European IE6 user reported that the linkage type dropdown was
not responding. The fix was to match the XAJAX encoding type with what
was actually being received from the server. At the top of the file
admin/combination_discounts_consts.php, under the version number, insert the line
define ('XAJAX_DEFAULT_CHAR_ENCODING', 'iso-8859-1');
(or whatever your encoding is). Some browsers such as Mozilla automatically
correct for this, but IE6 does not.
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.
Bugs
- The title displayed on the page Admin->Modules->Order Total mistakenly displayed "Commbination Discounts" instead of "Order Total Modules." This bug has been fixed in version 1.0.1.
- Some users have reported issues in handling product and category names
which have non-English characters in them. This bug has been fixed in version 1.0.1.
-
FAQ
Q: Why do all my categories not show up?
A: The definition of a "category" in Combination Discounts is "the parent category
of a product." See
the
Category Issues page
for a discussion of the treatment of categories in my mods.
Q: Why do I have to enable Javascript to run the Combination Discounts Admin Panel?
A: Because it uses AJAX, a Javascript based technology. This creates a
faster, more responsive user interface. If you do not enable Javascript in
your browser, you will see a flashing red error message at the top of the
page, and the Combination Discounts Admin Panel will not operate.
Q: I would like to make it more obvious that a discount is inactive. How can I do this?
A: Edit the file admin/includes/cd_stylesheet.css and add
.inactive {
color:#FF0000;
}
Now the entire line for an inactive discount will be red. Lines for
active discounts use the ".active" class if you would prefer to do
it the other way around.
|
|
I charge a fee of $60 for the Combination Discounts Admin Panel. You must have Combination Discounts (sold separately) to use the
Combination Discounts Admin Panel.
The fee covers software only; installation is extra if you require help.
|
Want more Zen Cart?
Tips and Tricks
Contributions
Extensions
Custom Software
Newsletter