[TH] User Upgrades [Deleted]

If there is more demand sure :)

I think personally this should be a key feature of this plugin. Letting a user constantly "trial" a user upgrade defeats having a trial period at all, we may as well give the user upgrade out for free.
 
I think personally this should be a key feature of this plugin. Letting a user constantly "trial" a user upgrade defeats having a trial period at all, we may as well give the user upgrade out for free.
Ah I see what you are saying! I can get that implemented next week :)
 
Yes, we had it at 50 years. As said worked fine with previous version which i have now reverted to.
The issue is you're setting it to a value that cannot be stored in MySQL. You can still set it extremely high just not 50 years high haha. Try 25 years :)
 
The issue is you're setting it to a value that cannot be stored in MySQL. You can still set it extremely high just not 50 years high haha. Try 25 years :)

We was using 50 years with the previous version just fine though. Is there any chance an option for lifetime user upgrade can be added?
 
This doesn't seem to be compatible with [bd]Paygates, because of a huge conflict in the template modification to account_upgrades.

How can I make it compatible? Ultimately Paygates is more important to me than this addon, due to Stripe support.

It looks like the difference is just cosmetic.
 
This doesn't seem to be compatible with [bd]Paygates, because of a huge conflict in the template modification to account_upgrades.

How can I make it compatible? Ultimately Paygates is more important to me than this addon, due to Stripe support.

It looks like the difference is just cosmetic.
It's only an issue with the template modification for `account_upgrades` for [TH] User Upgrades.

You just have to change the execution order to 1.

I'll be releasing an update soon to address this but it's not a code conflict just a template one :)
 
I have the execution order at 1. What I mean is that I don't see how the heck the Paygates template mod would ever be able to apply on top of the User Upgrades mod.

What Paygates is trying to do is replace the Paypal button with a series of buttons, one for each payment processor. That clearly isn't happening for me, I've checked the page source in my browser to confirm.

Here's the bit from the default template that Paygates wants to replace:

Code:
               <form action="{$payPalUrl}" method="post" class="upgradeForm">
                       <div class="cost">{$upgrade.costPhrase}</div>
                       <xen:if is="{$upgrade.length_unit} AND {$upgrade.recurring}">
                               
                           <input type="hidden" name="cmd" value="_xclick-subscriptions" />
                           <input type="hidden" name="a3" value="{$upgrade.cost_amount}" />
                           <input type="hidden" name="p3" value="{$upgrade.length_amount}" />
                           <input type="hidden" name="t3" value="{$upgrade.lengthUnitPP}" />
                           <input type="hidden" name="src" value="1" />
                           <input type="hidden" name="sra" value="1" />
                           
                           <input type="submit" value="{xen:phrase subscribe}" class="button" />
                       <xen:else />
                           <input type="hidden" name="cmd" value="_xclick" />
                           <input type="hidden" name="amount" value="{$upgrade.cost_amount}" />
                           
                           <input type="submit" value="{xen:phrase purchase}" class="button" />
                       </xen:if>
                       
                       <input type="hidden" name="business" value="{$xenOptions.payPalPrimaryAccount}" />
                       <input type="hidden" name="currency_code" value="{$upgrade.currency}" />
                       <input type="hidden" name="item_name" value="{xen:phrase account_upgrade}: {$upgrade.title} ({$visitor.username})" />
                       <input type="hidden" name="quantity" value="1" />
                       <input type="hidden" name="no_note" value="1" />
                       <input type="hidden" name="no_shipping" value="1" />
                       <input type="hidden" name="custom" value="{$visitor.user_id},{$upgrade.user_upgrade_id},token,{$visitor.csrf_token_page}" />
                       
                       <input type="hidden" name="charset" value="utf-8" />
                       <input type="hidden" name="email" value="{$visitor.email}" />
                       
                       <input type="hidden" name="return" value="{xen:link 'full:account/upgrade-purchase'}" />
                       <input type="hidden" name="cancel_return" value="{xen:link 'full:index'}" />
                       <input type="hidden" name="notify_url" value="{$xenOptions.boardUrl}/payment_callback.php" />
                   </form>

Here's what it wants to replace it with:

Code:
<xen:include template="bdpaygate_account_upgrades_form" />

That template has the following contents:

Code:
<div class="upgradeForm">
    <xen:if hascontent="true">
        <div class="cost">{$upgrade.costPhrase}</div>
        <xen:contentcheck>
            <xen:foreach loop="$upgrade.paymentForms" key="$processorId" value="$form">
                <div id="{$processorId}">{xen:raw $form}</div>
            </xen:foreach>
        </xen:contentcheck>
    </xen:if>
</div>

Here's what this mod puts into the code which seems incompatible with the above:

