Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

working on new skin

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 07-22-2009, 07:37 AM
  amy2203's Avatar 
amy2203 amy2203 is offline
 

X-Wizard
  
Join Date: Jul 2004
Location: Watford, UK
Posts: 1,509
 

Default working on new skin

I'm working on a new skin for my store, and you know what it's like, it's much easier and quicker to test on the actual site than on a copy etc...I know, not a good idea...

so, I'd like to be able to work on a new skin on the live site, without disrupting the current one.

My thought was why can't I add in an if statement somewhere, so that if a particular user was logged in, it used the skin2 directory rather than skin1, then as long as I am logged in with the right user, I will see the new skin, but everyone else will still see the old one.

I've narrowed it down to smarty.php that sets the skin folders etc, but I can't tell when this file actually runs, it doesn't appear in my webmaster mode,

can I just add an if to this to change the settings for 1 user?
__________________
X-Cart version 5 (Previously 3.5-4)

Previous Versions included
BCSE Reward Points Mod
Altered Cart On Sale Mod
Wordpress Plugin

Please don't PM me for support. I help where I can on the forum and your question will more likely be answered there.

Shout me a Coffee!
Reply With Quote
  #2  
Old 07-22-2009, 08:01 AM
 
carpeperdiem carpeperdiem is offline
 

X-Guru
  
Join Date: Jul 2006
Location: New York City, USA
Posts: 5,399
 

Default Re: working on new skin

Amy,

If I were you, I would clone your site into a /dev/ directory

The only pitfalls is that if you don't clone the database, any language variables that you edit will appear on the old (live) store.

So clone the database too for dev purposes, and KEEP A LOG of the language vars that you edit.

When you're ready to bring dev live, hopefully you have command line SSH access, as that makes this EXTREMELY easy....

just backup, make a tarball, etc... then expand whee you need it.

update the language vars and that's that.

This is not the ONLY way, but one way that preserves your live site and allows you to really test the new skin.

Good luck.

Jeremy
__________________
xcart 4.5.4 gold+ w/x-payments 1.0.6; xcart gold 4.4.4
Reply With Quote
  #3  
Old 07-22-2009, 08:12 AM
  amy2203's Avatar 
amy2203 amy2203 is offline
 

X-Wizard
  
Join Date: Jul 2004
Location: Watford, UK
Posts: 1,509
 

Default Re: working on new skin

Thanks,

thats just a real hassle, and takes up a huge amount more server space, we've got thousands of products and images etc, and without it all it's easy for a skin to break,

It's not huge changes I'm trying to make to the skin, and I've nearly got it working where it uses a different skin folder for me,

in smarty.php:
Code:
if ($CLIENT_IP == "xxx.xxx.xxx.xxx") { #admin tester $smarty->use_sub_dirs = false; $smarty->request_use_auto_globals = false; $smarty->template_dir = $xcart_dir."/skin2"; $smarty->compile_dir = $var_dirs["skin2templates_c"]; $smarty->config_dir = $xcart_dir."/skin2"; $smarty->cache_dir = $var_dirs["skin2cache"]; $smarty->secure_dir = $xcart_dir."/skin2"; $smarty->debug_tpl = "file:debug.tpl"; $smarty->assign("ImagesDir",$xcart_web_dir."/skin2/images"); $smarty->assign("SkinDir",$xcart_web_dir."/skin2"); $smarty->assign("template_dir", $smarty->template_dir); $smarty->assign("sm_prnotice_txt", @$_prnotice_txt); } else { #normal user $smarty->use_sub_dirs = false; $smarty->request_use_auto_globals = false; $smarty->template_dir = $xcart_dir."/skin1"; $smarty->compile_dir = $var_dirs["templates_c"]; $smarty->config_dir = $xcart_dir."/skin1"; $smarty->cache_dir = $var_dirs["cache"]; $smarty->secure_dir = $xcart_dir."/skin1"; $smarty->debug_tpl = "file:debug.tpl"; $smarty->assign("ImagesDir",$xcart_web_dir."/skin1/images"); $smarty->assign("SkinDir",$xcart_web_dir."/skin1"); $smarty->assign("template_dir", $smarty->template_dir); $smarty->assign("sm_prnotice_txt", @$_prnotice_txt); }


I just keep getting the error:
Error: Smarty error: the $compile_dir '' does not exist, or is not a directory

I have created the new folders in xcart/var but it doesn't like it.

If I leave the $compile_dir as templates_c it works, but I'm worried about it overwriting complied files etc and messing up the live skin.
__________________
X-Cart version 5 (Previously 3.5-4)

Previous Versions included
BCSE Reward Points Mod
Altered Cart On Sale Mod
Wordpress Plugin

Please don't PM me for support. I help where I can on the forum and your question will more likely be answered there.

Shout me a Coffee!
Reply With Quote
  #4  
Old 07-22-2009, 01:24 PM
  ARW VISIONS's Avatar 
ARW VISIONS ARW VISIONS is offline
 

X-Man
  
Join Date: Jan 2007
Location: Pensacola, FL
Posts: 2,536
 

Default Re: working on new skin

there is a skin swap mod out there.
__________________
xcart 5.1.2
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 04:32 AM.

   

 
X-Cart forums © 2001-2020