Jump to content
sonuyos

Registration after Payment and order?

Recommended Posts

I needed a plugin that would help me with this,

 

I have a huge client loss (acc to funnel), during registration, could be because of the lengthy list of details required.

I wanted a way, that the user only registers using email & pass, and then after payment is done, redirected to order confirmation page, all good till now, but then the whole WHMCS gets lock down till registrations is completed, ie address, and all other details..

 

I can probably edit the cart - reg page and remove all the details except email and pass, but am having 2 troubles.

 

1 - How to let WHMCS accept only email and pass on registration

2 - How to lock down WHMCS in Account page, until they enter all their details, such as address.

Share this post


Link to post
Share on other sites
Posted (edited)

I have no idea if there's a ready-made plugin but it's doable. Create you simplified page with:

  • Name
  • Email
  • Order Now button
  • "I want to receive newseller" Checkbox (optional)

On click, you'll need to "pre-register" the customer in your WHMCS. Use AddClient API with skipvalidation = true since we don't want to provide lastname, country, address, city etc. now. The bad news is that before running AddClient, you'll need to check if that email is in use otherwise lamers could block the email of your new customers by placing fake orders with their emails. Long story short if the email is "new", AddClient as normal otherwise re-use that customer updating his details with UpdateClient.

In both cases (AddClient and UpdateClient) now you have the UserID of the customer that is placing the order. Now you need to:

In this specific sequence. The point is that before placing the new order, you want to make sure that there are no other pending orders left there days before. Here comes the tricky part. You have to login your customer via API with Authentication before you redirect him to the invoice.

You have successfully registered a customer just with email & name, placed the order and received the payment. Everyone is happy but don't forget that you'll also need to code an action hook to force your customer to provide his/her personal details (companyname, lastname, address, city, zipcode...) X days after they completed the order.

I don't know if there are alternatives but this is how I made it. It took me 5 days 😕

Edited by Kian

Share this post


Link to post
Share on other sites
3 minutes ago, Kian said:

I have no idea if there's a ready-made plugin but it's doable. Create you simplified page with:

  • Name
  • Email
  • Order Now button
  • "I want to receive newseller" Checkbox (optional)

On click, you'll need to "pre-register" the customer in your WHMCS. Use AddClient API with skipvalidation = true since we don't want to provide lastname, country, address, city etc. now. The bad news is that before running AddClient, you'll need to check if that email is in use otherwise lamers could block the email of your new customers by placing fake orders with their emails. Long story short if the email is "new", AddClient as normal otherwise re-use that customer updating his details with UpdateClient.

In both cases (AddClient and UpdateClient) now you have the UserID of the customer that is placing the order. Now you need to:

In this specific sequence. The point is that before placing the new order, you want to make sure that there are no other pending orders left there days before. Here comes the tricky part. You have to login your customer via API with Authentication before you redirect him to the invoice.

You have successfully registered a customer just with email & name, placed the order and received the payment. Everyone is happy but don't forget that you'll also need to code an action hook to force your customer to provide his/her personal details (companyname, lastname, address, city, zipcode...) X days after they completed the order.

I don't know if there are alternatives but this is how I made it. It took me 5 days 😕

Wouldnt it be easier if you just edit Cart Registration and force user to complete registration after payment by locking them into Address page?

Share this post


Link to post
Share on other sites

It's true that I tend to overcomplicate things 😀 but if you want to try with Cart, probably you should hide all the unnecessary input fields (lastname, companyname, address, city, state, custom fields...) and set their values for example equal to "1". This way when customers submit an order filling just email and firstname, WHMCS won't trigger any error (eg. Address 1 is filed is required). Problem is that you have to make sure that your customer doesn't see any of these "1" so you have to invest a lot of time in clearing clients' data with several hook points.

Share this post


Link to post
Share on other sites
9 hours ago, Kian said:

It's true that I tend to overcomplicate things 😀 but if you want to try with Cart, probably you should hide all the unnecessary input fields (lastname, companyname, address, city, state, custom fields...) and set their values for example equal to "1". This way when customers submit an order filling just email and firstname, WHMCS won't trigger any error (eg. Address 1 is filed is required). Problem is that you have to make sure that your customer doesn't see any of these "1" so you have to invest a lot of time in clearing clients' data with several hook points.

Are you planning to sell your code?

Share this post


Link to post
Share on other sites
16 hours ago, sonuyos said:

1 - How to let WHMCS accept only email and pass on registration

by making the other fields optional from the settings...

