Closed (fixed)
Project:
Userpoints Node Action
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Reporter:
Created:
4 Aug 2009 at 16:38 UTC
Updated:
13 Jun 2010 at 15:50 UTC
Can I redirect him or her to another page or possibly uc_node_checkout product?
Thanks,
Chris
Comments
Comment #1
socialnicheguru commentedThat way if someone does not have enough points, they can be redirected to a page or message or ubercart product to purchase more points.
chris
Comment #2
BillyMG commentedWell, this module doesn't depend itself on Rules, so it would be a little bothersome to create a dependency for just that functionality. More importantly, doesn't it seem like a bad idea to redirect a user when they're expecting a form submit? I think the right idea would be a customizable message that you could put a link in (so the user could open it in a new window). Then they could buy the points, return to the page, and try to submit again. This would probably be accomplished with a PHP input field where you could return a string that would appear as an additional message upon failure, but only be limited to the one message overall. This would be done because it would become complicated for an administrator to figure out on exactly which rule the user is unable to pay for (in case you have multiple rules with multiple rules acting on one user) and which error message they'll see from it. What do you think?
Comment #3
socialnicheguru commentedI like that. A simple click here and a new window would open.
It would be great if I could place the url and text that i want to see.
and then have the page that I am trying to submit be redirected to.
I say this because if you don't have enough points, you are not allowed to submit. It would be great if it gave me the option to submit as unpublished in a button if the error message comes up.
Comment #4
BillyMG commentedWell, that makes less sense to me as a feature. I apologize for any back-and-forth, but I'm trying to get a clear view of exactly the feature you're requesting, so I can try to implement it in the most accurate way. There is nothing stopping the user from unchecking the publish button and submitting again, which is the whole point of validating the form and being returned to the same form. If there was a customizable input box, you could say something like "You don't have enough !points to publish this, but you can click URL to purchase more." But that's not the same thing as a button that would submit as unpublished, since you can just manually do that. So, I can see that the general idea is to get a customizable message, in addition to the current messages, but is there anything else that this wouldn't address?
Comment #5
BillyMG commentedThe latest version contains a solution to this, pretty much. It's a system that allows for controlling the message that appears. The URL scheme kinda sucks, but it's the best I could think of. If there's a standard for this or a better idea, please let me know.
Comment #6
socialnicheguru commentedIt is nice. Thanks.
Is there a way for me to place php in there. I would like to use drupal_get_form to get a small block so a person can pay right there. Not sure if it will work but would like to try.
Comment #7
socialnicheguru commentedAlso, would there be a way to expose to rules whether the transaction was successful or not? That would be helpful. I could use rules to do whatever else I needed.
Thanks,
A
Comment #8
socialnicheguru commentedthe link I created did not open in another window.
Also might I suggest that you let people know that U% is needed? I thought it was an encoder error in reading a symbol at first. small thing I know.
The addition of the custom message box is a great solution
Comment #9
BillyMG commentedIn response to your three posts, in order:
I don't think that's a good idea. I avoided using PHP in the first place for several reasons. Mainly, I think it's somewhat of a hassle to deal with yet another permission to have to have PHP control over messages. Plus, these messages are supposed to be simple, and adding links really should be the most complicated thing you do with them. The only reason I came up with this (frankly, ridiculous) link scheme is to avoid having people need to use PHP to create links and not have to worry about pathing issues. I also didn't want to use another field so as not to constrain the number of links they have. I also believe that putting a form in the header may be a bit much. I am using drupal_set_message to set these down, and I don't think anything beyond some text and links would flow very well. Regardless, if anyone has any better ideas about how to do a linking structure, I'm very much open for suggestions. Worst comes to worst, I may have to just go back to the open PHP idea.
I will look into rules and see if there is a way to expose a rule for when someone tries to publish and is or isn't able to. Since that's a completely unrelated issue, could you start a new thread for it?
You are correct, I see the mistake I made. I will commit a change to dev to cover that issue, I'll put an update in when I've committed. If you have any ideas on what I could change the link symbols to, again, please let me know.
Comment #10
socialnicheguru commentedComment #11
BillyMG commentedWow, that seems a lot smarter than the crap I came up with. I've committed this to dev.
Comment #12
BillyMG commented