On the following admin page I have attempted to rename the label "Billing information".

admin/commerce/config/order/fields

I have updated it to something else and it has not changed the actual display label on the checkout/2 page. I am creating a commerce site with no money transactions so everything is 0.00 dollars. Therefore I want it to not be "Billing". There seems to be no way to change this.

CommentFileSizeAuthor
#5 1260382-billing_information_label.patch990 bytesamateescu
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

j0rd’s picture

Easiest way would be to use a string override override for "Billing information" in your settings.php (or using the string override module).

You might also be able to edit it using:
http://api.drupal.org/api/drupal/modules--field--field.api.php/function/... Perhaps.

You could probably also define your own via hook_customer_commerce_customer_profile_type_info() and disable the billing information one.

But yes, there appears no easy way to do this.

rszrama’s picture

Hmm, yeah, I guess the checkout pane is drawing its title directly from the customer profile type instead of the name of the field. I like the idea of using the name of the field, though... will have to think about it, but it should be trivial to implement if it makes sense.

switch13’s picture

I would like to see this too. I have a client that is simply requesting a quote so nothing is really being billed. Thanks!

subscribe

essbee’s picture

Ditto, did this get anywhere? I'd like to rename this to Billing and Shipping Information as I have added a second addressfiled within the single profile to hold shipping info.

amateescu’s picture

Version: 7.x-1.0 » 7.x-1.x-dev
Status: Active » Needs review
FileSize
990 bytes

I like the idea to use the field name as well, and if there's no field selected we should default to the customer profile type.

rszrama’s picture

Category: bug » feature
Status: Needs review » Fixed

Ok, I'm committing #5 as is. I tried to find problems with it but decided it's good enough. The main issue is that for this to be multilingual now, you must use some sort of field translation module... and I'm not sure if that means we need to be adding any translation code in here or not.

That said, a multilingual site would already need to be using field translation since the instance label appears elsewhere in the customer and admin UI. So it's not a regression so much as a lateral change. I'm going to document this change in the user's guide as well, so people know how to rename the pane's label.

rszrama’s picture

Documented this and rewrote the entire page at the same time. : P

http://www.drupalcommerce.org/node/356

Status: Fixed » Closed (fixed)

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

jatbhatti’s picture

Issue summary: View changes

Use t() instead of check_plain, This should work.

$checkout_panes['customer_profile_' . $type] = array(
- 'title' => $profile_type['name'],
- 'title' => !empty($instance['label']) ? check_plain($instance['label']) : $profile_type['name'],
+ 'title' => !empty($instance['label']) ? t($instance['label']) : $profile_type['name'],
'file' => 'includes/commerce_customer.checkout_pane.inc',
'base' => 'commerce_customer_profile_pane',
'page' => 'checkout',