Forums / Templates, Stylesheets, Page Layout / BestSellers Sidebox Numbering.. How the heck do I make it go away!!!???

BestSellers Sidebox Numbering.. How the heck do I make it go away!!!???

Views: 572

Results 1 to 7 of 7
25 Feb 2015, 7:51 PM
#1
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

BestSellers Sidebox Numbering.. How the heck do I make it go away!!!???

Been looking all over this forum and staring at this code for hours.. Someone PLEASE put me out of my misery and tell me HOW to get rid of the leading numbers???

My Site - Zen Cart & WordPress integration specialist
I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.

25 Feb 2015, 7:55 PM
#2
design75 avatar

design75

Totally Zenned

Join Date:
Dec 2009
Location:
Amersfoort, The Netherlands
Posts:
2,862
Plugin Contributions:
5

Re: BestSellers Sidebox Numbering.. How the heck do I make it go away!!!???

I do not where the code is right now, but I do know that the templates from Picaflor aren't showing the numbers

25 Feb 2015, 8:07 PM
#3
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

Re: BestSellers Sidebox Numbering.. How the heck do I make it go away!!!???

Design75:

I do not where the code is right now, but I do know that the templates from Picaflor aren't showing the numbers

Yes.. but she also rearranges the best sellers too (adds images and such).. I just want the OG Best Sellers without the numbers..

My Site - Zen Cart & WordPress integration specialist
I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.

25 Feb 2015, 8:14 PM
#4
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

Re: BestSellers Sidebox Numbering.. How the heck do I make it go away!!!???

found it.. Guess I was looking for some GIGANTIC neon sign to say THIS IS THE NUMBER!!!! :laugh:

in this file:
includes/templates/YOUR_TEMPLATE/sideboxes/tpl_best_sellers.php

I made the following change..

Find this:

[B]$i . '.   '[/B] . zen_trunc_string($bestsellers_list[$i]['name'], BEST_SELLERS_TRUNCATE, BEST_SELLERS_TRUNCATE_MORE) . '</a></div></li>' . "\n";

Change to this:

. zen_trunc_string($bestsellers_list[$i]['name'], BEST_SELLERS_TRUNCATE, BEST_SELLERS_TRUNCATE_MORE) . '</a></div></li>' . "\n";

So I am assuming the number is some ranking?? (that's never been clear..) Always wondered why this isn't a configuration option..

My Site - Zen Cart & WordPress integration specialist
I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.

25 Feb 2015, 8:19 PM
#5
design75 avatar

design75

Totally Zenned

Join Date:
Dec 2009
Location:
Amersfoort, The Netherlands
Posts:
2,862
Plugin Contributions:
5

Re: BestSellers Sidebox Numbering.. How the heck do I make it go away!!!???

it is an ordered list.
change <ol> in includes/templates/YOUR_TEMPLATE/sideboxes/tpl_best_sellers.php to <ul>

  $content .= '<div class="wrapper">' . "\n" . '<ol>' . "\n";

to

  $content .= '<div class="wrapper">' . "\n" . '<ul>' . "\n";
25 Feb 2015, 8:22 PM
#6
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,114
Plugin Contributions:
56

Re: BestSellers Sidebox Numbering.. How the heck do I make it go away!!!???

That's weird, my out-of-box ZC 1.5.4's file reads:

<?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 $
 */
  $content = '';
  $content .= '<div id="' . str_replace('_', '-', $box_id . 'Content') . '" class="sideBoxContent">' . "\n";
  $content .= '<div class="wrapper">' . "\n" . '<ol>' . "\n";
  for ($i=1; $i<=sizeof($bestsellers_list); $i++) {
    $content .= '<li><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></li>' . "\n";
  }
  $content .= '</ol>' . "\n";
  $content .= '</div>' . "\n";
  $content .= '</div>';
?>

From that, I made the numbers "go away" (since it's an ordered list) by adding:

#bestsellers ol { list-style-type: none; }

to my stylesheet.css. The ordering is based on the products_ordered field present in the *products *database table.

25 Feb 2015, 9:53 PM
#7
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

Re: BestSellers Sidebox Numbering.. How the heck do I make it go away!!!???

lat9:

That's weird, my out-of-box ZC 1.5.4's file reads:

<?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 $ */ $content = ''; $content .= '<div id="' . str_replace('_', '-', $box_id . 'Content') . '" class="sideBoxContent">' . "\n"; $content .= '<div class="wrapper">' . "\n" . '<ol>' . "\n"; for ($i=1; $i<=sizeof($bestsellers_list); $i++) { $content .= '<li><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></li>' . "\n"; } $content .= '</ol>' . "\n"; $content .= '</div>' . "\n"; $content .= '</div>'; ?>
> From that, I made the numbers "go away" (since it's an ordered list) by adding:
> ```
#bestsellers ol { list-style-type: none; }

to my stylesheet.css. The ordering is based on the products_ordered field present in the *products *database table.

Yep.. you guys are right.. I've been looking at the Better Categories version of this sidebox, and ran into that code I posted.. didn't realize it wasn't part of the default.. What was happening was that the BetterCategories bullets were showing along with the numbers.. All fixed.. and sorry for the confusion..:wacko:

My Site - Zen Cart & WordPress integration specialist
I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.