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 September 28th, 2014, 03:03 PM
yankeestonk yankeestonk is offline
 
Join Date: Jun 2013
Posts: 605
Default search results high to low WITH sale prices

http://saveongolf.net

I have my search results set up to display high price to low. However it is displaying the retail price high to low and not the actual price if on sale. Can I set it up to show the results based on price including sale prices?
  #2  
Old September 28th, 2014, 08:16 PM
Eric's Avatar
Eric Eric is offline
Datafeedr Team
 
Join Date: Feb 2008
Posts: 16,902
Default

Hi,

Change the query parameter from "price" to "sprice".

Eric
  #3  
Old September 29th, 2014, 09:02 AM
yankeestonk yankeestonk is offline
 
Join Date: Jun 2013
Posts: 605
Default

Can you show me where? I did it in the code near the top and had no effect.

here is the code:

HTML Code:
<style type="text/css">.desc img {float:left;}</style>


<!-- Search Heading -->
<h2>Your Search Results:</h2>
<!-- /Search Heading -->


<!-- Search Fields -->
<ul>
  <?php if (@$_GET['word']){ ?><li><b>Word: </b>[store.get param="word"]</li><?php } ?>
  <?php if (@$_GET['merchant']){ ?><li><b>Merchant: </b>[store.get param="merchant"]</li><?php } ?>
  <?php if (@$_GET['tags']){ ?><li><b>Tags: </b>[store.get param="tags"]</li><?php } ?>
  <?php if (@$_GET['price']){ ?><li><b>Price: </b>[store.get param="price"]</li><?php } ?>
</ul>
<!-- /Search Fields -->


<div class="dffltrs">
  <form method="get">
    <span class="dflside">
      Products per page:
      <?php echo datafeedr_tools()->form_select("ppp",
        array(
        "16" => "16",
        "32" => "32",
        "56" => "56",
        "80" => "80",
        )); ?>
    </span>
    <span class="dfrside">
      Sort by:
      <?php echo datafeedr_tools()->form_select("sort",
        array(
        "price"   => "Price (low to high)",
        "-price"   => "Price (high to low)",
        "name"     => "Product Name (a - z)",
        "-name"   => "Product Name (z - a)",
        )); ?>
      <input type="submit" value="Go" class="dfsbmt" />
    </span>
    <div class="clearingdiv">&nbsp;</div>
  </form>
</div>


<!-- Pagination Links (Top) -->
<div class="pgr">
  Pages:
  [pager.first text='<img src="[server.plugin_url]/first.gif" alt="first page" />' alt='']
  [pager.prev text='<img src="[server.plugin_url]/prev.gif" alt="prev page" />' alt='']
  [pager.pages delim=' ']
  [pager.next text='<img src="[server.plugin_url]/next.gif" alt="next page" />' alt='']
  [pager.last text='<img src="[server.plugin_url]/last.gif" alt="last page" />' alt='']
</div>
<!-- /Pagination Links (Top) -->

<!-- Product List -->
   <ul class="products grid">
<div class="pl">
  [product.each]
  <div class="t1 col5">
  <div class="bdr">
    <h2><a href="[product.link]" title="[product.name]">[product.name]</a></h2>
    <div class="thmb"><a href="[product.link]" title="[product.name]">[product.thumbnail tag='1']</a></div>   
    
    
    <?php if ($product->saleprice > 0 &&  $product->saleprice < $product->price) { ?>
  <div class="prc">
    <small>
      <span style="text-decoration: line-through;">[product.currency mode='sign'][product.price]</span>
      <span style="font-weight: bold; color:red;">[product.currency mode='sign'][product.saleprice]</span>
    </small>
  </div>
<?php } else { ?>
  <div class="prc">
    <small>
      [product.currency mode='sign'][product.price]
    </small>
  </div>    
<?php } ?>
    <p class="desc">[product.description]</p>
    <div class="logo">[product.merchant_logo]</div>
    <div class="btns">
    <?php if ( $product->compset_status > 0 ) : ?>
  <a href="[product.link]" class="dfbutton dforange dfmedium dfrounded" title="Find the best price for [product.name]">Compare Prices</a>
<?php else : ?>
  <a href="[product.link]" class="dfbutton dfgreen dfmedium dfrounded" title="View details of [product.name]">Details</a>
<?php endif; ?>
    </div>
    <div class="clearingdiv"> </div>
  </div>
  </div>
  [/product.each]
  <div class="clearingdiv"> </div>
</div>
</ul>
<!-- /Product List -->


<!-- Search Results -->

<!-- /Search Results -->
<!-- Pagination Links (Bottom) -->
<div class="pgr">
  Pages:
  [pager.first text='<img src="[server.plugin_url]/first.gif" alt="first page" />' alt='']
  [pager.prev text='<img src="[server.plugin_url]/prev.gif" alt="prev page" />' alt='']
  [pager.pages delim=' ']
  [pager.next text='<img src="[server.plugin_url]/next.gif" alt="next page" />' alt='']
  [pager.last text='<img src="[server.plugin_url]/last.gif" alt="last page" />' alt='']
</div>
<!-- /Pagination Links (Bottom) -->
  #4  
Old September 29th, 2014, 09:06 AM
Eric's Avatar
Eric Eric is offline
Datafeedr Team
 
Join Date: Feb 2008
Posts: 16,902
Default

Hi,

Change this:

PHP Code:
"price" => "Price (low to high)",
"-price" => "Price (high to low)"
To this:

PHP Code:
"sprice" => "Price (low to high)",
"-sprice" => "Price (high to low)"
Eric
  #5  
Old September 29th, 2014, 09:22 AM
yankeestonk yankeestonk is offline
 
Join Date: Jun 2013
Posts: 605
Default

Hi Eric,

http://saveongolf.net

I made the change above and it doesn't work in conjunction with a search from the search bar. This is the code for the search bar widget in W.P. . Is there something I need to add here to make it sort by price and sale price when using the search bar?

<form role="search" method="get" id="searchform" class="search-form" action="/store/search/">
<div><label class="screen-reader-text" for="s">Search for:</label>
<input class="search-field" type="text" value="" name="name" id="s" value="<?php echo esc_attr( @$_GET['name'] ); ?>">
<input class="search-submit" type="submit" id="searchsubmit" value="Search"><input name="saleprice" value="1-" type="checkbox"><strong style="color:#fff;margin-top: 5px; display: inline-table; margin-left: 5px; float: left;">On sale</strong>
</div></form>


Actually, I was just checking my site and the filter by merchant datafeedr widget is also not filtering by "sprice". Do I have to change the "price" to "sprice" in multiple areas and for individual widgets or just in the search default area? ) which I did and isn't working.

Last edited by yankeestonk : September 29th, 2014 at 09:27 AM.
  #6  
Old September 29th, 2014, 10:40 AM
Eric's Avatar
Eric Eric is offline
Datafeedr Team
 
Join Date: Feb 2008
Posts: 16,902
Default

Answered here: /show...0980#post50980
  #7  
Old September 29th, 2014, 11:41 AM
yankeestonk yankeestonk is offline
 
Join Date: Jun 2013
Posts: 605
Default

That seems to have done the trick! Thanks much Eric!!!!
  #8  
Old September 29th, 2014, 05:26 PM
yankeestonk yankeestonk is offline
 
Join Date: Jun 2013
Posts: 605
Default

spoke to soon. Still showing retail prices in order high to low even when the sale prices are lower. Here is the code for "Search Page" Default.

When I search in the search bar it is giving retail price high to low. I need it to show the price high to low even if it is a sale price.

<style type="text/css">.desc img {float:left;}</style>


<!-- Search Heading -->
<h2>Your Search Results:</h2>
<!-- /Search Heading -->


<!-- Search Fields -->
<ul>
<?php if (@$_GET['word']){ ?><li><b>Word: </b>[store.get param="word"]</li><?php } ?>
<?php if (@$_GET['merchant']){ ?><li><b>Merchant: </b>[store.get param="merchant"]</li><?php } ?>
<?php if (@$_GET['tags']){ ?><li><b>Tags: </b>[store.get param="tags"]</li><?php } ?>
<?php if (@$_GET['price']){ ?><li><b>Price: </b>[store.get param="price"]</li><?php } ?>
</ul>
<!-- /Search Fields -->


