I would like to request to give us a way (whether by a hook or admin interface) that allows us to change the price labels. For instance, instead of the label "List Price", we want it to say "Regular Price".

Comments

recrit’s picture

Version: 7.x-1.3 » 7.x-1.x-dev
Status: Active » Fixed

There is hook added to the dev version per http://drupalcode.org/project/commerce_price_savings_formatter.git/commi...
hook_commerce_price_savings_formatter_prices_alter(&$formatted_prices, $context)

Another method would be a theme preprocess hook that altered the $vars['prices'].

recrit’s picture

Status: Fixed » Closed (works as designed)
roball’s picture

Category: Feature request » Support request
Issue summary: View changes
Status: Closed (works as designed) » Fixed

I accomplished this by adding the following code to MYMODULE.module:

/**
 * Implements hook_commerce_price_savings_formatter_prices_alter().
 */
function MYMODULE_commerce_price_savings_formatter_prices_alter(&$formatted_prices, $context) {
  if (isset($formatted_prices['list']['label'])) {
    $formatted_prices['list']['label'] = 'Regular price';
    // Default: 'List price'
    $formatted_prices['price']['label'] = 'Now only';
    // Default: 'Price'
  }
}

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.