Tips and Tricks HQ Forum

Support Forum for Tips and Tricks HQ Products

Register or log in - lost password? (Having an issue with the forum login?)

Search the Forum

Tips and Tricks HQ Forum » WP eStore Forum

Sort products in category

(9 posts) (6 voices)
  • Started 1 year ago by mikru2010
  • Latest reply from Tandem
  • Possible Solutions (Related Topics):
    1. Audio Player Button not showing with eStore_category_products shortcode
    2. Display products from particular category
    3. Simple list of products from a category
    4. Products not showing on page / using category shortcode
    5. Make a non-fancy list of products within a category

Tags:

  • category
  • Product Display
  • sort
  1. 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?

    Posted 1 year ago #
  2. amin007
    Key Master

    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

    Posted 1 year ago #
  3. 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

    Posted 1 year ago #
  4. amin007
    Key Master

    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?

    Posted 1 year ago #
  5. 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

    Posted 1 year ago #
  6. 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

    Posted 1 year ago #
  7. 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.

    Posted 3 months ago #
  8. admin
    Key Master

    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]
    Posted 3 months ago #
  9. Tandem
    Member

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

    Posted 3 months ago #

RSS feed for this topic

Reply

You must log in to post.

Tips and Tricks HQ  | WP Shopping Cart  | WP Affiliate Software  | WordPress Membership Plugin