Contributions
Main categories in front page
This simple contribution is meant to show the main categories (top level only) in a box in the front page of the shop with pictures and title text.
Here I positioned it immedialy after the title and before the Text_Main.
It is simple and you will have a sophisticated first page to look at...
You have an example in www.moldsandmoulds.com (this page have other heavy modifications but you can clearly see how the categories look like on it).
As this contribution is originally built from the new products file in the same modules section, the number of category displayed is the same number for the number of new products displayed.
Credit goes to the OSCommerce guys, as they already did most of the effort, and I am not a programmer!!!
Expand All / Collapse All
I just made two little changes in the module file (main_categories.php) in order to work with modified database table names. If you did not change the table names you do not need this package.
BTW the changes are around line 124.
Thanks for this contribution!
This version includes all the previous versions combined into one easy package (this is the same package as 2.3b except with the proper cell wdith fix, somehow I overlooked it.)
This version includes all the previous versions combined into one easy package, plus some new improvements:
- Added mouseover hover effect (can be turned on or off)
- Added parameters for adjusting hover colors and borders to fit the look of your store
- Made entire category cell clickable
- Added fix for missing title
- Added a parameter for setting the vAlign (vertical placement of images)
- adjusted bottom margin so the rows now have more padding
- Improved readme
This version includes all the previous versions combined into one easy package, plus some new improvements:
- Added mouseover hover effect (can be turned on or off)
- Added parameters for adjusting hover colors and borders to fit the look of your store
- Made entire category cell clickable
- Added fix for missing title
- Added a parameter for setting the vAlign (vertical placement of images)
- adjusted bottom margin so the rows now have more padding
- Improved readme
This version includes all the previous versions combined into one easy package, plus some new improvements:
- Added a parameter for setting the vAlign (vertical placement of images)
- adjusted bottom margin so the rows now have more padding
- Improved readme
Thanks to all previous developers for their great work!
I found that all my columns were defaulting to 33%, regardless of the $item_column_number I'd set; so I adjusted the code at line 157 just a wee bit.
(I'm a newbie, so excuse me for not contributing properly)
Hi guys, as I am not a PHP GURU, this might not be such important update, however using previous file, I have noticed that the title of the box was missing. So I just added it using New Products sample ;o)
You decide whether to use with/out title.. :) Don't thank to me as this is not my contrib. The guys bellow made all the work...
This is just an updated version of main_categories.php file, not the entire contribution. So if you want to use this file, you will still need to install the version that is latest and then to apply the patched file.
P.S. I would like to dedicate this patch to my precious girls in my live - my sweat heart Vera Teneva and my little baby - Magdalena and to thank them for making me such important .
If you also have enable_disable_categories_1.4 installed and don't want to show the disabled cateories in main page, just add: AND c.categories_status=1 at the end of this line: $query = "select c.categories_id, cd.categories_name, c.parent_id, c.categories_image
from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION .
" cd
where c.categories_id = cd.categories_id";
In practice, it will show like this:
$query = "select c.categories_id, cd.categories_name, c.parent_id, c.categories_image
from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION .
" cd
where c.categories_id = cd.categories_id AND c.categories_status=1";
Here attached you will only find the file I modified, i.e. main_categories.php inside catalog/includes/modules/
Credits go to azar, as I found all this, with very good explanations in the forum at this link: http://forums.oscommerce.com/index.php?showtopic=51034&b=1&st=&p=&#entry
I had main categories displaying categories level 1 and 2 on the main page. So here is a a small fix, so that main_categories.php doesn't display subcategories.
*file only
Complete Package with all Modifications and a new Readme!
Changes:
$item_column_number lets you set the number of columns from 1 to 9
$item_title_on_newline lets you put the title on a new line (rather than to the right)
$item_div_options lets you define either a class or a set of DIV options for display of your items in the categories list (centered, borders, etc.)
$item_subcategories_options lets you put in special formatting for subcategories, if you desire
One note: you can make the options just contain something like class='main_categories' if you want to just put in CSS references. I use this file with BTS, so you can easy externalize the formatting.
This simple contribution is meant to show the main categories (top level only) in a box in the front page of the shop with pictures and title text.
Here I positioned it immedialy after the title and before the Text_Main.
It is simple and you will have a sophisticated first page to look at...
You have an example in www.moldsandmoulds.com (this page have other heavy modifications but you can clearly see how the categories look like on it).
As this contribution is originally built from the new products file in the same modules section, the number of category displayed is the same number for the number of new products displayed.
Credit goes to the OSCommerce guys, as they already did most of the effort, and I am not a programmer!!!
In this latest version I changed some function and parameter names, so that now it can be used together with the new products box on the main page and with multilanguage sites.
I apologize for the previous version, I was eager to share it...
This simple contribution is meant to show the main categories (top level only) in a box in the front page of the shop with pictures and title text.
Here I positioned it immedialy after the title and before the Text_Main.
It is simple and you will have a sophisticated first page to look at...
You have an example in www.moldsandmoulds.com (this page have other heavy modifications but you can clearly see how the categories look like on it).
As this contribution is originally built from the new products file in the same modules section, the number of category displayed is the same number for the number of new products displayed.
Credit goes to the OSCommerce guys, as they already did most of the effort, and I am not a programmer!!!
Note: Contributions are used at own risk.