On a D7 site I maintain we're seeing a lot of the following error when an anonymous visitor goes from the cart page to the checkout page:

User:	Anonymous (not verified)
Location	https://example.com/checkout/27013
Referrer	https://example.com/cart
Message	Unable to get variable commerce_order, it is not defined.

FWIW there's a rule configured that uses the "commerce_rules_extra_process_checkout_page" rules condition.

Comments

DamienMcKenna created an issue. See original summary.

damienmckenna’s picture

This error is also logged when the visitor performs operations that result in an AJAX request, e.g. they fill in an email address and the system checks if an account exists for them.

damienmckenna’s picture

Project: Commerce Core » Commerce Rules Extra
Component: Checkout » Code

This comes from Commerce Rules Extra.

damienmckenna’s picture

Status: Active » Needs review
StatusFileSize
new1.35 KB

The problem appears to be that when the rule is initiated the order isn't passed in.

Does this work?

damienmckenna’s picture

Title: "Unable to get variable commerce_order" error during checkout for anonymous visitors » "Unable to get variable commerce_order" error loading checkout pages
Issue summary: View changes
perignon’s picture

I do not have a way of testing this any longer. So I will go off your word that it addressed the problem.

  • Perignon committed e04354a on 7.x-2.x
    Issue #3320775 by DamienMcKenna: "Unable to get variable commerce_order...
perignon’s picture

Status: Needs review » Fixed

Committed to 7.x-2.x

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.