osCommerce and osCMax shopping cart software forums

Shopping Cart Software

osCommerce with teeth!

 
 

GV - Coupon repair & setup thread

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 ...


Go Back   osCommerce and osCMax shopping cart software forums > osCMax v2.0 Forums > osCMax v2 Customization/Mods

Register FAQ Members List Calendar Mark Forums Read


Free community membership! Fast easy FREE membership
Closed Thread

 

LinkBack Thread Tools
  #1  
Old 01-26-2006, 09:25 PM
Member
 
Join Date: Mar 2003
Posts: 77
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
ganast
Default GV - Coupon repair & setup thread

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...
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Sponsored Links
Advertisement
  #2  
Old 01-26-2006, 09:55 PM
osCMax Testing Team
 
Join Date: Sep 2005
Posts: 17
Thanks: 0
Thanked 1 Time in 1 Post
Rep Power: 0
sirsonic is an unknown quantity at this point
Default

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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #3  
Old 01-27-2006, 08:24 AM
Member
 
Join Date: Mar 2003
Posts: 77
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
ganast
Default

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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #4  
Old 01-27-2006, 08:49 AM
osCMax Testing Team
 
Join Date: Sep 2005
Posts: 17
Thanks: 0
Thanked 1 Time in 1 Post
Rep Power: 0
sirsonic is an unknown quantity at this point
Default

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?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #5  
Old 01-27-2006, 01:20 PM
Member
 
Join Date: Mar 2003
Posts: 77
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
ganast
Default

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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #6  
Old 01-30-2006, 09:57 AM
osCMax Testing Team
 
Join Date: Sep 2005
Posts: 17
Thanks: 0
Thanked 1 Time in 1 Post
Rep Power: 0
sirsonic is an unknown quantity at this point
Default

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?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #7  
Old 01-30-2006, 10:23 AM
osCMax Testing Team
 
Join Date: Sep 2005
Posts: 17
Thanks: 0
Thanked 1 Time in 1 Post
Rep Power: 0
sirsonic is an unknown quantity at this point
Default

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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #8  
Old 02-02-2006, 10:04 AM
osCMax Testing Team
 
Join Date: Sep 2005
Posts: 17
Thanks: 0
Thanked 1 Time in 1 Post
Rep Power: 0
sirsonic is an unknown quantity at this point
Default

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

}
}
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #9  
Old 06-23-2006, 10:46 AM
michael_s's Avatar
osCMax Developer

 
Join Date: Jul 2002
Location: Phoenix, AZ
Posts: 10,982
Thanks: 80
Thanked 345 Times in 324 Posts
Rep Power: 10
michael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond repute
Default

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


  • osCMax Templates - Hundreds of premium quality templates designed for osCMax 2. Loyalty discounts up to 30% off!
    Each purchase supports the osCMax project with much needed funds!

  • xShop for osCMax - Windows Based osCMax administration. Improved workflow, security, speed and convenience.

  • osCMax Hosting - From basic hosting to High Availability, Load Balanced arrays, the most experienced osCMax host. Default multi server configuration for exceptional performance!

  • osCMax Template Tutorial - Learn how to make your own custom templates and how to use the powerful features of the osCMax template system.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #10  
Old 08-29-2006, 03:14 PM
New Member
 
Join Date: Jun 2005
Location: St Albans, UK
Posts: 23
Thanks: 3
Thanked 0 Times in 0 Posts
Rep Power: 0
rjavery
Default

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!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Sponsored Links
Advertisement
Closed Thread

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads

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


All times are GMT -8. The time now is 02:00 AM.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO
http://www.oscmax.com/forums/
Copyright 2008 osCMax