Closed (fixed)
Project:
Ubercart
Version:
6.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Reporter:
Created:
8 Apr 2009 at 18:07 UTC
Updated:
22 Feb 2010 at 15:40 UTC
Jump to comment: Most recent file
One of my clients recently added a value to the "Shipping Rate Markup" field for USPS shipping (with markup type set to Addition $). But we noticed that when orders were placed, the markup wasn't applied. Turns out they had a dollar sign in the field which was causing the $markup amount in uc_usps_markup() to be completely ignored.
I'm recommending we add a little better error checking for the markup value so that this doesn't fail silently for other UC users in the future.
Suggested Fix: Create a validation function for when uc_usps_admin_settings() is submitted. This will throw an error if NOT is_numeric() for the value of uc_usps_markup.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | uc_ups.admin_.inc_.patch | 438 bytes | tr |
| #2 | uc_usps.admin_.inc_.patch | 517 bytes | tr |
Comments
Comment #1
tr commentedComment #2
tr commentedI rolled a patch for uc_usps and for uc_ups to fix this. The patch adds an is_numeric() check in the form validation function. I also committed a similar patch to my uc_fedex module, where I've had it in use for several weeks without a problem.
Comment #3
tr commentedMoving above the fold ...
Comment #4
Island Usurper commentedCommitted. Thanks.