Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

How do I configure product_listing.php?


bagok

Recommended Posts

1. I'm at least temporarily stumped on how you would set the width. The way that table is built, it all needs to be elastic...but there's a way around almost any problem ;) Might have to think on that for awhile...

 

I see your problem, the short description is stealing all of the width. There is a way to have the short description under the product name. I did something like that...the site name is in my profile if you want to look.

 

The plus and minus signs are in catalog/includes/functions/general.php around line 870.

 

$sort_suffix = (substr($sortby, 0, 1) == $colnum ? (substr($sortby, 1, 1) == 'a' ? '+' : '-') : '') . '</a>';

 

 

2. Around line 137 in product_listing.php,

 

$list_box_contents[$cur_row][] = array('align' => $lc_align,

'params' => 'valign= "top" class="productListing-data"',

'text' => $lc_text);

}

}

 

 

 

Please see my attached image.

 

1). I don't know how to resize product name+ colum & how do i remove or change that + sign?

2). How do I set valign="top" in product_listing.php, i know lc_align=right is for horizontal align but how about vertical align?

 

Thank you very much in advance!!

 

http://static.flickr.com/53/155338420_942e18130c.jpg?v=0

Link to comment
Share on other sites

Dear choosealogin,

 

Thank you very much for your reply, it works now (valign=top & +/- sign). One more thing, as u said earlier "the short description is stealing all of the width. There is a way to have the short description under the product name". How do i do that? (I'm not very good in scripting :blush: ) Thank you very much.

Link to comment
Share on other sites

I'm not sure what contribution you used to add the short description. It might be easier to use the contribution that will place the title above the short description....rather than rebuilding what you have.

 

If you want to look at the other short desc. contribution, it's HERE. If you decide to do that, just back up your files and your database so you can 'undo' if you don't like it or you have any problems.

 

version 1.5 (at the top) works...no problems. It will also add the short description to products_new.php. The instructions are good, too.

 

There's a screenshot in the download file.

 

It might be worth it to paste your product_listing.php here so I could see if it might be a quick fix. I really kind of doubt it...that file is kind of tricky :blink:

 

 

Dear choosealogin,

 

Thank you very much for your reply, it works now (valign=top & +/- sign). One more thing, as u said earlier "the short description is stealing all of the width. There is a way to have the short description under the product name". How do i do that? (I'm not very good in scripting :blush: ) Thank you very much.

Link to comment
Share on other sites

chooselogin, thanks for the reply, I use "Products_Short_Descriptions_1_03" by Alexander. This contribution will create new field in my sql called product_info. At the moments i have problem accessing osc contribution page to try other contribution as recommended by you, will try again later. TQ!!

 

Here is my product_listing.php.

 

 

-------------------------------------------

<?php

/*

$Id: product_listing.php,v 1.44 2003/06/09 22:49:59 hpdl Exp $

 

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

Copyright © 2003 osCommerce

 

Released under the GNU General Public License

*/

 

$listing_split = new splitPageResults($listing_sql, MAX_DISPLAY_SEARCH_RESULTS, 'p.products_id');

 

if ( ($listing_split->number_of_rows > 0) && ( (PREV_NEXT_BAR_LOCATION == '1') || (PREV_NEXT_BAR_LOCATION == '3') ) ) {

?>

<table border="0" width="100%" cellspacing="0" cellpadding="2">

<tr>

<td class="smallText"><?php echo $listing_split->display_count(TEXT_DISPLAY_NUMBER_OF_PRODUCTS); ?></td>

<td class="smallText" align="right"><?php echo TEXT_RESULT_PAGE . ' ' . $listing_split->display_links(MAX_DISPLAY_PAGE_LINKS, tep_get_all_get_params(array('page', 'info', 'x', 'y'))); ?></td>

</tr>

</table>

<?php

}

 

$list_box_contents = array();

 

for ($col=0, $n=sizeof($column_list); $col<$n; $col++) {

switch ($column_list[$col]) {

case 'PRODUCT_LIST_MODEL':

$lc_text = TABLE_HEADING_MODEL;

$lc_align = '';

break;

case 'PRODUCT_LIST_NAME':

$lc_text = TABLE_HEADING_PRODUCTS;

$lc_align = '';

break;

case 'PRODUCT_LIST_INFO':

$lc_text = TABLE_HEADING_INFO;

$lc_align = '';

break;

case 'PRODUCT_LIST_MANUFACTURER':

$lc_text = TABLE_HEADING_MANUFACTURER;

$lc_align = '';

break;

case 'PRODUCT_LIST_PRICE':

$lc_text = TABLE_HEADING_PRICE;

$lc_align = 'right';

break;

case 'PRODUCT_LIST_QUANTITY':

$lc_text = TABLE_HEADING_QUANTITY;

$lc_align = 'right';

break;

case 'PRODUCT_LIST_WEIGHT':

$lc_text = TABLE_HEADING_WEIGHT;

$lc_align = 'right';

break;

case 'PRODUCT_LIST_IMAGE':

$lc_text = TABLE_HEADING_IMAGE;

$lc_align = 'center';

break;

case 'PRODUCT_LIST_BUY_NOW':

$lc_text = TABLE_HEADING_BUY_NOW;

$lc_align = 'center';

break;

}

 

if ( ($column_list[$col] != 'PRODUCT_LIST_BUY_NOW') && ($column_list[$col] != 'PRODUCT_LIST_IMAGE') ) {

$lc_text = tep_create_sort_heading($HTTP_GET_VARS['sort'], $col+1, $lc_text);

}

 

$list_box_contents[0][] = array('align' => $lc_align,

'params' => 'class="productListing-heading"',

'text' => ' ' . $lc_text . ' ');

}

 

if ($listing_split->number_of_rows > 0) {

$rows = 0;

$listing_query = tep_db_query($listing_split->sql_query);

while ($listing = tep_db_fetch_array($listing_query)) {

$rows++;

 

if (($rows/2) == floor($rows/2)) {

$list_box_contents[] = array('params' => 'class="productListing-even"');

} else {

$list_box_contents[] = array('params' => 'class="productListing-odd"');

}

 

$cur_row = sizeof($list_box_contents) - 1;

 

for ($col=0, $n=sizeof($column_list); $col<$n; $col++) {

$lc_align = '';

 

switch ($column_list[$col]) {

case 'PRODUCT_LIST_MODEL':

$lc_align = '';

$lc_text = ' ' . $listing['products_model'] . ' ';

break;

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;

case 'PRODUCT_LIST_INFO':

$lc_align = '';

$lc_text = $listing['products_info'] . ' ';

break;

case 'PRODUCT_LIST_MANUFACTURER':

$lc_align = '';

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

break;

case 'PRODUCT_LIST_PRICE':

$lc_align = 'right';

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

$lc_text = ' <s>' . $currencies->display_price($listing['products_price'], tep_get_tax_rate($listing['products_tax_class_id'])) . '</s> <span class="productSpecialPrice">' . $currencies->display_price($listing['specials_new_products_price'], tep_get_tax_rate($listing['products_tax_class_id'])) . '</span> ';

} else {

$lc_text = ' ' . $currencies->display_price($listing['products_price'], tep_get_tax_rate($listing['products_tax_class_id'])) . ' ';

}

break;

case 'PRODUCT_LIST_QUANTITY':

$lc_align = 'right';

$lc_text = ' ' . $listing['products_quantity'] . ' ';

break;

case 'PRODUCT_LIST_WEIGHT':

$lc_align = 'right';

$lc_text = ' ' . $listing['products_weight'] . ' ';

break;

case 'PRODUCT_LIST_IMAGE':

$lc_align = 'center';

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']) . '">' . tep_image(DIR_WS_IMAGES . $listing['products_image'], $listing['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a>';

} else {

$lc_text = ' <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> ';

}

break;

case 'PRODUCT_LIST_BUY_NOW':

$lc_align = 'center';

$lc_text = '<a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $listing['products_id']) . '">' . tep_image_button('button_buy_now.gif', IMAGE_BUTTON_BUY_NOW) . '</a> ';

break;

}

 

$list_box_contents[$cur_row][] = array('align' => $lc_align,

'params' => 'valign= "top" class="productListing-data"',

'text' => $lc_text);

}

}

 

new productListingBox($list_box_contents);

} else {

$list_box_contents = array();

 

$list_box_contents[0] = array('params' => 'class="productListing-odd"');

$list_box_contents[0][] = array('params' => 'class="productListing-data"',

'text' => TEXT_NO_PRODUCTS);

 

new productListingBox($list_box_contents);

}

 

