info_messages.vm

Displaying messages from the server on system pages is usually handled within a reusable script.  This script can be named anything, but it's a strong convention within StoreFront themes to use the name info_messages.vm.  UltraCart recommends staying with that convention to aid support efforts should you ever need help troubleshooting a theme.

Listed below is a sample from the original StoreFront theme.   Your theme may style the markup differently, but the process will remain the same:  

  1. if there are any messages, then
  2. iterate through the messages array
  3. display the message

 

## these two comments at the top aid code editors to provide syntax check and intellisense.
## they're not required, but leaving them might help if UltraCart support becomes involved.#* @vtlvariable name="i18n" type="com.bpsinfo.storefront.tobjects.I18nWriter" *#

#* @vtlvariable name="formSupport" type="com.bpsinfo.storefront.tobjects.FormSupport" *#
 
## $formSupport is a top level variable accessible by all system screens (non-catalog)
#if($formSupport.infoMessages.size() > 0)
	#foreach($msg in $formSupport.infoMessages)
		<div class="row no-margin-top">
			<div class="columns small-full">
				<div class="alert info">
					<div class="message">$!msg</div>
				</div>
			</div>
		</div>
	#end
#end