1

Durpal 6, Ubertcart 6.x-2

We are selling table space to vendors at an upcoming convention. We want to let them apply but wait for admin approval before they can pay. I've been searching for several days but cannot find a solution.

Is there a way to require admin approval of a sale before moving to the payment process?

Edit: I have no way of telling that they are vendors until they purchase a vendor table.

1 Answer 1

0

There's many ways to go about this but I would use Rules & custom Role called Vendor. You can specify on Drupal load if a user doesn't have a Vendor role & is loading the cart/checkout page. That you can redirect them to your application form with a message prompting them to apply before checkout.

Here's an example rule:

{ "rules_check_vendor" : {
    "LABEL" : "Check Vendor",
    "PLUGIN" : "reaction rule",
    "OWNER" : "rules",
    "TAGS" : [ "test" ],
    "REQUIRES" : [ "rules" ],
    "ON" : { "init" : [] },
    "IF" : [
      { "text_matches" : {
          "text" : [ "site:current-page:path" ],
          "match" : "cart\/checkout",
          "operation" : "starts"
        }
      },
      { "NOT user_has_role" : {
          "account" : [ "site:current-user" ],
          "roles" : { "value" : { "3" : "3" } }
        }
      }
    ],
    "DO" : [
      { "drupal_message" : { "message" : "In order to become a vendor. Please contact us." } },
      { "redirect" : { "url" : "contact" } }
    ]
  }
}
2
  • Shawn, I will not know they are vendors until they've purchased a vendor table.
    – jdcllns
    Commented May 12, 2015 at 15:03
  • The idea is flagging accounts via a role to complete purchase with a redirect to some place to apply (thus, not having to rework to checkout workflow). This assumes you're only selling vendor booths and you're going to have people register accounts before checkout.
    – Shawn Conn
    Commented May 12, 2015 at 16:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.