Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Change discount coupon add on to allow 2 coupons


yeash95

Recommended Posts

Hi all, I am working on modifying a discount coupon add-on to allow two coupons for one order. The class discount_coupon looks like this:

<?php
/*
 * discount_coupon.php
 * August 4, 2006
 * author: Kristen G. Thorson
 * ot_discount_coupon_codes version 3.0
 *
 * 
 * Released under the GNU General Public License
 *
 */


  class discount_coupon {

  	var $messages, $coupon, $applied_discount, $cart_info;

  	function discount_coupon( $code, $delivery ) {
			$this->messages = array();
			$this->coupon = array();
      $this->applied_discount = array();
      $this->cart_info = array( 'valid_products' => array( 'count' => 0, 'line_items' => 0, 'total' => 0 ),
                                'total_products' => array( 'count' => 0, 'line_items' => 0, 'total' => 0 ),
                                'exclusions' => array() );
			$this->get_coupon( $code, $delivery );

I have already made some modifications to this file to bypass the exclusions if necessary. Does anyone have any ideas on a method to allow multiple codes? ThanksĀ 

Edited by yeash95
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...