Jump to content

Quick client area question


thehoster

Recommended Posts

Hi all,

 

This is what i am looking to do in a round about fashion; Let me explain.

 

If customer has active services then display "This html code" else if client has no active services show "You have no active services"

 

If someone is able to help me on this one it would be greatly appreciated.

 

Thanks in advance folks x

Link to comment
Share on other sites

Yes this page only contains info on syntax's only relating to if a user is logged in or not

 

You sure about that?

"Displaying Text if Certain Conditions Are Met"

 

Add {debug} to the template and see what variables are available on the page you want to do this on (remove after checking that), and see if you can spot the variable that will show the condition you're trying to "catch". From there the syntax can be adapted from the link above.

Link to comment
Share on other sites

I think i have spotted the variable that i need, So would i need code like this;

 

{if $status.Active}

This is the code that would be displayed to the customer if they have an active account status

{else}

This is the code that would be displayed to the customer if they have an inactive account status

{/if}

 

there is also another possible one i spotted;

 

{if $clientareaactive.Active}

This is the code that would be displayed to the customer if they have an active account status

{else}

This is the code that would be displayed to the customer if they have an inactive account status

{/if}

 

I have tested the below code and even the below doesn't work

 

{if $clientareaactive eq "Active"}

This is the code that would be displayed to the customer if they have an active account status

{else}

This is the code that would be displayed to the customer if they have an inactive account status

{/if}

 

 

If not could you advice where i am going wrong, as im not the most confident coder on the planet.

Edited by thehoster
Link to comment
Share on other sites

I think i have spotted the variable that i need, So would i need code like this;

 

{if $status.Active}

This is the code that would be displayed to the customer if they have an active account status

{else}

This is the code that would be displayed to the customer if they have an inactive account status

{/if}

That applies to if the account is active, not if they have an active product/service.

I believe what you're looking for (untested) is this:

{if $clientsstats.productsnumactive ge 1}
stuff here
{else}
Other stuff here
{/if}

 

Oh, and in your example above, it's not $status.

I believe it should be:

{$clientsdetails.status eq Active}

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