Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Product Name overlaps the image


Eduardo9350

Recommended Posts

OScommerc version 2.3.2

I modified: Small Image Height to 300 and Small Image Width nothing.

I think need to edit the file that contains the size of the table for the product name.

Please see the problem in enclosed image.

post-314106-0-00704900-1345366620_thumb.jpg

Link to comment
Share on other sites

@@Eduardo9350

 

Catalog/includes/modules/product_listing.php around line 100 is the code block which creates the table.

 

You can add say <td width="10%"> to your price & buynow button columns and larger %'s to the image and name columns, or perhaps add <td align="right"> or <td align="centre"> to your product name column

 

Hope this helps

 

ken

Os-commerce v2.3.3

Security Pro v11

Site Monitor

IP Trap

htaccess Protection

Bad Behaviour Block

Year Make Model

Document Manager

X Sell

Star Product

Modular Front Page

Modular Header Tags

Link to comment
Share on other sites

Thank you very much, your answer was enlightening.

 

These are the changes I made in catalog/includes/modules/product_listing.php :

 

Line 108:

$prod_list_contents .= ' <td><td align="left"><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, ($cPath ? 'cPath=' . $cPath . '&' : '') . 'products_id=' . $listing['products_id']) . '">' . $listing['products_name'] . '</a></td>';

 

ADDED: <td align="left">

 

Line 118:

$prod_list_contents .= ' <td align="right"><td width="12%">' . $currencies->display_price($listing['products_price'], tep_get_tax_rate($listing['products_tax_class_id'])) . '</td>';

 

ADDED: <td width="12%">

 

Line 135:

$prod_list_contents .= ' <td align="left">' . tep_draw_button(IMAGE_BUTTON_BUY_NOW, 'cart', tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $listing['products_id'])) . '</td>';

 

MODIFIED: <td align="left">, left instead of center

 

Other previous changes:

 

1) To maintain the 960 Grid System

catalog/includes/classes/osc_template.php

from line 16:

var $_grid_container_width = 24;

var $_grid_content_width = 12;

var $_grid_column_width = 6;

 

2) I moved all the boxes in the left column.

 

 

Unfortunately I was not able to achieve the proper distribution of the text referring to the product name.

It is too short.

It should appear as shown in red on the attached image.

 

Please Ken, can you help me?

post-314106-0-32406300-1345447357_thumb.jpg

Link to comment
Share on other sites

@@Eduardo9350

 

I think the issue is the small image width being set to zero.

 

I just tried the same on a vanilla install and it seems with the width set to zero, the coding automatically resizes the width in proportion with the height, so say your image is 80 wide by 100 high, the resulting width with be 240.

 

I was able to achieve something like what you are after by making the Small Image width say 100 and making alterations to the alignment and space taken by the columns, for example

 

