Jump to content
kgt

[Contribution] Discount Coupon Codes

Recommended Posts

Hello all, a problem just came up that wasn't happening before... i found it was a fixed issue but don't see the fix.

 

We are using the PayPal app and the PayPal Express option.  Just today we started getting:

 

The totals of the cart item amounts do not match order amounts 

 

It works when using a credit card but not PayPal.

 

I see the PayPal fix, but that doesn't help because the code for the app is completely different from the old IPN.

Share this post


Link to post
Share on other sites

I've had this coupon mod/contribution working on a site for a while now, but for some reason the "Max Use" option is not working when we set it to a limited number like "1" (only tested "1", not other numbers).  I've checked the entire installation of this mod on the site, but found no problem, and it works all the way through, except it's not logging the fact that a customer used a particular coupon so they can use it over and over again even if "Max Use" is set to 1.

I confirmed if I manually add the customer to the discount_coupons_to_customers table, the site does stop the customer from using the coupon again.  The problem seems to be that the checkout_process.php doesn't appear to be adding the customer to that table even though it is adding order information to the other standard OScommerce tables.

Unless I'm missing some update, the checkout_process.php file has:

  //kgt - discount coupons
  if( tep_session_is_registered( 'coupon' ) && is_object( $order->coupon ) ) {
      $sql_data_array = array( 'coupons_id' => $order->coupon->coupon['coupons_id'],
                             'orders_id' => $insert_id );
      tep_db_perform( TABLE_DISCOUNT_COUPONS_TO_ORDERS, $sql_data_array );
  }
  //end kgt - discount coupons


near the top and it has:

  //kgt - discount coupons
  tep_session_unregister('coupon');
  //end kgt - discount coupons


near the end.

I manually checked both variables in the if statement (by having it echo some text on the confirmation page if they are true), but it seems like when it comes back from processing a payment (which is only one option, PayPal), one or both of those variables are lost or stripped out?

The site is using the new PayPal App module for OScommerce and I know the Max Use setting was tested to work two years ago when the site was set up with the older PayPal module, but now it's not.

Now that I write this, I'm thinking the problem is happening after they come back from paying via PayPal.  Has anyone else had this problem and/or does anyone know of a fix?

Share this post


Link to post
Share on other sites
1 hour ago, NetFu said:

I'm thinking the problem is happening after they come back from paying via PayPal

You're probably right but you could test it by adding another payment module....perhaps a payment on pick up type method and see if it works as you think it should.  If so then you know you'll need to find a fix for the PayPal module or create some type of work around.  Maybe log it before it goes off to PayPal...that might not be an ideal option should a customer abort the order but it would probably work most of the time.  :biggrin:

Dan

Share this post


Link to post
Share on other sites

I'm having an issue with this mod.  Right now if I have a $10 off $100 coupon and someone applies it and then edits their cart they can essentially get $10 off $10.  How can I force a recheck on submit?

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

×