jacksony Posted March 4, 2021 Share Posted March 4, 2021 Hi, This is very strange. We did not enable SiteLock or CodeGuard in WHMCS MarketConnect. In the WHMCS Add-ons, these are also set to "Hideen". But the strange thing is when logging as customers, they still can select these as add-ons for the services. Please help! 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted March 4, 2021 Share Posted March 4, 2021 11 hours ago, jacksony said: This is very strange. We did not enable SiteLock or CodeGuard in WHMCS MarketConnect. ever? I didn't think the products/addons got added to the database until the specific MC brand were enabled... 11 hours ago, jacksony said: In the WHMCS Add-ons, these are also set to "Hidden". that should normally be enough not to show them to clients... certainly prevents them appear on a quick dev test... 11 hours ago, jacksony said: But the strange thing is when logging as customers, they still can select these as add-ons for the services. you might have to go in the product addons setup, and work your way your through theme MC addons and remove the relevant hosting products "Applicable Products" list... I can't help thinking you shouldn't have to do this, but it should be a reliable way to remove them as an option from the client area for existing clients. 0 Quote Link to comment Share on other sites More sharing options...
jacksony Posted March 8, 2021 Author Share Posted March 8, 2021 It is too tedious to remove all the MarketConnect product addons which we don't use. Is it safe to remove all product addons which are generated by MarketConnect if we don't use them? 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted March 8, 2021 Share Posted March 8, 2021 10 hours ago, jacksony said: It is too tedious to remove all the MarketConnect product addons which we don't use. you could run a SQL query on tbladdons to null the 'packages' field for marketconnect type products - an addon not associated with a product shouldn't be able to be ordered.. e.g there is nothing to add it on to. 10 hours ago, jacksony said: Is it safe to remove all product addons which are generated by MarketConnect if we don't use them? I can't see why not - though there's no guarantee that a future release wouldn't add them back... now I wouldn't expect that to happen unless a brand was enabled in settings, but there's no guarantees. 0 Quote Link to comment Share on other sites More sharing options...
jacksony Posted March 9, 2021 Author Share Posted March 9, 2021 thanks Brian! Yes it is really very strange, even in tbladdons, all these not-used marketconnect services also has "hidden" set to 1. But they are still being show to customers as add-on. 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted March 9, 2021 Share Posted March 9, 2021 8 hours ago, jacksony said: Yes it is really very strange, even in tbladdons, all these not-used marketconnect services also has "hidden" set to 1. But they are still being show to customers as add-on. any chance that there is an addon / hook causing this behaviour ? if you *had* to, you could use a hook to remove marketconnect addons from the page - base don the hook in the thread below... <?php # Block MC Addons Hook # Written by brian! use WHMCS\Database\Capsule; function cart_block_mc_addons($vars) { if ($vars['templatefile']=='addons'){ $mcaddons = Capsule::table('tbladdons')->where('module','marketconnect')->pluck('id')->all(); $addons = $vars['addons']; foreach ($addons as $key => $addon) { if (in_array($addon['id'],$mcaddons)) { unset($addons[$key]); } } $addons = array_values($addons); return array("addons" => $addons); } } add_hook("ClientAreaPageCart", 1, "cart_block_mc_addons"); the above hook queries the database for a list of MC addons and removes those addons from being shown to the client - it won't affect new addons being ordered with services during the normal ordering process. however, I would suggest first checking that there isn't a hook/addon causing this before employing the above hook. 🙂 0 Quote Link to comment Share on other sites More sharing options...
jacksony Posted March 10, 2021 Author Share Posted March 10, 2021 Yep there is no hook affecting this. Seems to be a bug. Even more, there is bug for the order of the addons. As we realised it was sorted (customer's display) based on the ID instead of showorder. Sigh. Anymore removing the MC's unused addons fixed the problem. 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted March 10, 2021 Share Posted March 10, 2021 (edited) 11 hours ago, jacksony said: Even more, there is bug for the order of the addons. As we realised it was sorted (customer's display) based on the ID instead of showorder. they should be sorted by weighting and then alphabetically - if you have addons that have the same weighting, then it can look entirely random with addons scattered all over the place. Edited March 10, 2021 by brian! 0 Quote Link to comment Share on other sites More sharing options...
snake Posted March 11, 2021 Share Posted March 11, 2021 As brian has mentioned above, you have to enable it at least once for the addons to get created, so you must have done so in the past. But disabling the product in marketplace, annoyingly, does not get rid of those addons, you have to do this manually. Going into the addon and unassigning all the applicable products would be the quickest temp solution if hiding them is not working. Or just delete them. 0 Quote Link to comment Share on other sites More sharing options...
jacksony Posted March 12, 2021 Author Share Posted March 12, 2021 Yes you are right. This is how dumb the WHMCS MC is. We have activated that previously but disabled it. So now I just have to delete them away manually.. -_- 0 Quote Link to comment Share on other sites More sharing options...
snake Posted March 12, 2021 Share Posted March 12, 2021 yes very dumb, annoy and lazy of the developers. I did not realise until months later that all the products and addons were still enabled. 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.