Datafeedr Support Forums

Datafeedr Support Forums (/index.php)
-   Questions (/forumdisplay.php?f=67)
-   -   Search just items on sale. (/showthread.php?t=10017)

yankeestonk December 16th, 2013 11:54 AM

Search just items on sale.
 
It would be helpful to have a "search just sale items" option in the dropdown search function.

Eric December 16th, 2013 12:03 PM

In the Factory or on your site?

yankeestonk December 16th, 2013 12:23 PM

I meant in the simple or advanced search widget that is on the live site. I had my coder go in and try to set it up but said there was no way he could see to do it from "outside", and that I should suggest it as a feature. I have the regular search box and the Merchant Filter box. But on the page I have on my site of just items on sale, there is no way to search that list. Other than we did put in a "search by price and search by sale price "high to low" and "low to high". Could not make it actually search for say "Drivers on sale", which would be alot more useful.

Side Q. Where do I go to change the title over the simple search bar? I want to change it from "Search Store" to "Search Entire Store", just to avoid the confusion of being on a page of just sale items and the search bar searches the whole site and not just the items displayed on that page.

Thanks.

http://saveongolf.net/store

Eric December 16th, 2013 12:32 PM

Hi,

You can add the following code between [search.form] and [/search.form] in your search views and that will give the user the option to search for products which are on sale.

HTML Code:

<input type="checkbox" name="saleprice" value="1-" /> On Sale
Eric

yankeestonk December 16th, 2013 12:53 PM

That would be great. Can't find the "search views" you are referring to? Is that under "search page", "custom views"?

And to be clear, this will add another option as a drop down? So it will still be the same search widget, but with the added ability to search just sales items? Is that only if someone searches asking for a sale item, or is it a option to only search sale items.?

Thanks!

Eric December 16th, 2013 01:14 PM

Hi,

You can add that code between [search.form] and [/search.form] in the following 2 places:

The Factory > Your Store > VIEWS > WIDGETS > Simple Search > Text module > Theme settings ()

The Factory > Your Store > VIEWS > WIDGETS > Advanced Search > Text module > Theme settings ()

No, it will not add a drop down. It will add a checkbox. It doesn't make sense to add a drop down. Once you add it, it will make sense.

Eric

yankeestonk December 16th, 2013 01:20 PM

I think I found the code under Merchant Filter. Can you show me where it would go?

?>

[search.form]
<div class="store_search_form">
<p class="keyword">
<label for="word">Keyword</label> [search.word]
</p>
<p class="merchant">
<select name="merchant_id">
<?php echo dfr_get_merchants(); ?>
</select>
</p>
<p class="price">
<label for="price">Price</label> [search.selectprice options='any, under $50(-50), $50 - $100, $100 - $200, $200 - $350, more than 350 (350+) ']
</p>
<p class="button">[search.submit title='Find it!']</p>
</div>
[/search.form]

yankeestonk December 16th, 2013 01:20 PM

nevermind. you other post hadn't posted yet. Let me try that first!

yankeestonk December 16th, 2013 01:27 PM

Worked Great! Thanks!

yankeestonk December 17th, 2013 10:51 AM

now it doesn't seem to be working. I can tick off the sale price but it's giving results from everything. Any thoughts?

http://saveongolf.net/store

Eric December 17th, 2013 10:55 AM

Make sure you are using exactly this code:

HTML Code:

<input type="checkbox" name="saleprice" value="1-" /> On Sale

yankeestonk December 17th, 2013 10:58 AM

here is the code for simple search.

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

<div class="store_search_form">
[search.form]
[search.word onfocus='wash(this);' onblur='checkWash(this);' value='Refine search...']
[search.submit title='Go']
<label><input type="checkbox" name="chkSaleprice" value="1-" />On Sale</label>
[/search.form]
</div>

yankeestonk December 17th, 2013 11:02 AM

should these not be there?

<label> </label>

Not sure how they got there exactly?

Ken

yankeestonk December 17th, 2013 11:04 AM

this is the advanced search code:

[search.form]
<div class="store_search_form">
<p class="keyword">
<label for="word">Keyword</label> [search.word]
</p>
<p class="merchant">
<label for="merchant">Merchant</label> [search.merchant]
</p>
<p class="tag">
<label for="tags">Tags</label> [search.tags]
</p>
<p class="price">
<label for="price">Price</label> [search.selectprice options='any, cheap(-5), $5 - $10, $10 - $20, more than 20 (20+)']
</p>
<p class="button">[search.submit title='Find it!']</p>
<input type="checkbox" name="saleprice" value="1-" /> On Sale
</div>
[/search.form]

Eric December 17th, 2013 11:14 AM

The code should be this:
HTML Code:

<input type="checkbox" name="saleprice" value="1-" /> On Sale
You have this:
HTML Code:

<input type="checkbox" name="chkSaleprice" value="1-" />On Sale

yankeestonk December 17th, 2013 11:19 AM

working now. THanks!


All times are GMT -5. The time now is 01:10 PM.

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