innovator Posted October 18, 2013 Share Posted October 18, 2013 FROM: http://docs.whmcs.com/Linking_to_WHMCS To link to the order process with a given product and annual billing cycle preselected, you can use a link like this: http://demo.whmcs.com/cart.php?a=add&pid=1&billingcycle=annually I am trying the above out, where after clicking the link with the pre-selected billing cycle of 'annually', the domain options show up, after completing the domain selection page and continuing, the product configuration billing cycle options are shown again. There are no product configuration options or custom fields attached to the product. The desired effect is that after completing domain options the next page would be the checkout page, why is this behavior not happening ? Thank you. 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted October 18, 2013 Share Posted October 18, 2013 add "&skipconfig=1" to the link... http://demo.whmcs.com/cart.php?a=add&pid=1&billingcycle=annually&skipconfig=1 thanks goes to DavidBee for posting the answer on a previous thread! 0 Quote Link to comment Share on other sites More sharing options...
innovator Posted October 19, 2013 Author Share Posted October 19, 2013 brian, thanks for the quick reply. I should have included that in my post, the problem with "&skipconfig=1" is that it will completely skip the config page. So if there are configuration options or custom fields, all that will be ignored and go straight to the checkout. The idea is if there are no "configuration options or custom fields" and we specify something like "billingcycle=annually" in the original link, there is no reason to show the product config page, because it also seems like a 302 redirect after the domain config page. But if there are "configuration options or custom fields" the page should be shown, and ofcourse the cycle info can be removed from the template so that only the config options show. ie use, /cart.php?a=add&pid=1&billingcycle=annually -> dont show config page if no "configuration options or custom fields" /cart.php?a=add&pid=1&billingcycle=annually -> show config page if there are "configuration options or custom fields" "&skipconfig=1" -- just skips over the page entirely in both the about instances and goes to the checkout, which is not desired. So why is this happening and how can it be done the way it should work ? Thanks 0 Quote Link to comment Share on other sites More sharing options...
innovator Posted October 19, 2013 Author Share Posted October 19, 2013 ok, it seems this has to be customized in a way for it to work, i think i got it down anyway, basically a check to see if a product has conf options, if not add skip to the url, then either use the current conf page or create a custom page to redirect to. thanks again brian for the reply. 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted October 19, 2013 Share Posted October 19, 2013 basically a check to see if a product has conf options, if not add skip to the url, then either use the current conf page or create a custom page to redirect to. yeah, that seems the way to go... something roughly along the lines of.. {if $product.hasconfigoptions} do this {else} do something else (e.g add skip) {/if} i'm not sure how you could check for the existance of custom fields at that stage though. but if you get the code working, it might be useful to post here for others to use. 0 Quote Link to comment Share on other sites More sharing options...
innovator Posted October 22, 2013 Author Share Posted October 22, 2013 brian, yes this is what I am toying with, on the initial order page adding a hidden input with skipconfig true if $product.hasconfigoptions, that works as expected, now the only problem is that creates a new issue, well atleast im not seeing the fix yet, basically when you select a domain and continue, i expect the domain options to show up on the next page, but with skipconfig set it now goes straight to the checkout page, any ideas how when adding a domain i can get it to show the domain options page next ? 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted October 22, 2013 Share Posted October 22, 2013 it might be useful to see the code you have so far, but is the problem you're seeing now caused by someone just wanting a domain by itself - as opposed to hosting with a domain? if so, how about a second if statement (or incorporate it into the first) along the lines of {if $domain eq "register"} then don't skip config.. (maybe check for "transfer" too). btw - which order form template are you using? 0 Quote Link to comment Share on other sites More sharing options...
innovator Posted October 22, 2013 Author Share Posted October 22, 2013 The problem is when getting a domain with hosting, if they are getting just a domain there wouldnt be an issue coz skipconfig would not be true. So on the initial order page i got {if !$product.pricing.hasconfigoptions} <input type="hidden" name="skipconfig" value="true" /> {/if} With the url being something like http://demo.whmcs.com/cart.php?a=add&pid=1&billingcycle=annually Then when you go to "Step 1 Choose Domain" and say register a new domain, it will skip right thru to /cart.php?a=view, coz of skipconfig=true, where it should infact go to cart.php?a=confdomains But unfrotunatly when registering the domain it seems you have to do a cart.php?a=add&pid=1 so if there was something you can tag along to that querystring which would add the domain and also go to the domain config page, that would work great. 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted October 22, 2013 Share Posted October 22, 2013 are you using verticalsteps? I had a quick play with the whmcs demo and noticed some issues, but it's been a long day and I need a break! one thought from left field - instead of editing the templates, would be it be an option to duplicate the product(s), give the duplicated products only annual payment price and hide the group? i'm not sure how you intend to link to them, whether in a page or by sending links to customers, but the billing cycle shouldn't show. 0 Quote Link to comment Share on other sites More sharing options...
onliner Posted March 29, 2014 Share Posted March 29, 2014 are you using verticalsteps? I had a quick play with the whmcs demo and noticed some issues, but it's been a long day and I need a break! one thought from left field - instead of editing the templates, would be it be an option to duplicate the product(s), give the duplicated products only annual payment price and hide the group? i'm not sure how you intend to link to them, whether in a page or by sending links to customers, but the billing cycle shouldn't show. I didn't saw this thread before. What is if only want to skip the product config but NOT domains config during order process? Any solution for this maybe? 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted March 30, 2014 Share Posted March 30, 2014 using which order form template? 1 Quote Link to comment Share on other sites More sharing options...
onliner Posted March 30, 2014 Share Posted March 30, 2014 using which order form template? I'm using Web20cart because of easy styling. 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted March 30, 2014 Share Posted March 30, 2014 http://forum.whmcs.com/showthread.php?87550-Skipping-remove-Product-Configuration-step-for-products-ONLY 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.