Merge pull request #15786 from edx/McKenzieW/learner-1721
Send program UUID to ecommerce for program purchase tracking
This commit is contained in:
@@ -52,17 +52,25 @@
|
|||||||
this.render();
|
this.render();
|
||||||
},
|
},
|
||||||
|
|
||||||
|
getUrl: function(base, programData) {
|
||||||
|
if (programData.uuid) {
|
||||||
|
return base + '&bundle=' + encodeURIComponent(programData.uuid);
|
||||||
|
}
|
||||||
|
return base;
|
||||||
|
},
|
||||||
|
|
||||||
render: function() {
|
render: function() {
|
||||||
var completedCount = this.completedCourseCollection.length,
|
var completedCount = this.completedCourseCollection.length,
|
||||||
inProgressCount = this.inProgressCourseCollection.length,
|
inProgressCount = this.inProgressCourseCollection.length,
|
||||||
remainingCount = this.remainingCourseCollection.length,
|
remainingCount = this.remainingCourseCollection.length,
|
||||||
totalCount = completedCount + inProgressCount + remainingCount,
|
totalCount = completedCount + inProgressCount + remainingCount,
|
||||||
|
buyButtonUrl = this.getUrl(this.options.urls.buy_button_url, this.options.programData),
|
||||||
data = {
|
data = {
|
||||||
totalCount: totalCount,
|
totalCount: totalCount,
|
||||||
inProgressCount: inProgressCount,
|
inProgressCount: inProgressCount,
|
||||||
remainingCount: remainingCount,
|
remainingCount: remainingCount,
|
||||||
completedCount: completedCount,
|
completedCount: completedCount,
|
||||||
completeProgramURL: this.options.urls.buy_button_url
|
completeProgramURL: buyButtonUrl
|
||||||
};
|
};
|
||||||
data = $.extend(data, this.programModel.toJSON());
|
data = $.extend(data, this.programModel.toJSON());
|
||||||
HtmlUtils.setHtml(this.$el, this.tpl(data));
|
HtmlUtils.setHtml(this.$el, this.tpl(data));
|
||||||
|
|||||||
Reference in New Issue
Block a user