<?php // Only render the ajax code for tracking inventory if inventory tracking is enabled $setting = new Cart66Setting(); $trackInventory = Cart66Setting::getValue('track_inventory'); $id = Cart66Common::getButtonId($data['product']->id); $priceString = $data['price']; $isNumeric = false; if (is_numeric($priceString)) { $isNumeric = true; } ?> <?php if ($data['gravity_form_id'] && CART66_PRO && $data['showPrice'] != 'only') { ?> <?php if (!$data['product']->isInventoryTracked($data['product']->getInventoryKey())) { ?> <?php echo do_shortcode("[gravityform id=" . $data['gravity_form_id'] . " ajax=false] "); ?> <?php } else { ?> <?php if (Cart66Product::checkInventoryLevelForProduct($data['product']->id) == 0) { $soldOutLabel = Cart66Setting::getValue('label_out_of_stock') ? strtolower(Cart66Setting::getValue('label_out_of_stock')) : __('out of stock', 'cart66'); ?>