Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Page 1 of 2
Custom Designs Per Category (or even product)
 
warren
Member
 
Total Posts:  67
Joined:  2007-12-18
 

Is it possible to apply custom design to each category or product?

Cheers

Warren

 
Magento Community Magento Community
Magento Community
Magento Community
 
warren
Member
 
Total Posts:  67
Joined:  2007-12-18
 

For Future Users with this same question:

“Maximum customization power
With Magento you can update the look and feel of your store in the category and product level, giving you greater marketing and promotional power as well as a store with endlessly unique design. Ever imagined presenting each product in its own customized product info page? Magento gives you the power to do just that and more, by providing a quick way to customize your product presentation in a per-product and per-category basis.”

answer is yes, according to the designer guide http://www.magentocommerce.com/design_guide/articles/working-with-magento-themes

How its done is probably buried in their i’ll post some more when ive worked it out ;o)

 
Magento Community Magento Community
Magento Community
Magento Community
 
Mangavod
Jr. Member
 
Avatar
Total Posts:  16
Joined:  2007-11-29
 

Hi,

1. I made my own template.
2. Now i want to apply to each category ( and products ?) a new template just by modifying the CSS and the IMAGES ( for having a new Header by categories ).
3. I uploader a new directory with only these two folder CSS and IMAGES.

But how apply these SKIN to a category.
What about the “Custom Layout Update” ? I don’t find the line code to apply my skin to a category in particular.

Any help ?

 
Magento Community Magento Community
Magento Community
Magento Community
 
Michael_1
Enthusiast
 
Total Posts:  826
Joined:  2007-08-31
 

There’s an option in system configuration to define the skin.
You can check the designer’s guide for details http://www.magentocommerce.com/design_guide/articles/working-with-magento-themes

 
Magento Community Magento Community
Magento Community
Magento Community
 
Mangavod
Jr. Member
 
Avatar
Total Posts:  16
Joined:  2007-11-29
 

Hi,

Sorry but i don’t understand.
the option in system configuration to define the skin is about the STORES ( main or not).

But what about the categories ?

I would like to have a SKIN for the home page and a another for the CATEGORY A.

 
Magento Community Magento Community
Magento Community
Magento Community
 
YoavKutner
Guru
 
Avatar
Total Posts:  491
Joined:  2007-08-08
 

This functionality is in the works and should be made available over the next few releases.

Thanks

yoav

 
Magento Community Magento Community
Magento Community
Magento Community
 
warren
Member
 
Total Posts:  67
Joined:  2007-12-18
 

Hi Yoav

Did the functionality for adding custom designs per category/product make it into the build yet?

Igot this reply from Michael, but we are still having difficulty working out just how this is applied:

-------------------------

Hi warren,

Magento takes care of applying layout updates on category and product view pages. The layout updates can be defined in your layout files under your theme, they should be enclosed in <CATEGORY_999>...</CATEGORY_999> or < PRODUCT_999>...</PRODUCT_999> handles, where 999 has to be replaced with the category or product id accordingly.

Category and product layout updates can also be added when editing a product or category in the admin, you just have to put xml into the corresponding fields.

Please let us know if it helps.

Thank you,
Michael.
-------------------------------------

Could you expand on this?

Cheers

Warren

 
Magento Community Magento Community
Magento Community
Magento Community
 
Michael_1
Enthusiast
 
Total Posts:  826
Joined:  2007-08-31
 

Hi Warren,

You can try to put the following xml either in category or product layout update field, or in CATEGORY_… or PRODUCT_… layout updates in your layout xmls to see how it works:

<reference name="content">
    <
block type="core/text" name="test.text">
        <
action method="setText">
            <
text><![CDATA[<span style="color:red; font-size: 18px; font-weight: bold;">TEST LAYOUT UPDATE</span>]]></text>
        </
action>
    </
block>
</
reference>
 
Magento Community Magento Community
Magento Community
Magento Community
 
armin
Jr. Member
 
Avatar
Total Posts:  24
Joined:  2008-01-15
 

Guys, I have problem. 

1. It is possible to have a module that displaying “ALL NEW PRODUCTS” in home page something like that.

2. One more question regarding the “FORGOT MY PASSWORD phtml” it is also possible to display this template as 2columns-left.

I think this problem is to easy, but i don’t know where the file located.

