2008/10/31 David Glick <[EMAIL PROTECTED]>: > >> 1. I'll start out with the idea that would result in the biggest >> structural change. I'm not sold on the field mapping UI for >> associating form fields with payables. I think it would be much >> more intuitive to create a "Payable Field" which could be added to >> the form, and which would let you select a payable to be listed. >> This payable field should optionally be able to set the price >> instead of the quantity for the payable (needed for our use case, >> where the user is making a donation of an arbitrary amount). The >> getpaid adapter would then be responsible for finding all the >> payable fields in the form and creating line items in the transient >> shopping cart, much like it currently does based on the field >> mapping stored on the adapter. > > Just to flesh out a little more how I think this could be implemented: > 1. Create a "Shopping Cart Items" PFG form field which lets you > - pick a set of existing payable items from the site using > something like the reference browser widget > - choose whether to allow the user to edit quantity, edit price, > pick one item (radio buttons), or pick multiple items (checkboxes) > 2. Make a custom version of the LineItemFactory which adapts the > "shopping cart items" field and knows how to create cart line items > based on the above settings and what the user actually filled into the > form. > 3. Change the form action adapter to loop through the form fields and > try to adapt each one to ILineItemFactory, rather than looping through > the field mappings that are used currently and adapting them. > > The advantages to this arrangement are: > - more intutive configuration (imho) > - it's more extensible, as a completely different way of selecting > payable items could be implemented as yet another type of form field, > adapted to a different LineItemFactory > > Thoughts? > > David I completely agree david, most of the errors in getpaid.formgen suffer from my lack of experience in several fields at the time of coding it and I do acknowledge the need to do it much more clean and intuitive.
Regarding some of the items on the other mail. The Country/State widget is a must have to make the adapter human friendly, I have seen a working version of these fields but they where made at a pure skin level and I did not find this really nice. I believe we should create a new widget that works on pfg for this (but I have not managed to learn how to in my available time). To force https in the form I suggest we try to push the option to force https to pfg trunk this could be useful for many other uses of forms I guess. I am really looking forward to see this working as a much better coded product and I am willing to help you as much as I can. -- perrito PD: sorry if i drift too much on the mail, I am on the middle of presentation on a python talk and I look at the talk between lines and get lost :p PD2: Mercurial rocks :) --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
