Jump to content

category page/home feature module integration problem


Recommended Posts

hello all,

the $hook_home contains the feature products module (displaying products in the home category). Basically i took the hook out of index.tpl (which will be my own designed home page) and trying to add it to the category.php?id_category=1 (which is planning to be a "shop online" page. if i add the hook to other .tpl it displays the featured products, but when i load category.php?id_category=1 i get nothing. I would like the layout to be the main categories (thumbs as you see on a category page) on top with the featured products block under it. sooo in point form so no one is confused......

1.header
2. category thumbs
3. feature products
4. footer

whats the best way to go about doing this? (even if i have to make a new php and .tpl file to automatically set category id to 1 its ok, im just not fluent in php syntax so it's going to be cut and paste job with minor tweaks from me)


hope someone can help! thanks.

Link to comment
Share on other sites

Shouldn't you be moving the hook to the category.tpl file and not the php file?

The problem with moving the hook to the category.tpl file is that every category and sub-category uses that file so it will display content on every category page.

Personally i feel the best way around this would be to leave the Prestashop files alone and create your homepage separately and redirect people to that homepage.

Link to comment
Share on other sites

yea i did move it to the .tpl file but it didn't show. my original idea was to make an if statement (like if id_category=1 add the hook) but i believe it will be better to construct my own file like you said.


but besides adding the {$hook_home} to my new .tpl file, how can i get it to show the category thumbs at the top like when you goto a category page? which parts of code would i need to copy/tweak to make it function/have the layout i desire?

Link to comment
Share on other sites

i figured it out. now the only problem seems to be that the category images are smaller and have no padding between them. when i load category.php?id_category=1 i get a 4x2 grid with 15px padding in between each category. but when i load shoponline.php?id_category=1 i get a 7x2 grid with 0px padding (the pictures touching)

Considering i made my modified files form duplicating the category , i don't really understand why the size and padding is different (would be connected to the exact same css file)


any ideas?

Link to comment
Share on other sites

bump....

anyone please?

the files have the exact same code! i don't get why the spacing changed when i load it thought shoponline.php
i duplicated category.php and the duplicated file does the same! its the same code!!!!!

Link to comment
Share on other sites

×
×
  • Create New...