case 'PRODUCT_LIST_MODEL':
		$prod_list_contents .= '		<td>' . $listing['products_model'] . '</td>';
		break;
	  case 'PRODUCT_LIST_NAME':
		if (isset($HTTP_GET_VARS['manufacturers_id']) && tep_not_null($HTTP_GET_VARS['manufacturers_id'])) {
		  $prod_list_contents .= '		<td><td align="center"><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'manufacturers_id=' . $HTTP_GET_VARS['manufacturers_id'] . '&products_id=' . $listing['products_id']) . '">' . $listing['products_name'] . '</a></td>';
		} else {
		  $prod_list_contents .= '		<td><td aligh="center"><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, ($cPath ? 'cPath=' . $cPath . '&' : '') . 'products_id=' . $listing['products_id']) . '">' . $listing['products_name'] . '</a></td>';
		}
		break;
	  case 'PRODUCT_LIST_MANUFACTURER':
		$prod_list_contents .= '		<td><a href="' . tep_href_link(FILENAME_DEFAULT, 'manufacturers_id=' . $listing['manufacturers_id']) . '">' . $listing['manufacturers_name'] . '</a></td>';
		break;
	  case 'PRODUCT_LIST_PRICE':
		if (tep_not_null($listing['specials_new_products_price'])) {
		  $prod_list_contents .= '		<td align="right"><del>' .  $currencies->display_price($listing['products_price'], tep_get_tax_rate($listing['products_tax_class_id'])) . '</del>  <span class="productSpecialPrice">' . $currencies->display_price($listing['specials_new_products_price'], tep_get_tax_rate($listing['products_tax_class_id'])) . '</span></td>';
		} else {
		  $prod_list_contents .= '		<td align="right">' . $currencies->display_price($listing['products_price'], tep_get_tax_rate($listing['products_tax_class_id'])) . '</td>';
		}
		break;
	  case 'PRODUCT_LIST_QUANTITY':
		$prod_list_contents .= '		<td align="right">' . $listing['products_quantity'] . '</td>';
		break;
	  case 'PRODUCT_LIST_WEIGHT':
		$prod_list_contents .= '		<td align="right">' . $listing['products_weight'] . '</td>';
		break;
	  case 'PRODUCT_LIST_IMAGE':
		if (isset($HTTP_GET_VARS['manufacturers_id'])  && tep_not_null($HTTP_GET_VARS['manufacturers_id'])) {
		  $prod_list_contents .= '		<td align="center"><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'manufacturers_id=' . $HTTP_GET_VARS['manufacturers_id'] . '&products_id=' . $listing['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $listing['products_image'], $listing['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a></td>';
		} else {
		  $prod_list_contents .= '		<td align="center"><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, ($cPath ? 'cPath=' . $cPath . '&' : '') . 'products_id=' . $listing['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $listing['products_image'], $listing['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a></td>';
		}
		break;
	  case 'PRODUCT_LIST_BUY_NOW':
		$prod_list_contents .= '		<td width="15%">' . tep_draw_button(IMAGE_BUTTON_BUY_NOW, 'cart', tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $listing['products_id'])) . '</td>';
		break;

 

I'm not good enough at php or osc to tell you how that will affect the rest of your site, but it does seem to bring about what your after on the product_listing page, subject to you'll need to then alter the spacing of the titles

 

ken

Os-commerce v2.3.3

Security Pro v11

Site Monitor

IP Trap

htaccess Protection

Bad Behaviour Block

Year Make Model

Document Manager

X Sell

Star Product

Modular Front Page

Modular Header Tags

Link to comment
Share on other sites

ken

again thanks for your straight.

I altered the code as follows:

 

case 'PRODUCT_LIST_MODEL':

$prod_list_contents .= ' <td>' . $listing['products_model'] . '</td>';

break;

case 'PRODUCT_LIST_NAME':

if (isset($HTTP_GET_VARS['manufacturers_id']) && tep_not_null($HTTP_GET_VARS['manufacturers_id'])) {

$prod_list_contents .= ' <td><td align="left"><td width="45%"><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'manufacturers_id=' . $HTTP_GET_VARS['manufacturers_id'] . '&products_id=' . $listing['products_id']) . '">' . $listing['products_name'] . '</a></td>';

} else {

$prod_list_contents .= ' <td><td aligh="left"><td width="45%"><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, ($cPath ? 'cPath=' . $cPath . '&' : '') . 'products_id=' . $listing['products_id']) . '">' . $listing['products_name'] . '</a></td>';

}

break;

case 'PRODUCT_LIST_MANUFACTURER':

$prod_list_contents .= ' <td><a href="' . tep_href_link(FILENAME_DEFAULT, 'manufacturers_id=' . $listing['manufacturers_id']) . '">' . $listing['manufacturers_name'] . '</a></td>';

break;

case 'PRODUCT_LIST_PRICE':

if (tep_not_null($listing['specials_new_products_price'])) {

$prod_list_contents .= ' <td align="left"><td width="12%"><del>' . $currencies->display_price($listing['products_price'], tep_get_tax_rate($listing['products_tax_class_id'])) . '</del>  <span class="productSpecialPrice">' . $currencies->display_price($listing['specials_new_products_price'], tep_get_tax_rate($listing['products_tax_class_id'])) . '</span></td>';

} else {

$prod_list_contents .= ' <td align="left"><td width="12%">' . $currencies->display_price($listing['products_price'], tep_get_tax_rate($listing['products_tax_class_id'])) . '</td>';

}

break;

case 'PRODUCT_LIST_QUANTITY':

$prod_list_contents .= ' <td align="right">' . $listing['products_quantity'] . '</td>';

break;

case 'PRODUCT_LIST_WEIGHT':

$prod_list_contents .= ' <td align="right">' . $listing['products_weight'] . '</td>';

break;

case 'PRODUCT_LIST_IMAGE':

if (isset($HTTP_GET_VARS['manufacturers_id']) && tep_not_null($HTTP_GET_VARS['manufacturers_id'])) {

$prod_list_contents .= ' <td align="left"><td width="35%"><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'manufacturers_id=' . $HTTP_GET_VARS['manufacturers_id'] . '&products_id=' . $listing['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $listing['products_image'], $listing['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a></td>';

} else {

$prod_list_contents .= ' <td align="left"><td width="35%"><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, ($cPath ? 'cPath=' . $cPath . '&' : '') . 'products_id=' . $listing['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $listing['products_image'], $listing['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a></td>';

}

break;

case 'PRODUCT_LIST_BUY_NOW':

$prod_list_contents .= ' <td align="left"><td width="20%">' . tep_draw_button(IMAGE_BUTTON_BUY_NOW, 'cart', tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $listing['products_id'])) . '</td>';

break;

 

 

The result is shown in the attached file.

post-314106-0-39518100-1345487959_thumb.gif

Link to comment
Share on other sites

@@Eduardo9350

 

Are happy with that ? or do you need to alter it more ??

 

Ken

Os-commerce v2.3.3

Security Pro v11

Site Monitor

IP Trap

htaccess Protection

Bad Behaviour Block

Year Make Model

Document Manager

X Sell

Star Product

Modular Front Page

Modular Header Tags

Link to comment
Share on other sites

@@Eduardo9350

 

No I thought it was just what you wanted, but was not sure - I guess just language/culture difference.

 

I'm, happy it worked for you.

 

Ken

Os-commerce v2.3.3

Security Pro v11

Site Monitor

IP Trap

htaccess Protection

Bad Behaviour Block

Year Make Model

Document Manager

X Sell

Star Product

Modular Front Page

Modular Header Tags

Link to comment
Share on other sites

@@Eduardo9350

 

Thats what the forums for, all the members will do their best to help you.

 

Ken

Os-commerce v2.3.3

Security Pro v11

Site Monitor

IP Trap

htaccess Protection

Bad Behaviour Block

Year Make Model

Document Manager

X Sell

Star Product

Modular Front Page

Modular Header Tags

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...