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

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

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 03-12-2007, 10:46 AM
 
phil_ phil_ is offline
 

Advanced Member
  
Join Date: Feb 2003
Location: Northern Ireland
Posts: 56
 

Lightbulb 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
__________________
-----------------------------------------
X-Cart5 v5.2.16 (Live)
-----------------------------------------
Reply With Quote
  #2  
Old 03-12-2007, 03:59 PM
 
inebriate inebriate is offline
 

eXpert
  
Join Date: May 2006
Posts: 301
 

Default 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
__________________
x-cart pro 4.0.18
linux
www.fabric8d.com (currently undergoing construction)
Reply With Quote
  #3  
Old 03-13-2007, 01:44 AM
 
phil_ phil_ is offline
 

Advanced Member
  
Join Date: Feb 2003
Location: Northern Ireland
Posts: 56
 

Default 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
__________________
-----------------------------------------
X-Cart5 v5.2.16 (Live)
-----------------------------------------
Reply With Quote
  #4  
Old 03-13-2007, 06:59 AM
 
geckoday geckoday is offline
 

X-Wizard
  
Join Date: Aug 2005
Posts: 1,073
 

Default 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
__________________
Manuka Bay Company
X-Cart Version 4.0.19 [Linux]

UGG Boots and other fine sheepskin products
http://www.snowriver.com
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 01:09 AM.

   

 
X-Cart forums © 2001-2020