Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

Change Featured items on home from table to divs

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 08-10-2012, 07:23 AM
 
mekon mekon is offline
 

Senior Member
  
Join Date: Jan 2011
Posts: 180
 

Default 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
__________________
------------------------------------------------

Darren
Reply With Quote
  #2  
Old 08-11-2012, 05:26 AM
  totaltec's Avatar 
totaltec totaltec is offline
 

X-Guru
  
Join Date: Jan 2007
Location: Louisville, KY USA
Posts: 5,823
 

Default 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?
__________________
Mike White - Now Accepting new clients and projects! Work with the best, get a US based development team for just $125 an hour. Call 1-502-773-6454, email mike at babymonkeystudios.com, or skype b8bym0nkey

XcartGuru
X-cart Tutorials | X-cart 5 Tutorials

Check out the responsive template for X-cart.
Reply With Quote
  #3  
Old 08-11-2012, 09:04 AM
  cflsystems's Avatar 
cflsystems cflsystems is offline
 

Veteran
  
Join Date: Apr 2007
Posts: 14,190
 

Default 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
__________________
Steve Stoyanov
CFLSystems.com
Web Development
Reply With Quote
  #4  
Old 08-13-2012, 02:18 AM
 
mekon mekon is offline
 

Senior Member
  
Join Date: Jan 2011
Posts: 180
 

Default 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.
__________________
------------------------------------------------

Darren
Reply With Quote
  #5  
Old 08-13-2012, 07:20 AM
  cflsystems's Avatar 
cflsystems cflsystems is offline
 

Veteran
  
Join Date: Apr 2007
Posts: 14,190
 

Default 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
__________________
Steve Stoyanov
CFLSystems.com
Web Development
Reply With Quote
  #6  
Old 08-13-2012, 08:11 AM
 
mekon mekon is offline
 

Senior Member
  
Join Date: Jan 2011
Posts: 180
 

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

I know Steve, that's why I gave up on it.
__________________
------------------------------------------------

Darren
Reply With Quote
  #7  
Old 08-13-2012, 11:32 AM
  gb2world's Avatar 
gb2world gb2world is offline
 

X-Wizard
  
Join Date: May 2006
Location: Austin, TX
Posts: 1,970
 

Default 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.

---
__________________
X-CART (4.1.9,12/4.2.2-3/4.3.1-2/4.4.1-5)-Gold
(CDSEO, Altered-Cart On Sale, BCSE Preorder Backorder, QuickOrder, X-Payments, BCSE DPM Module)
Reply With Quote
  #8  
Old 08-15-2012, 03:39 AM
 
mekon mekon is offline
 

Senior Member
  
Join Date: Jan 2011
Posts: 180
 

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

Ok thanks, will look at that.
__________________
------------------------------------------------

Darren
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 11:16 AM.

   

 
X-Cart forums © 2001-2020