Tips and Tricks HQ Support

Support site for Tips and Tricks HQ premium products

  • Home
  • Contact Us
  • Documentation
  • Forum Home
    • Forum
    • Forum Search
    • Forum Login
    • Forum Registration

eStore – Sort products in category

by

Tips and Tricks HQ Support Portal › Forums › WP eStore Forum › eStore – Sort products in category

Tagged: category, Product Display, sort, sort in category, sort product, sort products category

  • This topic has 14 replies, 9 voices, and was last updated 8 years, 11 months ago by admin.
Viewing 15 posts - 1 through 15 (of 15 total)
  • Author
    Posts
  • November 6, 2010 at 6:37 pm #2180
    mikru2010
    Member

    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 #26181
    amin007
    Participant

    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

    November 9, 2010 at 6:11 pm #26182
    JackAubrey
    Member

    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

    November 10, 2010 at 12:51 am #26183
    amin007
    Participant

    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 #26184
    JackAubrey
    Member

    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

    December 16, 2010 at 4:54 am #26185
    marizs23
    Member

    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

    January 29, 2012 at 12:47 am #26186
    Tandem
    Member

    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
    admin
    Keymaster

    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 #26188
    Tandem
    Member

    Thank you admin, the Extra Shortcodes for WP eStore plugin is a good solution. Thank you.

    September 18, 2012 at 12:45 pm #26189
    SalonGuru
    Member

    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

    EDIT

    It sorts by value but treat the vale as alpha and sorts it alphabetically ???

    September 19, 2012 at 5:41 am #26190
    admin
    Keymaster

    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 #26191
    wolfsz
    Member

    Hi there

    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.

    Thanks

    Wolf

    February 26, 2013 at 4:58 am #26192
    admin
    Keymaster

    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 #26193
    wplove
    Spectator

    “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.

    WP 3.8

    eStore Version v7.0.9

    WP Payment Gateway Bundle Version 1.9.2

    April 29, 2014 at 4:57 am #26194
    admin
    Keymaster

    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.

  • Author
    Posts
Viewing 15 posts - 1 through 15 (of 15 total)
  • You must be logged in to reply to this topic.
Log In

Forum Related

  • Forum Home
  • Forum Search
  • Forum Login

Support Related Forms

  • Contact Us
  • Customer Support
  • Request a Plugin Update
  • Request Fresh Download Links

Useful Links

  • Plugin Upgrade Instructions
  • WP eStore Documentation
  • WP eMember Documentation
  • WP Affiliate Platform Documentation
  • WP PDF Stamper Documentation
  • WP Photo Seller Documentation
  • Tips and Tricks HQ Home Page
  • Our Projects

Quick Setup Video Tutorials

  • WP eStore Video Tutorial
  • WP eMember Video Tutorial
  • WP Affiliate Platform Video Tutorial
  • Lightbox Ultimate Video Tutorial
  • WP Photo Seller Video Tutorial

Our Other Plugins

  • WP Express Checkout
  • Stripe Payments Plugin
  • Simple Shopping Cart Plugin
  • Simple Download Monitor

Copyright © 2023 | Tips and Tricks HQ