To find the Stock Information like Internal ID , Item Name, Is in Stock , Stock Message, Stock Description, Available in Stock etc. We can Follow the bellow Steps.
Create Extension
Extend the ProductLine.Stock.View
Console it and From the Stock Property Take the path of property which we want as shown in below Code
_.extend(ProductLineStock.prototype,{ getContext: _.wrap(ProductLineStock.prototype.getContext, function (fn){
try{
var original = fn.apply(this, _.toArray(arguments).slice(1));
console.log("this",this)
isinstock=this.model.attributes.isinstock;
itemtitle=this.model.attributes.displayname;
console.log("this",this)
console.log('Available Quantity=',quantityavailable)
console.log('Item Title=',itmtitle)
console.log('Is in Stock=',isinstock)
console.log('Error Message=',errorMessage)
}
catch (e) {
console.log("err@Facetscellview", e);
}
return original
})
})
