| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | User manuals | Login |
Help with Smarty | |||
|
|
Thread Tools | Search this Thread |
#1
|
|||||||||
|
|||||||||
Help with Smarty
Sorry for posting here, but there is not section in this forum for Smarty discussions.
I would like to get a solution for this problem. I declare an associative array in a php file and assign it to a Smarty template Code:
How can I create a table using Smarty, with a specified number of colums, as the following (let's say columns number is 3): column 1 column 2 column 3 row 1: Adidas Asics Montrail row 2: 12 8 4 row 3: New Balance Puma Salomon row 4: 7 9 11 row 5: Vasque row 6: 6 I know how to do it with 3 rows grouping in a table cell [name] and [products]. This version with 6 rows seems to be complex for me. I appreciate a solution on this. Thanks!
__________________
X-Cart Next: Business 5.2 (learning and testing) X-Cart Classic: Gold and Gold Plus 4.7 Lots of Modules and Customizations OS in use: Red Hat Enterprise, Fedora, CentOS, Debian, Ubuntu, Linux Mint, Kali Linux Ideas for Server configuration (basicaly): Nginx/Pound (reverse proxy), Apache/Nginx (webserver), Squid/Varnish (cache server), HHVM or (PHP-FPM + PHP 5.6 + opcache), MariaDB/Percona MySQL Server, Redis (storing sessions) You can catch my ideas here: http://ideas.x-cart.com |
|||||||||
#2
|
|||||||
|
|||||||
Re: Help with Smarty
Could you not use divs? Make Adidas 12 look to be on 2 rows, but have it in a block and just use 3 divs across each row like that?
|
|||||||
#3
|
|||||||||
|
|||||||||
Re: Help with Smarty
Someone more advanced in Smarty gave me this challenge. Of course I can use divs, but I need to do it in a table way as requested.
Quote:
__________________
X-Cart Next: Business 5.2 (learning and testing) X-Cart Classic: Gold and Gold Plus 4.7 Lots of Modules and Customizations OS in use: Red Hat Enterprise, Fedora, CentOS, Debian, Ubuntu, Linux Mint, Kali Linux Ideas for Server configuration (basicaly): Nginx/Pound (reverse proxy), Apache/Nginx (webserver), Squid/Varnish (cache server), HHVM or (PHP-FPM + PHP 5.6 + opcache), MariaDB/Percona MySQL Server, Redis (storing sessions) You can catch my ideas here: http://ideas.x-cart.com |
|||||||||
#4
|
|||||||||
|
|||||||||
Re: Help with Smarty
Quote:
Hmm, I'd try to adapt this code: http://www.smarty.net/forums/viewtopic.php?t=1391
__________________
Eugene Kaznacheev, Evangelist/Product Manager at Ecwid: http://www.ecwid.com/ (since Sept 2009) ex-Head of X-Cart Tech Support Department ex- X-Cart Hosting Manager - X-Cart hosting ex-X-Cart Technical Support Engineer Note: For the official guaranteed tech support services please turn to the Customers HelpDesk. |
|||||||||
#5
|
|||||||||
|
|||||||||
Re: Help with Smarty
|
|||||||||
#6
|
|||||||||
|
|||||||||
Re: Help with Smarty
Here is the solution without using any web resources. I tried to make it as simple as I could.
Code:
__________________
X-Cart Next: Business 5.2 (learning and testing) X-Cart Classic: Gold and Gold Plus 4.7 Lots of Modules and Customizations OS in use: Red Hat Enterprise, Fedora, CentOS, Debian, Ubuntu, Linux Mint, Kali Linux Ideas for Server configuration (basicaly): Nginx/Pound (reverse proxy), Apache/Nginx (webserver), Squid/Varnish (cache server), HHVM or (PHP-FPM + PHP 5.6 + opcache), MariaDB/Percona MySQL Server, Redis (storing sessions) You can catch my ideas here: http://ideas.x-cart.com |
|||||||||
|
|||
X-Cart forums © 2001-2020
|