https://netsuiteprofessionals.com logo
#suitecommerce
Title
# suitecommerce
l

Lucas

04/01/2022, 9:20 AM
Copy code
define(
	'SampleExtension.Sample'
,   []
,   function ()

{
	'use strict';
	return  {
		mountToApp: function mountToApp (container)
		{
			var Cart = container.getComponent('Cart')
			Cart.cancelableOn('afterAddLine', function (){
				console.log("afterAddLine");
			});
			Cart.cancelableOn('beforeAddLine', function (){
				console.log("beforeAddLine");
			});
		}
	};
});
s

Steve Goldberg

04/05/2022, 10:43 AM
The code looks fine. Are you sure the extension is being loaded? For example, put a log message in the
mountToApp
outside of any callback
l

Lucas

04/18/2022, 4:26 AM
logs works outside mountToApp, I guess I am on shopping application and which is not Secure(HTTPS) I think that is causing an issue..
3 Views