X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   If satment on the condition of admin or customer. (https://forum.x-cart.com/showthread.php?t=37227)

johnnybparts 02-01-2008 01:22 AM

If satment on the condition of admin or customer.
 
I would like to set two conditions and its dependant on either if it is a customer or admin viewing the site.

an example for skin1/rectangle_top.tpl.

I would like everybody who visits the site to see it as a center justified window with a width of 1000 pixels.

<table class="Container" cellpadding="0" cellspacing="0" width="{$width|default:"1000"}">

if its an admin, i would like it 100% center justified.

<table class="Container" cellpadding="0" cellspacing="0" width="{$width|default:"100%"}">

this is just for an example,
how would i call out the admin / or customer state.

how would i word the {if} {/if} statment..

Thank you.

pauldodman 02-01-2008 02:44 AM

Re: If satment on the condition of admin or customer.
 
You would use:
{if $usertype eq "C"}
for customers
and
{if $usertype eq "A"}
for Admin

johnnybparts 02-01-2008 11:59 AM

Re: If satment on the condition of admin or customer.
 
Thank you Paul.


All times are GMT -8. The time now is 02:04 PM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.