| ||||||||||
![]() |
Shopping cart software Solutions for online shops and malls | |||||||||
![]() |
![]() |
|
X-Cart Home | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
border around product box on 3-column product list page with tables | |||
![]() |
|
|
Thread Tools | Search this Thread |
#1
|
|||||||||
|
|||||||||
![]() Hi, I am working on a client's site which is 4.3.1 Gold and it uses 3-column display of the products list, for which the corresponding template file is 'product_t.tpl'. I am trying to create a border around each product box, but the problem is that actually each 'product box' is not a div or html tag by itself but it consists of table cells on consecutive table rows, ie , the product title, product image,product price, of each product are rendered as table cells, that belong on consecutive table rows. A {foreach} Smarty loop which runs over each product renders the first row with the first 3 products' names (3-column products list). Then, a next {foreach} loop creates the next row of the first 3 products' images, the next creates the next row of the first 3 products' prices, and so on.
So, the markup looks something like this (say, for product, name, image and price): HTML Code:
So, what I want to do is to create a border around each product box which actually doesn't exist as an html entity, because each product is split in rows. I have tried setting borders on certain sides of the table cells that are part of the 'product boxes', so the borders of adjacent cells are connected, but then I need to set the cell-spacing to zero, and that gets all the 'product boxes' adjacent, with no margin among themselves, which is a problem. I was wondering if the only solution is to rewrite the 'products_t.tpl' template, re-arranging the loops, so instead of rendering the table cells of each consecutive row repeatedly, they would render each 'product box' by rendering the 3 consecutive table rows and then proceed to the next product. That way, I could work out the bordering of the products. In other words the code would be similar to this: HTML Code:
Has there been any ready template file with this modification or something similar that I could find somewhere, or some other approach to the already existing template? Appreciate any tips.
__________________
Vasilis Vrontisis X-Cart Development, Maintenance & Customization https://[URL="http://www.craftforweb.com"]craftforweb.com[/url] vasilis@craftforweb.com |
|||||||||
#2
|
|||||||||
|
|||||||||
![]() You can modify the loops or get rid of the tables altogether, but there are some implications, see: http://forum.x-cart.com/showthread.php?t=54565
Sisom also came up with a work around using the one column template for 2 columns: http://forum.x-cart.com/showthread.php?t=54565 ---
__________________
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) |
|||||||||
|
|||
X-Cart forums © 2001-2020
|