![]() |
Bestsellers Into 2 Columns?
I am running a 3 column skin and when I turn on the best sellers module along with show icons, it stacks all the best sellers in a single column on the left side of the box and leaves 3/4 of the box empty on the right side. Does anyone know how I can modify the template to show the list in 2 or 3 columns across instead in order to use up all that blank space?
|
Re: Bestsellers Into 2 Columns?
Anyone?
|
Re: Bestsellers Into 2 Columns?
Bestsellers are displayed in a simple list. Take a look at your bestsellers.tpl and compare it to your products_t.tpl. You will notice that "bestsellers" uses <ul> and <li> and "products_t" uses a table. You should be able to strip out the <ul>'s and <li>'s in "bestsellers" and replace them with <tr>'s and <td>'s inside a <table> using the "products_t" as a guide.
Good Luck! |
Re: Bestsellers Into 2 Columns?
Thanks for the info!
|
Re: Bestsellers Into 2 Columns?
Jwait,
I need to run an if statement in the bestsellers.tpl. I need it to check if the product is a member of a specific category and then perform and action and if it's not perform another action. I've tried $cat eq '1' but that does work. I also tried $bestseller.category and many other things. Any ideas? I just can't figure out what value is holding the category number. The other problem is that these might be in a main category 10, but a member of another root or sub category that I need to check for. |
Re: Bestsellers Into 2 Columns?
You can use webmaster mode to see what variables are available in the array holding the bestseller information. If its main category is available, you will see it in the array. If it is not, you will have to modify php to change the query to get the information you want to display.
--- |
Re: Bestsellers Into 2 Columns?
Yeah I tried that. I don't really know what I'm looking for in Webmaster Mode. Where is this array?
|
Re: Bestsellers Into 2 Columns?
I don't use bestsellers - so someone else will have to tell you exactly what it is named.
But it should not be difficult to distinguish. In the webmaster mode window, search for something in the best sellers that is being displayed on the page, like a title or image name. That should point you right to the array. QT usually names things appropriately - it probably has bestsellers in the name. You should be able to look at the array and its contents and see familiar things, like the titles of the products in the bestsellers array. --- |
Re: Bestsellers Into 2 Columns?
Well the {$bestsellers} array doesn't have a category value in it.
|
Re: Bestsellers Into 2 Columns?
If not then you need to modify bestsellers php script and include product category in the the array for each product
|
Re: Bestsellers Into 2 Columns?
So this is something I have not had to do before, and I'm pretty lost as to where the array value would be added.
|
Re: Bestsellers Into 2 Columns?
bestsellers.php in modules/bestsellers
|
Re: Bestsellers Into 2 Columns?
Steve, yes I know where it is. I don't get the part about adding categories to the array.
|
Re: Bestsellers Into 2 Columns?
You have to query each product from the bestsellers array, get its category id from products_categories table and save it in that product array inside the bestsellers array
|
Re: Bestsellers Into 2 Columns?
Steve,
Yeah I figured that much, but I have no idea how to do that. I understand how to query tables in PHP, but not how to make this tpl stuff add something to an array. |
Re: Bestsellers Into 2 Columns?
The bestsellers array is already there in the php script, you need to get the info from the query to a variable in that array, this is not related to template files
|
Re: Bestsellers Into 2 Columns?
need free template
|
Re: Bestsellers Into 2 Columns?
Quote:
|
All times are GMT -8. The time now is 12:34 AM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.