diff --git a/docs/changelog/7.x.x.txt b/docs/changelog/7.x.x.txt
index 1934747d0..96630a50d 100644
--- a/docs/changelog/7.x.x.txt
+++ b/docs/changelog/7.x.x.txt
@@ -13,6 +13,7 @@
- fixed #9368: Gallery: All children included into navigation
- fixed #9349: CS archival broken after update (Bernd KalbfuĆ-Zimmermann)
- fixed Display of Interval form control in Thingy and User profiling did not show units, only seconds.
+ - fixed #9374: Subscription Asset: Redeem subscription template not documented, or user selectable
7.6.7
- fixed #9263: Thingy possibleValues processing, and List type autodetection.
diff --git a/docs/upgrades/upgrade_7.6.7-7.6.8.pl b/docs/upgrades/upgrade_7.6.7-7.6.8.pl
index 0b5fe5e02..10c07cfba 100644
--- a/docs/upgrades/upgrade_7.6.7-7.6.8.pl
+++ b/docs/upgrades/upgrade_7.6.7-7.6.8.pl
@@ -34,6 +34,7 @@ my $session = start(); # this line required
# upgrade functions go here
setDefaultItransactCredentialTemplate($session);
hideGalleryPhotos($session);
+addSubscriptionRedeemTemplateSetting($session);
finish($session); # this line required
@@ -58,6 +59,18 @@ sub setDefaultItransactCredentialTemplate {
print "DONE!\n" unless $quiet;
}
+#----------------------------------------------------------------------------
+# Describe what our function does
+sub addSubscriptionRedeemTemplateSetting {
+ my $session = shift;
+ print "\tAdd a field to the Subscription Asset so the user can select which Redeem Subscription code template to use... " unless $quiet;
+ # and here's our code
+ $session->db->write(< $i18n->get("template"),
hoverHelp => $i18n->get("template help"),
},
+ redeemSubscriptionCodeTemplateId => {
+ tab => "display",
+ fieldType => "template",
+ namespace => "Operation/RedeemSubscription",
+ defaultValue => 'PBtmpl0000000000000053',
+ label => $i18n->get("redeem subscription code template"),
+ hoverHelp => $i18n->get("redeem subscription code template help"),
+ },
thankYouMessage => {
tab => "properties",
defaultValue => $i18n->get("default thank you message"),
@@ -980,7 +988,7 @@ sub www_redeemSubscriptionCode {
$f->submit;
$var->{ codeForm } = $f->print;
- return $self->processStyle($self->processTemplate($var, 'PBtmpl0000000000000053'));
+ return $self->processStyle($self->processTemplate($var, $self->get('redeemSubscriptionCodeTemplateId')));
}
1;
diff --git a/lib/WebGUI/Help/Asset_Subscription.pm b/lib/WebGUI/Help/Asset_Subscription.pm
index b20213e3c..9057284a7 100644
--- a/lib/WebGUI/Help/Asset_Subscription.pm
+++ b/lib/WebGUI/Help/Asset_Subscription.pm
@@ -4,8 +4,8 @@ use strict;
our $HELP = {
- 'template' => {
+ 'template' => {
title => 'subscription template',
body => '',
isa => [
@@ -32,6 +32,20 @@ our $HELP = {
],
},
+ 'redeem subscription template' => {
+ title => 'help redeem code template title',
+ body => '',
+ isa => [ ],
+ fields => [ ],
+ variables => [
+ { name => 'batchDescription' , required=>1},
+ { name => 'message' , required=>1 },
+ { name => 'codeForm' , required=>1 },
+ ],
+ related => [
+ ],
+ },
+
};
1;
diff --git a/lib/WebGUI/i18n/English/Asset_Subscription.pm b/lib/WebGUI/i18n/English/Asset_Subscription.pm
index f0ff55a3f..5c2572e87 100644
--- a/lib/WebGUI/i18n/English/Asset_Subscription.pm
+++ b/lib/WebGUI/i18n/English/Asset_Subscription.pm
@@ -358,20 +358,23 @@ characters long.
|,
context => q|Shows up in the selection part of listSubscriptionCodes.|
},
- 'help redeem code template body' => {
- message => q|The following template variables are available through this template:
-
-batchDescription
-The description of the batch tied to the subscription code.
-
-message
-The message that gives the result of your action. Depending on what you've done it says that you can enter a code, you've entered the wrong code, or you've successfully redeemed your code.
-
-codeForm
-The form in which the user can enter his subscription code.
|,
- lastUpdated => 1215618652,
- context => q|The body of the help page of the code redemption template.|
- },
+ 'batchDescription' => {
+ message => q|The description of the batch tied to the subscription code.|,
+ context => q|Template variable in the redeem subscription code template|,
+ lastUpdated => 0,
+ },
+
+ 'message' => {
+ message => q|The message that gives the result of your action. Depending on what you've done it says that you can enter a code, you've entered the wrong code, or you've successfully redeemed your code.|,
+ context => q|Template variable in the redeem subscription code template|,
+ lastUpdated => 0,
+ },
+
+ 'codeForm' => {
+ message => q|The form in which the user can enter his subscription code.|,
+ context => q|Template variable in the redeem subscription code template|,
+ lastUpdated => 0,
+ },
'help redeem code template title' => {
message => q|Redeem subscription code template|,
@@ -431,6 +434,18 @@ The form in which the user can enter his subscription code.
|,
context => q|Asset property hover help|,
},
+ 'redeem subscription code template' => {
+ message => q|Redeem Subscription template|,
+ lastUpdated => 0,
+ context => q|Asset property|,
+ },
+
+ 'redeem subscription code template help' => {
+ message => q|Choose the template that is used to display the screen where users redeem subscription codes.|,
+ lastUpdated => 0,
+ context => q|Asset property hover help|,
+ },
+
'batch name' => {
message => q|Batch Name|,
lastUpdated => 0,
@@ -508,7 +523,7 @@ The form in which the user can enter his subscription code.
|,
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