Tobias_dcgr Posted October 12, 2023 Share Posted October 12, 2023 HI i am trying to make a drop down menu for comet backup so a costumer can choose what number of GB costumer want to buy. i found out it is nor t part of the originally script form comet backup. i tired to change the script FROM // Apply storage vault quota if set if ( !empty($params['configoptions']['storage_vault_quota_gb']) && !empty($profileData->Destinations) ) { foreach (array_keys((array)$profileData->Destinations) as $destinationGUID) { $profileData->Destinations->$destinationGUID->StorageLimitEnabled = true; $profileData->Destinations->$destinationGUID->StorageLimitBytes = intval($params['configoptions']['storage_vault_quota_gb']) * pow(1024, 3); } } else if ( !empty($params['configoptions']['storage_vault_quota_tb']) && !empty($profileData->Destinations) ) { foreach (array_keys((array)$profileData->Destinations) as $destinationGUID) { $profileData->Destinations->$destinationGUID->StorageLimitEnabled = true; $profileData->Destinations->$destinationGUID->StorageLimitBytes = intval($params['configoptions']['storage_vault_quota_tb']) * pow(1024, 4); } } TO // Apply storage vault quota if set if (!empty($profileData->Destinations)) { foreach (array_keys((array)$profileData->Destinations) as $destinationGUID) { $profileData->Destinations->$destinationGUID->StorageLimitEnabled = true; $storageQuotaGB = 0; // Check for the presence of specific quota options and adjust the storage limit accordingly if (!empty($params['configoptions']['storage_vault_quota_gb'])) { $storageQuotaGB = intval($params['configoptions']['storage_vault_quota_gb']); } elseif (!empty($params['configoptions']['storage_vault_quota_50gb'])) { $storageQuotaGB = 50; } elseif (!empty($params['configoptions']['storage_vault_quota_100gb'])) { $storageQuotaGB = 100; } elseif (!empty($params['configoptions']['storage_vault_quota_200gb'])) { $storageQuotaGB = 200; } $profileData->Destinations->$destinationGUID->StorageLimitBytes = $storageQuotaGB * pow(1024, 3); } } } it works but not i the way i want it do to that i cant selected any other option then the first one in the Configurable Options and use the Option Name for some reason. example if i use storage_vault_quota_gb in the Option Name and call it storage_vault_quota_gb | storage for the costumer. the costumer will go to the store page and select 100gb in the option. what the costumer will get is 0 gb do that it think that the costumer has not select anything. if i change the Option Name to 'storage_vault_quota_50gb' it will only give costumer 50 gb in storage even then the costumer select 100gb. is there any that got a explanation to the problem and a solutioncurrent functions.php 0 Quote Link to comment Share on other sites More sharing options...
Tobias_dcgr Posted November 8, 2023 Author Share Posted November 8, 2023 i have solve the issues my self and the topic can close 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.