1
Answers
Vote up!
1
Vote down!

How to customize default text in "Display an Add to Cart message" rule?

I would like to customize the text displayed in the "Display an Add to Cart message", so that it is easy for users to notice. Where do I edit the default text for the "Display an Add to Cart message"?

Asked by: Brylie Oxley
on April 22, 2014

1 Answer

Vote up!
0
Vote down!

The Add to Cart message is displayed via Rules in response to the "After adding a product to the cart" event. The rule configuration that does this uses a special action called "Display a translatable Add to Cart message" that does not allow the message itself to be configurable; this is how we are able to enforce translatability.

Fortunately, since it's powered by Rules, you can edit that configuration or just disable it and create a new one that you manage in code to display the message you want using the generic "Show a message on the site" action.

Another module that may interest you is the Commerce Add to Cart Confirmation module that really brings the Add to Cart message front and center via a modal dialogue and Views powered output. This is the module Commerce Kickstart 2.x uses to show the popup after the Add to Cart form is submitted.

Ryan Szrama
Answer by: Ryan Szrama
Posted: Apr 23, 2014

Comments