if ( ($listing_split->number_of_rows > 0) && ((PREV_NEXT_BAR_LOCATION == '2') || (PREV_NEXT_BAR_LOCATION == '3')) ) {

?>

<table border="0" width="100%" cellspacing="0" cellpadding="2">

<tr>

<td class="smallText"><?php echo $listing_split->display_count(TEXT_DISPLAY_NUMBER_OF_PRODUCTS); ?></td>

<td class="smallText" align="right"><?php echo TEXT_RESULT_PAGE . ' ' . $listing_split->display_links(MAX_DISPLAY_PAGE_LINKS, tep_get_all_get_params(array('page', 'info', 'x', 'y'))); ?></td>

</tr>

</table>

<?php

}

?>

-------------------------------------------------

Link to comment
Share on other sites

If you try this, please keep a backup of your product_listing.php file, in case it doesn't work.

 

First, go to admin and turn off the display of your short description, as it won't need its own column...or it will show up two times :P

 

I'm not sure about this part before the "} else {" ...I didn't need to worry too much about that since I don't use manufacturers.

 

I'm not a coder, I'm a wanna be who wins by trial and error :blink:

 

All I changed was this part

 

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><br><br>' . $listing['products_info'] . ' ';

 

I'm not sure if that will work. If it does, you'll probably need to make an adjustment to the css to give the product name more of a "heading" look, maybe just bold or something.

 

