This is a discussion on GV - Coupon repair & setup thread within the osCMax v2 Customization/Mods forums, part of the osCMax v2.0 Forums category; OK, this is in reference to bugtrack bug 122: http://bugtrack.oscmax.com/view.php?id=122 The gv/coupon module has some limitations, and some very specific ...
| |||||||
| Register | FAQ | Members List | Calendar | Mark Forums Read |
|
#1
| |||
| |||
| OK, this is in reference to bugtrack bug 122: http://bugtrack.oscmax.com/view.php?id=122 The gv/coupon module has some limitations, and some very specific installation guidelines. If these are not followed strictly the module will appear to give errors in calculation. Of course, there are also some actual bugs... so... we can discuss both here. The mother thread for this module is here (hint: start at the last page and read backwards...): http://forums.oscommerce.com/index.php?showtopic=158518 --gabe PS: one opening question I have is: what version of the module is installed in osCMax 2rc2 + patches? Anyone know? I see notes about 5.13 in the code, but there is a 5.13a, b, c, and d, and a 5.15 or some such on the osC contribs page... |
| Sponsored Links | ||
| ||
| |
|
#2
| |||
| |||
| Hey ganast, I have been attempting to fix this for some time. For me there is a disconnect on where the tax is actually recalculated. It should basically recalculate PRODUCT - DISCOUNT * TAXRATE. We have free shipping on everything, so shipping is not included. I have searched the forums, and I am pretty sure the following setup is correct. ************************** Display Total - true Sort Order - 15 Include Shipping - false Include Tax - false Re-calculate Tax - Standard Tax Class --none-- ************************** Discount Coupons - 15 Gift Vouchers - 10 Low Order Fee Customer Loyalty Discount Shipping - 5 Sub-Total - 1 Tax - 25 Total - 800 ************************** Currently: Sub-Total: CAD $201.00 Shipping: CAD $0.00 Discount Coupons:VISA2006A: -CAD $20.10 PST 7% + GST 7%: CAD $28.14 Total: CAD $209.04 ************************** Should be: Sub-Total: CAD $201.00 Shipping: CAD $0.00 Discount Coupons:VISA2006A: -CAD $20.10 PST 7% + GST 7%: CAD $25.33 Total: CAD $206.23 ************************** I really do appreciate any insight you may have. Thanks! Shawn |
|
#3
| |||
| |||
| First try keeping the GV module after the Coupon module. This contrib is pretty "sticky" in parts, and I believe the GV module must be the last module with the exception of "Total," and in some cases "Tax." In other words, put GV at 20 and see if things get better... --gabe |
|
#4
| |||
| |||
| Modules Sort Order Action Discount Coupons 15 Gift Vouchers 20 Low Order Fee Customer Loyalty Discount Shipping 5 Sub-Total 1 Tax 25 Total 800 Same result... Sub-Total: CAD $105.00 Shipping: CAD $0.00 Discount Coupons:VISA2006A: -CAD $10.50 PST 7% + GST 7%: CAD $14.70 Total: CAD $109.20 I setup the GV the same and changed the sort order to no avail. Maybe I can echo a variable in the coupon ot file? |
|
#5
| |||
| |||
| Do you have "re-calculate" in the Coupon module set to "standard?" [edit] Oh, I guess you say that you do... so, this is odd. Is this 2.0rc2? --gabe |
|
#6
| |||
| |||
| Yes, I am using RC2. I have loaded up a fresh install of it and I have the same result. Were you not able to replicate it? |
|
#7
| |||
| |||
| I have a small budget for fixing this problem. If anyone is interested, I'll pay a small $$$ fee for a solution to this issue. Let me know ASAP if you are intested. |
|
#8
| |||
| |||
| Special thanks to "Bandwidth" on getafreelancer. He suggested adding some code to ot_coupon.php: function process() { global $PHP_SELF, $order, $currencies; $order_total=$this->get_order_total(); $od_amount = $this->calculate_credit($order_total); $tod_amount = 0.0; //Fred $this->deduction = $od_amount; if ($this->calculate_tax != 'None') { //Fred - changed from 'none' to 'None'! $tod_amount = $this->calculate_tax_deduction($order_total, $this->deduction, $this->calculate_tax); } if ($od_amount > 0) { $order->info['total'] = $order->info['total'] - $od_amount; $this->output[] = array('title' => $this->title . ':' . $this->coupon_code .':','text' => '<b>-' . $currencies->format($od_amount) . '</b>', 'value' => $od_amount); //Fred added hyphen //New code for tax recalculation fix if ($tod_amount == 0 || $tod_amount == '') { $pct = $order->info['tax'] / $order->info['subtotal']; $order->info['tax'] = $order->info['tax'] - ($pct * $od_amount); foreach ($order->info['tax_groups'] as $key => $value) { $value = $value - ($pct * $od_amount); $order->info['tax_groups'][$key] = $value; $order->info['total'] -= ($pct * $od_amount); } } //end new code } } |
|
#9
| ||||
| ||||
| I think the problem is that you changed the sort order for the OT modules. It has to remain in the pre-set order unless you really know what you are doing. This is the order they must be in: 1.Subtotal 2. Shipping 3. Tax 4. Customer Loyalty discount 5. Low Order Fee 6. Discount Coupons 7. Gift Vouchers 8. Total
__________________ Michael Sasek osCMax Developer
|
|
#10
| |||
| |||
| I am sorry but I am still having issues here, I think I have tried all of the permutations above but still cannot get both the Order Total, Tax and Discount Amounts to Display properly. I am only interested in the Discount Coupon at this stage, not gift vouchers. My Configuration is : Order Total Module Order : Sub Total (1) Shipping (4) Tax (10) Discount Coupons (730) Gift Vouchers (740) Total (800) Discount Coupon Setup: Include Shipping : False Include Tax : True Re-Calculate Tax : Standard I have applied the new code for tax recalculation as provided by bandwidth but it does not seem to make a difference. I have goods at £19.95 including UK VAT and shipping at £4.95 including UK VAT. Total VAT on a non-Discounted Order is £3.71 Applying a 10% discount coupon to the above should get me: Sub-Total £19.95 Shipping £4.95 Tax £3.41 Discount £2.00 Total £22.90 Instead the system shows me : Sub-Total £19.95 Shipping £4.95 VAT £3.71 Discount £2.00 Total £22.53 It appears to be taking 10% of the total pre-discount inc-shipping VAT off the price even after having calculated the discount off the Inc VAT cost of goods. If I set Include Tax : True then I get the right total (£22.91) but the numbers don't make any sense. Tax is still the pre-discouont inc-shipping amount and the discount displayed is off the ex-vat price of goods even though the SUb-Total is inc-vat. Sub-Total £19.95 Shipping £4.95 VAT £3.71 Discount £1.62 Total £22.91 Now allowing for rounding the total is OK. VAT amount is wrong and this might legally be an issue in the UK. The discount does not reflect the true final discount the customer received Have I done something obvious wrong? Do I need to flush any code cache to ensure that the modified version gets loaded (I have use cache set to false in configuration : cache)? Any help much appreciated! |
| Sponsored Links | ||
| ||
| Thread Tools | |
| |
| ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| creating Coupon | jschafer52 | osCMax v2 Installation issues | 1 | 11-04-2006 08:23 PM |
| Gift Voucher & Coupon | auntie22 | osCMax v1.7 Discussion | 0 | 03-12-2006 06:55 PM |
| Coupon Problems | kvnband | osCMax v2 Features Discussion | 5 | 01-03-2006 01:02 PM |
| Coupon Issues & More | auntie22 | osCMax v1.7 Discussion | 3 | 10-02-2005 04:30 PM |
| request: change Welcome Discount Coupon Code -> Coupon ID | kodersoftware | osCMax v1.7 Discussion | 0 | 11-13-2004 01:34 PM |