Jump to content

Prevent quantity go above stock quantity in cart modal popup and checkout page


anjuMV

Recommended Posts

if ('update' !== $mode && $this->shouldAvailabilityErrorBeRaised($product, $qty_to_check)) {
  $this->{$ErrorKey}[] = $this->trans(
  'The product is no longer available in this quantity.',
  [],
  'Shop.Notifications.Error'
  );
}

found a validation like this in cart controller processChangeProductInCart() function. how is it possible to add the validation for quantity above available quantity in block cart modal popup and checkout page ? any suggestion will be appreciable.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...