- Posts: 6
- Thank you received: 0
Questions about Payment Form extension
FORM_AMOUNT in field fee calculations
- mrjansen
- Topic Author
- Offline
- New Member
Less
More
14 years 1 month ago #5189
by mrjansen
FORM_AMOUNT in field fee calculations was created by mrjansen
I think that for a text field, it would be more useful to offer FEE_AMOUNT as an additional parameter available in the field calculation.
As it stands, in your helper/fields.php file, the code only looks for two things:
Why not offer [FEE_VALUE], from the "Fee Values" field???
The reason I ask is that I integrated the component with a membership level, pulled from Community Builder.
The form amount changes dynamically based on membership type, but I set the Form Amount as "0" and am calculating the totals based on the FEE mapping.
This would be quite useful for more dynamic Form values, based on membership levels (as specified in CB).
As it stands, in your helper/fields.php file, the code only looks for two things:
Code:
$formula = str_replace('[FORM_AMOUNT]', $formAmount, $formula) ;
$formula = str_replace('[FIELD_VALUE]', $postedValue, $formula ) ;
Why not offer [FEE_VALUE], from the "Fee Values" field???
The reason I ask is that I integrated the component with a membership level, pulled from Community Builder.
The form amount changes dynamically based on membership type, but I set the Form Amount as "0" and am calculating the totals based on the FEE mapping.
This would be quite useful for more dynamic Form values, based on membership levels (as specified in CB).
Please Log in or Create an account to join the conversation.
- Tuan Pham Ngoc
- Offline
- Administrator
14 years 1 month ago #5220
by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Re: FORM_AMOUNT in field fee calculations
Hi
The [FORM_AMOUNT] tag is only used for textbox field type. For your membership fields, I think you can use radiolist custom field type. In this case, the fee will be calculated based on the fee values field .
Please have a look at joomdonation.com/index.php?option=com_co...icle&id=70&Itemid=54 to see the sample custom field which I created for membership .
Thanks,
Tuan
The [FORM_AMOUNT] tag is only used for textbox field type. For your membership fields, I think you can use radiolist custom field type. In this case, the fee will be calculated based on the fee values field .
Please have a look at joomdonation.com/index.php?option=com_co...icle&id=70&Itemid=54 to see the sample custom field which I created for membership .
Thanks,
Tuan
Please Log in or Create an account to join the conversation.
- azurelink
- Offline
- Senior Member
Less
More
- Posts: 48
- Thank you received: 0
13 years 3 months ago #11237
by azurelink
Replied by azurelink on topic Re: FORM_AMOUNT in field fee calculations
admin wrote:
Tuan,
Does this mean that in spite of what it says in the Payment Form component about the Fee Formula only being "applied for textbox field type", that I can use a field formula like this "[FORM_AMOUNT]*.1" in conjunction with a radiolist field type? I need a way to apply a 10% discount to the price.
In my case, I have a Dropdown field type designated as a Fee Field which I need to apply a 10% discount to, if the above Radiolist field is clicked.
Please advise at your earliest convenience.
Thanks,
azurelink
Hi
The [FORM_AMOUNT] tag is only used for textbox field type. For your membership fields, I think you can use radiolist custom field type. In this case, the fee will be calculated based on the fee values field .
Please have a look at joomdonation.com/index.php?option=com_co...icle&id=70&Itemid=54 to see the sample custom field which I created for membership .
Thanks,
Tuan
Tuan,
Does this mean that in spite of what it says in the Payment Form component about the Fee Formula only being "applied for textbox field type", that I can use a field formula like this "[FORM_AMOUNT]*.1" in conjunction with a radiolist field type? I need a way to apply a 10% discount to the price.
In my case, I have a Dropdown field type designated as a Fee Field which I need to apply a 10% discount to, if the above Radiolist field is clicked.
Please advise at your earliest convenience.
Thanks,
azurelink
Please Log in or Create an account to join the conversation.
- azurelink
- Offline
- Senior Member
Less
More
- Posts: 48
- Thank you received: 0
13 years 3 months ago #11243
by azurelink
Replied by azurelink on topic Re: FORM_AMOUNT in field fee calculations
Oh, I just reread your post Tuan and now see that you said the "fee will be calculated based on the fee values field" instead of using the Fee Formula. Sorry
Please Log in or Create an account to join the conversation.
Moderators: Tuan Pham Ngoc
Support
Documentation
Information
Copyright © 2024 Joomla Extensions by Joomdonation. All Rights Reserved.
joomdonation.com is not affiliated with or endorsed by the Joomla! Project or Open Source Matters.
The Joomla! name and logo is used under a limited license granted by Open Source Matters the trademark holder in the United States and other countries.
The Joomla! name and logo is used under a limited license granted by Open Source Matters the trademark holder in the United States and other countries.