Is there a drupal 6 version coming?
Tried porting the code, but did not work.

Comments

staff_whyte’s picture

StatusFileSize
new9.46 KB

Attempt at porting attached

burningdog’s picture

And...? Does it work?

stewest’s picture

Thanks for this! File uploaded seems to be corrupt though, won't extract the tar? I would be super stoked to get this ported version of uc_webform_pane

burningdog’s picture

StatusFileSize
new12.24 KB

Ah sideswitch, one day we'll get you moving away from Windows ;) Here's a zipped version.

arski’s picture

subscribing! this would be great to have.

arski’s picture

StatusFileSize
new9.57 KB

Hmm,

Just tried installing your version and ran into several problems already.. the permissions are weird and you forgot to put default as 'default' in hook_install :)

Attached is a slightly correct version which installs. Not sure if it works yet :)

PS. Could we get this started as a D6 dev branch in CVS?

Thanks,

Martin

arski’s picture

PS. If you're on Windows almost every zipper can unpack these nowadays (every other module ships with .tar.gz downloads only) :)

But let me know if you have troubles.

arski’s picture

StatusFileSize
new9.36 KB

Well, I gave that version a go and it appeared to have D5 code all over the place, most notably using $form_state instead of $form_state['values'] and not being up to date with the latest structure of the webform module.

After a couple of hours it finally worked for me - I can add a pane and the data submitted there gets saved and connected to the order id.

I'm sure there are a few more bugs in there, but this is a start.

We should really get a D6 CVS branch for this! Anyone know how to do that? :)

Enjoy

leon kessler’s picture

I'm very interested in this. I'm looking for a way to allow users to customise a checkout page. Using the webform module seems like a good solution, but I wonder why this hasn't already been ported to D6. Perhaps there is a better way? If not, I'd like to help port this to D6.

Here's a few things I'd like to do:

- currently, when viewing the order through the store-admin page we just get 'array' back
- editing the webform through the order store-admin screen, currently it doesnt' show up
- I don't like the "selecting hidden field for order id" option. Perhaps there's a way we can create a new content type for ubercart webforms that has this by default. Or simply storing this in a table.
- All webform submitted fields are shown on the order review page (including the hidden field). These need to be removed or perhaps give the user an option to show these on order review.

- As my main goal is to have a one-page one-order form checkout process (mainly to take donations and subscriptions), a field that could be linked to the price of the order would be very handy (not quite sure how this would work yet).

A CVS branch would be useful so we could work together, although it seems as though we'd need a co-maintainer before that.

Leon

arski’s picture

Hey,

I don't think there is a better way.. I guess most people are adding their own forms.. this is really weird indeed that nothing has been done, but o well..

As for your comments: right now my personal focus is to port the functionality of D5 to D6 and make it work as such. In general I think it's a good idea to port the existing functionality first and consider new feature requests etc next..

