pete_vo Posted November 15, 2008 Share Posted November 15, 2008 Hi there, i am looking to have the index page display the Categories like it is in this site http://www.lachilli.com/index.php?osCsid=c...869a5f967a9e7cd but i do not know what files i need to look at to start making these amendments, can anyone shed some light on what files i need to start looking at on my own site to get it to display like this site is? Link to comment Share on other sites More sharing options...
♥kymation Posted November 16, 2008 Share Posted November 16, 2008 You would need to create a Categories box for your images. I started with something like the New Products box. Then add fields to your database for the category image (if you want to use a different image than the category page) and a field for text if you want it. The category name is already stored, so just retrieve it. Don't forget to add the new field(s) to the admin/categories.php so you can add the data. I've done this for several stores. I probably should put it up as a Contribution. PM me if you want links to some sample stores. If you want I'll post the code. Regards Jim See my profile for a list of my addons and ways to get support. Link to comment Share on other sites More sharing options...
saviornt Posted November 17, 2008 Share Posted November 17, 2008 Would be awesome if you could paste the code, running into this problem myself :\ Link to comment Share on other sites More sharing options...
saviornt Posted November 17, 2008 Share Posted November 17, 2008 Would be awesome if you could paste the code, running into this problem myself :\ Ok, I think I have it figured out, to the best of my abilities at least. In the index.php page: require('includes/application_top.php'); // the following cPath references come from application_top.php $category_depth = 'top'; I changed this to: require('includes/application_top.php'); // the following cPath references come from application_top.php $category_depth = 'nested'; Further down in the code (I was getting a reverse array error), I went from: <?php if (isset($cPath) && strpos('_', $cPath)) { // check to see if there are deeper categories within the current category $category_links = array_reverse($cPath_array); To this: <?php if (isset($cPath)) { // check to see if there are deeper categories within the current category $category_links = array($cPath_array); This change basically makes the site to go to index.php?cPath=0 when the page loads. Link to comment Share on other sites More sharing options...
♥kymation Posted November 17, 2008 Share Posted November 17, 2008 That's actually quite clever. I've been trying to think of a case where that wouldn't work, but I can't see any. It's a perfect solution. I'm still going to release my version, since it allows a few options that this method can't do (different images, adding descriptive text, etc.) Even though it's nowhere near as elegant. Regards Jim See my profile for a list of my addons and ways to get support. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.