Hello,
In the view "product / show_quantity" please replace
$html = $this->params->get('html');
By
if(isset($this->row) && isset($this->row->product_quantity) && (int)$this->row->product_quantity > 0 && (int)$this->row->product_quantity < $max_quantity)
$max_quantity = (int)$this->row->product_quantity;
$html = $this->params->get('html');
It would use the product stock to limit the internal variable used by the quantity selector.
Please let us know your feedback about that patch so we can integrate it into HikaShop and use the same kind of patch for others quantity selector views.
Regards,