Accessing the customer using the script editor

Highlighted
New Member
2 0 2

Hi,

 

I'm receiving an error when trying to access the customer object using the Script Editor app.

[Error] undefined method 'customer' for main
for tag in customer.tags
  puts tag 
end

 

I have a customer added under the "Order Preview" in the editor. What am I doing wrong here?

 

Thank you for any assistance!

0 Likes
Highlighted
New Member
2 0 2

Ah, I figured it out, I needed to do 

Input.cart.customer.tags

 

2 Likes