Developer forum

Forum » Development » Alert from Ecommerce.Notification

Alert from Ecommerce.Notification

Kurt Moskjær Andersen
Kurt Moskjær Andersen
Reply

Hi,

I'm subscribing to the Ecommerce.Cart.Line.Added notification and would like to send an alert to the user, when certain products are added to the cart.

It is possible to add a session-variable in the subscriber, which triggers an alert in the master-template, but I would like to give an alert right away, instead of waiting for a page-refresh.

I've seen mentions about a "tag", which I think could be used, but cannot find it in the documentation at the moment.

--
Best regards
Kurt Moskjaer Andersen


Replies

 
Nicolai Pedersen
Reply
This post has been marked as an answer

Hi Kurt

An add to cart command will trigger the above notification and will result in a redirect back to the page where the add to cart was started - so using a session should work. Unless of course you have a different flow.

The "tag" thing does not ring a bell for me...

BR Nicolai

Votes for this answer: 1
 
Kurt Moskjær Andersen
Kurt Moskjær Andersen
Reply

Hi Nicolai,

The add to cart command is issued using ajax, but it doesn't redirect to the page, where the add to cart was started.

Regarding the "tag", I remember being told, that a developer could set a tag, which could be read on the frontend - like a session.

Thanks for your response.

/Kurt

 
Nicolai Pedersen
Reply

Hi Kurt.

ok, in json scenario you do not get the redirect. Instead you get a json response - and as part of that response you should add the message and react on it on the calling page to show it.

Is the tag a Rapido thing maybe?

 

You must be logged in to post in the forum