function template_preprocess_commerce_add_to_cart_confirmation in Commerce add to cart confirmation 1.x
Implements hook_preprocess_HOOK().
File
- ./
commerce_add_to_cart_confirmation.module, line 37 - Commerce add to cart confirmation module.
Code
function template_preprocess_commerce_add_to_cart_confirmation(&$variables) {
$variables['attributes']['class'][] = 'message-inner';
$variables['attributes']['class'][] = 'commerce-add-to-cart-confirmation';
// Add variation related class.
if ($variables['order_item']
->hasPurchasedEntity()) {
$variables['attributes']['class'][] = 'item-type--' . $variables['order_item']
->getPurchasedEntity()
->bundle();
}
}