Store Community Support Documentation

while most payment gateways do not offer subscriptions less than 1 month (30 days) there are several who do allow weekly subscription, like CCBill for example. I have been using younets advanced payment gateway for years. But I can not create a package in phpfox default subscription app for only 1 week. The minimum phpfox allows is 1 month. There should be a weekly option. Some people want to trial the website. Others can not afford an entire month. Having a weekly subscription option will increase monetization on the website.

Please add a 1 week subscription option to phpfox subscribe app.

Last update on July 23, 8:13 pm by QueenMother305.
JohnJr
#1

I did this for Subscription 4.6.3 for a 3 year subscription or also called a "Triennial".  You will insert these lines and the line number is an estimated area where to insert the line.  Remember some of these are insert within a statement which have additional curly brackets.  Always backup your site first and if you don't understand code then don't do this.  This is just to give you an idea of what needs to be done and maybe phpfox will see how easy it is to change and use variable so we may enter the names (titles) and the amount of days as a variable.

PF.Site/Apps/core-subscriptions/Service/Callback.php (about line 124)

   case 5:

                    $iExpiriTime = strtotime("+3 year", PHPFOX_TIME);
                    break;

 

Last update on July 24, 3:37 am by JohnJr.
JohnJr
#2

PF.Site/Apps/core-subscriptions/Service/Purchase/Process.php

(line 88) case 5:

                $iExpiriTime = strtotime("+3 year", PHPFOX_TIME);
                 break;

(line 152) case 5:

            {
                $aPurchase['type'] = '3 '._p('Years');
                break;
   }

(line 632) case 5:

                            $iNewExpiriTime = strtotime("+3 year", $iCurrentTime);
                       break;

(line 704) case 5:

                      $iNewExpiriTime = strtotime("+3 year", $iCurrentTime);
                       break;

JohnJr
#3

PF.Site/Apps/core-subscriptions/Service/Purchase/Purchase.php

(line 223)case 5:

                    $iNewExpiriTime = strtotime("+3 year", $iNewExpiriTime);
                    break;

(line 291)case 5:

                $aPurchase['type'] = _p('triennial');
                break;

(line 375)case 5:

                    $aPurchases[$iKey]['type'] = _p('triennial');
                    break;

JohnJr
#4

PF.Site/Apps/core-subscriptions/views/block/list.html.php

(line 43){elseif $aPackage.recurring_period == 5}

                                        {_p var='First Triennial'}

(line 74){elseif $aPackage.recurring_period == 5}

                                    {_p var='triennial'}

JohnJr
#5

PF.Site/Apps/core-subscriptions/views/controller/admincp/add.html.php

(line 164)<option {if $bIsEdit && $bDisableField}disabled="true" {/if} value="5"{value type='select' id='recurring_period' default='5'}>{_p var='triennial'}</option>

 

JohnJr
#6

PF.Site/Apps/core-subscriptions/Service/Subscribe.php

(line 192)case '5':

                // triennial
                $aValues['period'] = 'triennial';
                $sPhrase = _p('fee_for_recurring', $aValues);
                break;

(line 486)case 5:

                    $aPackages[$iKey]['type'] = _p('triennial');
                    break;

JohnJr
#7

PF.Site/Apps/core-subscriptions/Controller/Admin/AddController.php

(line 83)case 5:

                        $iPeriodDays = 1095;
                        break;

JohnJr
#8

PF.Site/Apps/core-subscriptions/Block/UpgradeBlock.php

(line 97)case 5:

                            {
                                $sDateTitle = _p('3 years');
                                break;
                            }

JohnJr
#9

PF.Base/module/api/include/service/gateway/gateway.class.php

(line 322)case '5':

                // triennial
                if ($sRecurring > 0 && $sInitialFee > 0) {
                    $sPhrase = _p('Initial Fee then cost Triennial', $aValues);
                } else {
                    if ($sRecurring > 0 && $sInitialFee == 0) {
                        $sPhrase = _p('No initial Fee then cost Triennial', $aValues);
                    }
                }
                break;

JohnJr
#10

I think that is all the files that need to be changed.  Remember these files will be written over every time you upgrade the subscription files during main upgrades or app upgrade.

QueenMother305
#11

I think that is all the files that need to be changed.  Remember these files will be written over every time you upgrade the subscription files during main upgrades or app upgrade.

 

thats why there should be an option to add custom recurring period within the subscription app itself. I’ll take a second look at this later and give it a try. Thanks for the help.

#12

Dear QueenMother305,

Thank you for your suggestion.  Your suggestion will be taken into consideration seriously in our future upgrades.

Best regards,

Hannah