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)
-   -   Search feature - How to enable these check boxes by default? (https://forum.x-cart.com/showthread.php?t=25484)

TL408 10-03-2006 12:09 PM

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

mcitde 10-03-2006 04:05 PM

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.

TL408 10-04-2006 11:21 AM

Re: Search feature - How to enable these check boxes by default?
 
Thanks again. :)

mcitde 10-05-2006 02:21 PM

Re: Search feature - How to enable these check boxes by default?
 
No Problem. Therefor you can pimp my ride. :lol:

xcart@spiritdiscovery.com 04-22-2008 11:04 AM

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?

Jayk 04-22-2008 11:18 AM

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

xcart@spiritdiscovery.com 06-02-2008 05:08 PM

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 :oops:

If you or anyone else can help me with this, I would be so grateful.


All times are GMT -8. The time now is 06:54 PM.

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