| ||||||||||
![]() |
Shopping cart software Solutions for online shops and malls | |||||||||
![]() |
![]() |
|
X-Cart Home | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
Parts of bottom.tpl to react differently when in admin | |||
![]() |
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
![]() so I Have added code to my bottom.tpl but I need it to act differently depending on if the viewer is a customer or an admin.
My first idea was that the head.tpl and head_admin.tpl file switches between these modes. So I defined a variable in head_admin.tpl and then an if statement looking for that variable in bottom.tpl. However I just found out that with smarty you can't do this (define a variable in one tpl and have it be there when the other tpl loads). So is there another way you can suggest? Is there a variable or setting that I can test for in bottom.tpl to see if I am an admin or customer? Thanks Jed
__________________
Jed Herzog Gold X-Cart 4.0.17 http://www.outliersolutions.com Portland Advertising Agency, Portland Web Design |
|||||||
#2
|
|||||||
|
|||||||
![]() {if $usertype eq "C"}
display 1 {else} display 2 {/if} That code will display the first piece if the user is a customer, or the second one if the user is a an admin or provider. Also, in the future, best to keep with one post instead of starting a new thread on the same subject.
__________________
Padraic Ryan Ryan Design Studio Professional E-Commerce Development |
|||||||
|
|||
X-Cart forums © 2001-2020
|