Expiring User Upgrades

Expiring User Upgrades [Paid] 1.3.8

No permission to buy ($20.00)
  • Thread starter Thread starter Syndol
  • Start date Start date
@kontrabass my bad man, I totally forgot about this. Sorry.

No worries :)

@kontrabass what is the change you made to make the button work?

Find the xen:if statement in the template account_upgrades that starts with this:

Code:
<xen:if is="{$upgrade.length_unit} AND {$upgrade.recurring}">

And replace that entire if statement with this longer version:

Code:
<xen:if is="{$upgrade.length_unit} AND {$upgrade.recurring}">
                            <a href="{$payPalUrl}?cmd=_manage-paylist" class="button">{xen:phrase cancel_subscription}</a>
                        <xen:elseif is="{$upgrade.can_extend}" />
                            <form action="{$payPalUrl}" method="post" class="upgradeForm">
                                <input type="hidden" name="cmd" value="_xclick" />
                                <input type="hidden" name="amount" value="{$upgrade.cost_amount}" />
                                <input type="submit" value="{xen:phrase exup_extend_upgrade}" class="button" />
                      
                                <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" />
                                <div class="cost">{$upgrade.costPhrase}</div>
                            </form>
                        </xen:if>
 
didn't work for me

that string is located in 2 places in that template


ok I got it. I didn't notice that the first one was "available" and the second was "purchased". Replaced it in Purchased and it's working now...thanks!!!!
 
Last edited:
I installed this earlier today, gave myself an upgrade expiring in a couple days, and ran the cron job. Per the database table, it flagged the record for that upgrade with a timestamp for the alert. I got the alert within the forum. However, I didn't get an email. Sent mail log confirms no email was sent to me at that time. However, the options say to send to both alert and email.

Any ideas?
 
Purchased. But unable to install with xf 1.5.5. Bug posted at xenmods.com
@Daniel Hood

Error
Developer: default_value is not a valid array (exup_notify_days)
 
Last edited:
I have this installed prior to 1.5.5, I wonder if this is causing the expiring upgrade alerts to not be sent out?? I don't hear about this kind of thing via user feedback, I'll have to test it out
 
I've just confirmed that it is still working properly: I adjusted the expiration date on a test account to 6 days out (7 day notice set) and then ran the cron and and alert was generated and an e-mail was sent.
 
I've just confirmed that it is still working properly: I adjusted the expiration date on a test account to 6 days out (7 day notice set) and then ran the cron and and alert was generated and an e-mail was sent.
Great. Now I just need Daniel to fix the install bug (I believe it was xf 1.5.4 that changed the way arrays are handled, specifically defaulting - not sure why all devs haven't grep'd their add-on code to identify and correct this issue, it's impacted many add-ons) so that I can get it installed :)
 
Someone reported this issue recently and I have it fixed as far as installing but I'm trying to fix the pay gates compatibility issues before I push an update. I'll private message you the fixed xml once I get on the computer.
 
Having just installed this add-on, users with a permanent upgrade are shown the option to purchase and Extend Upgrade.

The overview for the add-on states;
"Optional "Extend Upgrade" button for non-recurring upgrades. This button is available on the user's purchased list to allow for early renewal thus preventing the downgrading and then re-upgrading of the user. No longer will your members need to wait for an upgrade to expire before they can re-purchase it.This button will only be available if the upgrade details have not changed since it was first purchased (such as cost, length, user groups, and whether recurring) as they must remain the same in case the payment is reversed and the end date has to be adjusted accordingly."

I don't believe the upgrade details have changed since purchased - what determines this? And I wouldn't have thought permanent shouldn't have the option to purchase and extend, in either case.
 
Top Bottom