/** * Validate availibility for cart */ function validate_cart($VAR, $product) { // check if prepaid type is ani or pin, if so, escape: $unserial = unserialize($product->fields['prod_plugin_data']); if (empty($unserial['CartCheck'])) { return true; } // check qty include_once PATH_MODULES . 'asset/asset.inc.php'; $asset = new asset(); if (!$asset->available($unserial['AssetPool'], $unserial['AssetQty'])) { return "Sorry, we do not have enough of that asset available at this time. Please try again shortly"; } return true; }