Post by dantheman50_98 » Thu Oct 07, 2010 7:06 am

Hi There,

I'm trying to get the All Products module to display either at the top or at the bottom of the list of categories but being uneducated in php I'm unable to get this happening at the moment. I can only get it appearing outside of the </ul>. Any ideas?

Thanks,
Dan

Active Member

Posts

Joined
Sat Sep 18, 2010 2:18 am

Post by dannydaman9 » Thu Oct 07, 2010 5:00 pm

If you want this to be shown in the categories area, may i suggest instead of putting the code into the header, put it into the categories module.

Just follow the instructions provided in the zip file and when it asks you to place code into the header files place them into the categories files instead (most of them can be found easily with a simple search in an FTP client)

Site finished:
Image
http://www.labelstogo.co.uk


User avatar
New member

Posts

Joined
Tue May 11, 2010 7:00 pm
Location - Manchester, England

Post by dantheman50_98 » Mon Oct 11, 2010 7:06 am

Hi Danny

If only it were that simple. That's exactly what I've been trying to do. I've been putting the code either side of "<?php echo $category; ?>" in the category.tpl file but it never ends up being in the list of categories (I've added <li> before and </li> after the all products code but it ends up outside of the categories <ul>) so I obviously need to add some code to the controller file but as always inserting the code given into the php file causes the site to crash.
Ah well!

Cheers,
Dan

Active Member

Posts

Joined
Sat Sep 18, 2010 2:18 am

Post by Qphoria » Mon Oct 11, 2010 7:49 am

1. EDIT: catalog/controller/module/category.php

2. FIND:

Code: Select all

$output .= '</ul>';
3. BEFORE, ADD:

Code: Select all

$output .= '<li><a href="index.php?route=product/all">All Products</a></li>';

Image
Donate!|OpenCart Basics|GeoZones
Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by dantheman50_98 » Mon Oct 11, 2010 2:45 pm

Thanks but I'm afraid that hasn't worked. I need the all products link to be a part of the list of categories within the <ul> tags With this method I'm still outside of these tags.

Active Member

Posts

Joined
Sat Sep 18, 2010 2:18 am

Post by jones » Mon Oct 11, 2010 5:06 pm

i don't know how index.php?route=product/all will be able to work... this must be need mod from the core, perhaps i said wrong

Active Member

Posts

Joined
Tue Aug 24, 2010 1:05 pm

Post by Qphoria » Mon Oct 11, 2010 10:03 pm

ah yea.. sorry.. corrected above. Undo the previous

Image
Donate!|OpenCart Basics|GeoZones
Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by dantheman50_98 » Tue Oct 12, 2010 6:53 am

Aha! That has indeed worked. There is one small problem - the "all products" link is also displayed in each list of subcategories. Also, I'm using the Dynamic Category menu from alreadymade.com to allow subcategories to be displayed without having to click the parent category in the main categories menu and in the dropdown menu to allow subcategories to be displayed on hover. This now doesn't work...any idea why?
Thankyou for taking the time to help me by the way guys.

Active Member

Posts

Joined
Sat Sep 18, 2010 2:18 am

Post by dantheman50_98 » Fri Oct 15, 2010 6:07 am

Right - my mistake. I wasn't adding the code the the dynamic menu category.php code. It is now working so thanks for all the help, it is most appreciated.

Active Member

Posts

Joined
Sat Sep 18, 2010 2:18 am
Who is online

Users browsing this forum: No registered users and 3 guests