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) »
  • BUG: Missing Price Set Item/s & Membership Period in Receipts
Pages: [1]

Author Topic: BUG: Missing Price Set Item/s & Membership Period in Receipts  (Read 1256 times)

Generic

  • I post occasionally
  • **
  • Posts: 87
  • Karma: 4
  • CiviCRM version: 4.2.*, 4.5.*
  • CMS version: Joomla 2.5.*
  • MySQL version: 5.1.*
  • PHP version: 5.3.*
BUG: Missing Price Set Item/s & Membership Period in Receipts
October 10, 2012, 12:11:18 pm
Joomla 2.5.6
CiviCRM 4.2.*

Contribution, Membership with Price Set

If a payment is made using Paypal Pro (which doesn't use external processing) the CiviCRM receipt shows item names, membership start & end and has no 'Qty' column. Sreenshot receipt-pro.png

When payment is made using Paypal Standard (also happening with Sagepay processor and probably others) which are external payment processors, receipts are missing item names, membership start and end dates and the 'Qty' column is present. Sreenshot receipt-standard.png
« Last Edit: October 10, 2012, 12:14:32 pm by Generic »
Document everything!
Zim-Wiki

andyw

  • I post occasionally
  • **
  • Posts: 82
  • Karma: 4
  • CiviCRM version: 4.x
  • CMS version: Drupal, Joomla
Re: BUG: Missing Price Set Item/s & Membership Period in Receipts
October 10, 2012, 01:34:30 pm
Hi Generic,

Just got your email about this.

As it happens, I noticed some similar problems a year or so ago while developing some custom pdf receipts for one of our clients.

The best place to start looking is probably the system workflow messages in Message Templates ... 'Memberships - Receipt (on-line)' and/or 'Contributions - Receipt (on-line)'. I would insert {debug} into the top, then run a payment through and look at the email you get sent.

The debug statement will show you all the variables being passed into the template (which you'll see used later on to construct the receipt). It could be just a bug in the template, but if the problem is anything like we were seeing, you'll most likely see that some of these are missing or empty in the case of Sagepay and Paypal Standard.

The emails are sent from CRM/Core/BAO/MessageTemplates.php from the function sendTemplate(), and the template variables are passed to the template using the tplParams array in $params - I'm not sure of the exact set of function calls working up to that point, but you can insert a call to debug_backtrace() just before the email is sent to work that out, and trace the flow of execution back to where the template variables are originally populated.

Could be a tricky one if it's the same problem, I never got the bottom of it, but we were under a fair bit of pressure at the time.

The fact that it only occurs with billingMode 'notify' processors could be a lead though - that kind of suggests to me that it relies on some sort of session variable as the basis for populating those variables.

With that kind of processor, the transaction is completed by an anonymous call from the payment gateway - and so any session data relating to the user who made the payment is not going to be present at that point, whereas something like Paypal Pro completes the transaction with the user still on the site, and so has access to all of that.

Just a thought anyway. I hope that's of some use to you.

Also, we'll be releasing a beta extension to attach smart new pdf receipts to the confirmation email in the next week or so - it uses much of the code we developed for that client I spoke of, and is designed to produce really nice, professional looking receipts which won't crash your system during generation, unlike the current pdf receipts Civi has, which are disabled by default as a result of all the problems they cause.

It would be really good to get some people to test it and give feedback, so I might drop you a line about that if that's ok!

Andy
« Last Edit: October 10, 2012, 03:28:42 pm by andyw »
Andrew Walker, Developer at Circle Interactive

Generic

  • I post occasionally
  • **
  • Posts: 87
  • Karma: 4
  • CiviCRM version: 4.2.*, 4.5.*
  • CMS version: Joomla 2.5.*
  • MySQL version: 5.1.*
  • PHP version: 5.3.*
Re: BUG: Missing Price Set Item/s & Membership Period in Receipts
October 10, 2012, 04:05:31 pm
The item variables are being passed to the template in both Standard and Pro (field_title, label) but are not displaying in the Paypal Standard. End date and start date are missing from Paypal Standard. I can't get backtrace to work never have.

debug_backtrace();
    return array($sent, $subject, $text, $html);
  }

Oct 10 23:47:21  [info] Contribution record updated successfully

Oct 10 23:47:21  [info] Success: Database updated and mail sent

Paypal Standard
Code: [Select]
{$lineItem} Array (1)
0 => Array (2)
  981 => Array (11)
    qty => "1"
    label => "1 people"
    unit_price => "500.00"
    line_total => "500.00"
    price_field_id => "10"
    participant_count => "0"
    price_field_value_id => "11"
    field_title => "For Profit"
    html_type => "Select"
    description => null
    entity_id => "405"
  982 => Array (11)
    qty => "1"
    label => "Add Additional Memberships"
    unit_price => "500.00"
    line_total => "500.00"
    price_field_id => "11"
    participant_count => "0"
    price_field_value_id => "12"
    field_title => "Add Additional Memberships"
    html_type => "Text"
    description => null
    entity_id => "405"

Paypal Pro
Code: [Select]
{$lineItem} Array (1)
5 => Array (2)
  11 => Array (15)
    price_field_id => 10
    price_field_value_id => 11
    label => "1 people"
    field_title => "For Profit"
    description => null
    qty => 1
    unit_price => "500.00"
    line_total => 500
    participant_count => 0
    max_value => null
    membership_type_id => "7"
    auto_renew => null
    html_type => "Select"
    start_date => "01st Jan, 2012"
    end_date => "31st Dec, 2020"
  12 => Array (15)
    price_field_id => 11
    price_field_value_id => 12
    label => "Add Additional Memberships"
    field_title => "Add Additional Memberships"
    description => null
    qty => "2"
    unit_price => "500.00"
    line_total => 1000
    participant_count => 0
    max_value => null
    membership_type_id => null
    auto_renew => null
    html_type => "Text"
    end_date => "N/A"
    start_date => "N/A"
« Last Edit: October 10, 2012, 04:07:56 pm by Generic »
Document everything!
Zim-Wiki

Yashodha Chaku

  • Forum Godess / God
  • Ask me questions
  • *****
  • Posts: 755
  • Karma: 57
    • CiviCRM
Re: BUG: Missing Price Set Item/s & Membership Period in Receipts
October 10, 2012, 10:13:47 pm
Generic:

I verified the inconsistent behavior for pro and standard in the email receipts.
I will file/fix an issue for the same soon.

Thanks for catching this!
-Yashodha
Found this reply helpful? Contribute NOW and help us improve CiviCRM with the Make it Happen! initiative.

Yashodha Chaku

  • Forum Godess / God
  • Ask me questions
  • *****
  • Posts: 755
  • Karma: 57
    • CiviCRM
Re: BUG: Missing Price Set Item/s & Membership Period in Receipts
October 10, 2012, 11:01:52 pm
Filed http://issues.civicrm.org/jira/browse/CRM-11031 for your reference

-Yashodha
Found this reply helpful? Contribute NOW and help us improve CiviCRM with the Make it Happen! initiative.

Generic

  • I post occasionally
  • **
  • Posts: 87
  • Karma: 4
  • CiviCRM version: 4.2.*, 4.5.*
  • CMS version: Joomla 2.5.*
  • MySQL version: 5.1.*
  • PHP version: 5.3.*
Re: BUG: Missing Price Set Item/s & Membership Period in Receipts
October 11, 2012, 01:36:48 am
Thanks Yashodha

I see you put this over to 4.3 not 4.2.3, do you not think it will be an easy fix in 4.2.*?

Generic
Document everything!
Zim-Wiki

Yashodha Chaku

  • Forum Godess / God
  • Ask me questions
  • *****
  • Posts: 755
  • Karma: 57
    • CiviCRM
Re: BUG: Missing Price Set Item/s & Membership Period in Receipts
October 17, 2012, 12:48:16 am
Generic :

This has been fixed for 4.2.3 now :)

