How to access to customer's current order information in the frontend?

I need know the state information of the current order, if the customer has login in the web. Does exists any way to know this?? Thank you!!

Hey Saul,

At Data Layer you could get this information through "VisitorLoginState" parameter:



Thank yoy so much! but i don't need this... I need information about the current customer order, because i need show this information into a banner in the frontend

You have to use the orderform:

vtexjs.checkout.getOrderForm() .done(function(orderForm) { console.log(orderForm); });

Maybe i din┬┤t explain very well, this function that you show the future posible order with the current items in the cart, but i need the information about the most recent order that the customer has doing. Thank you so much @caio martinsÔÇő !

Maybe you need the Orders API: