Kryptronic Software Support Forum

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.

#1 01-08-2013 10:28:21

Alex Scott
Member
Registered: 08-31-2007
Posts: 7

Different skin per category/product

Is there a way to display a different skin based on the category or product?

I'd like to put some posts from my blog in the footer specific to the product or category page you are on.

I'm pretty sure in V6 you could do this under category display page but I don't see anything in V8.

Thanks

Mitch

Offline

 

#2 01-09-2013 08:48:39

webmaster
Administrator
From: York, PA
Registered: 04-20-2001
Posts: 19798
Website

Re: Different skin per category/product

In v8 we moved away from running different skins for different pages/categories/etc. as we it caused more confusion for users than it was worth.  The best way to handle this at this point is to code something directly into the skin you're using to change the content based on the page being displayed.

If you need to switch content based on a category:

Code:

if ($this->globals('core_cgi.ns') == 'catshow' && $this->globals('core_cgi.ref') == 'CategoryID') {

     // Do something different here for CategoryID

} // End of if statement.

If you need to switch content based on a product:

Code:

if ($this->globals('core_cgi.ns') == 'prodshow' && $this->globals('core_cgi.ref') == 'ProductID') {

     // Do something different here for ProductID

} // End of if statement.

Nick Hendler

Offline

 

#3 01-09-2013 08:53:34

Alex Scott
Member
Registered: 08-31-2007
Posts: 7

Re: Different skin per category/product

Cool thanks!

Offline

 

#4 01-15-2013 17:18:57

kgillespie
Member
From: Sandy, Oregon
Registered: 06-10-2004
Posts: 164
Website

Re: Different skin per category/product

Not sure if this new approach will get me what is needed. You say: "The best way to handle this at this point is to code something directly into the skin you're using to change the content based on the page being displayed."

Would that work for what i am trying to do which is to have my header have a different background color and be able to remove or add custom side bar nav. Not sure how using the code you suggested will allow for me to have a page that has a different colored header background area and removal of or adding in a different side bar for custom navigation. If I create a page using the web page cms will I be able to have that page have it's own unique colors and content straying away from the main skin but of course using the main skin for rest of layout? Maybe I will have you do one example based on my page that i am trying to do then could use it as template of sorts.

Offline

 

#5 01-16-2013 04:45:37

nigel
Member
From: Peterborough, UK
Registered: 04-27-2008
Posts: 418
Website

Re: Different skin per category/product

If you want your products to have a different skin from the rest of the site just add the following code to the top of the "Product Detail Display" that you are using:

<?php $this->globals('core_display.skin','skin.SKIN_NAME'); ?>

Replace SKIN_NAME with the name of the skin you want to use. The same will also apply for Web Pages but not sure how to implement it on Categories.

To see how it works on my site you will see that my splash and categories pages have a left menu but my product pages don't (2 separate skins).

Offline

 

#6 09-24-2014 14:31:51

coatzel21
Member
From: Boston
Registered: 03-04-2014
Posts: 150
Website

Re: Different skin per category/product

I'm curious if a content switch would work for what I am trying to achieve for my category display.

On my splash page I have four categories set to True, I am trying to place an alternate category desc on the category landing pages. I thought I could do this by cloning the categories and then changing the description but I'm not sure how I could get those links within the page.
Could I do,

Code:

if ($this->globals('core_cgi.ns') == 'catshow' && $this->globals('core_cgi.ref') == 'CategoryID') {

     // link to cloned category somehow//alt description

} // End of if statement.

Also how could we apply
<?php $this->globals('core_display.skin','skin.SKIN_NAME'); ?> changing category skin name for whole site(I realize I just asked this in another post but could be helpful for others to see)
Thanks

Offline

 

#7 09-25-2014 07:43:41

webmaster
Administrator
From: York, PA
Registered: 04-20-2001
Posts: 19798
Website

Re: Different skin per category/product

This will effectively use a Display Description type display for categories on the store splash page with an alternate description:

First, add your alternate description field to the ecom_cat table in Raw Database Admin by choosing to 'Maintain' the table, then adding a column.  I'd recommend a TEXT type column a you will have clob data in it.

Next, under Store > Store Displays > Category Displays, clone the 'Display Description' display and in your cloned version, where you see $catdisp['description'] change to $catdisp['yourfieldname'].  Save the clone.

Under Store > Component > Settings > Display Controls: Store Splash Page Lists, select your cloned category display as the 'Category List: Category Display Type'.


Nick Hendler

Offline

 

#8 09-26-2014 10:44:23

coatzel21
Member
From: Boston
Registered: 03-04-2014
Posts: 150
Website

Re: Different skin per category/product

Awesome. thanks Nick.

Offline

 

#9 10-01-2014 09:45:19

coatzel21
Member
From: Boston
Registered: 03-04-2014
Posts: 150
Website

Re: Different skin per category/product

Is there a simple way to achieve this same dual description effect with subcategory pages?

Offline

 

#10 10-02-2014 08:57:03

webmaster
Administrator
From: York, PA
Registered: 04-20-2001
Posts: 19798
Website

Re: Different skin per category/product

Yes.  Just select the appropriate display type for each main category's sub categories under Manage Categories.


Nick Hendler

Offline

 

#11 12-25-2014 04:47:16

franconero
Member
Registered: 11-03-2012
Posts: 31

Re: Different skin per category/product

Hi,
I think your moving away from running different skin for different pages/categories etc  is not in the overall best interest of the majority of users.  There should be a way of reintroducing this option without all this software coding etc.  It is one of the most important consideration for me when purchasing the software.

Offline

 

Board footer