Troubleshooting Order Form Issues

If you are experiencing a problem with the WHMCS order form, read on

Choose a Domain page shows no options

Problem: The Choose a Domain step of the ordering process shows a page with no main content:

Empty Choose a Domain page

This situaiton occurs when Require Domain is enabled in the product configuration, but no Domain Registration Options are enabled in general settings.

To resolve the issue:

  1. Go to Configuration > System Settings > General Settings > Domains Tab.
  2. Check one or more of the Domain Registration Options.
  3. Click Save Changes.
Domain Registration Options

For more information, see the Domain Tab documentation.

Order form not displaying domain results

1. Right click on the domain results page in your browser

2. Select the Inspect Element option

3. Click the Network tab

4. Check the availability of a domain in WHMCS in your browser

5. Select the entry for cart.php and look at the Headers section

6. Note the Content-Type value.

Click Inspect
Go to Network > cart.php > Headers tab

The expected Content-Type value is:

application/json


Note that in the above example the Content-Type value is different:

text/html; charset=utf-8

This is the cause of the domain results failing to display. Please work with your server admin/hosting provider to ensure that the appropriate response type is being returned.

Some common causes for this behaviour are listed below:

 

Invalid System Charset Setting

1. Navigate to Setup > General Settings > Localisation tab

2. Ensure the System Charset setting is valid. The default value is utf-8

 

Cloudflare

This problem can be caused by Cloudflare script minification/Rocketloader features. This causes Cloudflare to replace the javascripts WHMCS uses to check the availability with their own copies. Cloudflare's javascripts do not contain the necessary code.

Please disable RocketLoader and script minification options in your Cloudflare control panel.


Windows Servers

This problem has also been observed in Windows servers. 

Please work with your server admin/hosting provider to update to use the latest CGI SAPI for IIS (do not use ISAPI).

If an update is not possible, then a workaround is available using the creating-outbound-rules-for-url-rewrite-module feature to create the following rewrite rule:

<outboundRules>
    <rule name="sdf" preCondition="PHPRequest">
        <match serverVariable="RESPONSE_CONTENT_TYPE" pattern="^text/html; charset=utf-8,(.+)"/>
        <action type="Rewrite" value="{R:1}"/>
    </rule>
    <preConditions>
        <preCondition name="PHPRequest">
            <add input="{REQUEST_URI}" pattern=".*\.php"/>
        </preCondition>
    </preConditions>
</outboundRules>
Click to copy

Domain availability results are inaccurate

If domains which you know to be taken are showing as available, please refer to the Troubleshooting Domain Availability Check Problems article.

Free domains do not show as free on product configuration step

When configuring an order, the domain will show as full price until the checkout page

This is because the discount is reliant upon the client selecting the appropriate TLD, product and billing cycle, so cannot be applied until both the domain and product are in the cart with the billing cycle selected so WHMCS knows that they're eligible to receive the free domain.

Product price displays a smaller amount on the cart than configured

This is caused by the Monthly Pricing Breakdown feature.

If you do not wish prices displayed in this way, it can be disabled under Setup > General Settings > Ordering tab.

Product is configured as prorata but no pro-rating is occurring

Problem: You have checked the "Prorata" option in a product's Pricing tab with in the admin area, but upon ordering the price is not being pro-rated.

Solution: This is caused by the Signup Anniversary Prorata feature which overrides the product prorata setting. If you'd rather products be pro-rated to a specific date rather than the client's signup date, this option can be disabled under Setup > General Settings > Ordering tab.