Hey,
I have some crons sending emails, one of them is cancelling an order because of missing payment, in that same email I want to add a Reorder button that send to cart with all the data needed to just complete the order, just like the one in customers profile.
And is it possible to do this to an orders where the customers wasn't logged in? If yes how do I do this?
Thanks
Solved! Go to Solution.
I dont think Magento provide native feature to reorder for guest users. so in my understanding this should not be done with native.
But you can try at your end using below shared controllers to create reorder functionality:
The controllers for sales/guest/view, Magento\Sales\Controller\Guest\View
and sales/guest/reorder, Magento\Sales\Controller\Guest\Reorder
are using the same helper class, Magento\Sales\Helper\Guest
to validate the guest has access to an order.
The controllers are loading the order using Magento\Sales\Helper\Guest::loadValidOrder
which uses a few methods to validate the guest.
Try these.
I dont think Magento provide native feature to reorder for guest users. so in my understanding this should not be done with native.
But you can try at your end using below shared controllers to create reorder functionality:
The controllers for sales/guest/view, Magento\Sales\Controller\Guest\View
and sales/guest/reorder, Magento\Sales\Controller\Guest\Reorder
are using the same helper class, Magento\Sales\Helper\Guest
to validate the guest has access to an order.
The controllers are loading the order using Magento\Sales\Helper\Guest::loadValidOrder
which uses a few methods to validate the guest.
Try these.