November 6, 2010 at 6:37 pm #2180mikru2010Member
Is there a way to get the products displayed in a special order inside a category?
Like for instance the first product created to stay on top, and the last producct created to be displayed at the bottom?November 7, 2010 at 12:34 am #26181amin007Participant
Yeah, use this shortcode to display the products from a particular category:
[wp_eStore_category_products_fancy id=1 style=1 order=1]
The “order” parameter specifies the sorting order. You can find the explanation of this on the shortcodes reference page (look for the extra eStore shortcodes reference):November 9, 2010 at 6:11 pm #26182JackAubreyMember
Interesting — I had been wondering about this as well. From the reference sheet you pointed out it seems that the orders can be organized according to the following:
1: Sort by product ID in ascending order
2: Sort by product ID in descending order
3: Sort by product name (a-z)
4: Sort by product name (z-a)
A few thoughts here:
Would it be possible to add “price” as one of the parameters? And perhaps above all — though I imagine this would be a lot more complicated — would it be possible to order product manually within a category (without having to go back and mess with their product ID’s)? Maybe it’s easier to just switch the ID’s around if you know you’re going to have roughly the same stuff in stock all of the time but if you have relatively high turnover of one-of-a-kind items then this would be a lot trickier…
-JANovember 10, 2010 at 12:51 am #26183amin007Participant
Yeah sorting product by price range is a good option that I would be interested to add.
“would it be possible to order product manually within a category” – Can’t you do this now just by enabling manual checkout?November 10, 2010 at 1:37 am #26184JackAubreyMember
I guess so —
What if I want to use paypal, but still want to be able to arrange the order that my products are displayed on my main page — say, for example, putting more of my high-end premium products at the top of the order and the more middling ones further down?
-JADecember 16, 2010 at 4:54 am #26185marizs23Member
I tweaked the extra shortcodes plugin to allow me to order my products list by inventory quantity. I added the following code at line 474 of shortcode_include.php:
` else if($order==5)
$wp_eStore_db = $wpdb->get_results("SELECT * FROM $cat_prod_rel_table_name INNER JOIN $products_table_name ON $cat_prod_rel_table_name.prod_id=$products_table_name.id where cat_id=$id ORDER BY available_copies LIMIT $start, $limit", OBJECT);
$wp_eStore_db = $wpdb->get_results("SELECT * FROM $cat_prod_rel_table_name INNER JOIN $products_table_name ON $cat_prod_rel_table_name.prod_id=$products_table_name.id where cat_id=$id ORDER BY available_copies DESC LIMIT $start, $limit", OBJECT);
@JackAubrey you could probably just replace the word “available_copies” with “price” so that you can put your more expensive items first, or lastJanuary 29, 2012 at 12:47 am #26186TandemMember
Do you still plan to add the Sorting by Price functionality to eStore?
amin007: Yeah sorting product by price range is a good option that I would be interested to add.January 29, 2012 at 6:26 am #26187
Use a value of “7” or “8” for the order parameter to sort by price. Example:
[wp_eStore_category_products_fancy id=1 style=1 order=7]
[wp_eStore_category_products_fancy id=1 style=1 order=8]February 9, 2012 at 12:00 am #26188TandemMember
Thank you admin, the Extra Shortcodes for WP eStore plugin is a good solution. Thank you.September 18, 2012 at 12:45 pm #26189SalonGuruMember
This seemed like the perfect answer –
[wp_eStore_category_products_fancy id=1 style=1 order=7]
But orders 7 and 8 are not in the documentation and do not appear to work
It sorts by value but treat the vale as alpha and sorts it alphabetically ???September 19, 2012 at 5:41 am #26190
Hi, I have updated the extra shortcodes plugin to take care of this sort by price issue. Get a new version of the extra eStore shortcodes plugin from the addon download area and it should work fine now.February 25, 2013 at 9:27 pm #26191wolfszMember
Would it be possible add a new field “Sort Order” to the product settings? This way one can set the required sort order for each product with ease and everyone should be pleased.
WolfFebruary 26, 2013 at 4:58 am #26192
That actually won’t work. You only want to specify a sort order when you are displaying a bunch of products. If you set this value in one product configuration then it doesn’t work. The best option is to specify the sort order in the shortcode where you use it. This way on one page use can use one type or sorting and on another page you can use a different one (this gives maximum flexibility).April 28, 2014 at 8:48 pm #26193wploveParticipant
“would it be possible to order product manually within a category”
I still would like to see this feature. Is there a patch available to give this functionality? A drag and drop capability to specify the order in which products should be displayed in a category list would be great.
I thought I might be able to do it by changing product ID #’s but those numbers are locked down after a product is created.
I am using Authorize.net AIM for checkout.
eStore Version v7.0.9
WP Payment Gateway Bundle Version 1.9.2April 29, 2014 at 4:57 am #26194
You can always prefix your product names with numbers then sort by the name too (just another suggestion).
Also, you can do more categories (you can apply as many categories as you want to a product). Applying more categories to a product lets you embed a small number of products using the category shortcode. Then you can put many category shortcodes on a page where different ones are sorted in different orders.
- You must be logged in to reply to this topic.