<div class="dffltrs">
<form method="get">
<span class="dflside">
Products per page:
<?php echo datafeedr_tools()->form_select("ppp",
array(
"16" => "16",
"32" => "32",
"56" => "56",
"80" => "80",
)); ?>
</span>
<span class="dfrside">
Sort by:
<?php echo datafeedr_tools()->form_select("sort",
array(
"sprice" => "Price (low to high)",
"-sprice" => "Price (high to low)",
"name" => "Product Name (a - z)",
"-name" => "Product Name (z - a)",
)); ?>
<input type="submit" value="Go" class="dfsbmt" />
</span>
<div class="clearingdiv">&nbsp;</div>
<?php
if ( isset( $_GET['name'] ) ) {
echo '<input type="hidden" name="name" value="' . $_GET['name'] . '" />';
}
?>
</form>
</div>


<!-- Pagination Links (Top) -->
<div class="pgr">
Pages:
[pager.first text='<img src="[server.plugin_url]/first.gif" alt="first page" />' alt='']
[pager.prev text='<img src="[server.plugin_url]/prev.gif" alt="prev page" />' alt='']
[pager.pages delim=' ']
[pager.next text='<img src="[server.plugin_url]/next.gif" alt="next page" />' alt='']
[pager.last text='<img src="[server.plugin_url]/last.gif" alt="last page" />' alt='']
</div>
<!-- /Pagination Links (Top) -->

<!-- Product List -->
<ul class="products grid">
<div class="pl">
[product.each]
<div class="t1 col5">
<div class="bdr">
<h2><a href="[product.link]" title="[product.name]">[product.name]</a></h2>
<div class="thmb"><a href="[product.link]" title="[product.name]">[product.thumbnail tag='1']</a></div>


<?php if ($product->saleprice > 0 && $product->saleprice < $product->price) { ?>
<div class="prc">
<small>
<span style="text-decoration: line-through;">[product.currency mode='sign'][product.price]</span>
<span style="font-weight: bold; color:red;">[product.currency mode='sign'][product.saleprice]</span>
</small>
</div>
<?php } else { ?>
<div class="prc">
<small>
[product.currency mode='sign'][product.price]
</small>
</div>
<?php } ?>
<p class="desc">[product.description]</p>
<div class="logo">[product.merchant_logo]</div>
<div class="btns">
<?php if ( $product->compset_status > 0 ) : ?>
<a href="[product.link]" class="dfbutton dforange dfmedium dfrounded" title="Find the best price for [product.name]">Compare Prices</a>
<?php else : ?>
<a href="[product.link]" class="dfbutton dfgreen dfmedium dfrounded" title="View details of [product.name]">Details</a>
<?php endif; ?>
</div>
<div class="clearingdiv"> </div>
</div>
</div>
[/product.each]
<div class="clearingdiv"> </div>
</div>
</ul>
<!-- /Product List -->


<!-- Search Results -->

<!-- /Search Results -->
<!-- Pagination Links (Bottom) -->
<div class="pgr">
Pages:
[pager.first text='<img src="[server.plugin_url]/first.gif" alt="first page" />' alt='']
[pager.prev text='<img src="[server.plugin_url]/prev.gif" alt="prev page" />' alt='']
[pager.pages delim=' ']
[pager.next text='<img src="[server.plugin_url]/next.gif" alt="next page" />' alt='']
[pager.last text='<img src="[server.plugin_url]/last.gif" alt="last page" />' alt='']
</div>
<!-- /Pagination Links (Bottom) -->
  #9  
Old September 29th, 2014, 07:26 PM
Eric's Avatar
Eric Eric is offline
Datafeedr Team
 
Join Date: Feb 2008
Posts: 16,902
Default

Hi,

It seems to work for me: http://saveongolf.net/store/category...16&sort=sprice

Eric
  #10  
Old September 30th, 2014, 06:50 AM
yankeestonk yankeestonk is offline
 
Join Date: Jun 2013
Posts: 605
Default

Why am I getting this?
http://saveongolf.net/store/category...st-gold-rated/
  #11  
Old September 30th, 2014, 09:27 AM
Eric's Avatar
Eric Eric is offline
Datafeedr Team
 
Join Date: Feb 2008
Posts: 16,902
Default

Hi,

That's also working for me when you use the sort by option: http://saveongolf.net/store/category...6&sort=-sprice

Eric
  #12  
Old September 30th, 2014, 10:40 AM
yankeestonk yankeestonk is offline
 
Join Date: Jun 2013
Posts: 605
Default

Hi Eric,

