You are viewing this forum as a guest. Login to an existing account, or create a new account, to reply to topics and to create new topics.
On previous versions I would develop/test a new skin by setting up a new webpage that was only visible to backend users. I would then associate the new skin with that particular page. How in version 8 do you associate a skin with just one particular webpage?
Nigel
Offline
Skin overrides were removed in v8. You can do this now by including the following at the top of your active skin's skin.php file:
$userid = $this->globals('core_user.id'); if ($userid == 'YOUR_USER_ID') { return include($this->globals('core.path_public') . '/skins/YOUR_TEST_SKIN/skin.php'); }
As long as you're logged in, you will get your test skin displayed instead of the active skin.
Offline
Offline
do I need to put any tags round the code? I can't seem to get it working.
Nigel
Offline
Hi Nick,
still having problems. This is my code, first line of skin.php
<?php $userid = $this->globals('core_user.id');
if ($userid == 'test') {
return include($this->globals('core.path_public') . /skins/uk1/skin.php'); }?>
I get this error:
Parse error: syntax error, unexpected '/' in /home/xxxxxx/public_html/skins/test1/skin.php on line 4
Nigel
Offline
Here is exactly what you need to add, as concise as possible:
<?php if ($this->globals('core_user.id') == 'YOUR_USER_ID') {return include($this->globals('core.path_public') . '/skins/YOUR_TEST_SKIN/skin.php');} ?>
Offline
Offline
I would expect so, try it to see if it works.
Offline
I would suggest you place your email address there as opposed to your username, and make sure the code is the first line of your skin.php file.
Nigel
Last edited by nigel (09-02-2012 07:06:45)
Offline
Hi Nick,
One of the things we loved abour CCP was the ability to have different variations of a skin for different web pages.
Is there no way we can assign a different skin to a web page we create???
Thanks in advance
Offline
Fantastic Nick!
Exactly what we needed and confirms why we prefer to use Click Cart Pro!
Offline
webmaster wrote:
Skin overrides were removed in v8. You can do this now by including the following at the top of your active skin's skin.php file:
Code:
$userid = $this->globals('core_user.id'); if ($userid == 'YOUR_USER_ID') { return include($this->globals('core.path_public') . '/skins/YOUR_TEST_SKIN/skin.php'); }As long as you're logged in, you will get your test skin displayed instead of the active skin.
Nick,
Are you saying this code goes BEFORE everything else?
I'm getting this error when I go to the storefront and click on any links
Parse error: syntax error, unexpected '$userid' (T_VARIABLE) in /home4/koolcom1/public_html/store/skins/TEST/skin.php on line 2
Offline
try this at the very top of your skin.php file:
<?php if ($this->globals('core_user.id') == 'username@yoursite.com') {return include($this->globals('core.path_public') . '/skins/SKINNAME/skin.php');} ?>
change the username and skin to the ones you require.
Offline
nigel wrote:
try this at the very top of your skin.php file:
Code:
<?php if ($this->globals('core_user.id') == 'username@yoursite.com') {return include($this->globals('core.path_public') . '/skins/SKINNAME/skin.php');} ?>change the username and skin to the ones you require.
I musta been really tired last night. I mispelled my email address.
New Edit: It's still not working right. Does the skin name have to be ALL CAPS?
Last edited by mdowning (03-19-2014 10:15:50)
Offline