Results 1 to 9 of 9
  1. #1

    Default URGENT! How to change background based on user group?

    My client want different background for each user group. I'm going to a meeting with this client later today... in other words... this is urgent!

    How is this done?

  2. #2
    Join Date
    Apr 2006
    Location
    London, UK
    Posts
    10,569
    Plugin Contributions
    25

    Default Re: URGENT! How to change background based on user group?

    You would need to add the background image as an inline style to the body tag and then write and add some code to run on every page to populate determine the user group and embed the link to the appropriate image into the inline style.

    You'd do the first step by overriding common/tpl_main_page.php file with your changed version, and the second step by overriding the init_includes/init_customer_auth.php file, which is where your site already pays some attention to the type of customer you have.
    Last edited by kuroi; 20 Apr 2010 at 09:14 AM.
    Kuroi Web Design and Development | Twitter

    (Questions answered in the forum only - so that any forum member can benefit - not by personal message)

  3. #3

    Default Re: URGENT! How to change background based on user group?

    Is it possible to use different stylesheets. Put in a code to make the system check which user group is logged in and change the stylesheet reference according to the group?

  4. #4
    Join Date
    Apr 2006
    Location
    London, UK
    Posts
    10,569
    Plugin Contributions
    25

    Default Re: URGENT! How to change background based on user group?

    You could. In that case your template override would be of the html_includes.php file.
    Kuroi Web Design and Development | Twitter

    (Questions answered in the forum only - so that any forum member can benefit - not by personal message)

  5. #5

    Default Re: URGENT! How to change background based on user group?

    Quote Originally Posted by kuroi View Post
    You could. In that case your template override would be of the html_includes.php file.
    Do you have a "quick" and easy code that will do this?

  6. #6
    Join Date
    Apr 2006
    Location
    London, UK
    Posts
    10,569
    Plugin Contributions
    25

    Default Re: URGENT! How to change background based on user group?

    'fraid not. Never tried to do this before, and it would depend on the specific criteria your client wanted to apply anyway.
    Kuroi Web Design and Development | Twitter

    (Questions answered in the forum only - so that any forum member can benefit - not by personal message)

  7. #7

    Default Re: URGENT! How to change background based on user group?

    Quote Originally Posted by kuroi View Post
    'fraid not. Never tried to do this before, and it would depend on the specific criteria your client wanted to apply anyway.
    My client actually just want another background color for the different groups.

    Could it be a code like "if usergroup = none { stylesheet.css } else { stylesheetgroup.css }"

    Not exactly a working code, but I hope you see what I'm trying to do.

  8. #8
    Join Date
    Apr 2006
    Location
    London, UK
    Posts
    10,569
    Plugin Contributions
    25

    Default Re: URGENT! How to change background based on user group?

    That would over complicate it, as you'd be messing with the main stylesheet.

    If you want to make this a whole stylesheet just to change the background colour, it would be better to have a stylesheet with that single line in.

    The complexity though is in how you assign a value to usergroup to begin with.
    Kuroi Web Design and Development | Twitter

    (Questions answered in the forum only - so that any forum member can benefit - not by personal message)

  9. #9

    Default Re: URGENT! How to change background based on user group?

    Thanks. I think I got it now. If not.... I'll be back :-)

 

 

Similar Threads

  1. v139h Change the background color of my product list based on price
    By glitzsfa in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 30 Jan 2012, 05:47 PM
  2. Change template based on where user came from.
    By ericjb9 in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 23 Sep 2011, 05:59 PM
  3. URGENT! How to display different background based by user group?
    By rogdov in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 20 Apr 2010, 09:07 AM
  4. Bulk Items based on User Group?
    By doodler85 in forum General Questions
    Replies: 0
    Last Post: 12 Aug 2006, 01:11 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR