Zen Cart Logo
Forums / Basic Configuration / Bestsellers sidebox thumbnail spacing issues

Bestsellers sidebox thumbnail spacing issues

Locked

Views: 2,490

Results 1 to 10 of 10
This thread is locked. New replies are disabled.
7 Feb 2008, 5:24 AM
#1
thebasher avatar

thebasher

New Zenner

Join Date:
Dec 2007
Posts:
53
Plugin Contributions:
0

Bestsellers sidebox thumbnail spacing issues

Hello All,
I'm having a problem getting the thumbnails to space correctly in the "Best Sellers" sidebox. I installed the "bestsellers thumbnail image" mod and it inserts a line under the first thumbnail image but not under the rest.

I have tried changing the setting in my stylesheet but nothing happens. I also looked at the best sellers module and template but I'm not sure what I'm looking for.

Any help would be greatly appreciated.

Thanks!

http://www.thebasher.com/bstore

7 May 2008, 5:32 AM
#2
kruna avatar

kruna

Zen Follower

Join Date:
Sep 2006
Posts:
405
Plugin Contributions:
0

Re: Bestsellers sidebox thumbnail spacing issues

Hi,
do you want to have this line under every image?

regards,
kruna

8 May 2008, 3:22 AM
#3
thebasher avatar

thebasher

New Zenner

Join Date:
Dec 2007
Posts:
53
Plugin Contributions:
0

Re: Bestsellers sidebox thumbnail spacing issues

Hey Kruna,
Actually I just want to be able to add a little space between the listing that are under the line. Right now they are all together. I tried to do it with the style sheet but it didn't work. Is there another way to do it?

8 May 2008, 3:30 AM
#4
thebasher avatar

thebasher

New Zenner

Join Date:
Dec 2007
Posts:
53
Plugin Contributions:
0

Re: Bestsellers sidebox thumbnail spacing issues

On second thought if there is a way to put a line after each listing that would be cool.

12 Jun 2008, 5:42 PM
#5
blessisaacola avatar

blessisaacola

Totally Zenned

Join Date:
Feb 2004
Location:
Georgia, USA
Posts:
1,875
Plugin Contributions:
1

Re: Bestsellers sidebox thumbnail spacing issues

Did anyone figure this out? Thanks!

12 Jun 2008, 6:34 PM
#6
thebasher avatar

thebasher

New Zenner

Join Date:
Dec 2007
Posts:
53
Plugin Contributions:
0

Re: Bestsellers sidebox thumbnail spacing issues

I still haven't been able to figure it out. I've tried a few things but to no avail. If anyone could help us out that would be awesome!

21 Jun 2008, 5:12 AM
#7
exoticcorpse avatar

exoticcorpse

New Zenner

Join Date:
Jan 2008
Posts:
35
Plugin Contributions:
0

Re: Bestsellers sidebox thumbnail spacing issues

thebasher:

I still haven't been able to figure it out. I've tried a few things but to no avail. If anyone could help us out that would be awesome!

I wrestled with this for a while - If you wanted to remove the underline completely, just remove the <h2> tag from tpl_best_sellers.php.

To get a line to appear under each item, I removed the <h2> and added a class to the td tag of the two columns (td class="bestsellersBorder"), then added that class to the css thusly.

.bestsellersBorder {border-bottom:1px solid #FFFFFF;}

Also helps to give it some padding...

21 Jun 2008, 5:21 AM
#8
exoticcorpse avatar

exoticcorpse

New Zenner

Join Date:
Jan 2008
Posts:
35
Plugin Contributions:
0

Re: Bestsellers sidebox thumbnail spacing issues

tpl_best_sellers.php

<?php
/**
 * Side Box Template
 *
 * @package templateSystem
 * @copyright Copyright 2003-2005 Zen Cart Development Team
 * @copyright Portions Copyright 2003 osCommerce
 * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
 * @version $Id: tpl_best_sellers.php 2982 2006-02-07 07:56:41Z birdbrain $
 * @version $Id: tpl_best_sellers.php 2982 2007-12-15 21:00:00 TRUST IT - www.trustit.ca - [email protected] $
 */
  $content = '';
  $content .= '<div id="' . str_replace('_', '-', $box_id . 'Content') . '" class="sideBoxContent">' . "\n";
  $content .= '<div class="wrapper"><table cellpadding=0 cellspacing=0 border=0>' .  "\n";
  for ($i=1; $i<=sizeof($bestsellers_list); $i++) {
    $imgLink =  DIR_WS_IMAGES . $bestsellers_list[$i]['image'];
	if ($i==2) {$content .= '<tr><td colspan="2"></td></tr>';}
    $content .= '<tr><td class="bestsellersBorder"><a href="' . zen_href_link(zen_get_info_page($bestsellers_list[$i]['id']), 'products_id=' . $bestsellers_list[$i]['id']) . '">' . 	zen_image($imgLink, zen_trunc_string($bestsellers_list[$i]['name']), SMALL_IMAGE_WIDTH/2, SMALL_IMAGE_HEIGHT/2) . '</a></td><td class="bestsellersBorder"><a href="' . zen_href_link(zen_get_info_page($bestsellers_list[$i]['id']), 'products_id=' . $bestsellers_list[$i]['id']) . '">' . zen_trunc_string($bestsellers_list[$i]['name'], BEST_SELLERS_TRUNCATE, BEST_SELLERS_TRUNCATE_MORE) . '</a><BR><div align=right>' . zen_get_products_display_price($bestsellers_list[$i]['id']) . '</div></td></tr>' . 	"\n";
  }
  $content .= '</table></div>' . "\n";
  $content .= '</div>';

?>

Add this to stylesheet.css

.bestsellersBorder {
	border-bottom: 1px solid #FFFFFF;
	}

You can add padding and control the vertical-align of the title and price, depending on how you have the other bestsellers styles set up.

10 Jul 2008, 8:46 PM
#9
thebasher avatar

thebasher

New Zenner

Join Date:
Dec 2007
Posts:
53
Plugin Contributions:
0

Re: Bestsellers sidebox thumbnail spacing issues

Thank you, Thank you, Thank you! This is exactly what I was looking for.

18 Aug 2008, 8:44 PM
#10
damondo avatar

damondo

New Zenner

Join Date:
Aug 2008
Posts:
2
Plugin Contributions:
0

Re: Bestsellers sidebox thumbnail spacing issues

This didn't work for me for some reason. Which stylesheet.css do I make the addition to?

Cheers