Jump to content
kymation

[Addon} Modular Front Page

Recommended Posts

The Categories Images categories are sorted by the categories Sort Order, the same as the categories in the categories menu.

 

Regards

Jim


See my profile for a list of my addons and ways to get support.

Share this post


Link to post
Share on other sites

I have the same problem that user (Locolacolina) in the spanish instalation (Couldn't find constant MODULE_FRONT_PAGE_TEXT_MAIN_ESPANOL), I solve it changing in the admin (Location / Languages) from (Español) to (espanol), but: it´s possible change it in the module install to change variable (Language name) to (Language directory)?. And Who?. Thanks.

Share this post


Link to post
Share on other sites

Yes, the language name needs to match the name on the language directory. This is standard osCommerce. The problem is that your language pack does this wrong. I suggest that you contact the person who put up the language pack and ask them to fix it.

 

Regards

Jim


See my profile for a list of my addons and ways to get support.

Share this post


Link to post
Share on other sites

Greetings, have all the issues with this addon been resolved? I would like to try it but not if there are still problems.

Share this post


Link to post
Share on other sites

The w3C validator is saying some divs and spans are in the wrong places. I will have a look tomorrow when my head is working again.

 

Have all the issues been resolved with this addon?

Share this post


Link to post
Share on other sites

What issues are you talking about


REMEMBER BACKUP, BACKUP AND BACKUP

Get the latest Responsive osCommerce CE (community edition) here

It's very easy to over complicate what are simple things in life

Share this post


Link to post
Share on other sites

All issues with this Addon have been fixed so far as I know.

 

Regards

Jim


See my profile for a list of my addons and ways to get support.

Share this post


Link to post
Share on other sites

I want the banner (rotator) to show on all the pages, I have added the below to all the pages before the heading but it is not working

 

<div class="contentContainer">

 

<?php echo $oscTemplate->getBlocks('front_page'); ?>

 

</div>

 

What do I need to do to make this banner show on all the pages on my shop

Share this post


Link to post
Share on other sites

The banner rotator is restricted to the front page by design. If you want it on other pages, you'll need to modify or remove this line:

     if ($PHP_SELF == 'index.php' && $cPath == '') {

If you remove the line, remove the corresponding } as well (line 91). Removing the line may cause errors in the Admin.

 

Regards

Jim


See my profile for a list of my addons and ways to get support.

Share this post


Link to post
Share on other sites

Thanks Jim, I removed it and no error in admin too :)

 

Another question - how can I add the search box to the breadcrumbs bar?

 

The banner rotator is restricted to the front page by design. If you want it on other pages, you'll need to modify or remove this line:

     if ($PHP_SELF == 'index.php' && $cPath == '') {

If you remove the line, remove the corresponding } as well (line 91). Removing the line may cause errors in the Admin.

 

Regards

Jim

Share this post


Link to post
Share on other sites

I'm glad to hear that it worked out for you.

 

I have never put a search box in with the breadcrumbs. You would be better off asking a question in the general support forum.

 

Regards

Jim


See my profile for a list of my addons and ways to get support.

Share this post


Link to post
Share on other sites

Anther question - it is working but if also want this to show on all the product pages - where do I add the code?

 

Thanks Jim, I removed it and no error in admin too :)

 

Another question - how can I add the search box to the breadcrumbs bar?

Share this post


Link to post
Share on other sites

Anther question - it is working but if also want this to show on all the product pages - where do I add the code?

 

I'm glad to hear that it worked out for you.

 

I have never put a search box in with the breadcrumbs. You would be better off asking a question in the general support forum.

 

Regards

Jim

Share this post


Link to post
Share on other sites

hi,

i don´t know if it is a bug or i have done sth wrong

 

but the featured module instead of displaying only the number of Max Featured Products

it displaying all the feature products.

 

If i have set 6 featured products and the max is 3 the modules display all 6 products...

 

is this happenning to you???

 

