Does anybody know how I would go about determining...
# suitecommerce
j
Does anybody know how I would go about determining if the selections for a matrix option are valid and if they match a child item? For instance, If I have item with color and size. I’m trying to execute an event once a customer has executed a valid selection of both color and size and then get data specific to that individual matrix child item combination. This is the closest I can get:
Copy code
initialize: function(options) {
	options.pdp.on('afterOptionSelection', function(event) {
		console.log(options.pdp.getItemInfo());
	});
}
But that just seems to get information on the parent item, not the individual child item being selected. Anybody have any ideas or experience here? You used to just be able to do
Copy code
this.model.on('change', this.onModelChange, this);
and get data on the model, but I’m not sure how to do that in an extension.