Jump to content

Redirect from contact page for logged in customers?


Si

Recommended Posts

I have a support dept set up named SALES DEPT and the contact page setup to redirect to that dept if anyone clicks on the CONTACT US page.

 

The problem is that logged in customers who click on this, always submit their support tickets to SALES and not one of the other support depts.

 

So, I'm using the following code to display information to logged in users:

 

{if $department eq "SALES DEPT"} 
   <dt><dd>{if $loggedin}
   As a logged in customer, you should be accessing priority support via <a href="submitticket.php">the support area</a>, by directing your query to the correct department.{/if}</dd></dt>
     <dt><dd>{if $loggedin}PLEASE SUBMIT YOUR <a href="submitticket.php"><b>'SUPPORT REQUEST'</b> here.</a>  Thank you!{/if}</dd></dt>
   {else}{/if}

 

Problem with that obviously is that it's not really professional.

 

My question is: Is there a way, for customers who meet the same two IF conditions, can be redirected automatically to the supportticketsubmit-stepone.tpl page ?

Link to comment
Share on other sites

Hi Alistair and wwesn,

Yes Alistair, it already is.

 

wwesn, thanks for the pointer. I had to do some slight toying with it but in the end this works perfectly:

 

{if $department eq "SALES"}

{if $loggedin}

{php}

header("Location: submitticket.php");

{/php}

{/if}

{/if}

 

and sits at the top of the supportticketsubmit-stepone.tpl file.

 

Now, if a customer is logged in and clicks on the CONTACT US link, (rather than the SUBMIT SUPPORT TICKET link), they are shown the list of support depts to select from.

 

If a non-customer clicks on the CONTACT US link they are shown the form to complete a ticket with the SALES dept pre-filled for them.

 

Cheers for pointing in the right direction.

 

Si

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