Remove options from the Tribute / Dedication option

  • Neiger Design
  • Topic Author
  • Offline
  • New Member
  • New Member
More
6 years 6 months ago #122465 by Neiger Design
Because "in memory of" and "in remembrance of" are basically the same thing, we would like to remove one of the dedication options.

Where can I find the settings to remove that radio option?

Thank you for your help.

Please Log in or Create an account to join the conversation.

More
6 years 6 months ago #122494 by Dang Thuc Dam
Replied by Dang Thuc Dam on topic Remove options from the Tribute / Dedication option
Hi Neiger,
You can modify "Dedicate type" through file: root -> components -> com_jdonation -> helper -> helper.php
Find function:
Code:
static function getDedicateType($type) { switch ($type){ case "1": return JText::_('JD_IN_HONOR_OF'); break; case "2": return JText::_('JD_IN_MEMORY_OF'); break; case "3": return JText::_('JD_IN_DEDICATE_TO'); break; case "4": return JText::_('JD_IN_REMEMBRANCE_OF'); break; } }

Thanks
Dam

Please Log in or Create an account to join the conversation.

  • Neiger Design
  • Topic Author
  • Offline
  • New Member
  • New Member
More
6 years 6 months ago #122504 by Neiger Design
Replied by Neiger Design on topic Remove options from the Tribute / Dedication option
Thank you Mr. Dam. Commenting out the extra items removed the text, but the radio buttons are still there. See the attachment.

Please Log in or Create an account to join the conversation.

More
6 years 6 months ago #122671 by Dang Thuc Dam
Replied by Dang Thuc Dam on topic Remove options from the Tribute / Dedication option
Hi,
If you only have 2 Dedicate options, you can follow below steps to modify
1. Open 2 files: root -> components -> com_jdonation -> view -> donation -> tmpl -> default.php and simpleflow_layout.php
2. Find:
Code:
for($i=1;$i<=4;$i++) { ?> <div class="<?php echo $span3Class?>"> <input type="radio" name="dedicate_type" value="<?php echo $i;?>" /> &nbsp; <?php echo DonationHelper::getDedicateType($i);?> </div> <?php }
and change to
Code:
for($i=1;$i<=2;$i++) { ?> <div class="<?php echo $span3Class?>"> <input type="radio" name="dedicate_type" value="<?php echo $i;?>" /> &nbsp; <?php echo DonationHelper::getDedicateType($i);?> </div> <?php }

Thanks
Dam

Please Log in or Create an account to join the conversation.

Moderators: Dang Thuc DamDang Dam