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?
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?
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):
http://www.tipsandtricks-hq.com/ecommerce/wp-estore-shortcodes-and-functions-reference-460
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...
-JA
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?
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?
-JA
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);
}
else if($order==6)
{
$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 last
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.
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]Thank you admin, the Extra Shortcodes for WP eStore plugin is a good solution. Thank you.
You must log in to post.