Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
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.
Comment | File | Size | Author |
---|---|---|---|
#5 | 1260382-billing_information_label.patch | 990 bytes | amateescu |
Comments
Comment #1
j0rd CreditAttribution: j0rd commentedEasiest 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.
Comment #2
rszrama CreditAttribution: rszrama commentedHmm, 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.
Comment #3
switch13 CreditAttribution: switch13 commentedI would like to see this too. I have a client that is simply requesting a quote so nothing is really being billed. Thanks!
subscribe
Comment #4
essbee CreditAttribution: essbee commentedDitto, 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.
Comment #5
amateescu CreditAttribution: amateescu commentedI 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.
Comment #6
rszrama CreditAttribution: rszrama commentedOk, 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.
Comment #7
rszrama CreditAttribution: rszrama commentedDocumented this and rewrote the entire page at the same time. : P
http://www.drupalcommerce.org/node/356
Comment #9
jatbhatti CreditAttribution: jatbhatti commentedUse 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',