Since I added some special custom fields, and I have to show it on the member card depending to some condition, I modified the function inside the site helper file 'subscription.php' to fit in my need. Is it safe? Will it change back if the extension will be updated in the future? Or is there any way it is better than what I do so?
Of course, if no other method but only override the function inside 'subscription.php' and it will be overwritten when updating, I will insert those custom codes myself every single update.
Actually, besides 'subscription.php', I also custom added some jquery validation rules in 'jquery.validationEngine.min.js'. Is it safe too?
At this moment, according to the need, there are two files I edited. They are 'subscription.php' and 'jquery.validationEngine.min.js'.
I added some codes into the 'public static function generatePlanMemberCard($item, $config)'.
The case is that, since some of my custom fields (Group B ) are depending on another custom fields (Group A). A will decide whether B will be shown on the member card or not, I have added some special custom [TAG]s based on my custom fields to handle those conditions. Indeed, I tested the code and it worked very well.
I added some extra jquery validation rules and they check the input working well too.
Oh, forget the part 1 in last reply. I got the solution myself.
After I study the code for a while and tried a few time, I finally found that I have to copy both 'public static function generateMemberCard($item, $config)' and 'public static function generatePlanMemberCard($item, $config)' functions rather than only the last one. The override coding in the original php states that these two functions should be used together and so should be override together too.
It now works perfectly in frontend profile page but not work in backend subscription page. If I directly hack the code by inserting what I need, it works well both in frontend and backend. However, it seems the override methods are not loading in backend, any idea?
Actually, you only have to override on method generatePlanMemberCard. You had to do both because of a small typo in my code, sorry
I just updated download package on server with this fix. You can access to My Downloads menu item, download latest package, upgrade it to your site. That will solve the issue with override not working for backend, too