Repository navigation
feat(orders): free subdomains for hosting orders - #179
Merged
Panelica merged 7 commits intoOct 12, 2026
Merged
Conversation
…ck and whether a name is free
… taken names are refused, again at checkout
…, transfer and own domain
…der Setup > General > Domains
…own domain and re-checked at checkout
Owner
|
Thank you, @ertugrulkeyvan, merged. A free subdomain checked for reserved and taken names, both in the cart and again at checkout, is a careful piece of work. On top of your commits there is one more (727fedc): with no free subdomain domains set, the order form is the page it was before. The flex row, the placeholder attribute and the script lines are written only when the option is offered, and the script's check is safe on order forms without a domain section, such as VPS products. When merging, the new texts follow the ones #180, #184 and #185 had just added to Full suite green. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
A hosting order can take a name under one of the shop's own domains, such as
yourname.example-sites.com, instead of a domain of its own.WHMCS calls these "Free Subdomains". They suit trial plans and customers who have not chosen a domain yet. Many shops offer them, and we are about to.
Today the only way is to type the full name as "use my own domain", and nothing checks it. A customer can order
www.<shop domain>,mail.<shop domain>, or a name another customer already has. The panel then either refuses at provisioning or, worse, serves the shop's own host from a customer account.After this:
www,mail,ns1,autodiscover,admin,apiand the like.a.b, or one with a leading hyphen);How
App\Support\FreeSubdomains: the offered parents, the reserved labels (the operator's list or the default one),parentOf(),problem()(an error message or null) andtaken().CartController::addToCart():domain_option=subdomainwithsubdomain_parentbuilds the full name;FreeSubdomains::problem();domainfield, as other domain errors do.CartService::checkout(): re-checks a free subdomain before the order is created, and only notes register and transfer.client/cart/configuregets the option and the parent list. Its script swaps the placeholder and skips the price quote for this option.GENERAL_KEYS.docs/guides/sell-domains.md, with the wildcard DNS record the domains need.The work is split into seven commits: the rules, the order, the form, the admin fields, the translations, the docs and the tests.
Tests
tests/Feature/FreeSubdomainTest.php, 16 tests:www,mail,admin,ns1andautodiscoverare refused. The operator's own list replaces the default one.They fail on
main.HardcodedViewTextTestand the translation tests pass.Full suite: 4102 passed. The one failure is the
CurrencyAndBackupTestdb backup test, which fails onmaintoo in my local setup.