How to use variable to control a visibility of a error message.

updated in .js file

if(condition){
           this.wizard.showShippingAddressValidation = true;
}
else{
           this.wizard.showShippingAddressValidation = false;
}

update in tpl

  {{#if showShippingAddressValidation}}
		<div class="order-wizard-shipmethod-module-message">
			{{translate 'Warning: Please enter a valid shipping address first'}}
		</div>
		{{/if}}

Leave a comment

Your email address will not be published. Required fields are marked *