Jacob D
09/15/2020, 10:43 PMsetSorting on the PLP component? I’m trying to get category data and use that data to determine the how that category’s items should be sorted. This is the closest I can get, but the page keeps re-rendering itself for some reason…
var plpComp = container.getComponent('PLP');
if (plpComp) {
plpComp.on('beforeShowContent', function () {
var catInfo = plpComp.getCategoryInfo();
//conditionally set the sorting based on catInfo properties
plpComp.setSorting({sorting: "onlinecustomerprice:asc"});
});
};