Kevin Carpenter
12/29/2022, 8:55 AMProductLine.Stock.View
on the PDP
component and returning a boolean based on the current selected items' stock levels which come from a custom field using:
PDP.addToViewContextDefinition(
"ProductLine.Stock.View",
"showOutOfStockMessage",
"boolean",
function (context) {
var stockBoolean, iteminfo;
iteminfo = PDP.getSelectedMatrixChilds();
My question is - why / how is it determining which item is selected and whether or not to display the out of stock messaging if no item has been selected? It seems like there is something happening behind the scenes which is determining which item is being selected and the stock levels to return.
• For example, this item: https://wt.wesspur.com/yale-xtc-16-climbing-rope is showing out of stock before any selection is made
• This item is displaying correctly https://wt.wesspur.com/stable-braid-12mm-tree-rigging-rope
• You can see some debugging in the consoleKevin Carpenter
12/29/2022, 8:59 AMgetSelectedMatrixChilds
would do that for me automatically already, but it appears to be doing something different.