News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

How to echo product category on product detail page

Started by EIF, May 02, 2022, 20:15:12 PM

Previous topic - Next topic

EIF

Hi,

Do anyone please tell me the php code to echo the product category of the currunt product on the detail page? Prefer the forced conical preference category.

Using Virtuemart 3.8.8

Milbo

use the vmdebug. Enable it in the vm config
go in the template, where you see your product for example as $product and use vmdebug('my product',$product); categories keeps all the ids... and I think category or something similar, should have the category you are browsing the product. You may try. vmdebug('my product',$product->categoryItem); or use the canonCatId and use the category model to load it
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/