Search the Community
Showing results for tags 'new hook'.
-
Hello! I'm using PS 1.5.3 and I've read many posts on how to transplant modules to new hooks, however Favorite Products doesn't seem to work properly if I follow the usual steps. I tried enabling a new hook in favoriteproducts.php by adding !$this->registerHook('displayRightColumnProduct'), copying lines 90-99 and changing part of that to public function hookDisplayRightColumnProduct($params), and using the "transplant a module" feature, but it did not quite work. The module displays in the correct position in the FO, but the formatting is broken (it appears as an unordered list of links rather than just one link, I don't think this is a CSS issue) and the functions (add/remove from favorites) don't work. I've never changed a hook before, so I think I must be doing something wrong or missing something - could anyone please help? Thank you in advance! Elaine
- 10 replies
-
- extra actions
- displayRightColumnProduct
- (and 7 more)
-
Hey. Mam problem z przypisaniem modułu koszyka do nowej pozycji. Do pliku blockcart.php dodałem: public function hookCartinmenu($params) { $params['blockcart_top'] = true; return $this->hookTop($params); } Utworzyłem nowy hook w bazie o nazwie: displayCartinmenu Kolejny wkleiłem kod w miejscu gdzie chce umieścić ten moduł: {hook h="displayCartinmenu"} Wchodzę w pozycje modułów, klikam "transplant module" wybieram moduł: Block Cart następie pozycję: {hook h="displayCartinmenu"} Na koniec kilkam "Save" i wywala taki błąd...: This module cannot be transplanted to this hook.
-
Hi,,i'm new in developing prestashop,now, my project is creating template for sale. in my template, i need new hooks. my qustions , is it allowed a module that creating new hook? because in creating a new hook, it will change/overwrite frontcontroller.php.. certainly, i will backup that file first on overide folder before overwrite it.and restore that file when my new customhook module is uninstalled. because it is for sale.,i'm affraid i will break the rule of developing new prestashop..thanks
-
Где-то туплю, направьте в нужное русло. Добавил новый хук, создал в модуле обработчик, оперируем данными Tools::getValue('id_product') - на странице товара все ок, разумеется. Задался целью использовать этот же хук в product-list.tpl т.е. применить к каждому твоару на странице категории, и тут облом - id_product как бы нет... грешным делом пытался думать в сторону смарти, но шаблоны же компилятся после пхп... Не могу сообразить как получить айди каждого товара и передавать его "в хук", в голове крутится или js или плюнуть на все это и сделать напрямую.
- 2 replies
-
- 1
-
- product hook
- category hook
-
(and 1 more)
Tagged with:
-
Ok, I've been through some articles on how to add a new hook, one of which is Julien Breux's.... But the articles are not complete or clear enough... In which files exactly do I need to place the code for the new hook? Let's say I want to add a new hook on the home page, to show a block right before the HOME hook... On index.tpl, I simply have the following code: {$HOOK_HOME} So I guess I will have to add something like {$HOOK_MYHOOK} just before this one (and after adding the new hook to the table "ps_hook") But what should I do next? My aim is to show the featured products block just after the top of the page and before the HOME block