indian_druid Posted March 20, 2004 Share Posted March 20, 2004 Anybody having a store with prices including tax or discount coupons with restrictions and having problems with DC/GV contribution? I have found a couple of bugs in "modules/ot_coupon.php" regarding the above case and even cases for shops displaying prices excluding taxes. The thing is that discount coupons with restrictions didn't calculate the discount and tax correct. There were some fundamental bugs in this part. I also fixed some "corrections" to Credit Note, i.e some corrections before was not correct. ;) I have also added a "debug" flag in the class so you can follow the calculation of deduction, tax etc. This is a very nice feature. I am not sure if it's just me or others are having the same issus, so please PM me if you would like to test this modified class. Then when confirmed we can add it to this great contribution! /Fred Hi Strider, I am in a helpless situation I have installed Credit class Gift voucher (ccgb-510b). I am facing probelms in coupon discount calculation for coupons with category restrictions. Let me explain this with an example 1. suppose I have a coupon with 10% discount on products of a particular category (that is coupon is restricted to particular category). 2. Now for normal products (that is products without any attributes ) under that category ,the coupon works perfect. But if i try to use the coupon for product with attributes then wrong calculation of discount amount is done. 3. i debugged the code in the file (ot_coupon.php in the modules directory) 4. I found out that the problem was in the function get_product_price() Here on the line $qty=$cart->contents[$product_id]['qty'] , the value of $qty was getting a blank value. This means that the variable $cart-> contents[$product_id]['qty'] is null. 5. Due to this, the variable $total_price on the line given below becomes 0. $total_price += ($products_price + tep_calculate_tax ($products_price, $products_tax)) * $qty; 6. For normal products(that is, products without attributes) the $qty gets proper value and everything works fine. 7. I WOULD BE GRATEFUL TO YOU IF U HELP ME IMMEDIATELY cause i cant wait for future releases for thiese bug fixes. PLEASE.... 8. infact if anybody out there can help it would be great :) Quote Link to comment Share on other sites More sharing options...
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.