please help...

Share this post


Link to post
Share on other sites

That is a bug. I'll fix it and put out a new release. If you want to fix yours, change this code in includes/modules/front_page.php (Line 56) from this:

 

       for ($id = 1; $id <= $this->featured_products; $id++) {

to this:

 

       for ($id = 1; $id < $this->count; $id++) {

Thanks for the bug report.

 

Regards

Jim


See my profile for a list of my addons and ways to get support.

Share this post


Link to post
Share on other sites

Hello Jim,

 

The modular front page is brilliant, so thank you.

 

Not to be too greedy but I have two questions that I was hoping you could answer

 

1. I have found that whilst using the box style float for the category images that the category text title will abutt onto the end of the category image and not be placed just below it so that it does not fit into the category boxes.

 

I am a newbie and have had a thorough read of yur instructions and tried to fix this problem in the css.stylsheet (catalog/ext/modules/front_page/categories_images/stylesheet.css) to see if I can fix it but to no avail unfortuneately. Do you have any advice on how I move the category text title below the category image so that it will fit into the box?

 

2. I have tried to change the colour of the border surrounding the floating categories to a light greeny colour by modifying the categories_images/stylesheet.css as below:

 

.imageBox {
 width: 110px;  /* Width of each Category */
 height: 280px;  /* Height of each Category */
 padding: 5px 5px 5px 25px;  /* Padding between the category contents and the border */
 border: 3px inset #1fbfa5;  /* Border around each Category -- See the User's Manual */
 margin: 5px;  /* Margin between the Category border and other objects */
 font-family: Verdana, Arial, sans-serif;
 font-size: 12pt;
 background: #ffffff;  /* Background color of each Category */
 float: left;  /* Don't change this */
}

.center {
 text-align: center;
}

.module_contents {
 padding: 5px 5px 5px 25px;
 font-size: 13pt;
 line-height: 1.2;
}

.category_link_top {
 font-weight: bold;
 text-decoration: underline;
 color: #1fbfa5;
}

.category_link_sub {
 font-weight: normal;
 text-decoration: underline;
 color: #000000;
 font-size: 11pt;
}

.spacer {
 margin-top: 10px;
}

.link_column {
 text-indent: -0.5em;
 display: block;
}

 

Initially this had the desired effect but once the mouse hovers over it returns back to the dark blue original colour and remains the same. Do you have any idea what I should be looking at to change the colour permenantly?

 

Many thanks

 

Chris

Share this post


Link to post
Share on other sites

That is a bug. I'll fix it and put out a new release. If you want to fix yours, change this code in includes/modules/front_page.php (Line 56) from this:

 

       for ($id = 1; $id <= $this->featured_products; $id++) {

to this:

 

       for ($id = 1; $id < $this->count; $id++) {

Thanks for the bug report.

 

Regards

Jim

 

 

thx for your imediate answer but i think there is another bug on the same module...

 

Featured products must display in random order when the Featured Products are greater than max number...

 

am i right?

 

this does not happen...

Edited by kosbou

Share this post


Link to post
Share on other sites

1. I have found that whilst using the box style float for the category images that the category text title will abutt onto the end of the category image and not be placed just below it so that it does not fit into the category boxes.

This is a common problem with CSS. Try this: Find this code in catalog/includes/modules/front_page/categories_images.php (Lines 183-185)

 

               } //if (MODULE_FRONT_PAGE_CATEGORIES_IMAGES_SHOW_SUBCATEGORIES

               $categories_content .= '</div>' . "\n";

and add the following just after that:

 

               $categories_content .= '<div class="clear"></div>' . "\n";

Then add the following to your stylesheet.css:

 

.clear {
 clear: both;
 display: block;
 overflow: hidden;
 visibility: hidden;
 width: 0;
 height: 0;
}

 

2. I have tried to change the colour of the border surrounding the floating categories to a light greeny colour by modifying the categories_images/stylesheet.css as below:

<snipped>

The box color is also set by the Javascript. See Line 143 in the categories_images.php file:

                 $categories_content .= ' onmouseover="set_CSS(\'box_' . $box_number . '\',\'borderColor\',\'#aabbdd\')" onmouseout="set_CSS(\'box_' . $box_number . '\',\'borderColor\',\'#182d5c\')" ';

The first color is the mouseover, the second is the color it returns to after the mouse has moved on. I really need to turn these into module settings, but for now you can just edit the file.

 

Regards

Jim


See my profile for a list of my addons and ways to get support.

Share this post


Link to post
Share on other sites

thx for your imediate answer but i think there is another bug on the same module...

 

Featured products must display in random order when the Featured Products are greater than max number...

 

am i right?

 

this does not happen...

This is not a bug, just a missing feature. The Featured Products module currently only displays the products in the order that you set them. I intend to add a random feature to a future release, but this involves quite a bit of additional code, so it may be a while.

 

Regards

Jim


See my profile for a list of my addons and ways to get support.

Share this post


Link to post
Share on other sites

I am getting the following error from the KissER Error Handling & Debugging Add-On regarding the Front Page Module:

 

Error: include_once(includes/functions/modules/front_page/featured.php): failed to open stream: No such file or directory

File: includes/modules/front_page/featured.php

Line: 32

 

Error: include_once(): Failed opening 'includes/functions/modules/front_page/featured.php' for inclusion (include_path='.:/hsphere/shared/apache/libexec/php5ext/php/')

File: includes/modules/front_page/featured.php

Line: 32

 

 

Anyone know how to solve this?

 

The module works, but for some reason I am getting the error above.


Web Developer, Firebug, and Notepad++ are powerful free tools for web design.

Share this post


Link to post
Share on other sites

Are you getting that error in your Admin? That would mean that the file is missing, and the module will not work without it.

 

Regards

Jim


See my profile for a list of my addons and ways to get support.

Share this post


Link to post
Share on other sites

Are you getting that error in your Admin? That would mean that the file is missing, and the module will not work without it.

 

Regards

Jim

 

In Admin the module looks fine and works fine. I can actually see the file in the error message's specified location within my directory.

 

I do remember commenting out "featured products" or "just added" via //, but I don't remember where I did it or which one I did so it's been hard to find :-" .

Edited by ErikMM

Web Developer, Firebug, and Notepad++ are powerful free tools for web design.

Share this post


Link to post
Share on other sites

In includes/modules/front_page/featured.php, you should have the following code starting at Line 37:

 

     // Include the function that is used to add products in the Admin
     if ($PHP_SELF == 'modules.php') {
       include_once (DIR_WS_FUNCTIONS . 'modules/front_page/featured.php');
     }

If yours doesn't match, try the latest version of that file.

 

Regards

Jim


See my profile for a list of my addons and ways to get support.

Share this post


Link to post
Share on other sites

Hello Jim

 

Thank you for getting back to me.

 

Your solution for the colour change to the border has solved my problem, thank you.

 

Unfortunately, the solution for the category title hasn't worked unless I am not following your directions correctly. I have copied the whole of the categories_images.php with your amendments in it. Have I followed this correctly?

 

<?php
/*
 $Id: categories_images.php v1.1.7 20110108 Kymation $
 Most of the execute() code is from the stock osCommerce New Products module

 osCommerce, Open Source E-Commerce Solutions
 http://www.oscommerce.com

 Copyright (c) 2010 osCommerce

 Released under the GNU General Public License
*/

 class categories_images {
   var $code = 'categories_images';
   var $group = 'front_page';
   var $title;
   var $description;
   var $sort_order;
   var $enabled = false;

   function categories_images() {
     $this->title = MODULE_FRONT_PAGE_CATEGORIES_IMAGES_TITLE;
     $this->description = MODULE_FRONT_PAGE_CATEGORIES_IMAGES_DESCRIPTION;

     if (defined('MODULE_FRONT_PAGE_CATEGORIES_IMAGES_STATUS')) {
       $this->sort_order = MODULE_FRONT_PAGE_CATEGORIES_IMAGES_SORT_ORDER;
       $this->enabled = (MODULE_FRONT_PAGE_CATEGORIES_IMAGES_STATUS == 'True');
     }
   }

   function execute() {
     global $oscTemplate, $languages_id, $currencies, $PHP_SELF, $cPath;

     if ($PHP_SELF == 'index.php' && $cPath == '') {
       $categories_content = '<!-- Categories Images BOF -->' . "\n";
       if (MODULE_FRONT_PAGE_CATEGORIES_IMAGES_FRONT_TITLE != '') {
         $categories_content .= '  <h2>' . MODULE_FRONT_PAGE_CATEGORIES_IMAGES_FRONT_TITLE . '</h2>' . "\n";
       }
       $categories_content .= '  <div class="contentText">' . "\n";

       // Retrieve the data on the products in the categories list and load into an array
       $categories_query_raw = "
               select
                 c.categories_id,
                 c.categories_image,
                 cd.categories_name
               from " . TABLE_CATEGORIES_DESCRIPTION . " cd
                 join " . TABLE_CATEGORIES . " c
                   on c.categories_id = cd.categories_id
               where
                 c.parent_id = '0'
                 and cd.language_id = '" . (int) $languages_id . "'
               order by
                 c.sort_order
             ";
       //print 'Categories Query: ' . $categories_query_raw . '<br />';
       $categories_query = tep_db_query($categories_query_raw);

       while ($categories = tep_db_fetch_array($categories_query)) {
         $categories_id = $categories['categories_id'];
         $categories_data[$categories_id] = array (
           'id' => $categories_id,
           'name' => $categories['categories_name'],
           'image' => $categories['categories_image']
         );
       } //while ($categories

       // Set up the box in the selected style
       if (count($categories_data) > 0) { // Show only if we have categories in the array
         switch (MODULE_FRONT_PAGE_CATEGORIES_IMAGES_BOX_STYLE) {
           // Show the categories in a fixed grid (# of columns is set in Admin)
           case 'Grid' :
             $categories_content .= '    <table border="0" width="100%" cellspacing="0" cellpadding="2">' . "\n";
             $row = 0;
             $col = 0;
             $space_above = false;
             foreach ($categories_data as $category) {
               if ($col == 0) {
                 $categories_content .= '      <tr>' . "\n";
               }

               $width = (floor(100 / MODULE_FRONT_PAGE_CATEGORIES_IMAGES_BOX_COLUMNS));

               $categories_content .= '        <td width="' . $width . '%" align="center" valign="top">' . "\n";
               $categories_content .= '<a href="' . tep_href_link(FILENAME_DEFAULT, 'cPath=' . $category['id']) . '">';

               // Show the products image if selected in Admin
               if (MODULE_FRONT_PAGE_CATEGORIES_IMAGES_SHOW_IMAGE == 'True') {
                 $categories_content .= tep_image(DIR_WS_IMAGES . $category['image'], $category['name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="2" vspace="3"');
                 $space_above = true;
               } //if (MODULE_FRONT_PAGE_CATEGORIES_IMAGES_SHOW_IMAGE

               // Show the products name if selected in Admin
               if (MODULE_FRONT_PAGE_CATEGORIES_IMAGES_SHOW_NAME == 'True') {
                 if ($space_above == true) {
                   $categories_content .= "<br />\n";
                 }
                 $categories_content .= $category['name'];
                 $space_above = true;
               } //if (MODULE_FRONT_PAGE_CATEGORIES_IMAGES_SHOW_NAME

               $categories_content .= '</a></td>' . "\n";

               $col++;
               if ($col >= MODULE_FRONT_PAGE_CATEGORIES_IMAGES_BOX_COLUMNS) {
                 $col = 0;
                 $row++;
                 $categories_content .= '</tr>' . "\n";
               } //if ($col

             } //foreach ($categories_data

             if ($col < MODULE_FRONT_PAGE_CATEGORIES_IMAGES_BOX_COLUMNS) {
               $categories_content .= '</tr>' . "\n";
             } //if ($col

             $categories_content .= '</table>' . "\n";
             break;

             // Show the categories in a floating grid (# of columns depends on browser width)
           case 'Float' :
             // Link to the stylesheet and javascript to go in the header
             $header = '<link rel="stylesheet" type="text/css" href="ext/modules/front_page/categories_images/stylesheet.css" />' . "\n";
             $header .= '<script type="text/javascript"><!--' . "\n";
             $header .= 'function set_CSS(el_id, CSS_attr, CSS_val) {' . "\n";
             $header .= '  var el = document.getElementById(el_id);' . "\n";
             $header .= '  if (el) el.style[CSS_attr] = CSS_val;' . "\n";
             $header .= '}' . "\n";
             $header .= '//-->' . "\n";
             $header .= '</script>' . "\n";

             $oscTemplate->addBlock($header, 'header_tags');

             // Set up the on-page code
             $box_number = 1;
             $space_above = false;
             foreach ($categories_data as $category) {
               $categories_content .= '<div class="imageBox" id="box_' . $box_number . '"';
               if (MODULE_FRONT_PAGE_CATEGORIES_IMAGES_BOX_MOUSEOVER == 'True') {
                 // Change the colors in the next line to change the mousover color of the border
                 // See the User's Manual for instructions
                 $categories_content .= ' onmouseover="set_CSS(\'box_' . $box_number . '\',\'borderColor\',\'#1fbfa5\')" onmouseout="set_CSS(\'box_' . $box_number . '\',\'borderColor\',\'#1fbfa5\')" ';
               }
               $categories_content .= '>';

               $categories_content .= '<div class="link_column"><a href="' . tep_href_link(FILENAME_DEFAULT, 'cPath=' . $category['id']) . '">';

               // Show the category image if selected
               if (MODULE_FRONT_PAGE_CATEGORIES_IMAGES_SHOW_IMAGE == 'True') {
                 $categories_content .= tep_image(DIR_WS_IMAGES . $category['image'], $category['name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="2" vspace="3"');
               } //if (CATEGORIES_IMAGES_BOX_SHOW_IMAGE

               // Show the category name if selected
               if (MODULE_FRONT_PAGE_CATEGORIES_IMAGES_SHOW_NAME == 'True') {
                 $categories_content .= '<strong>' . $category['name'] . '</strong>';
               } //if (CATEGORIES_IMAGES_BOX_SHOW_NAME

               $categories_content .= '</a></div>';

               // Show the subcategories if selected
               if (MODULE_FRONT_PAGE_CATEGORIES_IMAGES_SHOW_SUBCATEGORIES == 'True') {
                 $subcategories_query_raw = "
                                   select
                                     c.categories_id,
                                     cd.categories_name
                                   from
                                     " . TABLE_CATEGORIES_DESCRIPTION . " cd
                                     join " . TABLE_CATEGORIES . " c
                                       on c.categories_id = cd.categories_id
                                   where
                                     c.parent_id = " . $category['id'] . "
                                     and cd.language_id = '" . (int) $languages_id . "'
                                   order by
                                     c.sort_order
                                 ";
                 //print 'Subcategories Query: ' . $subcategories_query_raw . '<br />';
                 $subcategories_query = tep_db_query($subcategories_query_raw);

                 while ($subcategories = tep_db_fetch_array($subcategories_query)) {
                   $categories_content .= '<div class="link_column"><a href="' . tep_href_link(FILENAME_DEFAULT, 'cPath=' . $category['id'] . '_' . $subcategories['categories_id']) . '" class="category_link_sub">' . $subcategories['categories_name'] . '</a></div>';
                 }
               }//if (MODULE_FRONT_PAGE_CATEGORIES_IMAGES_SHOW_SUBCATEGORIES
               $categories_content .= '</div>' . "\n";
               $categories_content .= '<div class="clear"></div>' . "\n";

               $box_number++;
             } //foreach ($categories_data
             break;

             // Show products in row format, similar to Category list
           case 'Row' :
           default :
             $categories_content .= '    <table border="0" width="100%" cellspacing="0" cellpadding="2">' . "\n";
             foreach ($categories_data as $category) {
               $categories_content .= '<tr>' . "\n";
               // Show the products image if selected in Admin
               if (MODULE_FRONT_PAGE_CATEGORIES_IMAGES_SHOW_IMAGE == 'True') {
                 $categories_content .= '<td>';
                 $categories_content .= '<a href="' . tep_href_link(FILENAME_DEFAULT, 'cPath=' . $category['id']) . '">';
                 $categories_content .= tep_image(DIR_WS_IMAGES . $category['image'], $category['name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="2" vspace="3"');
                 $categories_content .= '</a>';
                 $categories_content .= '</td>';
               } //if (CATEGORIES_IMAGES_BOX_SHOW_IMAGE

               // Show the products name if selected in Admin
               if (MODULE_FRONT_PAGE_CATEGORIES_IMAGES_SHOW_NAME == 'True') {
                 $categories_content .= '<td>';
                 $categories_content .= '<a href="' . tep_href_link(FILENAME_DEFAULT, 'cPath=' . $category['id']) . '">';
                 $categories_content .= '<b>' . $category['name'] . '</b>';
                 $categories_content .= '</a>';
                 $categories_content .= '</td>';
               } //if (CATEGORIES_IMAGES_BOX_SHOW_NAME

               $categories_content .= '</tr>' . "\n";
             } // foreach ($categories_data

             $categories_content .= '</table>' . "\n";
             break;

         } // switch

         $categories_content .= '  </div>' . "\n";
         $categories_content .= '<!-- Categories Images EOF -->' . "\n";

         $oscTemplate->addBlock($categories_content, $this->group);
       } // if( count
     }
   } // function execute

   function isEnabled() {
     return $this->enabled;
   }

   function check() {
     return defined('MODULE_FRONT_PAGE_CATEGORIES_IMAGES_STATUS');
   }

   function install() {
     tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Sort Order', 'MODULE_FRONT_PAGE_CATEGORIES_IMAGES_SORT_ORDER', '0', 'Sort order of display. Lowest is displayed first.', '6', '0', now())");
     tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Enable Categories Images', 'MODULE_FRONT_PAGE_CATEGORIES_IMAGES_STATUS', 'True', 'Do you want to show the Categories Images box on the front page?', '6', '1', 'tep_cfg_select_option(array(\'True\', \'False\'), ', now())");
     tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Title', 'MODULE_FRONT_PAGE_CATEGORIES_IMAGES_FRONT_TITLE', 'Products', 'Title to show on the front page.', '6', '2', now())");
     tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Box Style', 'MODULE_FRONT_PAGE_CATEGORIES_IMAGES_BOX_STYLE', 'Grid', 'Show the Categories Images box in grid format, floating (variable width) grid, or with each category on a line', '6', '3', 'tep_cfg_select_option(array(\'Grid\', \'Float\', \'Rows\'), ', now())");
     tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Box Mouseover', 'MODULE_FRONT_PAGE_CATEGORIES_IMAGES_BOX_MOUSEOVER', 'True', 'Show the mouseover effect on each Category (Must select Float in Box style above)', '6', '4', 'tep_cfg_select_option(array(\'True\', \'False\'), ', now())");
     tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Number of Columns', 'MODULE_FRONT_PAGE_CATEGORIES_IMAGES_BOX_COLUMNS', '3', 'Number of columns of categories to show in the Categories Images box', '6', '5', now())");
     tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Show Image', 'MODULE_FRONT_PAGE_CATEGORIES_IMAGES_SHOW_IMAGE', 'True', 'Show the category image in the Categories Images box', '6', '6', 'tep_cfg_select_option(array(\'True\', \'False\'), ', now())");
     tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Show Name', 'MODULE_FRONT_PAGE_CATEGORIES_IMAGES_SHOW_NAME', 'True', 'Show the category name in the Categories Images box', '6', '7', 'tep_cfg_select_option(array(\'True\', \'False\'), ', now())");
     tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Show Subcategories', 'MODULE_FRONT_PAGE_CATEGORIES_IMAGES_SHOW_SUBCATEGORIES', 'True', 'Show the subcategories list under each category (Float mode only)', '6', '8', 'tep_cfg_select_option(array(\'True\', \'False\'), ', now())");
   }

   function remove() {
     tep_db_query("delete from " . TABLE_CONFIGURATION . " where configuration_key in ('" . implode("', '", $this->keys()) . "')");
   }

   function keys() {
     return array (
       'MODULE_FRONT_PAGE_CATEGORIES_IMAGES_SORT_ORDER',
       'MODULE_FRONT_PAGE_CATEGORIES_IMAGES_STATUS',
       'MODULE_FRONT_PAGE_CATEGORIES_IMAGES_FRONT_TITLE',
       'MODULE_FRONT_PAGE_CATEGORIES_IMAGES_BOX_STYLE',
       'MODULE_FRONT_PAGE_CATEGORIES_IMAGES_BOX_MOUSEOVER',
       'MODULE_FRONT_PAGE_CATEGORIES_IMAGES_BOX_COLUMNS',
       'MODULE_FRONT_PAGE_CATEGORIES_IMAGES_SHOW_IMAGE',
       'MODULE_FRONT_PAGE_CATEGORIES_IMAGES_SHOW_NAME',
       'MODULE_FRONT_PAGE_CATEGORIES_IMAGES_SHOW_SUBCATEGORIES'
     );
   }
 }

?>

 

Here is the change to the stylesheet.css:

 

/*
 $Id: stylesheet.css v1.0 20101112 Kymation $

 osCommerce, Open Source E-Commerce Solutions
 http://www.oscommerce.com

 Copyright (c) 2010 osCommerce

 Released under the GNU General Public License
*/


/*  Categories in the Categories Images box  */
.imageBox {
 width: 110px;  /* Width of each Category */
 height: 280px;  /* Height of each Category */
 padding: 5px 5px 5px 25px;  /* Padding between the category contents and the border */
 border: 3px inset #1fbfa5;  /* Border around each Category -- See the User's Manual */
 margin: 5px;  /* Margin between the Category border and other objects */
 font-family: Verdana, Arial, sans-serif;
 font-size: 12pt;
 background: #ffffff;  /* Background color of each Category */
 float: left;  /* Don't change this */
}

.clear { 
 clear: both; 
 display: block; 
 overflow: hidden; 
 visibility: hidden; 
 width: 0; 
 height: 0; 
}

.center {
 text-align: center;
}

.module_contents {
 padding: 5px 5px 5px 25px;
 font-size: 13pt;
 line-height: 1.2;
}

.category_link_top {
 font-weight: bold;
 text-decoration: underline;
 color: #1fbfa5;
}

.category_link_sub {
 font-weight: normal;
 text-decoration: underline;
 color: #000000;
 font-size: 11pt;
}

.spacer {
 margin-top: 10px;
}

.link_column {
 text-indent: -0.5em;
 display: block;
}

 

The effect of theses changes have made all the floating category boxes line up vertically on my front page one on top of the other with the category title still abutting with the image and not fitting into the box.

 

Have I carried out the instructions correctly? Do you have any other suggestions?

 

Thanks

 

Chris

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×