Jump to content

Work on a skin while Only showing another skin to customers


salvador21

Recommended Posts

I want to know if it's possible (e.g. As with a vbulletin forum) to be experimenting with a skin but not have it selectable by customers, so only admin can view the front store with this under development skin while working on it, customers only see the skin chosen as default.

This would save me taking the store offline while working on the new one.

Thanks.

Link to comment
Share on other sites

I've done that plenty of times, but came across some kind of problem. I don't remember what it was, exactly. Maybe it was for something else I only wanted an admin to be able to do.

The trick involves adding a condition to the rule for showing/hiding the skin selector dropdown, so that only a logged-in admin will have it. There are two edits.

In the file /classes/gui.class.php, find the function _displaySkinSelect(). It will be about line 1080.

Find this:


if ($GLOBALS['config']->get('config', 'skin_change')) {





And make it look like this:



if (!$GLOBALS['session']->isEmpty('super_user', 'admin_data') || $GLOBALS['config']->get('config', 'skin_change')) {

Of all the admins you may have installed for your store, only the Super User admins can use the skin selector to select their storefront skin (and anyone if that layout setting is enabled).

There will be a very similar statement at around line 107. This is the actual code that accepts what the skin selector form element sent back and causes CubeCart to use that specified skin for this session.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...