chooselogin, thanks for the reply, I use "Products_Short_Descriptions_1_03" by Alexander. This contribution will create new field in my sql called product_info. At the moments i have problem accessing osc contribution page to try other contribution as recommended by you, will try again later. TQ!!
Link to comment
Share on other sites

I think i'll try other contributions u mentioned earlier. i'm :sweating: to figure out the code. Anyway thanks for the great support. I appreciate it. That's why oscommerce rocks!

Link to comment
Share on other sites

  • 4 weeks later...
All I changed was this part

 

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><br><br>' . $listing['products_info'] . ' ';

 

I'm not sure if that will work. If it does, you'll probably need to make an adjustment to the css to give the product name more of a "heading" look, maybe just bold or something.

 

 

Thanks for the info, I have the same issues. I have also installed "Products short descriptions" v1.03 (because it is the only of the short descriptions contributions I could find that gives you a separate description, and not the first part of the main description).

 

But there is no info on how to move around on the short description (in fact there is hardly any info at all, and no support forum).

 

Choosealogin, I tried pasting in your code into my product_listing, and it sort of worked. It puts the short description below the tiltle, which is a huge step up. But when I switch off the short description in the admin panel, they both disappear.

 

Any suggestions?

 

I am a total newbie, so please be gentle!

Link to comment
Share on other sites

I took a look at the contribution and I see why your short description disappears when you switch off the column. Make a backup of your catalog/index.php file ...that's where you'll need to make some changes. If this works out OK, you'll need to do something very similar to advanced_search_result.php too.

 

In index.php, find where you added this:

 

'PRODUCT_LIST_INFO' => PRODUCT_LIST_INFO,

 

and replace it with:

 

//'PRODUCT_LIST_INFO' => PRODUCT_LIST_INFO,

 

And find this:

 

case 'PRODUCT_LIST_INFO':  
	$select_column_list .= 'pd.products_info, ';
	break;

 

and replace it with:

 

/*case 'PRODUCT_LIST_INFO':  
	$select_column_list .= 'pd.products_info, ';
	break;*/

 

Right underneath that, find this:

 

