Developer forum

Forum » Development » Ecommerce before line is added to cart observer

Ecommerce before line is added to cart observer

Harald Brouwers
Reply

Hello,

We would like to check the contents of a cart, before a new product is added.

Is there an observer available wich triggers before a product/line is added to an existing cart? We are running DW 9.3.1.

Greetings Harald


Replies

 
Nicolai Pedersen
Reply

Hi Harald

I think this is the one:

https://doc.dynamicweb.com/api/html/df478de0-86e7-891c-04e4-c62faf2528bc.htm

Otherwise you can find a lot more here: https://doc.dynamicweb.com/api/html/59a82bc6-cce3-1592-2901-70342df8694f.htm

 
Harald Brouwers
Reply

Hi Nicolai,

I already found that one, but thought it was triggered after the product was added to the cart.

This because the description says: "Provides information about the added product. "

Can you confirm it is triggered before the product is added?

Thanks!

 
Anders Ebdrup
Anders Ebdrup
Reply

Hi Harald,

 

As I see it, this notification is only triggered after the product has been added. So if you are using stock check and do not have enough in stock, then this nofication subscriber is not fired.

 

Best regards, Anders

 

You must be logged in to post in the forum