https://docs.whmcs.com/Other_Tab#Optional_Client_Profile_Fields

Quote

The checkboxes ticked here will be optional on the registration and order forms. For example ticking the Phone Number field will mean clients can complete the order process without providing a phone number. Certain modules, particularly domain registrars, may require all the client profile information to function.

RoN4JpK.png

with all those fields optional, then only email address and password should be required to complete the order... any required custom client fields, security questions and TOS would be too if they were enabled, but if you're trying to keep the checkout/registration pages to a minimum, I doubt that you would enable them. 🙂

then just commenting out the blocks of code in clientregister.tpl should be all that's needed - if WHMCS used properly coded CSS IDs or names in their templates, you should be able to do it that way, but until that glorious day arrives, editing the template would be easier.

16 hours ago, sonuyos said:

2 - How to lock down WHMCS in Account page, until they enter all their details, such as address.

probably a variation of the ClientAreaPage hooks I used in the threads below...

what both of those hooks do is redirect the logged in user to a specific page if certain conditions aren't met - in the case of the latter, it's the client not having previously added an answer to a security question - the hook means that until they do that, they ain't going anywhere in WHMCS - not to the cart, the kb, the clientarea homepage... they will keep getting redirected to the page until they meet the conditions.

in your case, I suppose that's going to be choosing a field (or fields) that you need to be completed, e.g firstname and lastname and adjusting the hook code accordingly... once they're updated, the client can go wherever he wants within WHMCS. 🙂

Share this post


Link to post
Share on other sites
6 hours ago, brian! said:

by making the other fields optional from the settings...

https://docs.whmcs.com/Other_Tab#Optional_Client_Profile_Fields

RoN4JpK.png

with all those fields optional, then only email address and password should be required to complete the order... any required custom client fields, security questions and TOS would be too if they were enabled, but if you're trying to keep the checkout/registration pages to a minimum, I doubt that you would enable them. 🙂

then just commenting out the blocks of code in clientregister.tpl should be all that's needed - if WHMCS used properly coded CSS IDs or names in their templates, you should be able to do it that way, but until that glorious day arrives, editing the template would be easier.

probably a variation of the ClientAreaPage hooks I used in the threads below...

what both of those hooks do is redirect the logged in user to a specific page if certain conditions aren't met - in the case of the latter, it's the client not having previously added an answer to a security question - the hook means that until they do that, they ain't going anywhere in WHMCS - not to the cart, the kb, the clientarea homepage... they will keep getting redirected to the page until they meet the conditions.

in your case, I suppose that's going to be choosing a field (or fields) that you need to be completed, e.g firstname and lastname and adjusting the hook code accordingly... once they're updated, the client can go wherever he wants within WHMCS. 🙂

<?php

# Force Security Questions Hook
# Written by brian!-The Lord

function force_security_questions_hook($vars) {

    $client = Menu::context('client');
    $address1 = $client->address1;
    if ($client && $vars['templatefile'] != "clientareaaddress1" && $address1===0) {
        header("Location: clientarea.php?action=details");
        exit;
    }
}
add_hook("ClientAreaPage", 1, "force_security_questions_hook");

Something like that @brian!?

Also this is for like 1 variable, any tip on adding multiple variables?

Share this post


Link to post
Share on other sites

Alright i tested the hook i created and the one you created, both aint working. Weird.

Share this post


Link to post
Share on other sites
Posted (edited)
23 hours ago, sonuyos said:

Alright i tested the hook i created and the one you created, both ain't working. Weird.

yours wouldn't work, and if you enabled them both, neither would mine because they both have the same function name. headshake.gif

so let's say we want to use a hook to test whether address1 is empty...

<?php

# Force Client Details Completion
# Written by brian!

function force_client_details_completion_hook($vars) {

	$client = Menu::context('client');
	$address1 = $client->address1;
	if ($client && $vars['templatefile'] != "clientareadetails" && empty($address1)) {
		header("Location: clientarea.php?action=details");
		exit;
	}
}
add_hook("ClientAreaPage", 1, "force_client_details_completion_hook");

so upon logging in, if $address1 is empty, the client will be redirected to the client details page to update their details... and no matter where they click, they're going nowhere until the enter some value into the address1 field... as soon as they do that, they can continue to go whatever they like. 🙂

23 hours ago, sonuyos said:

Also this is for like 1 variable, any tip on adding multiple variables?

using in_array would be one option...

<?php

# Force Client Details Completion
# Written by brian!

