Discount Preview
A Zen Cart™ mod which allows you to
display order total discounts on the shopping cart page (and in
the shopping cart sidebox, if desired). In this way, discounts
which are normally not visible until the second page of checkout
are visible earlier.
Relevance: Zen Cart™ 1.3.5 and forward
Cost: $30
Support Thread: My commercial software is not supported on the Zen Cart forum. Please email me questions instead.
See it Live: Go to
my demo shop and add ten of any item to your cart (excluding gift certificates).
You will immediately see the discount because of
Discount Preview. Without
Discount Preview, the discount would not be visible until
the second page of checkout.
Bugs: click here
Overview:
This mod permits customers to preview the order total discounts they
will receive from the built-in Group Discount module, as well as from the
Better Together and
Quantity Discounts contributions
and the
Combination Discounts,
Big Spender
and
Big Chooser
extensions.
You may preview whatever combinations of discounts is configured
for your shop.
Shopping Cart Page With the Discount Preview Extension
Shopping Cart Sidebox With Discount Preview Extension
Ordinary Shopping Cart Page
The discounts are shown as line items below the subtotal on the shopping cart page.
No summary computation is made, since these line items are designed to appear the
way they will on page two of the checkout.
I charge $30 for this extension.
Bugs
Tips
- If you've never installed a Zen Cart mod before, please read my
Guide to Mod Installation on Zen Cart.
- IMPORTANT! If you are using Quantity Discounts, and you're
using the
marketing suggestions
on the product info page, please be sure you have the latest code:
<?php
$value = "ot_quantity_discount.php";
include_once(zen_get_file_directory(DIR_WS_LANGUAGES . $_SESSION['language'] .
'/modules/order_total/', $value, 'false'));
include_once(DIR_WS_MODULES . "order_total/" . $value);
$discount = new ot_quantity_discount();
echo '<div class="content" id="discountPolicy">';
echo '<h2>' . STORE_POLICY . '</h2>';
echo $discount->get_html_policy();
echo '<br /></div>';
?>
(i.e. both "include" statements should be "include_once")
- To place a message at the top of the shopping cart page near the undiscounted
total, edit the file customize the file includes/languages/english/shopping_cart.php, and set TEXT_INFORMATION to something like "See bottom of page for discount information."
-
If you use the shopping cart sidebox, you should define the following new
CSS class in includes/templates/custom/css/stylesheet.css
.cartBoxDiscount {
text-align: right;
font-weight: bold;
}
This is how your discount information will appear in the shopping_cart sidebox.
-
If you have any problems after installing this mod, the first thing you
should do is delete
includes/templates/custom/sideboxes/tpl_shopping_cart.php
Although this works well with a freshly installed cart,
it is possible that the logic in this file will not interoperate with
other modifications you have made. You may need to turn off the
shopping cart sidebox or simply use some text in here telling the customer
to go to the shopping cart page to see discount information.
The next tip describes how to do this.
-
If you are using the shopping cart sidebox
but would prefer not to indicate the amount of the discount
(or have interoperability problems as described above),
customize the file
includes/templates/template_default/sideboxes/tpl_shopping_cart.php,
copying it to
includes/templates/custom/sideboxes/tpl_shopping_cart.php.
At the bottom of the file, right before the line
$content .= '</div>';
insert the line
$content .= CART_INFORMATION_SIDEBOX;
If you have used CSS styling in the main page of shopping_cart.php, you
can make the sidebox look the same by using this line instead:
$content .= '<div id="cartInstructionsDisplay" class="content">';
$content .= CART_INFORMATION_SIDEBOX;
$content .= '</div>';
CART_INFORMATION_SIDEBOX is a string you have defined in includes/languages/english/extra_definitions/discount_preview.php
like this:
define('CART_INFORMATION_SIDEBOX','Discounts displayed in shopping cart');
- The shopping cart sidebox will not display the discount information when the shopping
cart page is being displayed.
- If you use the shopping cart sidebox, my recommendation is
to run with it not displayed on the shopping cart page.
Use Admin->Configuration->Layout Settings->Shopping Cart Box Status, and set this value to 2.
- Want to show off your discounts even more using red lettering, yellow background or some other effect? See my Highlighting your Discounts tip.
Want more Zen Cart?
Tips and Tricks
Contributions
Extensions
Custom Software
Newsletter