lamossus Posted November 1, 2023 Share Posted November 1, 2023 I have a product with configurable options that allow upgrade/downgrade. Due to provisioning module specifics some of the configurable options should be able to be upgraded but shouldn't be able to be downgraded. I can't seem to find functionality that would do something like this. So far I'm using PreModuleChangePackage hook to check if those options were downgraded and if so return abortcmd=true as is mentioned in hook documentation to cancel package change but there are 2 problems with it: 1) It seems that the hook runs AFTER the client recieves credit for downgrading and does not deduct that credit back on cancellation 2) Even after cancelling the downgrade the configurable options are still updated to ones user specified and are not reverted to their original values While I could probably fix 2) by manually storing all configurable options and setting their values through database on AfterModuleChangePackageFailed that seems kinda tedious and still leaves 1) problem unsolved Are there better ways to handle this? 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.