Jump to content

WHMCS 5 How to disable Setup Fee on the upgrade page


tomb

Recommended Posts

We noticed that WHMCS v5 displays the Setup Fee on the Upgrade/Downgrade section for all Hosting plans. e.g. Hosting costs + setup fee. Usually customers already paid a Setup Fee on their previous orders. How can I hide the Setup fee?

 

Thanks for your help.

Edited by tomb
Link to comment
Share on other sites

  • 5 years later...

This is still an issue with latest theme in 2021.

Now with the child theme feature, its possible to make your own upgrade.tpl file with modified pricing:

{if $upgradepackage.pricing.monthly}<option value="monthly">{$upgradepackage.pricing.monthly}</option>{/if}
{if $upgradepackage.pricing.quarterly}<option value="quarterly">{$upgradepackage.pricing.quarterly}</option>{/if}
{if $upgradepackage.pricing.semiannually}<option value="semiannually">{$upgradepackage.pricing.semiannually}</option>{/if}
{if $upgradepackage.pricing.annually}<option value="annually">{$upgradepackage.pricing.annually}</option>{/if}
{if $upgradepackage.pricing.biennially}<option value="biennially">{$upgradepackage.pricing.biennially}</option>{/if}
{if $upgradepackage.pricing.triennially}<option value="triennially">{$upgradepackage.pricing.triennially}</option>{/if}

My guess is to change "{$upgradepackage.pricing.annually}" to a version without the setup fee included.

Link to comment
Share on other sites

8 hours ago, AzeDK said:

My guess is to change "{$upgradepackage.pricing.annually}" to a version without the setup fee included.

you might as well just use a hook to change the pricing shown... i'm not sure if a setup fee actually gets charged on upgrade (haven't checked in a while), but the fee is still shown on the upgrade page pricing.

Link to comment
Share on other sites

@brian!

They dont get charged for upgrading existing products, and this is why its confusing to customers, and causes extra support questions.

Setup fee should only be visible when ordering new products. But I think in an older thread another company wanted specifically charge for setup fees during upgrades, and so John WHMCS added it back in many years ago.

Could a hook target "upgradepackage.pricing" ? Then it should not affect regular pricing for new product pricing.

Link to comment
Share on other sites

1 hour ago, AzeDK said:

Could a hook target "upgradepackage.pricing" ? Then it should not affect regular pricing for new product pricing.

easily - i'm cheating here by just checking if the cycle contains +, ideally it should check to see if there is a setup fee separately... but you can let me know if this current version fails!

<?php

# Upgrade Remove Setup Fees Hook
# Written by brian!

function upgrade_remove_setup_fees_hook($vars) {
	
	$upgrades = $vars['upgradepackages'];
	$billingcycles = array('onetime','monthly','quarterly','semiannually','annually','biennially','triennially');
	foreach ($upgrades as $key => $product) {
		foreach ($billingcycles as $cycle) {
			if (strpos($product['pricing'][$cycle],'+') !== false) {			
				$upgrades[$key]['pricing'][$cycle] = strstr($product['pricing'][$cycle],' +', true);
			}
		}
	}
	return array("upgradepackages" => $upgrades);
}
add_hook("ClientAreaPageUpgrade", 1, "upgrade_remove_setup_fees_hook");
Link to comment
Share on other sites

38 minutes ago, brian! said:

easily - i'm cheating here by just checking if the cycle contains +, ideally it should check to see if there is a setup fee separately... but you can let me know if this current version fails!

Thanks Brian! I am in happy tears, its been an issue for me past 8+ years.

image.png.2d5c52486bf5181f7072ed35d9b9f3eb.png

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.

Guest
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