下单后付款/不同订单状态

发布于 2024-12-15 19:11:40 字数 155 浏览 7 评论 0原文

我正在建立一个 drupal 商务网站,我希望有一个功能可以让管理员处理订单并更改订单状态,然后用户收到一个电子邮件链接,将他重定向到付款页面。八个 drupal commerce 或 ubercart 可能实现这样的事情吗?

注意:uc_payafter 在 7.x 中不起作用

Im setting up a drupal commerce website and i would like the functionality to let an admin handle an order and change the order status, then the user recieves an email link which redirects him to the payment page. Is such a thing possible with eighter drupal commerce or ubercart?

Note: uc_payafter does not work in 7.x

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

享受孤独 2024-12-22 19:11:40

我认为您可以结合使用 Drupal Commerce 和规则,或许还可以进行一些调整来做到这一点。

据我了解,您的场景是这样的:

  1. 用户下了订单但未付款。
  2. 管理员查看订单并批准付款。
  3. 用户会收到一封电子邮件,提示他付款。
  4. 付款订单标记为完成。

商务部管理员已编辑订单状态。然后,您可以在发送付款电子邮件的规则中捕获该事件。最大的挑战将是干预结帐过程,阻止用户下订单后立即付款。

为此,您必须创建两个新的订单状态。有关以下信息,请参阅 http://www.drupalcommerce.org/faq/order-states如何做到这一点。我们将这些状态称为“等待批准”和“已批准”。

其余的应该更容易,不涉及编码:

  1. 创建一个页面,通知用户他的订单将很快得到审核和批准。

    创建一个页面

  2. 创建规则来注入我们的新状态:

    • 事件:保存订单之前
    • 条件:对比数据,订单状态不变为购物车
    • 条件:比较数据,更新后的订单状态为“已结账”
    • 操作:将订单状态设置为等待批准
  3. 创建规则以阻止用户结帐:

    • 事件:Drupal 正在初始化
    • 条件:比较数据,页面路径包含“checkout”
    • 条件:比较数据,当前订单状态为等待批准
    • 操作:将用户重定向到您在第 1 步中创建的信息页面

      现在,当用户尝试结账时,订单会被标记为等待批准,并且用户会被引导到信息页面。管理员现在可以自由编辑订单并将其状态更改为“已批准”。我会推荐:

  4. 创建所有处于等待批准状态的订单的视图,包括“编辑”链接。

    然后,要完成该过程:

  5. 创建一条规则,通知用户其订单已获批准付款:

    • 事件:订单已更新
    • 条件:订单状态已批准
    • 操作:向用户发送电子邮件
  6. 创建允许用户付款的规则:

    • 事件:Drupal 正在初始化
    • 条件:比较数据,页面路径包含“checkout”
    • 条件:比较数据,当前订单状态为已批准
    • 操作:将订单状态更改为“结账”

从这里开始,结帐过程将照常进行,直至完成。

请注意,如果用户在任何时候在结帐过程中点击“取消”,订单将恢复为购物车状态,并且需要管理员再次批准。如果您不希望这种情况发生,您可以将“取消”链接主题设置为优雅的“消失”。

I think you can do this with a combination of Drupal Commerce and Rules and perhaps some tweaking.

As I understand it, your scenario goes like this:

  1. User places an order but doesn't pay.
  2. Admin overviews the order and approves it for payment.
  3. User is sent an email prompting him to pay.
  4. Paid order is marked as complete.

Commerce already the admin edit the order's status. You can then catch that event in a Rule that sends out the payment email. The greatest challenge will be intervening in the checkout process, to stop the user from paying right after placing his order.

For this, you'll have to create two new Order Statuses. See http://www.drupalcommerce.org/faq/order-states for information on how to do that. Let's call these statuses "Awaiting Approval" and "Approved".

The rest should be easier, with no coding involved:

  1. Create a page informing the user that his order will be reviewed and approved soon.

  2. Create a Rule to inject our new status:

    • Event: Before Order is being saved
    • Condition: Compare data, unchanged order status is Shopping Cart
    • Condition: Compare data, updated order status is Checkout
    • Action: Set the order status to Awaiting Approval
  3. Create a Rule to prevent the user going to checkout:

    • Event: Drupal is initializing
    • Condition: Compare data, page path contains "checkout"
    • Condition: Compare data, current order status is Awaiting Approval
    • Action: Redirect user to the information page you created in step 1

      Now when the user tries to check out, the order gets marked as Awaiting Approval, and the user gets shunted to the information page. The admin is now free to edit the order and change its status to Approved. I would recommend:

  4. Create a view of all orders in Awaiting Approval status, including "edit" links.

    Then, to complete the process:

  5. Create a Rule informing the user his order was approved for payment:

    • Event: Order was updated
    • Condition: Order status is Approved
    • Action: Email user
  6. Create a Rule allowing the user to pay:

    • Event: Drupal is initializing
    • Condition: Compare data, page path contains "checkout"
    • Condition: Compare data, current order status is Approved
    • Action: Change order status to Checkout

From here, the checkout process will proceed as usual until it's done.

Note that if at any point, the user hits "Cancel" on the checkout process, the order will revert to Shopping Cart status and will need to be approved again by the admin. If you don't want this happening, you can theme the "cancel" link to elegantly "disappear".

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文