X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   Bestsellers Into 2 Columns? (https://forum.x-cart.com/showthread.php?t=61554)

gtwing 11-09-2011 04:31 PM

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?

gtwing 11-10-2011 11:24 PM

Re: Bestsellers Into 2 Columns?
 
Anyone?

JWait 11-12-2011 07:58 AM

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!

gtwing 11-12-2011 09:28 AM

Re: Bestsellers Into 2 Columns?
 
Thanks for the info!

minfinger 12-02-2011 03:17 PM

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.

gb2world 12-02-2011 03:46 PM

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.

---

minfinger 12-02-2011 05:10 PM

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?

gb2world 12-02-2011 05:30 PM

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.

---

minfinger 12-02-2011 10:34 PM

Re: Bestsellers Into 2 Columns?
 
Well the {$bestsellers} array doesn't have a category value in it.

cflsystems 12-03-2011 07:07 AM

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


All times are GMT -8. The time now is 06:55 AM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.