case 'PRODUCT_LIST_NAME':
	  $select_column_list .= 'pd.products_name, ';
	  break;

 

and replace it with this:

 

case 'PRODUCT_LIST_NAME':
	  $select_column_list .= 'pd.products_name, pd.products_info,';
	  break;

 

Then find this:

 

case 'PRODUCT_LIST_INFO':
	$order_str .= "pd.products_info " . ($sort_order == 'd' ? "desc" : "");
	break;

 

And replace it with:

 

/*case 'PRODUCT_LIST_INFO':
	$order_str .= "pd.products_info " . ($sort_order == 'd' ? "desc" : "");
	break;*/

 

Then go back to admin, and turn off the display of "short description". The short desc. should be under your product name now, regardless of the admin setting.

 

Let me know how if that works. :)

Link to comment
Share on other sites

Yes, you're right about the CSS. Probably the easiest thing to do is just add bold tags.

 

Back to includes/modules/product_listing.php...look at this part

 

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 = ' & n b s p;<b><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, ($cPath ? 'cPath=' . $cPath . '&' : '') . 'products_id=' . $listing['products_id']) . '">' . $listing['products_name'] . '</a></b>& n b s p;<br><br>' . $listing['products_info'] . ' ';

 

The bold tags I added are bold <b> and </b> ...one before the <a href and one after the </a>. I used the code I pasted up above, and when I did that today I noticed that the forum code made my & n b s p ; disappear from the code. I put them back in (in this post) , but I purposely s p r e a d out the letters so it wouldn't read it as a real non-breaking-space. If you paste that code in your file, just sqeeze the n b s p ; back together (no spaces) ...or leave them out...in which case it would be like this

 

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 = '<b><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, ($cPath ? 'cPath=' . $cPath . '&' : '') . 'products_id=' . $listing['products_id']) . '">' . $listing['products_name'] . '</a></b><br><br>' . $listing['products_info'] . ' ';

 

 

:) Hope that makes sense.

Link to comment
Share on other sites

Like a glove!

 

The + sign went in a jiffy as well.

 

Now I have a couple of more questions to round up this thread:

 

1) If I were to place the price above the 'Buy now' button, like you have on the site in your profile, could you share with us the secrets to your success?

 

2) Any idea on how to remove the product listing heading? I've searched the forums, but I found only futile cries for help on the subject.

Link to comment
Share on other sites

Yes, I'm sorry...I forgot about the question re. removing the heading. I need to wrap up some things this afternoon, then I'll take a closer look at that....reply here again to remind me if I forget :P

 

The secret to my success stacking the price and the buy now button are some rather screwy combinations of html and css.

 

After you make these small changes, the items (name, desc, price, buy now button) may not line up perfectly. I had to fiddle with the css a little to fix some small alignment issues. Do this and see what you think. It'll be easier to 'adjust' after you've got the new code in there.

 

 

 

First, turn off the display of the "buy now" column in admin>>configuration>>product listing

 

Around line 107 in catalog/includes/modules/product_listing.php

 

find

 

case 'PRODUCT_LIST_PRICE':
		$lc_align = 'right';
		if (tep_not_null($listing['specials_new_products_price'])) {
		  $lc_text = ' <s>' .  $currencies->display_price($listing['products_price'], tep_get_tax_rate($listing['products_tax_class_id'])) . '</s>  <span class="productSpecialPrice">' . $currencies->display_price($listing['specials_new_products_price'], tep_get_tax_rate($listing['products_tax_class_id'])) . '</span> ';
		} else {
		  $lc_text = ' ' . $currencies->display_price($listing['products_price'], tep_get_tax_rate($listing['products_tax_class_id'])) . ' ';
		}
		break;

 

Change it to

 

