Developer forum

Forum » Ecommerce - Standard features » Reorder notification subscriber

Reorder notification subscriber

Niels Foldager
Reply

Hi Dynamicweb,

Is it somehow possible to capture the event that happens when we use the Reorder functionality from "My orders" list?

We want to be able to show the user which products that have not been added to the basket because they are not in stock or are no longer available. By using the Cart.Line.Removed notification subscriber it is only posible to get the products that are not active anymore. If a product is out of stock, we don't have the posibility to see that the product is not added to the basket. We have also tried using a BeforeRemovingNonExistingProducts notification subscriber without success.

Any suggestions?

Best regards,
Niels Foldager


Replies

 
Nicolai Pedersen
Reply

You can listen for a Context.Current.Request("ReorderId") which is in the querystring. That will contain the id of order from which reordering should take its products. That you can use to detect that it is happening.

Then cart added and cart removed notifications will fire for each orderline. If it is not in stock, the CartLineRemoved should also trigger. But of course not if you re-order 2 and only one is in stock...

But you can also simply take the order in the reorderid and compare with the cart orderlines in the end, and see what products and quantities are not there.

 

You must be logged in to post in the forum