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 19th, 2013, 03:43 PM
sasquach42 sasquach42 is offline
 
Join Date: Nov 2012
Posts: 10
Default Custom sort on overloaded product field

Store ID:
Website URL: rather not say publicly
URL to page in question: rather not say publicly

I'd like to sort a category list in a custom category view based on the weight of a product, which I've entered manually into the shipprice field of all of the products in the category.

I've extended the category view product list as follows, but I don't get a correctly sorted list. What am I doing wrong, and is there some other way to make this work?

<div class="dffltrs">
<form method="get">
<span class="dflside">
Products per page:
<?php echo datafeedr_tools()->form_select("ppp",
array(
"12" => "12",
"24" => "24",
"36" => "36",
"48" => "48",
)); ?>
</span>
<span class="dfrside">
Sort by:
<?php echo datafeedr_tools()->form_select("sort",
array(
"shipprice" => "Weight (low to high)",
"-shipprice" => "Weight (high to low )",
"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>
  #2  
Old January 19th, 2013, 04:43 PM
Eric's Avatar
Eric Eric is offline
Datafeedr Team
 
Join Date: Feb 2008
Posts: 16,902
Default

Hi,

You need to check the "Allow override" checkbox here: The Factory > Your Store > VIEWS > CATEGORY PAGE > Default > Product list module settings.

Eric
  #3  
Old January 19th, 2013, 08:53 PM
sasquach42 sasquach42 is offline
 
Join Date: Nov 2012
Posts: 10
Default That didn't work

I allowed the override in the product list settings and I can see shipprice in the URL, but the wrong product ordering is still returned. Try this URL http://www.lightweight-backpacking.com/backpacks
  #4  
Old January 19th, 2013, 09:01 PM
Eric's Avatar
Eric Eric is offline
Datafeedr Team
 
Join Date: Feb 2008
Posts: 16,902
Default

Quote:
Originally Posted by sasquach42 View Post
I allowed the override in the product list settings and I can see shipprice in the URL, but the wrong product ordering is still returned. Try this URL http://www.lightweight-backpacking.com/backpacks
That page redirects to this page: http://www.lightweight-backpacking.com/ I'm not sure why...

However, you've created a custom Category View named Backpacks. That's where you have to make the change.

You need to check the "Allow override" checkbox here: The Factory > Your Store > VIEWS > CATEGORY PAGE > Backpacks > Product list module settings.

Eric
  #5  
Old January 19th, 2013, 09:14 PM
sasquach42 sasquach42 is offline
 
Join Date: Nov 2012
Posts: 10
Default Still does not work

I changed the product listing setting on the backpack view to allow overrides.
If you go back to the backpacks page, you'll see that the only sort that does work is the price (low to high). Price (high to low), both weight, and both product name sorts, still don't work. You can see the weights listed for each product in the product listing (second line).
  #6  
Old January 19th, 2013, 09:23 PM
Eric's Avatar
Eric Eric is offline
Datafeedr Team
 
Join Date: Feb 2008
Posts: 16,902
Default

Hi,

I imported your store into my test site and it worked fine.

Do you have any sort of caching plugin installed?

Do you have any sort of plugin that manipulates the URL installed?

Eric
  #7  
Old January 19th, 2013, 09:32 PM
sasquach42 sasquach42 is offline
 
Join Date: Nov 2012
Posts: 10
Default No

No caching plugins. I'm just caching merchant images locally using %li and %lt.
No redirection either.
That redirect you saw earlier was because I set the Wordpress home page to be the static Backpack Page. I undid it so it now works as you'd expect it to.

Perhaps the issue is that I am not really using store navigation, but category shortcodes in my WP pages to implement a very flat hierarchical structure. In other words each category has it's own WP Page, but there is no store root. Would that make a difference? This style of implementation lets be bring the store and supporting content online incrementally.
  #8  
Old January 19th, 2013, 09:35 PM
Eric's Avatar
Eric Eric is offline
Datafeedr Team
 
Join Date: Feb 2008
Posts: 16,902
Default

Hi,

Yes, that's the problem.

Why not change your URL Settings to the following:



Then just add a Menu link to your store's category page.

That should basically give you exactly what you have now without having to use shortcodes at all.

Eric
  #9  
Old January 19th, 2013, 09:36 PM
Eric's Avatar
Eric Eric is offline
Datafeedr Team
 
Join Date: Feb 2008
Posts: 16,902
Default

This Datafeedr page does work: http://www.lightweight-backpacking.c...ort=-shipprice

Once you change the URL Settings, you'll have the desired effect.

Don't forget to delete the Page you created named "Backpacks". The store's URL will conflict with that URL.... I'm not sure which page will win and get displayed.
  #10  
Old January 19th, 2013, 09:47 PM
sasquach42 sasquach42 is offline
 
Join Date: Nov 2012
Posts: 10
Default Sweet!

I made those changes and it worked - many thanks - but I'm not sure I understand why.

What does the value store/home do?
Why don't I have to use short codes anymore?
  #11  
Old January 20th, 2013, 07:42 AM
Eric's Avatar
Eric Eric is offline
Datafeedr Team
 
Join Date: Feb 2008
Posts: 16,902
Default

Hi
Quote:
Originally Posted by sasquach42 View Post
What does the value store/home do?
I changed that URL otherwise it would have conflicted with your Category page URLs.
Quote:
Originally Posted by sasquach42 View Post
Why don't I have to use short codes anymore?
Because now you are using the Datafeedr store. You are just displaying a standard store category page.

Eric
 


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
Custom field in datafeed ayorofrance Feature Requests 0 May 6th, 2011 07:09 PM


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


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