0

I need add a tracking script on the confirmation page and want to do it via NetSuite Recommended best practice , can some one share me how to extend this particular module? and add a tracking script.

I believe I will need to add a child view and add a template to it which contains the tracking script.

Nimantha
  • 6,405
  • 6
  • 28
  • 69
user1482800
  • 83
  • 2
  • 12

1 Answers1

1

There is actually a lot of step on extending the OrderWizard.Module.Confirmation.

First is you need to extend the Wizard Module like this.

    define('OrderWizard.Module', [
    'Wizard.Module',
    'yourtpl.tpl',
    'jQuery'

], function OrderWizardModule(
    WizardModule,
    YourTPL,
    jQuery

) {
    'use strict';

    return WizardModule.extend({

        template: YourTPL,

        initialize: function initialize(options) {
            this.wizard = options.wizard;
        },

        submit: function submit() {
            var self = this;
            var promise;

            promise = jQuery.Deferred();

            if(true) {
                return self.isValid();
            }

            return promise;
        },

        isValid: function isValid() {
            var promise;
            promise = jQuery.Deferred();

            if(true) {
                promise.resolve();
            } else {
                promise.reject();
            }

            return promise;
        },

        getContext: function getContext() {
            return {
                test: 'test'
            };
        }
    });
});

And then after that you need to determine the step of the order wizard confirmation page then you can push there the view that I paste above.

Nimantha
  • 6,405
  • 6
  • 28
  • 69
Romeo
  • 149
  • 8