deafmouse Posted April 27, 2011 Share Posted April 27, 2011 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.header2. category thumbs3. feature products4. footerwhats 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 More sharing options...
jhnstcks Posted April 27, 2011 Share Posted April 27, 2011 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 More sharing options...
deafmouse Posted April 27, 2011 Author Share Posted April 27, 2011 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 More sharing options...
jhnstcks Posted April 27, 2011 Share Posted April 27, 2011 There was a homecategories module for v1.3 but it doesnt work for v1.4. Other than fixing that module I have no idea Link to comment Share on other sites More sharing options...
deafmouse Posted April 29, 2011 Author Share Posted April 29, 2011 thanks ill check it out. i'm running 1.3 anyways because my theme i bought isn't compatible with 1.4 Link to comment Share on other sites More sharing options...
deafmouse Posted April 29, 2011 Author Share Posted April 29, 2011 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 More sharing options...
deafmouse Posted May 2, 2011 Author Share Posted May 2, 2011 bump....anyone please? the files have the exact same code! i don't get why the spacing changed when i load it thought shoponline.phpi duplicated category.php and the duplicated file does the same! its the same code!!!!! Link to comment Share on other sites More sharing options...
Recommended Posts