By Paulo on Thursday, 15 February 2018
Posted in General Issues
Replies 7
Likes 0
Views 771
Votes 0
Hi,

If you select a plan, you can see the trial period information (cycle, price) in the invoice view, but if you select a group with multiple plans, the plan details won't show the trial period, but just the plan name, price, description, cycle.

How can I add the trial period information to this view?

I tried adding; <?php $firstterm = $plan->getTrial_Price_1();?>
<h2><?php echo $firstterm; ?></h2>

to default_plan.php

No luck.


Help is appreciated, and by the way, I think this should be default behavior because who provides trial periods do it to attracts subscribers so it makes sens for it to mentioned in all the views than mention the available plans details.

See printscreen


Looking forward to hearing from you.
Hello,

To add recurring trial price and term on view page take reference from below mentioned file.
Root\components\com_payplans\templates\default\invoice/default_plan_details.php

See attached screen shot.

Try this and let me know if you have any query.
·
Thursday, 15 February 2018 13:19
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello Manisha,

Copy/past that block of test from defautl_plan_details.php to default_plan.php results in an error.


$class = (!in_array($recurring, array(PAYPLANS_RECURRING_TRIAL_1, PAYPLANS_RECURRING_TRIAL_2)))? " hide " : " show ";?>

Notice: Undefined variable: recurring in



Or did I miss something? can you send the file or copy/past the code to this topic so I'm sure we're talking about thre same block of code?
·
Thursday, 15 February 2018 16:29
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello Paulo,

Let me know in which file you are changing the code.
So i can check it.
·
Thursday, 15 February 2018 16:38
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello Paulo,

Let me know in which file you are changing the code.
So i can check it.


I changed the code in default_plan.php
which is under; components/com_payplans/templates/tmpl_bs3/plan
·
Thursday, 15 February 2018 17:02
·
0 Likes
·
0 Votes
·
0 Comments
·
Please share the file or ftp so can check the code.
·
Thursday, 15 February 2018 17:41
·
0 Likes
·
0 Votes
·
0 Comments
·
Please share the file or ftp so can check the code.



Just attached the file, please take a look.
Thank you.
·
Thursday, 15 February 2018 20:33
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello Paulo,

Revert the change you have made in default_plan.php.

To get recurring price user below mentioned code.

$recurring = $plan->isRecurring(); // to get plan is recurring or not

// To get recurring price
$recrringTrial1 = $plan->getPrice(PAYPLANS_RECURRING_TRIAL_1);

$recrringTrial2 = $plan->getPrice(PAYPLANS_RECURRING_TRIAL_2);


Refer payplans api to get more more details.
https://stackideas.com/docs/payplans/developers/welcome/payplans-api
·
Monday, 19 February 2018 11:27
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post