ozace Posted March 20, 2009 Share Posted March 20, 2009 Hi, I would like to be able to add a custom field on the domain table for my code usage (registrar module I am developing for Enetica). Now I know I could simply add the field - but am worried that any future upgrade would break this. Is there a way to do this - ie associate a configurable item or field to every domain in system ? A safe alternative (not as clean in some ways) would be to create a new table, on a regular basis update this table from the tbldomains (maybe a cron ?) and have the field in there. But a custom field that is part of the main table would be nicest cheers Jim 0 Quote Link to comment Share on other sites More sharing options...
ozace Posted March 21, 2009 Author Share Posted March 21, 2009 Hi, have decided to setup a separate table and key it back to domain table. That will stop any issues for the future if the db is updated in a subsequent release. Although it would be nice if the developers could consider implementing a custom field on some of the tables that are available for us to use in the future ? cheers Jim 0 Quote Link to comment Share on other sites More sharing options...
jasonhk Posted March 21, 2009 Share Posted March 21, 2009 I'm also looking for something similar to this. I would like my reseller to be able to register domains in their clients details. We use CO.ZA as our main registrar and registrations are processed via text email, so we would need a place where users can enter extra domain information on checkout and then our COZA registration script could just pull that information from the database and generate the email. Anyone got any ideas as to how we can implement this? 0 Quote Link to comment Share on other sites More sharing options...
jasonhk Posted March 21, 2009 Share Posted March 21, 2009 Ah - I found out how to add custom domain fields. Now how do I use these fields in the custom registrar "function RegisterDomain" scipt? 0 Quote Link to comment Share on other sites More sharing options...
jasonhk Posted March 21, 2009 Share Posted March 21, 2009 Sorry no edit function so here comes my triple post, sorry ozace. I figured out the custom variables, in the registration script add $vars = get_defined_vars(); print_r($vars); 0 Quote Link to comment Share on other sites More sharing options...
ozace Posted March 22, 2009 Author Share Posted March 22, 2009 thanks - will follow up Jim 0 Quote Link to comment Share on other sites More sharing options...
ozace Posted March 22, 2009 Author Share Posted March 22, 2009 ok - thanks jasonhk - that has now sorted most of my questions - the additional fields are available to me and I see come from the domainsadditionfields table linked to the domain via the domainid. Matt - what I would love now is to have a way to have an additional field defined in additionaldomainfields.php that isn't displayed in the cart. ie a "visible"=>false field and doesnt display in cart. I guess I could fudge it by having an {if $domainfieldname ne "myfieldname"} type of clause in the configuredomains.tpl that then doesn't display the field but leaves it available to me to use internally? cheers Jim 0 Quote Link to comment Share on other sites More sharing options...
jasonhk Posted March 22, 2009 Share Posted March 22, 2009 ok - thanks jasonhk - that has now sorted most of my questions - the additional fields are available to me and I see come from the domainsadditionfields table linked to the domain via the domainid. Matt - what I would love now is to have a way to have an additional field defined in additionaldomainfields.php that isn't displayed in the cart. ie a "visible"=>false field and doesnt display in cart. I guess I could fudge it by having an {if $domainfieldname ne "myfieldname"} type of clause in the configuredomains.tpl that then doesn't display the field but leaves it available to me to use internally? cheers Jim You can use some java coding to hide a text field 0 Quote Link to comment Share on other sites More sharing options...
ozace Posted March 23, 2009 Author Share Posted March 23, 2009 yep however I dont want it going anywhere near the browser/user as it is sensitive info - so I will use a check in the tpl to see if I am about to display that fiels and if so skip to the next cheers Jim 0 Quote Link to comment Share on other sites More sharing options...
othellotech Posted March 23, 2009 Share Posted March 23, 2009 I guess I could fudge it by having an {if $domainfieldname ne "myfieldname"} type of clause in the configuredomains.tpl that then doesn't display the field but leaves it available to me to use internally? thats the only way i've found to do it so far. 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.