function xquantity_stock_xquantity_add_to_cart_not_available_msg_alter in Commerce Extended Quantity 8
Implements hook_TYPE_alter().
Allows to alter the 'quantity is not available' error message.
See also
\Drupal\commerce_xquantity\Form\XquantityAddTocartForm::validateForm()
File
- modules/
xquantity_stock/ xquantity_stock.module, line 45 - Contains xquantity_stock.module.
Code
function xquantity_stock_xquantity_add_to_cart_not_available_msg_alter(&$msg, $quantity, $purchased_entity) {
// $msg = t('Sorry, the %label is not available with the quantity %quantity.', [
// '%quantity' => $quantity,
// '%label' => $purchased_entity->label(),
// ]);
}