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 January 29th, 2011, 12:11 PM
patagonia patagonia is offline
 
Join Date: May 2009
Posts: 506
Default Embedding Search Box in the PHP

Eric, in V1, I had the following code:

PHP Code:
<!-- DFR Search Form -->
<?php if (function_exists('store_link')) : ?>
    <form method="get" id="dfr_searchform" action="<?php echo store_link(); ?>">
        <div>
            <input type="text" value="<?php echo attribute_escape($wp->query_vars['dfrs']); ?>" name="dfrs" size="15" />
            <input type="hidden" value="<?php echo get_option('dfr_page_for_store'); ?>" name="page_id" />
            <input type="submit" id="searchsubmit" value="Search" />
        </div>
    </form>

<?php endif; ?>
in a php file for the search form.

What is the new way of doing this with V3?

I can not use the widget, as I want to put this search box in the header, which isn't widgetized in the theme I am using.

Thanks
  #2  
Old January 29th, 2011, 06:20 PM
Eric's Avatar
Eric Eric is offline
Datafeedr Team
 
Join Date: Feb 2008
Posts: 16,902
Default

You can use this <?php echo datafeedr_tag("widget/simple-search"); ?> which embeds your Simple Search widget anywhere you want.
  #3  
Old January 30th, 2011, 11:57 AM
patagonia patagonia is offline
 
Join Date: May 2009
Posts: 506
Default

Hi Eric,
Ok, after months of redoing my store and weeks of manually changing all my product titles and descriptions,... today I finally converted my biggest store to V3.

All went well! I have been practicing a while!

Just one small problem: I put the code for the search box in the php file, as you suggested above, however when you click GO, it just spits out a blank html page with the results and the results aren't rendered inside the theme.
The url being website.com/store/results?word=unicorn

Do I need to create a search page?

Any ideas?
  #4  
Old January 30th, 2011, 01:25 PM
Eric's Avatar
Eric Eric is offline
Datafeedr Team
 
Join Date: Feb 2008
Posts: 16,902
Default

What code do you have in your Simple Search Text module?
  #5  
Old January 30th, 2011, 01:33 PM
patagonia patagonia is offline
 
Join Date: May 2009
Posts: 506
Default

The original code that was already there:

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

<div class="store_search_form">
  [search.form]
  [search.word onfocus='wash(this);' onblur='checkWash(this);' value='Search store...']
  [search.submit title='Go']
  [/search.form]
</div>​ 
  #6  
Old January 30th, 2011, 01:35 PM
Eric's Avatar
Eric Eric is offline
Datafeedr Team
 
Join Date: Feb 2008
Posts: 16,902
Default

Strange... I have the same code and it works for me.

What's your site's URL?
What version of the plugin are you using?
What's your store's ID?
  #7  
Old January 30th, 2011, 02:05 PM
patagonia patagonia is offline
 
Join Date: May 2009
Posts: 506
Default

http://wallstickers-decals.com/
latest plugin downloaded this morning
http://factory3.datafeedr.com/feeder/shop?shop=5719
  #8  
Old January 30th, 2011, 02:25 PM
Eric's Avatar
Eric Eric is offline
Datafeedr Team
 
Join Date: Feb 2008
Posts: 16,902
Default

I think there might be a conflict in your URL Settings.

Can you try renaming the "Search page" field back to store/search/? Let's see if that will help.

Eric
  #9  
Old January 30th, 2011, 03:42 PM
patagonia patagonia is offline
 
Join Date: May 2009
Posts: 506
Default

Nope, that didn't work either. It does the same thing.

It worked fine before, with the code above.
  #10  
Old January 30th, 2011, 05:29 PM
Eric's Avatar
Eric Eric is offline
Datafeedr Team
 
Join Date: Feb 2008
Posts: 16,902
Default

I think I see the problem. You have a page with the slug "dfr_store". Can you try deleting that page?
  #11  
Old January 30th, 2011, 06:07 PM
patagonia patagonia is offline
 
Join Date: May 2009
Posts: 506
Default

Hmm, that didn't work either.
I am not sure where that other page STORE came from. It says it was created 40mins ago, which is odd, as I converted to V3 about 7 hours ago.
  #12  
Old January 30th, 2011, 08:41 PM
Eric's Avatar
Eric Eric is offline
Datafeedr Team
 
Join Date: Feb 2008
Posts: 16,902
Default

Quote:
Originally Posted by patagonia View Post
Hmm, that didn't work either.
I am not sure where that other page STORE came from. It says it was created 40mins ago, which is odd, as I converted to V3 about 7 hours ago.
It's still there: http://wallstickers-decals.com/dfr_store
  #13  
Old January 31st, 2011, 11:34 AM
patagonia patagonia is offline
 
Join Date: May 2009
Posts: 506
Default

Eric, It keeps reappearing. I delete it and delete it permanently and then it somehow recreates it self again.

I can't seem to work out when though.
However it is not happening after I do a search.
It is not happening after I do a settings update.

And after I have deleted it permanently, the search still doesn't work.
However I noticed that when there are no product returned from the search, the page generates fine.
However when there are products returned, it only shows one product (outside the framework), when it should be showing all the resulting products.

When do you think this dfr_store page is being created?
It is definitely new, as the old Store page has an id of 9, whereas the new one when it is generated has an WP page id around 925.

But in anycase, deleting it didn't help.

Also, have you seen the error on the page when you search:
PHP Code:
Fatal errorCall to a member function log() on a non-object in /home/meltin1/public_html/wallstickers-decals.com/wp-content/plugins/datafeedr/datafeedr.php on line 853 
  #14  
Old January 31st, 2011, 11:48 AM
Eric's Avatar
Eric Eric is offline
Datafeedr Team
 
Join Date: Feb 2008
Posts: 16,902
Default

Can you PM me the following information:

FTP LOGIN INFORMATION (Temporary login information preferred)
Host:
Login:
Password:

BLOG LOGIN INFO with ADMINISTRATOR PERMISSIONS (Temporary login information preferred)
Admin URL:
Username:
Password:

Eric
  #15  
Old January 31st, 2011, 12:39 PM
patagonia patagonia is offline
 
Join Date: May 2009
Posts: 506
Default

Eric, I just did a product update and the page has reappeared.
  #16  
Old January 31st, 2011, 01:10 PM
Eric's Avatar
Eric Eric is offline
Datafeedr Team
 
Join Date: Feb 2008
Posts: 16,902
Default

Hi

The issue was related to your directory settings.

In the Directories section (WordPress Admin Area > Tools > Datafeedr > Directories), you had a path configured for the merchant logos, but that path did not exist on your server.

After checking the "Create directory if necessary" checkbox and clicking save, the appropriate directory was created on your server and the search page loaded fine.

Eric
  #17  
Old January 31st, 2011, 01:16 PM
patagonia patagonia is offline
 
Join Date: May 2009
Posts: 506
Default

Ooookay, glad you worked that out, as I wouldn't have known they were even related. So many thanks.

So why was a dfr_store page being created when I updated the products?
I just tested this again, and it didn't create the page again when I just updated the products.
  #18  
Old January 31st, 2011, 01:19 PM
Eric's Avatar
Eric Eric is offline
Datafeedr Team
 
Join Date: Feb 2008
Posts: 16,902
Default

It was created because of how Datafeedr handles store display when a 'store' page cannot be found. Because the logo part was failing, this caused the functions related to the Datafeedr to not get loaded and therefore, Datafeedr tried to create its own page to display store content.
 


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
Embedding a View in a .php page patagonia Questions 7 April 11th, 2011 09:02 AM
Embedding an entire category in a post badm00n Questions 1 January 10th, 2011 03:11 PM


All times are GMT -5. The time now is 10:04 AM.


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