Chris Geast
09/06/2024, 3:13 PMdefine('Test.Extension', [
'OrderWizard.Module.Confirmation'
], function (
OrderWizardModuleConfirmation
) {
console.log('Load');
return OrderWizardModuleConfirmation.extend({
render: function () {
console.log('Render');
}
});
});
I've add it to distro and can confirm it runs as I see 'Load' in the console on load.
However, if I place an order, I do not see the 'Render' in the log.Steve Goldberg
09/06/2024, 3:36 PMSteve Goldberg
09/06/2024, 3:37 PMmountToApp: function(application)
{
HomeView.prototype.greet = function()
{
console.log('Salutations!')
}
};
Steve Goldberg
09/06/2024, 3:38 PMChris Geast
09/06/2024, 4:00 PMdefine('Test.Extension', [
'OrderWizard.Module.Confirmation',
'jQuery'
], function (
OrderWizardModuleConfirmation,
jQuery
) {
return {
mountToApp: function (application) {
// Save the original render method
var originalRender = OrderWizardModuleConfirmation.prototype.render;
// Override the render method
OrderWizardModuleConfirmation.prototype.render = function () {
console.log('Extension render called');
// Call the original render method to avoid recursion
originalRender.apply(this, arguments);
};
}
};
});
Steve Goldberg
09/06/2024, 4:10 PMChris Geast
09/06/2024, 4:10 PMSteve Goldberg
09/06/2024, 4:16 PM