function force_client_details_completion_hook($vars) {

	$client = Menu::context('client');
	$requiredfields = array($client->address1,$client->address2,$client->companyName);
	if ($client && $vars['templatefile'] != "clientareadetails" && in_array("",$requiredfields)) {
		header("Location: clientarea.php?action=details");
		exit;
	}
}
add_hook("ClientAreaPage", 1, "force_client_details_completion_hook");

this modified hook checks to see if *any* of these "required" fields are empty, and if any of them are, then the client is again trapped inside the clients details page until they complete all their required details. enprison.gif

if you're not going to show an explanatory message in a popup, i'd be tempted to modify clientareadetails.tpl to show them a message as to why they're trapped on that page (assuming you're not doing it elsewhere, e.g on the registration page)... that would also allow you to make these fields required too in the HTML (though that shouldn't strictly be necessary other than to show an error popover in the field if empty when submitted).

Edited by brian!

Share this post


Link to post
Share on other sites
17 hours ago, brian! said:

yours wouldn't work, and if you enabled them both, neither would mine because they both have the same function name. headshake.gif

so let's say we want to use a hook to test whether address1 is empty...


<?php

# Force Client Details Completion
# Written by brian!

function force_client_details_completion_hook($vars) {

	$client = Menu::context('client');
	$address1 = $client->address1;
	if ($client && $vars['templatefile'] != "clientareadetails" && empty($address1)) {
		header("Location: clientarea.php?action=details");
		exit;
	}
}
add_hook("ClientAreaPage", 1, "force_client_details_completion_hook");

so upon logging in, if $address1 is empty, the client will be redirected to the client details page to update their details... and no matter where they click, they're going nowhere until the enter some value into the address1 field... as soon as they do that, they can continue to go whatever they like. 🙂

using in_array would be one option...


<?php

# Force Client Details Completion
# Written by brian!

function force_client_details_completion_hook($vars) {

	$client = Menu::context('client');
	$requiredfields = array($client->address1,$client->address2,$client->companyName);
	if ($client && $vars['templatefile'] != "clientareadetails" && in_array("",$requiredfields)) {
		header("Location: clientarea.php?action=details");
		exit;
	}
}
add_hook("ClientAreaPage", 1, "force_client_details_completion_hook");

this modified hook checks to see if *any* of these "required" fields are empty, and if any of them are, then the client is again trapped inside the clients details page until they complete all their required details. enprison.gif

if you're not going to show an explanatory message in a popup, i'd be tempted to modify clientareadetails.tpl to show them a message as to why they're trapped on that page (assuming you're not doing it elsewhere, e.g on the registration page)... that would also allow you to make these fields required too in the HTML (though that shouldn't strictly be necessary other than to show an error popover in the field if empty when submitted).

Brian, you mah man, you are genius.

And your script works flawlessly except for 1 problem.

Once the user registers, instead of going to the invoice the user gets locked right away in the My details area, rendering everything quite uselss 😕

I am trying to find a solution for this.

Share this post


Link to post
Share on other sites
55 minutes ago, sonuyos said:

And your script works flawlessly except for 1 problem.

not that flawless then. 😄

56 minutes ago, sonuyos said:

Once the user registers, instead of going to the invoice the user gets locked right away in the My details area, rendering everything quite useless 😕

aah you were using the word register in the sense of ordering too _ i had thought it primarily a case of users just registering without ordering... my bad.

58 minutes ago, sonuyos said:

am trying to find a solution for this.

that's simple - you just give them a list of valid pages that they are allowed to visit...

<?php

# Force Client Details Completion v1.1
# Written by brian!

function force_client_details_completion_hook($vars) {

	$client = Menu::context('client');
	$requiredfields = array($client->address1,$client->address2,$client->companyName);
	$validpages = array("clientarea","contact","dologin","index","login","pwreset","submitticket","viewinvoice");
	if ($client && !in_array($vars['filename'],$validpages) && in_array("", $requiredfields)) {
		header("Location: clientarea.php?action=details");
		exit;
	}
}
add_hook("ClientAreaPage", 1, "force_client_details_completion_hook");

it would be more flexible if we could do it by template pages, but with all the redirection in the clientarea, that becomes a nightmare - so hopefully you can live with using pages...

in the above example, the client can login and go anywhere in the clientarea, contact page, the homepage, submit a ticket and view invoices - what they cannot do is go to the cart (or any other pages that you haven't specified) until they have completed their details.

couple of other thoughts... you could use another hook to show a warning message on the clientarea homepage if they have missing details and tell them they cannot order again.... i've combined hooks in same file, so no need to use previous example hook and this in separate files.

<?php

# Force Client Details Completion
# Written by brian!

function force_client_details_completion_hook($vars) {

	$client = Menu::context('client');
	$requiredfields = array($client->address1,$client->address2,$client->companyName);
	$validpages = array("clientarea","contact","dologin","index","login","pwreset","submitticket","viewinvoice");
	if ($client && !in_array($vars['filename'],$validpages) && in_array("", $requiredfields)) {
		header("Location: clientarea.php?action=details");
		exit;
	}
}
add_hook("ClientAreaPage", 1, "force_client_details_completion_hook");

function display_client_details_message_on_homepage_hook($vars) {
	
	$client = Menu::context('client');
	$requiredfields = array($client->address1,$client->address2,$client->companyName);
	if (in_array("", $requiredfields)) {
		return <<<HTML
<div class="alert alert-danger">
  <strong>You have yet to fully complete your <a href="clientarea.php?action=details">registration details</a> - please note that you cannot order from us again until you do so!</strong>
</div>
HTML;
	}
}
add_hook("ClientAreaHomepage", 1, "display_client_details_message_on_homepage_hook");

BBje73X.png

that output text string should really be using a language string via a Language Override if your site uses multiple languages...

alternatively, you could add all sorts of conditionalities into that hook - e.g lock them down to the clients details (or other specified) pages if they have no outstanding (unpaid) invoices (that's a simple query to the db); lock them down x days after registering so they can go nowhere until they complete their details... effectively that should just be a series of if statements manipulating the $validpages array based on whatever conditions you want to impose.

Share this post


Link to post
Share on other sites
43 minutes ago, brian! said:

not that flawless then. 😄

aah you were using the word register in the sense of ordering too _ i had thought it primarily a case of users just registering without ordering... my bad.

that's simple - you just give them a list of valid pages that they are allowed to visit...


<?php

# Force Client Details Completion v1.1
# Written by brian!

function force_client_details_completion_hook($vars) {

	$client = Menu::context('client');
	$requiredfields = array($client->address1,$client->address2,$client->companyName);
	$validpages = array("clientarea","contact","dologin","index","login","pwreset","submitticket","viewinvoice");
	if ($client && !in_array($vars['filename'],$validpages) && in_array("", $requiredfields)) {
		header("Location: clientarea.php?action=details");
		exit;
	}
}
add_hook("ClientAreaPage", 1, "force_client_details_completion_hook");

it would be more flexible if we could do it by template pages, but with all the redirection in the clientarea, that becomes a nightmare - so hopefully you can live with using pages...

in the above example, the client can login and go anywhere in the clientarea, contact page, the homepage, submit a ticket and view invoices - what they cannot do is go to the cart (or any other pages that you haven't specified) until they have completed their details.

couple of other thoughts... you could use another hook to show a warning message on the clientarea homepage if they have missing details and tell them they cannot order again.... i've combined hooks in same file, so no need to use previous example hook and this in separate files.


<?php

# Force Client Details Completion
# Written by brian!

function force_client_details_completion_hook($vars) {

	$client = Menu::context('client');
	$requiredfields = array($client->address1,$client->address2,$client->companyName);
	$validpages = array("clientarea","contact","dologin","index","login","pwreset","submitticket","viewinvoice");
	if ($client && !in_array($vars['filename'],$validpages) && in_array("", $requiredfields)) {
		header("Location: clientarea.php?action=details");
		exit;
	}
}
add_hook("ClientAreaPage", 1, "force_client_details_completion_hook");

function display_client_details_message_on_homepage_hook($vars) {
	
	$client = Menu::context('client');
	$requiredfields = array($client->address1,$client->address2,$client->companyName);
	if (in_array("", $requiredfields)) {
		return <<<HTML
<div class="alert alert-danger">
  <strong>You have yet to fully complete your <a href="clientarea.php?action=details">registration details</a> - please note that you cannot order from us again until you do so!</strong>
</div>
HTML;
	}
}
add_hook("ClientAreaHomepage", 1, "display_client_details_message_on_homepage_hook");

BBje73X.png

that output text string should really be using a language string via a Language Override if your site uses multiple languages...

alternatively, you could add all sorts of conditionalities into that hook - e.g lock them down to the clients details (or other specified) pages if they have no outstanding (unpaid) invoices (that's a simple query to the db); lock them down x days after registering so they can go nowhere until they complete their details... effectively that should just be a series of if statements manipulating the $validpages array based on whatever conditions you want to impose.

As usual, you are the best, but i have figured a better option 😛

{if $smarty.get.status eq incomplete} 
{include file="$template/includes/alert.tpl" type="info" msg="Please fill the form to continue with our services."}
{else} 
{/if}

After locking them to the place where they have to add registration, i am just gonna add 1 parameter on the url i.e. status=incomplete.

 

And till they fix it out, that parameter they gonna see on that page, i am yet to look into the invoice, but i think it should work there as well.

I think i have to unlock 2 pages, invoice, and cart complete page.

Share this post


Link to post
Share on other sites

Brian, the solution you gave works, but i do not want the user to be able to access clientarea at all, except invoice and the details page, and to use the method you provided would give access to the whole site, and if i remove clientarea, it will stuck in redirection loop.

Share this post


Link to post
Share on other sites
Posted (edited)
2 hours ago, sonuyos said:

And till they fix it out, that parameter they gonna see on that page, i am yet to look into the invoice, but i think it should work there as well.

until they remove that from the URL or give it a different value... or you need to update WHMCS - though seeing as we won't have had an update for 6 months by the time v7.8 comes out of beta, that's slightly less relevant! 🙄

1 hour ago, sonuyos said:

Brian, the solution you gave works, but i do not want the user to be able to access clientarea at all, except invoice and the details page, and to use the method you provided would give access to the whole site, and if i remove clientarea, it will stuck in redirection loop.

I should never code on a Saturday, it's a day-off for me! 🏖️

how about this then...

<?php

# Force Client Details Completion
# Written by brian!

function force_client_details_completion_hook($vars) {

	$client = Menu::context('client');
	$requiredfields = array($client->address1,$client->address2,$client->companyName);
	$validpages = array ("clientareadetails","viewinvoice","clientareainvoices");
	if ($client && !in_array($vars['templatefile'],$validpages) && in_array("",$requiredfields)) {
		header("Location: clientarea.php?action=details");
		exit;
	}
}
add_hook("ClientAreaPage", 1, "force_client_details_completion_hook");

so by default, upon logging in they'll be redirected to the client details page.... from there, they can only go to the invoices page (the one that shows a list of invoices) and viewinvoice itself... if they're following a viewinvoice link from an email, they'll go straight to the invoice after logging in... as you say, you might need to add cart complete to that array of templates. 🙂

Edited by brian!

Share this post


Link to post
Share on other sites

What a useful bit of code, I can think of some uses for this myself (note to self, must save the URL)

Share this post


Link to post
Share on other sites
25 minutes ago, brian! said:

until they remove that from the URL or give it a different value... or you need to update WHMCS - though seeing as we won't have had an update for 6 months by the time v7.8 comes out of beta, that's slightly less relevant! 🙄

I should never code on a Saturday, it's a day-off for me! 🏖️

how about this then...


<?php

# Force Client Details Completion
# Written by brian!

function force_client_details_completion_hook($vars) {

	$client = Menu::context('client');
	$requiredfields = array($client->address1,$client->address2,$client->companyName);
	$validpages = array ("clientareadetails","viewinvoice","clientareainvoices");
	if ($client && !in_array($vars['templatefile'],$validpages) && in_array("",$requiredfields)) {
		header("Location: clientarea.php?action=details");
		exit;
	}
}
add_hook("ClientAreaPage", 1, "force_client_details_completion_hook");

so by default, upon logging in they'll be redirected to the client details page.... from there, they can only go to the invoices page (the one that shows a list of invoices) and viewinvoice itself... if they're following a viewinvoice link from an email, they'll go straight to the invoice after logging in... as you say, you might need to add cart complete to that array of templates. 🙂

Nah mate, it straight right doesn't work.

I tried to just update pages in $validpages too, still wouldn't work, would just stuck at redirection.

Share this post


Link to post
Share on other sites
8 minutes ago, aquiss said:

What a useful bit of code, I can think of some uses for this myself (note to self, must save the URL)

It indeed is, Brian? more like Brain :v

Share this post


Link to post
Share on other sites
Posted (edited)
13 minutes ago, sonuyos said:

Nah mate, it straight right doesn't work.

I tried to just update pages in $validpages too, still wouldn't work, would just stuck at redirection.

I can only test it with what I have in front of me locally, and with v7.7.1 and Six, i'm getting no redirection issues at all and can only visit the specified templates (when logged in as a client with those missing details)... can you try it on a clean version of Six and not your custom to ensure that it's not a template issue at your end?

Edited by brian!

Share this post


Link to post
Share on other sites
Posted (edited)
22 minutes ago, brian! said:

I can only test it with what I have in front of me locally, and with v7.7.1 and Six, i'm getting no redirection issues at all and can only visit the specified templates (when logged in as a client with those missing details)... can you try it on a clean version of Six and not your custom to ensure that it's not a template issue at your end?

No, No, redirection happens when i try to substitute the $validpages parameters in the prvious code,

 

Ifjust putting the code in as you gave, that simply doesn't do anything at all.

 

Tested in 7.7.1 with SIX too.

Edited by sonuyos

Share this post


Link to post
Share on other sites
1 minute ago, sonuyos said:

No, No, redirection happens when i try to substitute the $validpages parameters, just putting the code in as you gave, that simply doesn't do anything at all.

do you know what I think is causing this? the evil poorly-documented Friendly URLs "feature". 😠

you're using "Friendly index.php" which is adding more redirection to the clientarea; i've been testing in "Full Friendly Rewrite" mode... with your setting, i'm getting redirection errors if I go to kb or announcements... with FFR, no errors at all.

is it an option for you to switch to FFR in your general settings ?

Share this post


Link to post
Share on other sites

Basic URLs would probably work too

Share this post


Link to post
Share on other sites

Even with FRR or Basic, it doesn't work.

 

I think there is some problem here - !in_array($vars['templatefile'],$validpages)

I think that vars is wrong for me i think.

Share this post


Link to post
Share on other sites

Ok, i dont know, but it works now.

LOL.

<?php

# Force Client Details Completion v1.1
# Written by brian!

function force_client_details_completion_hook($vars) {

	$client = Menu::context('client');
	$requiredfields = array($client->address1,$client->city,$client->postcode,$client->state,$client->country,$client->phonenumber);
	$validpages = array("clientareadetails","supporttickets","viewinvoice","clientareainvoices","submitticket");
	if ($client && !in_array($vars['templatefile'],$validpages) && in_array("", $requiredfields)) {
		header("Location: clientarea.php?action=details&status=incomplete");
		exit;
	}
}
add_hook("ClientAreaPage", 1, "force_client_details_completion_hook");

HOWEVER. supporttickets & submitticket doesnt not work.

I thnk cuz of vars for templatefile? Now here is the freaky stuff, viewinvoice works fine for some reason.

Share this post


Link to post
Share on other sites
18 hours ago, sonuyos said:

I think that vars is wrong for me i think.

it can't be - it's just checking the current template against the whitelist of allowable places to visit.

17 hours ago, sonuyos said:

Ok, i dont know, but it works now.

as I said, it's evil...  another flaky idea partially developed, and not thoroughly tested, by WHMCS.

I didn't fancy fannying around with routepath on a Saturday afternoon - another option would be to change the redirection URL based on the FU setting as I suspect it was that causing redirection loops.

17 hours ago, sonuyos said:

HOWEVER. supporttickets & submitticket doesnt not work.

hey what happened to "I only want them to access the client details page and nowhere else"? lol.  😉

17 hours ago, sonuyos said:

I think cuz of vars for templatefile?

with templates, think of their template filenames and you'll be halfway there...

$validpages = array("clientareadetails","supportticketslist","viewinvoice","clientareainvoices","supportticketsubmit-stepone","supportticketsubmit-steptwo","supportticketsubmit-complete");
17 hours ago, sonuyos said:

Now here is the freaky stuff, viewinvoice works fine for some reason. 

because the value for it in $validpages is correct. 🙂

Share this post


Link to post
Share on other sites
7 hours ago, brian! said:

it can't be - it's just checking the current template against the whitelist of allowable places to visit.

as I said, it's evil...  another flaky idea partially developed, and not thoroughly tested, by WHMCS.

I didn't fancy fannying around with routepath on a Saturday afternoon - another option would be to change the redirection URL based on the FU setting as I suspect it was that causing redirection loops.

hey what happened to "I only want them to access the client details page and nowhere else"? lol.  😉

with templates, think of their template filenames and you'll be halfway there...


$validpages = array("clientareadetails","supportticketslist","viewinvoice","clientareainvoices","supportticketsubmit-stepone","supportticketsubmit-steptwo","supportticketsubmit-complete");

because the value for it in $validpages is correct. 🙂

Oh well, i just did something else. I just let it be blocked. And now trying to setup a hook that would send mail to users to remind them to complete registration 1 hour after registration.

Wonder if it is possible. Anyways, thanks for your help mate, you are as usuz the best <3.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated