Skip to content

Instantly share code, notes, and snippets.

@danreb
Created September 15, 2012 18:24
Show Gist options
  • Save danreb/3729172 to your computer and use it in GitHub Desktop.
Save danreb/3729172 to your computer and use it in GitHub Desktop.
Override the Drupal Commerce cart summary using the theme preprocess function in either module or theme.
<?php
/*
* Implementation of hook_preprocess_commerce_line_item_summary
*
*/
// Replace the name of the hook with your theme or module name.
function HOOK_preprocess_commerce_line_item_summary(&$variables) {
// Replace the label ( default to Total ) with your own label
$variables['total_label'] = t('My New Label');
}
@danreb
Copy link
Author

danreb commented Sep 15, 2012

This is a code snippet for overriding defaults in Drupal commerce

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment