Custom warning on when viewing cart (anonymous users) I am wondering with what mechanisms it would be possible to add a warning message to anonymous users viewing their cart saying: "Please log in with any of the listed services in order to proceed to checkout".

If possible I'd like to avoid changing the module's code in order to avoid future update problems.

Thanks for any help,
Best
The easiest way is overriding a default cart page template (cart page has been created with Views module, name - 'commerce_cart_form', display - 'default');


Create a template for Style Output
Copy the content of it
Views module provides logged_in variable in template_preprocess_views_view(&amp;$vars) function, so you can check with that variable and display a text;


example (views-view-table--commerce-cart-form--default.tpl.php):

&lt;?php if (!$logged_in): ?&gt;
  MY MESSAGE FOR THE ANONYMOUS
&lt;?php endif; ?&gt;

&lt;table &lt;?php if ($classes) { print 'class="'. $classes . '" '; } ?&gt;&lt;?php print $attributes; ?&gt;&gt;
  // Rest of code from Style Output
&lt;/table&gt;