Hello I'm trying to override my CartController file. The problem is how to get quantity of single product, not all combinations. My code is:
if ('update' !== $mode && $this->shouldAvailabilityErrorBeRaised($product, $qty_to_check)) {
$this->{$ErrorKey}[] = $this->trans(
'The item %product% in your cart is no longer available in this quantity. You cannot proceed with your order until the quantity is adjusted %productQuantity% - %productCheck%.',
array('%product%' => $product->name, '%productQuantity%' => $product->quantity, '%productCheck%' => $qty_to_check),
'Shop.Notifications.Error'
);
}
but %productQuantity% shows quantity sum of all combinations. How to get quantity of current combination.