Code:
    <xen:if is="{$upgrade.show_price}"><div class="cost">{$upgrade.costPhrase}</div></xen:if>
    <a class="button{xen:if '{$upgrade.usePopUp}', ' OverlayTrigger'}" data-overlayoptions="{&quot;fixed&quot;:false}" href="{xen:link 'account/purchase-confirm', '', 'upgrade_id={$upgrade.user_upgrade_id}'}">{xen:if {$upgrade.button_title}, {$upgrade.button_title}, {xen:if '{$upgrade.length_unit} AND {$upgrade.recurring}', {xen:phrase subscribe}, {xen:phrase purchase}}}</a>

So let me rephrase my original question. Is your intention that Paygates' alternate payment processors should be supported? Am I misunderstanding something here?
 
I have the execution order at 1. What I mean is that I don't see how the heck the Paygates template mod would ever be able to apply on top of the User Upgrades mod.

What Paygates is trying to do is replace the Paypal button with a series of buttons, one for each payment processor. That clearly isn't happening for me, I've checked the page source in my browser to confirm.

Here's the bit from the default template that Paygates wants to replace:

Code:
               <form action="{$payPalUrl}" method="post" class="upgradeForm">
                       <div class="cost">{$upgrade.costPhrase}</div>
                       <xen:if is="{$upgrade.length_unit} AND {$upgrade.recurring}">
                              
                           <input type="hidden" name="cmd" value="_xclick-subscriptions" />
                           <input type="hidden" name="a3" value="{$upgrade.cost_amount}" />
                           <input type="hidden" name="p3" value="{$upgrade.length_amount}" />
                           <input type="hidden" name="t3" value="{$upgrade.lengthUnitPP}" />
                           <input type="hidden" name="src" value="1" />
                           <input type="hidden" name="sra" value="1" />
                          
                           <input type="submit" value="{xen:phrase subscribe}" class="button" />
                       <xen:else />
                           <input type="hidden" name="cmd" value="_xclick" />
                           <input type="hidden" name="amount" value="{$upgrade.cost_amount}" />
                          
                           <input type="submit" value="{xen:phrase purchase}" class="button" />
                       </xen:if>
                      
                       <input type="hidden" name="business" value="{$xenOptions.payPalPrimaryAccount}" />
                       <input type="hidden" name="currency_code" value="{$upgrade.currency}" />
                       <input type="hidden" name="item_name" value="{xen:phrase account_upgrade}: {$upgrade.title} ({$visitor.username})" />
                       <input type="hidden" name="quantity" value="1" />
                       <input type="hidden" name="no_note" value="1" />
                       <input type="hidden" name="no_shipping" value="1" />
                       <input type="hidden" name="custom" value="{$visitor.user_id},{$upgrade.user_upgrade_id},token,{$visitor.csrf_token_page}" />
                      
                       <input type="hidden" name="charset" value="utf-8" />
                       <input type="hidden" name="email" value="{$visitor.email}" />
                      
                       <input type="hidden" name="return" value="{xen:link 'full:account/upgrade-purchase'}" />
                       <input type="hidden" name="cancel_return" value="{xen:link 'full:index'}" />
                       <input type="hidden" name="notify_url" value="{$xenOptions.boardUrl}/payment_callback.php" />
                   </form>

Here's what it wants to replace it with:

Code:
<xen:include template="bdpaygate_account_upgrades_form" />

That template has the following contents:

Code:
<div class="upgradeForm">
    <xen:if hascontent="true">
        <div class="cost">{$upgrade.costPhrase}</div>
        <xen:contentcheck>
            <xen:foreach loop="$upgrade.paymentForms" key="$processorId" value="$form">
                <div id="{$processorId}">{xen:raw $form}</div>
            </xen:foreach>
        </xen:contentcheck>
    </xen:if>
</div>

Here's what this mod puts into the code which seems incompatible with the above:

Code:
    <xen:if is="{$upgrade.show_price}"><div class="cost">{$upgrade.costPhrase}</div></xen:if>
    <a class="button{xen:if '{$upgrade.usePopUp}', ' OverlayTrigger'}" data-overlayoptions="{&quot;fixed&quot;:false}" href="{xen:link 'account/purchase-confirm', '', 'upgrade_id={$upgrade.user_upgrade_id}'}">{xen:if {$upgrade.button_title}, {$upgrade.button_title}, {xen:if '{$upgrade.length_unit} AND {$upgrade.recurring}', {xen:phrase subscribe}, {xen:phrase purchase}}}</a>

So let me rephrase my original question. Is your intention that Paygates' alternate payment processors should be supported? Am I misunderstanding something here?
Ah I see, right now Paygates is not supported but I can see if it will be possible to implement it!
 
Top Bottom