title: Disable product add to cart button if quantity of that product exceeds 10 on cart
body: <p>I've been trying to find solution for my problem, but have failed so far.</p>
  
  <p>I have a request to disable Add to cart button if customer adds more than 10 items per product to cart. </p>
  
  <p>The code for my button is as follows:</p>
  
  <pre><code>              &lt;?php if($logged) {  ?&gt;&lt;button type="button" id="button-cart" data-loading-text="&lt;?php echo $text_loading; ?&gt;" class="btn btn-primary btn-lg"&gt;&lt;?php echo $button_cart; ?&gt;&lt;/button&gt;&lt;?php } ?&gt;
  </code></pre>
  
  <p>I am using opencart v 2.2.0. Is there a way to define limit in the Add to cart button code? Any suggestion would be highly appreciated, as I am totally lost on this one. I am sure the solution is there, but I can't seem to see it myself. Thank you all in advance.</p>