» How to add Thumbs Up to all the eCommerce products?
C5 Extras > Support > Knowledge Base > Thumbs Up > How to add Thumbs Up to all the eCommerce products?

You can hard code the block into the Product Page Type, here is an example on how to do that with Autonav block. And below is the code which you can use to insert to your page:

 $thumbs = BlockType::getByHandle('jb_thumbs_up'); $thumbs->controller->mode = 'plain'; $thumbs->controller->itemHandle = $c->getCollectionName(); $thumbs->controller->restriction = '2'; $thumbs->controller->restrictionLength = '604800'; $thumbs->controller->voteStyle = 'mini_thumbs'; $thumbs->render('view');

Last but definitely not the least, you need to insert this inside your theme's <head> tag anywhere after Loader::element('header_required');

 $thumbs = BlockType::getByHandle('jb_thumbs_up'); $blockCtrl = $thumbs->getController(); $blockCtrl->generateHeaders();