diana13 Posted September 3, 2009 Share Posted September 3, 2009 I want to display the tags block in the product page, under the description. I've tried to translate the tags module in Product footer hook, but it didn't display. I've tried also in HOOK_PRODUCT_TAB_CONTENT but it says that it is already there. In what hook shoud I translate it?Oh, and I want this block to display only the specific product's tags in which page is displayed. Link to comment Share on other sites More sharing options...
diana13 Posted September 4, 2009 Author Share Posted September 4, 2009 Hmmm, nobody?I saw there is a function in classes/Tag.php called getProductTags($id_product) static public function getProductTags($id_product) { if (!$tmp = Db::getInstance()->ExecuteS(' SELECT t.`id_lang`, t.`name` FROM '._DB_PREFIX_.'tag t LEFT JOIN '._DB_PREFIX_.'product_tag pt ON (pt.id_tag = t.id_tag) WHERE pt.`id_product`='.intval($id_product))) return false; $result = array(); foreach ($tmp AS $tag) $result[$tag['id_lang']][] = $tag['name']; return $result; } but from what I have seen, it isn't used anywhere.So, please, how can I use this function to display the tags related to a product on the product footer's page? Link to comment Share on other sites More sharing options...
hussew Posted December 11, 2009 Share Posted December 11, 2009 Hey have you figured this out? Looking to do the same thing!!! Link to comment Share on other sites More sharing options...
rocky Posted December 12, 2009 Share Posted December 12, 2009 The tags block will not display on the product page because it was not designed to be placed there. You must add the following code to modules/blocktags/blocktags.php before the last }: function hookProductFooter($params) { return $this->hookLeftColumn($params); } Then you can transplant the tags module into the Product footer hook and it will display the same way as it does when it placed in a column. You will need to do more work to make it look good in that position. Link to comment Share on other sites More sharing options...
eshop2k9 Posted January 17, 2010 Share Posted January 17, 2010 Hi Rocky / All,Thanks a lot for your inputs. I want to add tags in product-list.tpl below the short product description. Could you advise me, which hook i need to use. I am able to display tags in product footer but i need it on product-list.tpl .Thanks in advance Regards Link to comment Share on other sites More sharing options...
rocky Posted January 17, 2010 Share Posted January 17, 2010 Unfortunately, there is no hook on the product listings. You'd have to create your own one and then add the module to it. There is a tutorial here on the forums somewhere that describes how to create a hook. Link to comment Share on other sites More sharing options...
eshop2k9 Posted February 2, 2010 Share Posted February 2, 2010 Hi Rocky,Thanks a lot. I have created new hook and tried to place in product-list.tpl but nothing happens.. Hook is not working at all in product-list.tpl. Please share any workaroundThanks a lot Link to comment Share on other sites More sharing options...
rocky Posted February 3, 2010 Share Posted February 3, 2010 Did you modify category.php, search.php and best-sales.php and pass in the hook before the $smarty->display? $smarty->assign('HOOK_NAME', Module::hookExec('name')); Change NAME to the name of your hook. Link to comment Share on other sites More sharing options...
Dickie Posted April 13, 2010 Share Posted April 13, 2010 Hi,I am also having this problem!I have managed to display the tags block in the product footer, but the main problem is that all the tags I have created are showing up instead of the ones that I have just added to a specific product.There must be a simple solution for this what I am missing!Its driving me crazyThanks in advance.. Link to comment Share on other sites More sharing options...
Dickie Posted April 16, 2010 Share Posted April 16, 2010 anyone got any ideas? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now