case 'PRODUCT_LIST_PRICE':
		$lc_align = 'right';
		if (tep_not_null($listing['specials_new_products_price'])) {
		  $lc_text = ' <s>' .  $currencies->display_price($listing['products_price'], tep_get_tax_rate($listing['products_tax_class_id'])) . '</s> <span class="productSpecialPrice"><br>' . $currencies->display_price($listing['specials_new_products_price'], tep_get_tax_rate($listing['products_tax_class_id'])) . '</span> <br><br><a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $listing['products_id']) . '">' . tep_image_button('button_buy_now.gif', IMAGE_BUTTON_BUY_NOW) . '</a>';
		} else {
		  $lc_text = ' ' . $currencies->display_price($listing['products_price'], tep_get_tax_rate($listing['products_tax_class_id'])) . ' <br><br><br><a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $listing['products_id']) . '">' . tep_image_button('button_buy_now.gif', IMAGE_BUTTON_BUY_NOW) . '</a>';
		}
		break;

 

That should do it. Then just make sure the buy now button is working properly, and see if the alignment needs some help. Let me know how it goes. And I'll see about that heading later tonight.

Link to comment
Share on other sites

I just remembered something.

 

I see in your screenshot above that you're using the manufacturer's dropdown 'filter' , as "labels".

 

Did you fix my other code to work with that? Try the dropdown and make sure your short description doesn't disappear or do anything strange. Also select a manufacturer from your front page if you have the dropdown there too. I don't use manufacturers so when I originally changed the code, I didn't take that into account.

 

Hope that makes sense.

Link to comment
Share on other sites

To get rid of the heading, find this block of code...starting around line 31 of catalog/includes/modules/product_listing.php. Put a /* at the beginning of it and a */ at the end, the way I have it below.

 

/*for ($col=0, $n=sizeof($column_list); $col<$n; $col++) {
switch ($column_list[$col]) {
  case 'PRODUCT_LIST_MODEL':
	$lc_text = TABLE_HEADING_MODEL;
	$lc_align = '';
	break;
  case 'PRODUCT_LIST_NAME':
	$lc_text = TABLE_HEADING_PRODUCTS;
	$lc_align = '';
	break;
  case 'PRODUCT_LIST_MANUFACTURER':
	$lc_text = TABLE_HEADING_MANUFACTURER;
	$lc_align = '';
	break;
  case 'PRODUCT_LIST_PRICE':
	$lc_text = TABLE_HEADING_PRICE;
	$lc_align = 'right';
	break;
  case 'PRODUCT_LIST_QUANTITY':
	$lc_text = TABLE_HEADING_QUANTITY;
	$lc_align = 'right';
	break;
  case 'PRODUCT_LIST_WEIGHT':
	$lc_text = TABLE_HEADING_WEIGHT;
	$lc_align = 'right';
	break;
  case 'PRODUCT_LIST_IMAGE':
	$lc_text = TABLE_HEADING_IMAGE;
	$lc_align = 'center';
	break;
  case 'PRODUCT_LIST_BUY_NOW':
	$lc_text = TABLE_HEADING_BUY_NOW;
	$lc_align = 'center';
	break;
}

if ( ($column_list[$col] != 'PRODUCT_LIST_BUY_NOW') && ($column_list[$col] != 'PRODUCT_LIST_IMAGE') ) {
  $lc_text = tep_create_sort_heading($HTTP_GET_VARS['sort'], $col+1, $lc_text);
}

$list_box_contents[0][] = array('align' => $lc_align,
								'params' => 'class="productListing-heading"',
								'text' => ' ' . $lc_text . ' ');
 }*/

 

 

I checked, and if you're using the manufacturer's filter (in the manufacturer's box, in the left column)...then there's one thing I forgot in the code earlier. Accessing your products from there, the short description will be missing. It still works from the mfg. dropdown showing in your screenshot (pretty sure, anyway) but it won't work from the manuf. box. If you want to use that just change this:

 

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><br><br>' . $listing['products_info'] . ' ';

 

to this

 

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><br><br>' . $listing['products_info'] . ' ';
} else {
$lc_text = ' <a href="' . tep_href_link(FILENAME_PRODUCT_INFO, ($cPath ? 'cPath=' . $cPath . '&' : '') . 'products_id=' . $listing['products_id']) . '">' . $listing['products_name'] . '</a><br><br>' . $listing['products_info'] . ' ';

 

And again, like earlier, that empty set of single quote marks after $listing['products_info'] . is supposed to have my disappearing n b s p ; in it :o

 

That will allow the short desc. to show up regardless of how the product list is accessed ;)

