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

Recuperare Category id
 
giacomop81
Member
 
Total Posts:  38
Joined:  2012-05-17
 

Ciao a tutti, ho bisogno di recuperare il categoryId del prodotto in un file template.
Potreste indicarmi come posso fare?
Grazie.

 
Magento Community Magento Community
Magento Community
Magento Community
 
TreInnova
Guru
 
Avatar
Total Posts:  465
Joined:  2009-02-20
Fano
 
giacomop81 - 06 November 2013 01:48 AM

Ciao a tutti, ho bisogno di recuperare il categoryId del prodotto in un file template.
Potreste indicarmi come posso fare?
Grazie.

Ciao hai due strade :

Mage::registry('current_product')->getCategoryId();
Mage::registry('current_product')->getCategoryIds();
saluti
filippo
 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top