Jump to content

IF conditional if someone's requesting new domain being registered AFTER ordering?

Tim Greer

Recommended Posts

I plan to use a domain registrar storefront (wild west domains), rather than a domain registrar API, so I'd like to present people with a link to it for their registering their new domain (fields I can populate with their information, when pointing/linking to the storefront), but only if they've selected "order a domain" through us. I won't confuse them with the "transfer domain to us" option, and plan to implement our own module to check that the domain is free before their hosting plan order, but want this to appear only after they've ordered (otherwise we risk the client being off site and getting confused with all of the WWD options and pages to complete their order).


Does anyone know if there is a switch/conditional I can add to the order complete.tpl and/or viewinvoice.tpl files that will allow for this logic (i.e., it's not someone updating their name servers and actually needing to register a new domain)?


Something like {if $domainoption.register} My form fields here w/ link to storefront {/if}


I plan to write my own modules or frontend to solve some of these issues, but will need this special conditional on the invoice/order complete pages. If anyone knows, please advise. If I find the field and it works with a conditional, I'll update this thread. Thanks.

Link to comment
Share on other sites

This above worked, but then it stopped working without any changes.


The issues I have at this time, are the domain type (existing domain, transfer, register) variable hooks. I added a simple [if} conditional in the "Order complete" and "View invoice" .tpl files for the domaintype being "register", and it was working, but as soon as it was Smarty-ified and compiled into the c_templates viewinvoice.tpl it no longer worked, so I'm unsure what to do about that.


I want to present a link to the reseller domain registrar storefront site's URL I have (along with the domain variable I can POST to that site to get them started with that domain they initially selected on the order), but _only_ after the order is complete or they've been presented with the invoice, and _only_ if it's a new domain registration (not for people using their existing domain on my hosting service -- and I don't plan to offer them a "transfer" option, as it would be too confusing for them since I don't use a registrar API, and I don't want newbies thinking they have to pay to transfer a domain to me just to get hosting).


Is there any specific hook or switch or variable or conditional I can use for that purpose?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated