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)
-   -   Change Featured items on home from table to divs (https://forum.x-cart.com/showthread.php?t=64546)

mekon 08-10-2012 07:23 AM

Change Featured items on home from table to divs
 
Hi,

Im trying to change the featured items width on the home page. I noticed that it uses products.tpl and this in turn display the products in a table with cells.

I want (just for featured) to change these to divs.

I thought I could copy products and make a new file ... products2.tpl and then remove tables etc, but all that does is display a list with checkboxes of the featured products.

How can I do this please?

Thx

totaltec 08-11-2012 05:26 AM

Re: Change Featured items on home from table to divs
 
Gasp! Tables! Run for the hills! :-)

Which template controls featured products is determined by setting in the appearance section. Depending on what you set there, and what sizes your thumbnails are you can adjust the layout width, and number of columns.

Because of these controls, manually adjusting the template is going to be a bear. Not only that, the same template likely controls the category page. You had the right idea, creating a separate template just for featured products. Why it is not working is another matter. Care to share the code you are using?

cflsystems 08-11-2012 09:04 AM

Re: Change Featured items on home from table to divs
 
Unfortunatelly yes - instead of getting rid of tables alltogether QT actually added even more in 4.5.x

mekon 08-13-2012 02:18 AM

Re: Change Featured items on home from table to divs
 
Ive given up...there are far worse things in the world than these bloody tables.

cflsystems 08-13-2012 07:20 AM

Re: Change Featured items on home from table to divs
 
Quote:

Originally Posted by mekon
I thought I could copy products and make a new file ... products2.tpl and then remove tables etc, but all that does is display a list with checkboxes of the featured products.


You can't just remove tables, there is a lot of css styling related to them. You have apply styling to the new divs to make it all work the way you want to

mekon 08-13-2012 08:11 AM

Re: Change Featured items on home from table to divs
 
I know Steve, that's why I gave up on it.

gb2world 08-13-2012 11:32 AM

Re: Change Featured items on home from table to divs
 
This is partial solution for an older version, but perhaps it will help: http://forum.x-cart.com/showthread.php?t=54601

A table is the best way to display complex information in a grid layout. If QT were to use css to meet the requirements for displaying all the potential product information in a uniform grid using css, I suspect the code would be more complex than it already is.

---

mekon 08-15-2012 03:39 AM

Re: Change Featured items on home from table to divs
 
Ok thanks, will look at that.


All times are GMT -8. The time now is 12:36 AM.

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