I'm using UC_NC to sell sponsorships to an event with a sponsor=>sponsorship node=>product relationship. We want sponsor administrators to be able to create sponsors without having to go through the checkout process. Currently, uc_nc hijacks the node add form and there's no way around this.
It would be pretty simple to add a 'bypass uc_node_checkout' or similarly titled permission and not hijack the node add form with a drupal_goto when the user has this permission.
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | uc_node_checkout-954668.patch | 2.42 KB | drumm |
| #1 | 424886.patch | 1.22 KB | ezra-g |
Comments
Comment #1
ezra-g commentedPatch, and updating title to be slightly more accurate.
Comment #2
jamestombs commentedI would like to take this a bit further as I am importing a lot of content which is of a uc_node_checkout node type which is creating a huge cart for me when they should be skipping the cart and being created.
Something like changing:
To:
Then when importing using code or any other means you can simply add $node->skip_add_to_cart = 1 to avoid the basket.
Comment #3
drummI can't speak to #2, but #1 was used successfully for DrupalCon Chicago & I'm putting it in London.
Comment #4
drummI added another condition for admins to use the checkout process when they start from a buy now link.
Comment #5
aidanlis commentedSeems legit, will implement.
Comment #6
aidanlis commentedI'm not sure about the patch. It doesn't apply on -dev, but also I have a few concerns:
Line 292:
- Is it really safe to skip all of this set-up for an administrator?
- Would it not be better to redirect them earlier? Also where you have $_GET['product_nid']
- I assume you want !empty($_GET['product_nid']) to avoid E_NOTICE messages?
I don't have time to experiment with this so I'm going to move it back to needs work, sorry to shift the burden back!
Comment #7
aidanlis commentedComment #8
Neil C Smith commentedCame across this thread while looking at #424886: Permissions to bypass the checkout process (which incidentally is wrongly referenced in the patch in #1 above). Wanted to refer you to my comment there (#10). As far as we're concerned, that approach would seem to offer a better way of fulfilling both of these requests.
Comment #9
aidanlis commentedHappy to deal with this over there, then.