Please help me on this.
Thank you very Much!!!.

 
Magento Community Magento Community
Magento Community
Magento Community
 
jrutter
Jr. Member
 
Total Posts:  24
Joined:  2008-04-08
 

Is there a tutorial anywhere that shows how to add a custom design to a category?

 
Magento Community Magento Community
Magento Community
Magento Community
 
armin
Jr. Member
 
Avatar
Total Posts:  24
Joined:  2008-01-15
 
jrutter - 06 September 2008 11:58 AM

Is there a tutorial anywhere that shows how to add a custom design to a category?

Basically if you want to add custom design in the category page, try to edit the category page. for better explanation try this one i made this template http://annexstore.com/annexstore-templates/ and the egine is magento.

 
Magento Community Magento Community
Magento Community
Magento Community
 
frontier
Member
 
Total Posts:  41
Joined:  2008-04-17
 

Yoav: Do you know if the category custom design feature implemented now in 1.1.8?
It doesn’t seem to have any effect for me. (all caches cleared, etc..)

 
Magento Community Magento Community
Magento Community
Magento Community
 
frontier
Member
 
Total Posts:  41
Joined:  2008-04-17
 

Hey win,

I hear ya on the complexity and old posts front! Sadly these forums have been no help when I have asked any kind of programming question.

With my limited knowledge (this is probably not the best way to do this though) I would just hard code the logic in the view.phtml. ie. look at the current product, check for and read your custom attributes, render accordingly. You could even go so far as to point to a php file as your attribute. Again ugly ugly ugly, but if ya just have to get it done one way or another..

Of course the way you describe sounds much better, but without any documentation around these things I don’t see how we are supposed to know this.. maybe this is the Zend methodology or something, if you know that then this is natural.. I don’t know.. I came from .NET and have been learning PHP while implementing Magento sites for myself. Best tip I got was to get the NetBeans development environment for PHP. Goodbye Notepad++ hello debugger.

Regarding my post above, it turned out that the category custom design only affected which /skin folder was used and not the /app folder of your theme.. same /app folder is used, seems it is only useful for changing the css & images.

 
Magento Community Magento Community
Magento Community
Magento Community
 
fenixf
Member
 
Total Posts:  35
Joined:  2008-04-08
 

the trick goes as follows:

in the productcontroller you see:

$update->addHandle('PRODUCT_TYPE_'.$product->getTypeId()); 
/// ads handle for different product types
        
$update->addHandle('PRODUCT_'$product->getId()); 
// adds handle for productid's means you can add: <PRODUCT_34> to catalog.xml 34 is the productid

and in catalog.xml:

<PRODUCT_34>
        <
reference name="product.info">
            <
action method="setTemplate">
                 <
template>catalog/product/myTemplateFile.phtml</template> *// here you define which templatefile to use for thisproductid; in my case:  productid: 34
              
</action>
        </
reference>
    </
PRODUCT_34>
Add above or any other productid to catalog.xml. Above code executes “settemplate” method when product with id 34 is viewed.

You can add your own handle to the productcontroller

something like:

$update->addHandle('PRODUCT_CAT_'$product->getCatid()); 
       
// just example ,you need to retrieve the cat. id for this product

and in catalog.xml

<PRODUCT_CAT_"id of category">
        <
reference name="product.info">
            <
action method="setTemplate">
                 <
template>catalog/product/myTemplateFile.phtml</template> *// here you define which templatefile to use for categoryid;
              
</action>
        </
reference>
    </
PRODUCT_CAT_"id of category">

Hope this helps
Reply if questions remain

 
Magento Community Magento Community
Magento Community
Magento Community
 
fenixf
Member
 
Total Posts:  35
Joined:  2008-04-08
 

HI win_

Glad I could help.

You could’t also try to use the attributesetname instead of the id

 
Magento Community Magento Community
Magento Community
Magento Community
 
ecreate
Jr. Member
 
Total Posts:  4
Joined:  2008-01-29
 

It doesn’t work for me. Where exactly in catalog.xml I have to paste:

<PRODUCT_CAT_11>
            <
reference name="product.info">
                <
action method="setTemplate">
                     <
template>catalog/product/view2.phtml</template> *// here you define which templatefile to use for categoryid;
                  
</action>
            </
reference>
        </
PRODUCT_CAT_11>

to change product view for one specific category (id:11) ??

Mac

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top
Page 1 of 2