public static function newInstance() { if (!self::$instance instanceof self) { self::$instance = new self(); } return self::$instance; }
?> "> <?php if (StockInHand::newInstance()->checkStockable(osc_item_id())) { ?> <h5>Stock in hand:<?php echo StockInHand::newInstance()->getStock(osc_item_id()); ?> <h5> <input type="hidden" name="stock" id="stock" value="<?php echo StockInHand::newInstance()->getStock(osc_item_id()); ?> "> <div class="form-group"> <input type="number" name="demand" id="demand" max="<?php echo StockInHand::newInstance()->getStock(osc_item_id()); ?> " required> </div> <?php } ?> <button class="btn btn-primary" type="submit" name="add_to_cart">Add to Cart</button> </form> </div> <form name="check-out" action="<?php echo osc_route_url("check-out"); ?> " method="post"> <button class="btn btn-success" type="submit" name="check-out">Checkout</button> </form>