renegadesk Posted February 28, 2011 Share Posted February 28, 2011 Hey, I'm trying to customise the AJAX order form so that I can send domain names from other pages to pre-fill the AJAX domain name search. Basically all I am trying to to is GET a variable from the URL and pass it to the domain name search value="$var" field. If I manually input a domain in to the domainconfig.tpl template file value field then it works exactly as I want, the problem is trying to get the variable from the url to pass it to this value field. The variable that I'm working with is prefilldomain so in the url I'd have http://www.mydomain.com/myaccount/order/?pid=1&skip=1&prefilldomain=test.com.au I've tried several different methods to catch this variable. Using Smarty's inbuilt method in domainconfig.tpl I've tried to use {smarty.get.prefilldomain} which doesn't work. However, this does work on the master.tpl page, which unfortunately is of no use in this situation as I need to be able to work with it in domainconfig.tpl Using /order/index.php I added a get function and added it to the template variable for the domainconfig.tpl echo statement within index.php In index.php on line 71 I added $prefilldomain = $_GET['prefilldomain']; Then, just before echo processSingleTemplate($tempsdir."domainconfig.tpl",$templatevars); I added $templatevars['prefilldomain'] = $prefilldomain; and then in domainconfig.tpl I added this to the input field value="{$prefilldomain}" Which doesn't work. However, If I change the $prefilldomain variable from a GET request to an actual domain name e.g. anothertest.com.au it works fine, although obviously does not take this value from the URL as I need it to. Would be really great if I could have some help with this. The templating system is great and it seems like I must be missing something very small in order to get this working for me. Any help would be much appreciated. Thanks 0 Quote Link to comment Share on other sites More sharing options...
gr2 Posted April 14, 2011 Share Posted April 14, 2011 I have spent hours trying to find a way to do this as well. Did you figure out a method to accomplish this? 0 Quote Link to comment Share on other sites More sharing options...
xenos Posted April 14, 2011 Share Posted April 14, 2011 Yep me too, fired off a support ticket - if you can wait a month I think we should get it. http://forum.whmcs.com/showthread.php?p=183556 It doesn't explicitly mention it but it would be a bit silly if it didn't have it! 0 Quote Link to comment Share on other sites More sharing options...
xenos Posted April 14, 2011 Share Posted April 14, 2011 Ok - apparently it's not included in 4.5 0 Quote Link to comment Share on other sites More sharing options...
lukewd Posted March 8, 2012 Share Posted March 8, 2012 can this be done yet? i want to pass the name, email address, and phone number fields from a landing page into the checkout cart... 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.