Link to comment
Share on other sites

Ok, first off, the manufacturer filter (or 'labels', as I have labeled it) seems to be working like a clock with the hacked product listing.

 

And secondly, the product price is now nicely placed above the 'Buy now' button. I modified it a bit (align center instead of right and removed a <br> linebreaker or two), and the result is most pleasing.

 

product_listing_screenshot_2.jpg

 

I think I am satisifed with this product listing, so, Choosealogin, please don't break your neck trying to figure out how to remove the product listing header, because I am not sure I want to after all. Although there are probably others who will find that information most useful. This is the most informative thread on modifying the product listing I have come across so far.

 

Thanks for your effort!

Link to comment
Share on other sites

Major setback!

 

I thought I was pretty much set to add all my products and go online. But then I tested the shop in Internet Explorer (I normally use Opera), and realized the layout is not the same.

 

product_listing_screenshot_4.jpg

 

There is no border spacing in the product listing (as opposed to in the other screenshots), no matter which value I set in TABLE.productListing in the CSS.

 

Also, if you look down right on the screenshot there is a purple border which is a colour set in Internet Explorer for visitied and not visited web addresses (which you define in tools->preferences->colors in IE)

 

The box with the link is simply a jpeg with my business address with the link to my e-mail address, and was added at the very end of catalog/includes/column_right.php using this code:

 

<td><a href="mailto:[email protected]"><img src="/catalog/images/address.jpg" width="125" height="125" border="1"></a></td>

 

Other links on the website are displayed by Internet Explorer only in colours defined in the CSS.

 

Any help on these issues would be highly appreciated!

Link to comment
Share on other sites

The picture should be an easy fix. None of the other picture links show a border, so I think you should just add a class to the stylesheet for that.

 

Something like

 

.pic {
border:1px;
border-color: yourcolor;
border-style: solid;
}

 

Then change the code to eliminate the border parameter and add the class,

 

<td><a href="mailto:[email protected]"><img src="/catalog/images/address.jpg" width="125" height="125" class="pic"></a></td>

 

On the same subject, with the default settings for the ad-blocker that comes with Norton Internet Security, I could not see your e-mail/picture link. The ad blocker, by default, blocks pictures that start with *ad*. Of course, I could fix that ...but most people probably don't, so maybe it would be a good idea to rename your picture. :)

 

Now, on the product listing table, you want to re-gain the borders that around the cells (inside the table), the way it looks in Opera and Firefox...is that correct?

Link to comment
Share on other sites

Great, that worked. I got the picture border in the colour I wanted.

 

I also tried adding another colour for hover:

 

.pic {
border:1px;
border-color: 000000;
border-style: solid;
}

.pic:hover {

border:1px;
border-color: FFFFFF;
border-style: solid;
}

 

That worked in Opera, but not in Internet Explorer. But I'm very happy with the result as it is.

 

I did not know about the 'ad' name issue. I will definitely fix that.

 

Yes, I would like in Internet Explorer to see the borders inside the table (around the cells), the way it looked in Opera.

 

I have tried different things, and the closest I got was pasting in the code from TABLE.productlisting to TD.prductListing-data in the CSS:

 

TABLE.productListing {
 border: 1px;
 border-style: solid;
 border-color: #000000;
 border-spacing: 0px;
}

.productListing-heading {
 font-family: Verdana, Arial, sans-serif;
 font-size: 10px;
 background: #000000;
 color: #7D7E00;
 font-weight: bold;
}

TD.productListing-data {
 font-family: Verdana, Arial, sans-serif;
 font-size: 12px;
 background: #b6b7cb;
 border: 1px;
 border-style: solid;
 border-color: #4B4B93;
 border-spacing: 0px;
}

 

This gives a similar effect, but the smallest border width is then 2 pixels, and it didn't look good applying the same code to .productListing-heading

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...