| ||||||||||
![]() |
Shopping cart software Solutions for online shops and malls | |||||||||
![]() |
![]() |
|
X-Cart Home | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
Load different style sheets for main categories | ||||
![]() |
|
|
Thread Tools | Search this Thread |
#11
|
|||||||
|
|||||||
![]() This seeems to work -
{if strpos($smarty.server.REQUEST_URI, "SWCHS") !== false} <p>SWCHS image/CSS</p> {else} default image/css {/if} Needs proper testing but seems like a possible simple solution. Where and in what template is this needed to load override CSS? many thanks for your help. Much appreciated.
__________________
tech990 |
|||||||
#12
|
|||||||||
|
|||||||||
![]() No sweat, glad to help.
Look in: /common_files/customer/service_css.tpl - or your custom skin directory instead of common_files. Look a how it calls in the altskin near the bottom: PHP Code:
__________________
Mike White - Now Accepting new clients and projects! Work with the best, get a US based development team for just $125 an hour. Call 1-502-773-6454, email mike at babymonkeystudios.com, or skype b8bym0nkey XcartGuru X-cart Tutorials | X-cart 5 Tutorials Check out the responsive template for X-cart. |
|||||||||
|
#13
|
|||||||
|
|||||||
![]() Thanks.
My simple solution is fine until you get to product page. The category name is then not present in the URL. Plan B? Keith
__________________
tech990 |
|||||||
#14
|
|||||||
|
|||||||
![]() I have just realised I can manually add the correct category name to the Clean URL.
It might just solve my problems. No doubt your coded solution would be more elegant? Can you see any real problem with my approach here? Thanks |
|||||||
#15
|
|||||||||
|
|||||||||
![]() I tell you what, I think the category name not being present represents an SEO problem. But that's just my opinion. I don't see a problem, if the solution works, than it works.
Coding the solution in PHP would be more elegant and consistent, without worrying about changing url's around. Another solution to this issue that just occurred to me, is to put a select box on category and product pages, "theme" and then just set the proper themes based on the contents of that box. You could even do it with extra fields....maybe.
__________________
Mike White - Now Accepting new clients and projects! Work with the best, get a US based development team for just $125 an hour. Call 1-502-773-6454, email mike at babymonkeystudios.com, or skype b8bym0nkey XcartGuru X-cart Tutorials | X-cart 5 Tutorials Check out the responsive template for X-cart. |
|||||||||
#16
|
|||||||
|
|||||||
![]() Not to get "dreamy" here, but it is a shame this is sooo hard in XC. I have had a LC store running for 6 yrs and this functionality, to define different layouts for the subcategory, product list, and product details and to decide whether a particular subcat would inherit from above in the hierarchy, etc. has been built in as far back as I can remember.
I feel you pain in wanting this functionality back as I move towards XC 4.5.0
__________________
David Coggan Carolyn Nussbaum Music Company X-Cart v4.5.4 Gold + LiteCommerce v2.2.41 (previous 6 years) |
|||||||
#17
|
|||||||||
|
|||||||||
![]() Quote:
PHP Code:
|
|||||||||
#18
|
|||||||
|
|||||||
![]() Thanks cherie.
I will have 6 main categories, 2 main sub cats in those and 20 or so categories in each of the 2 sub cats so quite a few to add to array. Also if client added a category it would need adding to code. Is there a way of testing for the main category only so that all sub and sub sub cats inherit the style and logo?
__________________
tech990 |
|||||||
#19
|
|||||||||
|
|||||||||
![]() I use this on product or category pages to get the top category id of the current location:
PHP Code:
|
|||||||||
#20
|
|||||||||
|
|||||||||
![]() Elegant and simple solution Cherie! Thanks
__________________
Mike White - Now Accepting new clients and projects! Work with the best, get a US based development team for just $125 an hour. Call 1-502-773-6454, email mike at babymonkeystudios.com, or skype b8bym0nkey XcartGuru X-cart Tutorials | X-cart 5 Tutorials Check out the responsive template for X-cart. |
|||||||||
|
|||
X-Cart forums © 2001-2020
|