PDA

View Full Version : Disable purchase of Free packages



rosegarden
June 5, 2012, 06:38 AM
Just like to share on the following:

Some of you may want to consider doing the following customisation in your code so that Free package cannot be bought as this will create another package in your tables. After purchase, member can keep clicking renewal and enjoy the free credits

File to edit "my_packages" inside Controller folder:

=======================

<table class="sTable">
<tr>
<td class="radio"><input {if $plan.ID|in_array:$used_plans_id}disabled="disabled"{/if} id="plan_{$plan.ID}" type="radio" name="plan" value="{$plan.ID}" {if $plan.ID == $smarty.post.plan}checked="checked"{/if} /></td>
<td class="label">


=======================

<table class="sTable">
<tr>

<td class="radio"><input {if $plan.ID|in_array:$used_plans_id || $plan.Price == 0}disabled="disabled"{/if} id="plan_{$plan.ID}" type="radio" name="plan" value="{$plan.ID}" {if $plan.ID == $smarty.post.plan}checked="checked"{/if} /></td>