11

One of the first things we're asked to change in any installation is the billing block:

Billing fields

Nothing too fancy, just some changes to layout and labels, usually yielding something along the lines of

Billing fields, revised layout

This was for a long time a simple matter of copying BillingBlock.tpl to create a custom template (customtemplates/CRM/Core/BillingBlock.tpl), as indicated in the wiki. But the hard-coded billing fields were removed in 4.6, and instead we they are printed out from the $billingDetailsFields array.

While I can't fault this from a technical perspective, I do wonder what would be the best practice as far as manipulating the layout and order for this form goes now. In the override template, would we remove the for block and output the old fields one by one? Is there a place where these values can be changed in the db or even through the admin UI?

3
  • 2
    I wish civi would implement a feature like Display Suite so that when editing a profile one could add fields that cause other fields to appear inline.
    – frTommy
    Commented May 9, 2015 at 17:35
  • Hi choster, did you manage to get your template working with civi 4.6? Do you mind to share please?
    – Tapash
    Commented Dec 23, 2015 at 21:36
  • @Tapash I didn't. Our organization is dropping support for CiviCRM.
    – choster
    Commented Dec 23, 2015 at 21:39

2 Answers 2

3

Your best option is to do what you were doing previously.

However, you will need to modify your customized template to extract details from the $billingDetailsFields array rather than the hard coded fields. I suspect the names are the same, so the translation should be relatively simple. You can use smarty debug to get more details on the contents of the array.

2

I would think the previous billingblock.tpl could still be a basis. All the individual fields are still assigned to the template (as required), it's just that an array of fields to show is assigned too ... & this is iterated through to show the fields.

Your layout DOES look better :-)

3
  • Agree it looks better except for one nitpick: putting state before country affects usability since they need to be selected in reverse order.
    – Coleman
    Commented May 21, 2015 at 19:19
  • Could the change be done in css with no override?
    – eileen
    Commented May 21, 2015 at 21:33
  • Definitely maybe.
    – Coleman
    Commented May 22, 2015 at 1:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.