I'm trying to track down a bug in getpaid that seems to allow a user to get
free shipping. I've been able to get to a point were I can reproduce it,
now I'm looking for pointers or help on why it is occuring.
I've got a simple setup of Plone 3.1.6 with GetPaid 0.7.9 (I'm using the svn
checkout of the buildout). I've marked a couple of items as shippable and
have written my own shipping addon that talks to USPS.
The free shipping issues happens when a user walks through the checkout
process up to the 'checkout-review-pay' step. At this point if the user
hits the 'Back' button provided on the page (not the browser back), they
return to the 'checkout-select-shipping' step with a hidden element that
holds their previous shipping choice. This input element is the same as the
input radio select on the page. This shouldn't be a problem since I would
expect to get both the hidden value and the radio select in an array, and it
looks like the code expects that as well since the getShippingMethodCode()
does this:
if isinstance( service_code, list):
> service_code = service_code[-1]
>
however it seems I'm getting an empty array instead of an array with two
values. For some clarity the checkout-shipping-select html essentially
looks like this:
<form action="https://nwei.org/@@getpaid-checkout-wizard"
> method="post" enctype="multipart/form-data">
> <input type="hidden" name="shipping_method_code"
> value="usps.D-16"></div>
<I removed all the other hidden inputs>
>
> <input checked type="radio"
> name="shipping_method_code"
> value="usps.D-16" />
>
> <input type="submit" class="button context"
> id="form.actions.continue"
> name="form.actions.continue" value="Continue" />
> </form>
As far as I can tell the code should work. I'm not clear on why
self.request.get('shipping_method_code') is [] on the second submit instead
of ['usps.D-16', 'usps.D-16']? Also if I submit the form, then hit 'back'
again it works ok since there is no hidden element for an empty array added.
Anyway if anyone has some suggestions on where to look I would really
appreciate it. Thanks.
-Rob
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"getpaid-dev" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/getpaid-dev?hl=en
-~----------~----~----~----~------~----~------~--~---