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

Help? Allow Users to Enable/Disable Product Thumbnails?

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 01-09-2005, 05:46 AM
 
flamers flamers is offline
 

Advanced Member
  
Join Date: Nov 2004
Posts: 51
 

Default Help? Allow Users to Enable/Disable Product Thumbnails?

I've spent a lot of time working through these boards getting tips on speeding up our site; thanks to everybody who has posted and shared their tips.

The one thing I can't find is a template mod to allow users to enable/disable thumbnails in the product list if - for example - they are using a dial-up connection. I am sure I lose customers through sheer boredom (apparently over 80% of my visitors spend less than 1min on my site) while they are waiting for pages to load. It would also be nice to give the user the option to show products either line by line or in a grid with three items per line.

I know I can achieve all this permanently by checking the options in admin, but I want to give the user some control over how he uses the store - the customer is the only one that knows what he wants after all!

Has anyone tackled this one at all, or anything like it?

Any and all help and ideas gratefully received.
__________________
X-Cart V 4.0.18
Reply With Quote
  #2  
Old 01-09-2005, 06:18 AM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default

First, please read the forum rules. This forum is for finished Mods only.

Second, please don't post your question in multiple forums, somone will answer your question just as quickly in one forum. Thank you!

http://forum.x-cart.com/viewtopic.php?t=15775
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #3  
Old 01-13-2005, 07:02 AM
  shan's Avatar 
shan shan is offline
 

X-Guru
  
Join Date: Sep 2002
Location: Birmingham, UK
Posts: 6,163
 

Default

have a button that submits the page to itself and adds a var to the url and then use an {if} statement around the image call that checks for the existence of the var in the url
__________________
Looking for a reliable X-cart host ?
You wont go wrong with either of these.

EWD Hosting
Hands On Hosting
Reply With Quote
  #4  
Old 01-13-2005, 08:52 AM
 
flamers flamers is offline
 

Advanced Member
  
Join Date: Nov 2004
Posts: 51
 

Default

First, my apologies to Balinor and anyone else I annoyed by breaking the posting rules - I now make sure I read the posting rules first!

Thanks for the tip Shan, I had thought that perhaps the best way was to pass a variable in the URL. I'm not an adept though, I'm an entirely self-taught coder that learns through trial and (many) errors. Do you have any sample code or an example that I can crib from? I'll be having a play anyway when time permits and I'll post the code here if I find a working solution.
__________________
X-Cart V 4.0.18
Reply With Quote
  #5  
Old 01-13-2005, 09:00 AM
  shan's Avatar 
shan shan is offline
 

X-Guru
  
Join Date: Sep 2002
Location: Birmingham, UK
Posts: 6,163
 

Default

once you have a var in the url you can use smarty in your templates to check for it as follows

if your url = http://yoursite.com/?myvar=value

Code:
{if $smarty.get.myvar} do this {else} do this instead {/if}

http://smarty.php.net/manual/en/language.variables.smarty.request.php
__________________
Looking for a reliable X-cart host ?
You wont go wrong with either of these.

EWD Hosting
Hands On Hosting
Reply With Quote
  #6  
Old 01-13-2005, 09:07 AM
 
flamers flamers is offline
 

Advanced Member
  
Join Date: Nov 2004
Posts: 51
 

Default

Excellent, thanks again Shan, you've saved me hours of searching and fiddling.

Best wishes,

Alan
__________________
X-Cart V 4.0.18
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 08:16 AM.

   

 
X-Cart forums © 2001-2020