Jump to content

[3.5 B3] Return Old Configurable Option Values In Events And Post Data From Universal Module


Jonathan

Recommended Posts

Hey guys,

 

Thought others might find this useful.  I needed to have old configurable option values available in my POST requests from the universal module so after a bit of digging a pretty simple edit to app/models/services.php takes care of this nicely.  Unfortunately it's a core edit, though hopefully this can make it into core officially *hint hint* ;)

// KNOWNHOST MOD RETURN OLD CONFIG OPTS

foreach($service->options as $config_option){

        if(isset($config_option->option_type) && $config_option->option_type == 'quantity'){

                $vars['oldconfigoptions'][$config_option->option_name] = $config_option->qty;

        }else{

                $vars['oldconfigoptions'][$config_option->option_name] = $config_option->option_value;

        }

}

// END KH MOD RETURN OLD CONFIG OPTS

Insert this code around line ~1064 (right above $service_info = null;) of app/models/services.php

 

I've only tested this a few times with different scenarios but it works perfectly in my environment.

 

Enjoy

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.

Loading...
×
×
  • Create New...