| ||||||||||
![]() |
Shopping cart software Solutions for online shops and malls | |||||||||
![]() |
![]() |
|
X-Cart Home | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
Different skins for admin and customer | |||
![]() |
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
![]() Hi -
I am relatively new to X-Cart, but not to PHP. I would like to have 2 different skins on the site that I'm working on - one for administrators and one for customers to see. Basically, I want to keep the administrator login page to have one of the generic skins that comes with X-Cart and I want to use a custom skin/CSS/etc. for customer viewing only. The reason I want to do this is for simplicity. The site I'm working on is heavily customized, and I don't want to modify all of the CSS definitions and graphics to do both the admin as well as the customer pages. With a single images directory, I have ended up with graphics that look great from a customer perspective, but terrible from an admin perspective (as it's a conglomeration of 2 different color combos) - and I also don't feel like going through and hand-editing all of the template files to track down all of the images. I was thinking about making 2 different smarty.php - each one defining a different skin directory - and then changing the auth.php in the admin directory to point to the right smarty.php. Is this the proper way for doing this? Will this catch all administrator pages? Do I need to specify a different templates_c and cache directory with 2 different skins on the same site? Does this make sense? Has anyone done this before? Thanks -jkk
__________________
X-Cart Gold 4.0.14 X-AOM 4.0.14 X-GiftReg 4.0.14 |
|||||||
#2
|
|||||||
|
|||||||
![]() Admin is single/home.tpl and skin1_admin.css. You can do quite a lot by just changing those two files.
__________________
Padraic Ryan Ryan Design Studio Professional E-Commerce Development |
|||||||
#3
|
|||||||
|
|||||||
![]() put an IF statement in the template files like this
eg for menu.tpl Code:
You can use this method throughout the templates that are shared between admin and customer. From v4, admin and customer have different stylesheets.
__________________
xcartmods.co.uk |
|||||||
#4
|
|||||||
|
|||||||
![]() Quote:
Yeah, I figured I could do that, but I'm attempting to avoid touching every single file. I also thought about copying out all of the modules and everything that the customer referenced and putting it in the customer directory, but again, that's a lot of work that I'd like to avoid - plus it makes putting on modules a little more difficult. I'm guessing that there is no easy way to do this past track down all of the files. Is that correct? If I'm going to modify all of the templates that only a customer sees, they're all referenced out of the customer directory, right? Thanks. -jkk
__________________
X-Cart Gold 4.0.14 X-AOM 4.0.14 X-GiftReg 4.0.14 |
|||||||
#5
|
|||||||
|
|||||||
![]() Oh, here's an idea...
Is there any way that I can find out what the user type is during the processing of smarty.php? If so I specify a different value of ImageDir depending on if it was a customer or an admin logging in. -jkk
__________________
X-Cart Gold 4.0.14 X-AOM 4.0.14 X-GiftReg 4.0.14 |
|||||||
|
|||
X-Cart forums © 2001-2020
|