discount preview

Discount Preview for osCommerce

A osCommerce™ mod which allows you to display the Better Together and Quantity Discounts order total discounts on the shopping cart page (and in the shopping cart box, if desired). In this way, discounts which are normally not visible until the Order Confirmation page are visible earlier.

Relevance: osCommerce ™ 2.2

This extension is part of the Better Together World.

Cost: $30 Buy Now!

Installation: click here

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

See it Live: Go to my demo shop and add ten of any item to your cart. You will immediately see the discount because of Discount Preview. Without Discount Preview, the discount would not be visible until the Order Confirmation Page.

Zen Cart User? This is an osCommerce page. Look at the Better Together for Zen Cart World for Zen Cart help.

Overview:

This mod permits customers to preview the order total discounts they will receive from the Better Together and Quantity Discounts contributions and the Big Spender for osCommerce and Big Chooser for osCommerce extensions. You may preview whatever combinations of discounts is configured for your shop.


Shopping Cart Page With the Discount Preview Extension

Cart with the Discount Preview extension installed

Shopping Cart box With Discount Preview Extension

box with the Discount Preview extension installed

Ordinary Shopping Cart Page

Cart without the Discount Preview extension installed

The discounts are shown as line items below the subtotal on the Shopping Cart page, and in the Shopping Cart box (when not on the Shopping Cart page). Note that on the Shopping Cart page, the box appears as before, since the preview is shown in the main body of the page.

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 the unzipped folder to the root directory of your shop. All the files are new.
  3. Edit the file catalog/shopping_cart.php, and underneath the row for the line that prints SUB_TITLE_SUB_TOTAL, add
    <?php
      require("discount_preview.php"); 
    ?>
    

    So your catalog/shopping_cart.php file will look like this: ...
          <tr>
            <td align="right" class="main"><b><?php echo SUB_TITLE_SUB_TOTAL; ?> 
                <?php echo $currencies->format($cart->show_total()); ?></b></td>
          </tr>
    <?php
      require("discount_preview.php"); 
    ?>
    
  4. Edit the file catalog/includes/boxes/shopping_cart.php. Just before the close of the block that prints the subtotal, add
        require_once('discount_preview.php'); 
    

    So your catalog/includes/boxes/shopping_cart.php file will look like this:
      if ($cart->count_contents() > 0) {
        $info_box_contents[] = array('text' => tep_draw_separator());
        $info_box_contents[] = array('align' => 'right',
                                     'text' => $currencies->format($cart->show_total()));
        require_once('discount_preview.php'); 
      }
    
  5. Because the shopping cart box cannot show the discount on the shopping cart page, I recommend not displaying the shopping cart box on the shopping cart page. At the top of catalog/includes/boxes/shopping_cart.php, add
    <?php
       if ($current_page != FILENAME_SHOPPING_CART) {
    ?>
    
    with a closing
    <?php
       } 
    ?>
    
    at the end of the file.
  6. You're done! Test it out by adding some items to a cart and looking at the shopping cart page.

I charge a fee of $30 for Discount Preview for osCommerce. The fee covers software only; installation is extra if you require help.

Terms | Privacy | SiteMap | Newsletter | Contact Me | Contents © 2003-2010 That Software Guy, Inc.
osCommerce Project Home Page | osCommerce Forum |