Jump to content

How to check cubecart 5 in admin login or not.


kenhar

Recommended Posts

Ok. Depending where the link is going to appear, you can try this:

{if $IS_USER}<a href="link">Link</a>{else}Not a Link{/if}

The template variable is available in the template file main.php. I do not know if it is available in any of the other templates.

 

This is why it matters: CubeCart builds the "content" area in the first phase (Homepage, Product, Category, Document). Then builds all the extra parts in the second phase (Login, Navigation, Shopping Basket, Featured Product, etc). Then builds the main page in the third phase and puts those parts into it.

 

So, a variable that is assigned in the first phase is available in the other two phases, but not the other way.

 

Looking through the code, it seems that $IS_USER is given a value and assigned to a template variable very much near the beginning of CubeCart "waking up". So, you should be able to use it everywhere.

Link to comment
Share on other sites

thanks reply

But how to use this code other file or new created file.

 

i am create new file like hello.php

if user is login after run this file display file inner content other wise not display.

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.

×
×
  • Create New...