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) »
  • Creating customized/personalized Contribution Page (for CiviMember signup)?
Pages: [1]

Author Topic: Creating customized/personalized Contribution Page (for CiviMember signup)?  (Read 1193 times)

jimcraner

  • I’m new here
  • *
  • Posts: 20
  • Karma: 0
Creating customized/personalized Contribution Page (for CiviMember signup)?
December 21, 2011, 02:00:23 pm
Hi, we're running Civi 4.0.7 on D7.

We have an off-site app that collects information from site visitors and then uses the API to create a corresponding Civi contact record on our server.  Works great.

We then want to redirect the user to a customized contribution page (member signup) on the Civi site (as an anonymous user).  I have a script on the server that generates a checksum for the contact in question.  We are (apparently) creating the URL correctly: gid for the contact's civi ID, id for the Contribution Page ID, and cs for the checksum.  I have a couple of questions, though:

1) If I generate a checksum and contribution page URL for Contact 1 and visit the page, but then fill out the contribution page using Contact 2's email address, the resulting Membership is attached to Contact 2.  So the email address entered by the user overrides the gid and checksum in the URL.  Can anyone confirm if this is the expected behavior?  Or does this indicate that

2) Contact 1 has a Home Email and a Billing Email address on record.  However, when I generate a custom contribution page URL for Contact 1 and visit it, the form's Email Address field is blank.  Should it be prepopulated with one of the email addresses?  If it's not prepopulated, does that indicate that the custom URL isn't working and I'm just getting the default contribution page?

3) My goal is to remove the Email Address field on the Contribution Page form and replace it with a custom field.  Our Indiv Strict dupe rule is already set to match on that custom field so I want the anonymous user to hit the Contribution Page and see the custom field prepopulated (and ideally disabled) instead of the Email field that's on the default Contrib Page form. 

So my understanding is that I'd create a custom template to override the contribution page form, and in that template I'd replace the email-$blt field (and logic) with logic for my custom_19 field -- and then that custom field should be prepopulated when the user visits the page.  Is this feasible or am I overlooking an easier way to do this?

(Since many of our users don't have email addresses but do have unique membership IDs, we can't just use the CiviMail tokenized email trick.)

Thanks in advance for any help!
Jim

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: Creating customized/personalized Contribution Page (for CiviMember signup)?
December 21, 2011, 05:49:26 pm

1. the contactID GET var is: cid (not gid) . is contact id 1's email address loaded in the page (it should if the system detects a valid contact id and checksum)

2. yes, see 1 above

3. This might be a bit hard, since there is some amount of code (specifically the stuff that sends email / sends to payment processor) etc that assumes that email field will be there. I think it is doable, but i think its non-trivial

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

jimcraner

  • I’m new here
  • *
  • Posts: 20
  • Karma: 0
Re: Creating customized/personalized Contribution Page (for CiviMember signup)?
December 21, 2011, 06:17:40 pm
Thanks, Lobo!  I had used cid and gid in an earlier incarnation today and it gave me the "Sorry; Non-recoverable error occurred; Contribution has already been submitted" backtrace error.  But if those are the correct parameters then I'll have to figure out why that error is happening.

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: Creating customized/personalized Contribution Page (for CiviMember signup)?
December 21, 2011, 06:21:05 pm

make sure u send reset=1. Might also want to test/debug by clearing cookies on the browser u r testing from

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

jimcraner

  • I’m new here
  • *
  • Posts: 20
  • Karma: 0
Re: Creating customized/personalized Contribution Page (for CiviMember signup)?
December 22, 2011, 03:30:48 pm
We're using reset=1 in our URLs already and I can't duplicate the "contribution already recorded" error I was getting earlier so I'm considering this fixed.  Thanks again, Lobo!

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviContribute (Moderator: Donald Lobo) »
  • Creating customized/personalized Contribution Page (for CiviMember signup)?

This forum was archived on 2017-11-26.