I guess my question is why isn't it working when you select something from the Store Categories list on the left? http://saveongolf.net/store/category/golf-clubs-all/
  #13  
Old September 30th, 2014, 10:41 AM
Eric's Avatar
Eric Eric is offline
Datafeedr Team
 
Join Date: Feb 2008
Posts: 16,902
Default

Hi,

So you mean you want the default sort to be by price?

Eric
  #14  
Old September 30th, 2014, 12:06 PM
yankeestonk yankeestonk is offline
 
Join Date: Jun 2013
Posts: 605
Default

Not sure what it is called, but I'd like (at least for now while I test it out) is for every search/sort etc. to be from high priced to low by "sprice". Right now my site is sorting search items by sprice and category searches by price. I'd like it to all be uniform. I just want to test and see if this is the best way for consumers to find what they are looking for given the vast amount of products in our store.
  #15  
Old September 30th, 2014, 12:12 PM
yankeestonk yankeestonk is offline
 
Join Date: Jun 2013
Posts: 605
Default

I'm not sure really how the best default sort should be. I see a lot of golf websites and other sites sort by popularity first. I don't think that is an option with Datafeedr. So I'm left with name/price/sprice high to low or low to high. None of which are the best options as we've got both new and used items etc. Only one vendor actually puts their sale price on the items, and they are mostly used clubs. So I'm kind of experimenting to see. I know low to high is out as the very low priced items are usually items that shouldn't even be in the store but slipped past the search criteria. High to low might be better but I don't know. There is no popularity option I guess right?
Do you have an opinion on the best way to sort? I think all the sorts should be one way so it's consistent whichever I go with.
  #16  
Old September 30th, 2014, 12:18 PM
Eric's Avatar
Eric Eric is offline
Datafeedr Team
 
Join Date: Feb 2008
Posts: 16,902
Default

Hi,

Yes, there is a popularity option and that can be based on both "views" (the number of times a product has been viewed on your site) and "clickthroughs" (the number of times a product's buy button has been clicked.

You can change the default sort of your categories here: The Factory > Your Store > VIEWS > CATEGORY PAGE > Default > Product list module > Settings () > Sort by

Eric
  #17  
Old September 30th, 2014, 01:13 PM
yankeestonk yankeestonk is offline
 
Join Date: Jun 2013
Posts: 605
Default

THanks Eric. I'll try that. I may be back on this one though...so don't leave your computer!
  #18  
Old September 30th, 2014, 01:54 PM
yankeestonk yankeestonk is offline
 
Join Date: Jun 2013
Posts: 605
Default

I told you I'd be back! Is there a way to put "popularity" in the "sort by" widget? Right now I have Random, hi to low, low to high, a-z and z-a? Since the site is new I don't know how the views thing will work now, but I'd like to try it. This is going to sound really dumb, but it won't be the first time... are the views "counted" already? Or does that have to be activated by doing the above to start that. In other words will the most viewed up to now show, or if I wait and have the site live for 3 months before I add the most popular option will it know what was viewed the most? My head is going to explode!
  #19  
Old September 30th, 2014, 03:40 PM
Eric's Avatar
Eric Eric is offline
Datafeedr Team
 
Join Date: Feb 2008
Posts: 16,902
Default

Hi
Quote:
Originally Posted by yankeestonk View Post
Is there a way to put "popularity" in the "sort by" widget?
We don't have (and will not have) a popularity field. We only have "views" and "clickthroughs".

Quote:
Originally Posted by yankeestonk View Post
are the views "counted" already
Views are already being counted by default.

Eric
  #20  
Old September 30th, 2014, 06:09 PM
yankeestonk yankeestonk is offline
 
Join Date: Jun 2013
Posts: 605
Default

Can I add "views" to the "sort by" dropdown widget. If so where do I do that?
Attached Thumbnails
Click image for larger version

Name:	1views.JPG
Views:	148
Size:	33.9 KB
ID:	782  
 


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
Sale prices in feed Estrella86 Questions 40 November 12th, 2014 08:49 PM
how to add prices to search results yankeestonk Questions 3 November 8th, 2013 09:36 AM
How to show reg price and sale price on search results? brightsway Questions 2 June 28th, 2012 12:58 PM
Sale Prices shoespecialists Questions 3 June 2nd, 2012 10:13 AM


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


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