Order Now Refreshes the Page

Problem

Clicking Order Now for a product on the shopping cart product selection page (cart.php) or following a direct product order link (for example, http://example.com/whmcs/cart.php?a=add&pid=1) appears to refresh the page and shows the product selection page again.

When this happens, the ordering process may not proceed to the product configuration or View Cart steps.

Cause

This issue is often due to a problem with the URL.

If the URL is correct, the issue may be due to outdated templates. The application of a WHMCS update failed to apply the corresponding changes to custom themes or order form templates.

Troubleshooting

To troubleshoot this issue, compare the URL with the WHMCS System URL setting, check for missing product slugs, and check whether your themes and templates are up-to-date.

WHMCS System URL

To check whether the URL is correct:

  1. Note the URL that displays in the browser on the shopping cart page.
  2. Go to Configuration () > System Settings > General Settings and choose the General tab.
  3. Compare WHMCS System URL with the URL.
    Make certain to note the protocol (http:// or https://) and subdomain (for example, www). Most mismatches are due to issues with these values.

Solution

Make certain that WHMCS System URL uses the URL that you use to access the Admin Area.

For steps, see Update the System URL.

Product Slug

To check whether the issue is a missing product slug:

  1. Go to **Configuration () > System Settings > Products/Services.
  2. Edit each product group to check whether there is a valid product slug for URL.

If one or more product groups were missing product slugs, they were the issue.

Solution

Update the product groups to ensure that every URL value includes a product slug.

Out-of-Date Themes or Templates

If the issue is not due to a system URL mismatch or missing product slug, it is usually due to an out-of-date theme or template.

Solution

Apply the latest theme and order form template updates to your custom themes and templates. You can find the required template changes in the Templates section of each version’s Release Notes.

If you are updating across multiple versions (for example, from WHMCS 8.2 to 8.4), you must apply all of the template changes sequentially. For example, when moving from WHMCS 8.2 to 8.4, you must apply the WHMCS 8.3 template changes first and then apply the WHMCS 8.4 template changes.

If you purchased WHMCS from a third-party vendor, contact them to obtain the necessary update for compatibility with the new version of WHMCS.

Workaround

You can work around this problem by switching to the stock system theme (Twenty One) and order form template (Standard Cart) that the latest changes automatically udpdate.

To do this:

  1. Go to Configuration () > System Settings > General Settings and choose the General tab.
  2. Change System Theme to Twenty-One.
  3. Go to the Ordering tab.
  4. Change Default Order Form Template to Standard Cart.
  5. Click Save Changes.

If any product groups specify custom order form templates, you must also update those settings.

Last modified: June 14, 2024