Added switch to allow for non-recurring subscriptions.
This commit is contained in:
parent
84a98029eb
commit
6f1a3fbbac
4 changed files with 37 additions and 1 deletions
|
|
@ -119,6 +119,12 @@ sub definition {
|
|||
hoverHelp => $i18n->get('subscription group description'),
|
||||
defaultvalue => [ 2 ]
|
||||
},
|
||||
recurringSubscription => {
|
||||
fieldType => 'yesNo',
|
||||
label => $i18n->get('recurring subscription'),
|
||||
hoverHelp => $i18n->get('recurring subscription description'),
|
||||
defaultValue => 1,
|
||||
},
|
||||
duration => {
|
||||
fieldType => 'selectBox',
|
||||
label => $i18n->get('subscription duration'),
|
||||
|
|
@ -415,7 +421,9 @@ Tells the commerce system this Sku is recurring.
|
|||
=cut
|
||||
|
||||
sub isRecurring {
|
||||
return 1;
|
||||
my $self = shift;
|
||||
|
||||
return $self->getValue('recurringSubscription');
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -503,6 +503,20 @@ The form in which the user can enter his subscription code.<br />|,
|
|||
context => q|template variable|
|
||||
},
|
||||
|
||||
'recurring subscription' => {
|
||||
message => q|Is subscription recurring?|,
|
||||
lastUpdated => 0,
|
||||
context => q|Label for swith to set subscription to be recurring or not.|
|
||||
},
|
||||
|
||||
'recurring subscription description' => {
|
||||
message => q|If set to yes, the customer will be charged after each term for a new one and the subscription
|
||||
will be renewed for an extra term. If set to no, the customer will be charged for the first term only, and after one
|
||||
term the subscription expires for the customer.|,
|
||||
lastUpdated => 0,
|
||||
context => q|Label for swith to set subscription to be recurring or not.|
|
||||
},
|
||||
|
||||
};
|
||||
|
||||
1;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue