Datafeedr Support Forums  

Go Back   Datafeedr Support Forums > Current Version (V3) Forum > Questions
Home Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Important - The support forums are now in "read-only" mode as we transition to an alternative help desk solution. Feel free to contact us here with any of your questions or search the forums for an existing solution.
 
 
Thread Tools Search this Thread Display Modes
  #1  
Old April 7th, 2012, 08:35 AM
ronce ronce is offline
 
Join Date: Mar 2012
Posts: 12
Red face Embed Search Box into page?

Hi,

I'm trying to embed a search box for my store directly into the homepage WP template.

If I use the code:

Code:
<script type="text/javascript">
<!--
/*
 * NOTE: This JS code would be much better off
 * existing in your theme's header.php file.
*/
function wash( anInput ) { if(anInput.value == anInput.defaultValue) anInput.value = ''; }
function checkWash( anInput ) { if(anInput.value == '') anInput.value = anInput.defaultValue; }
//-->
</script>

[search.form]
<div class="srchform">
  [search.word onfocus='wash(this);' onblur='checkWash(this);' value='Search store...']
  [search.submit title='Go']
</div>
[/search.form]
The code shows only in the template where I want to add, no search box. Moving the JS to the header.php file doesn't help either.

I'm sure I'm doing something daft here, so can someone please point me towards the correct way to do this please? I've been searching various tutorials/posts, no joy yet.

Thanks.

PS: Can't post URLs yet as store not live.
  #2  
Old April 7th, 2012, 08:40 AM
Eric's Avatar
Eric Eric is offline
Datafeedr Team
 
Join Date: Feb 2008
Posts: 16,902
Default

Hi

Just add this to your PHP template file:

<?php echo datafeedr_tag('widget/simple-search'); ?>

Eric
  #3  
Old April 7th, 2012, 08:42 AM
ronce ronce is offline
 
Join Date: Mar 2012
Posts: 12
Default

Quote:
Originally Posted by Eric View Post
Hi

Just add this to your PHP template file:

<?php echo datafeedr_tag('widget/simple-search'); ?>

Eric
Fantastic, I knew it would be easy, lol.

Thank you Eric, worked perfectly and thanks too for an amazingly fast response!
  #4  
Old April 7th, 2012, 08:43 AM
Eric's Avatar
Eric Eric is offline
Datafeedr Team
 
Join Date: Feb 2008
Posts: 16,902
Default

Here's more information about shortcodes: http://www.datafeedr.com/docs/item/185
  #5  
Old April 7th, 2012, 08:44 AM
ronce ronce is offline
 
Join Date: Mar 2012
Posts: 12
Default

PS: Can I change the words 'Search store...' to something else?

Thanks.
  #6  
Old April 7th, 2012, 08:44 AM
ronce ronce is offline
 
Join Date: Mar 2012
Posts: 12
Default

Quote:
Originally Posted by Eric View Post
Here's more information about shortcodes: http://www.datafeedr.com/docs/item/185
Thanks, will read through - been there once, but will have another good look.
  #7  
Old April 7th, 2012, 08:46 AM
Eric's Avatar
Eric Eric is offline
Datafeedr Team
 
Join Date: Feb 2008
Posts: 16,902
Default

Quote:
Originally Posted by ronce View Post
PS: Can I change the words 'Search store...' to something else?

Thanks.
Yes, you can change that here: The Factory > Your Store > VIEWS > WIDGETS > Simple Search > Text module template
  #8  
Old April 7th, 2012, 09:00 AM
ronce ronce is offline
 
Join Date: Mar 2012
Posts: 12
Default

Quote:
Originally Posted by Eric View Post
Yes, you can change that here: The Factory > Your Store > VIEWS > WIDGETS > Simple Search > Text module template
Thank you Eric.

I'd also like to change the search box length, can you point me towards that too please?
  #9  
Old April 7th, 2012, 09:04 AM
Eric's Avatar
Eric Eric is offline
Datafeedr Team
 
Join Date: Feb 2008
Posts: 16,902
Default

Add the following to your Custom CSS:

Code:
.store_search_form .s { width: 100px; }
Please start new threads for unrelated questions to help keep the support forums organized. Thanks!
  #10  
Old April 7th, 2012, 09:09 AM
ronce ronce is offline
 
Join Date: Mar 2012
Posts: 12
Default

Quote:
Originally Posted by Eric View Post
Add the following to your Custom CSS:

Code:
.store_search_form .s { width: 100px; }
Please start new threads for unrelated questions to help keep the support forums organized. Thanks!
Will do on both counts, thanks!
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Search Page layout abbeydriving Problems 2 March 20th, 2012 04:28 PM
Search Page layout abbeydriving Problems 1 March 5th, 2012 06:29 PM
Embed a Product on a Page nzcid Questions 1 January 15th, 2012 02:42 AM
Adding Search to main page youngy Questions 3 September 15th, 2011 09:20 AM


All times are GMT -5. The time now is 12:55 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.