JackRabbit Posted December 23, 2014 Share Posted December 23, 2014 I'm trying to skip the domain configuration page. I've tried using &skipconfig=1 but it's not working. I've searched several threads here but there are several threads asking the same questions without answers. The only addon option is the free dns management. I'd like the dns management to be added by default. Can I add a value to the url: &dnsmanagement[0]=1&skipconfig=1 and somehow make that work? The value of 1 isn't working, I'm not sure what to use. How can i skip the domain configuration page and add dns management by default? 0 Quote Link to comment Share on other sites More sharing options...
Administrators WHMCS John Posted December 24, 2014 Administrators Share Posted December 24, 2014 Hi, It isn't possible to skip the domain configuration step, as WHMCS needs to check that the domain is available before proceeding. However you can certainly preselect the domain so it's entered into the page: http://docs.whmcs.com/Linking_to_WHMCS#Order_Links 0 Quote Link to comment Share on other sites More sharing options...
JackRabbit Posted December 29, 2014 Author Share Posted December 29, 2014 Yes, I don't want to skip the domain availibility. After the domain availability check and custom fields are submitted, the next page is the configuration page- /cart.php?a=confdomains and this is the page I'm trying to skip. This is the process with the slider template: page 1. Enter domain on the home page > page 2. Domain availibility check and custom fields > page 3. choose free dns management page 4. view cart and checkout I want to skip page 3 with dns management already added by default and go straight from page 2 to the cart. 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted December 29, 2014 Share Posted December 29, 2014 have you thought about using some javascript auto-submit code? e.g., you could add the following code to the top of your configuredomains.tpl - {literal} <script> window.onload = function() { document.domconf.submit(); }; </script> {/literal} and then add a name to your <form> code... <form method="post" name="domconf" action="{$smarty.server.PHP_SELF}?a=confdomains"> this works and will auto-submit step 3 - so if you remove all visible text from step 3, it should appear to the customer to go from step 2 to step 4. that said, I should probably give you three words of warning about doing this... 1. if you ever use it on a form that has required fields and they are not filled correctly, then the page will constantly loop - so try not to use auto-submit under those circumstances... 2. if you click on the "[Configure Domain Extras]" link @ checkout, you'll end up looping back to checkout because step 3 is still auto-submitting... there are probably a number of ways around this - perhaps by adding an IF statement around the literal code, in configuredomain.tpl, to see if they have come from checkout (using session or server variables) - if so, don't call the auto-submit code; if they haven't, call the code... alternatively, you could modify viewcart.tpl and tweak the CDE link to something like... <a href="{$smarty.server.PHP_SELF}?a=confdomains&checkout=1" class="cartedit"> then all you would need to do is detect the value of checkout in configuredomains.tpl in a similar {if} statement to above and use the value to determine whether to auto-submit or not... personally, if you have to use one of them, i'd suggest the second option - but there may be better alternatives I haven't thought of! 3. there will be circumstances where you probably shouldn't auto-submit the domain configuration step. looking at your site, you seem to automatically add hosting to a domain registration - that's fine, but you also seem to have removed the additional domain configuration options that may be required for some tlds - e.g, registrant name for .uk domains, nexus country for .us domains etc - with these details missing, i'm unsure if they can be successfully submitted to the registrar by whmcs. if you use your domainchecker.php, then you will correctly get asked for this information - but not if you go via the cart. I appreciate that you're probably just trying to simplify the ordering process, but i'd be concerned that you're simplifying it to a point where incomplete information is potentially being sent to the registrar and registrations are not completed successfully. 0 Quote Link to comment Share on other sites More sharing options...
JackRabbit Posted January 7, 2015 Author Share Posted January 7, 2015 (edited) Thank you Brian, that's a smart way to do it. you're always detailed, you do a great job here. It works Is it possible to use an onclick function on step 2's button that submits the custom fields that redirects to step 3? something like: onclick="addtocart(); location.href = '{$smarty.server.PHP_SELF}?a=view'; (I've tried this but it doesn't work.) If the step 2 submit button can send the user straight to step 4 after submitting the data, I won't have to modify any other pages or code. and I see what you mean about the registration. I'll use this modification as an {if} statement only for domains it will work with. If I can make it simpler for most people while making everything work, I'd rather have it that way. Edited January 7, 2015 by JackRabbit 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted January 7, 2015 Share Posted January 7, 2015 If the step 2 submit button can send the user straight to step 4 after submitting the data, I won't have to modify any other pages or code. I think as John says, you can't really skip steps - so you can't go straight from step 2 -> 4... i'm not sure what happens "under the hood" in the encrypted files for each step, but I would imagine it likely that each stage passes variables to the next, and so each step is important to the order process. 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.