Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
We are currently implementing a custom checkout process that doesn't use the cart. So we initiate the checkout process by visiting checkout/%commerce_order, rather than the cart working it out.
However, the following code hardcodes a link with the cart submodule.
commerce_checkout_progress.module Line 153
// Option to display back pages as links.
if ($link) {
// Load the *shopping cart* order. It gets deleted on last page.
if ($order = commerce_cart_order_load($GLOBALS['user']->uid)) {
$order_id = $order->order_id;
}
}
I think it should be reasonably easy to work it out, I'll create a possible patch.
Comment | File | Size | Author |
---|---|---|---|
#1 | commerce_checkout_progress-allow_non_cart_checkout_process-1801866-1.patch | 1.31 KB | andrewbelcher |
Comments
Comment #1
andrewbelcher CreditAttribution: andrewbelcher commentedSo this checks whether we're on a checkout/%commerce_order page and if so get's the order_id from the path rather than from cart. It also checks whether cart is enabled before calling the cart function.
Comment #2
andrewbelcher CreditAttribution: andrewbelcher commentedDuplicate of #1948096: Silent and unneccesary dependency on commerce_cart