Commit 790c3e5a by Albert St. Aubin Committed by McKenzie Welter

Added Program UUID to the end of purchase button URL when purchasing a program

[LEARNER-1721]
parent 28a7a3e6
......@@ -52,17 +52,25 @@
this.render();
},
getUrl: function(base, programData) {
if (programData.uuid) {
return base + '&bundle=' + encodeURIComponent(programData.uuid);
}
return base;
},
render: function() {
var completedCount = this.completedCourseCollection.length,
inProgressCount = this.inProgressCourseCollection.length,
remainingCount = this.remainingCourseCollection.length,
totalCount = completedCount + inProgressCount + remainingCount,
buyButtonUrl = this.getUrl(this.options.urls.buy_button_url, this.options.programData),
data = {
totalCount: totalCount,
inProgressCount: inProgressCount,
remainingCount: remainingCount,
completedCount: completedCount,
completeProgramURL: this.options.urls.buy_button_url
completeProgramURL: buyButtonUrl
};
data = $.extend(data, this.programModel.toJSON());
HtmlUtils.setHtml(this.$el, this.tpl(data));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment