9 replies [Last post]
rks_213's picture
Offline
Joined: 01/16/2011
Juice: 183
Was this information Helpful?

All the D6 file download instructions don't work for D7. Now that everything is in Rules instead of Conditional Actions it seems there are more things to do?

I've tried setting up the action "Send an order email regarding files" after setting the completed event.

However, one thing not mentioned in ANY tutorial and/or thread are the required Data Selectors. It says I have to set the Data Selector for Order and Data Selector for File Expiration. None of the selectors are intuitive and I have no idea what to do here.

Can someone either tell me what to do for this in D7 or at least point me to the relevant thread, documentation, or tutorial for setting this up in D7. All I want to do is send a customer an email with their link once they pay for something.

Thanks

rks_213's picture
Offline
Joined: 01/16/2011
Juice: 183
Re: D7 file downloads not working

I forgot to mention that in trying to use the selectors provided, no matter the choice you get the error "Value must be an integer" and "The integrity check failed with the following error message: "action uc_file_order_email: Missing configuration for parameter expiration."

This really sucks and is ubercounterintuitive.

Lyle's picture
Offline
AdministratoreLiTe!
Joined: 08/07/2007
Juice: 6846
Re: D7 file downloads not working

uc_file should already have that action set up. "Send an order email regarding files" should be attached to the rule "Notify customer when a file is granted", which is triggered by the event "E-mail for granted files". It's done that way because the event fills in the data selector for the expiration. It's bothersome that Rules will let you try to add that action to other rules, even though they don't have access to a file expiration in any way. I'm not sure if I have a way to tell Rules not to offer that option when it just won't work.

rks_213's picture
Offline
Joined: 01/16/2011
Juice: 183
Re: Re: D7 file downloads not working

Okay, I get that now. I wasn't working with the newest Dev release so those Rules weren't included. There's something like 6 rules that UC adds but the older release only had three of them.

Now that I have the correct Rule installed by UC, there seems to be other problems.

For one, uc_order.rules.inc on line 236 has the array set to 'integer' instead of 'text.' With that, you can't change any of the default Rules UC provides because you always get an integrity error telling you the message format (default filter/full HTML and php) must be an integer. I fixed that line but there has been no effect and I'm still getting the error. I'm looking through all the other rules files trying to see if that is anywhere else.

rks_213's picture
Offline
Joined: 01/16/2011
Juice: 183
Re: Re: Re: D7 file downloads not working

Ok. I fixed it. That same mistake was in uc_file.rules.inc and uc_roles.rules.inc. Changing 'integer' to 'text' fixed the problem.

I don't know if UC knows about this issue since it exists in their newest dev release but I will try to let them know. Thanks for your help! Cheers.

[EDIT:] BTW, how do I get a sweet Megaman badge?

Lyle's picture
Offline
AdministratoreLiTe!
Joined: 08/07/2007
Juice: 6846
Re: Re: Re: Re: D7 file downloads not working

I've got the very latest version from the Git repo, and all those things say 'text'. So I guess it'll be fixed in the next release.

As for Megaman, sorry but it was a one time thing way back in the day. I've actually been thinking about cleaning up some of the goofier badges that have been floating around.

rks_213's picture
Offline
Joined: 01/16/2011
Juice: 183
Re: Re: Re: Re: Re: D7 file downloads not working

Megaman goofy? You're crazy.

BTW, I saw you in another thread somewhere talking about adding new Data Selectors. Do you happen to know the URL to the documentation of the Data Selectors in UC? For example, there doesn't seem to be all the entries I need like [order:product-title] or something along those lines. I know the products are simply nodes so it might be order:node:title or something but I wanted to find out if there was any type of docs available on that.

Lyle's picture
Offline
AdministratoreLiTe!
Joined: 08/07/2007
Juice: 6846
Re: Re: Re: Re: Re: Re: D7 file downloads not working

All of the docs are inline on the Rules forms, really. The problem with order products is that you have to pick a specific product. Something like order:products:0:title for the first one, I think. I believe Rules has loops that can work with multi-value selectors, which let you apply a Rule set (a group of conditions and actions) to each item. Hopefully Rules has some more complete documentation somewhere.

rks_213's picture
Offline
Joined: 01/16/2011
Juice: 183
Re: Re: Re: Re: Re: Re: Re: D7 file downloads not working

Thanks, Lyle. I didn't know rules needed to select an actual product. This is worth investigating and I will continue over on that side. I'm going to dig deeper into their docs and see what I can find. If I can get it to work, I'll post back here so other UC users can see how to do it if they want. Thanks again for all your help.

j0rd's picture
Offline
Getting busy with the Ubercode.
Joined: 07/16/2008
Juice: 453
Re: D7 file downloads not working

There is a problem with this in Drupal 6, which may have got ported over to Drupal 7. Please read this issue queue and let me know if it's happening.

http://drupal.org/node/1227076