Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Extra space


PVK

Recommended Posts

Posted

I noticed that there is an extra space before the product name when you look at the products in the products list.

 

Now this has never really been a problem for me, untill know, when i wnated to place a break between some products name because they were too long.

 

When i did this i noticed that ONLY the first line of the product name had this extra space before the product name starts.

This cause the whole layaout of the products to have a very ugly aligning.

 

DOes anyone know :

A : why the extra space is there

and

B : How to remove it

 

I have tried almost everything but it is pretty hard to look for a space which isn't defined anywhere [well at least i can't find it] ??

 

Drives me slightly insane to find out why its there and especially where it comes from ??????

 

Oh my G. its the attack of the terror spaces :D

Posted

Do you mean in products_listing or do you mean in the categories box.

 

There are spaces before the names in the categories box which can be removed from catalog/includes/boxes/categories.php

 

can you provide a link to where this is happening so that a determination can be made as to which files require to be ammended

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

I meant in product_listing :)

 

I have drawn a little image to make it clear.

 

the first one is the way it is displayed and the red one is when you place a <br> behind one of the words so it breaks to a new line.

 

spacingbug.gif

 

As you will notice the shop places an extra space before the first line [i checked loads of oscommerce sites out there and they ALL have it, so it is something that is standard in the shop by default]

 

 

 

Hope someone knows the answer to this

Posted

If you take a look at catalog/includes/modules/product_listing.php you will see that there are spaces being used throughout, however the one for the name should be

 

          case 'PRODUCT_LIST_NAME':
           $lc_align = '';
           if (isset($HTTP_GET_VARS['manufacturers_id'])) {
             $lc_text = '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'manufacturers_id=' . $HTTP_GET_VARS['manufacturers_id'] . '&products_id=' . $listing['products_id']) . '">' . $listing['products_name'] . '</a>';
           } else {
             $lc_text = ' <a href="' . tep_href_link(FILENAME_PRODUCT_INFO, ($cPath ? 'cPath=' . $cPath . '&' : '') . 'products_id=' . $listing['products_id']) . '">' . $listing['products_name'] . '</a> ';
           }
           break;

the part of code is after the else

} else {

              $lc_text = ' <

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

Bobobo, you the man !!! :D

 

How did you come up with that?

And also , since you figured it out, maybe you can explain why it is in the code in the first place??

 

Now everything is the way i want it, but as curious as i am, i would like to know what the function or for what reason it is that the programmers of the osc shop have added this :blink:

 

Thanx for your help, it is much appreciated!

  • 1 year later...
Posted
Bobobo, you the man !!! :D

 

How did you come up with that?

And also , since you figured it out, maybe you can explain why it is in the code in the first place??

 

Now everything is the way i want it, but as curious as i am, i would like to know what the function or  for what reason it is that the programmers of the osc shop have added this :blink:

 

Thanx for your help, it is much appreciated!

 

Hey any idea how to take out the extra space between header images (called in header.php) ? The space is only shown in ie and makes my tabs look awful

 

THANKS

 

Jon

  • 3 years later...
Posted
Hey any idea how to take out the extra space between header images (called in header.php) ? The space is only shown in ie and makes my tabs look awful

 

THANKS

 

Jon

 

check the header php and see if there is an extra row eg <tr><td height =something"></tr></td> i noticed that most of the layout has extra space so just get rid of it and see it's help

Archived

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

×
×
  • Create New...