X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Dev Questions (https://forum.x-cart.com/forumdisplay.php?f=20)
-   -   Own Root Style Sheets (https://forum.x-cart.com/showthread.php?t=9719)

ian_fs 10-06-2004 10:25 AM

Own Root Style Sheets
 
Someone may have already done this, I dont know, but with the guidance of Shan and my awesome stupidity I have made this.


For a site I am currently developing, I wanted to have a different theme for each main root category (seven in total) and for that theme to run right through to product detail level.

Well after three days, I have finally done it. No I have not spent three entire days working this out but looking at it each day.

Example:-

I have six root categories:

Cat 1 - Red
Cat 2 - Green
Cat 3 - Blue
Cat 4 - Yello
Cat 5 - Indigo
Cat 6 - Orange

Well I made this tiny piece of code:-
Code:

        {if $location[1].0 eq "Football"}
        <link rel="stylesheet" href="{$SkinDir}/theme1.css">
        {/if}


Of course you can add more by putting in elseif statements.

The {if $location[1].0 eq "Football"} Football (name of the category for the theme) category name is case sensitive.

You could have a theme for every single category in your store, but why the need.

So there you have it, you can have different themes for different categories, this is my only contribution towards X-Cart so far, I dont care if it may seem bleeding obvious to other people, but it had me flumexed for a couple of days.

I think I am now gonna run around the garden shouting with joy. 8O

And must say Cheers to Shan for pointing me in the right direction.

shan 10-06-2004 11:02 AM

glad to see you got there in the end

adpboss 10-12-2004 06:35 AM

Bump for nice mod.

Added to my list of desirables... :D


All times are GMT -8. The time now is 05:46 AM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.