Datafeedr Support Forums

Datafeedr Support Forums (/index.php)
-   Questions (/forumdisplay.php?f=67)
-   -   sorting and pricefilter - salesprice (/showthread.php?t=8366)

thk1976 December 31st, 2012 07:38 AM

sorting and pricefilter - salesprice
 
Store ID: 1727z9pgtyc2oba4
Website URL: billigjumpsuit.dk
URL to page in question:

How do i set up the sorting mechanism to sort by salesprice if it exists otherwise take the ordinary price. Also how do i set up the prcefilter do sort by sale price, if any, or else sort by price?

Eric December 31st, 2012 09:46 AM

Hi,

Currently, you can only set it up to sort by price or saleprice, but doing a conditional sort is not possible.

Eric

Eric December 31st, 2012 10:00 AM

Hi,

Sorry, I'm wrong about that.

You have access to the sprice value which is what you need.

For example, in the sorting template you have this:
PHP Code:

       "price"   => "Price (low to high)",
        
"-price"   => "Price (high to low)"

If you change that to:
PHP Code:

       "sprice"   => "Price (low to high)",
        
"-sprice"   => "Price (high to low)"

Then products will be returned sorted low to high (or high to low) based on their "real" price (ie. the lowest price available for that product whether it be the regular price or sale price).

Eric

thk1976 December 31st, 2012 10:05 AM

fantastic:) happy newyear !

Eric December 31st, 2012 10:08 AM

Happy New Year to you, too!

thk1976 December 31st, 2012 10:28 AM

Thanks!, it works perfectly on the soritng high to low, but unfortunately not on the "sorting widget", when i change from price to sprice nothing happens here, is there anyway to fix this?

Eric December 31st, 2012 11:08 AM

Hi,

You need to change this:
HTML Code:

<ul>
  <li><a href="[server.url type='fullpage' query='price=-300']">Under 300 Kr.</a></li>
  <li><a href="[server.url type='fullpage' query='price=300-600']">300 Kr. ~ 600 Kr.</a></li>
  <li><a href="[server.url type='fullpage' query='price=600-900']">600 Kr. ~ 900 Kr.</a></li>
  <li><a href="[server.url type='fullpage' query='price=900-1200']">900 Kr. ~ 1200 Kr.</a></li>
  <li><a href="[server.url type='fullpage' query='price=1200-']">Over 1200 Kr.</a></li>
<ul>

To this:
HTML Code:

<ul>
  <li><a href="[server.url type='fullpage' query='sprice=-300']">Under 300 Kr.</a></li>
  <li><a href="[server.url type='fullpage' query='sprice=300-600']">300 Kr. ~ 600 Kr.</a></li>
  <li><a href="[server.url type='fullpage' query='sprice=600-900']">600 Kr. ~ 900 Kr.</a></li>
  <li><a href="[server.url type='fullpage' query='sprice=900-1200']">900 Kr. ~ 1200 Kr.</a></li>
  <li><a href="[server.url type='fullpage' query='sprice=1200-']">Over 1200 Kr.</a></li>
<ul>

Eric

thk1976 January 1st, 2013 12:10 PM

Quote:

Originally Posted by Eric (Post 38561)
Hi,

You need to change this:
HTML Code:

<ul>
  <li><a href="[server.url type='fullpage' query='price=-300']">Under 300 Kr.</a></li>
  <li><a href="[server.url type='fullpage' query='price=300-600']">300 Kr. ~ 600 Kr.</a></li>
  <li><a href="[server.url type='fullpage' query='price=600-900']">600 Kr. ~ 900 Kr.</a></li>
  <li><a href="[server.url type='fullpage' query='price=900-1200']">900 Kr. ~ 1200 Kr.</a></li>
  <li><a href="[server.url type='fullpage' query='price=1200-']">Over 1200 Kr.</a></li>
<ul>

To this:
HTML Code:

<ul>
  <li><a href="[server.url type='fullpage' query='sprice=-300']">Under 300 Kr.</a></li>
  <li><a href="[server.url type='fullpage' query='sprice=300-600']">300 Kr. ~ 600 Kr.</a></li>
  <li><a href="[server.url type='fullpage' query='sprice=600-900']">600 Kr. ~ 900 Kr.</a></li>
  <li><a href="[server.url type='fullpage' query='sprice=900-1200']">900 Kr. ~ 1200 Kr.</a></li>
  <li><a href="[server.url type='fullpage' query='sprice=1200-']">Over 1200 Kr.</a></li>
<ul>

Eric

Hello Eric, i tried that, but i get this message "There are no products in this category" no matter which price category i choose

thk1976 January 2nd, 2013 12:02 PM

Is there a way to solve the widget problem??

Eric January 2nd, 2013 12:03 PM

Hi,

I haven't forgot about you. Still looking into this. I will update this thread as soon as I know more.

Eric

thk1976 January 2nd, 2013 12:28 PM

thanks mate

Eric January 2nd, 2013 02:05 PM

Hi,

Upgrading your Datafeedr plugin to the newest version should fix the issue.

Eric

thk1976 January 2nd, 2013 03:38 PM

Thankyou very much


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.