Need to a condition on shopping place to check the qty
Budget: ₹600 – ₹750 INR
Check product availability and show alert accordingly in 4 to 5 places .Here is the condition
checkProductAvailability() {
var qtyAvailable = data['TotalStock'];
var StkCategory = data['Stock_Category'];
var PurchaseType = data['PurchaseType'];
if (parseInt(this.selectedQty) <= parseInt(qtyAvailable)) {
this.availabilityMessage = `Product Quantity Available. ${qtyAvailable} in Stock`;
this.available = true
this.showBuyNow = true
} else {
if (this.data.Stock_Category == 'AUSL - Available Until Stock Last') {
this.available = false
//this.availabilityMessage = `Product Quantity Not Available. ${qtyAvailable} in Stock`;
this.availabilityMessage = `Product Quantity Not Available.`;
this.showBuyNow = false
}
else if (this.data.Stock_Category == 'RS - Ready Stock' || this.data.PurchaseType == 'LR-Wallcoverings') {
//this.availabilityMessage = `Product Quantity Available. ${qtyAvailable} in Stock`;
this.availabilityMessage = `Product Quantity Available.`;
this.available = true
this.showBuyNow = true
}
else
{
this.availabilityMessage = `Product Quantity Available. ${qtyAvailable} in Stock`;
this.available = true
this.showBuyNow = true
}
}
}
checkProductAvailability() {
var qtyAvailable = data['TotalStock'];
var StkCategory = data['Stock_Category'];
var PurchaseType = data['PurchaseType'];
if (parseInt(this.selectedQty) <= parseInt(qtyAvailable)) {
this.availabilityMessage = `Product Quantity Available. ${qtyAvailable} in Stock`;
this.available = true
this.showBuyNow = true
} else {
if (this.data.Stock_Category == 'AUSL - Available Until Stock Last') {
this.available = false
//this.availabilityMessage = `Product Quantity Not Available. ${qtyAvailable} in Stock`;
this.availabilityMessage = `Product Quantity Not Available.`;
this.showBuyNow = false
}
else if (this.data.Stock_Category == 'RS - Ready Stock' || this.data.PurchaseType == 'LR-Wallcoverings') {
//this.availabilityMessage = `Product Quantity Available. ${qtyAvailable} in Stock`;
this.availabilityMessage = `Product Quantity Available.`;
this.available = true
this.showBuyNow = true
}
else
{
this.availabilityMessage = `Product Quantity Available. ${qtyAvailable} in Stock`;
this.available = true
this.showBuyNow = true
}
}
}