/** * 販売商品IDの正当性チェック * * @param string id * @return bool true:OK/false:NG */ public static function _validation_exists_saleitem_id($id) { if (!empty($id)) { return is_null(Model_Master_Sale_Item::find_by_pk($id)) ? false : true; } return false; }
/** * 購入可能商品の有無判定 * * @return boolean true:あり/false:なし */ public function exists_allow_sale_item() { $sale_item_list = Model_Master_Sale_Item::find_all(); foreach ($sale_item_list as $sale_item) { $item = \Saleitem::instance(static::get_client_id(), $sale_item->iid); if ($item->check_allow_buy()) { return true; } } return false; }