Jump to content

Possible to use a line-break or similar in display "Configurable Option Groups"


Recommended Posts

Hi all,

Wondering if it's possible to style a line-break (empty line or similar) in the complete view of "Configurable Option Groups".

Currently we have it like this (example):
whmcs_example_1.jpg.fd37397caf79ab6b8341baa1781dd68a.jpg


However we want to have a bit more organised for example:
whmcs_example_2.jpg.d10b471c02107437602febe12cc71310.jpg
Or some other way to make it better organised. The above are examples, however we have about ~120 configurable options in there.
So it's possible to organise it a bit better through a CSS hook or other wise, it would be a great addition.

Thanks in advance.

 

Link to comment
Share on other sites

1 hour ago, MvdL1979 said:

Wondering if it's possible to style a line-break (empty line or similar) in the complete view of "Configurable Option Groups".

I dislike "is it possible" questions.... anything is possible... it's possible that i'm going to walk down the high street in a blonde wig and  leather catsuit singing Oops I Did It Again... but highly unlikely - once was more than enough lol. 🎤

1 hour ago, MvdL1979 said:

Or some other way to make it better organised. The above are examples, however we have about ~120 configurable options in there.
So it's possible to organise it a bit better through a CSS hook or other wise, it would be a great addition.

you've got a hardcoded table with cells no classes and only an opening table ID... 😲

if the groups are numbered (actually even if they're not), then the simplest way might be to just create empty groups, let's say call them "16." and "30." and then use a JS hook to replace those text values with empty spaces...

<?php

# Rename Configurable Option Groups Hook
# Written by brian!

function rename_config_option_groups_hook($vars) {

	if ($vars['filename'] == 'configproductoptions') { 
return <<<EOF
<script>
$('td').each(function () {
    $(this).html($(this).html().replace('16.', '').replace('30.', ''));
});
</script>
EOF;
};
}
add_hook("AdminAreaFooterOutput",1,"rename_config_option_groups_hook");

8g6Hnas.png

CSS might be an option, but I think more of a pain to do as you might need to reference nth instances - and those values could change when you add a new group.

Link to comment
Share on other sites

Hi brian!
 

On 4/9/2021 at 4:56 PM, brian! said:

I dislike "is it possible" questions.... anything is possible... it's possible that i'm going to walk down the high street in a blonde wig and  leather catsuit singing Oops I Did It Again... but highly unlikely - once was more than enough lol. 🎤

Aha! So that was you...! 😉


Thank you for the provided solution. It's works perfectly and making the tons of configuration options much cleaner! Thanks!

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