Display Customer ID in my account profile information page with title

JIRA code:840

Created a new extension “profile information”.

Added customer name in template .

Template file:

<div class ="profile-information">

<h2 class="profile-information-header">{{page Header}}<span>({{ram}})</h2>

Entry file:

// @module jj.profileinformation.profileinformation
define('jj.profileinformation.profileinformation.View'
	, [
		'jj_profileinformation_profileinformation.tpl'

		, 'jj.profileinformation.profileinformation.SS2Model'

		, 'Backbone'
		, 'Profile.Model', 'Profile.Information.View'
	]
	, function (
		jj_profileinformation_profileinformation_tpl

		, profileinformationSS2Model

		, Backbone
		, profileModel
		, ProfileInformationView
	) {
		'use strict';

		// @class jj.profileinformation.profileinformation.View @extends Backbone.View
		return Backbone.View.extend({

			template: jj_profileinformation_profileinformation_tpl

			, initialize: function (options) {

				/*  Uncomment to test backend communication with an example service
					(you'll need to deploy and activate the extension first)
				*/

				// this.model = new profileinformationModel();
				// var self = this;
				// this.model.fetch().done(function(result) {
				// 	self.message = result.message;
				// 	self.render();
				// });
			}

			, events: {
			}

			, bindings: {
			}

			, childViews: {

			}

			//@method getContext @return jj.profileinformation.profileinformation.View.Context
			, getContext: function getContext() {
				//@class jj.profileinformation.profileinformation.View.Context
				this.message = this.message || 'Hello World!!'
				var getProfile = profileModel.getInstance();
				console.log("getProfile", getProfile)
				var ram = profileModel.getInstance().id;
				console.log("ram", ram)

				_.extend(ProfileInformationView.prototype, {
					getContext: _.wrap(ProfileInformationView.prototype.getContext, function (fn) {
						try {
							var original_Ret = fn.apply(this, _.toArray(arguments).slice(1));

							original_Ret.ram = ram;
							console.log("original", original_Ret)
						}

						catch (e) {
							console.log("err@Facetscellview", e);
						}

						return original_Ret
					})
				});






				return {

					message: this.message,
					ram: this.ram
				};


			}
		});
	});

Leave a comment

Your email address will not be published. Required fields are marked *