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:

Eenglish

Regards

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:

https://github.com/vtex/vtex.js/tree/master/docs/checkout

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: https://documenter.getpostman.com/view/94611/oms/Hs41#e49063d5-ead1-9d5f-edb2-944bacff197b