Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Category Box Tweaking


theseason

Recommended Posts

Posted

Which file in the includes folder do I need to modify so I can increase the space between the category name and the edge of the box? It is a really tight squeeze for no reason.

 

I thought it would be in the classes folder > boxes.php. However, I made some changes, and nothing worked. Maybe I am barking up the wrong tree. See image below:

 

 

ca_menu.jpg

 

Thanks for viewing and posting any feedback.

 

Thanks

 

A

Posted

Which file would be all files that use <tr><td> tags with hardcoded cellspacing and cellpadding attributes. You can use a good editor to s/r that with your CSS classes.

 

 

HIH :D

 

Dave...

Posted

Thanks for replying. I am a bit confused by your response. Are you saying I can control it in my stylesheet? I looked through it and could not find a place to change that. Is there a specific php file I should edit to fix my dilemma.

 

Thanks

A

Posted

in includes/boxes/categorie.php look for where it assigns the name of the category (75 in mine) then you can try replacing it with this:

'name' => ' ' . $categories['categories_name'],

 

Might work, might not. If not, try looking for where the table it and making the cellpadding larger.

If I was crafty, this would be a funny signature.

Posted

If it is for the categories box alone then includes/boxes/catagories.php

 for ($i=0; $i<$tree[$counter]['level']; $i++) {
     $categories_string .= "  ";
   }

 

add more spacers

 for ($i=0; $i<$tree[$counter]['level']; $i++) {
     $categories_string .= "    ";
   }

No longer giving free advice. Please place deposit in meter slot provided.  Individual: [=] SME: [==] Corporation: [===]
If deposit does not fit one of the slots provided then you are asking too much! :P

Is your Osc dated try Phoenix  raising oscommerce from the ashes.

Posted

Thanks for the replies all!!

 

I tried adding more non-breaking spacers, but it seemed to move the subcategories over instead of the main category names. Where do I assign the cellpadding for info boxes?

 

Thanks

A

Posted

Sorry my bad meant to say that that was for the subs as they would require a change also.

Here you go this should do the main catagories

 $categories_string .= tep_href_link(FILENAME_DEFAULT, $cPath_new) . '">';

 

change to

 

 $categories_string .= tep_href_link(FILENAME_DEFAULT, $cPath_new) . '">  ';

 

you can add or remove

&nbsp:
as required

No longer giving free advice. Please place deposit in meter slot provided.  Individual: [=] SME: [==] Corporation: [===]
If deposit does not fit one of the slots provided then you are asking too much! :P

Is your Osc dated try Phoenix  raising oscommerce from the ashes.

Posted

My mistake!

 

$tree[$categories['categories_id']] = 
array('name' => '  ' . $categories['categories_name'],

 

Thanks Ryan. Adding the spacers before the category name worked like a charm.

 

A

Posted

Thanks 241 for adding that as well. I wonder using either method is better than the other. Will one have more consequences down the line.

 

I was scared to add the spacers. Afraid of breaking something that is nearly finished.

 

A

Posted

I think as long as you dont have a underline hover that will underline the spacers also, I dont think there is a problem. Also, since I can't test it, I dont use that category box, when you click on the category if it doesn't add two spaces in the url when you go to it, then I think you are ok.

If I was crafty, this would be a funny signature.

Posted

The code I have given should not add to the url as it is after the > which is where the name would normally be placed

No longer giving free advice. Please place deposit in meter slot provided.  Individual: [=] SME: [==] Corporation: [===]
If deposit does not fit one of the slots provided then you are asking too much! :P

Is your Osc dated try Phoenix  raising oscommerce from the ashes.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...