Thursday, March 5, 2015

Status messages not removing with Commerce Ajax Cart

Use ajax_command_remove() command to remove the existing error messages while submit ajax add to cart button

$commands[] = ajax_command_remove('div.messages');
$commands[] = ajax_command_after('#main-content', theme('status_messages'));