Go to Contribution Page and the Receipt Email shows all the Price Set Items but along with it also shows Contribution Amount.
Before Adding defaultPriceSet from the above-mentioned method the $lineitem array structure is as given below
[line_item] => Array ( [5] => Array ( [25] => Array ( [price_field_id] => 9 [price_field_value_id] => 25 [label] => Guidebook 1 Cooktown to Gunnawarra [field_title] => guidebook selection [description] => [qty] => 1 [unit_price] => 30.000000000 [line_total] => 30 [participant_count] => 0 [max_value] => [membership_type_id] => [membership_num_terms] => [auto_renew] => [html_type] => CheckBox [financial_type_id] => 5 [tax_amount] => 0 [non_deductible_amount] => 0.00 [tax_rate] => 0.00000000 ) [32] => Array ( [price_field_id] => 10 [price_field_value_id] => 32 [label] => Up to 125 g (Weekenders) [field_title] => Postage and Handling [description] => [qty] => 1 [unit_price] => 5.000000000 [line_total] => 5 [participant_count] => 0 [max_value] => [membership_type_id] => [membership_num_terms] => [auto_renew] => [html_type] => Select [financial_type_id] => 5 [tax_amount] => 0 [non_deductible_amount] => 0.00 [tax_rate] => 0.00000000 ) [74] => Array ( [price_field_id] => 21 [price_field_value_id] => 74 [label] => Cap [field_title] => Cap [description] => [qty] => 1 [unit_price] => 20.000000000 [line_total] => 20 [participant_count] => 0 [max_value] => [membership_type_id] => [membership_num_terms] => [auto_renew] => [html_type] => Text [financial_type_id] => 5 [tax_amount] => 0 [non_deductible_amount] => 0.00 [tax_rate] => 0.00000000 ) [75] => Array ( [price_field_id] => 22 [price_field_value_id] => 75 [label] => BNT Sticker [field_title] => BNT Sticker [description] => [qty] => 2 [unit_price] => 4.000000000 [line_total] => 8 [participant_count] => 0 [max_value] => [membership_type_id] => [membership_num_terms] => [auto_renew] => [html_type] => Text [financial_type_id] => 5 [tax_amount] => 0 [non_deductible_amount] => 0.00 [tax_rate] => 0.00000000 ) [76] => Array ( [price_field_id] => 23 [price_field_value_id] => 76 [label] => Badge/Hat Pin [field_title] => Badge/Hat Pin [description] => [qty] => 2 [unit_price] => 10.000000000 [line_total] => 20 [participant_count] => 0 [max_value] => [membership_type_id] => [membership_num_terms] => [auto_renew] => [html_type] => Text [financial_type_id] => 5 [tax_amount] => 0 [non_deductible_amount] => 0.00 [tax_rate] => 0.00000000 ) )
After adding defaultPriceSet it adds New Line Item which is as given below
(
[1] => Array
(
[setID] => 1
[priceFieldID] => 1
[name] => contribution_amount
[label] => Contribution Amount
[priceFieldValueID] => 1
[membership_type_id] =>
[amount] => 1.000000000
[financial_type_id] => 1
)
)
How to get rid of this line item as it seems to show that user is charged twice as seen in below screenshot of email receipt
Ignore the price value ,just look into the Contribution Amount row the total of which is same as the total of other items in the table so I need to exclude Contribution Amount from the table of Receipt,what is the correct way to remove that.?
- I debugged and found that code under CRM/Price/BAO/PriceSet
CRM_Price_BAO_PriceSet
has a method which adds the row in the line itemgetDefaultPriceSet
. This method generates the Contribution Amount array, how to skip this so Email Receipt looks clean?
where when I use a Price Set with multiple values
checkbox values Material A $20.
select list Material B $30
textfield with quantity
Material C:- 1 * $20 = $20
the Receipt it prints has following rows
Material A . $20
Contribution Amount $70 (which is total of $20 + $30+ $20)
Material B . $30
Material C $20
(edited)
For a user point of view this looks very confusing
as Material A, Material B and Material C is already listed and . it does
not make sense to print Contribution Amount
I am using Civicrm 5.13.4 version