1

In the Deal details page I want to add a new button Pay Now and then user clicks it, then redirects to the checkout/orderId page. How is it possible ? Please help.

1 Answer 1

0

Use a rule. Example:

{ "rules_forward_user_directly_to_checkout" : {
    "LABEL" : "Forward user directly to checkout",
    "PLUGIN" : "reaction rule",
    "OWNER" : "rules",
    "TAGS" : [],
    "REQUIRES" : [ "commerce_order", "rules", "commerce_cart" ],
    "ON" : { "commerce_cart_product_add" : [] },
    "IF" : [],
    "DO" : [ { "redirect" : { "url" : "checkout" } } ]
  }
}

Note that you don't need to redirect to checkout/%order_id, you just need to redirect to checkout and Commerce will take care of the rest.

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.