As for your notes, here some comments:
- getting array() when viewing the order - I'll take a look at that, didn't get to reviewing orders yet :)
- webform in store-admin screen would be definitely nice but is not critical as it works without that
- not having to have a hidden field for order id - I personally don't mind.. again it's more of a feature request maybe someone could look into later
- all fields on the review page - this happens for every pane and there is no setting that would disable that, so this is really not this module's fault. As for the hidden field, replace line 108 with the following and it will disappear (I'm too lazy to do a patch for this now..):
if ($default && $field['type'] != 'hidden') {
- field linking to the price - don't you have the price in the product pane?

And yes, CVS would be soooo helpful.. *poke the project maintainer*

Cheers,
Martin

leon kessler’s picture

Hi Martin,
Okay, sounding good. How much more have you got to do? Let me know if there's anything at all I can help with.

For linking a field with the price, this might seem a bit strange I know. I want to allow for a price to be changed during the checkout process. E.g. a customer is making a donation and wants to select an amount to donate.

I also want to make another module that allows additional checkout forms to be created, which can then be linked to particular products. So that when a customer checkouts with that product they are taken to that specific checkout form.

Obviously, these are quite specific requirements so I'm not suggesting they'd be included. But I'd be happy to adapt them somehow to become more suitable.

Thanks

Leon

arski’s picture

Hi Leon,

Thanks for the offer. I think I'll try to fix the array() thing in order review first and then that should be enough for now.. we really need to get the project in some repository somehow first..

I'll let you know when we make some progress.

Cheers,
Martin

Jonah Ellison’s picture

Hey Martin, it looks like you're pretty active in porting over this module to 6.x -- I'd be happy to give you CVS access if you would like to help maintain this module. What is your Drupal CVS username?

Thanks!
Jonah

arski’s picture

Hi Jonah,

Thank you very much for the support. I didn't realize that one needs to have a separate CVS account to maintain modules as I have never done so as yet, but I have just applied for an account and am hoping to get my application approved soon.

I'll let you know the details as soon as I get them.

Thanks again,

Martin

avpaderno’s picture

FYI, I approved arski's application, and granted him access to this project repository.

arski’s picture

That was quick, thanks a lot!

@Jonah: my CVS username is the same as the one here: "arski". Thanks.

@Leon: for your price-adjustment scenario I would check http://drupal.org/project/uc_donation first, it seems like that's exactly what you need :)

We can think about connecting different webforms to different products later, sounds like a nice feature. Might be worth checking if something similar doesn't exist already first :)

Cheers,
Martin

Jonah Ellison’s picture

Awesome, looks like you're all setup, Martin. Let me know if you need anything else (you can use my contact form on my user page). Thanks again for helping out with this module.

leon kessler’s picture

Hey Martin,

congrats!

I've tried out the uc_donation module, but it does not allow the price to be altered on the checkout page.

So my aim is to develop this module to allow a number input field to be linked with the price of a product type, and also associating the webform with product types (so that they only appear when that particular product is found in the cart on checkout).
I'm going to have to do this pretty soon as it's required for my current project.

I'll let you know how I get on, and if I bump into any other issues with the module along the way.

arski’s picture

Hi Leon,

Thanks.

I still think that the webform is not really required for your task. The main idea of having this additional webform on checkout is to have additional fields stored along with the order. You, however, don't need additional fields from what I gather - you want the price field of the product to be adjusted. Again, for that purpose I would go with hook_form_alter and add a new text field to the checkout form and then add a new #submit function to the form and adjust the product price in there.

As for the product-based webform - are you looking to make that dependent on product type or particular nodes?

Cheers,
Martin

arski’s picture

Hi Leon,

I got the "array" bug fixed now and I will upload the code to CVS tomorrow, getting too late now.

Just wanted to let you know in case you're waiting.

Cheers,
Martin

leon kessler’s picture

Hey Martin,

How are you getting on? I've started work on this now...

I'm going to enable the editing of webform order submissions through the pane_callback method. I think this would be a useful feature for the module (it was on the original developers todo's).

I'm really not too keen on the adding hidden field requirement. It's not necessary as we could link webform submissions with orders through the database. Cutting this out would also remove the need for the Webform Checkout Panes menu, as an extra field to confirm the webform as a checkout pane could just be added on the webform/node editing page.

Also, for my own plans of linking webforms to products and fields to prices. The new beta version of webform (6.x-3.0-beta1) allows you to attach webforms to other content types. This works quite nicely with what I want to do.

And another feature I'll need to add are tokens. That way webform data can be sent with the invoice rather than on separate emails.

Cheers
Leon

arski’s picture

Assigned: Unassigned » arski
Status: Active » Closed (fixed)

Hey Leon,

Sorry I had some busy days here. I finally put the code to a new 6.x branch and made a .dev release. This will pop up in 12 hours at latest for download.

Your ideas are all great, don't get me wrong. What I said about the hidden field is that my first priority is to port the module and get it to work in D6 as it is, regardless of the annoying hidden field :) If you have time to create a patch to make it work without the hidden field - it's very very welcome!

I think I should ask you to create separate issues for the ideas you've suggested (no hidden field, webform editing, tokens) - that would be the correct way to do this I guess. I'll close this issue now as D6 version is finally there - bug reports and feature requests welcome of course :)

Thanks again,
Martin

arski’s picture

Hi Leon,

I'm just wondering if you had any progress with your goals and if maybe you could share some of that with us?

Thanks,
Martin

leon kessler’s picture

Hi Martin,

I got sidetracked a bit and have still got quite a bit left to do, but will be going back to it next week.

One major thing I did was to change how the webform data was submitted with the order. Whereas before the data was submitted by the webform module, (which made it necessary to include a order_id hidden field). I changed it so that webform data was added to the $order->data object. I was then able to remove the order_id required field.
But I guess the disadvantage with that is you don't get to use the webform submit functions. So setting up email notifications won't work.

As I say I'm going back to it, so will keep you posted. Thanks.

arski’s picture

Hey Leon,

Thanks for the update.

So basically the only thing that the webform module does is generating the actual form and then it's not used at all anymore, right? So I guess if you go to that webform it wouldn't have any submissions either, as all the data is within the $order objects..

I have to think about it, but I'm not sure I really like this as this makes the combination of the two already messy modules (webform and uc) even messier if you know what I mean. Isn't it possible to submit the webform as it was done previously, then take the id of that submission and store that id in the $order->data object? Something like that would make more sense to me.

Anyway, I'll leave you to it and take a closer look myself when I got some more time.

Thanks again,

Cheers,
Martin

arski’s picture

PS. I created a new issue for this in #750466: Remove the order_id hidden field dependency so let's move this conversation there :)

Thanks.