Unable to Add Products to Cart

Symptom

Clicking Order Now on the shopping cart product selection page (cart.php) or following a direct product order link (for example, https://example.com/whmcs/store/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 stage.

WHMCS Shopping Cart

Cause

1. Accessing the shopping cart using a different URL from the one specified in the WHMCS System URL setting.

2. This issue may be due to an invalid URL (missing the slug) in the product group's configuration.

Solution 1

Small differences in the WHMCS System URL and the URL used to access the shopping cart can cause this behavior. To resolve this:

1. Note the URL displayed in your browser on the shopping cart page.

2. Make certain that this URL matches the WHMCS System URL setting in the General tab at Configuration > System Setup > General Settings.

3. If they do not match, update the WHMCS System URL setting to use the URL you use to access the Admin Area.

Small differences in the protocol (https:// vs http://) or subdomain www. are mismatches and require correction.

For steps to update the WHMCS System URL setting, see Updating the System URL

Solution 2

A missing product slug can use this behaviour. To resolve this:

1. In the WHMCS Admin Area, go to Configuration > System Settings > Products/Services.

2. Edit a product group.

3. Enter the desired product group URL (slug) in URL.

4. Click Save Changes

5. Repeat the process for every product group.