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)
-   -   Is it possible to get the screen resolution width into smarty? (https://forum.x-cart.com/showthread.php?t=29628)

phil_ 03-12-2007 10:46 AM

Is it possible to get the screen resolution width into smarty?
 
Hi,

I want to tweak my featured products display so that it shows more columns if the viewing screen resolution is wider. I have already made mods to the products_t.tpl page to do nearly all of this, the last part is just somehow getting the window.screen.width value into a smarty variable so I can plug it into a calculation to determine how many columns to show.

Has anyone else done this - is it possible to do it this way or any other way?

Thanks, Philip

inebriate 03-12-2007 03:59 PM

Re: Is it possible to get the screen resolution width into smarty?
 
i think you need to rely on javascript to pass the value to smarty, but then you need to make sure that you have a default value to pass to smarty just in case your customer does not use javascript

phil_ 03-13-2007 01:44 AM

Re: Is it possible to get the screen resolution width into smarty?
 
Does anyone have any example code of how to pass a variable from html/javascript into Smarty?

Thanks, Philip

geckoday 03-13-2007 06:59 AM

Re: Is it possible to get the screen resolution width into smarty?
 
See this post on screen resolution is smarty: http://forum.x-cart.com/showpost.php?p=163032&postcount=14


All times are GMT -8. The time now is 05:40 AM.

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