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

Search feature - How to enable these check boxes by default?

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 10-03-2006, 12:09 PM
 
TL408 TL408 is offline
 

X-Adept
  
Join Date: Jan 2005
Posts: 549
 

Default Search feature - How to enable these check boxes by default?

Hi guys,

I looked but couldn't figure out how to enable these search "check boxes" on by default. Can someone please point me to the right direction?

Thanks
-Tuan
__________________
Win2003 IIS6, PHP 5.2.3, MySQL 5.0.45 and X-Cart 4.1.9
Reply With Quote
  #2  
Old 10-03-2006, 04:05 PM
  mcitde's Avatar 
mcitde mcitde is offline
 

Advanced Member
  
Join Date: Apr 2006
Posts: 61
 

Default Re: Search feature - How to enable these check boxes by default?

Hi Tuan,
you can do very easy by modifying the skin1/customer/main/search_result.tpl.
Look for
Code:
<input type="checkbox" id="WHAT_EVER_IT_IS" name="WHAT_EVER_IT_IS"{if $search_prefilled eq "" or $search_prefilled.by_sku} checked="checked"{/if} />
and just delete the smarty Vriables around checked="checked". Then it should look like this ->
Code:
<input type="checkbox" id="WHAT_EVER_IT_IS" name="WHAT_EVER_IT_IS" checked="checked" />

Thats it.
__________________
v 4.1.8 and v 4.1.9
WIN XP: Apache 2.2.4, PHP 5.2.3, MySQL 5.0.45
UNIX: Apache 1.3, PHP 4.4.4, MySQL 5.0.22
Reply With Quote
  #3  
Old 10-04-2006, 11:21 AM
 
TL408 TL408 is offline
 

X-Adept
  
Join Date: Jan 2005
Posts: 549
 

Default Re: Search feature - How to enable these check boxes by default?

Thanks again.
__________________
Win2003 IIS6, PHP 5.2.3, MySQL 5.0.45 and X-Cart 4.1.9
Reply With Quote
  #4  
Old 10-05-2006, 02:21 PM
  mcitde's Avatar 
mcitde mcitde is offline
 

Advanced Member
  
Join Date: Apr 2006
Posts: 61
 

Default Re: Search feature - How to enable these check boxes by default?

No Problem. Therefor you can pimp my ride.
__________________
v 4.1.8 and v 4.1.9
WIN XP: Apache 2.2.4, PHP 5.2.3, MySQL 5.0.45
UNIX: Apache 1.3, PHP 4.4.4, MySQL 5.0.22
Reply With Quote
  #5  
Old 04-22-2008, 11:04 AM
 
xcart@spiritdiscovery.com xcart@spiritdiscovery.com is offline
 

Advanced Member
  
Join Date: Jan 2003
Posts: 32
 

Default Re: Search feature - How to enable these check boxes by default?

Maybe someone can help me with the syntax for 4.1.9 for this same issue (making all the check boxes ON for the Advanced Search.)

The 4.19 code now looks like this, pulling whatever is in the POST, which is empty by default. We want to default the check boxes on, even if they've searched previously:

PHP Code:
<input type="checkbox" id="posted_data_by_sku" name="posted_data[by_sku]"{if $search_prefilled eq "" or $search_prefilled.by_skuchecked="checked"{/if} /> 

I tried changing it to
PHP Code:
<input type="checkbox" id="by_sku" name="by_sku" checked="checked"  /> 
But that hasn't worked.

Any ideas -- do I have the name wrong?
__________________
X-Cart Gold Version 4.0.19
X-Cart Gold Version 4.1.9
X-Cart Pro Version 4.1.9
Unix
Reply With Quote
  #6  
Old 04-22-2008, 11:18 AM
  Jayk's Avatar 
Jayk Jayk is offline
 

eXpert
  
Join Date: Nov 2003
Location: Calgary, Alberta, Canada
Posts: 333
 

Default Re: Search feature - How to enable these check boxes by default?

Did you try leaving the id and name the same as they were and just removing the if statement?

Jason
__________________
X-Cart Gold 4.4.3
Blog: www.flashinthepan.ca
Reply With Quote
  #7  
Old 06-02-2008, 05:08 PM
 
xcart@spiritdiscovery.com xcart@spiritdiscovery.com is offline
 

Advanced Member
  
Join Date: Jan 2003
Posts: 32
 

Default Re: Search feature - How to enable these check boxes by default?

Thank you for your reply, and I'm sorry I'm so late coming back. I had given up on this and I still feel it's so important to usability to have them "on" for new

Actually, yes, I tried that, for example, as above, instead of
PHP Code:
<input type="checkbox" id="posted_data_by_sku" name="posted_data[by_sku]"{if $search_prefilled eq "" or $search_prefilled.by_skuchecked="checked"{/if} /> 


I now have
PHP Code:
<input type="checkbox" id="posted_data_by_sku" name="posted_data[by_sku]" checked="checked" /> 

And the fields still do not default to "checked". I am stimeyed by this one

If you or anyone else can help me with this, I would be so grateful.
__________________
X-Cart Gold Version 4.0.19
X-Cart Gold Version 4.1.9
X-Cart Pro Version 4.1.9
Unix
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 03:03 PM.

   

 
X-Cart forums © 2001-2020