|
|||||||
| Bug Reports If you have a bug to report, post it here. Please clearly explain what version you are using, and the exact error message. Please ALSO explain why you believe it's a bug, and post a solution if you have one. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Totally Zenned
Join Date: Feb 2006
Location: Tampa Bay, Florida
Posts: 3,159
|
The Linkpoint patch provided here:
http://www.zen-cart.com/forum/showpo...0&postcount=22 was still not working for a client of mine when a gift certificate was used. The error message was, "subtotal does not match the amount being charged." The associated LinkPoint error number is SGS-002301. Fix and additional notes provided below.
__________________
Scott C Wilson That Software Guy - The Duke of Discounting. Quantity Discounts, Better Together, SMS on Sale, Gift Wrap at Checkout, and more. Please note that the forum is free, but PMs and emails are treated as quote requests. Last edited by swguy; 3rd March 2010 at 11:08 PM. Reason: more details |
|
|
|
|
|
#2 |
|
Totally Zenned
Join Date: Feb 2006
Location: Tampa Bay, Florida
Posts: 3,159
|
The situation is caused by the use of a GV, but the issue is that because of the gv, the shipping is greater than the total, so even excluding the subtotal doesn't fix the problem. I will post a patch asap.
__________________
Scott C Wilson That Software Guy - The Duke of Discounting. Quantity Discounts, Better Together, SMS on Sale, Gift Wrap at Checkout, and more. Please note that the forum is free, but PMs and emails are treated as quote requests. Last edited by swguy; 3rd March 2010 at 11:07 PM. |
|
|
|
|
|
#3 |
|
Totally Zenned
Join Date: Feb 2006
Location: Tampa Bay, Florida
Posts: 3,159
|
It's a small extension to the new logic to hide the subtotal when there are discounts.
Code:
// if discounts apply, do not send subtotal, otherwise validation error occurs
if ($credits_applied_so_skip_subtotal) {
// Look for an anomaly in the total
$tot = 0;
if (isset($myorder["shipping"])) $tot += (float)$myorder["shipping"];
if (isset($myorder["tax"])) $tot += (float)$myorder["tax"];
if (isset($myorder["subtotal"])) $tot += (float)$myorder["subtotal"];
if ($tot > (float)$myorder["chargetotal"]) {
unset($myorder["shipping"]);
unset($myorder["tax"]);
}
unset($myorder["subtotal"]);
}
__________________
Scott C Wilson That Software Guy - The Duke of Discounting. Quantity Discounts, Better Together, SMS on Sale, Gift Wrap at Checkout, and more. Please note that the forum is free, but PMs and emails are treated as quote requests. |
|
|
|
|
|
#4 |
|
Sensei
Join Date: Jan 2004
Location: Ontario, Canada
Posts: 44,246
|
Are you suggesting to add that whole block of code? or to modify an existing block somewhere?
__________________
Zen Cart - putting the dream of business ownership within reach of anyone! |
|
|
|
|
|
#5 |
|
Totally Zenned
Join Date: Feb 2006
Location: Tampa Bay, Florida
Posts: 3,159
|
Yes - add this block to includes/modules/payment/linkpoint_api.php in place of the existing l. 393-395. Lline numbers from the patch file in
http://www.zen-cart.com/forum/showth...490#post563490 Code:
if ($credits_applied_so_skip_subtotal) {
unset($myorder["subtotal"]);
}
__________________
Scott C Wilson That Software Guy - The Duke of Discounting. Quantity Discounts, Better Together, SMS on Sale, Gift Wrap at Checkout, and more. Please note that the forum is free, but PMs and emails are treated as quote requests. |
|
|
|
|
|
#6 |
|
Totally Zenned
Join Date: Feb 2006
Location: Tampa Bay, Florida
Posts: 3,159
|
To duplicate this problem, use enough GV to cover your products so the shipping cost is greater than the total. This will trigger it.
__________________
Scott C Wilson That Software Guy - The Duke of Discounting. Quantity Discounts, Better Together, SMS on Sale, Gift Wrap at Checkout, and more. Please note that the forum is free, but PMs and emails are treated as quote requests. |
|
|
|
|
|
#7 |
|
Sensei
Join Date: Jan 2004
Location: Ontario, Canada
Posts: 44,246
|
k - that should work fine for 138.
v1.3.9 and newer will be using a different method of preparing subtotal data, which avoids the need to re-do the math as you've done.
__________________
Zen Cart - putting the dream of business ownership within reach of anyone! |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How to get of New PATCH Available: v1.3.8a - patch: [1] :: Important Security Patch | hcd888 | General Questions | 15 | 2nd October 2009 11:45 AM |
| Linkpoint vs Coupon in total. Linkpoint denies | darkswan | Built-in Shipping and Payment Modules | 1 | 4th August 2009 07:03 PM |
| 1064 Error after Update Patch and Db patch to latest... | colin99 | Upgrading from 1.2 to 1.3.x | 2 | 31st August 2006 04:43 PM |