cancel
Showing results for 
Search instead for 
Did you mean: 

Reorder Button on email template

SOLVED

Reorder Button on email template

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 Smiley Very Happy

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Reorder Button on email template

@rui_silva1 

 

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.

Manish Mittal
https://www.manishmittal.com/

View solution in original post

1 REPLY 1

Re: Reorder Button on email template

@rui_silva1 

 

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.

Manish Mittal
https://www.manishmittal.com/