Fix #4
This commit is contained in:
parent
462cf5e018
commit
a645735f93
|
|
@ -115,9 +115,11 @@ class ProductCart extends Component
|
||||||
}
|
}
|
||||||
|
|
||||||
public function updateQuantity($row_id, $product_id) {
|
public function updateQuantity($row_id, $product_id) {
|
||||||
if ($this->check_quantity[$product_id] < $this->quantity[$product_id]) {
|
if ($this->cart_instance == 'sale' || $this->cart_instance == 'purchase_return') {
|
||||||
session()->flash('message', 'The requested quantity is not available in stock.');
|
if ($this->check_quantity[$product_id] < $this->quantity[$product_id]) {
|
||||||
return;
|
session()->flash('message', 'The requested quantity is not available in stock.');
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Cart::instance($this->cart_instance)->update($row_id, $this->quantity[$product_id]);
|
Cart::instance($this->cart_instance)->update($row_id, $this->quantity[$product_id]);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue