Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Questions about Enhanced Categories Box


dsaltmer

Recommended Posts

This one works

 

http://addons.oscommerce.com/info/7806

 

Simple install. Though I think you wrote into the wrong file - you shouldn't have written into the .js script, but should have written into a php one - I think it's the /catalog/includes/functions/general.php. Anyway, maybe give the one I linked to a go.

Link to comment
Share on other sites

is there anyway to add that with out having to change the layout in my template top php file. I like the look of the menu but it changes my boxes my buttons and my color scheme

Link to comment
Share on other sites

  • 3 weeks later...

Sorry that I'm late to the party. I wondered if anybody is still working through this or if everyone has given up hope?

I have devised a horibble and messy work around for the indentation issue. I found that trying to put the corrections in to my CSS file didn't work unless I specified every level of <li> in my store which was tedious. SO instead I did a little inline editing to the box.

 

In includes/modules/boxes/bm_enhanced_categories.php, on line 39, change:

$categories_string = '<ul class="enhcat">';

 

to:

$categories_string = '<ul class="enhcat" style="margin: -2px 0 0 -40px; list-style-type: none;">';

 

In includes/modules/boxes/bm_enhanced_categories.php, on line 39, change:

$categories_string = '<li>';

 

to:

$categories_string .= '<li style="margin-left: -' . ($cat['level']*15) . 'px;">

 

That gives a recurring negative margin of 15px per level. I did it like this because I couldn't find the actual problem. Maybe if I spent more time I could but it's late and I'm annoyed.

Also, it's only viable in FireFox and Chrome. IE pushes the menu too far to the left and it's useless. Then you're in to conditional statements and whatnot... sigh.

The Drop Down Menu at the bottom doesn't work because it calls a non-existent function on mine like this:

onchange="changePrice(this.id)"

I can't find where this changes because it should be:

onchange="this.form.submit(this.id)"

which works perfectly and yet changes back to the previous on page refresh.

 

All in all, it needs quite a bit of work (and a few files) but it's a base to work off if I (or anyone else) can be bothered.

Good luck.

Not enough time in the day. Need a time machine...

 

Would build one, but not enough time. Ironically.

Link to comment
Share on other sites

Ok, so my changePrice function was in my html_ouput.php file under the tep_draw_pull_down_menu function. My drop down works fine now.

It was obviously something that I'd put in and forgotten to take out again ages ago. :-

 

I'd still like to find the cause of the indentation issue though if anyone has any ideas. Or at least a work around for IE.

Not enough time in the day. Need a time machine...

 

Would build one, but not enough time. Ironically.

Link to comment
Share on other sites

  • 2 weeks later...
  • 10 months later...

Hi.

 

I've just installed this add on, and as it said in its description, it's a very easy install. However I have a couple of questions about it. In the install.txt the instructions say edit the file catalog/includes/general.php. This file doesn't exist in my install - there is however a general.php in catalog/includes/functions - is this the file I should edit, and if not should I create a general.php in catalog/includes? When I did install by editing the functions/general.php, the resulting categories box is very untidy, with every category and sub-category listed, the list not keeping inside the box. Thanks in advance.

 

Yes, the new function should be added to catalog/includes/functions/general.php as you suspected.

Link to comment
Share on other sites

  • 2 weeks later...
  • 4 months later...

Hi @@wdepot!

 

I just installed your tiny upgrade of the catagories box and it works! :-)

Just one little thing bothers me.

 

When showing catagories having sub-catagories, the mini triangle is shown at the left of the box. between its line and the next one.

 

Checked the code several times but I can't find the error......

 

Can you please help me out?

 

Thanx in advance

 

Kees

Edited by KeesB
Link to comment
Share on other sites

  • 4 months later...

@@KeesB I know it's a while since your post, but it occurs to me that your problem may be the width of your info box, or the length of your category, causeing the sub-categorey icon to wrap.

 

Just a thought :)

Link to comment
Share on other sites

  • 1 year later...

For people that want to know. For 2.3.4BS Gold

 

http://addons.oscommerce.com/info/8561

 

After a hour or so thinking and trying. I have managed to upgrade the Enhanced Categories Contribution to 2.3.4BS Gold.

 

Made a template enhanced_categories.php with

 

<div class="panel panel-default">
<div class="panel-heading"><?php echo MODULE_BOXES_ENHANCED_CATEGORIES_TITLE; ?></div>
<div class="panel-body"><?php echo $categories_string; ?></div>
</div>
 
and in the module file bm_enhanced_categories.php i changed the divclass calls, and added the template call.
 
      $output = '<div class="panel panel-default">' .
              '  <div class="panel-heading">' . MODULE_BOXES_ENHANCED_CATEGORIES_BOX_TITLE . '</div>' .
              '  <div class="panel-body">' . $categories_string . '</div>' .
              '</div>';
              
      ob_start();
      include(DIR_WS_MODULES . 'boxes/templates/enhanced_categories.php');
      $data = ob_get_clean();
 
Greetings, Anne
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...