CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviContribute (Moderator: Donald Lobo) »
  • Edit or remove "Billing name and address" block for Authorize.net
Pages: [1]

Author Topic: Edit or remove "Billing name and address" block for Authorize.net  (Read 1158 times)

Sean Madsen

  • I post occasionally
  • **
  • Posts: 98
  • Karma: 5
  • CiviCRM implementer/developer
    • Bikes Not Bombs
  • CiviCRM version: 4.6
  • CMS version: Drupal 7
Edit or remove "Billing name and address" block for Authorize.net
February 27, 2013, 02:38:33 pm
I'm using Authorize.net to process payments for an event registration. I have address verification and card code verification turned off in Authorize.net, so the only info Authorize.net needs to process a transaction is the card number, exp, and amount. It doesn't even need a name. So can I get rid of the "Billing name and address" block in CiviCRM then that shows up after the credit card information?

I actually do want to collect address info, but it makes for a very awkward form as it's presented, given that I want to collect phone number too, and I don't actually care about the billing name -- I want the participant name. So for example if a teen is registering using a parent's credit card, I want to end up with the teen's name registered for the event and not the parent's name. I don't want to have two name fields because that will just be redundant for most users.

The simplest solution I can think of is to eliminate the billing info block entirely since it's not necessary to process the transaction, and then use regular profile fields to collect the participant's name/address/phone. I suppose it would also work if I could add the phone number field to this block and change the wording to delete the word "billing".

I'm okay with hacking core files if it gets rid of that pesky billing info block. Would love some guidance in the right direction. Thanks!

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Edit or remove "Billing name and address" block for Authorize.net
February 27, 2013, 03:24:50 pm

hey sean:

you potentially can get rid of it, but i would advise against it.

the code assumes it is needed and checks for it in a few places. I suspect it will spit out notices etc if it does not find them.

That said, if u really need to do it, check:

CRM/Core/Payment/Form.php and
templates/CRM/Core/BillingBlock.tpl

let us know how things go

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

Chris Burgess

  • Ask me questions
  • ****
  • Posts: 675
  • Karma: 59
Re: Edit or remove "Billing name and address" block for Authorize.net
October 14, 2013, 04:56:16 pm
In 4.x, there's a "Billing address is same as ..." checkbox which hides the fields.

But! It hides them, even if there's a required field in that block which is unpopulated. Which is really confusing for people.

I worked around this with a hook_civicrm_buildForm() implementation to ignore the required status on those fields.

Here: https://gist.github.com/xurizaemon/6984345
@xurizaemon ● www.fuzion.co.nz

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviContribute (Moderator: Donald Lobo) »
  • Edit or remove "Billing name and address" block for Authorize.net

This forum was archived on 2017-11-26.