-Yashodha
Found this reply helpful? Contribute NOW and help us improve CiviCRM with the Make it Happen! initiative.

Generic

  • I post occasionally
  • **
  • Posts: 87
  • Karma: 4
  • CiviCRM version: 4.2.*, 4.5.*
  • CMS version: Joomla 2.5.*
  • MySQL version: 5.1.*
  • PHP version: 5.3.*
Re: BUG: Missing Price Set Item/s & Membership Period in Receipts
October 17, 2012, 03:03:48 pm
Thank you! good work!
Document everything!
Zim-Wiki

Generic

  • I post occasionally
  • **
  • Posts: 87
  • Karma: 4
  • CiviCRM version: 4.2.*, 4.5.*
  • CMS version: Joomla 2.5.*
  • MySQL version: 5.1.*
  • PHP version: 5.3.*
Re: BUG: Missing Price Set Item/s & Membership Period in Receipts
October 17, 2012, 04:09:34 pm
Is there an easy way I can switch on 'Qty', I'm using 'Text / Numeric Quantity' in price set so surely 'Qty' is still necessary in receipting.
Document everything!
Zim-Wiki

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviContribute (Moderator: Donald Lobo) »
  • BUG: Missing Price Set Item/s & Membership Period in Receipts

This forum was archived on 2017-11-26.