Jump to content

Cancel configurable option downgrade


lamossus

Recommended Posts

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?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated