yggdrasil Posted October 5, 2014 Share Posted October 5, 2014 I come from a system similar to WHMCS and there is something which I'm still scratching my head about why in the world it works like this in WHMCS. I know and understand exactly the difference between addons and configurable options, except that with WHMCS I'm forced to use addons as of configurable options when they should not be addons. I will try to explain. I have some product servicios extras that only work with an active product plan. Said this, they don't work without the subscription plan. So they apply as an configurable option. I don't want the addon to be billed separately, because again, it only works with the plan. This means it should be prorated to the data of the billing plan. Again, use configurable options for this you would say. Yes sure, except that I'm forced to use addons (and have a mess of a billing with addons on separate billing dates which customers don't pay and I need to suspend individually instead of consolidating) because of the following reasons: I can hide addons from the order form. I can't with configurable options. These are products that should not be displayed on new purchases, only for current active customers. That can only be done with addons it seems since the option to hide from order form is not in configurable options. Second and most important. Since this is something only current active customers need to order, of course they need to be able to change the setting this on their current active plans. With addons this works since a user can go to the addons page and order it and with configurable options? Surprise, its no where to be found. The configurable options ONLY appears on new orders, it does not appear at all on current plans after ordering, so if a customer has selected one configurable option he cannot increase to 2, or 3... You see, WHMCS works exactly the opposite on how configurable addons should work. 1. There is no way to hide a configurable option in the order process ! 2. Why is it called configurable option if there is nothing a customer can configure on his side? My previous system had an option to show/hide on the order form both for addons and configurable options. And configurable options where displayed on the current product on the customer side so he could upgrade those options. So what happens if I just use configurable options? Well, a user cannot change the settings (update on his side) since the configurable options are no where to be found... New customers now have so many options on a new purchase it confuses them. Solution? Wrongly use an addon. But now, the addons have different billing dates and don't match the current plan. And this plans are not prorated. I don't need them too, if I could just use configurable options like they what even WHMCS explains to use in their documentation, they clearly also say to use configurable options for something like this but how could I with this limitations... Is there maybe something I'm missing? Is this a WHMCS bug or just something this basic that is missing? 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted October 5, 2014 Share Posted October 5, 2014 Hi, a couple of links might help you with your issues... http://docs.whmcs.com/Automated_Upgrades_and_Downgrades#Configurable_Options_Upgrades With the configurable options upgrade configuration, this allows your clients to upgrade or downgrade the configurable option selections you offer on the product. You do not need to specify any further configuration for this - by simply ticking the box the upgrade options will be shown to the client in the client area. The upgrade price for configurable options are calculated in exactly the same was products described above. with regards to hiding configuration options, there is a built-in method... http://docs.whmcs.com/Configurable_Options#Hiding_Options Hiding Options Hiding is useful for when you want to remove an option from the order forms that you no longer offer to new signups, but don't want to lose the selections for existing customers You can hide entire configurable options or just individual sub-options. This can be done in the managing options screen detailed above by ticking the Hidden/Hide box for an option you want to disable Important Note: Once hidden, they remain visible to admin users to allow you to view them for existing customers and so when viewing clients or the order forms while authed as an admin you will still see the hidden options. another option would be to hide them in the template using a conditional method similar to the one I gave you for addons... configurable options are also generated in a loop, so you can specify one to be hidden using an {if} statement. 0 Quote Link to comment Share on other sites More sharing options...
yggdrasil Posted October 5, 2014 Author Share Posted October 5, 2014 Hi, a couple of links might help you with your issues... http://docs.whmcs.com/Automated_Upgrades_and_Downgrades#Configurable_Options_Upgrades with regards to hiding configuration options, there is a built-in method... http://docs.whmcs.com/Configurable_Options#Hiding_Options another option would be to hide them in the template using a conditional method similar to the one I gave you for addons... configurable options are also generated in a loop, so you can specify one to be hidden using an {if} statement. So this is why I was not finding the option . Its in the product and under upgrade and not in the configurable options ! No wonder some of my tests where showing in some products and some not, I feel amazingly stupid for overlooking this but then I was very focused in the configuration options page instead of taking another look in the product page. I had this option selected for some products, but not for my test. They appear now as expected in the customer side. I think I also remembered why 2 months ago I used the addons, this options are hidden in the product plan tab. Users seems to actually go to the addon page instead of clicking the upgrade tab in their products. I guess I can always link to that option from the addons page. I'm not sure how I overlooked this. I feel embarrassed since I actually did used that tick box before. It seems WHMCS does work correctly with that setting. Great ! But the Hiding Options you just quoted, I actually was reading that in the WHMCS docs page as well. From that text it seems more like that hides its permanently from users when you want to disable it or retire an option. Notice I only want to hide it from new products, or people that purchase a new plan, not from someone that has the product and wants to upgrade something. From what I understand the option would only appear in current plans only if they actually had selected something which means someone that purchased a plan and never used that option in the future would not see any configurable option either. 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted October 5, 2014 Share Posted October 5, 2014 Notice I only want to hide it from new products, or people that purchase a new plan, not from someone that has the product and wants to upgrade something. From what I understand the option would only appear in current plans only if they actually had selected something which means someone that purchased a plan and never used that option in the future would not see any configurable option either. there would be a number of ways to do that - the quick way, which is not foolproof, but should work for you is simply to check if they're logged in - if they are, they must be an existing customer; if not, they're a new customer (or an existing customer not logged in). it would probably be along the lines of.... {if !$loggedin and $configoption.id eq X}{else} ... {/if} so if not logged in, it won't show configoption X (X being the id value of your config option you want to "hide"); if logged in (an existing customer), it will show it. 0 Quote Link to comment Share on other sites More sharing options...
yggdrasil Posted October 5, 2014 Author Share Posted October 5, 2014 (edited) Well the Hidden option under Configurable options does what the docs say. It hides it completely, both for new orders and current ones. It hides it from the order form for new purchases, but the problem is it also hides the options for current customers that have the product active. Which means new users that just purchased that plan would never see any of those options and so would not be able to upgrade anything. It seems WHMCS does not actually have an option to only hide it from the order forms. Does configoptions has its own ID? Because otherwise your proposed solution would be globally. That is not something desirable. I don't want to completely hide the configurable options for all products in WHCMS, some products do need this on a new order, but some don't. The loggedin option would also just hide it for visitors, customers logged in would see the option when they order the plan. While that would be better than nothing that is not actually want I need. The options make little sense on a new purchase, they only make sense once you have the product running. Addons work that way. You can see addons unless you have the product activated. This is why I used addons except addons do not prorate to the original product in terms of billing. I guess I would have to completely hide the option with some code in the order form, both for logged or not logged users. Maybe only the cart template needs to be tweaked for this, and only tell it to do this for that configurable option, not other things. Edited October 5, 2014 by yggdrasil 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted October 5, 2014 Share Posted October 5, 2014 Does configoptions has its own ID? Because otherwise your proposed solution would be globally. That is not something desirable. I don't want to completely hide the configurable options for all products in WHCMS, some products do need this on a new order, but some don't. if they don't, I wouldn't have suggested it! you can apply condition(s) to one or more specified configuration options. The loggedin option would also just hide it for visitors, customers logged in would see the option when they order the plan. While that would be better than nothing that is not actually want I need. The options make little sense on a new purchase, they only make sense once you have the product running. Addons work that way. You can see addons unless you have the product activated. This is why I used addons except addons do not prorate to the original product in terms of billing. I guess I would have to completely hide the option with some code in the order form, both for logged or not logged users. Maybe only the cart template needs to be tweaked for this, and only tell it to do this for that configurable option, not other things. the loggedin option was just the quickest solution - there are other solutions that get more involved! what you might find useful is adding {debug} to your template, that will give you a popup window showing a list of Smarty variables and arrays available to you... any of which you can use in your conditional {if} statements. from my reading of your issue, I still think that it can be done with one or more {if} statement(s) added to your templates... it should just be a case of sitting down and writing the conditions of when/where/who you want to see this product and then editing the template(s) to do exactly what you want. 0 Quote Link to comment Share on other sites More sharing options...
yggdrasil Posted October 5, 2014 Author Share Posted October 5, 2014 Thanks, I'm not a programmer but I will try to see if I can find some tutorials on this smarty conditionals that apply to whmcs. The {debug} is a nice reference but I still need to learn how to mix and create together conditionals. Sadly I do lack the brain logic coders have and tend up mixing myself with more problems for something that is rather simple to solve. Of course everything is simple once you know the way around... I do love the flexibility the product has. This means even when something like this is not available as a setting in the admin GUI, the option is there to be build or you can hack or tweak around the product. That is nice. At least it means there is a way, and I just need to find it. 0 Quote Link to comment Share on other sites More sharing options...
yggdrasil Posted October 6, 2014 Author Share Posted October 6, 2014 I think I get your idea, but $configoption removes only the individual configurable options, not the whole group. This means I have to use if after the configurable options is are already pulled in the templates, or after this line 60 (verticalsteps order form): {if $configurableoptions} There are 2 issues with this approach. First, I will need to hide each option individually like: $configoption.id eq 10 and $configoption.id eq 11 and so on... Also, even if I remove all the options, the text and title for configurable options still appears in the template, except now its blank, with no options. This will still be printed: {$LANG.orderconfigpackage} {$LANG.cartconfigoptionsdesc} What I wanted is to completely remove the the whole: {if $configurableoptions} There is no ID for {if $configurableoptions} correct? In WHMCS when I go to a configurable options group and edit them, they do have IDs, but they they don't appear in the template debugging which means the group is probably not available to use as a whole group. Then I could just hide everything like $configurableoptions.id eq X In WHMCS the options are organized under a configurable options group. Instead of hiding each option one by one for that specific group, a better approach would be to hide the whole group. This means, that group would never appear on new orders, and then just select to which products to apply it on WHMCS admin gui. For other orders I could use a different configurable options groups and they would show in the order cart since they have a different ID. This would also avoid having the text and HTML displayed in the cart but empty (which happens if I hide each option individually using $configoption) which does not look nice. I the debug template, it seems the whole {$configurableoptions} condigition is just pulling things via an array so the ID is not there to be used, at least I can't find it. Of course I could just create another form, then assign products to that order form and delete the whole configurable options from the template in that order form, but that is even more messy since now I would need to use a different order form and separate products from groups, even if they belong together. My idea was if the cart template is executed and the configurable options with X ID appears, then hide it. If the configurable options with another ID appears, then show it as usual. 0 Quote Link to comment Share on other sites More sharing options...
yggdrasil Posted October 6, 2014 Author Share Posted October 6, 2014 (edited) UPDATE: Now, that I tested a few things it seems this will not work at all by editing templates or conditionals. I just noticed that the options still appear in the cart when ordering, even if you remove the whole options from the templates, they appear in summary page since this options are still actually active in WHMCS, when you order a product they use the default settings, they still appear in cart on checkout (and assume in the invoices, emails, etc) even if they where hidding from the templates and there was no interaction with them on the customer side while ordering. Because that is just a visual hack. The products are actually still active while ordering. This would confuse a buyer even more, as they now see on their checkout options they never saw or had a chance to configure in their cart. The option to hide the products in WHMCS actually works and removes them completely both from the ordering process, cart, etc and this is what should be used, disable it from ordering, but enable it for upgrades. Sadly this option in WHMCS is globally, it disables it on both sides. Edited October 6, 2014 by yggdrasil 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted October 6, 2014 Share Posted October 6, 2014 if I get the chance, i'll come back and look at this again later today with a clear mind - I think my head got completely confused yesterday answering your questions about config options/third products/product addons, I didn't know if I was coming or going at the end! unused config options do get shown on the pdf invoices - but I remember reading at least one thread that showed how to remove them... the emails etc use smarty, so you could remove them from the emails to if necessary - though as you say, this is just another visual hack. the advantage you have is that you know what you want to do, and you can see your product settings - but I have no idea of those config option/addon/product settings, so it's difficult to visualise... though at least I now know you're using vertical steps, so that helps a little! 0 Quote Link to comment Share on other sites More sharing options...
yggdrasil Posted October 6, 2014 Author Share Posted October 6, 2014 (edited) if I get the chance, i'll come back and look at this again later today with a clear mind - I think my head got completely confused yesterday answering your questions about config options/third products/product addons, I didn't know if I was coming or going at the end! unused config options do get shown on the pdf invoices - but I remember reading at least one thread that showed how to remove them... the emails etc use smarty, so you could remove them from the emails to if necessary - though as you say, this is just another visual hack. the advantage you have is that you know what you want to do, and you can see your product settings - but I have no idea of those config option/addon/product settings, so it's difficult to visualise... though at least I now know you're using vertical steps, so that helps a little! Yes but those drastic changes would affect WHMCS as a whole, like removing them from invoices, etc. Please notice I only want this for one type of products. Not all of them and that would be surely messing up completely with WHMCS in order to achieve one single thing. This sounds complicated if someone reads the whole topic, but what I need is something in my previous billing you could do by checking 1 single check box and nothing more. In the configurable options you had 2 check-boxes options: Hide from order forms Hide from product forms (or something similar) This way I marked the first one, but not the second one. You could have the configurations with any combination. Example, show them on the order forms, not on the product form for customers, or show it in both, or hide it in both or the one I used in this case which was just to select the first one. WHMCS only has 1 single option. One that hides the product completely from WHMCS. The reason why I asked here in the forums is because this is something rather basic on a billing systems, its nothing fancy. Have upgrade options for a product that are not displayed on the product purchase but just display for current active products. If you use the hide option in WHMCS, it hides it completely from the ordering process and for any customers as well except the ones that used the option in the past. That is what I want except for all customers. Not just the ones that used the option. This is what WHMCS docs say: Hiding is useful for when you want to remove an option from the order forms that you no longer offer to new signups, but don't want to lose the selections for existing customers. This works, except only for existing customers ! I need this options to work for all customers but it has to be removed from the ordering process. It should not be available for ordering, only for current products which are active. I want to keep the ordering process simple and easy, not with gazillions options. This is why I want the configurable options not to be displayed in the ordering process. But the options should be available from inside the customer side of WHMCS, so he can them in future adjust them as required. Maybe I will need to switch something in the tables of WHMCS so that current customer can use the options as well even if its hidden, then I just use the hide option in WHMCS. But then it means I will need to run it via a cron or something and trick WHMCS to think all customers used this options in the past in order for WHMCS to show the options to customers. Edited October 6, 2014 by yggdrasil 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted October 6, 2014 Share Posted October 6, 2014 ok, i'm just back from a couple of long train journeys - but it gave me the chance to ponder on this issue. taking a step back and looking at this again, there might be a way to do this without any necessary template changes. let me give you two scenarios - I think the second one applies to your situation, but the first might be useful for others reading the thread in the future. Scenario 1 say we have two products, "ALPHA" and "BETA" - anyone can order "ALPHA", but only those who are currently using "ALPHA", can order "BETA". one way to do this would be to make "BETA" a hidden product - this would remove the product from the order form (it could be ordered via a direct link, but only if they know or guess it). so now that "BETA" is hidden, you can modify the product settings of "ALPHA" and make "BETA" one of its upgrade options. http://docs.whmcs.com/Products_and_Services#Upgrades the customer can then upgrade from "ALPHA" to "BETA" - including any config options if they're included. in this case, i'm imagining that product "BETA" is actually "ALPHA+BETA" - i.e whatever ALPHA is now, plus what "BETA" was originally, e.g if "ALPHA" was hosting, "BETA" originally was a SSL Cert... "BETA" is now "Hosting & SSL Cert". I don't know what the "ALPHA" and "BETA" products are in your case, or if it makes sense to see it as an upgrade from A->B, but it should work without the need to modify any templates. upgrading should preserve the existing billing dates. Scenario 2 we have the same two products, "ALPHA" and "BETA" - but this time, anyone can order "ALPHA"; anyone can order "BETA"... but new customers ordering "BETA" don't see configuration options, while existing customers do. the easiest way to do this would be to have two different "BETA" products - for arguments sake, let's call them "BETA (LIVE)" and "BETA (HIDE)". "BETA (Hide)" is a hidden product with configuration options. "BETA (Live)" is the same as (HIDE), except it is not hidden and has no configuration options you could create (LIVE) by duplicating (HIDE) and just making a couple of changes. as with Scenario 1, "BETA (HIDE)" is an upgrade for "ALPHA" and won't be visible in the order forms, whereas all customers will see "BETA (LIVE)" in the order forms, and so can be ordered as normal. however, I think for your situation, this leads to 2 possible issues. 1. existing customers with "ALPHA" will see "BETA (Live)" in the order form and also "BETA (Hide)" in their services upgrade page.. if this is an issue for you, perhaps you could price them differently so that there was an incentive for an existing customer to upgrade rather than buy the product separately. you could certainly hide "BETA (Live)" for "ALPHA" customers by modifying the templates (e.g by querying the db, or assigning "ALPHA" purchasers to a Alpha Client Group and then hiding that product to members of that group)... but i'm trying to keep this simple and avoid template changes now! 2. you don't want configuration options on the ordering side, but want them on the client side for existing customers... as you found out, in the settings you either hide them or you don't! you could hide them on the ordering side, but you'd then have to do it at every stage of the process. in the scenario i've described, someone has purchased "BETA (Live)" - they now have whatever product "BETA" is, but with no configurable options... in order for them to have configuration options, the easiest path would be for them to upgrade to "BETA (Hide)". you can modify a customers products in their client profile in the admin area (I don't mean upgrade/downgrade as I think that would generate an invoice, but select a different product from the dropdown)... that means after purchase, you could switch them from "BETA (Live)" to "BETA (Hide)" and they should then have access to the configuration options... it might be possible to automate that change with a hook, but let's ignore that for now to keep things simple! Scenario 3 a third solution has just occurred to me while writing the previous scenarios... as with a previous suggestion, you could make a fake product addon, or manually add a link to this hidden BETA (Hide) product on your addons page... these would obviously require the template modifications previously stated. even though "BETA (Hide)" is a hidden product, you can still create a direct link to it. from your point of view, there may be a disadvantage to this idea because it would be a new purchase and so billed on a different date to "ALPHA"... if you use the previous method of upgrading from "ALPHA" to "BETA", then dates should stay the same. I haven't tried this but you could probably create a fake product addon and add a link in it to the upgrade process... that depends if you want to make the upgrade process look like a normal purchase of an addon. sorry for the long post, but hopefully one of the scenarios might guide you towards a solution for your problem. 0 Quote Link to comment Share on other sites More sharing options...
yggdrasil Posted October 7, 2014 Author Share Posted October 7, 2014 Thanks for taking the time to reply and think about this. Sorry for not replying previously. Scenario 1 This is definitely not what I want. I do have a hidden product and for those I only give the link manually like you said, but I’m not trying to have a product that some group of users can’t order or should be invisible. I’m trying to make a current product upgradable from the customer side without having them to raise a ticket or do some other awkward way. Scenario 2 You are creating now a separate product for each additional service when this would be just the same as using addons and will not match the current plan billing and date. Let me make you one basic example. You have a hosting plan. You want to offer together with this hosting plan an extra product since it’s a proven fact that upselling things is easier than getting new customers. Lets assume this hosting plan A has 2 options which a user can buy after its already working. Lets say one is an IP. Another one is a software subscription. This are just examples, put there what you want. The only think to remember which has to be important here is that both the IP and the Software DON’T work without hosting plan A. This means ordering them alone is useless and even dumb. The plan should be active already. So the solution is to correctly use the configurable options. If a customer orders the Software, let’s say 6 months after using his hosting and he has 2 months of service left. The configurable option will prorate him correctly. If another customer that is on a monthly plan orders the IP, he will be prorated and now each month he will receive the invoice in full. I don't have to do anything, since if he does not pay one thing, the whole account is suspended. Why this sucks with addons. Because first, addons are for things you can order for more than one product. This means Hosting A, Hosting B, etc. And they have their own billing and usually work on their own without dependencies. The problem with using addons are several which I don’t want to explain but having to babysit them for cancellations, billing, etc. As far as I understand addons are movable, from product to product and independent. Configurable options are not, and should be used for ugprades that relate and depend only to that product. So of course you want to use configurable options. All nice. Except that if you have allot of this things now on the ordering cart instead of just selecting a domain the customer is presented with 50 options. What a mess ! Of course I don’t have 50 options but you could. The thing is that the whole cart and ordering process shows them and its makes it extremely complicated and confusing. In particular because it would display each option like this: Software This:No IP: No And so on. WHMCS displays the options even if they where not selected. Since by default this are upselling things, now the customer is presenting with tons of options he does not understand, he will once he uses the service. Not only that. You are now presenting him with a plan that has No in all features. I mean this are upselling services, extras, sure, but you don’t want to show someone negative things on the ordering process. Most people will think his plans has nothing included and be confused. This is why I want to keep the ordering process simple. Also, this options are for advanced users. 99% of the users will not use them anyway, so why present them to 99% of the new purchases? Current customers know how to find them in their control panel and how to upgrade them. So the solution by WHMCS? Use the hide option. But WHMCS actually implemented this feature to retire the product completely, this is why its hidden completely from both new purchases and current purchased. Ok that works for the cart. But now what happens with those customers that want to order something in the future? They cannot find the options anymore, because they are gone. They are not gone for those that ordered one option in the past, but they are not there for potential new upselling new people that purchased the plan. You see the problem? This are not products. This are things which only work with that plan/product. They have to be included in the plan, they have to be billed consolidated as well and when their plan gets suspended so do are this options. I will of course mention that this plans are not prorated. So things are not consolidated in the billing. Each plan has a different date because that is how users prefer them. I have other products which are prorated but not this ones. Now in the my previous billing, solving this dilemma was extremely simple and easy. Just marked an check box that said Not display in cart ordering. And solved. The reason I don’t want to change my whole products and business is because WHMCS is supposed to adapt to your products and companies, not the other way around. So now I’m forced to have this as addons and the result is the following: Users pay their hosting plans and don’t pay their addons, they don’t care since I can’t suspend the addons without suspending the plan and their plans are paid. What should I tell them? People trick and abuse things once they find out they don’t need or are forced to something. The other effect is that sometimes they cancel their plans and now I have to manually cancel the addons, double work, otherwise they are still billed. Again, all this is very easily solved by using configurable options which makes the options dependable on for the product they are related. Your proposed solution with scenario 2 is to have another plan with the options and then make users upgrade to that one instead first so they can access the features. What is the point if I have to manually upgrade them after each order? Now customers will receive an email they where upgraded, and second I would have to do this manually. So now we are upgrading users to another plan just so they can access the configurable options. This is more complicated than just using the hide option and then modifying the settings manually in the admin side which forces WHMCS to display them. Scenario 3 I did this before, the other post which you also replied, has nothing to do with this case. In that case I wanted to add an extra product which is different and should be billed independtly and I did what you said. Using a temp addon and linking to the product. But that previous post had actually nothing to do with what I asked in this post. This is something different. I appreciate your replies in the other topic since I solved that by changing the templates. In this case, this is something different. I just wanted to have the products like I had them in my previous billing. This means the products with configurable options which have allot of them and those products are marketed to very simple users, should not display this options in the cart. Solution 3 also involves an upgrade path for users just to access this options. Solution 4 For anyone else reading. I think the solution is this. Hack WHMCS and trick it in the following way: Create the configurable options as usual. Hide them. Use the hide option in WHMCS for this. This will hide them completely. Except WHMCS will not hide them for users which used any of this options in the past of that had them activated from the admin side. In the customer side it will also show with the text Hidden. I imagined that if you change a setting here manually, WHMCS will then show the option to the customer. Sadly no. This means this options had to be active in the ordering process of the plan. Now, its clear WHMCS makes a difference between users that show be displayed this and users that don't. I did not digg into this yet, since I had no time to look at this anymore, but I imagine WHMCS is filling this options in the table in the database. So the only solution would be create a cron script or hook that fills at least 1 configurable options for that product. I assume then WHMCS will be forced to show this options to customers because it assume this where before you used the hide option on them. 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.