Jump to content
yeash95

Change discount coupon add on to allow 2 coupons

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

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×